本文整理汇总了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();
}