<?php
	session_start();
	
	require_once("db/db.php");	
	require_once("common/common.php");
	
	//设置统一语言格式
	header("Content-type: text/html; charset=gb2312"); 
	
	$price = trim($_REQUEST['preprice']);
	$strblistno = trim($_REQUEST['blid']);
	$paytype = trim($_REQUEST['paytype']);
	$intxzdays = trim($_REQUEST['xzday']);
	$wxorderno = trim($_REQUEST['wxbill']);	//威信支付订单号 
	
	//开始保存续住信息
	//判断是否已经提交过
	$strpayforxz=trim($_SESSION["main_wxpayforxz"]);
	if($strpayforxz==1)
	{	
		if($paytype == 1)
		{
			$sql = sprintf("EXECUTE TRS_OrderRoomAddDays %s,%s,'会员卡',%s,'微信续住'", $strblistno,$intxzdays,$price);
			$result = querySql($sql);
		}
		else if($paytype == 2)
		{
			$strremarks="微信续住,[/*".$wxorderno."*/]";
			$sql = sprintf("EXECUTE TRS_OrderRoomAddDays %s,%s,'微信支付',%s,'%s'", $strblistno,$intxzdays,$price,$strremarks);
			$result = querySql($sql);
		}
		else
		{
			$sql = sprintf("EXECUTE TRS_OrderRoomAddDays %s,%s,'其他支付',%s,'微信续住'", $strblistno,$intxzdays,$price);
			$result = querySql($sql);
		}
	}
	$_SESSION["main_wxpayforxz"]="";
	
	//关闭数据库
	closeDb();	
?>
<html>
<head>
	<meta charset="gb2312">	
	<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
	<meta name="apple-mobile-web-app-capable" content="1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="format-detection" content="telephone=0">
	<meta name="apple-touch-fullscreen" content="1">
	<title>在线支付</title>
	<script src="jsp4/jquery.js"></script>
	<link rel="stylesheet" href="css/mycss.css"> 
	
	<script>
		setTimeout("window.location='roomlist.php'",1000);
	</script>

	<script language="JavaScript"> 
		//不允许进行后退
		javascript:window.history.forward(0); 
	</script>
</head>

<body leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0">
&nbsp;<br>
<center><span style='color:green;font-size:22px'><b>付款成功</b></span></center>
<p>
</body>

</html>



