diff --git a/includes/surveillance/survliste.php b/includes/surveillance/survliste.php
index e8b8443aa..c9c76c961 100644
--- a/includes/surveillance/survliste.php
+++ b/includes/surveillance/survliste.php
@@ -7,10 +7,12 @@ function readann($file, $filtre){
$handle = fopen($file, "r");
while (($ann = fgetcsv($handle, 3000, ';')) !== FALSE) {
$row++;
- if ($row==1) {
+ if ($row==1)
+ {
// Ligne d'entête, on repère les colonnes
$num = count($ann);
- for ($i=0; $i<$num; $i++) {
+ for ($i=0; $i<$num; $i++)
+ {
if ($ann[$i]=='SITE_CNASEA') $colSiteCnasea=$i;
elseif($ann[$i]=='Siren') $colSiren=$i;
elseif($ann[$i]=='Nic') $colNic=$i;
@@ -28,20 +30,32 @@ function readann($file, $filtre){
elseif($ann[$i]=='Texte Annonce') $colTexteAnn=$i;
elseif($ann[$i]=='Date évènement') $colDateEven=$i;
}
- } elseif ($filtre!='' && $ann[$colChapitre]!=$filtre){
-
- }else{
- $tab[$count]['RaisonSociale'] = $ann[$colRaisonSociale];
- $tab[$count]['Siren'] = $ann[$colSiren];
- $tab[$count]['SiteCnasea'] = $ann[$colSiteCnasea];
- $tab[$count]['Ref'] = $ann[$colRef];
- $tab[$count]['Parution'] = $ann[$colParution];
- $tab[$count]['Bodacc'] = $ann[$colBodacc];
- $tab[$count]['DatePar'] = WDate::dateT('Ymd','d/m/Y',$ann[$colDatePar]);
- $tab[$count]['Tribunal'] = $ann[$colTribunal];
- $tab[$count]['Even'] = str_replace(', ','
',$ann[$colEven]);
- $tab[$count]['TexteAnn'] = $ann[$colTexteAnn];
- $count++;
+ }
+ elseif ($filtre!='' && $filtre!='bodacc' && $ann[$colChapitre]!=$filtre )
+ {
+ //On fait rien
+ }
+ else
+ {
+ //$filtre=='bodacc'
+ if( substr($_SESSION['tabInfo']['login'],0,6)=='cnasea' && $ann[$colBodacc]!='A' && $ann[$colBodacc]!='B' && $ann[$colBodacc]!='C' )
+ {
+ //on supprime toutes les annonces pas bodacc
+ }
+ else
+ {
+ $tab[$count]['RaisonSociale'] = $ann[$colRaisonSociale];
+ $tab[$count]['Siren'] = $ann[$colSiren];
+ $tab[$count]['SiteCnasea'] = $ann[$colSiteCnasea];
+ $tab[$count]['Ref'] = $ann[$colRef];
+ $tab[$count]['Parution'] = $ann[$colParution];
+ $tab[$count]['Bodacc'] = $ann[$colBodacc];
+ $tab[$count]['DatePar'] = WDate::dateT('Ymd','d/m/Y',$ann[$colDatePar]);
+ $tab[$count]['Tribunal'] = $ann[$colTribunal];
+ $tab[$count]['Even'] = str_replace(', ','
',$ann[$colEven]);
+ $tab[$count]['TexteAnn'] = $ann[$colTexteAnn];
+ $count++;
+ }
}
}
fclose($handle);
diff --git a/www/pages/survlisteann.php b/www/pages/survlisteann.php
index badcd70b4..9ee79bb4d 100644
--- a/www/pages/survlisteann.php
+++ b/www/pages/survlisteann.php
@@ -14,13 +14,14 @@ else{
$filtre = '';
if (isset($_REQUEST['filtre'])) {
switch (trim(strtolower($_REQUEST['filtre']))) {
- case 'procol': $filtre='procol'; break;
- case 'mmd': $filtre='mmd'; break;
- case 'radiations': $filtre='radiations'; break;
- case 'ventes': $filtre='ventes'; break;
- case 'comptes': $filtre='comptes'; break;
- case 'creations': $filtre='creations'; break;
- default: $filtre=''; break;
+ case 'procol': $filtre = 'procol'; break;
+ case 'mmd': $filtre = 'mmd'; break;
+ case 'radiations': $filtre = 'radiations'; break;
+ case 'ventes': $filtre = 'ventes'; break;
+ case 'comptes': $filtre = 'comptes'; break;
+ case 'creations': $filtre = 'creations'; break;
+ case 'bodacc': $filtre = 'bodacc'; break;
+ default: $filtre = ''; break;
}
}
@@ -78,6 +79,7 @@ else{
+ >BODACC */ ?>