<%Option explicit%> <% '******************************************************* ' Customer Service Menu ' VP-ASP Version 4.00 November 27, 2001 ' add more menus at the botom of this code ' '******************************************************* Dim menus(20), urls(20), menucount Dim loginError, infomsg Dim NumProc dim LoginFlag NumProc = 0 Infomsg=request("msg") Shopinit If GetSess("CustomerLoginCID")="" then Setsess("Customerlogincid"),getsess("Customerid") end if SetSess "CurrentUrl","shopcustadmin.asp" ShopPageHeader Checklogin loginflag SetupMenus if sError<> "" then response.write getconfig("xfont") & "" & SError & "

" Serror="" end if if Infomsg<> "" then response.write getconfig("xfont") & "" & Infomsg & "

" Infomsg="" end if AddMenu AddNewUser ShopPageTrailer Sub Checklogin (loginflag) LoginFlag="Yes" If GetSess("Customerid")<>"" and Getsess("Lastname") <>"" then If getsess("Customerlogincid")="" then SetSess "CustomerLoginCID",Getsess("Customerid") Loginflag="No" else Loginflag="No" end if end if end sub '********************************************************************** ' Version 3.00 ' Shopadmin.asp forces relogin ' shopadmin1.asp (this routine checks to see if you are already logdded in '*********************************************************************** '******** Display table Sub AddMenu dim i FormatHeader For i = 0 to menucount Formatrow Menus(i), urls(i) next FormatTrailer end sub ' Sub FormatHeader Response.write "
" & Custadmintable Response.write CustAdminHeaderRow Response.write CustAdminHeaderFont & LangCustAdmin01 & CustAdminHeaderEnd end sub ' Sub FormatRow (name, url) NumProc=Numproc+1 response.write CustAdminRow Response.write CustAdminNumColumn & NumProc & "." & CustAdminNumEnd Response.write CustAdminColumn & "" & CustAdminFont & name & "" & CustAdminColumnEnd end sub ' Sub FormatTrailer %>

<% end sub ' Sub AddMenuItem (caption, url, flag) If flag<>"Yes" then exit sub menus(menucount)=caption urls(menucount)=url menucount=menucount+1 end sub ' Sub addnewUser response.write ("

" & LangLogin02 & "

") end sub Sub SetUpMenus '*********************************************************************** ' First field is the caption the customer sees ' Second is URL to go to ' Third is "Yes" (case sensitive) If Yes menu is displayed '************************************************************************ menucount=0 AddMenuItem LangAdminLogin,"shopcustadminlogin.asp", LoginFlag AddMenuItem LangSaveCartPrompt,"shopsavecart.asp", getconfig("xAllowSaveCart") AddMenuItem LangCustAdminStatus,"shopstatus.asp", getconfig("xAllowReviewOrders") AddMenuItem LangCouponDiscount,"shopcustadmincoupon.asp",getconfig("xAllowCoupons") AddMenuItem LangGiftRedeem,"shopcustadmingift.asp", getconfig("xGiftCertificates") AddMenuItem LangGiftBuy,"shopgift.asp", getconfig("xGiftCertificates") AddmenuItem LangCustAdminDetails,"shopcustupdate.asp",getconfig("xAllowCustomerUpdates") AddMenuItem LangLoginForgot,"shopmailpwd.asp", getconfig("xPassword") AddMenuItem LangMaillistSubject,"shopcustregister.asp", getconfig("xAllowcustomerregister") AddMenuItem LangCustAdminMailList,"shopmaillist.asp", getconfig("xAllowMailList") AddMenuItem LangSupplierAdmin,"shopsupplierregister.asp", getconfig("xAllowSupplierRegister") AddMenuItem LangGiftRegistry,"shopgiftregadmin.asp", getconfig("xgiftregistry") menucount=menucount-1 end sub %>