<%Option explicit%> <% '******************************************************* ' VP-ASP 6.50 Gift validation ' Jan 5, 2003 ' March 26, 2004 '******************************************************* dim sAction, Coupon ShopPageHeader Saction=Request("Action") if sAction="" then Saction=Request("Action.x") end if If saction="" then AddForm else HandleAction If Serror="" then WriteInfoMessage else addForm end if end if ShopPageTrailer ' Sub AddForm if sError<> "" then Response.write errorfontstart & sError & errorfontend & "
" Serror="" end if strGiftCertificate=Getsess("GiftCertificate") Response.Write("
") Response.Write("
" & largeinfofont & getlang("LangGiftEnter") & largeinfoend) Response.Write(TableDef) Response.Write("" & xTablerowfont & getlang("LangGiftCertificate") & "") Response.Write("

") If Getconfig("xbuttoncontinue")="" then Response.Write("") else Response.Write("") end if addwebsessform Response.Write("

") end sub Sub HandleAction dim rc 'VP-ASP 6.50 - precautionary security fix strgiftcertificate=cleanchars(request("strgiftcertificate")) if strgiftcertificate="" then Serror= getlang("LangGiftCertificate") & " " & getlang("Langcustrequired") exit sub end if ShopvalidateGiftCertificate strgiftcertificate, Serror 'Debugwrite "return=" & serror end sub Sub WriteInfoMessage shopwriteheader getlang("LangGiftAccepted") if request.querystring("howmuch") = "" then SetSess("Giftcertificate"),strgiftcertificate end if dim amount amount=getsess("giftamountmax") If amount<>"" then amount=shopformatcurrency(amount,getconfig("xdecimalpoint")) shopwriteerror getlang("LangStatusAmount") & " = " & amount end if end sub %>