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


PHP BaseHomeControl::__construct方法代码示例

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


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

示例1: __construct

 public function __construct()
 {
     parent::__construct();
     //读取语言包
     Language::read('member_groupbuy,home_cart_index');
     //检查抢购功能是否开启
     if (intval(C('groupbuy_allow')) !== 1) {
         showMessage(Language::get('groupbuy_unavailable'), urlShop(), '', 'error');
     }
     //分类导航
     $nav_link = array(0 => array('title' => Language::get('homepage'), 'link' => SHOP_SITE_URL), 1 => array('title' => Language::get('nc_groupbuy')));
     Tpl::output('nav_link_list', $nav_link);
     Tpl::setLayout('home_groupbuy_layout');
     Tpl::output('index_sign', 'groupbuy');
     if ($_GET['op'] != 'groupbuy_detail') {
         // 抢购价格区间
         $this->groupbuy_price = rkcache('groupbuy_price', true);
         Tpl::output('price_list', $this->groupbuy_price);
         $model_groupbuy = Model('groupbuy');
         // 线上抢购分类
         $this->groupbuy_classes = $model_groupbuy->getGroupbuyClasses();
         Tpl::output('groupbuy_classes', $this->groupbuy_classes);
         // 虚拟抢购分类
         $this->groupbuy_vr_classes = $model_groupbuy->getGroupbuyVrClasses();
         Tpl::output('groupbuy_vr_classes', $this->groupbuy_vr_classes);
         // 虚拟抢购城市
         $this->groupbuy_vr_cities = $model_groupbuy->getGroupbuyVrCities();
         Tpl::output('groupbuy_vr_cities', $this->groupbuy_vr_cities);
         Tpl::output('city_name', $this->groupbuy_vr_cities['name'][cookie('city_id')]);
     }
 }
开发者ID:dotku,项目名称:shopnc_cnnewyork,代码行数:31,代码来源:show_groupbuy.php

示例2: __construct

 public function __construct()
 {
     parent::__construct();
     //读取语言包
     Language::read('home_pointprod,home_voucher');
     //判断系统是否开启积分和积分中心功能
     if (C('points_isuse') != 1 || C('pointshop_isuse') != 1) {
         showMessage(Language::get('pointshop_unavailable'), 'index.php', 'html', 'error');
     }
     //根据op判断积分兑换功能是否开启
     if (in_array($_GET['op'], array('plist', 'pinfo')) && C('pointprod_isuse') != 1) {
         showMessage(Language::get('pointprod_unavailable'), 'index.php', 'html', 'error');
     }
     Tpl::output('index_sign', 'pointprod');
     //代金券模板状态
     $this->templatestate_arr = array('usable' => array(1, Language::get('voucher_templatestate_usable')), 'disabled' => array(2, Language::get('voucher_templatestate_disabled')));
     //领取的代金券状态
     $this->voucherstate_arr = array('unused' => array(1, Language::get('voucher_voucher_state_unused')), 'used' => array(2, Language::get('voucher_voucher_state_used')), 'expire' => array(3, Language::get('voucher_voucher_state_expire')));
     if ($_SESSION['is_login'] == '1') {
         $model = Model();
         if (C('pointprod_isuse') == 1) {
             //已选择兑换商品数
             $pcartnum = $model->table('points_cart')->where(array('pmember_id' => $_SESSION['member_id']))->count();
             Tpl::output('pcartnum', $pcartnum);
         }
         //查询会员信息
         $member_info = $model->table('member')->field('member_points,member_avatar')->where(array('member_id' => $_SESSION['member_id']))->find();
         Tpl::output('member_info', $member_info);
     }
 }
开发者ID:norain2050,项目名称:xingkang,代码行数:30,代码来源:pointprod.php

