本文整理汇总了PHP中urlShop函数的典型用法代码示例。如果您正苦于以下问题:PHP urlShop函数的具体用法?PHP urlShop怎么用?PHP urlShop使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了urlShop函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: profile_menu
/**
* 用户中心右边,小导航
*
* @param string $menu_key 当前导航的menu_key
* @return
*/
private function profile_menu($menu_key = '')
{
$menu_array = array();
$menu_array[] = array('menu_key' => 'cost_list', 'menu_name' => '消费列表', 'menu_url' => urlShop('store_cost', 'cost_list'));
Tpl::output('member_menu', $menu_array);
Tpl::output('menu_key', $menu_key);
}
示例2: getMansongRuleListByID
/**
* 读取满即送规则列表
* @param array $mansong_id 查询条件
* @param int $page 分页数
* @param string $order 排序
* @param string $field 所需字段
* @return array 满即送套餐列表
*
*/
public function getMansongRuleListByID($mansong_id)
{
$condition = array();
$condition['mansong_id'] = $mansong_id;
$mansong_rule_list = $this->where($condition)->order('price desc')->select();
if (!empty($mansong_rule_list)) {
$model_goods = Model('goods');
for ($i = 0, $j = count($mansong_rule_list); $i < $j; $i++) {
$goods_id = intval($mansong_rule_list[$i]['goods_id']);
if (!empty($goods_id)) {
$goods_info = $model_goods->getGoodsOnlineInfo(array('goods_id' => $goods_id));
if (!empty($goods_info)) {
if (empty($mansong_rule_list[$i]['mansong_goods_name'])) {
$mansong_rule_list[$i]['mansong_goods_name'] = $goods_info['goods_name'];
}
$mansong_rule_list[$i]['goods_image'] = $goods_info['goods_image'];
$mansong_rule_list[$i]['goods_image_url'] = cthumb($goods_info['goods_image'], $goods_info['store_id']);
$mansong_rule_list[$i]['goods_storage'] = $goods_info['goods_storage'];
$mansong_rule_list[$i]['goods_id'] = $goods_id;
$mansong_rule_list[$i]['goods_url'] = urlShop('goods', 'index', array('goods_id' => $goods_id));
}
}
}
}
return $mansong_rule_list;
}
示例3: __construct
public function __construct() {
parent::__construct();
Language::read('member_layout,member_voucher');
//判断系统是否开启代金券功能
if (intval(C('voucher_allow')) !== 1){
showMessage(Language::get('member_voucher_unavailable'),urlShop('member', 'home'),'html','error');
}
}
示例4: __construct
public function __construct() {
parent::__construct();
//读取语言包
Language::read('member_member_points,member_pointorder');
//判断系统是否开启积分和积分兑换功能
if (C('points_isuse') != 1 || C('pointprod_isuse') != 1){
showDialog(L('member_pointorder_unavailable'),urlShop('member', 'home'),'error');
}
$this->_getCommonOperationsAndNavLink('member_points');
}
示例5: profile_menu
/**
* 用户中心右边,小导航
*
* @param string $menu_type 导航类型
* @param string $menu_key 当前导航的menu_key
* @return
*/
private function profile_menu($menu_type, $menu_key = '')
{
$menu_array = array();
switch ($menu_type) {
case 'store_storage_alarm':
$menu_array = array(1 => array('menu_key' => 'store_storage_alarm', 'menu_name' => 'Stock alarm', 'menu_url' => urlShop('store_storage_alarm', 'index')));
break;
}
Tpl::output('member_menu', $menu_array);
Tpl::output('menu_key', $menu_key);
}
示例6: __construct
public function __construct() {
parent::__construct();
/**
* 读取语言包
*/
Language::read('member_member_points,member_pointorder');
/**
* 判断系统是否开启积分功能
*/
if (C('points_isuse') != 1){
showMessage(Language::get('points_unavailable'),urlShop('member', 'home'),'html','error');
}
}
示例7: profile_menu
/**
* 用户中心右边,小导航
*
* @param string $menu_key 当前导航的menu_key
* @return
*/
private function profile_menu($menu_key = '')
{
$menu_array = array();
$menu_array[] = array('menu_key' => 'store_navigation', 'menu_name' => '导航列表', 'menu_url' => urlShop('store_navigation', 'navigation_list'));
if ($menu_key == 'navigation_add') {
$menu_array[] = array('menu_key' => 'navigation_add', 'menu_name' => '添加导航', 'menu_url' => urlShop('store_navigation', 'navigation_add'));
}
if ($menu_key == 'navigation_edit') {
$menu_array[] = array('menu_key' => 'navigation_edit', 'menu_name' => '编辑导航', 'menu_url' => urlShop('store_navigation', 'navigation_edit'));
}
Tpl::output('member_menu', $menu_array);
Tpl::output('menu_key', $menu_key);
}
示例8: mb_qrOp
/**
* 生成二维码
*/
public function mb_qrOp()
{
$url = urlShop('mb_app', 'index');
$mobile_app = 'mb_app.png';
require_once BASE_RESOURCE_PATH . DS . 'phpqrcode' . DS . 'index.php';
$PhpQRCode = new PhpQRCode();
$PhpQRCode->set('pngTempDir', BASE_UPLOAD_PATH . DS . ATTACH_COMMON . DS);
$PhpQRCode->set('date', $url);
$PhpQRCode->set('pngTempName', $mobile_app);
$PhpQRCode->init();
$this->log('生成手机端二维码');
showMessage('生成二维码成功', 'index.php?act=mb_app&op=mb_app');
}
示例9: indexOp
/**
* 通知
*/
public function indexOp()
{
$strat_time = strtotime("-30 day");
// 只通知最近30天的记录
$model_arrtivalnotice = Model('arrival_notice');
$count = $model_arrtivalnotice->getArrivalNoticeCount(array());
$times = ceil($count / $this->_num);
if ($times == 0) {
return false;
}
for ($i = 0; $i <= $times; $i++) {
// 删除30天之前的记录
$model_arrtivalnotice->delArrivalNotice(array('an_addtime' => array('lt', $strat_time)));
$notice_list = $model_arrtivalnotice->getArrivalNoticeList(array(), '*', $i . ',' . $this->_num);
if (empty($notice_list)) {
continue;
}
// 查询商品是否已经上架
$goodsid_array = array();
foreach ($notice_list as $val) {
$goodsid_array[] = $val['goods_id'];
}
$goodsid_array = array_unique($goodsid_array);
$goods_list = Model('goods')->getGoodsOnlineList(array('goods_id' => array('in', $goodsid_array), 'goods_storage' => array('gt', 0)), 'goods_id');
if (empty($goods_list)) {
continue;
}
// 需要通知到货的商品
$goodsid_array = array();
foreach ($goods_list as $val) {
$goodsid_array[] = $val['goods_id'];
}
// 根据商品id重新查询需要通知的列表
$notice_list = $model_arrtivalnotice->getArrivalNoticeList(array('goods_id' => array('in', $goodsid_array)), '*');
if (empty($notice_list)) {
continue;
}
foreach ($notice_list as $val) {
$param = array();
$param['code'] = 'arrival_notice';
$param['member_id'] = $val['member_id'];
$param['param'] = array('goods_name' => $val['goods_name'], 'goods_url' => urlShop('goods', 'index', array('goods_id' => $val['goods_id'])));
QueueClient::push('sendMemberMsg', $param);
}
// 清楚发送成功的数据
$model_arrtivalnotice->delArrivalNotice(array('goods_id' => array('in', $goodsid_array)));
}
}
示例10: buy_step1Op
/**
* 购物车、直接购买第一步:选择收获地址和配置方式
*/
public function buy_step1Op() {
$member_model=Model('member');
$member_info = $member_model->infoMember(array('member_id'=>"{$_SESSION['member_id']}",'member_state'=>'1'));
if (!checkLive()){
showDialog('请先充值,等待激活成为正式会员',urlShop('charge','add'),'error');
exit;
}
$model_buy = Model('buy');
$result = $model_buy->buyStep1($_POST['cart_id'], $_POST['ifcart'], $_POST['invalid_cart'], $_SESSION['member_id'], $_SESSION['store_id']);
if(!empty($result['error'])) {
showMessage($result['error'], '', 'html', 'error');
}
Tpl::output('ifcart', $result['ifcart']);
//商品金额计算(分别对每个商品/优惠套装小计、每个店铺小计)
Tpl::output('store_cart_list', $result['store_cart_list']);
Tpl::output('store_goods_total', $result['store_goods_total']);
//取得店铺优惠 - 满即送(赠品列表,店铺满送规则列表)
Tpl::output('store_premiums_list', $result['store_premiums_list']);
Tpl::output('store_mansong_rule_list', $result['store_mansong_rule_list']);
//返回店铺可用的代金券
Tpl::output('store_voucher_list', $result['store_voucher_list']);
//返回需要计算运费的店铺ID数组 和 不需要计算运费(满免运费活动的)店铺ID及描述
Tpl::output('need_calc_sid_list', $result['need_calc_sid_list']);
Tpl::output('cancel_calc_sid_list', $result['cancel_calc_sid_list']);
//将商品ID、数量、运费模板、运费序列化,加密,输出到模板,选择地区AJAX计算运费时作为参数使用
Tpl::output('freight_hash', $result['freight_list']);
//输出用户默认收货地址
Tpl::output('address_info', $result['address_info']);
//输出有货到付款时,在线支付和货到付款及每种支付下商品数量和详细列表
Tpl::output('pay_goods_list', $result['pay_goods_list']);
Tpl::output('ifshow_offpay', $result['ifshow_offpay']);
Tpl::output('deny_edit_payment', $result['deny_edit_payment']);
//不提供增值税发票时抛出true(模板使用)
Tpl::output('vat_deny', $result['vat_deny']);
//增值税发票哈希值(php验证使用)
Tpl::output('vat_hash', $result['vat_hash']);
//输出默认使用的发票信息
Tpl::output('inv_info', $result['inv_info']);
//显示使用预存款支付及会员预存款
Tpl::output('available_pd_amount', $result['available_predeposit']);
//标识 购买流程执行第几步
Tpl::output('buy_step','step2');
Tpl::showpage('buy_step1');
}
示例11: ajax_loadOp
/**
* 异步查询购物车
*/
public function ajax_loadOp()
{
$model_cart = Model('cart');
if ($_SESSION['member_id']) {
//登录后
$cart_list = $model_cart->listCart('db', array('buyer_id' => $_SESSION['member_id']));
$cart_array = array();
if (!empty($cart_list)) {
foreach ($cart_list as $k => $cart) {
$cart_array['list'][$k]['cart_id'] = $cart['cart_id'];
$cart_array['list'][$k]['goods_id'] = $cart['goods_id'];
$cart_array['list'][$k]['goods_name'] = $cart['goods_name'];
$cart_array['list'][$k]['goods_price'] = $cart['goods_price'];
$cart_array['list'][$k]['goods_image'] = thumb($cart, 60);
$cart_array['list'][$k]['goods_num'] = $cart['goods_num'];
$cart_array['list'][$k]['goods_url'] = urlShop('goods', 'index', array('goods_id' => $cart['goods_id']));
}
}
} else {
//登录前
$cart_list = $model_cart->listCart('cookie');
foreach ($cart_list as $key => $cart) {
$value = array();
$value['cart_id'] = $cart['goods_id'];
$value['goods_name'] = $cart['goods_name'];
$value['goods_price'] = $cart['goods_price'];
$value['goods_num'] = $cart['goods_num'];
$value['goods_image'] = thumb($cart, 60);
$value['goods_url'] = urlShop('goods', 'index', array('goods_id' => $cart['goods_id']));
$cart_array['list'][] = $value;
}
}
setNcCookie('cart_goods_num', $model_cart->cart_goods_num, 2 * 3600);
$cart_array['cart_all_price'] = ncPriceFormat($model_cart->cart_all_price);
$cart_array['cart_goods_num'] = $model_cart->cart_goods_num;
if ($_GET['type'] == 'html') {
Tpl::output('cart_list', $cart_array);
Tpl::showpage('cart_mini', 'null_layout');
} else {
$cart_array = strtoupper(CHARSET) == 'GBK' ? Language::getUTF8($cart_array) : $cart_array;
$json_data = json_encode($cart_array);
if (isset($_GET['callback'])) {
$json_data = $_GET['callback'] == '?' ? '(' . $json_data . ')' : $_GET['callback'] . "({$json_data});";
}
exit($json_data);
}
}
示例12: editVoucherState
/**
* 更新使用的代金券状态
* @param $input_voucher_list
* @throws Exception
*/
public function editVoucherState($voucher_list)
{
$model_voucher = Model('voucher');
foreach ($voucher_list as $store_id => $voucher_info) {
$update = $model_voucher->editVoucher(array('voucher_state' => 2), array('voucher_id' => $voucher_info['voucher_id']));
// if (!$update) throw new Exception('代金券更新失败');
// 发送用户店铺消息
$send = new sendMemberMsg();
$send->set('member_id', $voucher_info['voucher_owner_id']);
$send->set('code', 'voucher_use');
$param = array();
$param['voucher_code'] = $voucher_info['voucher_code'];
$param['voucher_url'] = urlShop('member_voucher', 'index');
$send->send($param);
unset($send);
}
}
示例13: exppointlogOp
/**
* 经验明细列表
*/
public function exppointlogOp()
{
//查询会员及其附属信息
$result = parent::pointshopMInfo();
//查询积分日志列表
$model_exppoints = Model('exppoints');
$where = array();
$where['exp_memberid'] = $_SESSION['member_id'];
$list_log = $model_exppoints->getExppointsLogList($where, '*', 20, 0, 'exp_id desc');
//信息输出
Tpl::output('stage_arr', $model_exppoints->getStage());
Tpl::output('show_page', $model_exppoints->showpage(5));
Tpl::output('list_log', $list_log);
//分类导航
$nav_link = array(0 => array('title' => L('homepage'), 'link' => SHOP_SITE_URL), 1 => array('title' => L('nc_pointprod'), 'link' => urlShop('pointshop', 'index')), 2 => array('title' => '经验值明细'));
Tpl::output('nav_link_list', $nav_link);
Tpl::showpage('point_exppointslog');
}
示例14: rechargecard_addOp
/**
* 平台充值卡
*/
public function rechargecard_addOp()
{
if (!chksubmit()) {
self::profile_menu('rechargecard_add', 'rechargecard_add');
Tpl::showpage('member_rechargecard.add');
return;
}
$sn = (string) $_POST['rc_sn'];
if (!$sn || strlen($sn) > 50) {
showMessage('平台充值卡卡号不能为空且长度不能大于50', '', 'html', 'error');
exit;
}
try {
model('predeposit')->addRechargeCard($sn, $_SESSION);
showMessage('平台充值卡使用成功', urlShop('predeposit', 'rcb_log_list'));
} catch (Exception $e) {
showMessage($e->getMessage(), '', 'html', 'error');
exit;
}
}
示例15: __construct
public function __construct() {
parent::__construct();
/**
* 读取语言包
*/
Language::read('home_pointcart');
/**
* 判断系统是否开启积分和积分兑换功能
*/
if ($GLOBALS['setting_config']['points_isuse'] != 1 || $GLOBALS['setting_config']['pointprod_isuse'] != 1){
showMessage(Language::get('pointcart_unavailable'),'index.php','html','error');
}
//验证是否登录
if ($_SESSION['is_login'] != '1'){
showMessage(Language::get('pointcart_unlogin_error'),'index.php?act=login','html','error');
}
if (!checkLive()){
showDialog('请先充值,等待激活成为正式会员',urlShop('charge','add'),'error');
exit;
}
}