本文整理汇总了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');
}