<%@LANGUAGE="VBSCRIPT"%> <%' get url values MM_Head = Request.Querystring("head") MM_Item = Request.Querystring("cat") MM_Store = Request.Querystring("Store") searchword = Request.Querystring("searchword") LowPrice = Request.Querystring("LowPrice") HiPrice = Request.Querystring("HiPrice") If MM_Store = 0 and MM_item<> 0 Then MM_Store=1 If MM_Store = 1 Then response.redirect("xq/cat"&Right("00"&MM_Item,2)&"01.asp") Mix=-1 Brew=2 Lum=2 Vin=2 Munch=2 Store_Name = "Mixology's" End If If MM_Store = 2 Then Mix=2 Brew=-1 Lum=2 Vin=2 Munch=2 Store_Name="Brewology's" End If If MM_Store = 3 Then Mix=2 Brew=2 Lum=-1 Vin=2 Munch=2 Store_Name = "Luminology's" End If If MM_Store = 4 Then Mix=2 Brew=2 Lum=2 Vin=-1 Munch=2 Store_name = "Vinology's" End If If MM_Store = 5 Then Mix=2 Brew=2 Lum=2 Vin=2 Munch=-1 Store_Name = "Munchology's" End If If Request.Querystring("srch")="all" Then Mix=-1 Brew=-1 Lum=-1 Vin=-1 Munch=-1 MM_Store=0 Store_Name = "Ology's" End If If MM_Store="" Then MM_Store=0 response.redirect("xq/cat0000.asp") Dim rsMenuMain__MMColParam rsMenuMain__MMColParam = "0" if(MM_Store <> "") then rsMenuMain__MMColParam = MM_Store %> <% Dim rsMenu__store rsMenu__store = "%" if(MM_Store <> "") then rsMenu__store = MM_Store %> <% set rsMenu = Server.CreateObject("ADODB.Recordset") rsMenu.ActiveConnection = "dsn=mixdata;" rsMenu.Source = "SELECT * FROM MenuItems WHERE MenuStore = val('" + Replace(rsMenu__store, "'", "''") + "') ORDER BY MenuRank ASC" rsMenu.CursorType = 0 rsMenu.CursorLocation = 2 rsMenu.LockType = 3 rsMenu.Open rsMenu_numRows = 0 %> <%If Request.Querystring("searchword") = "" AND MM_Item <> 0 Then rsMenu.MoveFirst Do Until (rsMenu.EOF) IF (INT(rsMenu.Fields.Item("MenuItem").Value) = INT(MM_Item) ) Then Exit Do rsMenu.MoveNext Loop If Not(rsMenu.Eof) Then MM_SQL1 =(rsMenu.Fields.Item("MenuCategory1").Value) MM_SQL2 =(rsMenu.Fields.Item("MenuCategory2").Value) MM_SQL3 =(rsMenu.Fields.Item("MenuCategory3").Value) MM_SQL4 =(rsMenu.Fields.Item("MenuCategory4").Value) Title = (rsMenu.Fields.Item("MenuName").Value) rsMenu.MoveFirst End If Else If (searchword = "" And HiPrice ="") Then SpecialOn="Y" End If If (MM_Item = 0 And HiPrice = "" )Then Title = "Homepage" IF Request.Querystring("searchword") <> "" Then Title = "Search Results" If HiPrice<>"" Then Title = "Items Between $"& LowPrice & " and $" & HiPrice %> <% Dim rsProducts__cat1 rsProducts__cat1 = "%" if(MM_SQL1 <> "") then rsProducts__cat1 = MM_SQL1 Dim rsProducts__cat2 rsProducts__cat2 = "%" if(MM_SQL2 <> "") then rsProducts__cat2 = MM_SQL2 Dim rsProducts__cat3 rsProducts__cat3 = "%" if(MM_SQL3 <> "") then rsProducts__cat3 = MM_SQL3 Dim rsProducts__cat4 rsProducts__cat4 = "%" if(MM_SQL4 <> "") then rsProducts__cat4 = MM_SQL4 Dim rsProducts__searchword rsProducts__searchword = "asdfjla" if(searchword <> "") then rsProducts__searchword = searchword Dim rsProducts__Special rsProducts__Special = "%" if(SpecialOn <> "") then rsProducts__Special = SpecialOn Dim rsProducts__Mix rsProducts__Mix = "%" if(Mix <> "") then rsProducts__Mix = Mix Dim rsProducts__Lum rsProducts__Lum = "%" if(Lum <> "") then rsProducts__Lum = Lum Dim rsProducts__Brew rsProducts__Brew = "%" if(Brew <> "") then rsProducts__Brew = Brew Dim rsProducts__Vin rsProducts__Vin = "%" if(Vin <> "") then rsProducts__Vin = Vin Dim rsProducts__Munch rsProducts__Munch = "%" if(Munch <> "") then rsProducts__Munch = Munch Dim rsProducts__LowPrice rsProducts__LowPrice = "%" if(LowPrice <> "") then rsProducts__LowPrice = LowPrice Dim rsProducts__HiPrice rsProducts__HiPrice = "%" if(HiPrice <> "") then rsProducts__HiPrice = HiPrice %> <% set rsProducts = Server.CreateObject("ADODB.Recordset") rsProducts.ActiveConnection = "dsn=mixdata;" rsProducts.Source = "SELECT * FROM Products WHERE (P_Category_ID = val('" + Replace(rsProducts__cat1, "'", "''") + "') or P_Category_ID = val('" + Replace(rsProducts__cat2, "'", "''") + "') or P_Category_ID = val('" + Replace(rsProducts__cat3, "'", "''") + "') or P_Category_ID = val('" + Replace(rsProducts__cat4, "'", "''") + "') OR P_Name Like '%" + Replace(rsProducts__searchword, "'", "''") + "%' OR P_Description Like '%" + Replace(rsProducts__searchword, "'", "''") + "%' OR P_Number Like '%" + Replace(rsProducts__searchword, "'", "''") + "%' OR (P_Price>val('" + Replace(rsProducts__LowPrice, "'", "''") + "%') And P_Price<% set rsMenuMain = Server.CreateObject("ADODB.Recordset") rsMenuMain.ActiveConnection = "dsn=mixdata;" rsMenuMain.Source = "SELECT * FROM MenuItems WHERE MenuStore = " + Replace(rsMenuMain__MMColParam, "'", "''") + " ORDER BY MenuRank ASC" rsMenuMain.CursorType = 0 rsMenuMain.CursorLocation = 2 rsMenuMain.LockType = 3 rsMenuMain.Open rsMenuMain_numRows = 0 %><% Dim Repeat1__numRows Repeat1__numRows = 12 Dim Repeat1__index Repeat1__index = 0 rsProducts_numRows = rsProducts_numRows + Repeat1__numRows %> <% ' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables ' set the record count rsProducts_total = rsProducts.RecordCount ' set the number of rows displayed on this page If (rsProducts_numRows < 0) Then rsProducts_numRows = rsProducts_total Elseif (rsProducts_numRows = 0) Then rsProducts_numRows = 1 End If ' set the first and last displayed record rsProducts_first = 1 rsProducts_last = rsProducts_first + rsProducts_numRows - 1 ' if we have the correct record count, check the other stats If (rsProducts_total <> -1) Then If (rsProducts_first > rsProducts_total) Then rsProducts_first = rsProducts_total If (rsProducts_last > rsProducts_total) Then rsProducts_last = rsProducts_total If (rsProducts_numRows > rsProducts_total) Then rsProducts_numRows = rsProducts_total End If %> <% ' *** Recordset Stats: if we don't know the record count, manually count them If (rsProducts_total = -1) Then ' count the total records by iterating through the recordset rsProducts_total=0 While (Not rsProducts.EOF) rsProducts_total = rsProducts_total + 1 rsProducts.MoveNext Wend ' reset the cursor to the beginning If (rsProducts.CursorType > 0) Then rsProducts.MoveFirst Else rsProducts.Requery End If ' set the number of rows displayed on this page If (rsProducts_numRows < 0 Or rsProducts_numRows > rsProducts_total) Then rsProducts_numRows = rsProducts_total End If ' set the first and last displayed record rsProducts_first = 1 rsProducts_last = rsProducts_first + rsProducts_numRows - 1 If (rsProducts_first > rsProducts_total) Then rsProducts_first = rsProducts_total If (rsProducts_last > rsProducts_total) Then rsProducts_last = rsProducts_total End If %> <% ' *** Move To Record and Go To Record: declare variables Set MM_rs = rsProducts MM_rsCount = rsProducts_total MM_size = rsProducts_numRows MM_uniqueCol = "" MM_paramName = "" MM_offset = 0 MM_atTotal = false MM_paramIsDefined = false If (MM_paramName <> "") Then MM_paramIsDefined = (Request.QueryString(MM_paramName) <> "") End If %> <% ' *** Move To Record: handle 'index' or 'offset' parameter if (Not MM_paramIsDefined And MM_rsCount <> 0) then ' use index parameter if defined, otherwise use offset parameter r = Request.QueryString("index") If r = "" Then r = Request.QueryString("offset") If r <> "" Then MM_offset = Int(r) ' if we have a record count, check if we are past the end of the recordset If (MM_rsCount <> -1) Then If (MM_offset >= MM_rsCount Or MM_offset = -1) Then ' past end or move last If ((MM_rsCount Mod MM_size) > 0) Then ' last page not a full repeat region MM_offset = MM_rsCount - (MM_rsCount Mod MM_size) Else MM_offset = MM_rsCount - MM_size End If End If End If ' move the cursor to the selected record i = 0 While ((Not MM_rs.EOF) And (i < MM_offset Or MM_offset = -1)) MM_rs.MoveNext i = i + 1 Wend If (MM_rs.EOF) Then MM_offset = i ' set MM_offset to the last possible record End If %> <% ' *** Move To Record: if we dont know the record count, check the display range If (MM_rsCount = -1) Then ' walk to the end of the display range for this page i = MM_offset While (Not MM_rs.EOF And (MM_size < 0 Or i < MM_offset + MM_size)) MM_rs.MoveNext i = i + 1 Wend ' if we walked off the end of the recordset, set MM_rsCount and MM_size If (MM_rs.EOF) Then MM_rsCount = i If (MM_size < 0 Or MM_size > MM_rsCount) Then MM_size = MM_rsCount End If ' if we walked off the end, set the offset based on page size If (MM_rs.EOF And Not MM_paramIsDefined) Then If (MM_offset > MM_rsCount - MM_size Or MM_offset = -1) Then If ((MM_rsCount Mod MM_size) > 0) Then MM_offset = MM_rsCount - (MM_rsCount Mod MM_size) Else MM_offset = MM_rsCount - MM_size End If End If End If ' reset the cursor to the beginning If (MM_rs.CursorType > 0) Then MM_rs.MoveFirst Else MM_rs.Requery End If ' move the cursor to the selected record i = 0 While (Not MM_rs.EOF And i < MM_offset) MM_rs.MoveNext i = i + 1 Wend End If %> <% ' *** Move To Record: update recordset stats ' set the first and last displayed record rsProducts_first = MM_offset + 1 rsProducts_last = MM_offset + MM_size If (MM_rsCount <> -1) Then If (rsProducts_first > MM_rsCount) Then rsProducts_first = MM_rsCount If (rsProducts_last > MM_rsCount) Then rsProducts_last = MM_rsCount End If ' set the boolean used by hide region to check if we are on the last record MM_atTotal = (MM_rsCount <> -1 And MM_offset + MM_size >= MM_rsCount) %> <% ' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters ' create the list of parameters which should not be maintained MM_removeList = "&index=" If (MM_paramName <> "") Then MM_removeList = MM_removeList & "&" & MM_paramName & "=" MM_keepURL="":MM_keepForm="":MM_keepBoth="":MM_keepNone="" ' add the URL parameters to the MM_keepURL string For Each Item In Request.QueryString NextItem = "&" & Item & "=" If (InStr(1,MM_removeList,NextItem,1) = 0) Then MM_keepURL = MM_keepURL & NextItem & Server.URLencode(Request.QueryString(Item)) End If Next ' add the Form variables to the MM_keepForm string For Each Item In Request.Form NextItem = "&" & Item & "=" If (InStr(1,MM_removeList,NextItem,1) = 0) Then MM_keepForm = MM_keepForm & NextItem & Server.URLencode(Request.Form(Item)) End If Next ' create the Form + URL string and remove the intial '&' from each of the strings MM_keepBoth = MM_keepURL & MM_keepForm if (MM_keepBoth <> "") Then MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1) if (MM_keepURL <> "") Then MM_keepURL = Right(MM_keepURL, Len(MM_keepURL) - 1) if (MM_keepForm <> "") Then MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1) ' a utility function used for adding additional parameters to these strings Function MM_joinChar(firstItem) If (firstItem <> "") Then MM_joinChar = "&" Else MM_joinChar = "" End If End Function %> <% ' *** Move To Record: set the strings for the first, last, next, and previous links MM_keepMove = MM_keepBoth MM_moveParam = "index" ' if the page has a repeated region, remove 'offset' from the maintained parameters If (MM_size > 0) Then MM_moveParam = "offset" If (MM_keepMove <> "") Then params = Split(MM_keepMove, "&") MM_keepMove = "" For i = 0 To UBound(params) nextItem = Left(params(i), InStr(params(i),"=") - 1) If (StrComp(nextItem,MM_moveParam,1) <> 0) Then MM_keepMove = MM_keepMove & "&" & params(i) End If Next If (MM_keepMove <> "") Then MM_keepMove = Right(MM_keepMove, Len(MM_keepMove) - 1) End If End If End If ' set the strings for the move to links If (MM_keepMove <> "") Then MM_keepMove = MM_keepMove & "&" urlStr = Request.ServerVariables("URL") & "?" & MM_keepMove & MM_moveParam & "=" MM_moveFirst = urlStr & "0" MM_moveLast = urlStr & "-1" MM_moveNext = urlStr & Cstr(MM_offset + MM_size) prev = MM_offset - MM_size If (prev < 0) Then prev = 0 MM_movePrev = urlStr & Cstr(prev) %> <%=Title%> from <%=Store_Name%> <% My_tableValues = "Serve_Type,Serve_Type_ID,Serve_Date,Serve_Store" My_dbValues = "CP," & Cstr(MM_Item) &",1," & Cstr(MM_Store) My_insertStr = "insert into Serve_Stats (" & My_tableValues & ") values (" & My_dbValues & ")" Set My_InsertCmd = Server.CreateObject("ADODB.Command") My_insertCmd.ActiveConnection = "dsn=mixdata;" My_insertCmd.CommandText = My_insertStr ' My_insertCmd.Execute %>
       
       

                                     
 
         
 

 
Order Toll Free 888-345-6497
 


 
<%If MM_Store<>0 Then%> <%IF MM_Store=1 Then%> MixologY's <%End IF%> <%IF MM_Store=2 Then%> BrewologY's <%End IF%> <%IF MM_Store=3 Then%> LuminologY's <%End IF%> <%IF MM_Store=4 Then%> VinologY's <%End IF%> <%IF MM_Store=5 Then%> MunchologY's <%End IF%> All OlogY's
<%End If%>
<%If MM_Store=0 Then%> Select Store Above
<%Else%>
Category
<%End If%>
Resources

