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

📄 myorderxx.asp

📁 体育商城
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT"%>
<%
' *** Logout the current user.
MM_Logout = CStr(Request.ServerVariables("URL")) & "?MM_Logoutnow=1"
If (CStr(Request("MM_Logoutnow")) = "1") Then
  Session.Abandon
  MM_logoutRedirectPage = "userlogin.asp"
  ' redirect with URL parameters (remove the "MM_Logoutnow" query param).
  if (MM_logoutRedirectPage = "") Then MM_logoutRedirectPage = CStr(Request.ServerVariables("URL"))
  If (InStr(1, UC_redirectPage, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
    MM_newQS = "?"
    For Each Item In Request.QueryString
      If (Item <> "MM_Logoutnow") Then
        If (Len(MM_newQS) > 1) Then MM_newQS = MM_newQS & "&"
        MM_newQS = MM_newQS & Item & "=" & Server.URLencode(Request.QueryString(Item))
      End If
    Next
    if (Len(MM_newQS) > 1) Then MM_logoutRedirectPage = MM_logoutRedirectPage & MM_newQS
  End If
  Response.Redirect(MM_logoutRedirectPage)
End If
%>
<%
' *** Restrict Access To Page: Grant or deny access to this page
MM_authorizedUsers=""
MM_authFailedURL="userlogin.asp"
MM_grantAccess=false
If Session("MM_Username") <> "" Then
  If (true 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
%>
<!--#include file="Connections/conn.asp" -->
<%
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 orderxx__MMColParam
orderxx__MMColParam = "1"
if (Request.QueryString("orderid") <> "") then orderxx__MMColParam = Request.QueryString("orderid")
%>
<%
set orderxx = Server.CreateObject("ADODB.Recordset")
orderxx.ActiveConnection = MM_conn_STRING
orderxx.Source = "SELECT * FROM orderdetails WHERE orderid = " + Replace(orderxx__MMColParam, "'", "''") + ""
orderxx.CursorType = 0
orderxx.CursorLocation = 2
orderxx.LockType = 3
orderxx.Open()
orderxx_numRows = 0
%>
<%
Dim Repeat1__numRows
Repeat1__numRows = -1
Dim Repeat1__index
Repeat1__index = 0
orderxx_numRows = orderxx_numRows + Repeat1__numRows
%>
<%
' *** 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
%>
<SCRIPT RUNAT=SERVER LANGUAGE=VBSCRIPT>	
function DoTrimProperly(str, nNamedFormat, properly, pointed, points)
  dim strRet
  strRet = Server.HTMLEncode(str)
  strRet = replace(strRet, vbcrlf,"")
  strRet = replace(strRet, vbtab,"")
  If (LEN(strRet) > nNamedFormat) Then
    strRet = LEFT(strRet, nNamedFormat)			
    If (properly = 1) Then					
      Dim TempArray								
      TempArray = split(strRet, " ")	
      Dim n
      strRet = ""
      for n = 0 to Ubound(TempArray) - 1
        strRet = strRet & " " & TempArray(n)
      next
    End If
    If (pointed = 1) Then
      strRet = strRet & points
    End If
  End If
  DoTrimProperly = strRet
End Function
</SCRIPT>
<html>
<head>
<title>定单详细资料</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="ddd.css" type="text/css">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="2" marginwidth="0" marginheight="0">
<!--#include file="top.asp" -->
<table width="771" border="0" cellspacing="0" cellpadding="0" align="center" height="258" class="bk1">
  <tr> 
    <td valign="top" height="267" width="167"> 
      <p><br>
        <br>
      </p>
      <table width="143" border="0" cellspacing="0" cellpadding="0" align="center">
        <tr> 
          <td><a href="loginok.asp"><img src="images/myziliao.gif" width="165" height="53" border="0"></a></td>
        </tr>
        <tr> 
          <td height="23"><a href="myorder.asp"><img src="images/myorder.gif" width="165" height="53" border="0"></a></td>
        </tr>
        <tr> 
          <td height="2"><a href="mycart.asp"><img src="images/myCART.gif" width="165" height="53" border="0"></a></td>
        </tr>
        <tr> 
          <td height="43"><a href="order.asp"><img src="images/gosyt.gif" width="165" height="53" border="0"></a></td>
        </tr>
        <tr> 
          <td height="38"><a href="default.asp"><img src="images/maidx.gif" width="165" height="53" border="0"></a></td>
        </tr>
        <tr> 
          <td><a href="<%=MM_Logout%>"><img border=0 src="images/loginout.gif" width="165" height="53"></a></td>
        </tr>
      </table>
      <p><br>
      </p>
    </td>
    <td height="267" width="630"> 
      <table width="571" border="0" cellspacing="2" cellpadding="0" align="center" class="dfont">
        <tr> 
          <td colspan="3"><b>定单号码:<font color="#FF0000"><%=(orderxx.Fields.Item("orderid").Value)%></font></b></td>
          <td colspan="2"><b>合计费用:<font color="#FF0000"><%=(totalprice.Fields.Item("ddd").Value)%></font>元</b></td>
        </tr>
        <tr bgcolor="#99CC00"> 
          <td width="142"> 
            <div align="center">商品名称</div>
          </td>
          <td width="101"> 
            <div align="center">商品编号</div>
          </td>
          <td width="100"> 
            <div align="center">重量</div>
          </td>
          <td width="100"> 
            <div align="center">单价</div>
          </td>
          <td width="93"> 
            <div align="center">数量</div>
          </td>
        </tr>
        <% 
While ((Repeat1__numRows <> 0) AND (NOT orderxx.EOF)) 
%>
        <tr> 
          <td width="142"> 
            <div align="center"><%=(orderxx.Fields.Item("productname").Value)%></div>
          </td>
          <td width="101"> 
            <div align="center"><%=(orderxx.Fields.Item("productid").Value)%></div>
          </td>
          <td width="100"> 
            <div align="center"><%=(orderxx.Fields.Item("weight").Value)%></div>
          </td>
          <td width="100"> 
            <div align="center"><%=(orderxx.Fields.Item("price").Value)%>元</div>
          </td>
          <td width="93"> 
            <div align="center"><%=(orderxx.Fields.Item("quantity").Value)%></div>
          </td>
        </tr>
        <% 
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  orderxx.MoveNext()
Wend
%>
      </table>
      <p align="center"><a href="myorder.asp">其他定单</a></p>
    </td>
  </tr>
</table>
<br>
<!--#include file="bottom.asp" -->
</body>
</html>
<%
totalprice.Close()
%>
<%
orderxx.Close()
%>

⌨️ 快捷键说明

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