Modification
This commit is contained in:
parent
05c9aa875c
commit
30578cd087
@ -5,10 +5,16 @@ class ComptageController extends Zend_Controller_Action
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
$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',
|
||||
'bilFR', 'bilGF', 'bilGP', 'bilGU', 'bilGW', 'bilHD', 'bilHH', 'bilHL', 'bilHM', 'bilHN', 'bilYP', 'adr_com'
|
||||
/*
|
||||
* @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',
|
||||
'bilFR', 'bilGF', 'bilGP', 'bilGU', 'bilGW', 'bilHD', 'bilHH', 'bilHL', 'bilHM', 'bilHN', 'bilYP', 'adr_com'
|
||||
);
|
||||
$request = $this->getRequest();
|
||||
$key = $request->getParam('cle');
|
||||
@ -29,8 +35,8 @@ class ComptageController extends Zend_Controller_Action
|
||||
$total = $ciblage->execute();
|
||||
$insee = $ciblage->calculeRedevanceInsee();
|
||||
|
||||
$session->setCritere('total', $total);
|
||||
$session->setCritere('insee', $insee);
|
||||
$session->setNb('total', $total);
|
||||
$session->setNb('insee', $insee);
|
||||
|
||||
//Retour comptage, unité Insee
|
||||
$result = array(
|
||||
@ -51,16 +57,9 @@ class ComptageController extends Zend_Controller_Action
|
||||
|
||||
$criteres = $session->getCriteres();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$resultat = '';
|
||||
$nbInsee = '';
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,24 +1,32 @@
|
||||
<?php
|
||||
class SessionCiblage
|
||||
{
|
||||
protected $criteres = array('nbMPubli' , 'dirNom', 'lieuAct', 'adrDom','total', 'insee', 'siege', 'adr_cp', 'adr_dep', 'adr_com', 'tel', 'fax', 'cj', 'capital', 'ape_etab', 'ape_entrep', 'age_entrep',
|
||||
'age_etab', 'tcaexp', 'teff_entrep', 'teff_etab', 'rang', 'actifEco', 'presentRcs', 'procolHisto', 'tvaIntraValide',
|
||||
'NaceEtab', 'NaceEntrep', 'dateCrea_etab', 'dateCrea_ent', 'dateImmat', 'eff_entrep', 'eff_etab', 'rivoli', 'nbEtab',
|
||||
'sirenGrp', 'nbActio', 'nbPart', 'bilType', 'bilAnnee', 'avisCs', 'bilTca', 'bilEE', 'bilFL', 'bilFK', 'bilFR', 'bilGF', 'bilGP',
|
||||
'bilGU', 'bilGW', 'bilHD', 'bilHL', 'bilHM', 'bilHN', 'bilYP', 'bilFS', 'bilGG', 'bilGV', 'bilHI'
|
||||
protected $criteres = array(
|
||||
'nbMPubli' , 'dirNom', 'lieuAct', 'adrDom', 'siege', 'adr_cp', 'adr_dep', 'adr_com', 'tel', 'fax', 'cj', 'capital', 'ape_etab', 'ape_entrep', 'age_entrep',
|
||||
'age_etab', 'tcaexp', 'teff_entrep', 'teff_etab', 'rang', 'actifEco', 'presentRcs', 'procolHisto', 'tvaIntraValide',
|
||||
'NaceEtab', 'NaceEntrep', 'dateCrea_etab', 'dateCrea_ent', 'dateImmat', 'eff_entrep', 'eff_etab', 'rivoli', 'nbEtab',
|
||||
'sirenGrp', 'nbActio', 'nbPart', 'bilType', 'bilAnnee', 'avisCs', 'bilTca', 'bilEE', 'bilFL', 'bilFK', 'bilFR', 'bilGF', 'bilGP',
|
||||
'bilGU', 'bilGW', 'bilHD', 'bilHL', 'bilHM', 'bilHN', 'bilYP', 'bilFS', 'bilGG', 'bilGV', 'bilHI'
|
||||
);
|
||||
protected $valeur;
|
||||
protected $total = null;
|
||||
protected $insee = null;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$session = new Zend_Session_Namespace('ciblage');
|
||||
$this->valeur = $session->ciblage;
|
||||
if (isset($this->valeur['NB']['total'])){ $this->total = $this->valeur['NB']['total']; }
|
||||
if (isset($this->valeur['NB']['insee'])){ $this->insee = $this->valeur['NB']['insee']; }
|
||||
if (isset($this->valeur['NB'])){ unset($this->valeur['NB']); }
|
||||
}
|
||||
|
||||
protected function setSession()
|
||||
{
|
||||
$session = new Zend_Session_Namespace('ciblage');
|
||||
$session->ciblage = $this->valeur;
|
||||
$session = new Zend_Session_Namespace('ciblage');
|
||||
$this->valeur['NB']['total'] = $this->total;
|
||||
$this->valeur['NB']['insee'] = $this->insee;
|
||||
$session->ciblage = $this->valeur;
|
||||
}
|
||||
|
||||
public function setCritere($key, $value)
|
||||
@ -51,4 +59,16 @@ class SessionCiblage
|
||||
{
|
||||
return $this->valeur;
|
||||
}
|
||||
|
||||
public function setNb($element, $nb)
|
||||
{
|
||||
$this->{$element} = $nb;
|
||||
$this->setSession();
|
||||
}
|
||||
|
||||
public function getNb($element)
|
||||
{
|
||||
return $this->{$element};
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user