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(); }
public function before() { parent::before(); $this->assign('parentkey', $this->params['parentkey']); $this->assign('itemid', $this->params['itemid']); $this->assign('channelArr', json_encode($this->channelArr)); }
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')); //获取上传的用户模板 }
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()); }
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')); }
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); }
public function before() { parent::before(); $this->assign('parentkey', $this->params['parentkey']); $this->assign('itemid', $this->params['itemid']); $this->link = new Model_Tool_Link(); }
public function before() { parent::before(); $this->assign('seoinfo', Common::getChannelSeo(3)); $this->assign('cmsurl', URL::site()); $this->assign('website', Common::getWebUrl()); }
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')); //获取上传的用户模板 }
public function before() { parent::before(); $this->assign('parentkey', $this->params['parentkey']); $this->assign('itemid', $this->params['itemid']); $this->assign('engine_list', json_encode($this->engine_list)); }
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')); }
public function before() { parent::before(); $this->assign('parentkey', $this->params['parentkey']); $this->assign('itemid', $this->params['itemid']); $this->assign('weblist', Common::getWebList()); $this->basefolder = BASEPATH . '/templets/smore/uploadtemplets/'; }
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()); }
public function before() { parent::before(); $refer_url = $_SERVER['HTTP_REFERER'] ? $_SERVER['HTTP_REFERER'] : $GLOBALS['cfg_cmsurl']; $this->assign('backurl', $refer_url); $this->user = $GLOBALS['userinfo']; $this->mid = $this->user['mid'] ? $this->user['mid'] : 0; }
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); }
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()); }
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')); }
public function before() { parent::before(); $session = Session::instance(); $roleid = $session->get('roleid'); if ($roleid != 1) { exit(__('onlysys')); } $this->assign('cmsurl', URL::site()); $this->assign('parentkey', $this->params['parentkey']); $this->assign('itemid', $this->params['itemid']); $this->assign('weblist', Common::getWebList()); }
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']; } }
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')); //获取上传的用户模板 }
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']); }
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()); }
public function before() { parent::before(); $this->assign('parentkey', $this->params['parentkey']); $this->assign('itemid', $this->params['itemid']); Common::getUserRight('msg', 'smodify'); include BASEPATH . '/include/msg.class.php'; $configinfo = ORM::factory('sysconfig')->getConfig(0); $this->assign('configinfo', $configinfo); $uname = $configinfo['cfg_sms_username']; $upass = $configinfo['cfg_sms_password']; $this->uname = $uname; $this->upass = $upass; $sms = new Msg($uname, $upass); $this->sms = $sms; }
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->addmodule = ORM::factory('model')->where("id>13")->get_all(); $this->typeid = $this->params['typeid']; $this->modulename = Model_Model::getModuleName($this->typeid); $this->assign('typeid', $this->typeid); $this->assign('modulename', $this->modulename); foreach (self::$kind as $key => $row) { self::$kind[$key]['url'] = str_replace('{#typeid#}', $this->typeid, $row['url']); self::$kind[$key]['itemid'] = str_replace('{#typeid#}', $this->typeid, $row['itemid']); } }
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('jieban', $user_action); } } $status = array(array('status' => 0, 'statusname' => '未审核'), array('status' => 1, 'statusname' => '已开启'), array('status' => 2, 'statusname' => '已成团')); $this->assign('parentkey', $this->params['parentkey']); $this->assign('itemid', $this->params['itemid']); $this->assign('typeid', 11); $this->assign('statuslist', json_encode($status)); }
public function before() { parent::before(); $action = $this->request->action(); $type_id = $this->params['typeid'] ? $this->params['typeid'] : 1; $right_arr = array('1' => 'lineattr', '2' => 'hotelattr', '3' => 'carattr', '4' => 'articleattr', '5' => 'spotattr', '6' => 'photoattr', '12' => 'destattr', '13' => 'tuanattr'); $right_moduleid = $right_arr[$type_id]; if ($type_id < 14) { if ($action == 'list') { $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('typeid', $this->params['typeid']); }
public function before() { parent::before(); $action = $this->request->action(); $moduleids = array('1' => 'lineorder', '2' => 'hotelorder', '3' => 'carorder', '5' => 'spotorder', '8' => 'visaorder', '13' => 'tuanorder'); if ($action == 'index') { $param = $this->params['action']; $typeid = $this->params['typeid']; $right = array('read' => 'slook', 'save' => 'smodify', 'delete' => 'sdelete', 'update' => 'smodify'); $user_action = $right[$param]; $moduleid = $moduleids[$typeid]; if (!empty($user_action)) { Common::getUserRight($moduleid, $user_action); } } else { if ($action == 'view') { $type = $this->params['type']; //订单类型 $typeid = $this->params['typeid']; if (!empty($typeid)) { $moduleid = $moduleids[$typeid]; } else { if ($type == 'dz') { $moduleid = 'dzorder'; } else { if ($type == 'xy') { $moduleid = 'xyorder'; } } } Common::getUserRight($moduleid, 'slook'); } else { if ($action == 'ajax_save') { $type = Arr::get($_POST, 'type'); //订单类型 $typeid = Arr::get($_POST, 'typeid'); if (!empty($typeid)) { $moduleid = $moduleids[$typeid]; } else { if ($type == 'dz') { $moduleid = 'dzorder'; } else { if ($type == 'xy') { $moduleid = 'xyorder'; } } } Common::getUserRight($moduleid, 'smodify'); } else { if ($action == 'dz') { $param = $this->params['action']; $right = array('read' => 'slook', 'save' => 'smodify', 'delete' => 'sdelete', 'update' => 'smodify'); $user_action = $right[$param]; if (!empty($user_action)) { Common::getUserRight('dzorder', $user_action); } } else { if ($action == 'xy') { $param = $this->params['action']; $right = array('read' => 'slook', 'save' => 'smodify', 'delete' => 'sdelete', 'update' => 'smodify'); $user_action = $right[$param]; if (!empty($user_action)) { Common::getUserRight('xyorder', $user_action); } } } } } } $this->assign('parentkey', $this->params['parentkey']); $this->assign('itemid', $this->params['itemid']); }
public function before() { parent::before(); }
public function before() { parent::before(); $this->assign('cmsurl', URL::site()); }
public function before() { parent::before(); $this->assign('parentkey', $this->params['parentkey']); $this->assign('itemid', $this->params['itemid']); }