Réalisation de la gestion des valeur directement par field
This commit is contained in:
parent
c8e30a3df8
commit
e60e38af74
@ -5,33 +5,24 @@ class ComptageController extends Zend_Controller_Action
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
/*
|
||||
* @todo : Créer une classe pour gérer les champs, leurs paramètres, les options
|
||||
* et les sortir de la session
|
||||
*
|
||||
*/
|
||||
$explode = array(
|
||||
'dateCrea_etab', 'dateCrea_ent', 'dateImmat', 'nbEtab', 'teff_entrep', 'teff_etab',
|
||||
'teff_entrep', 'teff_etab', 'eff_etab', 'eff_entrep', 'adr_dep', 'adr_cp', 'nbMPubli',
|
||||
'nbPart', 'nbActio', 'capital', 'bilAnnee', 'bilCloture', 'bilEE', 'bilFL', 'bilFK',
|
||||
'bilTca','bilFR', 'bilGF', 'bilGP', 'bilGU', 'bilGW', 'bilHD', 'bilHH', 'bilHL', 'bilHM', 'bilHN', 'bilYP', 'adr_com'
|
||||
);
|
||||
|
||||
//Session
|
||||
require_once 'Scores/SessionCiblage.php';
|
||||
$session = new SessionCiblage();
|
||||
|
||||
$request = $this->getRequest();
|
||||
$key = $request->getParam('cle');
|
||||
|
||||
if(in_array($key, $explode))
|
||||
$value = explode(',', $request->getParam('valeur'));
|
||||
else
|
||||
$value = $request->getParam('valeur');
|
||||
$session->setCritere($key, $request->getParam('valeur'));
|
||||
|
||||
//Session
|
||||
require_once 'Scores/SessionCiblage.php';
|
||||
$session = new SessionCiblage();
|
||||
$session->setCritere($key, $value);
|
||||
$auth = Zend_Auth::getInstance();
|
||||
$user = $auth->getIdentity();
|
||||
require_once 'Scores/Field.php';
|
||||
$field = new Fields($user->username);
|
||||
|
||||
//Comptage
|
||||
require_once 'Scores/Ciblage.php';
|
||||
$ciblage = new Ciblage($session->getCriteres());
|
||||
$ciblage = new Ciblage($field->getValues());
|
||||
$total = $ciblage->execute();
|
||||
$insee = $ciblage->calculRedevanceInsee();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user