From 9a4f6dfa7752444348719ee5da13f2a8554d43a7 Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Tue, 15 Sep 2009 09:18:59 +0000 Subject: [PATCH] =?UTF-8?q?Enregistrement=20des=20sirets=20consult=C3=A9s?= =?UTF-8?q?=20dans=20les=20derni=C3=A8res=20recherches?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- includes/recherche/recherche_histo.php | 13 +++++++++++++ includes/recherche/recherche_list.php | 1 + includes/recherche/session.php | 2 +- www/pages/identite.php | 10 ++++++++++ www/pages/options_surv.php | 6 +++++- 5 files changed, 30 insertions(+), 2 deletions(-) diff --git a/includes/recherche/recherche_histo.php b/includes/recherche/recherche_histo.php index 39dabdca8..9b3cef655 100644 --- a/includes/recherche/recherche_histo.php +++ b/includes/recherche/recherche_histo.php @@ -47,7 +47,20 @@ Aucune recherche enregistr + + Afficher la fiche d'identité consulter + Lancer la recherche +
Afficher le formulaire diff --git a/includes/recherche/recherche_list.php b/includes/recherche/recherche_list.php index 36f7e0a83..b74df38a1 100644 --- a/includes/recherche/recherche_list.php +++ b/includes/recherche/recherche_list.php @@ -8,6 +8,7 @@ $typeId = ''; //Enregistrement en session des dix dernières recherches require_once 'recherche/session.php'; recherche_save($formR); +recherche_saveinfo( array('page' => $page) ); function isUTF8($string) { diff --git a/includes/recherche/session.php b/includes/recherche/session.php index 0c109491c..279daacd3 100644 --- a/includes/recherche/session.php +++ b/includes/recherche/session.php @@ -73,7 +73,7 @@ function recherche_element($index) return $returntab; } else - return FALSE; + return null; } diff --git a/www/pages/identite.php b/www/pages/identite.php index 67ec9d9e6..238579da4 100644 --- a/www/pages/identite.php +++ b/www/pages/identite.php @@ -15,6 +15,16 @@ $idEntreprise=trim(preg_replace('/[^0-9]/', '', $_REQUEST['idEntreprise']))*1; / if (($siret*1)==0 && $idEntreprise==0) die('Paramètres incorrects !'); $siren=substr($siret,0,9); +//Enregistrement pour liste dernière recherche +require_once 'recherche/session.php'; +$parametres = recherche_element(0); +if( isset($parametres) && $parametres['info']['page']=='recherche' ) +{ + recherche_saveinfo( array('page' => $page) ); + recherche_saveinfo( array('siret' => $siret) ); +} + + //Géné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; } diff --git a/www/pages/options_surv.php b/www/pages/options_surv.php index 8d86af141..f0c1d0c6b 100644 --- a/www/pages/options_surv.php +++ b/www/pages/options_surv.php @@ -34,9 +34,13 @@ switch($tri){ } $tabSource = array('annonces', 'insee', 'bilans', 'score'); - $nbAffichage = 100; +//Enregistrement pour liste dernière recherche +require_once 'recherche/session.php'; +$parametres = recherche_element(0); +if( isset($parametres) && $parametres['info']['page']=='recherche' ){ recherche_saveinfo( array('page' => $page) ); } + //Liste des surveillances de l'utilisateur try{ $result = $client->getSurveillances(0, $source, true, $position, $nbAffichage, $triws);