<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<!--#include file="conn.asp"-->
<!--#include file="config.asp"-->
<!--#include file="Alipay.asp"-->
<title><%=webname%>--下订单--网域电子商务网站,公司企业网站管理系统中英繁，仿阿里巴巴商贸通商务网,商城购物系统程序,源码下载，多用户商城,客隆电子商务网站管理系统,装饰,家具,旅社社旅游网站建设，程序开发,网站开发，网站推广,商城代码,系统销售,网络营销,企业商务,整站程序,ASP代码销售,企业电子商务平台,电子政务，官方站点：http://www.wygk.cn</title>
<meta name="description" content="网域电子商务网站,公司企业网站管理系统中英繁，仿阿里巴巴商贸通商务网,商城购物系统程序,源码下载，多用户商城,客隆电子商务网站管理系统,装饰,家具,旅社社旅游网站建设，程序开发,网站开发，网站推广,商城代码,系统销售,网络营销,企业商务,整站程序,ASP代码销售,企业电子商务平台,电子政务，官方站点：http://www.wygk.cn">
<meta name="keywords" content="网域电子商务网站,公司企业网站管理系统中英繁，仿阿里巴巴商贸通商务网,商城购物系统程序,源码下载，多用户商城,客隆电子商务网站管理系统,装饰,家具,旅社社旅游网站建设，程序开发,网站开发，网站推广,商城代码,系统销售,网络营销,企业商务,整站程序,ASP代码销售,企业电子商务平台,电子政务，官方站点：http://www.wygk.cn">
<META http-equiv=Content-Type content="text/html; charset=gb2312"><LINK 
href="img/code43.css" type=text/css rel=stylesheet>
<META content="MSHTML 6.00.2800.1505" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff leftMargin=0 topMargin=0 background="image/bg.gif" marginwidth="0" marginheight="0" >
<!--#include file="include/header.asp"-->
<table id="__01" width="1003" height="446" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td valign="top"> <img src="image/images/about_01.gif" width="29" height="338" alt=""></td>
    <td rowspan="3" width="212" height="446" valign="top"> 
      <table id="__01" width="212" height="200" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td> <img src="image/images/left_01.gif" width="212" height="74" alt=""></td>
        </tr>
        <tr> 
          <td background="image/images/left_02.gif" width="212" height="127"> 
            <!-- #include file="login.asp"-->
          </td>
        </tr>
        <tr> 
          <td width="212"  valign="top"> 
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td height="4"></td>
              </tr>
            </table>
            <a href="procat.asp"><img src="image/HELPLEFT.gif" width="212" height="43" border="0"></a> 
            <table width="100%" align=center>
              <tbody> 
              <tr> 
                <td class=mm> 
                  <table width="160" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td style="padding-left:10px" height="25" class=table-youxia><a href="help.asp?action=process"><img height=11 src="image/icon_notice.gif" 
                  width=17 align=absMiddle border=0>购物流程</a> </td>
                    </tr>
                    <tr> 
                      <td style="padding-left:10px" height="25" class=table-youxia><a href="help.asp?action=feiyong"><img height=11 src="image/icon_notice.gif" 
                  width=17 align=absMiddle border=0>送货方式及费率</a></td>
                    </tr>
                    <tr> 
                      <td style="padding-left:10px" height="25" class=table-youxia><a href="help.asp?action=fukuan"><img height=11 src="image/icon_notice.gif" 
                  width=17 align=absMiddle border=0>付款方式</a></td>
                    </tr>
                    <tr> 
                      <td style="padding-left:10px" height="25" class=table-youxia><a href=help.asp?action=tiaokuan><img height=11 src="image/icon_notice.gif" 
                  width=17 align=absMiddle border=0>交易条款</a></td>
                    </tr>
                    <tr> 
                      <td style="padding-left:10px" height="25" class=table-youxia><a href=help.asp?action=transport><img height=11 src="image/icon_notice.gif" 
                  width=17 align=absMiddle border=0>运输说明</a></td>
                    </tr>
                    <tr> 
                      <td style="padding-left:10px" height="25" class=table-youxia><a href=help.asp?action=secret><img height=11 src="image/icon_notice.gif" 
                  width=17 align=absMiddle border=0>保密安全</a></td>
                    </tr>
                    <tr> 
                      <td style="padding-left:10px" height="25" class=table-youxia><a href=help.asp?action=businesstime><img height=11 src="image/icon_notice.gif" 
                  width=17 align=absMiddle border=0>工作时间</a></td>
                    </tr>
                    <tr> 
                      <td style="padding-left:10px" height="25" class=table-youxia><a href=help.asp?action=support><img height=11 src="image/icon_notice.gif" 
                  width=17 align=absMiddle border=0>商品销售和售后服务</a></td>
                    </tr>
                    <tr> 
                      <td style="padding-left:10px" height="25" class=table-youxia><a href=help.asp?action=law><img height=11 src="image/icon_notice.gif" 
                  width=17 align=absMiddle border=0>适用法律和版权声明</a></td>
                    </tr>
                    <tr> 
                      <td style="padding-left:10px" height="25" class=table-youxia><a href=# onClick="javascript:window.open('vip.asp?action=vipscore','','width=400,height=200,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes')";return false;><img height=11 src="image/icon_notice.gif" 
                  width=17 align=absMiddle border=0>关于VIP会员</a> </td>
                    </tr>
                    <tr> 
                      <td style="padding-left:10px" height="25" class=table-youxia><a href=help.asp?action=faq><img height=11 src="image/icon_notice.gif" 
                  width=17 align=absMiddle border=0>常见问题</a></td>
                    </tr>
                  </table>
                </td>
              </tr>
              </tbody> 
            </table>
            <% if left1<>"" then %>
            <a href=<%=left1url%> target="_blank"><img src=<%=left1%> border="0"></a> 
            <% end if %>
            <!--左侧-->
            <br>
            <% if left2<>"" then %>
            <a href=<%=left2url%> target="_blank"><img src=<%=left2%> border="0"></a> 
            <% end if %>
            <!--左侧-->
          </td>
        </tr>
      </table>
      <table height=43 cellspacing=0 cellpadding=0 
                        width="100%" align=center 
                        background=img/contact.gif 
