extranet/includes/recherche/recherche_annonceslist.php
2009-10-05 12:29:19 +00:00

75 lines
1.2 KiB
PHP

<?php
$recherche = $_REQUEST['recherche'];
$annee = $_REQUEST['annee'];
(!isset($p)) ? $p=0 : $p=$_REQUEST['p'];
$deb =0;
try {
$O = $client->rechercheHisto($recherche, $annee, $deb);
} catch (SoapFault $fault) {
require_once 'soaperror.php';
processSoapFault($client,$fault,$tabInfo);
}
?>
<div id="center">
<?php
if ( $O['nbReponses']==0)
{
if( !isset($tvaIntra) )
echo '<p class="StyleInfoLib">Pas de r&eacute;sultat affich&eacute; avec le(s) crit&egrave;re(s) suivants : .</p>';
}
else
{
$reponses = $O['reponses'];
echo '<p class="StyleInfoLib">';
if ($O['nbReponses']<$O['nbReponsesTotal']) {
$totPage = ceil($O['nbReponsesTotal']/$O['nbReponses']);
$curPage = ceil($p/$O['nbReponses'])+1;
echo $O['nbReponsesTotal'].' r&eacute;ponses r&eacute;sultats affich&eacute;s. Page '.$curPage.'/'.$totPage.'.';
} else {
$totPage = $curPage = 1;
echo $O['nbReponsesTotal'].' r&eacute;ponses';
}
echo '</p>';
?>
<ol>
<?php
foreach( $reponses as $reponse )
{
?>
<?php
}
?>
</ol>
<?php
//Page précédentes
if($curPage>1)
{
}
?>
<?php
//Page suivante
if ($curPage<$totPage)
{
}
?>
<?php
}
print "<pre>";
print_r($O);
print "</pre>";
?>
</div>