Merge corrections diverses + surveillances actes et dirigeants

This commit is contained in:
Michael RICOIS 2009-09-18 17:09:22 +00:00
parent fb17fe4f3b
commit 077278e1e3
11 changed files with 158 additions and 127 deletions

View File

@ -34,6 +34,7 @@ function cache_filename(){
static $filename; static $filename;
$numargs = func_num_args(); $numargs = func_num_args();
if($numargs != 0){ if($numargs != 0){
unset($filename);
$args = func_get_args(); $args = func_get_args();
$filename = PATH_SITE.'/cache/'.$args[0].CACHE_EXT; $filename = PATH_SITE.'/cache/'.$args[0].CACHE_EXT;
} }
@ -49,12 +50,10 @@ function cache_filename(){
* @return boolean * @return boolean
*/ */
function cache_add($block, $array){ function cache_add($block, $array){
global $firephp;
//Traitement //Traitement
$array = cache_htmlencode($array); $array = cache_htmlencode($array);
//Ajout des blocs sérialisés //Ajout des blocs sérialisés
$file = cache_filename(); $file = cache_filename();
$firephp->log($file, 'CACHE ADD : Fichier');
if($file != ''){ if($file != ''){
$data = $block.' = '.serialize($array); $data = $block.' = '.serialize($array);
if( cache_writefile($file,$data) !== FALSE ) return TRUE; if( cache_writefile($file,$data) !== FALSE ) return TRUE;
@ -69,9 +68,8 @@ function cache_add($block, $array){
function cache_get($block){ function cache_get($block){
global $firephp; global $firephp;
$file = cache_filename(); $file = cache_filename();
$firephp->log($file, 'CACHE GET : Fichier ');
$cache = cache_readfile($file); $cache = cache_readfile($file);
$firephp->log($cache, 'CACHE GET : Content'); $firephp->log($cache, 'CACHE : Fichier');
if(isset($cache[$block])){ if(isset($cache[$block])){
//Traitement //Traitement
$block = unserialize($cache[$block]); $block = unserialize($cache[$block]);
@ -110,17 +108,10 @@ function cache_exist(){
* Retourne TRUE or FALSE * Retourne TRUE or FALSE
*/ */
function cache_timeover($file){ function cache_timeover($file){
global $firephp;
$dateFile = filemtime($file); $dateFile = filemtime($file);
$now= mktime(date('G'), date('i'), date('s'), date("m") , date("d"), date("Y")); $now= mktime(date('G'), date('i'), date('s'), date("m") , date("d"), date("Y"));
$maxTime = mktime(date('G',$dateFile)+CACHE_MAXTIME, date('i',$dateFile), date('s',$dateFile), date("m",$dateFile), date("d",$dateFile), date("Y",$dateFile)); $maxTime = mktime(date('G',$dateFile)+CACHE_MAXTIME, date('i',$dateFile), date('s',$dateFile), date("m",$dateFile), date("d",$dateFile), date("Y",$dateFile));
$refreshHour = mktime(CACHE_REFRESH_HOUR, 0, 0, date("m"), date("d"), date("Y")); $refreshHour = mktime(CACHE_REFRESH_HOUR, 0, 0, date("m"), date("d"), date("Y"));
//Debug
//$firephp->log(date('G:i:s - d/m/Y',$dateFile), 'CACHE : dateFile ');
//$firephp->log(date('G:i:s - d/m/Y',$now), 'CACHE : now ');
//$firephp->log(date('G:i:s - d/m/Y',$maxTime), 'CACHE : MaxTime');
//$firephp->log(date('G:i:s - d/m/Y',$refreshHour), 'CACHE : RefreshHour ');
//Fin Debug
if( ($now>$maxTime) || ($dateFile<$refreshHour && $now>$refreshHour) ) return TRUE; if( ($now>$maxTime) || ($dateFile<$refreshHour && $now>$refreshHour) ) return TRUE;
else return FALSE; else return FALSE;
} }

View File

@ -32,7 +32,6 @@ function processSoapFault($clientSoap, $fault, $tabInfo, $debug = FALSE){
$message.= 'REQUEST : '.print_r($_REQUEST,true).'<br/><br/>'; $message.= 'REQUEST : '.print_r($_REQUEST,true).'<br/><br/>';
$message.= 'SERVER : '.print_r($_REQUEST,true).'<br/><br/>'; $message.= 'SERVER : '.print_r($_REQUEST,true).'<br/><br/>';
$message.= 'SESSION : '.print_r($_SESSION,true).'<br/><br/>'; $message.= 'SESSION : '.print_r($_SESSION,true).'<br/><br/>';
$message.= 'ENV : '.print_r($_ENV,true).'<br/><br/>';
$message.= 'tabInfo : '.print_r($tabInfo,true).'<br/><br/>'; $message.= 'tabInfo : '.print_r($tabInfo,true).'<br/><br/>';
$message.= '</pre>'; $message.= '</pre>';

View File

@ -17,6 +17,8 @@ function formSurveillance($source, $siret, $notEmail, $displayAjax = TRUE){
'insee' => 'les événements INSEE', 'insee' => 'les événements INSEE',
'bilans' => 'les bilans', 'bilans' => 'les bilans',
'score' => 'IndiScore', 'score' => 'IndiScore',
'actes' => 'les actes &amp; status',
'dirigeants' => 'les dirigeants',
); );
$fileStyle = 'style.css'; $fileStyle = 'style.css';
@ -33,22 +35,22 @@ function formSurveillance($source, $siret, $notEmail, $displayAjax = TRUE){
$formHTML.= '<script type="text/javascript" src="./js/jquery.form.js"></script>'."\n"; $formHTML.= '<script type="text/javascript" src="./js/jquery.form.js"></script>'."\n";
$formHTML.= '<script type="text/javascript">'.$js.'</script>'."\n"; $formHTML.= '<script type="text/javascript">'.$js.'</script>'."\n";
$formHTML.= '<style type="text/css">'.$style.'</style>'."\n"; $formHTML.= '<style type="text/css">'.$style.'</style>'."\n";
$formHTML.= '<form id="frmSurv" name="frmSurv" action="./pages/ajax_surveillance.php" method="POST">'; $formHTML.= '<form id="frmSurv" name="frmSurv" action="./pages/ajax_surveillance.php" method="POST">'."\n";
if($displayAjax){ if($displayAjax){
$formHTML.= '<input name="surveillance" type="checkbox"/> Mettre sous surveillance '.$assocSourceTxt[$source].'<br/>'; $formHTML.= '<input name="surveillance" type="checkbox"/> Mettre sous surveillance '.$assocSourceTxt[$source].'<br/>'."\n";
} }
$formHTML.= '<input name="q" type="hidden" value="setsurv"/>'; $formHTML.= '<input name="q" type="hidden" value="setsurv"/>';
$formHTML.= '<input name="formSurv[siret]" type="hidden" value="'.$siret.'"/>'; $formHTML.= '<input name="formSurv[siret]" type="hidden" value="'.$siret.'"/>'."\n";
$formHTML.= '<input name="formSurv[source]" type="hidden" value="'.$source.'"/>'; $formHTML.= '<input name="formSurv[source]" type="hidden" value="'.$source.'"/>'."\n";
$ref=''; $ref='';
if(isset($_REQUEST['ref'])){ if(isset($_REQUEST['ref'])){
$ref = $_REQUEST['ref']; $ref = $_REQUEST['ref'];
} }
$formHTML.= '<div id="survForm">'; $formHTML.= '<div id="survForm">'."\n";
$formHTML.= '<div class="fieldgrp">'; $formHTML.= '<div class="fieldgrp">'."\n";
$formHTML.= '<label class="StyleInfoLib">Votre référence</label><div class="field"><input name="formSurv[ref]" type="text" value="'.$ref.'" size="10"/></div>'; $formHTML.= '<label class="StyleInfoLib">Votre référence</label><div class="field"><input name="formSurv[ref]" type="text" value="'.$ref.'" size="10"/></div>'."\n";
$formHTML.= '</div>'; $formHTML.= '</div>'."\n";
$email = ''; $email = '';
if(!in_array($_SESSION['tabInfo']['login'],$notEmail) && !isset($_REQUEST['email'])){ if(!in_array($_SESSION['tabInfo']['login'],$notEmail) && !isset($_REQUEST['email'])){
@ -56,14 +58,14 @@ function formSurveillance($source, $siret, $notEmail, $displayAjax = TRUE){
}elseif(isset($_REQUEST['email'])){ }elseif(isset($_REQUEST['email'])){
$email = $_REQUEST['email']; $email = $_REQUEST['email'];
} }
$formHTML.= '<div class="fieldgrp">'; $formHTML.= '<div class="fieldgrp">'."\n";;
$formHTML.= '<label class="StyleInfoLib">Adresse email du destinataire</label><div class="field"><input name="formSurv[email]" type="text" value="'.$email.'" size="20"/></div>'; $formHTML.= '<label class="StyleInfoLib">Adresse email du destinataire</label><div class="field"><input name="formSurv[email]" type="text" value="'.$email.'" size="20"/></div>'."\n";
$formHTML.= '</div>'; $formHTML.= '</div>'."\n";;
$formHTML.= '<div class="submit"><p class="submit-button">'; $formHTML.= '<div class="submit"><p class="submit-button">'."\n";;
$formHTML.= '<input class="submit" 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="Mettre sous surveillance...">'; $formHTML.= '<input class="submit" 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="Mettre sous surveillance...">'."\n";
$formHTML.= '</p></div>'; $formHTML.= '</p></div>'."\n";
$formHTML.= '</div>'; $formHTML.= '</div>'."\n";
$formHTML.= '</form>'; $formHTML.= '</form>'."\n";
return $formHTML; return $formHTML;
} }
@ -85,24 +87,27 @@ function getSurveillance($page, $siret){
'evenements' => 'survinsee', 'evenements' => 'survinsee',
'liasse' => 'survbilan', 'liasse' => 'survbilan',
'indiscore' => 'survscore', 'indiscore' => 'survscore',
'actes' => 'survactes',
'dirigeants' => 'survdirigeants',
); );
$assocPageSource = array( $assocPageSource = array(
'annonces' => 'annonces', 'annonces' => 'annonces',
'evenements' => 'insee', 'evenements' => 'insee',
'liasse' => 'bilans', 'liasse' => 'bilans',
'indiscore' => 'score', 'indiscore' => 'score',
'greffes' => 'actes',
'dirigeants' => 'dirigeants',
); );
$return = ''; $return = '';
$firephp->log($_SESSION,'SESSION'); $firephp->log($_SESSION,'SESSION');
if(preg_match('/'.$assocPageDroit[$page].'/i', $_SESSION['tabInfo']['droits'])){ //if(preg_match('/'.$assocPageDroit[$page].'/i', $_SESSION['tabInfo']['droits'])){
if(preg_match('/voirsurv/i', $_SESSION['tabInfo']['pref']) && inSurveillance($assocPageSource[$page], $siret)){ if(preg_match('/voirsurv/i', $_SESSION['tabInfo']['pref']) && inSurveillance($assocPageSource[$page], $siret)){
$return = '<br/>L\'entité est sous surveillance.'."\n"; $return = '<br/>L\'entité est sous surveillance.'."\n";
}else{ }else{
$notEmail = array('testreunica', 'reunicacsf'); $notEmail = array('testreunica', 'reunicacsf');
$return = formSurveillance($assocPageSource[$page], $siret, $notEmail); $return = formSurveillance($assocPageSource[$page], $siret, $notEmail);
} }
} //}
return $return; return $return;
} }

View File

@ -15,6 +15,8 @@ $definePerms = array(
'SURVINSEE' => array( 'init' => '', 'txt' => 'Surveillance des événements INSEE'), 'SURVINSEE' => array( 'init' => '', 'txt' => 'Surveillance des événements INSEE'),
'SURVBILAN' => array( 'init' => '', 'txt' => 'Surveillance des bilans'), 'SURVBILAN' => array( 'init' => '', 'txt' => 'Surveillance des bilans'),
'SURVSCORE' => array( 'init' => '', 'txt' => 'Surveillance des événements sur le score'), 'SURVSCORE' => array( 'init' => '', 'txt' => 'Surveillance des événements sur le score'),
'SURVACTES' => array( 'init' => '', 'txt' => 'Surveillance des actes'),
'SURVDIRIGEANTS'=> array( 'init' => '', 'txt' => 'Surveillance des dirigeants'),
'SURVLISTE' => array( 'init' => '', 'txt' => 'Liste des surveillances'), 'SURVLISTE' => array( 'init' => '', 'txt' => 'Liste des surveillances'),
'INVESTIG' => array( 'init' => '', 'txt' => 'Investigation'), 'INVESTIG' => array( 'init' => '', 'txt' => 'Investigation'),
'ENQUETEC' => array( 'init' => '', 'txt' => 'Enquête commerciale'), 'ENQUETEC' => array( 'init' => '', 'txt' => 'Enquête commerciale'),
@ -64,10 +66,11 @@ function checkPerm($page, $perm = ''){
* @return string * @return string
*/ */
function formElementPerm($userInfos){ function formElementPerm($userInfos){
global $definePerms; global $definePerms, $firephp;
$return = ''; $return = '';
foreach($definePerms as $perm => $infos){ foreach($definePerms as $perm => $infos){
if(overridePerm($perm)){ if(overridePerm($perm)){
$firephp->log(hasPerm($perm, $userInfos), 'hasPerm');
(hasPerm($perm, $userInfos)==TRUE) ? $checked = 'checked' : $checked = $infos['init']; (hasPerm($perm, $userInfos)==TRUE) ? $checked = 'checked' : $checked = $infos['init'];
($_SESSION['tabInfo']['profil']=='Administrateur' || $_SESSION['tabInfo']['profil']=='SuperAdministrateur') ? $disabled = '' : $disabled = 'disabled' ; ($_SESSION['tabInfo']['profil']=='Administrateur' || $_SESSION['tabInfo']['profil']=='SuperAdministrateur') ? $disabled = '' : $disabled = 'disabled' ;
$return.= '<input type="checkbox" name="frmOptions[droits][]" value="'.strtolower($perm).'" '.$checked.' '.$disabled.' class="noborder"/>'.$infos['txt'].'<br/>'."\n"; $return.= '<input type="checkbox" name="frmOptions[droits][]" value="'.strtolower($perm).'" '.$checked.' '.$disabled.' class="noborder"/>'.$infos['txt'].'<br/>'."\n";

View File

@ -132,7 +132,7 @@ if ($idan && ($vue=='bodacc' || $vue=='abod' || $vue=='balo' || $vue=='asso'))
</tr> </tr>
<tr> <tr>
<td width="30">&nbsp;</td> <td width="30">&nbsp;</td>
<td width="550" colspan="3" class="StyleInfoLib"><b><?=$ann['Categorie']?></b></td> <td width="550" colspan="3" class="StyleInfoLib"><b><?=$ann['Categorie']?></b></td>
</tr> </tr>
<tr> <tr>
</table> </table>

View File

@ -60,6 +60,15 @@ $raisonSociale = $_SESSION['tabInfo']['entrep']['raisonSociale'];
<td width="200" class="StyleInfoLib">Raison Sociale</td> <td width="200" class="StyleInfoLib">Raison Sociale</td>
<td width="350" class="StyleInfoData"><?=$raisonSociale?></td> <td width="350" class="StyleInfoData"><?=$raisonSociale?></td>
</tr> </tr>
<tr>
<td width="30">&nbsp;</td>
<td colspan="2" width="550" class="StyleInfoData">
<?php
require_once 'surveillance/surveillance.php';
print getSurveillance($page, $siret);
?>
</td>
</tr>
</table> </table>
<?php <?php
if ($histo) if ($histo)

View File

@ -277,6 +277,15 @@ else
<td width="200" class="StyleInfoLib">Raison Sociale</td> <td width="200" class="StyleInfoLib">Raison Sociale</td>
<td width="350" class="StyleInfoData"><?=$raisonSociale?></td> <td width="350" class="StyleInfoData"><?=$raisonSociale?></td>
</tr> </tr>
<tr>
<td width="30">&nbsp;</td>
<td colspan="2" width="550" class="StyleInfoData">
<?php
require_once 'surveillance/surveillance.php';
print getSurveillance($page, $siret);
?>
</td>
</tr>
</table> </table>
<h2>Actes &amp; Statuts</h2> <h2>Actes &amp; Statuts</h2>
@ -361,7 +370,6 @@ else
</tr> </tr>
<?php <?php
//$date=$dom_object->getValueFromTag('date_acte'); //$date=$dom_object->getValueFromTag('date_acte');
$tabOptions=explode('-', $option); $tabOptions=explode('-', $option);
$acte=array(); $acte=array();
if (!isset($typeActes['a'.$tabOptions[0]])) { if (!isset($typeActes['a'.$tabOptions[0]])) {
@ -428,6 +436,15 @@ else
<td width="200" class="StyleInfoLib">Raison Sociale</td> <td width="200" class="StyleInfoLib">Raison Sociale</td>
<td width="350" class="StyleInfoData"><?=$raisonSociale?></td> <td width="350" class="StyleInfoData"><?=$raisonSociale?></td>
</tr> </tr>
<tr>
<td width="30">&nbsp;</td>
<td colspan="2" width="550" class="StyleInfoData">
<?php
require_once 'surveillance/surveillance.php';
print getSurveillance($page, $siret);
?>
</td>
</tr>
</table> </table>
<h2>Actes &amp; Statuts</h2> <h2>Actes &amp; Statuts</h2>
@ -534,8 +551,15 @@ else
<td width="200" class="StyleInfoLib">Raison Sociale</td> <td width="200" class="StyleInfoLib">Raison Sociale</td>
<td width="350" class="StyleInfoData"><?=$raisonSociale?></td> <td width="350" class="StyleInfoData"><?=$raisonSociale?></td>
</tr> </tr>
<tr> <tr>
<td width="30">&nbsp;</td>
<td colspan="2" width="550" class="StyleInfoData">
<?php
require_once 'surveillance/surveillance.php';
print getSurveillance($page, $siret);
?>
</td>
</tr>
</table> </table>
<h2>Actes &amp; Statuts</h2> <h2>Actes &amp; Statuts</h2>

View File

@ -41,7 +41,6 @@ if( cache_exist() && !( preg_match('/saisie/i', $_SESSION['tabInfo']['droits'])
try { try {
$O = $client->getIdentite($siret, $idEntreprise); $O = $client->getIdentite($siret, $idEntreprise);
$etab = $O['result']; $etab = $O['result'];
$firephp->log($etab,'etab');
cache_delete(); cache_delete();
cache_add('etab', $etab); cache_add('etab', $etab);
} catch (SoapFault $fault) { } catch (SoapFault $fault) {
@ -51,6 +50,8 @@ if( cache_exist() && !( preg_match('/saisie/i', $_SESSION['tabInfo']['droits'])
} }
} }
$firephp->log($etab,'etab');
$tabEntrep = array(); $tabEntrep = array();
$tabEntrep['raisonSociale'] = $etab['Nom']; $tabEntrep['raisonSociale'] = $etab['Nom'];
$tabEntrep['siren'] = $etab['Siren']; $tabEntrep['siren'] = $etab['Siren'];
@ -140,7 +141,8 @@ if (trim($etab['Web'])<>'') {
$urlImg=getLogo($siteWeb, $etab['Siren']); $urlImg=getLogo($siteWeb, $etab['Siren']);
} }
if ($etab['Isin']<>'') { if ($etab['Isin']<>'')
{
$bourse=$etab['Bourse']; $bourse=$etab['Bourse'];
?> ?>
<tr> <tr>
@ -149,7 +151,8 @@ if ($etab['Isin']<>'') {
<td width="350" class="StyleInfoData"><a href="./?page=bourse&siret=<?=$etab['Siret']?>" title="Voir les informations boursi&eacute;res"><?=$etab['Isin']?></a></td> <td width="350" class="StyleInfoData"><a href="./?page=bourse&siret=<?=$etab['Siret']?>" title="Voir les informations boursi&eacute;res"><?=$etab['Isin']?></a></td>
</tr> </tr>
<?php <?php
if ($bourse['capitalisation']<>0) { if ($bourse['capitalisation']<>0)
{
?> ?>
<tr> <tr>
<td width="30">&nbsp;</td> <td width="30">&nbsp;</td>
@ -197,7 +200,7 @@ if (isset($etab['numRC']) && $etab['numRC']!='') {
<?php <?php
//Autre identifiant : Numéro WALDEC ou ancien numéro RC si le nouveau n'est pas disponible //Autre identifiant : Numéro WALDEC ou ancien numéro RC si le nouveau n'est pas disponible
if (isset($etab['AutreId']) && $etab['AutreId']!='' && (!$flafNewRC || substr($etab['AutreId'],0,1)=='W')) if (isset($etab['AutreId']) && $etab['AutreId']!='' && (!$flagNewRC || substr($etab['AutreId'],0,1)=='W'))
{ {
$libTrib = ''; $libTrib = '';
?> ?>
@ -223,6 +226,7 @@ if (isset($etab['AutreId']) && $etab['AutreId']!='' && (!$flafNewRC || substr($
<? <?
} }
?> ?>
<tr> <tr>
<td width="30">&nbsp;</td> <td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Etablissement actif <td width="200" class="StyleInfoLib">Etablissement actif
@ -247,56 +251,57 @@ if (isset($etab['AutreId']) && $etab['AutreId']!='' && (!$flafNewRC || substr($
</td> </td>
</tr> </tr>
<?php <?php
//Situation Jurique + affichage date de radiation //Situation Jurique + affichage date de radiation
$dateRadiation = ''; $dateRadiation = '';
if(isset($etab['DateRadiation']) && $etab['DateRadiation']!='' && $etab['DateRadiation']!='0000-00-00'){ if(isset($etab['DateRadiation']) && $etab['DateRadiation']!='' && $etab['DateRadiation']!='0000-00-00'){
$dateRadiation = WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$etab['DateRadiation'])); $dateRadiation = WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$etab['DateRadiation']));
} }
$firephp->log($etab['SituationJuridique'], 'SituationJuridique'); $firephp->log($etab['SituationJuridique'], 'SituationJuridique');
if ( $etab['SituationJuridique']=='P' || $etab['SituationJuridique'][0]=='R' || $_SESSION['tabInfo']['mode_edition']==1) if ( $etab['SituationJuridique']=='P' || $etab['SituationJuridique'][0]=='R' || $_SESSION['tabInfo']['mode_edition']==1)
{ {
?> ?>
<tr> <tr>
<td width="30">&nbsp;</td> <td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Situation juridique</td> <td width="200" class="StyleInfoLib">Situation juridique</td>
<td width="350" class="StyleInfoData"> <td width="350" class="StyleInfoData">
<?php
}
//Procédure collective
if ($etab['SituationJuridique']=='P')
{
?>
<a href="./?page=annonces&siret=<?=$etab['Siret']?>&idEntreprise=<?=$idEntreprise?>">
<font color="red"><b>En proc&eacute;dure collective</b></font>
</a>
<?php if($dateRadiation!=''){ ?><br/>Radié du RCS le <?php print $dateRadiation; } ?>
<?php <?php
} }/*else{
//Procédure collective if($dateRadiation!=''){ ?>Radié du RCS le <?php print $dateRadiation; }
if ($etab['SituationJuridique']=='P') }*/
{ //Radiation
?> if($etab['SituationJuridique']=='RR')
<a href="./?page=annonces&siret=<?=$etab['Siret']?>&idEntreprise=<?=$idEntreprise?>"> {
<font color="red"><b>En proc&eacute;dure collective</b></font> ?> Radié du RCS <?php if($dateRadiation!=''){ ?> le <?php print $dateRadiation; }
</a> }elseif($etab['SituationJuridique']=='RP'){
<?php if($dateRadiation!=''){ ?><br/>Radié du RCS le <?php print $dateRadiation; } ?> ?> Radiation publiée <?php if($dateRadiation!=''){ ?> le <?php print $dateRadiation; }
<?php }
}/*else{ if ($_SESSION['tabInfo']['mode_edition']==1)
if($dateRadiation!=''){ ?>Radié du RCS le <?php print $dateRadiation; } {
}*/ ?>
//Radiation <a href="./?page=saisie&siret=<?=$etab['Siret']?>&idEntreprise=<?=$idEntreprise?>">(Edition)</a>
if($etab['SituationJuridique']=='RR') <?php
{ }
?> Radié du RCS <?php if($dateRadiation!=''){ ?> le <?php print $dateRadiation; } if ( $etab['SituationJuridique']=='P' || $etab['SituationJuridique'][0]!='R' || $_SESSION['tabInfo']['mode_edition']==1)
}elseif($etab['SituationJuridique']=='RP'){ {
?> Radiation publiée <?php if($dateRadiation!=''){ ?> le <?php print $dateRadiation; } ?>
} </td>
if ($_SESSION['tabInfo']['mode_edition']==1) </tr>
{ <?php
?> } // Fin Situation juridique
<a href="./?page=saisie&siret=<?=$etab['Siret']?>&idEntreprise=<?=$idEntreprise?>">(Edition)</a> ?>
<?php
}
if ( $etab['SituationJuridique']=='P' || $etab['SituationJuridique'][0]!='R' || $_SESSION['tabInfo']['mode_edition']==1)
{
?>
</td>
</tr>
<?php
} // Fin Situation juridique
?>
</table> </table>
<h2>Raison sociale & Coordonnées</h2> <h2>Raison sociale & Coordonnées</h2>
@ -388,7 +393,7 @@ if($dateImmat!=''){
?> ?>
<tr> <tr>
<td width="30">&nbsp;</td> <td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Date de cr&eacute;ation de l'entreprise</td> <td width="200" class="StyleInfoLib">Cr&eacute;ation de l'entreprise</td>
<td width="350" class="StyleInfoData"> <td width="350" class="StyleInfoData">
<?php <?php
$dateCreationEn=str_replace('-','',$etab['DateCreaEn']); $dateCreationEn=str_replace('-','',$etab['DateCreaEn']);
@ -404,7 +409,7 @@ if($dateImmat!=''){
?> ?>
<tr> <tr>
<td width="30">&nbsp;</td> <td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Date de cr&eacute;ation de l'&eacute;tablissement</td> <td width="200" class="StyleInfoLib">Cr&eacute;ation de l'&eacute;tablissement</td>
<td width="350" class="StyleInfoData"> <td width="350" class="StyleInfoData">
<?php <?php
$dateCreationEt=str_replace('-','',$etab['DateCreaEt']); $dateCreationEt=str_replace('-','',$etab['DateCreaEt']);
@ -580,27 +585,7 @@ if (preg_match('/NAF4/i', $_SESSION['tabInfo']['pref']) && trim(@$etab['Naf4Ent'
<?php <?php
} }
//Nature de l'activité //Nature de l'activité
if ($etab['NatureActivite']==1 && $etab['Actif']==1)
$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édiaire du commerce',
10=>'Commerce de détail',
11=>'Profession libérale',
12=>'Services',
13=>'Location de meublé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> <tr>
@ -738,19 +723,14 @@ elseif($dir2LieuNaiss!='' && $dir2NaissText=='') $dir2NaissText.= 'n
<td width="200" class="StyleInfoLib">Principaux Dirigeants</td> <td width="200" class="StyleInfoLib">Principaux Dirigeants</td>
<td width="350" class="StyleInfoData"> <td width="350" class="StyleInfoData">
<div class="txtAdresse"> <div class="txtAdresse">
<p><u><b><?php print strWsToHtml(ucfirst($etab['dir1Titre'])); ?></b></u></p> <p><u><b><?php print strWsToHtml(ucfirst($etab['dir1Titre'])); ?></b></u><br/><?php print strWsToHtml($etab['dir1NomPrenom']); ?><?php if($dir1NaissText!=''){?>, <?php print $dir1NaissText; }?></p>
<p>
<?php print strWsToHtml($etab['dir1NomPrenom']); ?>
<?php if($dir1NaissText!=''){?>, <?php print $dir1NaissText; }?>
</div> </div>
<?php <?php
if ($etab['dir2Titre']<>'') { if ($etab['dir2Titre']<>'') {
?> ?>
<br/> <br/>
<div class="txtAdresse"> <div class="txtAdresse">
<p><u><b><?php print strWsToHtml(ucfirst($etab['dir2Titre'])); ?></b>:</u></p> <p><u><b><?php print strWsToHtml(ucfirst($etab['dir2Titre'])); ?></b>:</u><br/><?php print strWsToHtml($etab['dir2NomPrenom']); ?> <?php if($dir2NaissText!=''){?>, <?php print $dir2NaissText; }?></p>
<p><?php print strWsToHtml($etab['dir2NomPrenom']); ?>
<?php if($dir2NaissText!=''){?>, <?php print $dir2NaissText; }?>
</div> </div>
<?php <?php
} }

View File

@ -219,6 +219,17 @@ if ( preg_match('/scorecsf/i', $_SESSION['tabInfo']['droits']) )
<?php <?php
} }
//Rapport de synthèse
if( ($_SESSION['tabInfo']['login']=='mricois') )
{
if ( $siret*1!=0 ) { $href = './?page=rsynthese&siret='.$siret.'&idEntreprise='.$idEntreprise; } else { $href = '#';}
?>
<a href="<?=$href?>"><?php if($href=='#'){ print '<font color="gray">';} ?>Rapport de synthèse<?php if($href=='#'){print '</font>';} ?></a>
<?php
}
?>
<?php
// Enquete commerciale // Enquete commerciale
if ($siret*1!=0 && ($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized'])) if ($siret*1!=0 && ($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized']))
{ {

View File

@ -32,7 +32,9 @@ else {
$tabOptions['nom'] = preg_replace('/[^0-9A-Z\'-]/i', ' ', strtoupper(strtr(stripslashes($tabOptions['nom']), 'àáâãäåæçèéêëìíîïðñòóôõöùúûüýÿÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖÙÚÛÜÝŸ', 'aaaaaaaceeeeiiiionooooouuuuyyAAAAAAACEEEEIIIIONOOOOOUUUUYY'))); $tabOptions['nom'] = preg_replace('/[^0-9A-Z\'-]/i', ' ', strtoupper(strtr(stripslashes($tabOptions['nom']), 'àáâãäåæçèéêëìíîïðñòóôõöùúûüýÿÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖÙÚÛÜÝŸ', 'aaaaaaaceeeeiiiionooooouuuuyyAAAAAAACEEEEIIIIONOOOOOUUUUYY')));
$tabOptions['prenom'] = ucwords(strtolower(preg_replace('/[^0-9A-Z\'-]/i', ' ', strtoupper(strtr(stripslashes($tabOptions['prenom']), 'àáâãäåæçèéêëìíîïðñòóôõöùúûüýÿÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖÙÚÛÜÝŸ', 'aaaaaaaceeeeiiiionooooouuuuyyAAAAAAACEEEEIIIIONOOOOOUUUUYY'))))); $tabOptions['prenom'] = ucwords(strtolower(preg_replace('/[^0-9A-Z\'-]/i', ' ', strtoupper(strtr(stripslashes($tabOptions['prenom']), 'àáâãäåæçèéêëìíîïðñòóôõöùúûüýÿÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖÙÚÛÜÝŸ', 'aaaaaaaceeeeiiiionooooouuuuyyAAAAAAACEEEEIIIIONOOOOOUUUUYY')))));
$tabOptions['reference'] = preg_replace('/[^0-9A-Z\'-]/i', ' ', strtoupper(strtr(stripslashes($tabOptions['reference']), 'àáâãäåæçèéêëìíîïðñòóôõöùúûüýÿÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖÙÚÛÜÝŸ', 'aaaaaaaceeeeiiiionooooouuuuyyAAAAAAACEEEEIIIIONOOOOOUUUUYY'))); $tabOptions['reference'] = preg_replace('/[^0-9A-Z\'-]/i', ' ', strtoupper(strtr(stripslashes($tabOptions['reference']), 'àáâãäåæçèéêëìíîïðñòóôõöùúûüýÿÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖÙÚÛÜÝŸ', 'aaaaaaaceeeeiiiionooooouuuuyyAAAAAAACEEEEIIIIONOOOOOUUUUYY')));
$firephp->log($loginVu, 'loginVu');
$firephp->log($tabOptions, 'tabOptions');
try { try {
$O = $client->setInfosLogin($loginVu, $tabOptions); $O = $client->setInfosLogin($loginVu, $tabOptions);
if ($O['result']==1) $message='Compte mis à jour !'; if ($O['result']==1) $message='Compte mis à jour !';
@ -318,6 +320,7 @@ if ($_SESSION['tabInfo']['login']=='ylenaour') {
<div class="infoTitle StyleInfoLib">Droits d'acc&egrave;s</div> <div class="infoTitle StyleInfoLib">Droits d'acc&egrave;s</div>
<div class="infoData"> <div class="infoData">
<?php $firephp->log($login, 'login'); ?>
<?php print formElementPerm($login); ?> <?php print formElementPerm($login); ?>
</div> </div>

View File

@ -33,7 +33,7 @@ switch($tri){
case 'datederenvoi': $triws = 'dateDerEnvoi'; break; case 'datederenvoi': $triws = 'dateDerEnvoi'; break;
} }
$tabSource = array('annonces', 'insee', 'bilans', 'score'); $tabSource = array('annonces', 'insee', 'bilans', 'score', 'actes', 'dirigeants');
$nbAffichage = 100; $nbAffichage = 100;
//Enregistrement pour liste dernière recherche //Enregistrement pour liste dernière recherche
@ -158,13 +158,18 @@ if($vue=='default'){
Afficher uniquement les suveillances de type Afficher uniquement les suveillances de type
<select name="type"> <select name="type">
<option value="-">toutes</option> <option value="-">toutes</option>
<option value="annonces" <?php if(isset($source) && $source=='annonces'){print 'selected';}?>>annonces</option> <?php
<option value="insee" <?php if(isset($source) && $source=='insee'){print 'selected';}?>>insee</option> foreach($tabSource as $s)
<option value="bilans" <?php if(isset($source) && $source=='bilans'){print 'selected';}?>>bilans</option> {
<option value="score" <?php if(isset($source) && $source=='score'){print 'selected';}?>>score</option> ?>
<option value="<?=$s?>" <?php if(isset($source) && $source==$s){print 'selected';}?>><?=$s?></option>
<?php
}
?>
</select> </select>
</p> </p>
<p class="options"><ul id="tri"> <p class="options">
<ul id="tri">
<li><a href="./?page=surveillance&vue=<?php print $vue;?><?php if(isset($source)){print '&source='.$source;}?>&tri=siren&idEntreprise=<?=$idEntreprise?>&siret=<?=$siret?>">Tri par Siren</a></li> <li><a href="./?page=surveillance&vue=<?php print $vue;?><?php if(isset($source)){print '&source='.$source;}?>&tri=siren&idEntreprise=<?=$idEntreprise?>&siret=<?=$siret?>">Tri par Siren</a></li>
<li><a href="./?page=surveillance&vue=<?php print $vue;?><?php if(isset($source)){print '&source='.$source;}?>&tri=rs&idEntreprise=<?=$idEntreprise?>&siret=<?=$siret?>">Tri par Raison sociale</a></li> <li><a href="./?page=surveillance&vue=<?php print $vue;?><?php if(isset($source)){print '&source='.$source;}?>&tri=rs&idEntreprise=<?=$idEntreprise?>&siret=<?=$siret?>">Tri par Raison sociale</a></li>
<?php <?php
@ -176,7 +181,8 @@ if($source != ''){
<?php <?php
} }
?> ?>
</ul></p> </ul>
</p>
<p class="options"> <p class="options">
Les options de tri pemettent de trier la liste de vos surveillances. Les options de tri pemettent de trier la liste de vos surveillances.
Il est ensuite possible de trier les surveillances affichées dans le tableau en cliquant sur chaque titre de colonnes. Il est ensuite possible de trier les surveillances affichées dans le tableau en cliquant sur chaque titre de colonnes.
@ -248,7 +254,7 @@ foreach($listTrier as $item)
?> ?>
<div id="a<?php print $item['siren'];?>" class="action"> <div id="a<?php print $item['siren'];?>" class="action">
<p><?php print ucfirst($source);?></p> <p><?php print ucfirst($source);?></p>
<a class="thickbox" href="./pages/ajax_surveillance.php?q=ajouter&siren=<?php print $item['siren']; ?>&source=<?php print $source;?>" title="Ajouter la surveillance <?php print $source;?>"><img src="./img/interface/ajouter.png"/></a> <a class="thickbox" href="./pages/ajax_surveillance.php?q=ajouter&siren=<?php print $item['siren']; ?>&source=<?php print $source;?>" title="Ajouter la surveillance <?=$source?>"><img src="./img/interface/ajouter.png"/></a>
<a class="thickbox" href="./pages/ajax_surveillance.php?q=ajouter&siren=<?php print $item['siren']; ?>&source=<?php print $source;?>&ref=<?php print $surveillance['ref'];?>&email=<?php print $surveillance['email'];?>" title="Editer la surveillance <?php print $source;?>"><img src="./img/interface/editer.png"/></a> <a class="thickbox" href="./pages/ajax_surveillance.php?q=ajouter&siren=<?php print $item['siren']; ?>&source=<?php print $source;?>&ref=<?php print $surveillance['ref'];?>&email=<?php print $surveillance['email'];?>" title="Editer la surveillance <?php print $source;?>"><img src="./img/interface/editer.png"/></a>
<a href="./?page=surveillance&action=supprimer&siren=<?php print $item['siren']; ?>&ref=<?php print $surveillance['ref']; ?>&source=<?php print $source;?>&email=<?php print $surveillance['email']; ?>&idEntreprise=<?=$idEntreprise?>&siret=<?=$siret?>" title="Supprimer la surveillance <?php print $source.' '.$surveillance['email'];?>"><img src="./img/interface/supprimer.png"/></a> <a href="./?page=surveillance&action=supprimer&siren=<?php print $item['siren']; ?>&ref=<?php print $surveillance['ref']; ?>&source=<?php print $source;?>&email=<?php print $surveillance['email']; ?>&idEntreprise=<?=$idEntreprise?>&siret=<?=$siret?>" title="Supprimer la surveillance <?php print $source.' '.$surveillance['email'];?>"><img src="./img/interface/supprimer.png"/></a>
</div> </div>
@ -258,7 +264,7 @@ foreach($listTrier as $item)
?> ?>
<div id="a<?php print $item['siren'];?>" class="action"> <div id="a<?php print $item['siren'];?>" class="action">
<p><?php print ucfirst($source);?></p> <p><?php print ucfirst($source);?></p>
<a class="thickbox" href="./pages/ajax_surveillance.php?q=ajouter&siren=<?php print $item['siren']; ?>&source=<?php print $source;?>" title="Ajouter la surveillance <?php print $item['source'];?>"><img src="./img/interface/ajouter.png"/></a> <a class="thickbox" href="./pages/ajax_surveillance.php?q=ajouter&siren=<?php print $item['siren']; ?>&source=<?php print $source;?>" title="Ajouter la surveillance <?=$source?>"><img src="./img/interface/ajouter.png"/></a>
</div> </div>
<?php <?php
} }