<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Include/Const.asp"-->
<!--#include file="Include/ConnSiteData.asp"-->
<!--#include file="Include/Md5.asp"-->
<!--#include file="Cart.Asp" -->
<!--#include file="Head.Asp" -->
<div id='index_wrapper'>
<div id=best-r class="best" style="width:586px;float:left">
<div id=best-sc>
<div class=best-tb>
<a>分享到：</a>
<a href="javascript:void(0);" onclick="showsharedl()" >在线支付</a>
</div>
</div>
<div id=bests>
<%
if DateDiff("s",session("time"),now())<Refresh then
   response.write "<script language='JavaScript'>alert('防刷新机制启动：请不要在 "&Refresh&" 秒内重复刷新！');" & "history.back()" & "</script>"
   response.end
else
   session("time")=now()
end If

If uCart.TPrice()(0)<=0 Then 
   response.write "<script language='JavaScript'>alert('不好意思你的购物车里没有产品!不能在线付款？');" & "history.back()" & "</script>"
   response.End
Else 
total=Formatnumber(uCart.TPrice()(0),2,-1,-1,0)
End If 

d=right("00"&int(99*rnd()),2)
yy=right(year(date),2)
mm=right("00"&month(date),2)
dd=right("00"&day(date),2)
riqi=yy & mm & dd
xiaoshi=right("00"&hour(time),2)
fenzhong=right("00"&minute(time),2)
miao=right("00"&second(time),2)
inBillNo=yy & mm & dd & xiaoshi & fenzhong & miao & d
dim mOrderName,mRemark
dim mMemID,mRealName,mSex,mCompany,mAddress,mZipCode,mTelephone,mFax,mMobile,mEmail,CheckCode,ProductNos,proNumber
dim rs,sql,orderid
mOrderName=trim(request.form("OrderName"))
mRemark="订购以下产品：<br />"&request.form("Products")&" 详细信息："
mMemID=request.QueryString("MemberID")
mRealName=trim(request.form("RealName"))
mSex=trim(request.form("Sex"))
mCompany=trim(request.form("Company"))
mAddress=trim(request.form("Address"))
mZipCode=trim(request.form("ZipCode"))
mTelephone=trim(request.form("Telephone"))
mFax=trim(request.form("Fax"))
mMobile=trim(request.form("Mobile"))
mEmail=trim(request.form("Email"))
CheckCode = Trim(request.form("CheckCode"))
dim ErrMessage,ErrMsg(9),FindErr(9),i
  ErrMsg(0)="请填写订单标题。"
  ErrMsg(1)="请填写订购者姓名。"
  ErrMsg(2)="请填写单位名称、详细地址。"
  ErrMsg(3)="请正确填写邮政编码。"
  ErrMsg(4)="请正确填写联系电话(11个字符以上)。"
  ErrMsg(5)="请正确填写传真号码、手机号码。"
  ErrMsg(6)="电子信箱格式错误。"
  ErrMsg(7)="验证码不能为空，请返回检查。"
  ErrMsg(8)="您在【产品订购】页面停留的时间过长，导致验证码失效。\n请返回并刷新【产品订购】页面重新订购！"
  ErrMsg(9)="您输入的验证码和系统产生的不一致，请重新输入。"
if len(mOrderName)>100 Or len(mOrderName)=0 then
  FindErr(0)=true
end if
if len(mRealName)>50 Or len(mRealName)=0 then
  FindErr(1)=true
end if
if len(mCompany)>100 Or len(Address)>100 Or len(mCompany)=0 then
  FindErr(2)=true
end if
if len(mZipCode)<>6 then
  FindErr(3)=true
end if
if len(mTelephone)>50 Or len(mTelephone)<11 Or len(mTelephone)=0 then
  FindErr(4)=true
end if
if len(mFax)>50 Or len(mFax)=0 Or len(mMobile)=0 Or len(mMobile)>50 then
  FindErr(5)=true
end if
if not IsValidEmail(mEmail) then
  FindErr(6)=true
