function modify() { global $lll, $siteDemo, $allowedMethods; $found = FALSE; if ($siteDemo || !class_exists('rss')) { // It is disabled to save these attributes in the demo version: foreach (array("extraHead", "extraBody", "extraTopContent", "extraBottomContent", "extraFooter", "logoImage", "headerBackground") as $attr) { if (!empty($this->{$attr})) { $found = TRUE; $this->{$attr} = ""; } } } foreach (array("homeLocation", "redirectFirstLogin", "redirectLogin", "redirectAdminLogin") as $attr) { $ctrl = new AppController(); if ($this->{$attr}) { if (!$ctrl->init($this->{$attr}) || !isset($allowedMethods[$ctrl->method]) || !class_exists($ctrl->getClass())) { return Roll::setFormInvalid("invalidInternalLink", $this->{$attr}); } } } modify($this); $this->uploadImages(); if ($found) { Roll::setInfoText("This feature is not available in the Lite (and demo) version of the program!"); } }
function init($ctx) { parent::init($ctx); array_unshift($this->view_path, 'views_mobile'); session_start(); $this->openid = $_SESSION['wx_openid']; $this->layout = 'v2_layout'; }
public function init() { parent::init(); global $databaseConfig; SS_Log::log(new Exception(print_r($databaseConfig, true)), SS_Log::NOTICE); $this->dbType = $databaseConfig['type']; $_REQUEST['showqueries'] = 1; }
public function init() { /* Initialize action controller here */ parent::init(); $this->auth = AuthFactory::create(AuthFactory::$AGENT, $this->db, $this->_request); $this->chatRequestModel = new Chat_Request($this->db); $this->chatSessionModel = new Chat_Session($this->db); $this->appChatRequestModel = new App_ChatRequest(); $this->leadModel = new App_Lead(); $this->agentModel = new App_Agent(); }
/** * !CodeTemplates.overridecomment.nonjd! * @see CController::init() */ public function init() { parent::init(); if ($this->_setting['site_status'] == 'close') { //网站关闭 $encode_intro = CHtml::encode($this->_setting['site_status_intro']); $site_name = CHtml::encode($this->_setting['site_name']); echo <<<EOT <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"> <title>{$site_name}</title> </head> <body> <p style="width:800px; line-height:40px; margin:0 auto; margin-top:50px; color:#FFFFFF; text-align:center; background-color:#3C5880;">{$encode_intro}</p> </body> </html>\t EOT; exit; } //前端ip访问控制 $cur_ip = Yii::app()->request->userHostAddress; if ($this->_setting['deny_access_ip']) { $access_ips = explode("\r\n", trim($this->_setting['deny_access_ip'])); $access = Helper::ipAccess($cur_ip, $access_ips); if (!$access) { throw new CHttpException(403, '403 Forbidden!'); } } //主题设置 Yii::app()->theme = $this->_setting['theme']; $this->_stylePath = Yii::app()->theme->baseUrl . '/styles'; //菜单导航 $menus = Menu::model()->findAll('status =:status ORDER BY sort_order, id', array(':status' => 'Y')); $tree = new Xtree(); foreach ((array) $menus as $menu) { $data[] = $menu->attributes; } $tree->setTree($data, 'id', 'parent_id', array('menu_name', 'menu_link', 'unique', 'target')); $this->_public_menu = $tree->getArrayList(0); $this->_cur_url = Yii::app()->request->getUrl(); //登录状态 if (!Yii::app()->user->getIsGuest()) { $this->_login_status = true; } //加载公共资源 Yii::app()->clientScript->registerCssFile($this->_stylePath . "/css/global.css"); }
public function init() { parent::init(); $this->auth = AuthFactory::create(AuthFactory::$OWNER, $this->db, $this->_request); $this->model = new Owner_Owner($this->db); $this->model->setRequestObject($this->_request); $this->ownerModel = new App_Owner(); $this->timezoneModel = new App_Timezone(); $this->timezoneGroupModel = new App_TimezoneGroup(); $this->businessTypeModel = new App_BusinessType(); $this->numberOfHitModel = new App_NumberOfHit(); $this->leadModel = new App_Lead(); $this->memberModel = new App_Member(); $this->baseUrlDashboard = $this->baseUrl . "/js/leadschat-dashboard"; }
public function init() { parent::init(); $this->_static_admin = 'styles'; }
public function init() { parent::init(); $this->model = new App_NumberOfHit(); }
public function init() { parent::init(); }
public function init() { parent::init(); $this->model = new App_Timezone(); }
public function init() { $this->leadModel = new App_Lead(); $this->ownerModel = new App_Owner(); parent::init(); }
public function init() { parent::init(); $this->model = new App_Agent(); }
public function init() { parent::init(); $this->model = new App_Country(); }
function init($ctx) { parent::init($ctx); // your codes here... }
protected function init() { parent::init(); }