gestion de la surveillance privilège, fixed issue #0000222

This commit is contained in:
Michael RICOIS 2010-04-02 16:02:20 +00:00
parent 4bbc827907
commit 1e993cfbe2
3 changed files with 36 additions and 15 deletions

View File

@ -10,6 +10,7 @@ function assocSourceDroit()
'score' => 'survscore', 'score' => 'survscore',
'actes' => 'survactes', 'actes' => 'survactes',
'dirigeants' => 'survdirigeants', 'dirigeants' => 'survdirigeants',
'privileges' => 'survpriv',
); );
} }
@ -23,6 +24,7 @@ function assocSourceTxt()
'score' => 'IndiScore', 'score' => 'IndiScore',
'actes' => 'les actes & status', 'actes' => 'les actes & status',
'dirigeants' => 'les dirigeants', 'dirigeants' => 'les dirigeants',
'privileges' => 'les privilèges',
); );
} }

View File

@ -47,7 +47,9 @@ $tabSource = array(
'bilans'=>'bilan', 'bilans'=>'bilan',
'score'=>'score', 'score'=>'score',
'actes'=>'actes', 'actes'=>'actes',
'dirigeants'=>'dirigeants'); 'dirigeants'=>'dirigeants',
'privileges'=>'priv',
);
$nbAffichage = 100; $nbAffichage = 100;
//Enregistrement pour liste dernière recherche //Enregistrement pour liste dernière recherche
@ -66,7 +68,6 @@ try{
$nbSurveillances = $result['results']['nbReponsesTotal']; $nbSurveillances = $result['results']['nbReponsesTotal'];
$totPage = ceil($nbSurveillances/$nbAffichage); $totPage = ceil($nbSurveillances/$nbAffichage);
$curPage = ceil($position/$nbAffichage); $curPage = ceil($position/$nbAffichage);
} catch (SoapFault $fault) { } catch (SoapFault $fault) {
require_once 'soaperror.php'; require_once 'soaperror.php';
processSoapFault($client,$fault,$tabInfo); processSoapFault($client,$fault,$tabInfo);
@ -147,7 +148,7 @@ if($vue=='default'){
<?php <?php
foreach($tabSource as $s => $perm) foreach($tabSource as $s => $perm)
{ {
if(preg_match('/\bsurv'.$perm.'\b/i', $_SESSION['tabInfo']['droits'])) if(hasPerm('surv'.$perm))
{ {
?> ?>
<option value="<?=$s?>" <?php if(isset($source) && $source==$s){print 'selected';}?>><?=$s?></option> <option value="<?=$s?>" <?php if(isset($source) && $source==$s){print 'selected';}?>><?=$s?></option>
@ -169,7 +170,7 @@ Afficher uniquement les suveillances de type
<?php <?php
foreach($tabSource as $s => $perm) foreach($tabSource as $s => $perm)
{ {
if(preg_match('/\bsurv'.$perm.'\b/i', $_SESSION['tabInfo']['droits'])) if(hasPerm('surv'.$perm))
{ {
?> ?>
<option value="<?=$s?>" <option value="<?=$s?>"
@ -291,7 +292,7 @@ foreach($listTrier as $item)
<?php <?php
foreach($tabSource as $source => $perm) foreach($tabSource as $source => $perm)
{ {
if(preg_match('/\bsurv'.$perm.'\b/i', $_SESSION['tabInfo']['droits'])) if(hasPerm('surv'.$perm))
{ {
if(isset($item['sources'][$source])) if(isset($item['sources'][$source]))
{ {
@ -310,7 +311,8 @@ foreach($listTrier as $item)
<?php <?php
foreach($tabSource as $source => $perm) foreach($tabSource as $source => $perm)
{ {
if(preg_match('/\bsurv'.$perm.'\b/i', $_SESSION['tabInfo']['droits'])) FB::log($source, $perm);
if(hasPerm('surv'.$perm))
{ {
if(array_key_exists($source, $item['sources'])) if(array_key_exists($source, $item['sources']))
{ {
@ -354,7 +356,7 @@ foreach($listTrier as $item)
<td> <td>
<?php <?php
foreach($tabSource as $source => $perm){ foreach($tabSource as $source => $perm){
if(preg_match('/surv'.$perm.'/i', $_SESSION['tabInfo']['droits'])) if(hasPerm('surv'.$perm))
{ {
if(array_key_exists($source, $item['sources'])){ if(array_key_exists($source, $item['sources'])){
foreach($item['sources'][$source] as $surveillance){ foreach($item['sources'][$source] as $surveillance){
@ -368,7 +370,7 @@ foreach($listTrier as $item)
<td> <td>
<?php <?php
foreach($tabSource as $source => $perm){ foreach($tabSource as $source => $perm){
if(preg_match('/\bsurv'.$perm.'\b/i', $_SESSION['tabInfo']['droits'])) if(hasPerm('surv'.$perm))
{ {
if(array_key_exists($source, $item['sources'])){ if(array_key_exists($source, $item['sources'])){
foreach($item['sources'][$source] as $surveillance){ foreach($item['sources'][$source] as $surveillance){

View File

@ -107,6 +107,17 @@ if(isset($_REQUEST['action']))
$privileges = join(', ', $_REQUEST['privileges']['type']); $privileges = join(', ', $_REQUEST['privileges']['type']);
$privilegesLog = join('-', $_REQUEST['privileges']['type']); $privilegesLog = join('-', $_REQUEST['privileges']['type']);
$firephp->log($privileges, 'privileges'); $firephp->log($privileges, 'privileges');
if (in_array('privSurv',$_REQUEST['privileges']['type'])){
try {
$O = $client->setSurveillance(
$_REQUEST['siret'],$_REQUEST['email'],
$_REQUEST['ref'], 'Privileges');
} catch (SoapFault $fault) {
require_once 'soaperror.php';
processSoapFault($client,$fault,$_SESSION['tabInfo']);
}
}
sendCmdMail("[COMMANDE PIECES] - PRIVILEGES par email", sendCmdMail("[COMMANDE PIECES] - PRIVILEGES par email",
'COMMANDE DE PRIVILEGES - par email<br/>'.EOL. 'COMMANDE DE PRIVILEGES - par email<br/>'.EOL.
'Demande pour recevoir ('.$privileges.') pour SIREN : '. 'Demande pour recevoir ('.$privileges.') pour SIREN : '.
@ -392,11 +403,17 @@ if(hasPerm('privileges'))
<?php <?php
if($disponible) if($disponible)
{ {
if( hasPerm('survpriv') ){
?> ?>
<input class="noborder type" type="checkbox" name="privileges[type][]" value="privSecu" <?=is_array($_REQUEST['privileges']['type']) && in_array('privSecu',$_REQUEST['privileges']['type']) ? 'checked' : ''?>/>Privilèges de la sécurité sociale et des régimes complémentaires<br/> <input class="noborder type" type="checkbox" name="privileges[type][]" value="privSurv" <?=is_array($_REQUEST['privileges']['type']) && in_array('SprivSecu',$_REQUEST['privileges']['type']) ? 'checked' : ''?>/><b>Privilèges de la sécurité sociale et des régimes complémentaires et Trésor Public <br/>(avec surveillance, retour sous 48 à 72h)</b><br/>
<input class="noborder type" type="checkbox" name="privileges[type][]" value="privTres" <?=is_array($_REQUEST['privileges']['type']) && in_array('privTres',$_REQUEST['privileges']['type']) ? 'checked' : ''?>/>Privilèges du Trésor Public<br/> <br/>
<?php } ?>
<input class="noborder type" type="checkbox" name="privileges[type][]" value="privSecu" <?=is_array($_REQUEST['privileges']['type']) && in_array('privSecu',$_REQUEST['privileges']['type']) ? 'checked' : ''?>/>Privilèges de la sécurité sociale et des régimes complémentaires (mail sous 12h ouvrées)<br/>
<input class="noborder type" type="checkbox" name="privileges[type][]" value="privTres" <?=is_array($_REQUEST['privileges']['type']) && in_array('privTres',$_REQUEST['privileges']['type']) ? 'checked' : ''?>/>Privilèges du Trésor Public (mail sous 12h ouvrées)<br/>
<br/>
<input class="noborder type" type="checkbox" name="privileges[type][]" value="nantFond" <?=is_array($_REQUEST['privileges']['type']) && in_array('nantFond',$_REQUEST['privileges']['type']) ? 'checked' : ''?>/>Nantissements du fonds de commerce ou du fonds artisanal (conventionnels et judiciaires)<br/> <input class="noborder type" type="checkbox" name="privileges[type][]" value="nantFond" <?=is_array($_REQUEST['privileges']['type']) && in_array('nantFond',$_REQUEST['privileges']['type']) ? 'checked' : ''?>/>Nantissements du fonds de commerce ou du fonds artisanal (conventionnels et judiciaires)<br/>
<input class="noborder type" type="checkbox" name="privileges[type][]" value="nantVend" <?=is_array($_REQUEST['privileges']['type']) && in_array('nantVend',$_REQUEST['privileges']['type']) ? 'checked' : ''?>/>Privilèges du vendeur de fonds de commerce et d'action résolutoire<br/> <input class="noborder type" type="checkbox" name="privileges[type][]" value="nantVend" <?=is_array($_REQUEST['privileges']['type']) && in_array('nantVend',$_REQUEST['privileges']['type']) ? 'checked' : ''?>/>Privilèges du vendeur de fonds de commerce et d'action résolutoire<br/>
<input class="noborder type" type="checkbox" name="privileges[type][]" value="declCrea" <?=is_array($_REQUEST['privileges']['type']) && in_array('declCrea',$_REQUEST['privileges']['type']) ? 'checked' : ''?>/>Déclarations de créances<br/> <input class="noborder type" type="checkbox" name="privileges[type][]" value="declCrea" <?=is_array($_REQUEST['privileges']['type']) && in_array('declCrea',$_REQUEST['privileges']['type']) ? 'checked' : ''?>/>Déclarations de créances<br/>
<?php <?php
}else{ }else{