<% '----------General section------------ CURRENT_VERSION = ("2000") CURRENT_STYLE = ("../Advout.css") FormAction = ("SearchNow.asp") ScriptRelativeFolder = ("WebStore") 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") SERVER_NAME="http://"&SERVER_NAME&URL ScriptRelativeFolder = ("WebStore") pos=InstrRev(LCase(SERVER_NAME),LCase(ScriptRelativeFolder) & "/" & LCase(FormAction)) BS_Root_URL = Left(SERVER_NAME, pos-1) CurrentFolder = BS_Root_URL &ScriptRelativeFolder& "/" BS_Root_URL = BS_Root_URL & "/" bHeaderFired = FALSE '==========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------------ if Request("keyword")= "" Then Parameter_18 = "" 'Default value else Parameter_18 = Request("keyword") end if if Request("Field")= "" Then Parameter_331 = "" 'Default value else Parameter_331 = Request("Field") end if if Request("Operator")= "" Then Parameter_332 = "" 'Default value else Parameter_332 = Request("Operator") end if if Request("Min")= "" Then Parameter_399 = "0" 'Default value else Parameter_399 = Request("Min") end if if Request("Max")= "" Then Parameter_400 = "9999999" 'Default value else Parameter_400 = Request("Max") end if if Request("Price")= "" Then Parameter_401 = "" 'Default value else Parameter_401 = Request("Price") end if '----------Variables section------------ Dim VarArray(11,0) VarNum = 12 'Initialization of Vars Variable_403 = "0" 'Initial value Variable_404 = "9999999" 'Initial value Variable_408 = "" 'Initial value Variable_414 = "" 'Initial value Variable_133 = "" 'Initial value Variable_760 = "" 'Initial value Variable_761 = "" 'Initial value Variable_802 = "WS_VisitorID" 'Initial value Variable_811 = "" 'Initial value Variable_164 = "IS_SHOP_LOCKED" 'Initial value Variable_165 = "" 'Initial value Variable_941 = "" 'Initial value 'Subroutins and functions Sub PushVars() VarArray(0,0)=Variable_403 VarArray(1,0)=Variable_404 VarArray(2,0)=Variable_408 VarArray(3,0)=Variable_414 VarArray(4,0)=Variable_133 VarArray(5,0)=Variable_760 VarArray(6,0)=Variable_761 VarArray(7,0)=Variable_802 VarArray(8,0)=Variable_811 VarArray(9,0)=Variable_164 VarArray(10,0)=Variable_165 VarArray(11,0)=Variable_941 end sub Sub PopVars() end sub Sub RestoreVars() Variable_403=VarArray(0,0) Variable_404=VarArray(1,0) Variable_408=VarArray(2,0) Variable_414=VarArray(3,0) Variable_133=VarArray(4,0) Variable_760=VarArray(5,0) Variable_761=VarArray(6,0) Variable_802=VarArray(7,0) Variable_811=VarArray(8,0) Variable_164=VarArray(9,0) Variable_165=VarArray(10,0) Variable_941=VarArray(11,0) end sub '----------Cookie section------------ if Request.Cookies("WS_Visitors_99")("WS_VisitorID")= "" Then Cookie_407 = "" 'Empty else Cookie_407 = Request.Cookies("WS_Visitors_99")("WS_VisitorID") 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 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) string_to_escape_ret=Replace(string_to_escape,"'","''") escape_symbols=string_to_escape_ret end Function '----------Start Algorithm section------------ %> <%Variable_165 = Application(Variable_164) %><%if(Variable_165 = "SHOP_LOCKED") Then%> <%Response.Redirect "sorry.asp"%><%else%> <%end if%><% '==============Query_70("shopDB")================ DataSource1 = "Driver={Microsoft Access Driver (*.mdb)}; DBQ= "& DB_Path &"WebStore/Databases/ShopDB.mdb;" PageSize1 = 1 GeneratedSQL= "SELECT [CompanyInfo].[MerchantID] as QueryOutput_803"_ &" 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 = "&keyword="& Parameter_18 &"&Field="& Parameter_331 &"&Operator="& Parameter_332 &"&Min="& Parameter_399 &"&Max="& Parameter_400 &"&Price="& Parameter_401 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_803 = rs1.fields("QueryOutput_803") %><%Variable_802=Variable_802&QueryOutput_803%> <%'----------------End Repetition Section------------------------------- RowCount1 = RowCount1 - 1 CurrentRecordNumber1 = CurrentRecordNumber1 + 1 RS1.MoveNext Loop %><% Conn1.Close set rs1 = nothing set Conn1 = nothing %> <%Variable_811 = Request.Cookies("WS_Visitors_99")(Variable_802) %><%if(Variable_811 = "") Then%> <%Response.Redirect "CookieMessage.asp"%><%else%> <%end if%><%Variable_760="SITE_URL_BASE"%> <%if(Variable_760="SITE_URL_BASE") then Variable_760 = BS_Root_URL elseif(Variable_760="CURRENT_VERSION") then Variable_760 = CURRENT_VERSION elseif(Variable_760="CURRENT_STYLE") then Variable_760 = CURRENT_STYLE else Variable_760 = Request.ServerVariables(Variable_760) end if %><%Variable_408="AddtoShoppingCart.asp?VisID="%> <%Variable_408=Variable_408&Variable_811%> <%Variable_408=Variable_408&"&ProductID="%> <%if(Parameter_401 = "Price") Then%> <%Variable_404=Parameter_400%> <%Variable_403=Parameter_399%> <%else%> <%end if%><%Variable_133="No"%> <%if(Parameter_332 = "Contains") Then%> <%if(Parameter_331 = "ProductName") Then%> <% '==============Query_32("shopDB")================ DataSource5 = "Driver={Microsoft Access Driver (*.mdb)}; DBQ= "& DB_Path &"WebStore/Databases/ShopDB.mdb;" PageSize5 = 1 Parameter_18_A=escape_symbols(Parameter_18) Variable_403_A=escape_symbols(Variable_403) Variable_404_A=escape_symbols(Variable_404) GeneratedSQL= "SELECT [Products].[ProductID] as QueryOutput_333,[Products].[ProductImageURL] as QueryOutput_334,[Products].[ProductName] as QueryOutput_337,[Products].[ProductDescription] as QueryOutput_338,[Products].[TypeID] as QueryOutput_370,[Products].[UnitPrice] as QueryOutput_371,[Products].[ProductCode] as QueryOutput_869,[Products].[Orientation] as QueryOutput_942"_ &" FROM [Products]"_ &" WHERE [Products].[ProductName] LIKE '%"&Parameter_18_A&"%' AND [Products].[UnitPrice] >= "&Variable_403_A&" AND [Products].[UnitPrice] <= "&Variable_404_A&"" %> <%'===============Execute Query And Get Total Count======================== Set Conn5 = Server.CreateObject("ADODB.Connection") Set RS5 = Server.CreateObject("ADODB.RecordSet") RS5.CursorType = adOpenStatic Conn5.Open DataSource5 RS5.Open GeneratedSQL,Conn5,adOpenKeyset,adLockReadOnly 'both keys are to be variables TotalCount5=RS5.RecordCount if(TotalCount5 > 0) then RS5.PageSize = TotalCount5 'All records PageSize5 = TotalCount5 'All records end if ScrollAction = Request("_NavAction5") if ScrollAction <> "" Then PageNo5 = mid(ScrollAction, 5) if PageNo5 < 1 Then PageNo5 = 1 end if else PageNo5 = 1 end if 'set the page number on which the current record is located. if(TotalCount5 <> 0) then RS5.AbsolutePage = PageNo5 'Page Number end if FromRec5=(PageNo5-1)*PageSize5 +1 if PageNo5*PageSize5 > TotalCount5 Then ToRec5 = TotalCount5 else ToRec5 = PageNo5*PageSize5 end if URLTail5 = "&keyword="& Parameter_18 &"&Field="& Parameter_331 &"&Operator="& Parameter_332 &"&Min="& Parameter_399 &"&Max="& Parameter_400 &"&Price="& Parameter_401 FNavAhead5 = "Next" FNavBack5 = "Previous" FLinkAhead5 = FormAction & "?_NavAction5=Page" & (PageNo5+1)& URLTail5 FLinkBack5 = FormAction & "?_NavAction5=Page" & (PageNo5-1)& URLTail5 %><%if (bHeaderFired = FALSE) then%> SearchNow <% bHeaderFired = TRUE end if %> <%Call PushVars()%>

