%
'************************************************************************
' 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 "
"
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")%> |
|
"
%>