end If
If CheckCode = "" Then
  FindErr(7)=true
End If
If Trim(Session("CheckCode")) = "" Then
  FindErr(8)=true
End If
If CheckCode <> Session("CheckCode") Then
  FindErr(9)=true
End If
for i = 0 to UBound(FindErr)
  if FindErr(i)=true then
    ErrMessage=ErrMessage+ErrMsg(i)+"\n"
  end if
next
if not (ErrMessage="" Or isnull(ErrMessage)) then
  WriteMsg(ErrMessage)
  response.end
end if
set rs = server.createobject("adodb.recordset")
sql="select * from LiangJing_Order"
rs.open sql,conn,1,3
rs.addnew
rs("OrderName")=StrReplace(mOrderName)
rs("MemID")=mMemID
rs("Linkman")=StrReplace(mRealName)
rs("Sex")=mSex
rs("Company")=StrReplace(mCompany)
rs("Address")=StrReplace(mAddress)
rs("ZipCode")=StrReplace(mZipCode)
rs("Telephone")=StrReplace(mTelephone)
rs("Fax")=StrReplace(mFax)
rs("Mobile")=StrReplace(mMobile)
rs("Email")=mEmail
rs("ToalMoney")=total
mycart=uCart.ViewCart()
For i =LBound(myCart,2) to UBound(myCart,2)
if myCart(0,i)<>"" Then 
ProductNos=myCart(0,i)&"┎╂┚"&ProductNos
proNumber=myCart(5,i)&"┎╂┚"&proNumber
mRemark=mRemark&"<br />"&"名称:"&strleft(myCart(1,i),60)&"数量:"&myCart(5,i)
end if
Next
rs("Remark")=mRemark
rs("ProductNo")=ProductNos
rs("OrderNo")=inBillNo
set rsRepeat = conn.execute("select * from LiangJing_Order where IsokMoney=false and MemID="&mMemID&" and ProductNo='"&ProductNos&"'")
if not (rsRepeat.bof and rsRepeat.eof) then
response.write "<script language='javascript'>alert('你已经下过订单但未付款！');history.back(-1);</script>"
response.End
End If
rsRepeat.close
set rsRepeat=Nothing
rs("ProNumaber")=proNumber
rs("AddTime")=now()
rs.update
orderid=rs("id")
rs.close
set rs=Nothing

INTERFACE_URL="https://www.alipay.com/cooperate/gateway.do?"
Class creatAlipayItemURL
Public Function creatAlipayItemURL(subject,body,out_trade_no,price,quantity,seller_email)
mystr = Array("service=trade_create_by_buyer","partner="&partner,"subject="&subject,"body="&body,"out_trade_no="&out_trade_no,"price="&price,"discount="&discount,"show_url="&show_url,"quantity="&quantity,"payment_type=1","logistics_type="&logistics_type,"logistics_fee="&logistics_fee,"logistics_payment="&logistics_payment,"seller_email="&seller_email,"notify_url="&notify_url,"return_url="&return_url)
Count=ubound(mystr)
For i = Count TO 0 Step -1
    minmax = mystr( 0 )
    minmaxSlot = 0
    For j = 1 To i
            mark = (mystr( j ) > minmax)
        If mark Then 
            minmax = mystr( j )
            minmaxSlot = j
        End If
    Next
    If minmaxSlot <> i Then 
        temp = mystr( minmaxSlot )
        mystr( minmaxSlot ) = mystr( i )
        mystr( i ) = temp
    End If
 Next

For j = 0 To Count Step 1
  value = SPLIT(mystr( j ), "=")

  If  value(1)<>"" then
       If j=Count Then
       md5str= md5str&mystr( j )
	   Else 
       md5str= md5str&mystr( j )&"&"
	   End If 
  End If 
  Next
       md5str=md5str&key
	   sign=md5(md5str)
	itemURL	= itemURL&INTERFACE_URL 
	For j = 0 To Count Step 1
      
	    value = SPLIT(mystr( j ), "=")
		If  value(1)<>"" then
		itemURL= itemURL&mystr( j )&"&"
		End If 	     
  Next
		itemURL	= itemURL&"sign="&sign&"&sign_type="&"MD5"
		creatAlipayItemURL=itemURL
	End Function
End Class
'call aspsql()
'call asp99_check_path()
function NoList()
  if request("UpdateOrder")="更新选择" then
    Session("NoList")=""
  end if
  dim ProductNo,NoArray,i
  if trim(request("ProductNo"))<>"" then ProductNo=trim(request("ProductNo"))&","
  if session("NoList")="" and trim(request("ProductNo"))="" then
    NoList=""
    exit function
  end if
  if instr(ProductNo,",")>0 then
  	NoArray=split(ProductNo, ",")
  	for i = 0 to ubound(NoArray)
      if not instr(session("NoList"),NoArray(i)&",")>0 then session("NoList")=session("NoList")&NoArray(i)&","
  	next
  end if
  for i = 0 to ubound(split(session("NoList"), ","))
    NoList=NoList&"'"&trim(split(session("NoList"),",")(i))&"',"
  next
  NoList=left(NoList,len(NoList)-4)
end Function



Set rs = conn.Execute("select * from liangjing_Pay ") 
pay= rs("pay")
xpay_tid=rs("xpay_id")
xpay_key=rs("xpay_key")
xpay_url=rs("xpay_url")
xpay_name=rs("xpay_name")
alipay_id=rs("alipay_id")
alipay_securityCode=rs("alipay_securityCode")
Partner_id=rs("Partner_id")
westid=rs("westid")
westback=rs("westback")
chinaid=rs("chinaid")
chinakey=rs("chinakey")
chinaback=rs("chinaback")
pay88id=rs("pay88id")
pay88name=rs("pay88name")
pay88back=rs("pay88back")
paypalid=rs("paypalid")
npsid=rs("npsid")
npsback=rs("npsback")
ipsid=rs("ipsid")
ipsback=rs("ipsback")
set rs=nothing


