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

📄 submore.asp

📁 ASP入门与提高实用教程 源文件(上传网站)
💻 ASP
字号:
<%
if session("admin_name")="" then response.end
set rs=server.createobject("adodb.recordset")
%>
<!--#include file="conn.asp"-->
<%if request("action")="pass" then
sql="select * from sub where sub_id="&request("sub_id")
rs.open sql,conn,3,3
if rs.eof then
    response.write "没有此订单信息,或者此订单已通过管理员确认"
    response.end
else
    rs("sub_check")=true
    rs.update
    response.write "<center>"
    response.write rs("sub_number")+"号"
    response.write "<font color=red>订单已经确认!</font>"
end if
rs.close

elseif request("action")="del" then
sql="select * from sub where sub_id="&request("sub_id")
rs.open sql,conn,3,3
sub_number=rs("sub_number")
rs.delete
rs.update
rs.close
sql="select * from basket where sub_number='"&sub_number&"'"
rs.open sql,conn,3,3
do while not rs.eof 
rs.delete
rs.movenext
loop
rs.close
response.write "此订单信息已经删除"


else


sql="select * from sub where sub_id="&request("sub_id")
rs.open sql,conn,3,3
if rs.eof then
    response.write "没有此订单信息"
else%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="Content-Language" content="zh-cn">
<link href=../style.css rel=STYLESHEET type=text/css>
<title>订单:<%=rs("sub_number")%>详细信息</title>
</head>
<table border="0" width="580" cellspacing="1">
  <tr>
    <td width="100%">
      <table border="0" width="100%" cellspacing="1">
        <tr>
          <td width="100%" bgcolor="#FF9933">
            <p align="center">订单号<font color=blue><%=rs("sub_number")%><%sub_number=rs("sub_number")%></td>
        </tr>
        <tr>
          <td width="100%" bgcolor="#66CCFF">
            <table border="0" width="100%" cellspacing="0" cellpadding="0">
              <tr>
                <td width="50%" bgcolor="#FFFFFF" colspan="2">订购日期:<%=rs("sub_date")%></td>
                <td width="50%" bgcolor="#FFFFFF" colspan="2">订货人:<%=rs("user_name")%></td>
              </tr>
              <tr>
                <td width="50%" bgcolor="#FFFFFF" colspan="2">收货人:<%=rs("sub_to")%></td>
                <td width="50%" bgcolor="#FFFFFF" colspan="2">收货地址:<%=rs("sub_adds")%></td>
              </tr>
              <tr>
                <td width="50%" bgcolor="#FFFFFF" colspan="2">电话:<%=rs("sub_tel")%></td>
                <td width="50%" bgcolor="#FFFFFF" colspan="2">E-mail:<%=rs("sub_mail")%></td>
              </tr>
              <%rs.close%>
              <tr>
                <td width="100%" bgcolor="#FFFFFF" colspan="4">
                  <p align="center"><font color="#FF0000">订购货物列表</font></p>
                </td>
              </tr>
              <tr>
                <td width="25%" bgcolor="#FFFFFF">货物名称</td>
                <td width="25%" bgcolor="#FFFFFF">单价</td>
                <td width="25%" bgcolor="#FFFFFF">数量</td>
                <td width="25%" bgcolor="#FFFFFF">合计</td>
              </tr>
              <%sql="select * from basket where sub_number='"&sub_number&"'"
              rs.open sql,conn,3,3
              if rs.eof then
                  response.write "没有此订单信息"
                  response.end
              else
                  do while not rs.eof%>
              <tr>
                <td width="25%" bgcolor="#FFFFFF"><%=rs("hw_name")%></td>
                <td width="25%" bgcolor="#FFFFFF"><%=rs("hw_cash")%>元</td>
                <td width="25%" bgcolor="#FFFFFF"><%=rs("basket_count")%></td>
                <td width="25%" bgcolor="#FFFFFF"><font color=red><%=rs("hw_cash")*rs("basket_count")%></font>元</td>
                <%totalcash=totalcash+rs("hw_cash")*rs("basket_count")%>
              </tr><%rs.movenext
              loop
              %>
              
              
              
              
              
              <tr>
                <td width="75%" bgcolor="#FFFFFF" colspan="3">总计</td>
                <td width="25%" bgcolor="#FFFFFF"><font color=red><%=totalcash%></font>元</td>
              </tr>
              
              <%end if
              rs.close%>
              
              
              
              <tr>
                <td width="100%" bgcolor="#FFFFFF" colspan="4">
                  <p align="center"><a href="submore.asp?sub_id=<%=request("sub_id")%>&action=pass">订单确认</a> 
                  <a href="submore.asp?sub_id=<%=request("sub_id")%>&amp;action=del">删除此订单</a></td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<%end if
end if
set rs=nothing
conn.close
set conn=nothing
%>

⌨️ 快捷键说明

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