當前位置: 首頁>>代碼示例>>PHP>>正文


PHP BaseHomeControl類代碼示例

本文整理匯總了PHP中BaseHomeControl的典型用法代碼示例。如果您正苦於以下問題:PHP BaseHomeControl類的具體用法?PHP BaseHomeControl怎麽用?PHP BaseHomeControl使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了BaseHomeControl類的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類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。