<%@ Language=VBScript %> <%Option Explicit%> <% if session("LastNameOnTop") & "" = "" AND session("UserID") & "" <> "" then%> <%end if if session("UserID") & "" = "" then server.transfer("account.asp") dim RecipCategs, i, Data, DataExist, thisCategID, PageNo, tens, deleterec, starting, ending, j dim oRs, SQL, oConn, classname1,classname2, totalPages, totalRows, RecipeID, CategTitle, leftphoto,splitFoto,splitFoto1 RecipCategs = Application("RecCategs"&lang) thisCategID = Request.Form("thisCategID") deleterec = Request.Form("deleterec") RecipeID = Request.Form("RecipeID") PageNo = Request("PageNo") : if PageNo & "" = "" then PageNo = 1 tens = Request("tens") : if tens & "" = "" then tens = 1 set oConn = Server.CreateObject("ADODB.Connection") oConn.open Application("ConStr") set oRs = Server.CreateObject("ADODB.Recordset") if deleterec = "1" then SQL = "Delete from RecipeBox where RecipeID=" & RecipeID & " AND UID=" & session("UserID") oConn.execute SQL end if SQL = "MyRecipeBox '" & lang & "', " & session("UserID") & ",'" & thisCategID & "', " & PageSize & "," & PageNo oRs.open SQL, oConn, 0,1,1 if oRs.state=0 then oRs.open SQL, oConn, 3, 1, 1 if oRs.EOF = false then totalRows = oRs("TotalRecs") if totalRows = 0 then DataExist = 0 else totalRows = oRs("TotalRecs") DataExist = 1 Data = oRs.GetRows() totalPages = totalRows \ PageSize if totalRows mod PageSize > 0 then totalPages = totalPages + 1 j=0 redim tempph(totalRows) for i=0 to ubound(Data,2) if Data(5,i) <> "default.jpg" then if instr(Data(5,i),",") <= 0 then tempph(j) = Data(5,i) j = j + 1 else tempph(j) = right(Data(5,i),len(Data(5,i))-instr(Data(5,i),",")) j = j + 1 end if end if next randomize j=Int((j * Rnd)+1) leftphoto = tempph(j-1) if leftphoto & "" = "" then leftphoto = "default.jpg" end if oRs.close if leftphoto & "" = "" then leftphoto = "default.jpg" starting = ((tens-1)*10)+1 : ending = starting + 9 GoToPage = "my_recipe_box.asp" %> <%=PageTitle%>

<%for i=0 to ubound(RecipCategs,2) if Cstr(thisCategID) = Cstr(RecipCategs(0,i)) then CategTitle=RecipCategs(1,i)%> <%next%>
<%=RBCat(lg)%>
<%=RecipCategs(1,i)%>
<%=RBTitle1(lg)%><%if CategTitle & "" <> "" then %> / <%=CategTitle%><%end if%>

<%if DataExist=1 then%>Στη συγκεκριμμένη σελίδα υπάρχουν οι συνταγές που έχετε προσθέσει στο "recipe box".<%else%><%=RBTitle3(lg)%><%end if%>
<%=RBTitle4(lg)%> <%=RBTitle5(lg)%> <%=RBTitle6(lg)%> <%if DataExist=1 then%>
Για να αφαιρέσετε κάποια συνταγή από το "recipe box", κάντε κλικ στο σύμβολο .<%end if%>
<%if DataExist=1 then%>
Σελίδα   <% if pageno>10 then %>   <%end if for i = starting to ending if i <=totalpages then%> <%if Cint(i) = Cint(PageNo) then%><%=i%><%else%><%=i%><%end if%> <% else exit for end if next if i   <%end if%>
<%end if%>
<% if DataExist = "1" then classname1 = "table4" : classname2 = "table7" for i=0 to ubound(Data,2)%>
<%if instr(Data(5,0),",") >0 then splitFoto = Split(Data(5,0), ",") splitFoto1 = mtemp(0) else splitFoto1 = Data(5,0) end if%>
<%=Data(3,i)%>
<%=Data(4,i)%>
<% if classname1 = "table4" then classname1="table8": classname2 = "table8" else classname1="table4":classname2 = "table7" next end if if DataExist=1 then%>
Σελίδα   <% if pageno>10 then %>   <%end if for i = starting to ending if i <=totalpages then%> <%if Cint(i) = Cint(PageNo) then%><%=i%><%else%><%=i%><%end if%> <% else exit for end if next if i   <%end if%>
<%end if%>