 |
 |
| |
<% 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
%>
<%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")%>
|
|
<%
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")
%>
<%ShadowTitle " " & RS.Fields("Nom_cat") & " ", "98%" %>
|
|
|
<%
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
%>
 |
Autres Catégories
|
<%
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
%>
|
Une erreur s'est produite, veuillez retourner en arrière.
|
<%
else
vCat = RS.Fields("Categorie_chr")
%>
','_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"))%>
|
<% if Nz(RS.Fields("Image_chr"), "") <> "" then %>
 " border="1" align="right" class="chroImg">
<% end if %>
<%=RS.Fields("ArticleFormat_chr")%>
<%if NZ(RS.Fields("Auteur_chr"), "") <> "" then %>
<%=RS.Fields("Auteur_chr")%>
<%end if%>
<%if NZ(RS.Fields("Auteur_chr"), "") <> "" then %>
<%=RS.Fields("Poste_chr")%>
<%end if%>
<%if NZ(RS.Fields("Auteur_chr"), "") <> "" then %>
"><%=RS.Fields("Email_chr")%>
<%end if%>
','_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.Close %>
 |
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
%>
Autres chroniques: <%=RS.Fields("Nom_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
%>
Autres Catégories
|
|
<%
end if
RS.Close
%>
|
<%
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?
|
|
<% end if %>
<% end if %>
|