% '----------General section------------ CURRENT_VERSION = ("2550") CURRENT_STYLE = ("") FormAction = ("Administrator.asp") ScriptRelativeFolder = ("WebStore\Administration") pos=InstrRev(LCase(Request.ServerVariables("PATH_TRANSLATED")),LCase(ScriptRelativeFolder) & "\" & LCase(FormAction)) BS_Root = Left(Request.ServerVariables("PATH_TRANSLATED"), pos-1 ) DB_Path =BS_Root & "\" ScriptFolderAddress =BS_Root & "\" & ScriptRelativeFolder & "\" URL =Request.ServerVariables("URL") SERVER_NAME=Request.ServerVariables("SERVER_NAME") ScriptAbsoluteUrl="http://"&SERVER_NAME&URL ScriptRelativeFolder = ("WebStore/Administration") pos=InstrRev(LCase(ScriptAbsoluteUrl),LCase(ScriptRelativeFolder) & "/" & LCase(FormAction)) BS_Root_URL = Left(ScriptAbsoluteUrl, pos-1) CurrentFolder = BS_Root_URL &ScriptRelativeFolder& "/" bHeaderFired = FALSE 'Enumeration Of Shipping Payment Methods '==========Enumeration Of Payment Methods============= FRSC = 1 'Flat rate shipping cost CPI = 2 'Cost per item FRPW = 3 'Fixed rate per weight (Kg or lb.) POFS = 4 'Percentage of sales '==========Constants============= '---- CursorTypeEnum Values ---- Const adOpenForwardOnly = 0 Const adOpenKeyset = 1 Const adOpenDynamic = 2 Const adOpenStatic = 3 '---- LockTypeEnum Values ---- Const adLockReadOnly = 1 Const adLockPessimistic = 2 Const adLockOptimistic = 3 Const adLockBatchOptimistic = 4 '=========End of Section=========== '----------Parameters section------------ Parameter_184 = Request("name") if Request("name")= "" Then Parameter_184 = "" 'Default value else if Request("name").Count = 1 then Parameter_184 = Request("name") end if end if Parameter_185 = Request("password") if Request("password")= "" Then Parameter_185 = "" 'Default value else if Request("password").Count = 1 then Parameter_185 = Request("password") end if end if Parameter_134 = Request("error") if Request("error")= "" Then Parameter_134 = "" 'Default value else if Request("error").Count = 1 then Parameter_134 = Request("error") end if end if Parameter_91 = Request("Login") if Request("Login")= "" Then Parameter_91 = "" 'Default value else if Request("Login").Count = 1 then Parameter_91 = Request("Login") end if end if '----------Variables section------------ Dim VarArray(9,0) VarNum = 10 'Initialization of Vars Variable_255 = "" 'Initial value Variable_436 = "" 'Initial value Variable_437 = "" 'Initial value Variable_438 = "" 'Initial value Variable_439 = "" 'Initial value Variable_440 = "" 'Initial value Variable_441 = "" 'Initial value Variable_736 = "" 'Initial value Variable_767 = "" 'Initial value Variable_204 = "" 'Initial value 'Subroutins and functions Sub PushVars() VarArray(0,0)=Variable_255 VarArray(1,0)=Variable_436 VarArray(2,0)=Variable_437 VarArray(3,0)=Variable_438 VarArray(4,0)=Variable_439 VarArray(5,0)=Variable_440 VarArray(6,0)=Variable_441 VarArray(7,0)=Variable_736 VarArray(8,0)=Variable_767 VarArray(9,0)=Variable_204 end sub Sub PopVars() end sub Sub RestoreVars() Variable_255=VarArray(0,0) Variable_436=VarArray(1,0) Variable_437=VarArray(2,0) Variable_438=VarArray(3,0) Variable_439=VarArray(4,0) Variable_440=VarArray(5,0) Variable_441=VarArray(6,0) Variable_736=VarArray(7,0) Variable_767=VarArray(8,0) Variable_204=VarArray(9,0) end sub '----------Cookie section------------ if Request.Cookies("WS_Merchant_99")("merchant_pwd")= "" Then Cookie_136 = "" 'Empty else Cookie_136 = Request.Cookies("WS_Merchant_99")("merchant_pwd") end if if Request.Cookies("WS_Merchant_99")("merchant_ID")= "" Then Cookie_232 = "" 'Empty else Cookie_232 = Request.Cookies("WS_Merchant_99")("merchant_ID") end if 'Functions that in the future should be placed in stanalone .INC File 'Function to format date string Function format_date(date,dataformat) months =Array("January","February","March","April","May","June","July","August","September","October","November","December") mon = Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec") 'dd-MMM-yyyy = 0 'MM/dd/yyyy = 1 'dd MMMM,yyyy = 2 'MMMM dd,yyyy = 3 daypart = Day(date) monthpart = Month(date) yearpart = Year(date) monthpart = monthpart -1 if(dataformat = 0) then format_date = daypart & " " & mon(monthpart) & "," & yearpart end if if(dataformat = 1) then format_date = monthpart & "-" & daypart & "-" & yearpart end if if(dataformat = 2) then format_date = daypart & " " & months(monthpart) & "," & yearpart end if if(dataformat = 3) then format_date = months(monthpart) & " " & daypart & "," & yearpart end if end Function 'Function to format time string Function format_time(date,dataformat) hourpart = Hour(date) minutepart = Minute(date) secondpart = Second(date) format_time = hourpart & ":" & minutepart & ":" & secondpart end Function Function L_HTMLEncode(stringToEncode) if IsNull(stringToEncode) OR IsEmpty(stringToEncode) then L_HTMLEncode = stringToEncode else L_HTMLEncode = Server.HTMLEncode(stringToEncode) end if end Function Function GetPhisicalPath(string_to_transform) pos=InstrRev(LCase(Request.ServerVariables("PATH_TRANSLATED")),LCase(FormAction)) GetPhisicalPath = Left(Request.ServerVariables("PATH_TRANSLATED"), pos-1 )&string_to_transform end Function Function escape_symbols(string_to_escape) if IsNull(string_to_escape) OR IsEmpty(string_to_escape) then string_to_escape_ret = string_to_escape else string_to_escape_ret=Replace(string_to_escape,"'","''") end if escape_symbols=string_to_escape_ret end Function '----------Start Algorithm section------------ '==============Query_40("shopDB")================ DataSource1 = "Driver={Microsoft Access Driver (*.mdb)}; DBQ= "& DB_Path &"WebStore/Databases/ShopDB.mdb;" PageSize1 = 1 GeneratedSQL= "SELECT[CompanyInfo].[MerchantID] as QueryOutput_415,[CompanyInfo].[Password] as QueryOutput_416"_ &" FROM [CompanyInfo]" '===============Execute Query And Get Total Count======================== Set Conn1 = Server.CreateObject("ADODB.Connection") Set RS1 = Server.CreateObject("ADODB.RecordSet") RS1.CursorType = adOpenStatic Conn1.Open DataSource1 RS1.Open GeneratedSQL,Conn1,adOpenKeyset,adLockReadOnly 'both keys are to be variables TotalCount1=RS1.RecordCount RS1.PageSize = PageSize1 'Number of rows per page ScrollAction = Request("_NavAction1") if ScrollAction <> "" Then PageNo1 = mid(ScrollAction, 5) if PageNo1 < 1 Then PageNo1 = 1 end if else PageNo1 = 1 end if 'set the page number on which the current record is located. if(TotalCount1 <> 0) then RS1.AbsolutePage = PageNo1 'Page Number end if FromRec1=(PageNo1-1)*PageSize1 +1 if PageNo1*PageSize1 > TotalCount1 Then ToRec1 = TotalCount1 else ToRec1 = PageNo1*PageSize1 end if URLTail1 = "&name="& Parameter_184 &"&password="& Parameter_185 &"&error="& Parameter_134 &"&Login="& Parameter_91 FNavAhead1 = "Next" FNavBack1 = "Previous" FLinkAhead1 = FormAction & "?_NavAction1=Page" & (PageNo1+1)& URLTail1 FLinkBack1 = FormAction & "?_NavAction1=Page" & (PageNo1-1)& URLTail1 RowCount1 = rs1.PageSize CurrentRecordNumber1 = 0 bSetBegin1 = TRUE Do While Not RS1.EOF and rowcount1 > 0 QueryOutput_415 = rs1.fields("QueryOutput_415") QueryOutput_416 = rs1.fields("QueryOutput_416") Variable_436=QueryOutput_415 Variable_437=QueryOutput_416 '----------------End Repetition Section------------------------------- RowCount1 = RowCount1 - 1 CurrentRecordNumber1 = CurrentRecordNumber1 + 1 RS1.MoveNext Loop Conn1.Close set rs1 = nothing set Conn1 = nothing Response.Cookies("WS_Merchant_99").Expires = "12/31/2029" Response.Cookies("WS_Merchant_99")("merchant_pwd") = Variable_736 if(Parameter_184 <> "") Then if(Parameter_184 = Variable_436) Then if(Parameter_185 = Variable_437) Then Variable_767="ok" Response.Cookies("WS_Merchant_99").Expires = "12/31/2029" Response.Cookies("WS_Merchant_99")("merchant_pwd") = Variable_767 Response.Cookies("WS_Merchant_99").Expires = "12/31/2029" Response.Cookies("WS_Merchant_99")("merchant_ID") = Variable_436 Response.Redirect "Switchboard.asp" else Variable_204="Error" end if else Variable_204="Error" end if else if(Parameter_91 <> "") Then Variable_204="Error" end if end if %>
Please provide Store ID and Password for Web Site Administration
<%Call PopVars()%>