当前位置: 首页>>代码示例>>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;未经允许,请勿转载。