if pay="1" Then
%>
<table border="0" cellspacing="1" cellpadding="0" align="center" valign=absmiddle width=100%>
<tr><td align="center" valign="middle" height=60><br><br><font color="#FF3333">Congratulations, orders to success! Please make a note of your order, so that enquiries. <br> Your order number is:
<b><%=inBillNo%></b>&nbsp;&nbsp;&nbsp;&nbsp;支付金额：<b><%=total%></b>元</font></td></tr>
<tr><td align="center" valign="middle"  height=60>订单支付成功后我们会尽快与您取得联系发货事宜</td></tr>
</table>
<table border="0" cellspacing="1" cellpadding="0" align="center" valign=absmiddle width=450>
<tr><td align=center width=50% height=120>
<form action="http://www.WestPay.com.cn/Pay/WestPayReceiveOrderFromMerchant.asp" method="POST" name="SendOrderToWestPay"  target=new>
<input type="hidden" name="MerchantID" value="<%=westid%>">
<input type="hidden" name="PostBackURL" value="<%=westback%>">
<input type="hidden" name="OrderNumber" value="<%=inBillNo%>">
<input type="hidden" name="OrderAmount" value="<%=total%>">
<input type="submit" name="submit" value="WestPay在线支付">
</form>
</td>
<td align=center  width=50%  height=150>
<form method="post" action="../fukuan.asp" target=new><input type=submit  value="查看其他付款方式"></form>
</td>
</tr>
<tr><td colspan=2 align=center>本站使用西部支付平台，支持国内18家银行60余种银行卡在线实时支付<br><br><a href='http://www.westpay.com.cn'  target="_blank"><img src='../images/pay/westpay.gif' border=0></a>
</td></tr>
</table>
<%
elseif pay="2" Then
v_rcvtel=RecPhone 
v_orderemail = Recmail 
v_rcvname =  RecName 
v_rcvaddr =  RecAddress
v_rcvpost = ZipCode
v_amount=Total
v_moneytype = "0"
v_url=chinaback
v_mid =chinaid
v_oid=inBillNo
v_md5info_text = v_amount&v_moneytype&v_oid&v_mid&v_url&chinakey
v_md5info=Ucase(trim(MD52(v_md5info_text)))
%>
<table border="0" cellspacing="1" cellpadding="0" align="center" valign=absmiddle width=100%>
<tr><td align="center" valign="middle" height=60>
<b><%=inBillNo%></b>&nbsp;&nbsp;&nbsp;&nbsp;支付金额：<b><%=total%></b>元</font></td></tr>
<tr><td align="center" valign="middle"  height=60>订单支付成功后我们会尽快与您取得联系发货事宜</td></tr>
</table>
<table border="0" cellspacing="1" cellpadding="0" align="center" valign=absmiddle width=450>
<tr><td align=center width=50% height=120>
<form method=post action="https://pay.chinabank.com.cn/select_bank" target=new>
<input type=submit name=v_action value="网银在线实时支付">
<input type="hidden" name="v_md5info" size="100"  value="<%=v_md5info%>">
<input type="hidden" name="v_mid" value="<%=v_mid%>">
<input type="hidden" name="v_oid" value="<%=v_oid%>">
<input type="hidden" name="v_amount" value="<%=v_amount%>">
<input type="hidden" name="v_moneytype"  value="<%=v_moneytype%>">
<input type="hidden" name="v_url" value="<%=v_url%>">
<input type="hidden" name="remark1" value="<%=Notes%>">
<input type="hidden" name="v_rcvtel" value="<%=v_rcvtel%>">
<input type="hidden" name="v_rcvname" value="<%=v_rcvname%>">
<input type="hidden" name="v_rcvaddr" value="<%=v_rcvaddr%>">
<input type="hidden" name="v_rcvpost" value="<%=v_rcvpost%>">
<input type="hidden" name="v_orderemail"  value="<%=v_orderemail%>">
</form>
</td>
<td align=center  width=50%  height=120>
<form method="post" action="../fukuan.asp" target=new><input type=submit  value="查看其他付款方式"></form>
</td></tr>
<tr><td colspan=2 align=center>本站使用“网银在线安全支付平台”，支持国内绝大多数银行卡在线实时支付<br><br><a href='http://www.chinabank.com.cn/rmb_card/cardtype.shtml'  target="_blank"><img src='../images/pay/chinabank.gif' border=0></a></td></tr>
</table>
<%
elseif pay="3" Then
purpose=pay88name&"（订单号："&inBillNo&"）"
%>
<table border="0" cellspacing="1" cellpadding="0" align="center" valign=absmiddle width=100%>
<tr><td align="center" valign="middle" height=60>
<b><%=inBillNo%></b>&nbsp;&nbsp;&nbsp;&nbsp;支付金额：<b><%=total%></b>元</font></td></tr>
<tr><td align="center" valign="middle"  height=60>订单支付成功后我们会尽快与您取得联系发货事宜</td></tr>
</table>
<!--pay88.com官方正在升级无组件接口，该接口暂时不能使用，本系统暂使用傻瓜型接口-->
<table border="0" cellspacing="1" cellpadding="0" align="center" valign=absmiddle width=450>
<tr><td align=center width=50% height=120>
<form method="post" 
action="https://www.pay88.com/pay.shtml?method=get&userid=<%=pay88id%>&purpose=<%=server.URLEncode(purpose)%>&amount=<%=total%>&mac=none" target=new>
<input type=submit name=action value="PAY88在线支付">
</form>
</td>
<td align=center  width=50%  height=120>
<form method="post" action="../fukuan.asp" target=new><input type=submit  value="查看其他付款方式"></form>
</td></tr>
<tr><td colspan=2 align=center>本站使用“Pay88.com在线支付平台”，支持国内绝大多数银行卡在线实时支付<br><br><a href='http://www.pay88.com'  target="_blank"><img src='../images/pay/pay88.gif' border=0></a></td></tr>
</table>
<%
elseif pay="4" Then
%>
<table border="0" cellspacing="1" cellpadding="0" align="center" valign=absmiddle width=100%>
<tr><td align="center" valign="middle" height=60>
<b><%=inBillNo%></b>&nbsp;&nbsp;&nbsp;&nbsp;支付金额：<b><%=total%></b>元</font></td></tr>
<tr><td align="center" valign="middle"  height=60>订单支付成功后我们会尽快与您取得联系发货事宜</td></tr>
</table>
<table border="0" cellspacing="1" cellpadding="0" align="center" valign=absmiddle width=450>
<tr><td align=center width=50% height=120>
<form method="post" action="https://payment.nps.cn/pay/PayCar.jsp" target="_blank">
<input Type="hidden" Name="M_ID" value="<%=npsid%>">	
<input Type="hidden" Name="MODate" value="<%=date+time%>">
<input Type="hidden" Name="MOrderID" value="<%=inBillNo%>">
<input Type="hidden" Name="MOAmount" value="<%=replace(total,",","")%>">
<input Type="hidden" Name="MOCurrency" value="1">
<input Type="hidden" name="M_URL" value="null">
<input Type="hidden" Name="M_Language" value="1">
<input Type="hidden" Name="S_Name" value="<%=RecName%>">
<input Type="hidden" Name="S_Address" value="<%=RecAddress%>">
<input Type="hidden" Name="S_PostCode" value="<%=Zipcode%>">
<input Type="hidden" Name="S_Telephone" value="<%=RecPhone%>">
<input Type="hidden" Name="S_Email" value="<%=Recmail%>">
<input Type="hidden" Name="R_Name" value="null">
<input Type="hidden" Name="R_Address" value="null">
<input Type="hidden" Name="R_PostCode" value="null">
<input Type="hidden" Name="R_Telephone" value="null">
<input Type="hidden" Name="R_Email" value="null">
<input Type="hidden" Name="R_Name" value="null">
<input Type="hidden" Name="R_Address" value="null">
<input Type="hidden" Name="R_PostCode" value="null">
<input Type="hidden" Name="R_Telephone" value="null">
<input Type="hidden" Name="R_Email" value="null">
<input Type="hidden" name="MOComment" value="<%=Notes%>">
<input Type="hidden" Name="State" value="0">
<INPUT type=submit name=action value="NPS 在线支付">
</form>
</td>
<td align=center  width=50%  height=120>
<form method="post" action="../fukuan.asp" target=new><input type=submit  value="查看其他付款方式"></form>
</td></tr>
<tr><td colspan=2 align=center>本站使用NPS在线支付平台，支持国内主流银行卡在线实时支付<br><br><a href='http://www.nps.cn'  target="_blank"><img src='../images/pay/nps.gif' border=0></a></td></tr>
</table>
<%
elseif pay="5" Then

