2009-02-17 13:14:53 +00:00
< ? if ( ! $_SESSION [ 'connected' ]) die ();
$siret = trim ( preg_replace ( '/[^0-9]/' , '' , $_REQUEST [ 'siret' ]));
if ( strlen ( $siret ) <> 0 && strlen ( $siret ) <> 9 && strlen ( $siret ) <> 14 ) die ( 'Param<61> tres incorrects !' );
2009-03-11 07:51:18 +00:00
$idEntreprise = trim ( preg_replace ( '/[^0-9]/' , '' , $_REQUEST [ 'idEntreprise' ])) * 1 ; // Si id=0 alors non communiqu<71>
if (( $siret * 1 ) == 0 && $idEntreprise == 0 ) die ( 'Param<61> tres incorrects !' );
2009-02-17 13:14:53 +00:00
$siren = substr ( $siret , 0 , 9 );
2009-02-27 19:24:24 +00:00
if ( isset ( $_REQUEST [ 'idan' ]) && $_REQUEST [ 'idan' ] * 1 <> 0 ) $idCom = $_REQUEST [ 'idan' ];
else $idCom = false ;
2009-02-17 13:14:53 +00:00
2009-08-24 14:55:56 +00:00
require_once 'cache/cache.php' ;
2009-07-20 16:17:33 +00:00
require_once 'partenaires/classMTva.php' ;
require_once 'partenaires/classMMap.php' ;
require_once 'partenaires/classMCoface.php' ;
require_once 'common/dates.php' ;
2009-02-17 13:14:53 +00:00
2009-04-01 12:45:45 +00:00
$tabInfo = $_SESSION [ 'tabInfo' ];
2009-08-24 14:55:56 +00:00
if (( $siret * 1 ) == 0 || ( $siren * 1 ) < 100 ){ $fileName = $page2 . '-' . $idEntreprise ;
} else { $fileName = $page2 . '-' . $siret ; }
if ( $idCom !== FALSE ){ $fileName .= '-' . $idCom ; }
cache_filename ( $fileName );
if ( cache_exist () && ! ( preg_match ( '/saisie/i' , $_SESSION [ 'tabInfo' ][ 'droits' ]) || $_SESSION [ 'tabInfo' ][ 'mode_edition' ] == 1 ) ){
$annonces = cache_get ( 'annonces' );
} else {
try {
$O = $client -> getInfosReg ( $siren , $idCom );
$annonces = $O [ 'result' ];
cache_delete ();
cache_add ( 'annonces' , $annonces );
} catch ( SoapFault $fault ) {
require_once 'soaperror.php' ;
processSoapFault ( $client , $fault , $tabInfo );
die ();
}
2009-02-17 13:14:53 +00:00
}
2009-08-24 14:55:56 +00:00
2009-02-17 13:14:53 +00:00
$raisonSociale = $tabInfo [ 'entrep' ][ 'raisonSociale' ];
?>
2009-08-17 14:36:24 +00:00
< div id = " center " >
< h1 class = " titre " > INFORMATIONS R & Eacute ; GLEMENT & Eacute ; ES </ h1 >
< table >
2009-02-17 13:14:53 +00:00
< tr >
< td width = " 30 " >& nbsp ; </ td >
< 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>
</ tr >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " colspan = " 2 " class = " StyleInfoLib " > Raison Sociale </ td >
< td width = " 350 " class = " StyleInfoData " >< ? = $raisonSociale ?> </td>
</ tr >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 100 " >& nbsp ; </ td >
< td width = " 100 " >& nbsp ; </ td >
< td width = " 350 " >& nbsp ; </ td >
</ tr >
2009-08-17 14:36:24 +00:00
</ table >
2009-08-17 16:21:58 +00:00
< h2 > Informations r<EFBFBD> glement<EFBFBD> es < span style = " font-weight:normal; font-size:8pt " > ( sources diffuseurs : BusinessWire / Hugin / actunews / DI Release ) </ span ></ h2 >
2009-08-17 14:36:24 +00:00
< table >
2009-02-17 13:14:53 +00:00
< ?
if ( $idCom ) {
2009-07-20 16:17:33 +00:00
2009-02-17 13:14:53 +00:00
foreach ( $annonces as $ann ) {
2009-02-27 19:24:24 +00:00
if ( $ann [ 'id' ] == $_REQUEST [ 'idan' ]) { /* 'id' => $ann [ 'id' ],
2009-02-17 13:14:53 +00:00
'' => $ann [ 'source' ],
'DateParution' => $ann [ 'DateParution' ],
'raisonSociale' => utf8_encode ( $ann [ 'raisonSociale' ]),
'titre' => utf8_encode ( $ann [ 'titre' ]),
'communique' => utf8_encode ( $ann [ 'communique' ]),
'communiqueHtml' => utf8_encode ( $ann [ 'communiqueHtml' ]),
'pj' => $ann [ 'pj' ],
'url' => $ann [ 'url' ], */
?>
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 550 " colspan = " 3 " class = " StyleInfoData " > Information < ? = $ann [ 'source' ] ?> du <?=WDate::dateT('Y-m-d','d/m/Y',$ann['DateParution'])?>. Entrée en base S&D : <?=WDate::dateT('Y-m-d','d/m/Y',$ann['dateInsertionSD'])?></td>
</ tr >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 550 " colspan = " 3 " class = " StyleInfoLib " >< b >< ? = utf8_decode ( $ann [ 'titre' ]) ?> </b></td>
</ tr >
< tr >
< td colspan = " 4 " >& nbsp ; </ td >
</ tr >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< ?
//$texte=preg_replace("/((?:[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}))/", '<a href="/?page=identite&siret=$1" title="Voir la fiche d\'identité de cette entreprise">$1</a>', $ann['texteAnnonce']);
//$texte=preg_replace("/((?:[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}))/", '<a href="/?page=identite&siret=$1" title="Voir la fiche d\'identité de cette entreprise">$1</a>', $ann['texteAnnonce']);
$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 , utf8_decode ( $ann [ 'communique' ])); //communiqueHtml
/* if ( preg_match ( '/<body(?:.*|)>(.*)<\/body>/UiS' , $texte , $matches ))
$texte = $matches [ 1 ]; */
?> <td width="550" colspan="3"><?=$texte?></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 >
< ?
}
}
2009-07-20 16:17:33 +00:00
2009-02-17 13:14:53 +00:00
} else {
2009-07-20 16:17:33 +00:00
if ( count ( $annonces ) > 0 ) {
2009-02-17 13:14:53 +00:00
/** Affichage de la liste des infos reg
**/
foreach ( $annonces as $i => $ann ) { ?>
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 100 " class = " StyleInfoLib " > Le < ? = WDate :: dateT ( 'Y-m-d' , 'd/m/Y' , $ann [ 'DateParution' ]) ?> </td>
2009-02-27 19:24:24 +00:00
< td width = " 450 " colspan = " 2 " class = " StyleInfoData " >< a href = " /?page=infosreg&siret=<?= $siret ?>&idan=<?= $ann['id'] ?> " >< ? = utf8_decode ( $ann [ 'titre' ]) ?> </a></td>
2009-02-17 13:14:53 +00:00
</ tr >
< ? }
} else {
/** Aucune Info R<EFBFBD> glement<EFBFBD> e pour cette entreprise
**/
?>
< 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 >
< ?
}
}
?>
< tr >
< td colspan = " 4 " >& nbsp ; </ td >
</ tr >
2009-08-17 14:36:24 +00:00
</ table >
</ div >