%@ Language=VBScript %> <% '************************************************************************* ' DO NOT MODIFY THIS SCRIPT IF YOU WANT UPDATES TO WORK! ' Function : Modify Store General Settings ' Product : CandyPress Store Frontend ' Version : 2.5 ' Modified : February 2004 ' Copyright: Copyright (C) 2004 CandyPress.Com ' See "license.txt" for this product for details regarding ' licensing, usage, disclaimers, distribution and general ' copyright requirements. If you don't have a copy of this ' file, you may request one at webmaster@candypress.com '************************************************************************* Option explicit Response.Buffer = true const adminLevel = 0 %> <% 'Config Variables dim urlNonSSL,urlSSL,pDownloadDir,pImagesDir,mailComp dim pSMTPServer,pEmailSales,pEmailAdmin,pCompany,pCatalogOnly dim pMaxCartQty,prodViewLayout,pHidePricingZero,pMaxItemQty dim pMinCartAmount,pMaxItemsPerPage,pOrderPrefix,pCurrencySign dim pStoreLCID,pShowStockView,pMailIn,pPayPal,payPalMemberID dim pCreditCard,pCCType,pAuthNet,authNetLogin,authNetCurrCode dim payMsgMailIn,payMsgCreditCard,payMsgPayPal,payMsgOther dim payMsgNotReq,shipDisplayType,TwoCheckOut,TwoCheckOutSID dim payMsgTwoCheckOut,pEmailFriendSec,pMaxDownloadHours dim pMaxDownloadCount,payDefault,pAuthNetFrontEnd,payMsgAuthNet dim pCompanyAddr,TwoCheckoutMD5,pHideAddStockLevel,payCustom dim payMsgCustom,taxOnShipping,allowShipAddr,defaultCountryCode dim listViewLayout,payCallIn,payFaxIn,PayCOD,statUpdPending dim payMsgCallIn,payMsgFaxIn,payMsgCOD,taxBillOrShip dim handlingFeeAmt,handlingFeeTax,payPalCurrCode,authNetTxKey dim homeViewLayout,pEmailStockLevel,pAuthNetType,pHTMLarea dim pProdThumbs,homeViewRandom,timeOffSet,feeMailIn,feeCallIn dim feeFaxIn,feeCOD,feeOffCC,feePayPal,fee2CO,feeAuthNet,feeCustom dim categoryLayout,MSXMLprogID,XMLDOMprogID,hideAddOnProdList dim useSecureDownload 'Database variables dim mySQL, cn, rs '************************************************************************* 'Open Database call openDb() 'Get current configuration settings from database mySQL = "SELECT configVar, configVal " _ & "FROM storeAdmin " _ & "WHERE adminType = 'C'" set rs = openRSexecute(mySQL) do while not rs.EOF select case trim(lCase(rs("configVar"))) case lCase("urlNonSSL") urlNonSSL = rs("configVal") case lCase("urlSSL") urlSSL = rs("configVal") case lCase("pDownloadDir") pDownloadDir = rs("configVal") case lCase("pImagesDir") pImagesDir = rs("configVal") case lCase("mailComp") mailComp = rs("configVal") case lCase("pSMTPServer") pSMTPServer = rs("configVal") case lCase("pEmailSales") pEmailSales = rs("configVal") case lCase("pEmailAdmin") pEmailAdmin = rs("configVal") case lCase("pCompany") pCompany = rs("configVal") case lCase("pCatalogOnly") pCatalogOnly = rs("configVal") case lCase("pHidePricingZero") pHidePricingZero = rs("configVal") case lCase("pMaxCartQty") pMaxCartQty = rs("configVal") case lCase("pMaxItemQty") pMaxItemQty = rs("configVal") case lCase("pMinCartAmount") pMinCartAmount = rs("configVal") case lCase("pMaxItemsPerPage") pMaxItemsPerPage = rs("configVal") case lCase("pOrderPrefix") pOrderPrefix = rs("configVal") case lCase("pCurrencySign") pCurrencySign = rs("configVal") case lCase("pStoreLCID") pStoreLCID = rs("configVal") case lCase("pShowStockView") pShowStockView = rs("configVal") case lCase("pMailIn") pMailIn = rs("configVal") case lCase("pPayPal") pPayPal = rs("configVal") case lCase("payPalMemberID") payPalMemberID = rs("configVal") case lCase("TwoCheckOut") TwoCheckOut = rs("configVal") case lCase("TwoCheckOutSID") TwoCheckOutSID = rs("configVal") case lCase("pCreditCard") pCreditCard = rs("configVal") case lCase("pCCType") pCCType = rs("configVal") case lCase("pAuthNet") pAuthNet = rs("configVal") case lCase("authNetLogin") authNetLogin = rs("configVal") case lCase("authNetCurrCode") authNetCurrCode = rs("configVal") case lCase("payMsgMailIn") payMsgMailIn = rs("configVal") case lCase("payMsgCreditCard") payMsgCreditCard = rs("configVal") case lCase("payMsgPayPal") payMsgPayPal = rs("configVal") case lCase("payMsgTwoCheckOut") payMsgTwoCheckOut = rs("configVal") case lCase("payMsgOther") payMsgOther = rs("configVal") case lCase("payMsgNotReq") payMsgNotReq = rs("configVal") case lCase("pEmailFriendSec") pEmailFriendSec = rs("configVal") case lCase("pMaxDownloadHours") pMaxDownloadHours = rs("configVal") case lCase("pMaxDownloadCount") pMaxDownloadCount = rs("configVal") case lCase("payDefault") payDefault = rs("configVal") case lCase("pAuthNetFrontEnd") pAuthNetFrontEnd = rs("configVal") case lCase("pCompanyAddr") pCompanyAddr = rs("configVal") case lCase("payMsgAuthNet") payMsgAuthNet = rs("configVal") case lCase("TwoCheckoutMD5") TwoCheckoutMD5 = rs("configVal") case lCase("pHideAddStockLevel") pHideAddStockLevel = rs("configVal") case lCase("payCustom") payCustom = rs("configVal") case lCase("payMsgCustom") payMsgCustom = rs("configVal") case lCase("taxOnShipping") taxOnShipping = rs("configVal") case lCase("allowShipAddr") allowShipAddr = rs("configVal") case lCase("prodViewLayout") prodViewLayout = rs("configVal") case lCase("shipDisplayType") shipDisplayType = rs("configVal") case lCase("defaultCountryCode") defaultCountryCode = rs("configVal") case lCase("payCallIn") payCallIn = rs("configVal") case lCase("payFaxIn") payFaxIn = rs("configVal") case lCase("payCOD") payCOD = rs("configVal") case lCase("payMsgCallIn") payMsgCallIn = rs("configVal") case lCase("payMsgFaxIn") payMsgFaxIn = rs("configVal") case lCase("payMsgCOD") payMsgCOD = rs("configVal") case lCase("listViewLayout") listViewLayout = rs("configVal") case lCase("taxBillOrShip") taxBillOrShip = rs("configVal") case lCase("statUpdPending") statUpdPending = rs("configVal") case lCase("handlingFeeAmt") handlingFeeAmt = rs("configVal") case lCase("handlingFeeTax") handlingFeeTax = rs("configVal") case lCase("payPalCurrCode") payPalCurrCode = rs("configVal") case lCase("authNetTxKey") authNetTxKey = rs("configVal") case lCase("homeViewLayout") homeViewLayout = rs("configVal") case lCase("pEmailStockLevel") pEmailStockLevel = rs("configVal") case lCase("pAuthNetType") pAuthNetType = rs("configVal") case lCase("pHTMLarea") pHTMLarea = rs("configVal") case lCase("pProdThumbs") pProdThumbs = rs("configVal") case lCase("homeViewRandom") homeViewRandom = rs("configVal") case lCase("timeOffSet") timeOffSet = rs("configVal") case lCase("feeMailIn") feeMailIn = rs("configVal") case lCase("feeCallIn") feeCallIn = rs("configVal") case lCase("feeFaxIn") feeFaxIn = rs("configVal") case lCase("feeCOD") feeCOD = rs("configVal") case lCase("feeOffCC") feeOffCC = rs("configVal") case lCase("feePayPal") feePayPal = rs("configVal") case lCase("fee2CO") fee2CO = rs("configVal") case lCase("feeAuthNet") feeAuthNet = rs("configVal") case lCase("feeCustom") feeCustom = rs("configVal") case lCase("categoryLayout") categoryLayout = rs("configVal") case lCase("MSXMLprogID") MSXMLprogID = rs("configVal") case lCase("XMLDOMprogID") XMLDOMprogID = rs("configVal") case lCase("hideAddOnProdList") hideAddOnProdList = rs("configVal") case lCase("useSecureDownload") useSecureDownload = rs("configVal") end select rs.MoveNext loop call closeRS(rs) 'Close Database call closedb() 'If the config file (or some of the fields in it) is empty (as would 'be the case for users who created their own database), then 'pre-populate some fields with default values. if isNull(urlNonSSL) or isEmpty(urlNonSSL) then urlNonSSL = "http://localhost/CandyPress/Scripts/" end if if isNull(urlSSL) or isEmpty(urlSSL) then urlSSL = "https://localhost/CandyPress/Scripts/" end if if isNull(pDownloadDir) or isEmpty(pDownloadDir) then pDownloadDir = "../Downloads/" end if if isNull(pImagesDir) or isEmpty(pImagesDir) then pImagesDir = "../ProdImages/" end if if isNull(pMaxCartQty) or isEmpty(pMaxCartQty) then pMaxCartQty = 30 end if if isNull(pMaxItemQty) or isEmpty(pMaxItemQty) then pMaxItemQty = 20 end if if isNull(pMinCartAmount) or isEmpty(pMinCartAmount) then pMinCartAmount = 0 end if if isNull(pMaxItemsPerPage) or isEmpty(pMaxItemsPerPage) then pMaxItemsPerPage = 5 end if if isNull(pOrderPrefix) or isEmpty(pOrderPrefix) then pOrderPrefix = "CP" end if if isNull(pCurrencySign) or isEmpty(pCurrencySign) then pCurrencySign = "$" end if if isNull(pStoreLCID) or isEmpty(pStoreLCID) then pStoreLCID = "1033" end if if isNull(pMaxDownloadHours) or isEmpty(pMaxDownloadHours) then pMaxDownloadHours = 0 end if if isNull(pMaxDownloadCount) or isEmpty(pMaxDownloadCount) then pMaxDownloadCount = 0 end if if isNull(pHideAddStockLevel) or isEmpty(pHideAddStockLevel) then pHideAddStockLevel = -1 end if if isNull(pEmailStockLevel) or isEmpty(pEmailStockLevel) then pEmailStockLevel = -1 end if if isNull(handlingFeeAmt) or isEmpty(handlingFeeAmt) then handlingFeeAmt = 0 end if if isNull(payMsgMailIn) or isEmpty(payMsgMailIn) then payMsgMailIn = "Mail-In" end if if isNull(payMsgCallIn) or isEmpty(payMsgCallIn) then payMsgCallIn = "Call-In" end if if isNull(payMsgFaxIn) or isEmpty(payMsgFaxIn) then payMsgFaxIn = "Fax-In" end if if isNull(payMsgCOD) or isEmpty(payMsgCOD) then payMsgCOD = "COD" end if if isNull(payMsgCreditCard) or isEmpty(payMsgCreditCard) then payMsgCreditCard = "CreditCard" end if if isNull(payMsgPayPal) or isEmpty(payMsgPayPal) then payMsgPayPal = "PayPal" end if if isNull(payMsgTwoCheckOut) or isEmpty(payMsgTwoCheckOut) then payMsgTwoCheckOut = "2CheckOut" end if if isNull(payMsgAuthNet) or isEmpty(payMsgAuthNet) then payMsgAuthNet = "Authorize.Net" end if if isNull(payMsgCustom) or isEmpty(payMsgCustom) then payMsgCustom = "Custom Payment" end if if isNull(payMsgOther) or isEmpty(payMsgOther) then payMsgOther = "Undetermined" end if if isNull(payMsgNotReq) or isEmpty(payMsgNotReq) then payMsgNotReq = "Payment Not Required" end if if isNull(homeViewRandom) or isEmpty(homeViewRandom) then homeViewRandom = -1 end if if isNull(timeOffSet) or isEmpty(timeOffSet) then timeOffSet = 0 end if if isNull(feeMailIn) or isEmpty(feeMailIn) then feeMailIn = 0 end if if isNull(feeCallIn) or isEmpty(feeCallIn) then feeCallIn = 0 end if if isNull(feeFaxIn) or isEmpty(feeFaxIn) then feeFaxIn = 0 end if if isNull(feeCOD) or isEmpty(feeCOD) then feeCOD = 0 end if if isNull(feeOffCC) or isEmpty(feeOffCC) then feeOffCC = 0 end if if isNull(feePayPal) or isEmpty(feePayPal) then feePayPal = 0 end if if isNull(fee2CO) or isEmpty(fee2CO) then fee2CO = 0 end if if isNull(feeAuthNet) or isEmpty(feeAuthNet) then feeAuthNet = 0 end if if isNull(feeCustom) or isEmpty(feeCustom) then feeCustom = 0 end if if isNull(MSXMLprogID) or isEmpty(MSXMLprogID) then MSXMLprogID = "MSXML2.ServerXMLHTTP" end if if isNull(XMLDOMprogID) or isEmpty(XMLDOMprogID) then XMLDOMprogID = "Microsoft.XMLDOM" end if %>
Store Configuration
<% '********************************************************************** 'Display Text Configuration Settings '********************************************************************** sub dispTextConfig(Description,Size,MaxLength,Name,Value) %>