%>
<table border="0" cellspacing="1" cellpadding="0" align="center" valign=absmiddle width=100% >
<tr><td align="center" valign="middle" height=60>
<b><%=inBillNo%></b>&nbsp;&nbsp;&nbsp;&nbsp;支付金额：<b><%=total%></b>元</font></td></tr>
<tr><td align="center" valign="middle"  height=60>订单支付成功后我们会尽快与您取得联系发货事宜</td></tr>
</table>
<table border="0" cellspacing="1" cellpadding="0" align="center" valign=absmiddle width=450>
<tr><td align=center width=50% height=120>
<form action="https://www.ips.net.cn/ipay/ipayment.asp" METHOD=POST name="frm1" target=new>
<input type="hidden" name="mer_code" size="16" value="<%=ipsid%>">
<input type="hidden" name="billNo" size="16" value="<%=ipsid&right(inBillNo,6)%>">
<input type="hidden" name="amount" size="16" value="<%=total%>">
<input type="hidden" name="date" size="16" value="<%=year(now())&right("0"&month(now()),2)&right("0"&day(now()),2)%>">
<input type="hidden" name="merchanturl" value="<%=ipsback%>">
<input type="submit" value="上海环讯IPS在线支付" name="B1">
</form>
</td>
<td align=center  width=50%  height=120>
<form method="post" action="../fukuan.asp" target=new><input type=submit  value="查看其他付款方式"></form></td></tr>
<tr><td colspan=2 align=center>本站使用上海环讯IPS在线支付平台，支持国内主流银行卡在线实时支付<br><br><a href='http://www.nps.cn'  target="_blank"><img src='../images/pay/ips.gif' border=0></a></td></tr>
</table>
<%
elseif pay="6" Then
%>
<table border="0" cellspacing="1" cellpadding="0" align="center" valign=absmiddle width=100%>
<tr><td align="center" valign="middle" height=60>
<b><%=inBillNo%></b>&nbsp;&nbsp;&nbsp;&nbsp;支付金额：<b><%=total%></b>元</font></td></tr>
<tr><td align="center" valign="middle"  height=60>订单支付成功后我们会尽快与您取得联系发货事宜</td></tr>
</table>
<table border="0" cellspacing="1" cellpadding="0" align="center" valign=absmiddle width=450>
<tr><td align=center width=50% height=120>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target=new>
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="<%=paypalid%>">
<input type="hidden" name="item_name" value="<%=sitename%>(Ordernumber:<%=inBillNo%>)">

<input type="hidden" name="amount" value="<%=total%>">
<input type="hidden" name="item_number" value="<%=inBillNo%>">
<input type="hidden" name="currency_code" value="CNY">
<input type=submit name=action value="PayPal在线支付">
</form>

</td>
<td align=center  width=50%  height=120>
<form method="post" action="../fukuan.asp" target=new><input type=submit  value="查看其他付款方式"></form></td></tr>
<tr><td colspan=2 align=center>本站使用PayPal国际支付平台，安全、方便、实时支付<br><br><a href='http://www.paypal.com'  target="_blank"><img src='../images/pay/paypal.gif' border=0></a></td></tr>
</table>
<%
elseif pay="7" Then
'支付宝2.0
	'支付宝不允许金额中带,号，因此先用replace替换金额中的,号
	alipay_name=inBillNo & "号订单在线支付"
	alipay_body="以下金额（"& total & "元）已包含配送费用"
	
	show_url          ="localhost"                   '网站的网址
	
	  partner			= Partner_id				'支付宝的账户的合作者身份ID
	  key			    = alipay_securityCode	'支付宝的安全校验码

      notify_url			= "Alipay_Notify.asp"	'付完款后服务器通知的页面 要用 http://格式的完整路径
	  return_url			= "return_Alipay_Notify.asp"	'付完款后跳转的页面 要用 http://格式的完整路径

	  logistics_fee		= "0.00"				'物流配送费用
	  logistics_payment	= "BUYER_PAY"			'物流配送费用付款方式：SELLER_PAY(卖家支付)、BUYER_PAY(买家支付)、BUYER_PAY_AFTER_RECEIVE(货到付款)
	  logistics_type		= "EXPRESS"				'物流配送方式：POST(平邮)、EMS(EMS)、EXPRESS(其他快递)



   shijian=now()
   dingdan=year(shijian)&month(shijian)&day(shijian)&hour(shijian)&minute(shijian)&second(shijian)
    '客户网站订单号，（现取系统时间，可改成网站自己的变量）
	
	subject			=	alipay_name		'商品名称
	body			=	alipay_body		'body			商品描述
	out_trade_no    =   dingdan       
	price		    =	cstr(total)				'price商品单价			0.01～50000.00
    quantity        =   "1"               '商品数量,如果走购物车默认为1
	discount        =   "0"               '商品折扣
    seller_email    =    alipay_id   '卖家的支付宝帐号
	Set AlipayObj	= New creatAlipayItemURL
	itemUrl=AlipayObj.creatAlipayItemURL(subject,body,out_trade_no,price,quantity,seller_email)
%>



