2009-05-28 14:48:23 +00:00
< ? php
2009-02-27 10:06:54 +00:00
if ( ! $_SESSION [ 'connected' ]) die ();
2009-04-01 12:45:45 +00:00
$tabInfo = $_SESSION [ 'tabInfo' ];
2009-02-19 16:28:12 +00:00
$siret = trim ( preg_replace ( '/[^0-9]/' , '' , $_REQUEST [ 'siret' ]));
if ( strlen ( $siret ) <> 0 && strlen ( $siret ) <> 9 && strlen ( $siret ) <> 14 ) die ( 'Param<61> tres incorrects !' );
2009-05-28 17:10:09 +00:00
if ( isset ( $_REQUEST [ 'idan' ]) && $_REQUEST [ 'idan' ] * 1 != 0 ) $idan = $_REQUEST [ 'idan' ];
2009-02-27 10:06:54 +00:00
else $idan = false ;
if (( $siret * 1 ) == 0 && $idan == 0 ) die ( 'Param<61> tres incorrects !' );
2009-02-19 16:28:12 +00:00
$siren = substr ( $siret , 0 , 9 );
//annonces&action=logon&login=mederic&checkIp=only&siret=552144503&id=6415277&vue=bodacc
2009-05-28 14:48:23 +00:00
$idEntreprise = $_REQUEST [ 'idEntreprise' ];
isset ( $_REQUEST [ 'vue' ]) ? $vue = $_REQUEST [ 'vue' ] : $vue = '' ;
$action = $_REQUEST [ 'action' ];
2009-02-19 16:28:12 +00:00
$message = '' ;
2009-05-28 14:48:23 +00:00
if ( $action <> '' && $action <> 'logon' ) die ( 'Param<61> tres incorrects !' );
//G<> n<EFBFBD> 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 ; }
2009-05-28 17:10:09 +00:00
if ( $vue != '' ){ $fileName .= '-' . $idan ;}
2009-05-28 14:48:23 +00:00
//Mise en Cache
require_once 'cache.php' ;
$cache = new Cache ();
//Forcer la cr<63> 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 ;
2009-02-19 16:28:12 +00:00
}
2009-05-28 14:48:23 +00:00
if ( $cache -> startCapture ( $fileName . '.html' ) == FALSE ){
print $cache -> displayCache ();
} else {
2009-02-19 16:28:12 +00:00
2009-05-28 17:10:09 +00:00
require_once 'partenaires/classMTva.php' ;
require_once 'partenaires/classMMap.php' ;
require_once 'partenaires/classMCoface.php' ;
require_once 'common/dates.php' ;
2009-05-28 14:48:23 +00:00
try {
if ( $vue == 'bodacc' || $_REQUEST [ 'source' ] = 1 ) $filtre = 1 ;
elseif ( $vue == 'balo' ) $filtre = 2 ;
elseif ( $vue == 'asso' ) $filtre = 3 ;
else $filtre = 0 ;
if ( $tabInfo [ 'entrep' ][ 'fj' ] > 9000 && $tabInfo [ 'entrep' ][ 'fj' ] < 9999 && $siren == 0 ) {
$filtre = 3 ;
}
2009-04-27 08:29:26 +00:00
$O = $client -> getAnnonces ( $siren , $filtre , $idan );
2009-02-20 13:57:51 +00:00
$annonces = $O [ 'result' ];
2009-05-28 14:48:23 +00:00
$firephp -> log ( $annonces , 'annonces' );
if ( count ( $annonces ) == 0 ) {
$idan = 0 ;
}
} catch ( SoapFault $fault ) {
require_once 'includes/soaperror.php' ;
processSoapFault ( $client , $fault , $tabInfo );
die ();
2009-02-19 16:28:12 +00:00
}
2009-05-28 14:48:23 +00:00
if ( $siren != $tabInfo [ 'entrep' ][ 'siren' ]) {
$O2 = $client -> getIdentite ( $siret );
$etab = $O2 [ 'result' ];
$tabEntrep = array ();
$tabEntrep [ 'raisonSociale' ] = $etab [ 'Nom' ];
$tabEntrep [ 'siren' ] = $etab [ 'Siren' ];
$tabEntrep [ 'siret' ] = $etab [ 'Siret' ];
$tabEntrep [ 'tva' ] = $etab [ 'TvaNumero' ];
$tabEntrep [ 'isin' ] = $etab [ 'Isin' ];
$tabEntrep [ 'AutreId' ] = $etab [ 'AutreId' ];
$tabEntrep [ 'active' ] = $etab [ 'Statut' ];
$tabEntrep [ 'Source' ] = $etab [ 'Source' ];
$tabEntrep [ 'SourceId' ] = $etab [ 'SourceId' ];
$tabEntrep [ 'codeCommune' ] = $etab [ 'Dept' ] . $etab [ 'codeCommune' ];
$tabEntrep [ 'nafEn' ] = $etab [ 'NafEnt' ];
$tabEntrep [ 'nafEt' ] = $etab [ 'NafEtab' ];
$tabEntrep [ 'fj' ] = $etab [ 'FJ' ];
$_SESSION [ 'tabInfo' ][ 'entrep' ] = $tabEntrep ;
$raisonSociale = $etab [ 'Nom' ];
} else
$raisonSociale = $tabInfo [ 'entrep' ][ 'raisonSociale' ];
?>
< table width = " 580 " border = " 0 " align = " left " bgcolor = " #FFFFFF " >
< ? php
if ( $message <> '' ) {
?>
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 550 " colspan = " 3 " class = " StyleInfoData " >< h3 >< ? = $message ; ?> </h3></td>
</ tr >
< ? php
2009-03-06 10:44:35 +00:00
}
2009-05-28 14:48:23 +00:00
?>
< tr >
< td colspan = " 4 " >< img src = " ./img/rub_balobodacc.png " width = " 577 " height = " 36 " /></ td >
</ tr >
2009-03-06 10:44:35 +00:00
< tr >
< td width = " 30 " >& nbsp ; </ td >
2009-05-28 14:48:23 +00:00
< td width = " 200 " colspan = " 2 " class = " StyleInfoLib " > Num & eacute ; ro identifiant Siren </ td >
< td width = " 350 " class = " StyleInfoData " >< ? = substr ( $siren , 0 , 3 ) . ' ' . substr ( $siren , 3 , 3 ) . ' ' . substr ( $siren , 6 , 3 ) ?> </td>
2009-03-06 10:44:35 +00:00
</ tr >
2009-05-28 14:48:23 +00:00
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " colspan = " 2 " class = " StyleInfoLib " > Raison Sociale </ td >
< td width = " 350 " class = " StyleInfoData " >< ? = $raisonSociale ?> </td>
</ tr >
< ?
if ( $idan && ( $vue == 'bodacc' || $vue == 'abod' || $vue == 'balo' || $vue == 'asso' )) {
echo '<tr><td colspan="4"> </td></tr>' ;
$ann = $annonces [ 0 ];
/** AFFICHAGE D'UNE ANNONCE BODACC / BALO / ASSO **/
// Ent<6E> te BALO
if ( $vue == 'balo' ) {
?>
< tr >< td colspan = " 4 " >& nbsp ; </ td ></ tr >
< tr >
< td colspan = " 4 " >< img src = " ./img/srub_balo.png " width = " 576 " height = " 27 " /></ td >
</ tr >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 550 " colspan = " 3 " class = " StyleInfoData " >
BALO n & deg ; < ? = $ann [ 'BodaccNum' ] ?> du <?=WDate::dateT('Y-m-d','d/m/Y',$ann['DateParution'])?>. Entré n°<?=$ann['NumAnnonce']?>. Entrée en base S&D : <?=WDate::dateT('Y-m-d','d/m/Y',$ann['dateInsertionSD'])?>.<br/>
< a href = " /?page=annonces&siret=<?= $siret ?>&idan=<?= $_REQUEST['idan'] ?>&vue=balo&mode=pdf " target = " _blank " > Cliquez ici pour voir cette annonce au format PDF & nbsp ;( < ? = adapteOCtets ( @ filesize ( PATH_DATA . '/jo/balo/' . WDate :: dateT ( 'Y-m-d' , 'Y' , $ann [ 'DateParution' ]) . '/' . $ann [ 'Lien_Annonce_Pdf' ])) ?> )</a>
.</ td >
</ tr >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 550 " colspan = " 3 " class = " StyleInfoLib " >< b >< ? = $ann [ 'Categorie' ] ?> </b></td>
</ tr >
< tr >
< ? php
$ann [ 'texteAnnonce' ] = utf8_decode ( $ann [ 'texteAnnonce' ]);
} elseif ( $vue == 'bodacc' || $vue == 'abod' ) {
?>
2009-03-06 10:44:35 +00:00
< tr >< td colspan = " 4 " >& nbsp ; </ td ></ tr >
< tr >
2009-05-28 14:48:23 +00:00
< td colspan = " 4 " >< img src = " ./img/srub_bodacc.png " width = " 576 " height = " 27 " /></ td >
2009-03-06 10:44:35 +00:00
</ tr >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 550 " colspan = " 3 " class = " StyleInfoData " >
2009-05-28 14:48:23 +00:00
< ? php
$tabSource = explode ( '-' , $ann [ 'BodaccCode' ]);
$source = $tabSource [ 0 ];
$idSource =@ $tabSource [ 1 ];
if ( $source [ 0 ] == 'B' ){
if ( $ann [ 'BodaccNum' ] == 0 )
print '<img src="./img/logo_jo.png"/> Source BODACC ' . substr ( $ann [ 'BodaccCode' ], - 1 ) . ' du ' . WDate :: dateT ( 'Y-m-d' , 'd/m/Y' , $ann [ 'DateParution' ]);
else
print '<img src="./img/logo_jo.png"/> Source BODACC n°' . $ann [ 'BodaccNum' ] . ' ' . substr ( $ann [ 'BodaccCode' ], - 1 ) . ' du ' . WDate :: dateT ( 'Y-m-d' , 'd/m/Y' , $ann [ 'DateParution' ]) . '. Département n°' . $ann [ 'Departement' ] . '. <a href="/?page=competences&siret=' . $siret . '&type=tri">' . $ann [ 'Tribunal' ] . '</a>' ;
} elseif ( $source [ 0 ] == 'G' || $source [ 0 ] == 'T' ){
print '<img src="./img/logo_greffe.png"/> Source Greffe du Tribunal' ;
} elseif ( $source [ 0 ] == 'P' ){
print '<img src="./img/logo_inpi.png"/> Source Registre National du Commerce' ;
} else {
print '<img src="./img/logo_jal.png"/> Source Journal Annonces Légales' ;
}
2009-02-19 16:28:12 +00:00
2009-05-28 14:48:23 +00:00
if ( $ann [ 'dateInsertionSD' ] <> '' ) echo ' Entrée en base : ' . WDate :: dateT ( 'Y-m-d' , 'd/m/Y' , $ann [ 'dateInsertionSD' ]);
?>
</ td >
</ tr >
< ? php
/*<?=WDate::dateT('Y-m-d','d/m/Y',$ann['DateParution'])?>*/
} elseif ( $vue == 'asso' ) {
?>
2009-03-06 10:44:35 +00:00
< tr >< td colspan = " 4 " >& nbsp ; </ td ></ tr >
< tr >
2009-05-28 14:48:23 +00:00
< td colspan = " 4 " >< img src = " ./img/srub_asso.png " width = " 576 " height = " 27 " /></ td >
2009-03-06 10:44:35 +00:00
</ tr >
< tr >
< td width = " 30 " >& nbsp ; </ td >
2009-05-28 14:48:23 +00:00
< td width = " 550 " colspan = " 3 " class = " StyleInfoData " > J . O . ASSOCIATION n & deg ; < ? = $ann [ 'BodaccNum' ] ?> du <?=WDate::dateT('Y-m-d','d/m/Y',$ann['DateParution'])?>. Annonce n°<?=$ann['NumAnnonce']?>. Entrée en base S&D : <?=WDate::dateT('Y-m-d','d/m/Y',$ann['dateInsertionSD'])?>.</td>
</ tr >
2009-03-23 10:17:19 +00:00
< ? php
2009-05-28 14:48:23 +00:00
}
?>
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 550 " colspan = " 3 " class = " StyleInfoLib " >< b >
< ? php
foreach ( @ $ann [ 'evenements' ] as $i => $even ) {
echo @ $even [ 'LibEven' ] . '<br/>' ;
2009-03-06 10:44:35 +00:00
}
2009-05-28 14:48:23 +00:00
?> </b>
</ td >
</ tr >
< tr >
< td colspan = " 4 " >& nbsp ; </ td >
</ tr >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< ? php
/**Affichage du texte de l'annonce**/
$texte = preg_replace_callback ( " /((?:[0-9] { 9,9})|(?:[0-9] { 3,3} [0-9] { 3,3} [0-9] { 3,3})|(?:[0-9] { 3,3} \ .[0-9] { 3,3} \ .[0-9] { 3,3})|(?:[0-9] { 3,3}-[0-9] { 3,3}-[0-9] { 3,3}))/ " , replace_siren , $ann [ 'texteAnnonce' ]);
?>
< td width = " 550 " colspan = " 3 " >< code >< ? = $texte ?> </code></td>
</ tr >
< tr >
< td colspan = " 4 " >& nbsp ; </ td >
</ tr >
< tr >
< td colspan = " 4 " align = " center " class = " StyleInfoData " >< a href = " Javascript:history.back() " > Revenir <EFBFBD> la liste des annonces </ a ></ td >
</ tr >
< ? php
} elseif ( count ( $annonces ) > 0 ) {
/** Affichage de la liste des annonces **/
$titreBodacc = $titreBalo = $titreAsso = false ;
foreach ( $annonces as $i => $ann ) {
if ( $ann [ 'BodaccCode' ] == 'BODA' || $ann [ 'BodaccCode' ] == 'BODB' || $ann [ 'BodaccCode' ] == 'BODC' ) {
if ( ! $titreBodacc ) echo '<tr><td colspan="4"> </td></tr><tr><td colspan="4"><img src="./img/srub_bodacc.png" width="576" height="27" /></td></tr>' ;
$vueL = 'bodacc' ;
$titreBodacc = true ;
}
elseif ( $ann [ 'BodaccCode' ] == 'BALO' ) {
if ( ! $titreBalo ) echo '<tr><td colspan="4"> </td></tr><tr><td colspan="4"><img src="./img/srub_balo.png" width="576" height="27" /></td></tr>' ;
$vueL = 'balo' ;
$titreBalo = true ;
}
elseif ( $ann [ 'BodaccCode' ] == 'ASSO' ) {
if ( ! $titreAsso ) echo '<tr><td colspan="4"> </td></tr><tr><td colspan="4"><img src="./img/srub_asso.png" width="576" height="27" /></td></tr>' ;
$vueL = 'asso' ;
$titreAsso = true ;
}
else {
if ( ! $titreBodacc ) echo '<tr><td colspan="4"> </td></tr><tr><td colspan="4"><img src="./img/srub_bodacc.png" width="576" height="27" /></td></tr>' ;
$vueL = 'abod' ;
$titreBodacc = true ;
}
?>
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 140 " class = " StyleInfoLib " >
< span id = " annoncesDate " > Le < ? = WDate :: dateT ( 'Y-m-d' , 'd/m/Y' , $ann [ 'DateParution' ]); ?> </span>
< span id = " annoncesImg " >
< ? php
if ( $vueL == 'bodacc' || $vueL == 'abod' ) {
$tabSource = explode ( '-' , $ann [ 'BodaccCode' ]);
$source = $tabSource [ 0 ];
$idSource =@ $tabSource [ 1 ];
if ( $source [ 0 ] == 'B' ){
print '<img src="./img/logo_jo.png" title="Source BODACC ' . $ann [ 'BodaccNum' ] . ' ' . substr ( $source , - 1 ) . ' ' . substr ( $ann [ 'DateParution' ], 0 , 4 ) . '"/>' ;
} elseif ( $source [ 0 ] == 'G' || $source [ 0 ] == 'T' ){
print '<img src="./img/logo_greffe.png" title="Source Collecte Greffe"/>' ;
} elseif ( $source [ 0 ] == 'P' ){
print '<img src="./img/logo_inpi.png" title="Source Collecte RNCS"/>' ;
} else {
print '<img src="./img/logo_jal.png" title="Source Collecte JAL' ;
if ( $idSource > 0 ) print ' $idSource' ;
print '"/>' ;
}
2009-03-06 10:44:35 +00:00
}
2009-02-19 16:28:12 +00:00
?>
2009-05-28 14:48:23 +00:00
</ span >
</ td >
< td width = " 450 " colspan = " 2 " class = " StyleInfoData " >< a href = " /?page=annonces&siret=<?= $siret ?>&idan=<?= $ann['id'] ?>&vue=<?= $vueL ?> " >< ? foreach ( $ann [ 'evenements' ] as $i => $even ) {
echo $even [ 'LibEven' ];
$numEven = $even [ 'CodeEven' ] * 1 ;
if ( $numEven > 3000 && $numEven < 3999 ) echo ' (cl<63> ture au ' . WDate :: dateT ( 'Y-m-d' , 'd/m/Y' , $ann [ 'dateEffet' ]) . ')' ;
//elseif ($ann['BodaccCode']<>'BODA' && $ann['BodaccCode']<>'BODB' && $ann['BodaccCode']<>'BODC' && (str_replace('-','',$ann['DateParution'])*1)>20060101 )
// echo ' <u>(annonce officielle en cours de publication au BODACC)</u>';
echo '<br/>' ;
/* 'dateEffet' => $ann [ 'dateEffet' ],
'dateJugement' => $ann [ 'dateJugement' ],
*/
} ?> </a></td>
</ tr >
< ? php }
} else {
/** Aucune annonce bodacc pour cette entreprise **/
2009-03-23 10:17:19 +00:00
?>
2009-05-28 14:48:23 +00:00
< tr >
< td colspan = " 4 " >& nbsp ; </ td >
</ tr >
< tr >
< td colspan = " 4 " >< img src = " ./img/srub_bodacc.png " width = " 576 " height = " 27 " /></ td >
</ tr >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 100 " class = " StyleInfoLib " >& nbsp ; </ td >
< td width = " 450 " colspan = " 2 " class = " StyleInfoData " > N & eacute ; ant </ td >
</ tr >
< tr >
< td colspan = " 4 " >& nbsp ; </ td >
</ tr >
< ? php
2009-02-19 16:28:12 +00:00
}
2009-05-28 14:48:23 +00:00
require_once 'export.php' ;
$parseTab = new tabExport ();
$parseTab -> tab = $annonces ;
$parseTab -> notdisplay = array ( 'id' );
$parseTab -> title = array (
'BodaccCode' => 'Code Bodacc' ,
'BodaccNum' => 'Num<75> ro Bodacc' ,
'NumAnnonce' => 'Num<75> ro annonce' ,
'DateParution' => 'Date de parution' ,
'TribunalSiret' => 'Siret du tribunal' ,
'typeAnnonce' => 'Type annonce' ,
'texteRectificatif' => 'Texte rectificatif' ,
'texteAnnonce' => 'Texte annonce' ,
'dateEffet' => 'Date effet' ,
'dateJugement' => 'Date jugement' ,
'dateInsertionSD' => 'Date insertion' ,
'evenements' => 'Evenements' ,
);
$parseTab -> type = array ();
$tabForExport = $parseTab -> convertTable ();
print '<!--' ;
print_r ( $tabForExport );
print '-->' ;
$array2csv = new ExportCSV ();
$array2csv -> records = $tabForExport ;
$array2csv -> writeCSV ( $fileName );
$array2xml = new ExportXML ();
$array2xml -> rootName = $page . 's' ;
$array2xml -> defaultTagName = $page ;
$array2xml -> records = $tabForExport ;
$array2xml -> writeXML ( $fileName );
} //Fin du cache
$cache -> stopCapture (); //On arrete la capture pour le cache
2009-02-19 16:28:12 +00:00
2009-05-20 15:49:08 +00:00
if ( ! $idan ) {
?>
2009-02-19 16:28:12 +00:00
< tr >
< td width = " 30 " >& nbsp ; </ td >
2009-05-22 09:53:48 +00:00
< td colspan = " 3 " width = " 550 " class = " StyleInfoData " >
2009-05-20 15:49:08 +00:00
< ? php
require_once 'surveillance/surveillance.php' ;
print getSurveillance ( $page , $siret );
?>
</ td >
2009-02-19 16:28:12 +00:00
</ tr >
2009-05-20 15:49:08 +00:00
< ? php
}
2009-02-19 16:28:12 +00:00
?>
2009-05-20 15:49:08 +00:00
</ table >