Commit 103272f0 by 石迎春

删除了target

1 parent 3873e6a9
Showing 154 changed files with 0 additions and 20199 deletions
<?php
/**
* 缩略图方法
* $img 图片的地址及名称
* $width 缩略图宽
* $height 缩略图高
**/
function Thumb($img,$width,$height){
$img=substr($img,1);
$is_img=GetImageSize('./'.$img);
//设置宽高 生成缩略图
if(!empty($width) && !empty($height)){
import('ORG.Util.Image');
$Image = new Image();
$filename ='Uploads/thumb/'.$width.'_'.$height.'/'; //缩略图存储路径
$new_name=strtr($img,array('/'=>'_'));
if (!file_exists($filename)){
@mkdir($filename,0755);
}
if($is_img){
$is_thumb=GetImageSize('./'.$filename.$new_name);
if($is_thumb){
$thumb_img=$filename.$new_name;
}else{
$Image->thumb($img,$filename.$new_name,'',$width,$height);
$thumb_img=$filename.$new_name;
}
}else{
$thumb_img='Public/thumb.jpg';
}
}else{
if($is_img){
$thumb_img=$img;
}else{
$thumb_img='Public/thumb.jpg';
}
}
return '/'.$thumb_img;
}
/**
* 返回正整数,如果非正整数返回0
* @param type $num
* @return type
**/
function numberval($num){
if(!is_numeric($num)) return 0;
$num = (int)$num;
if(is_int($num) && $num>=0){
return $num;
}else{
return 0;
}
}
/**
* 截取字符串长度,过来所有HTML格式
* @param string $str 字符串
* @param int $len 长度
* @param string $tail 尾巴跟的字符
**/
function sub_str($data, $len, $tail='...',$strip=''){
$data = strip_tags($data, $strip);
$str = $data;
for( $i=0; $i<$len; $i++ )
{
$temp_str = substr($str,0,1);
if(ord($temp_str) > 127)
{
$i++;
if( $i<$len )
{
$new_str[] = substr($str,0,3);
$str = substr($str,3);
}
}
else
{
$new_str[] = substr($str,0,1);
$str = substr($str,1);
}
}
$str = join($new_str);
if(utf8_len($data)>$len) $str .= $tail;
return $str;
}
/**
* 截取字符长度
*
**/
function msubstr($str, $start=0, $length, $charset="utf-8", $suffix=true)
{
if(function_exists("mb_substr"))
$slice = mb_substr($str, $start, $length, $charset);
elseif(function_exists('iconv_substr')) {
$slice = iconv_substr($str,$start,$length,$charset);
if(false === $slice) {
$slice = '';
}
}
else
{
$re['utf-8'] = "/[\x01-\x7f]|[\xc2-\xdf][\x80-\xbf]|[\xe0-\xef][\x80-\xbf]{2}|[\xf0-\xff][\x80-\xbf]{3}/";
$re['gb2312'] = "/[\x01-\x7f]|[\xb0-\xf7][\xa0-\xfe]/";
$re['gbk'] = "/[\x01-\x7f]|[\x81-\xfe][\x40-\xfe]/";
$re['big5'] = "/[\x01-\x7f]|[\x81-\xfe]([\x40-\x7e]|\xa1-\xfe])/";
preg_match_all($re[$charset], $str, $match);
$slice = join("",array_slice($match[0], $start, $length));
}
if($suffix && strlen($str) > ($length*3))
$pp_fix=true;
else
$pp_fix=false;
return $pp_fix ? $slice.'...' : $slice;
}
/**
* 统计字utf-8符串长度,一个汉字算两个字节
* @param type $str 字符串
* @return int 长度
**/
function utf8_len($str)
{
$count = 0;
$str = iconv('utf-8','gbk',$str);
$num = strlen($str);
for($i=0;$i<$num;$i++)
{
if(ord(substr($str,$i+1,1))>127){
$count++;
$i++;
}
}
$str = iconv('gbk','utf-8',$str);
$total = mb_strlen($str,'utf8');
$number = ($total-$count)+($count*2);
return $number;
}
/**
* 改进addslashes
**/
function newaddslashes($string)
{
if(get_magic_quotes_gpc()) return $string;
if(!is_array($string)) return addslashes($string);
foreach($string as $key => $val) $string[$key] = newaddslashes($val);
return $string;
}
/**
* 改进stripslashes
**/
function newstripslashes($string)
{
if(!is_array($string)) return stripslashes($string);
foreach($string as $key => $val) $string[$key] = newstripslashes($val);
return $string;
}
function stripslashes_deep($value)
{
$value = is_array($value) ? array_map('stripslashes_deep', $value) : stripslashes($value);
return $value;
}
/**
* 改进array_filter
* 无返回值
**/
function new_arrayfilter(&$arr)
{
if(is_array($arr))
{
foreach( $arr as $k=>$v){
if(!is_array($v))
{
if(empty($v)) unset($arr[$k]);
}
else
{
new_arrayfilter($arr[$k]);
}
}
}
}
/**
* 二维数组过滤
* 只要有空值就过滤
*/
function ppFilter($arr){
if(is_array($arr)){
foreach($arr as $k => $v){
$count=count($v);
$new_v=array_filter($v);
if($count !== count($new_v)) unset($arr[$k]);
}
}
return $arr;
}
/**
* 汉字首字母
**/
function getfirstchar($s0){
$fchar = ord($s0{0});
if($fchar >= ord("A") and $fchar <= ord("z") )return strtoupper($s0{0});
$s1 = iconv("UTF-8","gb2312", $s0);
$s2 = iconv("gb2312","UTF-8", $s1);
if($s2 == $s0){$s = $s1;}else{$s = $s0;}
$asc = ord($s{0}) * 256 + ord($s{1}) - 65536;
if($asc >= -20319 and $asc <= -20284) return "A";
if($asc >= -20283 and $asc <= -19776) return "B";
if($asc >= -19775 and $asc <= -19219) return "C";
if($asc >= -19218 and $asc <= -18711) return "D";
if($asc >= -18710 and $asc <= -18527) return "E";
if($asc >= -18526 and $asc <= -18240) return "F";
if($asc >= -18239 and $asc <= -17923) return "G";
if($asc >= -17922 and $asc <= -17418) return "I";
if($asc >= -17417 and $asc <= -16475) return "J";
if($asc >= -16474 and $asc <= -16213) return "K";
if($asc >= -16212 and $asc <= -15641) return "L";
if($asc >= -15640 and $asc <= -15166) return "M";
if($asc >= -15165 and $asc <= -14923) return "N";
if($asc >= -14922 and $asc <= -14915) return "O";
if($asc >= -14914 and $asc <= -14631) return "P";
if($asc >= -14630 and $asc <= -14150) return "Q";
if($asc >= -14149 and $asc <= -14091) return "R";
if($asc >= -14090 and $asc <= -13319) return "S";
if($asc >= -13318 and $asc <= -12839) return "T";
if($asc >= -12838 and $asc <= -12557) return "W";
if($asc >= -12556 and $asc <= -11848) return "X";
if($asc >= -11847 and $asc <= -11056) return "Y";
if($asc >= -11055 and $asc <= -10247) return "Z";
return null;
}
function pinyin1($zh){
$ret = "";
$s1 = iconv("UTF-8","gb2312", $zh);
$s2 = iconv("gb2312","UTF-8", $s1);
if($s2 == $zh){$zh = $s1;}
$s1 = substr($zh,0,1);
$p = ord($s1);
if($p > 160){
$s2 = substr($zh,$i++,2);
$ret = getfirstchar($s2);
}else{
$ret = $s1;
}
return $ret;
}
/* end */
/**
* 改进htmlspecialchars
* $quotes:ENT_COMPAT、ENT_QUOTES、ENT_NOQUOTES
**/
function newhtmlspecialchars($string,$quotes=ENT_QUOTES)
{
if(!is_array($string)) return htmlspecialchars($string,$quotes);
foreach($string as $key => $val) $string[$key] = newhtmlspecialchars($val,$quotes);
return $string;
}
/**
* 改进htmlspecialchars_decode
* $quotes:ENT_COMPAT、ENT_QUOTES、ENT_NOQUOTES
**/
function newhtmlspecialchars_decode($string,$quotes=ENT_QUOTES)
{
if(!is_array($string)) return htmlspecialchars_decode($string,$quotes);
foreach($string as $key => $val) $string[$key] = newhtmlspecialchars_decode($val,$quotes);
return $string;
}
/**
* 判断是否是安卓
**/
function isandroid(){
if(strstr($_SERVER['HTTP_USER_AGENT'],'Android')) {
return 1;
}
return 0;
}
/**
* 格式化文本域内容
* @param $string 文本域内容
* @return string
**/
function trim_textarea($string) {
$string = nl2br ( str_replace ( ' ', '&nbsp;', $string ) );
return $string;
}
/**
* 获取当前页面完整URL地址
**/
function get_url() {
$sys_protocal = isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == '443' ? 'https://' : 'http://';
$php_self = $_SERVER['PHP_SELF'] ? safe_replace($_SERVER['PHP_SELF']) : safe_replace($_SERVER['SCRIPT_NAME']);
$path_info = isset($_SERVER['PATH_INFO']) ? safe_replace($_SERVER['PATH_INFO']) : '';
$relate_url = isset($_SERVER['REQUEST_URI']) ? safe_replace($_SERVER['REQUEST_URI']) : $php_self.(isset($_SERVER['QUERY_STRING']) ? '?'.safe_replace($_SERVER['QUERY_STRING']) : $path_info);
return $sys_protocal.(isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : '').$relate_url;
}
/**
* 将字符串转换为数组
* @param string $data 字符串
* @return array 返回数组格式,如果,data为空,则返回空数组
**/
function string2array($data) {
if($data == '') return array();
@eval("\$array = $data;");
return $array;
}
/**
* 将数组转换为字符串
*
* @param array $data 数组
* @param bool $isformdata 如果为0,则不使用new_stripslashes处理,可选参数,默认为1
* @return string 返回字符串,如果,data为空,则返回空
**/
function array2string($data, $isformdata = 1) {
if($data == '') return '';
if($isformdata) $data = newstripslashes($data);
return addslashes(var_export($data, TRUE));
}
/**
* 多维数组转一维数组
* $tp是否保存键名 true,false
**/
function array2single($array,$tp=false)
{
// static $result_array;
$result_array=array();
foreach ($array as $k => $v)
{
if(is_array($v))
{
$result_array=array_merge($result_array,array2single($v,$tp));
}
else
{
if($tp)
$result_array[$k] = $v;
else
$result_array[] = $v;
}
}
return $result_array;
}
/**
* 数组转成字符串
* @param array $Array 数组
* @param $fg 分隔符
* @return string 返回字符串,如果,data为空,则返回空
**/
function marray2string($Array,$fg=',') {
$Return='';
$NullValue="";
if(!is_array($Array)) return $Array;
foreach ($Array as $Key => $Value) {
if(is_array($Value))
$ReturnValue=marray2string($Value,$fg);
else
$ReturnValue=(strlen($Value)>0)?$Value:$NullValue;
$Return.=$ReturnValue?$fg.$ReturnValue:'';
}
$Return=substr($Return,1);
return $Return;
}
/**
* 判断email格式是否正确
* @param $email
**/
function is_email($email) {
return strlen($email) > 6 && preg_match("/^[\w\-\.]+@[\w\-\.]+(\.\w+)+$/", $email);
}
/**
* 生成随机字符串
* @param string $lenth 长度
* @return string 字符串
**/
function makeRand( $length = 6 )
{
// 密码字符集,可任意添加你需要的字符
$chars = array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h','i', 'j', 'k', 'l','m', 'n', 'o', 'p', 'q', 'r', 's','t', 'u', 'v', 'w', 'x', 'y','z', 'A', 'B', 'C', 'D','E', 'F', 'G', 'H', 'I', 'J', 'K', 'L','M', 'N', 'O','P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y','Z','0', '1', '2', '3', '4', '5', '6', '7', '8', '9');
// 在 $chars 中随机取 $length 个数组元素键名
$keys = array_rand($chars, $length);
$password = '';
for($i = 0; $i < $length; $i++)
{
// 将 $length 个数组元素连接成字符串
$password .= $chars[$keys[$i]];
}
return $password;
}
/**
*
* 获取远程内容
* @param $url 接口url地址
* @param $timeout 超时时间
**/
function pc_file_get_contents($url, $timeout=30) {
$stream = stream_context_create(array('http' => array('timeout' => $timeout)));
return @file_get_contents($url, 0, $stream);
}
/**
* 下载文件
* @param string $file
* 被下载文件的路径
* @param string $name
* 用户看到的文件名
**/
function download($file,$name='')
{
$fileName = $name ? $name : pathinfo($file,PATHINFO_FILENAME);
$filePath = realpath($file);
$fp = fopen($filePath,'rb');
if(!$filePath || !$fp){
header('HTTP/1.1 404 Not Found');
echo "Error: 404 Not Found.(server file path error)<!-- Padding --><!-- Padding --><!-- Padding --><!-- Padding --><!-- Padding --><!-- Padding --><!-- Padding --><!-- Padding --><!-- Padding --><!-- Padding --><!-- Padding --><!-- Padding --><!-- Padding --><!-- Padding -->";
exit;
}
$fileName = $fileName .'.'. pathinfo($filePath,PATHINFO_EXTENSION);
// $encoded_filename = urlencode($fileName);
// $encoded_filename = str_replace("+", "%20", $encoded_filename);
$encoded_filename=rawurlencode($fileName);
header('HTTP/1.1 200 OK');
header( "Pragma: public" );
header( "Expires: 0" );
header("Content-type: application/octet-stream");
header("Content-Length: ".filesize($filePath));
header("Accept-Ranges: bytes");
header("Accept-Length: ".filesize($filePath));
$ua = $_SERVER["HTTP_USER_AGENT"];
if (preg_match("/MSIE/", $ua)) {
header('Content-Disposition: attachment; filename="' . $encoded_filename . '"');
} else if (preg_match("/Firefox/", $ua)) {
header('Content-Disposition: attachment; filename*="utf8\'\'' . $fileName . '"');
} else {
header('Content-Disposition: attachment; filename="' . $fileName . '"');
}
// ob_end_clean(); <--有些情况可能需要调用此函数
// 输出文件内容
fpassthru($fp);
exit;
}
/**
* 判断是否是手机端
**/
function isMobile2(){
$useragent=isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '';
$useragent_commentsblock=preg_match('|\(.*?\)|',$useragent,$matches)>0?$matches[0]:'';
function CheckSubstrs($substrs,$text)
{
foreach($substrs as $substr)
{
if(false!==strpos($text,$substr)){
return true;
}
}
return false;
}
$mobile_os_list=array('Google Wireless Transcoder','Windows CE','WindowsCE','Symbian','Android','armv6l','armv5','Mobile','CentOS','mowser','AvantGo','Opera Mobi','J2ME/MIDP','Smartphone','Go.Web','Palm','iPAQ');
$mobile_token_list=array('Profile/MIDP','Configuration/CLDC-','160×160','176×220','240×240','240×320','320×240','UP.Browser','UP.Link','SymbianOS','PalmOS','PocketPC','SonyEricsson','Nokia','BlackBerry','Vodafone','BenQ','Novarra-Vision','Iris','NetFront','HTC_','Xda_','SAMSUNG-SGH','Wapaka','DoCoMo','iPhone','iPod');
if (CheckSubstrs($mobile_os_list,$useragent_commentsblock) || CheckSubstrs($mobile_token_list,$useragent)){
return true;
}else{
return false;
}
}
function isMobile($url="")
{
$ua = strtolower($_SERVER['HTTP_USER_AGENT']);
$uachar = "/(nokia|sony|ericsson|mot|samsung|sgh|lg|philips|panasonic|alcatel|lenovo|cldc|midp|mobile)/i";
if(($ua == '' || preg_match($uachar, $ua))&& !strpos(strtolower($_SERVER['REQUEST_URI']),'wap'))
{
if (!empty($url))
{
header("Location: $url\n");
exit;
}
}
}
/**
* 导出数据为excel表格
*@param $data 一个二维数组,结构如同从数据库查出来的数组
*@param $title excel的第一行标题,一个数组,如果为空则没有标题
*@param $filename 下载的文件名
*@examlpe
*$stu = M ('User');
*$arr = $stu -> select();
*exportexcel($arr,array('id','账户','密码','昵称'),'文件名!');
*/
function exportexcel($data=array(),$title=array(),$filename='report')
{
header("Content-Type: applicationnd.ms-excel; charset=utf-8");
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");
header("Content-Disposition: attachment;filename=".$filename.".xls ");
header("Content-Transfer-Encoding: binary ");
$map .="<table>";
if (!empty($title)){
$map .="<tr>";
foreach ($title as $k => $v) {
//$title[$k]=iconv("UTF-8", "GB2312",$v);
$map .="<td>".$title[$k]."</td>";
}
$map .="</tr>";
}
if (!empty($data)){
foreach($data as $key=>$val){
$map .="<tr>";
foreach ($val as $ck => $cv) {
// $data[$key][$ck]=iconv("UTF-8", "GB2312", $cv);
$map .="<td>".$data[$key][$ck]."</td>";
}
$map .="</tr>";
}
$map .="</table>";
}
echo $map;
}
/**
* 汉字反转
**/
function str_reverse($string)
{
preg_match_all('/./us', $string, $array);
return implode('', array_reverse($array[0]));
}
/**
* 把一个字符串的中间部分用星号隐藏掉
*/
function replace_with_stars($str,$char='*')
{
if(preg_match('/[\x{4e00}-\x{9fa5}]/u', $str))
{
$len=mb_strlen($str,'UTF-8');
if($len<3)
return $str;
elseif($len<5)
$slen=1;
elseif($len<7)
$slen=2;
elseif($len<9)
$slen=3;
elseif($len<13)
$slen=4;
elseif($len<16)
$slen=5;
elseif($len<19)
$slen=6;
else
$slen=7;
//if($len%2>0)
//$len-=1;
$pos=($len-$slen)%2==0?(($len-$slen)/2):(intval(($len-$slen)/2)+1);
$rt=mb_substr($str,0, $pos,'UTF-8').str_repeat($char, $slen).mb_substr($str, -1*($len-($pos+$slen)),$len,'UTF-8');
return $rt;
}
else
{
$len=strlen($str);
if($len<5)
return $str;
elseif($len<7)
$slen=2;
elseif($len<9)
$slen=3;
elseif($len<13)
$slen=4;
else
$slen=5;
//if($len%2>0)
//$len-=1;
$pos=($len-$slen)%2==0?(($len-$slen)/2):(intval(($len-$slen)/2)+1);
$rt=substr($str,0, $pos).str_repeat($char, $slen).substr($str, -1*($len-($pos+$slen)));
return $rt;
}
//if($len)
}
/**
* 计算字符串长度,汉字算2个字节
**/
function str_length($str)
{
return strlen(preg_replace('/[\x{4e00}-\x{9fa5}]/u', '**',$str));
}
/**
* 过滤脚本代码
**/
function cleanJs($text,$do_filter=false){
$text = trim($text);
$text = stripslashes($text);
//完全过滤动态代码
$text = preg_replace('/<\?|\?>/is','',$text);
//完全过滤js
$text = preg_replace('/<script?.*\/script>/is','',$text);
//过滤多余html
$text = preg_replace('/<\/?(html|head|meta|link|base|body|title|style|script|form|iframe|frame|frameset)[^><]*>/is','',$text);
//过滤on事件lang js
while(preg_match('/(<[^><]+)(lang|onload|onfinish|onmouse|onexit|onerror|onclick|onkey|onload|onchange|onfocus|onblur)[^><]+/is',$text,$mat)){
$text=str_replace($mat[0],$mat[1],$text);
}
while(preg_match('/(onfinish|onload|onmouse[a-z]+|onexit|onerror|onclick|onkey|onload|onchange|onfocus|onblur|expression)([=\(])/is',$text,$mat)){
$text=str_replace($mat[0],$mat[1].'#'.$mat[2],$text);
}
while(preg_match('/(<[^><]+)(window\.|javascript:|js:|about:|file:|document\.|vbs:|cookie)([^><]*)/is',$text,$mat)){
$text=str_replace($mat[0],$mat[1].$mat[3],$text);
}
$text = str_ireplace('script','sc#ipt',$text);
if($do_filter)
return GFW($text);
else
return $text;
}
/**
* 纯文本输出
**/
function ppt($text,$do_filter=false){
$text = cleanJs($text,$do_filter);
$text = strip_tags($text);
return $text;
}
/**
* 数组过滤脚本代码
**/
function tt($src,$do_filter=false)
{
if(!is_array($src))
return t($src,$do_filter);
$data=array();
foreach($src as $key=>$v)
{
if(is_array($v))
$data[$key]=tt($v,$do_filter);
else
$data[$key]=t($v,$do_filter);
}
return $data;
}
//输出安全的html
function h($text){
$text = cleanJs($text);
return $text;
}
//替换非法关键字
function GFW($text) {
$filter=S("InputFilter");
if(empty($filter))
{
$filter=array('find'=>array(),'replace'=>array());
$list=D("Filter")->findAll();
if($list){
foreach($list as $v)
{
$filter['find'][]=$v['find'];
$filter['replace'][]=empty($v['replacement'])?'**':$v['replacement'];
}
}
S('InputFilter',$filter,3600);
}
$text=@str_replace($filter['find'], $filter['replace'], $text);
return $text;
}
/**
* 数组 gb2312 转 utf8
**/
function gb2312ToUtf8(&$input)
{
if (!is_array($input))
{
$input = iconv('GB2312', 'UTF-8//IGNORE', $input);
}
else
{
foreach ($input as $k=>$v)
{
gb2312ToUtf8($input[$k]);
}
}
}
/**
* 字符串清除所有空格
**/
function trimAll($str)
{
$str = trim($str);// 首先去掉头尾空格
$str = str_replace(' ','',$str);
$str = preg_replace('/\s(?=\s)/','',$str);// 接着去掉两个空格以上的
$str = preg_replace('/[\n\r\t]/','',$str);// 最后将非空格替换为一个空格
return $str;
}
/**
* 判断是否中文
*/
function isChinese($s)
{
$allen = preg_match("/^[^\x80-\xff]+$/", $s); //判断是否是英文
$allcn = preg_match("/[\x7f-\xff]/",$s); //判断是否是中文
if($allen){
return false;
}else{
if($allcn){
return true;
}else{
return false;
}
}
}
/**
* 获取目录的结构
* @author 李俊
* @param [string] $path [目录路径]
* @return [array] [目录结构数组]
**/
function dirtree($path)
{
$handle = opendir($path);
$itemArray=array();
while (false !== ($file = readdir($handle)))
{
if (($file=='.')||($file=='..'))
{
}
elseif (is_dir($path.$file))
{
try{
$dirtmparr=dirtree($path.$file.'/');
} catch (Exception $e) {
$dirtmparr=null;
};
$itemArray[$file]=$dirtmparr;
}
else
{
array_push($itemArray, $file);
}
}
closedir($handle);
return $itemArray;
}
/**
* 目录遍历和计算文件个数
* @path 路径,支持相对和绝对
* @absolute 返回的文件数组,是否包含完整路径
*/
function get_files($path, $absolute=1)
{
$files = array();
$_path = realpath($path);
if (!file_exists($_path)) return false;
if (is_dir($_path))
{
$list = scandir($_path);
foreach ($list as $v)
{
if ($v == '.' || $v == '..') continue;
$_paths = $_path.'/'.$v;
//$_paths=str_replace('\\', '/', $_paths);
if (is_dir($_paths))
{
//递归
$files = array_merge($files, get_files($_paths,$absolute));
}
else
{
$files[] = $absolute>0 ? $_paths : $v;
}
}
}
else
{
if (!is_file($_path)) return false;
$files[] = $_path;
}
return $files;
}
/**
* 系统邮件发送函数
* @param string $to 接收邮件者邮箱
* @param string $name 接收邮件者名称
* @param string $subject 邮件主题
* @param string $body 邮件内容
* @param string $attachment 附件列表
* @return boolean
**/
function sendMail($to, $name, $subject = '', $body = '', $attachment = null)
{
$config = C('THINK_EMAIL');
vendor('PHPMailer.class#phpmailer'); //从PHPMailer目录导class.phpmailer.php类文件
$mail = new PHPMailer(); //PHPMailer对象
$mail->CharSet = 'UTF-8'; //设定邮件编码,默认ISO-8859-1,如果发中文此项必须设置,否则乱码
$mail->IsSMTP(); // 设定使用SMTP服务
$mail->SMTPDebug = 0; // 关闭SMTP调试功能
// 1 = errors and messages
// 2 = messages only
$mail->SMTPAuth = true; // 启用 SMTP 验证功能
// $mail->SMTPSecure = 'ssl'; // 使用安全协议
$mail->Host = $config['SMTP_HOST']; // SMTP 服务器
$mail->Port = $config['SMTP_PORT']; // SMTP服务器的端口号
$mail->Username = $config['SMTP_USER']; // SMTP服务器用户名
$mail->Password = $config['SMTP_PASS']; // SMTP服务器密码
$mail->SetFrom($config['FROM_EMAIL'], $config['FROM_NAME']);
$replyEmail = $config['REPLY_EMAIL']?$config['REPLY_EMAIL']:$config['FROM_EMAIL'];
$replyName = $config['REPLY_NAME']?$config['REPLY_NAME']:$config['FROM_NAME'];
$mail->AddReplyTo($replyEmail, $replyName);
$mail->Subject = $subject;
$mail->MsgHTML($body);
$mail->AddAddress($to, $name);
if(is_array($attachment)){ // 添加附件
foreach ($attachment as $file){
is_file($file) && $mail->AddAttachment($file);
}
}
return $mail->Send() ? true : $mail->ErrorInfo;
}
function Email($to,$subject = '', $body = '')
{
$config = C('THINK_EMAIL');
dump($config);
import('ORG.Util.Smtp');
$smtpserver = $config['SMTP_HOST'];//SMTP服务器
$smtpserverport =$config['SMTP_PORT'];//SMTP服务器端口
$smtpusermail = $config['SMTP_USER'];//SMTP服务器的用户邮箱//163邮箱等
$smtpemailto = $to;//发送给谁
$smtpuser = $config['SMTP_USER'];//SMTP服务器的用户帐号
$smtppass = $config['SMTP_PASS'];//SMTP服务器的用户密码
$mailsubject =$subject;//邮件主题
$mailbody =$body;
$mailtype = "HTML";//邮件格式(HTML/TXT),TXT为文本邮件
$smtp = new smtp($smtpserver,$smtpserverport,true,$smtpuser,$smtppass);//这里面的一个true是表示使用身份验证,否则不使用身份验证.
//$smtp->debug = TRUE;//是否显示发送的调试信息
$data=$smtp->sendmail($smtpemailto, $smtpusermail, $mailsubject, $mailbody, $mailtype);
return $data;
}
?>
\ No newline at end of file \ No newline at end of file
<?php
Class AdminAction extends CommonAction{
private $tab;
public function __construct() {
parent::__construct();
$this->tab='Admin';
// $this->rotab='Role';
}
public function index()
{
$Admin=D($this->tab);
import('ORG.Util.Pages');
$map['id']=array('neq',1);
$count = $Admin->where($map)->count();
$Page = new Pages($count,20);
$field=array('id','username','tel','email','name','isshow','ltime','lip','addtime','updatatime');
$lists = $Admin->field($field)->where($map)->page($Page->nowPage.','.$Page->listRows)->order(array('id'=>'desc'))->select();
$show = $Page->show();
$this->assign('page',$show);
$this->assign('lists',$lists);
$this->display();
}
public function edit()
{
$Admin=D($this->tab);
$data=$Admin->where('id='.I('id'))->find();
if($this->isPost()){
//添加用户
if(!$Admin->create()){
$this->error($Admin->getError());
}else{
if(!$Admin->password){ //修改账号,如果没有输入密码则删除password
unset($Admin->password);
}
$lastid=$Admin->where('id='.I('id'))->save();
if($lastid>0){
$this->success('系统用户修改成功',U('Admin/index'));
}else{
$this->error('系统用户修改失败');
}
}
}else{
$this->assign('data',$data);
$this->display();
}
}
public function add()
{
$Admin=D($this->tab);
if($this->isPost()){
//添加用户
if(!$Admin->create()){
$this->error($Admin->getError());
}else{
$depth = $this->getDepth(); //获取depth=array('depth','pid')
$Admin->depth = $depth['depth'];
$Admin->pid = $depth['pid'];
$lastid=$Admin->add();
if($lastid>0){
$this->success('系统用户添加成功',U('Admin/index'));
}else{
$this->error('系统用户添加失败');
}
}
}else{
$this->display();
}
}
/**
* 获取当前登录账号的depth+id
* @return array('id','depth')
*/
private function getDepth(){
$m = M($this->tab);
$map['id'] = array('eq',cookie('ADMIN_KEY'));
$r = $m->field('id,depth')->where($map)->find();
$back['depth'] = $r['depth'].','.$r['id'];
$back['pid'] = $r['id'];
return $back;
}
public function delete()
{
$where['id']=I('id',0,'intval');
$Admin=D($this->tab);
$data=$Admin->where($where)->find();
if(!$data){
$this->error('信息有误!');
}
if($data['id'] == cookie('ADMIN_KEY')){
$this->error('不允许删除当前使用的管理员帐号');
}elseif($data['id'] == 1){
$this->error('该账号不允许删除!');
}else{
$count=$Admin->where($where)->delete();
if($count){
$this->delAuthAccess($data['id']);
$this->success('管理员删除成功',U('Admin/index'));
}else{
$this->error('管理员删除失败');
}
}
}
/**
* 删除会员时删除相应的角色分配
* @param int $uid 用户id
*/
private function delAuthAccess($uid){
if($uid){
$m = M('Authgroupaccess');
$map['uid'] = array('eq',$uid);
$r = $m->where($map)->delete();
}
}
/**
* 修改分组开启属性
**/
public function editattr()
{
$table=$this->_post('table');
$m=M($table);
$where['id']=array('eq',$this->_post('id'));
$data[$this->_post('f')]=$this->_post('status');
$count=$m->where($where)->data($data)->save();
if($count)
{
$msg['success']=true;
$msg['msg']='状态已修改';
}
else
{
$msg['success']=false;
$msg['msg']='状态修改失败';
}
echo json_encode($msg);
}
}
?>
\ No newline at end of file \ No newline at end of file
<?php
class ApplyAction extends CommonAction {
public $tab='Apply';
public $tabView='ApplyView';
public $sumid='';
public function __construct() {
parent::__construct();
$this->sumid=I('sumid');
$spe_action=array('operate','operate2','operate3','operate4');
if(!$this->sumid && in_array(ACTION_NAME,$spe_action)){
$this->sumid=$this->getSumid();
if(!$this->sumid){
$this->error(date('Y').'年夏令营信息不存在,请确认!');
exit;
}
}
if(!$this->sumid){
$this->error('数据参数有误!');
exit;
}
if(!$this->checkSchool($this->sumid)){
$this->error('夏令营举办单位与当前账户不相符,请先确认!');
exit;
}
$this->assign('sumid',$this->sumid);
$this->assign('speSchool',$this->getSpeSchool()); //推免资格学校列表
}
/**
* 判断夏令营活动是否属于所登录的账户
* @param int $id 夏令营id
* @return bool 属于返回true,否则返回false
*/
private function checkSchool($id){
$m=M('Summer');
$where['id']=array('eq',$id);
$data=$m->where($where)->getField('id,sid');
if($data[$id] == cookie('ADMIN_SCHOOL') || cookie('ADMIN_KEY') == 1)
return true;
else
return false;
}
/**
* 返回拟申请项目 一级分类
* @return array
*/
private function getAppproject(){
$where['name']=array('eq','appproject');
$data=M('Regfields')->where($where)->getfield('d_value');
$data=explode('#',$data);
return $data;
}
/**
* ajax 返回拟申请项目 二级分类
* @return json
*/
public function getAppproject2(){
$pro=I('appproject'); //一级分类名称
$pro_list=C('APPPROJECT'); //配置文件中找出对应的二级分类
$pro2=I('appproject2'); //二级分类默认值
$list=$pro_list[$pro];
if($list){
$data['suc']=true;
$data['cont']='';
foreach($list as $v){
$data['cont'].='<option value="'.$v.'"';
if($pro2 && $pro2 == $v) $data['cont'].=' selected';
$data['cont'].='>'.$v.'</option>';
}
}else{
$data['suc']=false;
$data['cont']='<option value="">请选择</option>';
}
echo json_encode($data);
}
/**
* 以往夏令营活动学员申请列表
*/
public function manage(){
// $Article=D($this->tab);
$Article=D($this->tabView);
import('ORG.Util.Pages');
$where['pid']=array('eq',$this->sumid);
if($search['entnum']=I('entnum','','trim')) $where['entnum']=array('eq',I('entnum','','trim'));
if($search['name']=I('name','','trim')) $where['name']=array('like','%'.I('name','','trim').'%');
if($search['school']=I('school','','trim')) $where['school']=array('eq',I('school','','trim'));
if($search['appproject']=I('appproject')) $where['appproject']=array('eq',I('appproject'));
if($search['appproject2']=I('appproject2')) $where['appproject2']=array('eq',I('appproject2'));
if($search['status']=I('status')){
switch(I('get.status')){ //1等待审核、2已审核、3已备选、4已录取
case 1:
$where['status1&status2&status3']=array('eq',0);
break;
case 2:
$where['status1']=array('eq',1);
$where['status2&status3']=array('eq',0);
break;
case 3:
$where['status1&status2']=array('eq',1);
$where['status3']=array('eq',0);
break;
case 4:
$where['status1&status2&status3']=array('eq',1);
break;
}
}
$this->assign('search',$search);
$count = $Article->where($where)->count();
// echo $Article->getLastSql();
$Page = new Pages($count,20);
$ord=array();// 985 211 cet6排序
if(I('orda',0,'intval')) $ord['orda'] = 1; //985
if(I('ordb',0,'intval')) $ord['ordb'] = 1; //211
if(I('ordc',0,'intval')) $ord['ordc'] = 1; //cet6
if($ord){
if($ord['orda']) $orderby['check985']='desc';
if($ord['ordb']) $orderby['check211']='desc';
if($ord['ordc']) $orderby['cet_6']='desc';
}
$this->assign('ord',$ord);
$orderby['Apply.id']='desc'; //注意排序
$sum=A('Reg');
$field=$sum->notDel; //获取报名申请的基本字段
array_push($field,'addtime','id','status1','status2','status3','entnum','uid');
$list = $Article->field($field)->order($orderby)->where($where)->page($Page->nowPage.','.$Page->listRows)->select();
// echo $Article->getLastSql();
$show = $Page->show();
$this->assign('page',$show);
$this->assign('list',$list);
$sum_info=$this->getSummer(array('id'=>array('eq',$this->sumid))); //夏令营活动信息
$this->assign('project',$this->getAppproject()); //拟申请项目 一级分类
$this->assign('web_title',$sum_info['title'].'—报名信息列表'); //页面列表标题
$this->display();
}
/**
* 根据年份调出sumid
* @return int
*/
private function getSumid(){
$year=date('Y');
$data=M('Summer')->where(array('year'=>array('eq',$year)))->getfield('id');
return $data;
}
/**
* 当年夏令营 基本操作 获取列表数据
* @param array $where 查询where条件
* @param string $title 页面title说明
*/
private function comOperate($where,$title){
// $Article=D($this->tab);
$Article=D($this->tabView);
import('ORG.Util.Pages');
$where['pid']=$this->sumid;
$count = $Article->where($where)->count();
// echo $Article->getLastSql();
$Page = new Pages($count,20);
$ord=array();// 985 211 cet6排序
if(I('orda',0,'intval')) $ord['orda'] = 1; //985
if(I('ordb',0,'intval')) $ord['ordb'] = 1; //211
if(I('ordc',0,'intval')) $ord['ordc'] = 1; //cet6
if($ord){
if($ord['orda']) $orderby['check985']='desc';
if($ord['ordb']) $orderby['check211']='desc';
if($ord['ordc']) $orderby['cet_6']='desc';
}
$orderby['Apply.id']='desc'; //注意排序
$this->assign('ord',$ord);
$sum=A('Reg');
$field=$sum->notDel; //获取报名申请的基本字段
array_push($field,'addtime','id','status1','status2','status2_ac','status3','status3_ac','entnum');
$list = $Article->field($field)->order($orderby)->where($where)->page($Page->nowPage.','.$Page->listRows)->select();
// echo $Article->getLastSql();
$show = $Page->show();
$this->assign('page',$show);
$this->assign('list',$list);
$sum_info=$this->getSummer(array('id'=>array('eq',$this->sumid))); //夏令营活动信息
$this->assign('project',$this->getAppproject()); //拟申请项目 一级分类
$this->assign('web_title',$sum_info['title'].'—'.$title); //页面列表标题
$this->assign('nowpage',$Page->nowPage);
}
/**
* 当年夏令营活动 报名学生列表
*/
public function operate(){
if($search['entnum']=I('entnum','','trim')) $where['entnum']=array('eq',I('entnum','','trim'));
if($search['name']=I('name','','trim')) $where['name']=array('like','%'.I('name','','trim').'%');
if($search['school']=I('school','','trim')) $where['school']=array('like','%'.I('school','','trim').'%');
if($search['appproject']=I('appproject')) $where['appproject']=array('eq',I('appproject'));
if($search['appproject2']=I('appproject2')) $where['appproject2']=array('eq',I('appproject2'));
$this->assign('search',$search);
$this->comOperate($where,'报名学生列表');
$this->display();
}
/**
* 当年夏令营活动 备选库学生列表
*/
public function operate2(){
if($search['entnum']=I('entnum','','trim')) $where['entnum']=array('eq',I('entnum','','trim'));
if($search['name']=I('name','','trim')) $where['name']=array('like','%'.I('name','','trim').'%');
if($search['school']=I('school','','trim')) $where['school']=array('eq',I('school','','trim'));
if($search['appproject']=I('appproject')) $where['appproject']=array('eq',I('appproject'));
if($search['appproject2']=I('appproject2')) $where['appproject2']=array('eq',I('appproject2'));
$this->assign('search',$search);
$where['status1']=array('eq',1); //备选库学生
$this->comOperate($where,'备选库学生列表');
$this->display('Apply:operate');
}
/**
* 当年夏令营活动 待录取学生列表
*/
public function operate3(){
if($search['entnum']=I('entnum','','trim')) $where['entnum']=array('eq',I('entnum','','trim'));
if($search['name']=I('name','','trim')) $where['name']=array('like','%'.I('name','','trim').'%');
if($search['school']=I('school','','trim')) $where['school']=array('eq',I('school','','trim'));
if($search['appproject']=I('appproject')) $where['appproject']=array('eq',I('appproject'));
if($search['appproject2']=I('appproject2')) $where['appproject2']=array('eq',I('appproject2'));
$this->assign('search',$search);
$where['status1&status2']=array('eq',1); //待录取学生
$where['status2_ac']=array('eq',2); //学生接受参营邀请
$this->comOperate($where,'待录取学生列表');
$this->display('Apply:operate');
}
/**
* 当年夏令营活动 录取学生列表
*/
public function operate4(){
if($search['name']=I('name','','trim')) $where['name']=array('like','%'.I('name','','trim').'%');
if($search['school']=I('school','','trim')) $where['school']=array('eq',I('school','','trim'));
if($search['appproject']=I('appproject')) $where['appproject']=array('eq',I('appproject'));
if($search['appproject2']=I('appproject2')) $where['appproject2']=array('eq',I('appproject2'));
$this->assign('search',$search);
$where['status1&status2&status3']=array('eq',1); //待录取学生
$where['status2_ac&status3_ac']=array('eq',2); //学生接受参营邀请
$this->comOperate($where,'录取学生列表');
$this->display('Apply:operate');
}
/**
* 获取夏令营数据
* @param array $where 筛选条件
* @param string $field 字段
* @return array
*/
private function getSummer($where,$field='title'){
$reg=M('Summer');
$list=$reg->field($field)->where($where)->find();
return $list;
}
/**
* 返回用户所报名夏令营提交的数据(每个人只能申请一次夏令营)
* @param field 字段
* @param id apply数据id
* @return array 用户报名所提交的数据
*/
private function getAppInfo($where=array(),$field='*'){
$data=M('Apply')->field($field)->where($where)->find();
return $data;
}
/**
* 查看学生申请的数据
*/
public function look(){
$sum_where['id']=array('eq',$this->sumid);
$summer=$this->getSummer($sum_where,'sid,title,rfields');//获取所申请的夏令营活动相关信息
$m=M('Regfields');
$where['isshow']=array('eq',1);
$where['name']=array('in',$summer['rfields']); //夏令营活动需要填写的字段
$order='sort';
$fields=$this->_getList($m,$where,$order,0,0,'id,name,description,type,rownum,colnum,d_value,ctitle,fline,isdate,upfile'); //获取申请应填写的字段的信息 listdata,result_count
$this->assign('summer',$summer); //夏令营信息
$this->assign('fields',$fields); //申请应填写的字段信息
$app_data=$this->getAppInfo(array('id'=>array('eq',I('get.id')))); //申请夏令营所填写的数据
$this->assign('app_data',$app_data); //申请夏令营所填写的数据
$this->assign('web_title',$app_data['name'].'报名申请信息');
if(strpos($_SERVER['HTTP_REFERER'],'operate4') !== false)
$action = 'operate4';
elseif(strpos($_SERVER['HTTP_REFERER'],'operate3') !== false)
$action = 'operate3';
elseif(strpos($_SERVER['HTTP_REFERER'],'operate2') !== false)
$action = 'operate2';
elseif(strpos($_SERVER['HTTP_REFERER'],'operate') !== false)
$action = 'operate';
$this->assign('action',$action); //父页面action_name
$this->assign('nowpage',I('page')); //父页面分页页数
$this->display();
}
/**
* ajax备选
*/
public function beixuan(){
$do='备选';
$Article=M($this->tab);
$data['id']=I('get.id');
if(!$data['id']){
$data['suc']=false;
$data['info']='信息参数有误!';
}else{
$data['status1']=1;
$data['time1']=time();
$is=$Article->save($data);
if($is){
$data['suc']=true;
$data['info']=$do.'操作成功!';
$data['name']='已入备选库';
}else{
$data['suc']=false;
$data['info']=$do.'操作失败!';
}
}
echo json_encode($data);
}
/**
* 确定参营 并发送参营邀请邮件
*/
public function canying(){
$do='确定参营';
$data['id']=I('id');
if(!$data['id']){
$this->error("信息参数有误!");
exit;
}
$back_url=U('operate2',array('sumid'=>$this->sumid,'p'=>$this->_param('p')));
if($this->isPost()){
$Article=M($this->tab);
$data['status2']=1;
$data['time2']=time();
if(I('doagin','','trim') == 'yes'){
$data['status2_ac'] = 0;
}
$is=$Article->save($data);
if($is){
//发送email
$title=I('title','','trim,htmlspecialchars');
$content=I('content','','trim');
$this->sendEmail(array('id'=>array('eq',$data['id'])),1,$title,$content); //发送email并且把email信息入库保存 1确定参营、2待录取
$this->success($do.'操作成功!',$back_url);
}else{
$this->error($do.'操作失败!');
}
exit;
}
$this->assign('info',$this->getAppInfo(array('id'=>array('eq',$data['id'])),'id,name,email')); //夏令营报名信息
$this->assign('webtitle','发送参营邀请');
$this->assign('back_url',$back_url);
$this->assign('sumid',$this->sumid);
$this->assign('p',$this->_param('p'));
$this->assign('emails',json_decode(R('Email/getTmpEmail'),true)); //获取email模板
$this->display();
}
/**
* 给学生发送邮件,邮件信息并入库
* @param array $where 查询夏令营报名条件
* @param int $cate 邮件类型:1确定参营,2待录取
* @param string $title 邮件标题
* @param string $content 邮件内容
* @return bool 成功ture,失败false
*/
private function sendEmail($where,$cate,$title,$content){
$info=$this->getAppInfo($where,'pid,uid,email');
$data['sumid']=$info['pid']; //夏令营
$data['admin']=cookie('ADMIN_KEY'); //后台管理员
$data['uid']=$info['uid']; //学生id
$data['email']=$info['email']; //学生email
$data['cate']=$cate; //邮件各类:1确定参营,2待录取
$data['title']=$title; //email 标题
$data['content']=$content; //email 内容
$data['addtime']=time();
if(sendMail($data['email'], $info['name'], $data['title'], $data['content']) === true){ //发送邮件成功
$lastid=M('Email')->add($data);
return true;
}else{ //发送失败
return false;
}
}
/**
* 待录取 并发送待录取邀请邮件
*/
public function luqu(){
$do='待录取';
$data['id']=I('id');
if(!$data['id']){
$this->error("信息参数有误!");
exit;
}
$back_url=U('operate3',array('sumid'=>$this->sumid,'p'=>$this->_param('p')));
if($this->isPost()){
$Article=M($this->tab);
$data['status3']=1;
$data['time3']=time();
if(I('doagin','','trim') == 'yes'){
$data['status3_ac'] = 0;
}
$is=$Article->save($data);
if($is){
//发送email
$title=I('title','','trim,htmlspecialchars');
$content=I('content','','trim');
$this->sendEmail(array('id'=>array('eq',$data['id'])),2,$title,$content); //发送email并且把email信息入库保存 1确定参营、2待录取
$this->success($do.'操作成功!',$back_url);
}else{
$this->error($do.'操作失败!');
}
exit;
}
$this->assign('info',$this->getAppInfo(array('id'=>array('eq',$data['id'])),'id,name,email')); //夏令营报名信息
$this->assign('webtitle','发送待录取邀请');
$this->assign('back_url',$back_url);
$this->assign('sumid',$this->sumid);
$this->assign('p',$this->_param('p'));
$this->assign('emails',json_decode(R('Email/getTmpEmail'),true)); //获取email模板
$this->display('Apply:canying');
}
/**
* 返回推免资格学校列表
* @return array
*/
private function getSpeSchool(){
$m=M('School');
$data=$m->getField('name,check985,graduate,check211');
return $data;
}
/**
* 获取夏令营导出所需的字段信息 选取并提交至下载页
*/
public function checkField(){
$sum_info=$this->getSummer(array('id'=>array('eq',$this->sumid)),'title,rfields'); //获取夏令营信息,夏令营名称及夏令营申请应填写信息
$info=M('Regfields')->field('name,description')->where(array('name'=>array('in',$sum_info['rfields'])))->order('sort asc')->select(); //字段信息 name名称 description注释
$this->assign('info',$info);
$action=I('action');
switch($action){
case 'operate':
$webtitle=$sum_info['title'].'——'.'学生信息下载';
break;
case 'operate2': //备选学生
$webtitle=$sum_info['title'].'——'.'备选学生信息下载';
break;
case 'operate3': //待录取学生
$webtitle=$sum_info['title'].'——'.'待录取学生信息下载';
break;
case 'operate4': //可录取学生
$webtitle=$sum_info['title'].'——'.'可录取学生信息下载';
break;
}
$this->assign('web_title',$webtitle);
$this->assign('action',I('action'));
$this->assign('sumid',$this->sumid);
$this->display();
}
/**
* 导出学生信息至excel表
*/
/*public function download2(){
set_time_limit(0);
$field=array_filter(I('field')); //下载所需的字段
$action=I('action');
$sum_info=$this->getSummer(array('id'=>array('eq',$this->sumid)),'title'); //获取夏令营信息,夏令营名称及夏令营申请应填写信息
$info=M('Regfields')->field('name,description,type,')->where(array('name'=>array('in',$field)))->order('sort asc')->select(); //字段信息 name名称 description注释
if($info){
foreach($info as $v){
$new_field[]=$v['name'];
}
}
switch($action){
case 'operate':
$filename=$sum_info['title'].'-'.'报名学生列表';
break;
case 'operate2': //备选学生
$filename=$sum_info['title'].'-'."备选库学生列表";
$where['status1&status2']=array('eq',1);
break;
case 'operate3': //待录取学生
$filename=$sum_info['title'].'-'."待录取学生列表";
$where['status1&status2&status3']=array('eq',1);
$where['status2_ac']=array('eq',2);
break;
case 'operate4': //录取学生
$filename=$sum_info['title'].'-'."录取学生列表";
$where['status1&status2&status3']=array('eq',1);
$where['status2_ac&status3_ac']=array('eq',2);
break;
}
$where['pid']=array('eq',$this->sumid); //管理员所选择的字段
$list=M('Apply')->field($new_field)->where($where)->select(); //符合条件的学生
$filename.=date('_YmdHis');
$filename = iconv('utf-8', 'gb2312', $filename);//文件名称
vendor("PHPExcel.PHPExcel");
$objPHPExcel = new PHPExcel();
$count=count($info); //导出字段数
$cellName = array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','AA','AB','AC','AD','AE','AF','AG','AH','AI','AJ','AK','AL','AM','AN','AO','AP','AQ','AR','AS','AT','AU','AV','AW','AX','AY','AZ','BA','BB','BC','BD','BE','BF','BG','BH','BI','BJ','BK','BL','BM','BN','BO','BP','BQ','BR','BS','BT','BU','BV','BW','BX','BY','BZ');
$obj=$objPHPExcel->setActiveSheetIndex(0);
$objPHPExcel->getActiveSheet()->getStyle('A1')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER)->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER); //A1设置居中
$obj->setCellValue('A1', '序号'); //A1设置标题
for($i=1,$ii=0;$i <= $count;$i++,$ii++){ //设置标题
$objPHPExcel->getActiveSheet()->getStyle($cellName[$i].'1')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER)->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER); //设置居中
$obj->setCellValue($cellName[$i].'1', $info[$ii]['description']);
}
foreach($list as $k => $v){
$obj->setCellValue('A'.($k+2), $k+1); //A列
for($i=1;$i <= $count;$i++){ //设置标题
$objPHPExcel->getActiveSheet()->getStyle($cellName[$i].($k+2))->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER)->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER); //设置居中
//多行文本、多选框、上传附件
$f_info=$this->getFieldInfo($new_field[$i-1]);//name,type,rownum,colnum,ctitle,upfile
// echo $f_info['name'].'——'.$f_info['type'],'<br/>';
if($f_info['upfile'] == 1){ //图片
$pp_val='';
}elseif($f_info['type'] == 'c_heckbox'){ //多选框
$pp_val=implode(',',$v[$new_field[$i-1]]);
}elseif($f_info['type'] == 'bstring'){ //多文本
$row=$f_info['rownum']?$f_info['rownum']:1;
$col=$f_info['colnum']?$f_info['colnum']:1;
$pp_val='';
if($f_info['ctitle']){ //列标题
$ctitle=explode('#',$f_info['ctitle']);
$pp_val.='<tr>';
foreach($ctitle as $k=>$v){
$pp_val.='<td>'.$v.'</td>';
}
$pp_val.='</tr>';
}
if($v[$new_field[$i-1]]) $value=json_decode($v[$new_field[$i-1]],true); //存在数据
if($value){ //存在数值
for($i=1;$i<=$row;$i++){
for($ii = 1;$ii<=$col;$ii++){
$pp_val.=$value[$i][$ii].',';
}
}
}
}else{
$pp_val=$v[$new_field[$i-1]];
}
$obj->setCellValue($cellName[$i].($k+2), $pp_val);
}
}
// Set active sheet index to the first sheet, so Excel opens this as the first sheet
// $objPHPExcel->setActiveSheetIndex(0);
ob_end_clean();//清除缓冲区,避免乱码
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment;filename='.$filename.'.xls');
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save('php://output');
}*/
public function download(){
set_time_limit(0);
$field=array_filter(I('field')); //下载所需的字段
$action=I('action');
$sum_info=$this->getSummer(array('id'=>array('eq',$this->sumid)),'title'); //获取夏令营信息,夏令营名称及夏令营申请应填写信息
$info=M('Regfields')->field('name,description,rownum,colnum,ctitle,upfile')->where(array('name'=>array('in',$field)))->order('sort asc')->select(); //字段信息 name名称 description注释
if($info){
foreach($info as $v){
$new_field[]=$v['name'];
}
}
$speSchool=$this->getSpeSchool(); //推免资格学校列表
switch($action){
case 'operate':
$filename=$sum_info['title'].'-'.'报名学生列表';
break;
case 'operate2': //备选学生
$filename=$sum_info['title'].'-'."备选库学生列表";
$where['status1']=array('eq',1);
break;
case 'operate3': //待录取学生
$filename=$sum_info['title'].'-'."待录取学生列表";
$where['status1&status2']=array('eq',1);
$where['status2_ac']=array('eq',2);
break;
case 'operate4': //录取学生
$filename=$sum_info['title'].'-'."录取学生列表";
$where['status1&status2&status3']=array('eq',1);
$where['status2_ac&status3_ac']=array('eq',2);
break;
}
$where['pid']=array('eq',$this->sumid); //管理员所选择的字段
$list=M('Apply')->field($new_field)->where($where)->select(); //符合条件的学生
$filename.=date('_YmdHis');
$filename = iconv('utf-8', 'gb2312', $filename);//文件名称
vendor("PHPExcel.PHPExcel");
$objPHPExcel = new PHPExcel();
$count=count($info); //导出字段数
$str='<table width="100%" border="1" cellpadding="0" cellspacing="1">';
$str.='<tr>';
$str.='<td align="center">序号</td>';
for($i=0;$i < $count;$i++){ //设置标题
$f_info=$this->getFieldInfo($new_field[$i]);//name,type,rownum,colnum,ctitle,upfile
if($f_info['type'] == 'bstring'){ //多文本
$str.='<td align="center">';
$row=$f_info['rownum']?$f_info['rownum']:1;
$col=$f_info['colnum']?$f_info['colnum']:1;
$r_width=100 / $col;
$str.='<table border="1" cellpadding="0" cellspacing="1">';
$str.='<tr><td align="center" colspan="'.$col.'">'.$info[$i]['description'].'</td></tr>';
if($f_info['ctitle']){ //列标题
$ctitle=explode('#',$f_info['ctitle']);
$str.='<tr>';
foreach($ctitle as $val){
$str.='<td align="center" style="WORD-WRAP: break-word" width="'.$r_width.'%">'.$val.'</td>';
}
$str.='</tr>';
}
$str.='</table>';
$str.='</td>';
}else{
$str.='<td align="center">'.$info[$i]['description'].'</td>';
}
if($f_info['name']=='school'){ //学校 判断是否为985 211
$str.='<td align="center">985</td><td align="center">211</td>';
}
}
$str.='</tr>';
foreach($list as $k => $v){
$str.='<tr>';
$str.='<td align="center">'.($k+1).'</td>'; //A列
for($i=0;$i < $count;$i++){ //设置标题
//多行文本、多选框、上传附件
$f_info=$this->getFieldInfo($new_field[$i]);//name,type,rownum,colnum,ctitle,upfile
// echo $f_info['name'].'——'.$f_info['type'],'<br/>';
if($f_info['upfile'] == 1){ //图片
if($v[$new_field[$i]])
// $pp_val='<div><img src="http://'.$_SERVER['SERVER_NAME'].$v[$new_field[$i]].'" width="65" height="65" /></div>';
$pp_val='';
else
$pp_val='';
}elseif($f_info['type'] == 'c_heckbox'){ //多选框
$pp_val=implode(',',$v[$new_field[$i]]);
}elseif($f_info['type'] == 'bool'){ //多选框
$pp_val=$v[$new_field[$i]] == 1?'是':'否';
}elseif($f_info['type'] == 'bstring'){ //多文本
$row=$f_info['rownum']?$f_info['rownum']:1;
$col=$f_info['colnum']?$f_info['colnum']:1;
$r_width=100 / $col;
/*if($f_info['ctitle']){ //列标题
$ctitle=explode('#',$f_info['ctitle']);
$pp_val.='<tr>';
foreach($ctitle as $val){
$pp_val.='<td align="center" style="WORD-WRAP: break-word" width="'.$r_width.'%">'.$val.'</td>';
}
$pp_val.='</tr>';
}*/
if($v[$new_field[$i]]) $value=json_decode($v[$new_field[$i]],true); //存在数据
if($value){ //存在数值
$pp_val='<table border="1" cellpadding="0" cellspacing="1">';
/*for($ii=1;$ii<=$row;$ii++){ //行
$pp_val.='<tr>';
for($iii = 1;$iii<=$col;$iii++){ //列
$pp_val.='<td align="center">'.$value[$ii][$iii].'</td>';
}
$pp_val.='</tr>';
}*/
foreach($value as $v1){
$pp_val.='<tr>';
foreach($v1 as $v2){
$pp_val.='<td align="center" style="WORD-WRAP: break-word" width="'.$r_width.'%">'.$v2.'</td>';
}
$pp_val.='</tr>';
}
$pp_val.='</table>';
}
unset($row,$col,$r_width,$value);
}elseif(in_array($f_info['name'], array('idnumber','mobile'))){
$pp_val='<div style="vnd.ms-excel.numberformat:@">'.$v[$new_field[$i]].'</div>';
}else{
$pp_val=$v[$new_field[$i]];
}
$str.='<td align="center">'.$pp_val.'</td>';
unset($pp_val);
if($f_info['name']=='school'){ //学校 判断是否为985 211
$str.='<td align="center" >';
$str.=($speSchool[$v['school']] && $speSchool[$v['school']]['check985'])?'是':'否';
$str.='</td><td align="center">';
$str.=($speSchool[$v['school']] && $speSchool[$v['school']]['check211'])?'是':'否';
$str.='</td>';
}
}
$str.='</tr>';
}
$str.='</table>';
// ob_end_clean();//清除缓冲区,避免乱码
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment;filename='.$filename.'.xls');
$str = iconv('utf-8', 'gb2312', $str);
echo $str;
}
/**
* 获取字段详细信息
* @param string $name 字段名
* @param string $field 查询field
* @return array
*/
private function getFieldInfo($name,$field='name,type,rownum,colnum,ctitle,upfile'){ //type:文本string,多行文本bstring,布尔bool,数字number,文本域t_extarea,下拉列表s_elect,多选框c_heckbox,单选r_adio
$where['name']=array('eq',$name);
$data=M('Regfields')->where($where)->field($field)->find();
return $data;
}
/**
* 修改学生信息
* @return [type] [description]
*/
public function editUser(){
$id=(int)I('id','','trim');
if(!$id){
exit('<script>alert("信息参数有误!");history.back();</script>');
}
if($this->isPost()){
$user=D('Webuser');
if(!$user->create()){
$this->error($user->getError());
}else{
if(I('password','','trim') && (I('password','','trim') !== I('repassword','','trim'))){
$this->error('两次密码不相同,请确认!');
exit;
}elseif(I('password','','trim')){
$user->password=md5(trim($user->password));
}else{
unset($user->password);
}
if($is=$user->save()){
$this->success('学生信息修改成功!',U('manage',array('sumid'=>$this->sumid)));
}else{
$this->error('学生信息修改失败!');
}
}
exit;
}
$this->assign('userinfo',$this->getUserInfo($id));
$this->display();
}
/**
* 获取学生个人信息
* @param int $id wa_webuser表id
* @param string $field 字段
* @return array
*/
private function getUserInfo($id,$field){
$m=M('Webuser');
$where['id']=array('eq',$id);
$data=$m->where($where)->field($field)->find();
return $data;
}
}
\ No newline at end of file \ No newline at end of file
<?php
class ArticleAction extends CommonAction {
public $tab='Apply';
public $catab='Category';
public $tabView='ApplyView';
public function __construct() {
parent::__construct();
}
public function index(){
$Apply=M($this->tab);
//获取字段信息
$where_field['isshow'] = array('eq',1); //状态为开启的字段
$where_field['isshow3'] = array('eq',1);//审核列表显示的字段
$file_info = M('Regfields')->where($where_field)->order('sort')->select();
if($file_info){ //将字段信息重新整理
foreach($file_info as $k => $v){
$field[] = $v['name'];
$new_regfields[$v['name']] = $v;
}
}
$field_arr=array_merge($field,array('id','uid','username','addtime','status','reviewtime','isshow','depth'));
$data = $this->_getLists($Apply,$where,$order,$field_arr,12,'Pages3',array('header'=>'<li style="border:none;">共%totalRows%条记录','pages'=>'%nowPage%/%totalPages%页 </li>','prev'=>'<上一页','next'=>'下一页>','first'=>'首页','last'=>'尾页','theme'=>'%header% %pages% %prePage% %linkPage% %nextPage% %end%'));
$this->assign('list',$data['list']?$data['list']:array()); //列表
$this->assign('page',$data['page']);
$this->assign('p',$data['p']);
$colnum=count($file_info) + 4; //列数
$this->assign('empty','<tr><td colspan="'.$colnum.'" style="padding-left:15px;font-size:14px;">暂无相关信息!</td></tr>');
$list=$Apply->field($field_arr)->select();
$this->assign('colnum',$colnum);
$this->assign('field',$field); //字段(排序)
$this->assign('regfields',$new_regfields); //字段信息 键名为name
$this->display();
}
/**
* 查看详情
* @param $id 内容id
* @param $page_title 页面标题
*/
public function look()
{
if(I('id')){
$id = I('id');
}else{
$id = 0;
}
$model = M('Apply');
$where['id'] = array('eq',$id);
//获取字段信息
$where_field['isshow'] = array('eq',1); //状态为开启的字段
$file_info = M('Regfields')->where($where_field)->order('sort')->select();
if($file_info){ //将字段信息重新整理
foreach($file_info as $k => $v){
$field[] = $v['name'];
$new_regfields[$v['name']] = $v;
}
}
$field[]='status';
$strfield = implode(',',$field);
$data = $this->_getRow($model,$where,$strfield);
//dump($regfields);
$this->assign('data',$data);
$this->assign('field',$field); //字段(排序)
$this->assign('regfields',$new_regfields); //字段信息 键名为name
$this->assign('page_title','资料预览');//页面标题
$this->display();
}
//删除文件
public function delete(){
$Apply=D($this->tab);
if($this->isGet()){
$map['id']=array('eq',$this->_param('id'));
//获取字段信息
$where_field['isshow'] = array('eq',1); //状态为开启的字段
$file_info = M('Regfields')->where($where_field)->order('sort')->select();
$fileds='';
if($file_info){ //获取有附件的字段信息
foreach($file_info as $k => $v){
if($v['upfile']){
$fileds.=$fileds?','.$v['name']:$v['name'];
}
}
}
$file_arr=$Apply->where($map)->field($fileds)->find();
foreach($file_arr as $fik=>$fiv){
$this->delFile2($fiv);//删除相关附件
}
$aa=$Apply->where($map)->delete();//删除文件
if($aa){
//同时删除内容
$this->success('删除成功!',U('index',array('tid'=>$this->_param('tid'))));
}else{
$this->error('删除失败!');
}
}
}
public function edit(){
$tid=$this->_param('tid');
if(!$tid){
$this->error('数据错误!');
}
$Article=D($this->tab);
$Category=D($this->catab);
$calist=$Category->getList(0);
if($this->isPost()){
//热门 推荐
$flag='';
foreach($this->_param('flag') as $k=>$v){
$flag .= ','.$v;
}
$_POST['flag']=substr($flag,1);
//多图处理
if($imgs=$this->_param('img'))
{
$_POST['img']=marray2string($imgs);
}
//文件 缩略图处理
if($this->_param('thumb') && $this->_param('thumb') != $this->_param('oldthumb'))
{
$this->delFile2($this->_param('oldthumb'));
}
if($this->_param('file') && $this->_param('file') != $this->_param('oldfile'))
{
$this->delFile2($this->_param('oldfile'));
}
if($Article->create()){
$lastid=$Article->where('id='.$this->_param('id'))->save();
if($lastid){
$this->success('文档修改成功',U('Article/index',array('tid'=>$tid)));
}else{
$this->error('文档修改失败');
}
}else{
$this->error($Article->getError());
}
}else{
//获取分类附件类型信息
$cate_data=$Category->field('picnum')->find($tid);
$this->assign('picnum',$cate_data['picnum']);
$data=$Article->where('id='.$this->_param('id'))->find();
//热门 推荐
$flag=explode(',',$data['flag']);
$this->assign('flag',$flag);
// 多图
if($data['img'])
{
$imgs=explode(',',$data['img']);
$this->assign('img',$imgs);
}
$this->assign('data',$data);
$this->assign('cat_list',$calist);
$this->assign('topid',$this->topId($data['tid']));
$this->display();
}
}
public function add(){
$tid=$this->_param('tid');
$tid=$tid>0?$tid:0;
if(!$tid){
$this->error('数据错误!');
}
$Article=D($this->tab);
$Category=D($this->catab);
$calist=$Category->getList(0);
//最大排序值
// $maxp['tid']=array('in',$this->AllCatid($tid,1,'Category'));
// $maxsort=$Article->where($maxp)->max('sort');
if($this->isPost()){
//热门 推荐
$flag='';
foreach($this->_param('flag') as $k=>$v){
$flag .= ','.$v;
}
$_POST['flag']=substr($flag,1);
//多图处理
if($imgs=$this->_param('img'))
{
$_POST['img']=marray2string($imgs);
}
if($Article->create()){
$lastid=$Article->add();
//echo $Article->getLastSql();
if($lastid){
$this->success('文档添加成功',U('Article/index',array('tid'=>$this->_param('tid'))));
}else{
$this->error('文档添加失败');
}
}else{
$this->error($Article->getError());
}
}else{
//获取分类附件类型信息
$cate_data=$Category->field('picnum')->find($tid);
$this->assign('picnum',$cate_data['picnum']);
$this->assign('cat_list',$calist);
// $this->assign('maxsort',$maxsort+1);// 排序默认值
$this->assign('maxsort',0);
$this->assign('topid',$this->topId($this->_param('tid')));
$this->display();
}
}
public function form(){
$Article=D($this->tab);
if($this->isPost()){
$map['id']=array('in',$this->_param('check'));
if($this->_param('ShenHe')){
$this->IsAuth(MODULE_NAME.'/ShenHe');
$data['isshow'] = '1';
$data['updatatime'] = time();
$aa=$Article->where($map)->save($data);
if($aa){
$this->success('审核成功!',U('index',array('tid'=>$this->_param('tid'),'p'=>$this->_param('p'))));
}else{
$this->error('审核失败!');
}
}
if($this->_param('Delete')){
$this->IsAuth(MODULE_NAME.'/Delete');
$aa=$Article->where($map)->delete();
if($aa){
$this->success('删除成功!',U('index',array('tid'=>$this->_param('tid'),'p'=>$this->_param('p'))));
}else{
$this->error('删除失败!');
}
}
if($this->_param('NewSort')){
$this->IsAuth(MODULE_NAME.'/NewSort');
$n=count($this->_param('sort'));
$i=0;
$data['updatatime'] = time();
foreach($this->_param('sort') as $k=>$v){
$data['sort']=$v;
$ab=$Article->where('id='.$k)->save($data);
if($ab){
$i++;
}
}
if($n==$i){
$this->success('排序成功!',U('index',array('tid'=>$this->_param('tid'),'p'=>$this->_param('p'))));
}else{
$this->error('部分排序失败!');
}
}
if($this->_param('Remove')){
//echo 'Remove';
}
}
}
public function Shenhe(){
$Article=D($this->tab);
$is=$Article->where('id='.$this->_param('id'))->getField('isshow');
if($is==1){
$isnew=0;
}else{
$isnew=1;
}
$aa=$Article->where('id='.$this->_param('id'))->setField('isshow',$isnew);
if($aa){
//同时删除内容
//$this->success('更改成功!',U('index',array('tid'=>$this->_param('tid'),'p'=>$this->_param('p'))));
echo 1;
}else{
//$this->error('更改失败!');
echo 0;
}
}
/**
* 删除文件
**/
public function delFile()
{
$file=$this->_param('file');
if($file)
{
$file2='.'.$file;
if(file_exists($file2))
{
if(unlink($file2))
echo 'yes';
else
echo 'no';
}
}
else
{
echo 'no';
}
}
private function delFile2($file)
{
if($file)
{
$file2=iconv('UTF-8','GB2312','.'.$file);//支持中文名文件
if(file_exists($file2))
{
unlink($file2);
}
}
}
/**
* 获取图片 多图片尺寸
*/
public function getchicun()
{
$data=M($this->catab)->field('img_size,imgs_size')->where('id='.I('tid'))->find();
$data['img_size'] = $data['img_size']?$data['img_size']:'未定义';
$data['imgs_size'] = $data['imgs_size']?$data['imgs_size']:'未定义';
echo json_encode($data);
}
/**
* 获取分类附件类型信息
**/
public function getPicnum()
{
$Category=M("Category");
$tid=$this->_param('tid');
$cate_data=$Category->field('picnum')->find($tid);
echo $cate_data['picnum'];
}
/**
* 图片裁剪
**/
public function modifyFace()
{
//if ($_SERVER['REQUEST_METHOD'] == 'POST'){
//删除会员以前的头像
if(file_exists($MemberFace)) {
unlink($MemberFace);
}
$MemberFace = $this->sliceBanner();
echo $MemberFace;
//此处根据自己的程序代码自行调整
//$table = "member"; //数据表名称
//$MemberUser = "cuteboy"; //会员名字
//mysql_query("UPDATE ".$table." SET MemberFace='".$MemberFace."' Where MemberUser = '".$MemberUser."'");
//echo "<script>alert('头像修改成功!');location.href='index.php';<\/script>");
exit;
//}
}
/**
* 初始化图片
* @param $url 原始图片路径
**/
private function getImageHander ($url) {
$pp_file=dirname(__FILE__);
$pp_file=realpath($pp_file.'/../../..'.$url);
$size=@getimagesize($pp_file);
switch($size['mime']){
case 'image/jpeg': $im = imagecreatefromjpeg($pp_file);break;
case 'image/gif' : $im = imagecreatefromgif($pp_file);break;
case 'image/png' : $im = imagecreatefrompng($pp_file);break;
default: $im=false;
}
return $im;
}
/**
* 生成裁剪后的图片
* @param $picpre
**/
private function sliceBanner($picpre='pp'){
$x = (int)$_POST['x'];
$y = (int)$_POST['y'];
$w = (int)$_POST['w'];
$h = (int)$_POST['h'];
$pic = $_POST['src'];
//剪切后小图片的名字
$str = explode(".",$pic);//图片的格式
$type = $str[1]; //图片的格式
$filename = $picpre."_".date("YmdHis").".". $type; //重新生成图片的名字
$uploadBanner = $pic;
$sliceBanner = "Uploads/Thumb/".$filename;//剪切后的图片存放的位置
//创建图片
$src_pic = $this->getImageHander($uploadBanner);
$dst_pic = imagecreatetruecolor($w, $h);
imagecopyresampled($dst_pic,$src_pic,0,0,$x,$y,$w,$h,$w,$h);
imagejpeg($dst_pic, $sliceBanner);
imagedestroy($src_pic);
imagedestroy($dst_pic);
//删除已上传未裁切的图片
if(file_exists($uploadBanner)) {
unlink($uploadBanner);
}
//返回新图片的位置
return '/'.$sliceBanner;
}
}
?>
\ No newline at end of file \ No newline at end of file
<?php
import('@.Common.Opadmin');
Class AuthcAction extends CommonAction{
public function _initialize()
{
parent::_initialize();
$authcategory=C('AUTH_CATEGORY');
$this->assign('authcategory',$authcategory);
}
public function group()
{
$g=M('Authgroup');
$order['id']='asc';
import('ORG.Util.Page');
$count = $g->count();
$pagenum=100;
$Page = new Page($count,$pagenum);
$nowPage = isset($_GET['p'])?$_GET['p']:0;
$lists=$g->order($order)->page($nowPage.','.$Page->listRows)->select();
foreach($lists as $k2 => $v2)
{
$lists[$k2]['rules']=explode(',',$v2['rules']);
}
$show = $Page->show();
$this->assign('page',$show);
$this->assign('lists',$lists);
//所有规则
$rules=$this->getRules();
foreach($rules as $k => $v)
{
$newrules[$v['id']]=$v['title'];
}
$this->assign('rules',$newrules);
$this->display();
}
/**
* 添加分组
**/
public function addgroup()
{
if($this->isPost())
{
$g=M('Authgroup');
if($g->create())
{
foreach($g->rules as $k => $v)
{
$rules.=','.$v;
}
$g->rules=substr($rules,1);
$lastid=$g->add();
if($lastid)
$this->success('分组添加成功!',U('group'));
else
$this->error('分组添加失败!');
}
else
{
$this->error($g->getError());
}
}
else
{
$rules=$this->getRules();
$this->assign('rules',$rules);
$this->display();
}
}
/**
* 修改分组
**/
public function editgroup()
{
$g=M('Authgroup');
if($this->isPost())
{
if($g->create())
{
foreach($g->rules as $k => $v)
{
$rules.=','.$v;
}
$g->rules=substr($rules,1);
$lastid=$g->save();
if($lastid)
$this->success('分组修改成功!',U('group'));
else
$this->error('分组修改失败!');
}
else
{
$this->error($g->getError());
}
}
else
{
//规则
$rules=$this->getRules();
$this->assign('rules',$rules);
//
$id=$this->_get('id');
$where['id']=array('eq',$id);
$data=$g->where($where)->find();
$this->assign('data',$data);
$this->display();
}
}
/**
* 获取所有规则/用户组
* 返回规则信息
* status=1 开启
**/
public function getRules($table='Authrule',$field='title,status,id,catid')
{
$r=M($table);
if($table == 'Authrule')
{
$order['catid']='asc';
$order['sort']='asc';
}
$order['id']='asc';
$where['status']=array('eq',1);
$data=$r->order($order)->field($field)->where($where)->select();
return $data;
}
/**
* 所有规则
**/
public function rules()
{
$r=M('Authrule');
$order['catid']='asc';
$order['sort']='asc';
$order['id']='asc';
import('ORG.Util.Pages');
if(I('search')){
$where['catid']=array('eq',I('search'));
$this->assign('search',I('search'));
}
$count = $r->where($where)->count();
$Page = new Pages($count,20);
$nowPage = isset($_GET['p'])?$_GET['p']:0;
$lists=$r->where($where)->order($order)->page($nowPage.','.$Page->listRows)->select();
$show = $Page->show();
$this->assign('page',$show);
$this->assign('lists',$lists);
$this->display();
}
/**
* 添加规则
**/
public function addrule()
{
if($this->isPost())
{
$r=D('Authrule');
if(!$r->create())
{
$this->error($r->getError());
}
else
{
if(!$r->sort)
{
$m_where['catid']=array('eq',$r->catid);
$max=$r->where($m_where)->max('sort');
$r->sort=$max+1;
}
$lastid=$r->add();
if($lastid)
{
$this->success('规则添加成功',U('rules'));
}
else
{
$this->error('规则添加失败');
}
}
}
else
{
$this->display();
}
}
/**
* 修改规则
**/
public function editrule()
{
$r=D('Authrule');
if($this->isPost())
{
if(!$r->create())
{
$this->error($r->getError());
}
else
{
$lastid=$r->save();
if($lastid)
{
$this->success('规则修改成功',U('rules',array('p'=>I('p'),'search'=>I('search'))));
}
else
{
$this->error('规则修改失败');
}
}
}
else
{
$where['id']=array('eq',$this->_get('id'));
$data=$r->where($where)->find();
$this->assign('data',$data);
$this->assign('p',I('p','1'));
$this->assign('search',I('search'));
$this->display();
}
}
/**
* 删除规则
**/
public function delrule()
{
if($this->del($this->_get('id')))
$this->success('删除成功!',U('rules',array('p'=>I('p'),'search'=>I('search'))));
else
$this->error('删除失败!');
}
/**
* 删除全部规则
**/
public function delallrule()
{
$table="Authrule";
$ids=explode(',', $this->_get('id'));
foreach($ids as $key=>$vaule)
{
if(!$this->del($vaule,$table))
{
$this->error('部分信息删除失败');
}
}
$this->success('信息删除成功',U('rules',array('p'=>I('p',1,'intval'),'search'=>I('search'))));
}
/**
* 修改规则
**/
public function changeSort()
{
$table=$this->_post('table');
$m=M($table);
$where['id']=array('eq',$this->_post('id'));
$f=$this->_post('f');
$data[$f]=$this->_post('val');
$count=$m->where($where)->data($data)->save();
if($count)
{
$msg['success']=true;
$msg['msg']=$this->_post('msg').'修改成功';
}
else
{
$msg['success']=false;
$msg['msg']=$this->_post('msg').'修改失败';
}
echo json_encode($msg);
}
/**
* 删除用户组
**/
public function delgroup()
{
if($this->del($this->_get('id'),'Authgroup'))
$this->success('删除成功!',U('group'));
else
$this->error('删除失败!');
}
/**
* 删除全部用户组
**/
public function delallgroup()
{
$table="Authgroup";
$ids=explode(',', $this->_get('id'));
foreach($ids as $key=>$vaule)
{
if(!$this->del($vaule,$table))
{
$this->error('部分信息删除失败');
}
}
$this->success('信息删除成功',U('group'));
}
/**
* 共公删除
* $table
**/
private function del($id,$table='Authrule')
{
$a=M($table);
$where['id']=array('eq',$id);
$count=$a->where($where)->delete();
if($count)
return true;
else
return false;
}
/**
* 修改分组开启属性
**/
public function editattr()
{
$table=$this->_post('table');
$m=M($table);
$where['id']=array('eq',$this->_post('id'));
$data['status']=$this->_post('status');
$count=$m->where($where)->data($data)->save();
if($count)
{
$msg['success']=true;
$msg['msg']='状态已修改';
}
else
{
$msg['success']=false;
}
echo json_encode($msg);
}
/**
* 权限分配
* uid 用户id
* group_id 用户组id
**/
public function fenpei()
{
$m=M('Authgroupaccess');
$order='id asc';
$where['uid']=array('neq','1');
$list=$m->where($where)->order($order)->select();
if($list)
{
foreach($list as $k => $v)
{
$list[$k]['username']=$this->getClassName($v['uid'],'Admin','username');
$list[$k]['group_id']=explode(',',$v['group_id']);
}
}
$this->assign('lists',$list);
// 所有用户组
$groups=$this->getRules('Authgroup','title,id');
if($groups)
{
foreach($groups as $k2 => $v2)
{
$newgroups[$v2['id']]=$v2['title'];
}
}
$this->assign('groups',$newgroups);
$this->display();
}
/**
* 添加分配
*
**/
public function addfenpei()
{
if($this->isPost())
{
//查看会员是否已经分配用户组
if($this->checkfenpei($this->_post('uid'),'uid','Authgroupaccess')) $this->error('会员已经分配角色');
//
$f=M('Authgroupaccess');
if(!$f->create())
{
$this->error($f->getError());
}
else
{
/*foreach($f->group_id as $k => $v)
{
$group_id.=','.$v;
}
$f->group_id=substr($group_id,1);*/
$lastid=$f->add();
if($lastid)
$this->success('分配成功',U('fenpei'));
else
$this->error('分配失败');
}
}
else
{
//所有用户组
$groups=$this->getRules('Authgroup','title,id');
$this->assign('groups',$groups);
//所有会员
$m=M('Admin');
$order='id asc';
$where['id']=array('neq',1);
$admin=$m->field('username,id')->where($where)->order($order)->select();
$this->assign('admin',$admin);
$this->display();
}
}
/**
* 修改分配
*
**/
public function editfenpei()
{
$f=M('Authgroupaccess');
if($this->isPost())
{
if(!$f->create())
{
$this->error($f->getError());
}
else
{
/*foreach($f->group_id as $k => $v)
{
$group_id.=','.$v;
}
$f->group_id=substr($group_id,1);*/
$lastid=$f->save();
if($lastid)
$this->success('分配成功',U('fenpei'));
else
$this->error('分配失败');
}
}
else
{
$where['id']=array('eq',$this->_get('id'));
$data=$f->where($where)->find();
$this->assign('data',$data);
//所有用户组
$groups=$this->getRules('Authgroup','title,id');
$this->assign('groups',$groups);
//所有会员
$m=M('Admin');
$order='id asc';
// $admin=$m->field('username,id')->order($order)->select();
$admin=$m->order($order)->getField('id,username');
$this->assign('admin',$admin);
$this->display();
}
}
/**
* 删除分配
*
**/
public function delfenpei(){
if($this->del($this->_get('id'),'Authgroupaccess'))
$this->success('删除成功!',U('fenpei'));
else
$this->error('删除失败!');
}
/**
* 删除全部分配
**/
public function delallfenpei()
{
$table="Authgroupaccess";
$ids=explode(',', $this->_get('id'));
foreach($ids as $key=>$vaule)
{
if(!$this->del($vaule,$table))
{
$this->error('部分信息删除失败');
}
}
$this->success('信息删除成功',U('fenpei'));
}
/**
* 查看是否已经分配
* $table 表名
* $field 字段名
* $id 传来的数值
**/
private function checkfenpei($id,$field,$table='Authgroupaccess')
{
$m=M($table);
$where[$field]=array('eq',$id);
$count=$m->where($where)->count();
if($count)
return true;
else
return false;
}
/**
* 获取规则名称/会员名/用户组名......
* $id 分类id
* $table 表名
* $typename 字段名
**/
private function getClassName($id,$table='Authrule',$field='title')
{
$data=M($table)->field($field)->where('id='.$id)->find();
return $data;
}
}
?>
\ No newline at end of file \ No newline at end of file
<?php
class BaksqlAction extends CommonAction {
public $config = ''; //相关配置
public $model = ''; //实例化一个model
public $content; //内容
public $dbName = ''; //数据库名
public $dir_sep = '/'; //路径符号
function _initialize() {
parent::_initialize();
header("Content-type: text/html;charset=utf-8");
set_time_limit(0); //不超时
ini_set('memory_limit','500M');
$this->config = array(
'path' => DB_BACKUP, //备份文件存在哪里
'isCompress' => 1, //是否开启gzip压缩 【未测试】
'isDownload' => 0 //备份完成后是否下载文件 【未测试】
);
$this->dbName = C('DB_NAME'); //当前数据库名称
$this->model = new Model();
//$sql = 'set interactive_timeout=24*3600'; //空闲多少秒后 断开链接
// $this->model>execute($sql);
}
/* -
* +------------------------------------------------------------------------
* * @ 已备份数据列表
* +------------------------------------------------------------------------
*/
public function index(){
$path = $this->config['path'];
$fileArr = $this->MyScandir($path);
foreach ($fileArr as $key => $value) {
if ($key > 1) {
//获取文件创建时间
$fileTime = date('Y-m-d H:i:s', filemtime($path . '/' . $value));
$fileSize = filesize($path . '/' . $value) / 1024;
//获取文件大小
$fileSize = $fileSize < 1024 ? number_format($fileSize, 2) . ' KB' :
number_format($fileSize / 1024, 2) . ' MB';
//构建列表数组
$list[] = array(
'name' => $value,
'time' => $fileTime,
'size' => $fileSize
);
}
}
//dump($list);
$list=array_reverse($list);
$this->assign('list', $list);
$this->display();
}
/* -
* +------------------------------------------------------------------------
* * @ 获取数据表
* +------------------------------------------------------------------------
*/
public function tablist() {
$list = $this->model->query("SHOW TABLE STATUS FROM {$this->dbName}"); //得到表的信息
//echo $this->model->getLastSql();
$this->assign('list', $list);
//dump($list);
$this->display();
}
/* -
* +------------------------------------------------------------------------
* * @ 备份整个数据库
* +------------------------------------------------------------------------
*/
function backall() {
$tables = $this->getTables();
if ($this->backup($tables)) {
$this->success('数据库备份成功!',U('Baksql/index'));
} else {
$this->error('数据库备份失败!');
}
}
/* -
* +------------------------------------------------------------------------
* * @ 按表备份,可批量
* +------------------------------------------------------------------------
*/
function backtables() {
$tab = $_REQUEST['tab'];
if (is_array($tab))
$tables = $tab;
else
$tables[] = $tab;
if ($this->backup($tables)) {
if (is_array($tab))
$this->success('数据库备份成功!');
else
$this->success('数据库备份成功!',U('Baksql/index'));
} else {
$this->error('数据库备份失败!');
}
}
public function form(){
if($this->isPost()){
foreach($_POST['name'] as $k=>$v){
$aa=unlink($this->config['path'] . $this->dir_sep . $v);
if(!$aa){
$this->error('删除备份部分失败!');
}
}
$this->success('删除备份成功!',U('Baksql/index'));
}
}
//还原数据库
function recover() {
if ($this->recover_file(I('file'))) {
$this->success('数据还原成功!',U('Baksql/index'));
} else {
$this->error('数据还原失败!');
}
}
//删除单个数据备份
function deletebak() {
if (unlink($this->config['path'] . $this->dir_sep . I('file'))) {
$this->success('删除备份成功!',U('Baksql/index'));
} else {
$this->error('删除备份失败!');
}
}
/* -
* +------------------------------------------------------------------------
* * @ 下载备份文件
* +------------------------------------------------------------------------
*/
function downloadBak() {
$file_name = $_GET['file'];
$file_dir = $this->config['path'];
if (!file_exists($file_dir . "/" . $file_name)) { //检查文件是否存在
return false;
exit;
} else {
$file = fopen($file_dir . "/" . $file_name, "r"); // 打开文件
// 输入文件标签
header('Content-Encoding: none');
header("Content-type: application/octet-stream");
header("Accept-Ranges: bytes");
header("Accept-Length: " . filesize($file_dir . "/" . $file_name));
header('Content-Transfer-Encoding: binary');
header("Content-Disposition: attachment; filename=" . $file_name); //以真实文件名提供给浏览器下载
header('Pragma: no-cache');
header('Expires: 0');
//输出文件内容
echo fread($file, filesize($file_dir . "/" . $file_name));
fclose($file);
exit;
}
}
/* -
* +------------------------------------------------------------------------
* * @ 获取 目录下文件数组
* +------------------------------------------------------------------------
* * @ $FilePath 目录路径
* * @ $Order 排序
* +------------------------------------------------------------------------
* * @ 获取指定目录下的文件列表,返回数组
* +------------------------------------------------------------------------
*/
private function MyScandir($FilePath = './', $Order = 0) {
$FilePath = opendir($FilePath);
while ($filename = readdir($FilePath)) {
$fileArr[] = $filename;
}
$Order == 0 ? sort($fileArr) : rsort($fileArr);
return $fileArr;
}
/* * ******************************************************************************************** */
/* -
* +------------------------------------------------------------------------
* * @ 读取备份文件
* +------------------------------------------------------------------------
* * @ $fileName 文件名
* +------------------------------------------------------------------------
*/
private function getFile($fileName) {
$this->content = '';
$fileName = $this->trimPath($this->config['path'] . $this->dir_sep . $fileName);
if (is_file($fileName)) {
$ext = strrchr($fileName, '.');
if ($ext == '.sql') {
$this->content = file_get_contents($fileName);
} elseif ($ext == '.gz') {
$this->content = implode('', gzfile($fileName));
} else {
$this->error('无法识别的文件格式!');
}
} else {
$this->error('文件不存在!');
}
}
/* -
* +------------------------------------------------------------------------
* * @ 把数据写入磁盘
* +------------------------------------------------------------------------
*/
private function setFile() {
$recognize = '';
$recognize = $this->dbName;
$fileName = $this->trimPath($this->config['path'] . $this->dir_sep . $recognize . '_' . date('YmdHis') . '_' . mt_rand(100000000, 999999999) . '.sql');
$path = $this->setPath($fileName);
if ($path !== true) {
$this->error("无法创建备份目录目录 '$path'");
}
if ($this->config['isCompress'] == 0) {
if (!file_put_contents($fileName, $this->content, LOCK_EX)) {
$this->error('写入文件失败,请检查磁盘空间或者权限!');
}
} else {
if (function_exists('gzwrite')) {
$fileName .= '.gz';
if ($gz = gzopen($fileName, 'wb')) {
gzwrite($gz, $this->content);
gzclose($gz);
} else {
$this->error('写入文件失败,请检查磁盘空间或者权限!');
}
} else {
$this->error('没有开启gzip扩展!');
}
}
if ($this->config['isDownload']) {
$this->downloadFile($fileName);
}
}
private function trimPath($path) {
return str_replace(array('/', '\\', '//', '\\\\'), $this->dir_sep, $path);
}
private function setPath($fileName) {
$dirs = explode($this->dir_sep, dirname($fileName));
$tmp = '';
foreach ($dirs as $dir) {
$tmp .= $dir . $this->dir_sep;
if (!file_exists($tmp) && !@mkdir($tmp, 0777))
return $tmp;
}
return true;
}
//未测试
private function downloadFile($fileName) {
ob_end_clean();
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Length: ' . filesize($fileName));
header('Content-Disposition: attachment; filename=' . basename($fileName));
readfile($fileName);
}
/* -
* +------------------------------------------------------------------------
* * @ 给字符串添加 ` `
* +------------------------------------------------------------------------
* * @ $str 字符串
* +------------------------------------------------------------------------
* * @ 返回 `$str`
* +------------------------------------------------------------------------
*/
private function backquote($str) {
return "`{$str}`";
}
/* -
* +------------------------------------------------------------------------
* * @ 获取数据库的所有表
* +------------------------------------------------------------------------
* * @ $dbName 数据库名称
* +------------------------------------------------------------------------
*/
private function getTables($dbName = '') {
$dbName = C('DB_NAME');
if (!empty($dbName)) {
$sql = 'SHOW TABLES FROM ' . $dbName;
} else {
$sql = 'SHOW TABLES ';
}
$result = $this->model->query($sql);
$info = array();
foreach ($result as $key => $val) {
$info[$key] = current($val);
}
return $info;
}
/* -
* +------------------------------------------------------------------------
* * @ 把传过来的数据 按指定长度分割成数组
* +------------------------------------------------------------------------
* * @ $array 要分割的数据
* * @ $byte 要分割的长度
* +------------------------------------------------------------------------
* * @ 把数组按指定长度分割,并返回分割后的数组
* +------------------------------------------------------------------------
*/
private function chunkArrayByByte($array, $byte = 5120) {
$i = 0;
$sum = 0;
$return = array();
foreach ($array as $v) {
$sum += strlen($v);
if ($sum < $byte) {
$return[$i][] = $v;
} elseif ($sum == $byte) {
$return[++$i][] = $v;
$sum = 0;
} else {
$return[++$i][] = $v;
$i++;
$sum = 0;
}
}
return $return;
}
/* -
* +------------------------------------------------------------------------
* * @ 备份数据 { 备份每张表、视图及数据 }
* +------------------------------------------------------------------------
* * @ $tables 需要备份的表数组
* +------------------------------------------------------------------------
*/
private function backup($tables) {
if (empty($tables))
$this->error('没有需要备份的数据表!');
$this->content = '/* This file is created by MySQLReback ' . date('Y-m-d H:i:s') . ' */';
foreach ($tables as $i => $table) {
$table = $this->backquote($table); //为表名增加 ``
$tableRs = $this->model->query("SHOW CREATE TABLE {$table}"); //获取当前表的创建语句
if (!empty($tableRs[0]["Create View"])) {
$this->content .= "\r\n /* 创建视图结构 {$table} */";
$this->content .= "\r\n DROP VIEW IF EXISTS {$table};/* MySQLReback Separation */ " . $tableRs[0]["Create View"] . ";/* MySQLReback Separation */";
}
if (!empty($tableRs[0]["Create Table"])) {
$this->content .= "\r\n /* 创建表结构 {$table} */";
$this->content .= "\r\n DROP TABLE IF EXISTS {$table};/* MySQLReback Separation */ " . $tableRs[0]["Create Table"] . ";/* MySQLReback Separation */";
$tableDateRow = $this->model->query("SELECT * FROM {$table}");
$valuesArr = array();
$values = '';
if (false != $tableDateRow) {
foreach ($tableDateRow as &$y) {
foreach ($y as &$v) {
if ($v=='') //纠正empty 为0的时候 返回tree
$v = 'null'; //为空设为null
else
$v = "'" . mysql_escape_string($v) . "'"; //非空 加转意符
}
$valuesArr[] = '(' . implode(',', $y) . ')';
}
}
$temp = $this->chunkArrayByByte($valuesArr);
if (is_array($temp)) {
foreach ($temp as $v) {
$values = implode(',', $v) . ';/* MySQLReback Separation */';
if ($values != ';/* MySQLReback Separation */') {
$this->content .= "\r\n /* 插入数据 {$table} */";
$this->content .= "\r\n INSERT INTO {$table} VALUES {$values}";
}
}
}
// dump($this->content);
// exit;
}
}
if (!empty($this->content)) {
$this->setFile();
}
return true;
}
/* -
* +------------------------------------------------------------------------
* * @ 还原数据
* +------------------------------------------------------------------------
* * @ $fileName 文件名
* +------------------------------------------------------------------------
*/
private function recover_file($fileName) {
$this->getFile($fileName);
if (!empty($this->content)) {
$content = explode(';/* MySQLReback Separation */', $this->content);
foreach ($content as $i => $sql) {
$sql = trim($sql);
if (!empty($sql)) {
$mes = $this->model->execute($sql);
if (false === $mes) { //如果 null 写入失败,换成 ''
$table_change = array('null' => '\'\'');
$sql = strtr($sql, $table_change);
$mes = $this->model->execute($sql);
}
if (false === $mes) { //如果遇到错误、记录错误
$log_text = '以下代码还原遇到问题:';
$log_text.="\r\n $sql";
set_log($log_text);
}
}
}
} else {
$this->error('无法读取备份文件!');
}
return true;
}
}
?>
\ No newline at end of file \ No newline at end of file
<?php
class CommonAction extends BaseAction {
public $ADMIN_KEY='';
public $LOGIN_TIME='';
public $ADMIN_SCHOOL='';
public function __construct() {
parent::__construct();
$this->ADMIN_KEY=cookie('ADMIN_KEY');
$this->ADMIN_SCHOOL=cookie('ADMIN_SCHOOL');
$this->LOGIN_TIME=cookie('LOGIN_TIME');
header('Content-Type:text/html; charset=utf-8');
$this->ppFirewall();
$this->checkAdminSession();
//去除反斜梗
if (get_magic_quotes_gpc())
{
$_POST = array_map('stripslashes_deep', $_POST);
$_GET = array_map('stripslashes_deep', $_GET);
$_COOKIE = array_map('stripslashes_deep', $_COOKIE);
}
}
public function _initialize()
{
parent::_initialize();
if((MODULE_NAME !="Index" || (MODULE_NAME =="Index" && !in_array(ACTION_NAME,array('index','main','menu','delcache','outlogin')))) && (MODULE_NAME !="Public" || (MODULE_NAME == 'Public' && !in_array(ACTION_NAME,array('login','index','verify')))))
{
import('ORG.Util.Auth');//加载类库
$auth=new Auth();
// var_dump($auth->check(strtolower(MODULE_NAME).'-'.strtolower(ACTION_NAME),session('ADMIN_KEY')));
// exit;
if(!$auth->check(strtolower(MODULE_NAME).'-'.strtolower(ACTION_NAME),cookie('ADMIN_KEY'))){
$this->error('你没有权限');
}
}
}
/**
* 判断用户并返回查询条件 超级管理员与学院管理员
*/
protected function getWhere(){
if($this->ADMIN_KEY == 1)
return NULL;
else
return array('eq',$this->ADMIN_SCHOOL);
}
public function checkAdminSession() {
$ADMIN_KEY=$this->ADMIN_KEY;
if (!isset($ADMIN_KEY) || !isset($this->LOGIN_TIME)) {
$this->outclear();
exit('<script>alert("当前用户未登录或登录超时,请重新登录");top.location.href="'.U('Public/login').'";</script>');
}
}
//防火墙验证
protected function ppFirewall(){
if(!$_COOKIE['pro_ppfirewall']){
header('Content-Type:text/html; charset=utf-8');
exit('您无权限操作');
}
}
//清除//防火墙验证
protected function dFirewall(){
setcookie('pro_ppfirewall',null,time()-1000);
}
public function outlogin(){
$this->outclear();
$this->success('退出成功!',U('Public/index'));
}
protected function outclear(){
cookie('ADMIN_KEY',null);
cookie('ADMIN_NAME',null);
cookie('LOGIN_TIME',null);
cookie('pp_authlist',null);
// $this->dFirewall();
}
public function IsAuth($action) {
import('ORG.Util.Auth');//加载类库
$auth=new Auth();
/*if(!$auth->check(strtolower($action),$_SESSION['ADMIN_KEY']['id'])){
$this->error('你没有权限');
}*/
}
public function AllCatid($id,$type='1',$tab='Category',$upid='upid'){
$table=M($tab);
if($type==1){
$return[]=$id;
}else{
$return =$id;
}
$map[$upid]=array('eq',$id);
$lists=$table->where($map)->select();
foreach($lists as $k=>$v){
$listarr=$this->AllCatid($v['id'],$type,$tab);
if($type==1){
$return=array_merge($return,$listarr);
}else{
$return .=','.$listarr;
}
}
return $return;
}
public function topId($id){
$table=M('Category');
$da=$table->where('id='.$id)->find();
if(!$da){
return false;
}
if($da['topid']==0){
return $da['id'];
}else{
return $da['topid'];
}
}
/**
* 导入excel
**/
function impExcel()
{
if(isset($_FILES["import"]) && ($_FILES["import"]["error"] == 0))
{
$result = $this->importExecl($_FILES["import"]["tmp_name"]);
if($result["error"] == 1)
{
$execl_data = $result["data"][0]["Content"];
foreach($execl_data as $k=>$v)
{
// 这里写你的业务代码
}
}
}
}
/**
* 导出Excel
**/
function expExcel()
{
$xlsName = "Authrule";
$xlsCell = array(
array('id','序列'),
array('name','规则'),
array('title','规则说明')
);
$xlsModel = M('Authrule');
$xlsData = $xlsModel->Field('id,name,title')->select();
$this->exportExcel($xlsName,$xlsCell,$xlsData);
}
/**
* 获取用户权限
* 防止 authlist 走出cookie限制
* @return array
*/
protected function getPower(){
//获取用户权限
import('ORG.Util.Auth');//加载类库
$auth=new Auth();
$authlist=$auth->getAuthList(cookie('ADMIN_KEY'));
return $authlist;
}
}
\ No newline at end of file \ No newline at end of file
<?php
class IndexAction extends CommonAction {
public $tab_sys='';
public function __construct() {
parent::__construct();
$this->tab_sys='System';
}
public function index(){
$this->display();
}
public function main(){
//获取服务器信息
$sysdata['sysos'] = $_SERVER["SERVER_SOFTWARE"]; //获取服务器标识的字串
$sysdata['sysversion'] = PHP_VERSION; //获取PHP服务器版本
//以下两条代码连接MySQL数据库并获取MySQL数据库版本信息
mysql_connect("localhost", "mysql_user", "mysql_pass");
$sysdata['mysqlinfo'] = mysql_get_server_info();
//从服务器中获取GD库的信息
if(function_exists("gd_info")){
$gd = gd_info();
$sysdata['gdinfo'] = $gd['GD Version'];
}else {
$sysdata['gdinfo'] = "未知";
}
if(IS_WIN){//是否属于Windows 环境
$sysdata['system']='Liunx';
}else{
$sysdata['system']='WINNT';
}
//从GD库中查看是否支持FreeType字体
$sysdata['freetype'] = $gd["FreeType Support"] ? "支持" : "不支持";
//从PHP配置文件中获得是否可以远程文件获取
$sysdata['allowurl']= ini_get("allow_url_fopen") ? "支持" : "不支持";
//从PHP配置文件中获得最大上传限制
$sysdata['max_upload'] = ini_get("file_uploads") ? ini_get("upload_max_filesize") : "Disabled";
//从PHP配置文件中获得脚本的最大执行时间
$sysdata['max_ex_time']= ini_get("max_execution_time")."秒";
//以下两条获取服务器时间,中国大陆采用的是东八区的时间,设置时区写成Etc/GMT-8
date_default_timezone_set("Etc/GMT-8");
$sysdata['systemtime'] = date("Y-m-d H:i:s",time());
$Links=D('Links');
$orderby['sort']='desc';
$orderby['id']='desc';
$list = $Links->order($orderby)->limit(20)->select();
$this->assign('list',$list);
$this->assign('role',$this->getRole());
$this->assign('system',$sysdata);
$this->display('main2');
}
private function getRole(){
$m=M('Authgroupaccess');
$where['uid']=array('eq',cookie('ADMIN_KEY'));
$info=$m->where($where)->order($order)->getField('group_id');
$info=explode(',',$info);
// 所有用户组
$groups=R('Authc/getRules',array('Authgroup','title,id'));
if($groups)
{
foreach($groups as $k2 => $v2)
{
if(in_array($v2['id'],$info)) $newgroups[$v2['id']]=$v2['title'];
}
}
return implode(',', $newgroups);
}
/**
* 获取分类下的所有子分类
* @param $id 分类id
* @param $add 本分类是否可以添加内容
*
1:内容列表 本类及子类都可添加文章
2:内容单页 本类及子类都可填写文章内容
3:栏目主页 本类可添加内容,内容由子类(单面,列表)内容提供或者本分类的单页内容
4:列表主页 本类不可添加文章,前台自动调取所有子类的文章
5:单页主页 本类没有内容,前台自动调用第一个子类内容
0:外部链接
**/
public function allChildArray($id,$add=false)
{
$Category=M('Category');
// $order['path']='asc';
$order['sort']='asc';
$order['id']='asc';
$field='id,upid,topid,path,catname,type,sort,isshow,module_name,action_name';
$where['upid']=array('eq',$id);
$arrid=$Category->field($field)->where($where)->order($order)->select(); //分类下所有子分类
$arr=array();
if($add) //本类可以添加内容
{
$where2['id']=array('eq',$id);
$data=$Category->field($field)->where($where2)->order($order)->select();
foreach($data as $k=>$v)
{
$arr[$k]=$v;
switch($v['type'])
{
case '1': //内容列表
$arr[$k]['name']=$v['catname'];
$arr[$k]['url']=U('Article/index?tid='.$v['id']);
$arr[$k]['add']=U('Article/add?tid='.$v['id']);
$arr[$k]['show']=true;
break;
case '2': //内容单页
$arr[$k]['name']=$v['catname'];
$arr[$k]['url']=U('Article/page?tid='.$v['id']);
$arr[$k]['show']=true;
break;
case '3': //栏目主页
$arr[$k]['name']=$v['catname'];
$arr[$k]['url']=U('Article/page?tid='.$v['id']);
$arr[$k]['show']=true;
break;
case '4': //列表主页
$arr[$k]['name']=$v['catname'];
// $arr[$k]['url']=U('Article/index?tid='.$v['id']);
// $arr[$k]['add']=U('Article/add?tid='.$v['id']);
$arr[$k]['url']='javascript:void(0);';
// $arr[$k]['add']='javascript:void(0);';
$arr[$k]['show']=true;
break;
case '5': //单页主页
$arr[$k]['name']=$v['catname'];
// $arr[$k]['url']=U('Article/index?tid='.$v['id']);
// $arr[$k]['add']=U('Article/add?tid='.$v['id']);
$arr[$k]['url']='javascript:void(0);';
// $arr[$k]['add']='javascript:void(0);';
$arr[$k]['show']=true;
break;
case '0': //外部链接
$arr[$k]['name']=$v['catname'];
$arr[$k]['url']=U('Article/link?tid='.$v['id']);
$arr[$k]['show']=true;
break;
}
}
}
if($arrid)
{
foreach($arrid as $k=>$v)
{
if($add) ++$k;
$arr[$k]=$v;
switch($v['type'])
{
case '1':
$arr[$k]['name']=$v['catname'];
$arr[$k]['url']=U('Article/index?tid='.$v['id']);
$arr[$k]['add']=U('Article/add?tid='.$v['id']);
$arr[$k]['show']=true;
break;
case '2':
$arr[$k]['name']=$v['catname'];
$arr[$k]['url']=U('Article/page?tid='.$v['id']);
$arr[$k]['show']=true;
break;
case '3':
$arr[$k]['name']=$v['catname'];
$arr[$k]['url']=U('Article/page?tid='.$v['id']);
$arr[$k]['show']=true;
break;
case '4':
$arr[$k]['name']=$v['catname'];
// $arr[$k]['url']=U('Article/index?tid='.$v['id']);
// $arr[$k]['add']=U('Article/add?tid='.$v['id']);
$arr[$k]['url']='javascript:void(0);';
// $arr[$k]['add']='javascript:void(0);';
$arr[$k]['show']=true;
break;
case '5':
$arr[$k]['name']=$v['catname'];
// $arr[$k]['url']=U('Article/index?tid='.$v['id']);
// $arr[$k]['add']=U('Article/add?tid='.$v['id']);
$arr[$k]['url']='javascript:void(0);';
// $arr[$k]['add']='javascript:void(0);';
$arr[$k]['show']=true;
break;
case '0':
$arr[$k]['name']=$v['catname'];
$arr[$k]['url']=U('Article/link?tid='.$v['id']);
$arr[$k]['show']=true;
break;
}
${arrid.$k}=$Category->where('upid='.$v['id'])->select();
if(${arrid.$k})
{
$arr[$k]['cmenulist']=$this->allChildArray($v['id']);
}
}
}
return $arr;
}
/**
* 左侧导航
**/
public function menu2(){
$Category=M('Category');
$catlist=$Category->where('upid=0')->order('sort asc,id asc')->select();
foreach($catlist as $k=>$v){
$list[$k]=$catlist[$k];
$list[$k]['kid']=$k+5;
$catl=$Category->where('upid='.$v['id'])->order('sort asc,id asc')->select();
$cdata=array();
if(count($catl)<1){
$cdata[]=$v;
}else{
$cdata=$catl;
}
$cmenulist=array();
foreach($cdata as $kk=>$vv){
// type : 0列表页 1栏目页 2单页 4主页 3外部链接
// 1、内容列表、2 内容单页、3 栏目主页、4 列表主页、5 单页主页、0 外部链接
if($vv['type']==1){
$cmenulist[$kk]['name']=$vv['catname'];
$cmenulist[$kk]['url']=U('Article/index?tid='.$vv['id']);
$cmenulist[$kk]['add']=U('Article/add?tid='.$vv['id']);
$cmenulist[$kk]['show']=true;
}elseif($vv['type']==2){
$cmenulist[$kk]['name']=$vv['catname'];
$cmenulist[$kk]['url']=U('Article/page?tid='.$vv['id']);
$cmenulist[$kk]['show']=true;
}elseif($vv['type']==3){
$cmenulist[$kk]['name']=$vv['catname'];
$cmenulist[$kk]['url']=U('Article/page?tid='.$vv['id']);
$cmenulist[$kk]['show']=true;
}elseif($vv['type']==4){
$cmenulist[$kk]['name']=$vv['catname'];
$cmenulist[$kk]['url']=U('Article/index?tid='.$vv['id']);
$cmenulist[$kk]['add']=U('Article/add?tid='.$vv['id']);
$cmenulist[$kk]['show']=true;
}elseif($vv['type']==5){
$cmenulist[$kk]['name']=$vv['catname'];
$cmenulist[$kk]['url']=U('Article/index?tid='.$vv['id']);
$cmenulist[$kk]['add']=U('Article/add?tid='.$vv['id']);
$cmenulist[$kk]['show']=true;
}elseif($vv['type']==0){
$cmenulist[$kk]['name']=$vv['catname'];
$cmenulist[$kk]['url']=U('Article/link?tid='.$vv['id']);
$cmenulist[$kk]['show']=true;
}else{
}
}
$list[$k]['cmenulist']=$cmenulist;
}
//dump($list);
$this->assign('catlist',$catlist);
$this->assign('list',$list);
$this->display();
}
/**
* 左侧导航
* pp new
**/
public function menu(){
/*$Category=M('Category');
// $order['path']='asc';
$order['sort']='asc';
$order['id']='asc';
// $field='id,upid,topid,path,catname,catename,thumb,banner,title,keywords,description,content,type,sort,picnum,linkurl,isshow,module_name,action_name,addtime,updatetime';
$field='id,upid,topid,path,catname,type,sort,isshow,module_name,action_name';
$where['upid']=array('eq',0);
$catlist=$Category->field($field)->where($where)->order($order)->select();
foreach($catlist as $k=>$v)
{
if(in_array($v['type'],array(1,2,3))) //1:内容列表 2:内容单页 3:栏目主页
$add=true;
else
$add=false;
$list[$k]=$catlist[$k];
$list[$k]['cmenulist']=$this->allChildArray($v['id'],$add);
}
$this->assign('catlist',$catlist);
$this->assign('list',$list);*/
$this->assign('authlist',$this->getPower());
$this->display();
}
public function system()
{
$System=D($this->tab_sys);
if($this->isPost()){
$_POST['cfg']=array2single($_POST['cfg'],true);
foreach($_POST['cfg'] as $k=>$v){
$arr_id=explode('_',$k);
$lastid=$System->where('id='.$arr_id['1'])->setField('content',$v);
$lastid=$System->where('id='.$arr_id['1'])->setField('sort',I('sort_'.$arr_id['1']));
}
$this->ReWriteConfig();
$this->success('系统基本设置更改成功',U('Index/system'));
}else{
$list=$System->where('isshow=1')->order('sort asc,id asc')->select();
$this->assign('lists',$list);
$this->display();
}
}
public function delcache(){
header("Content-type: text/html; charset=utf-8");
//清文件缓存
$dirs = array('./Runtime/');
@mkdir('Runtime',0777,true);
//清理缓存
foreach($dirs as $value) {
$this->rmdirr($value);
}
echo '<script>alert("系统缓存清除成功");window.location="'.U('Index/main').'";</script>';
// $this->success('系统缓存清除成功!',U('Index/main'));
}
private function rmdirr($dirname) {
if (!file_exists($dirname)){
return false;
}
if (is_file($dirname) || is_link($dirname)){
return unlink($dirname);
}
$dir = dir($dirname);
if($dir){
while (false !== $entry = $dir->read()){
if ($entry == '.' || $entry == '..') {
continue;
}
//递归
$this->rmdirr($dirname . DIRECTORY_SEPARATOR . $entry);
}
}
$dir->close();
return rmdir($dirname);
}
//更新配置文件webconfig文件的内容
private function ReWriteConfig(){
$Config=D($this->tab_sys);
$configpath = C('CFG_CONf');
if(!is_writeable($configpath.'config.inc.php')){
$this->error("配置文件'{$configpath}config.inc.php'不支持写入,无法修改系统配置参数!",'__ACTION__');
}
$datalists=$Config->order('id asc')->select();
foreach($datalists as $datalist){
$data[$datalist['cfg']]=$datalist['content'];
}
F('config.inc',$data,$configpath);
}
public function do_config()
{
$Config=D('System');
if($Config->create())
{
$lastid=$Config->add();
if($lastid)
{
$this->ReWriteConfig();
$this->success('变量添加成功',U('Index/system'));
}
else
$this->error('变量添加失败');
}
else
{
$this->error($Config->getError());
}
}
}
?>
\ No newline at end of file \ No newline at end of file
<?php
class KindAction extends Action{
public $php_path='';
public $php_url='';
public function __construct() {
parent::__construct();
$this->php_path=$_SERVER['DOCUMENT_ROOT'];
$this->php_url=__ROOT__;
}
public function upload_json(){
import('ORG.Util.Services_JSON');
//$php_path = dirname(__FILE__) . '/';
//$php_url = dirname($_SERVER['PHP_SELF']) . '/';
$php_path = $this->php_path;
$php_url = $this->php_url;
//文件保存目录路径
$save_path = $php_path . '/Uploads/';
//文件保存目录URL
$save_url = $php_url . '/Uploads/';
//定义允许上传的文件扩展名
$ext_arr = array(
'image' => array('gif', 'jpg', 'jpeg', 'png', 'bmp'),
'flash' => array('swf', 'flv'),
'media' => array('swf', 'flv', 'mp3', 'wav', 'wma', 'wmv', 'mid', 'avi', 'mpg', 'asf', 'rm', 'rmvb'),
'file' => array('doc', 'docx', 'pdf'),
/*'file' => array('doc', 'docx', 'xls', 'xlsx', 'ppt', 'htm', 'html', 'txt', 'zip', 'rar', 'gz', 'bz2', 'pdf'),*/
);
//最大文件大小
$max_size = 1048576;
$alert_size = floor($max_size / 1048576);
$save_path = realpath($save_path) . '/';
//PHP上传失败
if (!empty($_FILES['imgFile']['error'])) {
switch($_FILES['imgFile']['error']){
case '1':
$error = '超过php.ini允许的大小。';
break;
case '2':
$error = '超过表单允许的大小。';
break;
case '3':
$error = '图片只有部分被上传。';
break;
case '4':
$error = '请选择图片。';
break;
case '6':
$error = '找不到临时目录。';
break;
case '7':
$error = '写文件到硬盘出错。';
break;
case '8':
$error = 'File upload stopped by extension。';
break;
case '999':
default:
$error = '未知错误。';
}
$this->alert($error);
}
//有上传文件时
if (empty($_FILES) === false) {
//原文件名
$file_name = $_FILES['imgFile']['name'];
//服务器上临时文件名
$tmp_name = $_FILES['imgFile']['tmp_name'];
//文件大小
$file_size = $_FILES['imgFile']['size'];
//检查文件名
if (!$file_name) {
$this->alert("请选择文件。");
}
//检查目录
if (@is_dir($save_path) === false) {
$this->alert("上传目录不存在。");
}
//检查目录写权限
if (@is_writable($save_path) === false) {
$this->alert("上传目录没有写权限。");
}
//检查是否已上传
if (@is_uploaded_file($tmp_name) === false) {
$this->alert("上传失败。");
}
//检查文件大小
if ($file_size > $max_size) {
$this->alert("上传文件大小超过".$alert_size."MB限制。");
}
//检查目录名
$dir_name = empty($_GET['dir']) ? 'image' : trim($_GET['dir']);
if (empty($ext_arr[$dir_name])) {
$this->alert("目录名不正确。");
}
//获得文件扩展名
$temp_arr = explode(".", $file_name);
$file_ext = array_pop($temp_arr);
$file_ext = trim($file_ext);
$file_ext = strtolower($file_ext);
//检查扩展名
if (in_array($file_ext, $ext_arr[$dir_name]) === false) {
$this->alert("上传文件扩展名是不允许的扩展名。\n只允许" . implode(",", $ext_arr[$dir_name]) . "格式。");
}
//创建文件夹
if ($dir_name !== '') {
$save_path .= $dir_name . "/";
$save_url .= $dir_name . "/";
if (!file_exists($save_path)) {
mkdir($save_path);
}
}
$ymd = date("Ymd");
$save_path .= $ymd . "/";
$save_url .= $ymd . "/";
if (!file_exists($save_path)) {
mkdir($save_path);
}
//新文件名
$new_file_name = $temp_arr[0].time() . '_' . rand(100, 999) . '.' . $file_ext;
//移动文件
//将文件名称转码
$new_file_name2=iconv('UTF-8', 'GBK', $new_file_name);
$file_path = $save_path . $new_file_name2;
if (move_uploaded_file($tmp_name, $file_path) === false) {
$this->alert("上传文件失败。");
}
@chmod($file_path, 0644);
$file_url = $save_url . $new_file_name;
header('Content-type: text/html; charset=UTF-8');
$json = new Services_JSON();
echo $json->encode(array('error' => 0, 'url' => $file_url));
exit;
}
}
private function alert($msg) {
header('Content-type: text/html; charset=UTF-8');
$json = new Services_JSON();
echo $json->encode(array('error' => 1, 'message' => $msg));
exit;
}
public function file_manager_json(){
import('ORG.Util.Services_JSON');
// $php_path = dirname(__FILE__) . '/';
// $php_url = dirname($_SERVER['PHP_SELF']) . '/';
$php_path = $this->php_path;
$php_url = $this->php_url;
//根目录路径,可以指定绝对路径,比如 /var/www/attached/
$root_path = $php_path . '/Uploads/';
//根目录URL,可以指定绝对路径,比如 http://www.yoursite.com/attached/
$root_url = $php_url . '/Uploads/';
//图片扩展名
$ext_arr = array('gif', 'jpg', 'jpeg', 'png', 'bmp');
//目录名
$dir_name = empty($_GET['dir']) ? '' : trim($_GET['dir']);
if (!in_array($dir_name, array('', 'image', 'flash', 'media', 'file'))) {
echo "Invalid Directory name.";
exit;
}
if ($dir_name !== '') {
$root_path .= $dir_name . "/";
$root_url .= $dir_name . "/";
if (!file_exists($root_path)) {
mkdir($root_path);
}
}
//根据path参数,设置各路径和URL
if (empty($_GET['path'])) {
$current_path = realpath($root_path) . '/';
$current_url = $root_url;
$current_dir_path = '';
$moveup_dir_path = '';
} else {
$current_path = realpath($root_path) . '/' . $_GET['path'];
$current_url = $root_url . $_GET['path'];
$current_dir_path = $_GET['path'];
$moveup_dir_path = preg_replace('/(.*?)[^\/]+\/$/', '$1', $current_dir_path);
}
echo realpath($root_path);
//排序形式,name or size or type
$order = empty($_GET['order']) ? 'name' : strtolower($_GET['order']);
//不允许使用..移动到上一级目录
if (preg_match('/\.\./', $current_path)) {
echo 'Access is not allowed.';
exit;
}
//最后一个字符不是/
if (!preg_match('/\/$/', $current_path)) {
echo 'Parameter is not valid.';
exit;
}
//目录不存在或不是目录
if (!file_exists($current_path) || !is_dir($current_path)) {
echo 'Directory does not exist.';
exit;
}
//遍历目录取得文件信息
$file_list = array();
if ($handle = opendir($current_path)) {
$i = 0;
while (false !== ($filename = readdir($handle))) {
if ($filename{0} == '.') continue;
$file = $current_path . $filename;
if (is_dir($file)) {
$file_list[$i]['is_dir'] = true; //是否文件夹
$file_list[$i]['has_file'] = (count(scandir($file)) > 2); //文件夹是否包含文件
$file_list[$i]['filesize'] = 0; //文件大小
$file_list[$i]['is_photo'] = false; //是否图片
$file_list[$i]['filetype'] = ''; //文件类别,用扩展名判断
} else {
$file_list[$i]['is_dir'] = false;
$file_list[$i]['has_file'] = false;
$file_list[$i]['filesize'] = filesize($file);
$file_list[$i]['dir_path'] = '';
$file_ext = strtolower(pathinfo($file, PATHINFO_EXTENSION));
$file_list[$i]['is_photo'] = in_array($file_ext, $ext_arr);
$file_list[$i]['filetype'] = $file_ext;
}
$file_list[$i]['filename'] = $filename; //文件名,包含扩展名
$file_list[$i]['datetime'] = date('Y-m-d H:i:s', filemtime($file)); //文件最后修改时间
$i++;
}
closedir($handle);
}
usort($file_list, 'cmp_func');
$result = array();
//相对于根目录的上一级目录
$result['moveup_dir_path'] = $moveup_dir_path;
//相对于根目录的当前目录
$result['current_dir_path'] = $current_dir_path;
//当前目录的URL
$result['current_url'] = $current_url;
//文件数
$result['total_count'] = count($file_list);
//文件列表数组
$result['file_list'] = $file_list;
//输出JSON字符串
header('Content-type: application/json; charset=UTF-8');
$json = new Services_JSON();
echo $json->encode($result);
}
//排序
private function cmp_func($a, $b) {
global $order;
if ($a['is_dir'] && !$b['is_dir']) {
return -1;
} else if (!$a['is_dir'] && $b['is_dir']) {
return 1;
} else {
if ($order == 'size') {
if ($a['filesize'] > $b['filesize']) {
return 1;
} else if ($a['filesize'] < $b['filesize']) {
return -1;
} else {
return 0;
}
} else if ($order == 'type') {
return strcmp($a['filetype'], $b['filetype']);
} else {
return strcmp($a['filename'], $b['filename']);
}
}
}
}
\ No newline at end of file \ No newline at end of file
<?php
Class PowerAction extends CommonAction{
public function _initialize()
{
parent::_initialize();
$authcategory=C('POWER_CATEGORY');
$this->assign('authcategory',$authcategory);
}
public function group()
{
$g=M('Authgroupf');
$order['id']='asc';
import('ORG.Util.Page');
$count = $g->count();
$pagenum=100;
$Page = new Page($count,$pagenum);
$nowPage = isset($_GET['p'])?$_GET['p']:0;
$lists=$g->order($order)->page($nowPage.','.$Page->listRows)->select();
foreach($lists as $k2 => $v2)
{
$lists[$k2]['rules']=explode(',',$v2['rules']);
}
$show = $Page->show();
$this->assign('page',$show);
$this->assign('lists',$lists);
//所有规则
$rules=$this->getRules();
foreach($rules as $k => $v)
{
$newrules[$v['id']]=$v['title'];
}
$this->assign('rules',$newrules);
$this->display();
}
/**
* 添加分组
**/
public function addgroup()
{
if($this->isPost())
{
$g=D('Authgroupf');
if($g->create())
{
foreach($g->rules as $k => $v)
{
$rules.=','.$v;
}
$g->rules=substr($rules,1);
$lastid=$g->add();
if($lastid)
$this->success('分组添加成功!',U('group'));
else
$this->error('分组添加失败!');
}
else
{
$this->error($g->getError());
}
}
else
{
$rules=$this->getRules();
$this->assign('rules',$rules);
$this->display();
}
}
/**
* 修改分组
**/
public function editgroup()
{
$g=D('Authgroupf');
if($this->isPost())
{
if($g->create())
{
foreach($g->rules as $k => $v)
{
$rules.=','.$v;
}
$g->rules=substr($rules,1);
$lastid=$g->save();
if($lastid)
$this->success('分组修改成功!',U('group'));
else
$this->error('分组修改失败!');
}
else
{
$this->error($g->getError());
}
}
else
{
//规则
$rules=$this->getRules();
$this->assign('rules',$rules);
//
$id=$this->_get('id');
$where['id']=array('eq',$id);
$data=$g->where($where)->find();
$this->assign('data',$data);
$this->display();
}
}
/**
* 删除分组
**/
public function delgroup()
{
if($this->del($this->_get('id'),'Authgroupf'))
$this->success('删除成功!',U('group'));
else
$this->error('删除失败!');
}
/**
* 获取所有规则/用户组
* 返回规则信息
* status=1 开启
**/
public function getRules($table='Authrulef',$field='title,status,id,catid')
{
$r=M($table);
if($table == 'Authrulef')
{
$order['catid']='asc';
$order['sort']='asc';
}
$order['id']='asc';
$where['status']=array('eq',1);
$data=$r->order($order)->field($field)->where($where)->select();
return $data;
}
/**
* 所有规则
**/
public function rules()
{
$r=M('Authrulef');
$order['catid']='asc';
$order['sort']='asc';
$order['id']='asc';
$where=array();
if(I('search')){
$where['catid']=array('eq',I('search'));
$this->assign('search',I('search'));
}
$field="";
$data = $this->_getLists($r,$where,$order,$field,12,'Pages3',array('header'=>'<li style="border:none;">共%totalRows%条记录','pages'=>'%nowPage%/%totalPages%页 </li>','prev'=>'<上一页','next'=>'下一页>','first'=>'首页','last'=>'尾页','theme'=>'%header% %pages% %prePage% %linkPage% %nextPage% %end%'));
$this->assign('lists',$data['list']?$data['list']:array()); //列表
$this->assign('page',$data['page']);
$this->assign('p',$data['p']);
$this->assign('empty','<tr><td colspan="15" style="padding-left:15px;font-size:14px;">暂无相关信息!</td></tr>');
$this->display();
}
/**
* 添加规则
**/
public function addrule()
{
if($this->isPost())
{
$r=D('Authrulef');
if(!$r->create())
{
$this->error($r->getError());
}
else
{
if(!$r->sort)
{
$m_where['catid']=array('eq',$r->catid);
$max=$r->where($m_where)->max('sort');
$r->sort=$max+1;
}
$lastid=$r->add();
if($lastid)
{
$this->success('规则添加成功',U('rules'));
}
else
{
$this->error('规则添加失败');
}
}
}
else
{
$this->display();
}
}
/**
* 修改规则
**/
public function editrule()
{
$r=D('Authrulef');
if($this->isPost())
{
if(!$r->create())
{
$this->error($r->getError());
}
else
{
$lastid=$r->save();
if($lastid)
{
$this->success('规则修改成功',U('rules',array('p'=>I('p'),'search'=>I('search'))));
}
else
{
$this->error('规则修改失败');
}
}
}
else
{
$where['id']=array('eq',$this->_get('id'));
$data=$r->where($where)->find();
$this->assign('data',$data);
$this->assign('p',I('p','1'));
$this->assign('search',I('search'));
$this->display();
}
}
/**
* 删除规则
**/
public function delrule()
{
if($this->del($this->_get('id')))
$this->success('删除成功!',U('rules',array('p'=>I('p'),'search'=>I('search'))));
else
$this->error('删除失败!');
}
/**
* 删除全部规则
**/
public function delallrule()
{
$table="Authrulef";
$ids=explode(',', $this->_get('id'));
foreach($ids as $key=>$vaule)
{
if(!$this->del($vaule,$table))
{
$this->error('部分信息删除失败');
}
}
$this->success('信息删除成功',U('rules'));
}
/**
* 修改规则
**/
public function changeSort()
{
$table=$this->_post('table');
$m=M($table);
$where['id']=array('eq',$this->_post('id'));
$f=$this->_post('f');
$data[$f]=$this->_post('val');
$count=$m->where($where)->data($data)->save();
if($count)
{
$msg['success']=true;
$msg['msg']=$this->_post('msg').'修改成功';
}
else
{
$msg['success']=false;
$msg['msg']=$this->_post('msg').'修改失败';
}
echo json_encode($msg);
}
/**
* 共公删除
* $table
**/
private function del($id,$table='Authrulef')
{
$a=M($table);
$where['id']=array('eq',$id);
$count=$a->where($where)->delete();
if($count)
return true;
else
return false;
}
/**
* 修改分组开启属性
**/
public function editattr()
{
$table=$this->_post('table');
$m=M($table);
$where['id']=array('eq',$this->_post('id'));
$data['status']=$this->_post('status');
$count=$m->where($where)->data($data)->save();
if($count)
{
$msg['success']=true;
$msg['msg']='状态已修改';
}
else
{
$msg['success']=false;
}
echo json_encode($msg);
}
/**
* 权限分配
* uid 用户id
* group_id 用户组id
**/
public function fenpei()
{
$m=M('Authgroupaccessf');
$order='id asc';
// $where['uid']=array('neq','1');
$list=$m->where($where)->order($order)->select();
if($list)
{
foreach($list as $k => $v)
{
$list[$k]['username']=$this->getClassName($v['uid'],'Webuser','username');
$list[$k]['group_id']=explode(',',$v['group_id']);
}
}
$this->assign('lists',$list);
// 所有用户组
$groups=$this->getRules('Authgroupf','title,id');
if($groups)
{
foreach($groups as $k2 => $v2)
{
$newgroups[$v2['id']]=$v2['title'];
}
}
$this->assign('groups',$newgroups);
$this->display();
}
/**
* 添加分配
*
**/
public function addfenpei()
{
if($this->isPost())
{
//查看会员是否已经分配用户组
if($this->checkfenpei($this->_post('uid'),'uid','Authgroupaccessf')) $this->error('会员已经分配角色');
//
$f=M('Authgroupaccessf');
if(!$f->create())
{
$this->error($f->getError());
}
else
{
/*foreach($f->group_id as $k => $v)
{
$group_id.=','.$v;
}
$f->group_id=substr($group_id,1);*/
$lastid=$f->add();
if($lastid)
$this->success('分配成功',U('fenpei'));
else
$this->error('分配失败');
}
}
else
{
//所有用户组
$groups=$this->getRules('Authgroupf','title,id');
$this->assign('groups',$groups);
//所有会员
$m=M('Webuser');
$order='id asc';
$where['id']=array('neq',1);
$admin=$m->field('username,id')->where($where)->order($order)->select();
$this->assign('admin',$admin);
$this->display();
}
}
/**
* 修改分配
*
**/
public function editfenpei()
{
$f=M('Authgroupaccessf');
if($this->isPost())
{
if(!$f->create())
{
$this->error($f->getError());
}
else
{
/*foreach($f->group_id as $k => $v)
{
$group_id.=','.$v;
}
$f->group_id=substr($group_id,1);*/
$lastid=$f->save();
if($lastid)
$this->success('分配成功',U('fenpei'));
else
$this->error('分配失败');
}
}
else
{
$where['id']=array('eq',$this->_get('id'));
$data=$f->where($where)->find();
$this->assign('data',$data);
//所有用户组
$groups=$this->getRules('Authgroupf','title,id');
$this->assign('groups',$groups);
//所有会员
$m=M('Webuser');
$order='id asc';
// $admin=$m->field('username,id')->order($order)->select();
$admin=$m->order($order)->getField('id,username');
$this->assign('admin',$admin);
$this->display();
}
}
/**
* 删除分配
*
**/
public function delfenpei(){
if($this->del($this->_get('id'),'Authgroupaccessf'))
$this->success('删除成功!',U('fenpei'));
else
$this->error('删除失败!');
}
/**
* 删除全部分配
**/
public function delallfenpei()
{
$table="Authgroupaccessf";
$ids=explode(',', $this->_get('id'));
foreach($ids as $key=>$vaule)
{
if(!$this->del($vaule,$table))
{
$this->error('部分信息删除失败');
}
}
$this->success('信息删除成功',U('fenpei'));
}
/**
* 查看是否已经分配
* $table 表名
* $field 字段名
* $id 传来的数值
**/
private function checkfenpei($id,$field,$table='Authgroupaccessf')
{
$m=M($table);
$where[$field]=array('eq',$id);
$count=$m->where($where)->count();
if($count)
return true;
else
return false;
}
/**
* 获取规则名称/会员名/用户组名......
* $id 分类id
* $table 表名
* $typename 字段名
**/
private function getClassName($id,$table='Authrulef',$field='title')
{
$data=M($table)->field($field)->where('id='.$id)->find();
return $data;
}
}
?>
\ No newline at end of file \ No newline at end of file
<?php
// 本类由系统自动生成,仅供测试用途
class PublicAction extends Action {
public $ADMIN_KEY='';
public function __construct() {
parent::__construct();
$this->ppFirewall();
$this->ADMIN_KEY=cookie('ADMIN_KEY');
}
public function login(){
$ADMIN_KEY=$this->ADMIN_KEY;
if (isset($ADMIN_KEY)) {
$this->redirect('Index/index');
}
if($this->isPost()){
if (empty($_POST['username'])) {
$this->error("帐号不可以为空!");
}else if (empty($_POST['password'])) {
$this->error("密码不可以为空!");
}else if(session('verify') != md5($_POST["verify"])) {
$this->error('验证码错误!');
}
$map['username']=$_POST["username"];
$map['password']=md5($_POST["password"]);
$admin = M('Admin')->where($map)->find();
if(empty($admin)){
$this->error("帐号不存在或者密码错误!");
}elseif($admin['isshow']==0){
$this->error("账号已被禁用!");
}else{
$pp_life_time=0;
cookie('ADMIN_KEY',$admin['id'],$pp_life_time);
cookie('ADMIN_NAME',$admin['name'],$pp_life_time);
cookie('LOGIN_TIME',time());
//获取用户权限
import('ORG.Util.Auth');//加载类库
$auth=new Auth();
$authlist=$auth->getAuthList($admin['id']);
cookie('pp_authlist',$authlist,$pp_life_time);
$Ad=M('Admin');
$Ad->ltime = time();
$Ad->lip = $_SERVER['REMOTE_ADDR'];
$Ad->where('id='.$admin['id'])->save(); // 根据条件保存修改的数据
$this->success("登录成功!",U('Index/index'));
//echo '<script>alert("当前用户未登录或登录超时,请重新登录");top.location.href="'.U('Public/login').'";</script>';
}
}else{
$this->display();
}
}
public function index(){
$this->redirect('Public/login');
}
//验证码类
public function verify() {
//ob_clean();
import ( "ORG.Util.Image" );
Image::buildImageVerify (4);
}
//防火墙验证
protected function ppFirewall(){
if(!$_COOKIE['pro_ppfirewall']){
header('Content-Type:text/html; charset=utf-8');
exit('您无权限操作');
}
}
}
\ No newline at end of file \ No newline at end of file
<?php
class RegAction extends CommonAction {
public $tab;
public $notDel;
public $jsArr;
public function __construct() {
parent::__construct();
$this->tab='Regfields';
$this->notDel=C('FIELDNOTDEL');
$this->jsArr=C('JSCOMPONENT');//js组件数组
}
public function index(){
$System=D($this->tab);
if($this->isPost()){
$_POST['name']=array2single($_POST['name'],true);
foreach($_POST['name'] as $k=>$v){
$arr_id=explode('_',$k);
// $data['rownum']=I('rownum_'.$arr_id[1]);
// $data['colnum']=I('colnum_'.$arr_id[1]);
$data['sort']=I('sort_'.$arr_id[1]);
$lastid=$System->where('id='.$arr_id[1])->save($data);
//$f=$this->addColumn($v,I('type_'.$arr_id[1]),I('description_'.$arr_id[1])); // wa_apply表添加不存在的字段
}
$this->success('字段信息更改成功',U('Reg/index'));
}else{
// $where['isshow']=array('eq',1);
$list=$System->order('sort asc,id asc')->select();
$this->assign('lists',$list);
$this->assign('notDel',$this->notDel);
$this->display();
}
}
/**
* 添加报名应填报信息
*/
public function add()
{
if($this->isPost()){
$Config=D($this->tab);
if($Config->create())
{
$field=$Config->name; //字段名
$type=$Config->type; //字段类型
$description=$Config->description.':'.$Config->note; //字段注释
$lastid=$Config->add();
if($lastid)
{
$f=$this->addColumn($field,$type,$description);// wa_apply表添加不存在的字段
$this->success('字段添加成功',U('Reg/index'));
}
else
$this->error('字段添加失败');
}
else
{
$this->error($Config->getError());
}
exit;
}
$this->assign('jsarr',$this->jsArr);
$this->display();
}
/**
* 修改学生申请应填写字段信息
*/
public function edit(){
$id=I('id');
if(!$id) exit('<script>alert("参数有误!");history.back();</script>');
$Config=D($this->tab);
if($this->isPost()){
if($Config->create())
{
$field=$Config->name; //字段名
$type=$Config->type; //字段类型
$description=$Config->description.':'.$Config->note; //字段注释
$lastid=$Config->save();
if($lastid)
{
$f=$this->editColumn($field,$type,$description);// wa_apply表添加不存在的字段
$this->success('字段修改成功',U('Reg/index'));
}
else
$this->error('字段修改失败');
}
else
{
$this->error($Config->getError());
}
exit;
}
$where['id']=array('eq',$id);
$fdata=$Config->where($where)->find();
$this->assign('fdata',$fdata);
$this->assign('jsarr',$this->jsArr);
$this->display();
}
public function delete(){
$m=M($this->tab);
if(!$id=(int)I('id')) exit('<script>alert("参数有误!");history.back();</script>');
$where['id']=array('eq',$id);
$name=$m->where($where)->getField('name');
if(in_array($name,$this->notDel)){
$this->error('该信息不可删除!');
exit;
}
if($name){
$r=$m->where($where)->delete(); //删除字段记录
if($r){
$this->deleteColumn($name); //删除wa_apply表中字段
$this->success('删除成功!',U('index'));
}else{
$this->error('删除失败!');
}
}else{
$this->error('信息不存在!');
}
}
/**
* 添加wa_apply表字段
* @param fieldName 字段名
* @param type 字段类型
* @param description 字段注释
*/
private function addColumn($fieldName,$type,$description){
//修改申请wa_apply表结构
import('ORG.Util.MysqlManage');
$mg=new MysqlManage();
$f=null;
if(!$mg->checkField('wa_apply',$fieldName)){ //判断字段是否存在
$info['name']=$fieldName;
$info=array_merge($info,$this->getExinfo($type,$description)); //获取字段信息 type length isNull default comment
$f=$mg->addField('wa_apply',$info);
}
unset($mg);
return $f;
}
/**
* 修改wa_apply表字段
* @param fieldName 字段名
* @param type 字段类型
* @param description 字段注释
*/
private function editColumn($fieldName,$type,$description){
//修改申请wa_apply表结构
import('ORG.Util.MysqlManage');
$mg=new MysqlManage();
$f=null;
$info['name']=$fieldName;
$info=array_merge($info,$this->getExinfo($type,$description)); //获取字段信息 type length isNull default comment
if($mg->checkField('wa_apply',$fieldName)){ //判断字段是否存在
$f=$mg->editField('wa_apply',$info); //存在修改
}else{
$f=$mg->addField('wa_apply',$info); //不存在添加
}
unset($mg);
return $f;
}
/**
* 删除wa_apply表字段
* @param fieldName 字段名
* @return bool
*/
private function deleteColumn($fieldName){
import('ORG.Util.MysqlManage');
$mg=new MysqlManage();
$f=true;
if($mg->checkField('wa_apply',$fieldName)){ //判断字段是否存在
$f=$mg->dropField('wa_apply',$fieldName); //删除字段
}
unset($mg);
return $f;
}
/**
* 获取字段信息 type length isNull default comment
* @param type 字段类型
* @param description 注释
*/
private function getExinfo($type,$description){
switch($type){
case 'string':
$info['type']='varchar';
$info['length']='300';
$info['isNull']=2; //是否为空 1为空,2不为空
$info['default']='""';
$info['comment']=$description;
break;
case 'bstring':
$info['type']='text';
$info['length']='';
$info['isNull']=1;
$info['default']='';
$info['comment']=$description;
break;
case 'bool':
$info['type']='tinyint';
$info['length']='1';
$info['isNull']=2;
$info['default']=0;
$info['comment']=$description;
break;
case 'number':
$info['type']='int';
$info['length']='11';
$info['isNull']=2;
$info['default']=0;
$info['comment']=$description;
break;
case 't_extarea':
$info['type']='text';
$info['length']='';
$info['isNull']=1;
$info['default']='';
$info['comment']=$description;
break;
case 's_elect':
$info['type']='varchar';
$info['length']='120';
$info['isNull']=2;
$info['default']='""';
$info['comment']=$description;
break;
case 'c_heckbox':
$info['type']='varchar';
$info['length']='120';
$info['isNull']=2;
$info['default']='""';
$info['comment']=$description;
break;
case 'r_adio':
$info['type']='varchar';
$info['length']='60';
$info['isNull']=2;
$info['default']='""';
$info['comment']=$description;
break;
}
return $info;
}
/**
* 字段状态修改
*/
public function Shenhe(){
$Article=M($this->tab);
$is=$Article->where('id='.$this->_param('id'))->getField('isshow');
if($is==1){
$isnew=0;
}else{
$isnew=1;
}
$aa=$Article->where('id='.$this->_param('id'))->setField('isshow',$isnew);
if($aa){ //更新成功
echo 1;
}else{
echo 0;
}
}
public function look(){
$id=I('id');
if(!intval($id)) exit('<script>alert("参数有误!");history.back();</script>');
$m=M($this->tab);
$where['id']=array('eq',$id);
$data=$m->where($where)->find();
$this->assign('data',$data);
$this->display();
}
}
\ No newline at end of file \ No newline at end of file
<?php
/*
*友情链接分类名称
*/
function LinkCatName($id){
$data=M('Linkscat')->where('id='.$id)->find();
return $data['name'];
}
function AdminNum($role){
$count=M('Admin')->where('role='.$role)->count();
return $count;
}
function GetTableName($id,$name='catname',$tab='Goodscat'){
$table=M($tab);
$data=$table->where('id='.$id)->find();
return $data[$name];
}
function isflag($arr){
$return='';
if($arr['thumb'])$return .='<span style="color:red">&nbsp;[图]&nbsp;</span>';
if($arr['flag']){
$flag=String2Array($arr['flag']);
if(in_array('h',$flag)) $return .='<span style="color:red">&nbsp;[热门]&nbsp;</span>';
if(in_array('c',$flag)) $return .='<span style="color:red">&nbsp;[推荐]&nbsp;</span>';
}
return $return;
}
/*
1、内容列表、2 内容单页、3 栏目主页、4 列表主页、5 单页主页、0 外部链接
*/
function catType($id){
switch ($id){
case 1:
$name='内容列表';break;
case 2:
$name='内容单页';break;
case 3:
$name='栏目主页';break;
case 4:
$name='列表主页';break;
case 5:
$name='单页主页';break;
case 0:
$name='外部链接';break;
default:
$name='';
}
return '<span style="color: #ccc;">'.$name.'</span>';
}
/**
* 左侧栏目导航
**/
function leftmenu($v)
{
if($v)
{
echo '<ul class="sitemu">';
foreach($v as $k => $v)
{
echo '<li>
<span class="pp_1"><a target="main" href="'.$v['url'].'">'.$v['name'].'</a></span>
<span class="pp_2">';
if($v['add'])
{
echo '<a href="'.$v['add'].'" target="main"><img src="'.__PUB__.'img/gtk-sadd.png" /></a>';
}
echo '</span>';
// 如果有子类
if($v['cmenulist'])
{
leftmenu($v['cmenulist']);
}
echo '</li>';
}
echo '</ul>';
}
}
/**
* 夏令营判断申请字段内容并输出
* @param type 字段类型
bstring 多行文本:几行几列
bool 布尔:1是0否
s_elect 下拉列表:默认值选择
c_heckbox 多选框:默认值选择
r_adio 单选框:默认值选择
string 文本
t_extarea 文本域
number 数字
* @param name 字段名称
* @param param array(val,row,col,ctitle) 默认选择值,行数,列数,列标题
* @param isdate 是否调用日期控件
* @param value 修改数据时已填写的数据
* @param istags 是否调标签控件
* @param isjs 是否调用JS控件
*/
function checkApply($type,$name,$param=array('val'=>'','row'=>1,'col'=>1,'ctitle'=>''),$isdate='0',$upfile='0',$value='',$istags='0',$isjs='0'){
if($param['val']) $vals=explode('#', $param['val']); //默认选择值
switch ($type) {
case 'bstring': //多行
$col=$param['col']?$param['col']:1;
$wid_per= floor(100/$col+1);
$str='<table width="99%" class="inner_table" style="border:1px solid #ddd;" >';
if($param['ctitle']){ //列标题
$ctitle=explode('#',$param['ctitle']);
$str.='<tr>';
foreach($ctitle as $k=>$v){
$str.='<td style="text-align:center; width:'.$wid_per.'%">'.$v.'</td>';
if($isdate && (strpos($v,'时间')!== false || strpos($v,'日期')!== false)) $datekey[]=$k+1; //多行匹配关键词时间、日期来调用日期控件
if($upfile && strpos($v,'上传')!== false) $upfilekey[]=$k+1; //多行匹配关键词上传来调用上传控件
}
$str.='<td></td></tr>';
}
// 修改时已填写数据
if($value) $value=json_decode($value,true);
$row = count($value) ? count($value) : 1;
$add_str=''; //+点击新增内容
for($i=0;$i<$row;$i++){
$str.='<tr class="d_pp">';
if($i == 0){ //+
$add_str.='<tr class=\'d_pp\'>';
}
for($ii = 1;$ii<=$col;$ii++){
$str.='<td style="text-align:center;" ><input ';
if($i == 0){ //+
$add_str.='<td style=\'text-align:center;\' ><input ';
}
if(in_array($ii,$upfilekey) && $upfile == '1'){
$str.='type="hidden"';
if($i == 0){ //+
$add_str.='type=\'hidden\'';
}
}else{
$str.='type="text"';
if($i == 0){ //+
$add_str.='type=\'text\'';
}
}
$str.=' name="'.$name.'['.$i.']['.$ii.']" value=" ';
if($i == 0){ //+
$add_str.=' name=\''.$name.'["+rownum+"]['.$ii.']\' value=\' ';
}
if($value) $str.=$value[$i][$ii];
$str.='"';
if($i == 0){ //+
$add_str.='\'';
}
if(in_array($ii,$datekey)){
$str.=' class="Wdate" onclick="WdatePicker()" />';
if($i == 0){ //+
$add_str.=' class=\'Wdate\' onclick=\'WdatePicker()\' />';
}
}elseif(in_array($ii,$upfilekey)){
if($upfile=='1') //上传图片
{
$str.=' class="fl" style="" readonly="readonly" id="'.$name.'_'.$i.'_'.$ii.'"/> <input style="height:22px; border: 1px solid #d3d6d7; " class="fl" type="button" value="上传图片" class="button" id="'.$name.'_'.$i.'_'.$ii.'fid" /><img id="'.$name.'_'.$i.'_'.$ii.'img" src="" class="fl" style="max-height:22px;display:none">';
if($i == 0){ //+
$add_str.=' class=\'fl\' style=\'\' readonly=\'readonly\' id=\''.$name.'_"+rownum+"_'.$ii.'\'/> <input style=\'height:22px; border: 1px solid #d3d6d7; \' class=\'fl\' type=\'button\' value=\'上传图片\' class=\'button\' id=\''.$name.'_"+rownum+"_'.$ii.'fid\' /><img id=\''.$name.'_"+rownum+"_'.$ii.'img\' src=\'\' class=\'fl\' style=\'max-height:22px;display:none\'>';
}
$str.="<script>
$(function(){
if($('#".$name.'_'.$i.'_'.$ii."').val().length > 0){
$('#".$name.'_'.$i.'_'.$ii."img').attr('src',$('#".$name.'_'.$i.'_'.$ii."').val());
$('#".$name.'_'.$i.'_'.$ii."img').css('display','inline-block');
}
});
KindEditor.ready(function(K) {
var editor = K.editor({
uploadJson : '/index.php?s=/Admin/Kind/upload_json.html',
fileManagerJson : '/index.php?s=/Admin/Kind/file_manager_json.html',
allowFileManager : true
});
K('#".$name.'_'.$i.'_'.$ii."fid').click(function() {
editor.loadPlugin('image', function() {
editor.plugin.imageDialog({
showRemote : false,
imageUrl : K('#".$name.'_'.$i.'_'.$ii."').val(),
clickFn : function(url, title, width, height, border, align) {
K('#".$name.'_'.$i.'_'.$ii."').val(url);
//document.getElementById('picida2').href=url;
var v=document.getElementById('".$name.'_'.$i.'_'.$ii."').value;
if(typeof(v) != 'undefined'){
document.getElementById('".$name.'_'.$i.'_'.$ii."img').src=v;
document.getElementById('".$name.'_'.$i.'_'.$ii."img').style.display='inline-block';
}else{
document.getElementById('".$name.'_'.$i.'_'.$ii."img').src='';
document.getElementById('".$name.'_'.$i.'_'.$ii."img').style.display='none';
}
editor.hideDialog();
}
});
});
});
// prettyPrint();
});
</script>";
if($i == 0){ //+
/*$add_str.='<script>
$(function(){
if($(\'#'.$name.'_"+rownum+"_'.$ii.'\').val().length > 0){
$(\'#'.$name.'_"+rownum+"_'.$ii.'img\').attr(\'src\',$(\'#'.$name.'_"+rownum+"_'.$ii.'\').val());
$(\'#'.$name.'_"+rownum+"_'.$ii.'img\').css(\'display\',\'inline-block\');
}
});
KindEditor.ready(function(K) {
var editor = K.editor({
uploadJson : \'/index.php?s=/Admin/Kind/upload_json.html\',
fileManagerJson : \'/index.php?s=/Admin/Kind/file_manager_json.html\',
allowFileManager : true
});
K(\'#'.$name.'_"+rownum+"_'.$ii.'fid\').click(function() {
editor.loadPlugin(\'image\', function() {
editor.plugin.imageDialog({
showRemote : false,
imageUrl : K(\'#'.$name.'_"+rownum+"_'.$ii.'\').val(),
clickFn : function(url, title, width, height, border, align) {
K(\'#'.$name.'_"+rownum+"_'.$ii.'\').val(url);
//document.getElementById(\'picida2\').href=url;
var v=document.getElementById(\''.$name.'_"+rownum+"_'.$ii.'\').value;
if(typeof(v) != \'undefined\'){
document.getElementById(\''.$name.'_"+rownum+"_'.$ii.'img\').src=v;
document.getElementById(\''.$name.'_"+rownum+"_'.$ii.'img\').style.display=\'inline-block\';
}else{
document.getElementById(\''.$name.'_"+rownum+"_'.$ii.'img\').src=\'\';
document.getElementById(\''.$name.'_"+rownum+"_'.$ii.'img\').style.display=\'none\';
}
editor.hideDialog();
}
});
});
});
// prettyPrint();
});
</script>';
*/ };
}else if($upfile=='2'){//上传文件
$str.=' class="fl" style="width:55%" readonly="readonly" id="'.$name.'_'.$i.'_'.$ii.'"/> <input class="fl" style="height:22px; border: 1px solid #d3d6d7;" type="button" value="上传文件" class="button" id="'.$name.'_'.$i.'_'.$ii.'fid" />';
if($i == 0){ //+
$add_str.=' class=\'fl\' style=\'width:55%\' readonly=\'readonly\' id=\''.$name.'_"+rownum+"_'.$ii.'\'/> <input class=\'fl\' style=\'height:22px; border: 1px solid #d3d6d7;\' type=\'button\' value=\'上传文件\' class=\'button\' id=\''.$name.'_"+rownum+"_'.$ii.'fid\' />';
}
$str.="<script>
KindEditor.ready(function(K) {
var editor = K.editor({
uploadJson : '/index.php?s=/Admin/Kind/upload_json.html',
fileManagerJson : '/index.php?s=/Admin/Kind/file_manager_json.html',
allowFileManager : true
});
K('#".$name.'_'.$i.'_'.$ii."fid').click(function(){
editor.loadPlugin('insertfile', function(){
editor.plugin.fileDialog({
fileUrl : K('#".$name.'_'.$i.'_'.$ii."').val(),
clickFn : function(url, title) {
K('#".$name.'_'.$i.'_'.$ii."').val(url);
editor.hideDialog();
}
});
});
});
// prettyPrint();
});
</script>";
if($i == 0){ //+
/*$add_str.='<script>
KindEditor.ready(function(K) {
var editor = K.editor({
uploadJson : \'/index.php?s=/Admin/Kind/upload_json.html\',
fileManagerJson : \'/index.php?s=/Admin/Kind/file_manager_json.html\',
allowFileManager : true
});
K(\'#'.$name.'_"+rownum+"_'.$ii.'fid\').click(function(){
editor.loadPlugin(\'insertfile\', function(){
editor.plugin.fileDialog({
fileUrl : K(\'#'.$name.'_"+rownum+"_'.$ii.'\').val(),
clickFn : function(url, title) {
K(\'#'.$name.'_"+rownum+"_'.$ii.'\').val(url);
editor.hideDialog();
}
});
});
});
});</script>';*/
}
}
}else{
$str.=' />';
if($i == 0){ //+
$add_str.=' />';
}
}
$str.='</td>';
if($i == 0){ //+
$add_str.='</td>';
}
}
if($i == 0){ //+
$str.='<td><span><a href=\'javascript:void(0);\' class=\'dv1\'>+</a></span></td></tr>';
$add_str.='<td><span><a href=\'javascript:void(0);\' class=\'dv2\'>-</a></span></td></tr>';
}else{
$str.='<td><span><a href=\'javascript:void(0);\' class=\'dv2\'>-</a></span></td></tr>';
}
}
$str.='</table>';
$str.= '<script type="text/javascript">
$(function(){
$(".table").delegate("a.dv1","click",function(){
var rownum=$(".d_pp").length + 1;
$(this).parent().parent().parent().parent().append("'.$add_str.'");
});
$(".table").delegate("a.dv2","click",function(){
$(this).parent().parent().parent().remove();
});
});
</script>';
unset($datekey,$wid_per,$add_str);
break;
case 's_elect': //下拉
if($isjs==1){//调用js 地区组件
$str.='<div data-toggle="distpicker" id="target">
<select id="'.$name.'" name="'.$name.'"></select>
<select id="'.$name.'2" name="'.$name.'2"></select>
<script>';
if($value){ //编辑
$cou_val=explode('-',$value);
$str.='$("#target").distpicker({
province: "'.$cou_val[0].'",
city: "'.$cou_val[1].'",
});';
}else{ //添加
$str.='$("#target").distpicker({
autoSelect: false
});';
}
$str.='</script>
</div>';
}else{
$str='<select name="'.$name.'">';
$str.='<option value="">请选择</option>';
if($vals){
foreach($vals as $v){
$str.='<option value="'.$v.'"';
if($value && $value==$v) $str.=' selected="selected"';
$str.=' />'.$v.'</option>';
}
}
$str.='</select>';
}
break;
case 'c_heckbox': //多选
$value = explode(',', $value);
if($vals){
foreach($vals as $v){
$str.='<input type="checkbox" name="'.$name.'[]" value="'.$v.'" ';
if($value && in_array($v,$value)) $str.=' checked="checked"';
$str.=' /> '.$v.' ';
}
}
break;
case 'r_adio': //单选
if($vals){
foreach($vals as $k => $v){
$str.='<input type="radio" name="'.$name.'" value="'.$v.'"';
if(!$value && $k==0)
$str.=' checked';
elseif($value && $value == $v)
$str.=' checked';
$str.=' /> '.$v.' ';
}
}
break;
case 'bool';
$str = '<input type="radio" name="'.$name.'" value="1" ';
if(($value && $value === 1) || !$value) $str.=' checked';
$str.=' /> 是 <input type="radio" name="'.$name.'" value="0"';
if($value && $value === 0) $str.=' checked';
$str.=' /> 否';
break;
case 't_extarea':
$str = '<textarea name="'.$name.'" style="width:80%;">'.$value.'</textarea>';
break;
case 'string':
$str = '<input type="text" name="'.$name.'" id="'.$name.'" value="'.$value.'" ';
if($isdate) { //日期控件
$str.=' class="Wdate" onclick="WdatePicker()" />';
}elseif($upfile){ //上传控件
if($upfile=='1') //上传图片
{
$str.=' readonly="readonly" /> <input style="width:70px !important; height:22px; border: 1px solid #d3d6d7; " class="fl" type="button" value="上传图片" class="button" id="'.$name.'fid" />';
$str.="<script>
KindEditor.ready(function(K) {
var editor = K.editor({
uploadJson : '/index.php?s=/Admin/Kind/upload_json.html',
fileManagerJson : '/index.php?s=/Admin/Kind/file_manager_json.html',
allowFileManager : true
});
K('#".$name."fid').click(function() {
editor.loadPlugin('image', function() {
editor.plugin.imageDialog({
showRemote : false,
imageUrl : K('#$name').val(),
clickFn : function(url, title, width, height, border, align) {
K('#$name').val(url);
//document.getElementById('picida2').href=url;
editor.hideDialog();
}
});
});
});
// prettyPrint();
});
</script>";
}
else if($upfile=='2')//上传文件
{
$str.=' readonly="readonly" /> <input class="fl" style="width:70px !important; height:22px; border: 1px solid #d3d6d7; " type="button" value="上传文件" class="button" id="'.$name.'fid" />';
$str.="<script>
KindEditor.ready(function(K) {
var editor = K.editor({
uploadJson : '/index.php?s=/Admin/Kind/upload_json.html',
fileManagerJson : '/index.php?s=/Admin/Kind/file_manager_json.html',
allowFileManager : true
});
K('#".$name."fid').click(function(){
editor.loadPlugin('insertfile', function(){
editor.plugin.fileDialog({
fileUrl : K('#$name').val(),
clickFn : function(url, title) {
K('#$name').val(url);
editor.hideDialog();
}
});
});
});
prettyPrint();
});
</script>";
}
}elseif($istags){
$str.=' />';
$str.='<input type="hidden" name="pptags[]" value="'.$name.'" />';
$str.='<script>
$(function () {
$("#'.$name.'").manifest();
});
</script>';
}else{
$str.=' />';
}
break;
default:
$str = '<input type="text" name="'.$name.'" value="'.$value.'" />';
break;
}
return $str;
}
/**
* 夏令营判断申请字段内容并输出 只给出结果(非from表单)
* @param type 字段类型
bstring 多行文本:几行几列
bool 布尔:1是0否
s_elect 下拉列表:默认值选择
c_heckbox 多选框:默认值选择
r_adio 单选框:默认值选择
string 文本
t_extarea 文本域
number 数字
* @param name 字段名称
* @param param array(val,row,col,ctitle) 默认选择值,行数,列数,列标题
* @param isdate 是否调用日期控件
* @param value 修改数据时已填写的数据
*/
function checkApply2($type,$name,$param=array('val'=>'','row'=>1,'col'=>1,'ctitle'=>''),$isdate='0',$value='',$upfile=''){
if($param['val']) $vals=explode('#', $param['val']); //默认选择值
switch ($type) {
case 'bstring': //多行
$col=$param['col']?$param['col']:1;
$str='<table width="99%" border="1" class="inner_table" style="border:1px solid #ddd;" >';
if($param['ctitle']){ //列标题
$ctitle=explode('#',$param['ctitle']);
$str.='<tr>';
foreach($ctitle as $k=>$v){
$str.='<td style="text-align:center;">'.$v.'</td>';
if($isdate && (strpos($v,'时间')!== false || strpos($v,'日期')!== false)) $datekey=$K+1; //多行匹配关键词时间、日期来调用日期控件
if($upfile && strpos($v,'上传')!== false) $upfilekey[]=$k+1; //多行匹配关键词上传来调用上传控件
}
$str.='</tr>';
}
// 修改时已填写数据
if($value){
$value=json_decode($value,true);
$row=count($value)?count($value):1;
for($i=0;$i<$row;$i++){
$str.='<tr>';
for($ii = 1;$ii<=$col;$ii++){
if(!$value[$i][$ii]) { continue; }//将值为空的数据排除掉
if(in_array($ii,$upfilekey)){
if($upfile == '1'){
$str.= $value[$i][$ii] ? '<td style="text-align:center"><div class="upimg"><img src="'.$value[$i][$ii].'" style="max-height:22px; max-width:100px; display:block; margin:0 auto;" /></div></td>' : '<td> </td>';
}elseif($upfile == '2'){
$str.= $value[$i][$ii] ? '<td style="text-align:center"><a href="'.$value[$i][$ii].'" target="_blank">下载文件</a></td>' : '<td> </td>';
}
}else{
$str.= $value[$i][$ii] ? '<td><p style="padding:0 5px;">'.$value[$i][$ii].'</p></td>' : '<td> </td>';
}
}
$str.='</tr>';
}
}
$str.='</table>';
break;
case 'bool';
if($value === 1) $str='是';
if($value === 0) $str='否';
break;
case 's_elect': //下拉
case 'c_heckbox': //多选
case 'r_adio': //单选
case 't_extarea':
case 'string':
default:
if($upfile == '1'){
$str = $value ? '<div class="upimg"><img src="'.$value.'" style="max-height:38px; max-width:100px;" /></div>' : ' ';
}elseif($upfile == '2'){
$str = $value ? '<a href="'.$value.'" target="_blank">下载文件</a>' : ' ';
}else{
$str = $value;
}
break;
}
return $str;
}
/**
* 判断报名字段的内容并检索输出(备注同上)
* @param desc 字段说明
* @param value 字段值
*/
function seachApply($type,$name,$param=array('val'=>'','row'=>1,'col'=>1,'ctitle'=>''),$isdate='0',$value='',$isjs='0'){
if($param['val']) $vals=explode('#', $param['val']); //默认选择值
switch ($type) {
case 'bstring': //多行
$row=$param['row']?$param['row']:1;
$col=$param['col']?$param['col']:1;
$str='<table width="99%" border="1" class="inner_table" style="border:1px solid #ddd;" >';
if($param['ctitle']){ //列标题
$ctitle=explode('#',$param['ctitle']);
$str.='<tr >';
foreach($ctitle as $k=>$v){
$str.='<td>'.$v.'</td>';
if($isdate && (strpos($v,'时间')!== false || strpos($v,'日期')!== false)) $datekey=$K+1; //多行匹配关键词时间、日期来调用日期控件
}
$str.='</tr>';
}
// 修改时已填写数据
if($value) $value=json_decode($value,true);
for($i=1;$i<=$row;$i++){
$str.='<tr > ';
for($ii = 1;$ii<=$col;$ii++){
$str.='<td><input type="text" name="'.$name.'['.$i.']['.$ii.']" value="';
if($value) $str.=$value[$i][$ii];
$str.='"';
if($ii == $datekey) $str.=' class="Wdate" onclick="WdatePicker()"';
$str.=' /></td>';
}
$str.='</tr>';
}
$str.='</table>';
break;
case 's_elect': //下拉
if($isjs==1){//调用js 地区组件
$str.='<div data-toggle="distpicker" id="target" style="display: inline-block;">
<select id="'.$name.'" name="'.$name.'"></select>
<select id="'.$name.'2" name="'.$name.'2"></select>
<script>';
if($value){ //编辑
$cou_val=explode('-',$value);
$str.='$("#target").distpicker({
province: "'.$cou_val[0].'",
city: "'.$cou_val[1].'",
});';
}else{ //添加
$str.='$("#target").distpicker({
autoSelect: false
});';
}
$str.='</script></div>';
}elseif($isjs==0){
$str='<select name="'.$name.'">';
$str.='<option value="">请选择</option>';
if($vals){
foreach($vals as $v){
$str.='<option value="'.$v.'"';
if($value && $value==$v) $str.=' selected="selected"';
$str.=' />'.$v.'</option>';
}
}
$str.='</select>';
}
break;
case 'r_adio': //单选
$str='<select name="'.$name.'">';
$str.='<option value="">请选择</option>';
if($vals){
foreach($vals as $v){
$str.='<option value="'.$v.'"';
if($value && $value==$v) $str.=' selected="selected"';
$str.=' />'.$v.'</option>';
}
}
$str.='</select>';
break;
case 'c_heckbox': //多选
if($vals){
foreach($vals as $v){
$str.='<input type="checkbox" name="'.$name.'[]" value="'.$v.'" ';
if($value && in_array($v,$value)) $str.=' checked="checked"';
$str.=' /> '.$v.' ';
}
}
break;
/*case 'r_adio': //单选
if($vals){
foreach($vals as $k => $v){
$str.='<input type="radio" name="'.$name.'" value="'.$v.'"';
if(!$value && $k == 0)
$str.=' checked';
elseif($value && $value == $v)
$str.=' checked';
$str.=' /> '.$v.' ';
}
}
break;*/
case 'bool';
$str = '<input type="radio" name="'.$name.'" value="1" ';
if(($value && $value === 1) || !$value) $str.=' checked';
$str.=' /> 是 <input type="radio" name="'.$name.'" value="0"';
if($value && $value === 0) $str.=' checked';
$str.=' /> 否';
break;
case 't_extarea':
$str = '<textarea name="'.$name.'" style="width:80%;">'.$value.'</textarea>';
break;
case 'string':
$str = '<input type="text" name="'.$name.'" value="'.$value.'" ';
if($isdate) { $str.=' class="Wdate" onclick="WdatePicker()" />';
}else{ $str.=' class="w_160" />';}
break;
default:
$str = '<input type="text" name="'.$name.'" value="'.$value.'" />';
break;
}
return $str.'&nbsp;&nbsp;';
}
/**
* 根据status1,status2,status3值来判断用户状态,并返回操作链接地址及名称
* @param array $vo $vo=array('status1','status2','status3','id')
* @param int $sumid 夏令营id
* @param int $p 页数
* @return array 链接及名称
*/
/*function doStatus($vo,$sumid,$p=1){
if($vo['status1'] == 1 && $vo['status2'] == 1 && $vo['status3'] == 1){
$do['url']='';
$do['name']='已录取';
$do['name2']='已发待录取邀请';
switch($vo['status3_ac']){
case '1':
$do['ac']='拒绝';
break;
case '2':
$do['ac']='接受';
default:
$do['ac']=Null;
}
}elseif($vo['status1'] == 1 && $vo['status2'] == 1 && !$vo['status3']){
$do['url']='luqu';
$do['name']='待录取';
$do['name2']='已发参营邀请';
switch($vo['status2_ac']){
case '1':
$do['ac']='拒绝';
break;
case '2':
$do['ac']='接受';
default:
$do['ac']=Null;
}
}elseif($vo['status1'] == 1 && !$vo['status2'] && !$vo['status3']){
$do['url']='canying';
$do['name']='确定参营';
$do['name2']='已入备选库';
}elseif(!$vo['status1'] && !$vo['status2'] && !$vo['status3']){
$do['url']='beixuan';
$do['name']='备选';
}
if($do['url'])
$do['url']=U($do["url"],array('id'=>$vo['id'],'sumid'=>$sumid,'page'=>$p));
else
$do['url']=null;
return $do;
}*/
/**
* 根据ACTION_NAME,status1,status2,status3值来判断用户状态,并返回操作链接地址及名称
* @param array $vo $vo=array('status1','status2','status3','id')
* @param int $sumid 夏令营id
* @param string $action action_name
* @param int $p 页数
* @return array 链接及名称
*/
function doStatus($vo,$sumid,$action,$p=1){
switch($action){
case 'operate':
if($vo['status1'] == 1){
$do['url']='';
$do['name']='已入备选库';
}elseif(!$vo['status1']){
$do['url']='beixuan';
$do['name']='备选';
}
break;
case 'operate2':
if($vo['status2'] == 1){
$do['url']='';
$do['name']='已发参营邀请';
if($vo['status2_ac'] == 1){
$do['ac']='拒绝';
$do['url2']='canying';
}elseif($vo['status2_ac'] == 2){
$do['ac']='接受';
}
}else{
$do['url']='canying';
$do['name']='确定参营';
}
break;
case 'operate3':
if($vo['status3'] == 1){
$do['url']='';
$do['name']='已发待录取邀请';
if($vo['status3_ac'] == 1){
$do['ac']='拒绝';
$do['url2']='luqu';
}elseif($vo['status3_ac'] == 2){
$do['ac']='接受';
}
}else{
$do['url']='luqu';
$do['name']='待录取';
}
break;
case 'operate4':
$do['url']='';
$do['name']='录取';
break;
}
$do['action'] = $action;
if($do['url']){
$do['url']=U($do["url"],array('id'=>$vo['id'],'sumid'=>$sumid,'page'=>$p));
}else{
$do['url']=null;
}
$do['url2']=$do['url2']?U($do["url2"],array('id'=>$vo['id'],'sumid'=>$sumid,'page'=>$p,'doagin'=>'yes')):null; //再次邀请
return $do;
}
/**
* menu权限判断
* @param $arr menu列表(控制器-方法)
*/
function doMenuPower($arr,$authlist){
$arr=array_map('strtolower',$arr);
$first=false;
foreach($arr as $k => $v){
if(in_array($v,$authlist)){
$second[$k]=true;
$first=true;
}else{
$second[$k]=false;
}
}
$r=array('first'=>$first,'second'=>$second);
return $r;
}
\ No newline at end of file \ No newline at end of file
<?php
/*
*友情链接分类名称
*/
function LinkCatName($id){
$data=M('Linkscat')->where('id='.$id)->find();
return $data['name'];
}
function AdminNum($role){
$count=M('Admin')->where('role='.$role)->count();
return $count;
}
function GetTableName($id,$name='catname',$tab='Goodscat'){
$table=M($tab);
$data=$table->where('id='.$id)->find();
return $data[$name];
}
function isflag($arr){
$return='';
if($arr['thumb'])$return .='<span style="color:red">&nbsp;[图]&nbsp;</span>';
if($arr['flag']){
$flag=String2Array($arr['flag']);
if(in_array('h',$flag)) $return .='<span style="color:red">&nbsp;[热门]&nbsp;</span>';
if(in_array('c',$flag)) $return .='<span style="color:red">&nbsp;[推荐]&nbsp;</span>';
}
return $return;
}
/*
1、内容列表、2 内容单页、3 栏目主页、4 列表主页、5 单页主页、0 外部链接
*/
function catType($id){
switch ($id){
case 1:
$name='内容列表';break;
case 2:
$name='内容单页';break;
case 3:
$name='栏目主页';break;
case 4:
$name='列表主页';break;
case 5:
$name='单页主页';break;
case 0:
$name='外部链接';break;
default:
$name='';
}
return '<span style="color: #ccc;">'.$name.'</span>';
}
/**
* 左侧栏目导航
**/
function leftmenu($v)
{
if($v)
{
echo '<ul class="sitemu">';
foreach($v as $k => $v)
{
echo '<li>
<span class="pp_1"><a target="main" href="'.$v['url'].'">'.$v['name'].'</a></span>
<span class="pp_2">';
if($v['add'])
{
echo '<a href="'.$v['add'].'" target="main"><img src="'.__PUB__.'img/gtk-sadd.png" /></a>';
}
echo '</span>';
// 如果有子类
if($v['cmenulist'])
{
leftmenu($v['cmenulist']);
}
echo '</li>';
}
echo '</ul>';
}
}
/**
* 夏令营判断申请字段内容并输出
* @param type 字段类型
bstring 多行文本:几行几列
bool 布尔:1是0否
s_elect 下拉列表:默认值选择
c_heckbox 多选框:默认值选择
r_adio 单选框:默认值选择
string 文本
t_extarea 文本域
number 数字
* @param name 字段名称
* @param param array(val,row,col,ctitle) 默认选择值,行数,列数,列标题
* @param isdate 是否调用日期控件
* @param value 修改数据时已填写的数据
*/
function checkApply($type,$name,$param=array('val'=>'','row'=>1,'col'=>1,'ctitle'=>''),$isdate='0',$value=''){
if($param['val']) $vals=explode('#', $param['val']); //默认选择值
switch ($type) {
case 'bstring': //多行
$row=$param['row']?$param['row']:1;
$col=$param['col']?$param['col']:1;
$str='<table>';
if($param['ctitle']){ //列标题
$ctitle=explode('#',$param['ctitle']);
$str.='<tr>';
foreach($ctitle as $k=>$v){
$str.='<td>'.$v.'</td>';
if($isdate && (strpos($v,'时间')!== false || strpos($v,'日期')!== false)) $datekey=$K+1; //多行匹配关键词时间、日期来调用日期控件
}
$str.='</tr>';
}
// 修改时已填写数据
if($value) $value=json_decode($value,true);
for($i=1;$i<=$row;$i++){
$str.='<tr>';
for($ii = 1;$ii<=$col;$ii++){
$str.='<td><input type="text" name="'.$name.'['.$i.']['.$ii.']" value="';
if($value) $str.=$value[$i][$ii];
$str.='"';
if($ii == $datekey) $str.=' class="Wdate" onclick="WdatePicker()"';
$str.=' /></td>';
}
$str.='</tr>';
}
$str.='</table>';
break;
case 's_elect': //下拉
$str='<select name="'.$name.'">';
$str.='<option value="">请选择</option>';
if($vals){
foreach($vals as $v){
$str.='<option value="'.$v.'"';
if($value && $value==$v) $str.=' selected="selected"';
$str.=' />'.$v.'</option>';
}
}
$str.='</select>';
break;
case 'c_heckbox': //多选
if($vals){
foreach($vals as $v){
$str.='<input type="checkbox" name="'.$name.'" value="'.$v.'" ';
if($value && $value==$v) $str.=' checked="checked"';
$str.=' /> '.$v.' ';
}
}
break;
case 'r_adio': //单选
if($vals){
foreach($vals as $k => $v){
$str.='<input type="radio" name="'.$name.'" value="'.$v.'"';
if(!$value && $k == 0)
$str.=' checked';
elseif($value && $value == $v)
$str.=' checked';
$str.=' /> '.$v.' ';
}
}
break;
case 'bool';
$str = '<input type="radio" name="'.$name.'" value="1" ';
if(($value && $value === 1) || !$value) $str.=' checked';
$str.=' /> 是 <input type="radio" name="'.$name.'" value="0"';
if($value && $value === 0) $str.=' checked';
$str.=' /> 否';
break;
case 't_extarea':
$str = '<textarea name="'.$name.'" style="width:80%;">'.$value.'</textarea>';
break;
case 'string':
$str = '<input type="text" name="'.$name.'" value="'.$value.'" ';
if($isdate) $str.=' class="Wdate" onclick="WdatePicker()"';
$str.=' />';
break;
default:
$str = '<input type="text" name="'.$name.'" value="'.$value.'" />';
break;
}
return $str;
}
/**
* 夏令营判断申请字段内容并输出 只给出结果(非from表单)
* @param type 字段类型
bstring 多行文本:几行几列
bool 布尔:1是0否
s_elect 下拉列表:默认值选择
c_heckbox 多选框:默认值选择
r_adio 单选框:默认值选择
string 文本
t_extarea 文本域
number 数字
* @param name 字段名称
* @param param array(val,row,col,ctitle) 默认选择值,行数,列数,列标题
* @param isdate 是否调用日期控件
* @param value 修改数据时已填写的数据
*/
function checkApply2($type,$name,$param=array('val'=>'','row'=>1,'col'=>1,'ctitle'=>''),$isdate='0',$value='',$upfile=''){
if($param['val']) $vals=explode('#', $param['val']); //默认选择值
switch ($type) {
case 'bstring': //多行
$row=$param['row']?$param['row']:1;
$col=$param['col']?$param['col']:1;
$str='<table>';
if($param['ctitle']){ //列标题
$ctitle=explode('#',$param['ctitle']);
$str.='<tr>';
foreach($ctitle as $k=>$v){
$str.='<td>'.$v.'</td>';
if($isdate && (strpos($v,'时间')!== false || strpos($v,'日期')!== false)) $datekey=$K+1; //多行匹配关键词时间、日期来调用日期控件
}
$str.='</tr>';
}
// 修改时已填写数据
if($value) $value=json_decode($value,true);
for($i=1;$i<=$row;$i++){
$str.='<tr>';
for($ii = 1;$ii<=$col;$ii++){
$str.='<td>'.$value[$i][$ii].'</td>';
}
$str.='</tr>';
}
$str.='</table>';
break;
case 'bool';
if($value === 1) $str='是';
if($value === 0) $str='否';
break;
case 's_elect': //下拉
case 'c_heckbox': //多选
case 'r_adio': //单选
case 't_extarea':
case 'string':
default:
if($upfile == '1'){
$str = $value ? '<div class="upimg"><img src="'.$value.'" /></div>' : ' ';
}elseif($upfile == '2'){
$str = $value ? '<a href="'.$value.'" target="_blank">下载文件</a>' : ' ';
}else{
$str = $value;
}
break;
}
return $str;
}
/**
* 根据status1,status2,status3值来判断用户状态,并返回操作链接地址及名称
* @param array $vo $vo=array('status1','status2','status3','id')
* @param int $sumid 夏令营id
* @param int $p 页数
* @return array 链接及名称
*/
/*function doStatus($vo,$sumid,$p=1){
if($vo['status1'] == 1 && $vo['status2'] == 1 && $vo['status3'] == 1){
$do['url']='';
$do['name']='已录取';
$do['name2']='已发待录取邀请';
switch($vo['status3_ac']){
case '1':
$do['ac']='拒绝';
break;
case '2':
$do['ac']='接受';
default:
$do['ac']=Null;
}
}elseif($vo['status1'] == 1 && $vo['status2'] == 1 && !$vo['status3']){
$do['url']='luqu';
$do['name']='待录取';
$do['name2']='已发参营邀请';
switch($vo['status2_ac']){
case '1':
$do['ac']='拒绝';
break;
case '2':
$do['ac']='接受';
default:
$do['ac']=Null;
}
}elseif($vo['status1'] == 1 && !$vo['status2'] && !$vo['status3']){
$do['url']='canying';
$do['name']='确定参营';
$do['name2']='已入备选库';
}elseif(!$vo['status1'] && !$vo['status2'] && !$vo['status3']){
$do['url']='beixuan';
$do['name']='备选';
}
if($do['url'])
$do['url']=U($do["url"],array('id'=>$vo['id'],'sumid'=>$sumid,'page'=>$p));
else
$do['url']=null;
return $do;
}*/
/**
* 根据ACTION_NAME,status1,status2,status3值来判断用户状态,并返回操作链接地址及名称
* @param array $vo $vo=array('status1','status2','status3','id')
* @param int $sumid 夏令营id
* @param string $action action_name
* @param int $p 页数
* @return array 链接及名称
*/
function doStatus($vo,$sumid,$action,$p=1){
switch($action){
case 'operate':
if($vo['status1'] == 1){
$do['url']='';
$do['name']='已入备选库';
}elseif(!$vo['status1']){
$do['url']='beixuan';
$do['name']='备选';
}
break;
case 'operate2':
if($vo['status2'] == 1){
$do['url']='';
$do['name']='已发参营邀请';
if($vo['status2_ac'] == 1){
$do['ac']='拒绝';
$do['url2']='canying';
}elseif($vo['status2_ac'] == 2){
$do['ac']='接受';
}
}else{
$do['url']='canying';
$do['name']='确定参营';
}
break;
case 'operate3':
if($vo['status3'] == 1){
$do['url']='';
$do['name']='已发待录取邀请';
if($vo['status3_ac'] == 1){
$do['ac']='拒绝';
$do['url2']='luqu';
}elseif($vo['status3_ac'] == 2){
$do['ac']='接受';
}
}else{
$do['url']='luqu';
$do['name']='待录取';
}
break;
case 'operate4':
$do['url']='';
$do['name']='录取';
break;
}
$do['action'] = $action;
if($do['url']){
$do['url']=U($do["url"],array('id'=>$vo['id'],'sumid'=>$sumid,'page'=>$p));
}else{
$do['url']=null;
}
$do['url2']=$do['url2']?U($do["url2"],array('id'=>$vo['id'],'sumid'=>$sumid,'page'=>$p,'doagin'=>'yes')):null; //再次邀请
return $do;
}
/**
* menu权限判断
* @param $m_suf 数字后辍
* @param $arr menu列表(控制器-方法)
*/
function doMenuPower($arr,$m_suf){
${m.$m_suf}=array_map('strtolower',$arr);
${s_m.$m_suf}=false;
foreach(${m.$m_suf} as $k => $v){
if(in_array($v,cookie('pp_authlist'))){
${nm.$m_suf}[$k]=true;
${s_m.$m_suf}=true;
}else{
${nm.$m_suf}[$k]=false;
}
}
$r=array(${s_m.$m_suf},${nm.$m_suf});
return $r;
}
\ No newline at end of file \ No newline at end of file
<?php
return array(
'VAR_FILTERS'=>'htmlspecialchars',
// 'TOKEN_ON'=>true,
// 'TOKEN_NAME'=>'__hash__',
// 'TOKEN_TYPE'=>'md5',
// 'TOKEN_RESET'=>true,
'AUTH_CONFIG'=>array(
'AUTH_ON' => true, //认证开关
'AUTH_TYPE' => 1, // 认证方式,1为时时认证;2为登录认证。
'AUTH_GROUP' => 'wa_authgroup', //用户组数据表名
'AUTH_GROUP_ACCESS' => 'wa_authgroupaccess', //用户组明细表
'AUTH_RULE' => 'wa_authrule', //权限规则表
'AUTH_USER' => 'wa_admin'//用户信息表
),
'TMPL_PARSE_STRING' =>array(
'__PUB__'=>__ROOT__.'/Public/Admin/',
'__ROOTPUB__'=>__ROOT__.'/Public/',
),
/* Cookie设置 */
'COOKIE_EXPIRE' => 0, // Coodie有效期
'COOKIE_DOMAIN' => '', // Cookie有效域名
'COOKIE_PATH' => '/', // Cookie路径
'COOKIE_PREFIX' => 'wyHoutai_', // Cookie前缀 避免冲突
'SESSION_PREFIX' => 'wyHoutai_', // session 前缀
'DEFAULT_MODULE' => 'Public',
// 'TMPL_L_DELIM' => '<{', //修改左定界符
// 'TMPL_R_DELIM' => '}>', //修改右定界符
'CFG_CONf' =>'./Public/',
'AUTH_CATEGORY' =>array(
// '1' => '单页',
// '2' => '列表',
// '3' => '友情链接',
// '4' => '留言',
// '5' => '广告',
// '6' => '栏目',
'7' => '系统操作',
'8' => '用户',
'9' => '权限',
'10' => '前台用户权限',
'11' => '数据字段管理',
'12' => '资料管理',
),
'POWER_CATEGORY' =>array(
'1' => '个人信息管理',
'2' => '资料审核管理',
'3' => '资料检索',
'4' => '资料填报管理',
'5' => '通讯录管理',
'6' => '通知公告管理',
'7' => '用户管理',
'8' => '权限管理',
'9' => '资料展示管理',
),
'FIELDNOTDEL' => array('title'), //字段管理 不能删除的字段
);
\ No newline at end of file \ No newline at end of file
<?php
Class AdminModel extends Model{
//自动完成
protected $_auto = array (
array('addtime','time',3,'function'),// 新增 对time字段在新增的时候写入当前时间戳ltime
array('ltime','time',1,'function'),
array('lip','GETip',1,'callback'),
array('updatatime','time',3,'function'), // 新增和修改 对optime字段 写入当前时间戳
array('password','md5Pwd',3,'callback') , //新增 对password字段在新增的时候使md5函数处理
array('password2','md5Pwd',3,'callback') , //新增 对repassword在新增和修改的时候使md5函数处理 用于验证两次密码是否输入一致
);
//自动验证
protected $_validate =array(
array('username','require','登录账号不能为空',0,'',3), //新增和修改栏目 栏目必须选择
array('username','checkUsername','登录账号已经存在!',0,'callback',3), // 在新增的时候验证name字段是否唯一
array('name','require','姓名必须填写',0,'',3), //新增和修改标题 标题必须填写
array('password','require','密码不能为空',0,'',1), //
array('password','/^.{5,}$/','密码必须5位数以上',0,'regex',1), //新增和修改用户 密码必须5位数以上
array('password','/^.{5,}$/','密码必须5位数以上',2,'regex',2), //新增和修改用户 密码必须5位数以上
array('password2','password','两次密码不一致',0,'confirm',3), //新增和修改用户 确认密码不正确
array('role','require','请选择角色',0,'',3),
);
protected function GETip(){
return $_SERVER['REMOTE_ADDR'];
}
//检测 登录账号是否存在
protected function checkUsername($val){
$m=M('Admin');
$map['username'] = array('eq',$val);
if($id = I('id',0,'intval')){
$map['id'] = array('neq',$id);
}
$r=$m->where($map)->count();
if($r){
return false;
}else{
return true;
}
}
//密码 md5加密
protected function md5Pwd($pwd){
if($pwd){
return md5($pwd);
}else{
return null;
}
}
}
\ No newline at end of file \ No newline at end of file
<?php
Class AdverModel extends Model{
//自动完成
protected $_auto = array (
array('addtime','time',3,'function'),// 新增 对time字段在新增的时候写入当前时间戳
array('updatatime','time',3,'function'), // 新增和修改 对optime字段 写入当前时间戳
array('aid','getUid',1,'callback'), // 新增 对uid字段在新增的时候写入当前用户id
array('url','getUrl',3,'callback'),
);
//自动验证
protected $_validate =array(
array('cid','require','请选择栏目',0,'',3), //新增和修改栏目 栏目必须选择
array('name','require','名称必须填写',0,'',3), //新增和修改标题 标题必须填写、
//array('title','checkTitle','标题已经存在',0,'callback',1), //新增标题 标题是否存在
);
protected function getUid(){
return cookie('ADMIN_KEY');
}
protected function getUrl($url){
return 'http://'.ltrim($url,'http://');
}
}
?>
\ No newline at end of file \ No newline at end of file
<?php
Class AdverViewModel extends ViewModel{
public $viewFields = array(
'Adver'=>array('id','cid','aid','name','url','logo','isshow','addtime','sort'),
'Adver_category'=>array('catname', '_type'=>'left','_on'=>'Adver.cid=Adver_category.id'),
'Admin'=>array('name'=>'aname', '_on'=>'Adver.aid=Admin.id'),
);
}
?>
\ No newline at end of file \ No newline at end of file
<?php
Class Adver_categoryModel extends CommonModel
{
//自动完成
protected $_auto = array (
array('addtime','time',1,'function'), // 新增 写入当前时间戳
array('updatetime','time',3,'function'), //新增和修改 操作时间
);
//自动验证
protected $_validate =array(
array('catname','require','分类名称必须填写',0,'',3), //新增和修改分类 分类名称必须填写
array('chicun','require','尺寸说明必须填写',0,'',3),
);
}
?>
\ No newline at end of file \ No newline at end of file
<?php
Class ApplyViewModel extends ViewModel{
public $viewFields = array(
'Apply'=>array('id','name','uid','sex','native','birth','idnumber','political','mobile','email','school','college','major','language','appproject','appproject2','addtime','status1','status2','status2_ac','status3','status3_ac','entnum','cet_6','_type'=>'left',),
'School'=>array('name'=>'shoolname','_on'=>'Apply.school=School.name'),
);
}
\ No newline at end of file \ No newline at end of file
<?php
Class ArticleModel extends Model{
//自动完成
protected $_auto = array (
array('addtime','time',1,'function'),// 新增 对time字段在新增的时候写入当前时间戳
// array('uid','getUid',1,'callback'), // 新增 对uid字段在新增的时候写入当前用户id
array('updatatime','time',3,'function'), // 新增和修改 对optime字段 写入当前时间戳
array('aid','getUid',1,'callback'), // 新增 对uid字段在新增的时候写入当前用户id
);
//自动验证
protected $_validate =array(
array('tid','require','请选择栏目',0,'',3), //新增和修改栏目 栏目必须选择
array('title','require','标题必须填写',0,'',3), //新增和修改标题 标题必须填写、
//array('title','checkTitle','标题已经存在',0,'callback',1), //新增标题 标题是否存在
);
protected function getUid(){
return cookie('ADMIN_KEY');
}
}
?>
\ No newline at end of file \ No newline at end of file
<?php
Class ArticleViewModel extends ViewModel{
public $viewFields = array(
'Article'=>array('id','tid','aid','uid','title','description','keywords','flag','thumb','content','addtime','onclick','sort','isshow','file','img'),
'Category'=>array('catname', '_type'=>'left','catename','_on'=>'Article.tid=Category.id'),
'Admin'=>array('name', '_on'=>'Article.aid=Admin.id'),
);
}
?>
\ No newline at end of file \ No newline at end of file
<?php
Class AuthgroupfModel extends Model{
//自动完成
protected $_auto = array (
);
//自动验证
protected $_validate =array(
array('title','require','角色名称不能为空',0,'',3),
array('grade','/^[1-9]+$/','等级数请输入大于0的数字!',0,'regex',3),
array('grade','checkGrade','该等级的角色已经存在,请确认',0,'callback',3),
array('rules','checkRule','请选择规则!',1,'callback',3),
);
/**
* 验证 规则不能为空
*/
protected function checkRule(){
$rules = I('rules');
if($rules){
return true;
}else{
return false;
}
}
/**
* 验证 等级是否已经存在
*/
protected function checkGrade($grade){
$m = M('Authgroupf');
$map['grade'] = array('eq',$grade);
if($id = I('id',0,'intval')){
$map['id'] = array('neq',$id);
}
$data = $m->where($map)->find();
if($data){
return false;
}else{
return true;
}
}
}
\ No newline at end of file \ No newline at end of file
<?php
Class AuthruleModel extends Model{
//自动完成
protected $_auto = array (
// array('addtime','time',1,'function'),// 新增 对time字段在新增的时候写入当前时间戳
// array('uid','getUid',1,'callback'), // 新增 对uid字段在新增的时候写入当前用户id
// array('updatatime','time',3,'function'), // 新增和修改 对optime字段 写入当前时间戳
);
//自动验证
protected $_validate =array(
array('catid','require','请选择分类',0,'',3), //新增和修改栏目 栏目必须选择
array('title','require','规则名称不能为空',0,'',3), //新增和修改标题 标题必须填写、
//array('title','checkTitle','标题已经存在',0,'callback',1), //新增标题 标题是否存在
array('name','require','规则内容不能为空',0,'',3),
);
protected function getUid(){
return session('ADMIN_KEY');
}
}
?>
\ No newline at end of file \ No newline at end of file
<?php
Class CategoryModel extends CommonModel
{
//自动完成
protected $_auto = array (
array('addtime','time',1,'function'), // 新增 写入当前时间戳
array('updatetime','time',3,'function'), //新增和修改 操作时间
);
//自动验证
protected $_validate =array(
array('catname','require','栏目名称必须填写',0,'',3), //新增和修改栏目 栏目名称必须填写
array('type','require','请选择栏目类型',0,'',3), //新增和修改栏目 栏目标识必须填写
array('upid','require','请选择父栏目',0,'',3),
// array('module_name','require','模块名称必须填写',0,'',3),
// array('action_name','require','方法名称必须填写',0,'',3),
);
}
?>
\ No newline at end of file \ No newline at end of file
<?php
Class CommonModel extends Model
{
protected $pp_m=''; //M('table')
public function _initialize()
{
$this->pp_m=M($this->getModelName());
}
private $icon = array('&nbsp;&nbsp;│', '&nbsp;&nbsp;├ ', '&nbsp;&nbsp;└ '); //格式化的字符
/**
* $upid 上级id
* $is 是否显示当前id
* $condition 筛选条件 必须是数组
* $orderby 排序字符串
* $space 默认为空
**/
public function getList( $upid = 0, $space = "",$orderby = 'sort asc,id asc',$condition = NULL,$is=0) {
if($is==0 && $upid!=0){
$a=$this->pp_m->where('id='.$upid)->select();
foreach($a as $k=>$v){
$a[$k]['tname']=$v['catname'];
}
$all=$this->search_List($upid,$space='&nbsp;&nbsp;',$orderby,$condition,$table);
$all=array_merge($a,$all);
}else{
$all=$this->search_List($upid,$space,$orderby,$condition,$table);
}
return $all;
}
/**
* $condition 查询条件(数组)
* orderby 排序方式
* topid 顶级id
**/
private function search_List($topid = 0, $space = "",$orderby = 'sort asc,id asc',$condition = NULL)
{
$childs = $this->getChild($topid,$orderby,$condition);//查询该栏目下面的所有子栏目
$n = count($childs);
if($n){//有子栏目
$m=1;
for($i=0;$i<$n;$i++){
if($n==$m){//只有一个子栏目/最后一个栏目
$pre = $this->icon[2];
}else{
$pre = $this->icon[1];
$pad = $space ? $this->icon[0] : "";
}
$childs[$i]['tname']=($space ? $space.$pre : "").$childs[$i]['catname'];
$cat_all[]=$childs[$i];
$cat_bbb=$this->search_List($childs[$i]['id'], $space.$pad."&nbsp;&nbsp;",$orderby,$condition); //递归下一级分类
//return $cat_bbb;
if(count($cat_bbb)){//包含子栏目 合并
$cat_all=array_merge($cat_all,$cat_bbb);
}
$m++;
}
return $cat_all;
}else{
return array();;
}
}
/**
* 获取$upid的所有子分类
* @param $condition 条件
* @param $upid 父级id
* @param $orderby 排序
**/
public function getChild($upid = 0,$orderby = 'sort asc,id asc',$condition = null)
{
$condition['upid']=array('eq',$upid);
$childs=$this->pp_m->where($condition)->order($orderby)->select();
return $childs;
}
}
?>
\ No newline at end of file \ No newline at end of file
<?php
Class LinksModel extends Model{
//自动完成
protected $_auto = array (
array('addtime','time',3,'function'),// 新增 对time字段在新增的时候写入当前时间戳
array('updatatime','time',3,'function'), // 新增和修改 对optime字段 写入当前时间戳
array('aid','getUid',1,'callback'), // 新增 对uid字段在新增的时候写入当前用户id
);
//自动验证
protected $_validate =array(
array('name','require','关键词必须填写',0,'',3), //新增和修改标题 标题必须填写、
//array('title','checkTitle','标题已经存在',0,'callback',1), //新增标题 标题是否存在
);
protected function getUid(){
return session('ADMIN_KEY');
}
}
?>
\ No newline at end of file \ No newline at end of file
<?php
Class RegfieldsModel extends Model{
protected $_auto = array (
array('optime','time',1,'function'), // 新增 对regtime字段在新增的时候写入当前时间戳
array('sort','maxSort',1,'callback'), // 新增 对regtime字段在新增的时候写入当前时间戳
array('d_value','doDvalue',3,'callback'), // 新增
array('width1','intval',3,'function'),
array('width2','intval',3,'function'),
array('width3','intval',3,'function'),
);
protected $_validate =array(
array('name','require','字段名必须填写',0,'',1), //新增 变量名必须填写
array('name','checkName','字段名已经存在',0,'callback',1),//新增 变量名是否存在
array('description','require','字段说明必须填写',0,'',3), //新增 参数说明必须填写
);
protected function checkName($configname)
{
$Config=M('Regfields');
$where['name']=$configname;
if(I('id')) $where['id']=array('neq',I('id'));
$count=$Config->where($where)->count();
if($count>0)
return false;
else
return ture;
}
protected function maxSort()
{
$Config=M('Regfields');
$sort=$Config->Max('sort');
return $sort+1;
}
protected function doDvalue($f){ //处理字段默认值
$val=implode('#',array_filter($f));
return $val;
}
}
\ No newline at end of file \ No newline at end of file
<?php
Class SchoolModel extends Model{
//自动完成
protected $_auto = array (
array('name','trim',3,'function'),
array('addtime','time',1,'function'),
// array('firstname','getFname',3,'callback'),
);
//自动验证
protected $_validate =array(
array('name','require','学校名称不能为空',0,'',3),
array('name','checkOnly','学校已存在,请确认',0,'callback',3),
array('firstname','require','学校名称首字母不能为空',0,'',3),
);
protected function getFname(){ //获取名称第一个字母
$f=pinyin1(trim(I('name')));
return $f;
}
protected function checkOnly($name){
$where['name']=array('eq',$name);
if(I('id')) $where['id']=array('neq',I('id'));
$r=M('School')->field('id')->where($where)->find();
if($r)
return false;
else
return true;
}
}
\ No newline at end of file \ No newline at end of file
<?php
Class SummerModel extends Model{
//自动完成
protected $_auto = array (
array('addtime','time',1,'function'),// 新增 对time字段在新增的时候写入当前时间戳
array('updatetime','time',3,'function'), // 新增和修改 对optime字段 写入当前时间戳
array('aid','getUid',1,'callback'), // 新增 对aid字段在新增的时候写入当前用户id
array('sid','getSchool',1,'callback'), // 新增 对aid字段在新增的时候写入当前用户id
array('rfields','getRfields',3,'callback'),
array('starttime','strtotime',3,'function'),
array('endtime','strtotime',3,'function'),
);
//自动验证
protected $_validate =array(
array('year','checkYear','该年份夏令营信息已经存在',0,'callback',3),
array('title','require','夏令营名称必须填写',0,'',3), //新增和修改标题 标题必须填写、
array('starttime','require','申请起始时间不能为空',0,'',3),
array('endtime','require','申请结束时间不能为空',0,'',3),
array('content','require','夏令营内容必须填写',0,'',3),
array('rfields','checkRfields','申请应填信息不能为空',1,'callback',3),
);
protected function checkRfields($rfields)//检验 申请应填信息
{
if($rfields){
$back = true;
}else{
$back = false;
}
return $back;
}
protected function getRfields($rfields){ //申请填写字段合并
$r=implode(',',$rfields);
return $r;
}
protected function getUid(){ //发布人id(后台管理人)
return cookie('ADMIN_KEY');
}
protected function getSchool(){ //夏令营所关联的学院id
return cookie('ADMIN_SCHOOL');
}
protected function checkYear($year){
$m=M('Summer');
$where['year']=array('eq',$year);
if(I('id')) $where['id']=array('neq',I('id'));
$data=$m->field('id')->where($where)->find();
if($data)
return false;
else
return true;
}
}
\ No newline at end of file \ No newline at end of file
<?php
Class SummerViewModel extends ViewModel{
public $viewFields = array(
'Summer'=>array('id','aid','sid','year','title','description','keywords','thumb','imgs','file','content','starttime','endtime','addtime','updatetime','isshow','rfields','_type'=>'left',),
'Admin'=>array('name','_on'=>'Summer.aid=Admin.id'),
);
}
?>
\ No newline at end of file \ No newline at end of file
<?php
Class SystemModel extends Model{
protected $_auto = array (
array('optime','time',1,'function'), // 新增 对regtime字段在新增的时候写入当前时间戳
);
protected $_validate =array(
array('cfg','require','变量名必须填写',0,'',1), //新增 变量名必须填写
array('name','require','参数说明必须填写',0,'',1), //新增 参数说明必须填写
array('cfg','checkName','变量名已经存在',0,'callback',1),//新增 变量名是否存在
);
protected function checkName($configname)
{
$Config=M('Config');
$where['cfg']=$configname;
$count=$Config->where($where)->count();
if($count>0)
return false;
else
return ture;
}
protected function maxSort()
{
$Config=M('Config');
$where['cfg']=$configname;
$sort=$Config->where($where)->Max('sort');
return $sort+1;
}
}
?>
\ No newline at end of file \ No newline at end of file
<?php
Class TmpemailModel extends Model{
//自动完成
protected $_auto = array (
array('addtime','time',1,'function'),// 新增 对time字段在新增的时候写入当前时间戳
);
//自动验证
protected $_validate =array(
array('title','require','标题不能为空',0,'',3), //新增和修改标题 标题必须填写、
array('content','require','内容不能为空',0,'',3),
);
}
\ No newline at end of file \ No newline at end of file
<?php
Class WebuserModel extends Model{
//自动完成
protected $_auto = array (
// array('pid','getPid',1,'callback'),// 新增
);
//自动验证
protected $_validate =array(
array('email','require','邮箱不能为空',0,'',3),
array('email','checkEmail','邮箱已被注册使用',0,'callback',3),
array('name','require','姓名不能为空',0,'',3),
array('native','require','籍贯不能为空',0,'',3),
array('political','require','政治面貌不能为空',0,'',3),
array('birth','require','出生日期不能为空',0,'',3),
array('idnumber','require','身份证号不能为空',0,'',3),
array('idnumber','checkId','请输入正确格式的身份证号',0,'callback',3),
array('mobile','require','手机不能为空',0,'',3),
array('school','require','所在学校不能为空',0,'',3),
array('address','require','政审和录取通知书发放详细地址不能为空',0,'',3),
// array('tele','checkTel','电话或手机必须填写其中一个',0,'callback',3),
);
protected function checkId($idcard){ //验证身份证
if(strlen($idcard) < 15)
return false;
else
return true;
}
protected function checkEmail($email){ //检测邮箱是否注册
$where['email'] = array('eq',$email);
if(I('id')) $where['id'] = array('neq',I('id'));
$data=M('Webuser')->where($where)->find();
if($data)
return false;
else
return true;
}
}
\ No newline at end of file \ No newline at end of file
<?php
Class XueyuanModel extends Model{
//自动完成
protected $_auto = array (
array('addtime','time',1,'function'),
array('updatetime','time',2,'function'),
array('firstname','getFname',3,'callback'),
);
//自动验证
protected $_validate =array(
array('name','require','学院名称不能为空',0,'',3),
);
protected function getFname(){ //获取名称第一个字母
$f=pinyin1(trim(I('name')));
return $f;
}
}
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<form name="form" action="" method="post">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="2" style="padding-left:10px;">
<div style="float:left">
<b>添加管理员</b>
</div>
<div style="float:right">
[<a href="<{:U('index')}>"><u>返回列表</u></a>]
</div>
</td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">登录账号:</font></td>
<td class="bline"><input name="username" type="text" id="username" size="30" class="iptxt"></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">姓名:</font></td>
<td class="bline"><input name="name" type="text" id="name" size="30" class="iptxt"></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right">密码:</td>
<td class="bline"><input name="password" type="password" id="password" size="30" class="iptxt"></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right">确认密码:</td>
<td class="bline"><input name="password2" type="password" id="password2" size="30" class="iptxt"></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right">电话:</td>
<td class="bline"><input name="tel" type="text" id="tel" size="30" class="iptxt"></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right">邮箱:</td>
<td class="bline"><input name="email" type="email" id="email" size="30" class="iptxt"></td>
</tr>
<tr><td colspan="2" style="text-align:center">
<input name="domain" type="submit" style=" background:url(__PUB__img/button_save.gif); width:60px; height:22px; border:0" value=" ">
&nbsp;&nbsp;&nbsp;<a href="javascript:history.go(-1);"><img src="__PUB__img/button_back.gif" width="60" height="22" border="0"></a></td></tr>
</tbody></table>
<input type="hidden" name="school" value="1" />
</form>
</div>
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>角色管理</title>
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
</head>
<body background='__PUBLIC__/images/frame/allbg.gif' leftmargin='8' topmargin='8'>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#D6D6D6">
<tr>
<td height="19" background="__PUBLIC__/images/frame/tbg.gif" bgcolor="#E7E7E7">
<table width="96%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td style="padding-left:10px;"><b><strong>添加用户组</strong></b> </td>
<td align="right"><b><strong><a href="<{:U('group')}>">返回用户组列表</a></strong></b> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="215" align="center" valign="top" bgcolor="#FFFFFF">
<form name="group" action="__ACTION__" method="post">
<table width="98%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td height="30" width="10%"><span class='red'>*</span>用户组名称:</td>
<td class="p_left">
<input name="title" type="text" size="16" style="width:300px" value='' onblur="input_check('title');"/> &nbsp;
</td>
</tr>
<tr>
<td height="30"><span class='red'>*</span>是否启用:</td>
<td class="p_left">
<input type="radio" name="status" value="1" checked="checked" /> 启用 &nbsp; <input type="radio" name="status" value="0" /> 关闭
</td>
</tr>
<tr>
<td height="30"><span class='red'>*</span>规则:</td>
<td class="p_left">
<php>$empty='<a href="'.U('addrule').'">无规则,请先添加规则</a>';</php>
<volist name="rules" id="v" empty="$empty">
<input name="rules[]" type="checkbox" value='<{$v.id}>' onclick="checkbox_check('rules[]');"/> <{$v.title}> &nbsp;
</volist>
</td>
</tr>
<tr>
<td height="60">&nbsp;</td>
<td>
<input type="submit" name="submit" value=" 保存信息 " class="coolbg np" />
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>|后台管理系统</title>
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/node.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.form.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.custom.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<table class="table table-condensed table-bordered">
<tbody><tr>
<td colspan="11" style="padding-left:10px;">
<div style="float:left">
<b>节点列表</b>
</div>
<div style="float:right">
[<!--a href=""><u>增加应用</u></a-->]
</div>
</td>
</tr>
<tr>
<td>
<div class="app">
<div class="title">
<div class="pull-left"><i class="icon-th-large"></i> 功能授权</div>
</div>
<volist name="data" id="v">
<div class="action">
<div class="title">
<div class="pull-left"><i class="icon-th"></i><{$v.key}></div></div>
<volist name="v['list']" id="vo">
<div class="method">
<div><input name="check" type="checkbox" value="<{$vo.id}>" <if condition="$vo['is'] eq 1"> checked</if>><{$vo.title}>[<{$vo.name}>]</div>
</div>
</volist>
</div>
</volist>
</div>
</td>
</tr>
</tbody></table>
</div>
</body></html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<form name="form" action="" method="post">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="2" style="padding-left:10px;">
<div style="float:left">
<b>添加管理员</b>
</div>
<div style="float:right">
[<a href="<{:U('index')}>"><u>返回列表</u></a>]
</div>
</td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">登录账号:</font></td>
<td class="bline"><input name="username" type="text" id="username" size="30" class="iptxt" value="<{$data.username}>"></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">姓名:</font></td>
<td class="bline"><input name="name" type="text" id="name" size="30" class="iptxt" value="<{$data.name}>"></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right">密码:</td>
<td class="bline"><input name="password" type="password" id="password" size="30" class="iptxt"></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right">确认密码:</td>
<td class="bline"><input name="password2" type="password" id="password2" size="30" class="iptxt"></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right">电话:</td>
<td class="bline"><input name="tel" type="text" id="tel" size="30" class="iptxt" value="<{$data.tel}>"></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right">邮箱:</td>
<td class="bline"><input name="email" type="email" id="email" size="30" class="iptxt" value="<{$data.email}>"></td>
</tr>
<tr><td colspan="2" style="text-align:center">
<input name="id" type="hidden" id="id" size="30" class="iptxt" value="<{$data.id}>">
<input name="domain" type="submit" style=" background:url(__PUB__img/button_save.gif); width:60px; height:22px; border:0" value=" ">
&nbsp;&nbsp;&nbsp;<a href="javascript:history.go(-1);"><img src="__PUB__img/button_back.gif" width="60" height="22" border="0"></a></td></tr>
</tbody></table>
<input type="hidden" name="school" value="<{$data['school']}>" />
</form>
</div>
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>修改用户组</title>
<load href="__PUBLIC__/Css/base.css" />
<load href='__PUBLIC__/Js/jquery.js'/>
<load href='__PUBLIC__/Js/pp_check.js'/>
</head>
<body background='__PUBLIC__/images/frame/allbg.gif' leftmargin='8' topmargin='8'>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#D6D6D6">
<tr>
<td height="19" background="__PUBLIC__/images/frame/tbg.gif" bgcolor="#E7E7E7">
<table width="96%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td style="padding-left:10px;"><b><strong>修改用户组</strong></b> </td>
<td align="right"><b><strong><a href="<{:U('group')}>">返回用户组列表</a></strong></b> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="215" align="center" valign="top" bgcolor="#FFFFFF">
<form name="group" action="__ACTION__" method="post">
<table width="98%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td height="30" width="10%"><span class='red'>*</span>用户组名称:</td>
<td class="p_left">
<input name="title" type="text" size="16" style="width:300px" value='<{$data.title}>' onblur="input_check('title');"/> &nbsp;
</td>
</tr>
<tr>
<td height="30"><span class='red'>*</span>是否启用:</td>
<td class="p_left">
<input type="radio" name="status" value="1" <eq name="data.status" value="1">checked="checked"</eq> /> 启用 &nbsp; <input type="radio" name="status" value="0" <eq name="data.status" value="0">checked="checked"</eq> /> 关闭
</td>
</tr>
<tr>
<td height="30"><span class='red'>*</span>规则:</td>
<td class="p_left">
<php>$empty='<a href="'.U('addrule').'">无规则,请先添加规则</a>';</php>
<volist name="rules" id="v" empty="$empty">
<input name="rules[]" type="checkbox" value='<{$v.id}>' <in name="v.id" value="$data.rules">checked="checked"</in> onclick="checkbox_check('rules[]');"/> <{$v.title}> &nbsp;
</volist>
</td>
</tr>
<tr>
<td height="60">&nbsp;</td>
<td>
<input type="submit" name="submit" value=" 保存信息 " class="coolbg np" />
<input type="hidden" name="id" value="<{$data.id}>" />
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>管理员|后台管理系统</title>
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<script>
/* 修改信息属性 */
function chang_status(id,value,table,f)
{
var newvalue=0;
if(value == 1)
newvalue=0;
else
newvalue=1;
var submitData = {
id:id,
f:f,
status:newvalue,
table:table
};
$.post("<{:U('editattr')}>",submitData,
function(data) {
if (data.success == true) {
alert(data.msg);
setTimeout('window.location.href=location.href',10);
return;
}
else {
alert(data.msg);
return;
}
}
,'json');
}
</script>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="9" style="padding-left:10px;">
<div style="float:left">
<b>管理员列表</b>
</div>
<div style="float:right">
[<a href="<{:U('add')}>"><u>增加管理员</u></a>]
</div>
</td>
</tr>
<tr>
<td width="5%" style="text-align:center">序号</td>
<td width="12%" style="text-align:center">登录账号</td>
<td width="12%" style="text-align:center">姓名</td>
<td width="12" style="text-align:center">电话</td>
<td width="12%" style="text-align:center">邮箱</td>
<td width="12%" style="text-align:center">最后一次登录时间</td>
<td width="12%" style="text-align:center">最后一次登录IP</td>
<td width="7%" style="text-align:center">状态</td>
<td width="15%" style="text-align:center">操作项</td>
</tr>
<volist name="lists" id="vo" key="k">
<tr>
<td style="text-align:center"><{$k}></td>
<td style="text-align:center"><{$vo.username}></td>
<td style="text-align:center"><{$vo.name}></td>
<td style="text-align:center"><{$vo.tel}></td>
<td style="text-align:center"><{$vo.email}></td>
<td style="text-align:center"><{$vo.ltime|date='Y-m-d',###}></td>
<td style="text-align:center"><{$vo.lip}></td>
<td style="text-align:center">
<a href="javascript:chang_status(<{$vo.id}>,<{$vo.isshow}>,'Admin','isshow');"><eq name="vo.isshow" value="1"><i class="icon-ok" var="<{$vo.id}>"></i><else /><i class="icon-no" var="<{$vo.id}>"></i></eq></a>
</td>
<td style="text-align:center">
<a href="<{:U('edit',array('id'=>$vo['id']))}>" class="btn btn-mini"><i class="icon-edit"></i> 修改</a>
<a href="javascript:void(0);" onclick="del2('<{:U('delete',array('id'=>$vo['id'],'p'=>I('p',1,'intval')))}>','确定要删除信息吗?删除后无法恢复');" class="btn btn-mini"><i class="icon-trash"></i> 删除</a>
</td>
</tr>
</volist>
</tbody></table>
</div>
</body></html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>管理员|后台管理系统</title>
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="5" style="padding-left:10px;">
<div style="float:left">
<b>角色管理</b>
</div>
<div style="float:right">
[<a href="<{:U('roleadd')}>"><u>增加角色</u></a>]
</div>
</td>
</tr>
<tr>
<td width="4%" style="text-align:center">排序</td>
<td width="25%" style="text-align:center">角色名称</td>
<td width="15%" style="text-align:center">管理员数量</td>
<td width="10%" style="text-align:center">状态</td>
<td style="text-align:center">操作项</td>
</tr>
<volist name="lists" id="vo" key="k">
<tr>
<td style="text-align:center"><{$k}></td>
<td style="text-align:center"><{$vo.name}></td>
<td style="text-align:center"><{$vo.id|AdminNum}></td>
<td style="text-align:center">
<a href="<{:U('roleshow',array('tid'=>I('tid'),'id'=>$vo['id'],'p'=>I('p')))}>" class="btn btn-mini">
<if condition="$vo['isshow'] eq 1 ">
<i class="icon-ok"></i>
<else />
<i class="icon-no"></i>
</if>
</a>
</td>
<td style="text-align:center">
<a href="<{:U('auth',array('id'=>$vo['id']))}>" class="btn btn-mini"><i class="icon-edit"></i> 功能授权</a>
<a href="<{:U('authcat',array('id'=>$vo['id']))}>" class="btn btn-mini"><i class="icon-edit"></i> 内容授权</a>
<a href="<{:U('roleedit',array('id'=>$vo['id']))}>" class="btn btn-mini"><i class="icon-edit"></i> 编辑</a>
<a href="<{:U('delete',array('id'=>$vo['id']))}>" class="btn btn-mini"><i class="icon-trash"></i> 删除</a>
</td>
</tr>
</volist>
</tbody></table>
</div>
</body></html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<form name="form" action="" method="post">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="2" style="padding-left:10px;">
<div style="float:left">
<b>添角色员</b>
</div>
<div style="float:right">
[<a href="<{:U('role')}>"><u>返回列表</u></a>]
</div>
</td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">角色名称:</font></td>
<td class="bline"><input name="title" type="text" id="title" size="30" class="iptxt"></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right">排序:</td>
<td class="bline"><input name="sort" type="text" id="sort" size="30" class="iptxt"></td>
</tr>
<tr><td colspan="2" style="text-align:center">
<input name="domain" type="submit" style=" background:url(__PUB__img/button_save.gif); width:60px; height:22px; border:0" value=" ">
&nbsp;&nbsp;&nbsp;<a href="javascript:history.go(-1);"><img src="__PUB__img/button_back.gif" width="60" height="22" border="0"></a></td></tr>
</tbody></table>
</form>
</div>
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<form name="form" action="" method="post">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="2" style="padding-left:10px;">
<div style="float:left">
<b>添角色员</b>
</div>
<div style="float:right">
[<a href="<{:U('role')}>"><u>返回列表</u></a>]
</div>
</td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">角色名称:</font></td>
<td class="bline"><input name="name" type="text" id="name" size="30" class="iptxt" value="<{$data.name}>"></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right">排序:</td>
<td class="bline"><input name="sort" type="text" id="sort" size="30" class="iptxt" value="<{$data.sort}>"></td>
</tr>
<tr><td colspan="2" style="text-align:center">
<input name="id" type="hidden" value="<{$data.id}>">
<input name="domain" type="submit" style=" background:url(__PUB__img/button_save.gif); width:60px; height:22px; border:0" value=" ">
&nbsp;&nbsp;&nbsp;<a href="javascript:history.go(-1);"><img src="__PUB__img/button_back.gif" width="60" height="22" border="0"></a></td></tr>
</tbody></table>
</form>
</div>
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<link rel="stylesheet" href="__ROOTPUB__kindeditor/themes/default/default.css" />
<script charset="utf-8" src="__ROOTPUB__kindeditor/kindeditor-min.js"></script>
<script charset="utf-8" src="__ROOTPUB__kindeditor/lang/zh_CN.js"></script>
<script>
var editor;
KindEditor.ready(function(K) {
editor = K.create('textarea[name="content"]', {
resizeType : 1,
allowPreviewEmoticons : false,
allowImageUpload : false,
filterMode: false,//是否开启过滤模式
items : [
'source','|','fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
'insertunorderedlist'],
afterBlur: function(){
this.sync();//假如没有这一句,获取到的id为content的值空白
}
});
prettyPrint();
});
</script>
<style>
input{color:#000!important;}
.pp_emails p{display:inline-block;padding:0px; margin:0px; padding-right:20px; line-height:28px;}
.pp_emails div button{color:#000;}
</style>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<form name="form" action="" method="post">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="2" style="padding-left:10px;">
<div style="float:left">
<b><{$webtitle}></b>
</div>
<div style="float:right">
[<a href="<{$back_url}>"><u>返回列表</u></a>]
</div>
</td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right; width:200px;"><font color="red">姓名:</font></td>
<td class="bline"><{$info.name}></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">Email:</font></td>
<td class="bline"><{$info.email}></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">请选择Email模板:</font></td>
<td class="bline pp_emails">
<div><button type="button" onclick='location.href="<{:U('Email/index')}>";'>Email模板管理</button></div>
<volist name="emails" id="v" key="k">
<p><input type="radio" name="pp_type" value="<{$v.id}>" /><{$v.title}></p>
</volist>
</td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">标题:</font></td>
<td class="bline"><input name="title" type="text" style="width:80%"></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">内容:</font></td>
<td class="bline"><textarea name="content" style="width:80%;" rows="2" id="content"></textarea></td>
</tr>
<tr><td colspan="2" style="text-align:center">
<input name="domain" type="submit" style=" background:url(__PUB__img/button_save.gif); width:60px; height:22px; border:0" value=" ">
&nbsp;&nbsp;&nbsp;<a href="javascript:history.go(-1);"><img src="__PUB__img/button_back.gif" width="60" height="22" border="0"></a></td></tr>
</tbody></table>
<input type="hidden" name="sumid" value="<{$sumid}>" />
<input type="hidden" name="p" value="<{$p}>" />
<input type="hidden" name="id" value="<{$info.id}>" />
<if condition="I('doagin') eq 'yes'"><input type="hidden" name="doagin" value="yes" /></if>
</form>
</div>
</body>
<script>
$(function(){
getTmp();
$('.pp_emails p :input').click(function(){
getTmp();
});
});
function getTmp(){
var $a = $('.pp_emails p :input:checked');
if(typeof($a.val()) != 'undefined'){
var vali={
'id' : $a.val(),
};
$.post('<{:U('Email/getTmpInfo')}>',vali,function(data){
if(typeof(data['suc']) != 'undefined'){
if(data['suc']){
$(':input[name="title"]').val(data['msg']['title']);
$(document.getElementsByTagName('iframe')[0].contentWindow.document.body).html(data['msg']['content']);
}else{
alert(data['msg']);
}
}
},'json');
}
}
</script>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>列表|后台管理系统</title>
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<style>
#colid1 {
font-family: "宋体";
}
.table tr td{line-height:150% !important;}
.bline span{display:inline-block;padding:5px 0; width:22%; padding-right:3%; vertical-align: top;}
.bline span.cle_right{padding-right:0;}
</style>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<form action="<{:U('download')}>" method="post" target="_blank">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="12" style="padding-left:10px;">
<div style="padding-top:10px; overflow:hidden">
<div style="float:left;">
<b><{$web_title}></b>
</div>
<div style="float:right">[<a href="<{:U($action)}>">返回列表</a>]</div>
</div>
</td>
</tr>
<tr>
<td style="text-align:right; width:10%;"><font color="red">请选择下载信息:</font></td>
<td class="bline">
<div style="padding-top:8px;"><button type="button" name="all" class="btn btn-mini" style="font-weight:bold;">全  选</button> <button type="button" name="invert" class="btn btn-mini" style="font-weight:bold;">反  选</button> <button name="cancel" type="button" class="btn btn-mini" style="font-weight:bold;">取消全选</button></div>
<php>$empty="该夏令营暂未设置申请应填信息";</php>
<volist name="info" id="vo" key="k" empty="$empty" mod="4">
<span <eq name="mod" value="3">class="cle_right"</eq>><input type="checkbox" name="field[]" value="<{$vo.name}>" /> <{$vo.description}></span>
</volist>
</td>
</tr>
<tr>
<td colspan="2" style="text-align:center">
<input name="domain" type="submit" class="btn btn-mini" style="line-height:25px; font-weight:bold;" value="点击下载"> &nbsp;&nbsp;&nbsp;<input type="button" class="btn btn-mini" value="返 回" style="line-height:25px;font-weight:bold" onclick="javascript:history.back();" />
</td>
</tr>
</tbody>
</table>
<input type="hidden" name="action" value="<{$action}>" />
<input type="hidden" name="sumid" value="<{$sumid}>" />
</form>
</div>
</body>
</html>
<script>
$(function(){
$(':input[name="all"]').click(function(){
$(this).parent('div').siblings('span').children(':input[name="field[]"]').prop('checked',true);
});
$(':input[name="invert"]').click(function(){
$(this).parent('div').siblings('span').children(':input[name="field[]"]').each(function(){
$(this).prop('checked',!$(this).prop('checked'));
});
});
$(':input[name="cancel"]').click(function(){
$(this).parent('div').siblings('span').children(':input[name="field[]"]').prop('checked',false);
});
$(':input[type="submit"]').click(function(){
var len=$(':input[name="field[]"]:checked').length;
if(len == 0){
alert('请选择下载信息');
return false;
}
});
});
</script>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>添加|后台管理系统</title>
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<script charset="utf-8" src="__PUB__js/My97DatePicker/WdatePicker.js"></script>
<!-- 弹出层 -->
<link rel="stylesheet" href="__PUB__css/reveal.css" />
<script charset="utf-8" src="__PUB__js/jquery-1.7.1.min.js"></script>
<script charset="utf-8" src="__PUB__js/jquery.reveal.js"></script>
<style>
#tid {
font-family: "宋体";
}
</style>
</head>
<body style="margin: 10px 0px;">
<div style="margin: 0px auto; width: 98%;">
<form name="form1" action="" method="post" style=""><input name="id" type="hidden" id="title" value="<{$userinfo.id}>">
<input type="hidden" name="sumid" value="<{$sumid}>" />
<table class="table table-condensed table-bordered table-hover" style="">
<tbody style="">
<tr>
<td colspan="4">
<div style="float:left">
<b>修改学生信息</b>
</div>
<div style="float:right">
[<a href="<{:U('manage',array('sumid'=>$sumid,'p'=>I('p')))}>"><u>返回列表</u></a>]
</div>
</td>
</tr>
<tr>
<td class="text_right_wid_200"><font color="red">注册邮箱:</font></td>
<td colspan="3"><input type="text" placeholder="请输入您的注册邮箱" name="email" id="email" value="<{$userinfo.email}>"></td>
</tr>
<tr>
<td class="text_right_wid_200"><font color="red">密码:</font></td>
<td colspan="3"><input type="password" placeholder="若想修改密码,请输入密码" name="password" value=""> <span style="color:#ff0000">(不修改密码时,不用填写)</span></td>
</tr>
<tr>
<td class="text_right_wid_200"><font color="red">确认密码:</font></td>
<td colspan="3"><input type="password" placeholder="请再次输入密码" name="repassword" value=""> <span style="color:#ff0000">(不修改密码时,不用填写)</span></td>
</tr>
<tr>
<td class="text_right_wid_200"><font color="red">姓名:</font></td>
<td colspan="3"><input type="text" placeholder="姓名" name="name" value="<{$userinfo.name}>"></td>
</tr>
<tr>
<td class="text_right_wid_200"><font color="red">籍贯:</font></td>
<td colspan="3"><input type="text" placeholder="籍贯" name="native" value="<{$userinfo.native}>"></td>
</tr>
<tr>
<td class="text_right_wid_200"><font color="red">性别:</font></td>
<td colspan="3">
<input type="radio" name="sex" value="男" <eq name="userinfo.sex" value="男">checked</eq>>男 
<input type="radio" name="sex" value="女" <eq name="userinfo.sex" value="女">checked</eq>>女
</td>
</tr>
<tr>
<td class="text_right_wid_200"><font color="red">政治面貌:</font></td>
<td colspan="3">
<select name="political">
<option value="">政治面貌</option>
<volist name=":C('ZHENGZHI')" id="v">
<option value="<{$v}>" <eq name="v" value="$userinfo['political']">selected="selected"</eq>><{$v}></option>
</volist>
</select>
</td>
</tr>
<tr>
<td class="text_right_wid_200"><font color="red">出生日期:</font></td>
<td colspan="3"><div id="lanrenzhijia">
<input type="text" placeholder="出生日期" name="birth" value="<{$userinfo.birth}>" class="Wdate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})">
</div></td>
</tr>
<tr>
<td class="text_right_wid_200"><font color="red">身份证号码:</font></td>
<td colspan="3"><input type="text" placeholder="身份证号码" name="idnumber" id="idnumber" value="<{$userinfo.idnumber}>"></td>
</tr>
<tr>
<td class="text_right_wid_200"><font color="red">固定电话:</font></td>
<td colspan="3"><input type="text" placeholder="固定电话" name="tele" id="tele" value="<{$userinfo.tele}>"></td>
</tr>
<tr>
<td class="text_right_wid_200"><font color="red">手机号码:</font></td>
<td colspan="3"><input type="text" placeholder="手机号码" name="mobile" value="<{$userinfo.mobile}>"></td>
</tr>
<tr>
<td class="text_right_wid_200"><font color="red">学校:</font></td>
<td colspan="3"><input type="text" placeholder="学校" name="school" value="<{$userinfo.school}>" class="w_p_39"></td>
</tr>
<tr>
<td class="text_right_wid_200"><font color="red">政审和录取通知书发放详细地址:</font></td>
<td colspan="3"><input type="text" placeholder="请输入政审和录取通知书发放详细地址" name="address" value="<{$userinfo.address}>" class="w_p_60"></td>
</tr>
<tr>
<td></td>
<td colspan="3">
<button class="btn btn-large btn-info" type="submit" style="cursor:pointer;">保存</button>
<button class="btn btn-large btn-info" type="reset" onclick="location.reload();" style="cursor:pointer;">重置</button>
</td>
</tr>
</tbody>
</table>
</form>
</div>
</body></html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>列表|后台管理系统</title>
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<style>
table tr td{padding:0 5px; line-height:31px !important;}
.pp_table{border-collapse: collapse; width:100%; }
.upimg{display: inline-block;}
.upimg img{ max-height:25px;}
</style>
<script type="text/javascript" src="/Public/js/layer2/layer.js"></script>
<script>
/*layer.config({
extend: 'extend/layer.ext.js'
});
layer.ready(function(){
layer.photos({
photos: '.upimg'
});
});*/
$(function(){
$(".upimg").each(function(){
$(this).click(function(){
layer.open({
title:' ',
type: 1,
shadeClose: true,
area: ['70%','90%'], //宽高
content: '<img src="'+$(this).children('img').attr('src')+'" style="display:block; margin:0 auto; max-width:100%;" />',
});
});
});
});
</script>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<table class="pp_table" border="1" bordercolor="#ddd">
<tbody>
<tr>
<td colspan="10" style="padding-top:6px;padding-bottom:6px;">
<div style="float:left">
<b><{$web_title}></b>
</div>
<div style="float:right">
[<a href="<{$Think.server.HTTP_REFERER}>">返回列表</a>]
</div>
</td>
</tr>
<tr>
<td colspan="13"><b>报名编号:</b><{$app_data.entnum}></td>
</tr>
<tr>
<!--
bstring 多行文本:几行几列
bool 布尔:1是0否
s_elect 下拉列表:默认值选择
c_heckbox 多选框:默认值选择
r_adio 单选框:默认值选择
string 文本
t_extarea 文本域
number 数字
-->
<?php
$ii = 1;
foreach($fields['listdata'] as $k => $v){
if($v['name'] == 'appproject2') continue; //如果是拟申请项目二级appproject2 跳过
if($v['fline'] == 2){ //占用整行
echo $ii == 1?'':'</tr><tr>';
echo '<td colspan="3"><b>'.$v['description'].':</b>';
echo checkApply2($v['type'],$v['name'],array('val'=>$v['d_value'],'row'=>$v['rownum'],'col'=>$v['colnum'],'ctitle'=>$v['ctitle']),$v['isdate'],$app_data[$v['name']],$v['upfile']);
if($v['name'] == 'appproject'){ //判断是拟申请项目 如果是则直接在后台跟随 拟申请项目二级appproject2
echo '—';
echo checkApply2('string','appproject2',array('val'=>'','row'=>'','col'=>'','ctitle'=>''),0,$app_data['appproject2']);
}
if($v['name'] == 'school' && $speSchool[$v['name']]){ //判断字段为所在学校school 并且学校是否属于推免资格学校
echo '<span style="color:#ff0000">';
if($speSchool[$v['name']]['check985']) echo ' 985';
if($speSchool[$v['name']]['check211']) echo ' 211';
echo '</span>';
}
echo '</td></tr><tr>';
$ii = 1;
}else{
echo '<td><b>'.$v['description'].':</b>';
echo checkApply2($v['type'],$v['name'],array('val'=>$v['d_value'],'row'=>$v['rownum'],'col'=>$v['colnum'],'ctitle'=>$v['ctitle']),$v['isdate'],$app_data[$v['name']],$v['upfile']);
if($v['name'] == 'appproject'){ //判断是拟申请项目 如果是则直接在后台跟随 拟申请项目二级
echo '—';
echo checkApply2('string','appproject2',array('val'=>'','row'=>'','col'=>'','ctitle'=>''),0,$app_data['appproject2']);
}
if($v['name'] == 'school' && $speSchool[$app_data[$v['name']]]){ //判断字段为所在学校school 并且学校是否属于推免资格学校
echo '<span style="color:#ff0000">';
if($speSchool[$app_data[$v['name']]]['check985']) echo ' 985';
if($speSchool[$app_data[$v['name']]]['check211']) echo ' 211';
echo '</span>';
}
echo '</td>';
if($ii == 3 && $k != (count($fields['listdata'])-1)){
echo '</tr><tr>';
$ii = 1;
}else{
$ii++;
}
}
}
?>
</tr>
<?php
$do=doStatus($app_data,$sumid,$action,$nowpage);
if($do['name'] && $do['name'] != '录取'):
?>
<tr>
<td colspan="10" class="text_center" style="padding:8px;">
<button id="ppdo" <notempty name="do.url">onclick="javascript:if(confirm('确认要进行<{$do.name}>操作吗?')){<eq name="do.action" value="operate">ppdo();<else />location.href='<{$do.url}>';</eq>}"</notempty>><{$do.name}></button>
<!-- <button onclick="javascript:history.back();">返回列表</button> -->
</td>
</tr>
<?php endif;?>
</tbody>
</table>
</div>
</body>
</html>
<script>
function ppdo(){
$.get('<{$do.url}>','',function(data){
if(data['suc']){
$('#ppdo').attr('onclick','').html(data['name']);
}else{
alert(data['info']);
history.back();
}
},'json');
};
</script>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>列表|后台管理系统</title>
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<script>
$(document).ready(function(){
$("#SelectAll").click(function(){
$("input[name='check[]']").checkCbx();
});
$("#colid1").change(function(){
var val=$(this).children('option:selected').val();
window.location.href="<{:U('index',array(),'')}><{:C('URL_PATHINFO_DEPR')}>tid<{:C('URL_PATHINFO_DEPR')}>"+val;
});
$(".YanZheng").click(function(event){
var a=$("input:checked").length;
if(a==0){
alert('您还没有请选择操作内容!');
event.preventDefault();
}
});
$(".icon_isok").click(function(){
var vara=$(this).find('i').attr('var');
$.get("<{:U('Shenhe')}>",{'id':vara},function(data){
if(data){
location.reload();
}else{
alert('修改失败!');
location.reload();
}
});
});
});
$.fn.checkCbx = function(){
return this.each(function(){
this.checked = !this.checked;
});
}
</script>
<style>
#colid1 {
font-family: "宋体";
}
.table tr td{line-height:150% !important;}
.search{padding:8px 8px 15px; clear:both; text-align:right;}
.search .w_160{width:160px;}
.search form{padding:0; margin:0;}
.order{font-weight:bold; color:#555;}
.order .nor{position:relative; display:inline-block; height:22px; line-height:22px; padding:0px 15px 0px 5px; color:#555; border:1px solid #ccc;}
.order .nor .for{
position: absolute;
display: inline-block;
overflow: hidden;
top: 8px;
right: 5px;
width: 7px;
height: 10px;
line-height: 10px;
background:url('__PUB__/images/icon.png') no-repeat;
}
.order .nor2{
color:#ba1a16;
}
.order .nor2 .for{
background-position: -8px 0px;
}
</style>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="13" style="padding-left:10px;">
<div style="padding-top:10px; overflow:hidden">
<div style="float:left;">
<b><{$web_title}></b>
</div>
<div style="float:right">
[<a href="<{:U('Summer/index')}>">返回夏令营列表</a>]
</div>
</div>
<div class="search">
<form action="<{:U(ACTION_NAME)}>" method="post">
<input type="text" name="entnum" value="<{$search.entnum}>" placeholder="请输入报名编号" class="w_160" />
<input type="text" name="name" value="<{$search.name}>" placeholder="请输入姓名" class="w_160" /> 
<input type="text" name="school" value="<{$search.school}>" placeholder="请输入学校名称" class="w_160" /> 
<!-- <select name="appproject" class="w_160">
<option value="">请选择拟申请项目</option>
<volist name="project" id="v">
<option value="<{$v}>" <eq name="search.appproject" value="$v">selected</eq>><{$v}></option>
</volist>
</select>
<select name="appproject2" class="w_160" style="display:none">
<option value="">请选择</option>
</select>  -->
<!-- <select name="status" class="w_160">
<option value="">请选择状态</option>
<option value="1" <eq name="search.status" value="1">selected</eq>>等待审核</option>
<option value="2" <eq name="search.status" value="2">selected</eq>>已审核</option>
<option value="3" <eq name="search.status" value="3">selected</eq>>已备选</option>
<option value="4" <eq name="search.status" value="4">selected</eq>>已录取</option>
</select> -->
<input type="submit" value="搜 索" /> <input type="button" value="清除搜索" onclick='window.location.href="<{:U($Think.ACTION_NAME,array('sumid'=>$sumid))}>"' /><input type="hidden" name="sumid" value="<{$sumid}>" />
</form>
</div>
<div class="order">
<?php
$orda=I('orda',0,'intval')?array_merge($search,$ord,array('orda'=>0,'sumid'=>$sumid)):array_merge($search,$ord,array('orda'=>1,'sumid'=>$sumid));
$ordb=I('ordb',0,'intval')?array_merge($search,$ord,array('ordb'=>0,'sumid'=>$sumid)):array_merge($search,$ord,array('ordb'=>1,'sumid'=>$sumid));
$ordc=I('ordc',0,'intval')?array_merge($search,$ord,array('ordc'=>0,'sumid'=>$sumid)):array_merge($search,$ord,array('ordc'=>1,'sumid'=>$sumid));
?>
排序:<a href="<{:U(ACTION_NAME,$orda)}>" class="nor <if condition="I('orda',0,'intval') eq 1">nor2</if>">985<i class="for"></i></a>
<a href="<{:U(ACTION_NAME,$ordb)}>" class="nor <if condition="I('ordb',0,'intval') eq 1">nor2</if>">211<i class="for"></i></a>
<a href="<{:U(ACTION_NAME,$ordc)}>" class="nor <if condition="I('ordc',0,'intval') eq 1">nor2</if>">CET-6<i class="for"></i></a>
</div>
</td>
</tr>
<!-- <form action="<{:U('form')}>" method="post"> -->
<tr align="center">
<td width="3%" class="text_center">序号</td>
<td width="8%" class="text_center">报名编号</td>
<td width="8%" class="text_center">姓名</td>
<td width="3%" class="text_center">性别</td>
<td width="4%" class="text_center">手机</td>
<td width="12%" class="text_center">邮箱</td>
<td width="12%" class="text_center">所在学校</td>
<td width="2%" class="text_center">985</td>
<td width="2%" class="text_center">211</td>
<td width="10%" class="text_center">学院</td>
<td width="10%" class="text_center">专业</td>
<td width="8%" class="text_center">报名申请时间</td>
<td width="18%" class="text_center">操作</td>
</tr>
<?php $empty="<tr><td colspan='13'>暂无相关信息</td></tr>"; ?>
<volist name="list" id="vo" key="k" empty="$empty">
<tr class="text_center">
<td nowrap="" class="text_center"><{$k}></td>
<td class="text_center" style="<heq name="vo['entnum']" value="$search['entnum']">color:#ff0000;</heq>"><{$vo.entnum}></td>
<td class="text_center" <eq name="vo['name']" value="$search['name']">style="color:#ff0000;"</eq>><{$vo.name}></td>
<td class="text_center"><{$vo.sex}></td>
<td class="text_center"><{$vo.mobile}></td>
<td class="text_center"><{$vo.email}></td>
<td class="text_center">
<{$vo.school}>
</td>
<td class="text_center">
<?php
if($speSchool[$vo['school']]['check985'])
echo '<span style="color:#ff0000">是</span>';
else
echo '否';
?>
</td>
<td class="text_center">
<?php
if($speSchool[$vo['school']]['check211'])
echo '<span style="color:#ff0000">是</span>';
else
echo '否';
?>
</td>
<td class="text_center">
<{$vo.college}>
</td>
<td class="text_center">
<{$vo.major}>
</td>
<td class="text_center"><{$vo.addtime|date='Y-m-d H:i:s',###}></td>
<td class="text_center">
<a href="<{:U('look',array('id'=>$vo['id'],'sumid'=>$sumid))}>" class="btn btn-mini"><i class="icon-look"></i> 查看报名详细</a>
<a href="javascript:if(confirm('确认要修改学生信息吗?')){location.href='<{:U('editUser',array('id'=>$vo['uid'],'sumid'=>$sumid))}>'}" class="btn btn-mini"><i class="icon-look"></i> 修改学生信息</a>
<?php
/*if($vo['status1'] == 1 && $vo['status2'] == 1 && $vo['status3'] == 1){
$do['url']='';
$do['name']='已录取';
}elseif($vo['status1'] == 1 && $vo['status2'] == 1 && !$vo['status3']){
$do['url']='luqu';
$do['name']='录取';
}elseif($vo['status1'] == 1 && !$vo['status2'] && !$vo['status3']){
$do['url']='beixuan';
$do['name']='备选';
}elseif(!$vo['status1'] && !$vo['status2'] && !$vo['status3']){
$do['url']='shenhe';
$do['name']='审核';
}
if($do['url'])
$do['url']=U($do["url"],array('id'=>$vo['id'],'sumid'=>$sumid));
else
$do['url']='javascript:void(0);';*/
//$do=doStatus($vo,$sumid);
?>
<!-- <a href="javascript:<notempty name="do.url">if(confirm('确认要进行<{$do.name}>操作吗?')){location.href='<{$do.url}>'}<else />void(0);</notempty>" class="btn btn-mini"><i class="icon-edit"></i> <{$do.name}></a> -->
<?php //unset($do); ?>
</td>
</tr>
</volist>
<!-- <tr>
<td colspan="10" align="right">
<input type="hidden" value="<{$sumid}>" name="sumid">
<input type="hidden" value="<{$_GET['p']}>" name="p">
<a href="javascript:void(0)" class="btn btn-mini" id="SelectAll"><i class="icon-check"></i> 全选/反选</a>&nbsp;
<button class="btn btn-mini YanZheng" name="Delete" value=" " type="submit" style="cursor:pointer;"><i class="icon-trash"></i> 删除</button>&nbsp;
<button class="btn btn-mini" id="NewSort" name="NewSort" value=" " type="submit" style="cursor:pointer;"><i class="icon-random"></i> 更新排序</button>
</td>
</tr>-->
<!-- </form> -->
<tr>
<td colspan="13">
<ul class="page">
<{$page}>
</ul>
</td>
</tr>
</tbody></table>
</div>
</body>
</html>
<script>
$(function(){
changePro('<{$search.appproject2}>');
$(':input[name="appproject"]').change(function(){
changePro('');
});
});
function changePro(dv){
var v=$(':input[name="appproject"]').children('option:checked').val();
if(!dv) dv='';
var param={appproject:v,sumid:<{$sumid}>,appproject2:dv};
if(v){
$.get('<{:U('Apply/getAppproject2')}>',param,function(data){
if(data['suc'])
$(':input[name="appproject2"]').css('display','inline');
else
$(':input[name="appproject2"]').css('display','none');
$(':input[name="appproject2"]').html(data['cont']);
},'json');
}else{
$(':input[name="appproject2"]').html('<option value="">请选择</option>').css('display','none');
}
}
</script>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>列表|后台管理系统</title>
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<script>
$(document).ready(function(){
$("#SelectAll").click(function(){
$("input[name='check[]']").checkCbx();
});
$("#colid1").change(function(){
var val=$(this).children('option:selected').val();
window.location.href="<{:U('index',array(),'')}><{:C('URL_PATHINFO_DEPR')}>tid<{:C('URL_PATHINFO_DEPR')}>"+val;
});
$(".YanZheng").click(function(event){
var a=$("input:checked").length;
if(a==0){
alert('您还没有请选择操作内容!');
event.preventDefault();
}
});
$(".icon_isok").click(function(){
var vara=$(this).find('i').attr('var');
$.get("<{:U('Shenhe')}>",{'id':vara},function(data){
if(data){
location.reload();
}else{
alert('修改失败!');
location.reload();
}
});
});
});
$.fn.checkCbx = function(){
return this.each(function(){
this.checked = !this.checked;
});
}
</script>
<style>
#colid1 {
font-family: "宋体";
}
.table tr td{line-height:150% !important; word-wrap: break-word; word-break:break-all;}
.search{padding:8px 8px 15px; clear:both; text-align:right;}
.search .w_160{width:160px;}
.search form{padding:0; margin:0;}
.order{font-weight:bold; color:#555;}
.order .nor{position:relative; display:inline-block; height:22px; line-height:22px; padding:0px 15px 0px 5px; color:#555; border:1px solid #ccc;}
.order .nor .for{
position: absolute;
display: inline-block;
overflow: hidden;
top: 8px;
right: 5px;
width: 7px;
height: 10px;
line-height: 10px;
background:url('__PUB__/images/icon.png') no-repeat;
}
.order .nor2{
color:#ba1a16;
}
.order .nor2 .for{
background-position: -8px 0px;
}
</style>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:99%;">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="14" style="padding-left:10px;">
<div style="padding-top:10px; overflow:hidden">
<div style="float:left;">
<b><{$web_title}></b>
</div>
<div style="float:right"></div>
</div>
<div class="search">
<form action="<{:U(ACTION_NAME)}>" method="post">
<input type="text" name="entnum" value="<{$search.entnum}>" placeholder="请输入报名编号" class="w_160" /> 
<input type="text" name="name" value="<{$search.name}>" placeholder="请输入姓名" class="w_160" /> 
<input type="text" name="school" value="<{$search.school}>" placeholder="请输入学校名称" class="w_160" /> 
<!-- <select name="appproject" class="w_160">
<option value="">请选择拟申请项目</option>
<volist name="project" id="v">
<option value="<{$v}>" <eq name="search.appproject" value="$v">selected</eq>><{$v}></option>
</volist>
</select>
<select name="appproject2" class="w_160" style="display:none">
<option value="">请选择</option>
</select>  -->
<!-- <select name="status" class="w_160">
<option value="">请选择状态</option>
<option value="1" <eq name="search.status" value="1">selected</eq>>等待审核</option>
<option value="2" <eq name="search.status" value="2">selected</eq>>已审核</option>
<option value="3" <eq name="search.status" value="3">selected</eq>>已备选</option>
<option value="4" <eq name="search.status" value="4">selected</eq>>已录取</option>
</select> -->
<input type="submit" value="搜 索" /> <input type="button" value="清除搜索" onclick='window.location.href="<{:U($Think.ACTION_NAME,array('sumid'=>$sumid))}>"' /><input type="hidden" name="sumid" value="<{$sumid}>" /> <input type="button" value="导出EXCEL" onclick='window.location.href="<{:U('checkField',array('sumid'=>$sumid,'action'=>$Think.ACTION_NAME))}>"' />
</form>
</div>
<div class="order">
<?php
$orda=I('orda',0,'intval')?array_merge($search,$ord,array('orda'=>0)):array_merge($search,$ord,array('orda'=>1));
$ordb=I('ordb',0,'intval')?array_merge($search,$ord,array('ordb'=>0)):array_merge($search,$ord,array('ordb'=>1));
$ordc=I('ordc',0,'intval')?array_merge($search,$ord,array('ordc'=>0)):array_merge($search,$ord,array('ordc'=>1));
?>
排序:<a href="<{:U(ACTION_NAME,$orda)}>" class="nor <if condition="I('orda',0,'intval') eq 1">nor2</if>">985<i class="for"></i></a>
<a href="<{:U(ACTION_NAME,$ordb)}>" class="nor <if condition="I('ordb',0,'intval') eq 1">nor2</if>">211<i class="for"></i></a>
<a href="<{:U(ACTION_NAME,$ordc)}>" class="nor <if condition="I('ordc',0,'intval') eq 1">nor2</if>">CET-6<i class="for"></i></a>
</div>
</td>
</tr>
<!-- <form action="<{:U('form')}>" method="post"> -->
<tr align="center">
<td width="3%" class="text_center">序号</td>
<td width="5%" class="text_center">报名编号</td>
<td width="6%" class="text_center">姓名</td>
<td width="3%" class="text_center">性别</td>
<td width="7%" class="text_center">手机</td>
<td width="10%" class="text_center">邮箱</td>
<td width="9%" class="text_center">所在学校</td>
<td width="3%" class="text_center">985</td>
<td width="3%" class="text_center">211</td>
<td width="9%" class="text_center">学院</td>
<td width="9%" class="text_center">专业</td>
<td width="7%" class="text_center">报名申请时间</td>
<td width="5%" class="text_center">状态</td>
<td width="21%" class="text_center">操作</td>
</tr>
<?php $empty="<tr><td colspan='14'>暂无相关信息</td></tr>"; ?>
<volist name="list" id="vo" key="k" empty="$empty">
<tr class="text_center">
<td nowrap="" class="text_center"><{$k}></td>
<td class="text_center" title="<{$vo.entnum}>" style="cursor:pointer;<heq name="vo['entnum']" value="$search['entnum']">color:#ff0000;</heq>"><{$vo.entnum|substr=###,7}></td>
<td class="text_center" <eq name="vo['name']" value="$search['name']">style="color:#ff0000;"</eq>><{$vo.name}></td>
<td class="text_center"><{$vo.sex}></td>
<td class="text_center"><{$vo.mobile}></td>
<td class="text_center"><{$vo.email}></td>
<td class="text_center">
<{$vo.school}>
</td>
<td class="text_center">
<?php
if($speSchool[$vo['school']]['check985'])
echo '<span style="color:#ff0000">是</span>';
else
echo '否';
?>
</td>
<td class="text_center">
<?php
if($speSchool[$vo['school']]['check211'])
echo '<span style="color:#ff0000">是</span>';
else
echo '否';
?>
</td>
<td class="text_center">
<{$vo.college}>
</td>
<td class="text_center">
<{$vo.major}>
</td>
<td class="text_center"><{$vo.addtime|date='Y-m-d H:i:s',###}></td>
<td class="text_center">
<?php
$do=doStatus($vo,$sumid,ACTION_NAME,$nowpage);
switch(ACTION_NAME){
case 'operate':
if($do['url']){
echo '等待审核';
}else{
echo '已入备选库';
}
break;
case 'operate2':
if($do['ac'] && $vo['status2']){
echo '<span style="color:#ff0000;">'.$do['ac'].'</span>';
}elseif($vo['status2'] && !$do['ac']){
echo '已发送邀请';
}elseif(!$vo['status2']){
echo '未发送邀请';
}else{}
break;
case 'operate3':
if($do['ac'] && $vo['status3']){
echo '<span style="color:#ff0000;">'.$do['ac'].'</span>';
}elseif($vo['status3'] && !$do['ac']){
echo '已发送邀请';
}elseif(!$vo['status3']){
echo '未发送邀请';
}else{}
break;
case 'operate4':
echo '录取';
break;
default:
;
}
?>
</td>
<td class="text_left">
<a href="<{:U('look',array('id'=>$vo['id'],'sumid'=>$sumid,'page'=>$nowpage))}>" class="btn btn-mini"><i class="icon-look"></i> 查看详细</a>
<?php
if(ACTION_NAME == 'operate'){ //operate ajax实现
?>
<a attrid="pp<{$vo.id}>" href="javascript:<notempty name="do.url">if(confirm('确认要进行<{$do.name}>操作吗?')){ppdo('<{$do.url}>',<{$vo.id}>);}<else />void(0);</notempty>" class="btn btn-mini"><i class="icon-edit"></i> <{$do.name}></a>
<?php
}elseif(ACTION_NAME != 'operate4'){
?>
<a attrid="pp<{$vo.id}>" href="javascript:<notempty name="do.url">if(confirm('确认要进行<{$do.name}>操作吗?')){location.href='<{$do.url}>'}<else />void(0);</notempty>" class="btn btn-mini"><i class="icon-edit"></i> <{$do.name}></a>
<?php
}
if($do['ac'] == '拒绝'){ //拒绝邀请
?>
&nbsp;<a href="javascript:<notempty name="do.url2">if(confirm('确认要进行再次邀请操作吗?')){location.href='<{$do.url2}>'}<else />void(0);</notempty>" class="btn btn-mini"><i class="icon-edit"></i> 再次邀请</a>
<?php
}
unset($do);
?>
</td>
</tr>
</volist>
<!-- <tr>
<td colspan="10" align="right">
<input type="hidden" value="<{$sumid}>" name="sumid">
<input type="hidden" value="<{$_GET['p']}>" name="p">
<a href="javascript:void(0)" class="btn btn-mini" id="SelectAll"><i class="icon-check"></i> 全选/反选</a>&nbsp;
<button class="btn btn-mini YanZheng" name="Delete" value=" " type="submit" style="cursor:pointer;"><i class="icon-trash"></i> 删除</button>&nbsp;
<button class="btn btn-mini" id="NewSort" name="NewSort" value=" " type="submit" style="cursor:pointer;"><i class="icon-random"></i> 更新排序</button>
</td>
</tr>-->
<!-- </form> -->
<tr>
<td colspan="14">
<ul class="page">
<{$page}>
</ul>
</td>
</tr>
</tbody></table>
</div>
</body>
</html>
<script>
$(function(){
changePro('<{$search.appproject2}>');
$(':input[name="appproject"]').change(function(){
changePro('');
});
});
function changePro(dv){
var v=$(':input[name="appproject"]').children('option:checked').val();
if(!dv) dv='';
var param={appproject:v,sumid:<{$sumid}>,appproject2:dv};
if(v){
$.get('<{:U('Apply/getAppproject2')}>',param,function(data){
if(data['suc'])
$(':input[name="appproject2"]').css('display','inline');
else
$(':input[name="appproject2"]').css('display','none');
$(':input[name="appproject2"]').html(data['cont']);
},'json');
}else{
$(':input[name="appproject2"]').html('<option value="">请选择</option>').css('display','none');
}
}
//ajax备选
function ppdo(dourl,num){
$.get(dourl,'',function(data){
if(data['suc']){
$('a[attrid="pp'+num+'"]').removeAttr('onclick').html('<i class="icon-edit"></i> '+data['name']);
$('a[attrid="pp'+num+'"]').parent('td').prev('td').html(data['name']);
}else{
alert(data['info']);
history.back();
}
},'json');
};
</script>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>添加|后台管理系统</title>
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<link rel="stylesheet" href="__ROOTPUB__kindeditor/themes/default/default.css" />
<script charset="utf-8" src="__ROOTPUB__kindeditor/kindeditor-min.js"></script>
<script charset="utf-8" src="__ROOTPUB__kindeditor/lang/zh_CN.js"></script>
<script>
KindEditor.ready(function(K) {
var editor = K.create('textarea[name="content"]', {
uploadJson : "<{:U('Kind/upload_json')}>",
fileManagerJson : "<{:U('Kind/file_manager_json')}>",
allowFileManager : true
});
var editor1 = K.editor({
uploadJson : "<{:U('Kind/upload_json')}>",
fileManagerJson : "<{:U('Kind/file_manager_json')}>",
allowFileManager : true
});
K('#uploadid').click(function() {
editor1.loadPlugin('image', function() {
editor1.plugin.imageDialog({
imageUrl : K('#picid').val(),
clickFn : function(url, title, width, height, border, align) {
K('#picid').val(url);
document.getElementById('picida').src=url;
editor1.hideDialog();
}
});
});
});
K('#uploadfid').click(function(){
editor1.loadPlugin('insertfile', function(){
editor1.plugin.fileDialog({
fileUrl : K('#fileid').val(),
clickFn : function(url, title) {
K('#fileid').val(url);
editor1.hideDialog();
}
});
});
});
K('#J_selectImage').click(function() {
editor1.loadPlugin('multiimage', function() {
editor1.plugin.multiImageDialog({
clickFn : function(urlList) {
var div = K('#img');
// div.html('');
K.each(urlList, function(i, data) {
div.append('<p><img src="' + data.url + '" /><input type="hidden" name="img[]" value="' + data.url + '" /></p>');
});
editor1.hideDialog();
}
});
});
});
});
$(document).ready(function(){
$("#tid").click(function(){
var vvv=$(this).children('option:selected').attr('upid');
var shangid=$(this).children('option:selected').val();
$(this).attr('gupid',vvv);
$(this).attr('shangid',shangid);
}).change(function(){
var val=$(this).children('option:selected').val();
var is=$(this).children('option:selected').attr('is');
var upid=$(this).children('option:selected').attr('upid');
var upupid=$(this).attr('gupid');
if(is!=1){
alert('该栏目不允许添加文章!');
$(this).val($(this).attr('shangid'));
//location.reload();
}else{
if(upupid!=upid){
window.location.href="<{:U('add',array(),'')}><{:C('URL_PATHINFO_DEPR')}>tid<{:C('URL_PATHINFO_DEPR')}>"+val;
}
//picnum附件类型判断
$.get("<{:U('getPicnum')}>", {tid:val}, function(data){
for(var k=1; k<=3; k++)
{
checkPicnum(data,k);
}
});
}
});
//删除图片
$("#img").delegate("p","click",function(){
if(window.confirm('你确定要删除此图片吗?')){
var p=$(this);
var f=p.children('img').attr('src');
var validate={
file:f
};
$.get("<{:U('delFile')}>", validate, function(data){
if(data == 'yes')
{
p.remove();
}
else
{
alert('删除失败');
}
});
}
});
});
function checkPicnum(data,num)
{
if(data.indexOf(num)!= -1)
{
$(".picnum_"+num).removeClass('display_none');
}
else
{
$(".picnum_"+num).addClass('display_none');
}
}
//获取单图、多图尺寸
$(function(){
var val=$('#tid').children('option:selected').val();
$.get('<{:U('getchicun','','')}>',{'tid':val},function(data){
$('#uploadid + span').text('(尺寸:'+data.img_size+')'); //单图
$('#J_selectImage + span').text('(尺寸:'+data.imgs_size+')'); //多图
},'json');
});
</script>
<style>
#tid {
font-family: "宋体";
}
</style>
</head>
<body style="margin: 10px 0px;">
<div style="margin: 0px auto; width: 98%;">
<form name="form1" action="" method="post" style="">
<table class="table table-condensed table-bordered table-hover" style="">
<tbody style="">
<tr>
<td colspan="4">
<div style="float:left">
<b>添加</b>
</div>
<div style="float:right">
[<a href="<{:U('index',array('tid'=>I('tid'),'p'=>I('p')))}>"><u>返回列表</u></a>]
</div>
</td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">所属栏目:</font></td>
<td colspan="3">
<span id="typeidct">
<select name="tid" id="tid">
<volist name="cat_list" id="vo">
<option value="<{$vo.id}>" upid="<{$vo.upid}>" is="<{$vo.type}>" <neq name="vo.type" value="1">style="background:#CCC; color:#888;"</neq> <if condition="$vo.id eq $_GET['tid']">selected</if> >
<{$vo.tname}>
</option>
</volist>
</select>
</span>
(<font color="red">注:红色字为必填项</font>)
</td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">标题:</font></td>
<td colspan="3">
<input name="title" type="text" id="title" class="txt_title" value=""> (<font color="red">注:红色字为必填项</font>)
</td>
</tr>
<tr>
<td class="text_right_wid_90">作者:</td>
<td class="width_430">
<input name="editor" type="text" id="writer" value="">
</td>
<td class="text_right_wid_90">来源:</td>
<td>
<input type="text" name="source" id="sourceid" value="">
</td>
</tr>
<tr>
<td class="text_right_wid_90">状态:</td>
<td>
<input name="isshow" type="radio" value="0" > 待审核 &nbsp; <input name="isshow" type="radio" value="1" checked>审核
</td>
<td class="text_right_wid_90">
关联属性:
</td>
<td>
<!-- <input id="flag" class="np" type="checkbox" value="h" name="flag[]">热门(h) &nbsp; --><input id="flag" class="np" type="checkbox" value="r" name="flag[]">推荐(r)
</td>
</tr>
<tr class="picnum_1 <if condition="!strstr($picnum,'1')">display_none</if>">
<td class="text_right_wid_90">缩 略 图:</td>
<td>
<input name="thumb" type="text" id="picid" value=""><input type="button" value="上传图片" style="cursor:pointer;" id="uploadid"> <span style="color:#ccc;"></span>
</td>
<td colspan="2">
<img src="<{$data.thumb|Thumb}>" id="picida" style=" max-height:60px; max-width:100px;">
</td>
</tr>
<tr class="picnum_2 <if condition="!strstr($picnum,'2')">display_none</if>">
<td class="text_right_wid_90">内容页多图:</td>
<td colspan="3">
<input type="button" id="J_selectImage" value="批量上传" /> <span style="color:#ccc;"></span>
</td>
</tr>
<tr class="picnum_2 <if condition="!strstr($picnum,'2')">display_none</if>">
<td colspan="4" id="img"></td>
</tr>
<tr class="picnum_3 <if condition="!strstr($picnum,'3')">display_none</if>">
<td class="text_right_wid_90">附 件:</td>
<td colspan="3">
<input name="file" type="text" id="fileid" value=""><input type="button" value="上传附件" style="cursor:pointer;" id="uploadfid">
</td>
</tr>
<tr>
<td class="text_right_wid_90">排序:</td>
<td colspan="3">
<input class="width_120" name="sort" id="orderid" value="<{$maxsort}>" type="text">
</td>
</tr>
<tr>
<td class="text_right_wid_90">价格:</td>
<td colspan="3"><input class="width_120" type="text" name="price" id="price" value=""></td>
</tr>
<tr>
<td style="text-align:right; vertical-align:middle">关 键 字:</td>
<td colspan="3"><input type="text" name="keywords" id="keywordid" value="" style="width:50%"> &nbsp;(注:多个用","分开)</td>
</tr>
<tr>
<td style="text-align:right; vertical-align:middle">内容摘要:</td>
<td colspan="3"><textarea name="description" rows="2" id="descriptionid" style="width:98%;"></textarea></td>
</tr>
<tr style="">
<td style="text-align:right; vertical-align:middle"><font color="red">内容:</font></td>
<td colspan="3" style=""><textarea name="content" id="content" style="width: 99%; height:500px; display: none;"></textarea></td>
</tr>
<tr>
<td></td>
<td colspan="3">
<button class="btn btn-large btn-info" type="submit" style="cursor:pointer;">保存</button>
<button class="btn btn-large btn-info" type="reset" onclick="location.reload();" style="cursor:pointer;">重置</button>
</td>
</tr>
</tbody>
</table>
</form>
</div>
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>添加|后台管理系统</title>
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<link rel="stylesheet" href="__ROOTPUB__kindeditor/themes/default/default.css" />
<script charset="utf-8" src="__ROOTPUB__kindeditor/kindeditor-min.js"></script>
<script charset="utf-8" src="__ROOTPUB__kindeditor/lang/zh_CN.js"></script>
<script>
KindEditor.ready(function(K) {
var editor = K.create('textarea[name="content"]', {
uploadJson : "<{:U('Kind/upload_json')}>",
fileManagerJson : "<{:U('Kind/file_manager_json')}>",
allowFileManager : true
});
var editor1 = K.editor({
uploadJson : "<{:U('Kind/upload_json')}>",
fileManagerJson : "<{:U('Kind/file_manager_json')}>",
allowFileManager : true
});
K('#uploadid').click(function(){
editor1.loadPlugin('image', function(){
editor1.plugin.imageDialog({
imageUrl : K('#picid').val(),
clickFn : function(url, title, width, height, border, align) {
K('#picid').val(url);
document.getElementById('picida').src=url;
editor1.hideDialog();
}
});
});
});
K('#uploadfid').click(function(){
editor1.loadPlugin('insertfile', function(){
editor1.plugin.fileDialog({
fileUrl : K('#fileid').val(),
clickFn : function(url, title) {
K('#fileid').val(url);
editor1.hideDialog();
}
});
});
});
K('#J_selectImage').click(function() {
editor1.loadPlugin('multiimage', function() {
editor1.plugin.multiImageDialog({
clickFn : function(urlList) {
var div = K('#img');
// div.html('');
K.each(urlList, function(i, data) {
div.append('<p><img src="' + data.url + '" /><input type="hidden" name="img[]" value="' + data.url + '" /></p>');
});
editor1.hideDialog();
}
});
});
});
});
$(document).ready(function(){
$("#tid").click(function(){
var vvv=$(this).children('option:selected').attr('upid');
var shangid=$(this).children('option:selected').val();
$(this).attr('gupid',vvv);
$(this).attr('shangid',shangid);
}).change(function(){
var val=$(this).children('option:selected').val();
var is=$(this).children('option:selected').attr('is');
var upid=$(this).children('option:selected').attr('upid');
var upupid=$(this).attr('gupid');
if(is!=1){
alert('该栏目不允许添加文章!');
$(this).val($(this).attr('shangid'));
//location.reload();
}else{
if(upupid!=upid){
window.location.href="<{:U('add',array(),'')}><{:C('URL_PATHINFO_DEPR')}>tid<{:C('URL_PATHINFO_DEPR')}>"+val;
}
//picnum附件类型判断
$.get("<{:U('getPicnum')}>", {tid:val}, function(data){
for(var k=1; k<=3; k++)
{
checkPicnum(data,k);
}
});
}
});
//删除图片
$("#img").delegate("p","click",function(){
if(window.confirm('你确定要删除此图片吗?')){
var p=$(this);
var f=p.children('img').attr('src');
var validate={
file:f
};
$.get("<{:U('delFile')}>", validate, function(data){
if(data == 'yes')
{
p.remove();
}
else
{
alert('删除失败');
}
});
}
});
});
function checkPicnum(data,num)
{
if(data.indexOf(num)!= -1)
{
$(".picnum_"+num).removeClass('display_none');
}
else
{
$(".picnum_"+num).addClass('display_none');
}
}
</script>
<!-- 弹出层 -->
<link rel="stylesheet" href="__PUB__css/reveal.css" />
<script charset="utf-8" src="__PUB__js/jquery-1.7.1.min.js"></script>
<script charset="utf-8" src="__PUB__js/jquery.reveal.js"></script>
<!-- 截图 -->
<script src="__PUB__js/jcrop/jquery.Jcrop.min.js"></script>
<link href="__PUB__css/jcrop/jquery.Jcrop.css" rel="stylesheet" type="text/css" />
<link href="__PUB__css/jcrop/style.css" rel="stylesheet" type="text/css" />
<style>
#tid {
font-family: "宋体";
}
</style>
</head>
<body style="margin: 10px 0px;">
<div style="margin: 0px auto; width: 98%;">
<form name="form1" action="" method="post" style=""><input name="id" type="hidden" id="title" value="<{$data.id}>">
<table class="table table-condensed table-bordered table-hover" style="">
<tbody style="">
<tr>
<td colspan="4">
<div style="float:left">
<b>修改</b>
</div>
<div style="float:right">
[<a href="<{:U('index',array('tid'=>I('tid'),'p'=>I('p')))}>"><u>返回列表</u></a>]
</div>
</td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">所属栏目:</font></td>
<td colspan="3">
<span id="typeidct">
<select name="tid" id="tid">
<volist name="cat_list" id="vo">
<option value="<{$vo.id}>" upid="<{$vo.upid}>" is="<{$vo.type}>" <neq name="vo.type" value="1">style="background:#CCC; color:#888;"</neq> <if condition="$vo.id eq $data['tid']">selected</if> >
<{$vo.tname}>
</option>
</volist>
</select>
</span>
(<font color="red">注:红色字为必填项</font>)
</td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">标题:</font></td>
<td colspan="3">
<input class="txt_title" name="title" type="text" id="title" value="<{$data.title}>"> (<font color="red">注:红色字为必填项</font>)
</td>
</tr>
<tr>
<td class="text_right_wid_90">作者:</td>
<td class="width_430">
<input name="editor" type="text" id="writer" value="<{$data.editor}>">
</td>
<td class="text_right_wid_90">来源:</td>
<td>
<input type="text" name="source" id="sourceid" value="<{$data.source}>">
</td>
</tr>
<tr>
<td class="text_right_wid_90">状态:</td>
<td>
<input name="isshow" type="radio" value="0" <if condition="$data['isshow'] eq 0 ">checked</if>> 待审核 &nbsp; <input name="isshow" type="radio" value="1" <if condition="$data['isshow'] eq 1 ">checked</if>>审核
</td>
<td class="text_right_wid_90">
关联属性:
</td>
<td>
<!-- <input id="flag" class="np" type="checkbox" value="h" name="flag[]" <if condition="in_array('h',$flag)">checked</if> >
热门(h) &nbsp; --><input name="flag[]" type="checkbox" class="np" id="flag" value="r" <if condition="in_array('r',$flag)">checked</if> >推荐(r)
</td>
</tr>
<tr class="picnum_1 <if condition="!strstr($picnum,'1')">display_none</if>">
<td class="text_right_wid_90">缩 略 图:</td>
<td>
<input name="thumb" type="text" id="picid" value="<{$data.thumb}>"><input type="button" value="上传图片" style="cursor:pointer;" id="uploadid"><input type="hidden" name="oldthumb" value="<{$data.thumb}>">
<input type="hidden" id="t_width" value="200" /><input type="hidden" id="t_height" value="200" /> <span style="color:#ccc;">(尺寸:310*190)</span>
</td>
<td colspan="2">
<a href="javascript:void(0);" onclick="facecut();" data-reveal-id="myModal" data-animation="fade"><img src="<{$data.thumb|Thumb}>" id="picida" style=" max-height:60px; max-width:500px; border:none;"></a>
<!-- 裁剪功能 -->
<div id="myModal" class="reveal-modal">
<div class="Personal">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="13%">
<div class="demo">
<p>说明:只允许编辑gif/jpg格式的图片,图片大小不能超过500k。</p>
<a href="javascript:void(0);" onclick="jianqie()" class="Intercbtn close-reveal-modal" style="color:#fff;">确认保存</a>
<div class="progress"> <span class="bar"></span><span class="percent">0%</span > </div>
<div class="files"></div>
<div id="showimg"><img src="" /><!--初始图片--></div>
</div>
<input type="hidden" id="src" name="src" value="" />
<input type="hidden" id="ppx" name="ppx" value="0" />
<input type="hidden" id="ppy" name="ppx" value="0" />
<input type="hidden" id="ppw" name="ppx" value="240" />
<input type="hidden" id="pph" name="ppx" value="240" />
</td>
</tr>
</table>
</div>
<a class="close-reveal-modal close-reveal-modalpp" title="关闭">&#215;</a>
</div>
<script>
function facecut(){
var picurl = window.document.getElementById("picid").value;
var t4 = window.document.getElementById("t_width").value;
var t5 = window.document.getElementById("t_height").value;
$('#ppw').val(t4);
$('#pph').val(t5);
var showimg = $('#showimg');
var csswidth='520';
var image = new Image();
image.src = picurl;
// image.onload = function(){
var picwidth = image.width;
var picheight = image.height;
//判断上传图片的大小 然后设置图片的高与宽的固定宽
if (picwidth>t4 && picheight<t5){
showimg.html("<img src='"+picurl+"' id='cropbox' height='"+t5+"' />");
}else if(picwidth<t4 && picheight>t5){
showimg.html("<img src='"+picurl+"' id='cropbox' width='"+t4+"' />");
}else if(picwidth<t4 && picheight<t5){
showimg.html("<img src='"+picurl+"' id='cropbox' width='"+t4+"' height='"+t5+"' />");
}else{
showimg.html("<img src='"+picurl+"' id='cropbox' width='"+csswidth+"' />");
}
/*if (picwidth > csswidth){
showimg.html("<img src='"+picurl+"' id='cropbox' width='"+csswidth+"' />");
}
else
{
showimg.html("<img src='"+picurl+"' id='cropbox' />");
}*/
//传给php页面,进行保存的图片值
$("#src").val(picurl);
//截取图片的js
$('#cropbox').Jcrop({
aspectRatio: t4/t5,
onSelect: updateCoords,
// minSize:[t4,t5],
// maxSize:[t4,t5],
allowSelect:true, //允许选择
allowResize:true, //是否允许调整大小
setSelect: [ 0, 0, t4, t5 ],
keySupport:false
});
// };
}
function updateCoords(c){
$('#ppx').val(c.x);
$('#ppy').val(c.y);
$('#ppw').val(c.w);
$('#pph').val(c.h);
};
function checkCoords(){
if (parseInt($('#w').val())) return true;
alert('Please select a crop region then press submit.');
return false;
};
function jianqie(){
var src=$('#src').val();
var x=$('#ppx').val();
var y=$('#ppy').val();
var w=$('#ppw').val();
var h=$('#pph').val();
$.post('<{:U("modifyFace")}>',{
'src':src,
'x':x,
'y':y,
'w':w,
'h':h
}
,function(data){
window.document.getElementById("picid").value=data;
window.document.getElementById("picida").src=data;
//window.close();
}
);
}
</script>
<!-- 裁剪结束 -->
</td>
</tr>
<tr class="picnum_2 <if condition="!strstr($picnum,'2')">display_none</if>">
<td class="text_right_wid_90">内容页多图:</td>
<td colspan="3">
<input type="button" id="J_selectImage" value="批量上传" />
</td>
</tr>
<tr class="picnum_2 <if condition="!strstr($picnum,'2')">display_none</if>">
<td colspan="4" id="img">
<notempty name="img">
<volist name="img" id="v">
<p><img src="<{$v}>" /><input type="hidden" name="img[]" value="<{$v}>" /></p>
</volist>
</notempty>
</td>
</tr>
<tr class="picnum_3 <if condition="!strstr($picnum,'3')">display_none</if>">
<td class="text_right_wid_90">附 件:</td>
<td colspan="3">
<input name="file" type="text" id="fileid" value="<{$data.file}>"><input type="button" value="上传附件" style="cursor:pointer;" id="uploadfid"><input type="hidden" name="oldfile" value="<{$data.file}>">
</td>
</tr>
<tr>
<td class="text_right_wid_90">排序:</td>
<td colspan="3">
<input name="sort" id="orderid" value="<{$data.sort}>" class="width_120" type="text">
</td>
</tr>
<tr>
<td class="text_right_wid_90">价格:</td>
<td colspan="3">
<input class="width_120" type="text" name="price" id="price" value="<{$data.price}>">
</td>
</tr>
<tr>
<td class="text_right_wid_90">关 键 字:</td>
<td colspan="3">
<input type="text" name="keywords" id="keywordid" value="<{$data.keywords}>" style="width:50%"> &nbsp;(注:多个用","分开)
</td>
</tr>
<tr>
<td class="text_right_wid_90">内容摘要:</td>
<td colspan="3">
<textarea name="description" rows="2" id="description" style="width:98%;"><{$data.description}></textarea>
</td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">内容:</font></td>
<td colspan="3">
<textarea name="content" id="content" style="width: 99%; height:500px; display: none;"><{$data.content}></textarea>
</td>
</tr>
<tr>
<td></td>
<td colspan="3">
<button class="btn btn-large btn-info" type="submit" style="cursor:pointer;">保存</button>
<button class="btn btn-large btn-info" type="reset" onclick="location.reload();" style="cursor:pointer;">重置</button>
</td>
</tr>
</tbody>
</table>
</form>
</div>
</body></html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<!-- saved from url=(0050)http://localhost/cms/index.php/admin/Article/index -->
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>列表|后台管理系统</title>
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<script>
$(document).ready(function(){
$("#SelectAll").click(function(){
$("input[name='check[]']").checkCbx();
});
$("#colid1").change(function(){
var val=$(this).children('option:selected').val();
window.location.href="<{:U('index',array(),'')}><{:C('URL_PATHINFO_DEPR')}>tid<{:C('URL_PATHINFO_DEPR')}>"+val;
});
$(".YanZheng").click(function(event){
var a=$("input:checked").length;
if(a==0){
alert('您还没有请选择操作内容!');
event.preventDefault();
}
});
$(".icon_isok").click(function(){
var vara=$(this).find('i').attr('var');
$.get("<{:U('Shenhe')}>",{'id':vara},function(data){
if(data){
location.reload();
}else{
alert('修改失败!');
location.reload();
}
});
});
});
$.fn.checkCbx = function(){
return this.each(function(){
this.checked = !this.checked;
});
}
</script>
<style>
#colid1 {
font-family: "宋体";
}
</style>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="<{$colnum}>" style="padding-left:10px;">
<div style="overflow:hidden">
<div style="float:left">
<b>资料管理</b>
</div>
<div style="float:right; font-weight:bold;"><!-- <a href=""><u>新增资料填报</u></a> -->
 </div>
</div>
<div class="search">
<!-- <form action="<{:U(ACTION_NAME)}>" method="post">
<input type="text" name="title" value="<{$search.title}>" placeholder="请输入报告名称" class="w_160" />
<select name="status" class="w_160">
<option value="">请选择审核状态</option>
<option value="0" <eq name="search.status" value="0">selected</eq>>未审核</option>
<option value="1" <eq name="search.status" value="1">selected</eq>>审核不通过</option>
</select>
<input type="submit" value="搜 索" class="btn" /> <input type="button" value="清除搜索" onclick='window.location.href="<{:U($Think.ACTION_NAME)}>"' class="btn"/> <input type="button" value="导出EXCEL" onclick='window.location.href="<{:U('checkField')}>"' class="btn"/>
</form> -->
</div>
</td>
</tr>
<form action="<{:U('form')}>" method="post">
<tr align="center">
<td width="30" style="text-align:center;">序号</td>
<volist name="field" id="v">
<td <notempty name="regfields[$v]['width1']">width="<{$regfields[$v]['width1']}>"</notempty> style="text-align:center;"><{$regfields[$v]['description']}></td>
</volist>
<td width="80" style="text-align:center;">录入时间</td>
<td width="50" style="text-align:center;">审核状态</td>
<td style="text-align:center; width:15%;">操作</td>
</tr>
<volist name="list" id="vo" empty="$empty" key="ii">
<tr style="text-align:center;">
<td nowrap="" style="text-align:center;"><{$ii}></td>
<volist name="field" id="v">
<td style="text-align:center;">
<if condition="($regfields[$v]['upfile'] eq 1) AND ($vo[$v])">
<img src="<{$vo[$v]}>" style=" max-width:80px; ">
<elseif condition="($regfields[$v]['upfile'] eq 2) AND ($vo[$v])" />
<a href="<{$vo[$v]}>" target="_blank">下载文件</a>
<elseif condition="($regfields[$v]['istags'] eq '1') or ($regfields[$v]['type'] eq 'c_heckbox')" />
<{$vo[$v]|trim=','}>
<else/>
<{$vo[$v]}>
</if>
</td>
</volist>
<td style="text-align:center;"><{$vo.addtime|date='Y-m-d H:i:s',###}></td>
<td style="text-align:center;" class="review">
<?php
if($vo['isshow']==1):
?>
审核通过
<?php
elseif($vo['status']==1):
?>
<span style="color:red">审核不通过</span>
<?php
elseif((int)$dengji == (int)$vo['isshow']):
?>
<span style="color:red">未审核</span>
<?php
else:
?>
<span style="color:red">审核中</span>
<?php endif;?>
</td>
<td style="text-align:center;">
<a href="<{:U('look',array('id'=>$vo['id']))}>" class="btn btn-mini"><i class="icon-look"></i> 预览</a>
<a href="javascript:void(0);" onclick="del2('<{:U('delete',array('id'=>$vo['id']))}>','确定要删除信息吗?删除后无法恢复');" class="btn btn-mini"><i class="icon-trash"></i> 删除</a>
</td>
</tr>
</volist>
</form>
<notempty name="page">
<tr>
<td colspan="<{$colnum}>">
<ul class="page">
<{$page}>
</ul>
</td>
</tr>
</notempty>
</tbody>
</table>
</div>
</body></html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="shortcut icon" href="__ROOT__/favicon.ico" media="screen">
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<style>
#upid {
font-family: "宋体";
}
</style>
<link rel="stylesheet" href="__ROOTPUB__kindeditor/themes/default/default.css" />
<script charset="utf-8" src="__ROOTPUB__kindeditor/kindeditor-min.js"></script>
<script charset="utf-8" src="__ROOTPUB__kindeditor/lang/zh_CN.js"></script>
<script>
KindEditor.ready(function(K) {
var editor = K.create('textarea[name="content"]', {
uploadJson : "<{:U('Kind/upload_json')}>",
fileManagerJson : "<{:U('Kind/file_manager_json')}>",
allowFileManager : true
});
var editor1 = K.editor({
uploadJson : "<{:U('Kind/upload_json')}>",
fileManagerJson : "<{:U('Kind/file_manager_json')}>",
allowFileManager : true
});
K('#uploadid').click(function() {
editor1.loadPlugin('image', function() {
editor1.plugin.imageDialog({
imageUrl : K('#picid').val(),
clickFn : function(url, title, width, height, border, align) {
K('#picid').val(url);
//K('#picida').src(url);
document.getElementById('picida').src=url;
editor1.hideDialog();
}
});
});
});
K('#uploadfid').click(function(){
editor1.loadPlugin('insertfile', function(){
editor1.plugin.fileDialog({
fileUrl : K('#fileid').val(),
clickFn : function(url, title) {
K('#fileid').val(url);
editor1.hideDialog();
}
});
});
});
K('#J_selectImage').click(function() {
editor1.loadPlugin('multiimage', function() {
editor1.plugin.multiImageDialog({
clickFn : function(urlList) {
var div = K('#img');
// div.html('');
K.each(urlList, function(i, data) {
div.append('<p><img src="' + data.url + '" /><input type="hidden" name="img[]" value="' + data.url + '" /></p>');
});
editor1.hideDialog();
}
});
});
});
});
$(function(){
//删除图片
$("#img").delegate("p","click",function(){
if(window.confirm('你确定要删除此图片吗?')){
var p=$(this);
var f=p.children('img').attr('src');
var validate={
file:f
};
$.get("<{:U('delFile')}>", validate, function(data){
if(data == 'yes')
{
p.remove();
}
else
{
alert('删除失败');
}
});
}
});
});
</script>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<form name="form1" action="" method="post">
<table class="table table-condensed table-bordered table-hover" style="">
<tbody>
<tr>
<td colspan="3" style="padding-left:10px;"><div style="float:left"><b>编辑-><{$data.catname}></b></div></td>
</tr>
<tr>
<td height="26" width="90" align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">栏目名称:</font></td>
<td class="bline" <if condition="!strstr($picnum,'1')">colspan="2"<else /> width="350"</if>><input name="catname" type="text" id="catname" size="30" class="iptxt" value="<{$data.catname}>"></td>
<if condition="strstr($picnum,'1')">
<td rowspan="4"><img src="<{$data.thumb|Thumb}>" id="picida" style=" max-height:150px; max-width:550px;"></td>
</if>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">英文名称:</font></td>
<td class="bline" <if condition="!strstr($picnum,'1')">colspan="2"</if>><input name="catename" type="text" id="catename" size="30" class="iptxt" value="<{$data.catename}>"></td>
</tr>
<if condition="strstr($picnum,'1')">
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right">图片:</td>
<td><input name="thumb" type="text" id="picid" value="<{$data.thumb}>"><input type="button" value="上传图片" style="cursor:pointer;" id="uploadid"></td>
</tr>
</if>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right"> 排列顺序: </td>
<td class="bline" <if condition="!strstr($picnum,'1')">colspan="2"</if>><input name="sort" size="6" type="text" value="<{$data.sort}>" class="pubinputs" style="width:60px"></td>
</tr>
<tr>
<td height="26" align="right" class="text_right_wid_140 pad_right_10">链接地址:</td>
<td><input name="linkurl" type="text" id="linkurl" class="width_220" value="<{$data.linkurl}>"><span class="note">(例如:http://www.baidu.com)</span></td>
</tr>
<tr>
<td colspan="3" style="text-align:center">
<input name="id" type="hidden" value="<{$data.id}>" />
<input name="domain" type="submit" style=" background:url(__PUB__img/button_save.gif); width:60px; height:22px; border:0" value=" ">
&nbsp;&nbsp;&nbsp;
<a href="javascript:history.go(-1);"><img src="__PUB__img/button_back.gif" width="60" height="22" border="0"></a>
</td>
</tr>
</tbody>
</table>
</form>
</div>
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<style>
table tr td{padding:0 5px; line-height:31px !important;}
.table{border-collapse: collapse; width:100%; }
.upimg{display: inline-block;}
.upimg img{ max-height:25px;}
</style>
<script type="text/javascript" src="__PUB__js/layer2/layer.js"></script>
<script>
/*layer.config({
extend: 'extend/layer.ext.js',
shift: 0, //默认动画风格
// skin: 'layui-layer-molv' //默认皮肤
});
layer.ready(function(){
layer.photos({
photos: '.upimg'
});
});*/
$(function(){
$(".upimg").each(function(){
$(this).click(function(){
layer.open({
title:' ',
type: 1,
shadeClose: true,
area: ['70%','90%'], //宽高
content: '<img src="'+$(this).children('img').attr('src')+'" style="display:block; margin:0 auto; max-width:100%;" />',
});
});
});
$(".pdf").each(function(){
$(this).click(function(){
layer.open({
title:'',
type: 2,
shadeClose: true,
area: ['90%','90%'], //宽高
content: 'http://<{$Think.server.SERVER_NAME}><{:U("Public/pdf",'','')}>/pp/'+Math.random()+'/pdfval/'+$(this).attr('pdfval'),
});
});
});
});
</script>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<form name="form" action="" method="post">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="4" style="padding-left:10px;">
<div style="float:left">
<b><{$page_title}></b>
</div>
<div style="float:right">
[<a href="javascript:history.go(-1);"><u>返回列表</u></a>]
</div>
</td>
</tr>
<tr>
<?php
$ii = 1;
foreach($field as $k => $v){
if($v=='status'){ continue;}
if($regfields[$v]['istags'] == 1 || $regfields[$v]['type'] == 'c_heckbox'){ //标签 多选框去掉两边多余的,
$data[$v] = trim($data[$v],',');
}
if($regfields[$v]['fline'] == 2){ //占用整行
echo $ii == 1?'':'</tr><tr>';
echo '<td style="text-align:right; font-weight:bold;" width="10%">';
if($regfields[$v]['required']==1){ echo '<font color="#ff0000;">*</font> '; }//必填
echo $regfields[$v]['description'].':</td><td colspan="3">';
echo checkApply2($regfields[$v]['type'],$regfields[$v]['name'],array('val'=>$regfields[$v]['d_value'],'row'=>$regfields[$v]['rownum'],'col'=>$regfields[$v]['colnum'],'ctitle'=>$regfields[$v]['ctitle']),$regfields[$v]['isdate'],$data[$v],$regfields[$v]['upfile']);
echo '</td></tr><tr>';
$ii = 1;
}else{
echo '<td style="text-align:right; font-weight:bold;" width="10%">';
if($regfields[$v]['required']==1){ echo '<font color="#ff0000;">*</font> '; }//必填
echo $regfields[$v]['description'].':</td><td width="40%">';
echo checkApply2($regfields[$v]['type'],$regfields[$v]['name'],array('val'=>$regfields[$v]['d_value'],'row'=>$regfields[$v]['rownum'],'col'=>$regfields[$v]['colnum'],'ctitle'=>$regfields[$v]['ctitle']),$regfields[$v]['isdate'],$data[$v],$regfields[$v]['upfile']);
echo '</td>';
if($ii == 2 && $k != (count($field)-1)){
echo '</tr><tr>';
$ii = 1;
}else{
$ii++;
}
}
}
?>
</tr>
<tr>
<td style="text-align:right; font-weight:bold;">审核状态:</td><td colspan="3" >
<if condition="$data['status'] eq 2">审核通过<elseif condition="$data['status'] eq 1" /><span style="color:red">审核不通过</span><else /><span style="color:red">未审核</span></if>
</td>
</tr>
</tbody></table>
<input type="hidden" name="p" value="<{$p|default=1}>" />
</form>
</div>
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="shortcut icon" href="__ROOT__/favicon.ico" media="screen">
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<style>
#upid {
font-family: "宋体";
}
</style>
<link rel="stylesheet" href="__ROOTPUB__kindeditor/themes/default/default.css" />
<script charset="utf-8" src="__ROOTPUB__kindeditor/kindeditor-min.js"></script>
<script charset="utf-8" src="__ROOTPUB__kindeditor/lang/zh_CN.js"></script>
<script>
KindEditor.ready(function(K) {
var editor = K.create('textarea[name="content"]', {
uploadJson : "<{:U('Kind/upload_json')}>",
fileManagerJson : "<{:U('Kind/file_manager_json')}>",
allowFileManager : true
});
var editor1 = K.editor({
uploadJson : "<{:U('Kind/upload_json')}>",
fileManagerJson : "<{:U('Kind/file_manager_json')}>",
allowFileManager : true
});
K('#uploadid').click(function() {
editor1.loadPlugin('image', function() {
editor1.plugin.imageDialog({
imageUrl : K('#picid').val(),
clickFn : function(url, title, width, height, border, align) {
K('#picid').val(url);
//K('#picida').src(url);
document.getElementById('picida').src=url;
editor1.hideDialog();
}
});
});
});
K('#uploadfid').click(function(){
editor1.loadPlugin('insertfile', function(){
editor1.plugin.fileDialog({
fileUrl : K('#fileid').val(),
clickFn : function(url, title) {
K('#fileid').val(url);
editor1.hideDialog();
}
});
});
});
K('#J_selectImage').click(function() {
editor1.loadPlugin('multiimage', function() {
editor1.plugin.multiImageDialog({
clickFn : function(urlList) {
var div = K('#img');
// div.html('');
K.each(urlList, function(i, data) {
div.append('<p><img src="' + data.url + '" /><input type="hidden" name="img[]" value="' + data.url + '" /></p>');
});
editor1.hideDialog();
}
});
});
});
});
$(function(){
//删除图片
$("#img").delegate("p","click",function(){
if(window.confirm('你确定要删除此图片吗?')){
var p=$(this);
var f=p.children('img').attr('src');
var validate={
file:f
};
$.get("<{:U('delFile')}>", validate, function(data){
if(data == 'yes')
{
p.remove();
}
else
{
alert('删除失败');
}
});
}
});
});
</script>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<form name="form1" action="" method="post">
<table class="table table-condensed table-bordered table-hover" style="">
<tbody>
<tr>
<td colspan="3" style="padding-left:10px;"><div style="float:left"><b>编辑-><{$data.catname}></b></div></td>
</tr>
<tr>
<td height="26" width="90" align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">栏目名称:</font></td>
<td class="bline" <if condition="!strstr($picnum,'1')">colspan="2"<else /> width="350"</if>><input name="catname" type="text" id="catname" size="30" class="iptxt" value="<{$data.catname}>"></td>
<if condition="strstr($picnum,'1')">
<td rowspan="4"><img src="<{$data.thumb|Thumb}>" id="picida" style=" max-height:150px; max-width:550px;"></td>
</if>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">英文名称:</font></td>
<td class="bline" <if condition="!strstr($picnum,'1')">colspan="2"</if>><input name="catename" type="text" id="catename" size="30" class="iptxt" value="<{$data.catename}>"></td>
</tr>
<if condition="strstr($picnum,'1')">
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right">图片:</td>
<td><input name="thumb" type="text" id="picid" value="<{$data.thumb}>"><input type="button" value="上传图片" style="cursor:pointer;" id="uploadid"></td>
</tr>
</if>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right"> 排列顺序: </td>
<td class="bline" <if condition="!strstr($picnum,'1')">colspan="2"</if>><input name="sort" size="6" type="text" value="<{$data.sort}>" class="pubinputs" style="width:60px"></td>
</tr>
<tr class="picnum_2 <if condition="!strstr($picnum,'2')">display_none</if>">
<td class="text_right_wid_90">内容页多图:</td>
<td colspan="3">
<input type="button" id="J_selectImage" value="批量上传" />
</td>
</tr>
<tr class="picnum_2 <if condition="!strstr($picnum,'2')">display_none</if>">
<td colspan="4" id="img"></td>
</tr>
<tr class="picnum_3 <if condition="!strstr($picnum,'3')">display_none</if>">
<td class="text_right_wid_90">附 件:</td>
<td colspan="3">
<input name="file" type="text" id="fileid" value=""><input type="button" value="上传附件" style="cursor:pointer;" id="uploadfid">
</td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right">SEO标题:</td>
<td class="bline" colspan="2"><input name="title" type="text" id="seotitle" size="30" style="width:400px;" class="iptxt" value="<{$data.title}>"></td>
</tr>
<tr>
<td height="80" align="right" class="bline" style="padding-left:10px; text-align:right">关键词: </td>
<td colspan="2"><textarea name="keywords" style="height:60px; width:500px;" cols="60"><{$data.keywords}></textarea></td>
</tr>
<tr>
<td height="80" align="right" class="bline" style="padding-left:10px; text-align:right">描述: </td>
<td colspan="2"><textarea name="description" style="height:60px; width:500px;" cols="60"><{$data.description}></textarea></td>
</tr>
<tr>
<td style="text-align:right; vertical-align:middle"><font color="red">内容:</font></td>
<td colspan="2"><textarea name="content" id="content" style="width: 99%; height:500px; display: none;"><{$data.content}></textarea></td>
</tr>
<tr>
<td colspan="3" style="text-align:center">
<input name="id" type="hidden" value="<{$data.id}>" />
<input name="domain" type="submit" style=" background:url(__PUB__img/button_save.gif); width:60px; height:22px; border:0" value=" ">
&nbsp;&nbsp;&nbsp;
<a href="javascript:history.go(-1);"><img src="__PUB__img/button_back.gif" width="60" height="22" border="0"></a>
</td>
</tr>
</tbody>
</table>
</form>
</div>
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<load href='__PUB__js/pp_check.js'/>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<form name="group" action="" method="post">
<table class="table table-condensed table-bordered table-hover">
<tbody>
<tr>
<td colspan="2" style="padding-left:10px;">
<div style="float:left">
<b>添加分配</b>
</div>
<div style="float:right">
[<a href="<{:U('fenpei')}>"><u>返回列表</u></a>]
</div>
</td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">管理员名称:</font></td>
<td>
<select name="uid" onChange="select_check('uid');">
<option value="">请选择会员</option>
<volist name="admin" id="v">
<option value="<{$v.id}>"><{$v.username}></option>
</volist>
</select>
</td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">角色:</font></td>
<td>
<php>$empty='<a href="'.U('addgroup').'">无用角色,请先添加角色</a>';</php>
<volist name="groups" id="v" empty="$empty">
<input name="group_id" type="radio" value='<{$v.id}>' /> <{$v.title}> &nbsp;
</volist>
</td>
</tr>
<tr>
<td colspan="2" style="text-align:center">
<input name="submit" type="submit" style=" background:url(__PUB__img/button_save.gif); width:60px; height:22px; border:0" value=" "> &nbsp;&nbsp;&nbsp;<a href="javascript:history.go(-1);"><img src="__PUB__img/button_back.gif" width="60" height="22" border="0"></a>
</td>
</tr>
</tbody>
</table>
</form>
</div>
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<load href='__PUB__js/pp_check.js'/>
<script>
/**
* 实现全选
* @param fm 包裹的form表单
*/
function selectAll(fm){
if(fm.elements.length <= 0) {
return;
}else {
for(var i in fm.elements) {
if(fm.elements[i].type == 'checkbox') {
fm.elements[i].checked = true;
}
}
}
}
/**
* 取消全选
*/
function UnSelectAll(fm) {
if(fm.elements.length <= 0) {
return;
}else {
for(var i in fm.elements) {
if(fm.elements[i].type == 'checkbox') {
fm.elements[i].checked = false;
}
}
}
}
</script>
<style>
.pp_button{padding:0px 8px; font-weight:bold; line-height:180%; font-size:13px;}
</style>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<form name="group" action="" method="post">
<table class="table table-condensed table-bordered table-hover">
<tbody>
<tr>
<td colspan="2" style="padding-left:10px;">
<div style="float:left">
<b>添加角色</b>
</div>
<div style="float:right">
[<a href="<{:U('group')}>"><u>返回列表</u></a>]
</div>
</td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">角色名称:</font></td>
<td><input name="title" type="text" value="" onblur="input_check('title');"></td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">是否启用</font></td>
<td>
<input type="radio" name="status" value="1" checked="checked" /> 启用 &nbsp; <input type="radio" name="status" value="0" /> 关闭
</td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">规则:</font></td>
<td class="group_rule">
<div><button class='btn btn-mini pp_button' onclick="selectAll(this.form);return false;">全 选</button>&nbsp;&nbsp;<button class='btn btn-mini pp_button' onclick="UnSelectAll(this.form);return false;">取消全选</button></div>
<php>$empty='<a href="'.U('addrule').'">无规则,请先添加规则</a>';</php>
<volist name="rules" id="v" empty="$empty">
<php>
if($catid != $v['catid'])
{
$catid=$v['catid'];
$cat_true=true;
}
else
{
$cat_true=false;
}
if($cat_true) echo '<div class="title">'.$authcategory[$catid].'</div>';
</php>
<span><input name="rules[]" type="checkbox" value='<{$v.id}>' onclick="checkbox_check('rules[]');" id="pp_<{$v.id}>"/> <label for="pp_<{$v.id}>" style="display:inline; font-size:12px;"><{$v.title}></label></span>
</volist>
</td>
</tr>
<tr>
<td colspan="2" style="text-align:center">
<input name="submit" type="submit" style=" background:url(__PUB__img/button_save.gif); width:60px; height:22px; border:0" value=" "> &nbsp;&nbsp;&nbsp;<a href="javascript:history.go(-1);"><img src="__PUB__img/button_back.gif" width="60" height="22" border="0"></a>
</td>
</tr>
</tbody>
</table>
</form>
</div>
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<load href='__PUB__js/pp_check.js'/>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<form name="rule" action="" method="post">
<table class="table table-condensed table-bordered table-hover">
<tbody>
<tr>
<td colspan="2" style="padding-left:10px;">
<div style="float:left">
<b>添加规则</b>
</div>
<div style="float:right">
[<a href="<{:U('rules')}>"><u>返回列表</u></a>]
</div>
</td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">分类:</font></td>
<td>
<select name="catid">
<option value="">请选择</option>
<foreach name="authcategory" key="k" item="v">
<option value="<{$k}>"><{$v}></option>
</foreach>
</select>
</td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">规则名称:</font></td>
<td><input name="title" type="text" value="" onblur="input_check('title');"></td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">是否启用</font></td>
<td>
<input type="radio" name="status" value="1" checked="checked" /> 启用 &nbsp; <input type="radio" name="status" value="0" /> 关闭
</td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">规则内容:</font></td>
<td>
<input name="name" type="text" value='' onblur="input_check('name');"/>
</td>
</tr>
<tr>
<td class="text_right_wid_90">条件:</td>
<td>
<input name="condition" type="text" value='' />
</td>
</tr>
<tr>
<td class="text_right_wid_90">排序:</td>
<td>
<input name="sort" type="text" value='' />
</td>
</tr>
<tr>
<td colspan="2" style="text-align:center">
<input name="submit" type="submit" style=" background:url(__PUB__img/button_save.gif); width:60px; height:22px; border:0" value=" "> &nbsp;&nbsp;&nbsp;<a href="javascript:history.go(-1);"><img src="__PUB__img/button_back.gif" width="60" height="22" border="0"></a>
</td>
</tr>
</tbody>
</table>
</form>
</div>
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>|后台管理系统</title>
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/node.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.form.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.custom.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<table class="table table-condensed table-bordered">
<tbody><tr>
<td colspan="11" style="padding-left:10px;">
<div style="float:left">
<b>节点列表</b>
</div>
<div style="float:right">
[<!--a href=""><u>增加应用</u></a-->]
</div>
</td>
</tr>
<tr>
<td>
<div class="app">
<div class="title">
<div class="pull-left"><i class="icon-th-large"></i> 功能授权</div>
</div>
<volist name="data" id="v">
<div class="action">
<div class="title">
<div class="pull-left"><i class="icon-th"></i><{$v.key}></div></div>
<volist name="v['list']" id="vo">
<div class="method">
<div><input name="check" type="checkbox" value="<{$vo.id}>" <if condition="$vo['is'] eq 1"> checked</if>><{$vo.title}>[<{$vo.name}>]</div>
</div>
</volist>
</div>
</volist>
</div>
</td>
</tr>
</tbody></table>
</div>
</body></html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<form name="form" action="" method="post">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="2" style="padding-left:10px;">
<div style="float:left">
<b>添加管理员</b>
</div>
<div style="float:right">
[<a href="<{:U('index')}>"><u>返回列表</u></a>]
</div>
</td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">登陆账号:</font></td>
<td class="bline"><input name="username" type="text" id="username" size="30" class="iptxt" value="<{$data.username}>"></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">姓名:</font></td>
<td class="bline"><input name="name" type="text" id="name" size="30" class="iptxt" value="<{$data.name}>"></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">角色:</font></td>
<td class="bline">
<select name="role" id="role" style="width:200px">
<volist name="list_role" id="vo">
<option value="<{$vo.id}>" <if condition="$vo['id'] eq $data['role']">selected</if> >
<{$vo.name}>
</option>
</volist>
</select>
</td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right">密码:</td>
<td class="bline"><input name="password" type="password" id="password" size="30" class="iptxt"></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right">确认密码:</td>
<td class="bline"><input name="password2" type="password" id="password2" size="30" class="iptxt"></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right">电话:</td>
<td class="bline"><input name="tel" type="text" id="tel" size="30" class="iptxt" value="<{$data.tel}>"></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right">邮箱:</td>
<td class="bline"><input name="email" type="email" id="email" size="30" class="iptxt" value="<{$data.email}>"></td>
</tr>
<tr><td colspan="2" style="text-align:center">
<input name="id" type="hidden" id="id" size="30" class="iptxt" value="<{$data.id}>">
<input name="domain" type="submit" style=" background:url(__PUB__img/button_save.gif); width:60px; height:22px; border:0" value=" ">
&nbsp;&nbsp;&nbsp;<a href="javascript:history.go(-1);"><img src="__PUB__img/button_back.gif" width="60" height="22" border="0"></a></td></tr>
</tbody></table>
</form>
</div>
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<load href='__PUB__js/pp_check.js'/>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<form name="group" action="" method="post">
<table class="table table-condensed table-bordered table-hover">
<tbody>
<tr>
<td colspan="2" style="padding-left:10px;">
<div style="float:left">
<b>修改分配</b>
</div>
<div style="float:right">
[<a href="<{:U('fenpei')}>"><u>返回列表</u></a>]
</div>
</td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">管理员名称:</font></td>
<td>
<{$admin[$data['uid']]}>
<input type="hidden" name="uid" value="<{$data.uid}>" />
</td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">角色:</font></td>
<td>
<php>$empty='<a href="'.U('addgroup').'">无用角色,请先添加角色</a>';</php>
<volist name="groups" id="v" empty="$empty">
<input name="group_id" type="radio" value='<{$v.id}>' <eq name="v.id" value="$data.group_id">checked="checked"</eq> /> <{$v.title}> &nbsp;
</volist>
</td>
</tr>
<tr>
<td colspan="2" style="text-align:center">
<input name="submit" type="submit" style=" background:url(__PUB__img/button_save.gif); width:60px; height:22px; border:0" value=" "> &nbsp;&nbsp;&nbsp;<a href="javascript:history.go(-1);"><img src="__PUB__img/button_back.gif" width="60" height="22" border="0"></a>
</td>
</tr>
</tbody>
</table>
<input type="hidden" name="id" value="<{$data.id}>" />
</form>
</div>
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<load href='__PUB__js/pp_check.js'/>
<script>
/**
* 实现全选
* @param fm 包裹的form表单
*/
function selectAll(fm){
if(fm.elements.length <= 0) {
return;
}else {
for(var i in fm.elements) {
if(fm.elements[i].type == 'checkbox') {
fm.elements[i].checked = true;
}
}
}
}
/**
* 取消全选
*/
function UnSelectAll(fm) {
if(fm.elements.length <= 0) {
return;
}else {
for(var i in fm.elements) {
if(fm.elements[i].type == 'checkbox') {
fm.elements[i].checked = false;
}
}
}
}
</script>
<style>
.pp_button{padding:0px 8px; font-weight:bold; line-height:180%; font-size:13px;}
</style>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<form name="group" action="" method="post">
<table class="table table-condensed table-bordered table-hover">
<tbody>
<tr>
<td colspan="2" style="padding-left:10px;">
<div style="float:left">
<b>修改角色</b>
</div>
<div style="float:right">
[<a href="<{:U('group')}>"><u>返回列表</u></a>]
</div>
</td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">角色名称:</font></td>
<td><input name="title" type="text" value="<{$data.title}>" onblur="input_check('title');"></td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">是否启用</font></td>
<td>
<input type="radio" name="status" value="1" <eq name="data.status" value="1">checked="checked"</eq> /> 启用 &nbsp; <input type="radio" name="status" value="0" <eq name="data.status" value="0">checked="checked"</eq> /> 关闭
</td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">规则:</font></td>
<td class="group_rule">
<div><button class='btn btn-mini pp_button' onclick="selectAll(this.form);return false;">全 选</button>&nbsp;&nbsp;<button class='btn btn-mini pp_button' onclick="UnSelectAll(this.form);return false;">取消全选</button></div>
<php>$empty='<a href="'.U('addrule').'">无规则,请先添加规则</a>';</php>
<volist name="rules" id="v" empty="$empty">
<php>
if($catid != $v['catid'])
{
$catid=$v['catid'];
$cat_true=true;
}
else
{
$cat_true=false;
}
if($cat_true) echo '<div class="title">'.$authcategory[$catid].'</div>';
</php>
<span><input name="rules[]" type="checkbox" value='<{$v.id}>' <in name="v.id" value="$data.rules">checked="checked"</in> onclick="checkbox_check('rules[]');" id="pp_<{$v.id}>"/> <label for="pp_<{$v.id}>" style="display:inline; font-size:12px;"><{$v.title}></label></span>
</volist>
</td>
</tr>
<tr>
<td colspan="2" style="text-align:center">
<input name="submit" type="submit" style=" background:url(__PUB__img/button_save.gif); width:60px; height:22px; border:0" value=" "> &nbsp;&nbsp;&nbsp;<a href="javascript:history.go(-1);"><img src="__PUB__img/button_back.gif" width="60" height="22" border="0"></a>
<input type="hidden" name="id" value="<{$data.id}>" />
</td>
</tr>
</tbody>
</table>
</form>
</div>
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<load href='__PUB__js/pp_check.js'/>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<form name="rule" action="" method="post">
<table class="table table-condensed table-bordered table-hover">
<tbody>
<tr>
<td colspan="2" style="padding-left:10px;">
<div style="float:left">
<b>添加规则</b>
</div>
<div style="float:right">
[<a href="<{:U('rules')}>"><u>返回列表</u></a>]
</div>
</td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">分类:</font></td>
<td>
<select name="catid">
<option value="">请选择</option>
<foreach name="authcategory" item="v" key="k">
<option value="<{$k}>" <eq name="k" value="$data.catid"> selected="selected"</eq>><{$v}></option>
</foreach>
</select>
</td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">规则名称:</font></td>
<td><input name="title" type="text" value="<{$data.title}>" onblur="input_check('title');"></td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">是否启用</font></td>
<td>
<input type="radio" name="status" value="1" <if condition="!$data['status'] || $data['status'] eq 1">checked="checked"</if> /> 启用 &nbsp; <input type="radio" name="status" value="0" <eq name="data.status" value="0">checked="checked"</eq> /> 关闭
</td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">规则内容:</font></td>
<td>
<input name="name" type="text" value='<{$data.name}>' onblur="input_check('name');"/>
</td>
</tr>
<tr>
<td class="text_right_wid_90">条件:</td>
<td>
<input name="condition" type="text" value='<{$data.condition}>' />
</td>
</tr>
<tr>
<td class="text_right_wid_90">排序:</td>
<td>
<input name="sort" type="text" value='<{$data.sort}>' />
</td>
</tr>
<tr>
<td colspan="2" style="text-align:center">
<input name="submit" type="submit" style=" background:url(__PUB__img/button_save.gif); width:60px; height:22px; border:0" value=" "> &nbsp;&nbsp;&nbsp;<a href="javascript:history.go(-1);"><img src="__PUB__img/button_back.gif" width="60" height="22" border="0"></a>
<input type="hidden" name="id" value="<{$data.id}>" />
</td>
</tr>
</tbody>
</table>
<input type="hidden" name="search" value="<{$search}>">
<input type="hidden" name="p" value="<{$p}>">
</form>
</div>
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<!-- saved from url=(0050)http://localhost/cms/index.php/admin/Article/index -->
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<script>
$(document).ready(function(){
$("#SelectAll").click(function(){
$("input[name='id']").checkCbx();
});
$(".YanZheng").click(function(event){
var a=$("input:checked").length;
if(a==0){
alert('您还没有请选择操作内容!');
event.preventDefault();
}
});
});
$.fn.checkCbx = function(){
return this.each(function(){
this.checked = !this.checked;
});
}
/* 审核 */
function checkArc(aid){
var qstr=getCheckboxItem();
if(aid==0) aid = getOneItem();
location="/admin.php?m=Authc&a=ischeck&id="+qstr;
}
/* 删除审核 */
function checkArcd(aid){
var qstr=getCheckboxItem();
if(aid==0) aid = getOneItem();
location="/admin.php?m=Authc&a=ischeckd&id="+qstr;
}
/* 推荐 */
function adArc(aid){
var qstr=getCheckboxItem();
if(aid==0) aid = getOneItem();
location="/admin.php?m=Authc&a=isbest&id="+qstr;
}
/* 删除推荐 */
function adArcd(aid){
var qstr=getCheckboxItem();
if(aid==0) aid = getOneItem();
location="/admin.php?m=Authc&a=isbestd&id="+qstr;
}
/* 删除信息 */
function delArc(aid){
if(window.confirm('您确定要删除吗?')){
var qstr=getCheckboxItem();
location="<{:U('delallfenpei','','')}>/id/"+qstr;
}
else
{
return false;
}
}
/* 修改信息属性 */
function chang_status(id,value,table)
{
var newvalue=0;
if(value == 1)
newvalue=0;
else
newvalue=1;
var submitData = {
id:id,
status:newvalue,
table:table
};
$.post("<{:U('editattr')}>",submitData,
function(data) {
if (data.success == true) {
alert(data.msg);
setTimeout('window.location.href=location.href',1000);
return;
}
else {}
}
,'json');
}
/* 获得选中文件的文件名 */
function getCheckboxItem()
{
var allSel="";
//if(document.form2.id.value) return document.form2.id.value;
if($('input[name="id"]').length == 1 && $('input[name="id"]:checked').length == 1)
{
return document.form2.id.value;
}
for(i=0;i<document.form2.id.length;i++)
{
if(document.form2.id[i].checked)
{
if(allSel=="")
allSel=document.form2.id[i].value;
else
allSel=allSel+","+document.form2.id[i].value;
}
}
return allSel;
}
$(function(){
/* $('.confirmdel').click(function(){
var url=$(this).attr('href');
if(window.confirm('你确定要删除吗?'))
{
window.location=url;
}
return false;
});
*/
/* 全选
$('#selAll').click(function(){
$('input[name="id"]').attr('checked',true);
}); */
/* 取消全选
$('#noselAll').click(function(){
$('input[name="id"]').each(function () {
$(this).attr("checked", !$(this).attr("checked"));
});
}); */
});
</script>
<style>
#colid1 {
font-family: "宋体";
}
</style>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<table class="table table-condensed table-bordered table-hover">
<tbody>
<tr>
<td colspan="10" style="padding-left:10px;">
<div style="float:left">
<b>角色分配管理</b>
</div>
<div style="float:right">
[<a href="<{:U('addfenpei')}>"><u>增加分配</u></a>]
</div>
</td>
</tr>
<form name="form2" action="<{:U('form')}>" method="post">
<tr align="center">
<td width="6%" class="text_center">ID</td>
<td width="4%" class="text_center">选择</td>
<td width="20%" class="text_center">会员名称</td>
<td width="40%" class="text_center">角色</td>
<td width="30%" class="text_center">管理项</td>
</tr>
<volist name="lists" id="list">
<tr class="text_center">
<td nowrap="" class="text_center"><{$list['id']}></td>
<td class="text_center"><input name="id" type="checkbox" id="check" value="<{$list.id}>" class="np"></td>
<td class="text_center"><{$list['username']['username']}></td>
<td class="text_center">
<volist name="list.group_id" id="v">
<{$groups.$v}>、
</volist>
</td>
<td class="text_center">
<a href='<{:U('editfenpei',array('id'=>$list['id']))}>' class="btn btn-mini"><i class="icon-edit"></i> 修改</a>
<a href='<{:U('delfenpei',array('id'=>$list['id']))}>' class="btn btn-mini"><i class="icon-trash"></i> 删除</a>
</td>
</tr>
</volist>
<tr>
<td colspan="10" align="right">
<input type="hidden" value="<{$_GET['p']}>" name="p">
<a href="javascript:void(0)" class="btn btn-mini" id="SelectAll"><i class="icon-check"></i> 全选/反选</a>&nbsp;
<button class="btn btn-mini YanZheng" name="Delete" value=" " type="button" style="cursor:pointer;" onclick="javascript:delArc(0);"><i class="icon-trash"></i> 删除</button>&nbsp;
</td>
</tr>
</form>
<tr>
<td colspan="10">
<div class="pagination">
<ul><{$page}></ul>
</div>
</td>
</tr>
</tbody></table>
</div>
</body></html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>角色管理</title>
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<script>
/* 修改信息属性 */
function chang_status(id,value,table)
{
var newvalue=0;
if(value == 1)
newvalue=0;
else
newvalue=1;
var submitData = {
id:id,
status:newvalue,
table:table
};
$.post("<{:U('editattr')}>",submitData,
function(data) {
if (data.success == true) {
alert(data.msg);
setTimeout('window.location.href=location.href',1000);
return;
}
else {}
}
,'json');
}
</script>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<table class="table table-condensed table-bordered table-hover">
<tbody>
<tr>
<td colspan="5" style="padding-left:10px;">
<div style="float:left">
<b>角色列表</b>
</div>
<div style="float:right">
[<a href="<{:U('addgroup')}>"><u>增加角色</u></a>]
</div>
</td>
</tr>
<tr>
<td width="5%" style="text-align:center">ID</td>
<td width="20%" style="text-align:center">角色名称</td>
<td width="10%" style="text-align:center">状态</td>
<td width="50%" style="text-align:center">规则内容</td>
<td width="15%" style="text-align:center">操作项</td>
</tr>
<volist name="lists" id="vo" key="k">
<tr>
<td style="text-align:center"><{$vo.id}></td>
<td style="text-align:center"><{$vo.title}></td>
<td style="text-align:center">
<a href="javascript:chang_status(<{$vo.id}>,<{$vo.status}>,'Authgroup');"><eq name="vo.status" value="1"><i class="icon-ok"></i><else /><span class="red"><i class="icon-no"></i></span></eq></a>
</td>
<td style="text-align:center">
<volist name="vo.rules" id="v">
<{$rules.$v}>、
</volist>
</td>
<td style="text-align:center">
<a href="<{:U('editgroup',array('id'=>$vo['id']))}>" class="btn btn-mini"><i class="icon-edit"></i> 修改</a> &nbsp; <a href="<{:U('delgroup',array('id'=>$vo['id']))}>" class="btn btn-mini"><i class="icon-trash"></i> 删除</a>
</td>
</tr>
</volist>
</tbody></table>
</div>
</body></html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>管理员|后台管理系统</title>
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="5" style="padding-left:10px;">
<div style="float:left">
<b>角色管理</b>
</div>
<div style="float:right">
[<a href="<{:U('roleadd')}>"><u>增加角色</u></a>]
</div>
</td>
</tr>
<tr>
<td width="4%" style="text-align:center">排序</td>
<td width="25%" style="text-align:center">角色名称</td>
<td width="15%" style="text-align:center">管理员数量</td>
<td width="10%" style="text-align:center">状态</td>
<td style="text-align:center">操作项</td>
</tr>
<volist name="lists" id="vo" key="k">
<tr>
<td style="text-align:center"><{$k}></td>
<td style="text-align:center"><{$vo.name}></td>
<td style="text-align:center"><{$vo.id|AdminNum}></td>
<td style="text-align:center">
<a href="<{:U('roleshow',array('tid'=>I('tid'),'id'=>$vo['id'],'p'=>I('p')))}>" class="btn btn-mini">
<if condition="$vo['isshow'] eq 1 ">
<i class="icon-ok"></i>
<else />
<i class="icon-no"></i>
</if>
</a>
</td>
<td style="text-align:center">
<a href="<{:U('auth',array('id'=>$vo['id']))}>" class="btn btn-mini"><i class="icon-edit"></i> 功能授权</a>
<a href="<{:U('authcat',array('id'=>$vo['id']))}>" class="btn btn-mini"><i class="icon-edit"></i> 内容授权</a>
<a href="<{:U('roleedit',array('id'=>$vo['id']))}>" class="btn btn-mini"><i class="icon-edit"></i> 编辑</a>
<a href="<{:U('delete',array('id'=>$vo['id']))}>" class="btn btn-mini"><i class="icon-trash"></i> 删除</a>
</td>
</tr>
</volist>
</tbody></table>
</div>
</body></html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<form name="form" action="" method="post">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="2" style="padding-left:10px;">
<div style="float:left">
<b>添角色员</b>
</div>
<div style="float:right">
[<a href="<{:U('role')}>"><u>返回列表</u></a>]
</div>
</td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">角色名称:</font></td>
<td class="bline"><input name="title" type="text" id="title" size="30" class="iptxt"></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right">排序:</td>
<td class="bline"><input name="sort" type="text" id="sort" size="30" class="iptxt"></td>
</tr>
<tr><td colspan="2" style="text-align:center">
<input name="domain" type="submit" style=" background:url(__PUB__img/button_save.gif); width:60px; height:22px; border:0" value=" ">
&nbsp;&nbsp;&nbsp;<a href="javascript:history.go(-1);"><img src="__PUB__img/button_back.gif" width="60" height="22" border="0"></a></td></tr>
</tbody></table>
</form>
</div>
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<form name="form" action="" method="post">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="2" style="padding-left:10px;">
<div style="float:left">
<b>添角色员</b>
</div>
<div style="float:right">
[<a href="<{:U('role')}>"><u>返回列表</u></a>]
</div>
</td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">角色名称:</font></td>
<td class="bline"><input name="name" type="text" id="name" size="30" class="iptxt" value="<{$data.name}>"></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right">排序:</td>
<td class="bline"><input name="sort" type="text" id="sort" size="30" class="iptxt" value="<{$data.sort}>"></td>
</tr>
<tr><td colspan="2" style="text-align:center">
<input name="id" type="hidden" value="<{$data.id}>">
<input name="domain" type="submit" style=" background:url(__PUB__img/button_save.gif); width:60px; height:22px; border:0" value=" ">
&nbsp;&nbsp;&nbsp;<a href="javascript:history.go(-1);"><img src="__PUB__img/button_back.gif" width="60" height="22" border="0"></a></td></tr>
</tbody></table>
</form>
</div>
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<!-- saved from url=(0050)http://localhost/cms/index.php/admin/Article/index -->
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<script>
$(document).ready(function(){
$("#SelectAll").click(function(){
$("input[name='id']").checkCbx();
});
$(".YanZheng").click(function(event){
var a=$("input:checked").length;
if(a==0){
alert('您还没有请选择操作内容!');
event.preventDefault();
}
});
});
$.fn.checkCbx = function(){
return this.each(function(){
this.checked = !this.checked;
});
}
/* 审核 */
function checkArc(aid){
var qstr=getCheckboxItem();
if(aid==0) aid = getOneItem();
location="/admin.php?m=Authc&a=ischeck&id="+qstr;
}
/* 删除审核 */
function checkArcd(aid){
var qstr=getCheckboxItem();
if(aid==0) aid = getOneItem();
location="/admin.php?m=Authc&a=ischeckd&id="+qstr;
}
/* 推荐 */
function adArc(aid){
var qstr=getCheckboxItem();
if(aid==0) aid = getOneItem();
location="/admin.php?m=Authc&a=isbest&id="+qstr;
}
/* 删除推荐 */
function adArcd(aid){
var qstr=getCheckboxItem();
if(aid==0) aid = getOneItem();
location="/admin.php?m=Authc&a=isbestd&id="+qstr;
}
/* 删除信息 */
function delArc(aid){
if(window.confirm('您确定要删除吗?')){
var qstr=getCheckboxItem();
location="<{:U('delallrule',array('p'=>I('p',1,'intval'),'search'=>I('search')),'')}>/id/"+qstr;
}
else
{
return false;
}
}
/* 修改信息属性 */
function chang_status(id,value,table)
{
var newvalue=0;
if(value == 1)
newvalue=0;
else
newvalue=1;
var submitData = {
id:id,
status:newvalue,
table:table
};
$.post("<{:U('editattr')}>",submitData,
function(data) {
if (data.success == true) {
alert(data.msg);
setTimeout('window.location.href=location.href',1000);
return;
}
else {}
}
,'json');
}
/* 获得选中文件的文件名 */
function getCheckboxItem()
{
var allSel="";
//if(document.form2.id.value) return document.form2.id.value;
if($('input[name="id"]').length == 1 && $('input[name="id"]:checked').length == 1)
{
return document.form2.id.value;
}
for(i=0;i<document.form2.id.length;i++)
{
if(document.form2.id[i].checked)
{
if(allSel=="")
allSel=document.form2.id[i].value;
else
allSel=allSel+","+document.form2.id[i].value;
}
}
return allSel;
}
$(function(){
/* $('.confirmdel').click(function(){
var url=$(this).attr('href');
if(window.confirm('你确定要删除吗?'))
{
window.location=url;
}
return false;
});
*/
/* 全选
$('#selAll').click(function(){
$('input[name="id"]').attr('checked',true);
}); */
/* 取消全选
$('#noselAll').click(function(){
$('input[name="id"]').each(function () {
$(this).attr("checked", !$(this).attr("checked"));
});
}); */
$('.auth_sort').blur(function(){
var validata={
id:$(this).attr('attrid'),
f:'sort',
val:$(this).val(),
table:'Authrule',
msg:'排序'
};
$.post("<{:U('changeSort')}>",validata,
function(data) {
if (data.success == true) {
//alert(data.msg);
setTimeout('window.location.href="<{:U('rules',array('p'=>I('p',1,'intval'),'search'=>I('search')))}>"',10);
return;
}
else {
//alert(data.msg);
return;
}
}
,'json');
});
});
</script>
<style>
#colid1 {
font-family: "宋体";
}
.search{margin:0; padding:0;font-weight:bold;}
.search select{width:auto;}
</style>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<table class="table table-condensed table-bordered table-hover">
<tbody>
<tr>
<td colspan="10" style="padding-left:10px;">
<div style="float:left">
<b>规则列表</b>
</div>
<div style="float:right">
[<a href="<{:U('addrule')}>"><u>增加规则</u></a>]
</div>
</td>
</tr>
<tr>
<td colspan="10" style="padding:10px;">
<form action="<{:U('rules')}>" method='post' class="search">
请选择所属分类:<select name="search">
<option value="">全部分类</option>
<volist name="authcategory" id="v">
<option <eq name="search" value="$key">selected="selected"</eq> value="<{$key}>"><{$v}></option>
</volist>
</select>
</form>
</td>
</tr>
<form name="form2" action="<{:U('form')}>" method="post">
<tr align="center">
<td width="5%" class="text_center">ID</td>
<td width="4%" class="text_center">选择</td>
<td width="7%" class="text_center">排序</td>
<td width="18%" class="text_center">规则名称</td>
<td width="8" class="text_center">所属分类</td>
<td width="4%" class="text_center">状态</td>
<td width="18%" class="text_center">规则内容</td>
<td width="18%" class="text_center">条件</td>
<td width="18%" class="text_center">管理项</td>
</tr>
<volist name="lists" id="list">
<tr class="text_center">
<td nowrap="" class="text_center"><{$list['id']}></td>
<td class="text_center"><input name="id" type="checkbox" id="check" value="<{$list.id}>" class="np"></td>
<td class="text_center"><input type="text" name="sort" attrid="<{$list.id}>" value="<{$list.sort}>" class="auth_sort" /></td>
<td class="text_left">
<span id="id">
<{$list.title}>
</span>
</td>
<td class="text_center"><{$authcategory[$list['catid']]}></td>
<td class="text_center"><a href="javascript:chang_status(<{$list.id}>,<{$list.status}>,'Authrule');"><eq name="list.status" value="1"><i class="icon-ok" var="<{$list.id}>"></i><else /><i class="icon-no" var="<{$list.id}>"></i></eq></a></td>
<td class="text_center"><{$list.name}></td>
<td class="text_center"><{$list.condition}></td>
<td class="text_center">
<a href='<{:U('editrule',array('id'=>$list['id'],'p'=>I('p'),'search'=>I('search')))}>' class="btn btn-mini"><i class="icon-edit"></i> 修改</a>
<a href='<{:U('delrule',array('id'=>$list['id'],'p'=>I('p'),'search'=>I('search')))}>' class="btn btn-mini"><i class="icon-trash"></i> 删除</a>
</td>
</tr>
</volist>
<tr>
<td colspan="10" align="right">
<input type="hidden" value="<{$_GET['p']}>" name="p">
<a href="javascript:void(0)" class="btn btn-mini" id="SelectAll"><i class="icon-check"></i> 全选/反选</a>&nbsp;
<button class="btn btn-mini YanZheng" name="Delete" value=" " type="button" style="cursor:pointer;" onclick="javascript:delArc(0);"><i class="icon-trash"></i> 删除</button>&nbsp;
</td>
</tr>
</form>
<tr>
<td colspan="10">
<ul class="page"><{$page}></ul>
</td>
</tr>
</tbody></table>
</div>
</body>
</html>
<script>
$(function(){
$(':input[name="search"]').change(function(){
var v=$(this).children('option:selected').val();
$('.search').submit();
});
});
</script>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<script type="text/javascript">
$(function(){
$('.confirmdel').click(function(){
var url=$(this).attr('ahref');
var r=window.confirm('你确定要删除吗?')
if(r==true){
window.location=url;
}else{
alert('删除失败!');
}
});
$('.bak').click(function(){
var url=$(this).attr('ahref');
var r=window.confirm('此操作不可恢复!你确定要还原吗?')
if(r==true){
window.location=url;
}else{
alert('还原失败!');
}
});
});
function selAll(){
for(i=0;i<document.form.name.length;i++){
if(!document.form.name[i].checked){
document.form.name[i].checked=true;
}
}
}
function noSelAll(){
for(i=0;i<document.form.name.length;i++){
if(document.form.name[i].checked){
document.form.name[i].checked=false;
}
}
}
</script>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="6">
<div style="float:left">
<b>数据库备份列表</b>
</div>
<div style="float:right">
[<a href="<{:U('backall')}>"><u>备份整个数据库</u></a>]
</div>
</td>
</tr>
<tr>
<td width="6%" style="text-align:center">选择</td>
<td style="text-align:center">备份数据库名称</td>
<td width="11%" style="text-align:center">数据库大小</td>
<td width="21%" style="text-align:center">备份时间</td>
<td width="20%" style="text-align:center">操作</td>
</tr>
<form action="<{:U('form')}>" method="post" name="form">
<volist name="list" id="vo">
<tr>
<td style="text-align:center">
<input name="name[]" id="name" type="checkbox" value="<{$vo.name}>"></td>
<td style="text-align:center"><{$vo.name}></td>
<td style="text-align:center"><{$vo.size}></td>
<td style="text-align:center"><{$vo.time}></td>
<td style="text-align:center">
<a ahref="<{:U('recover',array('file'=>$vo['name']))}>" class="btn btn-mini bak"><i class="icon-edit"></i> 还原</a>
<a ahref="<{:U('deletebak',array('file'=>$vo['name']))}>" class="btn btn-mini confirmdel"><i class="icon-trash"></i> 删除</a>
</td>
</tr>
</volist>
<tr>
<td colspan="6" id="pages">
<input name="all" type="button" value="全选" onClick="selAll()" class="btn btn-mini">&nbsp;
<input name="noall" type="button" value="反选" onClick="noSelAll()" class="btn btn-mini">&nbsp;
<input name="del" type="submit" class="btn btn-mini" value="删除">
</td></tr>
</form>
</tbody></table>
</div>
</body></html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>|后台管理系统</title>
<meta name="keywords" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="6">
<div style="float:left">
<b>单页列表</b>
</div>
<div style="float:right">
[<a href="#"><u>增加单页</u></a>]
</div>
</td>
</tr>
<tr>
<td width="6%" style="text-align:center">选择</td>
<td width="30%" style="text-align:center">表名</td>
<td width="11%" style="text-align:center">编码</td>
<td width="12%" style="text-align:center">数据总数</td>
<td width="15%" style="text-align:center">数据大小</td>
<td width="21%" style="text-align:center">描述</td>
</tr>
<volist name="list" id="vo">
<tr>
<td style="text-align:center"><input name="" type="checkbox" value=""></td>
<td style="text-align:center"><{$vo.Name}></td>
<td style="text-align:center"><{$vo.Collation}></td>
<td style="text-align:center"><{$vo.Rows}></td>
<td style="text-align:center"><{$vo.Data_length}></td>
<td style="text-align:center"><{$vo.Comment}></td>
</tr>
</volist>
</tbody></table>
</div>
</body></html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<link rel="stylesheet" href="__ROOTPUB__kindeditor/themes/default/default.css" />
<script charset="utf-8" src="__ROOTPUB__kindeditor/kindeditor-min.js"></script>
<script charset="utf-8" src="__ROOTPUB__kindeditor/lang/zh_CN.js"></script>
<script>
KindEditor.ready(function(K) {
var editor1 = K.editor({
uploadJson : "<{:U('Kind/upload_json')}>",
fileManagerJson : "<{:U('Kind/file_manager_json')}>",
allowFileManager : true
});
K('#uploadid').click(function() {
editor1.loadPlugin('image', function() {
editor1.plugin.imageDialog({
imageUrl : K('#picid').val(),
clickFn : function(url, title, width, height, border, align) {
K('#picid').val(url);
//K('#picida').src(url);
document.getElementById('picida').src=url;
editor1.hideDialog();
}
});
});
});
});
</script>
<style>
#upid {
font-family: "宋体";
}
</style>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<form name="form" action="" method="post">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="2" style="padding-left:10px;">
<div style="float:left">
<b>新增分类</b>
</div>
<div style="float:right">
[<a href="<{:U('Category/index')}>"><u>返回列表</u></a>]
</div>
</td>
</tr>
<tr>
<td height="26" align="right" class="text_right_wid_140 pad_right_10"><font color="red">栏目名称:</font></td>
<td><input name="catname" type="text" id="catname" size="30" class="iptxt"></td>
</tr>
<tr>
<td height="26" align="right" class="text_right_wid_140 pad_right_10"><font color="red">英文名称:</font></td>
<td><input name="catename" type="text" id="catename" size="30" class="iptxt"></td>
</tr>
<tr>
<td height="26" align="right" class="text_right_wid_140 pad_right_10"><font color="red">所属栏目:</font></td>
<td>
<select name="upid" id="upid" style="width:200px">
<option value="0">顶级栏目</option>
<volist name="cat_list" id="vo">
<option value="<{$vo.id}>" <if condition="$vo.id eq $_GET['id']">selected</if> >
<{$vo.tname}>
</option>
</volist>
</select>
</td>
</tr>
<tr>
<td height="26" align="right" class="text_right_wid_140 pad_right_10"><font color="red">栏目类型:</font></td>
<td>
<select name="type" id="type" style="width:200px">
<option value="1">内容列表</option>
<option value="2">内容单页</option>
<option value="3">栏目主页</option>
<option value="4">列表主页</option>
<option value="5">单页主页</option>
<option value="0">外部链接</option>
</select>
</td>
</tr>
<tr>
<td height="26" align="right" class="text_right_wid_140 pad_right_10"><font color="red">模块名称:</font></td>
<td><input name="module_name" type="text" id="module_name"></td>
</tr>
<tr>
<td height="26" align="right" class="text_right_wid_140 pad_right_10"><font color="red">方法名称:</font></td>
<td><input name="action_name" type="text" id="action_name"></td>
</tr>
<tr>
<td height="26" align="right" class="text_right_wid_140 pad_right_10"> 是否导航显示: </td>
<td><input name="isshow" type="radio" value="1" />显示 &nbsp; <input name="isshow" type="radio" value="0" checked />不显示</td>
</tr>
<tr>
<td height="26" align="right" class="text_right_wid_140 pad_right_10"> 排列顺序: </td>
<td><input name="sort" size="6" type="text" value="<{$maxsort}>" class="pubinputs" class="width_60"></td>
</tr>
<tr attr="hidden">
<td height="26" align="right" class="text_right_wid_140 pad_right_10">链接地址:</td>
<td><input name="linkurl" type="text" id="linkurl" class="width_220" value=""><span class="note">(例如:http://www.baidu.com)</span></td>
</tr>
<tr attr="show">
<td height="26" align="right" class="text_right_wid_140 pad_right_10">Banner:</td>
<td><input name="banner" type="text" id="picid" value="<{$data.banner}>"><input type="button" value="上传图片" style="cursor:pointer;" id="uploadid"> <!-- <span style="color:#ccc;">(尺寸:2200*560)</span> --></td>
</tr>
<tr attr="show">
<td height="26" align="right" class="text_right_wid_140 pad_right_10"></td>
<td><img src="<{$data.banner|Thumb}>" id="picida" style=" max-height:150px; max-width:550px;"></td>
</tr>
<tr attr="show">
<td height="26" align="right" class="text_right_wid_140 pad_right_10">SEO标题:</td>
<td><input name="title" type="text" id="seotitle" size="30" style="width:400px;" class="iptxt"></td>
</tr>
<tr attr="show">
<td height="80" align="right" class="text_right_wid_140 pad_right_10">关键词: </td>
<td><textarea name="keywords" style="height:60px; width:500px;" cols="60"></textarea></td>
</tr>
<tr attr="show">
<td height="80" align="right" class="text_right_wid_140 pad_right_10">描述: </td>
<td><textarea name="description" style="height:60px; width:500px;" cols="60"></textarea></td>
</tr>
<tr attr="show" id="attachment">
<td height="80" align="right" class="text_right_wid_140 pad_right_10">附件选择: </td>
<td><input type="checkbox" name="picnum[]" value="1" onclick="set_img_size('1');">单图 &nbsp; <input type="checkbox" name="picnum[]" value="2" onclick="set_img_size('2');">多图 &nbsp; <input type="checkbox" name="picnum[]" value="3">附件</td>
</tr>
<tr><td colspan="2" style="text-align:center">
<input name="domain" type="submit" style=" background:url(__PUB__img/button_save.gif); width:60px; height:22px; border:0" value=" ">
&nbsp;&nbsp;&nbsp;<a href="javascript:history.go(-1);"><img src="__PUB__img/button_back.gif" width="60" height="22" border="0"></a></td></tr>
</tbody></table>
</form>
</div>
</body>
<script>
$(function(){
$('tr[attr="hidden"]').css('display','none');
type_change();
$('#upid').change(function(){
var cid=$(this).children('option:selected').val();
var validate={
id : cid,
};
$.get("<{:U('getMaxSort')}>",validate,function(data){
$(':input[name="sort"]').val(data);
});
});
set_img_size(1);
set_img_size(2);//图片尺寸
$('#type').change(function(){
type_change();
});
});
//内容模型
function type_change()
{
var type=$('#type').children('option:selected').val();
if(type == 0)
{
$('tr[attr="show"]').css('display','none')
$('tr[attr="hidden"]').css('display','table-row');
}
else
{
$('tr[attr="show"]').css('display','table-row')
$('tr[attr="hidden"]').css('display','none');
}
}
//图片尺寸
function set_img_size(num)
{
if(num == 1)
{
if($(':input[name="picnum[]"]:eq('+(num-1)+')').is(':checked'))
$('#attachment').after('<tr id="picnum1"><td height="26" align="right" class="text_right_wid_140 pad_right_10">单图尺寸:</td><td><input name="img_size" type="text" size="30" style="width:400px;" class="iptxt" value="<{$data.img_size}>"></td></tr>');
else
$('#picnum1').remove();
}
if(num == 2)
{
if($(':input[name="picnum[]"]:eq('+(num-1)+')').is(':checked'))
$('#attachment').after('<tr id="picnum2"><td height="26" align="right" class="text_right_wid_140 pad_right_10">多图尺寸:</td><td><input name="imgs_size" type="text" size="30" style="width:400px;" class="iptxt" value="<{$data.imgs_size}>"></td></tr>');
else
$('#picnum2').remove();
}
}
</script>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<style>
#upid {
font-family: "宋体";
}
</style>
<link rel="stylesheet" href="__ROOTPUB__kindeditor/themes/default/default.css" />
<script charset="utf-8" src="__ROOTPUB__kindeditor/kindeditor-min.js"></script>
<script charset="utf-8" src="__ROOTPUB__kindeditor/lang/zh_CN.js"></script>
<script>
KindEditor.ready(function(K) {
var editor1 = K.editor({
uploadJson : "<{:U('Kind/upload_json')}>",
fileManagerJson : "<{:U('Kind/file_manager_json')}>",
allowFileManager : true
});
K('#uploadid').click(function() {
editor1.loadPlugin('image', function() {
editor1.plugin.imageDialog({
imageUrl : K('#picid').val(),
clickFn : function(url, title, width, height, border, align) {
K('#picid').val(url);
//K('#picida').src(url);
document.getElementById('picida').src=url;
editor1.hideDialog();
}
});
});
});
});
</script>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<form name="form" action="" method="post">
<table class="table table-condensed table-bordered table-hover">
<tbody>
<tr>
<td colspan="2" style="padding-left:10px;">
<div style="float:left">
<b>修改分类</b>
</div>
<div style="float:right">
[<a href="<{:U('Category/index')}>"><u>返回列表</u></a>]
</div>
</td>
</tr>
<tr>
<td height="26" align="right" class="text_right_wid_140 pad_right_10"><font color="red">栏目名称:</font></td>
<td><input name="catname" type="text" id="catname" size="30" class="iptxt" value="<{$data.catname}>"></td>
</tr>
<tr>
<td height="26" align="right" class="text_right_wid_140 pad_right_10"><font color="red">英文名称:</font></td>
<td><input name="catename" type="text" id="catename" size="30" class="iptxt" value="<{$data.catename}>"></td>
</tr>
<tr>
<td height="26" align="right" class="text_right_wid_140 pad_right_10"><font color="red">父分类:</font></td>
<td>
<select name="upid" id="upid" style="width:200px">
<option value="0">作为顶级分类</option>
<volist name="cat_list" id="vo">
<option value="<{$vo.id}>" <if condition="$vo.id eq $data['upid']">selected</if> >
<{$vo.tname}>
</option>
</volist>
</select>
</td>
</tr>
<tr>
<td height="26" align="right" class="text_right_wid_140 pad_right_10"><font color="red">内容模型:</font></td>
<td>
<select name="type" id="type" style="width:200px">
<option value="1" <if condition="$data.type eq 1">selected</if> >内容列表</option>
<option value="2" <if condition="$data.type eq 2">selected</if> >内容单页</option>
<option value="3" <if condition="$data.type eq 3">selected</if> >栏目主页</option>
<option value="4" <if condition="$data.type eq 4">selected</if> >列表主页</option>
<option value="5" <if condition="$data.type eq 5">selected</if> >单页主页</option>
<option value="0" <if condition="$data.type eq 0">selected</if> >外部链接</option>
</select>
</td>
</tr>
<tr>
<td height="26" align="right" class="text_right_wid_140 pad_right_10"><font color="red">模块名称:</font></td>
<td><input name="module_name" type="text" id="module_name" value="<{$data.module_name}>"></td>
</tr>
<tr>
<td height="26" align="right" class="text_right_wid_140 pad_right_10"><font color="red">方法名称:</font></td>
<td><input name="action_name" type="text" id="action_name" value="<{$data.action_name}>"></td>
</tr>
<tr>
<td height="26" align="right" class="text_right_wid_140 pad_right_10"> 是否导航显示: </td>
<td><input name="isshow" type="radio" value="1" <eq name="data.isshow" value="1">checked</eq> />显示 &nbsp; <input name="isshow" type="radio" value="0" <eq name="data.isshow" value="0">checked</eq> />不显示</td>
</tr>
<tr>
<td height="26" align="right" class="text_right_wid_140 pad_right_10"> 排列顺序: </td>
<td><input name="sort" size="6" type="text" value="<{$data.sort}>" class="pubinputs" class="width_60"></td>
</tr>
<tr attr="hidden">
<td height="26" align="right" class="text_right_wid_140 pad_right_10">链接地址:</td>
<td><input name="linkurl" type="text" id="linkurl" class="width_220" value="<{$data.linkurl}>"><span class="note">(例如:http://www.baidu.com)</span></td>
</tr>
<tr attr="show">
<td height="26" align="right" class="text_right_wid_140 pad_right_10">Banner:</td>
<td><input name="banner" type="text" id="picid" value="<{$data.banner}>"><input type="button" value="上传图片" style="cursor:pointer;" id="uploadid"> <!-- <span style="color:#ccc;">(尺寸:2200*560)</span> --></td>
</tr>
<tr attr="show">
<td height="26" align="right" class="text_right_wid_140 pad_right_10"></td>
<td><img src="<{$data.banner|Thumb}>" id="picida" style=" max-height:150px; max-width:550px;"></td>
</tr>
<tr attr="show">
<td height="26" align="right" class="text_right_wid_140 pad_right_10">SEO标题:</td>
<td><input name="title" type="text" id="seotitle" size="30" style="width:400px;" class="iptxt" value="<{$data.title}>"></td>
</tr>
<tr attr="show">
<td height="80" align="right" class="text_right_wid_140 pad_right_10">关键词: </td>
<td><textarea name="keywords" style="height:60px; width:500px;" cols="60"><{$data.keywords}></textarea></td>
</tr>
<tr attr="show">
<td height="80" align="right" class="text_right_wid_140 pad_right_10">描述: </td>
<td><textarea name="description" style="height:60px; width:500px;" cols="60"><{$data.description}></textarea></td>
</tr>
<tr attr="show" id="attachment">
<td height="80" align="right" class="text_right_wid_140 pad_right_10">附件选择:</td>
<td><input type="checkbox" name="picnum[]" value="1" <if condition="strstr($data['picnum'],'1')">checked="checked"</if> onclick="set_img_size('1');">单图 &nbsp; <input type="checkbox" name="picnum[]" value="2" <if condition="strstr($data['picnum'],'2')">checked="checked"</if> onclick="set_img_size('2');">多图 &nbsp; <input type="checkbox" name="picnum[]" value="3" <if condition="strstr($data['picnum'],'3')">checked="checked"</if>>附件</td>
</tr>
<tr>
<td colspan="2" style="text-align:center">
<input name="id" type="hidden" value="<{$data.id}>" />
<input name="domain" type="submit" style=" background:url(__PUB__img/button_save.gif); width:60px; height:22px; border:0" value=" ">
&nbsp;&nbsp;&nbsp;<a href="javascript:history.go(-1);"><img src="__PUB__img/button_back.gif" width="60" height="22" border="0"></a>
</td>
</tr>
</tbody>
</table>
</form>
</div>
</body>
<script>
$(function(){
$('tr[attr="hidden"]').css('display','none');
type_change(); //内容模型
set_img_size(1);
set_img_size(2);//图片尺寸
$('#type').change(function(){
type_change();
});
});
//内容模型
function type_change()
{
var type=$('#type').children('option:selected').val();
if(type == 0)
{
$('tr[attr="show"]').css('display','none')
$('tr[attr="hidden"]').css('display','table-row');
}
else
{
$('tr[attr="show"]').css('display','table-row')
$('tr[attr="hidden"]').css('display','none');
}
}
//图片尺寸
function set_img_size(num)
{
if(num == 1)
{
if($(':input[name="picnum[]"]:eq('+(num-1)+')').is(':checked'))
$('#attachment').after('<tr id="picnum1"><td height="26" align="right" class="text_right_wid_140 pad_right_10">单图尺寸:</td><td><input name="img_size" type="text" size="30" style="width:400px;" class="iptxt" value="<{$data.img_size}>"></td></tr>');
else
$('#picnum1').remove();
}
if(num == 2)
{
if($(':input[name="picnum[]"]:eq('+(num-1)+')').is(':checked'))
$('#attachment').after('<tr id="picnum2"><td height="26" align="right" class="text_right_wid_140 pad_right_10">多图尺寸:</td><td><input name="imgs_size" type="text" size="30" style="width:400px;" class="iptxt" value="<{$data.imgs_size}>"></td></tr>');
else
$('#picnum2').remove();
}
}
</script>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<script>
function son_catid(pid,id){
if(pid.src.indexOf("1.gif")>0)
pid.src="__PUB__img/0.gif";
else
pid.src="__PUB__img/1.gif";
dqid='son_'+id;
sid='s_'+id;
$.post('<{:U("son_catid")}>',{'id':id},function(data){
dqid='son_'+id;
document.getElementById(dqid).outerHTML=data;
});
dis=document.getElementById(sid).style.display;
if(dis=='none'){
$("."+sid).show();
}else{
$("."+sid).hide();
}
}
</script>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<form name="form1" method="post" action="<{:U('newsort')}>">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="2">
<div style="float:left">
<strong>栏目列表</strong>
</div>
<div style="float:right;">
[<a href="<{:U('add')}>"><u>增加栏目</u></a>][<a href="<{:U('index',array('type'=>1))}>"><u>全部展开</u></a>][<a href="<{:U('index')}>"><u>全部合并</u></a>]
</div>
</td>
</tr>
<{$cat_list}>
<tr>
<td colspan="2">
<button class="btn btn-mini" id="NewSort" name="sb1" value=" " type="submit" style="cursor:pointer;"><i class="icon-random"></i> 更新排序</button>
</td>
</tr>
</tbody></table>
</form>
</div>
</body></html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<title><{:C('title')}>|后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/style.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/shengxing.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
</head>
<body class="showmenu" style="">
<div class="head">
<section class="sx">
<div class="sx3">
<{:C('name')}>后台管理系统
</div>
<ul class="sx4">
<li><a href="<{:U('Index/index')}>" >系统主页</a></li>
<li><a href="__ROOT__/index.php" target="_blank" >网站首页</a></li>
<li><a href="<{:U('Index/delcache')}>" target='main' >清除缓存</a></li>
<li><a href="<{:U('outlogin')}>" >退出系统</a></li>
</ul>
</section>
<section class="sx2" style="background:none;">
<div class="sx5">
</div>
</section>
</div>
<div class="left">
<div class="menu" id="menu">
<iframe id="menufra" name="menu" frameborder="0" src="<{:U('Index/menu')}>"></iframe>
</div>
</div>
<div class="right">
<div class="main">
<iframe id="main" name="main" frameborder="0" src="<{:U('Index/main')}>"></iframe>
</div>
</div>
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><{:C('title')}>|后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/style.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
</head>
<body class="showmenu" style="">
<div class="head">
<nav class="navbar navbar-fixed-top">
<section class="navbar-over"></section>
<section class="navbar-inner" style="background:#3B5995">
<section class="container" style=" width:100%;">
<section class="nav-collapse collapse">
<ul class="nav pull-left">
<li class="line"><a href="<{:U('Index/index')}>" style="color: #fff;">系统主页</a></li>
<li><a href="__ROOT__/index.php" target="_blank" style="color: #fff;">网站</a></li>
<li class="line"><span style="line-height:40px; margin-right:20px;color: #fff;">欢迎登陆后台管理系统!</span></li>
<li class="line"><a href="<{:U('outlogin')}>" style="color: #fff;">注销</a></li>
<li><a href="<{:U('Index/delcache')}>" target='main' style="color: #ff0000;">清除缓存</a></li>
</ul>
<ul class="nav pull-right">
<li>
<div class="time">
<div class="input-append"><input class="input-year" type="text" id="years"><span class="add-on"></span></div>
<div class="input-append"><input class="input-min" type="text" id="month"><span class="add-on"></span></div>
<div class="input-append"><input class="input-min" type="text" id="days"><span class="add-on"></span></div>
<div class="input-append"><input class="input-min" type="text" id="hours"><span class="add-on"></span></div>
<div class="input-append"><input class="input-min" type="text" id="minutes"><span class="add-on"></span></div>
<div class="input-append"><input class="input-min" type="text" id="seconds"><span class="add-on"></span></div>
<div class="input-prepend"><span class="add-on">星期</span><input class="input-min" type="text" id="week" value=""></div>
</div>
</li>
</ul>
</section>
</section>
</section>
</nav>
</div>
<div class="left">
<div class="menu" id="menu">
<iframe id="menufra" name="menu" frameborder="0" src="<{:U('Index/menu')}>"></iframe>
</div>
</div>
<div class="right">
<div class="main">
<iframe id="main" name="main" frameborder="0" src="<{:U('Index/main')}>"></iframe>
</div>
</div>
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<!-- saved from url=(0047)http://localhost/cms/index.php/admin/Index/main -->
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/main.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('.title').hover(function(){
$(this).children('.minimize').removeClass('hide');
},function(){
$(this).children('.minimize').addClass('hide');
});
$('.minimize').toggle(function(){
$(this).parent().next().slideUp();
},function(){
$(this).parent().next().slideDown();
});
});
</script>
</head>
<body style="margin: 20px;">
<div style="margin:0 auto; width:98%;">
<div class="panel-left">
<div>
<div class="box">
<div class="title">
<i class="icon-user"></i><span>个人信息</span>
<!--<a href="#" class="minimize hide"></a>-->
</div>
<div class="content">
<p>你好,<{$_SESSION['ADMIN_KEY']['name']}></p>
<p>所属角色:</p>
<p>上次登录时间:<{:date('Y-m-d H:i:s',$_SESSION['ADMIN_KEY']['ltime'])}></p>
<p>上次登录IP:<{$_SESSION['ADMIN_KEY']['lip']}></p>
</div>
</div>
</div>
<div>
<div class="box">
<div class="title">
<i class="icon-exclamation-sign"></i><span>安全提示</span>
</div>
<div class="content sys">
<p>建议将web目录权限修改为644</p>
<p>系统安装完成后将install目录删除</p>
</div>
</div>
</div>
<div>
<div class="box">
<div class="title">
<i class="icon-flag"></i><span>系统信息</span>
</div>
<div class="content">
<p>操作系统:<{$system.system}></p>
<p>PHP:<{$system.sysversion}></p>
<p>服务器环境:<{$system.sysos}></p>
<p>MySQL版本:<{$system.mysqlinfo}></p>
<p>最大上传限制:<{$system.allowurl}></p>
</div>
</div>
</div>
</div>
<div class="panel-right">
<div>
<div class="box">
<div class="title">
<i class="icon-question-sign"></i><span>帮助中心</span>
<a href="#" class="minimize hide"></a>
</div>
<div class="content fast-opt help-opt" style="display: block;">
<div style="clear:both"></div>
</div>
</div>
</div>
<div>
<div class="box">
<div class="title">
<i class="icon-home"></i><span>作者信息</span>
</div>
<div class="content">
<p>核心开发:<a href="mailto:1012162814@qq.com">联合易网技术开发组</a></p>
<p>技术支持:<a href="mailto:519789523@qq.com">联合易网</a></p>
</div>
</div>
</div>
<div>
<div class="box">
<div class="title">
<i class="icon-fire"></i><span>友情链接</span>
</div>
<div class="content">
<volist name="list" id="vo">
<a href="<{$vo.url}>" target="_blank"><{$vo.name}></a>&nbsp;
</volist>
</div>
</div>
</div>
</div>
</div>
</body></html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="__PUB__style/pp_main.css" type="text/css" rel="stylesheet" />
<link rel="stylesheet" type="text/css" href="__PUB__style/main.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<style>
.panel-left *,.panel-right{color:#333;}
</style>
</head>
<!--png效果-->
<!--[if IE 6]>
<script type="text/javascript" src="bjs/DD_belatedPNG_0.0.8a.js"></script>
<script type="text/javascript"> DD_belatedPNG.fix('img,..list li a,.list li a:hover'); </script>
<![endif]-->
<!--png效果-->
<body>
<div class="mian_bg" style="overflow:hidden">
<div class="main_left">
<div class="admin">
<p>
<span style="color:#367abb; font-weight:bold; font-size:15px; font-family:Arial; margin-right:5px;"></span>
<SCRIPT language="JavaScript">
<!-----------
var enabled = 0;
today = new Date();//取当前日期
var day;
var date;
if(today.getDay()==0) day = "星期日"//根据当前日期星期部分的数字生成对应的中文说明。
if(today.getDay()==1) day = "星期一"
if(today.getDay()==2) day = "星期二"
if(today.getDay()==3) day = "星期三"
if(today.getDay()==4) day = "星期四"
if(today.getDay()==5) day = "星期五"
if(today.getDay()==6) day = "星期六"
document.fgColor = " FF0072"; //设定文字的颜色
//取日期部分的描述
date1 = "<span style='color:#367abb; font-weight:bold; font-size:15px; font-family:Arial; margin-right:5px;'>" + (today.getFullYear()) + "年" + (today.getMonth() + 1 ) + "月" + today.getDate() + "日 " + "</span>";
date2 = "<span style='color:#367abb; font-weight:bold; font-size:15px; font-family:Arial; margin-right:5px;'>" + day + "</span>";//取星期部分描述。
document.write(date1.fontsize(3) + date2.fontsize(3));//将前面的内容写进显示区
//----->
</SCRIPT>
</p>
</div>
</div>
<div class="main_right">
<div class="tianqi" style="border-bottom:none;">
<ul id="tianqibox">
<li onmousemove="tianqichangeTab(0)" class="tianqihover" ><a href="javascript:void(0);">天气</a></li>
<li onmousemove="tianqichangeTab(1)" ><a href="javascript:void(0);">日期</a></li>
</ul>
<div id="tianqitabBox">
<div class="tianqinew" id="tianqitab0">
<IFRAME id="tianqi8_wetherinfo" name="tianqi8_wetherinfo" src="http://www.uuuu.cc/weather/code/freeweather9.htm?id=&fcolor=&imgurl=&bimg=&bcolor=&fsize=12" frameBorder=0 width=200 height=20 ALIGN=CENTER MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 SCROLLING=NO allowtransparency=true style="padding-top:15px; padding-left:8px;"></IFRAME>
</div>
<div class="tianqinew tianqihidden" id="tianqitab1"><php>echo date('Y-m-d');</php></div>
</div>
<script type="text/javascript">
function tianqichangeTab(idNum){
for(i=0;i<=1;i++){
document.getElementById("tianqitab"+i).className="tianqinew tianqihidden"//最初状态第一个是隐藏的,主要是设置其他div隐藏的。
document.getElementById("tianqibox").getElementsByTagName("li")[i].className=""//鼠标经过时的背景颜色变为绿色
}
document.getElementById("tianqitab"+idNum).className="tianqinew"//鼠标经过时让下面的div设置为显示
document.getElementById("tianqibox").getElementsByTagName("li")[idNum].className="tianqihover"//设置第一个nav背景颜色的初始状态
}
</script>
</div>
</div>
</div>
</div>
<div style="border-top:1px solid #D0E7F7; margin:0 18px; padding-top:30px;">
<div class="main_title">
欢迎您的访问!
</div>
<style>
.main_title{font-size:45px;line-height:220%; text-align:center; color:#267fb9;font-family: '宋体';}
.main_cont{
display:block;
width:16%;
margin:0 auto;
/* border: 1px solid #ccc;
border-radius: 2px;
border-radius: 2px;
-moz-box-shadow: 0 1px 0px rgba(255, 255, 255, 1);
-webkit-box-shadow: 0 1px 0px rgba(255, 255, 255, 1);
box-shadow: 0 1px 0px rgba(255, 255, 255, 1); */
}
.main_cont li{
padding:0 12px;
line-height: 32px;
color:#267fb9;
font-size:14px;
/*border-bottom: 1px solid #ccc;*/
}
</style>
<ul class="main_cont">
<li>您好,<{$Think.cookie.ADMIN_NAME}></li>
<li>所属角色:<{$role}></li>
</ul>
</div>
</body>
</html>
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/style.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/menu.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<script type="text/javascript" src="__PUB__js/leftmenu.js"></script>
</head>
<body target="main" style="">
<table width="100%" align="left" border="0" cellspacing="0" cellpadding="0" style="text-align:left;">
<tbody>
<tr>
<td valign="top" style="padding-top:10px" width="20">
<a id="link2" class="mmac"><div onclick="ShowMainMenu(2)">管理</div></a>
<a id="link3" class="mm"><div onclick="ShowMainMenu(3)">系统</div></a>
<div class="mmf"></div>
</td>
<td width="160" valign="top">
<div id="mainct">
<div id="ct2">
<?php
$power=array(
'Reg-index', //数据字段管理
);
$result=doMenuPower($power,$authlist); //权限判断处理
if($result['first']):
?>
<dl id="sunitems2_4" class="bitem"><dt onclick="showHide('items2_4')"><b>数据字段管理</b></dt>
<dd id="items2_4" class="sitem">
<ul class="sitemu">
<li><a target="main" href="<{:U('Reg/index')}>">数据字段列表</a></li>
</ul>
</dd>
</dl>
<?php
endif;
unset($power,$result);
$power=array(
'Power-fenpei', //角色分配管理
'Power-group', //角色列表
'Power-rules', //规则管理
);
$result=doMenuPower($power,$authlist); //权限判断处理
if($result['first']):
?>
<dl class="bitem" id="sunitems2_1"><dt onclick="showHide('items2_1')"><b>前台权限管理</b></dt>
<dd style="display:block" class="sitem" id="items2_1">
<ul class="sitemu">
<?php if($result['second'][0]):?>
<li><a target="main" href="<{:U('Power/fenpei')}>">角色分配管理</a></li>
<?php endif; ?>
<?php if($result['second'][1]):?>
<li><a target="main" href="<{:U('Power/group')}>">角色列表</a></li>
<?php endif; ?>
<?php if($result['second'][2]):?>
<li><a target="main" href="<{:U('Power/rules')}>">规则管理</a></li>
<?php endif; ?>
</ul>
</dd>
</dl>
<?php
endif;
unset($power,$result);
$power=array(
'Article-index', //角色分配管理
);
$result=doMenuPower($power,$authlist); //权限判断处理
if($result['first']):
?>
<dl class="bitem" id="sunitems2_1"><dt onclick="showHide('items2_1')"><b>资料管理</b></dt>
<dd style="display:block" class="sitem" id="items2_1">
<ul class="sitemu">
<li><a target="main" href="<{:U('Article/index')}>">资料管理</a></li>
</ul>
</dd>
</dl>
<?php
endif;
unset($power,$result);
?>
</div>
<div id="ct3" style="display:none">
<?php
$power=array(
'Admin-index', //管理员列表
);
$result=doMenuPower($power,$authlist); //权限判断处理
if($result['first']):
?>
<dl id="sunitems2_3" class="bitem"><dt onclick="showHide('items2_3')"><b>用户管理</b></dt>
<dd id="items2_3" class="sitem">
<ul class="sitemu">
<li><a target="main" href="<{:U('Admin/index')}>">管理员列表</a></li>
</ul>
</dd>
</dl>
<?php
endif;
unset($power,$result);
$power=array(
'Authc-fenpei', //角色分配管理
'Authc-group', //角色列表
'Authc-rules', //规则管理
);
$result=doMenuPower($power,$authlist); //权限判断处理
if($result['first']):
?>
<dl id="sunitems3_3" class="bitem"><dt onclick="showHide('items3_3')"><b>权限管理</b></dt>
<dd id="items3_3" class="sitem">
<ul class="sitemu">
<?php if($result['second'][0]):?>
<li><a target="main" href="<{:U('Authc/fenpei')}>">角色分配管理</a></li>
<?php endif; ?>
<?php if($result['second'][1]):?>
<li><a target="main" href="<{:U('Authc/group')}>">角色列表</a></li>
<?php endif; ?>
<?php if($result['second'][2]):?>
<li><a target="main" href="<{:U('Authc/rules')}>">规则管理</a></li>
<?php endif; ?>
</ul>
</dd>
</dl>
<?php
endif;
unset($power,$result);
$power=array(
'Index-system', //系统参数设置
'Index-delcache', //清理缓存
'Baksql-index', //数据管理
);
$result=doMenuPower($power,$authlist); //权限判断处理
if($result['first']):
?>
<dl id="sunitems1_3" class="bitem"><dt onclick="showHide('items1_3')"><b>系统操作</b></dt>
<dd id="items1_3" class="sitem">
<ul class="sitemu">
<?php if($result['second'][0]):?>
<li><a target="main" href="<{:U('Index/system')}>">系统参数设置</a></li>
<?php endif; ?>
<?php if($result['second'][1]):?>
<li><a target="main" href="<{:U('Index/delcache')}>">清理缓存</a></li>
<?php endif; ?>
<?php if($result['second'][2]):?>
<li><a target="main" href="<{:U('Baksql/index')}>">数据管理</a></li>
<?php endif; ?>
</ul>
</dd>
</dl>
<?php
endif;
unset($power,$result);
?>
</div>
</div>
</td>
</tr>
<!-- <tr>
<td width="26"></td>
<td width="160" valign="top"><img src="__PUB__images/bottom.gif"></td>
</tr> -->
</tbody>
</table>
</body>
</html>
<script>
$(function(){
$('#ct1 dl dd ul li > ul > li').addClass('pp_child1');
$('#ct1 dl dd ul li > ul > li > ul > li').addClass('pp_child2');
$('#ct1 dl dd ul li > ul > li > ul > li > ul > li').addClass('pp_child3');
});
</script>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/style.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/menu.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<script type="text/javascript" src="__PUB__js/leftmenu.js"></script>
</head>
<body target="main" style="">
<table width="100%" align="left" border="0" cellspacing="0" cellpadding="0" style="text-align:left;">
<tbody>
<tr>
<td valign="top" style="padding-top:10px" width="20">
<a id="link1" class="mmac"><div onclick="ShowMainMenu(1)">内容</div></a>
<a id="link2" class="mm"><div onclick="ShowMainMenu(2)">管理</div></a>
<a id="link3" class="mm"><div onclick="ShowMainMenu(3)">系统</div></a>
<div class="mmf"></div>
</td>
<td width="160" valign="top">
<div id="mainct">
<div id="ct1">
<volist name="list" id="v" key="k">
<dl class="<if condition='$k eq 1 '>bitem<else />bitem2</if>" id="sunitems<{$v.kid}>_1"><dt onclick="showHide('items<{$v.kid}>_1')"><b><{$v.catname}></b></dt>
<dd style="<if condition='$k eq 1'><else />display:none</if>" class="sitem" id="items<{$v.kid}>_1">
<ul class="sitemu">
<volist name="v['cmenulist']" id="vo">
<li>
<span style="float:left"><a target="main" href="<{$vo.url}>"><{$vo.name}></a></span>
<span style="float:right; margin-right:10px;">
<if condition="$vo['add']">
<a href='<{$vo.add}>' target='main'><img src='__PUB__img/gtk-sadd.png' style="display: inherit;"/></a>
</if>
</span>
</li>
</volist>
</ul>
</dd>
</dl>
</volist>
</div>
<div id="ct2" style="display:none">
<dl class="bitem" id="sunitems2_2"><dt onclick="showHide('items2_2')"><b>常用操作</b></dt>
<dd style="display:block" class="sitem" id="items2_2">
<ul class="sitemu">
<li><a target="main" href="<{:U('Category/index')}>">栏目管理</a></li>
<li><a target="main" href="<{:U('Liuyan/index')}>">留言管理</a></li>
<li><a target="main" href="<{:U('Adver/index')}>">广告管理</a></li>
<li><a target="main" href="<{:U('Links/index')}>">友情链接</a></li>
</ul>
</dd>
</dl>
</div>
<div id="ct3" style="display:none">
<dl id="sunitems2_3" class="bitem"><dt onclick="showHide('items2_3')"><b>用户管理</b></dt>
<dd id="items2_3" class="sitem">
<ul class="sitemu">
<li><a target="main" href="<{:U('Admin/index')}>">管理员列表</a></li>
<li><a target="main" href="<{:U('Admin/role')}>">角色列表</a></li>
</ul>
</dd>
</dl>
<dl id="sunitems3_3" class="bitem"><dt onclick="showHide('items3_3')"><b>权限管理</b></dt>
<dd id="items3_3" class="sitem">
<ul class="sitemu">
<li><a target="main" href="<{:U('Authc/fenpei')}>">角色分配管理</a></li>
<li><a target="main" href="<{:U('Authc/group')}>">角色列表</a></li>
<li><a target="main" href="<{:U('Authc/rules')}>">规则管理</a></li>
</ul>
</dd>
</dl>
<dl id="sunitems1_3" class="bitem"><dt onclick="showHide('items1_3')"><b>系统操作</b></dt>
<dd id="items1_3" class="sitem">
<ul class="sitemu">
<li><a target="main" href="<{:U('Index/system')}>">系统参数设置</a></li>
<li><a target="main" href="<{:U('Index/delcache')}>">清理缓存</a></li>
<li><a target="main" href="<{:U('Baksql/index')}>">数据管理</a></li>
</ul>
</dd>
</dl>
</div>
</div>
</td>
</tr>
<!-- <tr>
<td width="26"></td>
<td width="160" valign="top"><img src="__PUB__images/bottom.gif"></td>
</tr> -->
</tbody>
</table>
</body></html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/style.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/menu.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<script type="text/javascript" src="__PUB__js/leftmenu.js"></script>
</head>
<body target="main" style="">
<table width="100%" align="left" border="0" cellspacing="0" cellpadding="0" style="text-align:left;">
<tbody>
<tr>
<td valign="top" style="padding-top:10px" width="20">
<a id="link1" class="mmac"><div onclick="ShowMainMenu(1)">内容</div></a>
<a id="link2" class="mm"><div onclick="ShowMainMenu(2)">管理</div></a>
<a id="link3" class="mm"><div onclick="ShowMainMenu(3)">系统</div></a>
<div class="mmf"></div>
</td>
<td width="160" valign="top">
<div id="mainct">
<div id="ct1">
<volist name="list" id="v" key="k">
<dl class="<if condition='$k eq 1 '>bitem<else />bitem2</if>" id="sunitems<{$v.id}>_1"><dt onclick="showHide('items<{$v.id}>_1')"><b><{$v.catname}></b></dt>
<dd style="<if condition='$k eq 1'><else />display:none</if>" class="sitem" id="items<{$v.id}>_1">
<!-- <ul class="sitemu">
<volist name="v['cmenulist']" id="vo">
<li>
<span style="float:left"><a target="main" href="<{$vo.url}>"><{$vo.name}></a></span>
<span style="float:right; margin-right:10px;">
<if condition="$vo['add']">
<a href='<{$vo.add}>' target='main'><img src='__PUB__img/gtk-sadd.png' style="display: inherit;"/></a>
</if>
</span>
</li>
</volist>
</ul> -->
<php>leftmenu($v['cmenulist']);</php>
</dd>
</dl>
</volist>
</div>
<div id="ct2" style="display:none">
<dl class="bitem" id="sunitems2_2"><dt onclick="showHide('items2_2')"><b>常用操作</b></dt>
<dd style="display:block" class="sitem" id="items2_2">
<ul class="sitemu">
<li><a target="main" href="<{:U('Category/index')}>">栏目管理</a></li>
<li><a target="main" href="<{:U('Liuyan/index')}>">留言管理</a></li>
<li><a target="main" href="<{:U('Adver/index')}>">广告管理</a></li>
<li><a target="main" href="<{:U('Links/index')}>">友情链接</a></li>
</ul>
</dd>
</dl>
</div>
<div id="ct3" style="display:none">
<dl id="sunitems2_3" class="bitem"><dt onclick="showHide('items2_3')"><b>用户管理</b></dt>
<dd id="items2_3" class="sitem">
<ul class="sitemu">
<li><a target="main" href="<{:U('Admin/index')}>">管理员列表</a></li>
<li><a target="main" href="<{:U('Admin/role')}>">角色列表</a></li>
</ul>
</dd>
</dl>
<dl id="sunitems3_3" class="bitem"><dt onclick="showHide('items3_3')"><b>权限管理</b></dt>
<dd id="items3_3" class="sitem">
<ul class="sitemu">
<li><a target="main" href="<{:U('Authc/fenpei')}>">角色分配管理</a></li>
<li><a target="main" href="<{:U('Authc/group')}>">角色列表</a></li>
<li><a target="main" href="<{:U('Authc/rules')}>">规则管理</a></li>
</ul>
</dd>
</dl>
<dl id="sunitems1_3" class="bitem"><dt onclick="showHide('items1_3')"><b>系统操作</b></dt>
<dd id="items1_3" class="sitem">
<ul class="sitemu">
<li><a target="main" href="<{:U('Index/system')}>">系统参数设置</a></li>
<li><a target="main" href="<{:U('Index/delcache')}>">清理缓存</a></li>
<li><a target="main" href="<{:U('Baksql/index')}>">数据管理</a></li>
</ul>
</dd>
</dl>
</div>
</div>
</td>
</tr>
<!-- <tr>
<td width="26"></td>
<td width="160" valign="top"><img src="__PUB__images/bottom.gif"></td>
</tr> -->
</tbody>
</table>
</body></html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<style type="text/css">
.input-xxlarge{ margin-bottom: 0px;}
.long{ width: 530px;}
.input-xxlarge1 {margin-bottom: 0px;}
</style>
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript">
$(function(){
$('#configadd').hide();
$('.configadd').click(function(){
if($("#configadd").attr('isshow') == 1)
{
$("#configadd").attr('isshow',0);
$('#configadd').hide();
}
else if(!$("#configadd").attr('issow'))
{
$("#configadd").attr('isshow',1);
$('#configadd').show();
}
});
});
</script>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<table class="table table-condensed table-bordered table-hover">
<tbody>
<tr>
<th colspan="4" class="pp_1">更改系统基本设置
<eq name="Think.cookie.ADMIN_KEY" value="1"><span><a href="javascript:void(0);" class="configadd">添加系统基本设置
</a></span></eq>
</th>
</tr>
<tr id="configadd" isshow=0>
<td colspan="4" align="center" style="padding:15px; background-color:#f0f0f0;">
<form action="__URL__/do_config" name="configadd" method="post">
<table cellspacing="0" cellpadding="0" class="pp_2">
<tr>
<td ><span class='red'>*</span>变量名</td>
<td><input type="text" name="cfg" style='width:80%' /></td>
<td>参数值</td>
<td><input type="text" name="content" style='width:80%' /></td>
</tr>
<tr>
<td><span class='red'>*</span>参数说明</td>
<td><input type="text" name="name" style='width:80%' /></td>
<td>参数类型</td>
<td>
<input type="radio" name="type" value='string' id='string' checked/>&nbsp;<label for="string">文本</label>
<input type="radio" name="type" value='bstring'id='bstring'/>&nbsp;<label for="bstring">多行文本</label>
<input type="radio" name="type" value='bool' id='bool'/>&nbsp;<label for="bool">布尔(Y/N) </label>
<input type="radio" name="type" value='number' id='number'/>&nbsp;<label for="number">数字</label>
</td>
</tr>
<tr>
<td>排序</td>
<td><input type="text" name="sort" style='width:30%' /></td>
<td colspan='2' align='center'>
<input type="submit" name="submit" value=" 保存变量 " class="coolbg np" /></td>
</tr>
</table>
</form>
</td>
</tr>
<form action="" method="post" name="form1">
<tr>
<td width="14%" style="text-align:center;">参数说明</td>
<td width="47%" style="text-align:center;">参数值</td>
<td width="29%" style="text-align:center;">变量名</td>
<td width="10%" style="text-align:center;">排序</td>
</tr>
<volist name="lists" id="datalist">
<tr>
<td style="text-align:right;"><{$datalist.name}>:</td>
<td>
<if condition="$datalist['type'] eq 'string'">
<input name="cfg[][cfg_<{$datalist['id']}>]" type="text" id="cfg_<{$datalist['id']}>" value="<{$datalist['content']}>" class="input-xxlarge" />
<elseif condition="$datalist['type'] eq 'number'"/>
<input name="cfg[][cfg_<{$datalist['id']}>]" type="text" id="cfg_<{$datalist['id']}>" value="<{$datalist['content']}>" class="input-xxlarge" style="width:30%" />
<elseif condition="$datalist['type'] eq 'bstring'"/>
<textarea class="long" rows="2" name="cfg[][cfg_<{$datalist['id']}>]" id="cfg_<{$datalist['id']}>"><{$datalist['content']}></textarea>
<elseif condition="$datalist['type'] eq bool"/>
<input type='radio' class='np' name="cfg[][cfg_<{$datalist['id']}>]" value='Y'
<if condition="$datalist['content'] eq 'Y'"> checked </if>>是&nbsp;
<input type='radio' class='np' name="cfg[][cfg_<{$datalist['id']}>]" value='N'
<if condition="$datalist['content'] eq 'N'"> checked </if>>否&nbsp;
</if>
</td>
<td><{$datalist.cfg}></td>
<td><input type="text" name="sort_<{$datalist['id']}>" value="<{$datalist['sort']}>" style="width:100px" /></td>
</tr>
</volist>
<tr>
<td></td>
<td colspan="3"><button class="btn btn-large btn-info" type="submit">提交</button></td>
</tr>
</form>
</tbody>
</table>
</div>
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<load href='__PUB__js/pp_check.js'/>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<form name="group" action="" method="post">
<table class="table table-condensed table-bordered table-hover">
<tbody>
<tr>
<td colspan="2" style="padding-left:10px;">
<div style="float:left">
<b>添加分配</b>
</div>
<div style="float:right">
[<a href="<{:U('fenpei')}>"><u>返回列表</u></a>]
</div>
</td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">管理员名称:</font></td>
<td>
<select name="uid" onChange="select_check('uid');">
<option value="">请选择会员</option>
<volist name="admin" id="v">
<option value="<{$v.id}>"><{$v.username}></option>
</volist>
</select>
</td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">角色:</font></td>
<td>
<php>$empty='<a href="'.U('addgroup').'">无用角色,请先添加角色</a>';</php>
<volist name="groups" id="v" empty="$empty">
<input name="group_id" type="radio" value='<{$v.id}>' /> <{$v.title}> &nbsp;
</volist>
</td>
</tr>
<tr>
<td colspan="2" style="text-align:center">
<input name="submit" type="submit" style=" background:url(__PUB__img/button_save.gif); width:60px; height:22px; border:0" value=" "> &nbsp;&nbsp;&nbsp;<a href="javascript:history.go(-1);"><img src="__PUB__img/button_back.gif" width="60" height="22" border="0"></a>
</td>
</tr>
</tbody>
</table>
</form>
</div>
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<script>
/**
* 实现全选
* @param fm 包裹的form表单
*/
function selectAll(fm){
if(fm.elements.length <= 0) {
return;
}else {
for(var i in fm.elements) {
if(fm.elements[i].type == 'checkbox') {
fm.elements[i].checked = true;
}
}
}
}
/**
* 取消全选
*/
function UnSelectAll(fm) {
if(fm.elements.length <= 0) {
return;
}else {
for(var i in fm.elements) {
if(fm.elements[i].type == 'checkbox') {
fm.elements[i].checked = false;
}
}
}
}
</script>
<style>
.pp_button{padding:0px 8px; font-weight:bold; line-height:180%; font-size:13px;}
</style>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<form name="group" action="" method="post">
<table class="table table-condensed table-bordered table-hover">
<tbody>
<tr>
<td colspan="2" style="padding-left:10px;">
<div style="float:left">
<b>添加角色</b>
</div>
<div style="float:right">
[<a href="<{:U('group')}>"><u>返回列表</u></a>]
</div>
</td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">角色名称:</font></td>
<td><input name="title" type="text" value=""></td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">等级数:</font></td>
<td><input name="grade" type="text" value=""> <span style="color:red">只能填写数字,如1,2,3...</span></td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">是否审核资料</font></td>
<td>
<input type="radio" name="isreview" value="1" checked="checked" />&nbsp; <input type="radio" name="isreview" value="0" />
</td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">是否启用</font></td>
<td>
<input type="radio" name="status" value="1" checked="checked" /> 启用 &nbsp; <input type="radio" name="status" value="0" /> 关闭
</td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">规则:</font></td>
<td class="group_rule">
<div><button class='btn btn-mini pp_button' onclick="selectAll(this.form);return false;">全 选</button>&nbsp;&nbsp;<button class='btn btn-mini pp_button' onclick="UnSelectAll(this.form);return false;">取消全选</button></div>
<php>$empty='<a href="'.U('addrule').'">无规则,请先添加规则</a>';</php>
<volist name="rules" id="v" empty="$empty">
<php>
if($catid != $v['catid'])
{
$catid=$v['catid'];
$cat_true=true;
}
else
{
$cat_true=false;
}
if($cat_true) echo '<div class="title">'.$authcategory[$catid].'</div>';
</php>
<span><input name="rules[]" type="checkbox" value='<{$v.id}>' id="pp_<{$v.id}>" /> <label for="pp_<{$v.id}>" style="display:inline; font-size:12px;"><{$v.title}></label></span>
</volist>
</td>
</tr>
<tr>
<td colspan="2" style="text-align:center">
<input name="submit" type="submit" style=" background:url(__PUB__img/button_save.gif); width:60px; height:22px; border:0" value=" "> &nbsp;&nbsp;&nbsp;<a href="javascript:history.go(-1);"><img src="__PUB__img/button_back.gif" width="60" height="22" border="0"></a>
</td>
</tr>
</tbody>
</table>
</form>
</div>
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<load href='__PUB__js/pp_check.js'/>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<form name="rule" action="" method="post">
<table class="table table-condensed table-bordered table-hover">
<tbody>
<tr>
<td colspan="2" style="padding-left:10px;">
<div style="float:left">
<b>添加规则</b>
</div>
<div style="float:right">
[<a href="<{:U('rules')}>"><u>返回列表</u></a>]
</div>
</td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">分类:</font></td>
<td>
<select name="catid">
<option value="">请选择</option>
<foreach name="authcategory" key="k" item="v">
<option value="<{$k}>"><{$v}></option>
</foreach>
</select>
</td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">规则名称:</font></td>
<td><input name="title" type="text" value="" onblur="input_check('title');"></td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">是否启用</font></td>
<td>
<input type="radio" name="status" value="1" checked="checked" /> 启用 &nbsp; <input type="radio" name="status" value="0" /> 关闭
</td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">规则内容:</font></td>
<td>
<input name="name" type="text" value='' onblur="input_check('name');"/>
</td>
</tr>
<tr>
<td class="text_right_wid_90">条件:</td>
<td>
<input name="condition" type="text" value='' />
</td>
</tr>
<tr>
<td class="text_right_wid_90">排序:</td>
<td>
<input name="sort" type="text" value='' />
</td>
</tr>
<tr>
<td colspan="2" style="text-align:center">
<input name="submit" type="submit" style=" background:url(__PUB__img/button_save.gif); width:60px; height:22px; border:0" value=" "> &nbsp;&nbsp;&nbsp;<a href="javascript:history.go(-1);"><img src="__PUB__img/button_back.gif" width="60" height="22" border="0"></a>
</td>
</tr>
</tbody>
</table>
</form>
</div>
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>|后台管理系统</title>
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/node.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.form.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.custom.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<table class="table table-condensed table-bordered">
<tbody><tr>
<td colspan="11" style="padding-left:10px;">
<div style="float:left">
<b>节点列表</b>
</div>
<div style="float:right">
[<!--a href=""><u>增加应用</u></a-->]
</div>
</td>
</tr>
<tr>
<td>
<div class="app">
<div class="title">
<div class="pull-left"><i class="icon-th-large"></i> 功能授权</div>
</div>
<volist name="data" id="v">
<div class="action">
<div class="title">
<div class="pull-left"><i class="icon-th"></i><{$v.key}></div></div>
<volist name="v['list']" id="vo">
<div class="method">
<div><input name="check" type="checkbox" value="<{$vo.id}>" <if condition="$vo['is'] eq 1"> checked</if>><{$vo.title}>[<{$vo.name}>]</div>
</div>
</volist>
</div>
</volist>
</div>
</td>
</tr>
</tbody></table>
</div>
</body></html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<form name="form" action="" method="post">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="2" style="padding-left:10px;">
<div style="float:left">
<b>添加管理员</b>
</div>
<div style="float:right">
[<a href="<{:U('index')}>"><u>返回列表</u></a>]
</div>
</td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">登陆账号:</font></td>
<td class="bline"><input name="username" type="text" id="username" size="30" class="iptxt" value="<{$data.username}>"></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">姓名:</font></td>
<td class="bline"><input name="name" type="text" id="name" size="30" class="iptxt" value="<{$data.name}>"></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">角色:</font></td>
<td class="bline">
<select name="role" id="role" style="width:200px">
<volist name="list_role" id="vo">
<option value="<{$vo.id}>" <if condition="$vo['id'] eq $data['role']">selected</if> >
<{$vo.name}>
</option>
</volist>
</select>
</td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right">密码:</td>
<td class="bline"><input name="password" type="password" id="password" size="30" class="iptxt"></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right">确认密码:</td>
<td class="bline"><input name="password2" type="password" id="password2" size="30" class="iptxt"></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right">电话:</td>
<td class="bline"><input name="tel" type="text" id="tel" size="30" class="iptxt" value="<{$data.tel}>"></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right">邮箱:</td>
<td class="bline"><input name="email" type="email" id="email" size="30" class="iptxt" value="<{$data.email}>"></td>
</tr>
<tr><td colspan="2" style="text-align:center">
<input name="id" type="hidden" id="id" size="30" class="iptxt" value="<{$data.id}>">
<input name="domain" type="submit" style=" background:url(__PUB__img/button_save.gif); width:60px; height:22px; border:0" value=" ">
&nbsp;&nbsp;&nbsp;<a href="javascript:history.go(-1);"><img src="__PUB__img/button_back.gif" width="60" height="22" border="0"></a></td></tr>
</tbody></table>
</form>
</div>
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<load href='__PUB__js/pp_check.js'/>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<form name="group" action="" method="post">
<table class="table table-condensed table-bordered table-hover">
<tbody>
<tr>
<td colspan="2" style="padding-left:10px;">
<div style="float:left">
<b>修改分配</b>
</div>
<div style="float:right">
[<a href="<{:U('fenpei')}>"><u>返回列表</u></a>]
</div>
</td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">管理员名称:</font></td>
<td>
<{$admin[$data['uid']]}>
<input type="hidden" name="uid" value="<{$data.uid}>" />
</td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">角色:</font></td>
<td>
<php>$empty='<a href="'.U('addgroup').'">无用角色,请先添加角色</a>';</php>
<volist name="groups" id="v" empty="$empty">
<input name="group_id" type="radio" value='<{$v.id}>' <eq name="v.id" value="$data.group_id">checked="checked"</eq> /> <{$v.title}> &nbsp;
</volist>
</td>
</tr>
<tr>
<td colspan="2" style="text-align:center">
<input name="submit" type="submit" style=" background:url(__PUB__img/button_save.gif); width:60px; height:22px; border:0" value=" "> &nbsp;&nbsp;&nbsp;<a href="javascript:history.go(-1);"><img src="__PUB__img/button_back.gif" width="60" height="22" border="0"></a>
</td>
</tr>
</tbody>
</table>
<input type="hidden" name="id" value="<{$data.id}>" />
</form>
</div>
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<script>
/**
* 实现全选
* @param fm 包裹的form表单
*/
function selectAll(fm){
if(fm.elements.length <= 0) {
return;
}else {
for(var i in fm.elements) {
if(fm.elements[i].type == 'checkbox') {
fm.elements[i].checked = true;
}
}
}
}
/**
* 取消全选
*/
function UnSelectAll(fm) {
if(fm.elements.length <= 0) {
return;
}else {
for(var i in fm.elements) {
if(fm.elements[i].type == 'checkbox') {
fm.elements[i].checked = false;
}
}
}
}
</script>
<style>
.pp_button{padding:0px 8px; font-weight:bold; line-height:180%; font-size:13px;}
</style>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<form name="group" action="" method="post">
<table class="table table-condensed table-bordered table-hover">
<tbody>
<tr>
<td colspan="2" style="padding-left:10px;">
<div style="float:left">
<b>修改角色</b>
</div>
<div style="float:right">
[<a href="<{:U('group')}>"><u>返回列表</u></a>]
</div>
</td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">角色名称:</font></td>
<td><input name="title" type="text" value="<{$data.title}>"></td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">等级数:</font></td>
<td><input name="grade" type="text" value="<{$data.grade}>"> <span style="color:red">只能填写数字,如1,2,3...</span></td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">是否审核资料</font></td>
<td>
<input type="radio" name="isreview" value="1" <eq name="data.isreview" value="1">checked="checked"</eq> /> 是 &nbsp; <input type="radio" name="isreview" value="0" <eq name="data.isreview" value="0">checked="checked"</eq> /> 否
</td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">是否启用</font></td>
<td>
<input type="radio" name="status" value="1" <eq name="data.status" value="1">checked="checked"</eq> /> 启用 &nbsp; <input type="radio" name="status" value="0" <eq name="data.status" value="0">checked="checked"</eq> /> 关闭
</td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">规则:</font></td>
<td class="group_rule">
<div><button class='btn btn-mini pp_button' onclick="selectAll(this.form);return false;">全 选</button>&nbsp;&nbsp;<button class='btn btn-mini pp_button' onclick="UnSelectAll(this.form);return false;">取消全选</button></div>
<php>$empty='<a href="'.U('addrule').'">无规则,请先添加规则</a>';</php>
<volist name="rules" id="v" empty="$empty">
<php>
if($catid != $v['catid'])
{
$catid=$v['catid'];
$cat_true=true;
}
else
{
$cat_true=false;
}
if($cat_true) echo '<div class="title">'.$authcategory[$catid].'</div>';
</php>
<span><input name="rules[]" type="checkbox" value='<{$v.id}>' <in name="v.id" value="$data.rules">checked="checked"</in> id="pp_<{$v.id}>"/> <label for="pp_<{$v.id}>" style="display:inline; font-size:12px;"><{$v.title}></label></span>
</volist>
</td>
</tr>
<tr>
<td colspan="2" style="text-align:center">
<input name="submit" type="submit" style=" background:url(__PUB__img/button_save.gif); width:60px; height:22px; border:0" value=" "> &nbsp;&nbsp;&nbsp;<a href="javascript:history.go(-1);"><img src="__PUB__img/button_back.gif" width="60" height="22" border="0"></a>
<input type="hidden" name="id" value="<{$data.id}>" />
</td>
</tr>
</tbody>
</table>
</form>
</div>
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<load href='__PUB__js/pp_check.js'/>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<form name="rule" action="" method="post">
<table class="table table-condensed table-bordered table-hover">
<tbody>
<tr>
<td colspan="2" style="padding-left:10px;">
<div style="float:left">
<b>添加规则</b>
</div>
<div style="float:right">
[<a href="<{:U('rules')}>"><u>返回列表</u></a>]
</div>
</td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">分类:</font></td>
<td>
<select name="catid">
<option value="">请选择</option>
<foreach name="authcategory" item="v" key="k">
<option value="<{$k}>" <eq name="k" value="$data.catid"> selected="selected"</eq>><{$v}></option>
</foreach>
</select>
</td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">规则名称:</font></td>
<td><input name="title" type="text" value="<{$data.title}>" onblur="input_check('title');"></td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">是否启用</font></td>
<td>
<input type="radio" name="status" value="1" <if condition="!$data['status'] || $data['status'] eq 1">checked="checked"</if> /> 启用 &nbsp; <input type="radio" name="status" value="0" <eq name="data.status" value="0">checked="checked"</eq> /> 关闭
</td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">规则内容:</font></td>
<td>
<input name="name" type="text" value='<{$data.name}>' onblur="input_check('name');"/>
</td>
</tr>
<tr>
<td class="text_right_wid_90">条件:</td>
<td>
<input name="condition" type="text" value='<{$data.condition}>' />
</td>
</tr>
<tr>
<td class="text_right_wid_90">排序:</td>
<td>
<input name="sort" type="text" value='<{$data.sort}>' />
</td>
</tr>
<tr>
<td colspan="2" style="text-align:center">
<input name="submit" type="submit" style=" background:url(__PUB__img/button_save.gif); width:60px; height:22px; border:0" value=" "> &nbsp;&nbsp;&nbsp;<a href="javascript:history.go(-1);"><img src="__PUB__img/button_back.gif" width="60" height="22" border="0"></a>
<input type="hidden" name="id" value="<{$data.id}>" />
</td>
</tr>
</tbody>
</table>
<input type="hidden" name="search" value="<{$search}>">
<input type="hidden" name="p" value="<{$p}>">
</form>
</div>
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<!-- saved from url=(0050)http://localhost/cms/index.php/admin/Article/index -->
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<script>
$(document).ready(function(){
$("#SelectAll").click(function(){
$("input[name='id']").checkCbx();
});
$(".YanZheng").click(function(event){
var a=$("input:checked").length;
if(a==0){
alert('您还没有请选择操作内容!');
event.preventDefault();
}
});
});
$.fn.checkCbx = function(){
return this.each(function(){
this.checked = !this.checked;
});
}
/* 审核 */
function checkArc(aid){
var qstr=getCheckboxItem();
if(aid==0) aid = getOneItem();
location="/admin.php?m=Authc&a=ischeck&id="+qstr;
}
/* 删除审核 */
function checkArcd(aid){
var qstr=getCheckboxItem();
if(aid==0) aid = getOneItem();
location="/admin.php?m=Authc&a=ischeckd&id="+qstr;
}
/* 推荐 */
function adArc(aid){
var qstr=getCheckboxItem();
if(aid==0) aid = getOneItem();
location="/admin.php?m=Authc&a=isbest&id="+qstr;
}
/* 删除推荐 */
function adArcd(aid){
var qstr=getCheckboxItem();
if(aid==0) aid = getOneItem();
location="/admin.php?m=Authc&a=isbestd&id="+qstr;
}
/* 删除信息 */
function delArc(aid){
if(window.confirm('您确定要删除吗?')){
var qstr=getCheckboxItem();
location="<{:U('delallfenpei','','')}>/id/"+qstr;
}
else
{
return false;
}
}
/* 修改信息属性 */
function chang_status(id,value,table)
{
var newvalue=0;
if(value == 1)
newvalue=0;
else
newvalue=1;
var submitData = {
id:id,
status:newvalue,
table:table
};
$.post("<{:U('editattr')}>",submitData,
function(data) {
if (data.success == true) {
alert(data.msg);
setTimeout('window.location.href=location.href',1000);
return;
}
else {}
}
,'json');
}
/* 获得选中文件的文件名 */
function getCheckboxItem()
{
var allSel="";
//if(document.form2.id.value) return document.form2.id.value;
if($('input[name="id"]').length == 1 && $('input[name="id"]:checked').length == 1)
{
return document.form2.id.value;
}
for(i=0;i<document.form2.id.length;i++)
{
if(document.form2.id[i].checked)
{
if(allSel=="")
allSel=document.form2.id[i].value;
else
allSel=allSel+","+document.form2.id[i].value;
}
}
return allSel;
}
$(function(){
/* $('.confirmdel').click(function(){
var url=$(this).attr('href');
if(window.confirm('你确定要删除吗?'))
{
window.location=url;
}
return false;
});
*/
/* 全选
$('#selAll').click(function(){
$('input[name="id"]').attr('checked',true);
}); */
/* 取消全选
$('#noselAll').click(function(){
$('input[name="id"]').each(function () {
$(this).attr("checked", !$(this).attr("checked"));
});
}); */
});
</script>
<style>
#colid1 {
font-family: "宋体";
}
</style>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<table class="table table-condensed table-bordered table-hover">
<tbody>
<tr>
<td colspan="10" style="padding-left:10px;">
<div style="float:left">
<b>角色分配管理</b>
</div>
<div style="float:right">
[<a href="<{:U('addfenpei')}>"><u>增加分配</u></a>]
</div>
</td>
</tr>
<form name="form2" action="<{:U('form')}>" method="post">
<tr align="center">
<td width="6%" class="text_center">ID</td>
<td width="4%" class="text_center">选择</td>
<td width="20%" class="text_center">会员名称</td>
<td width="40%" class="text_center">角色</td>
<td width="30%" class="text_center">管理项</td>
</tr>
<volist name="lists" id="list">
<tr class="text_center">
<td nowrap="" class="text_center"><{$list['id']}></td>
<td class="text_center"><input name="id" type="checkbox" id="check" value="<{$list.id}>" class="np"></td>
<td class="text_center"><{$list['username']['username']}></td>
<td class="text_center">
<volist name="list.group_id" id="v">
<{$groups.$v}>、
</volist>
</td>
<td class="text_center">
<a href='<{:U('editfenpei',array('id'=>$list['id']))}>' class="btn btn-mini"><i class="icon-edit"></i> 修改</a>
<a href='<{:U('delfenpei',array('id'=>$list['id']))}>' class="btn btn-mini"><i class="icon-trash"></i> 删除</a>
</td>
</tr>
</volist>
<tr>
<td colspan="10" align="right">
<input type="hidden" value="<{$_GET['p']}>" name="p">
<a href="javascript:void(0)" class="btn btn-mini" id="SelectAll"><i class="icon-check"></i> 全选/反选</a>&nbsp;
<button class="btn btn-mini YanZheng" name="Delete" value=" " type="button" style="cursor:pointer;" onclick="javascript:delArc(0);"><i class="icon-trash"></i> 删除</button>&nbsp;
</td>
</tr>
</form>
</tbody></table>
</div>
</body></html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>角色管理</title>
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<script>
/* 修改信息属性 */
function chang_status(id,value,table)
{
var newvalue=0;
if(value == 1)
newvalue=0;
else
newvalue=1;
var submitData = {
id:id,
status:newvalue,
table:table
};
$.post("<{:U('editattr')}>",submitData,
function(data) {
if (data.success == true) {
alert(data.msg);
setTimeout('window.location.href=location.href',1000);
return;
}
else {}
}
,'json');
}
</script>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<table class="table table-condensed table-bordered table-hover">
<tbody>
<tr>
<td colspan="5" style="padding-left:10px;">
<div style="float:left">
<b>角色列表</b>
</div>
<div style="float:right">
[<a href="<{:U('addgroup')}>"><u>增加角色</u></a>]
</div>
</td>
</tr>
<tr>
<td width="5%" style="text-align:center">ID</td>
<td width="20%" style="text-align:center">角色名称</td>
<td width="10%" style="text-align:center">状态</td>
<td width="50%" style="text-align:center">规则内容</td>
<td width="15%" style="text-align:center">操作项</td>
</tr>
<volist name="lists" id="vo" key="k">
<tr>
<td style="text-align:center"><{$vo.id}></td>
<td style="text-align:center"><{$vo.title}></td>
<td style="text-align:center">
<a href="javascript:chang_status(<{$vo.id}>,<{$vo.status}>,'Authgroup');"><eq name="vo.status" value="1"><i class="icon-ok"></i><else /><span class="red"><i class="icon-no"></i></span></eq></a>
</td>
<td style="text-align:center">
<volist name="vo.rules" id="v">
<{$rules.$v}>、
</volist>
</td>
<td style="text-align:center">
<a href="<{:U('editgroup',array('id'=>$vo['id']))}>" class="btn btn-mini"><i class="icon-edit"></i> 修改</a> &nbsp; <a href="<{:U('delgroup',array('id'=>$vo['id']))}>" class="btn btn-mini"><i class="icon-trash"></i> 删除</a>
</td>
</tr>
</volist>
</tbody></table>
</div>
</body></html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>管理员|后台管理系统</title>
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="5" style="padding-left:10px;">
<div style="float:left">
<b>角色管理</b>
</div>
<div style="float:right">
[<a href="<{:U('roleadd')}>"><u>增加角色</u></a>]
</div>
</td>
</tr>
<tr>
<td width="4%" style="text-align:center">排序</td>
<td width="25%" style="text-align:center">角色名称</td>
<td width="15%" style="text-align:center">管理员数量</td>
<td width="10%" style="text-align:center">状态</td>
<td style="text-align:center">操作项</td>
</tr>
<volist name="lists" id="vo" key="k">
<tr>
<td style="text-align:center"><{$k}></td>
<td style="text-align:center"><{$vo.name}></td>
<td style="text-align:center"><{$vo.id|AdminNum}></td>
<td style="text-align:center">
<a href="<{:U('roleshow',array('tid'=>I('tid'),'id'=>$vo['id'],'p'=>I('p')))}>" class="btn btn-mini">
<if condition="$vo['isshow'] eq 1 ">
<i class="icon-ok"></i>
<else />
<i class="icon-no"></i>
</if>
</a>
</td>
<td style="text-align:center">
<a href="<{:U('auth',array('id'=>$vo['id']))}>" class="btn btn-mini"><i class="icon-edit"></i> 功能授权</a>
<a href="<{:U('authcat',array('id'=>$vo['id']))}>" class="btn btn-mini"><i class="icon-edit"></i> 内容授权</a>
<a href="<{:U('roleedit',array('id'=>$vo['id']))}>" class="btn btn-mini"><i class="icon-edit"></i> 编辑</a>
<a href="<{:U('delete',array('id'=>$vo['id']))}>" class="btn btn-mini"><i class="icon-trash"></i> 删除</a>
</td>
</tr>
</volist>
</tbody></table>
</div>
</body></html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<form name="form" action="" method="post">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="2" style="padding-left:10px;">
<div style="float:left">
<b>添角色员</b>
</div>
<div style="float:right">
[<a href="<{:U('role')}>"><u>返回列表</u></a>]
</div>
</td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">角色名称:</font></td>
<td class="bline"><input name="title" type="text" id="title" size="30" class="iptxt"></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right">排序:</td>
<td class="bline"><input name="sort" type="text" id="sort" size="30" class="iptxt"></td>
</tr>
<tr><td colspan="2" style="text-align:center">
<input name="domain" type="submit" style=" background:url(__PUB__img/button_save.gif); width:60px; height:22px; border:0" value=" ">
&nbsp;&nbsp;&nbsp;<a href="javascript:history.go(-1);"><img src="__PUB__img/button_back.gif" width="60" height="22" border="0"></a></td></tr>
</tbody></table>
</form>
</div>
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<form name="form" action="" method="post">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="2" style="padding-left:10px;">
<div style="float:left">
<b>添角色员</b>
</div>
<div style="float:right">
[<a href="<{:U('role')}>"><u>返回列表</u></a>]
</div>
</td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">角色名称:</font></td>
<td class="bline"><input name="name" type="text" id="name" size="30" class="iptxt" value="<{$data.name}>"></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right">排序:</td>
<td class="bline"><input name="sort" type="text" id="sort" size="30" class="iptxt" value="<{$data.sort}>"></td>
</tr>
<tr><td colspan="2" style="text-align:center">
<input name="id" type="hidden" value="<{$data.id}>">
<input name="domain" type="submit" style=" background:url(__PUB__img/button_save.gif); width:60px; height:22px; border:0" value=" ">
&nbsp;&nbsp;&nbsp;<a href="javascript:history.go(-1);"><img src="__PUB__img/button_back.gif" width="60" height="22" border="0"></a></td></tr>
</tbody></table>
</form>
</div>
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<!-- saved from url=(0050)http://localhost/cms/index.php/admin/Article/index -->
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<script>
$(document).ready(function(){
$("#SelectAll").click(function(){
$("input[name='id']").checkCbx();
});
$(".YanZheng").click(function(event){
var a=$("input:checked").length;
if(a==0){
alert('您还没有请选择操作内容!');
event.preventDefault();
}
});
});
$.fn.checkCbx = function(){
return this.each(function(){
this.checked = !this.checked;
});
}
/* 审核 */
function checkArc(aid){
var qstr=getCheckboxItem();
if(aid==0) aid = getOneItem();
location="/admin.php?m=Authc&a=ischeck&id="+qstr;
}
/* 删除审核 */
function checkArcd(aid){
var qstr=getCheckboxItem();
if(aid==0) aid = getOneItem();
location="/admin.php?m=Authc&a=ischeckd&id="+qstr;
}
/* 推荐 */
function adArc(aid){
var qstr=getCheckboxItem();
if(aid==0) aid = getOneItem();
location="/admin.php?m=Authc&a=isbest&id="+qstr;
}
/* 删除推荐 */
function adArcd(aid){
var qstr=getCheckboxItem();
if(aid==0) aid = getOneItem();
location="/admin.php?m=Authc&a=isbestd&id="+qstr;
}
/* 删除信息 */
function delArc(aid){
if(window.confirm('您确定要删除吗?')){
var qstr=getCheckboxItem();
location="<{:U('delallrule','','')}>/id/"+qstr;
}
else
{
return false;
}
}
/* 修改信息属性 */
function chang_status(id,value,table)
{
var newvalue=0;
if(value == 1)
newvalue=0;
else
newvalue=1;
var submitData = {
id:id,
status:newvalue,
table:table
};
$.post("<{:U('editattr')}>",submitData,
function(data) {
if (data.success == true) {
alert(data.msg);
setTimeout('window.location.href=location.href',1000);
return;
}
else {}
}
,'json');
}
/* 获得选中文件的文件名 */
function getCheckboxItem()
{
var allSel="";
//if(document.form2.id.value) return document.form2.id.value;
if($('input[name="id"]').length == 1 && $('input[name="id"]:checked').length == 1)
{
return document.form2.id.value;
}
for(i=0;i<document.form2.id.length;i++)
{
if(document.form2.id[i].checked)
{
if(allSel=="")
allSel=document.form2.id[i].value;
else
allSel=allSel+","+document.form2.id[i].value;
}
}
return allSel;
}
$(function(){
/* $('.confirmdel').click(function(){
var url=$(this).attr('href');
if(window.confirm('你确定要删除吗?'))
{
window.location=url;
}
return false;
});
*/
/* 全选
$('#selAll').click(function(){
$('input[name="id"]').attr('checked',true);
}); */
/* 取消全选
$('#noselAll').click(function(){
$('input[name="id"]').each(function () {
$(this).attr("checked", !$(this).attr("checked"));
});
}); */
$('.auth_sort').blur(function(){
var validata={
id:$(this).attr('attrid'),
f:'sort',
val:$(this).val(),
table:'Authrulef',
msg:'排序'
};
$.post("<{:U('changeSort')}>",validata,
function(data) {
if (data.success == true) {
//alert(data.msg);
// setTimeout('window.location.reload();',10);
setTimeout('window.location.href="<{:U('rules',array('p'=>$p,search=>I('search')))}>";',10);
return;
}
else {
//alert(data.msg);
return;
}
}
,'json');
});
});
</script>
<style>
#colid1 {
font-family: "宋体";
}
.search{margin:0; padding:0;font-weight:bold;}
.search select{width:auto;}
</style>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<table class="table table-condensed table-bordered table-hover">
<tbody>
<tr>
<td colspan="10" style="padding-left:10px;">
<div style="float:left">
<b>规则列表</b>
</div>
<div style="float:right">
[<a href="<{:U('addrule')}>"><u>增加规则</u></a>]
</div>
</td>
</tr>
<tr>
<td colspan="10" style="padding:10px;">
<form action="<{:U('rules')}>" method='post' class="search">
请选择所属分类:<select name="search">
<option value="">全部分类</option>
<volist name="authcategory" id="v">
<option <eq name="search" value="$key">selected="selected"</eq> value="<{$key}>"><{$v}></option>
</volist>
</select>
</form>
</td>
</tr>
<form name="form2" action="<{:U('form')}>" method="post">
<tr align="center">
<td width="5%" class="text_center">ID</td>
<td width="4%" class="text_center">选择</td>
<td width="7%" class="text_center">排序</td>
<td width="18%" class="text_center">规则名称</td>
<td width="8" class="text_center">所属分类</td>
<td width="4%" class="text_center">状态</td>
<td width="18%" class="text_center">规则内容</td>
<td width="18%" class="text_center">条件</td>
<td width="18%" class="text_center">管理项</td>
</tr>
<volist name="lists" id="list" empty="$empty">
<tr class="text_center">
<td nowrap="" class="text_center"><{$list['id']}></td>
<td class="text_center"><input name="id" type="checkbox" id="check" value="<{$list.id}>" class="np"></td>
<td class="text_center"><input type="text" name="sort" attrid="<{$list.id}>" value="<{$list.sort}>" class="auth_sort" /></td>
<td class="text_left">
<span id="id">
<{$list.title}>
</span>
</td>
<td class="text_center"><{$authcategory[$list['catid']]}></td>
<td class="text_center"><a href="javascript:chang_status(<{$list.id}>,<{$list.status}>,'Authrule');"><eq name="list.status" value="1"><i class="icon-ok" var="<{$list.id}>"></i><else /><i class="icon-no" var="<{$list.id}>"></i></eq></a></td>
<td class="text_center"><{$list.name}></td>
<td class="text_center"><{$list.condition}></td>
<td class="text_center">
<a href='<{:U('editrule',array('id'=>$list['id'],'p'=>I('p'),'search'=>I('search')))}>' class="btn btn-mini"><i class="icon-edit"></i> 修改</a>
<a href='<{:U('delrule',array('id'=>$list['id'],'p'=>I('p'),'search'=>I('search')))}>' class="btn btn-mini"><i class="icon-trash"></i> 删除</a>
</td>
</tr>
</volist>
<notempty name="lists">
<tr>
<td colspan="10" align="right">
<input type="hidden" value="<{$_GET['p']}>" name="p">
<a href="javascript:void(0)" class="btn btn-mini" id="SelectAll"><i class="icon-check"></i> 全选/反选</a>&nbsp;
<button class="btn btn-mini YanZheng" name="Delete" value=" " type="button" style="cursor:pointer;" onclick="javascript:delArc(0);"><i class="icon-trash"></i> 删除</button>&nbsp;
</td>
</tr>
</notempty>
</form>
<notempty name="page">
<tr>
<td colspan="10">
<ul class="page"><{$page}></ul>
</td>
</tr>
</notempty>
</tbody></table>
</div>
</body>
</html>
<script>
$(function(){
$(':input[name="search"]').change(function(){
var v=$(this).children('option:selected').val();
$('.search').submit();
});
});
</script>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>后台管理系统</title>
<link rel="stylesheet" href="__PUB__css/style.css" type="text/css">
<link rel="stylesheet" href="__PUB__css/css.css" type="text/css">
<!-- <script type="text/javascript" src="__PUB__js/utils.js"></script> -->
<script type="text/javascript" src="__PUB__js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="__PUB__js/Validform_v5.3.2.js"></script>
</head>
<body class="loginpage">
<div class="loginbox">
<div class="loginboxinner">
<div class="logo">
<h1><span>后台</span>管理系统</h1>
<p style="font-style: inherit;"><a href="<{:C('')}>" style="color:white">返回首页</a></p>
<!--p>premium admin template</p-->
</div><!--logo-->
<form class="demoform" method="post" action="<{:U('Public/login')}>">
<div class="username">
<div class="usernameinner">
<input name="username" placeholder="管理员姓名" type="text" datatype="*" nullmsg="管理员姓名不能为空" />
</div>
</div>
<div class="password">
<div class="passwordinner">
<input name="password" placeholder="管理员密码" type="password" datatype="*" nullmsg="管理员密码不能为空">
</div>
</div>
<div class="repassword">
<div class="repasswordinner">
<input name="verify" placeholder="验证码" type="text" class="text1" datatype="*" nullmsg="验证码不能为空" /><span><a href="javascript:fleshVerify()"><img id="verifyImg" src="<{:U('verify',array(),'')}>" alt="点击刷新验证码" onclick="fleshVerify()" style=" cursor:pointer;vertical-align:top"/></a></span>
</div>
</div>
<button type="submit" id="btn_sub"><b>进入管理中心</b></button>
<input name="act" value="signin" type="hidden">
</form>
</div><!--loginboxinner-->
</div><!--loginbox-->
</body>
</html>
<script language="JavaScript">
<!--
function fleshVerify(){
//重载验证码
var time = new Date().getTime();
document.getElementById("verifyImg").src="<{:U('verify',array(),'')}><{:C('URL_PATHINFO_DEPR')}>"+time;
}
$(".demoform").Validform();
//-->
</script>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>后台登陆系统</title>
<style>
* { margin:0; padding:0; word-wrap:break-word; word-break:break-all; }/*英文自动换行*/
html{background:#f6f6f6 ;}
body { background: bottom center no-repeat; color:#121212; font:12px/1.6em Helvetica, Arial, sans-serif; padding-bottom:227px; }
a { color:#555; text-decoration:none; text-decoration:none; blr:expression(this.onFocus=this.blur()); /* IE Opera */ outline:none; /* FF Opera */}
a:hover { text-decoration:underline; text-decoration:none;}
img { border:none; }
html { overflow:-moz-scrollbars-vertical; }
.login{ width:351px; height:240px; background:url(__PUB__images/bg_03.jpg) top left no-repeat;
position: fixed; left: 50%; top: 50%; margin-left: -176px; margin-top: -160px;/*margin:160px auto 80px auto;*/}
.login table{ width:220px; margin:0 auto; padding-top:40px; line-height:40px;}
.login table td{ height:40px;}
.text{ width:153px; height:25px; border:1px solid #e5e1dd;}
.text1{ width:75px; height:25px; border:1px solid #e5e1dd; margin-right:10px; float:left;}
.yz span{ display:block; padding-top:3px; float:left;}
.but{ background:url(__PUB__images/bg2_03.jpg) top left no-repeat; width:49px; height:17px; float:left; margin-right:10px; border:0; cursor:pointer;}
.but2{ background:url(__PUB__images/bg2_05.jpg) top left no-repeat; width:49px; height:17px; border:0; cursor:pointer;}
</style>
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script>
function fleshVerify(){
//重载验证码
var time = new Date().getTime();
document.getElementById("verifyImg").src="<{:U('verify',array(),'')}><{:C('URL_PATHINFO_DEPR')}>"+time;
}
</script>
</head>
<body>
<div class="login"><form class="form-horizontal" method="post" action="<{:U('Public/login')}>">
<table width="220" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="65">用户名:</td>
<td width="155"><input name="username" type="text" class="text" /></td>
</tr>
<tr>
<td>密 码:</td>
<td><input name="password" type="password" class="text" /></td>
</tr>
<tr>
<td>验证码:</td>
<td class="yz"><input name="verify" type="text" class="text1" /><span><a href="javascript:fleshVerify()"><img id="verifyImg" src="<{:U('verify',array(),'')}>" alt="点击刷新验证码" onclick="fleshVerify()" style=" cursor:pointer;vertical-align:top"/></a></span></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input name="" value="" type="submit" class="but" /><input name="" value="" type="reset" class="but2" /></td>
</tr>
</table> </form>
<div class="clear"></div>
<div style="text-align: center;margin-top: 20px;"><a href="http://www.enet360.com">北京联合易网网络技术开发有限公司</a></div>
</div>
</body>
</html>
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<style type="text/css">
.input-xxlarge{ margin-bottom: 0px;}
.long{ width: 530px;}
.input-xxlarge1 {margin-bottom: 0px;}
td span{padding-left:8px; color:#ff0000;}
.d_value table td{border:none; padding:0;}
.d_value table td a{padding:0 6px; font-size:23px; font-weight:bold; text-decoration:none; cursor:pointer;}
</style>
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<form action="__URL__/add" name="configadd" method="post">
<table class="table table-condensed table-bordered table-hover">
<tbody>
<tr>
<th colspan="4" class="pp_1">添加字段信息<span><a href="<{:U('index')}>">返回</a></span></th>
</tr>
<tr>
<td class="w_p_15 text_right"><span class='red'>*</span>字段名</td>
<td colspan="3"><input type="text" name="name" style='width:30%' /><span>例如:name</span></td>
</tr>
<tr>
<td class="text_right"><span class='red'>*</span>字段说明</td>
<td colspan="3"><input type="text" name="description" style='width:30%' /><span>例如:姓名</span></td>
</tr>
<tr>
<td class="text_right">备注说明</td>
<td colspan="3">
<input type="text" name="note" style='width:30%' />
</td>
</tr>
<tr id="ftype">
<td class="text_right"><span class='red'>*</span>字段类型</td>
<td colspan="3">
<input type="radio" name="type" value='string' id='string' checked/>&nbsp;<label for="string">文本</label>
<input type="radio" name="type" value='bstring'id='bstring'/>&nbsp;<label for="bstring">多行文本</label>
<input type="radio" name="type" value='bool' id='bool'/>&nbsp;<label for="bool">布尔(Y/N) </label>
<input type="radio" name="type" value='number' id='number'/>&nbsp;<label for="number">数字</label>
<input type="radio" name="type" value='t_extarea' id='t_extarea'/>&nbsp;<label for="t_extarea">文本域</label>
<input type="radio" name="type" value='s_elect' id='s_elect'/>&nbsp;<label for="s_elect">下拉列表</label>
<input type="radio" name="type" value='c_heckbox' id='c_heckbox'/>&nbsp;<label for="c_heckbox">多选框</label>
<input type="radio" name="type" value='r_adio' id='r_adio'/>&nbsp;<label for="r_adio">单选框</label>
</td>
</tr>
<tr class="isdate">
<td class="text_right">调用日期组件</td>
<td colspan="3">
<input type="radio" name="isdate" value="0" checked />否 <input type="radio" name="isdate" value="1" />
</td>
</tr>
<tr class="isupfile">
<td class="text_right">调用上传组件</td>
<td colspan="3">
<input type="radio" name="upfile" value="0" checked />否 <input type="radio" name="upfile" value="1" />图片 <input type="radio" name="upfile" value="2" />文件
</td>
</tr>
<tr class="text_right">
<td class="text_right">调用JS组件</td>
<td colspan="3">
<select id="isjs" name="isjs">
<option value="" selected>无JS组件</option>
<volist name="jsarr" id='cv' key='ck'>
<option value='<{$ck}>'><{$cv}></option>
</volist>
</select>
</td>
</tr>
<tr class="istags">
<td class="text_right">调用标签组件</td>
<td colspan="3">
<input type="radio" name="istags" value="0" checked />否 <input type="radio" name="istags" value="1" />
</td>
</tr>
<tr>
<td class="text_right">前台整行显示</td>
<td colspan="3">
<input type="radio" name="fline" value="2" checked />是 <input type="radio" name="fline" value="1" />
</td>
</tr>
<tr>
<td class="text_right">是否在检索中显示</td>
<td colspan="3"><input type="radio" name="issearch" value="1" />是 <input type="radio" name="issearch" value="2" checked /></td>
</tr>
<tr>
<td class="text_right">是否在导航中显示</td>
<td colspan="3"><input type="radio" name="isheader" value="1" />是 <input type="radio" name="isheader" value="2" checked /></td>
</tr>
<tr>
<td class="text_right">是否必填</td>
<td colspan="3"><input type="radio" name="required" value="1" checked />必填 <input type="radio" name="required" value="2" />非必填</td>
</tr>
<tr>
<td class="text_right">资料填报列表是否显示</td>
<td class="w_p_25"><input type="radio" name="isshow1" value="1" checked />显示 <input type="radio" name="isshow1" value="0" />不显示</td>
<td class="text_right w_p_15">资料填报列表显示宽度</td>
<td ><input type="text" name="width1" style='width:15%' /><span style="color:#000">px</span></td>
</tr>
<tr>
<td class="text_right">资料审核列表是否显示</td>
<td ><input type="radio" name="isshow2" value="1" checked />显示 <input type="radio" name="isshow2" value="0" />不显示</td>
<td class="text_right w_p_15">资料审核列表显示宽度</td>
<td ><input type="text" name="width2" style='width:15%' /><span style="color:#000">px</span></td>
</tr>
<tr>
<td class="text_right">资料检索列表是否显示</td>
<td ><input type="radio" name="isshow3" value="1" checked />显示 <input type="radio" name="isshow3" value="0" />不显示</td>
<td class="text_right w_p_15">资料检索列表显示宽度</td>
<td ><input type="text" name="width3" style='width:15%' /><span style="color:#000">px</span></td>
</tr>
<tr>
<td colspan='4' style="padding-left:30%">
<input type="submit" name="submit" value=" 保存字段 " class="coolbg np" />
</td>
</tr>
</tbody>
</table>
</form>
</div>
</body>
</html>
<script>
function checkType(){
var t_val=$(':input[name=type]:checked').val();
if($('span.datenote').length>0) $('span.datenote').remove(); //去掉 多行调用日期控件添加备注
if($('span.upfilenote').length>0) $('span.upfilenote').remove(); //去掉 多行调用上传控件添加备注
switch(t_val){
case 'bstring':
//行数:<input type="text" name="rownum" value="" class="width_60" /> 
if($('#rowcol').length<=0) $('#ftype').after('<tr id="rowcol"><td class="w_p_10 text_right">行/列数</td><td class="w_p_39">列数:<input type="text" name="colnum" value="" class="width_60" /></td><td class="w_p_10 text_right">列标题</td><td><input type="text" name="ctitle" value="" style="width:60%" /><span>多列,使用“#”分隔</span></td></tr>'); //行数列数
$('tr.d_value').remove(); //移除默认值
$('tr.isdate').css('display','table-row'); //调用日期制作
$('tr.isupfile').css('display','table-row'); //调用上传控件
if($('span.datenote').length<=0)$('tr.isdate td:eq(1)').append('<span class="datenote">(根据列标题匹配关键词"时间"、"日期"来调用控件)</span>'); //多行时 调用日期控件添加备注
if($('span.upfilenote').length<=0)$('tr.isupfile td:eq(1)').append('<span class="upfilenote">(根据列标题匹配关键词"上传"来调用控件)</span>'); //多行时 调用上传控件添加备注
$('tr.istags').css('display','none').children('td').children(':input[name="istags"]').removeAttr('checked').eq(0).prop('checked','checked'); //调用标签控件
break;
case 's_elect':
case 'c_heckbox':
case 'r_adio':
$('#rowcol').remove(); //移除行数列数
if($('.d_value').length<=0) $('#ftype').after("<tr class='d_value'><td class=\"text_right\">默认值</td><td colspan='3'><table><tr><td><input type=\"text\" at_pp=\"d_value\" name=\"d_value[]\" value=\"\" /></td><td><a class=\"dv1\">+</a></td></tr></table></td></tr>"); //默认值
$('tr.isdate').css('display','none').children('td').children(':input[name="isdate"]').removeAttr('checked').eq(0).prop('checked','checked'); //调用日期制作
$('tr.isupfile').css('display','none').children('td').children(':input[name="upfile"]').removeAttr('checked').eq(0).prop('checked','checked'); //调用上传控件
// $(':input[name="isdate"][value="0"]').prop('checked','checked'); //隐藏调用日期控件,并默认选中不是按钮
// $(':input[name="upfile"][value="0"]').prop('checked','checked'); //隐藏调用上传控件,并默认选中不是按钮
$('tr.istags').css('display','none').children('td').children(':input[name="istags"]').removeAttr('checked').eq(0).prop('checked','checked'); //调用标签控件
break;
case 'string':
$('#rowcol').remove(); //移除行数列数
$('tr.d_value').remove(); //移除默认值
$('tr.isdate').css('display','table-row'); //调用日期制作
$('tr.isupfile').css('display','table-row'); //调用上传控件
$('tr.istags').css('display','table-row'); //调用上传控件
break;
case 'bool':
case 'number':
case 't_extarea':
$('#rowcol').remove(); //移除行数列数
$('tr.d_value').remove(); //移除默认值
$('tr.isdate').css('display','none').children('td').children(':input[name="isdate"]').removeAttr('checked').eq(0).prop('checked','checked'); //调用日期制作
$('tr.isupfile').css('display','none').children('td').children(':input[name="upfile"]').removeAttr('checked').eq(0).prop('checked','checked'); //调用上传控件
// $(':input[name="isdate"][value="0"]').prop('checked','checked');//隐藏调用日期控件,并默认选中不是按钮
// $(':input[name="upfile"][value="0"]').prop('checked','checked');//隐藏调用上传控件,并默认选中不是按钮
$('tr.istags').css('display','none').children('td').children(':input[name="istags"]').removeAttr('checked').eq(0).prop('checked','checked'); //调用标签控件
break;
/*default:
$('#rowcol').html(''); //行数列数清空
$('#ftype + tr.d_value').remove(); //移除默认值*/
}
}
$(function(){
checkType();
$(':input[name=type]').click(function(){
checkType();
});
$('.table').delegate('a.dv1','click',function(){
// var dv=$(':input[at_pp="d_value"]').length + 1;
$(this).parent().parent().parent().append('<tr><td><input type=\"text\" at_pp=\"d_value\" name=\"d_value[]\" value=\"\" /></td><td><a onclick=\"javascript:void(0);\" class=\"dv2\">-</a></td></tr>');
});
$('.table').delegate('a.dv2','click',function(){
$(this).parent().parent().remove();
});
});
</script>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<style type="text/css">
.input-xxlarge{ margin-bottom: 0px;}
.long{ width: 530px;}
.input-xxlarge1 {margin-bottom: 0px;}
td span{padding-left:8px; color:#ff0000;}
.d_value table td{border:none; padding:0;}
.d_value table td a{padding:0 6px; font-size:23px; font-weight:bold; text-decoration:none; cursor:pointer;}
</style>
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<form action="__URL__/edit" name="configadd" method="post">
<table class="table table-condensed table-bordered table-hover">
<tbody>
<tr>
<th colspan="4" class="pp_1">修改字段信息<span><a href="<{:U('index')}>">返回</a></span></th>
</tr>
<tr>
<td class="w_p_15 text_right"><span class='red'>*</span>字段名</td>
<td colspan="3"><input type="text" name="name" style='width:30%' value="<{$fdata.name}>" readonly /><span>例如:name</span></td>
</tr>
<tr>
<td class="text_right"><span class='red'>*</span>字段说明</td>
<td colspan="3"><input type="text" name="description" style='width:30%' value="<{$fdata.description}>" /><span>例如:姓名</span></td>
</tr>
<tr>
<td class="text_right">备注说明</td>
<td colspan="3">
<input type="text" name="note" style='width:30%' value="<{$fdata.note}>" />
</td>
</tr>
<tr id="ftype">
<td class="text_right"><span class='red'>*</span>字段类型</td>
<td colspan="3">
<input type="radio" name="type" value='string' id='string' <eq name="fdata.type" value="string">checked</eq> />&nbsp;<label for="string">文本</label>
<input type="radio" name="type" value='bstring'id='bstring' <eq name="fdata.type" value="bstring">checked</eq> />&nbsp;<label for="bstring">多行文本</label>
<input type="radio" name="type" value='bool' id='bool' <eq name="fdata.type" value="bool">checked</eq> />&nbsp;<label for="bool">布尔(Y/N) </label>
<input type="radio" name="type" value='number' id='number' <eq name="fdata.type" value="number">checked</eq> />&nbsp;<label for="number">数字</label>
<input type="radio" name="type" value='t_extarea' id='t_extarea' <eq name="fdata.type" value="t_extarea">checked</eq> />&nbsp;<label for="t_extarea">文本域</label>
<input type="radio" name="type" value='s_elect' id='s_elect' <eq name="fdata.type" value="s_elect">checked</eq> />&nbsp;<label for="s_elect">下拉列表</label>
<input type="radio" name="type" value='c_heckbox' id='c_heckbox' <eq name="fdata.type" value="c_heckbox">checked</eq> />&nbsp;<label for="c_heckbox">多选框</label>
<input type="radio" name="type" value='r_adio' id='r_adio' <eq name="fdata.type" value="r_adio">checked</eq> />&nbsp;<label for="r_adio">单选框</label>
</td>
</tr>
<eq name="fdata['type']" value="bstring">
<tr id="rowcol"><td class="w_p_10 text_right">行/列数</td><td class="w_p_39"><!-- 行数:<input type="text" name="rownum" value="<{$fdata.rownum}>" class="width_60" />  -->列数:<input type="text" name="colnum" value="<{$fdata.colnum}>" class="width_60" /></td><td class="w_p_10 text_right">列标题</td><td><input type="text" name="ctitle" value="<{$fdata.ctitle}>" style="width:60%" /><span>多列,使用“#”分隔</span></td></tr>
</eq>
<in name='fdata.type' value="s_elect,c_heckbox,r_adio">
<tr class='d_value'>
<td class="text_right">默认值</td>
<td colspan="3">
<table>
<?php
$val=explode('#',$fdata['d_value']);
?>
<volist name="val" id="v" key="key">
<tr><td><input type="text" at_pp="d_value" name="d_value[]" value="<{$v}>" /></td><td><eq name="key" value="1"><a class="dv1">+</a><else /><a class="dv2">-</a></eq></td></tr>
</volist>
</table>
</td>
</tr>
</in>
<tr class="isdate">
<td class="text_right">调用日期组件</td>
<td colspan="3">
<input type="radio" name="isdate" value="0" <eq name="fdata.isdate" value="0">checked</eq> />否 <input type="radio" name="isdate" value="1" <eq name="fdata.isdate" value="1">checked</eq> />是
</td>
</tr>
<tr class="isupfile">
<td class="text_right">调用上传组件</td>
<td colspan="3">
<input type="radio" name="upfile" value="0" <eq name="fdata.upfile" value="0">checked</eq> />否 <input type="radio" name="upfile" value="1" <eq name="fdata.upfile" value="1">checked</eq> />图片 <input type="radio" name="upfile" value="2" <eq name="fdata.upfile" value="2">checked</eq> />文件
</td>
</tr>
<tr class="text_right">
<td class="text_right">调用JS组件</td>
<td colspan="3">
<select id="isjs" name="isjs">
<option value="0" <eq name="fdata.isjs" value="0">selected</eq> >无JS组件</option>
<volist name="jsarr" id='cv' key='ck'>
<option value='<{$ck}>' <if condition="$fdata.isjs eq $ck"> selected</if>><{$cv}></option>
</volist>
</select>
</td>
</tr>
<tr class="istags">
<td class="text_right">调用标签组件</td>
<td colspan="3">
<input type="radio" name="istags" value="0" <eq name="fdata.istags" value="0">checked</eq> />否 <input type="radio" name="istags" value="1" <eq name="fdata.istags" value="1">checked</eq> />是
</td>
</tr>
<tr>
<td class="text_right">前台整行显示</td>
<td colspan="3">
<input type="radio" name="fline" value="2" <eq name="fdata.fline" value="2">checked</eq> />是 <input type="radio" name="fline" value="1" <eq name="fdata.fline" value="1">checked</eq> />否
</td>
</tr>
<tr>
<td class="text_right">是否在检索中显示</td>
<td colspan="3"><input type="radio" name="issearch" value="1" <eq name="fdata.issearch" value="1">checked</eq> />是 <input type="radio" name="issearch" value="2" <eq name="fdata.issearch" value="2">checked</eq> />否</td>
</tr>
<tr>
<td class="text_right">是否在导航中显示</td>
<td colspan="3"><input type="radio" name="isheader" value="1" <eq name="fdata.isheader" value="1">checked</eq> />是 <input type="radio" name="isheader" value="2" <eq name="fdata.isheader" value="2">checked</eq> />否</td>
</tr>
<tr>
<td class="text_right">是否必填</td>
<td colspan="3"><input type="radio" name="required" value="1" <eq name="fdata.required" value="1">checked</eq> />必填 <input type="radio" name="required" value="2" <eq name="fdata.required" value="2">checked</eq> />非必填</td>
</tr>
<tr>
<td class="text_right">状态</td>
<td colspan="3"><input type="radio" name="isshow" value="1" <eq name="fdata.isshow" value="1">checked</eq> />开启 <input type="radio" name="isshow" value="2" <eq name="fdata.isshow" value="2">checked</eq> />关闭</td>
</tr>
<tr>
<td class="text_right">资料填报列表是否显示</td>
<td class="w_p_25"><input type="radio" name="isshow1" value="1" <eq name="fdata.isshow1" value="1">checked</eq> />显示 <input type="radio" name="isshow1" value="0" <eq name="fdata.isshow1" value="0">checked</eq> />不显示</td>
<td class="text_right w_p_15">资料填报列表显示宽度</td>
<td ><input type="text" name="width1" style='width:15%' value="<{$fdata.width1}>" /><span style="color:#000">px</span></td>
</tr>
<tr>
<td class="text_right">资料审核列表是否显示</td>
<td ><input type="radio" name="isshow2" value="1" <eq name="fdata.isshow2" value="1">checked</eq> />显示 <input type="radio" name="isshow2" value="0" <eq name="fdata.isshow2" value="0">checked</eq> />不显示</td>
<td class="text_right w_p_15">资料审核列表显示宽度</td>
<td ><input type="text" name="width2" style='width:15%' value="<{$fdata.width2}>" /><span style="color:#000">px</span></td>
</tr>
<tr>
<td class="text_right">资料检索列表是否显示</td>
<td ><input type="radio" name="isshow3" value="1" <eq name="fdata.isshow3" value="1">checked</eq> />显示 <input type="radio" name="isshow3" value="0" <eq name="fdata.isshow3" value="0">checked</eq> />不显示</td>
<td class="text_right w_p_15">资料检索列表显示宽度</td>
<td ><input type="text" name="width3" style='width:15%' value="<{$fdata.width3}>" /><span style="color:#000">px</span></td>
</tr>
<tr>
<td colspan='4' style="padding-left:30%">
<input type="submit" name="submit" value=" 保存字段 " class="coolbg np" />
</td>
</tr>
</tbody>
</table>
<input type="hidden" name="id" value="<{$fdata.id}>" />
</form>
</div>
</body>
</html>
<script>
function checkType(){
var t_val=$(':input[name=type]:checked').val();
if($('span.datenote').length>0) $('span.datenote').remove(); //去掉 多行调用日期控件添加备注
if($('span.upfilenote').length>0) $('span.upfilenote').remove(); //去掉 多行调用上传控件添加备注
switch(t_val){
case 'bstring':
//行数:<input type="text" name="rownum" value="" class="width_60" /> 
if($('#rowcol').length<=0) $('#ftype').after('<tr id="rowcol"><td class="w_p_10 text_right">行/列数</td><td class="w_p_39">列数:<input type="text" name="colnum" value="" class="width_60" /></td><td class="w_p_10 text_right">列标题</td><td><input type="text" name="ctitle" value="" style="width:60%" /><span>多列,使用“#”分隔</span></td></tr>'); //行数列数
$('tr.d_value').remove(); //移除默认值
$('tr.isdate').css('display','table-row'); //调用日期制作
$('tr.isupfile').css('display','table-row'); //调用上传控件
if($('span.datenote').length<=0)$('tr.isdate td:eq(1)').append('<span class="datenote">(根据列标题匹配关键词"时间"、"日期"来调用控件)</span>'); //多行时 调用日期控件添加备注
if($('span.upfilenote').length<=0)$('tr.isupfile td:eq(1)').append('<span class="upfilenote">(根据列标题匹配关键词"上传"来调用控件)</span>'); //多行时 调用上传控件添加备注
$('tr.istags').css('display','none').children('td').children(':input[name="istags"]').removeAttr('checked').eq(0).prop('checked','checked'); //调用标签组件 并选择值为0
break;
case 's_elect':
case 'c_heckbox':
case 'r_adio':
$('#rowcol').remove(); //移除行数列数
if($('.d_value').length<=0) $('#ftype').after("<tr class='d_value'><td class=\"text_right\">默认值</td><td colspan='3'><table><tr><td><input type=\"text\" at_pp=\"d_value\" name=\"d_value[]\" value=\"\" /></td><td><a class=\"dv1\">+</a></td></tr></table></td></tr>"); //默认值
$('tr.isdate').css('display','none').children('td').children(':input[name="isdate"]').removeAttr('checked').eq(0).prop('checked','checked'); //调用日期制作 并选择值为0
$('tr.isupfile').css('display','none').children('td').children(':input[name="upfile"]').removeAttr('checked').eq(0).prop('checked','checked'); //调用上传组件 并选择值为0
$('tr.istags').css('display','none').children('td').children(':input[name="istags"]').removeAttr('checked').eq(0).prop('checked','checked'); //调用标签组件 并选择值为0
break;
case 'string':
$('#rowcol').remove(); //移除行数列数
$('tr.d_value').remove(); //移除默认值
$('tr.isdate').css('display','table-row'); //调用日期制作
$('tr.isupfile').css('display','table-row'); //调用上传控件
$('tr.istags').css('display','table-row'); //调用标签控件
break;
case 'bool':
case 'number':
case 't_extarea':
$('#rowcol').remove(); //移除行数列数
$('tr.d_value').remove(); //移除默认值
$('tr.isdate').css('display','none').children('td').children(':input[name="isdate"]').removeAttr('checked').eq(0).prop('checked','checked'); //调用日期制作
$('tr.isupfile').css('display','none').children('td').children(':input[name="upfile"]').removeAttr('checked').eq(0).prop('checked','checked'); //调用上传组件 并选择值为0
$('tr.istags').css('display','none').children('td').children(':input[name="istags"]').removeAttr('checked').eq(0).prop('checked','checked'); //调用标签组件 并选择值为0
break;
/*default:
$('#rowcol').html(''); //行数列数清空
$('#ftype + tr.d_value').remove(); //移除默认值*/
}
}
$(function(){
checkType();
$(':input[name=type]').click(function(){
checkType();
});
$('.table').delegate('a.dv1','click',function(){
// var dv=$(':input[at_pp="d_value"]').length + 1;
$(this).parent().parent().parent().append('<tr><td><input type=\"text\" at_pp=\"d_value\" name=\"d_value[]\" value=\"\" /></td><td><a onclick=\"javascript:void(0);\" class=\"dv2\">-</a></td></tr>');
});
$('.table').delegate('a.dv2','click',function(){
$(this).parent().parent().remove();
});
});
</script>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<style type="text/css">
.input-xxlarge{ margin-bottom: 0px;}
.long{ width: 530px;}
.input-xxlarge1 {margin-bottom: 0px;}
</style>
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript">
$(function(){
/*$('#configadd').hide();
$('.configadd').click(function(){
if($("#configadd").attr('isshow') == 1)
{
$("#configadd").attr('isshow',0);
$('#configadd').css('display','none');
}
else if(!$("#configadd").attr('issow'))
{
$("#configadd").attr('isshow',1);
$('#configadd').css('display','table-row');
}
});*/
$(".icon_isok").click(function(){
var vara=$(this).find('i').attr('var');
if(confirm("确定修改字段状态吗?")){
$.get("<{:U('Shenhe')}>",{'id':vara},function(data){
if(data){
location.reload();
}else{
alert('修改失败!');
location.reload();
}
});
}
});
});
</script>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<form action="<{:U('index')}>" method="post" name="form1">
<table class="table table-condensed table-bordered table-hover">
<tbody>
<tr>
<th colspan="7" class="pp_1">数据字段信息管理
<eq name="Think.cookie.ADMIN_KEY" value="1"><span><a href="<{:U('add')}>" class="configadd">添加字段
</a></span></eq>
</th>
</tr>
<tr>
<td width="15%" class="text_center">字段名</td>
<td width="20%" class="text_center">字段说明</td>
<td width="15%" class="text_center">字段类型</td>
<td width="9%" class="text_center">是否必填</td>
<td width="9%" class="text_center">字段状态</td>
<td width="15%" class="text_center">排序</td>
<td width="17%" class="text_center">操作</td>
</tr>
<volist name="lists" id="datalist">
<tr>
<td class="text_center"><{$datalist.name}><input type="hidden" name="name[][name_<{$datalist['id']}>]" value="<{$datalist.name}>" /></td>
<td class="text_center"><{$datalist.description}><input type="hidden" name="description_<{$datalist['id']}>" value="<{$datalist.description}>" /></td>
<td class="text_center">
<?php
switch($datalist['type']){
case 'string':
echo '文本';
break;
case 'bstring':
echo '多文本';
// echo ' <input type="text" name="rownum_'.$datalist['id'].'" value="'.$datalist['rownum'].'" class="w_20" />行';
// echo ' <input type="text" name="colnum_'.$datalist['id'].'" value="'.$datalist['colnum'].'" class="w_20" />列';
echo '('.$datalist['colnum'].'列)';
break;
case 'bool':
echo '布尔(Y/N)';
break;
case 'number':
echo '数字';
break;
case 't_extarea':
echo '文本域';
break;
case 's_elect':
echo '下拉列表';
break;
case 'c_heckbox':
echo '多选框';
break;
case 'r_adio':
echo '单选框';
break;
}
?>
<input type="hidden" name="type_<{$datalist['id']}>" value="<{$datalist['type']}>" />
</td>
<td class="text_center">
<eq name="datalist.required" value="1">
必填
<else />
<font color="red">非必填</font>
</eq>
</td>
<td class="text_center">
<button class="btn btn-mini icon_isok" value=" " type="button" style="cursor:pointer;">
<eq name="datalist.isshow" value="1">
<i class="icon-ok" var="<{$datalist.id}>"></i>
<else />
<i class="icon-no" var="<{$datalist.id}>"></i>
</eq>
</button>
</td>
<td class="text_center"><input type="text" name="sort_<{$datalist['id']}>" value="<{$datalist['sort']}>" style="width:100px" /></td>
<td class="text_center"><a href="<{:U('look',array('id'=>$datalist['id']))}>">查看</a> <a href="<{:U('edit',array('id'=>$datalist['id']))}>">修改</a> <notin name="datalist.name" value="$notDel"><a href="javascript:if(confirm('确认要删除该字段信息吗?删除后数据无法恢复!')){location.href='<{:U('delete',array('id'=>$datalist['id']))}>';}">删除</a><else />  </notin></td>
</tr>
</volist>
<tr>
<td colspan="7" style="padding-left:30%;"><button class="btn btn-large btn-info" type="submit" style="padding:5px 8px; font-size:15px;">提 交</button></td>
</tr>
</tbody>
</table></form>
</div>
</body>
</html>
<script>
/*$(function(){
checkType();
$(':input[name=type]').click(function(){
checkType();
});
});
function checkType(){
var t_val=$(':input[name=type]:checked').val();
if(t_val == 'bstring'){ //多文本
$('#rowcol').html('行数:<input type="text" name="rownum" value="" class="width_60" /> 列数:<input type="text" name="colnum" value="" class="width_60" />');
}else{
$('#rowcol').html('');
}
}*/
</script>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<style type="text/css">
.input-xxlarge{ margin-bottom: 0px;}
.long{ width: 530px;}
.input-xxlarge1 {margin-bottom: 0px;}
td span{padding-left:8px; color:#999;}
.d_value table td{border:none; padding:0;}
.d_value table td a{padding:0 6px; font-size:23px; font-weight:bold; text-decoration:none; cursor:pointer;}
</style>
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<form action="__URL__/do_config" name="configadd" method="post">
<table class="table table-condensed table-bordered table-hover">
<tbody>
<tr>
<th colspan="4" class="pp_1">查看字段信息<span><a href="<{:U('index')}>">返回</a></span></th>
</tr>
<tr>
<td class="w_p_10 text_right"><span class='red'>*</span>字段名</td>
<td colspan="3"><{$data.name}></td>
</tr>
<tr>
<td class="text_right"><span class='red'>*</span>字段说明</td>
<td colspan="3"><{$data.description}></td>
</tr>
<tr>
<td class="text_right">备注说明</td>
<td colspan="3"><{$data.note}></td>
</tr>
<tr id="ftype">
<td class="text_right"><span class='red'>*</span>字段类型</td>
<td class="w_p_39">
<?php
switch($data['type']){
case 'string':
echo '文本';
break;
case 'bstring':
echo '多文本';
break;
case 'bool':
echo '布尔(Y/N)';
break;
case 'number':
echo '数字';
break;
case 't_extarea':
echo '文本域';
break;
case 's_elect':
echo '下拉列表';
break;
case 'c_heckbox':
echo '多选框';
break;
case 'r_adio':
echo '单选框';
break;
}
?>
</td>
<td id="rowcol" colspan="2"><eq name="data['type']" value="bstring">行数:<{$data.rownum}> 列数:<{$data.colnum}></eq></td>
</tr>
<in name='data.type' value="s_elect,c_heckbox,r_adio">
<tr>
<td class="text_right">默认值</td>
<td colspan="3">
<?php
$val=explode('#',$data['d_value']);
foreach($val as $v){
echo $v,' ';
}
?>
</td>
</tr>
</in>
<tr>
<td class="text_right">是否必填</td>
<td colspan="3">
<eq name="data.required" value="1">必填<else />非必填</eq>
</td>
</tr>
<tr>
<td class="text_right">状态</td>
<td colspan="3">
<eq name="data.isshow" value="1">开启<else />关闭</eq>
</td>
</tr>
<tr>
<td colspan="4" class="text_center">
<input type="button" value="返回" onclick="location.href='<{:U('index')}>'" />
</td>
</tr>
</tbody>
</table>
</form>
</div>
</body>
</html>
<script>
function checkType(){
var t_val=$(':input[name=type]:checked').val();
switch(t_val){
case 'bstring':
$('#rowcol').html('行数:<input type="text" name="rownum" value="" class="width_60" /> 列数:<input type="text" name="colnum" value="" class="width_60" />'); //添加行数列数
$('#ftype + tr.d_value').remove(); //移除默认值
break;
case 's_elect':
case 'c_heckbox':
case 'r_adio':
$('#rowcol').html(''); //行数列数清空
if($('.d_value').length<=0) $('#ftype').after("<tr class='d_value'><td class=\"text_right\">默认值</td><td colspan='3'><table><tr><td><input type=\"text\" at_pp=\"d_value\" name=\"d_value[]\" value=\"\" /></td><td><a class=\"dv1\">+</a></td></tr></table></td></tr>"); //默认值
break;
// case 'string':
case 'bool':
case 'number':
$('#rowcol').html(''); //行数列数清空
$('#ftype + tr.d_value').remove(); //移除默认值
break;
/*default:
$('#rowcol').html(''); //行数列数清空
$('#ftype + tr.d_value').remove(); //移除默认值*/
}
/*if(t_val == 'bstring'){ //多文本
$('#rowcol').html('行数:<input type="text" name="rownum" value="" class="width_60" /> 列数:<input type="text" name="colnum" value="" class="width_60" />');
}else{
$('#rowcol').html('');
}*/
}
$(function(){
checkType();
$(':input[name=type]').click(function(){
checkType();
});
$('.table').delegate('a.dv1','click',function(){
// var dv=$(':input[at_pp="d_value"]').length + 1;
$(this).parent().parent().parent().append('<tr><td><input type=\"text\" at_pp=\"d_value\" name=\"d_value[]\" value=\"\" /></td><td><a onclick=\"javascript:void(0);\" class=\"dv2\">-</a></td></tr>');
});
$('.table').delegate('a.dv2','click',function(){
$(this).parent().parent().remove();
});
});
</script>
\ No newline at end of file \ No newline at end of file
<?php
class ArticleAction extends CommonAction {
public $tab='Article';
public function __construct() {
parent::__construct();
$this->checkLog(); //判断用户是否已经登录
}
/**
* 通知公告
*/
public function index(){
$this->assign('authlist',$this->getPower()); //用户权限
// $order='Article.sort=0,sort asc,id desc'; //注意排序
$order='dotop desc,sort asc,addtime desc,id desc';
$where['isshow'] = array('eq',1);
$model = M($this->tab);
$field = array('id','uid','title','dotop','dotopend','dotopday','addtime','clicknum');
$data = $this->_getLists($model,$where,$order,$field,12,'Pages3',array('header'=>'<li style="border:none;">共%totalRows%条记录','pages'=>'%nowPage%/%totalPages%页 </li>','prev'=>'<上一页','next'=>'下一页>','first'=>'首页','last'=>'尾页','theme'=>'%header% %pages% %prePage% %linkPage% %nextPage% %end%'));
$this->assign('list',$data['list']?$data['list']:array()); //列表
$this->assign('page',$data['page']); //分页
$this->assign('p',$data['p']); //当前页数
$this->assign('page_title','通知公告');
$this->assign('empty','<tr><td colspan="7" style="padding-left:15px;font-size:14px;">暂无相关信息!</td></tr>');
$this->display();
}
/**
* 修改通知公告
*/
public function edit(){
$id=I('id',0,'intval');
if(!$id){
$this->error('参数有误!');
}
$Article=D($this->tab);
if($this->isPost()){
if($Article->create()){
$Article->title=htmlspecialchars($Article->title,ENT_QUOTES);
$lastid=$Article->save();
if($lastid){
$this->success('通知公告修改成功',U('Article/index',array('p'=>I('p',1,'intval'))));
}else{
$this->error('通知公告修改失败');
}
}else{
$this->error($Article->getError());
}
}else{
$data=$Article->where('id='.$id)->find();
$this->assign('data',$data);
$this->display();
}
}
/**
* 发布通知公告
*/
public function add(){
//最大排序值
// $maxp['tid']=array('in',$this->AllCatid($tid,1,'Category'));
// $maxsort=$Article->where($maxp)->max('sort');
if($this->isPost()){
$Article=D($this->tab);
if($Article->create()){
$Article->title=htmlspecialchars($Article->title,ENT_QUOTES);
$lastid=$Article->add();
//echo $Article->getLastSql();
// exit;
if($lastid){
$this->success('通知公告发布成功',U('index'));
}else{
$this->error('通知公告发布失败');
}
}else{
$this->error($Article->getError());
}
}else{
$this->display();
}
}
/**
* 删除通知公告
*/
public function delete(){
$id=I('id',0,'intval');
if(!$id){
$this->error('参数有误!');
}
$where['id'] = array('eq',$id);
$back=M($this->tab)->where($where)->delete();
if($back){
$this->success('删除成功!',U('index',array('p'=>I('p',1,'intval'))));
}else{
$this->error('删除失败!');
}
}
//查看详情通知公告-回收站
public function Look(){
$id=I('id',0,'intval');
if(!$id){
$this->error('参数有误!');
}
$where['id'] = array('eq',$id);
$where['isshow'] = array('eq',1);
$m = M($this->tab);
$arr = $m->where(array('id'=>array('eq',$id)))->find();
$this->assign('data',$arr);
if($arr){
$m->where($where)->setInc('clicknum');
}
$this->display();
}
/**
* zjp
* ajax 通知公告审核
*/
public function Shenhe(){
$Article=D($this->tab);
$is=$Article->where('id='.$this->_param('id'))->getField('isshow');
if($is==1){
$isnew=0;
}else{
$isnew=1;
}
$aa=$Article->where('id='.$this->_param('id'))->setField('isshow',$isnew);
if($aa){
$msg['success']=true;
$msg['msg']='修改成功';
$msg['val']=$isnew;
}else{
$msg['success']=false;
}
echo json_encode($msg);
}
}
\ No newline at end of file \ No newline at end of file
<?php
class CommonAction extends BaseAction {
public function __construct() {
parent::__construct();
header('Content-Type:text/html; charset=utf-8');
$this->checkLog();
//去除反斜梗
if (get_magic_quotes_gpc()){
$_POST = array_map('stripslashes_deep', $_POST);
$_GET = array_map('stripslashes_deep', $_GET);
$_COOKIE = array_map('stripslashes_deep', $_COOKIE);
}
}
public function _initialize()
{
parent::_initialize();
if((MODULE_NAME !="Index" || (MODULE_NAME =="Index" && !in_array(ACTION_NAME,array('index','main','menu','delcache','outlogin')))) && (MODULE_NAME !="Public" || (MODULE_NAME == 'Public' && !in_array(ACTION_NAME,array('login','index','verify')))))
{
import('ORG.Util.Auth');//加载类库
$auth=new Auth();
// var_dump($auth->check(strtolower(MODULE_NAME).'-'.strtolower(ACTION_NAME),cookie('uid')));
// exit;
if(!$auth->check(strtolower(MODULE_NAME).'-'.strtolower(ACTION_NAME),cookie('uid'))){
$this->error('你没有权限');
}
}
}
/**
* 判断用户是否登录
* @return [bool]
*/
public function checkLog() {
if(!cookie('uid') || !cookie('account')){
$this->clearlog();
exit('<script>alert("当前用户未登录或登录超时,请重新登录");top.location.href="'.U('Public/login').'";</script>');
}
}
/**
* 清除登录所生成的cookie
*/
protected function clearLog(){
cookie('uid',null);
cookie('account',null);
cookie('username',null);
cookie('logtime',null);
}
/**
* 用户退出登录
*/
public function outlogin(){
$this->clearLog();
$this->success('退出成功!',U('Public/index'));
}
/**
* 获取用户权限
* 防止 authlist 走出cookie限制
* @return array
*/
protected function getPower(){
//获取用户权限
import('ORG.Util.Auth');//加载类库
$auth=new Auth();
$authlist=$auth->getAuthList(cookie('uid'));
return $authlist;
}
}
\ No newline at end of file \ No newline at end of file
<?php
Class EmptyAction extends Action
{
public $url='';
public $time_back='';
public $show='';
public function _initialize(){
$this->url='http://'.$_SERVER['SERVER_NAME'];
$this->time_back=5;
$this->show='页面不存在,'.$this->time_back.'秒钟后自动跳转到<a href="'.$this->url.'">首页</a>......';
}
public function index()
{
$this->pp_assign();
$this->display('./Public/error.html');
}
public function _empty($name)
{
$this->pp_assign();
$this->display('./Public/error.html');
}
public function pp_assign()
{
$this->assign('url',$this->url);
$this->assign('time_back',$this->time_back.'000');
$this->assign('show',$this->show);
}
}
?>
\ No newline at end of file \ No newline at end of file
<?php
class FwallAction extends Action {
public function authVerify(){
$this->ppauth();
}
private function ppauth(){
cookie('ppfirewall','333');
header("Location:http://".$_SERVER['SERVER_NAME']."/index.php?s=/Admin");
}
}
\ No newline at end of file \ No newline at end of file
<?php
class IndexAction extends CommonAction {
public $tab_sys='';
public function __construct() {
parent::__construct();
$this->tab_sys='System';
}
public function index(){
//获取字段信息
$where_field['isshow'] = array('eq',1); //状态为开启的字段
$where_field['isheader'] = array('eq',1); //在导航中显示
if($where){
$where_field=array_merge($where_field,$where);
}
$m = M('Regfields')->where($where_field);
if($field){
$m = $m->field($field);
}
$file_info = $m->order('sort')->limit(11)->select();
$this->assign('head_top',$file_info);
$this->display();
}
public function main(){
//获取服务器信息
$sysdata['sysos'] = $_SERVER["SERVER_SOFTWARE"]; //获取服务器标识的字串
$sysdata['sysversion'] = PHP_VERSION; //获取PHP服务器版本
//以下两条代码连接MySQL数据库并获取MySQL数据库版本信息
mysql_connect("localhost", "mysql_user", "mysql_pass");
$sysdata['mysqlinfo'] = mysql_get_server_info();
//从服务器中获取GD库的信息
if(function_exists("gd_info")){
$gd = gd_info();
$sysdata['gdinfo'] = $gd['GD Version'];
}else {
$sysdata['gdinfo'] = "未知";
}
if(IS_WIN){//是否属于Windows 环境
$sysdata['system']='Liunx';
}else{
$sysdata['system']='WINNT';
}
//从GD库中查看是否支持FreeType字体
$sysdata['freetype'] = $gd["FreeType Support"] ? "支持" : "不支持";
//从PHP配置文件中获得是否可以远程文件获取
$sysdata['allowurl']= ini_get("allow_url_fopen") ? "支持" : "不支持";
//从PHP配置文件中获得最大上传限制
$sysdata['max_upload'] = ini_get("file_uploads") ? ini_get("upload_max_filesize") : "Disabled";
//从PHP配置文件中获得脚本的最大执行时间
$sysdata['max_ex_time']= ini_get("max_execution_time")."秒";
//以下两条获取服务器时间,中国大陆采用的是东八区的时间,设置时区写成Etc/GMT-8
date_default_timezone_set("Etc/GMT-8");
$sysdata['systemtime'] = date("Y-m-d H:i:s",time());
$this->assign('role',$this->getRole());
$this->assign('system',$sysdata);
$this->display();
}
private function getRole(){
$m=M('Authgroupaccessf');
$where['uid']=array('eq',cookie('uid'));
$info=$m->where($where)->order($order)->getField('group_id');
$info=explode(',',$info);
// 所有用户组
$groups=R('Admin/Power/getRules',array('Authgroupf','title,id'));
if($groups)
{
foreach($groups as $k2 => $v2)
{
if(in_array($v2['id'],$info)) $newgroups[$v2['id']]=$v2['title'];
}
}
return implode(',', $newgroups);
}
/**
* 左侧导航
* pp new
**/
public function menu(){
$this->assign('authlist',$this->getPower());
$this->display();
}
}
\ No newline at end of file \ No newline at end of file
<?php
Class MaillistAction extends CommonAction{
private $tab = 'Webuser';
private $tab2 = 'Department';
private $tabview = 'MaillistView';
public function _initialize() {
parent::_initialize();
$this->assign('page_title','通讯录');
$this->checkLog(); //判断用户是否已经登录
$this->assign('authlist',$this->getPower()); //用户权限
}
public function index(){
if(I('title','','trim')){
$where['name']=array('like','%'.I('title','','trim').'%');
$search['title']=I('title','','trim');
}
if(I('depart','','trim')){
$where['depart_name']=array('like','%'.I('depart','','trim').'%');
$search['depart']=I('depart','','trim');
}
$this->assign('search',$search);
$where['isshow'] = array('eq',1);
$order = 'id desc';
$model = M($this->tab);
$field = array('id','name','depart_name','pid','mobile','tel','email','addtime');
$data = $this->_getLists($model,$where,$order,$field,100,'Pages3',array('header'=>'<li style="border:none;">共%totalRows%条记录','pages'=>'%nowPage%/%totalPages%页 </li>','prev'=>'<上一页','next'=>'下一页>','first'=>'首页','last'=>'尾页','theme'=>'%header% %pages% %prePage% %linkPage% %nextPage% %end%'));
$this->assign('list',$data['list']?$data['list']:array()); //列表
$this->assign('page',$data['page']); //分页
$this->assign('p',$data['p']); //当前页数
$this->assign('page_title','通讯录');
$this->assign('empty','<tr><td colspan="7" style="padding-left:15px;font-size:14px;">暂无相关信息!</td></tr>');
$this->display();
}
public function edit()
{
$Admin=D($this->tab);
$id=I('id',0,'intval');
if(!$id){
$this->error('参数有误!');
}
if($this->isPost()){
if(!$Admin->create()){
$this->error($Admin->getError());
}else{
$lastid=$Admin->save();
if($lastid>0){
$this->success('通讯录信息修改成功',U('index'));
}else{
$this->error('通讯录信息修改失败');
}
}
}else{
$data=$Admin->where('id='.$id)->find();
$this->assign('depart',$this->getDepartment());
$this->assign('data',$data);
$this->display();
}
}
/**
* 添加通讯录
*/
public function add(){
$Admin=D($this->tab);
if($this->isPost()){
//添加用户
if(!$Admin->create()){
$this->error($Admin->getError());
}else{
$lastid=$Admin->add();
if($lastid>0){
$this->success('通讯录信息添加成功',U('index'));
}else{
$this->error('通讯录信息添加失败');
}
}
}else{
$this->assign('depart',$this->getDepartment());
$this->display();
}
}
/**
* 公用删除
* @param int $id [description]
* @param object $model [description]
* @return bool [description]
*/
private function pubDelete($id,$model){
if(is_array($id)){
$map['id'] = array('in',$id);
}else{
$map['id']=array('eq',$id);
}
$aa=$model->where($map)->delete();
if($aa){
return true;
}else{
return false;
}
}
/**
* 删除通讯录
*/
public function delete()
{
$id=I('id',0,'intval');
if(!$id){
$this->error('参数有误!');
}
$m=M($this->tab);
$back=$this->pubDelete($id,$m);
if($back){
$this->success('通讯录信息删除成功',U('index',array('p'=>I('p',1,'intval'))));
}else{
$this->error('通讯录删除失败');
}
}
/**
* 导出excel
*/
public function download(){
set_time_limit(0);
$fields = array('id','name','tel','email','username');
$filename = '通讯录-'.date('_YmdHis');
$filenamebac=$filename;
$filename = iconv('utf-8', 'gb2312', $filename);//文件名称
$dir=str_replace('\\','/',realpath(__ROOT__));
if(!file_exists($dir.'/Uploads/excel')){
@mkdir($dir.'/Uploads/excel','0777');
}
$pp_file_path='/Uploads/excel/'.$filename.'.xls';
$pp_file_pathbac='/Uploads/excel/'.$filenamebac.'.xls';
$pp_file = $dir.$pp_file_path;
$order['id'] = 'desc';
$where['isshow']=array('eq',1);
$list=M($this->tab)->where($where)->field($fields)->order($order)->select();
$f=fopen($pp_file, "w");
fwrite($f,'<table width="100%" border="1" cellpadding="0" cellspacing="1">');
fwrite($f,'');
fwrite($f,'<tr><td align="center">'.iconv("UTF-8", "GBK", "序号").'</td><td align="center">'.iconv("UTF-8", "GBK", "登录帐号").'</td><td align="center">'.iconv("UTF-8", "GBK", "姓名").'</td><td align="center">'.iconv("UTF-8", "GBK", "手机").'</td><td align="center">Email</td></tr>');
if($list){
foreach($list as $k => $v){
fwrite($f,'<tr>');
fwrite($f,'<td align="center">'.($k+1).'</td><td align="center">'.iconv("UTF-8", "GBK", $v['username']).'</td><td align="center">'.iconv("UTF-8", "GBK", $v['name']).'</td><td align="center">'.iconv("UTF-8", "GBK", $v['tel']).'</td><td align="center">'.iconv("UTF-8", "GBK", $v['email']).'</td>');
fwrite($f,'</tr>');
}
}
fwrite($f,'</table>');
fclose($f);
echo '<script>location.href="'.$pp_file_pathbac.'";setTimeout("window.close();",6000);</script>';
}
/**
* 返回部门信息 id name
* @return array
*/
private function getDepartment(){
$field='id,name';
$order='firstname';
$info=M('Department')->field($field)->order($order)->select();
return $info;
}
/**
* 部门管理
*/
public function department(){
if(I('title','','trim')){
$where['name']=array('like','%'.I('title','','trim').'%');
$search['title']=I('title','','trim');
}
$this->assign('search',$search);
$order='firstname';
$model=M($this->tab2);
$field=array('id','name','firstname','addtime');
$data = $this->_getLists($model,$where,$order,$field,12,'Pages3',array('header'=>'<li style="border:none;">共%totalRows%条记录','pages'=>'%nowPage%/%totalPages%页 </li>','prev'=>'<上一页','next'=>'下一页>','first'=>'首页','last'=>'尾页','theme'=>'%header% %pages% %prePage% %linkPage% %nextPage% %end%'));
$this->assign('list',$data['list']?$data['list']:array()); //列表
$this->assign('page',$data['page']); //分页
$this->assign('p',$data['p']); //当前页数
$this->assign('page_title','部门管理');
$this->assign('empty','<tr><td colspan="4" style="padding-left:15px;font-size:14px;">暂无相关信息!</td></tr>');
$this->display();
}
/**
* 添加通讯录
*/
public function add_depart(){
$Admin=D($this->tab2);
if($this->isPost()){
//添加部门
if(!$Admin->create()){
$this->error($Admin->getError());
}else{
$lastid=$Admin->add();
if($lastid>0){
$this->success('部门添加成功',U('department',array('p',I('p',1,'intval'))));
}else{
$this->error('部门添加失败');
}
}
}else{
$this->assign('p',I('p',1,'intval'));
$this->assign('page_title','部门信息');
$this->display();
}
}
/**
* 修改部门信息
* @return [type] [description]
*/
public function edit_depart()
{
$Admin=D($this->tab2);
$id=I('id',0,'intval');
if(!$id){
$this->error('参数有误!');
}
if($this->isPost()){
//修改
if(!$Admin->create()){
$this->error($Admin->getError());
}else{
$lastid=$Admin->save();
if($lastid>0){
$this->success('部门信息修改成功',U('department',array('p'=>I('p',1,'intval'))));
}else{
$this->error('部门信息修改失败');
}
}
}else{
$where['id'] = array('eq',$id);
$data=$Admin->where($where)->find();
$this->assign('data',$data);
$this->assign('page_title','部门信息');
$this->assign('p',I('p',1,'intval'));
$this->display();
}
}
/**
* 删除部门信息
*/
public function del_depart(){
$id=I('id',0,'intval');
if(!$id){
$this->error('参数有误!');
}
$m=M($this->tab2);
$back=$this->pubDelete($id,$m); //公用删除
if($back){
$this->success('部门信息删除成功',U('department',array('p'=>I('p',1,'intval'))));
}else{
$this->error('部门删除失败');
}
}
/**
* ajax 获取首字母
*/
public function ajaxname(){
$name=pinyin1(I('name','trim'));
echo $name;
}
}
\ No newline at end of file \ No newline at end of file
<?php
header('Content-Type:text/html;charset=utf-8');
class MemberAction extends CommonAction
{
private $tab = 'Webuser';
public function _initialize() {
parent::_initialize();
$this->checkLog(); //判断用户是否已经登录
$this->assign('memberList',$this->getPower()); //用户权限
}
/**
* 获取用户基本信息
* @param array $where [筛选条件]
* @param string $field [调取字段]
* @param string $tab [表格]
* @return array
*/
private function getUserInfo($where=array(),$field=array('id','pid','depth','username','name','email','tel','ltime','lip'),$tab='Webuser'){
$m=M($tab);
$m=$m->where($where);
if($field) $m=$m->field($field);
$data=$m->find();
return $data;
}
/**
* 会员中心(基本情况)
*/
public function index(){
$where['id']=array('eq',cookie('uid'));
$info=$this->getUserInfo($where);
$this->assign('info',$info);//会员基本信息
$this->display();
}
/**
* 修改用户信息
*/
public function memedit(){
if($this->isPost()){
$m=D($this->tab);
$_POST['id']=cookie('uid');
if($m->create()){
unset($m->username);
$last=$m->save();
if($last)
$this->success('信息修改成功',U('index'));
else
$this->error('信息修改失败');
}else{
$this->error($m->getError());
}
}else{
$where['id']=array('eq',cookie('uid'));
$info=$this->getUserInfo($where);
$this->assign('info',$info);//会员基本信息
$this->display();
}
}
/**
* 用户修改密码
*/
public function editpass(){
if($this->isPost()){
$m=M($this->tab);
$where['id']=array('eq',cookie('uid'));
$where['password']=array('eq',md5($_POST['oldpass']));
$onearr=$m->where($where)->field('id,password,email')->find();
if(!$onearr){
$this->error('原始密码错误,请重新输入');
}
$newPwd = I('post.password');
if(!$newPwd){
$this->error('新密码不能为空');
}
if($newPwd != I('post.password2')){
$this->error('两次密码不一致,请重新输入');
}
if(md5($newPwd) == $onearr['password']){
$this->error('新密码不能与原始密码相同');
}
$where2['id']=array('eq',$onearr['id']);
$data['password'] = md5($newPwd);
$row=$m->where($where2)->save($data);
if($row){
$this->clearLog();
exit('<script>alert("修改成功,请重新登陆!");top.location.href="'.U('Public/login').'";</script>');
}else{
$this->error('修改失败!');
}
exit;
}
$this->display();
}
/**
* 资料展示
*/
public function show(){
$model = M('Apply');
//$where['status'] = array('eq',2);
$order = 'addtime desc';
$map['isshow2'] = array('eq',1);//列表
$regfields = $this->getFields($map);//获取字段信息
$arr=$this->orderFields($regfields);//将字段数组重新整理
$colnum=count($arr['field']) + 4; //列数
$this->assign('colnum',$colnum);
$this->assign('field',$arr['field']); //字段(排序)
$this->assign('regfields',$arr['new_regfields']); //字段信息 键名为name
$farr=$this->userInfo(cookie('uid'));//获取当前用户的信息
//dump($where);
$where['isshow']=array('eq',1);
$field=array_merge($arr['field'],array('id','uid','username','addtime','status','reviewtime','depth','isshow'));
$data = $this->_getLists($model,$where,$order,$field,10,'Pages3',array('header'=>'<li style="border:none;">共%totalRows%条记录','pages'=>'%nowPage%/%totalPages%页 </li>','prev'=>'<上一页','next'=>'下一页>','first'=>'首页','last'=>'尾页','theme'=>'%header% %pages% %prePage% %linkPage% %nextPage% %end%'));
$this->assign('list',$data['list']?$data['list']:array()); //列表
$this->assign('page',$data['page']); //分页
$this->assign('p',$data['p']); //当前页数
$this->assign('page_title','资料展示');
$this->assign('dengji',$farr['dengji']+1);
$this->assign('empty','<tr><td colspan='.$colnum.' style="padding-left:15px;font-size:14px;">暂无相关信息!</td></tr>');
$this->display();
}
/**
* 资料审核
*/
public function review(){
$model = M('Apply');
//$where['status'] = array('eq',2);
$order = 'addtime desc';
//搜索
if($search['title'] = I('post.title','','trim,htmlspecialchars')){
$where['title'] = array('like','%'.$search['title'].'%');
}
if(($search['status'] = I('post.status')) !== ''){
$where['status'] = array('eq',intval($search['status']));
}
$this->assign('search',$search);
$map['isshow2'] = array('eq',1);//列表
$regfields = $this->getFields($map);//获取字段信息
$arr=$this->orderFields($regfields);//将字段数组重新整理
$colnum=count($arr['field']) + 4; //列数
$this->assign('colnum',$colnum);
$this->assign('field',$arr['field']); //字段(排序)
$this->assign('regfields',$arr['new_regfields']); //字段信息 键名为name
$farr=$this->userInfo(cookie('uid'));//获取当前用户的信息
if(C('open_power')==='Y'){//开启同等级交互管理权限
$dep_arr=explode(',',$farr['depth']);
if(count($dep_arr)>1){
array_pop($dep_arr);
$sbarr=implode(',',$dep_arr);
$where['depth'] = array('like',$sbarr.',%,%');
}else{
$where['depth'] = array('like',$farr['depth'].',%');
}
}else{
$where['depth']=array('LIKE',$farr['depth'].'%');//所有子级
}
//dump($where);
$where['isshow']=array('eq',$farr['dengji']+1);//只是下一级(包括其他子级审核通过的)
$field=array_merge($arr['field'],array('id','uid','username','addtime','status','reviewtime','depth','isshow'));
$data = $this->_getLists($model,$where,$order,$field,10,'Pages3',array('header'=>'<li style="border:none;">共%totalRows%条记录','pages'=>'%nowPage%/%totalPages%页 </li>','prev'=>'<上一页','next'=>'下一页>','first'=>'首页','last'=>'尾页','theme'=>'%header% %pages% %prePage% %linkPage% %nextPage% %end%'));
$this->assign('list',$data['list']?$data['list']:array()); //列表
$this->assign('page',$data['page']); //分页
$this->assign('p',$data['p']); //当前页数
$this->assign('page_title','资料审核');
$this->assign('dengji',$farr['dengji']+1);
$this->assign('empty','<tr><td colspan='.$colnum.' style="padding-left:15px;font-size:14px;">暂无相关信息!</td></tr>');
$this->display();
}
/**
* 修改审核状态
*/
public function Shenhe(){
$Article = M("Apply");
$id = I('post.id',0,'intval');
$val = I('post.val',0,'intval');
if(!$id || !$val || $val >= 3){ //状态值范围0,1,2
$r['success'] = false;
$r['msg'] = '参数有误!';
echo json_encode($r);
exit;
}
$where['id'] = array('eq',$id);
$status = $Article->where($where)->getField('status');//查询数据库中的审核状态值
if($val == $status) //相等直接返回
{
$r['success'] = true;
$r['val'] = $val;
}else{ //更改审核值
$arr=$Article->where($where)->setField('status',$val);
if($arr){
$r['success'] = true;
$r['val'] = $val;
}else{
$r['success'] = false;
$r['msg'] = '审核状态修改失败!';
}
}
if($val==1){
$r['status'] = '<span style="color:red;">审核不通过</span>';
}else{
$r['status'] = '审核通过';
//更改审核状态的值
$data['isshow']=$this->recurIsshow(cookie('uid'));
M('Apply')->where('id='.$id)->save($data);
}
echo json_encode($r);
}
/**
* 资料检索
*/
public function retrieval(){
$model = M('Apply');
if(I('name')){
$map['name'] = array('eq',I('name'));//导航点击
$this->assign('name',I('name'));
}
$map['issearch'] = array('eq',1);//检索-条件
$order = 'addtime desc';
$s_regfields = $this->getFields($map);//获取字段信息-检索
$s_arr=$this->orderFields($s_regfields);//将字段数组重新整理-检索
$this->assign('s_field',$s_arr['field']);//检索-字段
$this->assign('s_regfields',$s_arr['new_regfields']);//检索-字段
//搜索
if($this->isPost()){
foreach($s_arr['field'] as $fiev){
if($s_arr['new_regfields'][$fiev]['isjs']==1){//调用全球国家js组件
if(I($fiev)){
if(I($fiev.'2')){
$where[$fiev] = array('like','%'.I($fiev).'-'.I($fiev.'2').'%');
$search[$fiev]=I($fiev);
$search[$fiev.'2']=I($fiev.'2');
}else{
$where[$fiev] = array('like','%'.I($fiev).'%');
$search[$fiev]=I($fiev);
}
}
}elseif(is_array(I($fiev))){ //数组
$str_fiev='';
foreach(I($fiev) as $vv){
$str_fiev[]= "%,".$vv.",%";
}
$where[$fiev]=array('like',$str_fiev,'OR');
$search[$fiev]=I($fiev);
}elseif(is_array(I($fiev.'_values'))){ //标签组件(关键字)
$search[$fiev] = ','.implode(',', I($fiev.'_values')).',';
$search[$fiev.'_type']=I($fiev.'_type');
foreach(I($fiev.'_values') as $tagk=>$tagv){
$ta_arr[]='%,'.$tagv.',%';
}
if(I($fiev.'_type')==1){ //其中含有
$where[$fiev] =array('like',$ta_arr,'OR');
}else{ //全部包含
$where[$fiev] =array('like',$ta_arr,'AND');
}
}
else{
if($search[$fiev] = I($fiev,'','trim,htmlspecialchars')){
$where[$fiev] = array('like','%'.$search[$fiev].'%');
}
}
}
$this->assign('search',$search);
unset($search,$ta_arr);
}
$where['isshow3'] = array('eq',1);//列表-条件
$regfields = $this->getFields($where);//获取字段信息-列表
$arr=$this->orderFields($regfields);//将字段数组重新整理-列表
$field=array_merge($arr['field'],array('id','uid','username','addtime','status','reviewtime','depth','isshow'));
$farr=$this->userInfo(cookie('uid'));//获取当前用户的信息
$where['status']=array('neq',1);//非审核不通过
$where['isshow']=array('eq',1);//审核通过
$data = $this->_getLists($model,$where,$order,$field,$listRows=10,'Pages3',array('header'=>'<li style="border:none;">共%totalRows%条记录','pages'=>'%nowPage%/%totalPages%页 </li>','prev'=>'<上一页','next'=>'下一页>','first'=>'首页','last'=>'尾页','theme'=>'%header% %pages% %prePage% %linkPage% %nextPage% %end%'));
$this->assign('list',$data['list']?$data['list']:array());//列表
$colnum=count($arr['field']) + 4; //列数
$this->assign('colnum',$colnum);
$this->assign('field',$arr['field']); //列表字段
$this->assign('regfields',$arr['new_regfields']); //列表字段信息 键名为name
$this->assign('page',$data['page']); //分页
$this->assign('p',$data['p']); //当前页数
$this->assign('page_title','资料检索');
$this->assign('empty','<tr><td colspan='.$colnum.' style="padding-left:15px;font-size:14px;">暂无相关信息!</td></tr>');
$this->display();
}
/**
* 资料填报列表
*/
public function applylist(){
$model = M('Apply');
$where['uid'] = array('eq',cookie('uid'));
$order = 'addtime desc';
//搜索
if($search['title'] = I('post.title','','trim,htmlspecialchars')){
$where['title'] = array('like','%'.$search['title'].'%');
}
if(($search['status'] = I('post.status')) !== ''){
$where['status'] = array('eq',intval($search['status']));
}
$this->assign('search',$search);
$map['isshow1'] = array('eq',1);//列表
$regfields = $this->getFields($map);//获取字段信息
$arr=$this->orderFields($regfields);//将字段数组重新整理
$colnum=count($arr['field']) + 4; //列数
$this->assign('colnum',$colnum);
$this->assign('field',$arr['field']); //字段(排序)
$this->assign('regfields',$arr['new_regfields']); //字段信息 键名为name
$field=array_merge($arr['field'],array('id','uid','username','addtime','status','reviewtime','isshow','depth'));
$data = $this->_getLists($model,$where,$order,$field,10,'Pages3',array('header'=>'<li style="border:none;">共%totalRows%条记录','pages'=>'%nowPage%/%totalPages%页 </li>','prev'=>'<上一页','next'=>'下一页>','first'=>'首页','last'=>'尾页','theme'=>'%header% %pages% %prePage% %linkPage% %nextPage% %end%'));
$this->assign('list',$data['list']?$data['list']:array()); //列表
$farr=$this->userInfo(cookie('uid'));//获取当前用户的信息
$this->assign('dengji',$farr['dengji']);
$this->assign('page',$data['page']); //分页
$this->assign('p',$data['p']); //当前页数
$this->assign('page_title','资料填报管理');
$this->assign('empty','<tr><td colspan='.$colnum.' style="padding-left:15px;font-size:14px;">暂无相关信息!</td></tr>');
$this->display();
}
/**
* 新增资料填报
*/
public function apply()
{
$model = D('Apply');
$regfields = $this->getFields();//获取字段信息
$arr=$this->orderFields($regfields);//将字段数组重新整理
if($this->isPost()){ //提交申请
$farr=$this->userInfo(cookie('uid'));//获取当前用户的信息
$_POST['depth']=$farr['depth'];//用户的depth
$_POST['isshow']=$this->recurIsshow(cookie('uid'));
$tag_fields = $this->getFields(array('istags'=>array('eq',1)),'name,description,required'); //使用标签组件 并且是必填 字段
$js_fields = $this->getFields(array('isjs'=>array('eq',1)),'name');
//使用js地区组件
foreach($js_fields as $jsk=>$jsv){
if($_POST[$jsv['name']]){
if($_POST[$jsv['name'].'2']){
$_POST[$jsv['name']]=$_POST[$jsv['name']].'-'.$_POST[$jsv['name'].'2'];//国外地区
}else{
$_POST[$jsv['name']]=$_POST[$jsv['name']];
}
}
}
//两个字段任填写其一
/*$two_one = array('source'=>'research');
$this->checkTwoone($two_one);*/
$rules=$this->getValidate(I('pptags',array())); //自动验证
if($model->validate($rules)->create()){
$model = $this->checkTags($tag_fields,$model); //对使用标签的必填字段进行判断,并修改model中的属性值
$yy_arr=$this->getAuto($regfields,$_POST); //将POST数组重新整理
if($yy_arr){
foreach($yy_arr as $yk => $yv){
$model->$yk=$yv;
}
}
if($model->add()){
$this->success('资料填报成功',U('applylist'));
}else{
$this->error('资料填报失败');
}
}else{
$this->error($model->getError());//自动验证弹框
}
}else{
$where['id'] = array('eq',$id);
$strfield=implode(',',$$arr['field']);
$data=$this->_getRow($model,$where,$strfield);
$this->assign('data',$data);
//dump($arr['new_regfields']);
$this->assign('field',$arr['field']); //字段(排序)
$this->assign('regfields',$arr['new_regfields']); //字段信息 键名为name
$this->assign('page_title','新增资料填报');//页面标题
$this->display();
}
}
/**
* 对使用标签的必填字段进行判断,并修改model中的属性值
* @param array $fields [使用标签的必填字段]
* @param object $model [create后的对象]
* @return object
*/
private function checkTags($fields,$model){
if($fields && is_array($fields)){
foreach($fields as $v){
if(!I($v['name'].'_values') && $v['required']==1){
$this->error($v['description'].'不能为空!');
}elseif(I($v['name'].'_values')){
$model->$v['name'] = ','.implode(',',I($v['name'].'_values')).',';
}else{
$model->$v['name'] = '';
}
}
}
return $model;
}
/**
* 资料填报判断 两个字段任填写其一即可
* @param array $field [字段 字段1=>字段2]
*/
private function checkTwoone($field=array()){
$map['required']=array('eq',1); //必填
$info = $this->getFields($map);//获取字段信息
if($info){
$keys = array_keys($field);
foreach($info as $k => $v){
if(in_array($v['name'],$field)){
continue;
}
if(in_array($v['name'],$keys)){ //字段名称在定义好的字段中
if(!I($v['name'],'') && !I($fields[$v['name']],'')){
$this->error($v['description'].'和'.$info[$fields[$v['name']]]['description'].'两个必须填写一个!');
}
}
}
}
return $arr;
}
/**
* 递归获取用户审核状态
* @param $uid 用户id
*/
private function recurIsshow($uid){
$farr=$this->userInfo($uid);//获取当前用户的信息
//判断父类是否有审核
if($farr['pid']){ //有父级用户
$shenghe=M('Authgroupf')->where(array('grade'=>array('eq',$farr['dengji']-1)))->getField('isreview');
if($shenghe){//如果有审核权限
$back = $farr['dengji'];//当前用户的等级值
}else{//无审核权限
$back = $this->recurIsshow($farr['pid']);//判断父类
}
}else{
$back = false;
}
if(!$back){ $back =1;}
return $back;
}
/**
* 获取用户信息和等级值
* @param $uid 用户id
* @param $field 字段信息
*/
private function userInfo($uid='',$field='id,pid,depth'){
$arr=M('Webuser')->where('id='.$uid)->field($field)->find();
$arr['dengji']=count(explode(',',$arr['depth']));//用户等级
return($arr);
}
/**
* 修改资料填报
*/
public function edit()
{
$model = D('Apply');
$regfields = $this->getFields();//获取字段信息
$arr=$this->orderFields($regfields);//将字段数组重新整理
if($this->isPost()){ //提交申请
$tag_fields = $this->getFields(array('istags'=>array('eq',1)),'name,description,required'); //使用标签组件
$js_fields = $this->getFields(array('isjs'=>array('eq',1)),'name');
//使用js地区组件
foreach($js_fields as $jsk=>$jsv){
if($_POST[$jsv['name']]){
if($_POST[$jsv['name'].'2']){
$_POST[$jsv['name']]=$_POST[$jsv['name']].'-'.$_POST[$jsv['name'].'2'];//国外地区
}else{
$_POST[$jsv['name']]=$_POST[$jsv['name']];
}
}
}
//删除原附件信息
foreach($regfields as $rk=>$rv){
if($rv['upfile']){
if($_POST[$rv['name']]){
if($_POST[$rv['name']] != $_POST['old_'.$rv['name']])
{
$this->delFile2($_POST['old_'.$rv['name']]);//删除附件
}
}
}
}
$rules=$this->getValidate(I('pptags',array())); //自动验证
if($model->validate($rules)->create()){
$model = $this->checkTags($tag_fields,$model); //对使用标签的必填字段进行判断,并修改model中的属性值
$yy_arr=$this->getAuto($regfields,$_POST); //将POST数组重新整理
if($yy_arr){
foreach($yy_arr as $yk => $yv){
$model->$yk=$yv;
}
}
if($model->save()){
$this->success('修改成功',U('applylist'));
}else{
$this->error('修改失败');
}
}else{
$this->error($model->getError());//自动验证弹框
}
}else{
if(I('id')){
$id = I('id');
}else{
$id = 0;
}
$where['id'] = array('eq',$id);
$arr['field'][]='status';
$strfield = implode(',',$arr['field']);
$data = $this->_getRow($model,$where,$strfield);
$this->assign('data',$data);
$this->assign('field',$arr['field']); //字段(排序)
$this->assign('regfields',$arr['new_regfields']); //字段信息 键名为name
$this->assign('page_title','资料修改');//页面标题
$this->assign('id',$id);//数据id
$this->display();
}
}
/**
* 查看详情
* @param $id 内容id
* @param $page_title 页面标题
*/
public function look()
{
if(I('id')){
$id = I('id');
}else{
$id = 0;
}
$model = M('Apply');
$where['id'] = array('eq',$id);
$regfields = $this->getFields();//获取字段信息
$arr=$this->orderFields($regfields);//将字段数组重新整理
$arr['field'][]='status';
$strfield = implode(',',$arr['field']);
$data = $this->_getRow($model,$where,$strfield);
//dump($regfields);
$this->assign('data',$data);
$this->assign('field',$arr['field']); //字段(排序)
$this->assign('regfields',$arr['new_regfields']); //字段信息 键名为name
$this->assign('page_title','资料预览');//页面标题
$this->display();
}
/**
* 获取资料填报自动验证规则
* @param array $pptags [使用标签的文本框name]
*/
private function getValidate($pptags=array()){
$map['required']=array('eq',1); //必填
$info = $this->getFields($map);//获取字段信息
if($info){
foreach($info as $k => $v){
if($v['type'] == 'bstring'){ //多行多列判断
$arr[]=array($v['name'],'valReferee',$v['description'].'不完整,请确认!',1,'callback',3);
}elseif($v['type'] == 'c_heckbox'){ //复选框
$arr[]=array($v['name'],'valCheckbox',$v['description'].'不能为空!',1,'callback',3);
}elseif($v['type'] == 'string'){
if(!in_array($v['name'],$pptags)){ //文本型并且未使用标签组件
$arr[]=array($v['name'],'require',$v['description'].'不能为空!',1,'',3);
}
}else{
$arr[]=array($v['name'],'require',$v['description'].'不能为空!',1,'',3);
}
}
}
return $arr;
}
/**
* 获取资料填报自动填充规则
* @param $arr 字段信息数组
* @param $POST post获取的数组
*/
private function getAuto($arr=array(''),$POST){
if(!empty($arr) && !empty($POST)){
foreach($arr as $v){
if(is_array($POST[$v['name']])){
if($v['type']=='bstring' && $v['id'])//多行多列
{
//去除空白数据的数组 start
$arr=array_filter($POST[$v['name']]);
foreach($arr as $mk=>$mv)
{
$mv=array_filter($mv);
if(empty($mv))
{
unset($arr[$mk]);
}
}
$arr=array_values($arr);
//去除空白数据的数组 end
$string=json_encode($arr);
}if($v['type']=='c_heckbox' && $v['id']){//复选框
foreach($POST[$v['name']] as $kk => $vv){
$string.=$string?$vv.',':','.$vv.',';
}
}
$row[$v['name']]=$string;
unset($string,$arr);
}
}
}else{
return false;
}
return $row;
}
/**
* 获取字段的详细信息
* @param $where 字段表条件
*/
public function getFields($where=array(),$field=''){
//获取字段信息
$where_field['isshow'] = array('eq',1); //状态为开启的字段
if($where){
$where_field=array_merge($where_field,$where);
}
$m = M('Regfields')->where($where_field);
if($field){
$m = $m->field($field);
}
$file_info = $m->order('sort')->select();
return $file_info;
}
/**
* 将字段数组重新整理排序
* @param $fieldarr 字段数组
* @return array
*/
public function orderFields($fieldarr){
$field=array(); //sql 查询字段
$new_regfields=array(); //fieldarr 键名为name
if($fieldarr){
foreach($fieldarr as $k => $v){
$field[] = $v['name'];
$new_regfields[$v['name']] = $v;
}
}
$arr['field']=$field;
$arr['new_regfields']=$new_regfields;
return $arr;
}
/**
* 删除单个附件
*/
private function delFile2($file)
{
if($file)
{
$file2=iconv('UTF-8','GB2312','.'.$file);//支持中文名文件
if(file_exists($file2))
{
unlink($file2);
}
}
}
/**
* 获取资料审核字段信息 选取并提交至下载页
*/
public function checkField(){
$info=$this->getFields(); //字段信息 name名称 description注释
$this->assign('info',$info);
$arr=$this->orderFields($info);//将字段数组重新整理
//搜索
if($this->isPost()){
foreach($arr['field'] as $fiev){
if(is_array(I($fiev))){ //数组
$str_fiev = array();
foreach(I($fiev) as $vv){
$str_fiev[]= "%,".$vv.",%";
}
$where[$fiev]=array('like',$str_fiev,'OR');
$search[$fiev]=I($fiev);
unset($str_fiev);
}else{
if($search[$fiev] = I($fiev,'','trim,htmlspecialchars')){
$where[$fiev] = array('like','%'.$search[$fiev].'%');
}
}
}
$this->assign('ppaction',I('ppaction','')); //检索
$this->assign('pp_search',base64_encode(json_encode($where)));
}
//end
$this->assign('web_title','资料审核列表');
$this->assign('action',I('action'));
$this->assign('uid',$this->uid);
$this->display();
}
/**
* 导出资料审核至excel表
*/
public function download(){
$filename='资料审核列表';
set_time_limit(0);
$action=I('action');
$field=array_filter(I('field')); //下载所需的字段
$info=$this->getFields(array('name'=>array('in',$field))); //下载所需字段
if($info){
foreach($info as $v){
$new_field[]=$v['name'];
}
}
if(I('ppaction','') == 'retrieval'){
if($pp_search = I('pp_search','')){
$where = json_decode(base64_decode($pp_search),true);
$where['isshow']=array('eq',1);
}
}else{
$userinfo = $this->getUserInfo(array('id'=>array('eq',cookie('uid'))),array('depth'));
$depth = (int)count(explode(',', $userinfo['depth']));
$where['isshow']=array('eq',$depth+1); //管理员所选择的字段
}
$new_field[]='status';
$new_field[]='depth';
$new_field[]='isshow';
$list=M('Apply')->field($new_field)->where($where)->select(); //符合条件的资料
// echo M('Apply')->getLastSql();
// exit;
$filename.=date('_YmdHis');
$filename = iconv('utf-8', 'gb2312', $filename);//文件名称
vendor("PHPExcel.PHPExcel");
$objPHPExcel = new PHPExcel();
$count=count($info); //导出字段数
//创建文件并写入
$name='./Uploads/excel/'.$filename.date('Ymd-His'). '.xls';
$myfile = fopen($name, "w") or die("Unable to open file!");
$str='<table width="100%" border="1" cellpadding="0" cellspacing="1">';
$str.='<tr>';
$str.='<td align="center">序号</td>';
for($i=0;$i < $count;$i++){ //设置标题
if($info['type'] == 'bstring'){ //多文本
$str.='<td align="center">';
$row=$info['rownum']?$info['rownum']:1;
$col=$info['colnum']?$info['colnum']:1;
$r_width=100 / $col;
$str.='<table border="1" cellpadding="0" cellspacing="1">';
$str.='<tr><td align="center" colspan="'.$col.'">'.$info[$i]['description'].'</td></tr>';
if($info['ctitle']){ //列标题
$ctitle=explode('#',$info['ctitle']);
$str.='<tr>';
foreach($ctitle as $val){
$str.='<td align="center" style="WORD-WRAP: break-word" width="'.$r_width.'%">'.$val.'</td>';
}
$str.='</tr>';
}
$str.='</table>';
$str.='</td>';
}else{
$str.='<td align="center">'.$info[$i]['description'].'</td>';
}
}
$str.='<td align="center">状态</td>';
$str.='</tr>';
fwrite($myfile, $str);
unset($str);
if($list){
foreach($list as $k => $v){
$str='<tr>';
$str.='<td align="center">'.($k+1).'</td>'; //A列
for($i=0;$i < $count;$i++){ //设置标题
//多行文本、多选框、上传附件
$f_info=$this->getFieldInfo($new_field[$i]);//name,type,rownum,colnum,ctitle,upfile
// echo $f_info['name'].'——'.$f_info['type'],'<br/>';
if($f_info['upfile'] == 1){ //图片
if($v[$new_field[$i]])
// $pp_val='<div><img src="http://'.$_SERVER['SERVER_NAME'].$v[$new_field[$i]].'" width="65" height="65" /></div>';
$pp_val=$v[$new_field[$i]];
else
$pp_val='';
}elseif($f_info['type'] == 'c_heckbox'){ //多选框
$pp_val=substr($v[$new_field[$i]],0,-1);
$pp_val=substr($pp_val,1);//截取前后,
}elseif($f_info['type'] == 'bool'){ //多选框
$pp_val=$v[$new_field[$i]] == 1?'是':'否';
}elseif($f_info['type'] == 'bstring'){ //多文本
$row=$f_info['rownum']?$f_info['rownum']:1;
$col=$f_info['colnum']?$f_info['colnum']:1;
$r_width=100 / $col;
/*if($f_info['ctitle']){ //列标题
$ctitle=explode('#',$f_info['ctitle']);
$pp_val.='<tr>';
foreach($ctitle as $val){
$pp_val.='<td align="center" style="WORD-WRAP: break-word" width="'.$r_width.'%">'.$val.'</td>';
}
$pp_val.='</tr>';
}*/
if($v[$new_field[$i]]) $value=json_decode($v[$new_field[$i]],true); //存在数据
if($value){ //存在数值
$pp_val='<table border="1" cellpadding="0" cellspacing="1">';
/*for($ii=1;$ii<=$row;$ii++){ //行
$pp_val.='<tr>';
for($iii = 1;$iii<=$col;$iii++){ //列
$pp_val.='<td align="center">'.$value[$ii][$iii].'</td>';
}
$pp_val.='</tr>';
}*/
foreach($value as $v1){
$pp_val.='<tr>';
foreach($v1 as $v2){
$pp_val.='<td align="center" style="WORD-WRAP: break-word" width="'.$r_width.'%">'.$v2.'</td>';
}
$pp_val.='</tr>';
}
$pp_val.='</table>';
}
unset($row,$rol,$value,$r_width);
}elseif($f_info['name'] == 'idnumber'){
$pp_val='<div style="vnd.ms-excel.numberformat:@">'.$v[$new_field[$i]].'</div>';
}else{
$pp_val=$v[$new_field[$i]];
}
$str.='<td align="center">'.$pp_val.'</td>';
unset($pp_val);
}
$zt='';
if($v['status']==1){
$zt='审核不通过';
}elseif($v['isshow']==1){
$zt='审核通过';
}else{
$zt='未审核';
}
$str.='<td align="center">'.$zt.'</td>'; //状态
$str.='</tr>';
fwrite($myfile, $str);
unset($str);
}
}
$str='</table>';
fwrite($myfile, $str);
unset($str);
$name=iconv('gb2312', 'utf-8', $name);
echo '<script>window.location.href="'.$name.'";setTimeout("window.close()",300000)</script>';
// ob_end_clean();//清除缓冲区,避免乱码
/*header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment;filename='.$filename.'.xls');
$str=iconv('utf-8', 'gbk', $str);
echo $str;*/
}
/**
* 获取字段详细信息
* @param string $name 字段名
* @param string $field 查询field
* @return array
*/
private function getFieldInfo($name,$field='name,type,rownum,colnum,ctitle,upfile'){ //type:文本string,多行文本bstring,布尔bool,数字number,文本域t_extarea,下拉列表s_elect,多选框c_heckbox,单选r_adio
$where['name']=array('eq',$name);
$data=M('Regfields')->where($where)->field($field)->find();
return $data;
}
}
\ No newline at end of file \ No newline at end of file
<?php
header('Content-Type:text/html;charset=utf-8');
class PassAction extends CommonAction
{
public function _initialize() {
parent::_initialize();
//$this->checkLog(); //判断用户是否已经登录
$this->assign('header',$this->getHeader());//导航
$this->assign('postion',$this->getPostion());//当前位置
$this->assign('footer',$this->getFooter());//底部
}
/**
* 获取页面header
* @return array 导航
*/
private function getHeader($limit='0,8'){
$m=M('categoryinfo',null);
$field='CategoryID,categorynote,name,CategoryName,CategoryCode';
$order='CategoryOrder';
$where['CategoryCode']=array('like','___');
$where['display']=array('neq',1);
$data=$m->field($field)->where($where)->order($order)->limit($limit)->select();
return $data;
}
/**
* 获取页面postion
* @return array 当前位置
*/
private function getPostion($limit='0,8'){
$m=M('categoryinfo',null);
$field='CategoryID,categorynote,name,CategoryName,CategoryCode';
$order='CategoryOrder';
$where['CategoryCode']=array('like','___');
$where['display']=array('neq',1);
$data=$m->field($field)->where($where)->order($order)->limit($limit)->select();
return $data;
}
/**
* 获取页面footer
* @return array 导航
*/
private function getFooter($limit='1,7'){
$cate=$this->getHeader($limit); //获取导航分类
$m=M('categoryinfo',null);
$field='CategoryID,categorynote,name,CategoryName,CategoryCode';
$order='CategoryOrder';
$where['display']=array('neq',1);
foreach($cate as $k => $v){
$where['CategoryCode']=array('like',$v['CategoryCode'].'___');
$cate[$k]['child']=$m->field($field)->where($where)->order($order)->select(); //分类的子分类
unset($where['CategoryCode']);
}
return $cate;
}
/**
* 用户忘记密码
*/
public function index()
{
if($this->isPost())
{
if(!$_POST['email'] || !$_POST['email']){
$this->error('请填写身份证信息和邮箱');
}
$m=M('Webuser');
$where['idnumber']=array('eq',$_POST['idnumber']);
$where['email']=array('eq',$_POST['email']);
$onearr=$m->where($where)->field('id,idnumber,email,name')->find();
if(!$onearr){
$this->error('信息有误');
}
$title='升星时代夏令营用户密码重置';
$content='请在三个小时之内,点击以下连接进行重置密码<br><a href="http://'.$_SERVER['HTTP_HOST'].'/index.php?s=/Pass/editpass/em/'.base64_encode('1234'.$_POST['email']).'.html">重置密码</a>';
$a=$this->sendEmail($onearr,3,$title,$content); //发送email并且把email信息入库保存 1确定参营、2待录取
if($a){
$this->success('邮件已发送',U('Index/index'));
}else{
$this->error('邮件发送失败');
}
exit;
}
$this->display();
}
/**
* 用户修改密码
*/
public function editpass(){
if($this->isPost())
{
$m=M('Webuser');
$where['email']=array('eq',$_POST['ema']);
$onearr=$m->where($where)->field('id,password,email')->find();
if(!$onearr){
$this->error('邮箱信息有误');
}
$where['fortime']=array('egt',time());//在验证的有效期内
$yx_arr=M('Email')->where($where)->find();
if($yx_arr){
if($_POST['password']!=$_POST['password2'])
{
$this->error('两次密码不一致,请重新输入');
}
$where2['id']=array('eq',$onearr['id']);
$data['password'] = md5($_POST['password']);
$row=$m->where($where2)->save($data);
if($row){
$dd['fortime']='0';
M('Email')->where('email="'.$yx_arr['email'].'"')->save($dd);//清空有效期
$this->success('密码重置成功,请重新登陆!',U('Index/index'));
exit;
}else{
$this->error('密码重置失败');
exit;
}
}else{
$this->error('邮箱验证已超过有效期,请重新申请验证');
}
}
$this->display();
}
/**
* 给学生发送邮件,邮件信息并入库
* @param array $where 查询夏令营报名条件
* @param int $cate 邮件类型:1确定参营,2待录取 3忘记密码
* @param string $title 邮件标题
* @param string $content 邮件内容
* @return bool 成功ture,失败false
*/
private function sendEmail($date,$cate,$title,$content){
$data['sumid']=$date['id']; //学生id
//$data['uid']=$info['uid']; //学生id
$data['email']=$date['email']; //学生email
$data['cate']=$cate; //邮件各类:1确定参营,2待录取 3忘记密码
$data['title']=$title; //email 标题
$data['content']=$content; //email 内容
$data['addtime']=time();//发送邮件的时间
$data['fortime']=time()+3600*3;//验证有效期的时间 三个小时之内
if(sendMail($data['email'], $date['name'], $data['title'], $data['content']) === true){ //发送邮件成功
$lastid=M('Email')->add($data);
return true;
}else{ //发送失败
return false;
}
}
}
\ No newline at end of file \ No newline at end of file
<?php
class PublicAction extends Action {
public $ADMIN_KEY='';
public function __construct() {
parent::__construct();
$this->ADMIN_KEY=cookie('uid');
}
public function login(){
$ADMIN_KEY=$this->ADMIN_KEY;
if (isset($ADMIN_KEY)) {
$this->redirect('Index/index');
}
if($this->isPost()){
if (!I('post.account',null)) {
$this->error("帐号不可以为空!");
}elseif(!I('post.password',null)) {
$this->error("密码不可以为空!");
}elseif(session('verify') != md5(I('post.code'))) {
$this->error('验证码错误!');
}
$map['username'] = I('post.account');
$admin = M('Webuser')->where($map)->find();
if(empty($admin) || $admin['password'] != md5(I('post.password'))){
$this->error("帐号不存在或者密码错误!");
}elseif($admin['isshow']==0){
$this->error("账号已被禁用!");
}else{
cookie('uid',$admin['id']);
cookie('account',$admin['username']); //登录账号
cookie('username',$admin['name']);
cookie('logtime',time());
$Ad=M('Webuser');
$Ad->ltime = time();
$Ad->lip = $_SERVER['REMOTE_ADDR'];
$Ad->where('id='.$admin['id'])->save(); // 根据条件保存修改的数据
$this->success("登录成功!",U('Index/index'));
}
}else{
$this->display();
}
}
public function index(){
$this->redirect('Public/login');
}
//验证码类
public function verify() {
//ob_clean();
import ( "ORG.Util.Image" );
Image::buildImageVerify (4);
}
/**
* 用户忘记密码
*/
public function forgetPass(){
if($this->isPost()){
$m=M('Webuser');
$where['id']=array('eq',cookie('uid'));
$where['password']=array('eq',md5($_POST['oldpass']));
$onearr=$m->where($where)->field('id,password,email')->find();
if(!$onearr)
{
$this->error('原始密码错误,请重新输入');
}
if($_POST['password']!=$_POST['password2'])
{
$this->error('两次密码不一致,请重新输入');
}
$where2['id']=array('eq',$onearr['id']);
$data['password'] = md5($_POST['password']);
$row=$m->where($where2)->save($data);
if($row){
$this->success('修改成功,请重新登陆!',U('logout'),array('cid'=>I('cid'),'p'=>I('p')));
exit;
}else{
$this->error('修改失败!');
exit;
}
}
$this->display();
}
}
\ No newline at end of file \ No newline at end of file
<?php
Class WebuserAction extends CommonAction{
private $tab = 'Webuser';
public function __construct() {
parent::__construct();
$this->checkLog(); //判断用户是否已经登录
$this->assign('webuserList',$this->getPower()); //用户权限
$this->assign('ispower',C('open_power')); //是否开启交互管理
}
public function index()
{
$model = M($this->tab);
//登录账号的信息
$info = $this->_getRow($model,array('id'=>array('eq',cookie('uid'))),'id,depth');
if($info){
if(C('open_power')==='Y'){//开启同等级交互管理权限
$dep_arr=explode(',',$info['depth']);
if(count($dep_arr)>1){
array_pop($dep_arr);
$sbarr=implode(',',$dep_arr);
$where['depth'] = array('like',$sbarr.',%,%');
}else{
$where['depth'] = array('like',$info['depth'].',%');
}
}else{
$where['depth'] = array('like',$info['depth'].',%');
}
}else{ //登录账号不存在
$this->clearLog();
$this->error('账号有误!',U('Public/index'));
}
$field = array('id','username','tel','email','name','isshow','ltime','lip','addtime','updatatime');
// $where['id'] = array('neq',1);
$data = $this->_getLists($model,$where,$order,$field,12,'Pages3',array('header'=>'<li style="border:none;">共%totalRows%条记录','pages'=>'%nowPage%/%totalPages%页 </li>','prev'=>'<上一页','next'=>'下一页>','first'=>'首页','last'=>'尾页','theme'=>'%header% %pages% %prePage% %linkPage% %nextPage% %end%'));
//echo $model->getLastSql();
$auth=M('authgroupf')->getField('id,title');//用户类别名称
$this->assign('auth',$auth);
$this->assign('list',$data['list']?$data['list']:array()); //列表
$this->assign('page',$data['page']); //分页
$this->assign('p',$data['p']); //当前页数
$this->assign('page_title','用户列表');
$this->assign('empty','<tr><td colspan="9" style="padding-left:15px;font-size:14px;">暂无相关信息!</td></tr>');
$this->display();
}
public function edit()
{
$id=I('id',0,'intval');
if(!$id){
$this->error('参数有误!');
}
$Admin=D($this->tab);
$data=$Admin->where('id='.$id)->find();
if($this->isPost()){
//添加用户
if(!$Admin->create()){
$this->error($Admin->getError());
}else{
if(!$Admin->password){ //修改账号,如果没有输入密码则删除password
unset($Admin->password);
}else{
$Admin->password = md5($Admin->password);
}
$lastid=$Admin->where('id='.$id)->save();
if($lastid>0){
$this->success('系统用户修改成功',U('index'));
}else{
$this->error('系统用户修改失败');
}
}
}else{
$this->assign('data',$data);
$this->display();
}
}
public function add()
{
$Admin=D($this->tab);
if($this->isPost()){
if(cookie('uid')==1){//超级用户
if(!$_POST['s_dengji']){
$this->error('请选择用户等级');
}else{
if($_POST['s_dengji']!='2' && !$_POST['c_dengji']){
$this->error('请选择父级用户');
}
}
}
//添加用户
if(!$Admin->create()){
$this->error($Admin->getError());
}else{
$depth = $this->getDepth(I('c_dengji')); //获取depth=array('depth','pid')
$Admin->depth = $depth['depth'];
$Admin->pid = $depth['pid'];
//获取与用户等级匹配的角色
$grade = count(explode(',',$depth['depth'])); //用户等级
$group_id = $this->getGroup($grade); //根据用户等级数 获取对应的角色id
if(!$group_id){
$this->error('用户角色无法匹配,请联系系统管理员');
}
$lastid=$Admin->add();
if($lastid>0){
$this->fenpei($lastid,$group_id); //添加用户时自动为用户分配角色
$this->success('系统用户添加成功',U('index'));
}else{
$this->error('系统用户添加失败');
}
}
}else{
//获取用户等级
$grade_arr=M('Authgroupf')->where('grade!=1')->field('grade')->select();
$this->assign('grade_arr',$grade_arr);//用户等级
$this->display();
}
}
/**
* 异步获取选中级别上一级用户信息
*/
public function z_user(){
$s_dengji=I('s_dengji')-1;
$c_dengji=I('c_dengji');
$user=M($this->tab)->field('id,depth,name')->select();
if($user){
foreach($user as $k=>$v){
$djnum=count(explode(',',$v['depth']));
if($djnum == $s_dengji)
$str.='<option value="'.$v['id'].'"';
if($c_dengji == $v['id']) $str.=' selected="selected"';
$str.='>'.$v['name'].'</option>';
}
}
echo json_encode($str);
}
/**
* 添加用户时自动为用户分配角色
* @param int $uid [用户id]
* @param int $group_id [角色id]
*/
private function fenpei($uid,$group_id){
$m=M('Authgroupaccessf');
$data['uid'] = $uid;
$data['group_id'] = $group_id;
$m->data($data)->add();
}
/**
* 根据用户等级数 获取对应的角色
* @param int $grade [用户等级]
* @return int 角色id
*/
private function getGroup($grade){
$m = M('Authgroupf');
$map['grade'] = array('eq',$grade);
$id = $this->_getOne($m,$map,'id');
return $id;
}
/**
* 获取当前登录账号的depth+id
* @return array('id','depth')
*/
private function getDepth($uid=0){
$m = M($this->tab);
if($uid){
$map['id'] = array('eq',$uid);
}else{
$map['id'] = array('eq',cookie('uid'));
}
$r = $m->field('id,depth')->where($map)->find();
$back['depth'] = $r['depth'].','.$r['id'];
$back['pid'] = $r['id'];
return $back;
}
public function delete()
{
$where['id']=I('id',0,'intval');
$Admin=D($this->tab);
$data=$Admin->where($where)->find();
if(!$data){
$this->error('信息有误!');
}
if($data['id'] == cookie('uid')){
$this->error('不允许删除当前使用的用户帐号');
}elseif($data['id'] == 1){
$this->error('该账号不允许删除!');
}else{
$count=$Admin->where($where)->delete();
if($count){
$this->delAuthAccess($data['id']);
$this->success('用户删除成功',U('index',array('p'=>I('p',1,'intval'))));
}else{
$this->error('用户删除失败');
}
}
}
/**
* 删除会员时删除相应的角色分配
* @param int $uid 用户id
*/
private function delAuthAccess($uid){
if($uid){
$m = M('Authgroupaccessf');
$map['uid'] = array('eq',$uid);
$r = $m->where($map)->delete();
}
}
/**
* 修改分组开启属性
**/
public function editattr()
{
$table=$this->_post('table');
$m=M($table);
$where['id']=array('eq',$this->_post('id'));
$data[$this->_post('f')]=$this->_post('status');
$count=$m->where($where)->data($data)->save();
if($count)
{
$msg['success']=true;
$msg['msg']='状态已修改';
}
else
{
$msg['success']=false;
$msg['msg']='状态修改失败';
}
echo json_encode($msg);
}
}
\ No newline at end of file \ No newline at end of file
<?php
/*
*友情链接分类名称
*/
function LinkCatName($id){
$data=M('Linkscat')->where('id='.$id)->find();
return $data['name'];
}
function AdminNum($role){
$count=M('Admin')->where('role='.$role)->count();
return $count;
}
function GetTableName($id,$name='catname',$tab='Goodscat'){
$table=M($tab);
$data=$table->where('id='.$id)->find();
return $data[$name];
}
function isflag($arr){
$return='';
if($arr['thumb'])$return .='<span style="color:red">&nbsp;[图]&nbsp;</span>';
if($arr['flag']){
$flag=String2Array($arr['flag']);
if(in_array('h',$flag)) $return .='<span style="color:red">&nbsp;[热门]&nbsp;</span>';
if(in_array('c',$flag)) $return .='<span style="color:red">&nbsp;[推荐]&nbsp;</span>';
}
return $return;
}
/*
1、内容列表、2 内容单页、3 栏目主页、4 列表主页、5 单页主页、0 外部链接
*/
function catType($id){
switch ($id){
case 1:
$name='内容列表';break;
case 2:
$name='内容单页';break;
case 3:
$name='栏目主页';break;
case 4:
$name='列表主页';break;
case 5:
$name='单页主页';break;
case 0:
$name='外部链接';break;
default:
$name='';
}
return '<span style="color: #ccc;">'.$name.'</span>';
}
/**
* 左侧栏目导航
**/
function leftmenu($v)
{
if($v)
{
echo '<ul class="sitemu">';
foreach($v as $k => $v)
{
echo '<li>
<span class="pp_1"><a target="main" href="'.$v['url'].'">'.$v['name'].'</a></span>
<span class="pp_2">';
if($v['add'])
{
echo '<a href="'.$v['add'].'" target="main"><img src="'.__PUB__.'img/gtk-sadd.png" /></a>';
}
echo '</span>';
// 如果有子类
if($v['cmenulist'])
{
leftmenu($v['cmenulist']);
}
echo '</li>';
}
echo '</ul>';
}
}
/**
* 夏令营判断申请字段内容并输出
* @param type 字段类型
bstring 多行文本:几行几列
bool 布尔:1是0否
s_elect 下拉列表:默认值选择
c_heckbox 多选框:默认值选择
r_adio 单选框:默认值选择
string 文本
t_extarea 文本域
number 数字
* @param name 字段名称
* @param param array(val,row,col,ctitle) 默认选择值,行数,列数,列标题
* @param isdate 是否调用日期控件
* @param value 修改数据时已填写的数据
* @param istags 是否调标签控件
* @param isjs 是否调用JS控件
*/
function checkApply($type,$name,$param=array('val'=>'','row'=>1,'col'=>1,'ctitle'=>''),$isdate='0',$upfile='0',$value='',$istags='0',$isjs='0'){
if($param['val']) $vals=explode('#', $param['val']); //默认选择值
switch ($type) {
case 'bstring': //多行
$col=$param['col']?$param['col']:1;
$wid_per= floor(100/$col+1);
$str='<table width="99%" class="inner_table" style="border:1px solid #ddd;" >';
if($param['ctitle']){ //列标题
$ctitle=explode('#',$param['ctitle']);
$str.='<tr>';
foreach($ctitle as $k=>$v){
$str.='<td style="text-align:center; width:'.$wid_per.'%">'.$v.'</td>';
if($isdate && (strpos($v,'时间')!== false || strpos($v,'日期')!== false)) $datekey[]=$k+1; //多行匹配关键词时间、日期来调用日期控件
if($upfile && strpos($v,'上传')!== false) $upfilekey[]=$k+1; //多行匹配关键词上传来调用上传控件
}
$str.='<td></td></tr>';
}
// 修改时已填写数据
if($value) $value=json_decode($value,true);
$row = count($value) ? count($value) : 1;
$add_str=''; //+点击新增内容
for($i=0;$i<$row;$i++){
$str.='<tr class="d_pp">';
if($i == 0){ //+
$add_str.='<tr class=\'d_pp\'>';
}
for($ii = 1;$ii<=$col;$ii++){
$str.='<td style="text-align:center;" ><input ';
if($i == 0){ //+
$add_str.='<td style=\'text-align:center;\' ><input ';
}
if(in_array($ii,$upfilekey) && $upfile == '1'){
$str.='type="hidden"';
if($i == 0){ //+
$add_str.='type=\'hidden\'';
}
}else{
$str.='type="text"';
if($i == 0){ //+
$add_str.='type=\'text\'';
}
}
$str.=' name="'.$name.'['.$i.']['.$ii.']" value="';
if($i == 0){ //+
$add_str.=' name=\''.$name.'["+rownum+"]['.$ii.']\' value=\'';
}
if($value) $str.=$value[$i][$ii];
$str.='"';
if($i == 0){ //+
$add_str.='\'';
}
if(in_array($ii,$datekey)){
$str.=' class="Wdate" onclick="WdatePicker()" />';
if($i == 0){ //+
$add_str.=' class=\'Wdate\' onclick=\'WdatePicker()\' />';
}
}elseif(in_array($ii,$upfilekey)){
if($upfile=='1') //上传图片
{
$str.=' class="fl" style="" readonly="readonly" id="'.$name.'_'.$i.'_'.$ii.'"/> <input style="height:22px; border: 1px solid #d3d6d7; " class="fl" type="button" value="上传图片" class="button" id="'.$name.'_'.$i.'_'.$ii.'fid" /><img id="'.$name.'_'.$i.'_'.$ii.'img" src="" class="fl" style="max-height:22px;display:none">';
if($i == 0){ //+
$add_str.=' class=\'fl\' style=\'\' readonly=\'readonly\' id=\''.$name.'_"+rownum+"_'.$ii.'\'/> <input style=\'height:22px; border: 1px solid #d3d6d7; \' class=\'fl\' type=\'button\' value=\'上传图片\' class=\'button\' id=\''.$name.'_"+rownum+"_'.$ii.'fid\' /><img id=\''.$name.'_"+rownum+"_'.$ii.'img\' src=\'\' class=\'fl\' style=\'max-height:22px;display:none\'>';
}
$str.="<script>
$(function(){
if($('#".$name.'_'.$i.'_'.$ii."').val().length > 0){
$('#".$name.'_'.$i.'_'.$ii."img').attr('src',$('#".$name.'_'.$i.'_'.$ii."').val());
$('#".$name.'_'.$i.'_'.$ii."img').css('display','inline-block');
}else{
$('#".$name.'_'.$i.'_'.$ii."img').attr('src','').css('display','none');
}
});
KindEditor.ready(function(K) {
var editor = K.editor({
uploadJson : '/index.php?s=/Admin/Kind/upload_json.html',
fileManagerJson : '/index.php?s=/Admin/Kind/file_manager_json.html',
allowFileManager : true
});
K('#".$name.'_'.$i.'_'.$ii."fid').click(function() {
editor.loadPlugin('image', function() {
editor.plugin.imageDialog({
showRemote : false,
imageUrl : K('#".$name.'_'.$i.'_'.$ii."').val(),
clickFn : function(url, title, width, height, border, align) {
K('#".$name.'_'.$i.'_'.$ii."').val(url);
//document.getElementById('picida2').href=url;
var v=document.getElementById('".$name.'_'.$i.'_'.$ii."').value;
if(typeof(v) != 'undefined'){
document.getElementById('".$name.'_'.$i.'_'.$ii."img').src=v;
document.getElementById('".$name.'_'.$i.'_'.$ii."img').style.display='inline-block';
}else{
document.getElementById('".$name.'_'.$i.'_'.$ii."img').src='';
document.getElementById('".$name.'_'.$i.'_'.$ii."img').style.display='none';
}
editor.hideDialog();
}
});
});
});
// prettyPrint();
});
</script>";
if($i == 0){ //+
$add_str2='$(function(){if( $(\'#'.$name.'_"+rownum+"_'.$ii.'\').val().length > 0){$(\'#'.$name.'_"+rownum+"_'.$ii.'img\').attr(\'src\',$(\'#'.$name.'_"+rownum+"_'.$ii.'\').val()); $(\'#'.$name.'_"+rownum+"_'.$ii.'img\').css(\'display\',\'inline-block\'); }else{$(\'#'.$name.'_"+rownum+"_'.$ii.'img\').attr(\'src\',\'\'); $(\'#'.$name.'_"+rownum+"_'.$ii.'img\').css(\'display\',\'none\'); } }); KindEditor.ready(function(K) {var editor = K.editor({uploadJson : \'/index.php?s=/Admin/Kind/upload_json.html\', fileManagerJson : \'/index.php?s=/Admin/Kind/file_manager_json.html\', allowFileManager : true }); K(\'#'.$name.'_"+rownum+"_'.$ii.'fid\').click(function() {editor.loadPlugin(\'image\', function() {editor.plugin.imageDialog({showRemote : false, imageUrl : K(\'#'.$name.'_"+rownum+"_'.$ii.'\').val(), clickFn : function(url, title, width, height, border, align) {K(\'#'.$name.'_"+rownum+"_'.$ii.'\').val(url); var v=document.getElementById(\''.$name.'_"+rownum+"_'.$ii.'\').value; if(typeof(v) != \'undefined\'){document.getElementById(\''.$name.'_"+rownum+"_'.$ii.'img\').src=v; document.getElementById(\''.$name.'_"+rownum+"_'.$ii.'img\').style.display=\'inline-block\'; }else{document.getElementById(\''.$name.'_"+rownum+"_'.$ii.'img\').src=\'\'; document.getElementById(\''.$name.'_"+rownum+"_'.$ii.'img\').style.display=\'none\'; } editor.hideDialog(); } }); }); }); });'; };
}else if($upfile=='2'){//上传文件
$str.=' class="fl" style="width:55%" readonly="readonly" id="'.$name.'_'.$i.'_'.$ii.'"/> <input class="fl" style="height:22px; border: 1px solid #d3d6d7;" type="button" value="上传文件" class="button" id="'.$name.'_'.$i.'_'.$ii.'fid" />';
if($i == 0){ //+
$add_str.=' class=\'fl\' style=\'width:55%\' readonly=\'readonly\' id=\''.$name.'_"+rownum+"_'.$ii.'\'/> <input class=\'fl\' style=\'height:22px; border: 1px solid #d3d6d7;\' type=\'button\' value=\'上传文件\' class=\'button\' id=\''.$name.'_"+rownum+"_'.$ii.'fid\' />';
}
$str.="<script>
KindEditor.ready(function(K) {
var editor = K.editor({
uploadJson : '/index.php?s=/Admin/Kind/upload_json.html',
fileManagerJson : '/index.php?s=/Admin/Kind/file_manager_json.html',
allowFileManager : true
});
K('#".$name.'_'.$i.'_'.$ii."fid').click(function(){
editor.loadPlugin('insertfile', function(){
editor.plugin.fileDialog({
fileUrl : K('#".$name.'_'.$i.'_'.$ii."').val(),
clickFn : function(url, title) {
K('#".$name.'_'.$i.'_'.$ii."').val(url);
editor.hideDialog();
}
});
});
});
// prettyPrint();
});
</script>";
if($i == 0){ //+
$add_str2='KindEditor.ready(function(K) {var editor = K.editor({uploadJson : \'/index.php?s=/Admin/Kind/upload_json.html\', fileManagerJson : \'/index.php?s=/Admin/Kind/file_manager_json.html\', allowFileManager : true }); K(\'#'.$name.'_"+rownum+"_'.$ii.'fid\').click(function(){editor.loadPlugin(\'insertfile\', function(){editor.plugin.fileDialog({fileUrl : K(\'#'.$name.'_"+rownum+"_'.$ii.'\').val(), clickFn : function(url, title) {K(\'#'.$name.'_"+rownum+"_'.$ii.'\').val(url); editor.hideDialog(); } }); }); }); });'; }
}
}else{
$str.=' />';
if($i == 0){ //+
$add_str.=' />';
}
}
$str.='</td>';
if($i == 0){ //+
$add_str.='</td>';
}
}
if($i == 0){ //+
$str.='<td><span><a href=\'javascript:void(0);\' class=\'dv1\'>+</a></span></td></tr>';
$add_str.='<td><span><a href=\'javascript:void(0);\' class=\'dv2\'>-</a></span></td></tr>';
}else{
$str.='<td><span><a href=\'javascript:void(0);\' class=\'dv2\'>-</a></span></td></tr>';
}
}
$str.='</table>';
$str.= '<script type="text/javascript">
$(function(){
$(".table").delegate("a.dv1","click",function(){
var rownum=$(".d_pp").length;
$(this).parent().parent().parent().parent().append("'.$add_str.'");
loadScriptString("'.$add_str2.'");
});
$(".table").delegate("a.dv2","click",function(){
$(this).parents("tr").remove();
});
});
function loadScriptString(code) {
var script = document.createElement("script");
script.type = "text/javascript";
try {
script.appendChild(document.createTextNode(code));
} catch (ex) {
script.text = code;
}
document.head.appendChild(script);
}
</script>';
unset($datekey,$wid_per,$add_str,$add_str2);
break;
case 's_elect': //下拉
if($isjs==1){//调用js 地区组件
$str.='<div data-toggle="distpicker" id="target">
<select id="'.$name.'" name="'.$name.'"></select>
<select id="'.$name.'2" name="'.$name.'2"></select>
<script>';
if($value){ //编辑
$cou_val=explode('-',$value);
$str.='$("#target").distpicker({
province: "'.$cou_val[0].'",
city: "'.$cou_val[1].'",
});';
}else{ //添加
$str.='$("#target").distpicker({
autoSelect: false
});';
}
$str.='</script>
</div>';
}else{
$str='<select name="'.$name.'">';
$str.='<option value="">请选择</option>';
if($vals){
foreach($vals as $v){
$str.='<option value="'.$v.'"';
if($value && $value==$v) $str.=' selected="selected"';
$str.=' />'.$v.'</option>';
}
}
$str.='</select>';
}
break;
case 'c_heckbox': //多选
$value = explode(',', $value);
if($vals){
foreach($vals as $v){
$str.='<input type="checkbox" name="'.$name.'[]" value="'.$v.'" ';
if($value && in_array($v,$value)) $str.=' checked="checked"';
$str.=' /> '.$v.' ';
}
}
break;
case 'r_adio': //单选
if($vals){
foreach($vals as $k => $v){
$str.='<input type="radio" name="'.$name.'" value="'.$v.'"';
if(!$value && $k==0)
$str.=' checked';
elseif($value && $value == $v)
$str.=' checked';
$str.=' /> '.$v.' ';
}
}
break;
case 'bool';
$str = '<input type="radio" name="'.$name.'" value="1" ';
if(($value && $value === 1) || !$value) $str.=' checked';
$str.=' /> 是 <input type="radio" name="'.$name.'" value="0"';
if($value && $value === 0) $str.=' checked';
$str.=' /> 否';
break;
case 't_extarea':
$str = '<textarea name="'.$name.'" style="width:80%;">'.$value.'</textarea>';
break;
case 'string':
$str = '<input type="text" name="'.$name.'" id="'.$name.'" value="'.$value.'" ';
if($isdate) { //日期控件
$str.=' class="Wdate" onclick="WdatePicker()" />';
}elseif($upfile){ //上传控件
if($upfile=='1') //上传图片
{
$str.=' readonly="readonly" /> <input style="width:70px !important; height:22px; border: 1px solid #d3d6d7; " class="fl" type="button" value="上传图片" class="button" id="'.$name.'fid" />';
if($value){//存在value,则新增隐藏域,保存原附件路径
$str.='<input type="hidden" name="old_'.$name.'" id="old_'.$name.'" value="'.$value.'">';
}
$str.="<script>
KindEditor.ready(function(K) {
var editor = K.editor({
uploadJson : '/index.php?s=/Admin/Kind/upload_json.html',
fileManagerJson : '/index.php?s=/Admin/Kind/file_manager_json.html',
allowFileManager : true
});
K('#".$name."fid').click(function() {
editor.loadPlugin('image', function() {
editor.plugin.imageDialog({
showRemote : false,
imageUrl : K('#$name').val(),
clickFn : function(url, title, width, height, border, align) {
K('#$name').val(url);
//document.getElementById('picida2').href=url;
editor.hideDialog();
}
});
});
});
// prettyPrint();
});
</script>";
}
else if($upfile=='2')//上传文件
{
$str.=' readonly="readonly" /> <input class="fl" style="width:70px !important; height:22px; border: 1px solid #d3d6d7; " type="button" value="上传文件" class="button" id="'.$name.'fid" />';
if($value){//存在value,则新增隐藏域,保存原附件路径
$str.='<input type="hidden" name="old_'.$name.'" id="old_'.$name.'" value="'.$value.'">';
}
$str.="<script>
KindEditor.ready(function(K) {
var editor = K.editor({
uploadJson : '/index.php?s=/Admin/Kind/upload_json.html',
fileManagerJson : '/index.php?s=/Admin/Kind/file_manager_json.html',
allowFileManager : true
});
K('#".$name."fid').click(function(){
editor.loadPlugin('insertfile', function(){
editor.plugin.fileDialog({
fileUrl : K('#$name').val(),
clickFn : function(url, title) {
K('#$name').val(url);
editor.hideDialog();
}
});
});
});
prettyPrint();
});
</script>";
}
}elseif($istags){
$str.=' />';
$str.='<input type="hidden" name="pptags[]" value="'.$name.'" />';
$str.='<script>
$(function () {
$("#'.$name.'").manifest();
});
</script>';
}else{
$str.=' />';
}
break;
default:
$str = '<input type="text" name="'.$name.'" value="'.$value.'" />';
break;
}
return $str;
}
/**
* 夏令营判断申请字段内容并输出 只给出结果(非from表单)
* @param type 字段类型
bstring 多行文本:几行几列
bool 布尔:1是0否
s_elect 下拉列表:默认值选择
c_heckbox 多选框:默认值选择
r_adio 单选框:默认值选择
string 文本
t_extarea 文本域
number 数字
* @param name 字段名称
* @param param array(val,row,col,ctitle) 默认选择值,行数,列数,列标题
* @param isdate 是否调用日期控件
* @param value 修改数据时已填写的数据
*/
function checkApply2($type,$name,$param=array('val'=>'','row'=>1,'col'=>1,'ctitle'=>''),$isdate='0',$value='',$upfile=''){
if($param['val']) $vals=explode('#', $param['val']); //默认选择值
switch ($type) {
case 'bstring': //多行
$col=$param['col']?$param['col']:1;
$str='<table width="99%" border="1" class="inner_table" style="border:1px solid #ddd;" >';
if($param['ctitle']){ //列标题
$ctitle=explode('#',$param['ctitle']);
$str.='<tr>';
foreach($ctitle as $k=>$v){
$str.='<td style="text-align:center;">'.$v.'</td>';
if($isdate && (strpos($v,'时间')!== false || strpos($v,'日期')!== false)) $datekey=$K+1; //多行匹配关键词时间、日期来调用日期控件
if($upfile && strpos($v,'上传')!== false) $upfilekey[]=$k+1; //多行匹配关键词上传来调用上传控件
}
$str.='</tr>';
}
// 修改时已填写数据
if($value){
$value=json_decode($value,true);
$row=count($value)?count($value):1;
for($i=0;$i<$row;$i++){
$str.='<tr>';
for($ii = 1;$ii<=$col;$ii++){
if(!$value[$i][$ii]) { continue; }//将值为空的数据排除掉
if(in_array($ii,$upfilekey)){
if($upfile == '1'){
$str.= $value[$i][$ii] ? '<td style="text-align:center"><div class="upimg"><img src="'.$value[$i][$ii].'" style="max-height:22px; max-width:100px; display:block; margin:0 auto;" /></div></td>' : '<td> </td>';
}elseif($upfile == '2'){
$str.= $value[$i][$ii] ? '<td style="text-align:center"><a href="'.$value[$i][$ii].'" target="_blank">下载文件</a></td>' : '<td> </td>';
}
}else{
$str.= $value[$i][$ii] ? '<td><p style="padding:0 5px;">'.$value[$i][$ii].'</p></td>' : '<td> </td>';
}
}
$str.='</tr>';
}
}
$str.='</table>';
break;
case 'bool';
if($value === 1) $str='是';
if($value === 0) $str='否';
break;
case 's_elect': //下拉
case 'c_heckbox': //多选
case 'r_adio': //单选
case 't_extarea':
case 'string':
default:
if($upfile == '1'){
$str = $value ? '<div class="upimg"><img src="'.$value.'" style="max-height:38px; max-width:100px;" /></div>' : ' ';
}elseif($upfile == '2'){
$str = $value ? '<a href="'.$value.'" target="_blank">下载文件</a>' : ' ';
}else{
$str = $value;
}
break;
}
return $str;
}
/**
* 判断报名字段的内容并检索输出(备注同上)
* @param desc 字段说明
* @param value 字段值
*/
function seachApply($type,$name,$param=array('val'=>'','row'=>1,'col'=>1,'ctitle'=>''),$isdate='0',$value='',$istags='0',$isjs='0'){
if($param['val']) $vals=explode('#', $param['val']); //默认选择值
switch ($type) {
case 'bstring': //多行
$row=$param['row']?$param['row']:1;
$col=$param['col']?$param['col']:1;
$str='<table width="99%" border="1" class="inner_table" style="border:1px solid #ddd;" >';
if($param['ctitle']){ //列标题
$ctitle=explode('#',$param['ctitle']);
$str.='<tr >';
foreach($ctitle as $k=>$v){
$str.='<td>'.$v.'</td>';
if($isdate && (strpos($v,'时间')!== false || strpos($v,'日期')!== false)) $datekey=$K+1; //多行匹配关键词时间、日期来调用日期控件
}
$str.='</tr>';
}
// 修改时已填写数据
if($value) $value=json_decode($value,true);
for($i=1;$i<=$row;$i++){
$str.='<tr > ';
for($ii = 1;$ii<=$col;$ii++){
$str.='<td><input type="text" name="'.$name.'['.$i.']['.$ii.']" value="';
if($value) $str.=$value[$i][$ii];
$str.='"';
if($ii == $datekey) $str.=' class="Wdate" onclick="WdatePicker()"';
$str.=' /></td>';
}
$str.='</tr>';
}
$str.='</table>';
break;
case 's_elect': //下拉
if($isjs==1){//调用js 地区组件
$str.='<div data-toggle="distpicker" id="target" style="display: inline-block;">
<select id="'.$name.'" name="'.$name.'"></select>
<select id="'.$name.'2" name="'.$name.'2"></select>
<script>';
if($value){ //编辑
$cou_val=explode('-',$value);
$str.='$("#target").distpicker({
province: "'.$cou_val[0].'",
city: "'.$cou_val[1].'",
});';
}else{ //添加
$str.='$("#target").distpicker({
autoSelect: false
});';
}
$str.='</script></div>';
}elseif($isjs==0){
$str='<select name="'.$name.'">';
$str.='<option value="">请选择</option>';
if($vals){
foreach($vals as $v){
$str.='<option value="'.$v.'"';
if($value && $value==$v) $str.=' selected="selected"';
$str.=' />'.$v.'</option>';
}
}
$str.='</select>';
}
break;
case 'r_adio': //单选
$str='<select name="'.$name.'">';
$str.='<option value="">请选择</option>';
if($vals){
foreach($vals as $v){
$str.='<option value="'.$v.'"';
if($value && $value==$v) $str.=' selected="selected"';
$str.=' />'.$v.'</option>';
}
}
$str.='</select>';
break;
case 'c_heckbox': //多选
if($vals){
foreach($vals as $v){
$str.='<input type="checkbox" name="'.$name.'[]" value="'.$v.'" ';
if($value && in_array($v,$value)) $str.=' checked="checked"';
$str.=' /> '.$v.' ';
}
}
break;
/*case 'r_adio': //单选
if($vals){
foreach($vals as $k => $v){
$str.='<input type="radio" name="'.$name.'" value="'.$v.'"';
if(!$value && $k == 0)
$str.=' checked';
elseif($value && $value == $v)
$str.=' checked';
$str.=' /> '.$v.' ';
}
}
break;*/
case 'bool';
$str = '<input type="radio" name="'.$name.'" value="1" ';
if(($value && $value === 1) || !$value) $str.=' checked';
$str.=' /> 是 <input type="radio" name="'.$name.'" value="0"';
if($value && $value === 0) $str.=' checked';
$str.=' /> 否';
break;
case 't_extarea':
$str = '<textarea name="'.$name.'" style="width:80%;">'.$value.'</textarea>';
break;
case 'string':
$str = '<input type="text" id="'.$name.'" name="'.$name.'" value="'.$value.'" ';
if($isdate) { //日期控件
$str.=' class="Wdate" onclick="WdatePicker()" />';
}elseif($istags){ //标签组件
$str.=' />';
$str.='<input type="hidden" name="pptags[]" value="'.$name.'" />';
$str.='<script>
$(function () {
$("#'.$name.'").manifest();
});
</script>';
}else{ $str.=' class="w_160" />';}
break;
default:
$str = '<input type="text" name="'.$name.'" value="'.$value.'" />';
break;
}
return $str.'&nbsp;&nbsp;';
}
/**
* 根据status1,status2,status3值来判断用户状态,并返回操作链接地址及名称
* @param array $vo $vo=array('status1','status2','status3','id')
* @param int $sumid 夏令营id
* @param int $p 页数
* @return array 链接及名称
*/
/*function doStatus($vo,$sumid,$p=1){
if($vo['status1'] == 1 && $vo['status2'] == 1 && $vo['status3'] == 1){
$do['url']='';
$do['name']='已录取';
$do['name2']='已发待录取邀请';
switch($vo['status3_ac']){
case '1':
$do['ac']='拒绝';
break;
case '2':
$do['ac']='接受';
default:
$do['ac']=Null;
}
}elseif($vo['status1'] == 1 && $vo['status2'] == 1 && !$vo['status3']){
$do['url']='luqu';
$do['name']='待录取';
$do['name2']='已发参营邀请';
switch($vo['status2_ac']){
case '1':
$do['ac']='拒绝';
break;
case '2':
$do['ac']='接受';
default:
$do['ac']=Null;
}
}elseif($vo['status1'] == 1 && !$vo['status2'] && !$vo['status3']){
$do['url']='canying';
$do['name']='确定参营';
$do['name2']='已入备选库';
}elseif(!$vo['status1'] && !$vo['status2'] && !$vo['status3']){
$do['url']='beixuan';
$do['name']='备选';
}
if($do['url'])
$do['url']=U($do["url"],array('id'=>$vo['id'],'sumid'=>$sumid,'page'=>$p));
else
$do['url']=null;
return $do;
}*/
/**
* 根据ACTION_NAME,status1,status2,status3值来判断用户状态,并返回操作链接地址及名称
* @param array $vo $vo=array('status1','status2','status3','id')
* @param int $sumid 夏令营id
* @param string $action action_name
* @param int $p 页数
* @return array 链接及名称
*/
function doStatus($vo,$sumid,$action,$p=1){
switch($action){
case 'operate':
if($vo['status1'] == 1){
$do['url']='';
$do['name']='已入备选库';
}elseif(!$vo['status1']){
$do['url']='beixuan';
$do['name']='备选';
}
break;
case 'operate2':
if($vo['status2'] == 1){
$do['url']='';
$do['name']='已发参营邀请';
if($vo['status2_ac'] == 1){
$do['ac']='拒绝';
$do['url2']='canying';
}elseif($vo['status2_ac'] == 2){
$do['ac']='接受';
}
}else{
$do['url']='canying';
$do['name']='确定参营';
}
break;
case 'operate3':
if($vo['status3'] == 1){
$do['url']='';
$do['name']='已发待录取邀请';
if($vo['status3_ac'] == 1){
$do['ac']='拒绝';
$do['url2']='luqu';
}elseif($vo['status3_ac'] == 2){
$do['ac']='接受';
}
}else{
$do['url']='luqu';
$do['name']='待录取';
}
break;
case 'operate4':
$do['url']='';
$do['name']='录取';
break;
}
$do['action'] = $action;
if($do['url']){
$do['url']=U($do["url"],array('id'=>$vo['id'],'sumid'=>$sumid,'page'=>$p));
}else{
$do['url']=null;
}
$do['url2']=$do['url2']?U($do["url2"],array('id'=>$vo['id'],'sumid'=>$sumid,'page'=>$p,'doagin'=>'yes')):null; //再次邀请
return $do;
}
/**
* menu权限判断
* @param $arr menu列表(控制器-方法)
*/
function doMenuPower($arr,$authlist){
$arr=array_map('strtolower',$arr);
$first=false;
foreach($arr as $k => $v){
if(in_array($v,$authlist)){
$second[$k]=true;
$first=true;
}else{
$second[$k]=false;
}
}
$r=array('first'=>$first,'second'=>$second);
return $r;
}
\ No newline at end of file \ No newline at end of file
<?php
return array(
'VAR_FILTERS'=>'htmlspecialchars',
// 'TOKEN_ON'=>true,
// 'TOKEN_NAME'=>'__hash__',
// 'TOKEN_TYPE'=>'md5',
// 'TOKEN_RESET'=>true,
'DEFAULT_MODULE' => 'Public', //默认模块
'TMPL_PARSE_STRING' =>array(
'__PUB__'=>__ROOT__.'/Public/Admin/',
'__ROOTPUB__'=>__ROOT__.'/Public/',
),
//权限
'AUTH_CONFIG'=>array(
'AUTH_ON' => true, //认证开关
'AUTH_TYPE' => 1, // 认证方式,1为时时认证;2为登录认证。
'AUTH_GROUP' => 'wa_authgroupf', //用户组数据表名
'AUTH_GROUP_ACCESS' => 'wa_authgroupaccessf', //用户组明细表
'AUTH_RULE' => 'wa_authrulef', //权限规则表
'AUTH_USER' => 'wa_webuser'//用户信息表
),
/* Cookie设置 */
'COOKIE_EXPIRE' => 0, // Coodie有效期
'COOKIE_DOMAIN' => '', // Cookie有效域名
'COOKIE_PATH' => '/', // Cookie路径
'COOKIE_PREFIX' => 'pro_', // Cookie前缀 避免冲突
'SESSION_PREFIX' => 'pro_', // session 前缀
// 'ERROR_PAGE'=>'/Public/error.html'
// 'TMPL_EXCEPTION_FILE'=>'/Modules/Home/Tpl/Public/think_exception.tpl'
// 'TMPL_ACTION_ERROR' => './Modules/Home/Tpl/Public/dispatch_jump.tpl',
// 'TMPL_ACTION_SUCCESS' => './Modules/Home/Tpl/Public/dispatch_jump.tpl'
);
\ No newline at end of file \ No newline at end of file
<?php
Class ApplyModel extends Model{
//自动完成
protected $_auto = array (
// array('pid','getPid',1,'callback'),// 新增
array('uid','getUid',1,'callback'), //uid
array('addtime','time',3,'function'),//时间
);
//自动验证
protected $_validate =array(
//array('uid','checkUid','请先登录!',1,'callback',3),
//array('title','require','报告名称必填',0,'',3), //新增和修改标题 标题必须填写、
//array('title','checkTitle','报告名称已经存在',0,'callback',1), //新增标题 标题是否存在
);
protected function getUid(){
return cookie('uid');
}
protected function checkUid(){
if(cookie('uid'))
return true;
else
return false;
}
//检测 报告名称是否存在
protected function checkTitle($val){
$m=M('Apply');
$map['title'] = array('eq',$val);
$r=$m->where($map)->count();
if($r){
return false;
}else{
return true;
}
}
/**
* 自动验证referee 方法 (callback)
*/
protected function valReferee($data){
if(!is_array($data)){ //字符串
if($data){
return true;
}else{
return false;
}
}else{ //数组
if(ppFilter($data)){
return true;
}else{
return false;
}
}
}
/**
* 自动验证复选框
*/
protected function valCheckbox($data){
if($data){
return true;
}else{
return false;
}
}
}
\ No newline at end of file \ No newline at end of file
<?php
Class ArticleModel extends Model{
//自动完成
protected $_auto = array (
array('addtime','addTime',3,'callback'),// 新增 对time字段在新增的时候写入当前时间戳
// array('uid','getUid',1,'callback'), // 新增 对uid字段在新增的时候写入当前用户id
array('dotopday','dotopday',3,'callback'),
array('dotopend','dotopend',3,'callback'),
array('updatetime','time',3,'function'), // 新增和修改 对optime字段 写入当前时间戳
array('uid','getUid',1,'callback'), // 新增 对uid字段在新增的时候写入当前用户id
);
//自动验证
protected $_validate =array(
array('addtime','require','发布时间不能为空',0,'',3),
array('title','require','标题不能为空',0,'',3), //新增和修改标题 标题必须填写、
array('content','require','内容不能为空',0,'',3),
);
protected function getUid(){
return cookie('uid');
}
protected function addTime($date){
if($date){
$data=strtotime($date);
return $data;
}else{
return null;
}
}
/**
* 自动完成 置顶时间(天)
*/
protected function dotopday(){
if($day = intval(I('dotopday')) && intval(I('dotop')) > 0){
return $day;
}else{
return 0;
}
}
/**
* 自动完成 置顶结束时间戳
*/
protected function dotopend(){
if($day = intval(I('dotopday')) && intval(I('dotop')) > 0){
$data=time() + $day * 86400;
return $data;
}else{
return 0;
}
}
}
\ No newline at end of file \ No newline at end of file
<?php
Class CommonModel extends Model
{
protected $pp_m=''; //M('table')
public function _initialize()
{
$this->pp_m=M($this->getModelName());
}
private $icon = array('&nbsp;&nbsp;│', '&nbsp;&nbsp;├ ', '&nbsp;&nbsp;└ '); //格式化的字符
/**
* $upid 上级id
* $is 是否显示当前id
* $condition 筛选条件 必须是数组
* $orderby 排序字符串
* $space 默认为空
**/
public function getList( $upid = 0, $space = "",$orderby = 'sort asc,id asc',$condition = NULL,$is=0) {
if($is==0 && $upid!=0){
$a=$this->pp_m->where('id='.$upid)->select();
foreach($a as $k=>$v){
$a[$k]['tname']=$v['catname'];
}
$all=$this->search_List($upid,$space='&nbsp;&nbsp;',$orderby,$condition,$table);
$all=array_merge($a,$all);
}else{
$all=$this->search_List($upid,$space,$orderby,$condition,$table);
}
return $all;
}
/**
* $condition 查询条件(数组)
* orderby 排序方式
* topid 顶级id
**/
private function search_List($topid = 0, $space = "",$orderby = 'sort asc,id asc',$condition = NULL)
{
$childs = $this->getChild($topid,$orderby,$condition);//查询该栏目下面的所有子栏目
$n = count($childs);
if($n){//有子栏目
$m=1;
for($i=0;$i<$n;$i++){
if($n==$m){//只有一个子栏目/最后一个栏目
$pre = $this->icon[2];
}else{
$pre = $this->icon[1];
$pad = $space ? $this->icon[0] : "";
}
$childs[$i]['tname']=($space ? $space.$pre : "").$childs[$i]['catname'];
$cat_all[]=$childs[$i];
$cat_bbb=$this->search_List($childs[$i]['id'], $space.$pad."&nbsp;&nbsp;",$orderby,$condition); //递归下一级分类
//return $cat_bbb;
if(count($cat_bbb)){//包含子栏目 合并
$cat_all=array_merge($cat_all,$cat_bbb);
}
$m++;
}
return $cat_all;
}else{
return array();;
}
}
/**
* 获取$upid的所有子分类
* @param $condition 条件
* @param $upid 父级id
* @param $orderby 排序
**/
public function getChild($upid = 0,$orderby = 'sort asc,id asc',$condition = null)
{
$condition['upid']=array('eq',$upid);
$childs=$this->pp_m->where($condition)->order($orderby)->select();
return $childs;
}
}
?>
\ No newline at end of file \ No newline at end of file
<?php
Class DepartmentModel extends Model{
//自动完成
protected $_auto = array (
array('name','trim',3,'function'),
array('addtime','time',1,'function'),
// array('firstname','getFname',3,'callback'),
);
//自动验证
protected $_validate =array(
array('name','require','部门名称不能为空',0,'',3),
array('name','checkOnly','部门名称已存在,请确认',0,'callback',3),
array('firstname','require','部门名称首字母不能为空',0,'',3),
);
protected function getFname(){ //获取名称第一个字母
$f=pinyin1(trim(I('name')));
return $f;
}
protected function checkOnly($name){
$where['name']=array('eq',$name);
if(I('id')) $where['id']=array('neq',I('id'));
$r=M('Department')->field('id')->where($where)->find();
if($r)
return false;
else
return true;
}
}
\ No newline at end of file \ No newline at end of file
<?php
Class MaillistModel extends Model{
//自动完成
protected $_auto = array (
array('name','trim',3,'function'),
array('addtime','time',1,'function'),
);
//自动验证
protected $_validate =array(
array('pid','require','请选择部门',0,'',3),
array('name','require','姓名不能为空',0,'',3),
array('mobile','/^(\d{3}(\-)?)?(1[123456789]\d{9})$/i','请输入正确格式的手机号',2,'regex',3),
array('tel','/^(0[0-9]{2,3}\-)?([2-9][0-9]{6,7})+(\-[0-9]{1,4})?$/i','请输入正确格式的座机号',2,'regex',3),
array('email','email','请输入正确格式的Email',2,'',3),
);
}
\ No newline at end of file \ No newline at end of file
<?php
Class MaillistViewModel extends ViewModel{
public $viewFields = array(
'Maillist'=>array('id','name','pid','mobile','tel','email','addtime','_type'=>'left'),
'Department'=>array('name'=>'depart_name','_on'=>'Maillist.pid=Department.id'),
);
}
\ No newline at end of file \ No newline at end of file
<?php
Class WebuserModel extends Model{
//自动完成
protected $_auto = array (
array('addtime','time',1,'function'),
// array('pid','getPid',1,'callback'),// 新增
array('password','md5Pwd',1,'callback'),
array('password2','md5Pwd',1,'callback'),
array('updatatime','time',2,'function'),
);
//自动验证
protected $_validate =array(
array('username','require','登录账号必须填写',0,'',1),
array('username','checkUsername1','登录账号已经存在!',0,'callback',1),
array('username','checkUsername','登录账号已经存在!',0,'callback',2),
array('name','require','姓名必须填写',0,'',3),
array('password','/^.{5,}$/','密码必须5位数以上',0,'regex',1), //新增
array('password','/^.{5,}$/','密码必须5位数以上',2,'regex',2), //修改用户 密码必须5位数以上
array('password2','password','两次密码不一致',0,'confirm',3), //新增和修改用户 确认密码不正确
array('role','require','请选择角色',0,'',3),
array('tel','/(^(0[0-9]{2,3}\-)?([2-9][0-9]{6,7})+(\-[0-9]{1,4})?$)|(^(\d{3}(\-)?)?(1[123456789]\d{9})$)/i','请输入正确格式的电话',2,'regex',3),
array('email','email','请输入正确格式的电子邮箱',2,'',3),
);
//密码 md5加密
protected function md5Pwd($pwd){
if($pwd){
return md5($pwd);
}else{
return null;
}
}
protected function checkEmail($email){ //检测邮箱是否注册
$where['email'] = array('eq',$email);
if(cookie('uid')) $where['id'] = array('neq',cookie('uid'));
$data=M('Webuser')->where($where)->find();
if($data)
return false;
else
return true;
}
//检测 登录账号是否存在
protected function checkUsername($val){
$m=M('Webuser');
if($id = I('id',0,'intval')){
$map['id'] = array('neq',$id);
}else{
$map['id'] = array('neq',cookie('uid'));
}
$map['username'] = array('eq',$val);
$r=$m->where($map)->count();
if($r){
return false;
}else{
return true;
}
}
//新增时检测账号
protected function checkUsername1($val){
$m=M('Webuser');
$map['username'] = array('eq',$val);
$r=$m->where($map)->count();
if($r){
return false;
}else{
return true;
}
}
}
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>添加|后台管理系统</title>
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<script type="text/javascript" src="__PUB__js/My97DatePicker/WdatePicker.js"></script>
<link rel="stylesheet" href="__ROOTPUB__kindeditor/themes/default/default.css" />
<script charset="utf-8" src="__ROOTPUB__kindeditor/kindeditor-min.js"></script>
<script charset="utf-8" src="__ROOTPUB__kindeditor/lang/zh_CN.js"></script>
<script>
KindEditor.ready(function(K) {
var editor = K.create('textarea[name="content"]', {
uploadJson : "<{:U('Kind/upload_json')}>",
fileManagerJson : "<{:U('Kind/file_manager_json')}>",
allowFileManager : true
});
var editor1 = K.editor({
uploadJson : "<{:U('Kind/upload_json')}>",
fileManagerJson : "<{:U('Kind/file_manager_json')}>",
allowFileManager : true
});
K('#uploadid').click(function() {
editor1.loadPlugin('image', function() {
editor1.plugin.imageDialog({
imageUrl : K('#picid').val(),
clickFn : function(url, title, width, height, border, align) {
K('#picid').val(url);
document.getElementById('picida').src=url;
editor1.hideDialog();
}
});
});
});
});
</script>
</head>
<body style="margin: 0px 0px;min-height:500px; background:url(__ROOTPUB__img/ybbf.png) center no-repeat;background-size:contain;background-position:200px 150px;height:810px;">
<div style="margin:0 auto; width:98%;">
<form name="form1" action="" method="post" style="">
<table class="table table-condensed table-bordered table-hover" style="">
<tbody style="">
<tr>
<td colspan="4">
<div style="float:left">
<b>发布通知公告</b>
</div>
<div style="float:right">
[<a href="<{:U('index',array('tid'=>I('tid'),'p'=>I('p')))}>"><u>返回列表</u></a>]
</div>
</td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">发布时间:</font></td>
<td colspan="3">
<span><input class="Wdate" type="text" onClick="WdatePicker()" name="addtime" value="<{:date('Y-m-d')}>" /></span>
(<font color="red">注:红色字为必填项</font>)
</td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">标题:</font></td>
<td colspan="3">
<input name="title" type="text" id="title" class="txt_title" value=""> (<font color="red">注:红色字为必填项</font>)
</td>
</tr>
<!-- <tr>
<td class="text_right_wid_90">作者:</td>
<td class="width_430">
<input name="editor" type="text" id="writer" value="">
</td>
<td class="text_right_wid_90">来源:</td>
<td>
<input type="text" name="source" id="sourceid" value="">
</td>
</tr> -->
<tr>
<td class="text_right_wid_90">
置顶:
</td>
<td class="width_430">
<select name="dotop" style="width:80px;">
<option value="0">默认值</option>
<for start="1" end="100" name="ii">
<option value="<{$ii}>"><{$ii}></option>
</for>
</select> (<font color="red">注:数安越大排序越靠前</font>)
</td>
<td class="text_right_wid_90">置顶天数:</td>
<td>
<input name="dotopday" type="text" value="" style="width:100px;">天 (<font color="red">注:0表示置顶时间不受限制</font>)
</td>
</tr>
<tr>
<td style="text-align:right; vertical-align:middle">内容摘要:</td>
<td colspan="3"><textarea name="description" rows="2" id="descriptionid" style="width:98%;"></textarea></td>
</tr>
<tr style="">
<td style="text-align:right; vertical-align:middle"><font color="red">内容:</font></td>
<td colspan="3" style=""><textarea name="content" id="content" style="width: 99%; height:500px; display: none;"></textarea></td>
</tr>
<tr>
<td></td>
<td colspan="3">
<button class="btn" type="submit" style="cursor:pointer;">保存</button>
<button class="btn" type="reset" onclick="location.reload();" style="cursor:pointer;">重置</button>
</td>
</tr>
</tbody>
</table>
</form>
</div>
</body>
<include file="Common:js2" />
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>添加|后台管理系统</title>
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<script type="text/javascript" src="__PUB__js/My97DatePicker/WdatePicker.js"></script>
<link rel="stylesheet" href="__ROOTPUB__kindeditor/themes/default/default.css" />
<script charset="utf-8" src="__ROOTPUB__kindeditor/kindeditor-min.js"></script>
<script charset="utf-8" src="__ROOTPUB__kindeditor/lang/zh_CN.js"></script>
<script>
KindEditor.ready(function(K) {
var editor = K.create('textarea[name="content"]', {
uploadJson : "<{:U('Kind/upload_json')}>",
fileManagerJson : "<{:U('Kind/file_manager_json')}>",
allowFileManager : true
});
var editor1 = K.editor({
uploadJson : "<{:U('Kind/upload_json')}>",
fileManagerJson : "<{:U('Kind/file_manager_json')}>",
allowFileManager : true
});
K('#uploadid').click(function(){
editor1.loadPlugin('image', function(){
editor1.plugin.imageDialog({
imageUrl : K('#picid').val(),
clickFn : function(url, title, width, height, border, align) {
K('#picid').val(url);
document.getElementById('picida').src=url;
editor1.hideDialog();
}
});
});
});
});
</script>
</head>
<body style="margin: 0px 0px;min-height:500px; background:url(__ROOTPUB__img/ybbf.png) center no-repeat;background-size:contain;background-position:200px 150px;height:810px;">
<div style="margin:0 auto; width:98%;">
<form name="form1" action="" method="post" style=""><input name="id" type="hidden" id="title" value="<{$data.id}>">
<table class="table table-condensed table-bordered table-hover" style="">
<tbody style="">
<tr>
<td colspan="4">
<div style="float:left">
<b>修改通知公告</b>
</div>
<div style="float:right">
[<a href="<{:U('index',array('p'=>I('p',1,'intval')))}>"><u>返回列表</u></a>]
</div>
</td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">发布时间:</font></td>
<td colspan="3">
<span><input class="Wdate" type="text" onClick="WdatePicker()" name="addtime" value="<{$data.addtime|date='Y-m-d',###}>" /></span>
(<font color="red">注:红色字为必填项</font>)
</td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">标题:</font></td>
<td colspan="3">
<input class="txt_title" name="title" type="text" id="title" value="<{$data.title}>"> (<font color="red">注:红色字为必填项</font>)
</td>
</tr>
<!-- <tr>
<td class="text_right_wid_90">作者:</td>
<td class="width_430">
<input name="editor" type="text" id="writer" value="<{$data.editor}>">
</td>
<td class="text_right_wid_90">来源:</td>
<td>
<input type="text" name="source" id="sourceid" value="<{$data.source}>">
</td>
</tr> -->
<tr>
<td class="text_right_wid_90">
置顶:
</td>
<td class="width_430">
<select name="dotop" style="width:80px;">
<option value="0">默认值</option>
<for start="1" end="100" name="ii">
<option value="<{$ii}>" <eq name="data.dotop" value="$ii">selected="selected"</eq>><{$ii}></option>
</for>
</select> (<font color="red">注:数安越大排序越靠前</font>)
</td>
<td class="text_right_wid_90">置顶天数:</td>
<td>
<input name="dotopday" type="text" value="<{$data.dotopday}>" style="width:100px;">天 (<font color="red">注:0表示置顶时间不受限制</font>)
</td>
</tr>
<tr>
<td class="text_right_wid_90">内容摘要:</td>
<td colspan="3">
<textarea name="description" rows="2" id="description" style="width:98%;"><{$data.description}></textarea>
</td>
</tr>
<tr>
<td class="text_right_wid_90"><font color="red">内容:</font></td>
<td colspan="3">
<textarea name="content" id="content" style="width: 99%; height:500px; display: none;"><{$data.content}></textarea>
</td>
</tr>
<tr>
<td></td>
<td colspan="3">
<button class="btn" type="submit" style="cursor:pointer;">保存</button>
<button class="btn" type="reset" onclick="location.reload();" style="cursor:pointer;">重置</button>
</td>
</tr>
</tbody>
</table>
<input type="hidden" name="p" value="<{:I('p',1,'intval')}>">
</form>
</div>
</body>
<include file="Common:js2" />
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<!-- saved from url=(0050)http://localhost/cms/index.php/admin/Article/index -->
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>列表|后台管理系统</title>
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<script>
$(document).ready(function(){
$("#SelectAll").click(function(){
$("input[name='check[]']").checkCbx();
});
$("#colid1").change(function(){
var val=$(this).children('option:selected').val();
window.location.href="<{:U('index',array(),'')}><{:C('URL_PATHINFO_DEPR')}>tid<{:C('URL_PATHINFO_DEPR')}>"+val;
});
$(".YanZheng").click(function(event){
var a=$("input:checked").length;
if(a==0){
alert('您还没有请选择操作内容!');
event.preventDefault();
}
});
$(".icon_isok").click(function(){
var vara=$(this).find('i').attr('var');
$.get("<{:U('Shenhe')}>",{'id':vara},function(data){
if(data){
location.reload();
}else{
alert('修改失败!');
location.reload();
}
});
});
});
$.fn.checkCbx = function(){
return this.each(function(){
this.checked = !this.checked;
});
}
</script>
<style>
#colid1 {
font-family: "宋体";
}
</style>
</head>
<body style="margin: 0px 0px;min-height:500px; background:url(__ROOTPUB__img/ybbf.png) center no-repeat;background-size:contain;background-position:200px 100px;">
<div style="margin:0 auto; width:98%;">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="10" style="padding-left:10px;">
<div style="float:left">
<b><{$page_title}></b>
</div>
<div style="float:right; font-weight:bold;"><?php if(in_array('article-add',$authlist)):?><a href="<{:U('add')}>"><u>发布通知公告</u></a><?php endif;?> </div>
</td>
</tr>
<tr align="center">
<td width="6%" style="text-align:center;">序号</td>
<td style="text-align:center;">标题</td>
<td width="8%" style="text-align:center;">发布时间</td>
<td width="8%" style="text-align:center;">点击数</td>
<td width="8%" style="text-align:center;">是否置顶</td>
<?php if(in_array('article-look',$authlist) || in_array('article-edit',$authlist) || in_array('article-delete',$authlist)):?>
<td width="20%" style="text-align:center;">操作</td>
<?php endif;?>
</tr>
<volist name="list" id="vo" key="k" empty="$empty">
<tr style="text-align:center;">
<td nowrap="" style="text-align:center;"><{$k}></td>
<td style="text-align:left;"><{$vo.title}></td>
<td style="text-align:center;"><{$vo.addtime|date='Y-m-d',###}></td>
<td style="text-align:center;"><{$vo.clicknum}></td>
<td style="text-align:center;">
<neq name="vo['dotop']" value='0'><span style="color:red"></span><else /></neq>
</td>
<?php if(in_array('article-look',$authlist) || in_array('article-edit',$authlist) || in_array('article-delete',$authlist)):?>
<td style="text-align:center;">
<?php if(in_array('article-look',$authlist)):?>
<a href="<{:U('look',array('id'=>$vo['id'],'p'=>I('p',1,'intval')))}>" class="btn btn-mini"><i class="icon-look"></i> 查看</a>
<?php endif;?>
<?php if(in_array('article-edit',$authlist)):?>
<a href="<{:U('edit',array('id'=>$vo['id'],'p'=>I('p',1,'intval')))}>" class="btn btn-mini"><i class="icon-edit"></i> 修改</a>
<?php endif;?>
<?php if(in_array('article-delete',$authlist)):?>
<a href="javascript:void(0);" onclick="del2('<{:U('delete',array('id'=>$vo['id'],'p'=>I('p',1,'intval')))}>','确定要删除信息吗?删除后无法恢复');" class="btn btn-mini"><i class="icon-trash"></i> 删除</a>
<?php endif;?>
</td>
<?php endif;?>
</tr>
</volist>
<notempty name="page">
<tr>
<td colspan="10">
<ul class="page">
<{$page}>
</ul>
</td>
</tr>
</notempty>
</tbody></table>
</div>
<include file="Common:js" />
</body></html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>添加|后台管理系统</title>
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<script type="text/javascript" src="__PUB__js/My97DatePicker/WdatePicker.js"></script>
<link rel="stylesheet" href="__ROOTPUB__kindeditor/themes/default/default.css" />
<script charset="utf-8" src="__ROOTPUB__kindeditor/kindeditor-min.js"></script>
<script charset="utf-8" src="__ROOTPUB__kindeditor/lang/zh_CN.js"></script>
<script>
KindEditor.ready(function(K) {
var editor = K.create('textarea[name="content"]', {
uploadJson : "<{:U('Kind/upload_json')}>",
fileManagerJson : "<{:U('Kind/file_manager_json')}>",
allowFileManager : true
});
var editor1 = K.editor({
uploadJson : "<{:U('Kind/upload_json')}>",
fileManagerJson : "<{:U('Kind/file_manager_json')}>",
allowFileManager : true
});
K('#uploadid').click(function(){
editor1.loadPlugin('image', function(){
editor1.plugin.imageDialog({
imageUrl : K('#picid').val(),
clickFn : function(url, title, width, height, border, align) {
K('#picid').val(url);
document.getElementById('picida').src=url;
editor1.hideDialog();
}
});
});
});
});
</script>
<style>
.cont{
padding:0px 10px 10px;
line-height: 200%;
}
</style>
</head>
<body style="margin: 0px 0px;min-height:500px; background:url(__ROOTPUB__img/ybbf.png) center no-repeat;background-size:contain;background-position:200px 150px; ">
<div style="margin:0 auto; width:98%; height:880px;">
<table class="table table-condensed table-bordered table-hover" style="">
<tbody style="">
<tr>
<td colspan="4">
<div style="float:left">
<b>通知公告</b>
</div>
<div style="float:right">
[<a href="<{:U('index',array('p'=>I('p',1,'intval')))}>"><u>返回列表</u></a>]
</div>
</td>
</tr>
<tr>
<td colspan="4">
<h4 style="text-align:center"><{$data.title}></h4>
<p style="text-align:right; padding-right:20px;">发布时间:<{$data.addtime|date='Y-m-d',###}></p>
<div class="cont">
<{$data.content}>
</div>
</td>
</tr>
<tr>
<td colspan="4" style="text-align:center">
<button class="btn" type="button" onclick="history.back();" style="cursor:pointer;">返 回</button>
</td>
</tr>
</tbody>
</table>
</div>
</body>
<include file="Common:js2" />
</html>
\ No newline at end of file \ No newline at end of file
<script type="text/javascript">
function fuzhi(){
ppAdd();
}
function ppAdd(){
<notempty name="name">
$('#ppAdd a',window.parent.document).removeClass('active');
$('#<{$name}>',window.parent.document).addClass('active');
ppMenu();
<else />
$('#ppAdd a',window.parent.document).removeClass('active');
</notempty>
}
function ppMenu(){
var ma = '<{$Think.MODULE_NAME}>_<{$Think.ACTION_NAME}>';
$('body',window.parent.document).find('#menufra').contents().find('#ppMenu a').removeClass('pp_hover');
$('body',window.parent.document).find('#menufra').contents().find('a[ppAttr="'+ma+'"]').addClass('pp_hover');
}
$(function(){
ppAdd();
ppMenu();
});
</script>
<include file="Common:js2"/>
\ No newline at end of file \ No newline at end of file
<script type="text/javascript">
function bodyHeight(){
var ifheight = $(document.body).height()+30;
if(ifheight < 500){
ifheight = 500;
}
$('#ifright',window.parent.document).css('height',ifheight);
}
$(function(){
bodyHeight();
});
</script>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><{:C('title')}></title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" href="__ROOTPUB__css/login.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<link rel="stylesheet" type="text/css" href="__ROOTPUB__css/style.css">
<!-- <link rel="stylesheet" type="text/css" href="__PUB__style/shengxing.css"> -->
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
</head>
<body style="min-width:1300px;">
<div class="head">
<div class="top_bg">
<div class="top_bg_center">
<div class="home fr">
<a href="<{:U('outlogin')}>" class="fr" ><img src="__ROOTPUB__img/TC.png" alt="">退出登录</a>
<a href="<{:U('Index/index')}>" class="fr" style="vertical-align: top;"><img src="__ROOTPUB__img/home.png" alt="">系统主页</a>
</div>
<div class="clear"></div>
<a href="" class="top_bg_logo fl"><img src="__ROOTPUB__img/bg_logo.png" alt=""></a>
<div class="home fr">
<a href="<{:U('Member/index')}>" target="main"class="fr" ><img src="__ROOTPUB__img/TC.png" alt="">个人信息</a>
<a href="<{:U('Member/editpass')}>" target="main" class="fr" style="vertical-align: top;"><img src="__ROOTPUB__img/home.png" alt="">修改密码</a>
</div>
</div>
</div>
<include file="Index:top" />
</div>
<div class="left" >
<div class="menu" id="menu">
<iframe id="menufra" name="menu" frameborder="0" src="<{:U('Index/menu')}>"></iframe>
</div>
</div>
<div class="right" id="ifright" style="">
<div class="main">
<iframe id="main" name="main" frameborder="0" src="<{:U('Member/show')}>"></iframe>
</div>
</div>
<script>
$(document.body).css({
"overflow-y":"auto"
});
</script>
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<title></title>
<link href="__PUB__style/pp_main.css" type="text/css" rel="stylesheet" />
<link rel="stylesheet" type="text/css" href="__PUB__style/main.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<style>
.panel-left *,.panel-right{color:#333;}
</style>
</head>
<!--png效果-->
<!--[if IE 6]>
<script type="text/javascript" src="bjs/DD_belatedPNG_0.0.8a.js"></script>
<script type="text/javascript"> DD_belatedPNG.fix('img,..list li a,.list li a:hover'); </script>
<![endif]-->
<!--png效果-->
<body>
<div class="mian_bg" style="overflow:hidden">
<div class="main_left">
<div class="admin">
<p>
<span style="color:#367abb; font-weight:bold; font-size:15px; font-family:Arial; margin-right:5px;"></span>
<SCRIPT language="JavaScript">
<!-----------
var enabled = 0;
today = new Date();//取当前日期
var day;
var date;
if(today.getDay()==0) day = "星期日"//根据当前日期星期部分的数字生成对应的中文说明。
if(today.getDay()==1) day = "星期一"
if(today.getDay()==2) day = "星期二"
if(today.getDay()==3) day = "星期三"
if(today.getDay()==4) day = "星期四"
if(today.getDay()==5) day = "星期五"
if(today.getDay()==6) day = "星期六"
document.fgColor = " FF0072"; //设定文字的颜色
//取日期部分的描述
date1 = "<span style='color:#367abb; font-weight:bold; font-size:15px; font-family:Arial; margin-right:5px;'>" + (today.getFullYear()) + "年" + (today.getMonth() + 1 ) + "月" + today.getDate() + "日 " + "</span>";
date2 = "<span style='color:#367abb; font-weight:bold; font-size:15px; font-family:Arial; margin-right:5px;'>" + day + "</span>";//取星期部分描述。
document.write(date1.fontsize(3) + date2.fontsize(3));//将前面的内容写进显示区
//----->
</SCRIPT>
</p>
</div>
</div>
<div class="main_right">
<!-- <div class="tianqi" style="border-bottom:none;">
<ul id="tianqibox">
<li onmousemove="tianqichangeTab(0)" class="tianqihover" ><a href="javascript:void(0);">天气</a></li>
<li onmousemove="tianqichangeTab(1)" ><a href="javascript:void(0);">日期</a></li>
</ul>
<div id="tianqitabBox">
<div class="tianqinew" id="tianqitab0">
<IFRAME id="tianqi8_wetherinfo" name="tianqi8_wetherinfo" src="http://www.uuuu.cc/weather/code/freeweather9.htm?id=&fcolor=&imgurl=&bimg=&bcolor=&fsize=12" frameBorder=0 width=200 height=20 ALIGN=CENTER MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 SCROLLING=NO allowtransparency=true style="padding-top:15px; padding-left:8px;"></IFRAME>
</div>
<div class="tianqinew tianqihidden" id="tianqitab1"><php>echo date('Y-m-d');</php></div>
</div>
<script type="text/javascript">
function tianqichangeTab(idNum){
for(i=0;i<=1;i++){
document.getElementById("tianqitab"+i).className="tianqinew tianqihidden"//最初状态第一个是隐藏的,主要是设置其他div隐藏的。
document.getElementById("tianqibox").getElementsByTagName("li")[i].className=""//鼠标经过时的背景颜色变为绿色
}
document.getElementById("tianqitab"+idNum).className="tianqinew"//鼠标经过时让下面的div设置为显示
document.getElementById("tianqibox").getElementsByTagName("li")[idNum].className="tianqihover"//设置第一个nav背景颜色的初始状态
}
</script>
</div> -->
</div>
</div>
</div>
<div style="border-top:1px solid #D0E7F7; margin:0 18px; padding-top:30px;">
<div class="main_title">
欢迎您的访问!
</div>
<style>
.main_title{font-size:45px;line-height:220%; text-align:center; color:#267fb9;font-family: '宋体';}
.main_cont{
display:block;
width:16%;
margin:0 auto;
/* border: 1px solid #ccc;
border-radius: 2px;
border-radius: 2px;
-moz-box-shadow: 0 1px 0px rgba(255, 255, 255, 1);
-webkit-box-shadow: 0 1px 0px rgba(255, 255, 255, 1);
box-shadow: 0 1px 0px rgba(255, 255, 255, 1); */
}
.main_cont li{
padding:0 12px;
line-height: 32px;
color:#267fb9;
font-size:14px;
/*border-bottom: 1px solid #ccc;*/
}
</style>
<ul class="main_cont">
<li>您好,<{$Think.cookie.username}></li>
<li>所属角色:<{$role}></li>
</ul>
</div>
</body>
</html>
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" href="__ROOTPUB__css/login.css">
</head>
<body target="main" style="">
<table width="100%" align="left" border="0" cellspacing="0" cellpadding="0" style="text-align:left;">
<div class="slide_left fl">
<ul id="ppMenu">
<?php
$power=array( //权限
'Member-show',
);
$result=doMenuPower($power,$authlist); //权限判断处理
if($result['first']):
?>
<li>
<a href="<{:U('Member/show')}>" style=" cursor:pointer;" target="main" ppAttr="Member_show"><i class="icon icon1 fl" target="main"></i><span class="fl">资料展示</span></a>
</li>
<?php
endif;
unset($power,$result);
$power=array( //权限
'Member-retrieval',
);
$result=doMenuPower($power,$authlist); //权限判断处理
if($result['first']):
?>
<li>
<a href="<{:U('Member/retrieval')}>" style=" cursor:pointer;" target="main" ppAttr="Member_retrieval"><i class="icon icon2 fl"></i><span class="fl">资料检索</span></a>
</li>
<?php
endif;
unset($power,$result);
$power=array( //权限
'Member-review',
);
$result=doMenuPower($power,$authlist); //权限判断处理
if($result['first']):
?>
<li>
<a href="<{:U('Member/review')}>" style=" cursor:pointer;" target="main" ppAttr="Member_review"><i class="icon icon3 fl"></i><span class="fl">资料审核</span></a>
</li>
<?php
endif;
unset($power,$result);
$power=array( //权限
'Member-applylist',
);
$result=doMenuPower($power,$authlist); //权限判断处理
if($result['first']):
?>
<li>
<a href="<{:U('Member/applylist')}>" style=" cursor:pointer;" target="main" ppAttr="Member_applylist"><i class="icon icon4 fl"></i><span class="fl">资料填报</span></a>
</li>
<?php
endif;
unset($power,$result);
$power=array( //权限
'Maillist-index',
);
$result=doMenuPower($power,$authlist); //权限判断处理
if($result['first']):
?>
<li>
<a href="<{:U('Maillist/index')}>" style=" cursor:pointer;" target="main" ppAttr="Maillist_index"><i class="icon icon5 fl"></i><span class="fl">通讯录</span></a>
</li>
<?php
endif;
unset($power,$result);
$power=array( //权限
'Article-index',
);
$result=doMenuPower($power,$authlist); //权限判断处理
if($result['first']):
?>
<li>
<a href="<{:U('Article/index')}>" style=" cursor:pointer;" target="main" ppAttr="Article_index"><i class="icon icon6 fl"></i><span class="fl">通知公告</span></a>
</li>
<?php
endif;
unset($power,$result);
$power=array( //权限
'Webuser-index',
);
$result=doMenuPower($power,$authlist); //权限判断处理
if($result['first']):
?>
<li>
<a href="<{:U('Webuser/index')}>" style=" cursor:pointer;" target="main" ppAttr="Webuser_index"><i class="icon icon7 fl"></i><span class="fl">用户列表</span></a>
</li>
<?php
/*endif;
unset($power,$result);
$power=array( //权限
'Member-index',
'Member-editpass',
);
$result=doMenuPower($power,$authlist); //权限判断处理
if($result['first']):*/
?>
<!-- <li>
<a href="javascript:void(0);"><i class="icon icon8 fl"></i><span class="fl">个人信息管理</span></a>
<ul class="ul" style="display:block;">
<li>
<?php if($result['second'][0]):?><a href="<{:U('Member/index')}>" target="main" ppAttr="Member_index">个人信息</a><?php endif;?>
<?php if($result['second'][1]):?><a href="<{:U('Member/editpass')}>" target="main" ppAttr="Member_editpass">修改密码</a><?php endif;?>
</li>
</ul>
</li> -->
<?php
endif;
unset($power,$result);
?>
</ul>
</div>
</body>
</html>
<script type="text/javascript" src="__ROOTPUB__js/jquery-1.9.1.min.js"></script>
<script>
$(".slide_left>ul li>a").hover(function(){
$(this).addClass("hover").find("i").css("background-position","-20px 0");
},function(){
$(this).removeClass("hover").find("i").css("background-position","0 0");
});
$(".slide_left>ul li").click(function(event) {
$(this).children(".ul").css('display','block');
});
</script>
\ No newline at end of file \ No newline at end of file
<div class="top_nav">
<div class="top_nav_center">
<div class="nav">
<ul id="ppAdd">
<volist name="head_top" id="topv">
<li>
<a id="<{$topv['name']}>" target="main" href="<{:U('Member/retrieval',array('name'=>$topv['name']))}>" <eq name="key" value="10"> class="br0" </eq>><{$topv.description}></a>
</li>
</volist>
<!-- <li>
<a href="" class="active" class="br0">设施联通</a>
</li> -->
</ul>
</div>
</div>
</div>
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
</head>
<body style="margin: 0px 0px;min-height:500px; background:url(__ROOTPUB__img/ybbf.png) center no-repeat;background-size:contain;background-position:200px 150px;">
<div style="margin:0 auto; width:98%;">
<form name="form" action="" method="post">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="2" style="padding-left:10px;">
<div style="float:left">
<b>添加<{$page_title}></b>
</div>
<div style="float:right">
[<a href="<{:U('index')}>"><u>返回列表</u></a>]
</div>
</td>
</tr>
<tr>
<td align="right" class="bline w_p_25" style="padding-left:10px; text-align:right"><font color="red">部门:</font></td>
<td class="bline">
<select name="pid">
<option value="">请选择部门</option>
<volist name="depart" id="v">
<option value="<{$v.id}>"><{$v.name}></option>
</volist>
</select>
</td>
</tr>
<tr>
<td align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">姓名:</font></td>
<td class="bline"><input name="name" type="text" size="30" class="iptxt" value=""></td>
</tr>
<tr>
<td align="right" class="bline" style="padding-left:10px; text-align:right">手机:</td>
<td class="bline"><input name="mobile" type="text" value=""></td>
</tr>
<tr>
<td align="right" class="bline" style="padding-left:10px; text-align:right">座机:</td>
<td class="bline"><input name="tel" type="text" value=""></td>
</tr>
<tr>
<td align="right" class="bline" style="padding-left:10px; text-align:right">Email:</td>
<td class="bline"><input name="email" type="text" value=""></td>
</tr>
<tr><td colspan="2" class="pad_left_p_25">
<input name="domain" type="submit" style=" background:url(__PUB__img/button_save.gif); width:60px; height:22px; border:0" value=" ">
&nbsp;&nbsp;&nbsp;<a href="javascript:history.go(-1);"><img src="__PUB__img/button_back.gif" width="60" height="22" border="0"></a></td></tr>
</tbody></table>
</form>
</div>
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
</head>
<body style="margin: 0px 0px;min-height:500px; background:url(__ROOTPUB__img/ybbf.png) center no-repeat;background-size:contain;background-position:200px 150px;">
<div style="margin:0 auto; width:98%;">
<form name="form" action="" method="post">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="2" style="padding-left:10px;">
<div style="float:left">
<b>添加<{$page_title}></b>
</div>
<div style="float:right">
[<a href="<{:U('department')}>"><u>返回列表</u></a>]
</div>
</td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; width:30%; text-align:right;"><font color="red">部门名称:</font></td>
<td class="bline"><input name="name" type="text" id="username" size="30" class="iptxt"></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">部门名称首字母:</font></td>
<td class="bline"><input name="firstname" type="text" id="firstname" size="30" class="iptxt"></td>
</tr>
<tr><td colspan="2" style="text-align:center">
<input name="domain" type="submit" style=" background:url(__PUB__img/button_save.gif); width:60px; height:22px; border:0" value=" ">
&nbsp;&nbsp;&nbsp;<a href="javascript:history.go(-1);"><img src="__PUB__img/button_back.gif" width="60" height="22" border="0"></a></td></tr>
</tbody></table>
<input type="hidden" name="p" value="<{$p}>">
</form>
</div>
<script>
$(function(){
$(':input[name="name"]').blur(function(){
var n=$(this).val();
var param={name:n};
$.get('<{:U("ajaxname")}>',param,function(data){
if(data && typeof(data) == 'string'){
$(':input[name="firstname"]').val(data);
$(':input[name="firstname"]').attr('readonly',true
);
}else{
$(':input[name="firstname"]').removeAttr('readonly');
}
});
});
$(':input[name="firstname"]').blur(function(){
var va=$(this).val();
va=va.toUpperCase();
$(this).val(va);
});
});
</script>
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<!-- saved from url=(0050)http://localhost/cms/index.php/admin/Article/index -->
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>列表|后台管理系统</title>
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<style>
.search{padding:0px 8px 15px; clear:both; text-align:right;}
.search .w_160{width:160px;}
.search form{padding:0; margin:0;}
</style>
</head>
<body style="margin: 0px 0px;min-height:500px; background:url(__ROOTPUB__img/ybbf.png) center no-repeat;background-size:contain;background-position:200px 150px;">
<div style="margin:0 auto; width:98%;">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="4" style="padding-left:10px;">
<div style="overflow:hidden">
<div style="float:left">
<b><{$page_title}></b>
<div style="float:right; font-weight:bold;">
<?php if(in_array('maillist-add_depart',$authlist)):?>
<a href="<{:U('add_depart',array('p'=>I('p',1,'intval')))}>">添加部门</a>
<?php endif;?>
</div>
</div>
<div class="search">
<form action="<{:U(ACTION_NAME)}>" method="post">
<input type="text" name="title" value="<{$search.title}>" placeholder="请输入部门名称" class="w_160" />
<input type="submit" value="搜 索" class="btn" /> <input type="button" value="清除搜索" onclick='window.location.href="<{:U($Think.ACTION_NAME)}>"' class="btn"/>
</form>
</div>
</td>
</tr>
<form action="<{:U('form')}>" method="post">
<tr align="center">
<td style="text-align:center; width:10%">序号</td>
<td style="text-align:center; width:40%;">部门名称</td>
<td style="text-align:center; width:20%;">录入时间</td>
<?php if(in_array('maillist-edit_depart',$authlist) || in_array('maillist-del_depart',$authlist)):?>
<td style="text-align:center; width:30%;">审核操作</td>
<?php endif;?>
</tr>
<volist name="list" id="vo" empty="$empty" key="ii">
<tr style="text-align:center;">
<td style="text-align:center;"><{$ii}></td>
<td style="text-align:center;"><{$vo.name}></td>
<td style="text-align:center;"><{$vo.addtime|date='Y-m-d',###}></td>
<?php if(in_array('maillist-edit_depart',$authlist) || in_array('maillist-del_depart',$authlist)):?>
<td style="text-align:center;">
<?php if(in_array('maillist-edit_depart',$authlist)):?>
<a href="<{:U('edit_depart',array('id'=>$vo['id'],'p'=>I('p',1,'intval')))}>" class="btn btn-mini"><i class="icon-edit"></i> 修改</a>
<?php endif;?>
<?php if(in_array('maillist-del_depart',$authlist)):?>
<a href="javascript:void(0);" onclick="del2('<{:U('del_depart',array('id'=>$vo['id'],'p'=>I('p',1,'intval')))}>','确定要删除信息吗?删除后无法恢复');" class="btn btn-mini"><i class="icon-remove"></i> 删除</a>
<?php endif;?>
</td>
<?php endif;?>
</tr>
</volist>
</form>
<notempty name="page">
<tr>
<td colspan="4">
<ul class="page">
<{$page}>
</ul>
</td>
</tr>
</notempty>
</tbody>
</table>
</div>
</body></html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
</head>
<body style="margin: 0px 0px;min-height:500px; background:url(__ROOTPUB__img/ybbf.png) center no-repeat;background-size:contain;background-position:200px 150px;">
<div style="margin:0 auto; width:98%;">
<form name="form" action="" method="post">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="2" style="padding-left:10px;">
<div style="float:left">
<b>修改<{$page_title}></b>
</div>
<div style="float:right">
[<a href="<{:U('index')}>"><u>返回列表</u></a>]
</div>
</td>
</tr>
<tr>
<td align="right" class="bline w_p_25" style="padding-left:10px; text-align:right"><font color="red">部门:</font></td>
<td class="bline">
<select name="pid">
<option value="">请选择部门</option>
<volist name="depart" id="v">
<option value="<{$v.id}>" <eq name="v['id']" value="$data['pid']">selected="selected"</eq>><{$v.name}></option>
</volist>
</select>
</td>
</tr>
<tr>
<td align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">姓名:</font></td>
<td class="bline"><input name="name" type="text" size="30" class="iptxt" value="<{$data.name}>"></td>
</tr>
<tr>
<td align="right" class="bline" style="padding-left:10px; text-align:right">手机:</td>
<td class="bline"><input name="mobile" type="text" value="<{$data.mobile}>"></td>
</tr>
<tr>
<td align="right" class="bline" style="padding-left:10px; text-align:right">座机:</td>
<td class="bline"><input name="tel" type="text" value="<{$data.tel}>"></td>
</tr>
<tr>
<td align="right" class="bline" style="padding-left:10px; text-align:right">Email:</td>
<td class="bline"><input name="email" type="text" value="<{$data.email}>"></td>
</tr>
<tr><td colspan="2" class="pad_left_p_25">
<input name="id" type="hidden" id="id" size="30" class="iptxt" value="<{$data.id}>">
<input name="domain" type="submit" style=" background:url(__PUB__img/button_save.gif); width:60px; height:22px; border:0" value=" ">
&nbsp;&nbsp;&nbsp;<a href="javascript:history.go(-1);"><img src="__PUB__img/button_back.gif" width="60" height="22" border="0"></a></td></tr>
</tbody></table>
<input type="hidden" name="p" value="<{$p|default=1}>" />
</form>
</div>
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
</head>
<body style="margin: 0px 0px;min-height:500px; background:url(__ROOTPUB__img/ybbf.png) center no-repeat;background-size:contain;background-position:200px 150px;">
<div style="margin:0 auto; width:98%;">
<form name="form" action="" method="post">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="2" style="padding-left:10px;">
<div style="float:left">
<b>修改<{$page_title}></b>
</div>
<div style="float:right">
[<a href="<{:U('department')}>"><u>返回列表</u></a>]
</div>
</td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">部门名称:</font></td>
<td class="bline"><input name="name" type="text" size="30" class="iptxt" value="<{$data.name}>"></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">部门名称首字母:</font></td>
<td class="bline"><input name="firstname" type="text" id="firstname" size="30" class="iptxt" value="<{$data.firstname}>"></td>
</tr>
<tr><td colspan="2" style="text-align:center">
<input name="id" type="hidden" id="id" size="30" class="iptxt" value="<{$data.id}>">
<input name="domain" type="submit" style=" background:url(__PUB__img/button_save.gif); width:60px; height:22px; border:0" value=" ">
&nbsp;&nbsp;&nbsp;<a href="javascript:history.go(-1);"><img src="__PUB__img/button_back.gif" width="60" height="22" border="0"></a></td></tr>
</tbody></table>
<input type="hidden" name="p" value="<{$p}>" />
</form>
</div>
<script>
$(function(){
$(':input[name="name"]').blur(function(){
var n=$(this).val();
var param={name:n};
$.get('<{:U("ajaxname")}>',param,function(data){
if(data && typeof(data) == 'string'){
$(':input[name="firstname"]').val(data);
$(':input[name="firstname"]').attr('readonly',true
);
}else{
$(':input[name="firstname"]').removeAttr('readonly');
}
});
});
$(':input[name="firstname"]').blur(function(){
var va=$(this).val();
va=va.toUpperCase();
$(this).val(va);
});
});
</script>
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>管理员|后台管理系统</title>
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<script>
/* 修改信息属性 */
function chang_status(id,value,table,f)
{
var newvalue=0;
if(value == 1)
newvalue=0;
else
newvalue=1;
var submitData = {
id:id,
f:f,
status:newvalue,
table:table
};
$.post("<{:U('editattr')}>",submitData,
function(data) {
if (data.success == true) {
alert(data.msg);
setTimeout('window.location.href=location.href',10);
return;
}
else {
alert(data.msg);
return;
}
}
,'json');
}
</script>
<style>
.search {
padding:0px 8px 15px;
clear:both;
text-align:right;
}
.search .w_160 {
width:160px;
}
.search form {
padding:0;
margin:0;
}
</style>
</head>
<body style="margin: 0px 0px;min-height:500px; background:url(__ROOTPUB__img/ybbf.png) center no-repeat;background-size:contain;background-position:200px 150px;">
<div style="margin:0 auto; width:98%;">
<table class="table table-condensed table-bordered table-hover">
<tbody>
<tr>
<td colspan="4" style="padding-left:10px;"><div style="overflow:hidden">
<div style="float:left"> <b><{$page_title}>列表</b> </div>
<div style="float:right; font-weight:bold;"></div>
</div>
<div class="search">
<form action="<{:U(ACTION_NAME)}>" method="post">
<input type="text" name="title" value="<{$search.title}>" placeholder="请输入姓名" class="w_160" />
<input type="submit" value="搜 索" class="btn" />
<input type="button" value="清除搜索" onclick='window.location.href="<{:U($Think.ACTION_NAME)}>"' class="btn"/>
<?php if(in_array('maillist-download',$authlist)):?><input type="button" value="导出EXCEL" onclick='window.open("<{:U('download')}>
");' class="btn" /><?php endif;?>
</form>
</div></td>
</tr>
<tr>
<td style="text-align:center; width:10%;">序号</td>
<td style="text-align:center; width:15%;">姓名</td>
<td style="text-align:center; width:15%;">手机</td>
<td style="text-align:center; width:15%;">Email</td>
</tr>
<volist name="list" id="vo" key="k" empty="$empty">
<tr>
<td style="text-align:center"><{$k}></td>
<td style="text-align:center"><{$vo.name}></td>
<td style="text-align:center"><{$vo.tel}></td>
<td style="text-align:center"><{$vo.email}></td>
</tr>
</volist>
<notempty name="page">
<tr>
<td colspan="7">
<ul class="page">
<{$page}>
</ul>
</td>
</tr>
</notempty>
</tbody>
</table>
</div>
<include file="Common:js" />
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<link rel="stylesheet" type="text/css" href="__ROOTPUB__css/reg.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<script type="text/javascript" src="__PUB__js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<!-- manifest -->
<link rel="stylesheet" href="__PUB__js/manifest/styles.css">
<script src="__PUB__js/manifest/jquery.ui.widget.min.js"></script>
<script src="__PUB__js/manifest/jquery.manifest.js"></script>
<!-- end -->
<script src="__ROOTPUB__js/distpicker.data.js"></script>
<script src="__ROOTPUB__js/distpicker.js"></script>
<link rel="stylesheet" href="__ROOTPUB__kindeditor/themes/default/default.css" />
<script charset="utf-8" src="__ROOTPUB__kindeditor/kindeditor-min.js"></script>
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<style type="text/css">
table td span a{padding:0 6px; font-size:23px; font-weight:bold; text-decoration:none; cursor:pointer;}
</style>
</head>
<body style="margin: 0px 0px;min-height:500px; background:url(__ROOTPUB__img/ybbf.png) center no-repeat;background-size:contain;background-position:200px 150px;height:790px;">
<div style="margin:0 auto; width:98%;">
<form name="form" action="" method="post">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="4" style="padding-left:10px;">
<div style="float:left">
<b><{$page_title}></b>
</div>
<div style="float:right">
[<a href="javascript:history.go(-1);"><u>返回列表</u></a>]
</div>
</td>
</tr>
<tr>
<?php
$ii = 1;
foreach($field as $k => $v){
if($regfields[$v]['note']){
$note = '<span class="app_note"> ('.$regfields[$v]['note'].')</span>';
}
if($regfields[$v]['required']==1){ //必填
$req= '<span class="pp_req">*</span> ';
}
if($regfields[$v]['fline'] == 2){ //占用整行
echo $ii == 1?'':'</tr><tr>';
echo '<td style="text-align:right; font-weight:bold;" width="10%" >'.$req;
echo $regfields[$v]['description'].':</td><td colspan="3">';
echo checkApply($regfields[$v]['type'],$regfields[$v]['name'],array('val'=>$regfields[$v]['d_value'],'row'=>$regfields[$v]['rownum'],'col'=>$regfields[$v]['colnum'],'ctitle'=>$regfields[$v]['ctitle']),$regfields[$v]['isdate'],$regfields[$v]['upfile'],$data[$v],$regfields[$v]['istags'],$regfields[$v]['isjs']);
echo $note.'</td></tr><tr>';
$ii = 1;
}else{
echo '<td style="text-align:right; font-weight:bold;" width="10%">'.$req;
echo $regfields[$v]['description'].':</td><td width="40%">';
echo checkApply($regfields[$v]['type'],$regfields[$v]['name'],array('val'=>$regfields[$v]['d_value'],'row'=>$regfields[$v]['rownum'],'col'=>$regfields[$v]['colnum'],'ctitle'=>$regfields[$v]['ctitle']),$regfields[$v]['isdate'],$regfields[$v]['upfile'],$data[$v],$regfields[$v]['istags'],$regfields[$v]['isjs']);
echo $note.'</td>';
if($ii == 2 && $k != (count($field)-1)){
echo '</tr><tr>';
$ii = 1;
}else{
$ii++;
}
}
unset($note,$req);
}
?>
</tr>
<tr>
<td colspan="4" style=" text-align:center">
<input type="hidden" name="id" value="<{$app_data.id}>" />
<input type="submit" value="确认填报" />
</td>
</tr>
</tbody></table>
<input type="hidden" name="p" value="<{$p|default=1}>" />
</form>
</div>
</body>
<include file="Common:js2" />
</html>
<!DOCTYPE html>
<!-- saved from url=(0050)http://localhost/cms/index.php/admin/Article/index -->
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>列表|后台管理系统</title>
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<script>
$(document).ready(function(){
$("#SelectAll").click(function(){
$("input[name='check[]']").checkCbx();
});
$(".YanZheng").click(function(event){
var a=$("input:checked").length;
if(a==0){
alert('您还没有请选择操作内容!');
event.preventDefault();
}
});
$(".pp_ok").click(function(){
if(confirm('确定修改审核状态吗?')){
changeIsshow($(this));
}
});
});
function changeIsshow(a){
var aid=a.attr('attr_id');
var aval=a.attr('attr_val');
var validate={
'id':aid, //信息id
'val':aval, //信息审核值
};
$.post("<{:U('Shenhe')}>",validate,function(data){
if(data.success){
a.parent().siblings('.review').html(data['status']);
if(data.val == 2){
location.reload();
}
}else{
alert(data['msg']);
}
},'json');
}
$.fn.checkCbx = function(){
return this.each(function(){
this.checked = !this.checked;
});
}
</script>
<style>
.search{padding:0px 8px 15px; clear:both; text-align:right;}
.search .w_160{width:160px;}
.search form{padding:0; margin:0;}
</style>
</head>
<body style="margin: 0px 0px;min-height:500px; background:url(__ROOTPUB__img/ybbf.png) center no-repeat;background-size:contain;background-position:200px 150px;">
<div style="margin:0 auto; width:98%;">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="<{$colnum}>" style="padding-left:10px;">
<div style="overflow:hidden">
<div style="float:left">
<b><{$page_title}></b>
</div>
<div style="float:right; font-weight:bold;"><?php if(in_array('member-apply',$memberList)):?><a href="<{:U('apply')}>"><u>新增资料填报</u></a><?php endif;?>
 </div>
</div>
<div class="search">
<form action="<{:U(ACTION_NAME)}>" method="post">
<input type="text" name="title" value="<{$search.title}>" placeholder="请输入报告名称" class="w_160" />
<select name="status" class="w_160">
<option value="">请选择审核状态</option>
<option value="0" <eq name="search.status" value="0">selected</eq>>未审核</option>
<option value="1" <eq name="search.status" value="1">selected</eq>>审核不通过</option>
</select>
<input type="submit" value="搜 索" class="btn" /> <input type="button" value="清除搜索" onclick='window.location.href="<{:U($Think.ACTION_NAME)}>"' class="btn"/><!-- <input type="button" value="导出EXCEL" onclick='window.location.href="<{:U('checkField')}>"' class="btn"/> -->
</form>
</div>
</td>
</tr>
<form action="<{:U('form')}>" method="post">
<tr align="center">
<td width="30" style="text-align:center;">序号</td>
<volist name="field" id="v">
<td <notempty name="regfields[$v]['width1']">width="<{$regfields[$v]['width1']}>"</notempty> style="text-align:center;"><{$regfields[$v]['description']}></td>
</volist>
<td width="80" style="text-align:center;">录入时间</td>
<td width="50" style="text-align:center;">审核状态</td>
<?php if(in_array('member-look',$memberList) || in_array('member-edit',$memberList)):?>
<td style="text-align:center; width:15%;">操作</td>
<?php endif;?>
</tr>
<volist name="list" id="vo" empty="$empty" key="ii">
<tr style="text-align:center;">
<td nowrap="" style="text-align:center;"><{$ii}></td>
<volist name="field" id="v">
<td style="text-align:center;">
<if condition="($regfields[$v]['upfile'] eq 1) AND ($vo[$v])">
<img src="<{$vo[$v]}>" style=" max-width:80px; ">
<elseif condition="($regfields[$v]['upfile'] eq 2) AND ($vo[$v])" />
<a href="<{$vo[$v]}>" target="_blank">下载文件</a>
<elseif condition="($regfields[$v]['istags'] eq '1') or ($regfields[$v]['type'] eq 'c_heckbox')" />
<{$vo[$v]|trim=','}>
<else/>
<{$vo[$v]}>
</if>
</td>
</volist>
<td style="text-align:center;"><{$vo.addtime|date='Y-m-d',###}></td>
<td style="text-align:center;" class="review">
<?php
if($vo['isshow']==1):
?>
审核通过
<?php
elseif($vo['status']==1):
?>
<span style="color:red">审核不通过</span>
<?php
elseif((int)$dengji == (int)$vo['isshow']):
?>
<span style="color:red">未审核</span>
<?php
else:
?>
<span style="color:red">审核中</span>
<?php endif;?>
</td>
<?php if(in_array('member-look',$memberList) || in_array('member-edit',$memberList)):?>
<td style="text-align:center;">
<?php if(in_array('member-look',$memberList)):?>
<a href="<{:U('look',array('id'=>$vo['id']))}>" class="btn btn-mini"><i class="icon-look"></i> 预览</a>
<?php endif;?>
<?php if(in_array('member-edit',$memberList)):?>
<a href="<{:U('edit',array('id'=>$vo['id']))}>" class="btn btn-mini"><i class="icon-edit"></i> 修改</a>
<?php endif;?>
</td>
<?php endif;?>
</tr>
</volist>
</form>
<notempty name="page">
<tr>
<td colspan="<{$colnum}>">
<ul class="page">
<{$page}>
</ul>
</td>
</tr>
</notempty>
</tbody>
</table>
</div>
<include file="Common:js" />
</body></html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>列表|后台管理系统</title>
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<style>
#colid1 {
font-family: "宋体";
}
.table tr td{line-height:150% !important;}
.bline span{display:inline-block;padding:5px 0; width:22%; padding-right:3%; vertical-align: top;}
.bline span.cle_right{padding-right:0;}
</style>
</head>
<body style="margin: 0px 0px;min-height:500px; background:url(__ROOTPUB__img/ybbf.png) center no-repeat;background-size:contain;background-position:200px 150px;">
<div style="margin:0 auto; width:98%;">
<form action="<{:U('download')}>" method="post" target="_blank">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="12" style="padding-left:10px;">
<div style="padding-top:10px; overflow:hidden">
<div style="float:left;">
<b><{$web_title}></b>
</div>
<div style="float:right">[<a href="<{:U($action)}>">返回列表</a>]</div>
</div>
</td>
</tr>
<tr>
<td style="text-align:right; width:10%;"><font color="red">请选择下载信息:</font></td>
<td class="bline">
<div style="padding-top:8px;"><button type="button" name="all" class="btn btn-mini" style="font-weight:bold;">全  选</button> <button type="button" name="invert" class="btn btn-mini" style="font-weight:bold;">反  选</button> <button name="cancel" type="button" class="btn btn-mini" style="font-weight:bold;">取消全选</button>
</div>
<php>$empty="暂无相关信息";</php>
<volist name="info" id="vo" key="k" empty="$empty" mod="4">
<span <eq name="mod" value="3">class="cle_right"</eq>><input type="checkbox" name="field[]" value="<{$vo.name}>" /> <{$vo.description}></span>
</volist>
</td>
</tr>
<tr>
<td colspan="2" style="text-align:center">
<input type="hidden" name="ppaction" value="<{$ppaction}>" />
<input type="hidden" name="pp_search" value="<{$pp_search}>" />
<input name="domain" type="submit" class="btn btn-mini" style="line-height:25px; font-weight:bold;" value="点击下载"> &nbsp;&nbsp;&nbsp;<input type="button" class="btn btn-mini" value="返 回" style="line-height:25px;font-weight:bold" onclick="javascript:history.back();" />
</td>
</tr>
</tbody>
</table>
<input type="hidden" name="action" value="<{$action}>" />
</form>
</div>
</body>
</html>
<script>
$(function(){
$(':input[name="all"]').click(function(){
$(this).parent('div').siblings('span').children(':input[name="field[]"]').prop('checked',true);
});
$(':input[name="invert"]').click(function(){
$(this).parent('div').siblings('span').children(':input[name="field[]"]').each(function(){
$(this).prop('checked',!$(this).prop('checked'));
});
});
$(':input[name="cancel"]').click(function(){
$(this).parent('div').siblings('span').children(':input[name="field[]"]').prop('checked',false);
});
$(':input[type="submit"]').click(function(){
var len=$(':input[name="field[]"]:checked').length;
if(len == 0){
alert('请选择下载信息');
return false;
}
});
});
</script>
<script>
//ajax备选
function ppdo(dourl,num){
$.get(dourl,'',function(data){
if(data['suc']){
$('a[attrid="pp'+num+'"]').removeAttr('onclick').html('<i class="icon-edit"></i> '+data['name']);
$('a[attrid="pp'+num+'"]').parent('td').prev('td').html(data['name']);
}else{
alert(data['info']);
history.back();
}
},'json');
};
</script>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<link rel="stylesheet" type="text/css" href="__ROOTPUB__css/reg.css">
<script type="text/javascript" src="__PUB__js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<!-- manifest -->
<link rel="stylesheet" href="__PUB__js/manifest/styles.css">
<script src="__PUB__js/manifest/jquery.ui.widget.min.js"></script>
<script src="__PUB__js/manifest/jquery.manifest.js"></script>
<!-- end -->
<script src="__ROOTPUB__js/distpicker.data.js"></script>
<script src="__ROOTPUB__js/distpicker.js"></script>
<link rel="stylesheet" href="__ROOTPUB__kindeditor/themes/default/default.css" />
<script charset="utf-8" src="__ROOTPUB__kindeditor/kindeditor-min.js"></script>
<style type="text/css">
table td span a{padding:0 6px; font-size:23px; font-weight:bold; text-decoration:none; cursor:pointer;}
</style>
</head>
<body style="margin: 0px 0px;min-height:500px; background:url(__ROOTPUB__img/ybbf.png) center no-repeat;background-size:contain;background-position:200px 150px;">
<div style="margin:0 auto; width:98%;">
<form name="form" action="" method="post">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="4" style="padding-left:10px;">
<div style="float:left">
<b><{$page_title}></b>
</div>
<div style="float:right">
[<a href="javascript:history.go(-1);"><u>返回列表</u></a>]
</div>
</td>
</tr>
<tr>
<?php
$ii = 1;
foreach($field as $k => $v){
if($v=='status'){ continue;}
if($regfields[$v]['note']){
$note = '<span class="app_note"> ('.$regfields[$v]['note'].')</span>';
}if($regfields[$v]['required']==1){ //必填
$req= '<span class="pp_req">*</span> ';
}
if($regfields[$v]['fline'] == 2){ //占用整行
echo $ii == 1?'':'</tr><tr>';
echo '<td style="text-align:right; font-weight:bold;" width="10%" >'.$req;
echo $regfields[$v]['description'].':</td><td colspan="3">';
echo checkApply($regfields[$v]['type'],$regfields[$v]['name'],array('val'=>$regfields[$v]['d_value'],'row'=>$regfields[$v]['rownum'],'col'=>$regfields[$v]['colnum'],'ctitle'=>$regfields[$v]['ctitle']),$regfields[$v]['isdate'],$regfields[$v]['upfile'],$data[$v],$regfields[$v]['istags'],$regfields[$v]['isjs']);
echo $note.'</td></tr><tr>';
$ii = 1;
}else{
echo '<td style="text-align:right; font-weight:bold;" width="10%">'.$req;
echo $regfields[$v]['description'].':</td><td width="40%">';
echo checkApply($regfields[$v]['type'],$regfields[$v]['name'],array('val'=>$regfields[$v]['d_value'],'row'=>$regfields[$v]['rownum'],'col'=>$regfields[$v]['colnum'],'ctitle'=>$regfields[$v]['ctitle']),$regfields[$v]['isdate'],$regfields[$v]['upfile'],$data[$v],$regfields[$v]['istags'],$regfields[$v]['isjs']);
echo $note.'</td>';
if($ii == 2 && $k != (count($field)-1)){
echo '</tr><tr>';
$ii = 1;
}else{
$ii++;
}
}
unset($note,$req);
}
?>
</tr>
<tr>
<td style="text-align:right; font-weight:bold;">审核状态:</td><td colspan="3" >
<if condition="$data['status'] eq 2">审核通过<elseif condition="$data['status'] eq 1" /><span style="color:red">审核不通过</span><else /><span style="color:red">未审核</span></if>
</td>
</tr>
<tr>
<td colspan="4" style=" text-align:center">
<input type="hidden" name="id" value="<{$id}>" />
<input type="submit" value="提交修改" /> <input type="reset" value="重 置" />
</td>
</tr>
</tbody></table>
<input type="hidden" name="p" value="<{$p|default=1}>" />
</form>
</div>
</body>
<include file="Common:js2" />
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
</head>
<body style="margin: 0px 0px;min-height:500px; background:url(__ROOTPUB__img/ybbf.png) center no-repeat;background-size:contain;background-position:200px 150px;">
<div style="margin:0 auto; width:98%;">
<form name="form" action="<{:U(ACTION_NAME)}>" method="post">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="2" style="padding-left:10px;">
<div style="float:left">
<b>修改密码</b>
</div>
</td>
</tr>
<tr>
<td align="right" class="bline" style="padding-left:10px; text-align:right; width:15%">原始密码:</td>
<td class="bline"><input name="oldpass" type="password" id="oldpass" size="30" class="iptxt" placeholder="原始密码"></td>
</tr>
<tr>
<td align="right" class="bline" style="padding-left:10px; text-align:right">新 密 码:</td>
<td class="bline"><input name="password" type="password" id="password" size="30" class="iptxt" value="" placeholder="新密码"></td>
</tr>
<tr>
<td align="right" class="bline" style="padding-left:10px; text-align:right">确认密码:</td>
<td class="bline"><input name="password2" type="password" id="password2" size="30" class="iptxt" value="" placeholder="确认密码"></td>
</tr>
<tr>
<td colspan="2" style="padding-left:15%;"><input type="submit" class="btn" value="提 交" /></td>
</tr>
</tbody></table>
</form>
</div>
<include file="Common:js" />
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><{:C('title')}></title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
</head>
<body style="margin: 0px 0px;min-height:500px; background:url(__ROOTPUB__img/ybbf.png) center no-repeat;background-size:contain;background-position:200px 150px;">
<div style="margin:0 auto; width:98%;">
<table class="table table-condensed table-bordered table-hover">
<tbody>
<tr>
<td colspan="2" style="padding-left:10px;">
<div style="float:left">
<b>个人信息管理</b>
</div>
</td>
</tr>
<tr>
<td align="right" class="bline" style="padding-left:10px; text-align:right; width:15%;">登录账号:</td>
<td class="bline"><{$info.username}></td>
</tr>
<tr>
<td align="right" class="bline" style="padding-left:10px; text-align:right">姓名:</td>
<td class="bline"><{$info.name}></td>
</tr>
<tr>
<td align="right" class="bline" style="padding-left:10px; text-align:right">电话:</td>
<td class="bline"><{$info.tel}></td>
</tr>
<tr>
<td align="right" class="bline" style="padding-left:10px; text-align:right">邮箱:</td>
<td class="bline"><{$info.email}></td>
</tr>
<tr>
<td colspan="2" style="padding-left:15%"><button class="btn" onclick="location.href='<{:U('memedit')}>'">点击修改</button></td>
</tr>
</tbody>
</table>
</div>
<include file="Common:js" />
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<link rel="stylesheet" type="text/css" href="__ROOTPUB__css/reg.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<style>
table tr td{padding:0 5px; line-height:31px !important;}
.table{border-collapse: collapse; width:100%; }
.upimg{display: inline-block;}
.upimg img{ max-height:25px;}
</style>
<script type="text/javascript" src="__PUB__js/layer2/layer.js"></script>
<script>
/*layer.config({
extend: 'extend/layer.ext.js',
shift: 0, //默认动画风格
// skin: 'layui-layer-molv' //默认皮肤
});
layer.ready(function(){
layer.photos({
photos: '.upimg'
});
});*/
$(function(){
$(".upimg").each(function(){
$(this).click(function(){
layer.open({
title:' ',
type: 1,
shadeClose: true,
area: ['70%','90%'], //宽高
content: '<img src="'+$(this).children('img').attr('src')+'" style="display:block; margin:0 auto; max-width:100%;" />',
});
});
});
$(".pdf").each(function(){
$(this).click(function(){
layer.open({
title:'',
type: 2,
shadeClose: true,
area: ['90%','90%'], //宽高
content: 'http://<{$Think.server.SERVER_NAME}><{:U("Public/pdf",'','')}>/pp/'+Math.random()+'/pdfval/'+$(this).attr('pdfval'),
});
});
});
});
</script>
</head>
<body style="margin: 0px 0px;min-height:500px; background:url(__ROOTPUB__img/ybbf.png) center no-repeat;background-size:contain;background-position:200px 150px;">
<div style="margin:0 auto; width:98%;">
<form name="form" action="" method="post">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="4" style="padding-left:10px;">
<div style="float:left">
<b><{$page_title}></b>
</div>
<div style="float:right">
[<a href="javascript:history.go(-1);"><u>返回列表</u></a>]
</div>
</td>
</tr>
<tr>
<?php
$ii = 1;
foreach($field as $k => $v){
if($v=='status'){ continue;}
if($regfields[$v]['istags'] == 1 || $regfields[$v]['type'] == 'c_heckbox'){ //标签 多选框去掉两边多余的,
$data[$v] = trim($data[$v],',');
}
if($regfields[$v]['required']==1){ //必填
$req= '<span class="pp_req">*</span> ';
}
if($regfields[$v]['fline'] == 2){ //占用整行
echo $ii == 1?'':'</tr><tr>';
echo '<td style="text-align:right; font-weight:bold;" width="10%">'.$req;
echo $regfields[$v]['description'].':</td><td colspan="3">';
echo checkApply2($regfields[$v]['type'],$regfields[$v]['name'],array('val'=>$regfields[$v]['d_value'],'row'=>$regfields[$v]['rownum'],'col'=>$regfields[$v]['colnum'],'ctitle'=>$regfields[$v]['ctitle']),$regfields[$v]['isdate'],$data[$v],$regfields[$v]['upfile']);
echo '</td></tr><tr>';
$ii = 1;
}else{
echo '<td style="text-align:right; font-weight:bold;" width="10%">'.$req;
echo $regfields[$v]['description'].':</td><td width="40%">';
echo checkApply2($regfields[$v]['type'],$regfields[$v]['name'],array('val'=>$regfields[$v]['d_value'],'row'=>$regfields[$v]['rownum'],'col'=>$regfields[$v]['colnum'],'ctitle'=>$regfields[$v]['ctitle']),$regfields[$v]['isdate'],$data[$v],$regfields[$v]['upfile']);
echo '</td>';
if($ii == 2 && $k != (count($field)-1)){
echo '</tr><tr>';
$ii = 1;
}else{
$ii++;
}
}
unset($req);
}
?>
</tr>
<tr>
<td style="text-align:right; font-weight:bold;">审核状态:</td><td colspan="3" >
<if condition="$data['status'] eq 2">审核通过<elseif condition="$data['status'] eq 1" /><span style="color:red">审核不通过</span><else /><span style="color:red">未审核</span></if>
</td>
</tr>
</tbody></table>
<input type="hidden" name="p" value="<{$p|default=1}>" />
</form>
</div>
</body>
<include file="Common:js2" />
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
</head>
<body style="margin: 0px 0px;min-height:500px; background:url(__ROOTPUB__img/ybbf.png) center no-repeat;background-size:contain;background-position:200px 150px;">
<div style="margin:0 auto; width:98%;">
<form name="form" action="<{:U(ACTION_NAME)}>" method="post">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="2" style="padding-left:10px;">
<div style="float:left">
<b>个人信息修改</b>
</div>
</td>
</tr>
<tr>
<td align="right" class="bline" style="padding-left:10px; text-align:right; width:15%"><font color="red">登录账号:</font></td>
<td class="bline"><input name="username" type="text" id="username" size="30" class="iptxt" readonly="readonly" value="<{$info.username}>"></td>
</tr>
<tr>
<td align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">姓名:</font></td>
<td class="bline"><input name="name" type="text" id="name" size="30" class="iptxt" value="<{$info.name}>"></td>
</tr>
<tr>
<td align="right" class="bline" style="padding-left:10px; text-align:right">电话:</td>
<td class="bline"><input name="tel" type="text" id="tel" size="30" class="iptxt" value="<{$info.tel}>"></td>
</tr>
<tr>
<td align="right" class="bline" style="padding-left:10px; text-align:right">邮箱:</td>
<td class="bline"><input name="email" type="email" id="email" size="30" class="iptxt" value="<{$info.email}>"></td>
</tr>
<tr><td colspan="2" style="padding-left:15%;">
<input type="submit" class="btn" value="提 交" />
&nbsp;&nbsp;&nbsp;<input type="button" onclick="javascript:history.go(-1);" class="btn" value="返 回"></td>
</tr>
</tbody></table>
</form>
</div>
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<!-- saved from url=(0050)http://localhost/cms/index.php/admin/Article/index -->
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>列表|后台管理系统</title>
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<!-- manifest -->
<link rel="stylesheet" href="__PUB__js/manifest/styles.css">
<script src="__PUB__js/manifest/jquery.ui.widget.min.js"></script>
<script src="__PUB__js/manifest/jquery.manifest.js"></script>
<!-- end -->
<script src="__ROOTPUB__js/distpicker.data.js"></script>
<script src="__ROOTPUB__js/distpicker.js"></script>
<script>
$(document).ready(function(){
$("#SelectAll").click(function(){
$("input[name='check[]']").checkCbx();
});
$(".YanZheng").click(function(event){
var a=$("input:checked").length;
if(a==0){
alert('您还没有请选择操作内容!');
event.preventDefault();
}
});
$(".pp_ok").click(function(){
if(confirm('确定修改审核状态吗?')){
changeIsshow($(this));
}
});
});
function changeIsshow(a){
var aid=a.attr('attr_id');
var aval=a.attr('attr_val');
var validate={
'id':aid, //信息id
'val':aval, //信息审核值
};
$.post("<{:U('Shenhe')}>",validate,function(data){
if(data.success){
a.parent().siblings('.review').html(data['status']);
if(data.val == 2){
location.reload();
}
}else{
alert(data['msg']);
}
},'json');
}
$.fn.checkCbx = function(){
return this.each(function(){
this.checked = !this.checked;
});
}
</script>
<style>
.search{padding:0px 8px 15px; clear:both; text-align:right;}
.search .w_160{width:160px;}
.search form{padding:0; margin:0;}
</style>
</head>
<body style="margin: 0px 0px;min-height:500px; background:url(__ROOTPUB__img/ybbf.png) center no-repeat;background-size:contain;background-position:200px 230px;">
<div style="margin:0 auto; width:98%;">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="<{$colnum}>" style="padding-left:10px;">
<div style="overflow:hidden">
<div style="float:left">
<b><{$page_title}></b>
</div>
<div style="float:right"></div>
</div>
<div class="search">
<form action="<{:U(ACTION_NAME)}>" method="post" class="checkField">
<table width="99%" class="inner_table" style="border:1px solid #ddd;" >
<tr>
<?php
$ii = 1;
foreach($s_field as $fieldk=>$fieldv){
if($s_regfields[$fieldv]['isjs']==1 && $search[$fieldv] && $search[$fieldv.'2']){//调用全球js组件
$search[$fieldv]=$search[$fieldv].'-'.$search[$fieldv.'2'];
}
if($s_regfields[$fieldv]['issearch']==1){
if($s_regfields[$fieldv]['fline']==2){//整行显示
echo '<td style="text-align:right; font-weight:bold;border:1px solid #ddd;width:10%;">'.$s_regfields[$fieldv]['description'].':</td><td colspan="3" style="border:1px solid #ddd;">';
echo seachApply($s_regfields[$fieldv]['type'],$s_regfields[$fieldv]['name'],array('val'=>$s_regfields[$fieldv]['d_value'],'row'=>$s_regfields[$fieldv]['rownum'],'col'=>$s_regfields[$fieldv]['colnum'],'ctitle'=>$s_regfields[$fieldv]['ctitle']),$s_regfields[$fieldv]['isdate'],$search[$fieldv],$s_regfields[$fieldv]['istags'],$s_regfields[$fieldv]['isjs']);
if($s_regfields[$fieldv]['istags']){
echo '&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="'.$fieldv.'_type" value="1" ';
if($search[$fieldv.'_type']==1 || !$search){
echo 'checked';
}
echo ' /> 其中含有&nbsp;&nbsp;<input type="radio" name="'.$fieldv.'_type" value="2" ';
if($search[$fieldv.'_type']==2 ){
echo 'checked';
}
echo ' /> 全部包含';//包含方式
}
echo '</td></tr>';
}else{
echo '<td style="text-align:right; font-weight:bold;border:1px solid #ddd;width:10%;">'.$s_regfields[$fieldv]['description'].':</td><td style="border:1px solid #ddd;width:40%;">';
echo seachApply($s_regfields[$fieldv]['type'],$s_regfields[$fieldv]['name'],array('val'=>$s_regfields[$fieldv]['d_value'],'row'=>$s_regfields[$fieldv]['rownum'],'col'=>$s_regfields[$fieldv]['colnum'],'ctitle'=>$s_regfields[$fieldv]['ctitle']),$s_regfields[$fieldv]['isdate'],$search[$fieldv],$s_regfields[$fieldv]['istags'],$s_regfields[$fieldv]['isjs']);
echo '</td>';
if($ii == 2 && $k != (count($fields['listdata'])-1)){
echo '</tr><tr>';
$ii = 1;
}else{
$ii++;
}
}
}
}
?>
<input type="hidden" name="name" value="<{$name}>">
<tr ><td colspan="4" style="border:1px solid #ddd; text-align:center;" >
<input type="submit" onclick="fuzhi()" value="搜 索" class="btn" /> <input type="button" value="清除搜索" onclick='window.location.href="<{:U($Think.ACTION_NAME,array('name'=>$name))}>"' class="btn"/> <?php if(in_array('member-checkfield',$memberList)):?><input type="hidden" name="ppaction" value="retrieval" /><input type="button" value="导出EXCEL" onclick='window.location.href="<{:U('checkField')}>"' class="btn" id="checkField" /><?php endif;?>
</td></tr>
</tr>
</table>
</form>
</div>
</td>
</tr>
<form action="<{:U('form')}>" method="post">
<tr align="center">
<td width="30" style="text-align:center;">序号</td>
<volist name="field" id="v">
<td <notempty name="regfields[$v]['width3']">width="<{$regfields[$v]['width3']}>"</notempty> style="text-align:center;"><{$regfields[$v]['description']}></td>
</volist>
<td width="60" style="text-align:center;">录入时间</td>
<?php if(in_array('member-look',$memberList)):?><td width="50" style="text-align:center;">查看</td><?php endif;?>
</tr>
<volist name="list" id="vo" empty="$empty" key="ii">
<tr style="text-align:center;">
<td nowrap="" style="text-align:center;"><{$ii}></td>
<volist name="field" id="v">
<td style="text-align:center;">
<if condition="($regfields[$v]['upfile'] eq 1) AND ($vo[$v])">
<img src="<{$vo[$v]}>" style=" max-width:80px; ">
<elseif condition="($regfields[$v]['upfile'] eq 2) AND ($vo[$v])" />
<a href="<{$vo[$v]}>" target="_blank">下载文件</a>
<elseif condition="($regfields[$v]['istags'] eq '1') or ($regfields[$v]['type'] eq 'c_heckbox')" />
<{$vo[$v]|trim=','}>
<else/>
<{$vo[$v]}>
</if>
</td>
</volist>
<td style="text-align:center;"><{$vo.addtime|date='Y-m-d',###}></td>
<?php if(in_array('member-look',$memberList)):?>
<td style="text-align:center;">
<a href="<{:U('look',array('id'=>$vo['id']))}>" class="btn btn-mini"><i class="icon-look"></i> 预览</a>
</td>
<?php endif;?>
</tr>
</volist>
</form>
<notempty name="page">
<tr>
<td colspan="<{$colnum}>">
<ul class="page">
<{$page}>
</ul>
</td>
</tr>
</notempty>
</tbody>
</table>
</div>
</body>
<include file="Common:js" />
</html>
<script>
$(function(){
$('#checkField').click(function(){
$('.checkField').attr('action','<{:U('checkField')}>');
$('.checkField').submit();
});
});
</script>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<!-- saved from url=(0050)http://localhost/cms/index.php/admin/Article/index -->
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>列表|后台管理系统</title>
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<script>
$(document).ready(function(){
$("#SelectAll").click(function(){
$("input[name='check[]']").checkCbx();
});
$(".YanZheng").click(function(event){
var a=$("input:checked").length;
if(a==0){
alert('您还没有请选择操作内容!');
event.preventDefault();
}
});
$(".pp_ok").click(function(){
if(confirm('确定修改审核状态吗?')){
changeIsshow($(this));
}
});
});
function changeIsshow(a){
var aid=a.attr('attr_id');
var aval=a.attr('attr_val');
var validate={
'id':aid, //信息id
'val':aval, //信息审核值
};
$.post("<{:U('Shenhe')}>",validate,function(data){
if(data.success){
a.parent().siblings('.review').html(data['status']);
if(data.val == 2){
location.reload();
}
}else{
alert(data['msg']);
}
},'json');
}
$.fn.checkCbx = function(){
return this.each(function(){
this.checked = !this.checked;
});
}
</script>
<style>
.search{padding:0px 8px 15px; clear:both; text-align:right;}
.search .w_160{width:160px;}
.search form{padding:0; margin:0;}
</style>
</head>
<body style="margin: 0px 0px;min-height:500px; background:url(__ROOTPUB__img/ybbf.png) center no-repeat;background-size:contain;background-position:200px 150px;">
<div style="margin:0 auto; width:98%;">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="<{$colnum}>" style="padding-left:10px;">
<div style="overflow:hidden">
<div style="float:left">
<b><{$page_title}></b>
</div>
<div style="float:right"></div>
</div>
<div class="search">
<form action="<{:U(ACTION_NAME)}>" method="post">
<input type="text" name="title" value="<{$search.title}>" placeholder="请输入报告名称" class="w_160" />
<select name="status" class="w_160">
<option value="">请选择审核状态</option>
<option value="2" <eq name="search.status" value="2">selected</eq>>未审核</option>
<option value="1" <eq name="search.status" value="1">selected</eq>>审核不通过</option>
</select>
<input type="submit" value="搜 索" class="btn" /> <input type="button" value="清除搜索" onclick='window.location.href="<{:U($Think.ACTION_NAME)}>"' class="btn"/> <input type="hidden" name="sumid" value="<{$sumid}>" />
<?php if(in_array('member-checkfield',$memberList)):?><input type="button" value="导出EXCEL" onclick='window.location.href="<{:U('checkField',array('action'=>$Think.ACTION_NAME))}>"' class="btn" /><?php endif;?>
</form>
</div>
</td>
</tr>
<form action="<{:U('form')}>" method="post">
<tr align="center">
<td width="30" style="text-align:center;">序号</td>
<volist name="field" id="v">
<td <notempty name="regfields[$v]['width2']">width="<{$regfields[$v]['width2']}>"</notempty> style="text-align:center;"><{$regfields[$v]['description']}></td>
</volist>
<td width="60" style="text-align:center;">录入时间</td>
<td width="50" style="text-align:center;">审核状态</td>
<?php if(in_array('member-look',$memberList) || in_array('member-look',$memberList) || in_array('member-shenhe',$memberList)):?>
<td width="150" style="text-align:center;">审核操作</td>
<?php endif;?>
</tr>
<volist name="list" id="vo" empty="$empty" key="ii">
<tr style="text-align:center;">
<td nowrap="" style="text-align:center;"><{$ii}></td>
<volist name="field" id="v">
<td style="text-align:center;">
<if condition="($regfields[$v]['upfile'] eq 1) AND ($vo[$v])">
<img src="<{$vo[$v]}>" style=" max-width:80px; ">
<elseif condition="($regfields[$v]['upfile'] eq 2) AND ($vo[$v])" />
<a href="<{$vo[$v]}>" target="_blank">下载文件</a>
<elseif condition="($regfields[$v]['istags'] eq '1') or ($regfields[$v]['type'] eq 'c_heckbox')" />
<{$vo[$v]|trim=','}>
<else/>
<{$vo[$v]}>
</if>
</td>
</volist>
<td style="text-align:center;"><{$vo.addtime|date='Y-m-d',###}></td>
<td style="text-align:center;" class="review">
<?php
if($vo['status']==1):
?>
<span style="color:red">审核不通过</span>
<?php
elseif((int)$dengji == (int)$vo['isshow']):
?>
<span style="color:red">未审核</span>
<?php endif;?>
</td>
<?php if(in_array('member-look',$memberList) || in_array('member-look',$memberList) || in_array('member-shenhe',$memberList)):?>
<td style="text-align:center;">
<?php if(in_array('member-look',$memberList)):?>
<a href="<{:U('look',array('id'=>$vo['id']))}>" class="btn btn-mini"><i class="icon-look"></i> 预览</a>
<?php endif;?>
<?php if(in_array('member-edit',$memberList)):?>
<a href="<{:U('edit',array('id'=>$vo['id']))}>" class="btn btn-mini"><i class="icon-edit"></i> 修改</a>
<?php endif;?>
<?php if(in_array('member-shenhe',$memberList)):?>
<a href="javascript:void(0);" class="btn btn-mini pp_ok" attr_id="<{$vo.id}>" attr_val="2"><i class="icon-ok"></i> 通过审核</a>
<a href="javascript:void(0);" class="btn btn-mini pp_ok" attr_id="<{$vo.id}>" attr_val="1"><i class="icon-remove"></i> 不通过审核</a>
<?php endif;?>
</td>
<?php endif;?>
</tr>
</volist>
</form>
<notempty name="page">
<tr>
<td colspan="<{$colnum}>">
<ul class="page">
<{$page}>
</ul>
</td>
</tr>
</notempty>
</tbody>
</table>
</div>
</body>
<include file="Common:js" />
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<!-- saved from url=(0050)http://localhost/cms/index.php/admin/Article/index -->
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>列表|后台管理系统</title>
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<script>
$(document).ready(function(){
$("#SelectAll").click(function(){
$("input[name='check[]']").checkCbx();
});
$(".YanZheng").click(function(event){
var a=$("input:checked").length;
if(a==0){
alert('您还没有请选择操作内容!');
event.preventDefault();
}
});
$(".pp_ok").click(function(){
if(confirm('确定修改审核状态吗?')){
changeIsshow($(this));
}
});
});
function changeIsshow(a){
var aid=a.attr('attr_id');
var aval=a.attr('attr_val');
var validate={
'id':aid, //信息id
'val':aval, //信息审核值
};
$.post("<{:U('Shenhe')}>",validate,function(data){
if(data.success){
a.parent().siblings('.review').html(data['status']);
if(data.val == 2){
location.reload();
}
}else{
alert(data['msg']);
}
},'json');
}
$.fn.checkCbx = function(){
return this.each(function(){
this.checked = !this.checked;
});
}
</script>
<style>
.search{padding:0px 8px 15px; clear:both; text-align:right;}
.search .w_160{width:160px;}
.search form{padding:0; margin:0;}
</style>
</head>
<body style="margin: 0px 0px;min-height:500px; background:url(__ROOTPUB__img/ybbf.png) center no-repeat;background-size:contain;background-position:200px 150px;">
<div style="margin:0 auto; width:98%;">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="<{$colnum}>" style="padding-left:10px;">
<div style="overflow:hidden">
<div style="float:left">
<b><{$page_title}></b>
</div>
<div style="float:right"></div>
</div>
<div class="search">
<form action="<{:U(ACTION_NAME)}>" method="post">
<input type="text" name="title" value="<{$search.title}>" placeholder="请输入报告名称" class="w_160" />
<!-- <select name="status" class="w_160">
<option value="">请选择审核状态</option>
<option value="2" <eq name="search.status" value="2">selected</eq>>未审核</option>
<option value="1" <eq name="search.status" value="1">selected</eq>>审核不通过</option>
</select> -->
<input type="submit" value="搜 索" class="btn" /> <input type="button" value="清除搜索" onclick='window.location.href="<{:U($Think.ACTION_NAME)}>"' class="btn"/> <input type="hidden" name="sumid" value="<{$sumid}>" />
</form>
</div>
</td>
</tr>
<form action="<{:U('form')}>" method="post">
<!-- <div style="width:100%;height:1px;background-color:#ddd"></div> -->
<tr align="center" >
<td width="30" style="text-align:center;">序号</td>
<volist name="field" id="v">
<td <notempty name="regfields[$v]['width2']">width="<{$regfields[$v]['width2']}>"</notempty> style="text-align:center;"><{$regfields[$v]['description']}></td>
</volist>
<td width="60" style="text-align:center;">录入时间</td>
<!-- <td width="50" style="text-align:center;">审核状态</td> -->
<?php if(in_array('member-look',$memberList) || in_array('member-look',$memberList) || in_array('member-shenhe',$memberList)):?>
<td width="50" style="text-align:center;">查看</td>
<?php endif;?>
</tr>
<volist name="list" id="vo" empty="$empty" key="ii">
<tr style="text-align:center;">
<td nowrap="" style="text-align:center;"><{$ii}></td>
<volist name="field" id="v">
<td style="text-align:center;">
<if condition="($regfields[$v]['upfile'] eq 1) AND ($vo[$v])">
<img src="<{$vo[$v]}>" style=" max-width:80px; ">
<elseif condition="($regfields[$v]['upfile'] eq 2) AND ($vo[$v])" />
<a href="<{$vo[$v]}>" target="_blank">下载文件</a>
<elseif condition="($regfields[$v]['istags'] eq '1') or ($regfields[$v]['type'] eq 'c_heckbox')" />
<{$vo[$v]|trim=','}>
<else/>
<{$vo[$v]}>
</if>
</td>
</volist>
<td style="text-align:center;"><{$vo.addtime|date='Y-m-d',###}></td>
<!-- <td style="text-align:center;" class="review">
<?php
if($vo['status']==1):
?>
<span style="color:red">审核不通过</span>
<?php
elseif((int)$dengji == (int)$vo['isshow']):
?>
<span style="color:red">未审核</span>
<?php endif;?>
</td> -->
<?php if(in_array('member-look',$memberList) || in_array('member-look',$memberList) || in_array('member-shenhe',$memberList)):?>
<td style="text-align:center;">
<?php if(in_array('member-look',$memberList)):?>
<a href="<{:U('look',array('id'=>$vo['id']))}>" class="btn btn-mini"><i class="icon-look"></i> 预览</a>
<?php endif;?>
</td>
<?php endif;?>
</tr>
</volist>
</form>
<notempty name="page">
<tr>
<td colspan="<{$colnum}>">
<ul class="page">
<{$page}>
</ul>
</td>
</tr>
</notempty>
</tbody>
</table>
</div>
</body>
<include file="Common:js" />
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>页面提示</title>
<script type="text/javascript">
function refresh(){
location.href = "<?php echo($jumpUrl); ?>";
}
setTimeout("refresh()",<?php echo($waitSecond); ?>000);
</script>
<style type="text/css">
*{margin:0px;padding:0px;font-size:12px;font-family:Arial,Verdana;}
#wrapper{width:450px;height:150px;background:#fff;border:1px solid #971313;position:absolute;top:40%;left:50%;margin-top:-100px;margin-left:-225px;}
p.msg-title{width:100%;height:30px;line-height:30px;text-align:center;color:red;margin-top:20px;font:14px Arial,Verdana;font-weight:bold;}
p.msg_title2{color:#971313;}
p.message{width:100%;height:40px;line-height:40px;text-align:center;color:#971313;margin-top:5px;margin-bottom:5px;}
p.error{width:100%;height:40px;line-height:40px;text-align:center;color:red;margin-top:5px;margin-bottom:5px;font-weight:bold;}
p.notice{width:100%;height:25px;line-height:25px;text-align:center;}
p.notice a{color:#971313;}
</style>
</head> <body>
<div id="wrapper">
<p class="msg-title <present name="message">msg_title2</present>"><?php echo($msgTitle);?></p>
<present name="message">
<p class="message"><?php echo($message);?></p>
</present>
<present name="error">
<p class="error"><?php echo($error);?></p>
</present>
<present name="closeWin">
<p class="notice">系统将在 <span style="color:#971313;font-weight:bold"><?php echo($waitSecond); ?></span> 秒后自动关闭,如果不想等待,直接点击 <a href="<?php echo($jumpUrl); ?>">这里</a> 关闭</p>
</present>
<notpresent name="closeWin">
<p class="notice">系统将在 <span style="color:#971313;font-weight:bold"><?php echo($waitSecond); ?></span> 秒后自动跳转,如果不想等待,直接点击 <a href="<?php echo($jumpUrl); ?>">这里</a> 关闭</p>
</notpresent>
</div>
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="en"><head>
<meta charset="UTF-8">
<title><{:C('title')}></title>
<link rel="stylesheet" href="__ROOTPUB__css/login.css">
</head>
<body>
<div class="large-header" >
<div class="login_box">
<div class="login_logo"><img src="__ROOTPUB__img/logo.png" alt=""></div>
<div class="login_center">
<form method="post" action="<{:U('Public/login')}>" class="demoform">
<div class="input-hideo">
<label class="input-icon fl">
<img src="__ROOTPUB__img/user.png" alt="">
</label>
<input class="input-field fr" type="text" placeholder="请输入您的账号" name="account">
</div>
<div class="input-hideo">
<label class="input-icon fl">
<img src="__ROOTPUB__img/padd.png" alt="">
</label>
<input class="input-field fr" type="password" placeholder="请输入您的密码" name="password">
</div>
<div class="clear"></div>
<div class="input-hideo">
<input class="input-field1 fl" type="text" placeholder="验证码" name="code">
<a href="javascript:fleshVerify()"><img id="verifyImg" width="60px" src="<{:U('verify',array(),'')}>" alt="点击刷新验证码" onclick="fleshVerify()" style=" cursor:pointer;vertical-align:top"/></a>
</div>
<input name="act" value="signin" type="hidden">
<button class="enter" type="submit" >进入管理中心</button>
</form>
</div>
</div>
</div>
<script type="text/javascript" src="__ROOTPUB__js/jquery-1.9.1.min.js"></script>
<script language="JavaScript">
function fleshVerify(){
//重载验证码
var time = new Date().getTime();
document.getElementById("verifyImg").src="<{:U('verify',array(),'')}><{:C('URL_PATHINFO_DEPR')}>"+time;
}
$(".demoform").Validform();
</script>
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<style>
.djadd{display: none;}
</style>
</head>
<body style="margin: 0px 0px;min-height:500px; background:url(__ROOTPUB__img/ybbf.png) center no-repeat;background-size:contain;background-position:200px 150px;">
<div style="margin:0 auto; width:98%;">
<form name="form" action="" method="post">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="2" style="padding-left:10px;">
<div style="float:left">
<b>添加用户</b>
</div>
<div style="float:right">
[<a href="<{:U('index')}>"><u>返回列表</u></a>]
</div>
</td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">登录账号:</font></td>
<td class="bline"><input name="username" type="text" id="username" size="30" class="iptxt"></td>
</tr>
<eq name="Think.cookie.uid" value="1">
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">用户等级</font></td>
<td class="bline">
<select id='s_dengji' name="s_dengji">
<option value=''>-用户等级-</option>
<volist name="grade_arr" id="gid">
<option value='<{$gid.grade}>'<eq name="gid.grade" value='2'> selected</eq>><{$gid.grade}>级用户</option>
</volist>
</select>
</td>
</tr>
<tr id='fj' style="display:none">
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">父级用户</font></td>
<td class="bline">
<select id='c_dengji' name="c_dengji" class="djadd">
</select>
</td>
</tr>
</eq>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">姓名:</font></td>
<td class="bline"><input name="name" type="text" id="name" size="30" class="iptxt"></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">密码:</font></td>
<td class="bline"><input name="password" type="password" id="password" size="30" class="iptxt"></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">确认密码:</font></td>
<td class="bline"><input name="password2" type="password" id="password2" size="30" class="iptxt"></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right">当前职位</td>
<td class="bline"><input name="position" type="text" id="position" size="30" class="iptxt"></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right">电话:</td>
<td class="bline"><input name="tel" type="text" id="tel" size="30" class="iptxt"></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right">邮箱:</td>
<td class="bline"><input name="email" type="email" id="email" size="30" class="iptxt"></td>
</tr>
<tr><td colspan="2" style="text-align:center">
<input name="domain" type="submit" style=" background:url(__PUB__img/button_save.gif); width:60px; height:22px; border:0" value=" ">
&nbsp;&nbsp;&nbsp;<a href="javascript:history.go(-1);"><img src="__PUB__img/button_back.gif" width="60" height="22" border="0"></a></td></tr>
</tbody></table>
<input type="hidden" name="school" value="1" />
</form>
</div>
</body>
<include file="Common:js2" />
</html>
<script>
$(function(){
<eq name="Think.cookie.uid" value="1">
$(':input[name="s_dengji"]').change(function(){
var d=$(this).children('option:selected').val();
var cid='';
if(d){
var validata={
s_dengji:d,
c_dengji:cid,
}
$.get('<{:U("z_user")}>',validata,function(data){
$('#fj').css('display','table-row');
if(typeof(data) !== 'undefined' && data){
$('#c_dengji').removeClass('djadd').html('<option value="">-请选择-</option>'+data);
}else{
$('#c_dengji').removeClass('djadd').addClass('djadd').html('');
}
},'json')
}
});
</eq>
});
</script>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
</head>
<body style="margin: 0px 0px;min-height:500px; background:url(__ROOTPUB__img/ybbf.png) center no-repeat;background-size:contain;background-position:200px 150px;">
<div style="margin:0 auto; width:98%;">
<form name="form" action="" method="post">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="2" style="padding-left:10px;">
<div style="float:left">
<b>修改用户</b>
</div>
<div style="float:right">
[<a href="<{:U('index')}>"><u>返回列表</u></a>]
</div>
</td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">登录账号:</font></td>
<td class="bline"><input name="username" type="text" id="username" size="30" class="iptxt" value="<{$data.username}>"></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right"><font color="red">姓名:</font></td>
<td class="bline"><input name="name" type="text" id="name" size="30" class="iptxt" value="<{$data.name}>"></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right">密码:</td>
<td class="bline"><input name="password" type="password" id="password" size="30" class="iptxt"></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right">确认密码:</td>
<td class="bline"><input name="password2" type="password" id="password2" size="30" class="iptxt"></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right">当前职位</td>
<td class="bline"><input name="position" type="text" id="position" size="30" class="iptxt" value="<{$data.position}>"></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right">电话:</td>
<td class="bline"><input name="tel" type="text" id="tel" size="30" class="iptxt" value="<{$data.tel}>"></td>
</tr>
<tr>
<td height="26" align="right" class="bline" style="padding-left:10px; text-align:right">邮箱:</td>
<td class="bline"><input name="email" type="email" id="email" size="30" class="iptxt" value="<{$data.email}>"></td>
</tr>
<tr><td colspan="2" style="text-align:center">
<input name="id" type="hidden" id="id" size="30" class="iptxt" value="<{$data.id}>">
<input name="domain" type="submit" style=" background:url(__PUB__img/button_save.gif); width:60px; height:22px; border:0" value=" ">
&nbsp;&nbsp;&nbsp;<a href="javascript:history.go(-1);"><img src="__PUB__img/button_back.gif" width="60" height="22" border="0"></a></td></tr>
</tbody></table>
<input type="hidden" name="school" value="<{$data['school']}>" />
</form>
</div>
</body>
<include file="Common:js2" />
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>管理员|后台管理系统</title>
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<script>
/* 修改信息属性 */
function chang_status(id,value,table,f)
{
var newvalue=0;
if(value == 1)
newvalue=0;
else
newvalue=1;
var submitData = {
id:id,
f:f,
status:newvalue,
table:table
};
$.post("<{:U('editattr')}>",submitData,
function(data) {
if (data.success == true) {
alert(data.msg);
setTimeout('window.location.href=location.href',10);
return;
}
else {
alert(data.msg);
return;
}
}
,'json');
}
</script>
</head>
<body style="margin: 0px 0px;min-height:500px; background:url(__ROOTPUB__img/ybbf.png) center no-repeat;background-size:contain;background-position:200px 100px;">
<div style="margin:0 auto; width:98%;">
<table class="table table-condensed table-bordered table-hover">
<tbody>
<tr>
<td colspan="9" style="padding-left:10px;"><div style="float:left"> <b><{$page_title}></b> </div>
<div style="float:right; font-weight:bold;">
<?php
if(in_array('webuser-add',$webuserList)){?>
<a href="<{:U('add')}>"><u>增加用户</u></a>
<?php
}
?>
</div>
</td>
</tr>
<tr>
<td width="5%" style="text-align:center">序号</td>
<td width="12%" style="text-align:center">登录账号</td>
<td width="12%" style="text-align:center">姓名</td>
<td width="12%" style="text-align:center">用户等级</td>
<td width="12%" style="text-align:center">电话</td>
<td width="12%" style="text-align:center">邮箱</td>
<td width="12%" style="text-align:center">当前职位</td>
<!-- <td width="12%" style="text-align:center">最后一次登录时间</td>
<td width="12%" style="text-align:center">最后一次登录IP</td> -->
<?php if(in_array('webuser-editattr',$webuserList)):?>
<td width="7%" style="text-align:center">状态</td>
<?php endif;?>
<?php if(in_array('webuser-edit',$webuserList) || in_array('webuser-delete',$webuserList)):?>
<td width="15%" style="text-align:center">操作项</td>
<?php endif;?>
</tr>
<volist name="list" id="vo" key="k" empty="$empty">
<tr>
<td style="text-align:center"><{$k}></td>
<td style="text-align:center"><{$vo.username}></td>
<td style="text-align:center"><{$vo.name}></td>
<td style="text-align:center">
<?php echo $auth[count(explode(',',$vo['depth']))]?>
</td>
<td style="text-align:center"><{$vo.tel}></td>
<td style="text-align:center"><{$vo.email}></td>
<td style="text-align:center"><{$vo.position}></td>
<!-- <td style="text-align:center"><notempty name="vo.ltime"><{$vo.ltime|date='Y-m-d',###}></notempty></td>
<td style="text-align:center"><{$vo.lip}></td> -->
<?php if(in_array('webuser-editattr',$webuserList)):?>
<td style="text-align:center">
<a href="javascript:chang_status(<{$vo.id}>,<{$vo.isshow}>,'Webuser','isshow');">
<eq name="vo.isshow" value="1"><i class="icon-ok" var="<{$vo.id}>"></i>
<else />
<i class="icon-no" var="<{$vo.id}>"></i></eq>
</a>
</td>
<?php endif;?>
<?php if(in_array('webuser-edit',$webuserList) || in_array('webuser-delete',$webuserList)):?>
<td style="text-align:center">
<?php if(in_array('webuser-edit',$webuserList)):?>
<a href="<{:U('edit',array('id'=>$vo['id']))}>" class="btn btn-mini"><i class="icon-edit"></i> 修改</a>
<?php endif;?>
<?php if(in_array('webuser-delete',$webuserList)):?>
<a href="javascript:void(0);" onclick="del2('<{:U('delete',array('id'=>$vo['id'],'p'=>I('p',1,'intval')))}>','确定要删除信息吗?删除后无法恢复');" class="btn btn-mini"><i class="icon-trash"></i> 删除</a>
<?php endif;?>
</td>
<?php endif;?>
</tr>
</volist>
<notempty name="page">
<tr>
<td colspan="9">
<ul class="page">
<{$page}>
</ul>
</td>
</tr>
</notempty>
</tbody>
</table>
</div>
<include file="Common:js" />
</body>
</html>
\ No newline at end of file \ No newline at end of file
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!