Location: PHPKode > projects > petitforum > petitforum/topics/topic.php
<? include ("../connecte.php");
?>
<FORM method="post">
  <?
	if (($message) && ($connecte!=""))
    {
    $name = $connecte;
    $message = strip_tags($message);
	$sujet = strip_tags($sujet);
	$nom_jour =   array("dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi",);
	$nom_mois  =  array("","janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","decembre");
	$num_jour = date(  "w");
	$num_mois = date(  "m");
	$test = substr($num_mois,0,1);
	if ($test ==   "0") {
	    $num = substr($num_mois,1,1);
	    $num_mois = $num;
    }
	$annee    = date(  "Y");
	$n = date(  "d");
	$jour = $nom_jour[$num_jour];
	$mois = $nom_mois[$num_mois];
	$message=wordwrap($message,128);
    $message = htmlentities($message);
	$message = nl2br($message);
	$message = ereg_replace("\\\'", "'", $message);
	$message = ereg_replace("\\\"", "\"", $message);
    $heure = date("h:i a");
    $message = "<p id=\"entete\"><i>r&eacute;ponse de</i><B> $name</B><i> le $jour $n $mois $annee, $heure</i></p><p id=\"message\">$message</p>";
    $fp = fopen (basename($PHP_SELF) . ".comment", "a");
    fwrite ($fp, $message);
    fclose ($fp);
    $fp=fopen(basename($PHP_SELF) . ".txt","r+"); 
	$numb=fgets($fp,10); 
	fseek($fp,0); 
	$numb++; 
	fputs($fp,$numb); 
	fclose($fp);
    }
echo "<div class=\"ombre\">";
echo "<div class=\"section\">";
echo "<font size=\"2\">";
@readfile((basename($PHP_SELF) . ".comment"));
echo "</font>";
echo "</div></div>";
if ($connecte!=""){
	echo "<div class=\"ombre\"><div class=\"section\">";
	echo "<h2> Répondre :</h2>";
  	echo "<p align=\"left\"><textarea name=\"message\" cols=\"80\" rows=\"5\"></textarea>";
    echo "<br><input name=\"submit\" type=\"submit\" value=\"Envoyer\">";
	echo "</p></div></div>";
}
?>
</FORM>
<p align="center">
  <font size=-2>2002 - petitforum</font> </p>
</body>
</html>
Return current item: petitforum