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

📄 chuliorder.asp

📁 体育商城
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT"%> 
<!--#include file="Connections/conn.asp" -->
<%
' *** Restrict Access To Page: Grant or deny access to this page
MM_authorizedUsers="admin,orders"
MM_authFailedURL="adminloginerr.asp"
MM_grantAccess=false
If Session("MM_Username") <> "" Then
  If (false Or CStr(Session("MM_UserAuthorization"))="") Or _
         (InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization"))>=1) Then
    MM_grantAccess = true
  End If
End If
If Not MM_grantAccess Then
  MM_qsChar = "?"
  If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&"
  MM_referrer = Request.ServerVariables("URL")
  if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" & Request.QueryString()
  MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" & Server.URLEncode(MM_referrer)
  Response.Redirect(MM_authFailedURL)
End If
%>
<%
Dim rs__MMColParam
rs__MMColParam = "1"
if (Request.QueryString("orderid") <> "") then rs__MMColParam = Request.QueryString("orderid")
%>
<%
set rs = Server.CreateObject("ADODB.Recordset")
rs.ActiveConnection = MM_conn_STRING
rs.Source = "SELECT * FROM orderdetails WHERE orderid = " + Replace(rs__MMColParam, "'", "''") + ""
rs.CursorType = 0
rs.CursorLocation = 2
rs.LockType = 3
rs.Open()
rs_numRows = 0
%>
<%
Dim totalprice__MMColParam
totalprice__MMColParam = "1"
if (Request.QueryString("orderid")  <> "") then totalprice__MMColParam = Request.QueryString("orderid") 
%>
<%
set totalprice = Server.CreateObject("ADODB.Recordset")
totalprice.ActiveConnection = MM_conn_STRING
totalprice.Source = "SELECT sum(totalprice) as ddd  FROM orderdetails  WHERE orderid = " + Replace(totalprice__MMColParam, "'", "''") + ""
totalprice.CursorType = 0
totalprice.CursorLocation = 2
totalprice.LockType = 3
totalprice.Open()
totalprice_numRows = 0
%>
<%
Dim rs1__MMColParam
rs1__MMColParam = "1"
if (Request.QueryString("orderid") <> "") then rs1__MMColParam = Request.QueryString("orderid")
%>
<%
set rs1 = Server.CreateObject("ADODB.Recordset")
rs1.ActiveConnection = MM_conn_STRING
rs1.Source = "SELECT *  FROM orders inner join shipping on  orders.shippingid = shipping.shippingid  WHERE orderid = " + Replace(rs1__MMColParam, "'", "''") + ""
rs1.CursorType = 0
rs1.CursorLocation = 2
rs1.LockType = 3
rs1.Open()
rs1_numRows = 0
strorderid=rs1.fields.item("orderid").value
session("orderid1")=strorderid
%>
<%
Dim Repeat1__numRows
Repeat1__numRows = -1
Dim Repeat1__index
Repeat1__index = 0
rs_numRows = rs_numRows + Repeat1__numRows
%>
<%
'  *** Recordset Stats, Move To Record, and Go To Record: declare stats variables

' set the record count
rs_total = rs.RecordCount

' set the number of rows displayed on this page
If (rs_numRows < 0) Then
  rs_numRows = rs_total
Elseif (rs_numRows = 0) Then
  rs_numRows = 1
End If

' set the first and last displayed record
rs_first = 1
rs_last  = rs_first + rs_numRows - 1

' if we have the correct record count, check the other stats
If (rs_total <> -1) Then
  If (rs_first > rs_total) Then rs_first = rs_total
  If (rs_last > rs_total) Then rs_last = rs_total
  If (rs_numRows > rs_total) Then rs_numRows = rs_total
End If
%>
<%
' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters

' create the list of parameters which should not be maintained
MM_removeList = "&index="
If (MM_paramName <> "") Then MM_removeList = MM_removeList & "&" & MM_paramName & "="
MM_keepURL="":MM_keepForm="":MM_keepBoth="":MM_keepNone=""

' add the URL parameters to the MM_keepURL string
For Each Item In Request.QueryString
  NextItem = "&" & Item & "="
  If (InStr(1,MM_removeList,NextItem,1) = 0) Then
    MM_keepURL = MM_keepURL & NextItem & Server.URLencode(Request.QueryString(Item))
  End If
Next

' add the Form variables to the MM_keepForm string
For Each Item In Request.Form
  NextItem = "&" & Item & "="
  If (InStr(1,MM_removeList,NextItem,1) = 0) Then
    MM_keepForm = MM_keepForm & NextItem & Server.URLencode(Request.Form(Item))
  End If
Next

' create the Form + URL string and remove the intial '&' from each of the strings
MM_keepBoth = MM_keepURL & MM_keepForm
if (MM_keepBoth <> "") Then MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
if (MM_keepURL <> "")  Then MM_keepURL  = Right(MM_keepURL, Len(MM_keepURL) - 1)
if (MM_keepForm <> "") Then MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)

' a utility function used for adding additional parameters to these strings
Function MM_joinChar(firstItem)
  If (firstItem <> "") Then
    MM_joinChar = "&"
  Else
    MM_joinChar = ""
  End If
End Function
%>
<html>
<head>
<title>用户管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="JavaScript">
<!--
function MM_popupMsg(msg) { //v1.0
  alert(msg);
}
//-->
</script>
<link rel="stylesheet" href="ddd.css" type="text/css">
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!--#include file="manage.asp" -->
<!--#include file="top.asp" -->
<div align="center"></div>
<table width="771" border="0" cellspacing="0" cellpadding="0" align="center" class="bk">
  <tr> 
    <td> 
      <div align="center"><br>
        <% If (rs1.Fields.Item("chuli").Value) = (-1) Then 'script %>
        <b><font color="#FF0000" size="2">此定单已处理!</font></b> 
        <% End If ' end If (rs1.Fields.Item("chuli").Value) = (-1) script %>
      </div>
      <form name="form1">
        <p><b>以下是定单的详细内容:</b><br>
        </p>
        <table width="571" border="1" cellspacing="2" cellpadding="0" align="center" class="dfont" bordercolor="#000000">
          <tr> 
            <td><b>定单号码:<font color="#FF0000"><%=(rs.Fields.Item("orderid").Value)%></font></b></td>
            <td colspan="2"><b>下单日期:<%=(rs1.Fields.Item("orderdate").Value)%></b></td>
            <td colspan="2"><b>合计费用:<font color="#FF0000"><%=(totalprice.Fields.Item("ddd").Value)%></font>元</b></td>
          </tr>
          <tr bgcolor="#99CC00"> 
            <td width="142" height="16"> 
              <div align="center"><b>商品名称</b></div>
            </td>
            <td width="101" height="16"> 
              <div align="center"><b>商品编号</b></div>
            </td>
            <td width="100" height="16"> 
              <div align="center"><b>重量</b></div>
            </td>
            <td width="100" height="16"> 
              <div align="center"><b>单价</b></div>
            </td>
            <td width="93" height="16"> 
              <div align="center"><b>数量</b></div>
            </td>
          </tr>
          <% 
While ((Repeat1__numRows <> 0) AND (NOT rs.EOF)) 
%>
          <tr> 
            <td width="142"> 
              <div align="center"><b><%=(rs.Fields.Item("productname").Value)%></b></div>
            </td>
            <td width="101"> 
              <div align="center"><b><%=(rs.Fields.Item("productid").Value)%></b></div>
            </td>
            <td width="100"> 
              <div align="center"><b><%=(rs.Fields.Item("weight").Value)%></b></div>
            </td>
            <td width="100"> 
              <div align="center"><b><%=(rs.Fields.Item("price").Value)%>元</b></div>
            </td>
            <td width="93"> 
              <div align="center"><b><%=(rs.Fields.Item("quantity").Value)%></b></div>
            </td>
          </tr>
          <% 
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  rs.MoveNext()
Wend
%>
        </table>
        <p><b>以下是收货人的详细信息:</b></p>
        <table width="565" border="1" cellspacing="2" cellpadding="0" align="center" bordercolor="#FFFFFF">
          <tr bordercolor="#000000"> 
            <td width="133" bgcolor="#99CC00"><b>收货人姓名:</b></td>
            <td width="426"> <b><%=(rs1.Fields.Item("username").Value)%></b></td>
          </tr>
          <tr bordercolor="#000000"> 
            <td width="133" bgcolor="#99CC00"><b>收货人城市:</b></td>
            <td width="426"> <b><%=(rs1.Fields.Item("city").Value)%></b></td>
          </tr>
          <tr bordercolor="#000000"> 
            <td width="133" bgcolor="#99CC00"><b>收货人邮编:</b></td>
            <td width="426"> <b><%=(rs1.Fields.Item("zip").Value)%></b></td>
          </tr>
          <tr bordercolor="#000000"> 
            <td width="133" bgcolor="#99CC00"><b>收货人电话:</b></td>
            <td width="426"> <b><%=(rs1.Fields.Item("phone").Value)%></b></td>
          </tr>
          <tr bordercolor="#000000"> 
            <td width="133" height="2" bgcolor="#99CC00"><b>收货人身份证:</b></td>
            <td width="426" height="2"> <b><%=(rs1.Fields.Item("snumber").Value)%></b></td>
          </tr>
          <tr bordercolor="#000000"> 
            <td width="133" bgcolor="#99CC00"><b>收货人地址:</b></td>
            <td width="426"> <b><%=(rs1.Fields.Item("address").Value)%></b></td>
          </tr>
          <tr bordercolor="#000000"> 
            <td width="133" height="5" bgcolor="#99CC00"><b>送货方式:</b></td>
            <td width="426" height="5"> <b><%=(rs1.Fields.Item("shipname").Value)%></b></td>
          </tr>
          <tr bordercolor="#FFFFFF"> 
            <td colspan="2"> 
              <div align="center"> 
                <p>&nbsp;</p>
                <p><b>
                  <% If (rs1.Fields.Item("chuli").Value) = (0) Then 'script %>
                  <a href="chuliok.asp">处理</a>
                  <% End If ' end If (rs1.Fields.Item("chuli").Value) = (0) script %>
                    <a href="manageorder.asp">返回</a></b></p>
              </div>
            </td>
          </tr>
        </table>
        <p>&nbsp;</p>
      </form>
      <p align="center">&nbsp;</p>
      <p>&nbsp;</p>
    </td>
  </tr>
</table><br>
<!--#include file="bottom.asp" -->
</body>
</html>
<%
rs.Close()
%>
<%
totalprice.Close()
%>
<%
rs1.Close()
%>

⌨️ 快捷键说明

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