Mise en cache de la page Annonces (reférence #0000011)
This commit is contained in:
parent
2d89772f65
commit
2ec5279eb5
@ -104,7 +104,7 @@ class ExportCSV {
|
||||
fclose($fp);
|
||||
}
|
||||
|
||||
function array_flatten($array, &$newArray = Array() ,$prefix='',$delimiter='|') {
|
||||
function array_flatten($array, &$newArray = Array(), $prefix='', $delimiter='|') {
|
||||
foreach ($array as $key => $child) {
|
||||
if (is_array($child)) {
|
||||
$newPrefix = $prefix.$key.$delimiter;
|
||||
@ -118,6 +118,58 @@ class ExportCSV {
|
||||
|
||||
}
|
||||
|
||||
class tabExport {
|
||||
|
||||
public $tab = array();
|
||||
public $notdisplay = array();
|
||||
public $title = array();
|
||||
public $type = array();
|
||||
|
||||
public $convert = array();
|
||||
|
||||
function __construct() {}
|
||||
|
||||
function convertTable(){
|
||||
$this->convert = $this->rArray($this->tab);
|
||||
return $this->convert;
|
||||
}
|
||||
|
||||
function rArray($array) {
|
||||
foreach ($array as $key => $child) {
|
||||
if (is_array($child)) {
|
||||
if(!in_array($key, $this->notdisplay, TRUE)){
|
||||
$newArray[$this->renameKey($key)] = $this->rArray($child);
|
||||
}
|
||||
}else{
|
||||
if(!in_array($key, $this->notdisplay, TRUE)){
|
||||
$newArray[$this->renameKey($key)] = $this->convertValue($key, $child);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $newArray;
|
||||
}
|
||||
|
||||
function renameKey($key){
|
||||
$newKey = $key;
|
||||
if(array_key_exists($key, $this->title)){
|
||||
$newKey = $this->title[$key];
|
||||
}
|
||||
return $newKey;
|
||||
}
|
||||
|
||||
function convertValue($key, $value){
|
||||
if(array_key_exists($key, $this->type)){
|
||||
switch($this->type[$key]){
|
||||
case 'date':
|
||||
//Test des différents formats de value
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
|
||||
class ExportPDF {
|
||||
|
||||
function __construct(){}
|
||||
|
@ -13,9 +13,11 @@ 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'];}
|
||||
}
|
||||
|
||||
//Ajout de l'extension
|
||||
|
@ -38,6 +38,8 @@ if (($siret*1)==0 || ($siren*1)<100){
|
||||
//Gestion des cas particulier
|
||||
if($page=='dirigeants' && $_REQUEST['vue']=='histo'){
|
||||
$fileName.= '-histo';
|
||||
}elseif($page=='annonces'){
|
||||
if(isset($_REQUEST['vue']) && $$_REQUEST['vue']!=''){$fileName.= '-'.$_REQUEST['vue'];}
|
||||
}
|
||||
|
||||
//Ajout de l'extension
|
||||
|
@ -16,6 +16,8 @@ if (($siret*1)==0 || ($siren*1)<100){
|
||||
//Gestion des cas particulier
|
||||
if($page=='dirigeants' && $_REQUEST['vue']=='histo'){
|
||||
$fileName.= '-histo';
|
||||
}elseif($page=='annonces'){
|
||||
if(isset($_REQUEST['vue']) && $$_REQUEST['vue']!=''){$fileName.= '-'.$_REQUEST['vue'];}
|
||||
}
|
||||
|
||||
//Ajout de l'extension
|
||||
|
@ -222,7 +222,8 @@ if ($page=='identite' ||
|
||||
$page=='etablissements' ||
|
||||
$page=='liens' ||
|
||||
$page=='evenements' ||
|
||||
$page=='dirigeants'){
|
||||
$page=='dirigeants'||
|
||||
$page=='annonces'){
|
||||
?>
|
||||
<a href="./exportpdf.php?<?=$_SERVER['QUERY_STRING'];?>" target="_blank" title="PDF"><img src="./img/exporticones/pdf.png" alt="PDF"></a>
|
||||
<a href="./exportcsv.php?<?=$_SERVER['QUERY_STRING'];?>" target="_blank" title="CSV"><img src="./img/exporticones/csv.png" alt="CSV"></a>
|
||||
|
Loading…
Reference in New Issue
Block a user