<!--#include file="userfunc.asp"-->
<%
sub addtocart() 


ProductList = Session("ProductList")
Products = Split(Request("Prodid"), ",")
For I=0 To UBound(Products)
   PutToShopBag Products(I), ProductList
Next
Session("ProductList") = ProductList

if request("payment")="去收银台" then
response.redirect "payment.asp?action=1"
end if

If Request("cmdShow") = "Yes" Then
   ProductList = ""
   Products = Split(Request("ProdId"), ", ")
   For I=0 To UBound(Products)
      PutToShopBag Products(I), ProductList
   Next
   Session("ProductList") = ProductList
End If
If Len(Session("ProductList")) = 0 Then
Response.write "<table  height=100% width=100%  ><tr><td align=center>您的购物车为空，<a href=index.asp><b>继续购物</b></a>&nbsp;<a href=""JavaScript:onClick=window.close();""><B>关闭窗口</B></a></td></tr></table>"
Response.end
end if
%>
<link rel="stylesheet" href="img/code43.css" type="text/css">

<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr> 
    <td height="10"></td>
 </tr>
<%
Set rsCheck=Server.CreateObject("ADODB.RecordSet") 
strsql="select ID,Name,Score,Price1,Price2," & LstPrice & ",amount,VipPrice,Stock from Product where ID in ("&Session("ProductList")&") order by ID"
rsCheck.open strsql,conn,1,1
%>
<tr> <td>
<form action="check.asp" method="POST" name="check">
        <table border="0" cellspacing="1" cellpadding="4" align="center" width="100％" bgcolor="#006699" class="box">
          <tr bgcolor="#FFFFFF" height="25" align="center"> 
            <td width="30">编 号</td>
            <td width="200">商 品 名 称</td>
            <td width="30">数量</td>
			 <td width="30">积分</td>
			 <td width="3">市场价</td>
			 <td width="30">会员价</td>
			 <td width="30">邮费</td>
            <td width="60">成交价</td>
			<td width="60">总 计</td>
          </tr>
<%
Sum = 0
SumS = 0
Quatity = 1
Do While Not rsCheck.EOF
     Quatity = CInt( Request.Form( "Q_" & rsCheck("ID")) )
     If Quatity <= 0 Then 
        Quatity = CInt( Session(rsCheck("ID")) )
        If Quatity <= 0 Then Quatity = 1
     End If
Session(rsCheck("ID")) = Quatity

IF rsCheck("Stock") < Quatity Then
Quatity = 1
Session(rsCheck("ID")) = 1
response.write "<script language=javascript>alert('对不起，"&rsCheck("Name")&"暂时库存不足，请过段时间再来购买该商品！');window.close();</script>" 
Response.End()
Conn.Close
Set Conn = Nothing
End IF

Dim YourPrice,strprice2,strvipprice,ProScore
strprice1 = Round(rsCheck("Price1"),2)
strprice2 = Round(rsCheck("Price2"),2)
strvipprice = Round(rsCheck("VipPrice"),2)
ProScore = rsCheck("Score")
YourPrice =  Round(rsCheck("" & LstPrice & ""),2)
Sum = Sum + (YourPrice + strvipprice)*Quatity
Sum=Round(Sum,2) 
SumS = SumS + ProScore*Quatity
%> 
          <tr bgcolor="#FFFFFF" height="25"align="center"> 
            <td><input type="CheckBox" name="ProdId" value="<%=rsCheck("ID")%>" Checked></td>
			 
            <td align="left">&nbsp;<a href="product.asp?ID=<%=rsCheck("ID")%>" target="_blank"><%=rsCheck("Name")%></a></td>
            <td><input type="Text" name="<%="Q_" & rsCheck("ID")%>" value="<%=Quatity%>" size="2" class="form"></td>
			<td><%=ProScore %></td>
			<td><%=strprice1 %></td>
			<td><%=strprice2 %></td>
			<td><%=strvipprice %></td>
			<td><%=YourPrice %></td>
			<td><%=Round((YourPrice + strvipprice)*Quatity,2) %></td>
          </tr>
          <%
     rsCheck.MoveNext
     Loop
