本文整理汇总了PHP中Language::getLangContent方法的典型用法代码示例。如果您正苦于以下问题:PHP Language::getLangContent方法的具体用法?PHP Language::getLangContent怎么用?PHP Language::getLangContent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Language
的用法示例。
在下文中一共展示了Language::getLangContent方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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;
}
}
示例2: indexOp
public function indexOp()
{
$lang = Language::getLangContent();
$model_shares = Model('shares');
$condition = array();
$condition['store_id'] = $_SESSION['store_id'];
if (!empty($_GET['order_id'])) {
$condition['order_id'] = array('like', "%" . $_GET['order_id'] . "%");
}
$if_start_time = preg_match('/^20\\d{2}-\\d{2}-\\d{2}$/', $_GET['query_start_time']);
$if_end_time = preg_match('/^20\\d{2}-\\d{2}-\\d{2}$/', $_GET['query_end_time']);
$start_unixtime = $if_start_time ? strtotime($_GET['query_start_time']) : null;
$end_unixtime = $if_end_time ? strtotime($_GET['query_end_time']) : null;
if ($start_unixtime || $end_unixtime) {
$condition['add_time'] = array('time', array($start_unixtime, $end_unixtime));
}
$shares_list = $model_shares->getSharesList($condition, "*", 50);
$shares_sum = $model_shares->getSharesSum($_SESSION['store_id']);
$ShopShares = $model_shares->getShopShares($_SESSION['store_id']);
Tpl::output('ShopShares', $ShopShares['shares']);
Tpl::output('show_page', $model_shares->showpage());
Tpl::output('shares_list', $shares_list);
Tpl::output('shares_sum', $shares_sum);
Tpl::output('shares_id', trim($_GET['shares_id']));
Tpl::output('shares_time', trim($_GET['shares_time']));
Tpl::showpage('shares');
}
示例3: pic_cutOp
/**
* 图片裁剪
*
*/
public function pic_cutOp()
{
Language::read('admin_common');
$lang = Language::getLangContent();
import('function.thumb');
if (chksubmit()) {
$thumb_width = $_POST['x'];
$x1 = $_POST["x1"];
$y1 = $_POST["y1"];
$x2 = $_POST["x2"];
$y2 = $_POST["y2"];
$w = $_POST["w"];
$h = $_POST["h"];
$scale = $thumb_width / $w;
$src = str_ireplace(UPLOAD_SITE_URL, BASE_UPLOAD_PATH, $_POST['url']);
if (strpos($src, '..') !== false || strpos($src, BASE_UPLOAD_PATH) !== 0) {
exit;
}
if (!empty($_POST['filename'])) {
// $save_file2 = BASE_UPLOAD_PATH.'/'.$_POST['filename'];
$save_file2 = str_ireplace(UPLOAD_SITE_URL, BASE_UPLOAD_PATH, $_POST['filename']);
} else {
$save_file2 = str_replace('_small.', '_sm.', $src);
}
$cropped = resize_thumb($save_file2, $src, $w, $h, $x1, $y1, $scale);
@unlink($src);
$pathinfo = pathinfo($save_file2);
exit($pathinfo['basename']);
}
$save_file = str_ireplace(UPLOAD_SITE_URL, BASE_UPLOAD_PATH, $_GET['url']);
$_GET['resize'] = $_GET['resize'] == '0' ? '0' : '1';
Tpl::output('height', get_height($save_file));
Tpl::output('width', get_width($save_file));
Tpl::showpage('common.pic_cut', 'null_layout');
}
示例4: pic_cutOp
/**
* 图片裁剪
*
*/
public function pic_cutOp()
{
import('function.thumb');
if (chksubmit()) {
$thumb_width = $_POST['x'];
$x1 = $_POST["x1"];
$y1 = $_POST["y1"];
$x2 = $_POST["x2"];
$y2 = $_POST["y2"];
$w = $_POST["w"];
$h = $_POST["h"];
$scale = $thumb_width / $w;
$src = str_ireplace(UPLOAD_SITE_URL, BASE_UPLOAD_PATH, $_POST['url']);
$save_file2 = str_replace('_small.', '_sm.', $src);
$cropped = resize_thumb($save_file2, $src, $w, $h, $x1, $y1, $scale);
@unlink($src);
$pathinfo = pathinfo($save_file2);
exit($pathinfo['basename']);
} else {
Language::read('cut');
$lang = Language::getLangContent();
}
$save_file = str_ireplace(UPLOAD_SITE_URL, BASE_UPLOAD_PATH, $_GET['url']);
$_GET['x'] = intval($_GET['x']) > 50 && $_GET['x'] < 400 ? $_GET['x'] : 200;
$_GET['y'] = intval($_GET['y']) > 50 && $_GET['y'] < 400 ? $_GET['y'] : 200;
$_GET['resize'] = $_GET['resize'] == '0' ? '0' : '1';
Tpl::output('height', get_height($save_file));
Tpl::output('width', get_width($save_file));
Tpl::showpage('cut', 'null_layout');
}
示例5: daddress_addOp
/**
* 新增/编辑发货地址
*/
public function daddress_addOp() {
Language::read('member_member_index');
$lang = Language::getLangContent();
$model_daddress = Model('daddress');
if (chksubmit()) {
//保存 新增/编辑 表单
$obj_validate = new Validate();
$obj_validate->validateparam = array(
array("input"=>$_POST["seller_name"],"require"=>"true","message"=>$lang['store_daddress_receiver_null']),
array("input"=>$_POST["area_id"],"require"=>"true","validator"=>"Number","message"=>$lang['store_daddress_wrong_area']),
array("input"=>$_POST["city_id"],"require"=>"true","validator"=>"Number","message"=>$lang['store_daddress_wrong_area']),
array("input"=>$_POST["area_info"],"require"=>"true","message"=>$lang['store_daddress_area_null']),
array("input"=>$_POST["address"],"require"=>"true","message"=>$lang['store_daddress_address_null']),
array("input"=>$_POST['telphone'],'require'=>'true','message'=>$lang['store_daddress_phone_and_mobile'])
);
$error = $obj_validate->validate();
if ($error != ''){
showValidateError($error);
}
$data = array(
'store_id' => $_SESSION['store_id'],
'seller_name' => $_POST['seller_name'],
'area_id' => $_POST['area_id'],
'city_id' => $_POST['city_id'],
'area_info' => $_POST['area_info'],
'address' => $_POST['address'],
'telphone' => $_POST['telphone'],
'company' => $_POST['company']
);
$address_id = intval($_POST['address_id']);
if ($address_id > 0){
$condition = array();
$condition['address_id'] = $address_id;
$condition['store_id'] = $_SESSION['store_id'];
$update = $model_daddress->editAddress($data,$condition);
if (!$update){
showDialog($lang['store_daddress_modify_fail'],'','error');
}
} else {
$insert = $model_daddress->addAddress($data);
if (!$insert){
showDialog($lang['store_daddress_add_fail'],'','error');
}
}
showDialog($lang['nc_common_op_succ'],'reload','succ','CUR_DIALOG.close()');
} elseif (is_numeric($_GET['address_id']) > 0) {
//编辑
$condition = array();
$condition['address_id'] = intval($_GET['address_id']);
$condition['store_id'] = $_SESSION['store_id'];
$address_info = $model_daddress->getAddressInfo($condition);
if (empty($address_info) && !is_array($address_info)){
showMessage($lang['store_daddress_wrong_argument'],'index.php?act=store_deliver_set&op=daddress_list','html','error');
}
Tpl::output('address_info',$address_info);
}
Tpl::showpage('store_deliver_set.daddress_add','null_layout');
}
示例6: settingOp
/**
* 金币设置
*/
public function settingOp()
{
/**
* 读取语言包
*/
$lang = Language::getLangContent();
/**
* 实例化模型
*/
$model_setting = Model('setting');
/**
* 保存信息
*/
if (chksubmit()) {
/**
* 验证
*/
$obj_validate = new Validate();
$obj_validate->validateparam = array(array("input" => $_POST["gold_isuse"], "require" => "true", "message" => $lang['gold_isuse_check']), array("input" => $_POST["gold_rmbratio"], "require" => "true", "validator" => "Number", "message" => $lang['gold_rmbratio_isnum']));
$error = $obj_validate->validate();
if ($error != '') {
showMessage($error);
} else {
/*
* 构造更新数据数组
*/
$update_array = array();
$update_array['promotion_allow'] = trim($_POST['promotion_allow']);
$update_array['points_isuse'] = trim($_POST['points_isuse']);
$update_array['gold_isuse'] = trim($_POST['gold_isuse']);
$update_array['gold_rmbratio'] = trim($_POST['gold_rmbratio']);
$update_array['predeposit_isuse'] = trim($_POST['predeposit_isuse']);
$update_array['groupbuy_allow'] = trim($_POST['groupbuy_allow']);
//积分中心
$update_array['pointshop_isuse'] = trim($_POST['pointshop_isuse']);
if (C('payment') != 1) {
$update_array['predeposit_isuse'] = 1;
}
//支付到平台时强制开启预存款功能
$result = $model_setting->updateSetting($update_array);
if ($result === true) {
showMessage($lang['nc_common_save_succ']);
} else {
showMessage($lang['nc_common_save_fail']);
}
}
}
/**
* 读取设置内容 $list_setting
*/
$list_setting = $model_setting->getListSetting();
/**
* 模板输出
*/
Tpl::output('list_setting', $list_setting);
Tpl::showpage('operation.setting');
}
示例7: performOp
/**
* 性能优化
*/
public function performOp()
{
if ($_GET['type'] == 'clear') {
$lang = Language::getLangContent();
$cache = Cache::getInstance(C('cache.type'));
$cache->clear();
showMessage($lang['nc_common_op_succ']);
}
Tpl::showpage('setting.perform_opt');
}
示例8: indexOp
/**
* 分类列表
*/
public function indexOp()
{
Language::read('home_category_index');
$lang = Language::getLangContent();
//导航
$nav_link = array('0' => array('title' => $lang['homepage'], 'link' => SHOP_SITE_URL), '1' => array('title' => $lang['category_index_goods_class']));
Tpl::output('nav_link_list', $nav_link);
Tpl::output('html_title', C('site_name') . ' - ' . Language::get('category_index_goods_class'));
Tpl::showpage('category');
}
示例9: clearOp
/**
* 清理缓存
*/
public function clearOp()
{
if (!chksubmit()) {
Tpl::showpage('cache.clear');
return;
}
$lang = Language::getLangContent();
// 清理所有缓存
if ($_POST['cls_full'] == 1) {
foreach ($this->cacheItems as $i) {
dkcache($i);
}
// 表主键
Model::dropTablePkArrayCache();
// 商品分类
dkcache('gc_class');
dkcache('all_categories');
dkcache('goods_class_seo');
dkcache('class_tag');
// 广告
Model('adv')->makeApAllCache();
// 首页
Model('web_config')->getWebHtml('index', 1);
delCacheFile('index');
} else {
$todo = (array) $_POST['cache'];
foreach ($this->cacheItems as $i) {
if (in_array($i, $todo)) {
dkcache($i);
}
}
// 表主键
if (in_array('table', $todo)) {
Model::dropTablePkArrayCache();
}
// 商品分类
if (in_array('goodsclass', $todo)) {
dkcache('gc_class');
dkcache('all_categories');
dkcache('goods_class_seo');
dkcache('class_tag');
}
// 广告
if (in_array('adv', $todo)) {
Model('adv')->makeApAllCache();
}
// 首页
if (in_array('index', $todo)) {
Model('web_config')->getWebHtml('index', 1);
delCacheFile('index');
}
}
$this->log(L('cache_cls_operate'));
showMessage($lang['cache_cls_ok']);
}
示例10: delOp
/**
* 删除
*/
public function delOp()
{
$lang = Language::getLangContent();
if (intval($_GET['id']) > 0) {
$model_link = Model('feedback');
$model_link->del(intval($_GET['id']));
showMessage($lang['feedback_del_succ'], 'index.php?act=feedback&op=flist');
} else {
showMessage($lang['feedback_del_fiald'], 'index.php?act=feedback&op=flist');
}
}
示例11: indexOp
public function indexOp()
{
$lang = Language::getLangContent();
$model = Model('express');
if (preg_match('/^[A-Z]$/', $_GET['letter'])) {
$model->where(array('e_letter' => $_GET['letter']));
}
$list = $model->page(10)->order('e_order,e_state desc,id')->select();
Tpl::output('page', $model->showpage());
Tpl::output('list', $list);
Tpl::showpage('express.index');
}
示例12: profile_menu
/**
* 用户中心右边,小导航
*
* @param string $menu_type 导航类型
* @param string $menu_key 当前导航的menu_key
* @param array $array 附加菜单
* @return
*/
private function profile_menu($menu_key = '', $array = array())
{
Language::read('member_layout');
$lang = Language::getLangContent();
$menu_array = array();
$menu_array = array(1 => array('menu_key' => 'points', 'menu_name' => $lang['nc_member_path_points'], 'menu_url' => 'index.php?act=member_points'));
if (!empty($array)) {
$menu_array[] = $array;
}
Tpl::output('member_menu', $menu_array);
Tpl::output('menu_key', $menu_key);
}
示例13: indexOp
/**
* 登录操作
*
*/
public function indexOp(){
$lang = Language::getLangContent();
$model_member = Model('member');
//检查登录状态
$model_member->checkloginMember();
$script="document.getElementsByName('codeimage')[0].src='".APP_SITE_URL."/index.php?act=seccode&op=makecode&nchash='+NC_HASH+'&t=' + Math.random();";
$result = chksubmit(true,true,'num');
if ($result !== false){
if ($result === -11){
showDialog(L('login_index_login_illegal'),'','error',$script,2);
}elseif ($result === -12){
showDialog(L('login_index_wrong_checkcode'),'','error',$script,2);
}
if (process::islock('login')) {
showDialog(L('login_index_op_repeat'),APP_SITE_URL);
}
$array = array();
$array['member_name'] = $_POST['user_name'];
$array['member_passwd'] = md5($_POST['password']);
$member_info = $model_member->infoMember($array);
if(is_array($member_info) and !empty($member_info)) {
if(!$member_info['member_state']){
showDialog($lang['login_index_account_stop']);
}
} else {
process::addprocess('login');
showDialog($lang['login_index_login_fail'],'','error',$script,2);
}
$model_member->createSession($member_info);
process::clear('login');
// cookie中的cart存入数据库
Model('cart')->mergecart($member_info,$_SESSION['store_id']);
// cookie中的浏览记录存入数据库
Model('goods_browse')->mergebrowse($_SESSION['member_id'],$_SESSION['store_id']);
//添加会员积分
$model_member->addPoint($member_info);
showDialog(L('login_index_login_success'),'reload','succ','',2);
}
if(empty($_GET['ref_url'])) $_GET['ref_url'] = getReferer();
Tpl::output('html_title',C('site_name').' - '.$lang['login_index_login']);
Tpl::output('nchash',getNchash());
if ($_GET['inajax'] == 1){
Tpl::showpage('login_inajax','null_layout');
}else{
return false;
}
}
示例14: indexOp
public function indexOp()
{
$lang = Language::getLangContent();
if ($_GET['code'] == '') {
showMessage($lang['para_error'], '', 'html', 'error');
}
$model_doc = Model('document');
$doc = $model_doc->getOneByCode($_GET['code']);
Tpl::output('doc', $doc);
$nav_link = array(array('title' => '首页', 'link' => 'index.php'), array('title' => $doc['doc_title']));
Tpl::output('nav_link_list', $nav_link);
Tpl::showpage('document.index');
}
示例15: detailOp
public function detailOp()
{
Language::read('home_coupon_index');
$lang = Language::getLangContent();
$id = intval($_GET['coupon_id']);
if ($id < 1) {
showMessage(Language::get('coupon_index_error'), '', 'html', 'error');
//'该优惠券不存在'
}
$model_coupon = Model('coupon');
$coupon_detail = $model_coupon->getOneById($id);
if (is_array($coupon_detail) && !empty($coupon_detail)) {
//获取店铺信息
$store_info = $this->getStoreInfo($coupon_detail['store_id']);
$_GET['id'] = $store_info['store_id'];
//左侧分类的数据用到
//查询店铺动态评价
$this->show_storeeval($store_info['store_id']);
/*
* 下架到期的优惠券
*/
$this->offsaleCoupon($store_info['store_id']);
/*
* 获取最新的优惠券
*/
$condition = array();
$new = $model_coupon->getCoupon(array('order' => 'coupon_add_date desc', 'limit' => 3, 'coupon_state' => '2', 'store_id' => $store_info['store_id']));
if (!empty($new)) {
foreach ($new as $key => $val) {
$new[$key]['coupon_pic'] = $val['coupon_pic'] != '' ? $val['coupon_pic'] : SiteUrl . DS . ATTACH_COUPON . DS . 'default.gif';
}
}
Tpl::output('new', $new);
/*
* 如果存在则调用数据库生成数组
*/
$coupon_detail['coupon_pic'] = $coupon_detail['coupon_pic'] != '' ? $coupon_detail['coupon_pic'] : SiteUrl . DS . ATTACH_COUPON . DS . 'default.gif';
$model_coupon->update_coupon(array('coupon_click' => array('sign' => 'increase', 'value' => 1)), array('coupon_id' => $_GET['coupon_id']));
Tpl::output('index_sign', 'coupon');
Tpl::output('detail', $coupon_detail);
Tpl::output('page', 'coupon');
Model('seo')->type('coupon')->param(array('name' => $coupon_detail['coupon_title']))->show();
Tpl::showpage('coupon_detail');
} else {
showMessage(Language::get('coupon_index_error'), '', 'html', 'error');
//'该优惠券不存在'
}
}