%Option explicit%> <% '******************************************************* ' allows user to check the status of their order ' VP-ASP 6.50 April 21, 2003 '******************************************************* dim customerid affid=Getsess("AffRegister") If affid="" then responseredirect "shopafflogin.asp" end if dim dbc dim UsePassword Dim Fieldname Dim fieldvalue dim fields(10) dim captions(10) dim fieldcount Dim strpassword Dim rc dim affid Dim sAction 'VP-ASP 6.50 - mark orders paid to affiliate Dim affpaid dim paidarray,paidarrayvalues paidarray = array("True","False") paidarrayvalues= array(1,0) SetSess "CurrentUrl","shopaffstatusorders.asp" sAction=Request.form("Action") mypage=Request("page") 'VP-ASP 6.50 - precautionary security fix if not isnumeric(mypage) then mypage = "" end if 'VP-ASP 6.50 - mark orders paid to affiliate affpaid=cleanchars(Request.form("affpaid")) shoppageheader if mypage<>"" then sql=GetSess("sqlAffStatus") ' on recursive calls we stored sql in sessikon variable displayOrders else mypage=1 DisplayOrders end if ShopPagetrailer Sub DisplayOrders dim maxrecs, cid dim recordcount mypagesize=getconfig("xeditdisplaymaxrecords") maxrecs=mypagesize OpenOrderDB dbc cid = clng(customerid) SQL= "Select * from orders where oaffid=" & affid 'VP-ASP 6.50 - mark orders paid to affiliate if (affpaid <> "Select") AND (affpaid > "") then sql = sql & " and affpaid =" & affpaid end if Sql=SQL & " order by odate DESC" SetSess "sqlaffstatus",SQL ShopOpenRecordSet SQL,objRS, mypagesize, mypage if objRS.eof then shopwriteerror getlang("LangNoOrders") objRS.Close set objRS=nothing ShopCloseDatabase dbc exit sub end if recordcount=0 response.write "
" & smallinfofont & getlang("langCommonPage") & mypage & getlang("langCommonOf") & maxpages & smallinfoend OrderTableHeader While Not objRS.EOF and recordcount < maxrecs OrderFormatRow ' actual row is formatted objRS.MoveNext recordcount=recordcount+1 Wend response.write "" Call PageNavBar (SQL) objRS.Close set objRS=nothing ShopCloseDatabase dbc End Sub ' Sub OrderFormatRow dim i dim fieldvalue response.write "