rsCheck.close
set rsCheck=nothing
%> 
<tr bgcolor="#FFFFFF"> 
 <td colspan="5" align="center" valign="middle">             
                <input type="submit" name="order" value="更新商品"> &nbsp;&nbsp;&nbsp;
                <input type="submit" name="payment" value="去收银台"> &nbsp;&nbsp;&nbsp; 
                <input type="button" value="继续购物" language=javascript onClick="javascript:window.close()" name="button">
                <input type="hidden" name="cmdShow" value="Yes">
                </td>
<td colspan="4" height="25">
您现在是：<font color="#FF6600"><%= strTitle %></font><br>
价格总计：<font color="#FF6600"><%=Round(Sum,2) %></font>&nbsp;元<br>
获得积分：<font color="#FF6600"><%=SumS %></font>&nbsp;分
            </td>
          </tr>
      </table>
	          </form>
 </td>
</tr>
      </table>
	  
<%
end sub
sub receiveaddr()
dim rs2
if strUserName="" then
response.Write "<center>请先登录</center>"
response.End
end if
set rs=server.CreateObject("adodb.recordset")
rs.open "select receipt,city,address,postcode,usertel,UserMobile,userqq,UserSex,MSN,deliverymethord,paymethord from [user] where username='"&strUserName&"' ",conn,1,1
%>
<table width=90% border=0 align=center cellpadding=6 cellspacing=1 bgcolor=#006699 class="tableborder">
  <form name=receiveaddr method=post action=saveprofile.asp?action=receiveaddr>
    <tr bgcolor=#6699cc> 
      <td height=25 colspan=2 align=center class="header"><font color="#006699">请您填写正确的收货人信息，我们会为您保密。</font></td>
    </tr>
    <tr bgcolor=#FFFFFF height=28 class="firstrow"> 
      <td width=18% STYLE='PADDING-LEFT: 10px' class="firstrow">收货人姓名：</td>
      <td width=82% class="firstrow"> 
        <input name=receipt type=text id=receipt size=12 value=<% = trim(rs("receipt")) %>>
        &nbsp;&nbsp; 
        <select name="UserSex" id="UserSex">
          <option value="0" <% if rs("UserSex")=0 Then Response.write("Selected") %>>男</option>
          <option value="1" <% if rs("UserSex")=1 Then Response.write("Selected") %>>女</option>
        </select>
      </td>
    </tr>
    <tr  class="firstrow" height=28 bgcolor=#FFFFFF> 
      <td STYLE='PADDING-LEFT: 10px'>收货人省/市</td>
      <td> 
        <input name=city type=text id=city value=<% = trim(rs("city"))%>>
      </td>
    </tr>
    <tr  class="firstrow" height=28 bgcolor=#FFFFFF> 
      <td height=16 bgcolor=#FFFFFF STYLE='PADDING-LEFT: 10px'>详细地址：</td>
      <td> 
        <input name=address type=text id=address size=40 value=<% = trim(rs("address"))%>>
      </td>
    </tr>
    <tr  class="firstrow" height=28 bgcolor=#FFFFFF> 
      <td STYLE='PADDING-LEFT: 10px'>邮　　编：</td>
      <td> 
        <input name=postcode type=text id=postcode value=<% = trim(rs("postcode")) %>>
      </td>
    </tr>
    <tr  class="firstrow" height=28 bgcolor=#FFFFFF> 
      <td STYLE='PADDING-LEFT: 10px'>电　　话：</td>
      <td> 
        <input name=usertel type=text id=usertel value=<% = trim(rs("usertel")) %>>
      </td>
    </tr>
    <tr  class="firstrow" height=28 bgcolor=#FFFFFF> 
      <td STYLE='PADDING-LEFT: 10px'>手　　机：</td>
      <td> 
        <input name=UserMobile type=text id=UserMobile value=<% = trim(rs("UserMobile")) %>>
      </td>
    </tr>
    <tr  class="firstrow" height=28 bgcolor=#FFFFFF> 
      <td STYLE='PADDING-LEFT: 10px'>腾讯 QQ：</td>
      <td> 
        <input name=userqq type=text id=userqq value=<% = trim(rs("userqq")) %>>
      </td>
    </tr>
    <tr  class="firstrow" height=28 bgcolor=#FFFFFF> 
      <td STYLE='PADDING-LEFT: 10px'>MSN：</td>
      <td> 
        <input name=MSN type=text id=MSN value=<% = trim(rs("MSN")) %>>
      </td>
    </tr>
    <tr  class="firstrow" height=46 bgcolor=#FFFFFF> 
      <td STYLE='PADDING-LEFT: 10px'>送货方式：</td>
      <td> 
        <select name=deliverymethord size=5 id=deliverymethord>
          <%