There were found <%=TotalCount5%> items

with product name containing "<%=Parameter_18%>"
<%Call PopVars()%> <%RowCount5 = rs5.PageSize CurrentRecordNumber5 = 0 bSetBegin5 = TRUE Do While Not RS5.EOF and rowcount5 > 0 QueryOutput_333 = rs5.fields("QueryOutput_333") QueryOutput_334 = rs5.fields("QueryOutput_334") QueryOutput_337 = rs5.fields("QueryOutput_337") QueryOutput_338 = rs5.fields("QueryOutput_338") QueryOutput_370 = rs5.fields("QueryOutput_370") QueryOutput_371 = rs5.fields("QueryOutput_371") QueryOutput_869 = rs5.fields("QueryOutput_869") QueryOutput_942 = rs5.fields("QueryOutput_942") %><%Variable_761=Variable_760%> <%Variable_761=Variable_761&QueryOutput_334%> <%Variable_414=Variable_408%> <%Variable_414=Variable_414&QueryOutput_333%> <%Variable_941="SwitchView.asp?ProductID="%> <%Variable_941=Variable_941&QueryOutput_333%> <%Variable_941=Variable_941&"&ProductOrient="%> <%Variable_941=Variable_941&QueryOutput_942%> <%if (bHeaderFired = FALSE) then%> SearchNow <% bHeaderFired = TRUE end if %> <%if(CurrentRecordNumber5 =0) then%> <%Call PushVars()%> <%end if%>