border=0>
        <tbody> 
        <tr> 
          <td  valign=top> 
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td height="5"></td>
              </tr>
            </table>
            <table cellspacing=0 cellpadding=0 width="100%" 
                              border=0 height="35">
              <tbody> 
              <tr> 
                <td 
                                style="PADDING-LEFT: 18px; FONT-SIZE: 8pt; FONT-FAMILY: tahoma" 
                                valign=top><img 
                                src="img/left_customer_01.gif" 
                                align=absMiddle width="21" height="14">020-34506590</td>
              </tr>
              <tr> 
                <td 
                                style="PADDING-LEFT: 18px; FONT-SIZE: 8pt; FONT-FAMILY: tahoma" 
                                valign=top height=10><img 
                                src="img/left_customer_02.gif" 
                                align=absMiddle width="21" height="14"><b><font color=#81B902><%=webemail%></font></b></td>
              </tr>
              </tbody> 
            </table>
          </td>
        </tr>
        </tbody> 
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height="4"></td>
        </tr>
      </table>
      <table cellspacing=0 cellpadding=0 width="100%" 
border=0>
        <tbody></tbody> 
      </table>
      <table height=51 cellspacing=0 cellpadding=0 
                        width="100%" align=center 
                        background=img/time.gif border=0>
        <form name=frmTime3><tbody>
          <tr> 
            <td style="PADDING-LEFT: 38px; PADDING-TOP: 28px" 
                            valign=top> 
              <input 
                              style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; FONT: 9pt 宋体; BORDER-LEFT: 0px; WIDTH: 150px; COLOR: #585858; BORDER-BOTTOM: 0px; HEIGHT: 18px; BACKGROUND-COLOR: transparent" 
                              readOnly name=disp>
            </td>
          </tr>
        </form>
        <script>TO=setTimeout('TOfunc()',1000);</script></TBODY>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height="4"></td>
        </tr>
      </table>
      <table height=51 cellspacing=0 cellpadding=0 
                        width="100%" align=center 
                        background=img/conter.gif 
                          border=0>
        <tbody> 
        <tr> 
          <td style="PADDING-LEFT: 38px; PADDING-TOP: 24px" 
                            valign=top> 
            <script src="count/index2.asp?tye=num"></script>
          </td>
        </tr>
        </tbody> 
      </table>
    </td>
    <td rowspan="3" width="747" valign="top"> 
      <table width="747" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td> 
            <!-- #include file="ad.asp"-->
          </td>
        </tr>
        <tr> 
          <td height="57" background="image/special.gif"> 
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td width="12%">&nbsp;</td>
                <td width="88%" align="left"> 
                  <div align="left"><b><font face="Arial"><font color="#3399CC"><a href="index.asp"><%=webname%></a>&nbsp;-&gt;&nbsp;客户留言</font></font></b></div>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
      <table width="50%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height="3"></td>
        </tr>
      </table>
      <table cellspacing=0 cellpadding=0 width="747" border=0 height="590">
        <tr> 
          <td class=ml width="1" background="image/line.gif"></td>
          <td class=ml width="10"></td>
          <td align=left width="716" valign="top"> 
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td valign="top"> 
                  <script language="JavaScript">
