<% Option Explicit %> Nouvelles <% '**************************************************************************************** '** '** '** '** '**************************************************************************************** Dim rsNews 'Database recordset holding the news items Dim intRecordPositionPageNum 'Holds the number of the page the user is on Dim intRecordLoopCounter 'Loop counter to loop through each record in the recordset Dim intTotalNumNewsEntries 'Holds the number of News Items there are in the database Dim intTotalNumNewsPages 'Holds the number of pages the News Items cover Dim intLinkPageNum 'Holds the number of the other pages of news itmes to link to Dim Language Language ="FR" 'If this is the first time the page is displayed then set the record position is set to page 1 If Request.QueryString("PagePosition") = "" Then intRecordPositionPageNum = 1 'Else the page has been displayed before so the news item record postion is set to the Record Position number Else intRecordPositionPageNum = CInt(Request.QueryString("PagePosition")) End If %> <% 'Create recorset object Set rsNews = Server.CreateObject("ADODB.Recordset") 'Initalise the strSQL variable with an SQL statement to query the database by selecting all tables ordered by the decending date strSQL = "SELECT csmEvents.* FROM csmEvents where not Comments ORDER BY Start_date DESC;" 'Set the cursor type property of the record set to dynamic so we can naviagate through the record set rsNews.CursorType = 3 rsNews.Filter = "Lang = '" & Language & "' and Archives = 'False'" 'Query the database rsNews.Open strSQL, adoCon 'Set the number of records to display on each page by the constant set in the common.asp file rsNews.PageSize = intRecordsPerPage 'Get the record poistion to display from If NOT rsNews.EOF Then rsNews.AbsolutePage = intRecordPositionPageNum 'If there are no rcords in the database display an error message If rsNews.EOF Then 'Tell the user there are no records to show Response.Write "
There are no News Items to read" Response.Write "
Please check back later
" Response.End 'Display the News Items Else 'Count the number of News Items database intTotalNumNewsEntries = rsNews.RecordCount 'Count the number of pages of News Items there are in the database calculated by the PageSize attribute set above intTotalNumNewsPages = rsNews.PageCount 'Display the HTML number number the total number of pages and total number of records %>

 

Nouvelles

Evènements

Nouvelles de l'agence

Evènements
<% 'For....Next Loop to display the News Items in the database For intRecordLoopCounter = 1 to intRecordsPerPage 'If there are no records then exit for loop If rsNews.EOF Then Exit For %>
<%if (rsNews("End_date")<>"") then%> <% = day(rsNews("Start_date")) %> au <% = FormatDateTime(rsNews("End_date"), vbshortDate) %> <%else%> <% = FormatDateTime(rsNews("Start_date"), vbshortDate) %> <%end if %> - <% = rsNews("Coverage") %> <% dim strCountry strCountry = rsNews("Country") if strCountry <>"" then %> ( <%= strCountry %> ) <% end if %>
" target="_self"><% = rsNews("Title") %>

<% 'Move to the next record in the recordset rsNews.MoveNext Next rsNews.Close 'Initalise the strSQL variable with an SQL statement to query the database by selecting all tables ordered by the decending date strSQL = "SELECT tblNews.* FROM tblNews where not Comments ORDER BY News_Date DESC;" 'Set the cursor type property of the record set to dynamic so we can naviagate through the record set rsNews.CursorType = 3 rsNews.Filter = "Lang = '" & Language & "' and Comments = 'False'" 'Query the database rsNews.Open strSQL, adoCon 'Display an HTML table with links to the other News Items %>
Afficher tous les évènements

La Presse

La Presse
<% 'For....Next Loop to display the News Items in the database For intRecordLoopCounter = 1 to 3 'If there are no records then exit for loop If rsNews.EOF Then Exit For %>
" target="_self"><% = rsNews("Author_name") %> - <% = FormatDateTime(rsNews("News_Date"), vbLongDate) %>
<% = rsNews("Title") %>(" target="_self">Article Complet )
 
<% 'Move to the next record in the recordset rsNews.MoveNext Next End If 'Display an HTML table with links to the other News Items %>

Afficher tous les articles
Accueil - Nouvelles - Banq-Eau - Les Bassins - Publications - Liens - Forum - Contacts
Mentions légales