當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CommonAction::userauth2方法代碼示例

本文整理匯總了PHP中CommonAction::userauth2方法的典型用法代碼示例。如果您正苦於以下問題:PHP CommonAction::userauth2方法的具體用法?PHP CommonAction::userauth2怎麽用?PHP CommonAction::userauth2使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CommonAction的用法示例。


在下文中一共展示了CommonAction::userauth2方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: index

 public function index()
 {
     parent::userauth2(60);
     $sid = I('get.sid', '');
     $menu = D('Dmenu');
     import('ORG.Util.Page');
     // 導入分頁類
     if ($sid != '') {
         $where['Sid'] = $sid;
     } else {
         $where['Sid'] = 0;
     }
     $count = $menu->where($where)->count();
     //總記錄數
     $Page = new Page($count, 15);
     //實例化分頁類 傳入總記錄數和每頁顯示的記錄數
     $Page->setConfig('header', '條記錄');
     $Page->setConfig('prev', '<img src="__IMAGE__/prev.gif" border="0" title="上一頁" />');
     $Page->setConfig('next', '<img src="__IMAGE__/next.gif" border="0" title="下一頁" />');
     $Page->setConfig('first', '<img src="__IMAGE__/first.gif" border="0" title="第一頁" />');
     $Page->setConfig('last', '<img src="__IMAGE__/last.gif" border="0" title="最後一頁" />');
     $show = $Page->show();
     //分頁顯示輸出
     $volist = $menu->relation(true)->where($where)->order('Sortid asc')->limit($Page->firstRow . ',' . $Page->listRows)->select();
     $list = $menu->where('Sid = 0')->order('Sortid asc')->select();
     $this->assign('volist', $volist);
     $this->assign('list', $list);
     $this->assign('sid', $sid);
     $this->assign('page', $show);
     //輸出分頁
     $this->co = $count;
     $this->display('System/dmenu');
 }
開發者ID:argen77,項目名稱:OA,代碼行數:33,代碼來源:DmenuAction.class.php

示例2: index

 public function index()
 {
     parent::userauth2(2);
     $keyword = I('get.keyword', '', 'htmlspecialchars');
     $user = D('User');
     import('ORG.Util.Page');
     // 導入分頁類
     $where['Username'] = $keyword;
     $count = $user->where($where)->count();
     //總記錄數
     $Page = new Page($count, 15);
     //實例化分頁類 傳入總記錄數和每頁顯示的記錄數
     $Page->setConfig('header', '條記錄');
     $Page->setConfig('prev', '<img src="__IMAGE__/prev.gif" border="0" title="上一頁" />');
     $Page->setConfig('next', '<img src="__IMAGE__/next.gif" border="0" title="下一頁" />');
     $Page->setConfig('first', '<img src="__IMAGE__/first.gif" border="0" title="第一頁" />');
     $Page->setConfig('last', '<img src="__IMAGE__/last.gif" border="0" title="最後一頁" />');
     $show = $Page->show();
     //分頁顯示輸出
     $volist = $user->relation(true)->where($where)->order('Dtime desc')->limit($Page->firstRow . ',' . $Page->listRows)->select();
     $this->assign('volist', $volist);
     $this->assign('page', $show);
     //輸出分頁
     $this->assign('keyword', $keyword);
     $this->co = $count;
     $this->display();
 }
開發者ID:argen77,項目名稱:OA,代碼行數:27,代碼來源:UserAction.class.php

