<%@ LANGUAGE = "VBScript" %> <% '----------------------------------------------------------- ' ASPilot.com - Pilot Cart News Room ' ------------------------------ ' Copyright © 2004 Spliethof Inc ' ' This file lists all the products in the site will full links and ' descriptions. If you submit this page to the search engines, then ' your entire catalog will be indexed. PilotInitialize If Not PilotPageBegin("newsroom", Empty) Then Response.Redirect g.HomePageURL B2BCheckLogin "gateway" specific = Request.QueryString("specific") If specific = "" Then Set rs = Server.CreateObject("ADODB.RecordSet") rs.CursorLocation = 3 If mypage = "" Then mypage = 1 rs.Open "SELECT * FROM TBLNEWS ORDER BY THEDATE DESC", cnPILOT, adOpenStatic If Not rs.EOF Then rs.MoveFirst 'this newsroom.asp file is set to show 10 articles per page. 'change this number to whatever you like: rs.PageSize = 20 maxcount = cint(rs.PageCount) rs.AbsolutePage = mypage howmanyrecs = 0 While Not rs.EOF And howmanyrecs < rs.pagesize 'here is where we display the news articles in order by date descending. 'modify this to look any way you want: Response.Write""&_ ""&_ "  "&Left(rs("THEDATE"),10)&"

"&_ ""&rs("TAGLINE")&" 
Read more...

" rs.MoveNext howmanyrecs = howmanyrecs + 1 Wend Response.Write"Back" Else Response.Write"Sorry, no News was found yet!" End If If maxcount > 1 Then If mypage + 1 > maxcount Then nextPg = 1 Else nextPg = mypage + 1 'here is our navigational buttons that will show up once you have more then 10 news articles in the database: Response.Write"
Page "&mypage&" of "&maxcount&"      Navigate to Page:  
" End If rs.Close :Set rs = Nothing Else Set rs = cnPILOT.Execute("SELECT * FROM TBLNEWS WHERE NEWSID = "&specific&"") If Trim("X"&rs("WRITTENBY")) = "X" And Trim("X"&rs("EMAIL")) = "X" Then writtenBy = "" ElseIf Trim("X"&rs("WRITTENBY")) <> "X" And Trim("X"&rs("EMAIL")) = "X" Then writtenBy = "
Written By: "&rs("WRITTENBY")&"" ElseIf Trim("X"&rs("WRITTENBY")) <> "X" And Trim("X"&rs("EMAIL")) <> "X" Then writtenBy = "
Written By: "&rs("WRITTENBY")&"" Else writtenBy = "
Written By: "&rs("EMAIL")&"" End If Do Until rs.EOF Response.Write""&Left(rs("THEDATE"),10)&"

"&_ ""&rs("NEWS")&"
"&_ ""&writtenBy&"

"&_ "Back

List All News
" rs.MoveNext Loop rs.Close : Set rs = Nothing End If TemplateAfterPC PilotTerminate %>