%@ Language=VBScript %> <%Option Explicit%> <% if session("LastNameOnTop") & "" = "" AND session("UserID") & "" <> "" then%> <%end if dim RecipeCategID, i, totalpages, tens, RecipeCategName dim oRs, oConn, SQL, DataExist, RecipCategs, a, thisstyle dim tmplang, PageNo, totalRows, Data dim starting, ending, errormsg errormsg = "" set oConn = Server.CreateObject("ADODB.Connection") oConn.open Application("ConStr") set oRs = Server.CreateObject("ADODB.Recordset") RecipCategs = Application("RecCategs"&lang) RecipeCategID = Request("RecipeCategID") if RecipeCategID = "" then Response.Redirect("error.asp") end if PageNo = Request("PageNo") : if PageNo & "" = "" then PageNo = 1 tens = Request("tens") : if tens & "" = "" then tens = 1 SQL = "ShowRecipebyCateg " & RecipeCategID & ", '"& lang & "', " & PageSize & "," & PageNo oRs.open SQL, oConn, 0,1,1 if oRs.EOF = false then DataExist = 1 totalRows = oRs("TotalRecs") Data = oRs.GetRows() totalPages = totalRows \ PageSize if totalRows mod PageSize > 0 then totalPages = totalPages + 1 randomize a = Int(Cint(ubound(Data,2)) * Rnd)+1 a = a - 1 end if oRs.close starting = ((tens-1)*10)+1 : ending = starting + 9 GoToPage = "reccateg.asp?RecipeCategID="&RecipeCategID menu = "2" %>