2009-07-20 16:17:33 +00:00
< ?
2009-02-17 13:14:53 +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-03-11 07:51:18 +00:00
$idEntreprise = trim ( preg_replace ( '/[^0-9]/' , '' , $_REQUEST [ 'idEntreprise' ])) * 1 ; // Si id=0 alors non communiqu<71>
2009-03-13 18:15:05 +00:00
$id = trim ( preg_replace ( '/[^0-9]/' , '' , $_REQUEST [ 'id' ])) * 1 ;
2009-03-13 19:09:34 +00:00
if (( $siret * 1 ) == 0 && $id == 0 ) die ( 'Param<61> tres incorrects !' );
2009-02-17 13:14:53 +00:00
$siren = substr ( $siret , 0 , 9 );
$mil = false ;
if ( ! $_SESSION [ 'connected' ])
echo ( 'Vous devez <20> tre connect<63> afin de pouvoir utiliser cette fonctionnalit<69> ' );
elseif ( ! preg_match ( '/MARQUES/i' , $_SESSION [ 'tabInfo' ][ 'droits' ]))
echo ( 'Vous n\'avez pas les droits n<> cessaires pour utiliser cette fonctionnalit<69> (2)' );
else {
2009-07-20 16:17:33 +00:00
2009-08-27 07:28:00 +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 'common/dates.php' ;
2009-04-01 12:45:45 +00:00
$tabInfo = $_SESSION [ 'tabInfo' ];
2009-07-20 16:17:33 +00:00
2009-08-27 07:28:00 +00:00
//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-09-10 15:31:37 +00:00
if ( isset ( $id )) $fileName = $fileName . '-' . $id ;
2009-08-27 07:28:00 +00:00
cache_filename ( $fileName );
if ( cache_exist () && ! ( preg_match ( '/saisie/i' , $_SESSION [ 'tabInfo' ][ 'droits' ]) || $_SESSION [ 'tabInfo' ][ 'mode_edition' ] == 1 ) ){
$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
$raisonSociale = $_SESSION [ 'tabInfo' ][ 'entrep' ][ 'raisonSociale' ];
?>
< script type = " text/javascript " >
$ ( document ) . ready ( function (){
$ ( 'a[idobjet]' ) . each ( function ()
{
$ ( this ) . click ( function ()
{
idObject = $ ( this ) . attr ( 'idobjet' );
$ ( '#document' + idObject ) . html ( 'Construction du document en cours...' );
$ . ajax ({
type : " POST " ,
url : " / " ,
data : " page=getmarques&idObject= " + idObject ,
success : function ( msg ){ $ ( '#document' + idObject ) . html ( msg )},
error : function (){ $ ( '#document' + idObject ) . html ( 'Erreur' );}
});
});
2009-08-06 14:26:31 +00:00
});
2009-08-27 07:28:00 +00:00
});
</ script >
< 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
2009-08-27 07:28:00 +00:00
< h2 > Marque ( s ) d<EFBFBD> pos<EFBFBD> e ( s ) </ h2 >
< 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 " >
D & eacute ; p & ocirc ; t n & deg ; < ? = $marque [ 'Depot' ] ?> du <?=WDate::dateT('Y-m-d','d/m/Y',$marque['Date'])?> <a idobjet="<?=$marque['Depot']?>" href="#" title="Voir le d<> tail de l'inscription au BOPI"><img src="./img/exporticones/pdf.png" alt="PDF"></a>
< 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 >
< 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 >
</ 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 >
< ?
2009-08-27 07:28:00 +00:00
}
2009-12-04 17:17:09 +00:00
?>
</ div >