<% If Not session("admin_loggedin" & strSUnique) = Session.SessionID then Response.Redirect "default.asp" Dim totalPage, totalRecords, displayRecords pp = 30 With Response .Write vbcrlf & "
" %> <% .Write "

All Ads in Print friendly format

" .Write "
Click on the header to Sort displayed records.
(Records are sorted on the client without database access. IE Browser Only)
" .Write "

" & vbcrlf .Write "" .Write "" .Write "" .Write "" .Write "" .Write "" .Write "" .Write "" .Write "" .Write "" .Write "" .Write "" strAd = "SELECT " & tablPfx & "Ads.*," & tablPfx & "Cat.catName," & tablPfx & "Scat.scatName FROM " & tablPfx & "Ads," & tablPfx & "Cat," & tablPfx & "Scat WHERE " strAd = strAd & "(" & tablPfx & "Ads.catID = " & tablPfx & "Cat.catID AND " & tablPfx & "Ads.scatID = " & tablPfx & "Scat.sCatID) ORDER BY " & tablPfx & "Ads.ID DESC;" rs.PageSize = pp rs.CacheSize = pp rs.CursorLocation = 3 rs.Open strAd, strConn, 0, 1 If Not rs.EOF then nPage = Session("allads_print" & strSUnique) URLlink = "extract.asp?" & Server.URLEncode(Request.Querystring) pageType = 15 strPaging = buildPages(nPage, URLlink, pageType) '## paging built in libraries.asp .Write strPaging .Write "
Total Pages: " & totalPage & "
" .Write "Total Posted: " & totalRecords & "
" For J = 1 to displayRecords catName = rs("catName") scatName = rs("scatName") Select Case CLng(rs(15)) Case 0: status = "pending" Case 1: status = "active" Case 2: status = "expired" Case 3: status = "disabled" End Select Select Case CBool(rs(18)) Case True: hotlist = "hotlist" Case False: hotlist = "-" End Select adID = rs(1) price = rs(19) If Len(price) = 0 then price = "0.00" subject = "" & rs(9) & "" If J mod 2 = 0 then cellColor = "bgcolor='white'": Else: cellColor = "bgcolor='pink'" .Write "" & vbcrlf .Write "" .Write "" .Write "" .Write "" .Write "" .Write "" .Write "" .Write "" .Write "" .Write "" .Write "" & vbcrlf rs.MoveNext Next End If .Write "
CategoryStatusPostedExpiredAuthorSubjectBodyIPPriceHotList
" & catName & "/" & scatName & "" & status & "" & FormatDateTime(CDate(rs(5)), 2) & "" & FormatDateTime(CDate(rs(6)), 2) & "" & rs(7) & "" & subject & "" & rs(14) & "" & rs(16) & "" & price & "" & hotlist & "

" & vbcrlf Session("allads_print" & strSUnique) = Empty End With rs.close Set rs = Nothing objConn.close Set objConn = Nothing %>