public function roleedit() { parent::win_userauth(9); $id = I('get.id', ''); if ($id == '' || !is_numeric($id)) { parent::operating(__ACTION__, 1, '参数错误'); $this->content = '参数ID类型错误,请关闭本窗口'; exit($this->display('Public:err')); } $id = intval($id); $role = M('role'); if ($result = $role->where("ID = {$id}")->find()) { $this->result = $result; //获取权限数据 $co = M('competence'); $volist = $co->where('Sid=0 AND Status=0')->order('Dtime asc')->getField('ID,Cname,Status'); $slist = $co->where('Sid<>0 AND Status=0')->order('Dtime asc')->getField('ID,Sid,Cname,Status'); $this->volist = $volist; $this->slist = $slist; $this->display('edit'); } else { parent::operating(__ACTION__, 1, '数据不存在'); $this->content = '没有找到相关数据,请关闭本窗口'; $this->display('Public:err'); } }
public function dmenuedit() { parent::win_userauth(62); $id = I('get.id', ''); if ($id == '' || !is_numeric($id)) { parent::operating(__ACTION__, 1, '参数错误'); $this->content = '参数ID类型错误,请关闭本窗口'; exit($this->display('Public:err')); } $id = intval($id); $dmenu = M('dmenu'); //获取分类信息 $data = array('ID' => $id); if ($result = $dmenu->where($data)->find()) { $this->result = $result; $list = $dmenu->where('Sid = 0')->order('Sortid asc')->getField('ID,Sid,MenuName,Sortid'); $this->assign('list', $list); $this->assign('result', $result); $this->display('System/dmenuedit'); } else { parent::operating(__ACTION__, 1, '没有找到数据'); $this->content = '没有找到相关数据,请关闭本窗口'; $this->display('Public:err'); } }
public function cedit() { parent::win_userauth(14); $id = I('get.id', ''); if ($id == '' || !is_numeric($id)) { $this->content = '参数ID类型错误,请关闭本窗口'; exit($this->display('Public:err')); } $id = intval($id); $co = M('competence'); //获取分类信息 $volist = $co->where('Sid=0 AND Status=0')->order('Dtime')->getField('ID,Cname,Status'); $data = array('ID' => $id); if ($result = $co->where($data)->find()) { $this->result = $result; $this->volist = $volist; $this->display('edit'); } else { parent::operating(__ACTION__, 1, '没有找到相关数据:' . $id); $this->content = '没有找到相关数据,请关闭本窗口'; $this->display('Public:err'); } }
public function edit() { parent::win_userauth(50); $id = I('get.id', '', 'htmlspecialchars'); if ($id == '' || !is_numeric($id)) { parent::operating(__ACTION__, 1, '参数错误'); $this->error('参数ID类型错误'); } $id = intval($id); $news = M('news'); if ($result = $news->where("ID={$id}")->find()) { //分类数据 $newsclass = M('newsclass'); $clist = $newsclass->order('ID asc')->select(); $this->result = $result; $this->clist = $clist; $this->display(); } else { parent::operating(__ACTION__, 1, '数据不存在'); $this->error('没有找到相关数据'); } }
public function module_edit() { parent::win_userauth(27); $id = I('get.id', ''); if ($id == '' || !is_numeric($id)) { parent::operating(__ACTION__, 1, '参数错误'); $this->content = '参数ID类型错误,请关闭本窗口'; exit($this->display('Public:err')); } $id = intval($id); $module = M('module'); //获取分类信息 $data = array('ID' => $id); if ($result = $module->where($data)->find()) { $this->result = $result; $list = $module->order('Msort asc')->getField('ID,Sid,ModuleName,Msort'); $arr = $this->classid($list); $this->assign('list', $arr); $this->assign('result', $result); $this->display('moduleedit'); } else { parent::operating(__ACTION__, 1, '数据不存在'); $this->content = '没有找到相关数据,请关闭本窗口'; $this->display('Public:err'); } }
public function uedit() { parent::win_userauth(18); $id = $_SESSION['ThinkUser']['ID']; $user = M('user'); $data = array('ID' => $id); if ($result = $user->where($data)->find()) { $this->result = $result; //获取权限数据 $this->display('uedit'); } else { parent::operating(__ACTION__, 1, '没有找到相关数据:' . $id); $this->content = '没有找到相关数据,请关闭本窗口'; $this->display('Public:err'); } }
public function filemove() { parent::win_userauth(39); $moveid = I('get.moveid', ''); if ($moveid == '') { $this->error('没有选中相关文件'); } $fileclass = M('fileclass'); $list = $fileclass->where('Uid=' . $_SESSION['ThinkUser']['ID'])->order('Sortid asc')->getField('ID,Sid,ClassName,Sortid'); $arr = $this->classid($list); $this->assign('list', $arr); $this->assign('moveid', $moveid); $this->display(); }
public function withedit() { parent::win_userauth(80); $id = I('get.id', ''); if ($id == '' || !is_numeric($id)) { parent::operating(__ACTION__, 1, '参数错误'); $this->content = '参数ID类型错误,请关闭本窗口'; exit($this->display('Public:err')); } $uid = $_SESSION['ThinkUser']['ID']; //下拉菜单数据 $dmenu = M('dmenu'); $volist = $dmenu->where('Sid <> 0')->order('Sortid asc')->select(); //查出相应数据 $with = D('With'); $result = $with->relation(true)->where("ID = {$id} AND Uid = {$uid}")->find(); //对象联系人 $contact = M('contact'); $contactlist = $contact->where("Cid = " . $result['Cid'] . " AND Uid=" . $_SESSION['ThinkUser']['ID'])->select(); if (!$result) { parent::operating(__ACTION__, 1, '数据不存在'); $this->content = '不存在你要修改的数据,请关闭本窗口'; exit($this->display('Public:err')); } $this->assign('volist', $volist); $this->assign('result', $result); $this->assign('contactlist', $contactlist); $this->display('Client/withedit'); }
public function contactedit() { parent::win_userauth(70); $id = I('get.id', ''); if ($id == '' || !is_numeric($id)) { parent::operating(__ACTION__, 1, '参数错误'); $this->content = '参数ID类型错误,请关闭本窗口'; exit($this->display('Public:err')); } $uid = $_SESSION['ThinkUser']['ID']; //下拉菜单数据 $dmenu = M('dmenu'); $volist = $dmenu->where('Sid <> 0')->order('Sortid asc')->select(); //查出相应数据 $contact = D('Contact'); $result = $contact->relation(true)->where("ID = {$id} AND Recycle = 0 AND Uid = {$uid}")->find(); if (!$result) { parent::operating(__ACTION__, 1, '没有找到数据:' . $id); $this->content = '不存在你要修改的数据,请关闭本窗口'; exit($this->display('Public:err')); } $this->assign('volist', $volist); $this->assign('result', $result); $this->display('contactedit'); }