<table border="0" cellspacing="1" cellpadding="0" align="center" valign=absmiddle width=100%>
<tr><td align="center" valign="middle" height=60>
<b><%=inBillNo%></b>&nbsp;&nbsp;&nbsp;&nbsp;支付金额：<b><%=total%></b>元</font></td></tr>
<tr><td align="center" valign="middle"  height=60>订单支付成功后我们会尽快与您取得联系发货事宜</td></tr>
</table>
<table border="0" cellspacing="1" cellpadding="0" align="center" valign=absmiddle width=450>
<tr><td align=center width=50% height=120>
<a href="<%=itemUrl%>" target="_blank"><img src="../images/pay/alipay_bwsx.gif" border="0"></a>
</td>
<td align=center  width=50%  height=120>
<form method="post" action="../fukuan.asp" target=new><input type=submit  value="查看其他付款方式"></form></td></tr>
<tr><td colspan=2 align=center>“支付宝”在线支付免手续费，收货满意后卖家才能拿钱，货、款都安全<br><br><a href='http://www.alipay.com'  target="_blank"><img src='../images/pay/alipay.gif' border=0></a></td></tr>
</table>


<%
elseif pay="8" then
tid=xpay_tid
key=xpay_key
actioncode="sell"     '交易码,用于标识交易
actionParameter=""    '当 actioncode="sell" ,此参数为空
ver="2.0"             '版本号,当前系统请使用2.0
prc=replace(cstr(formatnumber(total,2)),",","")
bid=inBillNo
card="bank"
scard="bank,unicom,xpay,ebilling"
username=RecName
pdt=xpay_name
pdttype=""
lang="gb2312"
remark1=notes
url=xpay_url
md=md5(key&":"&prc&","&bid&","&tid&","&card&","&scard&","&actioncode&","&actionparameter&","&ver)
%>


<table border="0" cellspacing="1" cellpadding="0" align="center" valign=absmiddle width=100%>
<tr><td align="center" valign="middle" height=60>
<b><%=inBillNo%></b>&nbsp;&nbsp;&nbsp;&nbsp;支付金额：<b><%=total%></b>元</font></td></tr>
<tr><td align="center" valign="middle"  height=60>订单支付成功后我们会尽快与您取得联系发货事宜</td></tr>
</table>
<table border="0" cellspacing="1" cellpadding="0" align="center" valign=absmiddle width=450>
<tr><td align=center width=50% height=120>
<form method="get" name="xpaypay" action="http://pay.xpay.cn/Pay.aspx"  target=new>
<input type=HIDDEN name="prc"    value="<%=prc%>"> 	
<input type=HIDDEN name="bid"   value="<%=bid%>"> 
<input type=HIDDEN name="tid" 	value="<%=tid%>">  	
<input type=HIDDEN name="card" value="<%=card%>">  	
<input type=HIDDEN name="scard" value="<%=scard%>" > 
<input type=HIDDEN name="actioncode" value="<%=actioncode%>">  
<input type=HIDDEN name="actionparameter"  value="<%=actionparameter%>"> 	
<input type=HIDDEN name="ver"  value="<%=ver%>">   
<input type=HIDDEN name="md"  value="<%=md%>">    
<input type=HIDDEN name="username"  value="<%=username%>">    
<input type=HIDDEN name="pdt"  value="<%=server.urlencode(pdt)%>">
<input type=HIDDEN name="type"  value="<%=server.urlencode(pdttype)%>">
<input type=HIDDEN name="lang"  value="<%=lang%>">    
<input type=HIDDEN name="remark1"  value="<%=remark1%>">    
<input type=HIDDEN name="url"  value="<%=url%>">    
<input type="submit" value="Xpay在线支付" name="submit">
</form>
</td>
<td align=center  width=50%  height=120>
<form method="post" action="../fukuan.asp" target=new><input type=submit  value="查看其他付款方式"></form></td></tr>
<tr><td colspan=2 align=center>本站使用“易付通”安全支付平台，方便、安全、快捷<br><br><a href='http://www.xpay.cn'  target="_blank"><img src='../images/pay/xpay.gif' border=0></a></td></tr>
</table>




<%
Else

%>

