mais encore peut tu m'en dit plus stp merci voici le code:
<?
##############################################################
# ACGV Comment ( comment.php ) #
# #
# Script par menTiss ( Team ACGV ) #
# http://www.acgv.fr.st/ #
# version 1.0 #
##############################################################
require("config/comment.inc.php" );
require("config/function.inc.php" );
require("config/langue/"."$langue".".php" );
$copyright = "<br><div align=\"center\">ACGV Comment v$versionc © 2002 <a href=\"http://www.acgv.fr.st/\">Team ACGV</a><br> $creepar[lang] <a href=\"mailto:mentiss@broch.fr.fm\">menTiss</a></div></body></html>";
if($actiona=='comment')
{
$actionc="commenter";
}
elseif($actiona=='note')
{
$actionc="noter";
}
$page = template("templates/head.html" );
eval("echo stripslashes(\"$page\" );" );
if($titre_plus=='yes')
{
if($actiona=='comment')
{
print("<h4 align=\"center\">$avis[lang] $sur[lang] $categorie</h4>" );
}
}
else
{
if($actiona=='comment')
{
print("<h4 align=\"center\">$avis[lang]</h4>" );
}
}
if($actiona=='comment' and $trmt!='ok')
{
$affichage = af_comments("$categorie","$numpage" );
$page = template("templates/corpus.html" );
eval("echo stripslashes(\"$page\" );" );
}
if($trmt=='ok' and $verif=='false' and $actiona=='comment')
{
$domain=strstr($mail, '@');
$domain2=strstr($mail, '.');
if(empty($titre) or empty($pseudo) or empty($mail) or empty($comment))
{
print("<div align=\"center\"><br><br>$remplir[lang]" );
print("<br><a href=\"#\" onClick=\"history.go(-1)\">$retour[lang]</a></div>" );
$verif="false";
}
if($pseudo=='vote')
{
print("<div align=\"center\">$nickvote[lang]" );
print("<br><a href=\"#\" onClick=\"history.go(-1)\">$retour[lang]</a></div>" );
$verif="false";
}
if($domain=='' or $domain2=='')
{
print("<div align=\"center\"><br><br>$mailno[lang]<br>" );
print("<a href=\"#\" onClick=\"history.go(-1)\">$retour[lang]</a></div>" );
$verif="false";
if(eregi("^([_a-z0-9]+([\\._a-z0-9-]+)*)@([a-z0-9]{2,}(\\.[a-z0-9-]{2,})*\\.[a-z]{2,3})$", $mail))
{
print("...." );
}
}
elseif($pseudo!='vote')
{
$verif="true";
}
}
if($trmt=='ok' and $verif=='true' and $actiona=='comment')
{
mysql_connect($hote,$login,$mdp) or die("$err_connect[lang]" );
mysql_select_db($base) or die("$err_seldb[lang]" );
$date=time();
if($sysvalid=="yes" )
{
$valid="0";
}
else
{
$valid="1";
}
$ajoute ="INSERT INTO $table_comment(id,pseudo,mail,titre,text,categorie,date,note,votant,valid,version) VALUES('','$pseudo','$mail','$titre','$comment','$categorie','$date','','','$valid','')";
mysql_query($ajoute) or die("$err_ajout[lang]" );
if($sysvalid=='yes')
{
$a="<br>$validcom[lang]";
}
print("<br><br><div align=\"center\">$comajoute[lang] $redirect[lang] $a" );
print("<meta http-equiv=\"refresh\" content=\"2; URL=comment.php?actiona=comment&categorie=$categorie\"></div>" );
}
if($actiona=='note' and $a_form!='1')
{
mysql_connect($hote,$login,$mdp);
mysql_select_db($base) or die("$err_seldb[lang]" );
$requete_note=mysql_query(" SELECT titre,categorie FROM $table_comment WHERE categorie='$categorie' AND pseudo='vote'" );
$num=mysql_num_rows($requete_note);
$vr=0;
$ver[0]="0";
if($num=='0')
{
$page = template("templates/note.html" );
eval("echo stripslashes(\"$page\" );" );
}
else
{
while($note=mysql_fetch_array($requete_note))
{
if(in_array("$note[categorie]",$ver))
{continue;}
else
{
$ver[$vr]="$note[categorie]";
$vr++;
$categorie=$note['categorie'];
$page = template("templates/note.html" );
eval("echo stripslashes(\"$page\" );" );
}
}
}
}
if($actiona=='note' and $a_form=='1')
{
mysql_connect($hote,$login,$mdp);
mysql_select_db($base) or die("$err_seldb[lang]" );
$requete=mysql_query(" SELECT * FROM $table_comment WHERE categorie='$categorie' AND pseudo='vote'" );
$num_note=mysql_num_rows($requete);
if($num_note=='0')
{
$insert="INSERT INTO $table_comment(id,pseudo,mail,titre,text,categorie,date,note,votant,valid,version) VALUES('','vote','','','','$categorie','','$note','1','','')";
mysql_query($insert) or die("$err_noteaj[lang]" );
print("<div align=\"center\">$voteok[lang] $categorie" );
print("<br><a href=\"#\" onClick=\"window.close()\">$fermer[lang]</a></div>" );
}
else
{
$vr=0;
$ver[0]="0";
while($star=mysql_fetch_array($requete))
{
if(in_array("$star[categorie]",$ver))
{continue;}
else
{
$ver[$vr]="$star[categorie]";
$vr++;
if($star[votant]!=0)
{
$nvot=$star[votant]+1;
$note_plus = $star[votant]*$star[note]+$note;
$note_moy = $note_plus/$nvot;
$note_fin = ceil($note_moy);
$update="UPDATE $table_comment SET note='$note_fin',votant='$nvot' WHERE categorie='$categorie' AND pseudo='vote'";
mysql_query($update) or die("$err_noteaj[lang]" );
print("<div align=\"center\">$voteok[lang] $star[categorie]" );
print("<br><a href=\"#\" onClick=\"window.close()\">$fermer[lang]</a></div>" );
}
else
{
$update = " UPDATE $table_comment SET note='$note',votant='1' WHERE categorie='$categorie' AND pseudo='vote'";
mysql_query($update) or die("$err_noteaj[lang]" );
print("<div align=\"center\">$voteok[lang] $star[categorie]" );
print("<br><a href=\"#\" onClick=\"window.close()\">$fermer[lang]</a></div>" );
}
}
}
}
}
print("$copyright" );
?>
j'ai mis en gras les erreur.
merci de votre aide car la j'y pige rien
je vien e faire une recherche sur google et j'ai rajouté le code ci-dessous avant la ligne if($actiona=='comment') et sa marche mieu mais helas j ai une autre erreur qui es (Notice: Undefined variable: border_color in c:\program files\easyphp1-8\www\pompiersvolontaire\comment\comment.php(69) : eval()'d code on line 2) je vais continué a chercher.
if(isset($_GET['actiona']))
{
$actiona=$_GET['actiona'];
}else{
$actiona='';
}
if(isset($_GET['categorie']))
{
$categorie=$_GET['categorie'];
}else{
$categorie='';
}
if(isset($_GET['trmt']))
{
$trmt=$_GET['trmt'];
}else{
$trmt='';
}
if(isset($_GET['numpage']))
{
$numpage=$_GET['numpage'];
}else{
$numpage='';
}