本文整理汇总了PHP中LANG类的典型用法代码示例。如果您正苦于以下问题:PHP LANG类的具体用法?PHP LANG怎么用?PHP LANG使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了LANG类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: view
/**
* 查看订单详情
*
* @author Garbin
* @return void
*/
function view()
{
$order_id = isset($_GET['order_id']) ? intval($_GET['order_id']) : 0;
$model_order =& m('order');
$order_info = $model_order->findAll(array('conditions' => "order_alias.order_id={$order_id} AND seller_id=" . $this->visitor->get('manage_store'), 'join' => 'has_orderextm'));
$order_info = current($order_info);
if (!$order_info) {
$this->show_warning('no_such_order');
return;
}
/* 当前位置 */
$this->_curlocal(LANG::get('member_center'), 'index.php?app=member', LANG::get('order_manage'), 'index.php?app=seller_order', LANG::get('view_order'));
/* 当前用户中心菜单 */
$this->_curitem('order_manage');
$this->assign('page_title', Lang::get('member_center') . ' - ' . Lang::get('detail'));
/* 调用相应的订单类型,获取整个订单详情数据 */
$order_type =& ot($order_info['extension']);
$order_detail = $order_type->get_order_detail($order_id, $order_info);
foreach ($order_detail['data']['goods_list'] as $key => $goods) {
empty($goods['goods_image']) && ($order_detail['data']['goods_list'][$key]['goods_image'] = Conf::get('default_goods_image'));
}
$this->assign('order', $order_info);
$this->assign($order_detail['data']);
$this->display('seller_order.view.html');
}
开发者ID:BGCX261,项目名称:zhou3liu-svn-to-git,代码行数:31,代码来源:seller_order.app.php
示例2: index
function index()
{
$conditions = $this->_get_query_conditions(array(array('field' => $_GET['field_name'], 'name' => 'field_value', 'equal' => 'like')));
//更新排序
if (isset($_GET['sort']) && isset($_GET['order'])) {
$sort = strtolower(trim($_GET['sort']));
$order = strtolower(trim($_GET['order']));
if (!in_array($order, array('asc', 'desc'))) {
$sort = 'user_id';
$order = 'asc';
}
} else {
$sort = 'user_id';
$order = 'asc';
}
$page = $this->_get_page();
$users = $this->_user_mod->find(array('join' => 'has_store,manage_mall', 'fields' => 'this.*,store.store_id,userpriv.store_id as priv_store_id,userpriv.privs', 'conditions' => '1=1' . $conditions, 'limit' => $page['limit'], 'order' => "{$sort} {$order}", 'count' => true));
foreach ($users as $key => $val) {
if ($val['priv_store_id'] == 0 && $val['privs'] != '') {
$users[$key]['if_admin'] = true;
}
}
$this->assign('users', $users);
$page['item_count'] = $this->_user_mod->getCount();
$this->_format_page($page);
$this->assign('filtered', $conditions ? 1 : 0);
//是否有查询条件
$this->assign('page_info', $page);
/* 导入jQuery的表单验证插件 */
$this->import_resource(array('script' => 'jqtreetable.js,inline_edit.js', 'style' => 'res:style/jqtreetable.css'));
$this->assign('query_fields', array('user_name' => LANG::get('user_name'), 'email' => LANG::get('email'), 'real_name' => LANG::get('real_name')));
$this->assign('sort_options', array('reg_time DESC' => LANG::get('reg_time'), 'last_login DESC' => LANG::get('last_login'), 'logins DESC' => LANG::get('logins')));
$this->display('user.index.html');
}
开发者ID:BGCX261,项目名称:zhou3liu-svn-to-git,代码行数:34,代码来源:user.app.php
示例3: errorHandler
public static function errorHandler($resp, $code)
{
$resp = json_decode($resp, true);
$message = isset($resp['message']) ? $resp['message'] : null;
$message_to_purchaser = isset($resp['message_to_purchaser']) ? $resp['message_to_purchaser'] : null;
$type = isset($resp['type']) ? $resp['type'] : null;
$params = isset($resp['param']) ? $resp['param'] : null;
if (isset($code) != true || $code == 0) {
throw new Conekta_NoConnectionError(LANG::translate('error.requestor.connection', array('BASE' => Conekta::$apiBase), LANG::EN), LANG::translate('error.requestor.connection_purchaser', null, Conekta::$locale), $type, $code, $params);
}
switch ($code) {
case 400:
throw new Conekta_MalformedRequestError($message, $message_to_purchaser, $type, $code, $params);
case 401:
throw new Conekta_AuthenticationError($message, $message_to_purchaser, $type, $code, $params);
case 402:
throw new Conekta_ProcessingError($message, $message_to_purchaser, $type, $code, $params);
case 404:
throw new Conekta_ResourceNotFoundError($message, $message_to_purchaser, $type, $code, $params);
case 422:
throw new Conekta_ParameterValidationError($message, $message_to_purchaser, $type, $code, $params);
case 500:
throw new Conekta_ApiError($message, $message_to_purchaser, $type, $code, $params);
default:
throw new self($message, $message_to_purchaser, $type, $code, $params);
}
}
开发者ID:BlickLabs,项目名称:AmparoExpress,代码行数:27,代码来源:Error.php
示例4: index
function index()
{
/* 取得列表数据 */
$conditions = $this->_get_query_conditions(array(array('field' => 'state', 'name' => 'state', 'handler' => 'groupbuy_state_translator'), array('field' => 'group_name', 'name' => 'group_name', 'equal' => 'LIKE')));
// 标识有没有过滤条件
if ($conditions) {
$this->assign('filtered', 1);
}
$page = $this->_get_page(10);
//获取分页信息
$groupbuy_list = $this->_groupbuy_mod->find(array('join' => 'be_join', 'order' => 'gb.group_id DESC', 'limit' => $page['limit'], 'count' => true, 'conditions' => 'user_id=' . $this->visitor->info['user_id'] . $conditions));
$page['item_count'] = $this->_groupbuy_mod->getCount();
//获取统计的数据
foreach ($groupbuy_list as $key => $groupbuy) {
$groupbuy['ican'] = $this->_ican($groupbuy['group_id']);
$groupbuy_list[$key] = $groupbuy;
$groupbuy_list[$key]['spec_quantity'] = unserialize($groupbuy['spec_quantity']);
$groupbuy['default_image'] || ($groupbuy_list[$key]['default_image'] = Conf::get('default_goods_image'));
}
//dump($groupbuy_list);
/* 当前位置 */
$this->_curlocal(LANG::get('member_center'), 'index.php?app=member', LANG::get('my_groupbuy'), 'index.php?app=buyer_groupbuy', LANG::get('groupbuy_list'));
/* 当前用户中心菜单 */
$this->_curitem('my_groupbuy');
/* 当前所处子菜单 */
$this->_curmenu('groupbuy_list');
$this->_format_page($page);
$this->assign('page_info', $page);
//将分页信息传递给视图,用于形成分页条
$this->assign('groupbuy_list', $groupbuy_list);
$this->assign('state', array('all' => Lang::get('group_all'), 'on' => Lang::get('group_on'), 'end' => Lang::get('group_end'), 'finished' => Lang::get('group_finished'), 'canceled' => Lang::get('group_canceled')));
$this->_config_seo('title', Lang::get('member_center') . ' - ' . Lang::get('my_groupbuy'));
$this->display('buyer_groupbuy.index.html');
}
开发者ID:zhangxiaoling,项目名称:ecmall,代码行数:34,代码来源:buyer_groupbuy.app.php
示例5: index
function index()
{
$page = $this->_get_page(10);
$this->_user_mod =& m('member');
$this->_store_mod =& m('store');
$this->_coupon_mod =& m('coupon');
$msg = $this->_user_mod->findAll(array('conditions' => 'user_id = ' . $this->visitor->get('user_id'), 'count' => true, 'limit' => $page['limit'], 'include' => array('bind_couponsn' => array())));
$page['item_count'] = $this->_user_mod->getCount();
$coupon = array();
$coupon_ids = array();
$msg = current($msg);
if (!empty($msg['coupon_sn'])) {
foreach ($msg['coupon_sn'] as $key => $val) {
$coupon_tmp = $this->_coupon_mod->get(array('fields' => "this.*,store.store_name,store.store_id", 'conditions' => 'coupon_id = ' . $val['coupon_id'], 'join' => 'belong_to_store'));
$coupon_tmp['valid'] = 0;
$time = gmtime();
if ($val['remain_times'] > 0 && ($coupon_tmp['end_time'] == 0 || $coupon_tmp['end_time'] > $time)) {
$coupon_tmp['valid'] = 1;
}
$coupon[$key] = array_merge($val, $coupon_tmp);
}
}
$this->import_resource(array('script' => array(array('path' => 'dialog/dialog.js', 'attr' => 'id="dialog_js"'), array('path' => 'jquery.ui/jquery.ui.js', 'attr' => ''), array('path' => 'jquery.ui/i18n/' . i18n_code() . '.js', 'attr' => ''), array('path' => 'jquery.plugins/jquery.validate.js', 'attr' => '')), 'style' => 'jquery.ui/themes/ui-lightness/jquery.ui.css'));
/* 当前位置 */
$this->_curlocal(LANG::get('member_center'), 'index.php?app=member', LANG::get('my_coupon'), 'index.php?app=my_coupon', LANG::get('coupon_list'));
$this->_curitem('my_coupon');
$this->_curmenu('coupon_list');
$this->assign('page_info', $page);
//将分页信息传递给视图,用于形成分页条
$this->_config_seo('title', Lang::get('member_center') . ' - ' . Lang::get('coupon_list'));
$this->_format_page($page);
$this->assign('coupons', $coupon);
$this->display('my_coupon.index.html');
}
开发者ID:zhangxiaoling,项目名称:ecmall,代码行数:34,代码来源:my_coupon.app.php
示例6: index
function index()
{
$page = $this->_get_page(8);
$type = isset($_GET['type']) && $_GET['type'] != '' ? trim($_GET['type']) : 'all_qa';
$conditions = '1=1 AND goods_qa.user_id = ' . $_SESSION['user_info']['user_id'];
if ($type == 'reply_qa') {
$conditions .= ' AND reply_content !="" ';
}
$my_qa_data = $this->my_qa_mod->find(array('fields' => 'ques_id,question_content,reply_content,time_post,time_reply,goods_qa.user_id,goods_qa.item_name,goods_qa.item_id,goods_qa.email,goods_qa.type,if_new,user_name', 'join' => 'belongs_to_store,belongs_to_user', 'count' => true, 'conditions' => $conditions, 'limit' => $page['limit'], 'order' => 'if_new desc,time_post desc'));
/* 当前位置 */
$this->_curlocal(LANG::get('member_center'), 'index.php?app=member', LANG::get('my_question'), 'index.php?app=my_question', LANG::get('my_question_list'));
/* 当前用户中心菜单 */
$this->_curitem('my_question');
/* 当前所处子菜单 */
$this->_curmenu('my_qa_list');
$page['item_count'] = $this->my_qa_mod->getCount();
//获取统计的数据
$this->_format_page($page);
$this->assign('_curmenu', $type);
$this->assign('page_info', $page);
$this->assign('my_qa_data', $my_qa_data);
if ($type == 'reply_qa') {
$update_data = array('if_new' => '0');
$this->my_qa_mod->edit($my_qa_data['ques_id'], $update_data);
}
$this->_config_seo('title', Lang::get('member_center') . ' - ' . Lang::get('my_question'));
$this->display('my_question.index.html');
}
开发者ID:zhangxiaoling,项目名称:ecmall,代码行数:28,代码来源:my_question.app.php
示例7: login
function login()
{
if ($this->visitor->has_login) {
$this->show_warning('has_login');
return;
}
if (!IS_POST) {
if (!empty($_GET['ret_url'])) {
$ret_url = trim($_GET['ret_url']);
} else {
if (isset($_SERVER['HTTP_REFERER'])) {
$ret_url = $_SERVER['HTTP_REFERER'];
} else {
$ret_url = SITE_URL . '/index.php';
}
}
/* 防止登陆成功后跳转到登陆、退出的页面 */
$ret_url = strtolower($ret_url);
if (str_replace(array('act=login', 'act=logout'), '', $ret_url) != $ret_url) {
$ret_url = SITE_URL . '/index.php';
}
if (Conf::get('captcha_status.login')) {
$this->assign('captcha', 1);
}
$this->import_resource(array('script' => 'jquery.plugins/jquery.validate.js'));
$this->assign('ret_url', rawurlencode($ret_url));
$this->_curlocal(LANG::get('user_login'));
$this->_config_seo('title', Lang::get('user_login') . ' - ' . Conf::get('site_title'));
$this->display('login.html');
/* 同步退出外部系统 */
if (!empty($_GET['synlogout'])) {
$ms =& ms();
echo $synlogout = $ms->user->synlogout();
}
} else {
if (Conf::get('captcha_status.login') && base64_decode($_SESSION['captcha']) != strtolower($_POST['captcha'])) {
$this->show_warning('captcha_failed');
return;
}
$user_name = trim($_POST['user_name']);
$password = $_POST['password'];
$ms =& ms();
$user_id = $ms->user->auth($user_name, $password);
if (!$user_id) {
/* 未通过验证,提示错误信息 */
$this->show_warning($ms->user->get_error());
return;
} else {
/* 通过验证,执行登陆操作 */
$this->_do_login($user_id);
/* 同步登陆外部系统 */
$synlogin = $ms->user->synlogin($user_id);
}
$this->show_message(Lang::get('login_successed') . $synlogin, 'back_before_login', rawurldecode($_POST['ret_url']), 'enter_member_center', 'index.php?app=member');
}
}
开发者ID:zhangxiaoling,项目名称:ecmall,代码行数:56,代码来源:frontend.base.php
示例8: reply
function reply()
{
if (!IS_POST) {
$ques_id = isset($_GET['ques_id']) && $_GET['ques_id'] != '' ? intval($_GET['ques_id']) : 0;
$conditions = ' AND goods_qa.store_id = ' . $_SESSION['user_info']['user_id'] . ' AND ques_id = ' . $ques_id;
$my_qa_data = $this->my_qa_mod->get(array('fields' => 'question_content,reply_content,goods_qa.user_id,goods_qa.email,time_post,user_name,goods_qa.item_id,goods_qa.item_name,goods_qa.type', 'join' => 'belongs_to_store,belongs_to_user', 'conditions' => '1=1 ' . $conditions));
if ($my_qa_data['reply_content'] != '') {
echo Lang::get('already_replied');
return;
}
/* 当前位置 */
$this->_curlocal(LANG::get('member_center'), 'index.php?app=member', LANG::get('my_qa'), 'index.php?app=my_qa', LANG::get('reply'));
/* 当前用户中心菜单 */
$this->_curitem('my_qa');
/* 当前所处子菜单 */
$this->_curmenu('reply');
$this->assign('_curmenu', 'reply');
$this->assign('page_info', $page);
$this->assign('my_qa_data', $my_qa_data);
$this->_config_seo('title', Lang::get('member_center') . ' - ' . Lang::get('reply'));
header('Content-Type:text/html;charset=' . CHARSET);
$this->display('my_qa.form.html');
} else {
$act = isset($_POST['act']) && $_POST['act'] != '' ? trim($_POST['act']) : '';
$ques_id = isset($_POST['ques_id']) && $_POST['ques_id'] != '' ? intval($_POST['ques_id']) : '';
$content = isset($_POST['content']) && $_POST['content'] != '' ? trim($_POST['content']) : '';
if ($act != 'reply' || $ques_id == '') {
$this->pop_warning('Hacking Attempt');
return;
}
if ($content == '') {
$this->pop_warning('content_not_null');
return;
}
$user_info = $this->my_qa_mod->get(array('conditions' => '1 = 1 AND ques_id = ' . $ques_id, 'fields' => 'user_id,email,item_id,item_name,type'));
extract($user_info);
$data = array('reply_content' => $content, 'time_reply' => gmtime(), 'if_new' => '1');
if ($this->my_qa_mod->edit($ques_id, $data)) {
$url = '';
switch ($type) {
case 'goods':
$url = SITE_URL . "/index.php?app={$type}&act=qa&id={$item_id}&ques_id={$ques_id}&new=yes";
break;
case 'groupbuy':
$url = SITE_URL . "/index.php?app={$type}&id={$item_id}&ques_id={$ques_id}&new=yes";
break;
}
$mail = get_mail('tobuyer_question_replied', array('item_name' => $item_name, 'type' => Lang::get($type), 'url' => $url));
$this->_mailto($email, addslashes($mail['subject']), addslashes($mail['message']));
$this->pop_warning('ok', 'my_qa_reply');
} else {
$this->pop_warning('reply_failed');
return;
}
}
}
开发者ID:zhangxiaoling,项目名称:ecmall,代码行数:56,代码来源:my_qa.app.php
示例9: instanceUrl
public function instanceUrl()
{
$id = $this->id;
if (!$id) {
throw new Conekta_Error(LANG::translate('error.resource.id', array('RESOURCE' => get_class()), LANG::EN), LANG::translate('error.resource.id_purchaser', null, Conekta::$locale));
}
$class = get_class($this);
$base = $this->classUrl($class);
$extn = urlencode($id);
return "{$base}/{$extn}";
}
开发者ID:BlickLabs,项目名称:AmparoExpress,代码行数:11,代码来源:Resource.php
示例10: instanceUrl
public function instanceUrl()
{
$id = $this->id;
if (!$id) {
throw new Conekta_Error(LANG::translate('error.resource.id', array('RESOURCE' => get_class()), LANG::EN), LANG::translate('error.resource.id_purchaser', null, Conekta::$locale));
}
$class = get_class($this);
$base = '/subscription';
$customerUrl = $this->customer->instanceUrl();
return "{$customerUrl}{$base}";
}
开发者ID:fernetsystem,项目名称:Fast-Price_Server_php_mvc,代码行数:11,代码来源:Subscription.php
示例11: index
/**
* 列出购物车中的商品
*
* @author Garbin
* @return void
*/
function index()
{
$store_id = isset($_GET['store_id']) ? intval($_GET['store_id']) : 0;
$carts = $this->_get_carts($store_id);
$this->_curlocal(LANG::get('cart'));
$this->_config_seo('title', Lang::get('confirm_goods') . ' - ' . Conf::get('site_title'));
if (empty($carts)) {
$this->_cart_empty();
return;
}
$this->assign('carts', $carts);
$this->display('cart.index.html');
}
开发者ID:woolh,项目名称:Online,代码行数:19,代码来源:cart.app.php
示例12: _get_channel_curlocal
function _get_channel_curlocal($channel)
{
$curlocal = array(array('text' => LANG::get('all_categories'), 'url' => url('app=category')));
if (isset($channel['cate_id']) && intval($channel['cate_id']) > 0) {
$parents = $this->_gcategory_mod->get_ancestor($channel['cate_id'], true);
foreach ($parents as $category) {
$curlocal[] = array('text' => $category['cate_name'], 'url' => url('app=search&act=store&cate_id=' . $category['cate_id']));
}
}
unset($curlocal[count($curlocal) - 1]);
$curlocal[] = array('text' => $channel['title'], 'url' => '');
return $curlocal;
}
开发者ID:BGCX261,项目名称:zmall-svn-to-git,代码行数:13,代码来源:channel.app.php
示例13: index
function index()
{
$tmp_info = $this->_store_mod->get(array('conditions' => $this->_store_id, 'join' => 'belongs_to_sgrade', 'fields' => 'domain, functions'));
$subdomain_enable = false;
if (ENABLED_SUBDOMAIN && in_array('subdomain', explode(',', $tmp_info['functions']))) {
$subdomain_enable = true;
}
if (!IS_POST) {
//传给iframe参数belong, item_id
$this->assign('belong', BELONG_STORE);
$this->assign('id', $this->_store_id);
$store = $this->_store_mod->get_info($this->_store_id);
$this->assign('store', $store);
$this->assign('editor_upload', $this->_build_upload(array('obj' => 'EDITOR_SWFU', 'belong' => BELONG_STORE, 'item_id' => $this->_store_id, 'button_text' => Lang::get('bat_upload'), 'button_id' => 'editor_upload_button', 'progress_id' => 'editor_upload_progress', 'upload_url' => 'index.php?app=swfupload', 'if_multirow' => 1)));
$this->assign('build_editor', $this->_build_editor(array('name' => 'description')));
$msn_active_url = 'http://settings.messenger.live.com/applications/websignup.aspx?returnurl=' . SITE_URL . '/index.php' . urlencode('?app=my_store&act=update_im_msn') . '&privacyurl=' . SITE_URL . '/index.php' . urlencode('?app=article&act=system&code=msn_privacy');
$this->assign('msn_active_url', $msn_active_url);
$region_mod =& m('region');
$this->assign('regions', $region_mod->get_options(0));
//$this->headtag('<script type="text/javascript" src="{lib file=mlselection.js}"></script>');
/* 属于店铺的附件 */
$files_belong_store = $this->_uploadedfile_mod->find(array('conditions' => 'store_id = ' . $this->visitor->get('manage_store') . ' AND belong = ' . BELONG_STORE . ' AND item_id =' . $this->visitor->get('manage_store'), 'fields' => 'this.file_id, this.file_name, this.file_path', 'order' => 'add_time DESC'));
/* 当前页面信息 */
$this->_curlocal(LANG::get('member_center'), 'index.php?app=member', LANG::get('my_store'));
$this->_curitem('my_store');
$this->_curmenu('my_store');
$this->import_resource('jquery.plugins/jquery.validate.js,mlselection.js');
$this->assign('files_belong_store', $files_belong_store);
$this->assign('subdomain_enable', $subdomain_enable);
$this->assign('domain_length', Conf::get('subdomain_length'));
$this->assign('page_title', Lang::get('member_center') . ' - ' . Lang::get('my_store'));
$this->display('my_store.index.html');
} else {
$subdomain = $tmp_info['domain'];
if ($subdomain_enable && !$tmp_info['domain']) {
$subdomain = empty($_POST['domain']) ? '' : trim($_POST['domain']);
if (!$this->_store_mod->check_domain($subdomain, Conf::get('subdomain_reserved'), Conf::get('subdomain_length'))) {
$this->show_warning($this->_store_mod->get_error());
return;
}
}
$data = $this->_upload_files();
if ($data === false) {
return;
}
$data = array_merge($data, array('store_name' => $_POST['store_name'], 'region_id' => $_POST['region_id'], 'region_name' => $_POST['region_name'], 'description' => $_POST['description'], 'address' => $_POST['address'], 'tel' => $_POST['tel'], 'im_qq' => $_POST['im_qq'], 'im_ww' => $_POST['im_ww'], 'domain' => $subdomain));
$this->_store_mod->edit($this->_store_id, $data);
$this->show_message('edit_ok');
}
}
开发者ID:BGCX261,项目名称:zhou3liu-svn-to-git,代码行数:50,代码来源:my_store.app.php
示例14: index
function index()
{
$conditions = empty($_GET['wait_verify']) ? "state <> '" . STORE_APPLYING . "'" : "state = '" . STORE_APPLYING . "'";
$filter = $this->_get_query_conditions(array(array('field' => 'store_name', 'equal' => 'like'), array('field' => 'sgrade')));
$store_id = $_GET['store_id'];
if ($store_id) {
$filter .= " AND store_id = '{$store_id}' ";
}
$owner_name = trim($_GET['owner_name']);
if ($owner_name) {
$filter .= " AND (user_name LIKE '%{$owner_name}%' OR owner_name LIKE '%{$owner_name}%') ";
}
//更新排序
if (isset($_GET['sort']) && isset($_GET['order'])) {
$sort = strtolower(trim($_GET['sort']));
$order = strtolower(trim($_GET['order']));
if (!in_array($order, array('asc', 'desc'))) {
$sort = 'sort_order';
$order = '';
}
} else {
$sort = 'store_id';
$order = 'desc';
}
$this->assign('filter', $filter);
$conditions .= $filter;
$page = $this->_get_page(50);
$stores = $this->_store_mod->find(array('conditions' => $conditions, 'join' => 'belongs_to_user', 'fields' => 'this.*,member.user_name', 'limit' => $page['limit'], 'count' => true, 'order' => "{$sort} {$order}"));
$sgrade_mod =& m('sgrade');
$grades = $sgrade_mod->get_options();
$this->assign('sgrades', $grades);
$states = array(STORE_APPLYING => LANG::get('wait_verify'), STORE_OPEN => Lang::get('open'), STORE_CLOSED => Lang::get('close'));
foreach ($stores as $key => $store) {
$stores[$key]['sgrade'] = $grades[$store['sgrade']];
$stores[$key]['state'] = $states[$store['state']];
$certs = empty($store['certification']) ? array() : explode(',', $store['certification']);
for ($i = 0; $i < count($certs); $i++) {
$certs[$i] = Lang::get($certs[$i]);
}
$stores[$key]['certification'] = join('<br />', $certs);
}
$this->assign('stores', $stores);
$page['item_count'] = $this->_store_mod->getCount();
$this->import_resource(array('script' => 'inline_edit.js'));
$this->_format_page($page);
$this->assign('filtered', $filter ? 1 : 0);
//是否有查询条件
$this->assign('page_info', $page);
$this->display('store.index.html');
}
开发者ID:BGCX261,项目名称:zmall-svn-to-git,代码行数:50,代码来源:store.app.php
示例15: index
function index()
{
$data = $this->_get_user_comments(10);
$this->assign('comments', $data['comments']);
$this->assign('page_info', $data['page_info']);
/* 当前位置 */
$this->_curlocal(LANG::get('member_center'), 'index.php?app=member', LANG::get('my_comment'));
//当前用户中心菜单项
$this->_curitem('my_comment');
$this->_config_seo('title', Lang::get('member_center') . ' - ' . "我的评价");
if (is_wap()) {
$this->assign("title", "商品评价");
}
$this->display('pr_comments.index.html');
}
开发者ID:184609680,项目名称:wcy_O2O_95180,代码行数:15,代码来源:my_comment.app.php
示例16: mall_coupon
function mall_coupon()
{
$page = $this->_get_page(10);
$coupon = $this->_get_mall_coupon(false, $page['limit']);
$this->_curlocal(LANG::get('member_center'), 'index.php?app=member', LANG::get('coupon'), 'index.php?app=coupon', LANG::get('coupons_list'));
$page['item_count'] = $this->_get_mall_coupon(true);
$this->_format_page($page);
$this->assign('page_info', $page);
$this->_curitem('coupon');
$this->_curmenu('mall_coupons');
$this->_config_seo('title', Lang::get('member_center') . ' - ' . Lang::get('coupon'));
$this->assign('coupons', $coupon);
$this->assign('type', 'mall_coupon');
$this->assign('time', gmtime());
$this->display('coupon.index.html');
}
开发者ID:BGCX261,项目名称:zmall-svn-to-git,代码行数:16,代码来源:coupon.app.php
示例17: index
function index()
{
$page = $this->_get_page(10);
$coupon = $this->_coupon_mod->find(array('conditions' => 'store_id = ' . $this->_store_id, 'limit' => $page['limit'], 'count' => true));
$this->_curlocal(LANG::get('member_center'), 'index.php?app=member', LANG::get('coupon'), 'index.php?app=coupon', LANG::get('coupons_list'));
$page['item_count'] = $this->_coupon_mod->getCount();
$this->_format_page($page);
$this->assign('page_info', $page);
$this->_curitem('coupon');
$this->_curmenu('coupons_list');
$this->_config_seo('title', Lang::get('member_center') . ' - ' . Lang::get('coupon'));
$this->assign('coupons', $coupon);
$this->import_resource(array('script' => array(array('path' => 'dialog/dialog.js', 'attr' => 'id="dialog_js"'), array('path' => 'jquery.ui/jquery.ui.js', 'attr' => ''), array('path' => 'jquery.ui/i18n/' . i18n_code() . '.js', 'attr' => ''), array('path' => 'jquery.plugins/jquery.validate.js', 'attr' => '')), 'style' => 'jquery.ui/themes/ui-lightness/jquery.ui.css'));
$this->assign('time', gmtime());
$this->display('coupon.index.html');
}
开发者ID:zhangxiaoling,项目名称:ecmall,代码行数:16,代码来源:coupon.app.php
示例18: index
function index()
{
$page = $this->_get_page(8);
$type = isset($_GET['type']) && $_GET['type'] != '' ? trim($_GET['type']) : 'all_qa';
$conditions = '1=1 AND goods_qa.user_id = ' . $_SESSION['user_info']['user_id'];
if ($type == 'reply_qa') {
$conditions .= ' AND reply_content !="" ';
}
$my_qa_data = $this->my_qa_mod->find(array('fields' => 'ques_id,question_content,reply_content,time_post,time_reply,goods_qa.user_id,goods_qa.item_name,goods_qa.item_id,goods_qa.email,goods_qa.type,if_new,user_name', 'join' => 'belongs_to_store,belongs_to_user', 'count' => true, 'conditions' => $conditions, 'limit' => $page['limit'], 'order' => 'if_new desc,time_post desc'));
/* 当前位置 */
$this->_curlocal(LANG::get('member_center'), 'index.php?app=member', "我的评价", 'index.php?app=my_question', "评价列表");
/* 当前用户中心菜单 */
$this->_curitem('my_question');
/* 当前所处子菜单 */
$this->_config_seo('title', Lang::get('member_center') . ' - ' . Lang::get('my_question'));
$this->display('pr_comments.index.html');
}
开发者ID:184609680,项目名称:wcy_O2O_95180,代码行数:17,代码来源:my_question.app.php
示例19: view
/**
* 查看订单详情
*
* @author Garbin
* @return void
*/
function view()
{
$order_id = isset($_GET['order_id']) ? intval($_GET['order_id']) : 0;
$model_order =& m('order');
$order_info = $model_order->findAll(array('conditions' => "order_alias.order_id={$order_id} AND seller_id=" . $this->visitor->get('manage_store'), 'join' => 'has_orderextm'));
$order_info = current($order_info);
if (!$order_info) {
$this->show_warning('no_such_order');
return;
}
//360cd.cn trans
if ($order_info['trans_id']) {
$trans_model =& m('trans');
$trans_info = $trans_model->get_trans($order_info['trans_id']);
$order_info['trans_info'] = $trans_info['desc'];
}
//360cd.cn trans
/* 团购信息 */
if ($order_info['extension'] == 'groupbuy') {
$groupbuy_mod =& m('groupbuy');
$group = $groupbuy_mod->get(array('join' => 'be_join', 'conditions' => 'order_id=' . $order_id, 'fields' => 'gb.group_id'));
$this->assign('group_id', $group['group_id']);
}
/* 当前位置 */
$this->_curlocal(LANG::get('member_center'), 'index.php?app=member', LANG::get('order_manage'), 'index.php?app=seller_order', LANG::get('view_order'));
/* 当前用户中心菜单 */
$this->_curitem('order_manage');
$this->_config_seo('title', Lang::get('member_center') . ' - ' . Lang::get('detail'));
/* 调用相应的订单类型,获取整个订单详情数据 */
$order_type =& ot($order_info['extension']);
$order_detail = $order_type->get_order_detail($order_id, $order_info);
$spec_ids = array();
foreach ($order_detail['data']['goods_list'] as $key => $goods) {
empty($goods['goods_image']) && ($order_detail['data']['goods_list'][$key]['goods_image'] = Conf::get('default_goods_image'));
$spec_ids[] = $goods['spec_id'];
}
/* 查出最新的相应的货号 */
$model_spec =& m('goodsspec');
$spec_info = $model_spec->find(array('conditions' => $spec_ids, 'fields' => 'sku'));
foreach ($order_detail['data']['goods_list'] as $key => $goods) {
$order_detail['data']['goods_list'][$key]['sku'] = $spec_info[$goods['spec_id']]['sku'];
}
$this->assign('order', $order_info);
$this->assign($order_detail['data']);
$this->display('seller_order.view.html');
}
开发者ID:BGCX261,项目名称:zmall-svn-to-git,代码行数:52,代码来源:seller_order.app.php
示例20: edit
function edit()
{
$addr_id = empty($_GET['addr_id']) ? 0 : intval($_GET['addr_id']);
if (!$addr_id) {
$this->pop_warning('no_such_address');
return;
}
if (!IS_POST) {
$model_address =& m('address');
$find_data = $model_address->find("addr_id = {$addr_id} AND user_id=" . $this->visitor->get('user_id'));
if (empty($find_data)) {
$this->show_warning('no_such_address');
return;
}
$address = current($find_data);
/* 当前位置 */
$this->_curlocal(LANG::get('member_center'), 'index.php?app=member', LANG::get('my_address'), 'index.php?app=my_address', LANG::get('edit_address'));
/* 当前用户中心菜单 */
/*$this->_curitem('my_address');
/* 当前所处子菜单 */
header('Content-Type:text/html;charset=' . CHARSET);
$this->_curmenu('edit_address');
$this->assign('address', $address);
//$this->import_resource('mlselection.js, jquery.plugins/jquery.validate.js');
$this->assign('act', 'edit');
$this->_get_regions();
$this->display('my_address.form.html');
} else {
/* 电话和手机至少填一项 */
if (!$_POST['phone_tel'] && !$_POST['phone_mob']) {
$this->pop_warning('phone_required');
return;
}
$data = array('consignee' => $_POST['consignee'], 'region_id' => $_POST['region_id'], 'region_name' => $_POST['region_name'], 'address' => $_POST['address'], 'zipcode' => $_POST['zipcode'], 'phone_tel' => $_POST['phone_tel'], 'phone_mob' => $_POST['phone_mob']);
$model_address =& m('address');
$model_address->edit("addr_id = {$addr_id} AND user_id=" . $this->visitor->get('user_id'), $data);
if ($model_address->has_error()) {
$this->pop_warning($model_address->get_error());
return;
}
$this->pop_warning('ok', APP . '_' . ACT);
$this->show_message('edit_address_successed', 'back_list', 'index.php?app=my_address', 'edit_again', 'index.php?app=my_address&act=edit&addr_id=' . $addr_id);
}
}
开发者ID:BGCX261,项目名称:zhou3liu-svn-to-git,代码行数:46,代码来源:my_address.app.php
注:本文中的LANG类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论