# HG changeset patch
# User Franck Deroche
# Date 1192883202 -7200
# Node ID 1da880ffa7aab76c05ea9ee55de283fbe8e494fa
# Parent 7dec529820000ff8f60e6ab1c0cf894d7344b357
Suppression d'anciennes versions des fichiers comment et index
diff -r 7dec52982000 -r 1da880ffa7aa comment.20060616.php
--- a/comment.20060616.php Sat Oct 20 14:25:20 2007 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-get('Auteur');
- $Adresse=$Req->get('Adresse');
- $AdresseMail = $Req->get('AdresseMail');
- $Comment=$Req->get('Comment');
- $DateComment=gmdate("Y-m-d H:i:s", time() + 3600*2);
- if(!is_null($Auteur) && $Auteur!='Votre Nom' && $Auteur != $Adresse && !empty($Comment)) {
- // Prévention d'un "cassage" par ajout d'un commentaire incorrectement formaté
- if(!DOMDocument::loadXML('' . $Comment . ''))
- $Comment = '', ']]>',$Comment) . ']]>';
- $ip = $_SERVER['REMOTE_ADDR'];
- $Data->debugQuery("
- INSERT INTO Commentaires(MessId, Auteur, Adresse, AdresseMail, Comment, DateComment, ip)
- VALUES({$id}, '{$Auteur}', '{$Adresse}', '{$AdresseMail}', '{$Comment}', '{$DateComment}', '{$ip}')
- ");
- $Data->Query("UPDATE Mess SET NbCommentaires=NbCommentaires+1 WHERE num_mess={$id}");
- }
-
- $Data->Query("SELECT * FROM Mess WHERE num_mess = {$id}");
- $row = $Data->GetRow();
- $mood = '';
- $Mess=$Data->utf8_ensure(str_replace("","
",str_replace("
","
", $row['Message'])));
- $dateFormatee = strftime("%A %d %B %Y, %Hh%M", strtotime($row['DatePost']));
- $Titre = $Data->utf8_ensure($row['Titre']);
- $Titre_url = str_replace(" ", "_", strip_tags($Titre));
- $Titre_url = str_replace("-", "_", $Titre_url);
- include("top.php");
- if(!empty($row['Emot'])) {
- $mood = "
";
- $row['Emot'] = " " . $row['Emot'];
- }
- echo("
-
-
{$Titre} | {$dateFormatee}
- {$mood}
- {$Mess}
- ");
- $Data->Query("SELECT * FROM Commentaires Where MessId={$id} ORDER BY num_comm");
- $defaultGravatar = urlencode("http://defr.org/Misc/NoGravatar.png");
- while(0 !== ($row = $Data->GetRow())) {
- $dateFormatee = strftime(" à %Hh%M le %A %d %B %Y", strtotime($row['DateComment']));
- $AdresseMail = $row['AdresseMail'];
- $grav_id = md5($AdresseMail);
- $Comment = nl2br($row['Comment']);
- $Comment = str_replace(" & ", " & ", $Comment);
- if($row['num_comm'] == 172) $Comment = str_replace("", "", $Comment);
- //if(stristr($Adresse, "@")) $Adresse = "mailto:" . $Adresse;
- $betterHref = (stristr($row['Adresse'], 'http://') != false)?"href='{$row['Adresse']}'":'';
- echo("
- ");
- }
- echo("
-
-
-
-
- ");
- include("foot.php");
-?>
diff -r 7dec52982000 -r 1da880ffa7aa comment_.php
--- a/comment_.php Sat Oct 20 14:25:20 2007 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-' . $Comment . '', DOMXML_LOAD_PARSING, $err))
- $Comment = '';
- $Data->Query("INSERT INTO Commentaires(MessId, Auteur, Adresse, AdresseMail, Comment, DateComment) VALUES({$id}, '{$Auteur}', '{$Adresse}', '{$AdresseMail}', '{$Comment}', '{$DateComment}')");
- $Data->Query("UPDATE Mess SET NbCommentaires=NbCommentaires+1 WHERE num_mess={$id}");
- }
-
- $Data->Query("SELECT * FROM Mess WHERE num_mess = {$id}");
- $row = $Data->GetRow();
- $mood = '';
- $Mess=$Data->utf8_ensure(str_replace("","
",str_replace("
","", $row['Message'])));
- $dateFormatee = strftime("%A %d %B %Y, %Hh%M", strtotime($row['DatePost']));
- $Titre = $Data->utf8_ensure($row['Titre']);
- $Titre_url = str_replace(" ", "_", strip_tags($Titre));
- $Titre_url = str_replace("-", "_", $Titre_url);
- include("top.php");
- if(!empty($row['Emot'])) {
- $mood = "
";
- $row['Emot'] = " " . $row['Emot'];
- }
- echo("
-
-
{$Titre} | {$dateFormatee}
- {$mood}
- {$Mess}
- ");
- $Data->Query("SELECT * FROM Commentaires Where MessId={$id} ORDER BY num_comm");
- $defaultGravatar = urlencode("http://defr.org/Misc/NoGravatar.png");
- while(0 !== ($row = $Data->GetRow())) {
- $dateFormatee = strftime(" à %Hh%M le %A %d %B %Y", strtotime($row['DateComment']));
- $AdresseMail = $row['AdresseMail'];
- $grav_id = md5($AdresseMail);
- $Comment = nl2br($row['Comment']);
- $Comment = str_replace(" & ", " & ", $Comment);
- if($row['num_comm'] == 172) $Comment = str_replace("", "", $Comment);
- //if(stristr($Adresse, "@")) $Adresse = "mailto:" . $Adresse;
- $betterHref = (stristr($row['Adresse'], 'http://') != false)?"href='{$row['Adresse']}'":'';
- echo("
- ");
- }
- echo("
-
-
-
-
- ");
- include("foot.php");
-?>
diff -r 7dec52982000 -r 1da880ffa7aa comment_back.php
--- a/comment_back.php Sat Oct 20 14:25:20 2007 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-get('Auteur');
- $Adresse=$Req->get('Adresse');
- $AdresseMail = $Req->get('AdresseMail');
- $Comment=$Req->get('Comment');
- $DateComment=gmdate("Y-m-d H:i:s", time() + 3600*2);
- if(!is_null($Auteur) && $Auteur!='Votre Nom' && !empty($Comment)) {
- // Prévention d'un "cassage" par ajout d'un commentaire incorrectement formaté
- //if(!@domxml_open_mem('' . $Comment . '', DOMXML_LOAD_PARSING, $err))
- if(!DOMDocument::loadXML('' . $Comment . ''))
- $Comment = '';
- $Data->debugQuery("
- INSERT INTO Commentaires(MessId, Auteur, Adresse, AdresseMail, Comment, DateComment)
- VALUES({$id}, '{$Auteur}', '{$Adresse}', '{$AdresseMail}', '{$Comment}', '{$DateComment}')
- ");
- $Data->Query("UPDATE Mess SET NbCommentaires=NbCommentaires+1 WHERE num_mess={$id}");
- }
-
- $Data->Query("SELECT * FROM Mess WHERE num_mess = {$id}");
- $row = $Data->GetRow();
- $mood = '';
- $Mess=$Data->utf8_ensure(str_replace("","
",str_replace("
","", $row['Message'])));
- $dateFormatee = strftime("%A %d %B %Y, %Hh%M", strtotime($row['DatePost']));
- $Titre = $Data->utf8_ensure($row['Titre']);
- $Titre_url = str_replace(" ", "_", strip_tags($Titre));
- $Titre_url = str_replace("-", "_", $Titre_url);
- include("top.php");
- if(!empty($row['Emot'])) {
- $mood = "
";
- $row['Emot'] = " " . $row['Emot'];
- }
- echo("
-
-
{$Titre} | {$dateFormatee}
- {$mood}
- {$Mess}
- ");
- $Data->Query("SELECT * FROM Commentaires Where MessId={$id} ORDER BY num_comm");
- $defaultGravatar = urlencode("http://defr.org/Misc/NoGravatar.png");
- while(0 !== ($row = $Data->GetRow())) {
- $dateFormatee = strftime(" à %Hh%M le %A %d %B %Y", strtotime($row['DateComment']));
- $AdresseMail = $row['AdresseMail'];
- $grav_id = md5($AdresseMail);
- $Comment = nl2br($row['Comment']);
- $Comment = str_replace(" & ", " & ", $Comment);
- if($row['num_comm'] == 172) $Comment = str_replace("", "", $Comment);
- //if(stristr($Adresse, "@")) $Adresse = "mailto:" . $Adresse;
- $betterHref = (stristr($row['Adresse'], 'http://') != false)?"href='{$row['Adresse']}'":'';
- echo("
- ");
- }
- echo("
-
-
-
-
- ");
- include("foot.php");
-?>
diff -r 7dec52982000 -r 1da880ffa7aa comment_old.php
--- a/comment_old.php Sat Oct 20 14:25:20 2007 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-get('Auteur');
- $Adresse=$Req->get('Adresse');
- $AdresseMail = $Req->get('AdresseMail');
- $Comment=$Req->get('Comment');
- $DateComment=gmdate("Y-m-d H:i:s", time() + 3600*2);
- if(!is_null($Auteur) && $Auteur!='Votre Nom' && !empty($Comment)) {
- // Prévention d'un "cassage" par ajout d'un commentaire incorrectement formaté
- //if(!@domxml_open_mem('' . $Comment . '', DOMXML_LOAD_PARSING, $err))
- if(!DOMDocument::loadXML('' . $Comment . ''))
- $Comment = '';
- $ip = $_SERVER['REMOTE_ADDR'];
- $Data->debugQuery("
- INSERT INTO Commentaires(MessId, Auteur, Adresse, AdresseMail, Comment, DateComment, ip)
- VALUES({$id}, '{$Auteur}', '{$Adresse}', '{$AdresseMail}', '{$Comment}', '{$DateComment}', '{$ip}')
- ");
- $Data->Query("UPDATE Mess SET NbCommentaires=NbCommentaires+1 WHERE num_mess={$id}");
- }
-
- $Data->Query("SELECT * FROM Mess WHERE num_mess = {$id}");
- $row = $Data->GetRow();
- $mood = '';
- $Mess=$Data->utf8_ensure(str_replace("","
",str_replace("
","", $row['Message'])));
- $dateFormatee = strftime("%A %d %B %Y, %Hh%M", strtotime($row['DatePost']));
- $Titre = $Data->utf8_ensure($row['Titre']);
- $Titre_url = str_replace(" ", "_", strip_tags($Titre));
- $Titre_url = str_replace("-", "_", $Titre_url);
- include("top.php");
- if(!empty($row['Emot'])) {
- $mood = "
";
- $row['Emot'] = " " . $row['Emot'];
- }
- echo("
-
-
{$Titre} | {$dateFormatee}
- {$mood}
- {$Mess}
- ");
- $Data->Query("SELECT * FROM Commentaires Where MessId={$id} ORDER BY num_comm");
- $defaultGravatar = urlencode("http://defr.org/Misc/NoGravatar.png");
- while(0 !== ($row = $Data->GetRow())) {
- $dateFormatee = strftime(" à %Hh%M le %A %d %B %Y", strtotime($row['DateComment']));
- $AdresseMail = $row['AdresseMail'];
- $grav_id = md5($AdresseMail);
- $Comment = nl2br($row['Comment']);
- $Comment = str_replace(" & ", " & ", $Comment);
- if($row['num_comm'] == 172) $Comment = str_replace("", "", $Comment);
- //if(stristr($Adresse, "@")) $Adresse = "mailto:" . $Adresse;
- $betterHref = (stristr($row['Adresse'], 'http://') != false)?"href='{$row['Adresse']}'":'';
- echo("
- ");
- }
- echo("
-
-
-
-
- ");
- include("foot.php");
-?>
diff -r 7dec52982000 -r 1da880ffa7aa index.php_
--- a/index.php_ Sat Oct 20 14:25:20 2007 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-Connect();
- if($type != "cal")
- $Data->Query("SELECT * FROM Mess Where num_version='Version 10' ORDER BY num_mess DESC");
- else
- $Data->Query("SELECT * FROM Mess WHERE YEAR(DatePost)={$year} AND MONTH(DatePost)={$month} ORDER BY num_mess DESC");
- $i=0;
- if($type == "cal") {
- echo(" ");
- }
- while(($row=$Data->GetRow()) && ($i++<10 || $type == "cal")) {
- $mood = '';
- $Mess=$Data->utf8_ensure(str_replace("","
",str_replace("
","", $row['Message'])));
- $dateFormatee = strftime("%A %d %B %Y, %Hh%M", strtotime($row['DatePost']));
- $Titre = $Data->utf8_ensure($row['Titre']);
- $Titre_url = str_replace(" ", "_", strip_tags($Titre));
- $Titre_url = str_replace("-", "_", $Titre_url);
- $Titre_url = str_replace(array("é", "è"), "e", $Titre_url);
- $Titre_url = str_replace("à", "a", $Titre_url);
- $Titre_url = str_replace("ù", "u", $Titre_url);
- $Titre_url = str_replace(array("î", "ï"), "i", $Titre_url);
- if(!empty($row['Emot'])) {
- $mood = "
";
- $row['Emot'] = " " . $row['Emot'];
- }
- echo("
-
-
{$Titre} | {$dateFormatee}
- {$mood}
- {$Mess}
-
#{$row['num_mess']} -
-
- ");
- if(!is_null($row['NbCommentaires']) && $row['NbCommentaires']!=0)
- echo("Un 'tit commentaire ( {$row['NbCommentaires']} ) ?");
- else
- echo("Un 'tit commentaire ?");
- echo("
- ");
- $nb = $Data->debugQuery("
- SELECT T.Tag
- FROM Tags T, Lien_Tags_Posts L
- WHERE L.idMess={$row['num_mess']} AND L.idTag = T.idTag
- ORDER BY T.Tag
- ", 2);
- if($nb > 0)
- {
- $tags = '';
- while(0 !== ($tag = $Data->GetRow(2)))
- $tags .= "
{$tag['Tag']} -";
- $tags = substr($tags, 0, -1);
- echo(" ;
Tags : {$tags}");
- }
- echo("
-
-
");
- }
- if($type == "cal") {
- echo(" ");
- }
- $Data->Close();
- include("foot.php");
-?>