示例3: __construct

 /**
  * 构造函数 
  */
 public function __construct()
 {
     parent::__construct();
     //读取语言包
     Language::read('home_cart_index');
     //允许不登录就可以访问的op
     $op_arr = array('ajaxcart', 'add', 'drop');
     $op_str = '';
     $op_str = isset($_GET['op']) ? $_GET['op'] : $_POST['op'];
     if (!in_array($op_str, $op_arr) && !$_SESSION['member_id']) {
         $current_url = request_uri();
         redirect('index.php?act=login&ref_url=' . urlencode($current_url));
     }
     //验证该会员是否禁止购买
     $noallowbuyop_arr = array('step1', 'step2');
     $noallowbuyop_str = '';
     $noallowbuyop_str = isset($_GET['op']) ? $_GET['op'] : $_POST['op'];
     if (in_array($noallowbuyop_str, $noallowbuyop_arr)) {
         $member_model = Model('member');
         $member_id = intval($_SESSION['member_id']);
         $member_info = $member_model->infoMember(array('member_id' => "{$member_id}"));
         if (empty($member_info) || !$member_info['is_buy']) {
             showMessage(Language::get('cart_buy_noallow'), '', 'html', 'error');
         }
         unset($member_id);
         unset($member_info);
         unset($member_model);
     }
 }
开发者ID:my1977,项目名称:shopnc,代码行数:32,代码来源:cart.php

示例4: __construct

 public function __construct()
 {
     parent::__construct();
     Language::read("home_login_register,home_login_index");
     Tpl::output('hidden_nctoolbar', 1);
     Tpl::setLayout('login_layout');
 }
开发者ID:dotku,项目名称:shopnc_cnnewyork,代码行数:7,代码来源:connect_wx.php

示例5: __construct

 public function __construct()
 {
     parent::__construct();
     Tpl::setLayout('store_joinin_layout');
     $this->checkLogin();
     $model_seller = Model('seller');
     $seller_info = $model_seller->getSellerInfo(array('member_id' => $_SESSION['member_id']));
     if (!empty($seller_info)) {
         @header('location: index.php?act=seller_login');
     }
     if ($_GET['op'] != 'check_seller_name_exist' && $_GET['op'] != 'checkname') {
         $this->check_joinin_state();
     }
     $phone_array = explode(',', C('site_phone'));
     Tpl::output('phone_array', $phone_array);
     $model_help = Model('help');
     $condition = array();
     $condition['type_id'] = '99';
     //默认显示入驻流程;
     $list = $model_help->getShowStoreHelpList($condition);
     Tpl::output('list', $list);
     //左侧帮助类型及帮助
     Tpl::output('show_sign', 'joinin');
     Tpl::output('html_title', C('site_name') . ' - ' . '商家入驻');
     Tpl::output('article_list', '');
     //底部不显示文章分类
 }
开发者ID:dotku,项目名称:shopnc_cnnewyork,代码行数:27,代码来源:store_joinin.php

示例6: __construct

	/**
	 *	验证是否开启闲置功能
	 */
	public function __construct(){
		parent::__construct();
		Language::read('home_flea_index');
		if($GLOBALS['setting_config']['flea_isuse']!='1'){
			showMessage(Language::get('flea_index_unable'),'index.php','','error');
		}
	}
开发者ID:noikiy,项目名称:ejia,代码行数:10,代码来源:flea_class.php

示例7: __construct

 public function __construct()
 {
     parent::__construct();
     //读取语言包
     Language::read('home_store_class_index');
     $lang = Language::getLangContent();
     //分类导航
 }
开发者ID:noikiy,项目名称:shop-2,代码行数:8,代码来源:store_list.php

示例8: __construct

 public function __construct()
 {
     parent::__construct();
     Language::read("home_login_register,home_login_index");
     Tpl::output('hidden_nctoolbar', 1);
     $model_member = Model('member');
     $model_member->checkloginMember();
 }
开发者ID:dotku,项目名称:shopnc_cnnewyork,代码行数:8,代码来源:connect_sms.php

示例9: __construct

 public function __construct()
 {
     parent::__construct();
     //读取语言包
     Language::read('member_groupbuy,home_cart_index');
     //检查团购功能是否开启
     if (intval($GLOBALS['setting_config']['groupbuy_allow']) !== 1) {
         showMessage(Language::get('groupbuy_unavailable'), 'index.php', '', 'error');
     }
 }
