本文整理汇总了PHP中merge_user_order函数的典型用法代码示例。如果您正苦于以下问题:PHP merge_user_order函数的具体用法?PHP merge_user_order怎么用?PHP merge_user_order使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了merge_user_order函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ecs_header
ecs_header("Location: user.php?act=message_list&order_id={$order_id}\n");
exit;
} elseif ($action == 'del_cmt') {
$id = isset($_GET['id']) ? intval($_GET['id']) : 0;
if ($id > 0) {
$sql = "DELETE FROM " . $ecs->table('comment') . " WHERE comment_id = '{$id}' AND user_id = '{$user_id}'";
$db->query($sql);
}
ecs_header("Location: user.php?act=comment_list\n");
exit;
} elseif ($action == 'merge_order') {
include_once ROOT_PATH . 'includes/lib_transaction.php';
include_once ROOT_PATH . 'includes/lib_order.php';
$from_order = isset($_POST['from_order']) ? trim($_POST['from_order']) : '';
$to_order = isset($_POST['to_order']) ? trim($_POST['to_order']) : '';
if (merge_user_order($from_order, $to_order, $user_id)) {
show_message($_LANG['merge_order_success'], $_LANG['order_list_lnk'], 'user.php?act=order_list', 'info');
} else {
$err->show($_LANG['order_list_lnk']);
}
} elseif ($action == 'return_to_cart') {
include_once ROOT_PATH . 'includes/cls_json.php';
include_once ROOT_PATH . 'includes/lib_transaction.php';
$json = new JSON();
$result = array('error' => 0, 'message' => '', 'content' => '');
$order_id = isset($_POST['order_id']) ? intval($_POST['order_id']) : 0;
if ($order_id == 0) {
$result['error'] = 1;
$result['message'] = $_LANG['order_id_empty'];
die($json->encode($result));
}
示例2: action_merge_order
function action_merge_order()
{
$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 . 'includes/lib_order.php';
$from_order = isset($_POST['from_order']) ? trim($_POST['from_order']) : '';
$to_order = isset($_POST['to_order']) ? trim($_POST['to_order']) : '';
/* 代码增加_start By www.68ecshop.com */
$sql = "select supplier_id from " . $ecs->table('order_info') . " where order_sn='{$from_order}' ";
$supplier_id_from = $db->getOne($sql);
$sql = "select supplier_id from " . $ecs->table('order_info') . " where order_sn='{$to_order}' ";
$supplier_id_to = $db->getOne($sql);
if ($supplier_id_from != $supplier_id_to) {
show_message('由于供货商不同,订单合并失败', $_LANG['order_list_lnk'], 'user.php?act=order_list', 'info');
}
/* 代码增加_end By www.68ecshop.com */
if (merge_user_order($from_order, $to_order, $user_id)) {
show_message($_LANG['merge_order_success'], $_LANG['order_list_lnk'], 'user.php?act=order_list', 'info');
} else {
$err->show($_LANG['order_list_lnk']);
}
}