<% if(CurrentRecordNumber5 =0) then %> <% Call RestoreVars() '==========End Of Prolog Tags of Form, Table================================ '---------------------------------------------------- 'Save recordset parameters '---------------------------------------------------- Set temp5 = Server.CreateObject("ADODB.RecordSet") Set temp5 = RS5 count5 = RowCount5 RecordNumber5 = CurrentRecordNumber5 '---------------------------------------------------- 'Initialization on First Record '---------------------------------------------------- RS5.AbsolutePage = PageNo5 'Page Number '---------------------------------------------------- Do While Not rs5.EOF and rowcount5 > 0 'GetSelected fields QueryOutput_333 = rs5.fields("QueryOutput_333") QueryOutput_334 = rs5.fields("QueryOutput_334") QueryOutput_337 = rs5.fields("QueryOutput_337") QueryOutput_338 = rs5.fields("QueryOutput_338") QueryOutput_370 = rs5.fields("QueryOutput_370") QueryOutput_371 = rs5.fields("QueryOutput_371") QueryOutput_869 = rs5.fields("QueryOutput_869") QueryOutput_942 = rs5.fields("QueryOutput_942") '====================================== %> <%Variable_761=Variable_760%> <%Variable_761=Variable_761&QueryOutput_334%> <%Variable_414=Variable_408%> <%Variable_414=Variable_414&QueryOutput_333%> <%Variable_941="SwitchView.asp?ProductID="%> <%Variable_941=Variable_941&QueryOutput_333%> <%Variable_941=Variable_941&"&ProductOrient="%> <%Variable_941=Variable_941&QueryOutput_942%> <% '=========Begin of Epilog Tags of Table , Form etc.======================================= '---------------------------------------------------- 'Organize cycle '---------------------------------------------------- RS5.MoveNext RowCount5 = RowCount5 - 1 CurrentRecordNumber5 = CurrentRecordNumber5 + 1 Loop '====================================== %>

<%=QueryOutput_337%> Image  <%=QueryOutput_338%> Image  $<%=QueryOutput_371%>
Click here for more details Image  Image  

