%
'This code is copyright (c) Internet Business Solutions SL, all rights reserved.
'The contents of this file are protect under law as the intellectual property
'of Internet Business Solutions SL. Any use, reproduction, disclosure or copying
'of any kind without the express and written permission of Internet Business
'Solutions SL is forbidden.
'Author: Vince Reid, vince@virtualred.net
Dim sSQL,rs,alldata,success,cnn,errmsg,rowcounter,startfont,endfont,sd,ed,smonth,allorders,addcomma,delStr,delOptions,ordAddInfo,ordCNum
if storesessionvalue="" then storesessionvalue="virtualstore"
netnav = false
if htmlemails=true then emlNl = " " else emlNl=vbCrLf
if instr(Request.ServerVariables("HTTP_USER_AGENT"), "Gecko") > 0 then netnav = true
lisuccess=0
if dateadjust="" then dateadjust=0
thedate = DateAdd("h",dateadjust,Now())
thedate = DateSerial(year(thedate),month(thedate),day(thedate))
if request.querystring("doedit")="true" then doedit=TRUE else doedit=FALSE
function editfunc(data,col,size)
if doedit then editfunc = "" else editfunc = data
end function
function editnumeric(data,col,size)
if doedit then editnumeric = "" else editnumeric = FormatEuroCurrency(data)
end function
function URLDecode(byVal encodedstring)
Dim strIn, strOut, intPos, strLeft
Dim strRight, intLoop
strIn = encodedstring : strOut = "" : intPos = Instr(strIn, "+")
Do While intPos
strLeft = "" : strRight = ""
If intPos > 1 then strLeft = Left(strIn, intPos - 1)
If intPos < len(strIn) then strRight = Mid(strIn, intPos + 1)
strIn = strLeft & " " & strRight
intPos = InStr(strIn, "+")
intLoop = intLoop + 1
Loop
intPos = InStr(strIn, "%")
Do while intPos AND Len(strIn) > 2
If intPos > 1 then strOut = strOut & Left(strIn, intPos - 1)
strOut = strOut & Chr(CInt("&H" & mid(strIn, intPos + 1, 2)))
If intPos > (len(strIn) - 3) then
strIn = ""
Else
strIn = Mid(strIn, intPos + 3)
End If
intPos = InStr(strIn, "%")
Loop
URLDecode = strOut & strIn
end function
function getNumericField(fldname)
fldval = Trim(Request.Form(fldname))
if NOT IsNumeric(fldval) then getNumericField=0.0 else getNumericField=cDbl(fldval)
end function
Set rs = Server.CreateObject("ADODB.RecordSet")
Set rs2 = Server.CreateObject("ADODB.RecordSet")
Set rsl = Server.CreateObject("ADODB.RecordSet")
Set cnn=Server.CreateObject("ADODB.Connection")
cnn.open sDSN
if Session("loggedon") <> storesessionvalue AND Trim(request.cookies("WRITECKL"))<>"" then
sSQL="SELECT adminID FROM admin WHERE adminUser='" & Replace(request.cookies("WRITECKL"),"'","''") & "' AND adminPassword='" & Replace(request.cookies("WRITECKP"),"'","''") & "' AND adminID=1"
rs.Open sSQL,cnn,0,1
if NOT (rs.EOF OR rs.BOF) then
Session("loggedon") = storesessionvalue
else
lisuccess=2
end if
rs.Close
end if
if (Session("loggedon") <> storesessionvalue AND lisuccess<>2) OR disallowlogin=TRUE then response.end
Sub release_stock(smOrdId)
if stockManage <> 0 then
sSQL="SELECT cartID,cartProdID,cartQuantity,pSell FROM cart INNER JOIN products ON cart.cartProdID=products.pID WHERE cartCompleted=1 AND cartOrderID=" & smOrdId
rsl.Open sSQL,cnn,0,1
do while NOT rsl.EOF
if ((rsl("pSell") AND 2) = 2) then
sSQL = "SELECT coOptID FROM cartoptions INNER JOIN (options INNER JOIN optiongroup ON options.optGroup=optiongroup.optGrpID) ON cartoptions.coOptID=options.optID WHERE (optType=2 OR optType=-2) AND coCartID=" & rsl("cartID")
rs.Open sSQL,cnn,0,1
do while NOT rs.EOF
sSQL = "UPDATE options SET optStock=optStock+"&rsl("cartQuantity")&" WHERE optID="&rs("coOptID")
cnn.Execute(sSQL)
rs.MoveNext
loop
rs.Close
else
sSQL = "UPDATE products SET pInStock=pInStock+"&rsl("cartQuantity")&" WHERE pID='"&rsl("cartProdID")&"'"
cnn.Execute(sSQL)
end if
rsl.MoveNext
loop
rsl.Close
end if
End Sub
if lisuccess=2 then
%>
<%
else
success=true
alreadygotadmin = getadminsettings()
saveLCID = session.LCID
if Request.Form("updatestatus")="1" then
cnn.Execute("UPDATE orders SET ordStatusInfo='"&Replace(request.form("ordStatusInfo"),"'","''")&"' WHERE ordID="&Request.Form("orderid"))
elseif Request.QueryString("id")<>"" then
if Request.Form("delccdets")<>"" then
sSQL = "UPDATE orders SET ordCNum='' WHERE ordID="&Request.QueryString("id")
cnn.Execute(sSQL)
end if
sSQL = "SELECT cartProdId,cartProdName,cartProdPrice,cartQuantity,cartID FROM cart WHERE cartOrderID="&Request.QueryString("id")
rs.Open sSQL,cnn,0,1
allorders = ""
if NOT rs.EOF then allorders=rs.getrows
rs.Close
else
' Delete old uncompleted orders.
if delccafter<>0 then
tdt = thedate-delccafter
sSQL = "UPDATE orders SET ordCNum='' WHERE ordDate<"&datedelim & VSUSDate(tdt) & datedelim
cnn.Execute(sSQL)
end if
if delAfter<>0 then
tdt = thedate-delAfter
sSQL = "SELECT cartOrderID,cartID FROM cart WHERE cartCompleted=0 AND cartDateAdded<"&datedelim & VSUSDate(tdt) & datedelim
rs.Open sSQL,cnn,0,1
if NOT rs.EOF then
delStr=""
delOptions=""
do while NOT rs.EOF
delStr = delStr & addcomma & rs("cartOrderID")
delOptions = delOptions & addcomma & rs("cartID")
addcomma = ","
rs.MoveNext
loop
cnn.Execute("DELETE FROM orders WHERE ordID IN ("&delStr&")")
cnn.Execute("DELETE FROM cartoptions WHERE coCartID IN ("&delOptions&")")
cnn.Execute("DELETE FROM cart WHERE cartID IN ("&delOptions&")")
end if
rs.Close
else
tdt = thedate - 3
sSQL = "SELECT cartOrderID,cartID FROM cart WHERE cartCompleted=0 AND cartOrderID=0 AND cartDateAdded<"&datedelim & VSUSDate(tdt) & datedelim
rs.Open sSQL,cnn,0,1
if NOT rs.EOF then
delStr=""
delOptions=""
do while NOT rs.EOF
delStr = delStr & addcomma & rs("cartOrderID")
delOptions = delOptions & addcomma & rs("cartID")
addcomma = ","
rs.MoveNext
loop
cnn.Execute("DELETE FROM cartoptions WHERE coCartID IN ("&delOptions&")")
cnn.Execute("DELETE FROM cart WHERE cartID IN ("&delOptions&")")
end if
rs.Close
end if
sSQL = "SELECT statID,statPrivate FROM orderstatus WHERE statPrivate<>'' ORDER BY statID"
rs.Open sSQL,cnn,0,1
allstatus=rs.GetRows
rs.Close
end if
if Request.Form("updatestatus")="1" then
%>
<%
elseif Request.Form("doedit")="true" then
OWSP = ""
if mysqlserver then rs.CursorLocation = 3
rs.Open "SELECT * FROM orders WHERE ordID="&request.form("orderid"),cnn,1,3,&H0001
thesessionid = rs.Fields("ordSessionID")
rs.Fields("ordName") = trim(request.form("name"))
rs.Fields("ordAddress") = trim(request.form("address"))
if useaddressline2=TRUE then rs.Fields("ordAddress2") = trim(request.form("address2"))
rs.Fields("ordCity") = trim(request.form("city"))
rs.Fields("ordState") = trim(request.form("state"))
rs.Fields("ordZip") = trim(request.form("zip"))
rs.Fields("ordCountry") = trim(request.form("country"))
rs.Fields("ordEmail") = trim(request.form("email"))
rs.Fields("ordPhone") = trim(request.form("phone"))
rs.Fields("ordShipName") = trim(request.form("sname"))
rs.Fields("ordShipAddress") = trim(request.form("saddress"))
if useaddressline2=TRUE then rs.Fields("ordShipAddress2") = trim(request.form("saddress2"))
rs.Fields("ordShipCity") = trim(request.form("scity"))
rs.Fields("ordShipState") = trim(request.form("sstate"))
rs.Fields("ordShipZip") = trim(request.form("szip"))
rs.Fields("ordShipCountry") = trim(request.form("scountry"))
rs.Fields("ordShipType") = trim(request.form("shipmethod"))
rs.Fields("ordIP") = trim(request.form("ipaddress"))
ordComLoc=0
if Trim(request.form("commercialloc"))="Y" then ordComLoc = 1
if Trim(request.form("wantinsurance"))="Y" then ordComLoc = ordComLoc + 2
rs.Fields("ordComLoc") = ordComLoc
rs.Fields("ordAffiliate") = Trim(Request.Form("PARTNER"))
rs.Fields("ordAddInfo") = trim(Request.Form("ordAddInfo"))
rs.Fields("ordStatusInfo") = trim(Request.Form("ordStatusInfo"))
rs.Fields("ordDiscountText")= Trim(Request.Form("discounttext"))
rs.Fields("ordExtra1") = Trim(Request.Form("ordextra1"))
rs.Fields("ordExtra2") = Trim(Request.Form("ordextra2"))
rs.Fields("ordShipping") = getNumericField("ordShipping")
if canadataxsystem=true then rs.Fields("ordHSTTax") = getNumericField("ordHSTTax")
rs.Fields("ordStateTax") = getNumericField("ordStateTax")
rs.Fields("ordCountryTax") = getNumericField("ordCountryTax")
rs.Fields("ordDiscount") = getNumericField("ordDiscount")
rs.Fields("ordHandling") = getNumericField("ordHandling")
rs.Fields("ordAuthNumber") = Trim(Request.Form("ordAuthNumber"))
rs.Fields("ordTransID") = Trim(Request.Form("ordTransID"))
rs.Fields("ordTotal") = getNumericField("ordtotal")
rs.Update
rs.Close
for jj = 1 to Request.Form.Count
for each objElem in Request.Form
if Request.Form(objElem) is Request.Form(jj) then objForm = objElem
next
' response.write objForm & " : " & Request.Form(objForm) & " "
if Left(objForm,6)="prodid" then
idno = trim(right(objForm, Len(objForm)-6))
cartid = trim(request.form("cartid"&idno))
prodid = trim(request.form("prodid"&idno))
quant = trim(request.form("quant"&idno))
theprice = trim(request.form("price"&idno))
prodname = trim(request.form("prodname"&idno))
delitem = trim(request.form("del_"&idno))
if delitem="yes" then
cnn.Execute("DELETE FROM cart WHERE cartID=" & cartid)
cnn.Execute("DELETE FROM cartoptions WHERE coCartID=" & cartid)
cartid = ""
elseif cartid<>"" then
Session.LCID = 1033
sSQL = "UPDATE cart SET cartProdID='"&replace(prodid,"'","''")&"',cartProdPrice="&theprice&",cartProdName='"&replace(prodname,"'","''")&"',cartQuantity="&quant&" WHERE cartID="&cartid
cnn.Execute(sSQL)
Session.LCID = saveLCID
cnn.Execute("DELETE FROM cartoptions WHERE coCartID=" & cartid)
else
rs.Open "cart",cnn,1,3,&H0002
rs.AddNew
rs.Fields("cartSessionID") = thesessionid
rs.Fields("cartProdID") = prodid
rs.Fields("cartQuantity") = quant
rs.Fields("cartCompleted") = 1
rs.Fields("cartProdName") = prodname
rs.Fields("cartProdPrice") = theprice
rs.Fields("cartDateAdded") = DateAdd("h",dateadjust,Now())
rs.Fields("cartOrderID") = request.form("orderid")
rs.Update
if mysqlserver=true then
rs.Close
rs.Open "SELECT LAST_INSERT_ID() AS lstIns",cnn,0,1
cartid = rs("lstIns")
else
cartid = rs.Fields("cartID")
end if
rs.Close
end if
if cartid<>"" then
optprefix = "optn"&idno&"_"
prefixlen = len(optprefix)
for kk = 1 to Request.Form.Count
for each objElem in Request.Form
if Request.Form(objElem) is Request.Form(kk) then objForm = objElem
next
if Left(objForm,prefixlen)=optprefix then
optidarr = split(Request.Form(objForm),"|")
if UBOUND(optidarr) >= 0 then
optid = optidarr(0)
if Trim(Request.Form("v"&objForm))="" then
sSQL="SELECT optID,"&getlangid("optGrpName",16)&","&getlangid("optName",32)&","&OWSP&"optPriceDiff,optWeightDiff,optType,optFlags FROM options INNER JOIN optiongroup ON options.optGroup=optiongroup.optGrpID WHERE optID="&Replace(optid,"'","")
rs.Open sSQL,cnn,0,1
if abs(rs("optType"))<> 3 then
sSQL = "INSERT INTO cartoptions (coCartID,coOptID,coOptGroup,coCartOption,coPriceDiff,coWeightDiff) VALUES ("&cartID&","&rs("optID")&",'"&Replace(rs(getlangid("optGrpName",16))&"","'","''")&"','"&Replace(rs(getlangid("optName",32))&"","'","''")&"',"
sSQL = sSQL & optidarr(1) & ",0)"
else
sSQL = "INSERT INTO cartoptions (coCartID,coOptID,coOptGroup,coCartOption,coPriceDiff,coWeightDiff) VALUES ("&cartID&","&rs("optID")&",'"&Replace(rs(getlangid("optGrpName",16))&"","'","''")&"','',0,0)"
end if
rs.Close
cnn.Execute(sSQL)
else
sSQL="SELECT optID,"&getlangid("optGrpName",16)&","&getlangid("optName",32)&" FROM options INNER JOIN optiongroup ON options.optGroup=optiongroup.optGrpID WHERE optID="&replace(optid,"'","")
rs.Open sSQL,cnn,0,1
sSQL = "INSERT INTO cartoptions (coCartID,coOptID,coOptGroup,coCartOption,coPriceDiff,coWeightDiff) VALUES ("&cartID&","&rs("optID")&",'"&Replace(rs(getlangid("optGrpName",16))&"","'","''")&"','"&replace(trim(Request.Form("v"&objForm)),"'","''")&"',0,0)"
cnn.Execute(sSQL)
rs.Close
end if
end if
end if
next
end if
end if
next
%>
<%
elseif Request.QueryString("id")<>"" then
statetaxrate=0
countrytaxrate=0
hsttaxrate=0
countryorder=0
sSQL = "SELECT ordID,ordName,ordAddress,ordAddress2,ordCity,ordState,ordZip,ordCountry,ordEmail,ordPhone,ordShipName,ordShipAddress,ordShipAddress2,ordShipCity,ordShipState,ordShipZip,ordShipCountry,ordPayProvider,ordAuthNumber,ordTransID,ordTotal,ordDate,ordStateTax,ordCountryTax,ordShipping,ordShipType,ordIP,ordAffiliate,ordDiscount,ordDiscountText,ordHandling,ordComLoc,ordExtra1,ordExtra2,ordHSTTax,ordAddInfo FROM orders INNER JOIN payprovider ON payprovider.payProvID=orders.ordPayProvider WHERE ordID="&Request.QueryString("id")
rs.Open sSQL,cnn,0,1
if doedit then
Session.LCID = 1033
response.write ""
rs.Close
else
sSQL = "SELECT ordID FROM orders WHERE ordStatus=1"
if request.form("act")<>"purge" then sSQL = sSQL & " AND ordStatusDate<"&datedelim & VSUSDate(thedate - 3) & datedelim
rs.Open sSQL,cnn,0,1
do while NOT rs.EOF
theid = rs("ordID")
addcomma = ""
delOptions = ""
sSQL = "SELECT cartID FROM cart WHERE cartOrderID="&theid
rsl.Open sSQL,cnn,0,1
do while NOT rsl.EOF
delOptions = delOptions & addcomma & rsl("cartID")
addcomma = ","
rsl.MoveNext
loop
rsl.Close
if delOptions<>"" then cnn.Execute("DELETE FROM cartoptions WHERE coCartID IN ("&delOptions&")")
cnn.Execute("DELETE FROM cart WHERE cartOrderID="&theid)
cnn.Execute("DELETE FROM orders WHERE ordID="&theid)
rs.MoveNext
loop
rs.Close
if request.form("act")="authorize" then
do_stock_management(trim(request.form("id")))
if Trim(request.form("authcode"))<>"" then
sSQL = "UPDATE orders set ordAuthNumber='"&replace(Trim(request.form("authcode")),"'","''")&"',ordStatus=3 WHERE ordID="&request.form("id")
else
sSQL = "UPDATE orders set ordAuthNumber='"&replace(yyManAut,"'","''")&"',ordStatus=3 WHERE ordID="&request.form("id")
end if
cnn.Execute(sSQL)
cnn.Execute("UPDATE cart SET cartCompleted=1 WHERE cartOrderID="&request.form("id"))
elseif request.form("act")="status" then
maxitems=Int(request.form("maxitems"))
for index=0 to maxitems-1
iordid = Trim(request.form("ordid" & index))
ordstatus = Trim(request.form("ordstatus" & index))
ordauthno = ""
oldordstatus=999
rs.Open "SELECT ordStatus,ordAuthNumber,ordEmail,ordDate,"&getlangid("statPublic",64)&",ordStatusInfo,ordName FROM orders INNER JOIN orderstatus ON orders.ordStatus=orderstatus.statID WHERE ordID="&iordid,cnn,0,1
if NOT rs.EOF then
oldordstatus=rs("ordStatus")
ordauthno=rs("ordAuthNumber")
ordemail=rs("ordEmail")
orddate=rs("ordDate")
oldstattext=rs(getlangid("statPublic",64))&""
ordstatinfo=rs("ordStatusInfo")&""
ordername=rs("ordName")
end if
rs.Close
if NOT oldordstatus=999 AND (oldordstatus < 3 AND ordstatus >=3) then
' This is to force stock management
cnn.Execute("UPDATE cart SET cartCompleted=0 WHERE cartOrderID="&iordid)
do_stock_management(iordid)
cnn.Execute("UPDATE cart SET cartCompleted=1 WHERE cartOrderID="&iordid)
if ordauthno="" then cnn.Execute("UPDATE orders SET ordAuthNumber='"&replace(yyManAut,"'","''")&"' WHERE ordID=" & iordid)
end if
if NOT oldordstatus=999 AND (oldordstatus >=3 AND ordstatus < 3) then release_stock(iordid)
if iordid<>"" AND ordstatus<>"" then
if oldordstatus<>Int(ordstatus) AND request.form("emailstat")="1" then
rs.Open "SELECT "&getlangid("statPublic",64)&" FROM orderstatus WHERE statID=" & ordstatus,cnn,0,1
if NOT rs.EOF then newstattext = rs(getlangid("statPublic",64))&""
rs.Close
emailsubject = "Order status updated"
if orderstatussubject<>"" then emailsubject=orderstatussubject
ose = orderstatusemail
ose = replace(ose, "%orderid%", iordid)
ose = replace(ose, "%orderdate%", FormatDateTime(orddate, 1) & " " & FormatDateTime(orddate, 4))
ose = replace(ose, "%oldstatus%", oldstattext)
ose = replace(ose, "%newstatus%", newstattext)
ose = replace(ose, "%date%", FormatDateTime(DateAdd("h",dateadjust,Now()), 1) & " " & FormatDateTime(DateAdd("h",dateadjust,Now()), 4))
ose = replace(ose, "%statusinfo%", ordstatinfo)
ose = replace(ose, "%ordername%", ordername)
ose = replace(ose, "%nl%", emlNl)
Call DoSendEmailEO(ordemail,emailAddr,"",emailsubject,ose,emailObject,themailhost,theuser,thepass)
end if
if oldordstatus<>Int(ordstatus) then cnn.Execute("UPDATE orders SET ordStatus=" & ordstatus & ",ordStatusDate=" & datedelim & VSUSDateTime(DateAdd("h",dateadjust,Now())) & datedelim & " WHERE ordID=" & iordid)
end if
next
end if
if Request("sd") = "" then sd=thedate else sd=Request("sd")
if Request("ed") = "" then ed=thedate else ed=Request("ed")
on error resume next
sd = DateValue(sd)
ed = DateValue(ed)
if err.number <> 0 then
sd = thedate
ed = thedate
success=false
errmsg=yyDatInv
end if
on error goto 0
if ed < sd then ed = sd
if request.form("powersearch")="1" then
sSQL = "SELECT ordID,ordName,payProvName,ordAuthNumber,ordDate,ordStatus,(ordTotal-ordDiscount) FROM orders INNER JOIN payprovider ON payprovider.payProvID=orders.ordPayProvider WHERE ordStatus>=0 "
fromdate = Trim(request.form("fromdate"))
todate = Trim(request.form("todate"))
ordid = Trim(Replace(Replace(request.form("ordid"),"'",""),"""",""))
origsearchtext = Trim(Replace(request.form("searchtext"),"""","""))
searchtext = Trim(Replace(request.form("searchtext"),"'","''"))
ordstatus = Trim(request.form("ordstatus"))
if ordid<>"" then
if IsNumeric(ordid) then
sSQL = sSQL & " AND ordID=" & ordid
else
success=false
errmsg="The order id you specified seems to be invalid - " & ordid
sSQL = sSQL & " AND ordID=0"
end if
else
if fromdate<>"" then
if IsNumeric(fromdate) then
thefromdate = (thedate-fromdate)
else
err.number=0
on error resume next
thefromdate = DateValue(fromdate)
if err.number <> 0 then
thefromdate = thedate
success=false
errmsg=yyDatInv & " - " & fromdate
end if
on error goto 0
end if
if todate="" then
thetodate = thefromdate
elseif IsNumeric(todate) then
thetodate = (thedate-todate)
else
err.number=0
on error resume next
thetodate = DateValue(todate)
if err.number <> 0 then
thetodate = thedate
success=false
errmsg=yyDatInv & " - " & todate
end if
on error goto 0
end if
if thefromdate > thetodate then
tmpdate = thetodate
thetodate = thefromdate
thefromdate = tmpdate
end if
sd = thefromdate
ed = thetodate
sSQL = sSQL & " AND ordDate BETWEEN " & datedelim & VSUSDate(thefromdate) & datedelim & " AND " & datedelim & VSUSDate(thetodate+1) & datedelim
end if
if ordstatus<>"" AND NOT InStr(ordstatus,"9999")>0 then sSQL = sSQL & " AND ordStatus IN (" & ordstatus & ")"
if searchtext<>"" then sSQL = sSQL & " AND (ordTransID LIKE '%"&searchtext&"%' OR ordAuthNumber LIKE '%"&searchtext&"%' OR ordName LIKE '%"&searchtext&"%' OR ordEmail LIKE '%"&searchtext&"%' OR ordAddress LIKE '%"&searchtext&"%' OR ordCity LIKE '%"&searchtext&"%' OR ordState LIKE '%"&searchtext&"%' OR ordZip LIKE '%"&searchtext&"%' OR ordPhone LIKE '%"&searchtext&"%')"
end if
sSQL = sSQL & " ORDER BY ordID"
else
sSQL = "SELECT ordID,ordName,payProvName,ordAuthNumber,ordDate,ordStatus,(ordTotal-ordDiscount) FROM orders INNER JOIN payprovider ON payprovider.payProvID=orders.ordPayProvider WHERE ordStatus<>1 AND ordDate BETWEEN "&datedelim & VSUSDate(DateValue(sd)) & datedelim&" AND "&datedelim & VSUSDate(DateValue(ed)+1) & datedelim&" ORDER BY ordID"
end if
rs.Open sSQL,cnn,0,1
alldata = ""
if NOT rs.EOF then alldata=rs.getrows
rs.Close
hasdeleted=false
sSQL = "SELECT COUNT(*) AS NumDeleted FROM orders WHERE ordStatus=1"
rs.Open sSQL,cnn,0,1
if rs("NumDeleted") > 0 then hasdeleted=true
rs.Close
%>
<% themask = cStr(DateSerial(2003,12,11))
themask = replace(themask,"2003","yyyy")
themask = replace(themask,"12","mm")
themask = replace(themask,"11","dd")
if NOT success then response.write "
"&errmsg&"
" %>
>
<%=yyPowSea%>
<%=yyOrdFro%>:
<%=yyOrdTil%>:
<%=yyOrdId%>:
<%=yySeaTxt%>:
<%=yyOrdSta%>:
/> <%=yyStaPow%>
<%=yyShoFrm%>:<%=yyTo%>:
<%=yyOrdId%>
<%=yyName%>
<%=yyMethod%>
<%=yyAutCod%>
<%=yyDate%>
<%=yyStatus%>
<% if request.form("powersearch")="1" then %>
" />
" />
" />
" />
" />
" />
" />
<% end if %>
<% ordTot=0
if IsArray(alldata) then
for rowcounter=0 to UBOUND(alldata,2)
if alldata(5,rowcounter)>=3 then ordTot=ordTot+alldata(6,rowcounter)
if alldata(3,rowcounter)="" OR IsNull(alldata(3,rowcounter)) then
startfont=""
endfont=""
else
startfont=""
endfont=""
end if
if bgcolor="#E7EAEF" then bgcolor="#EAECEB" else bgcolor="#E7EAEF"
%>
<%
if alldata(3,rowcounter)="" OR IsNull(alldata(3,rowcounter)) then
isauthorized=false
response.write ""
else
isauthorized=true
response.write "" & startfont & alldata(3,rowcounter) & endfont & ""
end if %>
Limit of "&rowcounter&" orders reached. Please refine your search.
"
exit for
end if
next %>
<%=FormatEuroCurrency(ordTot)%>
<% if hasdeleted then %><% end if %>
<%if orderstatusemail<>"" then %> /> <%=yyEStat%><% end if %>
<% if request.form("powersearch")="1" then %>
" />
" />
" />
" />
" />
" />
" />
<% end if %>
<% else %>
<%
if request.form("powersearch")="1" then
response.write yyNoMat1
elseif sd=ed then
response.write yyNoMat2&" "&sd&"."
else
response.write yyNoMat3&" "&sd&" and "&ed&"."
end if %>