<% If Not Sess_Array(48) = Session.SessionID then UpdateSessions False Response.Redirect "default.asp" End If Dim totalPage, totalRecords, displayRecords pp = 30 %> All Ads Print Friendly <% With Response %>
<% .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.)
" .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;" set rs = objConn.Execute(strAd) If Not rs.EOF then nPage = Sess_Array(0) 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 = Empty: Else: cellColor = "class='odd'" .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 Sess_Array(0) = Empty End With rs.close UpdateSessions False %>