<% '==========End Of Epilog Tags of Form, Table================================ '---------------------------------------------------- 'Restore Recordset parameters'---------------------------------------------------- RowCount5=count5 CurrentRecordNumber5=RecordNumber5 Set RS5=temp5 RS5.AbsolutePage = PageNo5 'Page Number 'GetSelected fields QueryOutput_333 = rs5.fields("QueryOutput_333") QueryOutput_334 = rs5.fields("QueryOutput_334") QueryOutput_337 = rs5.fields("QueryOutput_337") QueryOutput_338 = rs5.fields("QueryOutput_338") QueryOutput_370 = rs5.fields("QueryOutput_370") QueryOutput_371 = rs5.fields("QueryOutput_371") QueryOutput_869 = rs5.fields("QueryOutput_869") QueryOutput_942 = rs5.fields("QueryOutput_942") 'Clear temp rs object '--------------------------------------------------------------------- end if Call RestoreVars() '====================================== %>
<%Call PopVars()%> <%Variable_133="Yes"%> <%'----------------End Repetition Section------------------------------- RowCount5 = RowCount5 - 1 CurrentRecordNumber5 = CurrentRecordNumber5 + 1 RS5.MoveNext Loop %><% Conn5.Close set rs5 = nothing set Conn5 = nothing %> <%else%> <%if(Parameter_331 = "ProductDescription") Then%> <% '==============Query_24("shopDB")================ DataSource7 = "Driver={Microsoft Access Driver (*.mdb)}; DBQ= "& DB_Path &"WebStore/Databases/ShopDB.mdb;" PageSize7 = 1 Parameter_18_A=escape_symbols(Parameter_18) Variable_403_A=escape_symbols(Variable_403) Variable_404_A=escape_symbols(Variable_404) GeneratedSQL= "SELECT [Products].[ProductID] as QueryOutput_19,[Products].[ProductName] as QueryOutput_47,[Products].[ProductImageURL] as QueryOutput_55,[Products].[TypeID] as QueryOutput_56,[Products].[UnitPrice] as QueryOutput_372,[Products].[ProductDescription] as QueryOutput_373,[Products].[ProductCode] as QueryOutput_868,[Products].[Orientation] as QueryOutput_943"_ &" FROM [Products]"_ &" WHERE [Products].[ProductDescription] LIKE '%"&Parameter_18_A&"%' AND [Products].[UnitPrice] >= "&Variable_403_A&" AND [Products].[UnitPrice] <= "&Variable_404_A&"" %> <%'===============Execute Query And Get Total Count======================== Set Conn7 = Server.CreateObject("ADODB.Connection") Set RS7 = Server.CreateObject("ADODB.RecordSet") RS7.CursorType = adOpenStatic Conn7.Open DataSource7 RS7.Open GeneratedSQL,Conn7,adOpenKeyset,adLockReadOnly 'both keys are to be variables TotalCount7=RS7.RecordCount if(TotalCount7 > 0) then RS7.PageSize = TotalCount7 'All records PageSize7 = TotalCount7 'All records end if ScrollAction = Request("_NavAction7") if ScrollAction <> "" Then PageNo7 = mid(ScrollAction, 5) if PageNo7 < 1 Then PageNo7 = 1 end if else PageNo7 = 1 end if 'set the page number on which the current record is located. if(TotalCount7 <> 0) then RS7.AbsolutePage = PageNo7 'Page Number end if FromRec7=(PageNo7-1)*PageSize7 +1 if PageNo7*PageSize7 > TotalCount7 Then ToRec7 = TotalCount7 else ToRec7 = PageNo7*PageSize7 end if URLTail7 = "&keyword="& Parameter_18 &"&Field="& Parameter_331 &"&Operator="& Parameter_332 &"&Min="& Parameter_399 &"&Max="& Parameter_400 &"&Price="& Parameter_401 FNavAhead7 = "Next" FNavBack7 = "Previous" FLinkAhead7 = FormAction & "?_NavAction7=Page" & (PageNo7+1)& URLTail7 FLinkBack7 = FormAction & "?_NavAction7=Page" & (PageNo7-1)& URLTail7 %><%if (bHeaderFired = FALSE) then%> SearchNow <% bHeaderFired = TRUE end if %> <%Call PushVars()%>

There were <%=TotalCount7%> items found

with Product Description containing "<%=Parameter_18%>"
<%Call PopVars()%> <%RowCount7 = rs7.PageSize CurrentRecordNumber7 = 0 bSetBegin7 = TRUE Do While Not RS7.EOF and rowcount7 > 0 QueryOutput_19 = rs7.fields("QueryOutput_19") QueryOutput_47 = rs7.fields("QueryOutput_47") QueryOutput_55 = rs7.fields("QueryOutput_55") QueryOutput_56 = rs7.fields("QueryOutput_56") QueryOutput_372 = rs7.fields("QueryOutput_372") QueryOutput_373 = rs7.fields("QueryOutput_373") QueryOutput_868 = rs7.fields("QueryOutput_868") QueryOutput_943 = rs7.fields("QueryOutput_943") %><%Variable_761=Variable_760%> <%Variable_761=Variable_761&QueryOutput_55%> <%Variable_414=Variable_408%> <%Variable_414=Variable_414&QueryOutput_19%> <%Variable_941="SwitchView.asp?ProductID="%> <%Variable_941=Variable_941&QueryOutput_19%> <%Variable_941=Variable_941&"&ProductOrient="%> <%Variable_941=Variable_941&QueryOutput_943%> <%if (bHeaderFired = FALSE) then%> SearchNow <% bHeaderFired = TRUE end if %> <%if(CurrentRecordNumber7 =0) then%> <%Call PushVars()%> <%end if%>
<% if(CurrentRecordNumber7 =0) then %> <% Call RestoreVars() '==========End Of Prolog Tags of Form, Table================================ '---------------------------------------------------- 'Save recordset parameters '---------------------------------------------------- Set temp7 = Server.CreateObject("ADODB.RecordSet") Set temp7 = RS7 count7 = RowCount7 RecordNumber7 = CurrentRecordNumber7 '---------------------------------------------------- 'Initialization on First Record '---------------------------------------------------- RS7.AbsolutePage = PageNo7 'Page Number '---------------------------------------------------- Do While Not rs7.EOF and rowcount7 > 0 'GetSelected fields QueryOutput_19 = rs7.fields("QueryOutput_19") QueryOutput_47 = rs7.fields("QueryOutput_47") QueryOutput_55 = rs7.fields("QueryOutput_55") QueryOutput_56 = rs7.fields("QueryOutput_56") QueryOutput_372 = rs7.fields("QueryOutput_372") QueryOutput_373 = rs7.fields("QueryOutput_373") QueryOutput_868 = rs7.fields("QueryOutput_868") QueryOutput_943 = rs7.fields("QueryOutput_943") '====================================== %> <%Variable_761=Variable_760%> <%Variable_761=Variable_761&QueryOutput_55%> <%Variable_414=Variable_408%> <%Variable_414=Variable_414&QueryOutput_19%> <%Variable_941="SwitchView.asp?ProductID="%> <%Variable_941=Variable_941&QueryOutput_19%> <%Variable_941=Variable_941&"&ProductOrient="%> <%Variable_941=Variable_941&QueryOutput_943%> <% '=========Begin of Epilog Tags of Table , Form etc.======================================= '---------------------------------------------------- 'Organize cycle '---------------------------------------------------- RS7.MoveNext RowCount7 = RowCount7 - 1 CurrentRecordNumber7 = CurrentRecordNumber7 + 1 Loop '====================================== %>

