예제 #1
0
 function _initialize()
 {
     parent::_initialize();
     $this->job_model = D("Common/Job");
     $this->job_category_model = D("Common/JobCategory");
     $this->area_model = D("Common/Area");
 }
예제 #2
0
 function _initialize()
 {
     parent::_initialize();
     $this->servers_model = D("Server/Servers");
     $this->order_model = D("Server/Order");
     $this->serversell_model = D("Server/ServersSell");
 }
예제 #3
0
 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);
         }
     }
 }
예제 #4
0
 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');
 }
예제 #5
0
 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");
 }
예제 #6
0
 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();
 }
예제 #7
0
 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);
 }
예제 #8
0
 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();
     }
 }
예제 #9
0
 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();
 }
예제 #11
0
 function _initialize()
 {
     parent::_initialize();
     $this->qiushi_model = D("Qiushi");
 }
예제 #12
0
 public function __construct()
 {
     parent::__construct();
 }
예제 #13
0
 function _initialize()
 {
     parent::_initialize();
     $this->a_class = array("粤", "冀", "陕", "吉", "京", "沪", "苏", "鄂", "琼", "渝", "甘", "黑", "宁", "青", "贵", "新", "浙", "皖", "湘");
 }