function _initialize() { parent::_initialize(); $this->job_model = D("Common/Job"); $this->job_category_model = D("Common/JobCategory"); $this->area_model = D("Common/Area"); }
function _initialize() { parent::_initialize(); $this->servers_model = D("Server/Servers"); $this->order_model = D("Server/Order"); $this->serversell_model = D("Server/ServersSell"); }
public function __construct() { parent::__construct(); $this->setSiteId(); $this->getMenuData(); $this->getSiteData(); $this->getDate(); //判断是否微信访问 if ($this->_isWeiXin()) { //判断是否进入详细页面 if (ACTION_NAME == 'info') { $this->Oauth(); import("Think.WX.jssdk"); $model_config = D("WxConfig"); $appid = $model_config->where("`key`='appid'")->getField("value"); $appsecret = $model_config->where("`key`='appsecret'")->getField("value"); $this->jssdk = new \JSSDK($appid, $appsecret); $signPackage = $this->jssdk->GetSignPackage(); $this->assign("signPackage", $signPackage); $web = $model_config->where("`key`='web'")->getField("value"); $this->assign("table", MODULE_NAME); $this->assign("web", $web); $this->assign("uid", $this->wx_user['uid']); $this->assign("is_weixin", true); } } }
public function _initialize() { parent::_initialize(); $this->cposts_model = D('Common/Cposts'); $this->posts_model = D('Common/Posts'); $this->cterm_relationships_model = D('Common/CtermRelationships'); $this->term_relationships_model = D('Common/TermRelationships'); $this->terms_model = D('Common/Terms'); }
function _initialize() { parent::_initialize(); $this->product_model = D("Common/Product"); $this->story_model = D("Common/Story"); $this->store_model = D("Common/Store"); $this->activity_model = D("Common/Activity"); $this->headimg_model = D("Common/HeadImg"); }
public function _initialize() { parent::_initialize(); if (!$_SESSION['user']['id']) { $this->redirect(U('User/login/index')); } $this->user = M('Member')->where(array("id" => $_SESSION['user']['id']))->find(); $this->assign('user', $this->user); $this->jobs = new JobsModel(); }
public function _initialize() { parent::_initialize(); if (!$_SESSION['user']['id']) { $this->redirect(U('User/login/index')); } $this->order_obj = D('Common/Order'); $this->user = M('Member')->where(array("id" => $_SESSION['user']['id']))->find(); $this->assign('user', $this->user); }
public function __construct() { parent::__construct(); header("Content-Type: text/html; charset=utf-8"); $this->setModelConfig(); $this->setModelUser(); //$this->openid = 'ox1QntxmnsVy0UYOxIDOGUfPCgqE'; if ($_GET['openid'] && IS_AJAX) { $this->openid = $_GET['openid']; $this->user = $this->model_user->where("openid='{$this->openid}' and is_subscribe=1")->find(); $this->user['score'] = D("Users")->where("openid='{$this->openid}'")->getField("score"); $this->user['uid'] = D("Users")->where("openid='{$this->openid}'")->getField("id"); } else { $this->Oauth(); } }
public function __construct() { parent::__construct(); header("Content-Type: text/html; charset=utf-8"); $this->setModelConfig(); $this->setModelUser(); //$this->openid = 'ox1QntxmnsVy0UYOxIDOGUfPCgqE'; if ($_GET['openid'] && IS_AJAX) { $this->openid = $_GET['openid']; $this->user = $this->model_user->where("openid='{$this->openid}' and is_subscribe=1")->find(); $this->user['score'] = D("Users")->where("openid='{$this->openid}'")->getField("score"); $this->user['uid'] = D("Users")->where("openid='{$this->openid}'")->getField("id"); } else { $this->Oauth(); //初始化jssdk信息 import("Think.WX.jssdk"); $this->jssdk = new \JSSDK($this->getAppid(), $this->getAppsecret()); $signPackage = $this->jssdk->GetSignPackage(); $this->assign("signPackage", $signPackage); } }
function _initialize() { parent::_initialize(); $this->check_login(); $this->check_user(); }
function _initialize() { parent::_initialize(); $this->qiushi_model = D("Qiushi"); }
public function __construct() { parent::__construct(); }
function _initialize() { parent::_initialize(); $this->a_class = array("粤", "冀", "陕", "吉", "京", "沪", "苏", "鄂", "琼", "渝", "甘", "黑", "宁", "青", "贵", "新", "浙", "皖", "湘"); }