From 85dd71c9fad884588b613078f0f777647036e270 Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Tue, 6 Mar 2012 14:06:38 +0000 Subject: [PATCH] =?UTF-8?q?Cr=C3=A9ation=20d'une=20structure=20pour=20l'en?= =?UTF-8?q?richissement?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controllers/GestionController.php | 16 +-- .../views/scripts/gestion/profiladd.phtml | 15 +-- library/Scores/Enrichissement.php | 124 +++++++++++++++++- library/Scores/Field.php | 7 - 4 files changed, 131 insertions(+), 31 deletions(-) diff --git a/application/modules/frontend/controllers/GestionController.php b/application/modules/frontend/controllers/GestionController.php index b574bcf0..43088066 100644 --- a/application/modules/frontend/controllers/GestionController.php +++ b/application/modules/frontend/controllers/GestionController.php @@ -40,18 +40,10 @@ class GestionController extends Zend_Controller_Action } //Affichage du formulaire - require_once 'Scores/Field.php'; - $fieldsM = new Fields(); - $allFields = $fieldsM->getFields(); - - $fields = array(); - foreach($allFields as $name => $item) - { - if ( array_key_exists('export', $item) ) { - $fields[$name] = $item['label']; - } - } - $this->view->assign('fields', $fields); + require_once 'Scores/Enrichissement.php'; + $fieldsM = new Enrichissement(); + $allFields = $fieldsM->getFields(); + $this->view->assign('fields', $allFields); } public function profildelAction(){} diff --git a/application/modules/frontend/views/scripts/gestion/profiladd.phtml b/application/modules/frontend/views/scripts/gestion/profiladd.phtml index c80f10e3..e2006f34 100644 --- a/application/modules/frontend/views/scripts/gestion/profiladd.phtml +++ b/application/modules/frontend/views/scripts/gestion/profiladd.phtml @@ -15,27 +15,20 @@
-
- -
+
- fields)>0 ) {?> -fields as $value => $lib ) {?> - +fields as $value => $item ) {?> +
-
-Criteres
-
- -
\ No newline at end of file diff --git a/library/Scores/Enrichissement.php b/library/Scores/Enrichissement.php index 7c39fc4c..a9ce9727 100644 --- a/library/Scores/Enrichissement.php +++ b/library/Scores/Enrichissement.php @@ -1,7 +1,129 @@ array(), + 'source' => array(), + 'source_id' => array(), + 'triCode' => array(), + 'autre_id' => array(), + 'siren' => array(), + 'nic' => array(), + 'actif' => array(), + 'siege' => array( + 'value' => array( + '1' => "Etablissement Siege", + '0' => "Etablissement Secondaire", + ) + ), + 'raisonSociale' => array(), + 'enseigne' => array(), + 'sigle' => array(), + 'identite_pre' => array(), + 'marques' => array(), + 'adr_num' => array(), + 'adr_btq' => array(), + 'adr_typeVoie' => array(), + 'adr_libVoie' => array(), + 'adr_comp' => array(), + 'adr_cp' => array(), + 'adr_ville' => array(), + 'adr_dep' => array(), + 'adr_com' => array(), + 'tel' => array(), + 'fax' => array(), + 'cj' => array(), + 'capital' => array(), + 'capitalDev' => array(), + 'capitalSrc' => array(), + 'ape_etab' => array(), + 'ape_entrep' => array(), + 'age_entrep' => array(), + 'age_etab' => array(), + 'tca' => array(), + 'tcaexp' => array(), + 'teff_entrep' => array(), + 'teff_etab' => array(), + 'rang' => array(), + 'web' => array(), + 'mail' => array(), + 'adrDom' => array(), + 'lieuAct' => array(), + 'actifEco' => array(), + 'presentRcs' => array(), + 'procolHisto' => array(), + 'tvaIntraCle' => array(), + 'tvaIntraValide' => array(), + 'ape4_etab' => array(), + 'ape4_entrep' => array(), + 'NaceEtab' => array(), + 'NaceEntrep' => array(), + 'dateCrea_etab' => array(), + 'dateCrea_ent' => array(), + 'dateImmat' => array(), + 'eff_entrep' => array(), + 'eff_etab' => array(), + 'distSP' => array(), + 'achPost' => array(), + 'rivoli' => array(), + 'dirCiv' => array(), + 'dirNom' => array(), + 'dirPrenom' => array(), + 'dirDateNaiss' => array(), + 'dirFct' => array(), + 'nbEtab' => array(), + 'nbMPubli' => array(), + 'sirenGrp' => array(), + 'nbActio' => array(), + 'nbPart' => array(), + 'bilType' => array(), + 'bilAnnee' => array(), + 'bilCloture' => array(), + 'bilDuree' => array(), + 'bilTca' => array(), + 'bilEE' => array(), + 'bilFL' => array(), + 'bilFK' => array(), + 'bilFR' => array(), + 'bilGF' => array(), + 'bilGP' => array(), + 'bilGU' => array(), + 'bilGW' => array(), + 'bilHD' => array(), + 'bilHH' => array(), + 'bilHL' => array(), + 'bilHM' => array(), + 'bilHN' => array(), + 'bilYP' => array(), + 'avisCs' => array(), + ); + + /** + * Déclaration des champs exportable + * @var unknown_type + */ + protected $fields = array( + 'siege' => array( + 'label' => "Type d'établissement", + 'column' => 'siege' + ), + 'dirigeant' => array( + 'label' => "Dirigeant", + 'column' => array('dirCiv', 'dirNom', 'dirPrenom', 'dirDateNaiss', 'dirFct') + ), + ); + + public function __construct(){} + + + public function getFields() + { + return $this->fields; + } } \ No newline at end of file diff --git a/library/Scores/Field.php b/library/Scores/Field.php index 5c90f61b..000a83fb 100644 --- a/library/Scores/Field.php +++ b/library/Scores/Field.php @@ -29,13 +29,6 @@ Class Fields 'famille' => 'entreprise', 'activated' => true, 'type' => 'select', - 'export' => array( - 'label' => "Type d'établissement", - 'valuedesc' => array( - '1' => "Etablissement Siege", - '0' => "Etablissement Secondaire", - ), - ), ), 'sirenGrp' => array( 'label' => 'Présence d\'un groupe',