Correction gestion des pages dans les annonces
This commit is contained in:
parent
3912f30d0b
commit
e31fe3e436
@ -81,10 +81,11 @@ class RechercheController extends Zend_Controller_Action
|
||||
|
||||
$session = new RechercheHistorique();
|
||||
|
||||
if (count($params)>0) {
|
||||
if (array_key_exists('formA', $params)) {
|
||||
$session->save('annonce', $params);
|
||||
} else {
|
||||
$params = $session->item(0);
|
||||
$recherche = $session->item(0);
|
||||
$params = $recherche['params'];
|
||||
}
|
||||
|
||||
if( !isset($params['formA']['annee']) && isset($params['formA']['dateparution']) )
|
||||
@ -187,6 +188,8 @@ class RechercheController extends Zend_Controller_Action
|
||||
$this->view->assign('mots', $result->mots->item);
|
||||
}
|
||||
|
||||
$this->view->assign('p', $p);
|
||||
|
||||
$this->view->assign('infos', $infos);
|
||||
$this->view->assign('nbReponses', $result->nbReponses);
|
||||
$this->view->assign('nbReponsesTotal', $result->nbReponsesTotal);
|
||||
|
@ -20,25 +20,25 @@ ol li { margin-bottom:10px; }
|
||||
<?=$this->strCriteres?>
|
||||
</a>
|
||||
<?php
|
||||
if ( $p+$this->nbReponses<$this->nbReponsesTotal )
|
||||
if ( $this->p+$this->nbReponses<$this->nbReponsesTotal )
|
||||
{
|
||||
$totPage = ceil($this->nbReponsesTotal/$this->nbReponses);
|
||||
$curPage = ceil($p/$this->nbReponses)+1;
|
||||
$curPage = ceil($this->p/$this->nbReponses)+1;
|
||||
?>
|
||||
<?=$this->nbReponses?> résultats affichés. Page <?=$curPage?>/<?=$totPage?>.
|
||||
<?php
|
||||
$prec = $p-$this->nbReponses;
|
||||
$suiv = $p+$this->nbReponses;
|
||||
$prec = $this->p-$this->nbReponses;
|
||||
$suiv = $this->p+$this->nbReponses;
|
||||
}
|
||||
elseif( $p+$this->nbReponses==$this->nbReponsesTotal )
|
||||
elseif( $this->p+$this->nbReponses==$this->nbReponsesTotal )
|
||||
{
|
||||
$totPage = ceil($this->nbReponsesTotal/$this->nbReponses);
|
||||
$curPage = $totPage;
|
||||
?>
|
||||
<?=$this->nbReponses?> résultats affichés. Page <?=$curPage?>/<?=$totPage?>.
|
||||
<?php
|
||||
$prec = $p-$this->nbReponses;
|
||||
$suiv = $p+$this->nbReponses;
|
||||
$prec = $this->p-$this->nbReponses;
|
||||
$suiv = $this->p+$this->nbReponses;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -46,7 +46,7 @@ ol li { margin-bottom:10px; }
|
||||
}
|
||||
echo '</p>';
|
||||
|
||||
if($p>=200)
|
||||
if($this->p>=200)
|
||||
{
|
||||
?>
|
||||
<p>Merci d'affiner votre recherche.</p>
|
||||
@ -62,7 +62,7 @@ ol li { margin-bottom:10px; }
|
||||
{
|
||||
$indice++;
|
||||
?>
|
||||
<li type="1" value="<?=$p+$indice?>">
|
||||
<li type="1" value="<?=$this->p+$indice?>">
|
||||
<?php
|
||||
$texte = $info->Texte;
|
||||
foreach( $this->mots as $mot ){ $texte = preg_replace('/'.$mot.'/i', '<b>'.strtoupper($mot).'</b>', $texte);}
|
||||
@ -106,7 +106,7 @@ ol li { margin-bottom:10px; }
|
||||
<div class="paragraph">
|
||||
|
||||
<?php
|
||||
if ( $this->O['nbReponses']==0)
|
||||
if ( $this->nbReponses==0)
|
||||
{
|
||||
?>
|
||||
<p class="StyleInfoLib">
|
||||
|
Loading…
x
Reference in New Issue
Block a user