2009-02-17 13:14:53 +00:00
< ? php
if ( ! $_SESSION [ 'connected' ])
2009-08-21 07:19:35 +00:00
{
2009-02-17 13:14:53 +00:00
echo ( 'Vous devez <20> tre connect<63> afin de pouvoir utiliser cette fonctionnalit<69> ' );
2009-06-02 10:42:59 +00:00
//elseif (!preg_match('/ACTES/i', $_SESSION['tabInfo']['droits']))
// echo ('Vous n\'avez pas les droits n<> cessaires pour utiliser cette fonctionnalit<69> (2)');
2009-08-21 07:19:35 +00:00
}
else
2009-11-18 17:00:59 +00:00
{
2009-06-02 10:42:59 +00:00
$idCommande = 0 ; // Par d<> faut, l'identifiant de commande Infogreffe est <20> 0
$con = mysql_pconnect ( MYSQL_HOST , MYSQL_USER , MYSQL_PASS );
if ( ! ( $con === false )) {
if ( mysql_select_db ( MYSQL_DB , $con ) === false )
echo ( '<!--Could not select database: ' . mysql_error () . '-->' );
}
2009-07-02 08:36:04 +00:00
2009-11-18 17:00:59 +00:00
$siret = $_REQUEST [ 'siret' ];
$siren = substr ( $siret , 0 , 9 );
$idan = $_REQUEST [ 'idan' ];
$idEntreprise = $_REQUEST [ 'idEntreprise' ];
$source = $_REQUEST [ 'source' ];
2009-07-02 08:36:04 +00:00
2009-11-18 17:00:59 +00:00
$action = $_REQUEST [ 'action' ];
if ( $action != '' && $action != 'commande' ) die ( 'Param<61> tres incorrects !' );
2009-07-02 08:36:04 +00:00
2009-06-02 10:42:59 +00:00
$vecteurCommande = $_REQUEST [ 'vecteur' ];
2009-11-18 17:00:59 +00:00
if ( $vecteurCommande != '' )
{
if ( $vecteurCommande != 'C' && $vecteurCommande != 'T' ) die ( 'Param<61> tres incorrects !' );
} else {
2009-06-02 10:42:59 +00:00
$vecteurCommande = 'T' ;
2009-11-18 17:00:59 +00:00
}
2009-06-02 10:42:59 +00:00
$message = '' ;
2009-07-02 08:36:04 +00:00
2009-06-02 10:42:59 +00:00
require_once 'common/dates.php' ;
require_once 'common/curl.php' ;
require_once 'infogreffe/infogreffe.php' ;
2009-07-02 08:36:04 +00:00
2009-06-02 10:42:59 +00:00
$login = strtolower ( $_SESSION [ 'tabInfo' ][ 'login' ]);
2009-07-02 08:36:04 +00:00
2009-04-01 12:45:45 +00:00
$tabInfo = $_SESSION [ 'tabInfo' ];
2009-11-18 17:00:59 +00:00
$raisonSociale = $tabInfo [ 'entrep' ][ 'raisonSociale' ];
2009-07-02 08:36:04 +00:00
isset ( $_REQUEST [ 'rs' ]) ? $raisonSociale = $_REQUEST [ 'rs' ] : '' ;
2009-11-18 17:00:59 +00:00
$cj = $tabInfo [ 'entrep' ][ 'fj' ];
$dep = substr ( '' . $tabInfo [ 'entrep' ][ 'codeCommune' ], 0 , 2 );
?>
2009-08-27 07:39:27 +00:00
< div id = " center " >
2009-11-18 17:00:59 +00:00
< ? php
2009-06-02 10:42:59 +00:00
/** Specificit<69> s des associations **/
2009-11-18 17:00:59 +00:00
if ( ( $cj == 9150 || // Association syndicale libre
$cj == 9220 || // Association d<> clar<61> e
$cj == 9221 || // Association d<> clar<61> e "entreprises d'insertion par l'<27> conomique"
$cj == 9222 || // Association interm<72> diaire
$cj == 9223 || // Groupement d'employeurs
$cj == 9230 || // Association d<> clar<61> e reconnue d'utilit<69> publique
$cj == 9240 || // Congr<67> gation
$cj == 9260 || // Association de droit local
$cj == 9300 ) && // Fondation
2009-09-24 16:05:13 +00:00
@ $_REQUEST [ 'force' ] <> true // &force=true force le passage chez infogreffe
)
2009-07-15 13:02:58 +00:00
{
2009-11-18 17:00:59 +00:00
if ( $action == 'commande' )
{
if ( ! empty ( $_REQUEST [ 'email' ]) && mailCommande ( $_REQUEST [ 'email' ], $siren , 'asso' ))
{
2009-07-15 13:02:58 +00:00
$message = 'Commande prise en compte' ;
$fp = fopen ( PATH_LOGS . 'commande_asso.csv' , 'a' );
fwrite ( $fp , date ( 'Y/m/d H:i:s' ) . " ; $siren ; " . $_REQUEST [ 'email' ] . ';' . $tabInfo [ 'login' ] . ';' . $tabInfo [ 'email' ] . ';' . $tabInfo [ 'ip' ] . " \n " );
fclose ( $fp );
} else {
$message = " ERREUR : Veuillez saisir une adresse email valide pour la commande de pi<70> ces " ;
2009-02-17 13:14:53 +00:00
}
2009-07-15 13:02:58 +00:00
}
2009-08-27 07:39:27 +00:00
2009-08-21 07:19:35 +00:00
if ( $message != '' )
{
2009-07-15 13:02:58 +00:00
?>
2009-11-18 17:00:59 +00:00
< table >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 550 " colspan = " 2 " class = " StyleInfoData " >< h3 >< ? = $message ; ?> </h3></td>
</ tr >
</ table >
2009-07-15 13:02:58 +00:00
< ? php
}
?>
2009-11-18 17:00:59 +00:00
< h1 > PI & Egrave ; CES OFFICIELLES </ h1 >
< table >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " 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 " class = " StyleInfoLib " > Raison Sociale </ td >
< td width = " 350 " class = " StyleInfoData " >< ? = $raisonSociale ?> </td>
</ tr >
</ table >
< h2 > Actes & amp ; Statuts </ h2 >
< table >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 550 " colspan = " 2 " class = " StyleInfoData " > Il n ' est pas possible de visualiser les statuts des associations en ligne .</ td >
</ tr >
2009-07-15 13:02:58 +00:00
< ? php
2009-08-27 07:39:27 +00:00
if ( $action != 'commande' && preg_match ( '/ACTES/i' , $_SESSION [ 'tabInfo' ][ 'droits' ]))
{
2009-07-15 13:02:58 +00:00
?>
2009-11-18 17:00:59 +00:00
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 550 " colspan = " 2 " class = " StyleInfoData " >< br />< br />
< form action = " ./?page=greffes&action=commande&siret=<?= $siret ?>&idEntreprise=<?= $idEntreprise ?>&idan=<?= $idan ?>&source=<?= $source ?> " method = " POST " >
< input type = " checkbox " /> Commander les statuts de l ' association ( d & eacute ; lai approximatif de 15 jours ) < br />
< br /> Adresse email du destinataire < input name = " email " type = " text " value = " <? if ( $_SESSION['tabInfo'] ['login']<>'testreunica' && $_SESSION['tabInfo'] ['login']<>'reunicacsf') echo $tabInfo['email'] ?> " size = " 20 " />
& nbsp ; & nbsp ; & nbsp ; < input class = " imgButton " type = " image " src = " ./img/boutton_valider_off.gif " name = " submit " onmouseover = " this.src='./img/boutton_valider_on.gif' " onmouseout = " this.src='./img/boutton_valider_off.gif' " title = " Commander les statuts de l'association... " >
</ form >
</ td >
</ tr >
2009-07-15 13:02:58 +00:00
< ?
2009-09-10 15:31:37 +00:00
} elseif ( ! preg_match ( '/ACTES/i' , $_SESSION [ 'tabInfo' ][ 'droits' ])){
2009-07-15 13:02:58 +00:00
?>
2009-11-18 17:00:59 +00:00
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 550 " colspan = " 2 " class = " StyleInfoData " > Vous n ' avez pas les droits n<EFBFBD> cessaires pour commander des status .</ td >
</ tr >
2009-07-15 13:02:58 +00:00
< ? php
2009-02-17 13:14:53 +00:00
}
2009-07-15 13:02:58 +00:00
?>
2009-11-18 17:00:59 +00:00
</ table >
2009-07-15 13:02:58 +00:00
< ?
2009-11-18 17:00:59 +00:00
}
// Fin Specificit<69> s des associations
2009-10-08 13:20:51 +00:00
/* elseif ( $dep == '00' || $dep == '57' || $dep == '67' || $dep == '68' || $dep == '97' || $dep == '98' || $vue == 'rcs' )
2009-08-21 07:19:35 +00:00
{ // D<> b ALSACE DOM
2009-07-15 13:02:58 +00:00
include ( 'inpi.php' );
2009-10-08 13:20:51 +00:00
} */
2009-11-18 17:00:59 +00:00
// D<> b hors ALSACE DOM
2009-08-21 07:19:35 +00:00
else
2009-11-18 17:00:59 +00:00
{
$firephp -> log ( $action , 'action' );
$firephp -> log ( $vecteurCommande , 'vecteurCommande' );
$firephp -> log ( $_REQUEST [ 'email' ], 'email' );
$vue = $_REQUEST [ 'vue' ];
$option = trim ( '' .@ $_REQUEST [ 'option' ]); /* Si acte ou statuts : type_acte-date-greffe-dossier_millesime-dossier_statut-dossier_chrono-num_depot-num_acte */
$noemail = false ;
if ( $action == 'commande' && ! empty ( $_REQUEST [ 'email' ]))
{
if ( mailCommande ( $_REQUEST [ 'email' ], $siren , 'greffe' ))
{
2009-06-02 10:42:59 +00:00
$message = 'Commande prise en compte' ;
$fp = fopen ( PATH_LOGS . 'commande_greffe.csv' , 'a' );
fwrite ( $fp , date ( 'Y/m/d H:i:s' ) . " ; $siren ; " . $_REQUEST [ 'email' ] . ';' . $tabInfo [ 'login' ] . ';' . $tabInfo [ 'email' ] . ';' . $tabInfo [ 'ip' ] . " \n " );
fclose ( $fp );
2009-11-18 17:00:59 +00:00
$tabCommande = array ( 'emailCommande' => $_REQUEST [ 'email' ] ); //On rentre l'adresse email
2009-07-02 08:36:04 +00:00
mysql_update ( 'commandes' , $tabCommande , " login=' $login ' AND siren=' $siren ' " );
2009-06-02 10:42:59 +00:00
} else {
$message = " ERREUR : Veuillez saisir une adresse email valide pour la commande de pi<70> ces " ;
2009-07-02 08:36:04 +00:00
}
2009-02-17 13:14:53 +00:00
}
2009-07-02 08:36:04 +00:00
2009-06-02 10:42:59 +00:00
/** Si on est en commande de courrier, on g<> n<EFBFBD> re une r<> f unique **/
2009-08-21 07:19:35 +00:00
if ( $vecteurCommande == 'C' )
{
2009-11-18 17:00:59 +00:00
//Test commande - ??? mais si la il n'y a pas de mail
$rep = mysql_select ( 'commandes' , ' idCommande, login, emailCommande, dateCommande' , " siren= $siren AND refDocument=' $option ' " );
if ( count ( $rep ) == 0 )
{
$dejaCommande = false ;
2009-07-02 08:36:04 +00:00
/** Aucune commande ne concerne ce document **/
2009-11-18 17:00:59 +00:00
$tabCommande = array ( 'idUser' => $_SESSION [ 'tabInfo' ][ 'id' ],
2009-07-02 08:36:04 +00:00
// emailCommande
2009-11-18 17:00:59 +00:00
'login' => $login ,
'siren' => $siren ,
'refDocument' => $option ,
'dateCommande' => date ( 'YmdHis' )
);
$idCommande = mysql_insert ( 'commandes' , $tabCommande );
//noemail = true : on sait que l'email n'a pas ete saisie
}
else
{
$dejaCommande = true ;
2009-06-02 10:42:59 +00:00
/** Document en cours de commande **/
if ( $rep [ 0 ][ 'login' ] == $login )
2009-11-18 17:00:59 +00:00
{
$message2 = 'Votre commande a d<> j<EFBFBD> <20> t<EFBFBD> prise en compte le ' . WDate :: dateT ( 'Ymd' , 'd/m/Y' , $rep [ 0 ][ 'dateCommande' ]);
if ( empty ( $rep [ 0 ][ 'emailCommande' ]))
{
$firephp -> info ( 'Email manquant' );
$noemail = true ;
}
}
2009-02-17 13:14:53 +00:00
}
2009-08-21 07:19:35 +00:00
} //Fin commande courrier
2009-11-18 17:00:59 +00:00
2009-06-02 10:42:59 +00:00
$output = @ $_REQUEST [ 'output' ];
$vecteur = 'XL' ;
2009-08-21 07:19:35 +00:00
switch ( $vue )
{
2009-11-18 17:00:59 +00:00
case 'kbis' : $type = 'KB' ; break ;
case 'histo' : $type = 'HQ' ; break ; //"T"/>'.XL
case 'statuts' : $type = 'ST' ; $vecteur = $vecteurCommande ; break ;
case 'actes' : $type = 'AC' ; if ( $option != '' ) $vecteur = $vecteurCommande ; break ;
2009-06-02 10:42:59 +00:00
case 'LE' : $type = 'ListeEtab' ; break ;
case 'PN' : $type = 'PrivNant' ; break ;
case 'BI' : $type = 'BilanImg' ; break ;
//case 'bilans': $type='BS'; break;
2009-11-18 17:00:59 +00:00
case 'bilans' : $type = 'BI' ; if ( $option != '' ) $vecteur = $vecteurCommande ; break ;
2009-06-02 10:42:59 +00:00
case 'FA' : $type = 'PrezProcol' ; break ;
case 'FI' : $type = 'Inventaire' ; break ;
2009-11-18 17:00:59 +00:00
case 'jugements' : $type = 'FJ' ; break ;
2009-06-02 10:42:59 +00:00
case 'FO' : $type = 'Ordonnance' ; break ;
case 'FD' : $type = 'DepotDivers' ; break ;
case 'SD' : $type = 'SurvDemande' ; break ;
case 'SR' : $type = 'SurvRevel' ; break ;
case 'SP' : $type = 'SurvPortef' ; break ;
2009-11-18 17:00:59 +00:00
case 'rcs' : break ;
2009-06-02 10:42:59 +00:00
default : if ( $action != 'commande' ) die ( 'Type de pièce officielle inexistante' ); break ;
2009-02-17 13:14:53 +00:00
}
2009-11-18 17:00:59 +00:00
2009-06-02 10:42:59 +00:00
$req = requeteInfogreffe ( $siren , $idCommande , $type , $vecteur , $option );
$success = true ;
2009-07-02 08:36:04 +00:00
2009-06-02 10:42:59 +00:00
/** Par d<> faut les documents avec des liens vers les actes ne sont pas p<> risables **/
2009-08-21 07:19:35 +00:00
$perisable = false ;
if ( $option == '' )
{
2009-06-02 10:42:59 +00:00
$fichier = " $type - $siren .xml " ;
$perisable = true ; // La liste des documents est p<> risable !
2009-02-17 13:14:53 +00:00
}
2009-06-02 10:42:59 +00:00
else
2009-08-21 07:19:35 +00:00
{
2009-06-02 10:42:59 +00:00
$fichier = " $type - $siren - $option .xml " ;
2009-08-21 07:19:35 +00:00
}
2009-11-18 17:00:59 +00:00
// Pas d<> j<EFBFBD> command<6E> et pas commande
2009-08-21 07:19:35 +00:00
if ( $action != 'commande' && ! $dejaCommande )
{
2009-06-02 10:42:59 +00:00
if ( // Le fichier n'existe pas en cache
! file_exists ( PATH_DATA . '/infogreffe/xml/' . $fichier ) ||
// Le fichier existe en cache mais est p<> risable (liste)
( file_exists ( PATH_DATA . '/infogreffe/xml/' . $fichier ) && $perisable && date ( 'Ymd' , filemtime ( PATH_DATA . '/infogreffe/xml/' . $fichier )) <> date ( 'Ymd' )) ||
// Le fichier existe en cache, n'est pas p<> risable (acte) mais contient un message d'erreur
( file_exists ( PATH_DATA . '/infogreffe/xml/' . $fichier ) && ! $perisable && date ( 'Ymd' , filemtime ( PATH_DATA . '/infogreffe/xml/' . $fichier )) <> date ( 'Ymd' ) && filesize ( PATH_DATA . '/infogreffe/xml/' . $fichier ) <= 200 )
2009-08-21 07:19:35 +00:00
)
{
2009-07-02 08:36:04 +00:00
if ( ! file_exists ( PATH_DATA . '/pdf/acte-' . $siren . '-' . $option . '.pdf' ))
2009-06-02 10:42:59 +00:00
{
2009-11-18 17:00:59 +00:00
$firephp -> info ( 'Execution requete Infogreffe' );
2009-06-02 10:42:59 +00:00
$xml = getInfogreffeXML ( $req );
}
/** Enregistrement du fichier XML en provenance des greffes **/
2009-11-18 17:00:59 +00:00
if ( strlen ( $xml ) != 0 ) {
2009-06-02 10:42:59 +00:00
$fp =@ fopen ( PATH_DATA . '/infogreffe/xml/' . $fichier , 'w' );
@ fwrite ( $fp , $xml );
@ fclose ( $fp );
}
2009-08-21 07:19:35 +00:00
}
else
{
2009-11-18 17:00:59 +00:00
// Lecture du fichier xml en cache
$xml = file_get_contents ( PATH_DATA . '/infogreffe/xml/' . $fichier );
2009-06-02 10:42:59 +00:00
}
2009-08-21 07:19:35 +00:00
}
else
{
2009-11-18 17:00:59 +00:00
$xml = '' ;
2009-08-21 07:19:35 +00:00
}
2009-07-02 08:36:04 +00:00
2009-11-18 17:00:59 +00:00
// Erreur infogreffe
2009-07-15 13:02:58 +00:00
if ( strlen ( $xml ) < 200 )
{
2009-11-18 17:00:59 +00:00
$firephp -> info ( 'Erreur Infogreffe' );
$tmp = explode ( '-' , $xml );
$errNum = $tmp [ 0 ] * 1 ;
$errMsg = $xml ;
2009-08-27 07:39:27 +00:00
2009-11-18 17:00:59 +00:00
if ( $message != '' && ! $dejaCommande )
{
2009-07-15 13:02:58 +00:00
?>
2009-11-18 17:00:59 +00:00
< table >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 550 " colspan = " 2 " class = " StyleInfoData " >< h3 >< ? = $message ; ?> </h3></td>
</ tr >
</ table >
2009-07-15 13:02:58 +00:00
< ? php
}
?>
2009-11-18 17:00:59 +00:00
< h1 class = " titre " > PIECES OFFICIELLES </ h1 >
< table >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " 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 " class = " StyleInfoLib " > Raison Sociale </ td >
< td width = " 350 " class = " StyleInfoData " >< ? = $raisonSociale ?> </td>
</ tr >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td colspan = " 2 " width = " 550 " class = " StyleInfoData " >
< ? php
require_once 'surveillance/surveillance.php' ;
print getSurveillance ( 'greffes' , $siret );
?>
</ td >
</ tr >
</ table >
2009-08-27 07:39:27 +00:00
2009-11-18 17:00:59 +00:00
< h2 > Actes & amp ; Statuts </ h2 >
< table >
2009-07-15 13:02:58 +00:00
< ? php
$tabTmp = explode ( '-' , $option );
$option2 = implode ( '-' , array_splice ( $tabTmp , 0 , - 1 ));
2009-11-18 17:00:59 +00:00
/*
2009-07-15 13:02:58 +00:00
if ( $action != 'commande'
&& ! file_exists ( PATH_DATA . '/pdf/acte-' . $siren . '-' . $option . '.pdf' )
&& ! file_exists ( PATH_DATA . '/pdf/acte-' . $siren . '-' . $option2 . '.pdf' )
&& ( $errNum == 6 || $errNum == 14 || $errNum == 25 || $errNum == 45 || $errNum == 999 ) )
{
include ( 'inpi.php' );
2009-11-18 17:00:59 +00:00
} else
*/
if ( $action != 'commande'
2009-07-15 13:02:58 +00:00
&& ! file_exists ( PATH_DATA . '/pdf/acte-' . $siren . '-' . $option . '.pdf' )
2009-11-18 17:00:59 +00:00
&& ! file_exists ( PATH_DATA . '/pdf/acte-' . $siren . '-' . $option2 . '.pdf' )
)
2009-07-15 13:02:58 +00:00
{
2009-11-18 17:00:59 +00:00
//Message si deja commande ou pas
if ( ! $dejaCommande )
{
2009-07-15 13:02:58 +00:00
?>
2009-11-18 17:00:59 +00:00
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 550 " colspan = " 2 " class = " StyleInfoData " >< font color = " Red " >
< b >
< ? php
if ( $errNum != 17 ) { echo " Erreur N° $errNum - " ; }
?> <?=$tabErrInfoGref[$errNum]?>
<!--< ? = $errMsg ?> -->
</ b ></ font >
</ td >
</ tr >
2009-07-15 13:02:58 +00:00
< ?
2009-11-18 17:00:59 +00:00
}
elseif ( $dejaCommande )
{
2009-07-15 13:02:58 +00:00
?>
2009-11-18 17:00:59 +00:00
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 550 " colspan = " 2 " class = " StyleInfoData " >< font color = " Red " >< b >< ? = $message2 ?> </b></font></td>
</ tr >
< ? php
2009-07-15 13:02:58 +00:00
}
2009-11-18 17:00:59 +00:00
//Affichage formulaire email
if ( ! $dejaCommande && $errNum != 17 && $errNum != 23 && $errNum != 26 && $errNum != 27 )
{
2009-07-15 13:02:58 +00:00
?>
2009-11-18 17:00:59 +00:00
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 550 " colspan = " 2 " class = " StyleInfoData " >
< br />< br />
< form action = " ./?page=greffes&action=commande&siret=<?= $siret ?>&idEntreprise=<?= $idEntreprise ?>&idan=<?= $idan ?>&source=<?= $source ?> " method = " post " >
< input type = " checkbox " /> Recevoir le document directement par mail ( d & eacute ; lai approximatif de 24 heures )
< br />< br /> Adresse email du destinataire < input name = " email " type = " text " value = " <? if ( $_SESSION['tabInfo'] ['login']<>'testreunica' && $_SESSION['tabInfo'] ['login']<>'reunicacsf') echo $tabInfo['email'] ?> " size = " 20 " />
& nbsp ; & nbsp ; & nbsp ; < input class = " imgButton " type = " image " src = " ./img/boutton_valider_off.gif " name = " submit " onmouseover = " this.src='./img/boutton_valider_on.gif' " onmouseout = " this.src='./img/boutton_valider_off.gif' " title = " Commander le document par e-mail... " />
</ form >
</ td >
</ tr >
2009-07-15 13:02:58 +00:00
< ? php
2009-11-18 17:00:59 +00:00
}
elseif ( $errNum == 17 || ( $noemail && $dejaCommande ) )
{
?>
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 550 " colspan = " 2 " class = " StyleInfoData " >
< br />< br />
< form action = " ./?page=greffes&action=commande&siret=<?= $siret ?>&idEntreprise=<?= $idEntreprise ?>&idan=<?= $idan ?>&source=<?= $source ?> " method = " post " >
< input type = " checkbox " /> Merci de pr<EFBFBD> ciser votre mail pour la livraison du document ( d & eacute ; lai approximatif de 24 heures ) < br />< br />
Adresse email du destinataire < input name = " email " type = " text " value = " <? if ( $_SESSION['tabInfo'] ['login']<>'testreunica' && $_SESSION['tabInfo'] ['login']<>'reunicacsf') echo $tabInfo['email'] ?> " size = " 20 " />& nbsp ; & nbsp ; & nbsp ;
< input class = " imgButton " type = " image " src = " ./img/boutton_valider_off.gif " name = " submit " onmouseover = " this.src='./img/boutton_valider_on.gif' " onmouseout = " this.src='./img/boutton_valider_off.gif' " title = " Pr<EFBFBD> cisez votre e-mail... " ></ form ></ td >
</ tr >
2009-07-15 13:02:58 +00:00
< ?
}
2009-08-27 07:39:27 +00:00
?>
2009-11-18 17:00:59 +00:00
</ table >
2009-07-15 13:02:58 +00:00
< ? php
2009-11-18 17:00:59 +00:00
//}elseif ($action=='commande' && ($errNum==999) ){ include('inpi.php');
} elseif (
$type == 'AC' && $option != ''
&& ( file_exists ( PATH_DATA . '/pdf/acte-' . $siren . '-' . $option . '.pdf' ) || file_exists ( PATH_DATA . '/pdf/acte-' . $siren . '-' . $option2 . '.pdf' ) )
)
2009-07-15 13:02:58 +00:00
{
if ( file_exists ( PATH_DATA . '/pdf/acte-' . $siren . '-' . $option2 . '.pdf' )) $option = $option2 ;
/** Le document n'est pas dispo chez Infogreffe **/
?>
2009-11-18 17:00:59 +00:00
< table >
< tr >
< td width = " 580 " colspan = " 3 " >
< table style = " width:530px;margin-top:5px;margin-bottom:5px;margin-left:10px;margin-right:10px " class = " table-classic " >
< tr class = " titre " >
< td class = " titre " style = " width:70px " > Date </ td >
< td align = " center " class = " titre " style = " width:200px " > Type </ td >
< td align = " center " class = " titre " style = " width:260px " > D & eacute ; cisions </ td >
</ tr >
2009-07-15 13:02:58 +00:00
< ? php
//$date=$dom_object->getValueFromTag('date_acte');
$tabOptions = explode ( '-' , $option );
$acte = array ();
2009-08-25 08:43:29 +00:00
if ( ! isset ( $typeActes [ 'a' . $tabOptions [ 0 ]])) {
mail ( 'ylenaour@scores-decisions.com' ,
" Type d'acte inconnu pour $siren " ,
" acte- $siren - $option .pdf " );
} else
$acte [ 'type' ] = $typeActes [ 'a' . $tabOptions [ 0 ]];
2009-07-15 13:02:58 +00:00
$acte [ 'depot_num' ] = $tabOptions [ 6 ];
$dateAff = WDate :: dateT ( 'Ymd' , 'd/m/Y' , $tabOptions [ 1 ]);
?>
2009-11-18 17:00:59 +00:00
< tr class = " ligne " >
< td style = " width:13% " class = " titre " >< ? = $dateAff ?> </td>
< td style = " width:39%;text-align:center " class = " std " >
< ? php
if ( preg_match ( '/ACTES/i' , $_SESSION [ 'tabInfo' ][ 'droits' ]))
{
?>
< u >< a title = " Cliquez ici pour visualiser le document correspondant " target = " _blank " href = " /?page=actes&siret=<?= $siret ?>&ref=<?= $option ?> " >< ? = $acte [ 'type' ] ?> </a></u>
< ? php
} else {
?>
< u >< a title = " Vous n'avez pas les droits n<> cessaires pour visualiser le document correspondant " href = " # " >< ? = $acte [ 'type' ] ?> </a></u>
< ? php
}
?>
</ td >
< td style = " width:48% " class = " last " >< ? = $acte [ 'decisions' ]; if ( trim ( $acte [ 'decisions' ]) <> '' ) echo '<br/>' ; ?> D<EFBFBD> p<EFBFBD> t num<75> ro <?=$acte['depot_num']?></td>
</ tr >
</ table >
</ td >
</ tr >
</ table >
2009-07-15 13:02:58 +00:00
< ? php
2009-02-17 13:14:53 +00:00
// LOG DE LA PAGE
2009-04-02 15:10:11 +00:00
$O2 = $client -> setLog ( 'greffe_' . $vue , $siret , 0 , $option );
2009-07-15 13:02:58 +00:00
}
// Log de la page
$O2 = $client -> setLog ( 'greffe_' . $vue , $siret , 0 , " Erreur $errNum " );
2009-11-18 17:00:59 +00:00
}
//Fin d'affichage des erreurs infogreffe
2009-08-21 07:19:35 +00:00
else
2009-11-18 17:00:59 +00:00
{
// Liste des "actes" Infogreffes ou d<> tail acte infogreffe
2009-07-15 13:02:58 +00:00
//if ($output=='pdf') $type=$type.'-pdf';
if ( $type == 'AC' && $option == '' )
{
// Liste des actes Infogreffe
$return = xmlArrayActes ( PATH_DATA . '/infogreffe/xml/' . $fichier );
$tabActes = $return [ 'Actes' ];
$vecteurTinit = $return [ 'vecteurTinit' ];
$nbVecteurT = $return [ 'nbVecteurT' ];
$nbActes = $return [ 'nbActes' ];
2009-11-18 17:00:59 +00:00
/*
2009-07-15 13:02:58 +00:00
if ( ! $vecteurTinit ) {
$origine = 'G' ;
include ( 'inpi.php' );
}
2009-11-18 17:00:59 +00:00
*/
2009-06-02 10:42:59 +00:00
2009-07-15 13:02:58 +00:00
if ( $vecteurTinit )
2009-11-18 17:00:59 +00:00
{
// Il y a au moins un acte en t<> l<EFBFBD> chargement
2009-07-15 13:02:58 +00:00
?>
2009-11-18 17:00:59 +00:00
< h1 class = " " > PI & Eacute ; CES OFFICIELLES </ h1 >
< table >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " 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 " class = " StyleInfoLib " > Raison Sociale </ td >
< td width = " 350 " class = " StyleInfoData " >< ? = $raisonSociale ?> </td>
</ tr >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td colspan = " 2 " width = " 550 " class = " StyleInfoData " >
< ? php
require_once 'surveillance/surveillance.php' ;
print getSurveillance ( 'greffes' , $siret );
?>
</ td >
</ tr >
</ table >
< h2 > Actes & amp ; Statuts </ h2 >
< table >
< tr >
< td width = " 580 " colspan = " 3 " >
< table style = " width:530px;margin-top:5px;margin-bottom:5px;margin-left:10px;margin-right:10px " class = " table-classic " >
< tr class = " titre " >
< td class = " titre " style = " width:70px " > Date </ td >
< td align = " center " class = " titre " style = " width:200px " > Type </ td >
< td align = " center " class = " titre " style = " width:260px " > D & eacute ; cisions </ td >
</ tr >
2009-07-15 13:02:58 +00:00
< ? php
krsort ( $tabActes );
2009-11-18 17:00:59 +00:00
foreach ( $tabActes as $date => $acte )
{
//Attention si les informations pour generer l'optionUrl ne sont pas suffisante, faire un traitement.
$date = WDate :: dateT ( 'Y-m-d' , 'd/m/Y' , substr ( $date , 0 , 10 ));
$dateRef = WDate :: dateT ( 'd/m/Y' , 'Ymd' , substr ( $date , 0 , 10 ));
$optionUrl = $acte [ 'type_acte' ] . " - $dateRef - " . $acte [ 'num_gest_greffe' ] . '-' . $acte [ 'num_gest_millesime' ] . '-' . $acte [ 'num_gest_statut' ] . '-' . $acte [ 'num_gest_chrono' ] . '-' . $acte [ 'num_depot' ] . '-' . $acte [ 'num_acte' ];
2009-07-15 13:02:58 +00:00
?>
2009-11-18 17:00:59 +00:00
< tr class = " ligne " >
< td style = " width:13% " class = " titre " >< ? = $date ?> </td>
< td style = " width:39%;text-align:center " class = " std " >< ? = $acte [ 'type' ] ?>
< ? php
2009-07-15 13:02:58 +00:00
//Comment des marqueurs petits points
2009-11-18 17:00:59 +00:00
if ( $acte [ 'vecteurT' ])
{
if ( file_exists ( PATH_DATA . '/pdf/acte-' . $siren . '-' . $optionUrl . '.pdf' ) && filesize ( PATH_DATA . '/pdf/acte-' . $siren . '-' . $optionUrl . '.pdf' ) <> 0 )
{
2009-07-15 13:02:58 +00:00
$tag = '. <a' ;
} else {
$tag = '<a' ;
}
$href = './?page=greffes&vue=actes&siret=' . $siret . '&option=' . $optionUrl ;
$title = 'Cliquez ici pour télécharger le document correspondant' ;
2009-09-01 07:18:54 +00:00
$tagContent = '<img src="./img/icone_pdf.gif"/>' ;
2009-11-18 17:00:59 +00:00
2009-07-15 13:02:58 +00:00
if ( preg_match ( '/ACTES/i' , $_SESSION [ 'tabInfo' ][ 'droits' ])){
print $tag . ' href="' . $href . '" title="' . $title . '">' . $tagContent . '</a>' ;
} else {
print $tag . ' href="#" title="Vous n\'avez pas les droits n<> cessaires pour visualiser le document correspondant.">' . $tagContent . '</a>' ;
}
2009-11-18 17:00:59 +00:00
}
elseif ( $acte [ 'vecteurC' ])
{
2009-07-15 13:02:58 +00:00
if ( file_exists ( PATH_DATA . '/pdf/acte-' . $siren . '-' . $optionUrl . '.pdf' ) && filesize ( PATH_DATA . '/pdf/acte-' . $siren . '-' . $optionUrl . '.pdf' ) <> 0 ){
$tag = '. <a' ;
$href = './?page=greffes&vue=actes&siret=' . $siret . '&option=' . $optionUrl ;
$title = 'Cliquez ici pour télécharger le document correspondant' ;
2009-09-01 07:18:54 +00:00
$tagContent = '<img src="./img/icone_pdf.gif"/>' ;
2009-11-18 17:00:59 +00:00
2009-07-15 13:02:58 +00:00
if ( preg_match ( '/ACTES/i' , $_SESSION [ 'tabInfo' ][ 'droits' ])){
print $tag . ' href="' . $href . '" title="' . $title . '">' . $tagContent . '</a>' ;
} else {
print $tag . ' href="#" title="Vous n\'avez pas les droits n<> cessaires pour visualiser le document correspondant.">' . $tagContent . '</a>' ;
}
} else {
$tag = '<a' ;
$href = './?page=greffes&vue=actes&siret=' . $siret . '&option=' . $optionUrl . '&vecteur=C' ;
$title = 'Cliquez ici pour commander le document correspondant' ;
2009-09-01 07:18:54 +00:00
$tagContent = '<img src="./img/icone_courrier.png"/>' ;
2009-11-18 17:00:59 +00:00
2009-07-15 13:02:58 +00:00
if ( preg_match ( '/ACTES/i' , $_SESSION [ 'tabInfo' ][ 'droits' ])){
print $tag . ' href="' . $href . '" title="' . $title . '">' . $tagContent . '</a>' ;
} else {
print $tag . ' href="#" title="Vous n\'avez pas les droits n<> cessaires pour commander le document correspondant.">' . $tagContent . '</a>' ;
}
}
}
?>
2009-11-18 17:00:59 +00:00
</ td >
< td style = " width:48% " class = " last " >< ? = $acte [ 'decisions' ]; if ( trim ( $acte [ 'decisions' ]) <> '' ) echo '<br/>' ; ?> D<EFBFBD> p<EFBFBD> t num<75> ro <?=$acte['depot_num']?> du <?=WDate::dateT('Y-m-d','d/m/Y', $acte['depot_date'])?></td>
</ tr >
< ? php
2009-07-15 13:02:58 +00:00
}
?>
2009-11-18 17:00:59 +00:00
</ table >
</ td >
</ tr >
2009-07-15 13:02:58 +00:00
< ? php
// LOG DE LA PAGE
$O2 = $client -> setLog ( 'greffe_' . $vue , $siret , 0 , $option );
2009-10-08 13:20:51 +00:00
/* if ( $nbVecteurT < $nbActes ) { // Tous les actes ne sont pas dispo en t<> l<EFBFBD> chargement, on propose donc l'acc<63> s INPI
2009-11-18 17:00:59 +00:00
/* $origine = 'G' ;
include ( 'inpi.php' );
2009-07-15 13:02:58 +00:00
?>
2009-11-18 17:00:59 +00:00
< tr >
< td align = " center " class = " StyleInfoData " colspan = " 3 " >< a href = " ./?<?= $_SERVER['QUERY_STRING'] ?>&vue=rcs " > Tous les actes ne sont pas disponibles en t & eacute ; l & eacute ; chargement imm<EFBFBD> diat .< br /> Cliquez - ici pour les commander en t & eacute ; l & eacute ; chargement diff & eacute ; r & eacute ; </ a ></ td >
</ tr >
< ?
2009-10-08 13:20:51 +00:00
} */
2009-07-15 13:02:58 +00:00
?>
2009-11-18 17:00:59 +00:00
</ table >
2009-07-15 13:02:58 +00:00
< ? php
}
2009-08-27 07:39:27 +00:00
//Affichage statut et acte infogreffe
2009-11-18 17:00:59 +00:00
}
elseif ( $type == 'ST' || ( $type == 'AC' && $option != '' ))
{
?>
< h1 class = " " > PI & Eacute ; CES OFFICIELLES </ h1 >
< table >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " 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 " class = " StyleInfoLib " > Raison Sociale </ td >
< td width = " 350 " class = " StyleInfoData " >< ? = $raisonSociale ?> </td>
</ tr >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td colspan = " 2 " width = " 550 " class = " StyleInfoData " >
< ? php
require_once 'surveillance/surveillance.php' ;
print getSurveillance ( 'greffes' , $siret );
?>
</ td >
</ tr >
</ table >
< h2 > Actes & amp ; Statuts </ h2 >
< table >
< tr >
< td width = " 580 " colspan = " 3 " >
< table style = " width:530px;margin-top:5px;margin-bottom:5px;margin-left:10px;margin-right:10px " class = " table-classic " >
< tr class = " titre " >
< td class = " titre " style = " width:70px " > Date </ td >
< td align = " center " class = " titre " style = " width:200px " > Type </ td >
< td align = " center " class = " titre " style = " width:260px " > D & eacute ; cisions </ td >
</ tr >
< ? php
$dom_object = new DomDocument2 ();
$dom_object -> load ( PATH_DATA . '/infogreffe/xml/' . $fichier );
2009-07-15 13:02:58 +00:00
2009-11-18 17:00:59 +00:00
$acte [ 'type' ] = $dom_object -> getValueFromTag ( 'type_acte_libelle' );
$date = $dom_object -> getValueFromTag ( 'date_acte' );
2009-07-15 13:02:58 +00:00
2009-11-18 17:00:59 +00:00
$acte [ 'depot_num' ] = $dom_object -> getValueFromTag ( 'num_depot' );
$acte [ 'depot_date' ] = $dom_object -> getValueFromTag ( 'date_depot' );
$dateAff = WDate :: dateT ( 'Y-m-d' , 'd/m/Y' , substr ( $date , 0 , 10 ));
2009-07-15 13:02:58 +00:00
2009-11-18 17:00:59 +00:00
$acte [ 'url_acces' ] = $dom_object -> getValueFromTag ( 'url_acces' );
if ( substr ( $acte [ 'url_acces' ], 0 , 5 ) == 'null/' ) $acte [ 'url_acces' ] = 'http://webservices.infogreffe.fr/' . substr ( $acte [ 'url_acces' ], 5 , strlen ( $acte [ 'url_acces' ]) - 5 );
2009-07-15 13:02:58 +00:00
2009-11-18 17:00:59 +00:00
$nbPages = $dom_object -> getValueFromTag ( 'nbpages_acte' ) * 1 ;
if ( $nbPages > 0 ) $acte [ 'decisions' ] = " $nbPages pages " ;
?>
< tr class = " ligne " >
< td style = " width:13% " class = " titre " >< ? = $dateAff ?> </td>
< td style = " width:39%;text-align:center " class = " std " >
< ? php /** Gestion des droits pour l'affichage des liens **/ ?>
< u >< a title = " Cliquez ici pour visualiser le document correspondant " target = " _blank " href = " /?page=actes&siret=<?= $siret ?>&ref=<?= $option ?> " >< ? = $acte [ 'type' ] ?> </a></u>
</ td >
< td style = " width:48% " class = " last " >
< ? = $acte [ 'decisions' ]; if ( trim ( $acte [ 'decisions' ]) <> '' ) echo '<br/>' ; ?> D<EFBFBD> p<EFBFBD> t num<75> ro <?=$acte['depot_num']?> du <?=WDate::dateT('Y-m-d','d/m/Y', $acte['depot_date'])?>
</ td >
</ tr >
</ table >
</ td >
</ tr >
</ table >
2009-07-15 13:02:58 +00:00
< ? php
/* Si l'acte n'a pas encore <20> t<EFBFBD> t<> l<EFBFBD> charg<72> , on le t<> l<EFBFBD> charge */
if ( ! file_exists ( PATH_DATA . '/pdf/acte-' . $siren . '-' . $option . '.pdf' )
|| filesize ( PATH_DATA . '/pdf/acte-' . $siren . '-' . $option . '.pdf' ) == 0 )
{
$page = getUrl ( $acte [ 'url_acces' ], '' , '' , '' , false , '' , '' , 0 , 1 );
if ( substr ( $page [ 'body' ], 0 , 4 ) != '%PDF' ) {
$page2 = parse_response ( $page [ 'body' ]);
$body = $page2 [ 'body' ];
2009-07-02 08:36:04 +00:00
} else
2009-07-15 13:02:58 +00:00
$body = $page [ 'body' ];
$fp =@ fopen ( PATH_DATA . '/pdf/' . 'acte-' . $siren . '-' . $option . '.pdf' , 'w' );
2009-06-02 10:42:59 +00:00
@ fwrite ( $fp , $body );
@ fclose ( $fp );
2009-07-02 08:36:04 +00:00
}
2009-07-15 13:02:58 +00:00
// LOG DE LA PAGE
$O2 = $client -> setLog ( 'greffe_' . $vue , $siret , 0 , $option );
//Affichage de la liste des bilans image ou saisit
2009-08-21 07:19:35 +00:00
}
elseif ( $type == 'BS' || $type == 'BI' )
{
2009-07-15 13:02:58 +00:00
?>
2009-11-18 17:00:59 +00:00
< h1 class = " " > PI & Eacute ; CES OFFICIELLES </ h1 >
< table >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " 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 " class = " StyleInfoLib " > Raison Sociale </ td >
< td width = " 350 " class = " StyleInfoData " >< ? = $raisonSociale ?> </td>
</ tr >
< tr >
</ table >
< h2 > Comptes annuels </ h2 >
< table >
< tr >
< td width = " 580 " colspan = " 3 " >
< table style = " width:530px;margin-top:5px;margin-bottom:5px;margin-left:10px;margin-right:10px " class = " table-classic " >< tr class = " titre " >< td class = " titre " style = " width:70px " > Date de cl & ocirc ; ture </ td >< td align = " center " class = " titre " style = " width:200px " > Type </ td >< td align = " center " class = " titre " style = " width:260px " > D & eacute ; cisions </ td ></ tr >
< ? php
if ( $type == 'BS' ) $query = " //listeBilanSaisi/bilanSaisi/. " ;
elseif ( $type == 'BI' ) $query = " //bilan_complet/. " ;
$return = xmlArrayBilans ( PATH_DATA . '/infogreffe/xml/' . $fichier , $query );
$tabActes = $return [ 'Actes' ];
2009-08-27 07:39:27 +00:00
2009-11-18 17:00:59 +00:00
foreach ( $tabActes as $typeMillesime => $bilan )
{
if ( $type == 'BS' ) $dateClot = WDate :: dateT ( 'Y-m-d' , 'd/m/Y' , $bilan [ 'date_cloture' ]);
elseif ( $type == 'BI' ) $dateClot = $bilan [ 'date_cloture' ];
$dateRef = WDate :: dateT ( 'd/m/Y' , 'Ymd' , $dateClot );
$optionUrl = $bilan [ 'millesime' ] . '_' . $bilan [ 'type_comptes' ] . '-' . $dateRef . '-' . $bilan [ 'num_gest_greffe' ] . '-' . $bilan [ 'num_gest_millesime' ] . '-' . $bilan [ 'num_gest_statut' ] . '-' . $bilan [ 'num_gest_chrono' ] . '-' . $bilan [ 'num_depot' ];
?>
< tr class = " ligne " >
< td style = " width:13% " class = " titre " >< ? = $dateClot ?> </td>
< td style = " width:39%;text-align:center " class = " std " >
2009-07-15 13:02:58 +00:00
< ? php
2009-11-18 17:00:59 +00:00
if ( $option != '' )
{
/* Si l'acte n'a pas encore <20> t<EFBFBD> t<> l<EFBFBD> charg<72> , on le t<> l<EFBFBD> charge */
if ( ! file_exists ( PATH_DATA . '/pdf/bilan-' . $siren . '-' . $option . '.pdf' )
|| filesize ( PATH_DATA . '/pdf/bilan-' . $siren . '-' . $option . '.pdf' ) == 0 )
{
$page = getUrl ( $bilan [ 'url_acces' ], '' , '' , '' , false , '' , '' , 0 , 1 );
//die($bilan['url_acces'].'<br/><br/>'.print_r($page));
if ( substr ( $page [ 'body' ], 0 , 4 ) <> '%PDF' ) {
$page2 = parse_response ( $page [ 'body' ]);
$body = $page2 [ 'body' ];
} else
$body = $page [ 'body' ];
$fp = @ fopen ( PATH_DATA . '/pdf/' . 'bilan-' . $siren . '-' . $option . '.pdf' , 'w' );
@ fwrite ( $fp , $body );
@ fclose ( $fp );
}
?>
< ? php /** Gestion des droits pour l'affichage des liens **/ ?>
< u >< a title = " Cliquez ici pour visualiser la copie intégrale des comptes " target = " _blank " href = " /?page=actes&siret=<?= $siret ?>&ref=bilan-<?= $option ?> " > Comptes < ? = $bilan [ 'type_comptes' ] ?> millésime <?=$bilan['millesime']; if ($type=='BS') echo '<br/>(liasse '.$bilan['liasse'].')';?></a></u>
< ? php
}
else
{
/** Liste des comptes d<> pos<6F> s **/
2009-07-15 13:02:58 +00:00
?>
2009-11-18 17:00:59 +00:00
Comptes < ? = $bilan [ 'type_comptes' ] ?> millésime <?=$bilan['millesime'];
if ( $type == 'BS' ) echo '<br/>(liasse ' . $bilan [ 'liasse' ] . ')' ; ?>
< ? php
if ( $bilan [ 'vecteurT' ])
{
$tag = '<a' ;
$href = './?page=greffes&vue=bilans&siret=' . $siret . '&option=' . $optionUrl ;
$title = 'Cliquez ici pour télécharger la copie intégrale des comptes' ;
$tagContent = '' ;
if ( file_exists ( PATH_DATA . '/pdf/bilan-' . $siren . '-' . $optionUrl . '.pdf' ) && filesize ( PATH_DATA . '/pdf/bilan-' . $siren . '-' . $optionUrl . '.pdf' ) != 0 )
$tagContent = ' .' ;
$tagContent .= '<img src="./img/icone_pdf.gif"/>' ;
if ( preg_match ( '/ACTES/i' , $_SESSION [ 'tabInfo' ][ 'droits' ])){
print $tag . ' href="' . $href . '" title="' . $title . '">' . $tagContent . '</a>' ;
} else {
print $tag . ' href="#" title="Vous n\'avez pas les droits n<> cessaires pour visualiser le document correspondant.">' . $tagContent . '</a>' ;
}
}
elseif ( $bilan [ 'vecteurC' ])
{
if ( file_exists ( PATH_DATA . '/pdf/bilan-' . $siren . '-' . $optionUrl . '.pdf' ) && filesize ( PATH_DATA . '/pdf/bilan-' . $siren . '-' . $optionUrl . '.pdf' ) != 0 ){
$tag = '<a' ;
$href = './?page=greffes&vue=bilans&siret=' . $siret . '&option=' . $optionUrl ;
$title = 'Cliquez ici pour télécharger la copie intégrale des comptes' ;
$tagContent = ' .<img src="./img/icone_pdf.gif"/>' ;
if ( preg_match ( '/ACTES/i' , $_SESSION [ 'tabInfo' ][ 'droits' ])){
print $tag . ' href="' . $href . '" title="' . $title . '">' . $tagContent . '</a>' ;
} else {
print $tag . ' href="#" title="Vous n\'avez pas les droits n<> cessaires pour visualiser le document correspondant.">' . $tagContent . '</a>' ;
2009-07-15 13:02:58 +00:00
}
2009-11-18 17:00:59 +00:00
} else {
$tag = '<a' ;
$href = './?page=greffes&vue=bilans&siret=' . $siret . '&option=' . $optionUrl . '&vecteur=C' ;
$title = 'Cliquez ici pour commander la copie intégrale des comptes' ;
$tagContent = '<img src="./img/icone_courrier.png"/>' ;
if ( preg_match ( '/ACTES/i' , $_SESSION [ 'tabInfo' ][ 'droits' ])){
print $tag . ' href="' . $href . '" title="' . $title . '">' . $tagContent . '</a>' ;
} else {
print $tag . ' href="#" title="Vous n\'avez pas les droits n<> cessaires pour commander le document correspondant.">' . $tagContent . '</a>' ;
2009-07-15 13:02:58 +00:00
}
}
}
2009-11-18 17:00:59 +00:00
}
?>
</ td >
< td style = " width:48% " class = " last " > D & eacute ; p & ocirc ; t num & eacute ; ro < ? = $bilan [ 'num_depot' ] ?> .</td></tr>
< ? php
} // Fin parcours liste bilan
?>
</ table >
</ td >
</ tr >
</ table >
2009-07-15 13:02:58 +00:00
< ? php
2009-02-17 13:14:53 +00:00
// LOG DE LA PAGE
2009-04-02 15:10:11 +00:00
$O2 = $client -> setLog ( 'greffe_' . $vue , $siret , 0 , $option );
2009-07-02 08:36:04 +00:00
2009-08-21 07:19:35 +00:00
}
elseif ( file_exists ( PATH_DATA . '/infogreffe/xsl/' . $type . '.xsl' ))
{
2009-07-15 13:02:58 +00:00
exec ( '/usr/bin/xsltproc ' . PATH_DATA . '/infogreffe/xsl/' . $type . '.xsl ' . PATH_DATA . '/infogreffe/xml/' . $fichier , $output );
$output = implode ( '' , $output );
$output = str_replace ( '<html xmlns:fo="http://www.w3.org/1999/XSL/Format"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><link rel="stylesheet" type="text/css" href="./css/infogreffe_base.css"><link rel="stylesheet" type="text/css" href="./css/infogreffe.css"><title>Extrait RCS</title><script type="text/javascript" src="./js/infogreffe/tools.js"></script></head><body class="simple" onload="adapterDimensions(\'conteneur\');">' , '' , $output );
$output = str_replace ( '</body></html><script>function PrivoxyWindowOpen(a, b, c){return(window.open(a, b, c));}</script>' , '' , $output );
$output = 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 , $output );
echo $output ;
// LOG DE LA PAGE
$O2 = $client -> setLog ( 'greffe_' . $vue , $siret , 0 , $option );
} else {
echo " <pre> $xml </pre> " ;
// LOG DE LA PAGE
$O2 = $client -> setLog ( 'greffe_' . $vue , $siret , 0 , $option );
}
2009-11-18 17:00:59 +00:00
} //Fin liste des actes infogreffe ou d<> tails
} //Fin hors Alsace DOM
} //Fin test droit et connexion
2009-09-01 07:18:54 +00:00
?>
</ div >