本文整理汇总了PHP中get_consignee_list函数的典型用法代码示例。如果您正苦于以下问题:PHP get_consignee_list函数的具体用法?PHP get_consignee_list怎么用?PHP get_consignee_list使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_consignee_list函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: address
function address()
{
switch ($_SERVER['REQUEST_METHOD']) {
case 'GET':
$r_data = get_consignee_list($_SESSION['user_id']);
return $r_data;
break;
case 'DELETE':
$consignee_id = intval($_GET['id']);
if (drop_consignee($consignee_id)) {
$r_data = 'Delete Address Success!';
} else {
$r_data = 'Delete Address Failed!';
}
return $r_data;
break;
case 'POST':
$address = array('user_id' => $_SESSION['user_id'], 'address_id' => intval($_POST['address_id']), 'country' => isset($_POST['country']) ? intval($_POST['country']) : 0, 'province' => isset($_POST['province']) ? intval($_POST['province']) : 0, 'city' => isset($_POST['city']) ? intval($_POST['city']) : 0, 'district' => isset($_POST['district']) ? intval($_POST['district']) : 0, 'address' => isset($_POST['address']) ? compile_str(trim($_POST['address'])) : '', 'consignee' => isset($_POST['consignee']) ? compile_str(trim($_POST['consignee'])) : '', 'email' => isset($_POST['email']) ? compile_str(trim($_POST['email'])) : '', 'tel' => isset($_POST['tel']) ? compile_str(make_semiangle(trim($_POST['tel']))) : '', 'mobile' => isset($_POST['mobile']) ? compile_str(make_semiangle(trim($_POST['mobile']))) : '', 'best_time' => isset($_POST['best_time']) ? compile_str(trim($_POST['best_time'])) : '', 'sign_building' => isset($_POST['sign_building']) ? compile_str(trim($_POST['sign_building'])) : '', 'zipcode' => isset($_POST['zipcode']) ? compile_str(make_semiangle(trim($_POST['zipcode']))) : '');
if (update_address($address)) {
$r_data = 'Update Address Success!';
} else {
$r_data = 'Update Address Failed!';
}
return $r_data;
break;
default:
return 'This API can not support ' . $_SERVER['REQUEST_METHOD'] . ' method';
break;
}
}
开发者ID:jiusanzhou,项目名称:ecapi,代码行数:30,代码来源:lib_controller_address.php
示例2: isset
$order_id = isset($_GET['order_id']) ? intval($_GET['order_id']) : 0;
if (cancel_order($order_id, $user_id)) {
ecs_header("Location: user.php?act=order_list\n");
exit;
} else {
$err->show($_LANG['order_list_lnk'], 'user.php?act=order_list');
}
} elseif ($action == 'address_list') {
include_once ROOT_PATH . 'includes/lib_transaction.php';
include_once ROOT_PATH . 'languages/' . $_CFG['lang'] . '/shopping_flow.php';
$smarty->assign('lang', $_LANG);
/* 取得国家列表、商店所在国家、商店所在国家的省列表 */
$smarty->assign('country_list', get_regions());
$smarty->assign('shop_province_list', get_regions(1, $_CFG['shop_country']));
/* 获得用户所有的收货人信息 */
$consignee_list = get_consignee_list($_SESSION['user_id']);
if (count($consignee_list) < 5 && $_SESSION['user_id'] > 0) {
/* 如果用户收货人信息的总数小于5 则增加一个新的收货人信息 */
$consignee_list[] = array('country' => $_CFG['shop_country'], 'email' => isset($_SESSION['email']) ? $_SESSION['email'] : '');
}
$smarty->assign('consignee_list', $consignee_list);
//取得国家列表,如果有收货人列表,取得省市区列表
foreach ($consignee_list as $region_id => $consignee) {
$consignee['country'] = isset($consignee['country']) ? intval($consignee['country']) : 0;
$consignee['province'] = isset($consignee['province']) ? intval($consignee['province']) : 0;
$consignee['city'] = isset($consignee['city']) ? intval($consignee['city']) : 0;
$province_list[$region_id] = get_regions(1, $consignee['country']);
$city_list[$region_id] = get_regions(2, $consignee['province']);
$district_list[$region_id] = get_regions(3, $consignee['city']);
}
/* 获取默认收货ID */
开发者ID:BGCX261,项目名称:zishashop-svn-to-git,代码行数:31,代码来源:user.php
示例3: action_address_list
function action_address_list()
{
$user = $GLOBALS['user'];
$_CFG = $GLOBALS['_CFG'];
$_LANG = $GLOBALS['_LANG'];
$smarty = $GLOBALS['smarty'];
$db = $GLOBALS['db'];
$ecs = $GLOBALS['ecs'];
$user_id = $_SESSION['user_id'];
include_once ROOT_PATH . 'includes/lib_transaction.php';
include_once ROOT_PATH . 'languages/' . $_CFG['lang'] . '/shopping_flow.php';
$smarty->assign('lang', $_LANG);
/* 取得国家列表、商店所在国家、商店所在国家的省列表 */
$smarty->assign('country_list', get_regions());
$smarty->assign('shop_province_list', get_regions(1, $_CFG['shop_country']));
/* 获得用户所有的收货人信息 */
$consignee_list = get_consignee_list($_SESSION['user_id']);
if (count($consignee_list) < 5 && $_SESSION['user_id'] > 0) {
/* 如果用户收货人信息的总数小于5 则增加一个新的收货人信息 */
$consignee_list[] = array('country' => $_CFG['shop_country'], 'email' => isset($_SESSION['email']) && is_email($_SESSION['email']) ? $_SESSION['email'] : '');
}
$smarty->assign('consignee_list', $consignee_list);
// 取得国家列表,如果有收货人列表,取得省市区列表
foreach ($consignee_list as $region_id => $consignee) {
$consignee['country'] = isset($consignee['country']) ? intval($consignee['country']) : 0;
$consignee['province'] = isset($consignee['province']) ? intval($consignee['province']) : 0;
$consignee['city'] = isset($consignee['city']) ? intval($consignee['city']) : 0;
$province_list[$region_id] = get_regions(1, $consignee['country']);
$city_list[$region_id] = get_regions(2, $consignee['province']);
$district_list[$region_id] = get_regions(3, $consignee['city']);
}
/* 获取默认收货ID */
$address_id = $db->getOne("SELECT address_id FROM " . $ecs->table('users') . " WHERE user_id='{$user_id}'");
// 赋值于模板
$smarty->assign('real_goods_count', 1);
$smarty->assign('shop_country', $_CFG['shop_country']);
$smarty->assign('shop_province', get_regions(1, $_CFG['shop_country']));
$smarty->assign('province_list', $province_list);
$smarty->assign('address', $address_id);
$smarty->assign('city_list', $city_list);
$smarty->assign('district_list', $district_list);
$smarty->assign('currency_format', $_CFG['currency_format']);
$smarty->assign('integral_scale', $_CFG['integral_scale']);
$smarty->assign('name_of_region', array($_CFG['name_of_region_1'], $_CFG['name_of_region_2'], $_CFG['name_of_region_3'], $_CFG['name_of_region_4']));
$smarty->display('user_transaction.dwt');
}
开发者ID:seanguo166,项目名称:yinoos,代码行数:46,代码来源:user.php
示例4: address_list
public function address_list () {
checkLogin();
include_once(RPC_ROOT . 'includes/lib_transaction_ec.php');
include_once('includes/lib_transaction.php');
$user_id = intval($_SESSION['user_id']);
$consignee_list = get_consignee_list($user_id);
$address_list = array();
//取得国家列表,如果有收货人列表,取得省市区列表
foreach ($consignee_list AS $key => $consignee)
{
$address_id = $consignee['address_id'];
$consignee['country'] = isset($consignee['country']) ? intval($consignee['country']) : 0;
$consignee['province'] = isset($consignee['province']) ? intval($consignee['province']) : 0;
$consignee['city'] = isset($consignee['city']) ? intval($consignee['city']) : 0;
$consignee['district'] = isset($consignee['district']) ? intval($consignee['district']) : 0;
$country = get_region_name($consignee['country']);
$province = get_region_name($consignee['province']);
$city = get_region_name($consignee['city']);
$district = get_region_name($consignee['district']);
$address_list[$address_id]['address'] = $country.'-'.$province.'-'.$city.'-'.$district.'-'.$consignee['address'];
$address_list[$address_id]['mobile'] = $consignee['mobile'];
//$address_list[$address_id]['username'] = $_SESSION['user_name'];
$address_list[$address_id]['username'] = $consignee['consignee'];
}
//print_r($address_list);exit;
jsonExit($address_list);
}
开发者ID:noikiy,项目名称:mdwp,代码行数:27,代码来源:user.action.php
示例5: hhs_header
* 如果用户已经登录了则检查是否有默认的收货地址
* 如果没有登录则跳转到登录和注册页面
*/
if (empty($_SESSION['direct_shopping']) && $_SESSION['user_id'] == 0) {
/* 用户没有登录且没有选定匿名购物,转向到登录页面 */
hhs_header("Location: flows.php?step=login\n");
exit;
}
$consignee = get_consignee($_SESSION['user_id']);
/* 检查收货人信息是否完整 */
if (!check_consignee_info($consignee, $flow_type)) {
/* 如果不完整则转向到收货人信息填写界面 */
//hhs_header("Location: flows.php?step=consignee\n");
//exit;
}
$smarty->assign("address_num", count(get_consignee_list($_SESSION['user_id'])));
/* 取得国家列表、商店所在国家、商店所在国家的省列表 */
$smarty->assign('country_list', get_regions());
$smarty->assign('shop_country', $_CFG['shop_country']);
$smarty->assign('shop_province_list', get_regions(1, $_CFG['shop_country']));
$mobile_phone = $GLOBALS['db']->getOne("select mobile_phone from " . $GLOBALS['hhs']->table('users') . " where user_id=" . $_SESSION['user_id']);
$smarty->assign('mobile_phone', $mobile_phone);
//echo "<pre>";
//print_r($consignee);exit;
/* 获得用户所有的收货人信息 */
if ($_SESSION['user_id'] > 0) {
//$consignee_list = get_consignee_list($_SESSION['user_id']);
/*
$temp[0]=$consignee_list[0];
$consignee_list=$temp;*/
/*
开发者ID:shiruolin,项目名称:hzzshop,代码行数:31,代码来源:flows.php
示例6: rpcLang
$code = '1';
}
else
{
$msg = rpcLang('user.php', 'edit_profile_failed');
$code = '1';
}
}
jsonExit("{\"status\":\"$msg\",\"code\":\"$code\"}");
}else if($act == 'address_list')//收货地址列表
{
checkLogin();
include_once(ROOT_PATH . 'includes/lib_transaction.php');
include_once('includes/lib_transaction.php');
$user_id = intval($_SESSION['user_id']);
$consignee_list = get_consignee_list($user_id);
$address_list = array();
//取得国家列表,如果有收货人列表,取得省市区列表
foreach ($consignee_list AS $key => $consignee)
{
$address_id = $consignee['address_id'];
$consignee['country'] = isset($consignee['country']) ? intval($consignee['country']) : 0;
$consignee['province'] = isset($consignee['province']) ? intval($consignee['province']) : 0;
$consignee['city'] = isset($consignee['city']) ? intval($consignee['city']) : 0;
$consignee['district'] = isset($consignee['district']) ? intval($consignee['district']) : 0;
$country = get_region_name($consignee['country']);
$province = get_region_name($consignee['province']);
$city = get_region_name($consignee['city']);
$district = get_region_name($consignee['district']);
$address_list[$address_id]['address'] = $country.'-'.$province.'-'.$city.'-'.$district.'-'.$consignee['address'];
$address_list[$address_id]['mobile'] = $consignee['mobile'];
开发者ID:noikiy,项目名称:mdwp,代码行数:31,代码来源:user.php
注:本文中的get_consignee_list函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论