Utilisation nouvelle méthode de cache
This commit is contained in:
parent
b39de3e7d2
commit
480fb7ed2d
@ -10,6 +10,7 @@ $siren=substr($siret,0,9);
|
||||
if (isset($_REQUEST['idan']) && $_REQUEST['idan']*1<>0) $idCom=$_REQUEST['idan'];
|
||||
else $idCom=false;
|
||||
|
||||
require_once 'cache/cache.php';
|
||||
require_once 'partenaires/classMTva.php';
|
||||
require_once 'partenaires/classMMap.php';
|
||||
require_once 'partenaires/classMCoface.php';
|
||||
@ -17,14 +18,28 @@ require_once 'common/dates.php';
|
||||
|
||||
$tabInfo = $_SESSION['tabInfo'];
|
||||
|
||||
try {
|
||||
$O = $client->getInfosReg($siren, $idCom);
|
||||
$annonces=$O['result'];
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client,$fault,$tabInfo);
|
||||
die();
|
||||
|
||||
if (($siret*1)==0 || ($siren*1)<100){ $fileName = $page2.'-'.$idEntreprise;
|
||||
}else{ $fileName = $page2.'-'.$siret; }
|
||||
if($idCom!==FALSE){ $fileName.= '-'.$idCom; }
|
||||
|
||||
|
||||
cache_filename($fileName);
|
||||
if( cache_exist() && !( preg_match('/saisie/i', $_SESSION['tabInfo']['droits']) || $_SESSION['tabInfo']['mode_edition']==1 ) ){
|
||||
$annonces = cache_get('annonces');
|
||||
}else{
|
||||
try {
|
||||
$O = $client->getInfosReg($siren, $idCom);
|
||||
$annonces = $O['result'];
|
||||
cache_delete();
|
||||
cache_add('annonces', $annonces);
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client,$fault,$tabInfo);
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
$raisonSociale=$tabInfo['entrep']['raisonSociale'];
|
||||
?>
|
||||
<div id="center">
|
||||
|
Loading…
Reference in New Issue
Block a user