/** * 初始化 */ public function init() { parent::init(); $this->lang = Tudu_Lang::getInstance()->load(array('common', 'setting')); $this->_access = array('skin' => $this->_user->getAccess()->isAllowed(Tudu_Access::PERM_CUSTOM_SKIN)); $this->view->access = $this->_access; $this->view->LANG = $this->lang; }
public function init() { parent::init(); $this->_helper->viewRenderer->setNeverRender(); $this->lang = Tudu_Lang::getInstance()->load(array('common', 'tudu')); if (!$this->_user->isLogined()) { return $this->json(false, $this->lang['login_timeout']); } Tudu_Dao_Manager::setDbs(array(Tudu_Dao_Manager::DB_MD => $this->multidb->getDefaultDb(), Tudu_Dao_Manager::DB_TS => $this->getTsDb())); }
/** * 初始化 */ public function init() { parent::init(); if (!in_array($this->_user->email, $this->_allow)) { $this->_redirect('http://www.tudu.com/'); exit; } $this->_helper->viewRenderer->view->setBasePath(APPLICATION_PATH . '/modules/query/views'); $this->_helper->viewRenderer->setViewScriptPathSpec(':module#:controller#:action.:suffix'); }
/** * 初始化 * * 检测用户登录状态 * 检查APP用户权限 */ public final function init() { parent::init(); Tudu_Dao_Manager::setDbs(array(Tudu_Dao_Manager::DB_MD => $this->multidb->getDefaultDb(), Tudu_Dao_Manager::DB_TS => $this->getTsDb())); $appInfo = $this->_getAppInfo(); $actionName = $this->_request->getActionName(); // 没有使用权限 if ($actionName != 'disable' && (null === $appInfo || $appInfo->orgId != $this->_user->orgId)) { return $this->jump('./disable'); } $this->_init(); }
/** * 初始化 */ public function init() { parent::init(); $action = strtolower($this->_request->getActionName()); if ($action !== 'status') { $this->lang = Tudu_Lang::getInstance()->load(array('common', 'email')); $this->view->access = array('skin' => $this->_user->getAccess()->isAllowed(Tudu_Access::PERM_CUSTOM_SKIN)); $this->view->LANG = $this->lang; } else { $this->lang = Tudu_Lang::getInstance()->load(array('common')); } $this->_daoEmail = $this->getMdDao('Dao_Md_User_Email'); }
public function init() { parent::init(); if (!$this->_user->isLogined()) { return $this->json(false, $this->lang['login_timeout']); } Tudu_AddressBook::getInstance()->setCache($this->cache); $this->lang = Tudu_Lang::getInstance()->load(array('common', 'tudu')); Tudu_Dao_Manager::setDbs(array(Tudu_Dao_Manager::DB_MD => $this->multidb->getDefaultDb(), Tudu_Dao_Manager::DB_TS => $this->getTsDb())); $resourceManager = new Tudu_Model_ResourceManager_Registry(); $resourceManager->setResource(Tudu_Model::RESOURCE_CONFIG, $this->bootstrap->getOptions()); Tudu_Model::setResourceManager($resourceManager); }
/** * 初始化 */ public function init() { parent::init(); $this->lang = Tudu_Lang::getInstance()->load(array('common', 'label')); if (!$this->_user->isLogined()) { $this->jump(null, array('error' => 'timeout')); } // IP或登录时间无效 if (!empty($this->session->auth['invalid'])) { $this->jump('/forbid/'); } $this->view->LANG = $this->lang; }
public function init() { $this->_helper->viewRenderer->setNeverRender(); parent::init(); $this->lang = Tudu_Lang::getInstance()->load(array('common', 'tudu')); if (!$this->_user->isLogined()) { return $this->json(false, $this->lang['login_timeout']); } // IP或登录时间无效 if (!empty($this->session->auth['invalid'])) { return $this->json(false, $this->lang['forbid_access']); } Tudu_Dao_Manager::setDbs(array(Tudu_Dao_Manager::DB_MD => $this->multidb->getDefaultDb(), Tudu_Dao_Manager::DB_TS => $this->getTsDb())); $this->manager = Tudu_Tudu_Manager::getInstance(); }
/** * */ public function init() { if ($this->_request->getQuery('sid')) { $_COOKIE[session_name()] = $this->_request->getQuery('sid'); } if ($this->_request->getQuery('email')) { $_COOKIE['email'] = $this->_request->getQuery('email'); $_COOKIE['username'] = $this->_request->getQuery('email'); } if ($cookies = $this->_request->getParam('cookies')) { if ($cookies = @unserialize($cookies)) { foreach ($cookies as $key => $val) { $_COOKIE[$key] = $val; } } } parent::init(); // 取消缓冲区 $this->getFrontController()->getDispatcher()->setParam('disableOutputBuffering', true); }
/** * 初始化 * * * 获取APP请求的文件以及操作 * 判断APP使用 * 判断当前用户模块权限 */ public function init() { parent::init(); if (!$this->_user->isLogined()) { $this->jump(null, array('error' => 'timeout')); } $tsId = self::DEFAULT_TS_ID; if ($this->_user) { $tsId = $this->_user->tsId; } // 后台用户验证信息 /*if ($this->session->admin) { $this->_admin = Tudu_Admin_Admin::getInstance(); $this->_admin->setAttributes($this->session->admin); $this->_orgId = $this->_admin->orgId; $tsId = $this->_admin->tsId; }*/ Tudu_Dao_Manager::setDbs(array(Tudu_Dao_Manager::DB_MD => $this->multidb->getDefaultDb(), Tudu_Dao_Manager::DB_TS => $this->multidb->getDb('ts' . $tsId), Tudu_Dao_Manager::DB_APP => $this->multidb->getDb('app'))); }
/** * */ public function init() { parent::init(); $this->lang = Tudu_Lang::getInstance()->load(array('common', 'note')); $this->view->LANG = $this->lang; }
public function init() { parent::init(); //$this->_helper->viewRenderer->setNoRender(); $this->getFrontController()->getDispatcher()->setParam('disableOutputBuffering', true); }
public function init() { parent::init(); $this->_helper->viewRenderer->setNoRender(); }