Help

       
<%' a utility function used for adding additional parameters to these strings Function MM_joinChar(firstItem) If (firstItem <> "") Then MM_joinChar = "&" Else MM_joinChar = "" End If End Function %>
<%ItemCount=0 While Not rsMenu.EOF MenuItem = rsMenu.Fields.Item("MenuItem").value MM_Cat = rsMenu.Fields.Item("MenuLevel").value MM_Holder = rsMenu.Fields.Item("MenuHead").value ItemCount=ItemCount+1 If (Int(MM_Item) <>MenuItem) AND (MM_Cat=0) AND (INT(MM_Head) <> INT(MM_Holder)) Then%>">
<%Else IF MM_Cat=0 THEN%>
<%rsMenu.MoveFirst While NOT rsMenu.EOF If MM_Holder = INT(rsMenu.Fields.Item("MenuLevel") ) Then If INT(MM_Item)<> rsMenu.Fields.Item("MenuItem") Then%> " onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('<%=(rsMenu.Fields.Item("MenuName").Value)%>','','images/<%=(rsMenu.Fields.Item("MenuCrsImg").Value)%>',1)">
<%Else%>
<%=(rsMenu.Fields.Item("MenuName").Value)%>
<%End IF End IF rsMenu.MoveNext Wend rsMenu.MoveFirst ItemCount = ItemCount - 1 While (NOT rsMenu.EOF) AND (ItemCount>0) ItemCount = ItemCount -1 rsMenu.MoveNext Wend%>
<%End If%>
<%End If%>
 
