<%@ Language=VBScript %> <% Option Explicit %> <% connectToDB(".") dim vSection, vParent dim InsSent dim RightBar RightBar = False %> Aînés Hébergement - Chroniques <%'**** ce bout de table doit être présent dans tout les headers%>
<% if Request.QueryString = "" then %> <% dim RS2 set RS2 = Server.CreateObject("ADODB.Recordset") strSQL = "SELECT * FROM tbl_Cat AS c INNER JOIN tbl_Chronique AS h ON c.ID_cat = h.Categorie_chr WHERE Visible_chr and h.Date_chr = (SELECT Max(Date_chr) FROm tbl_Chronique WHERE Categorie_chr = c.ID_cat) ORDER BY Nom_Cat" RS.Open strSQL, CN do While not RS.EOF %> <% RS.MoveNext Loop RS.close %> <% elseif Request.querystring("idcat") <> "" then %> <% strSQL = "SELECT * FROM tbl_Chronique AS h INNER JOIN tbl_Cat AS c ON h.Categorie_chr = c.ID_Cat WHERE ID_Cat = " & Request.querystring("idcat") & " AND Visible_chr ORDER BY Date_chr DESC" RS.Open strSQL, CN if Not RS.EOF then vCat = RS.Fields("ID_Cat") %> <% End if RS.Close strSQL = "SELECT DISTINCT c.* FROM tbl_Cat AS c INNER JOIN tbl_Chronique AS h ON c.ID_cat = h.Categorie_chr WHERE Visible_chr AND Categorie_chr <> " & vCat RS.Open strSQL, CN if not RS.EOF then %> <% end if RS.Close %> <% elseif Request.querystring("idchr") <> "" then %> <% dim vCat strSQL = "SELECT * FROM tbl_Chronique WHERE ID_Chronique = " & Request.QueryString("idchr") RS.Open strSQL, CN if RS.EOF then %> <% else vCat = RS.Fields("Categorie_chr") %> <% RS.Close %> <% end if %> <% end if %>
 
<%ShadowTitle "
" & RS.Fields("Nom_cat") & "
", "98%" %>
<% if Nz(RS.Fields("Image_chr"), "") <> "" then %> " border="1" align="right" class="chroImg"> <% end if %> <%=RS.Fields("Titre_chr")%>

<%=GetText(RS.Fields("ArticleFormat_chr"), 300)%>...
">[ suite ]

    <% strSQL = "SELECT TOP 5 * FROM tbl_Chronique WHERE Categorie_chr = " & RS.Fields("ID_Cat") & " AND ID_chronique <> " & RS.Fields("ID_Chronique") & " AND Visible_chr ORDER BY Date_chr DESC" RS2.Open strSQL, CN do while not RS2.EOF %>
  • "><%=RS2.Fields("Titre_chr")%>
  • <% RS2.MoveNext loop RS2.Close %>

">Toutes les chroniques: <%=RS.Fields("Nom_cat")%>

<%ShadowTitle "
" & RS.Fields("Nom_cat") & "
", "98%" %>
Autres Catégories
Une erreur s'est produite, veuillez retourner en arrière.
','_blank','left='+Math.round((window.screen.availWidth - 500) / 2)+',top='+Math.round((window.screen.availHeight - 400) / 2)+',toolbar=1,location=1,directories=1,status=1,scrollbars=1,resizable=1,copyhistory=1,menuBar=1,width=500,height=400'); return false;" title="Imprimer la page" target="_blank"> Imprimer cette chronique Commenter cette chronique ','_blank','left='+Math.round((window.screen.availWidth - 350) / 2)+',top='+Math.round((window.screen.availHeight - 210) / 2)+',toolbar=0,location=0,directories=0,status=0,scrollbars=0,resizable=0,copyhistory=0,menuBar=0,width=350,height=210'); return false;" title="Envoyer à un ami" target="_blank"> Envoyer à un ami

<%=RS.Fields("Titre_chr")%>
<%=FormDateLisible(RS.Fields("Date_chr"))%>


Commentaires d'internautes:
<% strSQL = "SELECT TOP 5 * FROM tbl_Chronique AS h INNER JOIN tbl_Cat AS c ON h.Categorie_chr = c.ID_Cat WHERE Categorie_chr = " & vCat & " AND Visible_chr AND ID_chronique <> " & Request.QueryString("idchr") & " ORDER BY Date_chr DESC;" RS.Open strSQL, CN if not RS.EOF then %> <% end if RS.Close strSQL = "SELECT DISTINCT c.* FROM tbl_Cat AS c INNER JOIN tbl_Chronique AS h ON c.ID_cat = h.Categorie_chr WHERE Visible_chr AND Categorie_chr <> " & vCat RS.Open strSQL, CN if not RS.EOF then %> <% end if RS.Close %>

Autres chroniques: <%=RS.Fields("Nom_Cat")%>

Autres Catégories
<% strSQL = "SELECT * FROM tbl_Comment WHERE ID_Chronique = " & Request.QueryString("idchr") RS.Open strSQL, CN do while not RS.EOF %>

<%=RS.Fields("Nom_comment")%>
<%=FormDateLisible(RS.Fields("Date_Comment"))%>
<%=RS.Fields("Text_Comment")%>

<% RS.MoveNext loop RS.Close %>

Vous avez un commentaire sur cette chronique?

" method=post onsubmit="return CommentCheck();">
Votre nom:
Commentaire: