当前位置: 首页>>代码示例>>PHP>>正文


PHP AddonsController::__construct方法代码示例

本文整理汇总了PHP中Home\Controller\AddonsController::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP AddonsController::__construct方法的具体用法?PHP AddonsController::__construct怎么用?PHP AddonsController::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Home\Controller\AddonsController的用法示例。


在下文中一共展示了AddonsController::__construct方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct()
 {
     parent::__construct();
     $this->model = M('Model')->getByName('e_iteam');
     $this->assign('model', $this->model);
     $this->assign('is_iteam', 1);
 }
开发者ID:HivenKay,项目名称:ESalon,代码行数:7,代码来源:AcademicController.class.php

示例2: __construct

 public function __construct()
 {
     parent::__construct();
     $this->token = get_token();
     $this->wecha_id = get_openid();
     // 读取配置
     $pay_config_db = M('payment_set');
     $paymentSet = $pay_config_db->where(array('token' => $this->token))->find();
     if ($paymentSet['wx_cert_pem'] && $paymentSet['wx_key_pem']) {
         $ids[] = $paymentSet['wx_cert_pem'];
         $ids[] = $paymentSet['wx_key_pem'];
         $map['id'] = array('in', $ids);
         $fileData = M('file')->where($map)->select();
         $downloadConfig = C(DOWNLOAD_UPLOAD);
         foreach ($fileData as $f) {
             if ($paymentSet['wx_cert_pem'] == $f['id']) {
                 $certpath = SITE_PATH . str_replace('/', '\\', substr($downloadConfig['rootPath'], 1) . $f['savepath'] . $f['savename']);
             } else {
                 $keypath = SITE_PATH . str_replace('/', '\\', substr($downloadConfig['rootPath'], 1) . $f['savepath'] . $f['savename']);
             }
         }
         $paymentSet['cert_path'] = $certpath;
         $paymentSet['key_path'] = $keypath;
     }
     $this->payConfig = $paymentSet;
     session('paymentinfo', $this->payConfig);
 }
开发者ID:chenpusn,项目名称:guoxian,代码行数:27,代码来源:WeixinController.class.php

示例3: __construct

 public function __construct()
 {
     parent::__construct();
     $this->SQL_QUERY_CANDIDATES = "SELECT *, COALESCE(T2.count2, 0) AS count FROM " . C('DB_PREFIX') . "wevote_candidates AS T1\nLEFT JOIN (SELECT COUNT(id) AS count2, candidate_id FROM " . C('DB_PREFIX') . "wevote_info GROUP BY candidate_id) AS T2\nON T1.id = T2.candidate_id\nWHERE (action_id = %d) AND (status = 1) %s\nORDER BY count DESC LIMIT %d, %d";
     $this->SQL_QUERY_CANDIDATES_LATEST = "SELECT *, COALESCE(T2.count2, 0) AS count FROM " . C('DB_PREFIX') . "wevote_candidates AS T1\nLEFT JOIN (SELECT COUNT(id) AS count2, candidate_id FROM " . C('DB_PREFIX') . "wevote_info GROUP BY candidate_id) AS T2\nON T1.id = T2.candidate_id\nWHERE (action_id = %d) AND (status = 1) %s\nORDER BY T1.datetime DESC LIMIT %d, %d";
     $this->SQL_QUERY_CANDIDATES_ALL = "SELECT *, COALESCE(T2.count2, 0) AS count FROM " . C('DB_PREFIX') . "wevote_candidates AS T1\nLEFT JOIN (SELECT COUNT(id) AS count2, candidate_id FROM " . C('DB_PREFIX') . "wevote_info GROUP BY candidate_id) AS T2\nON T1.id = T2.candidate_id\nWHERE (action_id = %d) AND (status = 1) %s\nORDER BY T1.id DESC LIMIT %d, %d";
     $this->SQL_QUERY_VoteInfo = "SELECT c.title,COUNT(0) num FROM " . C('DB_PREFIX') . "wevote_voters AS v\nLEFT JOIN  " . C('DB_PREFIX') . "wevote_info i ON v.id = i.voter_id\nLEFT JOIN " . C('DB_PREFIX') . "wevote_candidates c ON i.candidate_id = c.id\nWHERE (v.openid = '%s') AND (v.action_id = %d) GROUP BY c.title";
 }
开发者ID:Backflag,项目名称:weiphp2.0.1202,代码行数:8,代码来源:HomeController.class.php

示例4: __construct

 public function __construct()
 {
     parent::__construct();
     $this->model = M('Model')->getByName($_REQUEST['_controller']);
     $this->model || $this->error('模型不存在!');
     $this->assign('model', $this->model);
     $this->option = M('Model')->getByName('vote_option');
     $this->assign('option', $this->option);
 }
开发者ID:pondyond,项目名称:WeiPHP,代码行数:9,代码来源:VoteController.class.php