<%If MM_Store=5 Then%> Coming Soon...
<%End IF%>
<% If (Not rsMenu.EOF Or Not rsMenu.BOF) Then %>
<% End If ' end Not rsMenu.EOF Or NOT rsMenu.BOF %> <% If (rsProducts.EOF And rsProducts.BOF) and Request.Querystring("Searchword")<>""Then%> Sorry, no products matched your search terms<%End IF%> <% If NOT(rsProducts.EOF And rsProducts.BOF)AND SpecialOn="Y" Then%> Current Specials & New Items: <%End IF%>
<% While ((Repeat1__numRows > 0) AND (NOT rsProducts.EOF)) %> <%rsProducts.MoveNext()%> <% Repeat1__index=Repeat1__index+3 Repeat1__numRows=Repeat1__numRows-3 Wend %>
<%=Title%>

">" border="0">

<%=(rsProducts.Fields.Item("P_Number").Value)%> $<%=(rsProducts.Fields.Item("P_Price").Value)%>
<% IF((rsProducts.Fields.Item("Ship_Guarantee").Value) = "DISABLED") Then Add_Text = " - Speed Guaranteed"%> <%Else Add_Text = ""%> <%End If%> <%IF (rsProducts.Fields.Item("Is_New")="Y") THEN%> NEW! <%End If%>

