"; //www.phpdebutant $db = mysql_connect("$host", "$user", "$password"); mysql_select_db("$base",$db); if($limit==''){ $limit = 0; } $count_req = mysql_query("SELECT * FROM coloriage"); $count = mysql_num_rows($count_req); $comptage_req = mysql_query("SELECT * FROM coloriage ORDER BY NUMERO LIMIT $limit, 1"); $comptage = mysql_num_rows($comptage_req); echo "
"; echo "
\n"; $i=0; $a=0; // compteur => numéroteur de site WHILE($i!=$comptage) { $numero = mysql_result($comptage_req,$i,"numero"); $titre = mysql_result($comptage_req,$i,"titre"); $url_image= mysql_result($comptage_req,$i,"url_image"); // nettoyage $titre = stripslashes(stripslashes($titre)); $a++; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
$titre       $auteur    

\n\n"; $i++; } // gestion des liens pages ---------------------------- $pages = $count / 1; $pages = floor($pages); if($count>1) { $footer = "Pages: index\n"; //if($count==40){ $i = 1; }else{ $i = 0; } $comptage = 1; $page_num = 2; WHILE($i!=$pages) { if($limit==$comptage) { $footer .= " | $page_num\n"; $comptage += 1; $page_num++; $i++; } else { $footer .= " | $page_num\n"; $comptage += 1; $page_num++; $i++; } } } $reste = $count - $limit - 1; $reste_limit = $limit + 1; if($reste<=0) { $reste = "Fin de la liste"; $avant = ""; $apres = ""; } else { $reste = "1 affichés - Reste "; //---- rajouté le 14/01/2002 ---- if($limit!="0"){ $prec=$limit - 1; $precedent="$index"."$signe"."limit=$prec"; echo"Précédent"; echo"                                                "; }; $suivant="$index"."$signe"."limit=$reste_limit"; echo"Suivant"; echo"
"; //---- fin du rajout ---- $reste .= $count - $limit - 1; $avant = ""; $apres = ""; } if($count==0) { $reste = "Aucun site ne correspond à votre recherche"; $avant = ""; $apres = ""; } echo "
[$avant"."$reste"."$apres]

\n"; echo "
$footer
\n"; echo "
\n"; echo "
(c)2001 MiniClic, L'Univers des Enfants
\n"; mysql_close(); //} ?>