107 lines
2.6 KiB
PHP
107 lines
2.6 KiB
PHP
|
<?php ?>
|
|||
|
<style type="text/css">
|
|||
|
ol li { margin-bottom:10px; }
|
|||
|
</style>
|
|||
|
<?php
|
|||
|
$parametresTxt = array(
|
|||
|
'source'=>'Source',
|
|||
|
'annee'=>'Ann<6E>e',
|
|||
|
'dateparution'=>'Date de parution',
|
|||
|
'nparution'=>'Num<75>ro de parution',
|
|||
|
'bpage'=>'Page',
|
|||
|
'nannonce'=>'Num<75>ro d\'annonce',
|
|||
|
'naffaire'=>'Num<75>ro d\'affaire',
|
|||
|
'txt'=>'Recherche');
|
|||
|
$strCriteres = '';
|
|||
|
foreach ($parametresTxt as $key => $param)
|
|||
|
{
|
|||
|
if($_SESSION['recherchehisto'][$key]!='' && $param!='')
|
|||
|
{
|
|||
|
$strCriteres.= $param.' : '.$_SESSION['recherchehisto'][$key].' ';
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
if ( $O['nbReponses']==0)
|
|||
|
{
|
|||
|
?>
|
|||
|
<p class="StyleInfoLib">
|
|||
|
Pas de résultat affiché avec le(s) critère(s) <a title="Retour au formulaire de recherche" href="./index.php?page=recherche&vue=annonce"><?=$strCriteres?></a>
|
|||
|
</p>
|
|||
|
<?php
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
$reponses = $O['reponses'];
|
|||
|
$mots = $O['mots'];
|
|||
|
|
|||
|
echo '<p class="StyleInfoLib">';
|
|||
|
echo $O['nbReponsesTotal'].' réponses. avec les crit<69>res <a title="Retour au formulaire de recherche" href="./index.php?page=recherche&vue=annonce">'.$strCriteres.'</a>';
|
|||
|
if ($O['nbReponses']<$O['nbReponsesTotal'])
|
|||
|
{
|
|||
|
$totPage = ceil($O['nbReponsesTotal']/$O['nbReponses']);
|
|||
|
$curPage = ceil($p/$O['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 {
|
|||
|
$totPage = $curPage = 1;
|
|||
|
}
|
|||
|
echo '</p>';
|
|||
|
|
|||
|
if($p>=200)
|
|||
|
{
|
|||
|
?>
|
|||
|
<p>Merci d'affiner votre recherche.</p>
|
|||
|
<?php
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
?>
|
|||
|
<ol>
|
|||
|
<?php
|
|||
|
$indice;
|
|||
|
foreach( $reponses as $reponse )
|
|||
|
{
|
|||
|
$indice++;
|
|||
|
?>
|
|||
|
<li type="1" value="<?=$p+$indice?>">
|
|||
|
<?php
|
|||
|
$texte = $reponse['Texte'];
|
|||
|
foreach( $mots as $mot ){ $texte = preg_replace('/'.$mot.'/i', '<b>'.strtoupper($mot).'</b>', $texte);}
|
|||
|
|
|||
|
if( substr($reponse['Code'],0,3)=='BOD' )
|
|||
|
{
|
|||
|
print '<u>BODACC :</u> '.substr($reponse['Code'],3,1);
|
|||
|
}
|
|||
|
print ' ';
|
|||
|
print '<u>Ann<6E>e :</u> '.$reponse['Annee'];
|
|||
|
print '<br/>';
|
|||
|
print '... '.$texte.' ...';
|
|||
|
print '<br/>';
|
|||
|
print '<a href="'.$reponse['Fichier'].'" target="_blank">T<>l<EFBFBD>charger la page en PDF</a>';
|
|||
|
?>
|
|||
|
</li>
|
|||
|
<?php
|
|||
|
}
|
|||
|
?>
|
|||
|
</ol>
|
|||
|
<?php
|
|||
|
//Page pr<70>c<EFBFBD>dentes
|
|||
|
if($curPage>1)
|
|||
|
{
|
|||
|
print '<a href="./index.php?page=recherche&vue=annoncelist&p='.$prec.'">Page pr<70>c<EFBFBD>dente</a>';
|
|||
|
}
|
|||
|
?>
|
|||
|
<< Page : <?=$curPage.'/'.$totPage?> >>
|
|||
|
<?php
|
|||
|
//Page suivante
|
|||
|
if ($curPage<$totPage)
|
|||
|
{
|
|||
|
print '<a href="./index.php?page=recherche&vue=annoncelist&p='.$suiv.'">Page suivante</a>';
|
|||
|
}
|
|||
|
?>
|
|||
|
<?php
|
|||
|
}
|
|||
|
}
|