<!--#include file="userfunction.asp"-->
<style>
td{font-size:9pt;line-height:120%;color:#353535} 
body{font-size:9pt;line-height:120%} 

a:link          { color: #000000; text-decoration: none }
a:visited       { color: #000000; text-decoration: none }
a:active        { color: #000000; text-decoration: none }
a:hover         { color: #336699; text-decoration: none; position: relative; right: 0px; top: 1px }
</style>
<%
'////////////////////////我的收藏架
sub shoucang()
if request.cookies("bookshop")("username")="" then
response.Redirect "myuser.asp?action=login"
response.End
end if
set rs=server.CreateObject("adodb.recordset")
rs.open "select shop_action.actionid,shop_action.bookid,shop_books.bookname,shop_books.shichangjia,shop_books.huiyuanjia,shop_books.dazhe from shop_books inner join  shop_action on shop_books.bookid=shop_action.bookid where shop_action.username='"&request.cookies("bookshop")("username")&"' and shop_action.zhuangtai=6",conn,1,1 
'//html
response.write "<table width=96% border=0 align=center cellpadding=1 cellspacing=1 bgcolor=#FFFFFF>"
if action="shoucang" then '判断表单是否另开窗口,在用户界面中需要另开窗口
response.write "<form action='shopping.asp' target=ckxp onsubmit=""javascript:window.open('','snsn','width=632,height=388,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');"">"
else
response.write "<form name='form1' method='post' action=shopping.asp>"
end if
response.write "<tr><td width=7% bgcolor=#5F95D3><div align=center><font color=#FFFFFF>选 择</font></div></td>"
response.Write "<td width=45% bgcolor=#5F95D3><div align=center><font color=#FFFFFF>商品名称</font></div></td>"
response.Write "<td width=14% bgcolor=#5F95D3><div align=center><font color=#FFFFFF>市场价</font></div></td>"
response.Write "<td width=13% bgcolor=#5F95D3><div align=center><font color=#FFFFFF>会员价</font></div></td>"
response.Write "<td width=12% bgcolor=#5F95D3><div align=center><font color=#FFFFFF>折 扣</font></div></td>"
response.Write "<td width=9% bgcolor=#5F95D3><div align=center><font color=#FFFFFF>删 除</font></div></td></tr>"
do while not rs.eof
response.write "<tr><td bgcolor=#EFF5FE><div align=center><input name=bookid type=checkbox checked value="&rs("bookid")&" ></div></td>"
response.write "<td bgcolor=#EFF5FE STYLE='PADDING-LEFT: 5px'><div align=left><a href=book.asp?id="&rs("bookid")&" target=_blank>"&rs("bookname")&"</a></div></td>"		  
response.write "<td bgcolor=#EFF5FE><div align=center>"&formatnumber(rs("shichangjia"),2)&"元</div></td>"	
response.write "<td bgcolor=#EFF5FE><div align=center><font color=#FF6600>"&formatnumber(rs("huiyuanjia"),2)&"元</font></div></td>"
response.write "<td bgcolor=#EFF5FE><div align=center>"&formatnumber(rs("dazhe")*100,2)&"%</div></td>"
response.write "<td bgcolor=#EFF5FE><div align=center>"
'//判断所在页面
if action<>"shoucang" then
response.Write "<a href=shoucang.asp?action=del&actionid="&rs("actionid")&">"
else
response.Write "<a href=shoucang.asp?action=del&actionid="&rs("actionid")&"&ll=22>"  '这里是在用户页面做删除动作，来区别删除后的返回位置！
end if
'/////
response.Write "<img src=images/trash.gif width=15 height=17 border=0></a></div></td></tr>"
rs.movenext
loop
rs.close
set rs=nothing
response.write "<tr><td height=36 colspan=6 bgcolor=#EFF5FE><div align=center><input type=submit name=Submit  value=去下订单 >&nbsp;&nbsp;&nbsp;&nbsp;"
if action<>"shoucang" then
response.write "<input type=button name=Submit2 value=继续采购 onclick=javascript:window.close()>"
end if
response.write "</div></td></tr></form></table>"
end sub
%>
<%'////////////////////////收货人资料
sub shouhuoxx()
dim rs2
if request.cookies("bookshop")("username")="" then
response.Redirect "myuser.asp?action=login"
response.End
end if
set rs=server.CreateObject("adodb.recordset")
rs.open "select shouname,shouname,shengshi,shouhuodizhi,youbian,usertel,songhuofangshi,zhifufangshi from [user] where username='"&request.cookies("bookshop")("username")&"' ",conn,1,1
response.Write "<table width=96% border=0 align=center cellpadding=1 cellspacing=1 bgcolor=#FFFFFF>"
response.Write "<form name=shouhuoxx method=post action=saveuserinfo.asp?action=shouhuoxx>"
response.Write "<tr bgcolor=#5F95D3><td height=15 colspan=2><div align=center><font color=#FFFFFF>请您仔细填写以下收货人的信息，以便所购买的商品能够及时投递。</font></div></td></tr>"
response.Write "<tr><td width=18% height=16 bgcolor=#EFF5FE STYLE='PADDING-LEFT: 20px'>收货人姓名：</td>"
response.Write "<td width=82% height=28 bgcolor=#EFF5FE STYLE='PADDING-LEFT: 20px'><input name=shouname type=text id=shouname size=12 value="&trim(rs("shouname"))&"> &nbsp;&nbsp;&nbsp;性 &nbsp;别： <select name=shousex ID=Select1><option value=0 selected>男</option><option value=1>女</option></select></td></tr>"
response.write "<tr><td height=16 bgcolor=#EFF5FE STYLE='PADDING-LEFT: 20px'>收货人省/市</td><td height=28 bgcolor=#EFF5FE STYLE='PADDING-LEFT: 20px'><input name=shengshi type=text id=shengshi value="&trim(rs("shengshi"))&"></td></tr>"
response.Write "<tr><td height=16 bgcolor=#EFF5FE STYLE='PADDING-LEFT: 20px'>详细地址：</td><td height=28 bgcolor=#EFF5FE STYLE='PADDING-LEFT: 20px'><input name=shouhuodizhi type=text id=shouhuodizhi size=40 value="&trim(rs("shouhuodizhi"))&"></td></tr>"
response.Write "<tr><td height=16 bgcolor=#EFF5FE STYLE='PADDING-LEFT: 20px'>邮编：</td><td height=28 bgcolor=#EFF5FE STYLE='PADDING-LEFT: 20px'><input name=youbian type=text id=youbian value="&cstr(rs("youbian"))&"></td></tr>"
response.Write "<tr><td height=17 bgcolor=#EFF5FE STYLE='PADDING-LEFT: 20px'>电话：</td><td height=28 bgcolor=#EFF5FE STYLE='PADDING-LEFT: 20px'><input name=usertel type=text id=usertel value="&trim(rs("usertel"))&"></td></tr>"
response.Write "<tr><td height=46 bgcolor=#EFF5FE STYLE='PADDING-LEFT: 20px'>送货方式：</td><td height=46 bgcolor=#EFF5FE STYLE='PADDING-LEFT: 20px'><select name=songhuofangshi size=3 id=songhuofangshi>"
'////////////送货方式
set rs2=server.CreateObject("adodb.recordset")
rs2.open "select * from shop_songhuo where fangshi=0 order by songidorder",conn,1,1
do while not rs2.EOF
response.Write "<option value="&rs2("songid")&">"&trim(rs2("subject"))&"</option>"
rs2.MoveNext
loop
rs2.Close
response.Write "</select></td></tr>"
response.Write "<tr><td height=58 bgcolor=#EFF5FE STYLE='PADDING-LEFT: 20px'>支付方式：</td><td height=58 bgcolor=#EFF5FE STYLE='PADDING-LEFT: 20px'><select name=zhifufangshi size=3 id=zhifufangshi>"
'////////////支付方式
rs2.Open "select * from shop_songhuo where fangshi=1 order by songidorder",conn,1,1
do while not rs2.EOF
response.Write "<option value="&rs2("songid")&">"&trim(rs2("subject"))&"</option>"
rs2.MoveNext
loop
rs2.Close
set rs2=nothing
response.Write "</select></td></tr>"
response.Write "<tr bgcolor=#EFF5FE><td height=32 colspan=2 ><div align=center><input type=submit name=Submit value=提交保存 onclick='return checkshouhuoxx();'></div></td></tr>"
response.Write "</form></table>"
rs.close
set rs=nothing
end sub
'////////////////////////暂存款查询
sub zhancunkuan()
if request.cookies("bookshop")("username")="" then
response.Redirect "myuser.asp?action=login"
response.End
end if
set rs=server.CreateObject("adodb.recordset")
rs.open "select xbjq from [user] where username='"&request.cookies("bookshop")("username")&"' ",conn,1,1
response.Write "<table width=96% border=0 align=center cellpadding=1 cellspacing=1 bgcolor=#FFFFFF>"
response.Write "<form name=userinfo method=post action=saveuserinfo.asp?action=zhancunkuan>"
response.Write "<br><table width=96% border=0 align=center cellpadding=1 cellspacing=1>"
response.Write "<tr><td width=7% height=16 bgcolor=#EFF5FE STYLE='PADDING-LEFT: 20px'><font color=#FF3300>★</font></td><td width=93% bgcolor=#EFF5FE STYLE='PADDING-LEFT: 10px'>您目前的暂存款金额为：<font color=#FF6600>"&rs("xbjq")&"</font>元（人民币）</td></tr>"
response.Write "<tr><td height=16 bgcolor=#EFF5FE STYLE='PADDING-LEFT: 20px'><font color=#FF3300>★</font></td><td bgcolor=#EFF5FE STYLE='PADDING-LEFT: 10px'>退款记录</td></tr>"
response.Write "<tr><td height=16 bgcolor=#EFF5FE STYLE='PADDING-LEFT: 10px'>&nbsp;</td><td bgcolor=#EFF5FE STYLE='PADDING-LEFT: 10px'><font color=#FF3300></font></td></tr>"
response.Write "</table>"
end sub
'////////////////////////我的购物券
sub gouwujuan()
if request.cookies("bookshop")("username")="" then
response.Redirect "myuser.asp?action=login"
response.End
end if
response.Write "<table width=96% border=0 align=center cellpadding=1 cellspacing=1 bgcolor=#FFFFFF>"
response.Write "<tr bgcolor=#FFFFFF><td colspan=2 STYLE='PADDING-LEFT: 20px'><font color=#FF3300>★</font> &nbsp;您现在共有 <font color=#FF3300>0</font> 张购物券。总计金额 <font color=#FF3300>0</font> 元。</td></tr>"
response.Write "<tr><td width=24% bgcolor=#EFF5FE><div align=center>购物券编号</div></td><td width=76% bgcolor=#EFF5FE><div align=center>购物券金额</div></td></tr>"
response.Write "<tr><td bgcolor=#EFF5FE>&nbsp;</td><td bgcolor=#EFF5FE>&nbsp;</td></tr>"
response.Write "<tr><td colspan=2 bgcolor=#EFF5FE><div align=center><font color=#FF3300>对不起，目前还不支持此功能！请及时关注版本信息</font></div></td></tr>"
response.Write "</table>"
end sub
'////////////////////////用户个人资料
sub userziliao()
if request.cookies("bookshop")("username")="" then
response.Redirect "myuser.asp?action=login"
response.End
end if
set rs=server.CreateObject("adodb.recordset")
rs.open "select useremail,quesion,userzhenshiname from [user] where username='"&request.cookies("bookshop")("username")&"' ",conn,1,1
response.Write "<table width=96% border=0 align=center cellpadding=1 cellspacing=1 bgcolor=#FFFFFF>"
response.Write "<form name=userinfo method=post action=saveuserinfo.asp?action=userziliao>"
response.Write "<tr><td bgcolor=#5F95D3><div align=center><font color=#FFFFFF>尊敬的用户，我们向您承诺：以下信息将被严格保密，绝对不提供给第三方或用作它用。</font></div></td></tr>"
response.Write "<tr><td height=28 bgcolor=#EFF5FE STYLE='PADDING-LEFT: 70px'>用 户 名： <font color=#FF6600>"&request.cookies("bookshop")("username")&"</font></td></tr>"
response.Write "<tr><td height=28 bgcolor=#EFF5FE STYLE='PADDING-LEFT: 70px'>E-Mail&nbsp;&nbsp; ： <input name=useremail type=text id=useremail2 value="&trim(rs("useremail"))&"></td></tr>"
response.Write "<tr><td height=28 bgcolor=#EFF5FE STYLE='PADDING-LEFT: 70px'>真实姓名： <input name=userzhenshiname type=text id=userzhenshiname value="&trim(rs("userzhenshiname"))&"></td></tr>"
response.Write "<tr><td height=28 bgcolor=#EFF5FE STYLE='PADDING-LEFT: 70px'>密码提问： <input name=quesion type=text id=quesion value="&trim(rs("quesion"))&">(用于密码遗忘时使用)</td></tr>"
response.Write "<tr><td height=28 bgcolor=#EFF5FE STYLE='PADDING-LEFT: 70px'>密码答案： <input name=answer type=text id=answer>(密码遗忘时将验证此答案)</td></tr>"
response.Write "<tr><td height=32 bgcolor=#EFF5FE STYLE='PADDING-LEFT: 70px'><input type=submit name=Submit2 value=提交保存 onclick='return checkuserinfo();'></td></tr>"
response.Write "</form></table>"
rs.close
set rs=nothing
end sub
'////////////////////////用户修改密码
sub savepass()
if request.cookies("bookshop")("username")="" then
response.Redirect "myuser.asp?action=login"
response.End
end if
response.write "<br><table width=96% border=0 align=center cellpadding=1 cellspacing=1 bgcolor=#FFFFFF>"
response.Write "<form name=userpass method=post action=saveuserinfo.asp?action=savepass>"
response.Write "<tr><td width=16% bgcolor=#EFF5FE STYLE='PADDING-LEFT: 20px'>用户名：</td><td width=84% bgcolor=#EFF5FE STYLE='PADDING-LEFT: 20px'><font color=#FF6600>"&request.cookies("bookshop")("username")&"</font></td></tr>"
response.Write "<tr><td bgcolor=#EFF5FE STYLE='PADDING-LEFT: 20px'>原密码：</td><td bgcolor=#EFF5FE STYLE='PADDING-LEFT: 20px'><input name=userpassword type=password id=userpassword></td></tr>" 
response.Write "<tr><td bgcolor=#EFF5FE STYLE='PADDING-LEFT: 20px'>新密码：</td><td bgcolor=#EFF5FE STYLE='PADDING-LEFT: 20px'><input name=userpassword1 type=password id=userpassword1></td></tr>"
response.Write "<tr><td bgcolor=#EFF5FE STYLE='PADDING-LEFT: 20px'>确认密码：</td><td 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=Submit value=确认修改 onclick='return checkrepass();'></td></tr>"
response.Write "</form></table>"
end sub
'////////////////////////取回密码
sub repass()
dim ckxp
ckxp=request.QueryString("ckxp")
select case ckxp
'//输入用户名
case ""
response.Write "<br><table width=96% border=0 align=center cellpadding=01 cellspacing=1>"
response.Write "<form name=ckxp0 method=post action=myuser.asp?action=repass&ckxp=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 quesion,answer from [user] where username='"&trim(request("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=ckxp1 method=post action=myuser.asp?action=repass&ckxp=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("quesion"))&"</font><input type=hidden name=username1 value="&trim(request("username"))&" ID=Hidden1></td></tr>"
response.Write "<tr><td bgcolor=#ffffff STYLE='PADDING-LEFT: 20px'>您的密码答案：</td><td height=28 bgcolor=#ffffff STYLE='PADDING-LEFT: 20px'><input name=answer type=text id=answer></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 answer from [user] where username='"&trim(request("username1"))&"' ",conn,1,1
'//判断答案是否正确
if trim(rs("answer"))<>md5(trim(request("answer"))) 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=ckxp2 method=post action=saveuserinfo.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("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 request.cookies("bookshop")("username")="" then
response.Redirect "myuser.asp?action=login"
response.End
end if
'//添加到数据库
dim zhucedate,xiadan,chengjiao,chengjiaozonger,lastxiadan
set rs=server.CreateObject("adodb.recordset")
rs.open "select adddate from [user] where username='"&request.cookies("bookshop")("username")&"'",conn,1,1
zhucedate=rs("adddate")
rs.close
rs.open "select distinct(dingdan),actiondate from shop_action where username='"&request.cookies("bookshop")("username")&"' and zhuangtai<6 ",conn,1,1
if rs.eof and rs.bof then
response.write ""
else
rs.movelast
lastxiadan=rs("actiondate")
xiadan=rs.recordcount
end if
rs.close
rs.open "select sum(zonger) as zonger from shop_action where username='"&request.cookies("bookshop")("username")&"' and zhuangtai<6 and zhuangtai>3",conn,1,1 
if rs("zonger")>0 then
chengjiaozonger=formatnumber(rs("zonger"),2)
else
chengjiaozonger=0
end if
rs.close
rs.open "select distinct(dingdan) from shop_action where username='"&request.cookies("bookshop")("username")&"' and zhuangtai<6 and zhuangtai>3",conn,1,1
chengjiao=rs.recordcount
set rs=nothing
'//HTML显视
response.Write "<table width=96% border=0 align=center cellpadding=2 cellspacing=1 bgcolor=#FFFFFF>"
response.Write "<tr><td height=14 colspan=2>以下是您在本站的一些历史记录的统计信息</td></tr>"
response.Write "<tr><td width=22% height=14 bgcolor=#EFF5FE><div align=right>会员注册日期：</div></td><td width=78% bgcolor=#EFF5FE>&nbsp;"&zhucedate&"</td></tr>"
response.Write "<tr><td height=14 bgcolor=#EFF5FE><div align=right>下单次数：</div></td><td bgcolor=#EFF5FE>&nbsp;"&xiadan&"次</td></tr>"
response.Write "<tr><td height=14 bgcolor=#EFF5FE><div align=right>成交次数：</div></td><td bgcolor=#EFF5FE>&nbsp;"&chengjiao&"次</td></tr>"
response.Write "<tr><td height=14 bgcolor=#EFF5FE><div align=right>成交订单总金额：</div></td><td bgcolor=#EFF5FE>&nbsp;"&chengjiaozonger&"元</td></tr>"
response.Write "<tr><td height=14 bgcolor=#EFF5FE><div align=right>上一次下单时间：</div></td><td bgcolor=#EFF5FE>&nbsp;"&lastxiadan&"</td></tr>"
response.Write "<tr><td height=14 bgcolor=#EFF5FE><div align=right>暂存款总计：</div></td><td bgcolor=#EFF5FE>0.00元</td></tr>"
response.Write "<tr><td height=14 bgcolor=#EFF5FE><div align=right>是否订阅本站最新商品信息：</div></td><td bgcolor=#EFF5FE>暂不支持此功能</td></tr>"
response.Write "</table>"
end sub
'//////////////////////////订单查讯
sub dingdan()
if request.cookies("bookshop")("username")="" then
response.Redirect "myuser.asp?action=login"
response.End
end if
%>
<table width="770" border="1" cellspacing="0" cellpadding="1" bordercolor="#75A3D0" align="center">
  <tr> 
    <td> 
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td rowspan="2"> 
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="12v">
              <tr> 
                <td class="12v" > 
                  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" id="AutoNumber3" height="0" width="100%">
                    <tr> 
                      <td> 
                        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1">
                          <tr> 
                            <td width="55%"> 
                              <div align="right"><font color="#FF6600">我 的 订 单</font></div>
                            </td>
                            <td width="49%"> 
                              <div align="right"> 
                                <select name="zhuangtai" onChange="var jmpURL=this.options[this.selectedIndex].value ; if(jmpURL!='') {window.location=jmpURL;} else {this.selectedIndex=0 ;}" >
                                  <option value="myuser.asp?action=dingdan&zhuangtai=0" selected>--请选择查讯状态--</option>
                                  <option value="myuser.asp?action=dingdan&zhuangtai=0" >全部订单状态</option>
                                  <option value="myuser.asp?action=dingdan&zhuangtai=1" >未作任何处理</option>
                                  <option value="myuser.asp?action=dingdan&zhuangtai=2" >用户已经划出款</option>
                                  <option value="myuser.asp?action=dingdan&zhuangtai=3" >服务商已经收到款</option>
                                  <option value="myuser.asp?action=dingdan&zhuangtai=4" >服务商已经发货</option>
                                  <option value="myuser.asp?action=dingdan&zhuangtai=5" >用户已经收到货</option>
                                </select>
                              </div>
                            </td>
                          </tr>
                        </table>
                        <table width="100%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF">
                          <tr> 
                            <td bgcolor="#5F95D3"> 
                              <div align="center"><font color="#FFFFFF">订单号</font></div>
                            </td>
                            <td bgcolor="#5F95D3"> 
                              <div align="center"><font color="#FFFFFF">合计金额</font></div>
                            </td>
                            <td bgcolor="#5F95D3"> 
                              <div align="center"><font color="#FFFFFF">收货人</font></div>
                            </td>
                            <td bgcolor="#5F95D3"> 
                              <div align="center"><font color="#FFFFFF">订货人</font></div>
                            </td>
                            <td bgcolor="#5F95D3"> 
                              <div align="center"><font color="#FFFFFF">付款方式</font></div>
                            </td>
                            <td bgcolor="#5F95D3"> 
                              <div align="center"><font color="#FFFFFF">收货方式</font></div>
                            </td>
                            <td bgcolor="#5F95D3"> 
                              <div align="center"><font color="#FFFFFF">订单状态</font></div>
                            </td>
                          </tr>
                          <%set rs=server.CreateObject("adodb.recordset")
  dim zhuangtai
  zhuangtai=request.QueryString("zhuangtai")
  if zhuangtai=0 or zhuangtai="" then
  select case zhuangtai
  case "0"
  rs.open "select distinct(dingdan),userzhenshiname,actiondate,shouhuoname,songhuofangshi,zhifufangshi,zhuangtai from shop_action where username='"&request.cookies("bookshop")("username")&"' and zhuangtai<6 order by actiondate desc",conn,1,1
  case ""
  rs.open "select distinct(dingdan),userzhenshiname,actiondate,shouhuoname,songhuofangshi,zhifufangshi,zhuangtai from shop_action where username='"&request.cookies("bookshop")("username")&"' and zhuangtai<5 order by actiondate desc",conn,1,1
  end select
  else
  rs.open "select distinct(dingdan),userzhenshiname,actiondate,shouhuoname,songhuofangshi,zhifufangshi,zhuangtai from shop_action where username='"&request.cookies("bookshop")("username")&"' and zhuangtai="&zhuangtai&" order by actiondate",conn,1,1
  end if

  do while not rs.eof

   %>
                          <tr> 
                            <td bgcolor="#EFF5FE"> 
                              <div align="center"><a href=# onClick="javascript:window.open('dingdan.asp?dan=<%=trim(rs("dingdan"))%>','','width=710,height=388,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');return false;"><%=trim(rs("dingdan"))%></a></div>
                            </td>
                            <td bgcolor="#EFF5FE"> 
                              <div align="center"> 
                                <%dim ckxp,rs2
	'////判断送货方式要加收的金额
	set rs2=server.CreateObject("adodb.recordset")
	rs2.open "select * from shop_songhuo where songid="&rs("songhuofangshi"),conn,1,1
	set ckxp=server.CreateObject("adodb.recordset")
	ckxp.open "select sum(zonger) as zonger from shop_action where dingdan='"&trim(rs("dingdan"))&"' ",conn,1,1
	response.write "<font color=#FF6600>"&formatnumber(ckxp("zonger")+rs2("jsmoney"),2)&"元</font>"
	ckxp.close
	set ckxp=nothing
	rs2.close
	set rs2=nothing%>
                              </div>
                            </td>
                            <td bgcolor="#EFF5FE"> 
                              <div align="center"><%=trim(rs("shouhuoname"))%></div>
                            </td>
                            <td bgcolor="#EFF5FE"> 
                              <div align="center"><%=trim(rs("userzhenshiname"))%></div>
                            </td>
                            <td bgcolor="#EFF5FE"> 
                              <div align="center"> 
                                <%set rs2=server.CreateObject("adodb.recordset")
        rs2.open "select * from shop_songhuo where songid="&rs("zhifufangshi"),conn,1,1
        response.Write trim(rs2("subject"))
        rs2.close
        set rs2=nothing%>
                              </div>
                            </td>
                            <td bgcolor="#EFF5FE"> 
                              <div align="center"> 
                                <%set rs2=server.CreateObject("adodb.recordset")
        rs2.open "select * from shop_songhuo where songid="&rs("songhuofangshi"),conn,1,1
        response.Write trim(rs2("subject"))
        rs2.close
        set rs2=nothing
        %>
                              </div>
                            </td>
                            <td bgcolor="#EFF5FE"> 
                              <div align="center"> 
                                <%select case rs("zhuangtai")
	case "1"
	response.write "未作任何处理"
	case "2"
	response.write "用户已经划出款"
	case "3"
	response.write "服务商已经收到款"
	case "4"
	response.write "服务商已经发货"
	case "5"
	response.write "用户已经收到货"
	end select%>
                              </div>
                            </td>
                          </tr>
                          <%
   rs.movenext
  loop
  rs.close
  set rs=nothing%>
                        </table>
                        <%end sub
'////////////////////////用户登陆
sub logins()
dim url
url=Request.ServerVariables("HTTP_REFERER")
response.write "<table width=56% border=0 align=center cellpadding=1 cellspacing=1 bgcolor=#FFFFFF>"
response.write "<form name=loginfo method=post action=chkuser.asp>"
response.write "<tr bgcolor=#ffffff><td width=27% height=19 style='padding-left:6px'><div align=right>用户名：</div></td><td width=73% style='padding-left:6px'><input name=username type=text id=username size=12><input name=comeurl type=hidden value="&url&">&nbsp;<a href=reg.asp>还没有注册？</a></td></tr>"
response.write "<tr bgcolor=#ffffff><td height=18 style='padding-left:6px'><div align=right>密 &nbsp;码：</div></td><td style='padding-left:6px'><input name=userpassword type=password id=password size=12>&nbsp;<a href=myuser.asp?action=repass>忘记密码？</a></td></tr>"
response.write "<tr bgcolor=#ffffff><td height=28 colspan=2 style='padding-left:6px'><div align=center><input type=submit name=Submit value=登陆系统 onClick='return checkuu();'></div></td></tr>"
response.write "</form></table>"
end sub
%>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
