voila le reste de la page
<?php
//-----------------------------------------
// Auteur : Laurent ADDA
// Email : webmaster@phpscripts-fr.net
// Sujet : librairies de fonctions
//-----------------------------------------
//------------------------------
// connexion à la base de donées
//------------------------------
if ( !i sset($rep) || isset($_POST[´rep´]) || isse
t($_GET[´rep´]) || isset($_COOKIE[´rep´]) ) $rep = ´´;
include($rep.´config/config.inc.php´);
$connection = mysql_connect($host, $user, $password);
$db = mysql_select_db($database, $connection);
//------------------
// fonction "pop´up"
//------------------
if ($une_popup) $titre_popup = ´Commentaires´;
else $titre_popup = ´´;
echo ´<script language="JavaScript">
<!--
function commentaire(nom)
{
popup =
window.open(\´´.$script_url.´/commentaire.´.$php_e
xtension.´?nom=\´+nom,\´´.$titre_popup.´\´,\´toolb
ar=0,location=0,directories=0,menuBar=0,resizable=
0,scrollbars=yes,width=´.$largeur_popup.´,height=´
.$hauteur_popup.´,left=75,top=60\´);
if (popup && popup.focus) popup.focus();
}
//-->
</script>´;
//------------------------------------------------
----------------
// fonction commentaire($nom)
// 1. affiche nombre de commentaires
// 2. affiche l´image commentaire --> lien vers
les commentaires
//------------------------------------------------
----------------
function commentaire($nom)
{
global $connection, $table, $commentaire_img, $st
r_titre_page;
$sql = mysql_query(´SELECT COUNT(*) FROM ´.$table.´ WHERE nom = \´´.$nom.´\´´, $connection);
$enr = mysql_fetch_array($sql);
$nb_commentaires = $enr[0];
echo ´<font size=1>[´.$nb_commentaires.´] </font>´;
echo ´<a href="javascript:commentaire(\´´.$nom.´\´)">´;
echo ´<img src=\´´.$commentaire_img.´\´ align="absmiddle" border=0 alt="´.$str_titre_page.´">´;
echo ´</a>´;
}
//-----------------------------------------------
// fonction nb_commentaires($nom)
// affiche UNIQUEMENT le nombre de commentaires
//-----------------------------------------------
function nb_commentaires($nom)
{
global $connection, $table;
$sql = mysql_query(´SELECT COUNT(*) FROM ´.$table
.´ WHERE nom = \´´.$nom.´\´´, $connection);
$enr = mysql_fetch_array($sql);
$nb_commentaires = $enr[0];
echo $nb_commentaires;
}
//------------------------------------------------
--
// fonction lien_commentaires($html, $nom)
// effectue un lien vers les commentaires (pop´u
p)
//------------------------------------------------
--
function lien_commentaires($html, $nom)
{
echo ´<a href="javascript:commentaire(\´´.$nom.´\
´)">´;
echo $html;
echo ´</a>´;
}
//------------------------------------------------
----
// fonction total_nb_commentaires()
// affiche le nombre TOTAL de commentaires effec
tués
//------------------------------------------------
----
function total_nb_commentaires($return=0)
{
global $connection, $table;
$sql = mysql_query(´SELECT COUNT(*) FROM ´.$table
, $connection);
$enr = mysql_fetch_array($sql);
$nb_commentaires = $enr[0];
if ( $return == 1 ) return $nb_commentaires;
else echo $nb_commentaires;
}
?>
faut t´il que je remplisse se qu´il y a apres ?