/* ----------------------------------------------------------------------------
A C C U E I L D U W E B R I N G
( L I S T E D E S S I T E S )
PHPMyRing (3.0) dernière modification du fichier [16-12-02]
---------------------------------------------------------------------------- */
/*
if (file_exists("webring/include/config.php"))
{
require('webring/include/config.php');
}
else
{
echo ("PHP My Ring n'est pas installé correctement, le fichier /webring/include/config.php n'existe pas.");
echo "
";
echo "Installation";
}
*/
global $DOCUMENT_ROOT;
require_once($HTTP_SERVER_VARS['DOCUMENT_ROOT'].'/webring/include/config.php');
require_once($HTTP_SERVER_VARS['DOCUMENT_ROOT'].'/webring/include/fonctions.php');
// Configuration
$conf=config();
InsertLang('',$conf['lang']);
/*$lang="en_US";
$gettext_domain="phpmyring";
$locale=setlocale(LC_MESSAGES, $lang);
bindtextdomain($gettext_domain,$_SERVER["DOCUMENT_ROOT"]."/webring/locale");
textdomain($gettext_domain);
*/
require('tete.php');
require('haut2.php');
#
# pour afficher sur plusieurs pages la liste..
#
// Si classement ($classe) inféfinie
if (!$classe) { $classe=$conf['classement']; }
if (!$ordre) { $ordre=$conf['ordre']; }
// Si nombre indéfinie
if (!$nombre) { $nombre=$conf['nbre']; }
// Pareil pour limite
if (!$limite) { $limite=0; }
// Limite suivante et celle d'avant
$limitesuivante=$limite+$nombre;
$limiteprecedente=$limite-$nombre;
// Connexion MySQL
$conn=connecte();
// pour compter le nombre TOTAl de résultats dans la table...
$res=requete("SELECT idsite ".
"FROM webring ".
"WHERE accept='1' ".
"ORDER BY $classe");
$nb=mysql_num_rows($res);
// Requète
$res=requete("SELECT idsite,site_nom,url,webmaster,description,date,visites ".
"FROM webring ".
"WHERE accept='1' ".
"ORDER BY $classe $ordre ".
"LIMIT $limite,$nombre");
?>
" style="width:30px; height:15px; border: none; vertical-align:middle;" alt="New !" />
}
else
{
echo "";
printf(ngettext("Visité une fois","Visité %d fois",$visites),$visites);
echo "";
}
?>
if ($limite != 0)
{
echo "
";
}
?>
if ($limitesuivante < $nb)
{
echo "
";
}
?>