<!--
function checkspace(checkstr) {
  var str = '';
  for(i = 0; i < checkstr.length; i++) {
    str = str + ' ';
  }
  return (str == checkstr);
}

function ssother()
{
   if(checkspace(document.receiveaddr.receipt.value)) {
	document.receiveaddr.receipt.focus();
    alert("对不起，请填写收货人姓名！");
	return false;
  }
  if(checkspace(document.receiveaddr.city.value)) {
	document.receiveaddr.city.focus();
    alert("对不起，请填写收货人所在省市！");
	return false;
  }
  if(checkspace(document.receiveaddr.address.value)) {
	document.receiveaddr.address.focus();
    alert("对不起，请填写收货人详细收货地址！");
	return false;
  }
  if(checkspace(document.receiveaddr.postcode.value)) {
	document.receiveaddr.postcode.focus();
    alert("对不起，请填写邮编！");
	return false;
  }
 
    if(checkspace(document.receiveaddr.usertel.value)) {
	document.receiveaddr.usertel.focus();
    alert("对不起，请留下您的电话！");
	return false;
  }
      if(checkspace(document.receiveaddr.deliverymethord.value)) {
	document.receiveaddr.deliverymethord.focus();
    alert("对不起，您还没有选择送货方式！");
	return false;
  }
      if(checkspace(document.receiveaddr.paymethord.value)) {
	document.receiveaddr.paymethord.focus();
    alert("对不起，您还没有选择支付方式！");
	return false;
  }
  if(document.receiveaddr.useremail.value.length!=0)
  {
    if (document.receiveaddr.useremail.value.charAt(0)=="." ||        
         document.receiveaddr.useremail.value.charAt(0)=="@"||       
         document.receiveaddr.useremail.value.indexOf('@', 0) == -1 || 
         document.receiveaddr.useremail.value.indexOf('.', 0) == -1 || 
         document.receiveaddr.useremail.value.lastIndexOf("@")==document.receiveaddr.useremail.value.length-1 || 
         document.receiveaddr.useremail.value.lastIndexOf(".")==document.receiveaddr.useremail.value.length-1)
     {
      alert("Email地址格式不正确！");
      document.receiveaddr.useremail.focus();
      return false;
      }
   }
 else
  {
   alert("Email不能为空！");
   document.receiveaddr.useremail.focus();
   return false;
   }
   
}


function regInput(obj, reg, inputStr)
{
	var docSel	= document.selection.createRange()
	if (docSel.parentElement().tagName != "INPUT")	return false
	oSel = docSel.duplicate()
	oSel.text = ""
	var srcRange	= obj.createTextRange()
	oSel.setEndPoint("StartToStart", srcRange)
	var str = oSel.text + inputStr + srcRange.text.substr(oSel.text.length)
	return reg.test(str)
}

function osubmit()
{
receiveaddr.submit1.disabled=true;  
receiveaddr.submit();}
//-->
</script>
                  <%
action=FormatSQL(SafeRequest("action",0))
If Session("ProductList") = "" Then
Response.write "<script language=javascript>alert('对不起，您的购物车中还没有商品！');history.go(-1);</script>"
Conn.Close
Set Conn = Nothing
Response.End
End IF
Dim YourPrice,strprice2,strvipprice,ProScore
select case action
Case "1"
If LngUserID=0 Then %>
                  <table width="100%" align=center>
                    <tbody> 
                    <tr> 
                      <% If webimg6 = 1 Then %>
                      <td valign="top" class=mm height="514"><b><a href="payment.asp?action=2"><font color="#FF6600">非注册用户匿名购买</font></a></b><br>
                        <br>
                        注册就送积分，快快注册成为我们的会员，更多惊喜等着您！</td>
                      <% End IF %>
                      <td class=mm height="514" valign="top"> 
                        <!--#include file="details.asp"-->
                      </td>
                    </tr>
                    </tbody> 
                  </table>
                  <!--右侧-->
                  <%
Else 
Response.Redirect"payment.asp?action=2"
End IF
Case "2"
IF LngUserID=0 and webimg6 = 0 Then
response.write "<script language=javascript>alert('对不起，匿名购物被关闭，请先注册或登录！');history.go(-1);</script>" 
Conn.Close
Set Conn = Nothing
response.End()
end if

