2009-07-20 16:17:33 +00:00
< ?
2010-04-27 08:09:23 +00:00
if ( ! page_checkParams ()) die ( 'Paramètres incorrects !' );
2009-02-17 13:14:53 +00:00
2010-04-09 14:55:22 +00:00
$id = ( isset ( $_GET [ 'id' ]) == true ) ?
trim ( preg_replace ( '/[^0-9]/' , '' , $_GET [ 'id' ])) * 1 : 0 ;
2010-04-27 07:20:30 +00:00
2009-02-17 13:14:53 +00:00
$mil = false ;
2010-04-26 14:46:13 +00:00
require_once 'cache/cache.php' ;
require_once 'partenaires/classMTva.php' ;
require_once 'partenaires/classMMap.php' ;
require_once 'common/dates.php' ;
2009-07-20 16:17:33 +00:00
2010-04-26 14:46:13 +00:00
$tabInfo = $_SESSION [ 'tabInfo' ];
2009-07-20 16:17:33 +00:00
2010-02-10 17:27:03 +00:00
//Générer un nom de fichier pour le cache et l'export des fichiers
2009-08-27 07:28:00 +00:00
if (( $siret * 1 ) == 0 || ( $siren * 1 ) < 100 ){ $fileName = $page2 . '-' . $idEntreprise ;
} else { $fileName = $page2 . '-' . $siret ; }
2010-04-09 14:55:22 +00:00
if ( $id > 0 ) $fileName = $fileName . '-' . $id ;
2009-08-27 07:28:00 +00:00
cache_filename ( $fileName );
2010-05-03 13:48:25 +00:00
if ( cache_exist () && ! hasModeEdition () ){
2009-08-27 07:28:00 +00:00
$marques = cache_get ( 'marques' );
2009-08-27 09:00:07 +00:00
$firephp -> log ( $marques , 'marques' );
2009-08-27 07:28:00 +00:00
} else {
2009-03-13 19:09:34 +00:00
try {
$O = $client -> getMarques ( $siren , $id );
2009-08-27 08:03:48 +00:00
$marques = $O [ 'result' ];
$firephp -> log ( $marques , 'marques' );
2009-08-27 07:28:00 +00:00
cache_delete ();
2009-08-27 09:00:07 +00:00
cache_add ( 'marques' , $marques );
2009-03-13 19:09:34 +00:00
} catch ( SoapFault $fault ) {
2009-07-21 07:17:54 +00:00
require_once 'soaperror.php' ;
2009-03-13 19:09:34 +00:00
processSoapFault ( $client , $fault , $tabInfo );
die ();
}
2009-08-27 07:28:00 +00:00
}
2009-07-20 16:17:33 +00:00
2009-08-27 07:28:00 +00:00
?>
< div id = " center " >
< h1 class = " titre " > PROPRI & Eacute ; T & Eacute ; INTELLECTUELLE </ h1 >
< table >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Num & eacute ; ro identifiant Siren </ td >
< td width = " 350 " colspan = " 2 " 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 " class = " StyleInfoLib " > Raison Sociale </ td >
< td width = " 350 " colspan = " 2 " class = " StyleInfoData " >< ? = $raisonSociale ?> </td>
</ tr >
< tr >< td colspan = " 4 " >& nbsp ; </ td ></ tr >
</ table >
2009-08-06 14:26:31 +00:00
2010-02-10 17:27:03 +00:00
< h2 > Marque ( s ) déposée ( s ) </ h2 >
2009-08-27 07:28:00 +00:00
< table >
< ? php
2009-02-17 13:14:53 +00:00
foreach ( $marques as $i => $marque ) {
2009-08-06 14:26:31 +00:00
$aff = $marque [ 'Marques' ];
2009-03-13 18:15:05 +00:00
if ( $marque [ 'IdLien' ] * 1 <> 0 && $id == 0 )
2009-02-17 13:14:53 +00:00
$aff = '<a href="./?page=marques&siret=' . $siret . '&id=' . $marque [ 'IdLien' ] . '">' . $aff . '</a>' ;
2009-08-27 07:28:00 +00:00
?>
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 230 " class = " StyleInfoData " >
2010-04-09 14:55:22 +00:00
D & eacute ; p & ocirc ; t n & deg ; < ? = $marque [ 'Depot' ] ?> du
< ? php
$date = new WDate ;
print $date -> dateT ( 'Y-m-d' , 'd/m/Y' , $marque [ 'Date' ]);
?>
& nbsp ; & nbsp ; < a idobjet = " <?= $marque['Depot'] ?> " href = " # " title = " Voir le détail de l'inscription au BOPI " >< img src = " ./img/exporticones/pdf.png " alt = " PDF " ></ a >
2009-08-27 07:28:00 +00:00
< div id = " document<?= $marque['Depot'] ?> " ></ div >
</ td >
< td width = " 340 " class = " StyleInfoLib " >< ? = $aff ?> </td>
</ tr >
2009-08-06 14:26:31 +00:00
< ? php
2009-03-13 19:09:34 +00:00
if ( $id <> 0 ) {
?>
2009-08-27 07:28:00 +00:00
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 550 " colspan = " 3 " class = " StyleInfoLib " align = " center " >< img src = " <?= $marque['UrlLien'] ?> " />& nbsp ; </ td >
</ tr >
2009-03-13 19:09:34 +00:00
< ?
}
2009-02-17 13:14:53 +00:00
}
2009-07-20 16:17:33 +00:00
2009-02-17 13:14:53 +00:00
if ( count ( $marques ) == 0 ){
2009-03-13 19:09:34 +00:00
?>
2009-08-27 07:28:00 +00:00
< tr >
< td width = " 30 " >& nbsp ; </ td >
2010-04-12 14:49:55 +00:00
< td width = " 550 " colspan = " 3 " class = " StyleInfoLib " > Aucune marque n ' a & eacute ; t & eacute ; d & eacute ; pos & eacute ; e par cette entreprise depuis 1982. </ td >
2009-08-27 07:28:00 +00:00
</ tr >
2009-02-17 13:14:53 +00:00
< ?
2009-03-13 19:09:34 +00:00
}
2009-08-27 07:28:00 +00:00
?>
2009-02-17 13:14:53 +00:00
</ table >
2010-05-24 14:50:08 +00:00
2010-04-12 14:49:55 +00:00
< ? php
2010-05-24 14:50:08 +00:00
// --------------------------------------------------------------------------- //
// Export
// --------------------------------------------------------------------------- //
2010-05-25 13:46:59 +00:00
if ( $id == 0 && count ( $marques ) > 0 ) {
2010-05-24 14:50:08 +00:00
require_once 'export.php' ;
if ( isset ( $siret ) == true ) {
$fileName = $page . '-' . $siret ;
} else {
$fileName = $page . '-' . $idEntreprise ;
}
for ( $i = 0 ; $i < count ( $marques ); ++ $i ) {
unset ( $marques [ $i ][ 'IdLien' ]);
}
$parseTab = new tabExport ;
$parseTab -> tab = array ( $marques );
$array2csv = new ExportCSV ;
$array2csv -> records = $parseTab -> convertTable ();
$array2csv -> writeCSV ( $fileName );
$array2xml = new ExportXML ;
$array2xml -> rootName = $page ;
$array2xml -> defaultTagName = substr ( $page , 0 , - 1 );
$array2xml -> records = $marques ;
$array2xml -> writeXML ( $fileName );
}
2010-04-12 14:49:55 +00:00
require_once 'cgu/cgu.php' ;
2010-05-24 14:50:08 +00:00
print '<p class="confidentiel blockh2">' . afficheCgu ();
2010-04-12 14:49:55 +00:00
?>
</ p >
2010-04-09 14:55:22 +00:00
</ div >