Mise en cache + gestion des exports
This commit is contained in:
parent
0236a13524
commit
fd34a2c1e0
@ -17,7 +17,7 @@ if (($siret*1)==0 || ($siren*1)<100){
|
||||
if($page=='dirigeants' && $_REQUEST['vue']=='histo'){
|
||||
$fileName.= '-histo';
|
||||
}elseif($page=='annonces'){
|
||||
if(isset($_REQUEST['vue']) && $$_REQUEST['vue']!=''){$fileName.= '-'.$_REQUEST['vue'];}
|
||||
if(isset($_REQUEST['vue']) && $$_REQUEST['vue']!=''){$fileName.= '-'.$_REQUEST['idan'];}
|
||||
}
|
||||
|
||||
//Ajout de l'extension
|
||||
|
@ -35,11 +35,19 @@ if (($siret*1)==0 || ($siren*1)<100){
|
||||
$fileName = $path.'/'.$page.'-'.$siret;
|
||||
}
|
||||
|
||||
//Gestion des cas particulier
|
||||
//Gestion des cas particuliers
|
||||
if($page=='dirigeants' && $_REQUEST['vue']=='histo'){
|
||||
$fileName.= '-histo';
|
||||
}elseif($page=='annonces'){
|
||||
if(isset($_REQUEST['vue']) && $$_REQUEST['vue']!=''){$fileName.= '-'.$_REQUEST['vue'];}
|
||||
if(isset($_REQUEST['vue']) && $$_REQUEST['vue']!=''){$fileName.= '-'.$_REQUEST['idan'];}
|
||||
}elseif($page=='liasse'){
|
||||
if(isset($_REQUEST['mil'])){
|
||||
$mil = explode(',',$_REQUEST['mil']);
|
||||
$annee = substr($mil[0],-10);
|
||||
$annee = str_replace('/', '', $annee);
|
||||
$firephp->log($annee, 'annee');
|
||||
$fileName.= '-'.$annee;
|
||||
}
|
||||
}
|
||||
|
||||
//Ajout de l'extension
|
||||
|
@ -17,7 +17,7 @@ if (($siret*1)==0 || ($siren*1)<100){
|
||||
if($page=='dirigeants' && $_REQUEST['vue']=='histo'){
|
||||
$fileName.= '-histo';
|
||||
}elseif($page=='annonces'){
|
||||
if(isset($_REQUEST['vue']) && $$_REQUEST['vue']!=''){$fileName.= '-'.$_REQUEST['vue'];}
|
||||
if(isset($_REQUEST['vue']) && $$_REQUEST['vue']!=''){$fileName.= '-'.$_REQUEST['idan'];}
|
||||
}
|
||||
|
||||
//Ajout de l'extension
|
||||
|
@ -2,15 +2,10 @@
|
||||
if (!$_SESSION['connected']) die();
|
||||
$tabInfo = $_SESSION['tabInfo'];
|
||||
|
||||
require_once 'partenaires/classMTva.php';
|
||||
require_once 'partenaires/classMMap.php';
|
||||
require_once 'partenaires/classMCoface.php';
|
||||
require_once 'common/dates.php';
|
||||
|
||||
$siret=trim(preg_replace('/[^0-9]/', '', $_REQUEST['siret']));
|
||||
if (strlen($siret)<>0 && strlen($siret)<>9 && strlen($siret)<>14) die('Paramètres incorrects !');
|
||||
|
||||
if (isset($_REQUEST['idan']) && $_REQUEST['idan']*1<>0) $idan = $_REQUEST['idan'];
|
||||
if (isset($_REQUEST['idan']) && $_REQUEST['idan']*1!=0) $idan = $_REQUEST['idan'];
|
||||
else $idan = false;
|
||||
|
||||
if (($siret*1)==0 && $idan==0) die('Paramètres incorrects !');
|
||||
@ -28,7 +23,7 @@ if ($action<>'' && $action<>'logon') die('Param
|
||||
//Générer un nom de fichier pour le cache et l'export des fichiers
|
||||
if (($siret*1)==0 || ($siren*1)<100){ $fileName = $page2.'-'.$idEntreprise;
|
||||
}else{ $fileName = $page2.'-'.$siret; }
|
||||
if($vue!=''){$fileName.= '-'.$vue;}
|
||||
if($vue!=''){$fileName.= '-'.$idan;}
|
||||
//Mise en Cache
|
||||
require_once 'cache.php';
|
||||
$cache = new Cache();
|
||||
@ -41,6 +36,11 @@ if ( $cache->startCapture($fileName.'.html') == FALSE){
|
||||
print $cache->displayCache();
|
||||
}else{
|
||||
|
||||
require_once 'partenaires/classMTva.php';
|
||||
require_once 'partenaires/classMMap.php';
|
||||
require_once 'partenaires/classMCoface.php';
|
||||
require_once 'common/dates.php';
|
||||
|
||||
try {
|
||||
if ($vue=='bodacc' || $_REQUEST['source']=1) $filtre=1;
|
||||
elseif ($vue=='balo') $filtre=2;
|
||||
|
@ -286,14 +286,18 @@ if ($page=='recherche'){
|
||||
<img src="./img/exporticones/printer.png"" alt="Impression"/></a>
|
||||
<?php
|
||||
//Affichage des impressions seulement pour certaines pages
|
||||
if ($page=='identite' ||
|
||||
$page=='etablissements' ||
|
||||
$page=='liens' ||
|
||||
$page=='evenements' ||
|
||||
$page=='dirigeants'){
|
||||
if ($page=='identite' || $page=='etablissements' || $page=='liens' || $page=='evenements' || $page=='dirigeants' || $page=='synthese' || $page=='bilans' || $page=='ratios' || $page=='liasse' || $page=='bourse'){
|
||||
?>
|
||||
<a href="./exportpdf.php?<?=$_SERVER['QUERY_STRING'];?>" target="_blank" title="PDF"><img src="./img/exporticones/pdf.png" alt="PDF"></a>
|
||||
<?php
|
||||
}
|
||||
if ($page=='identite' || $page=='etablissements' || $page=='liens' || $page=='evenements' || $page=='dirigeants'){
|
||||
?>
|
||||
<a href="./exportcsv.php?<?=$_SERVER['QUERY_STRING'];?>" target="_blank" title="CSV"><img src="./img/exporticones/csv.png" alt="CSV"></a>
|
||||
<?php
|
||||
}
|
||||
if ($page=='identite' || $page=='etablissements' || $page=='liens' || $page=='evenements' || $page=='dirigeants'){
|
||||
?>
|
||||
<a href="./exportxml.php?<?=$_SERVER['QUERY_STRING'];?>" target="_blank" title="XML"><img src="./img/exporticones/xml.png" alt="XML"></a>
|
||||
</center>
|
||||
<?php
|
||||
|
@ -15,6 +15,8 @@ isset($_REQUEST['bilan']) ? $bilan=$_REQUEST['bilan'] : $bilan=0 ;
|
||||
if (($siret*1)==0 || ($siren*1)<100){ $fileName = $page2.'-'.$idEntreprise;
|
||||
}else{ $fileName = $page2.'-'.$siret; }
|
||||
|
||||
$fileName.= '-'.$bilan;
|
||||
|
||||
require_once 'cache.php';
|
||||
$cache = new Cache();
|
||||
//Forcer la création de la page dans le cache lorsque l'utilisateur a le mode saisie
|
||||
@ -39,7 +41,7 @@ if ( $cache->startCapture($fileName.'.html') == FALSE){
|
||||
$ratiosEntrepEvol = $O['result']['RatiosEntrepEvol'];
|
||||
$ratiosSecteur = $O['result']['RatiosSecteur'];
|
||||
print '<!--';
|
||||
//print_r($O['result']);
|
||||
//print_r($ratiosInfos);
|
||||
print '-->';
|
||||
}catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
|
Loading…
Reference in New Issue
Block a user