$payment_info['pay_button'] = $pay_obj->get_code($order, $payment); /* 模板赋值 */ $smarty->assign('payment', $payment_info); $smarty->assign('pay_fee', price_format($payment_info['pay_fee'], false)); $smarty->assign('amount', price_format($amount, false)); $smarty->assign('order', $order); $smarty->display('user_transaction.dwt'); } } elseif ($action == 'cancel') { 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=account_log\n"); exit; } $result = del_user_account($id, $user_id); if ($result) { ecs_header("Location: user.php?act=account_log\n"); exit; } } elseif ($action == 'pay') { include_once ROOT_PATH . 'includes/lib_clips.php'; include_once ROOT_PATH . 'includes/lib_payment.php'; include_once ROOT_PATH . 'includes/lib_order.php'; //变量初始化 $surplus_id = isset($_GET['id']) ? intval($_GET['id']) : 0; $payment_id = isset($_GET['pid']) ? intval($_GET['pid']) : 0; if ($surplus_id == 0) { ecs_header("Location: user.php?act=account_log\n"); exit; }
function action_cancel() { $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_clips.php'; $id = isset($_GET['id']) ? intval($_GET['id']) : 0; if ($id == 0 || $user_id == 0) { ecs_header("Location: user.php?act=account_log\n"); exit; } $result = del_user_account($id, $user_id); if ($result) { ecs_header("Location: user.php?act=account_log\n"); exit; } }