set rs=server.CreateObject("adodb.recordset")
rs.open "select receipt,userid,UserSex,useremail,city,address,postcode,usertel,paymethord,deliverymethord,realname from [user] where username='"&strUserName&"'",conn,1,1
%>
                  <TABLE width="100%" align=center>
                    <TBODY> 
                    <TR> 
                      <TD class=mm > 
                        <!--#include file="details.asp"-->
                      </TD>
                    </TR>
                    <TR> 
                      <TD class=mm> 
                        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1">
                          <form name="receiveaddr" method="post" action="payment.asp?action=3" onSubmit="return ssother();">
                            <tr bgcolor=<%=bgclr3%>> 
                              <input type=hidden name=realname value=<%=strUserName %>>
                              <td width="150" style='PADDING-LEFT: 6px'><b>收货人姓名：</b></td>
                              <td width="600" height="28"> 
                                <input name="receipt" type="text" id="receipt" size="12" value=<%=trim(rs("receipt"))%>>
                                &nbsp;<b>性 别：</b> 
                                <select name="UserSex" id="UserSex">
                                  <option value="1" <% if rs("UserSex")=1 Then Response.write("Selected") %>>女</option>
                                  <option value="0" <% if rs("UserSex")=0 Then Response.write("Selected") %>>男</option>
                                </select>
                              </td>
                            </tr>
                            <tr bgcolor=<%=bgclr3%>> 
                              <td style='PADDING-LEFT: 6px'><b>详细地址：</b></td>
                              <td height="28"> 
                                <input name="address" type="text" id="address" size="40" value=<%=trim(rs("address"))%>>
                              </td>
                            </tr>
                            <tr bgcolor=<%=bgclr3%>> 
                              <td style='PADDING-LEFT: 6px'><b>邮　　编：</b></td>
                              <td height="28"> 
                                <input name="postcode" type="text" id="postcode" size="10" value=<%=rs("postcode")%>>
                              </td>
                            </tr>
                            <tr bgcolor=<%=bgclr3%>> 
                              <td style='PADDING-LEFT: 6px'><b>电　　话：</b></td>
                              <td height="28"> 
                                <input name="usertel" type="text" id="usertel" size="12" value=<%=trim(rs("usertel"))%>>
                              </td>
                            </tr>
                            <tr bgcolor=<%=bgclr3%>> 
                              <td style='PADDING-LEFT: 6px'><b>电子邮件：</b></td>
                              <td height="28"> 
                                <input name="useremail" type="text" id="useremail" value=<%=trim(rs("useremail"))%>>
                                (<font color="#FF0000">如果使用支付宝支付请,请填写支付宝账号</font>)</td>
                            </tr>
                            <tr bgcolor=<%=bgclr3%>> 
                              <td style='PADDING-LEFT: 6px'><b>送货方式：</b></td>
                              <td height="28"> 
                                <%  
          set rs3=server.CreateObject("adodb.recordset")  
          rs3.Open "select * from delivery where methord=0 order by deliveryidorder",conn,1,1  
          response.Write "<select name=deliverymethord size="&rs3.recordcount&" id=deliverymethord>"  
          do while not rs3.EOF  
          response.Write "<option value="&rs3("deliveryid")  
          if int(rs("deliverymethord"))=int(rs3("deliveryid")) then   
          response.Write " selected>"  
          else  
          response.Write ">"  
          end if  
          response.Write trim(rs3("subject"))&"</option>"  
          rs3.MoveNext  
          loop  
          response.Write "</select>"  
          rs3.Close  
          set rs3=nothing  
         %>
                                <b>&nbsp;送货上门限制于本市</b></td>
                            </tr>
                            <tr bgcolor=<%=bgclr3%>> 
                              <td style='PADDING-LEFT: 6px'><b>支付方式：</b></td>
                              <td height="28"> 
                                <%  
          set rs3=server.CreateObject("adodb.recordset")  
          rs3.open "select * from delivery where methord=1 order by deliveryidorder",conn,1,1  
          response.Write "<select name=paymethord size="&rs3.recordcount&" id=paymethord>" %>
                                <%  
          do while not rs3.eof  
          response.Write "<option value="&rs3("deliveryid")  
          if int(rs("paymethord"))=int(rs3("deliveryid")) then  
          response.Write " selected>"  
          else  
          response.Write ">"  
          end if  
          response.Write trim(rs3("subject"))&"</option>"  
          rs3.movenext  
          loop  
          response.Write "</select>"  
          rs3.close  
		   set rs3=nothing  
	  rs.close  
	  set rs=nothing  
  
%>
                              </td>
                            </tr>
                            <tr bgcolor=<%=bgclr3%>> 
                              <td valign="top" style='PADDING-LEFT: 6px'><b>简单留言：</b></td>
                              <td height="75"> 
                                <textarea name="comments" cols="40" rows="5" id="comments"></textarea>
                              </td>
                            </tr>
                            <tr bgcolor=<%=bgclr3%>> 
                              <td></td>
                              <td> 
                                <input name="submit1" type="submit" value="提交订单" onClick="osubmit()">
                              </td>
                            </tr>
                          </form>
                        </table>
                      </TD>
                    </TR>
                    </TBODY> 
                  </TABLE>
                  <%   