开发者ID:noikiy,项目名称:ecmall,代码行数:10,代码来源:show_groupbuy.php

示例10: __construct

 public function __construct()
 {
     parent::__construct();
     //读取语言包
     Language::read('member_groupbuy,home_cart_index,live_groupbuy');
     //分类导航
     $nav_link = array(0 => array('title' => Language::get('homepage'), 'link' => 'index.php'), 1 => array('title' => Language::get('nc_groupbuy')));
     Tpl::output('nav_link_list', $nav_link);
     Tpl::output('index_sign', 'groupbuy');
     Tpl::setLayout('home_groupbuy_layout');
 }
开发者ID:mengtaolin,项目名称:shopping,代码行数:11,代码来源:show_live_groupbuy.php

示例11: __construct

 public function __construct()
 {
     parent::__construct();
     /**
      * 设置模板文件夹路径
      */
     Tpl::setDir('home');
     /**
      * 设置布局文件内容
      */
     Tpl::setLayout('member_show_layout');
 }
开发者ID:noikiy,项目名称:shopnc-2,代码行数:12,代码来源:membershow.php

示例12: __construct

 public function __construct()
 {
     parent::__construct();
     //读取语言包
     Language::read('member_groupbuy,home_cart_index');
     //检查团购功能是否开启
     if (intval($GLOBALS['setting_config']['groupbuy_allow']) !== 1) {
         showMessage(Language::get('groupbuy_unavailable'), 'index.php', '', 'error');
     }
     //分类导航
     $nav_link = array(0 => array('title' => Language::get('homepage'), 'link' => 'index.php'), 1 => array('title' => Language::get('nc_groupbuy')));
     Tpl::output('nav_link_list', $nav_link);
 }
开发者ID:noikiy,项目名称:nc-1,代码行数:13,代码来源:show_groupbuy.php

示例13: __construct

	public function __construct(){
		parent::__construct();
		Language::read("home_login_register,home_login_index,home_sconnect");
		/**
		 * 判断新浪微博登录功能是否开启
		 */
		if (C('sina_isuse') != 1){
			showMessage(Language::get('home_sconnect_unavailable'),'index.php','html','error');
		}
		if (!$_SESSION['slast_key']){
			showMessage(Language::get('home_sconnect_error'),'index.php','html','error');
		}
		Tpl::output('hidden_nctoolbar', 1);
	}
开发者ID:noikiy,项目名称:ejia,代码行数:14,代码来源:sconnect.php

示例14: __construct

 public function __construct()
 {
     parent::__construct();
     Tpl::setLayout('store_joinin_layout');
     $this->checkLogin();
     $model_seller = Model('seller');
     $seller_info = $model_seller->getSellerInfo(array('member_id' => $_SESSION['member_id']));
     if (!empty($seller_info)) {
         @header('location: index.php?act=seller_login');
     }
     if ($_GET['op'] != 'check_seller_name_exist') {
         $this->check_joinin_state();
     }
 }
开发者ID:wangjiang988,项目名称:ukshop,代码行数:14,代码来源:store_joinin_c2c.php

示例15: __construct

 /**
  * 活动验证
  */
 public function __construct()
 {
     parent::__construct();
     $model_wheel = Model('wheel');
     $wheel_info = $model_wheel->field('wheel_start_time, wheel_end_time')->where('wheel_isuse = 1')->find();
     if ($wheel_info == false) {
         uk86_showMessage('活动不存在', 'index.php');
     }
     if ($wheel_info['wheel_start_time'] > time()) {
         uk86_showMessage('活动未开始', 'index.php');
     } elseif ($wheel_info['wheel_end_time'] < time()) {
         uk86_showMessage('活动已结束', 'index.php');
     }
 }
开发者ID:wangjiang988,项目名称:ukshop,代码行数:17,代码来源:pc_wheel.php


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