<table border="0" cellspacing="1" cellpadding="0" align="center" valign=absmiddle width=100%>
<tr><td align="center" valign="middle" height=60>
<b><%=inBillNo%></b>&nbsp;&nbsp;&nbsp;&nbsp;支付金额：<b><%=total%></b>元</font></td></tr>
<tr><td align="center" valign="middle"  height=60>订单支付成功后我们会尽快与您取得联系发货事宜</td></tr>
</table>
<table border="0" cellspacing="1" cellpadding="0" align="center" valign=absmiddle width=450>
<tr><td align=center  width=50%  height=150>
<form method="post" action="../fukuan.asp" target=new><input type=submit  value="查看付款方法"></form></td>
<td align=center  width=50%  height=150>
<form method="post" action="../main.asp" target=new><input type=submit  value="返回网站首页"></form>
</td></tr>
<tr><td align=center colspan=2>付款后请尽快与我们联系，以便我们及时查帐并为您发货。<br></td></tr>
</table>

<%
end if
%>
</div>

</div>
<div id=best-r class="best" style="width:200px; float:right;">
<div id=best-sc>
<div class=best-tb>
<a style="width:100px;">本期其它团购</a>       
</div>
</div>

<div id=bests>
<table cellpadding="0" cellspacing="0" width="100%px" style="padding:6px;">
<tr><td align="center">
<%Call ListProducts("0,",1,6,186,160,"Products")%>
</td></tr></table>
</div>
</div>

<div style="clear:both;;*display:inline;overflow:;hidden;">
</div>
<div style="float:none;height:10px;"></div>
</div></div>
</div></div>
<!--#include file="Foot.Asp"-->
<%
'最新产品展示
Function ListProducts(SortPath,trs,tds,PicW,PicH,Oderder)
  dim rs,sql,tr,td,ProductName,SmallPicPath
  set rs = server.createobject("adodb.recordset")
  If Oderder="Products" Then
  sql="select top "&trs*tds&" * from liangjing_Products where Instr(SortPath,'"&SortPath&"')>0 and [AddTime] between dateadd('ww',-1,now()) and now() order by AddTime desc"
  Else 
  sql="select top "&trs*tds&" * from liangjing_Products where NewFlag  and Instr(SortPath,'"&SortPath&"')>0 order by "&Oderder&" desc,id desc"
  End If 
  rs.open sql,conn,1,1
  if rs.eof then
    response.write "暂无相关信息"
  Else

	
	for tr=1 to trs
        for td=1 to tds
	      if StrLen(rs("ProductName"))<=18 then
            ProductName=rs("ProductName")
	      else
	        ProductName=rs("ProductName")
	      end If
			If ISHTML = 1 Then
				AutoLink = ""&ProName&""&Separated&""&rs("ID")&"."&HTMLName&""
			Else
				AutoLink = "ProductView.asp?ID="&rs("id")&""
			End If
			SmallPicPath=HtmlSmallPic(rs("GroupID"),rs("SmallPic"),rs("Exclusive"))
		ChildCount=conn.execute("select count(*) from liangjing_Order where ProductNo='"&rs("ProductNo")&"'")(0)
Response.Write "<tr><td align=""center"">"
Response.Write " <div id=""mian_border"">"
Response.Write "<div id=""mian_border_title""><a href="""&AutoLink&""">"&ProductName&"</a></div>"
Response.Write "<div id=""mian_border_1""><a href="""&AutoLink&""" target=""_blank"">"
Response.Write "<img src="""&SmallPicPath&""" alt="""" width="""&PicW&""" height="""&PicH&""" border=""0""></a></div>"
Response.Write "<div><font style=""color:red;font-size:16px;"">"&ChildCount&"</font>人已订购 <a href="""&AutoLink&"""><img src=""images/dinggou.jpg"" width=""75px"" height=""25px""></a></div>"
Response.Write "</div>"
Response.Write " </td></tr>"
	      rs.movenext
		  if rs.eof then exit for
		next
		if rs.eof then exit for
	Next
  end if
  rs.close
  set rs=nothing
End Function

%>