Case "3"  
Function GetOrderNo(dDate)  
    GetOrderNo = RIGHT("0000"+Trim(Year(dDate)),4)+RIGHT("00"+Trim(Month(dDate)),2)+RIGHT("00"+Trim(Day(dDate)),2)+RIGHT("00" + Trim(Hour(dDate)),2)+RIGHT("00"+Trim(Minute(dDate)),2)+RIGHT("00"+Trim(Second(dDate)),2)  
End Function  
goods=GetOrderNo(Now())  
  
Dim strMth,LngMth,strMian,Message,strtxtdeposit,LngState  
strMian = ""  
Message = ""  
strtxtdeposit = ""  
LngState = 2  
Message="<html>"  
Message=message &"<table border=0 cellspacing=1 cellpadding=4 align=center width=100％ bgcolor=#006699>"  
Message=message &"<tr bgcolor=#FFFFFF height=25 align=center>"  
Message=message &"<td width=40>编 号</td>"  
Message=message &"<td width=300>商 品 名 称</td>"  
Message=message &" <td width=40>数量</td>"  
Message=message &"<td width=40>积分</td>"  
Message=message &"<td width=60>会员价</td>"  
Message=message &"<td width=40>邮费</td>"  
Message=message &"<td width=60>成交价</td>"  
Message=message &"<td width=70>总 计</td>"  
Message=message &"</tr>"  
%>
                  <!--右侧-->
                  <table width="100%" align=center>
                    <tbody> 
                    <tr> 
                      <td class=mm>&nbsp;</td>
                      <td class=mm><br>
                        &nbsp;&nbsp;<font color="#FF3333"><b>以下是您购物车中的商品信息，请核对正确无误后下单，非注册用户请牢记你的订单号以便日后查询！<br>
                        &nbsp; </b></font></td>
                      <td class=mm>&nbsp;</td>
                    </tr>
                    <tr> 
                      <td class=mm>&nbsp;</td>
                      <td class=mm> 
                        <table border="0" cellspacing="1" cellpadding="4" align="center" width="100％" bgcolor="#006699">
                          <tr bgcolor="#FFFFFF" height="25" align="center"> 
                            <td width="40">编 号</td>
                            <td width="300">商 品 名 称</td>
                            <td width="40">数量</td>
                            <td width="40">积分</td>
                            <td width="60">会员价</td>
                            <td width="40">邮费</td>
                            <td width="60">成交价</td>
                            <td width="70">总 计</td>
                          </tr>
                          <%
Set rsCheck=Server.CreateObject("ADODB.RecordSet") 
strsql="select ID,Name,Score,Price2," & LstPrice & ",amount,VipPrice,Stock,Solded from Product where ID in ("&Session("ProductList")&") order by ID"
rsCheck.open strsql,conn,1,1

Sum = 0
SumS = 0
SumFee = 0
Do While Not rsCheck.EOF
     Quatity = CInt( Request( "Q_" & rsCheck("ID")) )
     If Quatity <= 0 Then 
        Quatity = CInt( Session(rsCheck("ID")) )
        If Quatity <= 0 Then Quatity = 1
     End If
if len(Quatityt)=0 then
Quatityt=Quatity
else
Quatityt=Quatityt&","&Quatity
end if
strprice2 = Round(rsCheck("Price2"),2)
strvipprice = Round(rsCheck("VipPrice"),2)
ProScore = rsCheck("Score")
YourPrice =  Round(rsCheck("" & LstPrice & ""),2)
Session(rsCheck("ID")) = Quatity
Sum = Sum + (YourPrice + strvipprice)*Quatity
Sum=Round(Sum,2) 
SumS = SumS + ProScore*Quatity
%>
                          <tr bgcolor="#FFFFFF" height="25"align="center"> 
                            <td><%=rsCheck("ID")%></td>
                            <td align="left">&nbsp;<a href="http://design.szze.com/biz/product.asp?ID=<%=rsCheck("ID")%>" target="_blank"><%=rsCheck("Name")%></a></td>
                            <td><%=Quatity%> </td>
                            <td><%=ProScore %></td>
                            <td><%=strprice2 %></td>
                            <td><%=strvipprice %></td>
                            <td><%=YourPrice %></td>
                            <td><%=Round((YourPrice + strvipprice)*Quatity,2) %></td>
                          </tr>
                          <%
Message=message &"<tr bgcolor=#FFFFFF height=25 align=center> "
Message=message &"<td>"& rsCheck("ID") &"</td>"
Message=message &"<td align=left><a href=http://design.szze.com/biz/product.asp?ID="& rsCheck("ID")&" target=_blank>"& rsCheck("Name") &"</a></td>"
Message=message &"<td>"& Quatity &"</td>"
Message=message &"<td>"&ProScore &"</td>"
Message=message &"<td>"& strprice2 &"</td>"
Message=message &"<td>"& strvipprice &"</td>"
Message=message &"<td>"& YourPrice &"</td>"
Message=message &"<td>"& Round((YourPrice + strvipprice)*Quatity,2) &"</td>"
Message=message &"</tr>"

