From ffc27e0766f9ce62c899cf566a24958dc8c35de3 Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Tue, 6 Mar 2012 16:24:28 +0000 Subject: [PATCH] =?UTF-8?q?Gestion=20des=20donn=C3=A9es=20insee?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../frontend/controllers/GestionController.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/application/modules/frontend/controllers/GestionController.php b/application/modules/frontend/controllers/GestionController.php index f3f8bd9f..4dbce39f 100644 --- a/application/modules/frontend/controllers/GestionController.php +++ b/application/modules/frontend/controllers/GestionController.php @@ -46,12 +46,25 @@ class GestionController extends Zend_Controller_Action } if (!$errForm) { + $dataInsee = 0; + // Est ce qu'il existe une données insee + require_once 'Scores/Enrichissement.php'; + $fieldsM = new Enrichissement(); + $fields = $fieldsM->getFields(); + foreach ( $fields as $key => $val) { + if ( array_key_exists('insee', $key) && $val['insee']===true) { + $dateInsee = 1; + break; + } + } + $data = array( 'idClient' => $params['idClient'], 'login' => $params['login'], 'reference' => $params['reference'], 'criteres' => json_encode($params['criteres']), 'tarifLigne' => $params['tarifLigne'], + 'dataInsee' => $dataInsee, 'dateAjout' => date('Y-m-d H:i:s'), 'actif' => 1, );