Commit 103272f0 by 石迎春

删除了target

1 parent 3873e6a9
Showing 154 changed files with 0 additions and 5002 deletions
<?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 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 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 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
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/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>
<!-- 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
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!