IF FormatSQL(SafeRequest("action",0)) = 3 Then 
strprice2 = rsCheck("Price1")
strvipprice = rsCheck("Vipprice")
YourPrice =  (rsCheck("" & LstPrice & "")+strvipprice)*Quatity
If LngUserID=0 Then
strUserName = Request.ServerVariables("REMOTE_ADDR")
End IF
if request.form("receipt")="" then
conn.close
set conn = nothing
response.Write "<script language=javascript>alert('请填写收货人姓名！');history.go(-1);</script>"
response.End
end if
if request.form("address")="" then
conn.close
set conn = nothing
response.Write "<script language=javascript>alert('请填写详细地址！');history.go(-1);</script>"
response.End
end if
if request.form("postcode")="" then
conn.close
set conn = nothing
response.Write "<script language=javascript>alert('请填写邮编！');history.go(-1);</script>"
response.End
end if
if request.form("usertel")="" then
conn.close
set conn = nothing
response.Write "<script language=javascript>alert('请填写电话！');history.go(-1);</script>"
response.End
end if
if request.form("useremail")="" then
conn.close
set conn = nothing
response.Write "<script language=javascript>alert('请填写电子邮件！');history.go(-1);</script>"
response.End
end if
if request.form("deliverymethord")="" then
conn.close
set conn = nothing
response.Write "<script language=javascript>alert('请填写送货方式！');history.go(-1);</script>"
response.End
end if
if request.form("paymethord")="" then
conn.close
set conn = nothing
response.Write "<script language=javascript>alert('请填写支付方式！');history.go(-1);</script>"
response.End
end if
set rs=server.CreateObject("adodb.recordset")  
rs.open "select * from orders",conn,1,3
rs.addnew
rs("username")=trim(strUserName)
rs("id")=rsCheck("ID")
rs("actiondate")=Now()
rs("productnum")=Quatity
rs("state")=2
rs("goods")=goods
rs("postcode")=int(request.form("postcode"))
rs("receipt")=trim(request.form("receipt"))
rs("address")=trim(request.form("address"))
rs("paymethord")=int(request.form("paymethord"))
rs("deliverymethord")=int(request.form("deliverymethord"))
rs("UserSex")=int(request.form("UserSex"))
rs("comments")=HTMLEncode2(trim(request.form("comments")))
rs("paid")=YourPrice
rs("realname")=trim(request.form("realname"))
rs("score")=ProScore*Quatity
rs("useremail")=trim(request.form("useremail"))
rs("usertel")=trim(request.form("usertel"))
rs("comments")=trim(request.form("comments"))
rs("userid")=LngUserID
rs.update
rs.close
Session(rsCheck("ID")) = 1
End IF

     rsCheck.MoveNext
     Loop
rsCheck.close
set rsCheck=nothing
%>
                          <tr bgcolor="#FFFFFF"> 
                            <td colspan="8" height="25"> 您现在是：<font color="#FF6600"><%= strTitle %></font>&nbsp; 
                              商品总计：<font color="#FF6600"><%=Sum  %></font>&nbsp;元&nbsp; 
                              获得积分：<font color="#FF6600"><%=SumS %></font>&nbsp;分 
                            </td>
                          </tr>
                          <% 
Message=message &"<tr bgcolor=#FFFFFF>"
Message=message &"<td colspan=8 height=25>"
Message=message &"您现在是：<font color=#FF6600>"& strTitle &"</font>"
Message=message &"商品总计：<font color=#FF6600>"& Sum  &"</font>元"
Message=message &"获得积分：<font color=#FF6600>"& SumS &"</font>分"
Message=message &"</td>"
Message=message &"</tr>"

IF FormatSQL(SafeRequest("action",0)) = 3 Then 

rs.open "select * from delivery where deliveryid="&int(request.form("deliverymethord")),conn,1,1
	  if rs.eof and rs.bof then
	  strMth = "你选择的送货方式已经被删除"
	  LngMth = 0
	  else
	  strMth = rs("subject")
	  LngMth = rs("fee")
	  LngPayfee = rs("payfee")
      end if
	  rs.close
	  Sum = Sum*(1+LngPayfee/100)
	  If webbj5 = 0 Then
	  Sum = Sum +LngMth
	  strMian = ""
	  Else
	  strMian = "(购物满&nbsp;<font color=red>"&webbj5&"</font>&nbsp;元免附加邮费)"
		  	IF Sum < webbj5 Then
		         Sum = Sum +LngMth
			End IF 
	  End If
			 %>
                          <tr bgcolor="#FFFFFF"> 
                            <td colspan="8" height="25"> 您选择的送货方式：<font color="#FF6600"> 
                              <% = strMth %>
                              </font>&nbsp;附加邮费：<font color="#FF6600"> 
                              <% = LngMth %>
                              </font>&nbsp;方式加收： 
                              <% = LngPayfee %>
                              %&nbsp;订单费用总计：<font color="#FF6600"> 
                              <% = Round(Sum,2) %>
                              </font>&nbsp; 
                              <% = strMian %>
                            </td>
                          </tr>
                          <%
