本文整理匯總了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');
}