示例3: index

 public function index()
 {
     parent::userauth2(12);
     $co = M('competence');
     $keyword = I('get.keyword', '', 'htmlspecialchars');
     import('ORG.Util.Page');
     // 導入分頁類
     $where['Sid&Cname'] = array('0', array('LIKE', "%{$keyword}%"), '_multi' => true);
     //多條件查詢
     $count = $co->where($where)->count();
     //總記錄數
     $Page = new Page($count, 4);
     //實例化分頁類 傳入總記錄數和每頁顯示的記錄數
     $Page->setConfig('header', '條記錄');
     $Page->setConfig('prev', '<img src="__IMAGE__/prev.gif" border="0" title="上一頁" />');
     $Page->setConfig('next', '<img src="__IMAGE__/next.gif" border="0" title="下一頁" />');
     $Page->setConfig('first', '<img src="__IMAGE__/first.gif" border="0" title="第一頁" />');
     $Page->setConfig('last', '<img src="__IMAGE__/last.gif" border="0" title="最後一頁" />');
     $show = $Page->show();
     //分頁顯示輸出
     $volist = $co->where($where)->order('Dtime')->limit($Page->firstRow . ',' . $Page->listRows)->select();
     $sidlist = $co->where('Sid<>0')->order('Dtime')->select();
     $this->assign('volist', $volist);
     $this->assign('sidlist', $sidlist);
     $this->assign('page', $show);
     $this->assign('keyword', $keyword);
     $this->co = $count;
     $this->display();
 }
開發者ID:argen77,項目名稱:OA,代碼行數:29,代碼來源:CompetenceAction.class.php

示例4: index

 public function index()
 {
     parent::userauth2(7);
     $Role = M('role');
     $volist = $Role->order('Dtime')->getField('ID,Rolename,Description,Status,Dtime');
     $this->assign('volist', $volist);
     $co = count($volist);
     $this->co = $co;
     $this->display();
 }
開發者ID:argen77,項目名稱:OA,代碼行數:10,代碼來源:RoleAction.class.php

示例5: index

 public function index()
 {
     parent::userauth2(82);
     $keyword = I('get.keyword', '', 'htmlspecialchars');
     $Url = I('get.Url', '', 'htmlspecialchars');
     $Ip = I('get.Ip', '', 'htmlspecialchars');
     $Uid = I('get.Uid', '', 'htmlspecialchars');
     $Status = I('get.Status', '', 'htmlspecialchars');
     $operating = D('Operating');
     import('ORG.Util.Page');
     // 導入分頁類
     if ($keyword != '') {
         $where['Description'] = $keyword;
     } else {
         $where['Description'] = '';
     }
     if ($Url != '') {
         $where['Url'] = $Url;
     }
     if ($Ip != '') {
         $where['Ip'] = $Ip;
     }
     if ($Uid != '') {
         $where['Uid'] = intval($Uid);
     }
     if ($Status != '') {
         $where['Status'] = intval($Status);
     }
     $count = $operating->where($where)->count();
     //總記錄數
     $Page = new Page($count, 15);
     //實例化分頁類 傳入總記錄數和每頁顯示的記錄數
     $Page->setConfig('header', '條記錄');
     $Page->setConfig('prev', '<img src="__IMAGE__/prev.gif" border="0" title="上一頁" />');
     $Page->setConfig('next', '<img src="__IMAGE__/next.gif" border="0" title="下一頁" />');
     $Page->setConfig('first', '<img src="__IMAGE__/first.gif" border="0" title="第一頁" />');
     $Page->setConfig('last', '<img src="__IMAGE__/last.gif" border="0" title="最後一頁" />');
     $show = $Page->show();
     //分頁顯示輸出
     $volist = $operating->relation(true)->where($where)->order('Dtime desc')->limit($Page->firstRow . ',' . $Page->listRows)->select();
     //標注時間和顏色
     if (count($volist) > 0) {
         $public = A('Public');
         for ($i = 0; $i < count($volist); $i++) {
             //將搜索的標為紅色
             $volist[$i]['Dtime'] = $public->Beautifytime($volist[$i]['Dtime']);
             if ($keyword != '') {
                 $volist[$i]['Description'] = str_replace($keyword, '<font>' . $keyword . '</font>', $volist[$i]['Description']);
                 //描述
             }
         }
     }
     if (isset($where['Status'])) {
         $Status = $where['Status'];
     } else {
         $Status = 2;
     }
     $this->assign('volist', $volist);
     $this->assign('page', $show);
     //輸出分頁
     $this->assign('keyword', $keyword);
     $this->assign('Status', $Status);
     $this->co = $count;
     $this->display('Public:operatinglog');
 }
