Correction conflit variable pays et conflit méthode

This commit is contained in:
Michael RICOIS 2009-04-27 08:29:26 +00:00
parent f90be8bbb9
commit 65dec1a090
5 changed files with 19 additions and 13 deletions

View File

@ -61,9 +61,10 @@ try {
}
$O = $client->getAnnonces($siren, $filtre, $idan);
$annonces=$O['result'];
$firephp->log($annonces, 'annonces');
if (count($annonces)==0) {
$idan=0;
$O = $client->getAnnonces($siren, $filtre,$idan);
$O = $client->getAnnonces($siren, $filtre, $idan);
$annonces=$O['result'];
}
} catch (SoapFault $fault) {

View File

@ -5,13 +5,14 @@ if(!isset($method)){
require_once 'graydon/graydonws.php';
require_once 'graydon/log.php';
// Create the request parameters
$request = new StdClass();
// Initialise the request object
$request->Authentication_Parameters = $authentication;
$request->Country = $pays;
$firephp->log($pays,'PAYS');
$path = PATH_DATA.'/graydon/method';
$fileName = strtolower('CompanyMatchMethods-'.$pays);
@ -37,7 +38,7 @@ if(!file_exists($path.'/'.$fileName)){
}catch( SoapFault $fault ){
require_once 'soaperror.php';
processSoapFault($client,$fault,$tabInfo);
processSoapFault($graydon,$fault,$tabInfo);
}
}else{
$methods = unserialize(file_get_contents($path.'/'.$fileName));
@ -70,12 +71,12 @@ if (isset($methods)){
$countMethods++;
//Affichage des propostions des méthodes de recherche
if($item->MatchingMethod=='Keyword'){ $lien .= '<a href="./?page=international_recherche&mode=normal&method=keyword&pays='.$pays.'">Par mots clés</a>'; }
if($item->MatchingMethod=='Identifier'){ $lien .= '<a href="./?page=international_recherche&mode=normal&method=identifier&pays='.$pays.'">Par identifiant</a>'; }
if($item->MatchingMethod=='Name'){ $lien .= '<a href="./?page=international_recherche&mode=normal&method=name&pays='.$pays.'">Par nom</a>'; }
if($item->MatchingMethod=='PostCode'){ $lien .= '<a href="./?page=international_recherche&mode=normal&method=postcode&pays='.$pays.'">Par Post Code</a>'; }
if($item->MatchingMethod=='Keyword'){ $lien .= '<a href="?page=international_recherche&mode=normal&method=keyword&pays='.$pays.'">Par mots clés</a>'; }
if($item->MatchingMethod=='Identifier'){ $lien .= '<a href="?page=international_recherche&mode=normal&method=identifier&pays='.$pays.'">Par identifiant</a>'; }
if($item->MatchingMethod=='Name'){ $lien .= '<a href="?page=international_recherche&mode=normal&method=name&pays='.$pays.'">Par nom</a>'; }
if($item->MatchingMethod=='PostCode'){ $lien .= '<a href="?page=international_recherche&mode=normal&method=postcode&pays='.$pays.'">Par Post Code</a>'; }
if($countMethods>=count($methods)){$separator=''; break;}else{$separator=' - ';}
if($countMethods>=count($methods)){ $separator=''; break; }else{ $separator=' - '; }
$lien = $lien.$separator;
}

View File

@ -99,7 +99,9 @@ if ( $cache->startCapture($fileName.'.html') == FALSE){
elseif (file_exists($locImg.'.png')) { $urlImg='./img/logos/'.$etab['Siren'].'.png'; $ext='.png'; }
elseif (file_exists($locImg.'.jpg')) { $urlImg='./img/logos/'.$etab['Siren'].'.jpg'; $ext='.jpg'; }
elseif (file_exists($locImg.'.jpeg')) { $urlImg='./img/logos/'.$etab['Siren'].'.jpeg'; $ext='.jpeg'; }
print '<!-- '.$locImg.' '.$urlImg.'-->';
if ($urlImg=='' && $etab['Isin']<>'') {
$locImg=PATH_LOGOS.$etab['Isin'];
if (file_exists($locImg.'.gif')) { $urlImg='./img/logos/'.$etab['Isin'].'.gif'; $ext='.gif'; }

View File

@ -14,7 +14,7 @@ if($vue=='recherche'){
$(document).ready(function(){
$('#mode').change(function(){
var mode = $('#mode :selected').val();
document.location.href='<?php print EXTRANET_URL; ?>/?page=international_recherche&mode='+mode;
document.location.href='<?php print EXTRANET_URL; ?>?page=international_recherche&mode='+mode;
});
$('#pays').change(function(){

View File

@ -4,6 +4,8 @@ if(!isset($mode)){
}
if($mode=='normal'){
$pays = $_REQUEST['pays'];
$firephp->log($pays,'PAYS');
?>
<div class="fieldgrp">
<label class="StyleInfoLib">Pays : </label>
@ -11,10 +13,10 @@ if($mode=='normal'){
<select id="pays" name="frmRecherche[Country]" size="10">
<?php
require_once 'graydon/pays.php';
foreach($tabPays as $kpays => $pays ){
foreach($tabPays as $kPays => $iPays ){
$selected = '';
if( isset($pays) && $pays=='Austria' ){ $selected = ' selected'; }
print '<option value="'.$kpays.'"'.$selected.'>'.$pays['display'].'</option>';
if( isset($pays) && $pays==$kPays ){ $selected = ' selected'; }
print '<option value="'.$kPays.'"'.$selected.'>'.$iPays['display'].'</option>';
}
?>
</select>