75 lines
1.2 KiB
PHP
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ésultat affiché avec le(s) critè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éponses résultats affichés. Page '.$curPage.'/'.$totPage.'.';
|
|
} else {
|
|
$totPage = $curPage = 1;
|
|
echo $O['nbReponsesTotal'].' ré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>
|