本文整理汇总了PHP中Language::read方法的典型用法代码示例。如果您正苦于以下问题:PHP Language::read方法的具体用法?PHP Language::read怎么用?PHP Language::read使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Language
的用法示例。
在下文中一共展示了Language::read方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: indexOp
public function indexOp()
{
//读取语言包
Language::read('home_store_list');
//分类导航
$nav_link = array(0 => array('title' => Language::get('homepage'), 'link' => 'index.php'), 1 => array('title' => Language::get('brand_index_all_brand')));
Tpl::output('nav_link_list', $nav_link);
$model_store = Model('store');
//店铺列表
// $store_list = $model_store->getStoreList($condition, 10);
$store_list = $model_store->getShowList(true, true);
Tpl::output('store', $store_list);
// Tpl::output('brand_class',$brand_class);
// Tpl::output('brand_r',$brand_r_list);
// Tpl::output('html_title',Language::get('brand_index_brand_list'));
//分页头
Tpl::output('show_page1', $model_store->showpage(4));
//分页尾
Tpl::output('show_page', $model_store->showpage(5));
//加载 shop/framework/function/search.php
loadfunc('search');
//页面输出
Tpl::output('index_sign', 'store');
Model('seo')->type('store')->show();
Tpl::showpage('store_list');
}
示例2: showTip
protected function showTip($msg, $url = '', $show_type = 'html', $msg_type = 'succ', $is_show = 1, $time = 2000)
{
/**
* 如果默认为空,则跳转至上一步链接
*/
$url = $url != '' ? $url : getReferer();
$msg_type = in_array($msg_type, array('succ', 'error')) ? $msg_type : 'error';
if (is_array($url)) {
foreach ($url as $k => $v) {
$url[$k]['url'] = $v['url'] ? $v['url'] : getReferer();
}
}
/**
* 读取信息布局的语言包
*/
Language::read("msg");
/**
* html输出形式
* 指定为指定项目目录下的error模板文件
*/
Tpl::setDir('');
Tpl::output('html_title', Language::get('nc_html_title'));
Tpl::output('msg', $msg);
Tpl::output('url', $url);
Tpl::output('msg_type', $msg_type);
Tpl::output('is_show', $is_show);
Tpl::showpage('msg', $this->layout, $time);
exit;
}
示例3: __construct
public function __construct()
{
Language::read("common");
Language::read("microshop");
if (c("microshop_isuse") != "1") {
header("location: " . SiteUrl);
exit;
}
Tpl::setdir("default");
self::cp();
Tpl::setlayout("microshop_layout");
if ($_GET['column'] && strtoupper(CHARSET) == "GBK") {
$GLOBALS['_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");
Tpl::output("search_type", $search_type);
if (!empty($_SESSION['member_id']) || 0 < intval($_SESSION['member_id'])) {
self::get_member_avatar($_SESSION['member_id']);
}
if (!c("site_status")) {
halt(c("closed_reason"));
}
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"));
$this->queryCart();
}
示例4: __construct
public function __construct()
{
parent::__construct();
Language::read('member_member_index');
$model_refund = Model('refund_return');
$model_refund->getRefundStateArray();
}
示例5: indexOp
public function indexOp()
{
Language::read('home_index_index');
Tpl::output('index_sign', 'index');
$model_setting = Model('setting');
$setting = $model_setting->getListSetting();
//抢购专区
if (intval($setting['groupbuy_allow']) == 1) {
Language::read('member_groupbuy');
$model_groupbuy = Model('groupbuy');
$group_list = $model_groupbuy->getGroupbuyCommendedList(1);
Tpl::output('group_list', $group_list);
}
//限时折扣
if (intval($setting['promotion_allow']) == 1) {
$model_xianshi_goods = Model('p_xianshi_goods');
$xianshi_item = $model_xianshi_goods->getXianshiGoodsCommendList(2);
Tpl::output('xianshi_item', $xianshi_item);
}
//板块信息
//$model_web_config = Model('web_config');
$model_web_config = Model('web_config');
// dev_end
$web_html = $model_web_config->getWebHtml('index');
Tpl::output('web_html', $web_html);
// Dev: 品牌信息
$model_brand = Model('brand');
$condition = 'brand_apply=1 and brand_pic IS NOT NULL AND TRIM(brand_pic) <> \'\'';
$brand_list = $model_brand->where($condition)->limit(6)->select();
Tpl::output('brand_list', $brand_list);
// Dev_end
Model('seo')->type('index')->show();
Tpl::showpage('index');
}
示例6: __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);
}
}
示例7: __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);
}
}
示例8: indexOp
/**
* 分类列表
*/
public function indexOp()
{
Language::read('home_category_index');
$lang = Language::getLangContent();
//得到分类类型
$type = trim($_GET['type']);
switch ($type) {
case 'store':
$model_sc = Model('store_class');
$sc_list = $model_sc->getTreeList();
//导航
$nav_link = array('0' => array('title' => $lang['homepage'], 'link' => SiteUrl . '/index.php'), '1' => array('title' => $lang['category_index_store_class']));
$model_store = Model('store');
//推荐店铺
$recommend_store = $model_store->getRecommendStore(5);
Tpl::output('recommend_store', $recommend_store);
//最新店铺
$new_store = $model_store->getNewStore(5);
Tpl::output('new_store', $new_store);
Tpl::output('nav_link_list', $nav_link);
Tpl::output('sc_list', $sc_list);
Tpl::showpage('category_store');
break;
default:
//导航
$nav_link = array('0' => array('title' => $lang['homepage'], 'link' => SiteUrl . '/index.php'), '1' => array('title' => $lang['category_index_goods_class']));
//分类
$show_goods_class = ($g = F('goods_class')) ? $g : H('goods_class', true, 'file');
Tpl::output('nav_link_list', $nav_link);
Tpl::output('gc_list', $show_goods_class);
Tpl::output('html_title', C('site_name') . ' - ' . Language::get('category_index_goods_class'));
Tpl::showpage('category_goods');
break;
}
}
示例9: __construct
/**
* 验证是否开启闲置功能
*/
public function __construct() {
parent::__construct();
/**
* 读取语言包
*/
Language::read('member_store_album');
}
示例10: __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');
}
示例11: __construct
public function __construct(){
parent::__construct();
Language::read('member_member_index,refund');
$model_vr_refund = Model('vr_refund');
$model_vr_refund->getRefundStateArray();
$this->_getCommonOperationsAndNavLink('member_refund');
}
示例12: __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');
}
示例13: __construct
public function __construct()
{
parent::__construct();
Language::read('stat');
import('function.statistics');
import('function.datehelper');
$model = Model('stat');
//存储参数
$this->search_arr = $_REQUEST;
//处理搜索时间
if (in_array($_REQUEST['op'], array('list'))) {
$this->search_arr = $model->dealwithSearchTime($this->search_arr);
//获得系统年份
$year_arr = getSystemYearArr();
//获得系统月份
$month_arr = getSystemMonthArr();
//获得本月的周时间段
$week_arr = getMonthWeekArr($this->search_arr['week']['current_year'], $this->search_arr['week']['current_month']);
Tpl::output('year_arr', $year_arr);
Tpl::output('month_arr', $month_arr);
Tpl::output('week_arr', $week_arr);
}
$conn = (require BASE_DATA_PATH . '/../core/framework/db/mssqlpdo.php');
$stmt = $conn->query(' select distinct orgid from map_org_wechat order by orgid ');
$this->orgidarray = array();
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
array_push($this->orgidarray, $row[0]);
}
$this->getTreeData();
Tpl::output('search_arr', $this->search_arr);
}
示例14: indexOp
public function indexOp(){
//die("");
Language::read('home_index_index');
Tpl::output('index_sign','index');
//抢购专区
Language::read('member_groupbuy');
$model_groupbuy = Model('groupbuy');
$group_list = $model_groupbuy->getGroupbuyCommendedList(4);
Tpl::output('group_list', $group_list);
//友情链接
$model_link = Model('link');
$link_list = $model_link->getLinkList($condition,$page);
/**
* 整理图片链接
*/
if (is_array($link_list)){
foreach ($link_list as $k => $v){
if (!empty($v['link_pic'])){
$link_list[$k]['link_pic'] = UPLOAD_SITE_URL.'/'.ATTACH_PATH.'/common/'.DS.$v['link_pic'];
}
}
}
Tpl::output('$link_list',$link_list);
//限时折扣
$model_xianshi_goods = Model('p_xianshi_goods');
$xianshi_item = $model_xianshi_goods->getXianshiGoodsCommendList(4);
Tpl::output('xianshi_item', $xianshi_item);
//板块信息
$model_web_config = Model('web_config');
$web_html = $model_web_config->getWebHtml('index');
Tpl::output('web_html',$web_html);
/*特惠商家*/
$condition = array();
$order = 'store_sort asc';
$model_store = Model('store');
$store_list = $model_store->where($condition)->order($order)->page(5)->select();
Tpl::output('store_list', $store_list);
//-S------------------------------------------------
//最新评论+热闹活动
$model_evaluate_goods = Model('evaluate_goods');
$where = array();
$tmp = $model_evaluate_goods->getEvaluateGoodsList($where, 2);
Tpl::output('evaluate_list', $tmp);
$model_activity_detail = Model('activity_detail');
$awhere = array();
$awhere['order'] = " activity_detail_sort desc,activity_detail_id desc ";
$p = new Page();
$p->set('each_num', 2);
$tmp = $model_activity_detail->getGoodsList($awhere, $p);
Tpl::output('activity_detail_list', $tmp);
//-E------------------------------------------------
Model('seo')->type('index')->show();
Tpl::showpage('index');
}
示例15: __construct
public function __construct()
{
parent::__construct();
Language::read('stat');
import('function.statistics');
import('function.datehelper');
$model = Model('stat');
//存储参数
$this->search_arr = $_REQUEST;
//处理搜索时间
if (in_array($_REQUEST['op'], array('list'))) {
$this->search_arr = $model->dealwithSearchTime($this->search_arr);
//获得系统年份
$year_arr = getSystemYearArr();
//获得系统月份
$month_arr = getSystemMonthArr();
//获得本月的周时间段
$week_arr = getMonthWeekArr($this->search_arr['week']['current_year'], $this->search_arr['week']['current_month']);
Tpl::output('year_arr', $year_arr);
Tpl::output('month_arr', $month_arr);
Tpl::output('week_arr', $week_arr);
}
Tpl::output('search_arr', $this->search_arr);
$conn = (require BASE_DATA_PATH . '/../core/framework/db/mssqlpdo.php');
$treesql = 'select b.id , b.name,b.districtnumber,b.parentid pId from map_org_wechat a, Organization b where a.orgid = b.id ';
$treestmt = $conn->query($treesql);
$this->treedata_list = array();
while ($row = $treestmt->fetch(PDO::FETCH_OBJ)) {
array_push($this->treedata_list, $row);
}
Tpl::output('treelist', $this->treedata_list);
}