<%=QueryOutput_47%> Image   <%=QueryOutput_373%> Image  Unit Price:   $<%=QueryOutput_372%>
 Click here for more details         Image  

<% '==========End Of Epilog Tags of Form, Table================================ '---------------------------------------------------- 'Restore Recordset parameters'---------------------------------------------------- RowCount7=count7 CurrentRecordNumber7=RecordNumber7 Set RS7=temp7 RS7.AbsolutePage = PageNo7 'Page Number 'GetSelected fields QueryOutput_19 = rs7.fields("QueryOutput_19") QueryOutput_47 = rs7.fields("QueryOutput_47") QueryOutput_55 = rs7.fields("QueryOutput_55") QueryOutput_56 = rs7.fields("QueryOutput_56") QueryOutput_372 = rs7.fields("QueryOutput_372") QueryOutput_373 = rs7.fields("QueryOutput_373") QueryOutput_868 = rs7.fields("QueryOutput_868") QueryOutput_943 = rs7.fields("QueryOutput_943") 'Clear temp rs object '--------------------------------------------------------------------- end if Call RestoreVars() '====================================== %>
<%Call PopVars()%> <%Variable_133="Yes"%> <%'----------------End Repetition Section------------------------------- RowCount7 = RowCount7 - 1 CurrentRecordNumber7 = CurrentRecordNumber7 + 1 RS7.MoveNext Loop %><% Conn7.Close set rs7 = nothing set Conn7 = nothing %> <%else%> <%end if%><%end if%><%else%> <%if(Parameter_332 = "Equals") Then%> <%if(Parameter_331 = "ProductName") Then%> <% '==============Query_36("shopDB")================ DataSource7 = "Driver={Microsoft Access Driver (*.mdb)}; DBQ= "& DB_Path &"WebStore/Databases/ShopDB.mdb;" PageSize7 = 1 Parameter_18_A=escape_symbols(Parameter_18) Variable_404_A=escape_symbols(Variable_404) Variable_403_A=escape_symbols(Variable_403) GeneratedSQL= "SELECT [Products].[ProductID] as QueryOutput_374,[Products].[ProductImageURL] as QueryOutput_375,[Products].[ProductName] as QueryOutput_376,[Products].[UnitPrice] as QueryOutput_377,[Products].[TypeID] as QueryOutput_378,[Products].[ProductDescription] as QueryOutput_405,[Products].[ProductCode] as QueryOutput_867,[Products].[Orientation] as QueryOutput_944"_ &" FROM [Products]"_ &" WHERE [Products].[ProductName] = '"&Parameter_18_A&"' AND [Products].[UnitPrice] <= "&Variable_404_A&" AND [Products].[UnitPrice] >= "&Variable_403_A&"" %> <%'===============Execute Query And Get Total Count======================== Set Conn7 = Server.CreateObject("ADODB.Connection") Set RS7 = Server.CreateObject("ADODB.RecordSet") RS7.CursorType = adOpenStatic Conn7.Open DataSource7 RS7.Open GeneratedSQL,Conn7,adOpenKeyset,adLockReadOnly 'both keys are to be variables TotalCount7=RS7.RecordCount if(TotalCount7 > 0) then RS7.PageSize = TotalCount7 'All records PageSize7 = TotalCount7 'All records end if ScrollAction = Request("_NavAction7") if ScrollAction <> "" Then PageNo7 = mid(ScrollAction, 5) if PageNo7 < 1 Then PageNo7 = 1 end if else PageNo7 = 1 end if 'set the page number on which the current record is located. if(TotalCount7 <> 0) then RS7.AbsolutePage = PageNo7 'Page Number end if FromRec7=(PageNo7-1)*PageSize7 +1 if PageNo7*PageSize7 > TotalCount7 Then ToRec7 = TotalCount7 else ToRec7 = PageNo7*PageSize7 end if URLTail7 = "&keyword="& Parameter_18 &"&Field="& Parameter_331 &"&Operator="& Parameter_332 &"&Min="& Parameter_399 &"&Max="& Parameter_400 &"&Price="& Parameter_401 FNavAhead7 = "Next" FNavBack7 = "Previous" FLinkAhead7 = FormAction & "?_NavAction7=Page" & (PageNo7+1)& URLTail7 FLinkBack7 = FormAction & "?_NavAction7=Page" & (PageNo7-1)& URLTail7 %><%if (bHeaderFired = FALSE) then%> SearchNow <% bHeaderFired = TRUE end if %> <%Call PushVars()%>

