<% If z1_AccessLevel < 1 Then Response.Redirect "ui_index.asp?msg=You do not have access to that page" End If %> kaos news - update area
<% Dim z_SelectID,zblnPassAlong,zintBoxCounter zintBoxCounter = 0 z_SelectID = Trim(Request.Form("selectid")) If z_SelectID <> "" Then Response.Write "" z_SelectID = " " & z_SelectID & "," zblnPassAlong = True End If '-- rs stuff -- Dim zobjRS,zstrSQL,zintPage,zintPages zstrSQL = "SELECT news.PostID, news.Title, news.PostedDate, categories.CategoryName, userInfo.Username FROM userInfo INNER JOIN (news INNER JOIN categories ON news.Category LIKE categories.Category) ON news.PostedBy LIKE userInfo.UserID ORDER BY news.PostID DESC" Set zobjRS = Server.CreateObject("ADODB.Recordset") zobjRS.CursorLocation = 3 zobjRS.Open zstrSQL, zobjConn, adOpenForwardOnly, adLockReadOnly, adCmdText zintPage = Trim(Request.Form("page")) 'takes user input If zintPage <> "" And IsNumeric(zintPage) Then 'validates zintPage = CInt(zintPage) 'possibly not default page of 1 Else zintPage = 1 'defo page 1 End If zintPages = Int((zobjRS.RecordCount / 30) + 0.99) 'works how many pages there could be. 30 posts per page If zintPage > zintPages Then zintPage = zintPages End If If zintPage >= 2 Then zobjRS.Move +((zintPage - 1) * 30) 'moves recordset on to the requested page End If Response.Write "
click a title to edit the post" '-- page jump stuff -- Response.Write "page " & zintPage & " of " & zintPages & "   jump to:" For counter = 1 to zintPages If counter = zintPage Then Response.Write " " & counter & "" Else Response.Write " " & counter & "" End If Next '-- post index section. headers -- Response.Write "
" '-- post index. content -- Dim bgcol,counter1 bgcol = "eeeeee" counter1 = 1 If Not zobjRS.EOF Then Do While Not zobjRS.EOF And counter1 <= 30 Response.Write "" counter1 = counter1 + 1 If bgcol = "eeeeee" Then bgcol = "dddddd" Else bgcol = "eeeeee" End If zobjRS.MoveNext Loop End If Response.Write "
 titlecategoryposted bydate postedselect
 " & _ zobjRS("Title") & "" & zobjRS("CategoryName") & "" & _ zobjRS("Username") & "" & zobjRS("PostedDate") & " 0 Then 'checks pre-selected boxes Response.Write " checked" zintBoxCounter = zintBoxCounter + 1 End If Response.Write ">
" & vbcrlf & "" %>