Mise en cache de la page bourse
This commit is contained in:
parent
0f8db247a6
commit
e80c2c9291
@ -14,6 +14,20 @@ $siren=substr($siret,0,9);
|
||||
if (isset($_REQUEST['id']) && $_REQUEST['id']*1<>0) $idCom=$_REQUEST['id'];
|
||||
else $idCom=false;
|
||||
|
||||
if (($siret*1)==0 || ($siren*1)<100){ $fileName = $page2.'-'.$idEntreprise;
|
||||
}else{ $fileName = $page2.'-'.$siret; }
|
||||
|
||||
require_once 'cache.php';
|
||||
$cache = new Cache();
|
||||
//Forcer la création de la page dans le cache lorsque l'utilisateur a le mode saisie
|
||||
$firephp->log($_SESSION,'SESSION');
|
||||
if( preg_match('/saisie/i', $_SESSION['tabInfo']['droits']) || $_SESSION['tabInfo']['mode_edition']==1 ){
|
||||
$cache->disable = TRUE;
|
||||
}
|
||||
if ( $cache->startCapture($fileName.'.html') == FALSE){
|
||||
print $cache->displayCache();
|
||||
}else{
|
||||
|
||||
include_once(INCLUDE_PATH.'/partenaires/classMTva.php');
|
||||
include_once(INCLUDE_PATH.'/partenaires/classMMap.php');
|
||||
include_once(INCLUDE_PATH.'/partenaires/classMCoface.php');
|
||||
@ -23,7 +37,7 @@ try {
|
||||
$O = $client->getInfosBourse($siren);
|
||||
$etab=$O['result'];
|
||||
} catch (SoapFault $fault) {
|
||||
include_once(realpath(dirname(__FILE__).'/../../').'/includes/soaperror.php');
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client,$fault,$tabInfo);
|
||||
die();
|
||||
}
|
||||
@ -322,5 +336,7 @@ $raisonSociale=$tabInfo['entrep']['raisonSociale'];
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<!--'Effectif'
|
||||
-->
|
||||
<?php
|
||||
}//Fin du cache
|
||||
$cache->stopCapture();
|
||||
?>
|
Loading…
x
Reference in New Issue
Block a user