<%@ Language=VBScript %> <% catid=request("catid") shlomo=catid CZN=Session("thename") tablename = "Restaurants" %> [an error occurred while processing this directive] [an error occurred while processing this directive] <% 'Get max number to display from setup.asp numperpage = displaymax1 'Determine what page your currently on, for paging. if isnumeric(request.form("page")) then currentpage = cint(request.form("page")) else currentpage = 1 end If if currentpage<1 then currentpage=1 end if sortby=request("sortby") if sortby<>"itemno" and sortby<>"price" then sortby="name" end if 'For Paging. nextsortby=sortby if catid="" or isnull(catid) or not isnumeric(catid) then pdredirect("default.asp") end if 'Open database get categories. set rs=opendb("SELECT * FROM category WHERE id=" & catid) 'If no record found. if rs.EOF then pdredirect("listcats.asp") end if catname=rs("name") catdesc=rs("description") catshortdesc=rs("shortdesc") rs.close set rs=nothing %> [an error occurred while processing this directive]
<% getHeading "", "hdnews", "inthenews" %>
<%=showlevels(catid, shopurl & "shop/category.asp")%>
<% 'Open database get items from category. set rs=opendb("SELECT * FROM items WHERE catid=" & catid & " AND active='Yes' ORDER BY " & sortby) if not rs.eof then rs.movefirst rs.pagesize = numperpage totalpages = rs.pagecount rs.absolutepage = currentpage end if if not rs.eof then %> <% do while not rs.eof and count < rs.pagesize itemname=rs("name") price=rs("price") hideprice=rs("hideprice") if hideprice="ON" then hideprice=1 else hideprice=0 end if saleprice=rs("saleprice") onsale=rs("onsale") tempimage=rs("smallimage") description=rs("description") shortdesc=rs("shortdesc") itemno=rs("itemno") imagefound="" if Len(tempimage)>0 then smallimage=tempimage else imagefound="no" end if %> <% rs.movenext count = count + 1 loop %> <% end if rs.close set rs=nothing %>
<% 'Open database get sub categories. set rs=opendb("SELECT * FROM category WHERE subof=" & catid & " ORDER BY name") if not rs.eof then %>Categories:<% rs.movefirst while not rs.eof subcatname=rs("name") subcatid=rs("id") %> <% rs.movenext if not rs.eof then response.write (" | ") end if wend end if rs.close set rs=nothing response.write (shlomo) %>
<%=catdesc%>
 
  Price
<% 'Determine whether to display image. if imagefound="no" then else %> <%=itemname%> <%end if%> <%=itemname%>
<%=shortdesc%> [

Order Now
]
<%=left(itemno,8)%> <% if hideprice=0 then 'Display price or sale price? if onsale="Yes" or onsale="yes" then %> <% =showCurr(price)%>
<% =showCurr(saleprice)%> <% else response.write(showCurr(price)) end if end if %>
Displaying Page <%=currentpage%> of <%=totalpages%>.
<% 'Create Previous Page link. if not currentpage = 1 Then %> <% end if 'Create Next Page link. if not currentpage = totalpages then %> <% end if %>
<% showbutton " Previous " & maxrec,"javascript:(document.prev.submit())","" %> <% showbutton " Next ","","next" %>
<% If Session("Valid") = "" Then %> " class="style2 button" style="text-decoration:none"> <% Else%> <% Response.write ("Welcome") & vbcrlf & Session("Valid")%>
" class="style2" style="text-decoration:none"> <% End If %> <% 'xdb_server = "p3swhsql-v10.shr.phx3.secureserver.net" 'xdb_name = "MyKosherTo" 'xdb_username = "MyKosherTo" 'xdb_userpassword = "Million1" 'xfieldname = "Restaurant" 'xtablename = "Restaurants" 'connectstr1 = "Driver={SQL Server};SERVER=" & xdb_server & ";DATABASE=" & xdb_name & ";UID=" & xdb_username & ";PWD=" & xdb_userpassword 'Set oConn1 = Server.CreateObject("ADODB.Connection") 'oConn1.Open connectstr1 'Sqry = "SELECT * From Restaurants WHERE RedeD = '" & "redcatid=" & shlomo & "'" 'Set oRS = oConn1.Execute(Sqry) %> <% 'Response.write oRS("state") 'Response.write oRS("Restaurant") 'Response.write oRS("Delivery") 'Session("Stat") = oRS("State") 'Session("Restaurant")= oRS("Restaurant") 'Session("Delivery")= oRS("Delivery") 'Response.write (Session("Stat")) 'oRS.Close 'Set oRS = Nothing 'oConn1.Close 'Set oConn1 = Nothing %>