• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_agency_by_regions函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get_agency_by_regions函数的典型用法代码示例。如果您正苦于以下问题:PHP get_agency_by_regions函数的具体用法?PHP get_agency_by_regions怎么用?PHP get_agency_by_regions使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了get_agency_by_regions函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: order_info

         /* 如果已付款,检查金额是否变动,并执行相应操作 */
         $order = order_info($order_id);
         handle_order_money_change($order, $msgs, $links);
         /* 显示提示信息 */
         if (!empty($msgs)) {
             sys_msg(join(chr(13), $msgs), 0, $links);
         } else {
             /* 跳转到订单详情 */
             ecs_header("Location: order.php?act=info&order_id=" . $order_id . "\n");
             exit;
         }
     }
 } elseif ('consignee' == $step) {
     /* 保存订单 */
     $order = $_POST;
     $order['agency_id'] = get_agency_by_regions(array($order['country'], $order['province'], $order['city'], $order['district']));
     update_order($order_id, $order);
     /* 该订单所属办事处是否变化 */
     $agency_changed = $old_order['agency_id'] != $order['agency_id'];
     /* todo 记录日志 */
     $sn = $old_order['order_sn'];
     admin_log($sn, 'edit', 'order');
     if (isset($_POST['next'])) {
         /* 下一步 */
         if (exist_real_goods($order_id)) {
             /* 存在实体商品,去配送方式 */
             ecs_header("Location: order.php?act=" . $step_act . "&order_id=" . $order_id . "&step=shipping\n");
             exit;
         } else {
             /* 不存在实体商品,去支付方式 */
             ecs_header("Location: order.php?act=" . $step_act . "&order_id=" . $order_id . "&step=payment\n");
开发者ID:norain2050,项目名称:benhu,代码行数:31,代码来源:order.php


示例2: get_cart_goods

     $cart_goods_stock = get_cart_goods();
     $_cart_goods_stock = array();
     foreach ($cart_goods_stock['goods_list'] as $value) {
         $_cart_goods_stock[$value['rec_id']] = $value['goods_number'];
     }
     flow_cart_stock($_cart_goods_stock);
     unset($cart_goods_stock, $_cart_goods_stock);
 }
 $consignee = get_consignee($_SESSION['user_id']);
 $_POST['how_oos'] = isset($_POST['how_oos']) ? intval($_POST['how_oos']) : 0;
 $_POST['card_message'] = isset($_POST['card_message']) ? htmlspecialchars($_POST['card_message']) : '';
 $_POST['inv_type'] = !empty($_POST['inv_type']) ? htmlspecialchars($_POST['inv_type']) : '';
 $_POST['inv_payee'] = isset($_POST['inv_payee']) ? htmlspecialchars($_POST['inv_payee']) : '';
 $_POST['inv_content'] = isset($_POST['inv_content']) ? htmlspecialchars($_POST['inv_content']) : '';
 $_POST['postscript'] = isset($_POST['postscript']) ? htmlspecialchars($_POST['postscript']) : '';
 $order = array('shipping_id' => intval($_POST['shipping']), 'pay_id' => isset($_POST['payment']) ? intval($_POST['payment']) : '0', 'pack_id' => isset($_POST['pack']) ? intval($_POST['pack']) : 0, 'card_id' => isset($_POST['card']) ? intval($_POST['card']) : 0, 'card_message' => trim($_POST['card_message']), 'surplus' => isset($_POST['surplus']) ? floatval($_POST['surplus']) : 0.0, 'integral' => isset($_POST['integral']) ? intval($_POST['integral']) : 0, 'bonus_id' => isset($_POST['bonus']) ? intval($_POST['bonus']) : 0, 'need_inv' => empty($_POST['need_inv']) ? 0 : 1, 'inv_type' => $_POST['inv_type'], 'inv_payee' => trim($_POST['inv_payee']), 'inv_content' => $_POST['inv_content'], 'postscript' => trim($_POST['postscript']), 'how_oos' => isset($_LANG['oos'][$_POST['how_oos']]) ? addslashes($_LANG['oos'][$_POST['how_oos']]) : '', 'need_insure' => isset($_POST['need_insure']) ? intval($_POST['need_insure']) : 0, 'user_id' => $_SESSION['user_id'], 'add_time' => gmtime(), 'order_status' => OS_UNCONFIRMED, 'shipping_status' => SS_UNSHIPPED, 'pay_status' => PS_UNPAYED, 'agency_id' => get_agency_by_regions(array($consignee['country'], $consignee['province'], $consignee['city'], $consignee['district'])));
 /* 扩展信息 */
 if (isset($_SESSION['flow_type']) && intval($_SESSION['flow_type']) != CART_GENERAL_GOODS) {
     $order['extension_code'] = $_SESSION['extension_code'];
     $order['extension_id'] = $_SESSION['extension_id'];
 } else {
     $order['extension_code'] = '';
     $order['extension_id'] = 0;
 }
 /* 检查积分余额是否合法 */
 $user_id = $_SESSION['user_id'];
 if ($user_id > 0) {
     $user_info = user_info($user_id);
     $order['surplus'] = min($order['surplus'], $user_info['user_money'] + $user_info['credit_line']);
     if ($order['surplus'] < 0) {
         $order['surplus'] = 0;
开发者ID:a494008974,项目名称:bzbshop,代码行数:31,代码来源:order.php


示例3: done

	public function done () {
		global $ecs,$db,$_CFG;
		include_once(RPC_ROOT.'includes/lib_clips_ec.php');
	    include_once(RPC_ROOT.'includes/lib_payment.php');
	
	    /* 取得购物类型 */
	    $flow_type = isset($_SESSION['flow_type']) ? intval($_SESSION['flow_type']) : CART_GENERAL_GOODS;
	
	    /* 检查购物车中是否有商品 */
	    $sql = "SELECT COUNT(*) FROM " . $ecs->table('cart') ." WHERE session_id = '" . SESS_ID . "' " .
	           "AND parent_id = 0 AND is_gift = 0 AND rec_type = '$flow_type'";
	    
		if ($db->getOne($sql) == 0)
	    {
			$msg = rpcLang('flow.php', 'no_goods_in_cart');
			jsonExit("{\"status\":\"$msg\"}");
	    }
	
	    /* 检查商品库存,如果使用库存,且下订单时减库存,则减少库存 */
	    if ($_CFG['use_storage'] == '1' && $_CFG['stock_dec_time'] == SDT_PLACE)
	    {
	        $cart_goods_stock = get_cart_goods();       
	        $_cart_goods_stock = array();        
	        foreach ($cart_goods_stock['goods_list'] as $value)
	        {
	            $_cart_goods_stock[$value['rec_id']] = $value['goods_number'];
	        }       
	        zy_flow_cart_stock($_cart_goods_stock);        
	        unset($cart_goods_stock, $_cart_goods_stock);
	    }
	
	    /*
	     * 检查用户是否已经登录
	     * 如果用户已经登录了则检查是否有默认的收货地址
	     * 如果没有登录则跳转到登录和注册页面
	     */
	    if (empty($_SESSION['direct_shopping']) && $_SESSION['user_id'] == 0)
	    {
	        /* 用户没有登录且没有选定匿名购物,转向到登录页面 */
	        $msg = rpcLang('user.php', 'nologin');
			jsonExit("{\"status\":\"$msg\"}");
	    }
	
	    $consignee = get_consignee($_SESSION['user_id']);
	
	    /* 检查收货人信息是否完整 */
	    if (!check_consignee_info($consignee, $flow_type))
	    {
	        $msg = rpcLang('flow.php', 'user_address_not_full');
			jsonExit("{\"status\":\"$msg\"}");
	    }
	
	
	    $_GET['how_oos']	  = isset($_GET['how_oos']) ? intval($_GET['how_oos']) : 0;
	    $_GET['card_message'] = isset($_GET['card_message']) ? htmlspecialchars($_GET['card_message']) : '';
	    $_GET['inv_type']     = !empty($_GET['inv_type']) ? htmlspecialchars($_GET['inv_type']) : '';
	    $_GET['inv_payee']    = isset($_GET['inv_payee']) ? htmlspecialchars($_GET['inv_payee']) : '';
	    $_GET['inv_content']  = isset($_GET['inv_content']) ? htmlspecialchars($_GET['inv_content']) : '';
	    $_GET['postscript']   = isset($_GET['postscript']) ? htmlspecialchars($_GET['postscript']) : '';
	
	    $referer = empty($_GET['referer']) ? 'Android':trim($_GET['referer']);
	    $order = array(
	        //'shipping_id'     => intval($_POST['shipping']),
	    	'shipping_id'     => intval($_GET['shipping']),//快递id
	        'pay_id'          => intval($_GET['payment']),//支付方式id
	        'pack_id'         => isset($_GET['pack']) ? intval($_GET['pack']) : 0,//包装
	        'card_id'         => isset($_GET['card']) ? intval($_GET['card']) : 0,//贺卡
	        'card_message'    => trim($_GET['card_message']),
	        'surplus'         => isset($_POST['surplus']) ? floatval($_POST['surplus']) : 0.00,
	        'integral'        => isset($_POST['integral']) ? intval($_POST['integral']) : 0,
	        'bonus_id'        => isset($_GET['bonus']) ? intval($_GET['bonus']) : 0,
	        'need_inv'        => empty($_POST['need_inv']) ? 0 : 1,
	        'postscript'      => trim($_POST['postscript']),
	        'how_oos'         => isset($_LANG['oos'][$_POST['how_oos']]) ? addslashes($_LANG['oos'][$_POST['how_oos']]) : '',
	        'need_insure'     => isset($_POST['need_insure']) ? intval($_POST['need_insure']) : 0,
	        'user_id'         => $_SESSION['user_id'],
	        'add_time'        => gmtime(),
	        'order_status'    => OS_UNCONFIRMED,
	        'shipping_status' => SS_UNSHIPPED,
	        'pay_status'      => PS_UNPAYED,
	        'agency_id'       => get_agency_by_regions(array($consignee['country'], $consignee['province'], $consignee['city'], $consignee['district']))
	        );
		if(EC_CHARSET == 'utf-8'){
			$order['inv_type'] = gbktoutf8($_GET['inv_type']);
			$order['inv_payee'] = gbktoutf8(trim($_GET['inv_payee']));
			$order['inv_content'] = gbktoutf8($_GET['inv_content']);
		}else{
			$order['inv_type'] = utf8togbk($_GET['inv_type']);
			$order['inv_payee'] = utf8togbk(trim($_GET['inv_payee']));
			$order['inv_content'] = utf8togbk($_GET['inv_content']);
		}
	
	    /* 扩展信息 */
	    if (isset($_SESSION['flow_type']) && intval($_SESSION['flow_type']) != CART_GENERAL_GOODS)
	    {
	        $order['extension_code'] = $_SESSION['extension_code'];
	        $order['extension_id'] = $_SESSION['extension_id'];
	    }
	    else
	    {
//.........这里部分代码省略.........
开发者ID:noikiy,项目名称:mdwp,代码行数:101,代码来源:flow.action.php


示例4: isset

        'surplus'         => isset($_POST['surplus']) ? floatval($_POST['surplus']) : 0.00,
        'integral'        => isset($_POST['integral']) ? intval($_POST['integral']) : 0,
        'bonus_id'        => isset($_POST['bonus']) ? intval($_POST['bonus']) : 0,
        'need_inv'        => empty($_POST['need_inv']) ? 0 : 1,
        'inv_type'        => $_POST['inv_type'],
        'inv_payee'       => trim($_POST['inv_payee']),
        'inv_content'     => $_POST['inv_content'],
        'postscript'      => trim($_POST['postscript']),
        'how_oos'         => isset($_LANG['oos'][$_POST['how_oos']]) ? addslashes($_LANG['oos'][$_POST['how_oos']]) : '',
        'need_insure'     => isset($_POST['need_insure']) ? intval($_POST['need_insure']) : 0,
        'user_id'         => $_SESSION['user_id'],
        'add_time'        => gmtime(),
        'order_status'    => OS_UNCONFIRMED,
        'shipping_status' => SS_UNSHIPPED,
        'pay_status'      => PS_UNPAYED,
        'agency_id'       => get_agency_by_regions(array($consignee['country'], $consignee['province'], $consignee['city'], $consignee['district']))
        );

    /* 扩展信息 */
    if (isset($_SESSION['flow_type']) && intval($_SESSION['flow_type']) != CART_GENERAL_GOODS)
    {
        $order['extension_code'] = $_SESSION['extension_code'];
        $order['extension_id'] = $_SESSION['extension_id'];
    }
    else
    {
        $order['extension_code'] = '';
        $order['extension_id'] = 0;
    }

    /* 检查积分余额是否合法 */
开发者ID:alphaouyang,项目名称:ecshop,代码行数:31,代码来源:flow.php


示例5: foreach

 foreach ($cart_goods_new as $ckey => $cval) {
     $cart_goods = $cval['goodlist'];
     $_POST['how_oos'] = isset($_POST['how_oos']) ? intval($_POST['how_oos']) : 0;
     $_POST['card_message'] = isset($_POST['card_message']) ? compile_str($_POST['card_message']) : '';
     $_POST['inv_type'] = !empty($_POST['inv_type']) ? compile_str($_POST['inv_type']) : '';
     $_POST['inv_payee'] = isset($_POST['inv_payee']) ? compile_str($_POST['inv_payee']) : '';
     $_POST['inv_content'] = isset($_POST['inv_content']) ? compile_str($_POST['inv_content']) : '';
     $_POST['postscript'] = isset($_POST['postscript']) ? compile_str($_POST['postscript']) : '';
     $order_integral = isset($_POST['integral']) ? $_POST['integral'] : array();
     $order_bonus_id = isset($_POST['bonus']) ? $_POST['bonus'] : array();
     $order_bonus_sn = isset($_POST['bonus_sn']) ? $_POST['bonus_sn'] : array();
     $order_surplus = isset($_POST['surplus']) ? $_POST['surplus'] : array();
     $_POST['vat_invoice'] = isset($_POST['vat_invoice']) ? compile_str($_POST['vat_invoice']) : '';
     $_POST['normal_invoice'] = isset($_POST['normal_invoice']) ? compile_str($_POST['normal_invoice']) : '';
     //$_POST['danwei'] = isset($_POST['danwei']) ? compile_str($_POST['danwei']) : '';
     $order = array('shipping_id' => intval($_POST['shipping']), 'pay_id' => intval($_POST['payment']), 'pack_id' => isset($_POST['pack']) ? intval($_POST['pack']) : 0, 'card_id' => isset($_POST['card']) ? intval($_POST['card']) : 0, 'card_message' => trim($_POST['card_message']), 'surplus' => isset($order_surplus[$ckey]) ? floatval($order_surplus[$ckey]) : 0.0, 'integral' => isset($order_integral[$ckey]) ? intval($order_integral[$ckey]) : 0, 'bonus_id' => isset($order_bonus_id[$ckey]) ? intval($order_bonus_id[$ckey]) : 0, 'need_inv' => empty($_POST['need_inv']) ? 0 : 1, 'postscript' => trim($_POST['postscript']), 'how_oos' => isset($_LANG['oos'][$_POST['how_oos']]) ? addslashes($_LANG['oos'][$_POST['how_oos']]) : '', 'need_insure' => isset($_POST['need_insure']) ? intval($_POST['need_insure']) : 0, 'user_id' => $_SESSION['user_id'], 'add_time' => gmtime(), 'order_status' => OS_UNCONFIRMED, 'shipping_status' => SS_UNSHIPPED, 'pay_status' => PS_UNPAYED, 'agency_id' => get_agency_by_regions(array($consignee['country'], $consignee['province'], $consignee['city'], $consignee['district'])), 'supplier_id' => $ckey, 'need_inv' => 1, 'inv_content' => $_POST['cont'], 'vat_inv_company_name' => $_POST['vat_inv_company_name'], 'vat_inv_taxpayer_id' => $_POST['vat_inv_taxpayer_id'], 'vat_inv_registration_address' => $_POST['vat_inv_registration_address'], 'vat_inv_registration_phone' => $_POST['vat_inv_registration_phone'], 'vat_inv_deposit_bank' => $_POST['vat_inv_deposit_bank'], 'vat_inv_bank_account' => $_POST['vat_inv_bank_account'], 'inv_consignee_name' => $_POST['inv_consignee_name'], 'inv_consignee_phone' => $_POST['inv_consignee_phone'], 'inv_consignee_country 	' => '1', 'inv_consignee_province' => $_POST['inv_consignee_province'], 'inv_consignee_city' => $_POST['selCities'], 'inv_consignee_district' => $_POST['selDistricts'], 'inv_consignee_address' => $_POST['inv_consignee_address']);
     if ($_POST['normal_invoice']) {
         $order['inv_type'] = $_POST['normal_invoice'];
         if ($_POST['danwei']) {
             $order['inv_payee'] = $_POST['danwei'];
         } else {
             $order['inv_payee'] = '个人';
         }
         $order['inv_payee_type'] = $_POST['oadio'];
         $order['inv_payee_type'] = 'individual';
     } else {
         $order['inv_type'] = $_POST['vat_invoice'];
     }
     /* 扩展信息 */
     if (isset($_SESSION['flow_type']) && intval($_SESSION['flow_type']) != CART_GENERAL_GOODS) {
         $order['extension_code'] = $_SESSION['extension_code'];
开发者ID:firsteam,项目名称:falcons,代码行数:31,代码来源:flow.php



注:本文中的get_agency_by_regions函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_ajax_value函数代码示例发布时间:2022-05-15
下一篇:
PHP get_age函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap