⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vieworderform.asp

📁 一个ASP做的购物车
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="../webconfig.asp"-->
<!--#include file="session3.asp"-->
<html>
<head>
<title>订单信息</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<%dim dingdan,username,yucun
	dingdan=request.QueryString("dan")
	username=request.QueryString("username")
	'------------得到用户预款---------------
	dim cnhww
	set cnhww=server.CreateObject("adodb.recordset")
	cnhww.open "select * from [wq_user] where username="&"username",conn,1,1
	if cnhww.eof and cnhww.bof then
   yucun="错误"
   	 else
	yucun=trim(cnhww("yucun"))
	 end if
	cnhww.close
	set cnhww=nothing
	'---------得到订单相关信----------------
	set rs=server.CreateObject("adodb.recordset")
	rs.open "select wq_books.bookid,wq_books.bookname,wq_books.shichangjia,wq_books.huiyuanjia,wq_action.actiondate,wq_action.shousex,wq_action.userzhenshiname,wq_books.shjiaid,wq_action.shouhuoname,wq_action.dingdan,wq_action.youbian,wq_action.liuyan,wq_action.zhifufangshi,wq_action.songhuofangshi,wq_action.zhuangtai,wq_action.zonger,wq_action.useremail,wq_action.usertel,wq_action.shouhuodizhi,wq_action.bookcount,wq_action.danjia,wq_action.fapiao,wq_action.feiyong from wq_books inner join wq_action on wq_books.bookid=wq_action.bookid where wq_action.username='"&username&"' and dingdan='"&dingdan&"' ",conn,1,1
	if rs.eof and rs.bof then
	response.write "<center>此订单中有商品被管理员删除,无法进行正确计算。<br>订单取消,请手动删除此订单! "
	response.write "<input type=button name=Submit3 value=删除订单 onClick=""location.href='saveorderform.asp?action=del&dan="&dingdan&"&username="&username&"'""> </center>"
	response.End
	end if
%>
                        
<table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF">
  <tr class="forumRowHighlight"> 
    <td colspan="2"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <th class="tableHeaderText" colspan=2 width="70%"> 订单号:<%=dingdan%> </th>
          <th class="tableHeaderText" colspan=2 width="30%"><a href="javascript:window.print()">打印此订单</a></th>
        </tr>
      </table></td>
  </tr>
  <tr> 
    <td class="forumRowHighlight">订单状态:</td>
    <td width="87%" class="forumRowHighlight">
	 <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <form name="form1" method="post" action="SaveOrderform.asp?dan=<%=dingdan%>&action=save&username=<%=username%>">
            <td align="center" > <%zhuang()%> <br> <input type="image" border="0" name="submit" src="../images/ddzt.gif" width="84" height="18" > 
              <br> <br>
              前台用户先选择“用户已经划出款”后,管理员才可以进行后边的操作!否则会显示“用户已经汇款”!!!</td>
          </form>
        </tr>
      </table></td>
  </tr>
  <tr> 
    <td width="13%"  class="forumRowHighlight">商品列表:</td>
    <td  class="forumRowHighlight">
	 <table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
        <tr> 
          <td align="center"  class="forumRowHighlight">商品名称</td>
          <td align="center" class="forumRowHighlight">订购数量</td>
          <td align="center" class="forumRowHighlight"> 价格</td>
          <td align="center" class="forumRowHighlight">金额</td>
        </tr>
        <%zongji=0
									do while not rs.eof%>
        <tr> 
          <td align="center" class="forumRowHighlight" style='PADDING-LEFT: 5px'><a href=../list.asp?id=<%=rs("bookid")%> target=_blank><%=trim(rs("bookname"))%></a></td>
          <td align="center" class="forumRowHighlight"><%=rs("bookcount")%></td>
          <td align="center" class="forumRowHighlight"><%=rs("danjia")&"元"%></td>
          <td align="center" class="forumRowHighlight"><%=rs("zonger")&"元"%></td>
        </tr>
        <%zongji=rs("zonger")+zongji
								feiyong=rs("feiyong")
								rs.movenext
								loop
								rs.movefirst%>
      </table></td>
  </tr>
  <%set cnhww=server.CreateObject("adodb.recordset")
								cnhww.open "select * from wq_action_jp where username='"&username&"' and dingdan='"&dingdan&"'",conn,1,1
								if cnhww.recordcount>0 then%>
  <tr> 
    <td width="13%" class="forumRowHighlight" >奖品列表:</td>
    <td class="forumRowHighlight"> <table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC" >
        <tr> 
          <td height="13" align="center" class="forumRowHighlight"> 奖品名称</td>
          <td height="13" align="center" class="forumRowHighlight">所用积分</td>
        </tr>
        <%while not cnhww.eof%>
        <tr> 
          <%
										set cnhww1=server.CreateObject("adodb.recordset")
										cnhww1.open "select * from wq_award where bookid="&cnhww("bookid"),conn,1,1
										if cnhww1.recordcount=1 then
										%>
          <td height="22" align="center" class="forumRowHighlight"><a href=../list_award.asp?id=<%=cnhww("bookid")%> target=_blank><%=trim(cnhww1("bookname"))%></a></td>
          <%end if
										cnhww1.close
										set cnhww1=nothing%>
          <td align="center" class="forumRowHighlight"><%=cnhww("point")%></td>
        </tr>
        <%cnhww.movenext
									wend%>
      </table></td>
  </tr>
  <%end if
								cnhww.close
								set cnhww=nothing%>
  <tr align="center" class="forumRowHighlight"> 
    <td colspan="4" class="forumRowHighlight">订单总额:<%=zongji%>元+费用:<%=feiyong%>元  共计:<%=zongji+feiyong%>元 </td>
  </tr>
  <tr> 
    <td class="forumRowHighlight" >用户帐号:</td>
    <td class="forumRowHighlight" ><%=username%></td>
  </tr>
  <tr> 
    <td class="forumRowHighlight" >预付款余额:</td>
    <td class="forumRowHighlight" ><font color="#FF0000"><%=yucun%></font></td>
  </tr>
  <tr> 
    <td class="forumRowHighlight" >收货人姓名:</td>
    <td class="forumRowHighlight" ><%=trim(rs("userzhenshiname"))%></td>
  </tr>
  <tr> 
    <td class="forumRowHighlight" >收货地址:</td>
    <td class="forumRowHighlight" ><%=trim(rs("shouhuodizhi"))%></td>
  </tr>
  <tr> 
    <td class="forumRowHighlight" >邮编:</td>
    <td class="forumRowHighlight" ><%=trim(rs("youbian"))%></td>
  </tr>
  <tr> 
    <td class="forumRowHighlight" >联系电话:</td>
    <td class="forumRowHighlight" ><%=trim(rs("usertel"))%></td>
  </tr>
  <tr> 
    <td class="forumRowHighlight" >电子邮件:</td>
    <td class="forumRowHighlight" ><%=trim(rs("useremail"))%></td>
  </tr>
  <tr> 
    <td class="forumRowHighlight" >送货方式:</td>
    <td class="forumRowHighlight" > <%set rs2=server.CreateObject("adodb.recordset")
    								rs2.Open "select * from wq_songhuo where songid="&rs("songhuofangshi"),conn,1,1
    								response.Write trim(rs2("subject"))
    								rs2.Close
   									set rs2=nothing%> </td>
  </tr>
  <tr> 
    <td class="forumRowHighlight" >支付方式:</td>
    <td class="forumRowHighlight" > <%set rs2=server.CreateObject("adodb.recordset")
    								rs2.Open "select * from wq_songhuo where songid="&rs("zhifufangshi"),conn,1,1
   									response.Write trim(rs2("subject"))
    								rs2.close
    								set rs2=nothing%> </td>
  </tr>
  <tr> 
    <td class="forumRowHighlight" >是否要发票:</td>
    <td class="forumRowHighlight" ><%if rs("fapiao")=1 then %>
      需要发票 <%else%>
      不需要发票 <%end if%></td>
  </tr>
  <tr> 
    <td class="forumRowHighlight" >用户留言:</td>
    <td class="forumRowHighlight" ><%=trim(rs("liuyan"))%></td>
  </tr>
  <tr> 
    <td height="20" class="forumRowHighlight" >下单日期:</td>
    <td height="20" class="forumRowHighlight" ><%=rs("actiondate")%></td>
  </tr>
  <tr> 
    <td height="32" colspan="2" class="forumRowHighlight"> <div align="center"> 
        <input type="image" border="0" name="submit3" src="../images/shch.gif" width="54" height="18" onClick="if(confirm('您确定要删除吗?')) location.href='saveorderform.asp?action=del&dan=<%=dingdan%>&username=<%=username%>';else return;">
                      
        <input type="image" border="0" name="submit" src="../images/gb.gif" width="54" height="18" onClick=javascript:window.close()>
      </div></td>
  </tr>