There were <%=TotalCount7%> items found

with Product Name equal to "<%=Parameter_18%>"

<%Call PopVars()%> <%RowCount7 = rs7.PageSize CurrentRecordNumber7 = 0 bSetBegin7 = TRUE Do While Not RS7.EOF and rowcount7 > 0 QueryOutput_374 = rs7.fields("QueryOutput_374") QueryOutput_375 = rs7.fields("QueryOutput_375") QueryOutput_376 = rs7.fields("QueryOutput_376") QueryOutput_377 = rs7.fields("QueryOutput_377") QueryOutput_378 = rs7.fields("QueryOutput_378") QueryOutput_405 = rs7.fields("QueryOutput_405") QueryOutput_867 = rs7.fields("QueryOutput_867") QueryOutput_944 = rs7.fields("QueryOutput_944") %><%Variable_761=Variable_760%> <%Variable_761=Variable_761&QueryOutput_375%> <%Variable_414=Variable_408%> <%Variable_414=Variable_414&QueryOutput_374%> <%Variable_941="SwitchView.asp?ProductID="%> <%Variable_941=Variable_941&QueryOutput_374%> <%Variable_941=Variable_941&"&ProductOrient="%> <%Variable_941=Variable_941&QueryOutput_944%> <%if (bHeaderFired = FALSE) then%> SearchNow <% bHeaderFired = TRUE end if %> <%if(CurrentRecordNumber7 =0) then%> <%Call PushVars()%> <%end if%>
<% if(CurrentRecordNumber7 =0) then %> <% Call RestoreVars() '==========End Of Prolog Tags of Form, Table================================ '---------------------------------------------------- 'Save recordset parameters '---------------------------------------------------- Set temp7 = Server.CreateObject("ADODB.RecordSet") Set temp7 = RS7 count7 = RowCount7 RecordNumber7 = CurrentRecordNumber7 '---------------------------------------------------- 'Initialization on First Record '---------------------------------------------------- RS7.AbsolutePage = PageNo7 'Page Number '---------------------------------------------------- Do While Not rs7.EOF and rowcount7 > 0 'GetSelected fields QueryOutput_374 = rs7.fields("QueryOutput_374") QueryOutput_375 = rs7.fields("QueryOutput_375") QueryOutput_376 = rs7.fields("QueryOutput_376") QueryOutput_377 = rs7.fields("QueryOutput_377") QueryOutput_378 = rs7.fields("QueryOutput_378") QueryOutput_405 = rs7.fields("QueryOutput_405") QueryOutput_867 = rs7.fields("QueryOutput_867") QueryOutput_944 = rs7.fields("QueryOutput_944") '====================================== %> <%Variable_761=Variable_760%> <%Variable_761=Variable_761&QueryOutput_375%> <%Variable_414=Variable_408%> <%Variable_414=Variable_414&QueryOutput_374%> <%Variable_941="SwitchView.asp?ProductID="%> <%Variable_941=Variable_941&QueryOutput_374%> <%Variable_941=Variable_941&"&ProductOrient="%> <%Variable_941=Variable_941&QueryOutput_944%> <% '=========Begin of Epilog Tags of Table , Form etc.======================================= '---------------------------------------------------- 'Organize cycle '---------------------------------------------------- RS7.MoveNext RowCount7 = RowCount7 - 1 CurrentRecordNumber7 = CurrentRecordNumber7 + 1 Loop '====================================== %>

<%=QueryOutput_376%> Image  <%=QueryOutput_405%> Image  Unit Price:  $<%=QueryOutput_377%>
 Click here for more details        Image

