2009-02-19 16:28:12 +00:00
< ? if ( ! $_SESSION [ 'connected' ]) die ();
if ( ! function_exists ( 'supprDecimales' ) )
{
function supprDecimales ( $dec ) {
if ( $dec > 0 )
return floor ( $dec );
else
return ceil ( $dec );
}
}
if ( ! function_exists ( 'dec2dms' ) )
{
function dec2dms ( $dec ) {
$d = supprDecimales ( $dec );
$m = supprDecimales (( $dec - $d ) * 60 );
$s = abs ( round (((( $dec - $d ) * 60 ) - $m ) * 60 ));
$m = abs ( $m );
return $d . '<27> ' . $m . " ' " . $s . '"' ;
}
}
$siret = trim ( preg_replace ( '/[^0-9]/' , '' , $_REQUEST [ 'siret' ]));
if ( strlen ( $siret ) <> 0 && strlen ( $siret ) <> 9 && strlen ( $siret ) <> 14 ) die ( 'Param<61> tres incorrects !' );
$id = trim ( preg_replace ( '/[^0-9]/' , '' , $_REQUEST [ 'id' ])) * 1 ; // Si id=0 alors non communiqu<71>
if (( $siret * 1 ) == 0 && $id == 0 ) die ( 'Param<61> tres incorrects !' );
$siren = substr ( $siret , 0 , 9 );
//include_once(INCLUDE_PATH.'partenaires/classMTva.php');
//include_once(INCLUDE_PATH.'partenaires/classMMap.php');
//include_once(INCLUDE_PATH.'partenaires/classMCoface.php');
2009-02-20 13:04:46 +00:00
include_once ( FWK_PATH . '/common/dates.php' );
2009-02-19 16:28:12 +00:00
/** Utilisation du WS **/
$client = new SoapClient ( null , array ( 'trace' => 1 ,
'soap_version' => SOAP_1_1 ,
'location' => WEBSERVICE_URL ,
'uri' => WEBSERVICE_URI ,
'login' => $_SESSION [ 'tabInfo' ][ 'login' ],
'password' => $_SESSION [ 'tabInfo' ][ 'password' ],
// 'encoding' => 'UTF-8'
));
try {
$O = $client -> getIdentite ( $siret , $id );
$etab = $O [ '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 ;
} catch ( SoapFault $fault ) {
echo '<pre>' . $client -> __getLastResponse () . '</pre>' ;
echo 'ERREUR SOAP :' . EOL ;
print_r ( $fault );
die ();
}
?>
< table width = " 580 " border = " 0 " align = " left " bgcolor = " #FFFFFF " >
< tr >
< td colspan = " 3 " >< img src = " ./img/rub_identite<?if ( $etab['Siege'] ==0) echo '_etab';?>.png " width = " 577 " height = " 36 " ></ td >
</ tr >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Num & eacute ; ro identifiant Siret </ td >
< td width = " 350 " class = " StyleInfoData " >< ? = substr ( $etab [ 'Siren' ], 0 , 3 ) . ' ' . substr ( $etab [ 'Siren' ], 3 , 3 ) . ' ' . substr ( $etab [ 'Siren' ], 6 , 3 ) . ' <i>' . substr ( $etab [ 'Siret' ], 9 , 5 ) ?> </i></td>
</ tr >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Num & eacute ; ro identifiant Siret du si & egrave ; ge </ td >
< td width = " 350 " class = " StyleInfoData " >< ? = substr ( $etab [ 'SiretSiege' ], 0 , 3 ) . ' ' . substr ( $etab [ 'SiretSiege' ], 3 , 3 ) . ' ' . substr ( $etab [ 'SiretSiege' ], 6 , 3 ) . ' <i>' . substr ( $etab [ 'SiretSiege' ], 9 , 5 ) ?> </i></td>
</ tr >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Num & eacute ; ro de TVA Intracom .</ td >
< td width = " 350 " class = " StyleInfoData " valign = " middle " >< ? if ( $etab [ 'Dept' ] * 1 == 97 ) {
echo '<a href="http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=CELEX:31991L0680:FR:HTML" target="_blank">Non attribué dans les D.O.M.</a>' ;
} else {
echo substr ( $etab [ 'TvaNumero' ], 0 , 2 ) . ' ' . substr ( $etab [ 'TvaNumero' ], 2 , 2 ) . ' ' . substr ( $etab [ 'TvaNumero' ], - 9 );
if ( ! $etab [ 'TvaAttribue' ])
echo ' <img src="img/exclamation.png"/ title="Non valid<69> . Obligatoire sur factures, d<> clarations d\'<27> change de biens et de TVA !">' ;
} ?> </td>
</ tr >
< ?
/**
** On recherche un logo
**/
$urlImg = '' ;
$siteWeb = '' ;
$locImg = PATH_LOGOS . $etab [ 'Siren' ];
if ( file_exists ( $locImg . '.gif' )) { $urlImg = '/img/logos/' . $etab [ 'Siren' ] . '.gif' ; $ext = '.gif' ; }
elseif ( file_exists ( $locImg . '.png' )) { $urlImg = '/img/logos/' . $etab [ 'Siren' ] . '.png' ; $ext = '.png' ; }
elseif ( file_exists ( $locImg . '.jpg' )) { $urlImg = '/img/logos/' . $etab [ 'Siren' ] . '.jpg' ; $ext = '.jpg' ; }
elseif ( file_exists ( $locImg . '.jpeg' )) { $urlImg = '/img/logos/' . $etab [ 'Siren' ] . '.jpeg' ; $ext = '.jpeg' ; }
if ( $urlImg == '' && $etab [ 'Isin' ] <> '' ) {
$locImg = PATH_LOGOS . $etab [ 'Isin' ];
if ( file_exists ( $locImg . '.gif' )) { $urlImg = '/img/logos/' . $etab [ 'Isin' ] . '.gif' ; $ext = '.gif' ; }
elseif ( file_exists ( $locImg . '.png' )) { $urlImg = '/img/logos/' . $etab [ 'Isin' ] . '.png' ; $ext = '.png' ; }
elseif ( file_exists ( $locImg . '.jpg' )) { $urlImg = '/img/logos/' . $etab [ 'Isin' ] . '.jpg' ; $ext = '.jpg' ; }
elseif ( file_exists ( $locImg . '.jpeg' )) { $urlImg = '/img/logos/' . $etab [ 'Isin' ] . '.jpeg' ; $ext = '.jpeg' ; }
}
if ( trim ( $etab [ 'Web' ]) <> '' ) {
if ( substr ( $etab [ 'Web' ], 0 , 7 ) <> 'http://' )
$siteWeb = 'http://' . $etab [ 'Web' ];
else
$siteWeb = $etab [ 'Web' ];
if ( $urlImg == '' && ( $_SESSION [ 'tabInfo' ][ 'login' ] == 'ylenaour' ||
$_SESSION [ 'tabInfo' ][ 'login' ] == 'mpurcarin' ||
$_SESSION [ 'tabInfo' ][ 'login' ] == 'mcochet' ||
$_SESSION [ 'tabInfo' ][ 'login' ] == 'aegasse' ||
$_SESSION [ 'tabInfo' ][ 'login' ] == 'jmartory' ) )
$urlImg = getLogo ( $siteWeb , $etab [ 'Siren' ]);
}
if ( $etab [ 'Isin' ] <> '' ) {
$bourse = $etab [ 'Bourse' ];
?>
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Code ISIN </ td >
< td width = " 350 " class = " StyleInfoData " >< a href = " ./?page=bourse&siret=<?= $etab['Siret'] ?> " title = " Voir les informations boursiéres " >< ? = $etab [ 'Isin' ] ?> </a></td>
</ tr >
< ?
if ( $bourse [ 'capitalisation' ] <> 0 ) {
?>
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Capitalisation </ td >
< td width = " 350 " class = " StyleInfoData " >< ? = number_format ( $bourse [ 'capitalisation' ], 0 , '' , ' ' ) ?> € au <?=WDate::dateT('Y-m-d','d/m/Y',$bourse['derCoursDate'])?></td>
</ tr >
< ?
}
}
if ( $urlImg <> '' ) {
$tabTmp =@ getimagesize ( $locImg . $ext );
$w = $tabTmp [ 0 ];
$h = $tabTmp [ 1 ];
if ( $w > 350 ) $strSize =@ redimage ( $locImg . $ext , 350 , 150 );
else $strSize = '' ;
?>
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Logo </ td >
< td width = " 350 " class = " StyleInfoData " >< img src = " <?= $urlImg ?> " < ? = $strSize ?> /></td>
</ tr >
< ? }
if ( $etab [ 'AutreId' ] <> '' ) {
$libTrib = '' ; ?>
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " >< ? if ( substr ( $etab [ 'AutreId' ], 0 , 1 ) == 'W' )
echo 'Identifiant Association WALDEC' ;
elseif ( preg_match ( '/(A|B|C|D)/i' , $etab [ 'AutreId' ])) {
echo 'Numéro R.C.' ;
2009-02-19 17:54:21 +00:00
$libTrib = ' RCS ' . preg_replace ( '/(^TC |^TI |^TGIcc )/i' , '' , $etab [ 'TribunalLib' ]);
2009-02-19 16:28:12 +00:00
}
?> </td>
< td width = " 350 " class = " StyleInfoData " >< ? = $etab [ 'AutreId' ] . $libTrib ?> </td>
</ tr >
< ? } ?>
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Etablissement actif < ?
if ( $etab [ 'Siege' ] == 0 ) echo '<br/><a title="Voir la fiche d\'identit<69> du si<73> ge de l\'entreprise" href="/?page=identite&siret=' . $etab [ 'Siren' ] . '">Accès <20> la fiche du siège</a>' ; ?>
</ td >
< td width = " 350 " class = " StyleInfoData " >< ?
if ( $etab [ 'Actif' ] == 1 )
echo 'Oui' ;
else {
echo '<b>NON</b>' ;
$dateCloture = str_replace ( '-' , '' , $etab [ 'DateClotEn' ]);
if ( $etab [ 'DateClotEn' ] <> '' ) echo " <i> (Fin d'activit<69> enregistr<74> e en " . WDate :: dateT ( 'Ymd' , 'm/Y' , $dateCloture ) . ')</i>' ;
}
if ( $etab [ 'Siren' ] * 1 <> 0 /* && $_SESSION['tabInfo']['login']=='ylenaour'*/ )
echo ' <a title="Voir l\'avis de situation correspondant de l\'INSEE" target="_blank" href="/?page=avis&siret=' . $siret . '">(Situation au répertoire SIRENE)</a>' ;
?> </td>
</ tr >
< ?
if ( $etab [ 'SituationJuridique' ] == 'P' ) {
?>
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Situation juridique </ td >
< td width = " 350 " class = " StyleInfoData " >< ?
if ( $etab [ 'SituationJuridique' ] == 'P' )
echo '<a href="./?page=annonces&siret=' . $etab [ 'Siret' ] . '"><font color="red"><b>En procédure collective</b></font></a>' ;
if ( $_SESSION [ 'tabInfo' ][ 'mode_edition' ] == 1 && ( $_SESSION [ 'tabInfo' ][ 'login' ] == 'ylenaour' ||
$_SESSION [ 'tabInfo' ][ 'login' ] == 'jmartory' || $_SESSION [ 'tabInfo' ][ 'login' ] == 'mheitz' ||
$_SESSION [ 'tabInfo' ][ 'login' ] == 'mcochet' ||
$_SESSION [ 'tabInfo' ][ 'login' ] == 'mpurcarin' || $_SESSION [ 'tabInfo' ][ 'login' ] == 'aegasse' ) )
echo ' <a href="./?page=saisie&siret=' . $etab [ 'Siret' ] . '">(Edition)</a>' ;
// elseif ($etab['SituationJuridique']=='R') echo '<a href="./?page=annonces&siret='.$etab['Siret'].'">Radiée</a>';
// elseif ($etab['SituationJuridique']=='A') echo '<a href="./?page=annonces&siret='.$etab['Siret'].'">Absorbée</a>';
// else echo ' ';
?> </td>
</ tr >
< ? } elseif ( $_SESSION [ 'tabInfo' ][ 'mode_edition' ] == 1 && ( $_SESSION [ 'tabInfo' ][ 'login' ] == 'ylenaour' || $_SESSION [ 'tabInfo' ][ 'login' ] == 'jmartory' || $_SESSION [ 'tabInfo' ][ 'login' ] == 'mheitz' ||
$_SESSION [ 'tabInfo' ][ 'login' ] == 'mpurcarin' || $_SESSION [ 'tabInfo' ][ 'login' ] == 'mcochet' || $_SESSION [ 'tabInfo' ][ 'login' ] == 'aegasse' ) ) { ?>
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Situation juridique </ td >
< td width = " 350 " class = " StyleInfoData " >< a href = " ./?page=saisie&siret=<?= $etab['Siret'] ?> " > N<EFBFBD> ant </ a ></ td >
</ tr >
< ?
}
?>
< tr >
< td colspan = " 3 " >& nbsp ; </ td >
</ tr >
< tr >
< td colspan = " 3 " >< img src = " ./img/srub_id.png " width = " 576 " height = " 27 " ></ td >
</ tr >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Raison Sociale </ td >
< td width = " 350 " class = " StyleInfoData " >< ? = $etab [ 'Nom' ];
if ( $etab [ 'Nom2' ] <> '' ) echo '<br/>' . $etab [ 'Nom2' ]; ?> </td>
</ tr >
< ?
if ( $etab [ 'Enseigne' ] <> '' && $etab [ 'Sigle' ] <> '' ) { $titre = 'Enseigne / Sigle' ; $lib = $etab [ 'Enseigne' ] . ' / ' . $etab [ 'Sigle' ]; }
elseif ( $etab [ 'Enseigne' ] <> '' && $etab [ 'Sigle' ] == '' ) { $titre = 'Enseigne' ; $lib = $etab [ 'Enseigne' ]; }
elseif ( $etab [ 'Enseigne' ] == '' && $etab [ 'Sigle' ] <> '' ) { $titre = 'Sigle' ; $lib = $etab [ 'Sigle' ]; }
else $titre = '' ;
if ( $titre <> '' ) {
?> <tr>
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " >< ? = $titre ?> </td>
< td width = " 350 " class = " StyleInfoData " >< ? = $lib ?> </td>
</ tr >< ? } ?>
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Forme juridique </ td >
< td width = " 350 " class = " StyleInfoData " >< ? = $etab [ 'FJ' ] . ' : ' . strWsToHtml ( $etab [ 'FJ_lib' ]); ?> </td>
</ tr >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Date de cr & eacute ; ation de l ' entreprise </ td >
< td width = " 350 " class = " StyleInfoData " >< ? $dateCreationEn = str_replace ( '-' , '' , $etab [ 'DateCreaEn' ]);
if ( substr ( $dateCreationEn , - 2 ) * 1 == 0 )
echo WDate :: dateT ( 'Ymd' , 'm/Y' , $dateCreationEn );
else
echo WDate :: dateT ( 'Ymd' , 'd/m/Y' , $dateCreationEn ); ?> </td>
</ tr >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Date de cr & eacute ; ation de l ' & eacute ; tablissement </ td >
< td width = " 350 " class = " StyleInfoData " >< ? $dateCreationEt = str_replace ( '-' , '' , $etab [ 'DateCreaEt' ]);
if ( $dateCreationEt * 1 <> 0 ) {
if ( substr ( $dateCreationEt , - 2 ) * 1 == 0 )
echo WDate :: dateT ( 'Ymd' , 'm/Y' , $dateCreationEt );
else
echo WDate :: dateT ( 'Ymd' , 'd/m/Y' , $dateCreationEt );
} else echo 'N/C' ; ?> </td>
</ tr >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Adresse </ td >
< td width = " 350 " class = " StyleInfoData " >< ? = $etab [ 'Adresse' ] ?> <br/>
< ? if ( preg_match ( '/CHEZ SOFRADOM/i' , $etab [ 'Adresse2' ]))
$etab [ 'Adresse2' ] = '<a title="Voir la fiche d\'identit<69> du domiciliataire de cette entreprise" href="/?page=identite&siret=424950459">CHEZ SOFRADOM</a>' ;
if ( $etab [ 'Adresse2' ] <> '' ) echo $etab [ 'Adresse2' ] . '<br/>' ; ?>
< ? $cp = $etab [ 'CP' ] * 1 ;
if ( $cp <> 0 ) echo $etab [ 'CP' ] . ' ' ; ?> <?=strWsToHtml($etab['Ville'])?>
< ? if ( $etab [ 'Pays' ] <> '' && strtoupper ( substr ( $etab [ 'Pays' ], 0 , 3 )) <> 'FRA' ) echo '<br/>' . strWsToHtml ( $etab [ 'Pays' ]); ?>
</ td >
</ tr >
< ? // if (@$etab['GeoInfos']['ZUS']<>'NON' || @$etab['GeoInfos']['ZFU']<>'NON' || @$etab['GeoInfos']['ZRU']<>'NON' || @$etab['GeoInfos']['CUCS']<>'NON') {/* && trim(@$etab['GeoInfos']['NCUCS'])<>'')) {*/
if ( @ $etab [ 'GeoInfos' ][ 'ZUS' ] == 'OUI' || @ $etab [ 'GeoInfos' ][ 'ZFU' ] == 'OUI' || @ $etab [ 'GeoInfos' ][ 'ZRU' ] == 'OUI' || @ $etab [ 'GeoInfos' ][ 'CUCS' ] == 'OUI' ) {
/* [ GeoInfos ] => Array
(
[ ZUS ] => OUI
[ NZUS ] => 1127020
[ ZFU ] => OUI
[ NZFU ] => 11270 ZF
[ CUCS ] => OUI
[ NCUCS ] => 1127020
)
*/
?>
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Zones prioritaires </ td >
< td width = " 350 " class = " StyleInfoData " >< ?
if ( $etab [ 'GeoInfos' ][ 'ZUS' ] == 'OUI' ) echo '<a href="http://sig.ville.gouv.fr/Territoire/' . $etab [ 'GeoInfos' ][ 'NZUS' ] . '" target="_blank">ZUS n<> ' . $etab [ 'GeoInfos' ][ 'NZUS' ] . '</a><br/>' ;
// elseif ($etab['GeoInfos']['ZUS']=='NSP') echo 'Implantation en ZUS à vérifier<br/>';
if ( $etab [ 'GeoInfos' ][ 'ZFU' ] == 'OUI' ) echo '<a href="http://sig.ville.gouv.fr/Territoire/' . $etab [ 'GeoInfos' ][ 'NZFU' ] . '" target="_blank">ZFU n<> ' . $etab [ 'GeoInfos' ][ 'NZFU' ] . '</a><br/>' ;
// elseif ($etab['GeoInfos']['ZFU']=='NSP') echo 'Implantation en ZFU à vérifier<br/>';
if ( $etab [ 'GeoInfos' ][ 'ZRU' ] == 'OUI' ) echo '<a href="http://sig.ville.gouv.fr/Territoire/' . $etab [ 'GeoInfos' ][ 'NZRU' ] . '" target="_blank">ZRU n<> ' . $etab [ 'GeoInfos' ][ 'NZRU' ] . '</a><br/>' ;
// elseif ($etab['GeoInfos']['ZRU']=='NSP') echo 'Implantation en ZRU à vérifier<br/>';
if ( $etab [ 'GeoInfos' ][ 'CUCS' ] == 'OUI' ) echo '<a href="http://sig.ville.gouv.fr/Territoire/' . $etab [ 'GeoInfos' ][ 'NCUCS' ] . '" target="_blank">CUCS n<> ' . $etab [ 'GeoInfos' ][ 'NCUCS' ];
// elseif ($etab['GeoInfos']['CUCS']=='NSP') echo 'Implantation en CUCS à vérifier';
?> </td>
</ tr >
< ? } ?>
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > T & eacute ; l & eacute ; phone </ td >
< td width = " 350 " class = " StyleInfoData " >< ? if ( trim ( $etab [ 'Tel' ]) == '' ) echo 'N/C' ;
else echo $etab [ 'Tel' ];
if ( $etab [ 'Enseigne' ] <> '' ) $libNom = urlencode ( $etab [ 'Enseigne' ]);
else $libNom = urlencode ( $etab [ 'Nom' ]);
$adresse = $etab [ 'Adresse' ];
$i_adr = 0 ;
while ( substr ( $adresse , 0 , 1 ) == '0' ) {
$i_adr ++ ;
$adresse = substr ( $adresse , 1 , strlen ( $adresse ) - 1 );
if ( $i_adr > 4 ) break ;
}
?> <a title="Rechercher le numéro de téléphone dans l'annuaire" target="_blank" href="http://local.search.ke.voila.fr/S/searchproxi?act=&nom=<?=$libNom?>&adr=<?=urlencode(utf8_decode($adresse))?>&loc=<?=urlencode(utf8_decode($etab['CP'].' '.$etab['Ville']))?>&x=0&y=0&bhv=searchproxi&profil=enville&guidelocid=&guideregid=&guidedepid=&actid=&ke=&locid=">(Recherche annuaire)</a></td>
</ tr >
< ? if ( $etab [ 'Fax' ] * 1 > 0 ) { ?>
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Fax </ td >
< td width = " 350 " class = " StyleInfoData " >< ? = $etab [ 'Fax' ] ?> </td>
</ tr >
< ? }
if ( $siteWeb <> '' ) { ?>
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Site Internet </ td >
< td width = " 350 " class = " StyleInfoData " >< a href = " <?= $siteWeb ?> " target = " _blank " >< ? = $siteWeb ?> </a></td>
</ tr >
< ? }
if ( trim ( $etab [ 'Mail' ]) <> '' ) { ?>
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Courriel </ td >
< td width = " 350 " class = " StyleInfoData " >< a href = " mailto:<?= $etab['Mail'] ;?> " target = " _blank " >< ? = $etab [ 'Mail' ] ?> </a></td>
</ tr >
< ? } ?>
< tr >
< td colspan = " 3 " >& nbsp ; </ td >
</ tr >
< tr >
< td colspan = " 3 " >< img src = " ./img/srub_activite.png " width = " 576 " height = " 27 " ></ td >
</ tr >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Activit & eacute ; de l ' entreprise </ td >
< td width = " 350 " class = " StyleInfoData " >< ?
if ( $etab [ 'Activite' ] <> '' && ! preg_match ( '/non pr(e|<7C> )cis(e|<7C> )/i' , utf8_decode ( $etab [ 'Activite' ]))) {
$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 , strWsToHtml ( $etab [ 'Activite' ]));
echo $texte . ' (' . $etab [ 'NafEnt' ] . ' : ' . strWsToHtml ( $etab [ 'NafEntLib' ]) . ')' ;
} else
echo $etab [ 'NafEnt' ] . ' : ' . strWsToHtml ( $etab [ 'NafEntLib' ]);
?> </td>
</ tr >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Activit & eacute ; de l ' & eacute ; tablissement </ td >
< td width = " 350 " class = " StyleInfoData " >< ? = $etab [ 'NafEtab' ] . ' : ' . strWsToHtml ( $etab [ 'NafEtabLib' ]); ?> </td>
</ tr >
< ? php
if ( preg_match ( '/NAF4/i' , $_SESSION [ 'tabInfo' ][ 'pref' ]) && trim ( @ $etab [ 'Naf4Ent' ]) <> '' ) {
?>
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Anciens codes NAF </ td >
< td width = " 350 " class = " StyleInfoData " >< b > Entr . :& nbsp ; & nbsp ; </ b >< ? = $etab [ 'Naf4Ent' ] . ' - ' . strWsToHtml ( $etab [ 'Naf4EntLib' ]); ?> <br/><b>Étab. :</b> <?=$etab['Naf4Etab'].' - '. strWsToHtml($etab['Naf4EtabLib']);?></td>
</ tr >
< ? php
}
$strActivite = '' ;
/* if ( $etab [ 'NatureActivite' ] * 1 > 0 && $etab [ 'NatureActivite' ] * 1 < 99 ) {
$tabNatureActivite = array ( 3 => 'Extraction' ,
4 => 'Fabrication, production' ,
5 => 'Montage, installation' ,
6 => 'R<> paration' ,
7 => 'Transport' ,
8 => 'Import, export' ,
9 => 'Commerce de gros ou interm<72> diaire du commerce' ,
10 => 'Commerce de d<> tail' ,
11 => 'Profession lib<69> rale' ,
12 => 'Services' ,
13 => 'Location de meubl<62> s' ,
14 => 'B<> timents, travaux publics' ,
15 => 'Services aux entreprises' ,
20 => 'Donneur d\'ordre' ,
);
$strActivite .= $tabNatureActivite [ $etab [ 'NatureActivite' ] * 1 ] . ' ' ;
} */
if ( /*trim($strActivite)<>''*/ $etab [ 'NatureActivite' ] == 1 && $etab [ 'Actif' ] == 1 ) {
?>
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Nature de l ' activit<EFBFBD> </ td >
< td width = " 350 " class = " StyleInfoData " > Saisonni & egrave ; re </ td >
</ tr >
< ?
}
if ( ( $etab [ 'OrigineCreation' ] * 1 > 0 && $etab [ 'OrigineCreation' ] * 1 < 9 ) ||
$etab [ 'OrigineCreation' ] == 'A' || $etab [ 'OrigineCreation' ] == 'B' || $etab [ 'OrigineCreation' ] == 'C' ||
$etab [ 'OrigineCreation' ] == 'D' || $etab [ 'OrigineCreation' ] == 'E' ) {
$tabCreation = array ( 'a1' => 'Cr<43> ation' ,
'a3' => 'Achat' ,
'a4' => 'Apport' ,
'a6' => 'Prise en location g<> rance' ,
'a7' => 'Partage' ,
'a8' => 'Reprise' ,
'aA' => 'Reprise globale de l\'exploitation agricole' ,
'aB' => 'Poursuite de l\'exploitation agricole par le conjoint' ,
'aC' => 'Transfert de propri<72> t<EFBFBD> de l\'exploitation agricole' ,
'aD' => 'Apport d\'exploitation(s) agricole(s) individuelle(s)' ,
'aE' => 'Reprise d\'exploitation agricole individuelle' ,
);
?>
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Origine du fonds </ td >
< td width = " 350 " class = " StyleInfoData " >< ? = $tabCreation [ 'a' . $etab [ 'OrigineCreation' ]] ?> </td>
</ tr >
< ?
}
if ( $etab [ 'NbEtab' ] <> 'N/C' ) {
?>
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Nombre d ' & eacute ; tablissements actifs </ td >
< td width = " 350 " class = " StyleInfoData " >< a title = " Voir la liste des établissements " href = " /?page=etablissements&siret=<?= $etab['Siret'] ?> " >< ? = number_format ( $etab [ 'NbEtab' ] * 1 , null , null , ' ' ) ?> </a><?
if ( $etab [ 'NbEtab' ] * 1 > 1 ) { ?> <a title="Voir la liste des établissements" href="/?page=etablissements&siret=<?=$etab['Siret']?>">(Liste)</a><? } ?>
</ td >
</ tr >
< ?
}
if ( $etab [ 'Capital' ] * 1 > 0 ) { ?>
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Capital </ td >
< td width = " 350 " class = " StyleInfoData " >< ? = number_format ( $etab [ 'Capital' ], 0 , ',' , ' ' ) ?> <?
if ( $etab [ 'CapitalDev' ] == 'EUR' ) echo '€' ;
else {
echo $etab [ 'CapitalDev' ] . ' (' . strWsToHtml ( $etab [ 'CapitalLib' ]) . ')' ;
}
?> </td>
</ tr >
< ? } ?>
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Chiffre d ' affaire </ td >
< td width = " 350 " class = " StyleInfoData " >< ? = strWsToHtml ( $etab [ 'TrancheCALib' ]); ?> </td>
</ tr >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Principaux Dirigeants </ td >
< td width = " 350 " class = " StyleInfoData " >< u >< b >< ? = strWsToHtml ( ucfirst ( $etab [ 'dir1Titre' ])) ?> </b>
< ? /*if ($etab['dir1DateFct']) { echo ' au '.WDate::dateT('Y-m-d','d/m/Y',$etab['dir1DateFct']); }*/ ?> :</u><br/>
< ? = strWsToHtml ( $etab [ 'dir1NomPrenom' ]);
if ( $etab [ 'dir2Titre' ] <> '' ) { ?> <br/>
< u >< b >< ? = strWsToHtml ( ucfirst ( $etab [ 'dir2Titre' ])) ?> </b>
< ? /* if ($etab['dir2DateFct']) { echo ' au '.WDate::dateT('Y-m-d','d/m/Y',$etab['dir2DateFct']); }*/ ?> :</u><br/>
< ? = strWsToHtml ( $etab [ 'dir2NomPrenom' ]);
} ?> </td>
</ tr >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Effectif de l ' entreprise </ td >
< td width = " 350 " class = " StyleInfoData " >< ? if ( $etab [ 'Effectif' ] == 0 ) echo 'N/C' ; else echo number_format ( $etab [ 'Effectif' ] * 1 , null , null , ' ' ) . ' salarié(s)' ; ?> </td>
</ tr >
< tr >
< td colspan = " 3 " >& nbsp ; </ td >
</ tr >
< tr >
< td colspan = " 3 " >< img src = " ./img/srub_loc.png " width = " 576 " height = " 27 " ></ td >
</ tr >
< ? php
function normaliseVoie ( $voie ) {
switch ( strtoupper ( $voie )) {
case 'BD' : case 'BVD' : return 'BOULEVARD' ; break ;
case 'AV' : case 'AVE' : return 'AVENUE' ; break ;
case 'PL' : case 'PLA' : return 'PLACE' ; break ;
case 'ESP' : return 'ESPLANADE' ; break ;
//- 8E__ARRONDISSEMENT
default ; return strtoupper ( $voie ); break ;
}
}
$ville = ' ' . trim ( preg_replace ( '/([0-9]|BILLANCOURT|SUR.SEINE| PERRET|ARRONDISSEMENT|_)/i' , ' ' , $etab [ 'Ville' ])) . ' ' ;
$ville = trim ( strtr ( $ville , array ( ' EME ' => '' , ' ER ' => '' )));
if ( preg_match ( '/MAPPY/i' , $_SESSION [ 'tabInfo' ][ 'pref' ]) &&
preg_match ( '/(LILLE|CAEN|RENNES|BAULE|NANTES|NANCY|STRASBOURG|LYON|BORDEAUX|GRENOBLE|MONTPELLIER|TOULOUSE|MARSEILLE|CANNES|NICE|PARIS|NEUILLY|LEVALLOIS|ASNIERES|COURBEVOIE|NANTERRE|REUIL|BOULOGNE|SEVRES|VERSAILLES|MONTROUGE|MOULINEAUX)/' , $ville )) {
?>
< tr >
< td width = " 580 " colspan = " 3 " class = " StyleInfoData " >
< table >< tr >
< td width = " 340 " height = " 420 " >< IFRAME src = " http://www.mappy.com/BtoB/scoresdecisions/photo?photo.town=<?= $ville ?>;photo.way=<?=/*urlencode(*/trim(strtr(normaliseVoie( $etab['AdresseVoie'] ).' '. $etab['AdresseRue'] , array( ' ST '=>' SAINT ',
// '%26%23039%3B'=>"'",
' STE ' => ' SAINTE ' , ))) /*)*/ ?> ;photo.num=<?=$etab['AdresseNum']*1?>;photo.postal_code=<?=$etab['CP']?>" width="340" height="420" scrolling="no" frameborder="0"></IFRAME></td>
<!-- http :// www . mappy . com / BtoB / scoresdecisions / photo ? photo . town = Strasbourg ; photo . way = rue + de + chatenois ; photo . num = 11 ; photo . postal_code = 767100 ; comment1 = mappy ; comment2 = tel :% 20000000000 -->
< td width = " 240 " >< b > Information g & eacute ; ographique :</ b >< br />
< ? if ( $etab [ 'GeoPrecis' ] > 0 ) { ?> Latitude : <?=htmlentities(dec2dms($etab['GeoLat']),null,'ISO-8859-1')?> (<?=$etab['GeoLat']?>)<br/>
Longitude : < ? = htmlentities ( dec2dms ( $etab [ 'GeoLon' ]), null , 'ISO-8859-1' ) ?> (<?=$etab['GeoLon']?>)<br/><? } ?><a href="./?page=referer&part=gmap&siret=<?=$siret?>&url=http://maps.google.com/maps?f=q%26hl=fr%26geocode=%26q=<?=$etab['AdresseNum']?>,+<?=urlencode($etab['AdresseVoie'])?>+<?=urlencode($etab['AdresseRue'])?>,+<?=$etab['CP']?>+<?=urlencode($etab['Ville'])?>" target="_blank">Afficher l'adresse sur Google Map ©</a><br/>
< br />
< b > Code commune / Rivoli :</ b >< br />
< ? = $etab [ 'Dept' ] . ' ' . $etab [ 'codeCommune' ] ?> / <?=$etab['Rivoli']?>
</ td >
</ tr ></ table >
</ td >
</ tr >
< ? php
} else {
?>
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Information g & eacute ; ographique </ td >
< td width = " 350 " class = " StyleInfoData " >< ? if ( $etab [ 'GeoPrecis' ] > 0 ) { ?> Latitude : <?=htmlentities(dec2dms($etab['GeoLat']),null,'ISO-8859-1')?> (<?=$etab['GeoLat']?>)<br/>
Longitude : < ? = htmlentities ( dec2dms ( $etab [ 'GeoLon' ]), null , 'ISO-8859-1' ) ?> (<?=$etab['GeoLon']?>)<br/><? } ?><a href="./?page=referer&part=gmap&siret=<?=$siret?>&url=http://maps.google.com/maps?f=q%26hl=fr%26geocode=%26q=<?=$etab['AdresseNum']?>,+<?=urlencode($etab['AdresseVoie'])?>+<?=urlencode($etab['AdresseRue'])?>,+<?=$etab['CP']?>+<?=urlencode($etab['Ville'])?>" target="_blank">Afficher l'adresse sur Google Map ©</a></td>
</ tr >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Code commune / Rivoli </ td >
< td width = " 350 " class = " StyleInfoData " >< ? = $etab [ 'Dept' ] . ' ' . $etab [ 'codeCommune' ] ?> / <?=$etab['Rivoli']?></td>
</ tr >
< ? php
}
?>
< tr >
< td colspan = " 3 " >& nbsp ; </ td >
</ tr >
< ?
if ( preg_match ( '/NEWS/i' , $_SESSION [ 'tabInfo' ][ 'pref' ])) {
/* Information presse
15 Aug 2007 09 : 21 : 49 GMT - */
2009-02-20 13:04:46 +00:00
require_once ( 'XML/RSS.php' );
2009-02-19 16:28:12 +00:00
$rss =& new XML_RSS ( 'http://news.google.fr/news?hl=fr&ned=fr&ie=ISO-8859-1&q=' . urlencode ( '"' . $etab [ 'Nom' ] . '"' ) . '&output=rss' );
$rss -> parse ();
$tabMonth = array ( 'Jan' => 1 , 'Feb' => 2 , 'Mar' => 3 , 'Apr' => 4 , 'May' => 5 , 'Jun' => 6 , 'Jul' => 7 , 'Aug' => 8 , 'Sep' => 9 , 'Oct' => 10 , 'Nov' => 11 , 'Dec' => 12 );
foreach ( $rss -> getItems () as $i => $item ) {
if ( $i == 0 ) { ?>
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 550 " class = " StyleInfoLib " colspan = " 2 " > Information presse ( Source Google News & copy ;) < br />< ul >
< ? }
$tmp = explode ( ', ' , $item [ 'pubdate' ]);
$tabDate = explode ( ' ' , $tmp [ 1 ]);
//die($tabDate[1]);
$tabTime = explode ( ':' , $tabDate [ 3 ]);
$pubDate = date ( 'd/m/Y <20> H:i' , gmmktime ( $tabTime [ 0 ] - 1 , $tabTime [ 1 ], $tabTime [ 2 ], $tabMonth [ $tabDate [ 1 ]], $tabDate [ 0 ], $tabDate [ 2 ]));
$titre = utf8_decode ( $item [ 'title' ]);
echo '<li><a href="' . $item [ 'link' ] . '" target="_blank">Le ' . $pubDate . " - $titre </a></li> " ;
$i ++ ; if ( $i == 15 ) break ;
}
if ( $i > 0 ) echo '</ul></td></tr>' ;
}
?>
</ table >
< ?
echo '<!--' ; print_r ( $etab ); echo '-->' ;
//echo '<br/><br/>'.distance(48,0,47,0);
function charset2html ( $str ) {
return $str ;
if ( isUTF8 ( $str ))
return '(UTF-8) ' . htmlentities ( $str , ENT_QUOTES , 'UTF-8' );
else
return '(non UTF-8) : ' . htmlentities ( $str );
}
function isUTF8 ( $string )
{
return ( utf8_encode ( utf8_decode ( $string )) == $string );
}
/**
* Convertit la chaine UTF8 en ISO - 8859 - 1 ( si elle est d<EFBFBD> j<EFBFBD> en ISO , ne fait rien ! )
*
* @ param string $sUtf8 chaine UTF - 8 <EFBFBD> convertir en ISO - 8859 - 1
* @ return string
*/
function utf8ToIso ( $sChaineUtf8 ) {
// Chaine retourn<72> e
$sChaineIso = '' ;
// D<> tection de l'encodage de la chaine
$sEncodage = mb_detect_encoding ( $sChaineUtf8 , 'UTF-8, ISO-8859-1' );
// Conversion si chaine n'est pas d<> j<EFBFBD> en ISO-8859-1
if ( $sEncodage != 'ISO-8859-1' ) {
// Encodage
$sChaineIso = mb_convert_encoding ( $sChaineUtf8 , 'ISO-8859-1' , $sEncodage );
return $sChaineIso ;
}
else {
return $sChaineUtf8 ;
}
}
/**
* Convertit la chaine ISO - 8859 - 1 en UTF - 8 ( si elle est d<EFBFBD> j<EFBFBD> en UTF - 8 , ne fait rien ! )
*
* @ param string $sChaineIso chaine au format ISO - 8859 - 1
* @ return string
*/
function isoToUtf8 ( $sChaineIso ) {
// Chaine retourn<72> e
$sChaineUtf8 = '' ;
// D<> tection de l'encodage de la chaine
$sEncodage = mb_detect_encoding ( $sChaineIso , 'UTF-8, ISO-8859-1' );
// Conversion si chaine n'est pas d<> j<EFBFBD> en UTF-8
if ( $sEncodage != 'UTF-8' ) {
// Encodage
$sChaineUtf8 = mb_convert_encoding ( $sChaineIso , 'UTF-8' , $sEncodage );
return $sChaineUtf8 ;
}
else {
return $sChaineIso ;
}
}
if ( ! function_exists ( 'supprDecimales' ) )
{
function supprDecimales ( $dec ) {
if ( $dec > 0 )
return floor ( $dec );
else
return ceil ( $dec );
}
}
if ( ! function_exists ( 'dec2dms' ) )
{
function dec2dms ( $dec ) {
$d = supprDecimales ( $dec );
$m = supprDecimales (( $dec - $d ) * 60 );
$s = abs ( round (((( $dec - $d ) * 60 ) - $m ) * 60 ));
$m = abs ( $m );
return $d . '<27> ' . $m . " ' " . $s . '"' ;
}
}
//echo '<!--'.print_r($etab['SituationJuridique'],true).'-->';
2009-02-17 13:14:53 +00:00
?>