<%
option explicit
%>
<!--#include file="md5.asp"-->
<!--#include file="../conn/conn.asp"-->
<!--#include file="../conn/config.asp"-->
<!--#include file="../conn/nosql.asp"-->

<%if session("user")="" then
response.write "<script language='javascript'>"
response.write "alert('您没还有登录，请登录后再访问本页！');"
response.write"this.location.href='/index.asp';</SCRIPT>"
response.end
end if
if session("id")="" then 
response.write "<script language='javascript'>"
response.write "alert('您没还有登录，请登录后再访问本页！');"
response.write"this.location.href='/index.asp';</SCRIPT>"
response.end
end if%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>在线冲值-<%=webname%></title>
<link href="../css.css" REL="stylesheet" TYPE="text/css">
<style type="text/css">
<!--
body {
	background-image: url();
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.style1 {color: #FFFFFF}
.style10 {color: #FF3300;
	font-weight: bold;
}
-->
</style>
<SCRIPT language=javascript>
//--检测登陆-->

	   function DoLogin() {

	      var UsernameGet = trim(document.loginForm.UsernameGet.value);
		  var PasswordGet = trim(document.loginForm.PasswordGet.value);
		  var Verifycode = trim(document.loginForm.Verifycode.value);

          if(UsernameGet == "") {
		    alert("请输入会员登录名！");
			document.loginForm.UsernameGet.focus();
		    return false;
		  } 
		  if(PasswordGet == "") {
		    alert("请输入您的会员密码！");
			document.loginForm.PasswordGet.focus();
		    return false;
		  } 
		  if(Verifycode == "") {
		    alert("请输入您的登录验证码！");
			document.loginForm.Verifycode.focus();
		    return false;
		  }  
		  
		  
		 }

           function trim(inputString) {
	   
              if (typeof inputString != "string") { return inputString; }
              var retValue = inputString;
              var ch = retValue.substring(0, 1);
              while (ch == " ") { 
	          //检查字符串开始部分的空格
                  retValue = retValue.substring(1, retValue.length);
                  ch = retValue.substring(0, 1);
              }
              ch = retValue.substring(retValue.length-1, retValue.length);
              while (ch == " ") {
                 //检查字符串结束部分的空格
                 retValue = retValue.substring(0, retValue.length-1);
                 ch = retValue.substring(retValue.length-1, retValue.length);
              }
              while (retValue.indexOf("  ") != -1) { 
	         //将文字中间多个相连的空格变为一个空格
                 retValue = retValue.substring(0, retValue.indexOf("  ")) + retValue.substring(retValue.indexOf("  ")+1, retValue.length); 
              }
              return retValue;
           } 

//-->
</SCRIPT>
<script language="JavaScript" type="text/JavaScript">
<!--



function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>
<script Language="JavaScript"> 
function FormCheck() 
{ 
if (trim(document.Form1.user.value) =="")
{
alert("请填写您的用户名！");
document.Form1.user.focus();
return false;
}
var filter=/^\s*[A-Za-z0-9]{6,20}\s*$/;
if (!filter.test(document.Form1.user.value)) { 
alert("用户名填写不正确,请重新填写！可使用的字符为（A-Z a-z 0-9）长度不小于6个字符，不超过20个字符，注意不要使用空格。"); 
document.Form1.user.focus();
document.Form1.user.select();
return false; 
} 
if (trim(document.Form1.pass.value) =="") 
{
alert("请填写您的密码！");
document.Form1.pass.focus();
return false; 
}
var filter=/^\s*[A-Za-z0-9]{6,20}\s*$/;
if (!filter.test(document.Form1.pass.value)) { 
alert("密码填写不正确,请重新填写！可使用的字符为（A-Z a-z 0-9 ）长度不小于6个字符，不超过20个字符，注意不要使用空格。"); 
document.Form1.pass.focus();
document.Form1.pass.select();
return false; 
} 
if(trim(document.Form1.confirmpassword.value) ==""){
alert("请输入您的确认密码！");
document.Form1.confirmpassword.focus();
return false;
}
if (document.Form1.pass.value!=document.Form1.confirmpassword.value ){
alert("两次填写的密码不一致，请重新填写！"); 
document.Form1.pass.focus();
document.Form1.pass.select();
return false; 
} 
if (trim(document.Form1.question.value) =="") 
{ 
alert("请选择密码提示问题！"); 
document.Form1.question.focus(); 
return (false); 
} 
if (trim(document.Form1.answer.value) =="") 
{ 
alert("请输入密码提示答案！"); 
document.Form1.answer.focus(); 
return (false); 
} 
if (trim(document.Form1.name.value) =="") 
{ 
alert("请输入您的真实姓名！"); 
document.Form1.name.focus(); 
return (false); 
} 
var  check=true;
      for(var i=0;i<document.Form1.ch.length;i++){

 if (document.Form1.ch[i].checked) {
		 check=false;
		break;
        }	
       }
              if (check){
          alert("请填写您的性别！");
          document.Form1.ch[1].focus();
          return (false);
       }  
if (trim(document.Form1.email.value) =="")
{
alert("请输入您的电子邮件地址！");
document.Form1.email.focus();
document.Form1.email.select();
return false;
}
var str1 = document.Form1.email.value
if(str1.indexOf("@") == -1 || str1.indexOf(".") == -1){ 
alert("E-mail格式不正确,请重新填写！"); 
document.Form1.email.focus();
document.Form1.email.select();
return false; 
} 
if (trim(document.Form1.homename.value) =="") 
{ 
alert("请输入个人主页的名称！"); 
document.Form1.homename.focus(); 
return (false); 
}  
document.Form1.submit()
}
//-->
//-->
function trim(inputString) {
	   
              if (typeof inputString != "string") { return inputString; }
              var retValue = inputString;
              var ch = retValue.substring(0, 1);
              while (ch == " ") { 
	          //检查字符串开始部分的空格
                  retValue = retValue.substring(1, retValue.length);
                  ch = retValue.substring(0, 1);
              }
              ch = retValue.substring(retValue.length-1, retValue.length);
              while (ch == " ") {
                 //检查字符串结束部分的空格
                 retValue = retValue.substring(0, retValue.length-1);
                 ch = retValue.substring(retValue.length-1, retValue.length);
              }
              while (retValue.indexOf("  ") != -1) { 
	         //将文字中间多个相连的空格变为一个空格
                 retValue = retValue.substring(0, retValue.indexOf("  ")) + retValue.substring(retValue.indexOf("  ")+1, retValue.length); 
              }
              return retValue;
           } 

//--> 
</script>
</head>

<body><!--#include file="../top.asp"-->
<table width="90%" height="10"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td></td>
  </tr>
</table>
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="200" valign="top"><!--#include file="../left.asp"--></td>
    <td valign="top"><%
''''''''''''''''''''''''''''''''''''''''''
'1． 商户编号(C_Merchant_id)   
'  说明：不可为空值，以初始单上所填商户编号为准。
'2． 订单编号(C_Merchant_oid)               
'说明：不可为空值，动感支付订单编号格式统一为：
'订单生成日期(yyyymmdd)-商户编号-商户流水号
'例如：19990720-888-12345。商户流水号为数字，每日内不重复即可。
' 注：订单编号所有字符总和不可超过64位，否则动感支付平台拒绝接受。
'3． 收货人姓名(C_Merchant_name)      
'说明：不可为空值，统一用商户编号的值代替。
'4． 收货人地址(C_Merchant_addr)       
'说明：不可为空值，总长不超过128个字符。
'5． 收货人电话(C_Merchant_tel)        
'说明：不可为空值，总长不超过32个字符。
'6． 收货人邮政编码(C_Merchant_post)   
'说明：不可为空值，总长不超过12个字符。
'7． 订单总金额(C_Merchant_amount)       
'说明：不可为空值，单位：元，小数点后保留两位，如13.45
'8． 订单产生日期(C_Merchant_ymd)        
'说明：不可为空值，长度为8位，格式为yyyymmdd
'9． 配货状态(C_Merchant_orderstatus)       
'说明：商户配货状态，0为未配齐，1为已配齐
'10．订货人姓名(C_Merchant_username)     
'说明：总长不超过64个字符
'11．支付币种(C_Merchant_moneytype)       
'说明：0为人民币，1为美元
'12．返回商户页面地址(C_Merchant_url) 
' 该示范程序发送订单到动感支付
''''''''''''''''''''''''''''''''''''''''''
dim rs,rs2,C_Merchant_username,C_Merchant_id,C_Merchant_oid,C_Merchant_name,C_Merchant_addr,C_Merchant_tel,C_Merchant_post
dim C_Merchant_amount,C_Merchant_ymd,C_Merchant_orderstatus,C_username,C_Merchant_moneytype,C_Merchant_url,C_Merchant_shopname
dim C_time,monthC_time,dayC_time,hourC_time,minuteC_time,secondC_time,C_dd,C_Merchant_dd,C_myid,C_myurl,C_Merchant_lx,mydata,userid
dim webname,weburl,weblogo,webemail,gsmc,gsdz,gsdh,gscz,gsyb,kfqq,jfen_qian,tjr_qian,zonline,zonlinedate,fmail,umail,pmail,smail
dim up1,up2,up3,up4,up5,up6,up7,up8,up9,up10,up11,up12,up13,up14,up15,up16,up17,uppic1,uppic2,uppic3,uppic4,timeset,riqi,ip,pic,name
dim jilu,ujilu,sql1,totle,lw,count1,online,i,sql,rs_user,r,rswb3,rs4,pa,strContent,regex

C_username=session("user")'用户名称
C_Merchant_oid=request("C_Merchant_oid")'订单编号
C_Merchant_shopname="少男少女网站预存款冲值"'商品名称
C_Merchant_amount=request("C_Merchant_amount")'订单总金额
C_Merchant_ymd=request("C_Merchant_ymd")'订单产生日期
C_Merchant_username=session("name")'订货人姓名
C_Merchant_moneytype=0'支付币种 说明：0为人民币，1为美元
C_myid= "9911.com.cn"
C_myurl= "http://www.snsn.net/pay/Receive.asp"

set rs=server.CreateObject("adodb.recordset")
rs.open "select * from [snsn_user] where username='"&C_username&"'",conn,1,1 
if not(rs.bof and rs.eof) then
set rs2=server.CreateObject("adodb.recordset")
rs2.open "select * from snsn_pay ",conn,1,3
rs2.addnew
rs2("c_username")=c_username
rs2("C_Merchant_oid")=C_Merchant_oid
rs2("C_Merchant_shopname")=C_Merchant_shopname
rs2("C_Merchant_amount")=C_Merchant_amount
rs2("C_Merchant_ymd")=C_Merchant_ymd
rs2("C_Merchant_username")=C_Merchant_username
rs2("C_bankzt")=0
rs2.update
rs2.close
set rs2=nothing
else
response.write "<script LANGUAGE='javascript'>alert('对不起！参数错误！');history.go(-1);</script>"
response.End
end if



Dim MerchantID, MerchantOrderNumber, MerchantOrderAmount, MerchantPostBackURL

MerchantID= C_myid							'商户在西部支付上的ID
MerchantPostBackURL = C_myurl	'商户接收西部支付的支付通知的网址	
MerchantOrderNumber = C_Merchant_oid		'订单号，不能重复。建议用　“日期”＋“订单号”
MerchantOrderAmount = C_Merchant_amount				'订单金额，例：0.01 代表 0.01元
C_time=now()
'response.redirect ("http://www.WestPay.com.cn/Pay/WestPayReceiveOrderFromMerchant.asp?MerchantID="&MerchantID&"&PostBackURL="&MerchantPostBackURL&"&OrderNumber="&MerchantOrderNumber&"&OrderAmount="&MerchantOrderAmount&"&ChooseBank=2")
%>
      <form action="http://www.WestPay.com.cn/Pay/WestPayReceiveOrderFromMerchant.asp" method="POST" name="myform" 

id="myform">
      <table width="570" border="0" align="center" cellPadding="0" cellSpacing="0" bgColor="#dbdbdb">
        <tr>
          <td colSpan="2" height="31">&nbsp;&nbsp;<b><font 

color="#000000"><%=C_Merchant_id%> 订 单 信 息</font></b></td>
        </tr>
        <tr>
          <td>
            <table cellSpacing="1" cellPadding="2" width="100%" border="0">
              <SCRIPT>
function qiyeadvcheck(){
		qiyeadv.style.display = "";
		gerenadv.style.display = "none";
}		
																</SCRIPT>
              <SCRIPT>
function gerenadvcheck(){
		qiyeadv.style.display = "none";
		gerenadv.style.display = "";
}		
																</SCRIPT>
              <tr bgcolor="#FFFFFF">
                <td colspan="2">&nbsp;&nbsp;名称： <%=C_Merchant_shopname%></td>
              </tr>
              <tr bgcolor="#FFFFFF">
                <td colspan="2">&nbsp;&nbsp;金额(人民币)：&nbsp; <%=MerchantOrderAmount%> 元</td>
              </tr>
              <TR>
                <TD colspan="2" bgcolor="#FFFFFF">&nbsp;&nbsp;日期： &nbsp; <%=year(C_time)%>年<%=month(C_time)%>月<%=day(C_time)%>日</TD>
              </TR>
              <tr>
                <td colspan="2" bgcolor="#FFFFFF">&nbsp;&nbsp;订单编号： &nbsp; <%=C_Merchant_oid%></td>
              </tr>
              <tr>
                <td height="25" colSpan="2" bgcolor="#dbe9ee"><b><font 

color="#FF0000">&nbsp;<span class="Content-font-3 style3">选 择 银 行</span></font></b></td>
              </tr>
              <tr>
                <td width="50%" bgColor="#FFFFFF">&nbsp;&nbsp;
                    <input name="ChooseBank" type="radio" value="2"  checked>
              中国工商银行·全国 </td>
                <td width="50%" bgcolor="#FFFFFF">&nbsp;&nbsp;
                    <input name="ChooseBank" type="radio" value="1">
              招商银行·全国</td>
              </tr>
              <tr>
                <td width="50%" bgColor="#FFFFFF">&nbsp;&nbsp;
                    <input name="ChooseBank" type="radio" 

value="8">
                    ↓农业银行·全国 <span 

class="style1">欢迎使用</span> </td>
                <td width="50%" bgcolor="#FFFFFF">&nbsp;&nbsp;
                    <input name="ChooseBank" type="radio" 

value="5">
              ↓中国建设银行&nbsp;&nbsp;&nbsp;·全国 </td>
              </tr>
              <tr>
                <td width="50%" bgColor="#FFFFFF">&nbsp; ·金穗借记卡·信用卡·万事顺卡·星座卡</td>
                <td width="50%" bgcolor="#FFFFFF">&nbsp; (暂时没开通的地区：青岛、河南、西藏)</td>
              </tr>
              <tr>
                <td width="50%" bgColor="#FFFFFF">&nbsp;&nbsp;
                    <input name="ChooseBank" type="radio" value="4" >
              民生签约客户 ·全国</td>
                <td width="50%" bgcolor="#FFFFFF">&nbsp;&nbsp;
                    <input name="ChooseBank" type="radio" value="3" >
              民生借记卡 ·全国 </td>
              </tr>
              <tr>
                <td width="50%" bgcolor="#FFFFFF">&nbsp;&nbsp;
                    <input name="ChooseBank" type="radio" value="7" >
              ↓广银联支付网关</td>
                <td width="50%" bgcolor="#FFFFFF">&nbsp;&nbsp;
                    <input name="ChooseBank" type="radio" value="6" >
              ↓厦门银联支付网关 </td>
              </tr>
              <tr>
                <td width="50%" bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;·华夏银行<span class="style11">(全国)</span></td>
                <td width="50%" bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;·中国银行<span class="style11">(长城电子借记卡)</span></td>
              </tr>
              <tr>
                <td width="50%" bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;·广东发展银行<span class="style11">(</span><span 

class="style11">全国)</span></td>
                <td width="50%" bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;·交通银行<span class="style11">(借记卡 太平洋信用卡)</span></td>
              </tr>
              <tr>
                <td width="50%" bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;·中信实业银行<span class="style11">(</span><span class="style11">信用卡全国)</span></td>
                <td width="50%" bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;·兴业银行<span class="style11">(兴业顺通卡 银联借记卡 )</span></td>
              </tr>
              <tr>
                <td width="50%" bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;·光大银行<span class="style11">(</span><span 

class="style11">全国除医保卡)</span></td>
                <td width="50%" bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;·邮政储蓄<span class="style11">(邮政绿卡 银联借记卡 )</span></td>
              </tr>
              <tr>
                <td width="50%" bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;·民生银行<span class="style11">(</span><span class="style11">全国)</span></td>
                <td width="50%" bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;·商业银行<span class="style11">(银鹭卡 银联借记卡 )</span></td>
              </tr>
              <tr>
                <td width="50%" bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;·深圳发展银行<span 

class="style11">(全国借记卡)</span></td>
                <td width="50%" bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;·光大银行<span 

class="style11">(阳光卡 银联借记卡)</span></td>
              </tr>
              <tr>
                <td width="50%" bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;·农业银行<span class="style11">(广东省除深圳)</span></td>
                <td width="50%" bgcolor="#FFFFFF">&nbsp;</td>
              </tr>
              <tr>
                <td width="50%" bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;·建设银行<span 

class="style11">(广东省除深圳)</span></td>
                <td width="50%" bgcolor="#FFFFFF">&nbsp;</td>
              </tr>
              <tr>
                <td width="50%" bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;·交通银行<span class="style11">(</span><span class="style11">广州)</span></td>
                <td width="50%" bgcolor="#FFFFFF">&nbsp;</td>
              </tr>
              <tr>
                <td width="50%" bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;·中国银行<span 

class="style11">(广东省除深圳)</span></td>
                <td width="50%" bgcolor="#FFFFFF">&nbsp;</td>
              </tr>
              <tr>
                <td width="50%" bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;·兴业银行<span class="style11">(广州)</span></td>
                <td width="50%" bgcolor="#FFFFFF">&nbsp;</td>
              </tr>
              <tr>
                <td width="50%" bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;·广州市商业银行<span 

class="style11">(广州)</span></td>
                <td width="50%" bgcolor="#FFFFFF">&nbsp;</td>
              </tr>
              <tr>
                <td width="50%" bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;·中信实业银行<span class="style11">(</span><span class="style11">广州借记卡)</span></td>
                <td width="50%" bgcolor="#FFFFFF">&nbsp;</td>
              </tr>
              <tr>
                <td width="50%" bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;·中国邮政<span class="style11">(</span><span 

class="style11">广东省除深圳)</span></td>
                <td width="50%" bgcolor="#FFFFFF">&nbsp;</td>
              </tr>
              <tr>
                <td width="50%" bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;·上海浦东发展银行<span class="style11">(广州)</span></td>
                <td width="50%" bgcolor="#FFFFFF">&nbsp;</td>
              </tr>
              <tr>
                <td width="50%" bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;·广州农村信用合作社<span class="style11">(</span><span 

class="style11">广州)</span></td>
                <td width="50%" bgcolor="#FFFFFF">&nbsp;</td>
              </tr>
              <tr>
                <td height="32" colSpan="2" bgcolor="#ffffff">&nbsp;&nbsp;
                    <table align="center" width="90%" border="0" 

cellspacing="0" cellpadding="0">
                      <tr>
                        <td>&nbsp;</td>
                      </tr>
                      <tr>
                        <td>如果在您成功支付后没有获得相关产品或服务，请将您记下的 <font color="#FF6600">定单号</font>及相关信息提供给<font color="#FF6600">我们</font>以便尽快获得解决。如果有争议，请与我们联系，我们将为您提供帮助！</td>
                      </tr>
                    </table>
                    <table width="90%" border="0" cellspacing="0" 

cellpadding="0" align="center">
                      <tr>
                        <td></td>
                        <td width="204"></td>
                        <td width="257"></td>
                        <td></td>
                      </tr>
                      <tr>
                        <td colspan="4">&nbsp;</td>
                      </tr>
                      <tr>
                        <td colspan="4"><div 

class="style12"><strong class="style12">注意：请在支付前关闭弹出窗口拦截 功能，例如：3721上网助手 或 Google工具栏 等，以 便及时收到你所购买的产品或服务。</strong> </div></td>
                      </tr>
                      <tr>
                        <td colspan="4">&nbsp;</td>
                      </tr>
                      <tr>
                        <td colspan="4" align="center">
                          <input type="hidden" name="MerchantID" 

value=<%=MerchantID%>>
                          <input type="hidden" name="PostBackURL" 

value=<%=MerchantPostBackURL%>>
                          <input type="hidden" name="OrderNumber" 

value=<%=MerchantOrderNumber%>>
                          <input type="hidden" 

name="OrderAmount" value="<%=MerchantOrderAmount%>">
                        </td>
                      </tr>
                      <tr>
                        <td colspan="4">&nbsp;</td>
                      </tr>
                  </table></td>
              </tr>
              <tr>
                <td height="52" colSpan="2" align="center" bgcolor="#ffffff">
                  <p>
                    <input name="RegisterButton" type="image"  id="RegisterButton2" src="../images/regent7.gif" width="84" height="29" border="0" />
                </p></td>
              </tr>
          </table></td>
        </tr>
      </table>
    </form>      <span class="style10"> </span></td>
  </tr>
</table>
<table width="90%" height="10"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td></td>
  </tr>
</table><!--#include file="../end.asp"-->
</body>
</html>