} elseif ($action == 'act_del_booking') { include_once ROOT_PATH . 'includes/lib_clips.php'; $id = isset($_GET['id']) ? intval($_GET['id']) : 0; if ($id == 0 || $user_id == 0) { ecs_header("Location: user.php?act=booking_list\n"); exit; } $result = delete_booking($id, $user_id); if ($result) { ecs_header("Location: user.php?act=booking_list\n"); exit; } } elseif ($action == 'affirm_received') { include_once ROOT_PATH . 'includes/lib_transaction.php'; $order_id = isset($_GET['order_id']) ? intval($_GET['order_id']) : 0; if (affirm_received($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 == 'account_raply') { $smarty->display('user_transaction.dwt'); } elseif ($action == 'account_deposit') { include_once ROOT_PATH . 'includes/lib_clips.php'; $surplus_id = isset($_GET['id']) ? intval($_GET['id']) : 0; $account = get_surplus_info($surplus_id); $smarty->assign('payment', get_online_payment_list(false)); $smarty->assign('order', $account); $smarty->display('user_transaction.dwt'); } elseif ($action == 'account_detail') {
$smarty->assign('footer', get_footer()); $smarty->display('order_list.html'); exit; } elseif ($act == 'cancel_order') { include_once ROOT_PATH . 'includes/lib_transaction.php'; include_once ROOT_PATH . 'includes/lib_order.php'; $order_id = isset($_GET['order_id']) ? intval($_GET['order_id']) : 0; if (cancel_order($order_id, $_SESSION['user_id'])) { ecs_header("Location: user.php?act=order_list\n"); exit; } } elseif ($act == 'affirm_received') { include_once ROOT_PATH . 'includes/lib_transaction.php'; $order_id = isset($_GET['order_id']) ? intval($_GET['order_id']) : 0; $_LANG['buyer'] = '买家'; if (affirm_received($order_id, $_SESSION['user_id'])) { ecs_header("Location: user.php?act=order_list\n"); exit; } } elseif ($act == 'logout') { if (!isset($back_act) && isset($GLOBALS['_SERVER']['HTTP_REFERER'])) { $back_act = strpos($GLOBALS['_SERVER']['HTTP_REFERER'], 'user.php') ? './index.php' : $GLOBALS['_SERVER']['HTTP_REFERER']; } $user->logout(); $Loaction = 'index.php'; ecs_header("Location: {$Loaction}\n"); } elseif ($act == 'register') { if (!isset($back_act) && isset($GLOBALS['_SERVER']['HTTP_REFERER'])) { $back_act = strpos($GLOBALS['_SERVER']['HTTP_REFERER'], 'user.php') ? './index.php' : $GLOBALS['_SERVER']['HTTP_REFERER']; } /* 取出注册扩展字段 */
function action_affirm_received() { $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'; $order_id = isset($_GET['order_id']) ? intval($_GET['order_id']) : 0; if (affirm_received($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'); } }
$smarty->assign('os_unconfirmed', OS_UNCONFIRMED); $smarty->assign('cs_await_pay', CS_AWAIT_PAY); $smarty->assign('cs_await_ship', CS_AWAIT_SHIP); $smarty->assign('full_page', 1); $order_list = team_list(); $smarty->assign('order_list', $order_list['orders']); $smarty->assign('filter', $order_list['filter']); $smarty->assign('record_count', $order_list['record_count']); $smarty->assign('page_count', $order_list['page_count']); $smarty->assign('sort_order_time', '<img src="images/sort_desc.gif">'); $tpl_file = 'team_list.htm'; $order_list = $db->getAll("select order_id,shipping_time,user_id, order_sn , order_status, shipping_status, pay_status from " . $hhs->table("order_info") . " where pay_status=2 and shipping_status=1"); foreach ($order_list as $idx => $value) { $now = gmtime(); if ($now >= $value['shipping_time'] + $_CFG['affirm_received_time'] * 24 * 3600) { if (affirm_received($value['order_id'], $value['user_id'])) { $bonus_list = send_order_bonus($value['order_id']); } } } //统计 $sql = "select count(*) from " . $hhs->table('order_info') . " where extension_code='team_goods' and team_status=1 and team_first=1 "; $smarty->assign('team_num1', $db->getOne($sql)); $sql = "select count(*) from " . $hhs->table('order_info') . " where extension_code='team_goods' and team_status=2 and team_first=1 "; $smarty->assign('team_num2', $db->getOne($sql)); $sql = "select count(*) from " . $hhs->table('order_info') . " where extension_code='team_goods' and team_status=3 and team_first=1 "; $smarty->assign('team_num3', $db->getOne($sql)); /* 显示模板 */ assign_query_info(); $smarty->display($tpl_file); } elseif ($_REQUEST['act'] == 'teammem_list') {