Message=message &"<tr bgcolor=#FFFFFF> "
Message=message &"<td colspan=8 height=25>"
Message=message &"您选择的送货方式：<font color=#FF6600>"& strMth &"</font>&nbsp;附加邮费：<font color=#FF6600>"& LngMth &"</font>&nbsp;订单费用总计：<font color=#FF6600>"& Sum &"</font>&nbsp;"& strMian &" "
Message=message &"</td>"
Message=message &"</tr>"
%>
                          <tr> 
                            <td colspan="8" bgcolor=#FFFFFF> 订单号： 
                              <% = goods %>
                              <br>
                              收货人姓名： 
                              <%response.Write trim(request.form("receipt"))
    if request.form("UserSex")=0 then
    response.Write "&nbsp;(先生)"
	strMale = "&nbsp;(先生)"
    else
    response.Write "&nbsp;(女士)"
	strMale = "&nbsp;(女士)"
    end if 
	Message=message &"<tr>"
	Message=message &"<td colspan=8 bgcolor=#FFFFFF>"
	Message=message &"订单号："& goods &"<br> "
	Message=message &"收货人姓名："& trim(request.form("receipt")) &" "& strMale &" <br>"
	%>
                              <br>
                              详细地址： 
                              <% = trim(request.form("address")) %>
                              <br>
                              邮政编码： 
                              <% = trim(request.form("postcode")) %>
                              <br>
                              联系电话： 
                              <% = trim(request.form("usertel")) %>
                              <br>
                              电子邮件： 
                              <% = trim(request.form("useremail")) %>
                              <%
	Message=message &"详细地址："& trim(request.form("address")) &" <br>"
	Message=message &"邮政编码："& trim(request.form("postcode")) &" <br>"
	Message=message &"联系电话："& trim(request.form("usertel")) &" <br>"
	Message=message &"电子邮件："& trim(request.form("useremail")) &" <br>"
	%>
                              <br>
                              送货方式： 
                              <% 
	rs.open "select * from delivery where deliveryid="&int(request.form("deliverymethord")),conn,1,1
	  if rs.eof and rs.bof then
	  response.write "方式已经被删除"
	   Message=message &"送货方式：方式已经被删除<br>"
	  else
      response.Write trim(rs("subject"))&"(送货费用"
	  response.Write (rs("fee"))&"元，方式加收"
	   response.Write (rs("payfee"))&"%)"
	  Message=message &"送货方式："& rs("subject") &" ("
	  Message=message &" "& rs("fee") &") <br>"
      end if
	  rs.close %>
                              <br>
                              支付方式： 
                              <% 
	  rs.open "select * from delivery where deliveryid="&request.form("paymethord"),conn,1,1
	  if rs.eof and rs.bof then
	  response.write "方式已经被删除"
	  Message=message &"汇款方式：方式已经被删除<br>"
	  else
      response.Write trim(rs("subject"))
	  Message=message &"方式："& rs("subject") &"<br> "
      end if
	  rs.close
	  
	  
	  if LngDeposit>Sum then
		 rs.open "select state,goods From Orders Where Orders.Goods = '"& goods &"' ",conn,1,3
		 do while not rs.eof
		 rs("state")=3
		 rs.update
		 rs.movenext
		 loop
		 rs.close

		 rs.open "Select score,deposit From [User] where userid = "&LngUserID,conn,1,3
		 rs("deposit")=rs("deposit")-sum
		 rs("score")=rs("score")+sums
		 rs.update
		 rs.close
		 
		strsql="select ID,Stock,Solded from Product where ID in ("&Session("ProductList")&") order by ID"
		rs.open strsql,conn,1,3
		rs("Stock") = rs("Stock") - Quatity
		rs("Solded") = rs("Solded") + Quatity
		rs.Update
		rs.close

		 strtxtdeposit="已从你的预存款中扣除"&""&Round(sum,2)&""&"元，给你加了"&""&sums&""&"分，订单状态自动变成已汇款"
else
		 strtxtdeposit="请您在一周内按您选择的支付方式进行汇款，汇款时请注明您的订单号！汇款后请及时通知我们"
         rs.open "select paymethord from config",conn,1,1
		 strtxtdeposit = strtxtdeposit &"<br><br> "& rs("paymethord") &" "
		 rs.close
