本文整理匯總了PHP中BaseController::_initialize方法的典型用法代碼示例。如果您正苦於以下問題:PHP BaseController::_initialize方法的具體用法?PHP BaseController::_initialize怎麽用?PHP BaseController::_initialize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類BaseController
的用法示例。
在下文中一共展示了BaseController::_initialize方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: _initialize
public function _initialize()
{
parent::_initialize();
$json = $_POST['params'];
$this->params = json_decode($json, TRUE);
$this->assign('currentnav', '網站設置');
}
示例2: _initialize
protected function _initialize()
{
parent::_initialize();
$this->mInviteModel = D('Ucenter/Invite');
$this->mInviteTypeModel = D('Ucenter/InviteType');
$this->mInviteBuyLogModel = D('Ucenter/InviteBuyLog');
$this->mInviteUserInfoModel = D('Ucenter/InviteUserInfo');
}
示例3: _initialize
public function _initialize()
{
parent::_initialize();
//實例化模型
$this->d_ask = D('ask');
$this->d_object = D('Object');
$this->mid = is_login();
}
示例4: _initialize
public function _initialize()
{
parent::_initialize();
if (!is_login()) {
$this->error('對不起,請先登陸');
}
$this->d_ask = D('Ask');
$this->mid = is_login();
}
示例5: _initialize
protected function _initialize()
{
parent::_initialize();
$uid = isset($_GET['uid']) && ($_GET['uid'] = intval($_GET['uid'])) > 0 ? $_GET['uid'] : is_login();
//調用API獲取基本信息
$user_info = $this->userInfo($uid);
$this->_fans_and_following($uid, $user_info);
$this->_tab_menu();
}
示例6: _initialize
public function _initialize()
{
parent::_initialize();
$session = session('wcInfo');
$model = D();
$this->myInfo = $model->Table(array('1008_user' => 'us'))->where('us.id = ' . $session['id'])->find();
$myInfo = $this->myInfo;
$this->assign('myInfo', $myInfo);
}
示例7: _initialize
/**
* 初始化
*/
protected function _initialize()
{
parent::_initialize();
// 檢查用戶登錄狀態
$this->assign('currUser', $this->currUser);
if (!$this->isLogined) {
exit('<script>top.location.href="' . U('Public/login') . '";</script>');
}
}
示例8: _initialize
public function _initialize()
{
parent::_initialize();
//實例化模型
if (!($mid = is_login())) {
$this->error('對不起,請先登陸');
}
$this->mid = $mid;
$this->d_object = D('object');
}
示例9: _initialize
protected function _initialize()
{
parent::_initialize();
if (!is_login()) {
$this->error('請登陸後再訪問本頁麵。');
}
$this->setTitle('編輯資料');
$this->_assignSelf();
$this->_haveOtherRole();
}
示例10: _initialize
protected function _initialize()
{
parent::_initialize();
if (session('?uid') && is_login() > 0) {
if (!defined("UID")) {
define('UID', session('uid'));
}
} else {
$this->error(L('ERR_SESSION_TIMEOUT'), U('Public/logout'), 3);
}
}
示例11: _initialize
public function _initialize()
{
parent::_initialize();
$user_info = $this->user_info;
$identity = $user_info['identity'];
if (!is_login() || $identity == 0) {
$this->success('僅認證會員可操作');
}
$this->d_ask = D('Ask');
$this->mid = is_login();
}
示例12: _initialize
public function _initialize()
{
parent::_initialize();
//實例化模型
$this->d_property = D('Property');
$this->d_object = D('Object');
$this->mid = is_login();
//控製權限
if (!check_auth('Property')) {
// $this->error('對不起,隻有認證的機構用戶可以訪問該頁麵');
}
}
示例13: _initialize
public function _initialize()
{
parent::_initialize();
//實例化模型
$user_info = $this->user_info;
$identity = $user_info['identity'];
if (!($mid = is_login()) || $identity == 0) {
$this->success('僅認證會員可操作');
}
$this->mid = $mid;
$this->d_object = D('object');
}
示例14: _initialize
/**
* [_initialize 公共數據調用]
* @return [type] [description]
*/
public function _initialize()
{
parent::_initialize();
//欄目列表
$columnList = $this->getColumn();
$this->columnList = $columnList;
//麵包屑導航
$colId = I('colId', '1', 'int');
$columnParent = $this->getColumnParent($colId);
$this->columnParent = $columnParent;
$this->columnParentLength = count($columnParent);
$this->nowcol = $columnParent[0]['id'];
//獲取欄目詳情
$columnInfo = $this->getColumnInfo($colId);
$this->columnInfo = $columnInfo;
}
示例15: _initialize
protected function _initialize()
{
parent::_initialize();
}