<% '==========End Of Epilog Tags of Form, Table================================ '---------------------------------------------------- 'Restore Recordset parameters'---------------------------------------------------- RowCount7=count7 CurrentRecordNumber7=RecordNumber7 Set RS7=temp7 RS7.AbsolutePage = PageNo7 'Page Number 'GetSelected fields QueryOutput_374 = rs7.fields("QueryOutput_374") QueryOutput_375 = rs7.fields("QueryOutput_375") QueryOutput_376 = rs7.fields("QueryOutput_376") QueryOutput_377 = rs7.fields("QueryOutput_377") QueryOutput_378 = rs7.fields("QueryOutput_378") QueryOutput_405 = rs7.fields("QueryOutput_405") QueryOutput_867 = rs7.fields("QueryOutput_867") QueryOutput_944 = rs7.fields("QueryOutput_944") 'Clear temp rs object '--------------------------------------------------------------------- end if Call RestoreVars() '====================================== %>
<%Call PopVars()%> <%Variable_133="Yes"%> <%'----------------End Repetition Section------------------------------- RowCount7 = RowCount7 - 1 CurrentRecordNumber7 = CurrentRecordNumber7 + 1 RS7.MoveNext Loop %><% Conn7.Close set rs7 = nothing set Conn7 = nothing %> <%else%> <%if(Parameter_331 = "ProductDescription") Then%> <% '==============Query_37("shopDB")================ DataSource9 = "Driver={Microsoft Access Driver (*.mdb)}; DBQ= "& DB_Path &"WebStore/Databases/ShopDB.mdb;" PageSize9 = 1 Parameter_18_A=escape_symbols(Parameter_18) Variable_403_A=escape_symbols(Variable_403) Variable_404_A=escape_symbols(Variable_404) GeneratedSQL= "SELECT [Products].[ProductID] as QueryOutput_386,[Products].[ProductImageURL] as QueryOutput_387,[Products].[ProductName] as QueryOutput_388,[Products].[UnitPrice] as QueryOutput_389,[Products].[TypeID] as QueryOutput_390,[Products].[ProductDescription] as QueryOutput_406,[Products].[ProductCode] as QueryOutput_866,[Products].[Orientation] as QueryOutput_945"_ &" FROM [Products]"_ &" WHERE [Products].[ProductDescription] = '"&Parameter_18_A&"' AND [Products].[UnitPrice] >= "&Variable_403_A&" AND [Products].[UnitPrice] <= "&Variable_404_A&"" %> <%'===============Execute Query And Get Total Count======================== Set Conn9 = Server.CreateObject("ADODB.Connection") Set RS9 = Server.CreateObject("ADODB.RecordSet") RS9.CursorType = adOpenStatic Conn9.Open DataSource9 RS9.Open GeneratedSQL,Conn9,adOpenKeyset,adLockReadOnly 'both keys are to be variables TotalCount9=RS9.RecordCount if(TotalCount9 > 0) then RS9.PageSize = TotalCount9 'All records PageSize9 = TotalCount9 'All records end if ScrollAction = Request("_NavAction9") if ScrollAction <> "" Then PageNo9 = mid(ScrollAction, 5) if PageNo9 < 1 Then PageNo9 = 1 end if else PageNo9 = 1 end if 'set the page number on which the current record is located. if(TotalCount9 <> 0) then RS9.AbsolutePage = PageNo9 'Page Number end if FromRec9=(PageNo9-1)*PageSize9 +1 if PageNo9*PageSize9 > TotalCount9 Then ToRec9 = TotalCount9 else ToRec9 = PageNo9*PageSize9 end if URLTail9 = "&keyword="& Parameter_18 &"&Field="& Parameter_331 &"&Operator="& Parameter_332 &"&Min="& Parameter_399 &"&Max="& Parameter_400 &"&Price="& Parameter_401 FNavAhead9 = "Next" FNavBack9 = "Previous" FLinkAhead9 = FormAction & "?_NavAction9=Page" & (PageNo9+1)& URLTail9 FLinkBack9 = FormAction & "?_NavAction9=Page" & (PageNo9-1)& URLTail9 %><%if (bHeaderFired = FALSE) then%> SearchNow <% bHeaderFired = TRUE end if %> <%Call PushVars()%>

There were items found

