%Option Explicit%> <% Dim dbNews, rsNews If OpenDataBase(dbNews, Application("alakazoo_ConnectionString"), Application("alakazoo_RuntimeUserName"), Application("alakazoo_RuntimePassword")) Then SQL = "News.News" & Session("Langue") & " As News, News.Date FROM News Where News.News" & Session("Langue") & " Is Not Null " If LCase(Request.QueryString("Page")) = "archives" Then 'SQL = SQL & " And News.Date < '" & DateAdd("m", -12, Date()) & "' " Response.Write "
Archives
" Else SQL = " Top 15 " & SQL' & " And News.Date <='" & Date() & "' And News.Date >= '" & DateAdd("m", -12, Date()) & "' " End IF SQL = "SELECT " & SQL & " ORDER BY News.Date DESC" 'Response.Write sql If OpenRecordSet(dbNews, rsNews, SQL, adOpenForwardOnly, adLockReadOnly) Then Dim DitIt DitIt = False Dim TmpLCID If LCase (Session("Langue")) = "francais" Then 'Store temporarly current LCID TmpLCID = Session.LCID ' Set French Date format Session.LCID = 1036 End If Dim TmpDate Do While Not rsNews.EOF TmpDate = FormatDateTime(rsNews("Date"), 1) If LCase (Session("Langue")) = "francais" Then TmpDate = UCase(Left(TmpDate, 1)) & Right(TmpDate, Len(TmpDate)-1) TmpDate = Replace(TmpDate, " ", ", ",1 ,1) End If Response.Write "" & TmpDate & "
" & Replace(rsNews("News"), VbCrlf, "
") & "
Sorry, no news in database
" Else Response.Write "Désolé, aucune nouvelle dans la base de données
" End If End If End If End If %>