開發者ID:argen77,項目名稱:OA,代碼行數:65,代碼來源:OperatingAction.class.php

示例6: edit_do

 public function edit_do()
 {
     parent::userauth2(50);
     if ($this->isPost()) {
         $data = array();
         $data['ID'] = $_POST['ID'];
         $data['Sid'] = $_POST['Sid'];
         $data['Title'] = htmlspecialchars($_POST['Title']);
         $data['Aliases'] = htmlspecialchars($_POST['Aliases']);
         $data['Sortid'] = $_POST['Sortid'];
         $data['Description'] = htmlspecialchars($_POST['Description']);
         $data['Content'] = $_POST['Content'];
         $news = D('News');
         //自動創建並驗證數據
         if ($news->create($data)) {
             $news->save();
             parent::operating(__ACTION__, 0, '更新成功');
             $this->success('修改成功', __APP__ . '/News/news', 3);
         } else {
             parent::operating(__ACTION__, 1, '更新失敗:' . $news->getError());
             $this->error($news->getError());
         }
     } else {
         parent::operating(__ACTION__, 1, '非法請求');
         $this->error('非法請求');
     }
 }
開發者ID:argen77,項目名稱:OA,代碼行數:27,代碼來源:NewsAction.class.php

示例7: systemwebsite_do

 public function systemwebsite_do()
 {
     //驗證用戶權限
     parent::userauth2(53);
     if ($this->isPost()) {
         $config = $_POST;
         $settingstr = "<?php \n return array(\n";
         foreach ($config as $key => $val) {
             $settingstr .= "\t'" . $key . "'=>'" . $val . "',\n";
         }
         $settingstr .= "\n);\n?>";
         if (file_put_contents(CONF_PATH . 'webconfig.php', $settingstr, FILE_USE_INCLUDE_PATH)) {
             parent::operating(__ACTION__, 0, '網站配置文件修改成功');
             $this->success('修改成功', 'systemwebsite', 2);
         } else {
             parent::operating(__ACTION__, 1, '網站配置文件修改失敗');
             $this->error('修改失敗,可能是由於沒有寫入權限導致。');
         }
     } else {
         parent::operating(__ACTION__, 1, '非法請求');
         $this->error('非法請求');
     }
 }
開發者ID:argen77,項目名稱:OA,代碼行數:23,代碼來源:SystemAction.class.php

示例8: uploadfile

 public function uploadfile()
 {
     parent::userauth2(40);
     $sid = I('get.sid', '');
     $sid = intval($sid);
     $type = explode('|', C('UPLOAD_FILE_FILE_TYPE'));
     $filetype = '';
     foreach ($type as $val) {
         $filetype .= '*.' . $val . ";";
     }
     $fileclass = M('fileclass');
     $list = $fileclass->where('Uid=' . $_SESSION['ThinkUser']['ID'])->order('Sortid asc')->getField('ID,Sid,ClassName,Sortid');
     if (count($list) > 0) {
         $arr = $this->classid($list);
     } else {
         $arr = array();
     }
     $this->assign('filetype', $filetype);
     $this->assign('list', $arr);
     $this->assign('sid', $sid);
     $this->assign('filesize', C('UPLOAD_FILE_FILE_SIZE'));
     $this->display('uploadfile');
 }
開發者ID:argen77,項目名稱:OA,代碼行數:23,代碼來源:FileAction.class.php

示例9: with

 public function with()
 {
     //權限驗證
     parent::userauth2(78);
     $this->display('Client/with');
 }
開發者ID:argen77,項目名稱:OA,代碼行數:6,代碼來源:WithAction.class.php

示例10: recycle

 public function recycle()
 {
     parent::userauth2(74);
     $this->display();
 }
開發者ID:argen77,項目名稱:OA,代碼行數:5,代碼來源:ClientAction.class.php


注:本文中的CommonAction::userauth2方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。