当前位置: 首页>>代码示例>>PHP>>正文


PHP drop_consignee函数代码示例

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


在下文中一共展示了drop_consignee函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: array

    $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');
} elseif ($action == 'act_edit_address') {
    include_once ROOT_PATH . 'includes/lib_transaction.php';
    include_once ROOT_PATH . 'languages/' . $_CFG['lang'] . '/shopping_flow.php';
    $smarty->assign('lang', $_LANG);
    $address = array('user_id' => $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']) ? trim($_POST['address']) : '', 'consignee' => isset($_POST['consignee']) ? trim($_POST['consignee']) : '', 'email' => isset($_POST['email']) ? trim($_POST['email']) : '', 'tel' => isset($_POST['tel']) ? make_semiangle(trim($_POST['tel'])) : '', 'mobile' => isset($_POST['mobile']) ? make_semiangle(trim($_POST['mobile'])) : '', 'best_time' => isset($_POST['best_time']) ? trim($_POST['best_time']) : '', 'sign_building' => isset($_POST['sign_building']) ? trim($_POST['sign_building']) : '', 'zipcode' => isset($_POST['zipcode']) ? make_semiangle(trim($_POST['zipcode'])) : '');
    if (update_address($address)) {
        show_message($_LANG['edit_address_success'], $_LANG['address_list_lnk'], 'user.php?act=address_list');
    }
} elseif ($action == 'drop_consignee') {
    include_once 'includes/lib_transaction.php';
    $consignee_id = intval($_GET['id']);
    if (drop_consignee($consignee_id)) {
        ecs_header("Location: user.php?act=address_list\n");
        exit;
    } else {
        show_message($_LANG['del_address_false']);
    }
} elseif ($action == 'collection_list') {
    include_once ROOT_PATH . 'includes/lib_clips.php';
    $page = isset($_REQUEST['page']) ? intval($_REQUEST['page']) : 1;
    $record_count = $db->getOne("SELECT COUNT(*) FROM " . $ecs->table('collect_goods') . " WHERE user_id='{$user_id}' ORDER BY add_time DESC");
    $pager = get_pager('user.php', array('act' => $action), $record_count, $page);
    $smarty->assign('pager', $pager);
    $smarty->assign('goods_list', get_collection_goods($user_id, $pager['size'], $pager['start']));
    $smarty->assign('url', $ecs->url());
    $lang_list = array('UTF8' => $_LANG['charset']['utf8'], 'GB2312' => $_LANG['charset']['zh_cn'], 'BIG5' => $_LANG['charset']['zh_tw']);
    $smarty->assign('lang_list', $lang_list);
开发者ID:BGCX261,项目名称:zishashop-svn-to-git,代码行数:31,代码来源:user.php

示例3: action_drop_consignee

function action_drop_consignee()
{
    $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 'includes/lib_transaction.php';
    $consignee_id = intval($_GET['id']);
    if (drop_consignee($consignee_id)) {
        ecs_header("Location: user.php?act=address_list\n");
        exit;
    } else {
        show_message($_LANG['del_address_false']);
    }
}
开发者ID:seanguo166,项目名称:yinoos,代码行数:18,代码来源:user.php

示例4: define

 *   _/  _/_/  _/_/_/_/  _/_/_/_/  _/_/          _/      _/    _/  _/    _/   
 *  _/    _/  _/        _/        _/  _/      _/        _/    _/  _/    _/    
 *   _/_/_/    _/_/_/    _/_/_/  _/    _/  _/_/_/_/_/    _/_/      _/_/       
 *                                                                          
 *
 *  Copyright 2013-2014, Geek Zoo Studio
 *  http://www.ecmobile.cn/license.html
 *
 *  HQ China:
 *    2319 Est.Tower Van Palace 
 *    No.2 Guandongdian South Street 
 *    Beijing , China
 *
 *  U.S. Office:
 *    One Park Place, Elmira College, NY, 14901, USA
 *
 *  QQ Group:   329673575
 *  BBS:        bbs.ecmobile.cn
 *  Fax:        +86-10-6561-5510
 *  Mail:       info@geek-zoo.com
 */
define('INIT_NO_USERS', true);
require EC_PATH . '/includes/init.php';
GZ_Api::authSession();
include_once EC_PATH . '/includes/lib_transaction.php';
$address_id = _POST('address_id', 0);
if (empty($address_id)) {
    GZ_Api::outPut(101);
}
drop_consignee($address_id);
GZ_Api::outPut(array());
开发者ID:goto9ccc,项目名称:ECMobile_Universal,代码行数:31,代码来源:delete.php

示例5: drop_consignee

	public function drop_consignee () {
		checkLogin();
		include_once(RPC_ROOT . 'includes/lib_transaction_ec.php');
		$consignee_id = empty($_GET['address_id']) ? 0: intval($_GET['address_id']);
		if (drop_consignee($consignee_id))
		{
			$msg = rpcLang('user.php', 'address_delete_success');
			$code = '0';
		}else
		{
			$msg = rpcLang('user.php', 'address_delete_failure');
			$code = '1';
		}
		jsonExit("{\"status\":\"$msg\",\"code\":\"$code\"}");
		
	}
开发者ID:noikiy,项目名称:mdwp,代码行数:16,代码来源:user.action.php


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