public function mortgate_pay() { if (!$GLOBALS['user_info']) { app_redirect(url("user#login")); } $GLOBALS['tmpl']->assign("page_title", "充值诚意金"); $deal_id = $_REQUEST['deal_id']; $GLOBALS['tmpl']->assign("deal_id", $deal_id); $deal_info = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "deal where is_delete = 0 and is_effect = 1 and id = " . $deal_id); $GLOBALS['tmpl']->assign("deal_info", $deal_info); $new_money = user_need_mortgate(); $has_money = $GLOBALS['db']->getOne("select sum(amount) from " . DB_PREFIX . "money_freeze where platformUserNo=" . $GLOBALS['user_info']['id'] . " and deal_id=" . $deal_id . " and status=1 "); //$has_money=$GLOBALS['db']->getOne("select mortgage_money from ".DB_PREFIX."user where id=".$GLOBALS['user_info']['id']); $money = $new_money - $has_money; if ($money <= 0) { //app_redirect(url("account#mortgate_incharge")); showSuccess("您的诚意金已支付,无需再支付!"); } $GLOBALS['tmpl']->assign("money", $money); if ($money > $GLOBALS['user_info']['money']) { $left_money = $money - floatval($GLOBALS['user_info']['money']); } else { $left_money = 0; } $GLOBALS['tmpl']->assign("left_money", $left_money); $payment_list = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "payment where is_effect = 1 and online_pay=1 order by sort asc "); $payment_html = ""; foreach ($payment_list as $k => $v) { $class_name = $v['class_name'] . "_payment"; require_once APP_ROOT_PATH . "system/payment/" . $class_name . ".php"; $o = new $class_name(); $payment_html .= "<div>" . $o->get_display_code() . "<div class='blank'></div></div>"; } $GLOBALS['tmpl']->assign("payment_html", $payment_html); $GLOBALS['tmpl']->assign("coll", is_tg(true)); $GLOBALS['tmpl']->display("mortgage_incharge.html"); }
public function mortgate_pay() { if (!$GLOBALS['user_info']) { app_redirect(url_wap("user#login")); } $GLOBALS['tmpl']->assign("page_title", "缴纳诚意金"); $deal_id = $_REQUEST['deal_id']; $GLOBALS['tmpl']->assign("deal_id", $deal_id); $deal_info = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "deal where is_delete = 0 and is_effect = 1 and id = " . $deal_id); $GLOBALS['tmpl']->assign("deal_info", $deal_info); $new_money = user_need_mortgate(); $has_money = $GLOBALS['db']->getOne("select sum(amount) from " . DB_PREFIX . "money_freeze where platformUserNo=" . $GLOBALS['user_info']['id'] . " and deal_id=" . $deal_id . " and status=1 "); $money = $new_money - $has_money; if ($money <= 0) { //app_redirect(url_wap("account#mortgate_incharge")); showSuccess("您的诚意金已支付,无需再支付!"); } $GLOBALS['tmpl']->assign("money", $money); if ($money > $GLOBALS['user_info']['money']) { $left_money = $money - floatval($GLOBALS['user_info']['money']); } else { $left_money = 0; } $GLOBALS['tmpl']->assign("left_money", $left_money); $payment_list = get_payment_list("wap"); $GLOBALS['tmpl']->assign("payment_list", $payment_list); $GLOBALS['tmpl']->assign("coll", is_tg(true)); $GLOBALS['tmpl']->display("account_mortgate_pay.html"); }
public function mortgate_pay() { if (!$GLOBALS['user_info']) { app_redirect(url("user#login")); } $GLOBALS['tmpl']->assign("page_title", "充值诚意金"); $new_money = user_need_mortgate(); $has_money = $GLOBALS['db']->getOne("select mortgage_money from " . DB_PREFIX . "user where id=" . $GLOBALS['user_info']['id']); $money = $new_money - $has_money; if ($money <= 0) { //app_redirect(url("account#mortgate_incharge")); showSuccess("您的诚意金已支付,无需再支付!"); } $GLOBALS['tmpl']->assign("money", $money); $payment_list = get_payment_list("wap"); $GLOBALS['tmpl']->assign("payment_list", $payment_list); $GLOBALS['tmpl']->display("account_mortgate_pay.html"); }
public function mortgate_pay() { if (!$GLOBALS['user_info']) { app_redirect(url("user#login")); } $GLOBALS['tmpl']->assign("page_title", "充值诚意金"); $new_money = user_need_mortgate(); $has_money = $GLOBALS['db']->getOne("select mortgage_money from " . DB_PREFIX . "user where id=" . $GLOBALS['user_info']['id']); $money = $new_money - $has_money; if ($money <= 0) { //app_redirect(url("account#mortgate_incharge")); showSuccess("您的诚意金已支付,无需再支付!"); } $GLOBALS['tmpl']->assign("money", $money); $payment_list = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "payment where is_effect = 1 and online_pay=1 order by sort asc "); $payment_html = ""; foreach ($payment_list as $k => $v) { $class_name = $v['class_name'] . "_payment"; require_once APP_ROOT_PATH . "system/payment/" . $class_name . ".php"; $o = new $class_name(); $payment_html .= "<div>" . $o->get_display_code() . "<div class='blank'></div></div>"; } $GLOBALS['tmpl']->assign("payment_html", $payment_html); $GLOBALS['tmpl']->display("mortgage_incharge.html"); }