IncludePhoneticMatches = 'false';
if (empty($siret) == false) {
$o->Query = new StdClass;
$o->Query->CompanyId = $siret;
$o->IncludeSuggestions = 'false';
$fonction = 'AdvancedSearch';
} else {
$o->Query = "$raisonSociale $numVoie $libVoie $cp $ville";
$o->IncludeSuggestions = 'false';
if (isset($position) == true) {
$o->StartRow = $position;
} else {
$o->StartRow = 0;
}
$o->NumRows = NUM_ROWS;
$fonction = 'Search';
}
try {
$O = $soap_client->__call($fonction, array($o));
} catch (SoapFault $f) {
print_r($f);
print '
';
print 'Requete: '.
htmlspecialchars($soap_client->__getLastRequest());
print '
';
print 'Reponse: '.
htmlspecialchars($soap_client->__getLastResponse());
}
// --------------------------------------------------------------------------- //
// afficheCompany
// --------------------------------------------------------------------------- //
function afficheCompany(&$c, $deb, $num, $pays)
{
print '
'; if ($O->StartRow >= NUM_ROWS) { print ''; print ''; print ''; } print ' | '; $curPage = $O->StartRow / NUM_ROWS + 1; $totPage = min(intval($O->NumberOfHits / NUM_ROWS), MAX_ROWS / NUM_ROWS); print ''; if ($totPage > 1) { print 'Page '.$curPage.'/'.$totPage; } print ' | '; print ''; if ($O->NumberOfHits - $O->StartRow > NUM_ROWS && $O->StartRow + NUM_ROWS < MAX_ROWS) { print ''; print ''; print ''; } print ' | '; print '