with Product Description equal to "<%=Parameter_18%>"
<%Call PopVars()%> <%RowCount9 = rs9.PageSize CurrentRecordNumber9 = 0 bSetBegin9 = TRUE Do While Not RS9.EOF and rowcount9 > 0 QueryOutput_386 = rs9.fields("QueryOutput_386") QueryOutput_387 = rs9.fields("QueryOutput_387") QueryOutput_388 = rs9.fields("QueryOutput_388") QueryOutput_389 = rs9.fields("QueryOutput_389") QueryOutput_390 = rs9.fields("QueryOutput_390") QueryOutput_406 = rs9.fields("QueryOutput_406") QueryOutput_866 = rs9.fields("QueryOutput_866") QueryOutput_945 = rs9.fields("QueryOutput_945") %><%Variable_761=Variable_760%> <%Variable_761=Variable_761&QueryOutput_387%> <%Variable_414=Variable_408%> <%Variable_414=Variable_414&QueryOutput_386%> <%Variable_941="SwitchView.asp?ProductID="%> <%Variable_941=Variable_941&QueryOutput_386%> <%Variable_941=Variable_941&"&ProductOrient="%> <%Variable_941=Variable_941&QueryOutput_945%> <%if (bHeaderFired = FALSE) then%> SearchNow <% bHeaderFired = TRUE end if %> <%if(CurrentRecordNumber9 =0) then%> <%Call PushVars()%> <%end if%>
<% if(CurrentRecordNumber9 =0) then %> <% Call RestoreVars() '==========End Of Prolog Tags of Form, Table================================ '---------------------------------------------------- 'Save recordset parameters '---------------------------------------------------- Set temp9 = Server.CreateObject("ADODB.RecordSet") Set temp9 = RS9 count9 = RowCount9 RecordNumber9 = CurrentRecordNumber9 '---------------------------------------------------- 'Initialization on First Record '---------------------------------------------------- RS9.AbsolutePage = PageNo9 'Page Number '---------------------------------------------------- Do While Not rs9.EOF and rowcount9 > 0 'GetSelected fields QueryOutput_386 = rs9.fields("QueryOutput_386") QueryOutput_387 = rs9.fields("QueryOutput_387") QueryOutput_388 = rs9.fields("QueryOutput_388") QueryOutput_389 = rs9.fields("QueryOutput_389") QueryOutput_390 = rs9.fields("QueryOutput_390") QueryOutput_406 = rs9.fields("QueryOutput_406") QueryOutput_866 = rs9.fields("QueryOutput_866") QueryOutput_945 = rs9.fields("QueryOutput_945") '====================================== %> <%Variable_761=Variable_760%> <%Variable_761=Variable_761&QueryOutput_387%> <%Variable_414=Variable_408%> <%Variable_414=Variable_414&QueryOutput_386%> <%Variable_941="SwitchView.asp?ProductID="%> <%Variable_941=Variable_941&QueryOutput_386%> <%Variable_941=Variable_941&"&ProductOrient="%> <%Variable_941=Variable_941&QueryOutput_945%> <% '=========Begin of Epilog Tags of Table , Form etc.======================================= '---------------------------------------------------- 'Organize cycle '---------------------------------------------------- RS9.MoveNext RowCount9 = RowCount9 - 1 CurrentRecordNumber9 = CurrentRecordNumber9 + 1 Loop '====================================== %>

 <%=QueryOutput_388%> Image  <%=QueryOutput_406%>Image Unit Price:  $<%=QueryOutput_389%>
  Click here for more details         Image  

<% '==========End Of Epilog Tags of Form, Table================================ '---------------------------------------------------- 'Restore Recordset parameters'---------------------------------------------------- RowCount9=count9 CurrentRecordNumber9=RecordNumber9 Set RS9=temp9 RS9.AbsolutePage = PageNo9 'Page Number 'GetSelected fields QueryOutput_386 = rs9.fields("QueryOutput_386") QueryOutput_387 = rs9.fields("QueryOutput_387") QueryOutput_388 = rs9.fields("QueryOutput_388") QueryOutput_389 = rs9.fields("QueryOutput_389") QueryOutput_390 = rs9.fields("QueryOutput_390") QueryOutput_406 = rs9.fields("QueryOutput_406") QueryOutput_866 = rs9.fields("QueryOutput_866") QueryOutput_945 = rs9.fields("QueryOutput_945") 'Clear temp rs object '--------------------------------------------------------------------- end if Call RestoreVars() '====================================== %>
<%Call PopVars()%> <%Variable_133="Yes"%> <%'----------------End Repetition Section------------------------------- RowCount9 = RowCount9 - 1 CurrentRecordNumber9 = CurrentRecordNumber9 + 1 RS9.MoveNext Loop %><% Conn9.Close set rs9 = nothing set Conn9 = nothing %> <%else%> <%end if%><%end if%><%else%> <%end if%><%end if%><%if(Variable_133 = "No") Then%> <%if (bHeaderFired = FALSE) then%> SearchNow <% bHeaderFired = TRUE end if %> <%Call PushVars()%>

Sorry, we are unable to find any products matching your search .

Back to Shop

<%Call PopVars()%> <%else%> <%if (bHeaderFired = FALSE) then%> SearchNow <% bHeaderFired = TRUE end if %> <%Call PushVars()%>

Back to Shop

<%Call PopVars()%> <%end if%> <%if (bHeaderFired = TRUE) then%> <% end if %>