本文整理汇总了PHP中CommonAction::win_userauth方法的典型用法代码示例。如果您正苦于以下问题:PHP CommonAction::win_userauth方法的具体用法?PHP CommonAction::win_userauth怎么用?PHP CommonAction::win_userauth使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CommonAction
的用法示例。
在下文中一共展示了CommonAction::win_userauth方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: roleedit
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');
}
}
示例2: dmenuedit
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');
}
}
示例3: cedit
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');
}
}
示例4: edit
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('没有找到相关数据');
}
}
示例5: module_edit
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');
}
}
示例6: uedit
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');
}
}
示例7: filemove
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();
}
示例8: withedit
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');
}
示例9: contactedit
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');
}