set rs2=server.CreateObject("adodb.recordset")
rs2.open "select * from delivery where methord=0 order by deliveryidorder",conn,1,1
do while not rs2.EOF
response.Write "<option value="&rs2("deliveryid")&">"&trim(rs2("subject"))&"</option>"
rs2.MoveNext
loop
rs2.Close
%>
        </select>
      </td>
    </tr>
    <tr height=58 bgcolor=#FFFFFF> 
      <td STYLE='PADDING-LEFT: 10px'>支付方式： 
      <td> 
        <select name=paymethord size=5 id=paymethord>
          <%
rs2.Open "select * from delivery where methord=1 order by deliveryidorder",conn,1,1
do while not rs2.EOF
response.Write "<option value="&rs2("deliveryid")&">"&trim(rs2("subject"))&"</option>"
rs2.MoveNext
loop
rs2.Close
set rs2=nothing
%>
        </select>
      </td>
    </tr>
    <tr bgcolor=#FFFFFF align=center> 
      <td height=32 colspan=2 > 
        <input type=submit name=Submit value=提交保存 onclick='return checkreceiveaddr();'>
      </td>
    </tr>
  </form>
</table>
<%
rs.close
set rs=nothing
end sub

sub deposit()
dim strscore,strvipscore,strdeposit
if strUserName="" then
response.Write "<center>请先登录</center>"
response.End
end if
set rs=server.CreateObject("adodb.recordset")
rs.open "select score,deposit from [user] where username='"&strUserName&"' ",conn,1,1
strscore = rs("score")
strdeposit = rs("deposit")
rs.close
rs.open "select webimg14 from config",conn,1,1
strvipscore = rs("webimg14")
rs.close
%>
<table width=96% border=0 align=center cellpadding=6 cellspacing=1 class="tableborder">
  <tr bgcolor=#FFFFFF> 
    <td> <img src="image/icon_notice.gif"> &nbsp;您目前的积分为： <font color=#FF6600> 
      <% = strscore %>
      </font> 分。 </td>
  </tr>
  <tr bgcolor=#FFFFFF> 
    <td width="60%" class="firstrow"> 
      <form name="uptovip" method="post" action="vip.asp?action=chgscore">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr> 
            <td>
              <img src="image/icon_notice.gif"> &nbsp;你目前的预存款有： <font color=#FF6600> 
              <% = Round(strdeposit,2) %>
              </font> 元。把 
              <input name="strchg" type="text" size="10" maxlength="5" value="0" onKeyPress	= "return regInput(this,	/^\d*\.?\d{0,2}$/,		String.fromCharCode(event.keyCode))" 
onpaste		= "return regInput(this,	/^\d*\.?\d{0,2}$/,		window.clipboardData.getData('Text'))"
ondrop		= "return regInput(this,	/^\d*\.?\d{0,2}$/,		event.dataTransfer.getData('Text'))">
              <input type="submit" name="Submit" value="积分转换成预存款">
            </td>
          </tr>
        </table>
      </form>
    </td>
  </tr>
  <tr bgcolor=#FFFFFF> 
    <td class="firstrow"><font color=#FF6600><img src="image/icon_notice.gif"></font> 
      &nbsp;一积分可以转换&nbsp;<font color="#FF6600"> 
      <% = webbj6 %>
      </font>&nbsp;元预存款</td>
  </tr>
</table>
<%

set rs = nothing
end sub

sub profile()
if strUserName="" then
response.Write "<center>请先登录</center>"
response.End
end if
set rs=server.CreateObject("adodb.recordset")
rs.open "select book from [user] where username='"&strUserName&"' ",conn,1,1
%>
<br>
<div align="center"><% = rs("book") %></div>

<%
end sub

sub customerinfo()
if strUserName="" then
response.Write "<center>请先登录</center>"
response.End
end if
set rs=server.CreateObject("adodb.recordset")
rs.open "select [User].useremail,[User].vip,[User].identify,[User].UserQuestion,[User].realname,[User].GrpID,TimesGrp.GrpName from [User] Inner Join TimesGrp On [User].GrpID = TimesGrp.GrpID where username='"&strUserName&"' ",conn,1,1
%>
<table width=100% border=0 align=center cellpadding=6 cellspacing=1 class="tableborder">
  <form name=userinfo method=post action=saveprofile.asp?action=customerinfo>
<tr>
      <td align=center class=header>尊敬的用户，我们向您承诺：你的信息将被严格保密。</td>
    </tr>
<tr class="firstrow"><td height=25 class=table-xia STYLE='PADDING-LEFT: 30px'>用 户 名： <font color=#FF6600><% = strUserName %></font></td></tr>
<tr class="firstrow"><td height=25 class=table-xia STYLE='PADDING-LEFT: 30px'>会员级别： [<b><font color=#FF6600><% = trim(rs("GrpName")) %></font></b>]</td></tr>
<tr class="firstrow"><td height=25 class=table-xia STYLE='PADDING-LEFT: 30px'>E-Mail　：  <input name=useremail type=text id=useremail2 value=<% =trim(rs("useremail")) %>></td></tr>
<tr class="firstrow"><td height=25 class=table-xia STYLE='PADDING-LEFT: 30px'>真实姓名： <input name=realname type=text id=realname value=<% = trim(rs("realname"))%>></td></tr>
<tr class="firstrow"><td height=25 class=table-xia STYLE='PADDING-LEFT: 30px'>密码提问： <input name=UserQuestion type=text id=UserQuestion value=<% = trim(rs("UserQuestion"))%>></td></tr>
<tr class="firstrow"><td height=25 class=table-xia STYLE='PADDING-LEFT: 30px'>问题答案： <input name=UserAnswer type=text id=UserAnswer></td></tr>
<tr class="firstrow"><td height=25 class=table-xia STYLE='PADDING-LEFT: 30px'><input type=submit name=Submit2 value=提交保存 onclick='return checkuserinfo();'></td></tr>
</form></table>
<%
rs.close
set rs=nothing
end sub

sub changepass()
if strUserName="" then
response.Write "<center>请先登录</center>"
response.End
end if %>
<table width=96% border=0 align=center cellpadding=6 cellspacing=1 class="tableborder">
  <form name=userpass method=post action=saveprofile.asp?action=changepass>
    <tr> 
      <td width=50% align="right" height="35" class="firstrow">用 户 名：</td>
      <td width=50% height="35" class="firstrow"><font color=#FF6600> 
        <% = strUserName %>
        </font></td>
    </tr>
    <tr> 
      <td align="right" height="35" class="firstrow">原 密 码：</td>
      <td height="35" class="firstrow"> 
        <input name=UserPassword type=Password id=UserPassword>
      </td>
    </tr>
    <tr> 
      <td align="right" height="35" class="firstrow">新 密 码：</td>
      <td height="35" class="firstrow"> 
        <input name=UserPassword1 type=Password id=UserPassword1>
      </td>
    </tr>
    <tr> 
      <td align="right" height="35" class="firstrow">确认密码：</td>
      <td height="35" class="firstrow"> 
        <input name=UserPassword2 type=Password id=UserPassword2>
      </td>
    </tr>
    <tr> 
      <td colspan=2 class="firstrow" align="center"> 
        <input type=submit name=Submit value=修改 改 onclick='return checkrepass();'>
      </td>
    </tr>
  </form>
</table>
<%
end sub

sub repass()
dim shop
shop=SafeRequest("shop",1)
select case shop
'//输入用户名
case ""
response.Write "<br><table width=96% border=0 align=center cellpadding=01 cellspacing=1>"
response.Write "<form name=shop0 method=post action=profile.asp?action=repass&shop=1>"
response.Write "<tr><td height=28 bgcolor=#ffffff><div align=center>请输入您的用户名： <input name=username type=text id=username size=16></div></td></tr>"
response.Write "<tr><td height=32 bgcolor=#ffffff><div align=center><input type=submit name=Submit value=确&nbsp;定 onclick='return check0();'></div></td></tr>"
response.Write "</form></table>"
'//输入问题答案
case "1"
set rs=server.CreateObject("adodb.recordset")
rs.open "select UserQuestion,UserAnswer from [user] where username='"&trim(request.form("username"))&"' ",conn,1,1
if rs.eof and rs.bof then
response.write "<center><br>查无此用户，请返回！</center>"
else
response.Write "<br><table width=96% border=0 align=center cellpadding=1 cellspacing=1 bgcolor=#FFFFFF>"
response.Write "<form name=shop1 method=post action=profile.asp?action=repass&shop=2>"
response.Write "<tr><td width=21% bgcolor=#ffffff STYLE='PADDING-LEFT: 20px'>您的密码提问：</td><td width=79% height=28 bgcolor=#ffffff STYLE='PADDING-LEFT: 20px'><font color=red>"&trim(rs("UserQuestion"))&"</font><input type=hidden name=username1 value="&trim(request.form("username"))&" ID=Hidden></td></tr>"
response.Write "<tr><td bgcolor=#ffffff STYLE='PADDING-LEFT: 20px'>您的密码答案：</td><td height=28 bgcolor=#ffffff STYLE='PADDING-LEFT: 20px'><input name=UserAnswer type=text id=UserAnswer></td></tr>"
response.Write "<tr bgcolor=#ffffff><td height=32 colspan=2 STYLE='PADDING-LEFT: 50px'><input type=submit name=Submit2 value=确&nbsp;定 onclick='return check1();'></td></tr>"
response.Write "</form></table>"
end if
rs.close
set rs=nothing
'//输入新密码
case "2"
set rs=server.CreateObject("adodb.recordset")
rs.open "select UserAnswer from [user] where username='"&trim(request.form("username1"))&"' ",conn,1,1
'//判断答案是否正确
if trim(rs("UserAnswer"))<>md5(trim(request.form("UserAnswer"))) then
response.write "<script language=javascript>alert('对不起，您输入的问题答案不正确');history.go(-1);</script>"
response.end
else
response.Write "<br><table width=96% border=0 align=center cellpadding=1 cellspacing=1 bgcolor=#FFFFFF>"
response.Write "<form name=shop2 method=post action=saveprofile.asp?action=repass>"
response.Write "<tr><td width=20% bgcolor=#EFF5FE STYLE='PADDING-LEFT: 20px'>请输入新密码：</td><td width=80% height=28 bgcolor=#EFF5FE STYLE='PADDING-LEFT: 20px'><input name=UserPassword1 type=Password id=UserPassword1><input type=hidden name=username2 value="&trim(request.form("username1"))&"></td></tr>"
response.Write "<tr><td bgcolor=#EFF5FE STYLE='PADDING-LEFT: 20px'>输入确认密码：</td><td height=28 bgcolor=#EFF5FE STYLE='PADDING-LEFT: 20px'><input name=UserPassword2 type=Password id=UserPassword2></td></tr>"
response.Write "<tr><td height=32 colspan=2 bgcolor=#EFF5FE STYLE='PADDING-LEFT: 50px'><input type=submit name=Submit3 value=确&nbsp;定 onclick='return check2();'></td></tr>"
response.Write "</form></table>"
end if
rs.close
set rs=nothing
end select
end sub

sub statinfo()
if strUserName="" then
response.Write "<center>请先登录</center>"
response.End
end if

dim joindtm,myorder,successed,successedsum,lastorder
set rs=server.CreateObject("adodb.recordset")
rs.open "select adddate from [user] where username='"&strUserName&"'",conn,1,1
joindtm=rs("adddate")
rs.close
rs.open "select distinct(goods),actiondate from orders where username='"&strUserName&"' and state<6 ",conn,1,1
if rs.eof and rs.bof then
response.write ""
else
rs.movelast
lastorder=rs("actiondate")
myorder=rs.recordcount
end if
rs.close
rs.open "select sum(paid) as paid from orders where username='"&strUserName&"' and state<6 and state>3",conn,1,1 
if rs("paid")>0 then
successedsum=rs("paid")
else
successedsum=0
end if
rs.close
rs.open "select distinct(goods) from orders where username='"&strUserName&"' and state<6 and state>3",conn,1,1
successed=rs.recordcount
set rs=nothing %>

<table width=96% border=0 align=center cellpadding=2 cellspacing=1 bgcolor=#FFFFFF class="tableborder">
  <tr> 
    <td height=14 colspan=2 align="center" class="header"><br>
      以下是您在本站的一些历史记录的统计信息</td>
  </tr>
  <tr>
    <td height="5"></td>
  </tr>
  <tr height=14  bgcolor=#FFFFFF> 
    <td align=right height="35">注册日期：</td>
    <td width=56% height="35">&nbsp; 
      <% =joindtm %>
    </td>
  </tr>
  <tr height=14  bgcolor=#FFFFFF>
    <td align=right height="35">上次下单：</td>
    <td height="35">&nbsp; 
      <% =lastorder %>
    </td>
  </tr>
  <tr height=14  bgcolor=#FFFFFF>
    <td align=right height="35">下单次数：</td>
    <td height="35">&nbsp; 
      <% = myorder %>
      次</td>
  </tr>
  <tr height=14  bgcolor=#FFFFFF>
    <td align=right height="35">成交次数：</td>
    <td height="35">&nbsp; 
      <% =successed %>
      次</td>
  </tr>
  <tr height=14  bgcolor=#FFFFFF>
    <td align=right height="35">成交金额：</td>
    <td height="35">&nbsp; 
      <% =successedsum %>
      元</td>
  </tr>
</table>
<%
end sub

sub goods()
if strUserName="" then
response.Write "<center><center>请先登录</center></center>"
response.End
end if
%>
<table border="0" cellpadding="0" cellspacing="0" align="center" width="100%"> 
<tr><td> 
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1"> 
<tr>
          <td width="55%" align="right"><FONT COLOR=#FF6600><b>我 的 订 单</b></font></td>
<td width="49%" align="right">
<select name="state" onChange="var jmpURL=this.options[this.selectedIndex].value ; if(jmpURL!='') {window.location=jmpURL;} else {this.selectedIndex=0 ;}" > 
<option value="profile.asp?action=goods&state=0" selected>--请选择查询状态--</option> 
<option value="profile.asp?action=goods&state=0" >全部订单状态</option> 
<option value="profile.asp?action=goods&state=1" >未作任何处理</option> 
<option value="profile.asp?action=goods&state=2" >用户已划出款</option> 
<option value="profile.asp?action=goods&state=3" >服务商已收到款</option> 
<option value="profile.asp?action=goods&state=4" >服务商已发货</option> 
<option value="profile.asp?action=goods&state=5" >用户已经收到货</option> 
</select></td></tr> </table>
          
      <table width="100%" border="0" align="center" cellpadding="6" cellspacing="1" bgcolor=<%=bgclr1%> class="tableborder">
        <tr align="center"> 
          <td class="header" height="40"><font color="#006699">订单号</font></td>
          <td class="header" height="40"><font color="#006699">合计金额</font></td>
          <td class="header" height="40"><font color="#006699">积分</font></td>
          <td class="header" height="40"><font color="#006699">订货人</font></td>
          <td class="header" height="40"><font color="#006699">付款方式</font></td>
          <td class="header" height="40"><font color="#006699">收货方式</font></td>
          <td class="header" height="40"><font color="#006699">订单日期</font></td>
          <td class="header" height="40"><font color="#006699">订单状态</font></td>
        </tr>
        <%set rs=server.CreateObject("adodb.recordset")
  dim state
  state=SafeRequest("state",1)
  if state=0 or state="" then
  select case state
  case "0"
  rs.open "select distinct(goods),realname,actiondate,deliverymethord,paymethord,state from orders where username='"&strUserName&"' and state<6 order by actiondate desc",conn,1,1
  case ""
  rs.open "select distinct(goods),realname,actiondate,deliverymethord,paymethord,state from orders where username='"&strUserName&"' and state<6 order by actiondate desc",conn,1,1
  end select
  else
  rs.open "select distinct(goods),realname,actiondate,deliverymethord,paymethord,state from orders where username='"&strUserName&"' and state="&state&" order by actiondate",conn,1,1
  end if

  do while not rs.eof
   %>
        <tr bgcolor=#ffffff align="center"> 
          <% dim shop,rs2 
			set shop=server.CreateObject("adodb.recordset")
			shop.open "select sum(paid) as paid,sum(score) as score from orders where goods='"&trim(rs("goods"))&"' ",conn,1,1
				%>
          <td height="35" ><a href=# onClick="javascript:window.open('chkorder.asp?dan=<%=trim(rs("goods"))%>&score=<% = trim(shop("score")) %>','','width=98%,height=388,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');return false;"><%=trim(rs("goods"))%></a></td>
          <td height="35"> 
            <%
				set rs2=server.CreateObject("adodb.recordset")
				rs2.open "select * from delivery where deliveryid="&rs("deliverymethord"),conn,1,1
				Dim LngFee
				
		  IF webbj5 = 0 Then
		  LngFee = rs2("fee")
		  Else
		  		If shop("paid") >= webbj5 Then
				LngFee = 0
				Else
				LngFee = rs2("fee")
				End IF
		  End IF
	response.write "<font color=#FF6600>"&Round((shop("paid")*(1+rs2("payfee")/100)+LngFee),2)&"元</font>" 
	rs2.close
	set rs2=nothing %>
          </td>
          <td height="35"> 
            <% = shop("score") %>
            <%
	shop.close
	set shop=nothing
	%>
          </td>
          <td height="35"><%=trim(rs("realname"))%></td>
          <td height="35"> 
            <%set rs2=server.CreateObject("adodb.recordset")
        rs2.open "select * from delivery where deliveryid="&rs("paymethord"),conn,1,1
        response.Write trim(rs2("subject"))
        rs2.close
        set rs2=nothing%>
          </td>
          <td align="center" height="35"> 
            <%set rs2=server.CreateObject("adodb.recordset")
        rs2.open "select * from delivery where deliveryid="&rs("deliverymethord"),conn,1,1
        response.Write trim(rs2("subject"))
        rs2.close
        set rs2=nothing
        %>
          </td>
          <td height="35"><%=trim(rs("actiondate"))%></td>
          <td height="35"> 
            <%select case rs("state")
	case "1"
	response.write "未作任何处理"
	case "2"
	response.write "订单处理中"
	case "3"
	response.write "服务商收到款"
	case "4"
	response.write "服务商已发货"
	case "5"
	response.write "用户已收到货"
	end select%>
          </td>
        </tr>
        <%
   rs.movenext
  loop
  rs.close
  set rs=nothing%>
      </table>
  <%end sub
sub UserLogins()
dim url
url=Request.ServerVariables("HTTP_REFERER") %>
          <table width=30% border=0 align=center cellpadding=0 cellspacing=0 bgcolor=#FFFFFF>
            <form name=loginfo method=post action=chkuser.asp>
              <tr bgcolor=#ffffff> 
                <td width=38% height=19 align=right nowrap style='padding-left:1px'>用户 
                </td>
                <td width=62% style='padding-left:1px'><input name=username3 type=text id=username2 size=9> 
                </td>
                <td width=62% nowrap style='padding-left:1px' align="center">密 
                  码</td>
                <td width=62% style='padding-left:1px'><input name=UserPassword3 type=Password id=UserPassword3 size=10></td>
              </tr>
              <tr bgcolor=#ffffff> 
                <td height=18 style='padding-left:1px' align=right>验证 </td>
                <td style='padding-left:1px'><input name=passcode type=text id=passcode size=9></td>
                <td style='padding-left:1px'><img src="code.asp"></td>
                <td style='padding-left:1px'> <input type=submit name=Submit4 value="登录" onClick="return checkuu();">
                  &nbsp;<a href="reg.asp">注册</a> <input name=comeurl type=hidden value=<% = url %>></td>
              </tr>
            </form>
          </table>
          <%
end sub
%> </td></tr> </table>
