本文整理匯總了PHP中Tpl::setLayout方法的典型用法代碼示例。如果您正苦於以下問題:PHP Tpl::setLayout方法的具體用法?PHP Tpl::setLayout怎麽用?PHP Tpl::setLayout使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Tpl
的用法示例。
在下文中一共展示了Tpl::setLayout方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: indexOp
/**
* 店鋪開店頁
*
*/
public function indexOp()
{
Language::read("home_login_index");
$code_info = C('store_joinin_pic');
$info['pic'] = array();
if (!empty($code_info)) {
$info = unserialize($code_info);
}
Tpl::output('pic_list', $info['pic']);
//首頁圖片
Tpl::output('show_txt', $info['show_txt']);
//貼心提示
$model_help = Model('help');
$condition['type_id'] = '1';
//入駐指南
$help_list = $model_help->getHelpList($condition, '', 4);
//顯示4個
Tpl::output('help_list', $help_list);
Tpl::output('article_list', '');
//底部不顯示文章分類
Tpl::output('show_sign', 'joinin');
Tpl::output('html_title', C('site_name') . ' - ' . '商家入駐');
Tpl::setLayout('store_joinin_layout');
Tpl::showpage('store_joinin');
}
示例2: indexOp
/**
* 店鋪幫助頁
*
*/
public function indexOp()
{
$model_help = Model('help');
$list = $model_help->getShowStoreHelpList();
$type_id = intval($_GET['t_id']);
//幫助類型編號
if ($type_id < 1 || empty($list[$type_id])) {
$type_array = current($list);
$type_id = $type_array['type_id'];
}
Tpl::output('type_id', $type_id);
$help_id = intval($_GET['help_id']);
//幫助編號
if ($help_id < 1 || empty($list[$type_id]['help_list'][$help_id])) {
$help_array = current($list[$type_id]['help_list']);
$help_id = $help_array['help_id'];
}
Tpl::output('help_id', $help_id);
$help = $list[$type_id]['help_list'][$help_id];
Tpl::output('list', $list);
//左側幫助類型及幫助
Tpl::output('help', $help);
//當前幫助
Tpl::output('article_list', '');
//底部不顯示首頁的文章分類
$phone_array = explode(',', C('site_phone'));
Tpl::output('phone_array', $phone_array);
Tpl::output('html_title', C('site_name') . ' - ' . '商家幫助指南');
Tpl::setLayout('store_joinin_layout');
Tpl::showpage('store_help');
}
示例3: __construct
/**
* 構造函數
*/
public function __construct()
{
/**
* 驗證圈子是否開啟
*/
if (C('circle_isuse') != '1') {
@header('location: ' . SiteUrl);
die;
}
/**
* 短消息檢查
*/
$this->checkMessage();
/**
* 讀取通用、布局的語言包
*/
Language::read('common');
/**
* 設置布局文件內容
*/
Tpl::setLayout('circle_layout');
/**
* 獲取導航
*/
Tpl::output('nav_list', ($nav = F('nav')) ? $nav : H('nav', true, 'file'));
}
示例4: __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')]);
}
}
示例5: __construct
/**
* 構造函數
*/
public function __construct()
{
/**
* 驗證圈子是否開啟
*/
if (C('circle_isuse') != '1') {
@header('location: ' . SHOP_SITE_URL);
die;
}
/**
* 讀取通用、布局的語言包
*/
Language::read('common');
/**
* 設置布局文件內容
*/
Tpl::setLayout('circle_layout');
/**
* 查詢是否是超管
*/
$this->checkSuper();
/**
* 獲取導航
*/
Tpl::output('nav_list', ($nav = F('nav')) ? $nav : rkcache('nav', true, 'file'));
}
示例6: __construct
public function __construct()
{
if (!isset($_SESSION['store_id']) || $_SESSION['store_id'] < 1) {
header("Location:index.php?act=slogin");
exit;
}
$model = Model();
$store = $model->table('store')->where(array('store_id' => $_SESSION['store_id']))->find();
if ($store['store_state'] != 1) {
header("Locationi:index.php?act=storesetting");
exit;
}
Language::read('common');
Language::read('storelogin');
/**
* 設置模板文件夾路徑
*/
Tpl::setDir('member');
/**
* 設置布局文件內容
*/
Tpl::setLayout('member_store_layout');
$this->layout = 'create_store_msg';
Tpl::output('sign', 'create_store');
}
示例7: __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', '');
//底部不顯示文章分類
}
示例8: __construct
public function __construct()
{
parent::__construct();
Language::read('store_sns,member_sns');
$store_id = intval($_GET['sid']);
if ($store_id > 0) {
$model = Model();
//檢查店鋪狀態
$store_info = $this->getStoreInfo($store_id);
//得到店鋪等級信息
$store_grade_info = $model->table('store_grade')->where(array('sg_id' => $store_info['grade_id']))->find();
$store_info['grade_name'] = $store_grade_info['sg_name'];
$store_info['grade_goodslimit'] = $store_grade_info['sg_goods_limit'];
//得到店鋪商品數量
$goods_count = $model->table('goods')->where(array('store_id' => $store_info['store_id'], 'goods_show' => '1'))->count();
$store_info['goods_count'] = $goods_count;
//處理地區信息
$area_array = array();
$area_array = explode("\t", $store_info["area_info"]);
$map_city = Language::get('store_sns_city');
$city = '';
if (strpos($area_array[0], $map_city) !== false) {
$city = $area_array[0];
} else {
$city = $area_array[1];
}
$store_info['city'] = $city;
}
Tpl::output('max_recordnum', MAX_RECORDNUM);
Tpl::setDir('store');
Tpl::setLayout('store_sns_layout');
}
示例9: __construct
public function __construct()
{
parent::__construct();
Language::read("home_login_register,home_login_index");
Tpl::output('hidden_nctoolbar', 1);
Tpl::setLayout('login_layout');
}
示例10: __construct
/**
* 構造函數
*/
public function __construct()
{
/**
* 讀取通用、布局的語言包
*/
Language::read('common');
Language::read('microshop');
/**
* 判斷微商城是否關閉
*/
if (C('microshop_isuse') != '1') {
header('location: ' . SHOP_SITE_URL);
die;
}
/**
* 設置布局文件內容
*/
Tpl::setLayout('microshop_layout');
/**
* 轉碼
*/
if ($_GET['column'] && strtoupper(CHARSET) == 'GBK') {
$_GET = Language::getGBK($_GET);
}
/**
* 獲取導航
*/
Tpl::output('nav_list', ($nav = F('nav')) ? $nav : H('nav', true, 'file'));
/**
* 搜索類型列表
*/
$search_type = array();
$search_type['goods'] = Language::get('nc_microshop_goods');
$search_type['personal'] = Language::get('nc_microshop_personal');
$search_type['store'] = Language::get('nc_microshop_store');
//$search_type['album'] = Language::get('nc_microshop_album');
Tpl::output('search_type', $search_type);
/**
* 登錄後讀取用戶頭像
*/
if (!empty($_SESSION['member_id']) && intval($_SESSION['member_id']) > 0) {
self::get_member_avatar($_SESSION['member_id']);
}
/**
* 係統狀態檢查
*/
if (!C('site_status')) {
halt(C('closed_reason'));
}
/**
* seo
*/
Tpl::output('html_title', Language::get('nc_microshop') . '-' . C('site_name'));
Tpl::output('seo_keywords', C('microshop_seo_keywords'));
Tpl::output('seo_description', C('microshop_seo_description'));
}
示例11: __construct
public function __construct()
{
parent::__construct();
Language::read('member_sharemanage');
//判斷係統是否開啟站外分享功能
if (C('share_isuse') != 1) {
showMessage(Language::get('sharebind_unused'), 'index.php?act=home&op=member', 'html', 'error');
}
Tpl::setLayout('member_pub_layout');
}
示例12: __construct
public function __construct()
{
parent::__construct();
if (strtoupper(CHARSET) == 'GBK') {
$_GET = Language::getGBK($_GET);
$_POST = Language::getGBK($_POST);
}
Language::read('web_config,control');
Tpl::setLayout('homeview_layout');
}
示例13: __construct
public function __construct()
{
parent::__construct();
/**
* 設置模板文件夾路徑
*/
Tpl::setDir('home');
/**
* 設置布局文件內容
*/
Tpl::setLayout('member_show_layout');
}
示例14: __construct
/**
* 賣家店鋪是否審核的判斷
*
* @param
* @return
*/
public function __construct()
{
parent::__construct();
/**
* 讀取語言包
*/
Language::read('member_member_sconnect');
if ($GLOBALS['setting_config']['sina_isuse'] != 1) {
showMessage(Language::get('member_sconnect_unavailable'), 'index.php?act=member_snsindex', 'html', 'error');
}
Tpl::setLayout('member_pub_layout');
}
示例15: __construct
public function __construct(){
Language::read('common,member_layout');
Tpl::setDir('member');
Tpl::setLayout('member_layout');
$this->article();//文章輸出
Tpl::output('header_menu_sign','setting');//默認選中頂部“設置”菜單
//獲取導航
Tpl::output('nav_list',($nav = H('nav')) ? $nav : H('nav',true));
Language::read('member_member_predeposit');
Tpl::setLayout('member_pub_layout');
}