%@ Language=VBScript %>
<%
Response.Buffer=true
Dim LaunConn
Dim CookCartID
Dim objFSO
Set LaunConn=Server.CreateObject("ADODB.Connection")
LaunConn.Open "DSN=LaundryCarts;"
CustID = CInt(Request.querystring("CustID"))
If Level >= 1 Then
Response.Redirect ("AdminMenu.asp")
End If
if request.form("SelOrdStatus") <> "" then
'modifying records, here we go
cartid = request.querystring("cartid")
strSQL = "SELECT CartID, Status, PartID, Quantity, Price, PartDesc, Quantity * Price AS Price1 FROM CartItems WHERE CartID LIKE '" & cartid & "'"
Set RsCartItem = LaunConn.Execute(strSQL)
If Not RsCartItem.EOF Then
RsCartItem.Movefirst
counter = 1
do while not rscartitem.eof
strsql = "UPDATE CartItems SET Status = '" & request.form("itemstatus" & counter) & "' WHERE CartID = " & cartid & " AND partid = '" & rscartitem("partid") & "';"
LaunConn.Execute(strSQL)
rscartitem.movenext
counter = counter + 1
loop
rscartitem.close
Set rscartitem = Nothing
End If
strsql = "UPDATE Cart Set comments = '" & request.form("comments") & "', status = " & request.form("SelOrdStatus") & " WHERE cartid = " & cartid & ";"
LaunConn.Execute(strSQL)
'done processing, redirect them so the page is updated
LaunConn.Close
Set LaunConn = Nothing
Response.redirect("modorder.asp?cartid=" & request.querystring("cartid") & "&custid=" & request.querystring("custid"))
end if
%>
"
End If
RsCart.Close
Set RsCart = Nothing
strSQL = "SELECT * FROM Customer WHERE CustomerID = " & request.querystring("custid") & ";"
Set RsCust = LaunConn.Execute(strSQL)
If Not RsCust.EOF Then
RsCust.MoveFirst
Response.Write "
"
Response.Write "
"
Response.Write "
"
Response.Write "
Billing Information"
Response.Write "
"
Response.Write "
"
Response.Write "
First Name: "
Response.Write RsCust("BFirstName") & "
"
Response.Write "
Last Name: "
Response.Write RsCust("BLastName") & "
"
Response.Write "
Business Name: "
Response.Write RsCust("BBusiness") & "