<%Option explicit%> <% '******************************************************* ' VP-ASP 6.50 Gift validation ' Jan 5, 2003 ' March 26, 2004 '******************************************************* dim sAction, Coupon ShopPageHeader if getconfig("xbreadcrumbs") = "Yes" then response.write "
" & getlang("langcommonhome") & " " &_ SubCatSeparator & "" & getlang("langCustAdmin01") & "" &_ SubCatSeparator & getlang("langgiftcertificate") & "
" end if response.write "

" & getlang("langgiftcertificate") & "

" 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("
") if request("howmuch") <> "" then response.write "" end if shopwriteheaderpic getlang("langGiftEnter"),"images/icons/chest.gif" Response.Write "
" Response.Write(TableDef) Response.Write("" & xTablerowfont & getlang("LangGiftCertificate") & "") Response.Write("") addwebsessform Response.Write "
" Response.Write "
" If Getconfig("xbuttoncontinue")="" then Response.Write("") else Response.Write("") end if Response.Write "
" 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 dim toWrite if request("howmuch") <> "" then shopwriteheader getlang("langGiftRemain") else shopwriteheader getlang("LangGiftAccepted") SetSess("Giftcertificate"),strgiftcertificate toWrite = getlang("LangStatusAmount") & " = " end if dim amount amount=getsess("giftamountmax") If amount<>"" then amount=shopformatcurrency(amount,getconfig("xdecimalpoint")) shopwriteerror toWrite & amount end if end sub %>