</table>

<%sub zhuang()
select case rs("zhuangtai")
case "1"%>
<input name="checkbox" type="checkbox" DISABLED id="checkbox" value="checkbox" checked>未处理<span style='font-family:Wingdings;'>à</span> 
<%if rs("zhifufangshi")<>4 then %>
<input name="checkbox" type="checkbox" id="checkbox" value="checkbox" DISABLED>用户已付款<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="zhuangtai" value="3">商城收到款<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="checkbox3" value="checkbox" DISABLED>商城已发货<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="checkbox4" value="checkbox" DISABLED>用户已收到货 
<%else%>
<input name="zhuangtai" type="checkbox" id="zhuangtai" value="3">订单已确认<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="checkbox4" value="checkbox" DISABLED>订单已完成 
<%end if%>
<%case "2"%>
<input name="checkbox" type="checkbox" DISABLED id="checkbox" value="checkbox" checked>未处理<span style='font-family:Wingdings;'>à</span> 
<input name="checkbox" type="checkbox" id="checkbox" value="adf" checked DISABLED>用户已付款<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="zhuangtai" value="3" >商城收到款<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="checkbox" value="checkbox" DISABLED>商城已发货<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="checkbox4" value="checkbox" DISABLED>用户已收到货
<%case "3"%>
<input name="checkbox" type="checkbox" DISABLED id="checkbox" value="checkbox" checked>未处理<span style='font-family:Wingdings;'>à</span> 
<%if rs("zhifufangshi")<>4 then %>
<input name="checkbox" type="checkbox" id="checkbox" value="checkbox" checked DISABLED>用户已付款<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="checkbox2" value="checkbox" checked DISABLED>商城收到款<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="zhuangtai" value="4" >商城已发货<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="checkbox4" value="checkbox" DISABLED>用户已收到货
<%else%>
<input name="checkbox" type="checkbox" DISABLED value="checkbox" checked>订单已确认<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="zhuangtai" id="checkbox" value="5">
订单已完成 
<%end if%>
<%case "4"%>
<input name="checkbox" type="checkbox" DISABLED id="checkbox" value="checkbox" checked>未处理<span style='font-family:Wingdings;'>à</span> 
<input name="checkbox" type="checkbox" id="checkbox" value="2" checked DISABLED>用户已付款<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="checkbox2" value="checkbox" checked DISABLED>商城收到款<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="checkbox3" value="checkbox" checked DISABLED>商城已发货<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="checkbox" value="checkbox" DISABLED>用户已收到货
<%case "5"%>
<input name="checkbox" type="checkbox" DISABLED id="checkbox" value="checkbox" checked>未处理<span style='font-family:Wingdings;'>à</span> 
<%if rs("zhifufangshi")<>4 then %>
<input name="checkbox" type="checkbox" id="checkbox" value="2" checked DISABLED>用户已付款<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="checkbox2" value="checkbox" checked DISABLED>商城收到款<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="checkbox3" value="checkbox" checked DISABLED>商城已发货<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="checkbox4" value="checkbox" checked DISABLED>用户已收到货
<%else%>
<input name="zhuangtai" type="checkbox" DISABLED id="checkbox" value="checkbox" checked>订单已完成<span style='font-family:Wingdings;'>à</span> 
<input type="checkbox" name="checkbox4" value="checkbox" checked DISABLED>订单已完成 

<%end if%>
<%end select
end sub%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -