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


PHP Common::getUserRight方法代碼示例

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


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

示例1: before

 public function before()
 {
     parent::before();
     $action = $this->request->action();
     if ($action == 'index') {
         $param = $this->params['action'];
         $right = array('read' => 'slook', 'save' => 'smodify', 'delete' => 'sdelete', 'update' => 'smodify');
         $user_action = $right[$param];
         if (!empty($user_action)) {
             Common::getUserRight('advertise', $user_action);
         }
     }
     if ($action == 'add') {
         Common::getUserRight('advertise', 'sadd');
     }
     if ($action == 'edit') {
         Common::getUserRight('advertise', 'smodify');
     }
     if ($action == 'ajax_save') {
         Common::getUserRight('advertise', 'smodify');
     }
     $this->assign('cmsurl', URL::site());
     $this->assign('parentkey', $this->params['parentkey']);
     $this->assign('itemid', $this->params['itemid']);
     $this->assign('weblist', Common::getWebList());
 }
開發者ID:lz1988,項目名稱:stourwebcms,代碼行數:26,代碼來源:advertise.php

示例2: before

 public function before()
 {
     parent::before();
     $action = $this->request->action();
     if ($action == 'destination') {
         $right_arr = array('1' => 'linedest', '2' => 'hoteldest', '3' => 'cardest', '4' => 'articledest', '5' => 'spotdest', '6' => 'photodest');
         $type_id = Arr::get($_GET, 'typeid');
         if (!empty($type_id) && $type_id < 14) {
             //其它模型判斷.
             $right_moduleid = $right_arr[$type_id];
         } else {
             $right_moduleid = 'destination';
         }
         //主目的地權限
         $param = $this->params['action'];
         if (!empty($param)) {
             $right = array('read' => 'slook', 'save' => 'smodify', 'delete' => 'sdelete', 'update' => 'smodify', 'addsub' => 'sadd');
             $user_action = $right[$param];
             if (!empty($user_action)) {
                 Common::getUserRight($right_moduleid, $user_action);
             }
         }
     }
     $this->assign('parentkey', $this->params['parentkey']);
     $this->assign('itemid', $this->params['itemid']);
     $this->assign('templetlist', Common::getUserTemplteList('dest_index'));
     //獲取上傳的用戶模板
 }
開發者ID:lz1988,項目名稱:stourwebcms,代碼行數:28,代碼來源:destination.php

示例3: before

 public function before()
 {
     parent::before();
     $action = $this->request->action();
     if ($action == 'index') {
         Common::getUserRight('footernav', 'slook');
     }
     if ($action == 'addnav') {
         Common::getUserRight('footernav', 'sadd');
     }
     if ($action == 'editnav') {
         Common::getUserRight('footernav', 'smodify');
     }
     if ($action == 'ajax_del') {
         Common::getUserRight('footernav', 'sdelete');
     }
     if ($action == 'ajax_savefooternav') {
         Common::getUserRight('footernav', 'sdelete');
     }
     $this->assign('parentkey', $this->params['parentkey']);
     $this->assign('itemid', $this->params['itemid']);
     $this->parentkey = $this->params['parentkey'];
     $this->itemid = $this->params['itemid'];
     $weblist = Common::getWebList();
     $this->assign('weblist', $weblist);
     $this->assign('helpico', Common::getIco('help'));
     $this->model = new Model_FooterNav();
 }
開發者ID:lz1988,項目名稱:stourwebcms,代碼行數:28,代碼來源:footernav.php

示例4: before

 public function before()
 {
     parent::before();
     $action = $this->request->action();
     if ($action == 'store') {
         $param = $this->params['action'];
         $right = array('read' => 'slook', 'save' => 'smodify', 'delete' => 'sdelete', 'update' => 'smodify');
         $user_action = $right[$param];
         if (!empty($user_action)) {
             Common::getUserRight('module', $user_action);
         }
     }
     if ($action == 'index') {
         Common::getUserRight('module', 'slook');
     }
     if ($action == 'list') {
         Common::getUserRight('module', 'slook');
     }
     if ($action == 'add') {
         Common::getUserRight('module', 'smodify');
     }
     if ($action == 'ajax_add_save' || $action == 'ajax_edit_save') {
         Common::getUserRight('module', 'smodify');
     }
     $this->assign('parentkey', $this->params['parentkey']);
     $this->assign('itemid', $this->params['itemid']);
     $weblist = Common::getWebList();
     $this->assign('weblist', $weblist);
 }
開發者ID:lz1988,項目名稱:stourwebcms,代碼行數:29,代碼來源:module.php

示例5: before

 public function before()
 {
     parent::before();
     $action = $this->request->action();
     if ($action == 'index') {
         Common::getUserRight('site', 'slook');
     }
     if ($action == 'add') {
         Common::getUserRight('site', 'sadd');
     }
     if ($action == 'ajax_addsave') {
         Common::getUserRight('site', 'smodify');
     }
     if ($action == 'ajax_editsave') {
         Common::getUserRight('site', 'smodify');
     }
     if ($action == 'ajax_del') {
         Common::getUserRight('site', 'smodify');
     }
     $this->assign('parentkey', $this->params['parentkey']);
     $this->assign('itemid', $this->params['itemid']);
     $this->parentkey = $this->params['parentkey'];
     $this->itemid = $this->params['itemid'];
     $weblist = Common::getWebList();
     $this->assign('weblist', $weblist);
     $this->assign('helpico', Common::getIco('help'));
 }
開發者ID:lz1988,項目名稱:stourwebcms,代碼行數:27,代碼來源:site.php

示例6: before

 public function before()
 {
     parent::before();
     $action = $this->request->action();
     if ($action == 'article') {
         $param = $this->params['action'];
         $right = array('read' => 'slook', 'save' => 'smodify', 'delete' => 'sdelete', 'update' => 'smodify');
         $user_action = $right[$param];
         if (!empty($user_action)) {
             Common::getUserRight('article', $user_action);
         }
     } else {
         if ($action == 'add') {
             Common::getUserRight('article', 'sadd');
         } else {
             if ($action == 'edit') {
                 Common::getUserRight('article', 'smodify');
             } else {
                 if ($action == 'ajax_save') {
                     Common::getUserRight('article', 'smodify');
                 }
             }
         }
     }
     $this->assign('parentkey', $this->params['parentkey']);
     $this->assign('itemid', $this->params['itemid']);
     $this->assign('weblist', Common::getWebList());
     $this->assign('templetlist', Common::getUserTemplteList('article_show'));
     //獲取上傳的用戶模板
 }
開發者ID:lz1988,項目名稱:stourwebcms,代碼行數:30,代碼來源:article.php

示例7: before

 public function before()
 {
     parent::before();
     //$this->request->controller,
     $action = $this->request->action();
     if ($action == 'line') {
         $param = $this->params['action'];
         $right = array('read' => 'slook', 'save' => 'smodify', 'delete' => 'sdelete', 'update' => 'smodify');
         $user_action = $right[$param];
         if (!empty($user_action)) {
             Common::getUserRight('line', $user_action);
         }
     } else {
         if ($action == 'add') {
             Common::getUserRight('line', 'sadd');
         } else {
             if ($action == 'edit') {
                 Common::getUserRight('line', 'smodify');
             } else {
                 if ($action == 'day') {
                     $param = $this->params['action'];
                     $right = array('add' => 'slook', 'save' => 'smodify', 'del' => 'sdelete');
                     $user_action = $right[$param] ? $right[$param] : 'slook';
                     if (!empty($user_action)) {
                         Common::getUserRight('lineday', $user_action);
                     }
                 } else {
                     if ($action == 'price') {
                         $param = $this->params['action'];
                         $right = array('add' => 'slook', 'save' => 'smodify', 'del' => 'sdelete');
                         $user_action = $right[$param] ? $right[$param] : 'slook';
                         if (!empty($user_action)) {
                             Common::getUserRight('lineprice', $user_action);
                         }
                     } else {
                         if ($action == 'content') {
                             $param = $this->params['action'];
                             $right = array('save' => 'smodify');
                             $user_action = $right[$param] ? $right[$param] : 'slook';
                             if (!empty($user_action)) {
                                 Common::getUserRight('linejieshao', $user_action);
                             }
                         } else {
                             if ($action == 'ajax_linesave') {
                                 Common::getUserRight('line', 'smodify');
                             }
                         }
                     }
                 }
             }
         }
     }
     $this->assign('parentkey', $this->params['parentkey']);
     $this->assign('itemid', $this->params['itemid']);
     $this->assign('weblist', Common::getWebList());
     $this->assign('sysjiaotong', $this->jiaotong);
     //交通
     $this->assign('templetlist', Common::getUserTemplteList('line_show'));
 }
