// Nombre d'images par ligne
require_once("vtechadmin/connect.inc.php");
$table=TABLE;
connect();
$maxpage=NPAGES;
$nb_colonnes =1;
?>
if(!empty($_GET['categorie']))
{
echo" ".$_GET['categorie'];
}
if(!empty($_GET['categories']))
{
echo" ".$_GET['categories'];
}
?>
Biosmose - Nos actualités
|
|
|
|
|
$page=$_GET['page'];
if(!(isset($page))){$page=0;}
$page=round($page); if($page<0){$page=0;}
$debut=0;
$rec=mysql_query("select count(id) as nbafficher from $table where statut='1' ");
$ds=mysql_fetch_object($rec);
$nb_afficher=$ds->nbafficher;
if($page!=0){$debut=($page*$maxpage);}
if($debut>$nb_afficher){$page=0;$debut=0;}
$page_max=floor($nb_afficher/$maxpage);
if(($page_max*$maxpage)==$nb_afficher){$page_max--;}
$resultat = mysql_query("select * from $table where statut='1' order by id desc LIMIT $debut,$maxpage ");
$nb_cellules = mysql_num_rows($resultat);
$reste = $nb_cellules % $nb_colonnes;
$nb_lignes = ( $nb_cellules - $reste )/ $nb_colonnes;
$j = 0;
$i=0;
if($nb_cellules>0)
{
?>
while($a=mysql_fetch_object($resultat))
{
$i++;
$v++;
if ( $j % $nb_colonnes == 0 ) { $v=0;?>
}
$langue="fr";
?>
| | | | |