Correction affichage des numeros de pages lorsque l'on est sur la dernière
This commit is contained in:
parent
bcafb8c509
commit
89966f292f
@ -36,16 +36,30 @@ else
|
||||
|
||||
echo '<p class="StyleInfoLib">';
|
||||
echo $O['nbReponsesTotal'].' réponses. avec les critères <a title="Retour au formulaire de recherche" href="./index.php?page=recherche&vue=annonce">'.$strCriteres.'</a>';
|
||||
if ($O['nbReponses']<$O['nbReponsesTotal'])
|
||||
$firephp->log($p+$O['nbReponses'], 'quantite');
|
||||
$firephp->log($O['nbReponsesTotal'], 'nbReponsesTotal');
|
||||
if ( $p+$O['nbReponses']<$O['nbReponsesTotal'] )
|
||||
{
|
||||
$totPage = ceil($O['nbReponsesTotal']/$O['nbReponses']);
|
||||
$curPage = ceil($p/$O['nbReponses'])+1;
|
||||
$firephp->info('Inferieur');
|
||||
$totPage = ceil($O['nbReponsesTotal']/$_SESSION['tabInfo']['nbReponses']);
|
||||
$curPage = ceil($p/$_SESSION['tabInfo']['nbReponses'])+1;
|
||||
echo $_SESSION['tabInfo']['nbReponses'].' résultats affichés.';
|
||||
echo 'Page '.$curPage.'/'.$totPage.'.';
|
||||
$prec = $p-$_SESSION['tabInfo']['nbReponses'];
|
||||
$suiv = $p+$_SESSION['tabInfo']['nbReponses'];
|
||||
|
||||
} else {
|
||||
}
|
||||
elseif( $p+$O['nbReponses']==$O['nbReponsesTotal'] )
|
||||
{
|
||||
$firephp->info('egale');
|
||||
$totPage = ceil($O['nbReponsesTotal']/$_SESSION['tabInfo']['nbReponses']);
|
||||
$curPage = $totPage;
|
||||
echo $_SESSION['tabInfo']['nbReponses'].' résultats affichés.';
|
||||
echo 'Page '.$curPage.'/'.$totPage.'.';
|
||||
$prec = $p-$_SESSION['tabInfo']['nbReponses'];
|
||||
$suiv = $p+$_SESSION['tabInfo']['nbReponses'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$totPage = $curPage = 1;
|
||||
}
|
||||
echo '</p>';
|
||||
|
Loading…
x
Reference in New Issue
Block a user