<% '************************************************************************ ' displays all currencies available ' VP-ASP 6.50 ' June 29, 2005 HK '*********************************************************************** dim currenturl, url dim rs dim dbc currenturl="shopcurrency.asp" 'response.write getsess("returnurl") ''response.end 'VP-ASP 6.08 - wasn't redirecting correctly after change 'if (getsess("returnurl") = "") OR (right(getsess("returnurl"), len(getsess("returnurl")) - instrrev(getsess("returnurl"), "/")) = currenturl) then ' if request.ServerVariables("HTTP_REFERER") > "" then ' setsess "returnurl", request.ServerVariables("HTTP_REFERER") ' else ' end if 'end if ShopOpendatabase dbc If Request("cid")<>"" then 'VP-ASP 6.08a - Security fix sql="select * from currencyvalues where cid= '" & CleanChars(Request("CID")) & "'" debugwrite sql set rs=dbc.execute(sql) if not rs.eof then SetSess "CID",rs("cid") setSess "Fullunitname",rs("fullunitname") SetSess "Conversionvalue",rs("conversionvalue") SetSess "Newcurrencysymbol",rs("currencysymbol") SetSess "flagimage",rs("theimage") else debugwrite "not found" & request("cid") end if closerecordset rs shopclosedatabase dbc Call SetCurrency(GetSess("CID"),false) 'VP-ASP 6.50 - possible to choose currency from dropdown on any page, rather than having to come to shopcurrency.asp first if request.querystring("goback") = "yes" then Getreturnurl url else Getreturnurl_old url end if 'response.write url Responseredirect url else shoppageheader 'VP-ASP 6.09 - added breadcrumb / VP-ASP 6.50 - added config option to turn breadcrumb on/off if getconfig("xbreadcrumbs") = "Yes" then response.write "
" & getlang("langcommonhome") & " " & SubCatSeparator & getlang("langchangecurrency") & "
" end if DisplayForm shoppagetrailer end if ShopClosedatabase dbc Sub DisplayForm dim Fullunitname dim newrow newrow=true 'VP-ASP 6.08 - IF statement to handle different databases if (ucase(xdatabasetype)="SQLSERVER") or (getconfig("xmysql")="Yes") OR (instr(ucase(xdatabasetype), "MYSQL") > 0) then sql="select * from currencyvalues where theimage is not null AND hide = 0 order by fullunitname" else sql="select * from currencyvalues where theimage is not null AND hide = FALSE order by fullunitname" end if %>

<%=getlang("langcurrpage01")%>

<%=GetSess("Fullunitname")%> <%=getlang("langcurrpage02")%>
<%=getlang("langcurrpage03")%>
<% set rs=dbc.execute(sql) Do while not rs.eof Fullunitname=rs("fullunitname") if newrow=true then response.write "" newrow=false else newrow=true end if 'VP-ASP 6.50 - advanced session handling %><% if newrow=true then response.write "" end if rs.MoveNext Loop closerecordset rs response.write "
&VAT=False<%=addwebsesslink%>">" alt="<%=Fullunitname%>" />
<%=Fullunitname%>
" %>
<%'VP-ASP 6.50 - advanced session handling addwebsessform%>
<% If Getconfig("xbuttoncontinue")="" Then %> " /> <% else %> " /> <% end if %>
<% End Sub 'VP-ASP 6.50 - possible to choose currency from dropdown on any page, rather than having to come to shopcurrency.asp first Sub getreturnurl_old (url) 'VP-ASP 6.08 - wasn't redirecting correctly after change 'url=getsess("currenturl") url=GetSess("convertBackBackpage") if url="" then url=getconfig("xhome") end if 'VP-ASP 6.09b if instr(url, "shopcurrency.asp") > 0 then url = "shopcurrency.asp" end if end sub 'VP-ASP 6.50 - possible to choose currency from dropdown on any page, rather than having to come to shopcurrency.asp first sub getreturnurl (url) gotourl=getsess("convertbackpage") if request.QueryString > "" then delimiter = "?" theQuerystring = split(request.QueryString, "&") for each thing in theQueryString if len(thing) > 0 then if left(thing, instr(thing, "=") - 1) <> "CID" AND left(thing, instr(thing, "=") - 1) <> "goback" then goToQS = goToQS & delimiter & thing if delimiter = "?" then delimiter = "&" end if end if next end if gotourl = gotourl & goToQS if gotourl="" then gotourl="shopdisplaycategories.asp" end if select case gotourl case "shopdisplayproducts.asp" If getsess("pagenumber")<>"" then gotourl="shopdisplayproducts.asp?page=" & getsess("pagenumber") end if end select if instr(gotourl, "shopcurrency.asp") > 0 then gotourl = "shopcurrency.asp" end if url = gotourl end sub %>