開發者ID:lz1988,項目名稱:stourwebcms,代碼行數:59,代碼來源:line.php

示例8: before

 public function before()
 {
     parent::before();
     Common::getUserRight('exchange', 'smodify');
     $this->assign('parentkey', $this->params['parentkey']);
     $this->assign('itemid', $this->params['itemid']);
     $this->assign('weblist', Common::getWebList());
 }
開發者ID:lz1988,項目名稱:stourwebcms,代碼行數:8,代碼來源:exchange.php

示例9: before

 public function before()
 {
     parent::before();
     Common::getUserRight('databack', 'smodify');
     $this->assign('cmsurl', URL::site());
     $this->assign('parentkey', $this->params['parentkey']);
     $this->assign('itemid', $this->params['itemid']);
     $this->assign('weblist', Common::getWebList());
 }
開發者ID:lz1988,項目名稱:stourwebcms,代碼行數:9,代碼來源:databackup.php

示例10: before

 public function before()
 {
     parent::before();
     $this->assign('parentkey', $this->params['parentkey']);
     $this->assign('itemid', $this->params['itemid']);
     Common::getUserRight('email', 'smodify');
     $configinfo = ORM::factory('sysconfig')->getConfig(0);
     $this->assign('configinfo', $configinfo);
 }
開發者ID:lz1988,項目名稱:stourwebcms,代碼行數:9,代碼來源:email.php

示例11: before

 public function before()
 {
     parent::before();
     $action = $this->request->action();
     Common::getUserRight('kefu', 'smodify');
     $this->assign('parentkey', $this->params['parentkey']);
     $this->assign('itemid', $this->params['itemid']);
     $this->parentkey = $this->params['parentkey'];
     $this->itemid = $this->params['itemid'];
     $weblist = Common::getWebList();
     $this->assign('weblist', $weblist);
     $this->assign('helpico', Common::getIco('help'));
 }
開發者ID:lz1988,項目名稱:stourwebcms,代碼行數:13,代碼來源:kefu.php

示例12: before

 public function before()
 {
     parent::before();
     $action = $this->request->action();
     if ($action == 'car') {
         $param = $this->params['action'];
         $right = array('read' => 'slook', 'save' => 'smodify', 'delete' => 'sdelete', 'update' => 'smodify');
         $user_action = $right[$param];
         if (!empty($user_action)) {
             Common::getUserRight('car', $user_action);
         }
     } else {
         if ($action == 'add') {
             Common::getUserRight('car', 'sadd');
         } else {
             if ($action == 'edit') {
                 Common::getUserRight('car', 'smodify');
             } else {
                 if ($action == 'kind') {
                     $param = $this->params['action'];
                     $right = array('add' => 'sadd', 'save' => 'smodify', 'del' => 'sdelete');
                     $user_action = $right[$param] ? $right[$param] : 'slook';
                     if (!empty($user_action)) {
                         Common::getUserRight('cartype', $user_action);
                     }
                 } else {
                     if ($action == 'price') {
                         $param = $this->params['action'];
                         $right = array('add' => 'sadd', 'save' => 'smodify', 'del' => 'sdelete');
                         $user_action = $right[$param] ? $right[$param] : 'slook';
                         if (!empty($user_action)) {
                             Common::getUserRight('carprice', $user_action);
                         }
                     } else {
                         if ($action == 'ajax_carsave') {
                             Common::getUserRight('car', 'smodify');
                         }
                     }
                 }
             }
         }
     }
     $this->assign('parentkey', $this->params['parentkey']);
     $this->assign('itemid', $this->params['itemid']);
     $this->assign('weblist', Common::getWebList());
     $this->assign('carkindidlist', ORM::factory('car_kind')->where('webid=0')->get_all());
     $this->assign('templetlist', Common::getUserTemplteList('car_show'));
     //獲取上傳的用戶模板
 }
開發者ID:lz1988,項目名稱:stourwebcms,代碼行數:49,代碼來源:car.php

示例13: before

 public function before()
 {
     parent::before();
     $action = $this->request->action();
     if ($action == 'list') {
         $param = $this->params['action'];
         $right = array('read' => 'slook', 'save' => 'smodify', 'delete' => 'sdelete', 'update' => 'smodify');
         $user_action = $right[$param];
         if (!empty($user_action)) {
             Common::getUserRight('help', $user_action);
         }
     } else {
         if ($action == 'add') {
             Common::getUserRight('help', 'sadd');
         } else {
             if ($action == 'edit') {
                 Common::getUserRight('help', 'smodify');
             } else {
                 if ($action == 'ajax_save') {
                     Common::getUserRight('help', 'smodify');
                 } else {
                     if ($action == 'kind') {
                         $op = $this->params['action'];
                         if ($op == 'add') {
                             Common::getUserRight('helpattr', 'sadd');
                         } else {
                             if ($op == 'save') {
                                 Common::getUserRight('helpattr', 'smodify');
                             } else {
                                 if ($op == 'del') {
                                     Common::getUserRight('helpattr', 'sdelete');
                                 } else {
                                     Common::getUserRight('helpattr', 'slook');
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     $this->assign('parentkey', $this->params['parentkey']);
     $this->assign('itemid', $this->params['itemid']);
     $this->assign('weblist', Common::getWebList());
     $allmodule = ORM::factory('Model')->get_all();
     foreach ($allmodule as $item) {
         $this->type_arr[$item['id']] = $item['modulename'];
     }
 }
開發者ID:lz1988,項目名稱:stourwebcms,代碼行數:49,代碼來源:help.php

示例14: before

 public function before()
 {
     parent::before();
     $action = $this->request->action();
     if ($action == 'index') {
         $param = $this->params['action'];
         $right = array('read' => 'slook', 'addsub' => 'sadd', 'save' => 'smodify', 'delete' => 'sdelete', 'update' => 'smodify');
         $user_action = $right[$param];
         if (!empty($user_action)) {
             Common::getUserRight('startplace', $user_action);
         }
     }
     $this->assign('parentkey', $this->params['parentkey']);
     $this->assign('itemid', $this->params['itemid']);
 }
開發者ID:lz1988,項目名稱:stourwebcms,代碼行數:15,代碼來源:startplace.php

示例15: before

 public function before()
 {
     parent::before();
     $action = $this->request->action();
     if ($action == 'list') {
         $param = $this->params['action'];
         $right = array('read' => 'slook', 'save' => 'smodify', 'delete' => 'sdelete', 'update' => 'smodify');
         $user_action = $right[$param];
         if (!empty($user_action)) {
             Common::getUserRight('ticket', $user_action);
         }
     }
     $this->assign('parentkey', $this->params['parentkey']);
     $this->assign('itemid', $this->params['itemid']);
     $this->assign('weblist', Common::getWebList());
 }
開發者ID:lz1988,項目名稱:stourwebcms,代碼行數:16,代碼來源:ticket.php


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