<%=(rsProducts.Fields.Item("P_Name").Value)%>
<%AccessGroup = Session("svAccessGroup") If AccessGroup = "admin" Then%> ">Edit <%End If%>
_______
<%If rsProducts.EOF then %> <%Else%>

">" border="0">

<%=(rsProducts.Fields.Item("P_Number").Value)%> $<%=(rsProducts.Fields.Item("P_Price").Value)%>
<% IF((rsProducts.Fields.Item("Ship_Guarantee").Value) = "Y") Then Add_Text = " - Speed Guaranteed"%> <%Else Add_Text = ""%> <%End If%> <%IF (rsProducts.Fields.Item("Is_New")="Y") THEN%> NEW! <%End If%>

<%=(rsProducts.Fields.Item("P_Name").Value)%>
<%AccessGroup = Session("svAccessGroup") If AccessGroup = "admin" Then%> ">Edit <%End If%>
_______
<%rsProducts.MoveNext() End If%>
<%If rsProducts.EOF then %> <%Else%>

">" border="0">

<%=(rsProducts.Fields.Item("P_Number").Value)%> $<%=(rsProducts.Fields.Item("P_Price").Value)%>
<% IF((rsProducts.Fields.Item("Ship_Guarantee").Value) = "Y") Then Add_Text = " - Speed Guaranteed"%> <%Else Add_Text = ""%> <%End If%> <%IF (rsProducts.Fields.Item("Is_New")="Y") THEN%> NEW! <%End If%>