示例5: __construct

 public function __construct()
 {
     parent::__construct();
     $this->token = get_token();
     $this->wecha_id = get_openid();
     // 读取配置
     $alipay_config_db = M('payment_set');
     $this->alipayConfig = $alipay_config_db->where(array('token' => $this->token))->find();
 }
开发者ID:LukeChow1018,项目名称:weixin,代码行数:9,代码来源:AlipayController.class.php

示例6: __construct

 public function __construct()
 {
     parent::__construct();
     $this->model = M('Model')->getByName('coupons');
     $this->assign('model', $this->model);
     if (empty(session('used_shop')) && empty(cookie("used_shop")) && !is_login()) {
         $this->error("商家未登录");
         die;
     }
 }
开发者ID:HivenKay,项目名称:ESalon,代码行数:10,代码来源:CouponsController.class.php

示例7: U

 function __construct()
 {
     parent::__construct();
     $Join2011Addon = new Join2011Addon();
     $_config = $Join2011Addon->getConfig();
     if ($_config['openReg'] == 0) {
         $this->error("报名通道目前关闭", U('Home/Index/index'));
     }
     if (strtotime($_config['endTime']) - time() < 0) {
         $this->error("报名已经截至", U('Home/Index/index'));
     }
 }
开发者ID:jackycgq,项目名称:GreenCMS,代码行数:12,代码来源:Join2011Controller.class.php

示例8: __construct

 public function __construct()
 {
     if (_ACTION == 'show') {
         $GLOBALS['is_wap'] = true;
     }
     parent::__construct();
     $this->model = getModelByName($_REQUEST['_controller']);
     $this->model || $this->error('模型不存在!');
     $this->assign('model', $this->model);
     $this->option = getModelByName('vote_option');
     $this->assign('option', $this->option);
     $this->vlog = getModelByName('vote_log');
     $this->assign('vlog', $this->vlog);
 }
开发者ID:yxz1025,项目名称:weiphp3.0,代码行数:14,代码来源:VoteController.class.php

示例9: __construct

 public function __construct()
 {
     parent::__construct();
     $this->model = getModelByName($_REQUEST['_controller']);
     $this->model || $this->error('模型不存在!');
     $this->assign('model', $this->model);
     $this->option = getModelByName('xydzp_option');
     $this->assign('option', $this->option);
     $this->jplist = getModelByName('xydzp_jplist');
     $this->assign('jplist', $this->jplist);
     $arr = array('lists', 'add', 'edit');
     $action = strtolower(_ACTION);
     $res['title'] = '幸运大转盘';
     $res['url'] = addons_url('Xydzp://Xydzp/lists');
     $res['class'] = in_array($action, $arr) ? 'current' : '';
     $nav[] = $res;
     $arr = array('jpoplists', 'jpopadd', 'jpopedit');
     $res['title'] = '奖品库管理';
     $res['url'] = addons_url('Xydzp://Xydzp/jpoplists');
     $res['class'] = in_array($action, $arr) ? 'current' : '';
     $nav[] = $res;
     $res['title'] = '功能设置';
     $res['url'] = addons_url('Xydzp://Xydzp/config');
     $res['class'] = $action == 'config' ? 'current' : '';
     $nav[] = $res;
     $arr = array('zjloglists', 'zjlogadd', 'zjlogedit');
     if (in_array($action, $arr)) {
         $res['title'] = '中奖记录';
         $res['url'] = addons_url('Xydzp://Xydzp/zjloglists');
         $res['class'] = 'current';
         $nav[] = $res;
     }
     $arr = array('jplists', 'jpadd', 'jpedit');
     if (in_array($action, $arr)) {
         $res['title'] = '奖品设置';
         $res['url'] = addons_url('Xydzp://Xydzp/jplists');
         $res['class'] = 'current';
         $nav[] = $res;
     }
     $this->assign('nav', $nav);
 }
开发者ID:ennnnny,项目名称:weiphp3,代码行数:41,代码来源:XydzpController.class.php

示例10: __construct

 public function __construct()
 {
     parent::__construct();
     $this->model = $this->getModel('shop_vote');
     $this->model || $this->error('模型不存在!');
 }
开发者ID:chenpusn,项目名称:haozhixian_bak,代码行数:6,代码来源:ShopVoteController.class.php

示例11: M

 function __construct()
 {
     parent::__construct();
     $this->model = M('Model')->getByName('e_iteam_type');
     $this->assign('model', $this->model);
 }
开发者ID:HivenKay,项目名称:ESalon,代码行数:6,代码来源:IteamTypeController.class.php

示例12: __construct

 public function __construct()
 {
     parent::__construct();
     $this->model = M('Model')->getByName('credit');
     $this->assign('model', $this->model);
 }
开发者ID:HivenKay,项目名称:ESalon,代码行数:6,代码来源:CreditController.class.php


注:本文中的Home\Controller\AddonsController::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。