<% Option Explicit If not Session("isLoggedIn") Then response.redirect("/ecommerce/default.asp?returnUrl=" & Server.URLEncode(Request.ServerVariables("SCRIPT_NAME"))) End If %> <% Dim strSortCat, intStatusID, intUserTypeID, intUserID Dim rsOrder, arrDBData, strSQL, rsStatusList, strSortOrder Dim iRecFirst, iRecLast Dim I strSortCat = "orderID" If Request.Form("sortCat") <> "" Then strSortCat = CStr(Request.Form("sortCat")) intStatusID = 0 If Request.Form("statusID") <> "" Then intStatusID = CInt(Request.Form("statusID")) intUserTypeID = 0 If Request.Form("userTypeID") <> "" Then intUserTypeID = CInt(Request.Form("userTypeID")) intUserID = 0 If Request.Form("userID") <> "" Then intUserID = CInt(Request.Form("userID")) strSortOrder = "DESC" If Request.Form("sortOrder") <> "" Then strSortOrder = CStr(Request.Form("sortOrder")) strSQL = "EXEC stpOrderSelectAll " & Session("intUserID") & ", " & Session("intUserTypeID") & ", " & intStatusID & ", " & intUserTypeID & ", " & intUserID Set rsOrder = Server.CreateObject("ADODB.Recordset") rsOrder.CursorLocation = 3 rsOrder.Open strSQL, dbconn, 3, 3 rsOrder.Sort = strSortCat & " " & strSortOrder arrDBData = null If rsOrder.EOF Then strErrMsg = "
  • no orders match the above criteria.
  • " isErr = true Else arrDBData = rsOrder.GetRows() iRecFirst = LBound(arrDBData, 2) iRecLast = UBound(arrDBData, 2) End If ' not EOF rsOrder.Close() Set rsOrder = Nothing %> Galuku Cocopeat

    Order List

    <% If Session("intUserID") <= USERTYPE_SUPPLIER Then %> <% End If %>
    Sort by:
    Show orders by status: <%= writeSelectSTP("statusID", "orderStatusID", "orderStatusDesc", "stpUserTypeStatusList " & session("intUserTypeID"), "this.form.submit();", "All statuses", intStatusID) %>
    Show orders belonging to: <%= writeSelectSTP("userTypeID", "userTypeID", "userTypeDesc", "stpUserTypeSelectAll", "this.form.submit();", "All userTypes", intUserTypeID) %> <%= writeSelectSTP("userID", "userID", "username", "stpUserSelectAll 1, " & intUserTypeID, "this.form.submit();", "All users", intUserID) %>

    <% If isErr Then %> <% End If If not isNull(arrDBData) Then For I = iRecFirst to iRecLast If Session("intUserTypeID") <= 3 Then %> <% End If %> <% Next End If ' isNull %>
    <%= strErrMsg %>
    Ordered by "<%= arrDBData(6,I)%>"<% If Session("intUserTypeID") <= 2 Then %> - ordered at <%= arrDBData(8,I) %><% End If %>
    Order Number <%= arrDBData(9,I) %> - created at <%= toSQLTime(arrDBData(5,I),2) & " on " & toSQLDate(arrDBData(5,I),0) %>
    Edit this Order
    40' Cnt 20' Cnt Destination Order Status
    <% strSQL = "EXEC stpCount40 " & arrDBData(0,I) Set rsOrder = dbconn.Execute(strSQL) If rsOrder.EOF Then strErrMsg = "
  • cannot count 40' containers belonging to order " & arrDBData(0,I) & "
  • " isErr = true Else Response.write(rsOrder("count40")) End If rsOrder.Close Set rsOrder = Nothing %>
    <% strSQL = "EXEC stpCount20 " & arrDBData(0,I) Set rsOrder = dbconn.Execute(strSQL) If rsOrder.EOF Then strErrMsg = "
  • cannot count 20' containers belonging to order " & arrDBData(0,I) & "
  • " isErr = true Else Response.write(rsOrder("count20")) End If rsOrder.Close Set rsOrder = Nothing %>
    <%= arrDBData(1,I) %> <%= arrDBData(4,I) %>
     

    ^ back to top