<%=(rsProducts.Fields.Item("P_Name").Value)%>
<%AccessGroup = Session("svAccessGroup") If AccessGroup = "admin" Then%> ">Edit <%End If%>
_______
<%rsProducts.MoveNext() End If%>
<% If MM_offset <> 0 Then %> <% End If ' end MM_offset <> 0 %>
Items <%=(rsProducts_first)%>- <%=(rsProducts_last)%> of <%=(rsProducts_total)%>
<% If Not MM_atTotal Then %>NEXT<% End If ' end Not MM_atTotal %> <%=(rsProducts_NextSet)%>

 

       
         
         
         
         
         
         
         
         
         
         
         
         
         
                   
<%If MM_Store<>0 Then rsMenuMain.MoveFirst%>
<%While Not rsMenuMain.EOF IF (rsMenuMain.Fields.Item("MenuLevel").Value)=0 Then%> &head=<%=(rsMenuMain.Fields.Item("MenuLevel").Value)%>&store=<%=MM_Store%>"><%=(rsMenuMain.Fields.Item("MenuName").Value)%> <%End If rsMenuMain.MoveNext If Not rsMenuMain.EOF Then IF (rsMenuMain.Fields.Item("MenuLevel").Value)=0 Then%> - <%End If End If Wend End If%>
               
Copyright ©2001 Ology's