本文整理汇总了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);
}
示例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);
}
示例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";
}
示例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);
}
示例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();
}
示例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;
}
}
示例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'));
}
}
示例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);
}
示例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);
}
示例10: __construct
public function __construct()
{
parent::__construct();
$this->model = $this->getModel('shop_vote');
$this->model || $this->error('模型不存在!');
}
示例11: M
function __construct()
{
parent::__construct();
$this->model = M('Model')->getByName('e_iteam_type');
$this->assign('model', $this->model);
}
示例12: __construct
public function __construct()
{
parent::__construct();
$this->model = M('Model')->getByName('credit');
$this->assign('model', $this->model);
}