0) {
list($nam,$mai,$dateheure,$tex,$lec,$tit) = mysql_fetch_row($res);
$nam = stripslashes($nam);
if ($modeAntiSpam) {
$mai = str_replace('@', '_at_', strtolower($mai));
}
$tit = ucfirst(htmlentities(stripslashes($tit)));
$tex = nl2br(htmlentities(stripslashes($tex)));
$tex = eregi_replace('([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/&=])', '\\1://\\2\\3',$tex);
// conversion date
$timestamp = strtotime($dateheure);
$date = date('d-m-Y',$timestamp);
$heure = date('H:i',$timestamp);
// affichage tableau haut
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo 'Message de ',$nam,' | ';
echo 'Déjà lu ',$lec,' fois avant vous | ';
echo '';
echo 'Email : ',$mai,' ';
echo 'Posté le : ',$date,' à ',$heure,' ';
echo 'Titre : ',$tit,'
',$tex,' | ';
// affichage tableau bas
echo ' | | ';
echo ' |
';
// on récupère les réponses au message
$sql = 'SELECT nom,email,date_verif,texte,titre FROM lights_forum_tbl WHERE ';
$sql.= ' reponse_a_id="'.mysql_escape_string($id).'" ORDER BY date_verif';
$res = mysql_query($sql) or die(showError('3', mysql_error()));
$nb = mysql_num_rows($res);
$i=0;
if ($nb>0) {
while(list($nom,$email,$dateheure,$texte,$titre) = mysql_fetch_row($res)) {
$nom = stripslashes($nom);
if ($modeAntiSpam) {
$email = str_replace('@', '_at_', strtolower($email));
}
$titre = ucfirst(htmlentities(stripslashes($titre)));
$texte = nl2br(htmlentities(stripslashes($texte)));
$texte = eregi_replace('([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/&=])', '\\1://\\2\\3',$texte);
// conversion date
$timestamp = strtotime($dateheure);
$date = date('d-m-Y',$timestamp);
$heure = date('H:i',$timestamp);
// affichage tableau haut
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo 'Réponse de ',$nom,' | ';
echo '';
echo 'Email : ',$email,' ';
echo 'Posté le : ',$date,' à ',$heure,' ';
echo 'Titre : ',$titre,'
',$texte,' | ';
// affichage tableau bas --------------
echo ' | | |
';
echo '
';
$i++;
}
}
// Incrémente 1 pour "lu"
$sql = 'UPDATE lights_forum_tbl SET lect=lect+1 WHERE';
$sql.= ' id="'.mysql_escape_string($id).'"';
mysql_query($sql) or die(showError('3', mysql_error()));
mysql_close();
// ------------------------------------
include('box_aj_repx.php'); // message box
} else {
echo 'Page générée en ',number_format($totaltime,4,',',''),' s
';
echo '