Correction notice
This commit is contained in:
parent
94df8e6399
commit
ed3621e1a8
@ -8,13 +8,11 @@
|
||||
* Retourne le tableau structuré
|
||||
*/
|
||||
function defaultTriTab($tab){
|
||||
$tabIndex = array();
|
||||
$i=0;
|
||||
$tabIndex = array();
|
||||
$listTrier = array();
|
||||
foreach($tab as $item){
|
||||
if(!array_key_exists($item['siren'], $tabIndex)){
|
||||
//Tableau d'index
|
||||
$tabIndex[$item['siren']] = $i;
|
||||
//Création du tableau trier
|
||||
$listTrier[$i]['siren'] = $item['siren'];
|
||||
$listTrier[$i]['nic'] = $item['nic'];
|
||||
@ -27,15 +25,23 @@ function defaultTriTab($tab){
|
||||
'dateAjout' => $item['dateAjout'],
|
||||
'dateDerEnvoi' => $item['dateDerEnvoi'],
|
||||
);
|
||||
//Tableau d'index
|
||||
$tabIndex[$item['siren']] = $i;
|
||||
}else{
|
||||
$key = $tabIndex[$item['siren']];
|
||||
$nbSource = count($listTrier[$key]['sources'][$item['source']]);
|
||||
$source = array(
|
||||
'email'=>$item['email'],
|
||||
'ref'=>$item['ref'],
|
||||
'dateAjout'=>$item['dateAjout'],
|
||||
'dateDerEnvoi'=> $item['dateDerEnvoi'],
|
||||
);
|
||||
if ( array_key_exists(
|
||||
$item['source'],
|
||||
$listTrier[$key]['sources'] ) ){
|
||||
$nbSource = count($listTrier[$key]['sources'][$item['source']]);
|
||||
}else{
|
||||
$nbSource = 0;
|
||||
}
|
||||
$listTrier[$key]['sources'][$item['source']][$nbSource] = $source;
|
||||
}
|
||||
$i++;
|
||||
|
@ -15,7 +15,7 @@ $idEntreprise = isset($_REQUEST['idEntreprise'])?
|
||||
$_REQUEST['idEntreprise'] : '';
|
||||
$siret = isset($_REQUEST['siret'])? $_REQUEST['siret'] : '';
|
||||
|
||||
if($_REQUEST['action']=='supprimer'){
|
||||
if ( isset($_REQUEST['action']) && $_REQUEST['action']=='supprimer'){
|
||||
require_once 'surveillance/surveillance.php';
|
||||
deleteSurveillance( $siret,
|
||||
$_REQUEST['email'],
|
||||
@ -76,6 +76,7 @@ require_once 'surveillance/function.php';
|
||||
//Appel de la fonction de tri
|
||||
require_once 'surveillance/surveillance_tri.php';
|
||||
$listTrier = $fonctionTri($listSurveillance);
|
||||
FB::log($listTrier, 'listTrier');
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
@ -276,7 +277,6 @@ if($totPage != 1)
|
||||
if($vue=='default'){
|
||||
foreach($listTrier as $item)
|
||||
{
|
||||
$firephp->log($item, 'item');
|
||||
?>
|
||||
<tr>
|
||||
<td class="aleft">
|
||||
|
Loading…
x
Reference in New Issue
Block a user