end if
     set rs=nothing
      %>
                              <br>
                              您的留言： 
                              <% = trim(request.form("comments")) %>
                              <br>
                              <%
dim s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11,s12,s13,s14,s15,s16,s17,s18,s19,s20
dim t1,t2,t3,t4,t5
dim AlipayObj
	t1		=	"https://www.alipay.com/payto:"	'支付接口
	t2		=	"wpjzhzxb@yahoo.com.cn"				'商户支付宝账户（改成你自己的）
	t3		=	"65wl4frs8zvvq8eyij548e2jdo2k6fm0"		'安全校验码（改成你自己的）		
	t4		=	"http://img.alipay.com/pimg/button_alipaybutton_o.gif"		'支付宝按钮图片
	t5		=	"点击进入支付宝在线支付"			'按钮悬停说明
	s1		=	"0001"						'cmd			命令码
	s2		=	"订单号：" & goods				'subject		商品名称
	s3		=	"请您记录下本订单号：" & goods & " 访问 www.wygk.cn/ 查询订单状态"	'body			商品描述
	s4		=	goods						'order_no		商户订单号
	s5		=	Round(Sum,2)	'price			商品单价			0.01～50000.00
	s6		=	""	'url			商品展示网址
	s7		=	"1"							'type			支付类型			1：商品购买2：服务购买3：网络拍卖4：捐赠
	s8		=	Quatity							'number			购买数量
	s9		=	"1"							'transport		发货方式			1：平邮2：快递3：虚拟物品
	s10		=	"0.00"						'ordinary_fee	平邮运费
	s11		=	"0.00"						'express_fee	快递运费
	s12		=	"true"						'readonly		交易信息是否只读
	s13		=	""						'buyer_msg		买家给卖家的留言
	s14		=	trim(request.form("useremail"))			'buyer			买家Email
	s15		=	trim(request.form("receipt"))			'buyer_name		买家姓名
	s16		=	trim(request.form("address"))			'buyer_address	买家地址
	s17		=	trim(request.form("postcode"))			'buyer_zipcode	买家邮编
	s18		=	trim(request.form("usertel"))			'buyer_tel		买家电话号码
	s19		=	""						'buyer_mobile	买家手机号码
	s20		=	""							'partner		合作伙伴ID			保留字段

	Set AlipayObj	= New creatAlipayItemURL
	itemUrl=AlipayObj.creatAlipayItemURL(t1,t2,t3,t4,t5,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11,s12,s13,s14,s15,s16,s17,s18,s19,s20)

%>
                              <br>
                              <%=itemUrl%> <br>
                              <br>
                              <br>
                              <% = strtxtdeposit %>
                              <%
	Message=message &"您的留言："& trim(request.form("comments")) &" <br>"
	Message=message &" "& strtxtdeposit &" "
	Message=message &"</tr>"
	Message=message &"</table>"
	%>
                              <br>
                              <br>
                              <div align="center"><a href="index.asp">继续购物</a>&nbsp;&nbsp;<a href="JavaScript:onClick=window.close();">关闭窗口</a></div>
                            </td>
                          </tr>
                          <% 
End IF %>
                        </table>
                      </td>
                      <td class=mm>&nbsp;</td>
                    </tr>
                    </tbody> 
                  </table>
                  <!--右侧-->
                  <!--#INCLUDE FILE="include/sendmail.asp"-->
                  <%  
MailType = webbj4  
smtpserver = webbj7  
sendusername = webbj8  
sendpassword = webbj9  
SendName = webbj3  
SendTO = trim(request.form("useremail"))  
SendFrom = webbj8  
subject="您在"&webname&"的订单信息！"  
Select Case MailType  
Case "Nothing"  
  
Case "CDONTS"  
call sendemail(SendFrom,SendTO,smtpserver,sendusername,sendpassword,subject,Message)  
Case "Jmail"  
call SendJmail(SendFrom,SendTO,smtpserver,sendusername,sendpassword,subject,Message,SendName)  
End Select  
  
Session("ProductList") = ""  
%>
                  <br>
                  <%   
end select  %>
                </td>
              </tr>
            </table>
            
          </td>
        </tr>
      </table>
    </td>
    <td rowspan="3" width="15">&nbsp; </td>
  </tr>
  <tr> 
    <td width="29" height="48">&nbsp; </td>
  </tr>
  <tr> 
    <td height="29"> 
      <p>&nbsp;</p>
      <p>&nbsp; </p>
    </td>
  </tr>
</table>
<!--#include file="include/footer.asp"--> <%  
Conn.Close  
Set Conn = Nothing  
%></BODY></HTML>
