Exemplo n.º 1
0
                 $goods_list[$key]['rows'] = 1;
             } else {
                 $goods_list[$key]['rows'] = count(explode(chr(13), $attr));
             }
         }
     }
     $smarty->assign('goods_list', $goods_list);
     /* 取得商品总金额 */
     $smarty->assign('goods_amount', order_amount($order_id));
 } elseif ('consignee' == $step) {
     /* 查询是否存在实体商品 */
     $exist_real_goods = exist_real_goods($order_id);
     $smarty->assign('exist_real_goods', $exist_real_goods);
     /* 取得收货地址列表 */
     if ($order['user_id'] > 0) {
         $smarty->assign('address_list', address_list($order['user_id']));
         $address_id = isset($_REQUEST['address_id']) ? intval($_REQUEST['address_id']) : 0;
         if ($address_id > 0) {
             $address = address_info($address_id);
             if ($address) {
                 $order['consignee'] = $address['consignee'];
                 $order['country'] = $address['country'];
                 $order['province'] = $address['province'];
                 $order['city'] = $address['city'];
                 $order['district'] = $address['district'];
                 $order['email'] = $address['email'];
                 $order['address'] = $address['address'];
                 $order['zipcode'] = $address['zipcode'];
                 $order['tel'] = $address['tel'];
                 $order['mobile'] = $address['mobile'];
                 $order['sign_building'] = $address['sign_building'];
Exemplo n.º 2
0
<?php

require dirname(__FILE__) . '/includes/init.php';
$_REQUEST['act'] = empty($_REQUEST['act']) ? 'list' : trim($_REQUEST['act']);
if ($_REQUEST['act'] == 'list') {
    $smarty->assign('ur_here', '用户地址管理');
    $smarty->assign('full_page', 1);
    $list = address_list();
    //echo '<pre>';print_r($list);echo '</pre>';
    $smarty->assign('record_count', $list['record_count']);
    $smarty->assign('page_count', $list['page_count']);
    $smarty->assign('filter', $list['filter']);
    $smarty->assign('address', $list['list']);
    $smarty->display('address_list.html');
} elseif ($_REQUEST['act'] == 'query') {
    $list = address_list();
    $smarty->assign('record_count', $list['record_count']);
    $smarty->assign('page_count', $list['page_count']);
    $smarty->assign('filter', $list['filter']);
    $smarty->assign('address', $list['list']);
    make_json_result($smarty->fetch('address_list.html'), '', array('filter' => $list['filter'], 'page_count' => $list['page_count']));
}
function address_list()
{
    if (!empty($_GET['is_ajax']) && $_GET['is_ajax'] == 1) {
        $_REQUEST['address'] = json_str_iconv($_REQUEST['address']);
        $_REQUEST['to_buyer'] = json_str_iconv($_REQUEST['to_buyer']);
        $_REQUEST['pay_note'] = json_str_iconv($_REQUEST['pay_note']);
        $_REQUEST['wsts'] = json_str_iconv($_REQUEST['wsts']);
    }
    $filter['sdate'] = empty($_REQUEST['sdate']) ? '' : trim($_REQUEST['sdate']);