<%@ LANGUAGE = "VBScript" %> <% 'Check if user is signed in if session("custid")="" or session("custid")=null then response.redirect("signin.asp") end if nodays=90 %> <% =storename %> <% header categorymenu %>

your current orders
· Below is a list of all orders you have placed over the last <%= nodays %> days.

<% sql="select * FROM products INNER JOIN (orderitems INNER JOIN orders ON orders.orderid=orderitems.orderid) ON products.productid=orderitems.productid where #" & formatdatetime(date,2) & "#-date<=" & nodays & " and custid=" & valid_sql(session("custid")) & " order by orders.orderid" set rsorders=db.execute(sql) if rsorders.eof then %> No active orders <% else %> <% while not rsorders.eof %> <% wend %>
Order ID: <%=rsorders("orderid") %>
Date Placed: <%= formatdatetime(rsorders("date"),2) %>

Deliver to: <%=rsorders("dfname") & " " & rsorders("dlname") %>
<%=rsorders("daddress1") %>
<%=rsorders("daddress2") %>
<%=rsorders("dcity") %>
<%=rsorders("dstate") %> <%=rsorders("dzip") %>
<%=rsorders("dcountry") %>

<% neworder=false gtotal=0 while not(neworder) %> <% gtotal=gtotal+(rsorders("priceperunit") * rsorders("qty")) current_orderid=rsorders("orderid") rsorders.movenext if rsorders.eof then neworder=true elseif current_orderid<>rsorders("orderid") then neworder=true end if wend %>
Item Qty Price Each Total
"><%=rsorders("productid") %> "><%=rsorders("name") %> <%=rsorders("qty") %> <%=cursymbol & formatnumber(rsorders("priceperunit")) %> <%=cursymbol & formatnumber(rsorders("priceperunit") * rsorders("qty")) %>

Grand Total <% =cursymbol & formatnumber(gtotal) %>


<% end if %>


<% footer %>