<!--#include file="conn.asp"-->
<%
dim bookid
bookid=request("bookid")
if bookid<>"" then
if not isnumeric(bookid) then 
response.write"<script>alert(""非法访问!"");window.close();</script>"
response.end
end if
end if

'//商品，判断是否存在
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from card where bookid="&bookid&" and used=0 " ,conn,1,1
if rs.eof And rs.bof then
response.write "<script language=javascript>alert('你选购的商品暂时缺货不能放到购物车里，请选购其它商品！');window.close();</script>"
response.end
end if
%>
<!--#include file="webconfig.asp"-->
<html><head><title><%=webname%>--我的购物车</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/css.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!--#include file="webtop.asp"-->

<table width=760 align=center border=0 cellspacing=0 cellpadding=0 class=table-zuoyou bordercolor=#CCCCCC><tr><td background=images/class_bg.jpg height=50 class=table-shangxia>　<img src=images/ring02.gif align=absmiddle> <a href=index.asp><%=webname%></a> >> 在线取卡</td>
</tr></table>
<%set rs=server.CreateObject("adodb.recordset")
rs.open "select * from shop_books where bookid="&bookid,conn,1,1
if rs.eof And rs.bof then
response.write "<script language=javascript>alert('你选购的商品暂时缺货不能放到购物车里，请选购其它商品！');window.close();</script>"
response.end
end if
if request.Cookies("bjx")("reglx")=2 then 
danjia=formatnumber(rs("vipjia"),2,true)
else
danjia=formatnumber(rs("huiyuanjia"),2,true)
end if 
%>
<table width="760" align="center" border="0" cellspacing="0" cellpadding="0" class="table-zuoyou" bordercolor="#CCCCCC">
<tr><td bgColor=#ffffff colSpan=4 height=1></TD></tr>
<form name='form1' method='post' action="getcard3.asp">
<tr bgcolor=#f1f1f1 align=center> 
<td width=20% height="30">商品名称</td>	  
<td width=27%>单价</td>
<td width=28%>数量</td>
<td width=25%>总价格</td>
</tr>
<tr><td bgColor=#cccccc colSpan=4 height=1></TD></tr>
<tr><td bgColor=#f1f1f1 colSpan=4 height=3></TD></tr>
<tr bgcolor="#FFFFFF">
<td height="30" width="20%" class="table-xia">
	  <div align="center"><a href=list.asp?id=<%=rs("bookid")%> ><%=rs("bookname")%></a> 
            <input name=bookid type=hidden value="<%=rs("bookid")%>">
      </div></td>
      <td width="27%" height="30" align="center" class="table-xia">
	  <%=danjia%>
	元
	<input name=danjia type=hidden id="danjia" value="<%=danjia%>"></td>
	<td align="center" width="28%" height="30" class="table-xia">
	  <%=request("bookcount")%>      <input name=bookcount type=hidden id="bookcount" value="<%=request("bookcount")%>">	</td>
	<td align="center" width="25%" class="table-xia"><%=formatnumber(request("bookcount")*danjia,2,true)%></td>
</tr>
	<tr bgcolor="#FFFFFF">
	<td height=30 colspan=4 align=center class=table-xia>
<%
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from [user] where username='"&request.Cookies("bjx")("username")&"'",conn,1,1
if not(rs.eof And rs.bof) then
userid=rs("userid")
userzhenshiname=rs("userzhenshiname")
sex=rs("sex")
shouhuodizhi=rs("shouhuodizhi")
youbian=rs("youbian")
usertel=rs("usertel")
useremail=rs("useremail")
end if
%>
	<table width="98%" align="center" border="0" cellspacing="0" cellpadding="0" class="table-zuoyou" bordercolor="#CCCCCC">
      <tr>
        <td bgColor=#ffffff colSpan=2 height=1></TD>
      </tr>
      <tr bgcolor="#ffffff">
        <td bgColor="#f1f1f1" colspan="2" height="30" align="center">请正确填写以下收货信息</td>
      </tr>
      <tr>
        <td bgColor=#cccccc colSpan=2 height=1></TD>
      </tr>
      <tr>
        <td bgColor=#f1f1f1 colSpan=2 height=3></TD>
      </tr>
      <tr bgcolor="#ffffff">
        <td width="30%" height="30" align="right" class="table-xia">收货人真实姓名：</td>
        <td width="70%" height="30" style="PADDING-LEFT: 20px" class="table-xia">
            <input name="userzhenshiname" class="wenbenkuang" type="text" id="userzhenshiname" size="16" value=<%=userzhenshiname%>>
      性别：
      <select class="wenbenkuang" name="sex" id="sex">
        <option value=1 <%if sex="1" then%>selected<%end if%>>男</option>
        <option value=2 <%if sex="0" then%>selected<%end if%>>女</option>
        <option value=0 <%if sex="2" then%>selected<%end if%>>保密</option>
      </select>
        </td>
      </tr>
      <tr bgcolor="#ffffff">
        <td width="30%" height="30" align="right" class="table-xia">详细地址：</td>
        <td width="70%" height="30" style="PADDING-LEFT: 20px" class="table-xia"><input class="wenbenkuang" name="shouhuodizhi" type="text" id="shouhuodizhi" size="50" value=<%=shouhuodizhi%>>
        </td>
      </tr>
      <tr bgcolor="#ffffff">
        <td width="30%" height="30" align="right" class="table-xia">邮政编码：</td>
        <td width="70%" height="30" style="PADDING-LEFT: 20px" class="table-xia"><input class="wenbenkuang" name="youbian" type="text" id="youbian" size="16" value="<%=youbian%>" ONKEYPRESS="event.returnValue=IsDigit();"></td>
      </tr>
      <tr bgcolor="#ffffff">
        <td width="30%" height="30" align="right" class="table-xia">联系电话：</td>
        <td width="70%" height="30" style="PADDING-LEFT: 20px" class="table-xia"><input class="wenbenkuang" name="usertel" type="text" id="usertel2" size="16" value=<%=usertel%>></td>
      </tr>
      <tr bgcolor="#ffffff">
        <td width="30%" height="30" align="right" class="table-xia">电子邮件：</td>
        <td width="70%" height="30" style="PADDING-LEFT: 20px" class="table-xia"><input class="wenbenkuang" name="useremail" type="text" id="useremail" size="30" value=<%=useremail%>>
          <input name="userid" type="hidden" id="userid" value="<%=userid%>">
</td>
      </tr>
    </table>
	</td>
	</tr>
    <tr bgcolor="#FFFFFF"> 
      <td align="center" height=50 colspan=4><input type="submit" name="Submit" value=" 下 一 步 "> 
      </td>
    </tr>
    <tr bgcolor="#FFFFFF">
	  <td colspan="4" STYLE="PADDING-LEFT: 20px">&nbsp;</td>
	</tr>
</form>
</table>
<!--#include file="service.asp"-->
<!--#include file="copyright.asp"-->
</body>
</html>