%Option explicit%>
<%
'*******************************************************
' Customer Service Menu
' VP-ASP Version 5,0 April 20, 2003
' add more menus at the botom of this code
' Demo Version
'*******************************************************
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
shopwriteerror SError
Serror=""
end if
if Infomsg<> "" then
shopwriteerror 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 & getlang("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 & vbcrlf
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 ("" & getlang("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 getlang("langAdminLogin"),"shopcustadminlogin.asp", LoginFlag
AddMenuItem getlang("langSaveCartPrompt"),"shopsavecart.asp", getconfig("xAllowSaveCart")
AddMenuItem getlang("langCustAdminStatus"),"shopstatus.asp", getconfig("xAllowReviewOrders")
AddMenuItem getlang("langCouponDiscount"),"shopcustadmincoupon.asp",getconfig("xAllowCoupons")
AddMenuItem getlang("langGiftRedeem"),"shopcustadmingift.asp", getconfig("xGiftCertificates")
AddMenuItem getlang("langGiftBuy"),"shopgift.asp", getconfig("xGiftCertificates")
AddmenuItem getlang("langCustAdminDetails"),"shopcustupdate.asp",getconfig("xAllowCustomerUpdates")
AddMenuItem getlang("langLoginForgot"),"shopmailpwd.asp", getconfig("xPassword")
AddMenuItem getlang("langMaillistSubject"),"shopcustregister.asp", getconfig("xAllowcustomerregister")
AddMenuItem getlang("langCustAdminMailList"),"shopmaillist.asp", getconfig("xAllowMailList")
AddMenuItem getlang("langSupplierAdmin"),"shopsupplierregister.asp", getconfig("xAllowSupplierRegister")
AddMenuItem getlang("langGiftRegistry"),"shopgiftregadmin.asp", getconfig("xgiftregistry")
AddMenuItem getlang("langContactus"),"shopcustcontact.asp", getconfig("xcontactform")
AddMenuItem getlang("langWishList") & " " & getlang("langcommonView"),"shopsaveperm.asp", getconfig("xwishlist")
menucount=menucount-1
end sub
%>