<%@ Language=VBScript %> <%Option Explicit%> <% if session("LastNameOnTop") & "" = "" AND session("UserID") & "" <> "" then%> <%end if dim CategID, MainCategs, MainCategDescr, i, SubCategs, a dim oRs, oConn, SQL, DataExist, ShowFirst dim RecipeExist, ShowRecipes, RecPhotos, SplitRecPhotos dim tempid, splittempid RecPhotos = "" : tempid = "" MainCategs = Application("ProdCategs"&lang) SubCategs = Application("ProdSubCategs"&lang) CategID = Request.Form("CategID") if CategID="" then Response.Redirect("error.asp") end if set oConn = Server.CreateObject("ADODB.Connection") oConn.open Application("ConStr") set oRs = Server.CreateObject("ADODB.RecordSet") SQL = "SELECT TOP 4 ShowFirst.SFProdID, ProdDescr.ProdDescr, ProdDescr.ProdDescrEN, ShowFirst.SFExtraText, ShowFirst.SFExtraTextEN, IsNull(Product.ProdThumbs,'default.jpg') , ShowFirst.CategID "&_ " FROM ShowFirst "&_ " LEFT OUTER JOIN Product on ProdID = SFProdID"&_ " LEFT OUTER JOIN ProdDescr on ProdDescr.ProdDescrID = Product.ProdDescrID"&_ " where SFPage='categ' AND CategID=" & CategID & " order by NEWID()" oRs.open SQL, oConn, 3,1,1 if oRs.EOF = false then DataExist = 1 ShowFirst = oRs.GetRows() end if oRs.close SQL = "Select RecCat.RecipeID, Recipe.RecipeName, Recipe.RecipeNameEN, Recipe.RecipePhotos from RecCat "&_ " LEFT OUTER JOIN Recipe on Recipe.RecipeID = RecCat.RecipeID" &_ " where RecCat.ProdCategID = " & CategID & " AND Recipe.RecipeShow = 1 order by Recipe.RecipeName" oRs.open SQL, oConn, 3,1,1 if oRs.EOF = false then RecipeExist = 1 ShowRecipes = oRs.GetRows() '---------------------------------------------------------------------------------------- for i=0 to ubound(ShowRecipes,2) if ShowRecipes(3,i) & "" <> "" then RecPhotos = RecPhotos & ShowRecipes(3,i) & "," tempid = tempid & ShowRecipes(0,i) & "," end if next if RecPhotos & "" <> "" then SplitRecPhotos = split(RecPhotos,",") Splittempid = split(tempid,",") a = ubound(SplitRecPhotos) randomize a=Int((a * Rnd)+1) RecPhotos = SplitRecPhotos(a-1) tempid = Splittempid(a-1) else RecPhotos = "default.jpg" end if '---------------------------------------------------------------------------------------- end if GoToPage = "categ.asp?CategID=" & CategID menu = "1" %> <%=PageTitle%>
   <%for i=0 to ubound(MainCategs,2)%>    <%if Cint(MainCategs(0,i)) = Cint(CategID) then MainCategDescr = MainCategs(1,i)%> <%=MainCategs(1,i)%> <%else%> <%=MainCategs(1,i)%> <%end if%>    <%next%>
<%for i=0 to ubound(SubCategs,2) if SubCategs(2,i) = Cint(CategID) then%>  <%=SubCategs(1,i)%>
<% end if next%>

<%if RecipeExist = 1 then%>

<%for i=0 to ubound(ShowRecipes,2)%> <%next%>
<%=Product10(lg)%>
<%'=ShowRecipes(1,i)%><%'else%><%'=ShowRecipes(2,i)%><%'end if%> \'';return true;" onmouseout="window.status='<%=windowstatus%>'; return true;" class="link4"> <%if lang="GR" then%><%=ShowRecipes(1,i)%><%else%><%=ShowRecipes(2,i)%><%end if%>
<%end if%>
SHOP > <%=MainCategDescr%>


   <%=categLang(lg,categid)%>


<%if Dataexist = 1 then%> <%end if%>
<%If Ubound(ShowFirst,2)>=0 then%>
<%if lang="GR" then%><%=ShowFirst(1,0)%><%else%><%=ShowFirst(2,0)%><%end if%>
<%if lang="GR" then%><%=ShowFirst(3,0)%><%else%><%=ShowFirst(4,0)%><%end if%>
<%end if%>
<%If Ubound(ShowFirst,2)>=1 then%>
<%if lang="GR" then%><%=ShowFirst(1,1)%><%else%><%=ShowFirst(2,1)%><%end if%>
<%if lang="GR" then%><%=ShowFirst(3,1)%><%else%><%=ShowFirst(4,1)%><%end if%>
<%end if%>
<%If Ubound(ShowFirst,2)>=2 then%>
<%if lang="GR" then%><%=ShowFirst(1,2)%><%else%><%=ShowFirst(2,2)%><%end if%>
<%if lang="GR" then%><%=ShowFirst(3,2)%><%else%><%=ShowFirst(4,2)%><%end if%>
<%end if%>
<%If Ubound(ShowFirst,2)>=3 then%>
<%if lang="GR" then%><%=ShowFirst(1,3)%><%else%><%=ShowFirst(2,3)%><%end if%>
<%if lang="GR" then%><%=ShowFirst(3,3)%><%else%><%=ShowFirst(4,3)%><%end if%>
<%end if%>
<% set oRs = nothing oConn.close : set oConn = nothing %>