<% '###################### 'File: fullmenu.asp 'Created by: Dovid Kompel (izzydk@yahoo.com) 'Created on: 02/18/02 'Description: displays the bagel country menu, based on data in the 'MenuCategories and MenuItems tables '###################### OPTION EXPLICIT dim rs, rs1 dim sql dim spacer dim category_options() dim counter dim selected %> <% Dim conn Set conn = Server.CreateObject("ADODB.Connection") conn.ConnectionString = "Driver={SQL Server}; Server=bcmenu.db.8990392.hostedresource.com; Database=bcmenu; Uid=bcmenu; Pwd=BC123xyzbc;" conn.Open %> Bagel Country
   
     


<% 'Generate an options list for each category sql = "select * from MenuCategories " & _ "where display = 1 and menuid = 1 " & _ "order by sortorder" set rs = conn.execute(sql, 3) set rs1 = conn.execute(sql, 3) if not (rs.eof and rs.bof) then counter = 0 'Used to track the number of catgories do while not rs.eof 'increase the upper bound of the category_options array Redim Preserve category_options(counter) 'Begin to generate the options list rs1.movefirst category_options(counter) = "" rs.movenext counter = counter + 1 loop end if rs.close rs1.close 'loop through and display the list of categories 'loop through and display the item list within each category sql = "select * from MenuCategories " & _ "where display = 1 and menuid = 1 " & _ "order by sortorder" set rs = conn.execute(sql) if not (rs.eof and rs.bof) then counter = 0 do while not rs.eof 'print the category title and then display items in that category response.write "" response.write "" response.write "" response.write "
" & rs("name") & "" & category_options(counter) & "
" response.write "
" 'loop through and print the items available in this category sql = "select * from MenuItems " & _ " where display = 1 and categoryid = " & rs("categoryid") & _ " order by sortorder" set rs1 = conn.execute(sql) if not (rs1.eof and rs1.bof) then response.write "" & chr(10) do while not rs1.eof 'determine the length of the spacer string spacer = String(25,".") response.write "" & chr(10) response.write "" & chr(10) response.write "" & chr(10) response.write "" & chr(10) if trim(rs1("shortdesc")) <> "" then response.write "" & chr(10) response.write "" & chr(10) end if rs1.movenext loop response.write "
" if trim(rs1("image")) <> "" then response.write "" response.write rs1("name") if trim(rs1("image")) <> "" then response.write "" response.write spacer & "" & rs1("price") & "
" & rs1("shortdesc") & "" & chr(10) response.write "
" & chr(10) response.write "
" & chr(10) else response.write "The items in this section are being revised. Please check back soon.

" end if rs1.close rs.movenext counter = counter + 1 loop else response.write "The menu is currently being revised. Please check back soon." end if rs.close %>














Copyright 2012 Bagel Country
9306 Skokie Blvd. Skokie, Illinois Call (847) 673-3030