Merge from branche 1.1

This commit is contained in:
Michael RICOIS 2012-03-05 15:25:20 +00:00
commit ebd7fae292
61 changed files with 1484 additions and 364 deletions

View File

@ -28,9 +28,7 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
->appendFile($pathScript.'/jquery.cookie.js', 'text/javascript')
->appendFile($pathScript.'/jquery-ui.js', 'text/javascript')
->appendFile($pathScript.'/jquery.qtip.js', 'text/javascript')
->appendFile($pathScript.'/scripts.js', 'text/javascript')
->appendFile($pathScript.'/jquery.jstree.js', 'text/javascript')
->appendFile($pathScript.'/fields.js', 'text/javascript');
->appendFile($pathScript.'/scripts.js', 'text/javascript');
$view->headTitle()->setSeparator(' - ');
$view->headTitle('Odea');

View File

@ -2,8 +2,7 @@
phpSettings.date.timezone = "Europe/Paris"
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
phpSettings.date.timezone = "Europe/Paris"
includePaths.library = LIBRARY_PATH
includePaths.library = APPLICATION_PATH "/../library"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"

View File

@ -4,6 +4,9 @@
<li><a href="<?=$this->url(array('controller'=>'dashboard', 'action'=>'index'), null, true)?>">Tableau de bord</a></li>
<li><a href="<?=$this->url(array('controller'=>'aide', 'action'=>'index'), null, true)?>">Aide</a></li>
<li><a href="<?=$this->url(array('controller'=>'aide', 'action'=>'aproposde'), null, true)?>">A propos de</a></li>
<?php if ( $this->admin ) {?>
<li><a href="<?=$this->url(array('controller'=>'gestion', 'action'=>'index'), null, true)?>">Gestion</a></li>
<?php }?>
<li><a href="<?=$this->url(array('controller'=>'user', 'action'=>'logout'), null, true)?>">Déconnexion</a></li>
</ul>
</div>

View File

@ -1,6 +1,5 @@
<?php
class ComptageController extends Libs_Controller
class ComptageController extends Zend_Controller_Action
{
public function init()
{
@ -50,5 +49,45 @@ class ComptageController extends Libs_Controller
$object = new Object_Comptage();
$object->saveComptage($request->getParam('ref', ''));
}
public function updateAction()
{
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$idCriteres = $request->getParam('id');
//Récupération des critères du ciblage
$criteresM = new Table_Criteres();
$criteresRow = $criteresM->find($idCriteres);
$criteres = $criteresRow->current();
$structure = json_decode($criteres->criteres, true);
require_once 'Scores/Field.php';
$field = new Fields();
$values = $field->getValues($structure);
//Comptage
require_once 'Scores/Ciblage.php';
$ciblage = new Ciblage($values);
$data = array(
'idDefinition' => $idCriteres,
'resultat' => $ciblage->execute(),
'uniteInsee' => $ciblage->calculRedevanceInsee(),
'dateAjout' => date('YmdHis'),
);
//Enregistrement
$comptageM = new Table_Comptages();
$comptageM->insert($data);
//Retour comptage, unité Insee
$result = array(
'resultat' => number_format($data['resultat'], 0, '', ' '),
'uniteInsee' => number_format($data['dateAjout'], 0, '', ' '),
'dateAjout' => substr($data['dateAjout'],6,2).'/'.substr($data['dateAjout'],4,2).'/'.substr($data['dateAjout'],6,2)
.' '.substr($data['dateAjout'],8,2).':'.substr($data['dateAjout'],10,2).':'.substr($data['dateAjout'],12,2),
);
$this->view->assign('result', $result);
}
}

View File

@ -10,13 +10,37 @@ class DashboardController extends Libs_Controller
public function indexAction()
{
$object = new Object_Dashboard();
$this->view->comptages = $object->index();
}
public function menuAction()
{
// action body
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
//Affichage des derniers enrichissements
$enrichissementsM = new Table_EnrichissementIdentifiants();
$sql = $enrichissementsM->select()
->setIntegrityCheck(false)
->from(
array('i' => 'enrichissement_identifiants'),
array('id', 'reference', 'fichier', 'nbLigneTotales', 'nbLigneTraites', 'error', 'dateAdded', 'dateStart', 'dateStop')
)
->join(
array('c' => 'comptages'), 'i.idComptage = c.id',
array('')
)
->join(
array('criteres' => 'criteres'), 'i.idCriteres = criteres.id',
array('')
)
->where('criteres.idClient = ?', $user->idClient)
->where('criteres.login = ?', $user->username)
->order('dateAdded DESC');
$enrichissements = $enrichissementsM->fetchAll($sql);
$this->view->assign('enrichissements', $enrichissements);
}
public function ciblagesAction()
@ -29,7 +53,7 @@ class DashboardController extends Libs_Controller
$this->view->nbCiblage = $assigns['nbCiblage'];
}
public function ciblagedetailAction()
public function ciblageAction()
{
$object = new Object_Dashboard();
@ -38,6 +62,7 @@ class DashboardController extends Libs_Controller
$this->view->criteres = $comptage['criteres'];
$this->view->comptages = $comptage['comptages'];
}
public function rcomptageAction()
@ -63,24 +88,60 @@ class DashboardController extends Libs_Controller
$output[] = array(
'label' => $item->reference . $separator . $item->date,
'value' => $item->reference,
'url' => $this->view->url(array('controller'=>'dashboard', 'action'=>'ciblagedetail', 'id'=>$item->id)),
'url' => $this->view->url(array('controller'=>'dashboard', 'action'=>'ciblage', 'id'=>$item->id)),
);
}
}
echo json_encode($output);
}
public function configurationAction()
/**
* Liste des enrichissements
*/
public function enrichissementsAction()
{
// action body
}
public function exportsAction()
{
// action body
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
//Criteres => Comptages (last) => enrichissement_identifiants => enrichissement_commandes
$enrichissementsM = new Table_EnrichissementIdentifiants();
$sql = $enrichissementsM->select()
->setIntegrityCheck(false)
->from(
array('i' => 'enrichissement_identifiants'),
array('id', 'reference', 'fichier', 'nbLigneTotales', 'nbLigneTraites', 'error', 'dateAdded', 'dateStart', 'dateStop')
)
->join(
array('c' => 'comptages'), 'i.idComptage = c.id',
array('')
)
->join(
array('criteres' => 'criteres'), 'i.idCriteres = criteres.id',
array('')
);
$sql->where('i.dateStop = ?', 0)
->where('criteres.idClient = ?', $user->idClient)
->where('criteres.login = ?', $user->username);
$encours = $enrichissementsM->fetchAll($sql);
$this->view->assign('encours', $encours);
$sql->where('i.dateStop != ?', 0)
->where('criteres.idClient = ?', $user->idClient)
->where('criteres.login = ?', $user->username);
$fini = $enrichissementsM->fetchAll($sql);
$this->view->assign('fini', $fini);
}
/**
* Détail d'un enrichissment
*/
public function enrichissementAction()
{
}
}

View File

@ -11,9 +11,7 @@ class EconomiqueController extends Libs_Controller
{
require_once('Scores/Field.php');
$this->view->headLink()->appendStylesheet('/themes/default/styles/'.$this->getRequest()->getControllerName().'.css', 'all');
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
$field = new Fields($user->username);
$field = new Fields();
$this->view->fields = $field;
}
@ -25,5 +23,24 @@ class EconomiqueController extends Libs_Controller
$session = new SessionCiblage();
$session->resetFamille('economique');
}
public function completedAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender();
$request = $this->getRequest();
$table = new Table_Nafs();
$sql = $table->select()
->where('lib LIKE "%'.$this->getRequest()->getParam('q').'%"');
$result = $table->fetchAll($sql);
foreach ($result as $item) {
$output[] = array(
'label' => $item->lib . $separator . $item->code,
'value' => $item->code
);
}
echo json_encode($output);
}
}

View File

@ -65,4 +65,126 @@ class EnrichissementController extends Zend_Controller_Action
}
/**
* Enregistrement de la commande pour l'ennrichissement
*/
public function commandeAction()
{
$request = $this->getRequest();
$idCriteres = $request->getParam('id', null);
$idProfil = $request->getParam('profil', null);
//Vérifier les profils du client
if ( $idProfil===null ){
//Selection du profil du client
}
//Récupération des critères du ciblage
$criteresM = new Table_Criteres();
$criteresRow = $criteresM->find($idCriteres);
$criteres = $criteresRow->current();
$structure = json_decode($criteres->criteres, true);
require_once 'Scores/Field.php';
$field = new Fields();
$values = $field->getValues($structure);
//Actualisation du comptage
require_once 'Scores/Ciblage.php';
$ciblage = new Ciblage($values);
$infosExtraction = $ciblage->extract();
//Enregistrement du nouveau comptage
$data = array(
'idDefinition' => $criteres->id,
'resultat' => $infosExtraction['total'],
'uniteInsee' => $infosExtraction['insee'],
'dateAjout' => date('YmdHis'),
);
$comptagesM = new Table_Comptages();
$idComptage = $comptagesM->insert($data);
//Récupération des SIRET
//Attention calcul uniteInsee réelle
//car si donnée insee alors toutes les lignes doivent être comptés en unité insee
$data = array(
'idComptage' => $idComptage,
'idCriteres' => $criteres->id,
'idProfil' => $idProfil,
'identifiants' => $infosExtraction['result'],
'idProfil' => $idProfil,
'fichier' => '',
'nbLigneTotales' => $infosExtraction['total'],
'nbLigneTraites' => '',
'uniteInsee' => $infosExtraction['insee'],
'error' => '',
'dateAdded' => date('YmdHis'),
);
$identifiantsM = new Table_EnrichissementIdentifiants();
$idIdentifiant = $identifiantsM->insert($data);
}
/**
* Demande de référence pour l'enrichissement
*/
public function referenceAction()
{
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
//Récupération du profil de l'utilisateur
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
$profilsM = new Table_EnrichissementProfils();
$sql = $profilsM->select()
->from($profilsM, array('id', 'reference', 'tarifLigne', 'dataInsee'))
->where('idClient=?', $user->idClient)
->where('login=?', $user->username)
->where('actif=?', 1);
$profil = $profilsM->fetchRow($sql);
if ($profil)
{
$idCritere = $request->getParam('id', null);
$comptagesM = new Table_Comptages();
$sql = $comptagesM->select()
->where('idDefinition = ?', $idCritere)
->order('dateAjout DESC')
->limit(1);
$comptages = $comptagesM->fetchAll($sql);
if ( $comptages->count()>0 ) {
$item = $comptages[0];
//Si le ciblage n'est pas du jour, refaire le comptage par rapport aux critères de ciblage
$this->view->assign('resultat', $item['resultat']);
$this->view->assign('uniteInsee', $item['uniteInsee']);
//Calcul du prix
$prixInsee = $item['uniteInsee']*$redevanceInsee;
$infoInsee = '';
if ($profil->dataInsee){
$prixInsee = $item['resultat']*$redevanceInsee;
$infoInsee = "Votre profil inclus au moins une donnée Insee, la redevance sera applicable sur chaque ligne.";
}
$prix = $item['resultat'] * $profil->tarifLigne + $prixInsee;
$this->view->assign('prix', $prix);
$this->view->assign('prixInsee', $prixInsee);
$this->view->assign('infoInsee', $infoInsee);
$this->view->assign('id', $item['id']);
}
}
}
}

View File

@ -11,9 +11,7 @@ class EntrepriseController extends Libs_Controller
{
require_once('Scores/Field.php');
$this->view->headLink()->appendStylesheet('/themes/default/styles/'.$this->getRequest()->getControllerName().'.css', 'all');
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
$field = new Fields($user->username);
$field = new Fields();
$this->view->fields = $field;
}

View File

@ -14,7 +14,7 @@ class FinancierController extends Libs_Controller
$this->view->headLink()->appendStylesheet('/themes/default/styles/'.$this->getRequest()->getControllerName().'.css', 'all');
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
$field = new Fields($user->username);
$field = new Fields();
$this->view->fields = $field;
}

View File

@ -14,7 +14,7 @@ class GeographiqueController extends Libs_Controller
$this->view->headLink()->appendStylesheet('/themes/default/styles/'.$this->getRequest()->getControllerName().'.css', 'all');
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
$field = new Fields($user->username);
$field = new Fields();
$this->view->fields = $field;
}
@ -26,5 +26,69 @@ class GeographiqueController extends Libs_Controller
$session = new SessionCiblage();
$session->resetFamille('geographique');
}
public function completedAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender();
$request = $this->getRequest();
if($request->getParam('dep')) {
$output = $this->completedDep($request->getParam('q'));
} else if ($request->getParam('reg')) {
$output = $this->completedReg($request->getParam('q'));
} else if($request->getParam('vil')) {
$output = $this->completedVil($request->getParam('q'));
}
echo json_encode($output);
}
protected function completedDep($q)
{
$table = new Table_Departements();
$sql = $table->select()
->where('libdep LIKE "'.$q.'%"');
$result = $table->fetchAll($sql);
foreach ($result as $item) {
$output[] = array(
'label' => $item->libdep . $separator . $item->numdep,
'value' => 'D'.$item->numdep
);
}
return ($output);
}
protected function completedVil($q)
{
$table = new Table_Codepostauxs();
$sql = $table->select()->where('Commune LIKE "'.$q.'%"');
$result = $table->fetchAll($sql);
foreach ($result as $item) {
$output[] = array(
'label' => $item->Commune . $separator . $item->Codepos,
'value' => $item->INSEE
);
}
return ($output);
}
protected function completedReg($q)
{
$table = new Table_Regions();
$sql = $table->select()
->where('NCCENR LIKE "%'.$q.'%"');
$result = $table->fetchAll($sql);
foreach ($result as $item) {
$output[] = array(
'label' => $item->NCCENR . $separator . $item->REGION,
'value' => 'R'.$item->REGION
);
}
return ($output);
}
}

View File

@ -0,0 +1,59 @@
<?php
class GestionController extends Zend_Controller_Action
{
public function preDispatch()
{
}
public function init()
{
$this->view->headLink()->appendStylesheet('/themes/default/styles/dashboard.css', 'all');
}
public function indexAction()
{
}
public function profilsAction()
{
$profilsM = new Table_EnrichissementProfils();
$sql = $profilsM->select()
->from($profilsM, array('id', 'idClient', 'login', 'reference', 'tarifLigne', 'dateAjout', 'dateSuppr', 'actif'));
$profils = $profilsM->fetchAll($sql);
$this->view->assign('profils', $profils);
}
public function profilAction(){}
public function profiladdAction()
{
$request = $this->getRequest();
//Sauvegarde du formulaire
if ( $request->isPost() ){
}
//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);
}
public function profildelAction(){}
}

View File

@ -4,7 +4,11 @@ Class IndexController extends Libs_Controller
public function init()
{
/* Initialize action controller here */
$this->view->headScript()
->appendFile('/themes/default/scripts/jquery.jstree.js', 'text/javascript')
->appendFile('/themes/default/scripts/fields.js', 'text/javascript')
->appendFile('/themes/default/scripts/autocompleted.js', 'text/javascript');
/* Initialize action controller here */
}
public function indexAction()

View File

@ -12,9 +12,7 @@ class JuridiqueController extends Libs_Controller
{
require_once('Scores/Field.php');
$this->view->headLink()->appendStylesheet('/themes/default/styles/'.$this->getRequest()->getControllerName().'.css', 'all');
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
$field = new Fields($user->username);
$field = new Fields();
$this->view->fields = $field;
}
@ -26,5 +24,24 @@ class JuridiqueController extends Libs_Controller
$session = new SessionCiblage();
$session->resetFamille('juridique');
}
public function completedAction()
{
$table = new Table_Formejuridiques();
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender();
$request = $this->getRequest();
$sql = $table->select()
->where('fjLibelle LIKE "'.$request->getParam('q').'%"');
$result = $table->fetchAll($sql);
foreach ($result as $item) {
$output[] = array(
'label' => $item->fjLibelle . $separator . $item->fjCode,
'value' => $item->fjCode
);
}
echo json_encode($output);
}
}

View File

@ -67,11 +67,25 @@ class Object_Comptage extends Libs_Row
$sessionValeur = $session->getCritere($key);
$session->setCritere($key, $valeur);
if($valeur[strlen($valeur)] == ',')
$valeur = substr($valeur, 0, strlen($valeur) -1);
if($key == 'reg' or $key == 'vil' or $key == 'dep') {
$key = 'adr_com';
if($session->getCritere('reg')){
$reg = trim($session->getCritere('reg'));
}
if($session->getCritere('vil')){
$vil = trim($session->getCritere('vil'));
}
if($session->getCritere('dep')){
$dep = trim($session->getCritere('dep'));
}
$valeur = implode('', array($reg, $vil, $dep));
$session->setCritere($key, $valeur);
}
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
require_once 'Scores/Field.php';
$field = new Fields($user->username);
$field = new Fields();
//Comptage
require_once 'Scores/Ciblage.php';
@ -84,8 +98,8 @@ class Object_Comptage extends Libs_Row
//Retour comptage, unité Insee
$result = array(
'count' => number_format($total, 0, '', ' '),
'insee' => number_format($insee, 0, '', ' ')
'count' => number_format($total, 0, '', ' '),
'insee' => number_format($insee, 0, '', ' ')
);
return (json_encode($result));
}

View File

@ -7,8 +7,8 @@ Class Object_Dashboard
$user = $auth->getIdentity();
$criteresM = new Table_Criteres();
$sql = $criteresM->select(true)
->columns(array('id', 'reference', 'dateAjout'))
$sql = $criteresM->select()
->from($criteresM, array('id', 'reference', 'dateAjout'))
->where("idClient = ?", $user->idClient)
->where("login = ?", $user->username)
->order('dateAjout DESC')
@ -21,13 +21,13 @@ Class Object_Dashboard
foreach($rows->toArray() as $item)
{
$info = array(
'id' => $item['id'],
'reference' => $item['reference'],
'dateCriteres' => $item['dateAjout'],
'id' => $item['id'],
'reference' => $item['reference'],
'dateCriteres' => $item['dateAjout'],
);
//Recherche des comptages
$sql = $comptagesM->select(true)
->columns(array('resultat', 'uniteInsee', 'dateAjout'))
$sql = $comptagesM->select()
->from($comptagesM, array('resultat', 'uniteInsee', "DATE_FORMAT(dateAjout, '%d/%m/%Y %H:%i:%s') as dateAjout"))
->where('idDefinition = ?', $item['id'])
->order('dateAjout DESC')->limit(1);
$comptage = $comptagesM->fetchAll($sql)->toArray();
@ -55,9 +55,7 @@ Class Object_Dashboard
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
$db = Zend_Registry::get('db');
$criteresM = new Table_Criteres($db);
$criteresM = new Table_Criteres();
//Compter le nombre de page
$sql = $criteresM->select()
@ -78,17 +76,17 @@ Class Object_Dashboard
$rows = $criteresM->fetchAll($sql);
$results = array();
$comptagesM = new Table_Comptages($db);
$comptagesM = new Table_Comptages();
foreach($rows->toArray() as $item)
{
$info = array(
'id' => $item['id'],
'reference' => $item['reference'],
'dateCriteres' => $item['dateAjout'],
'id' => $item['id'],
'reference' => $item['reference'],
'dateCriteres' => $item['dateAjout'],
);
//Recherche des comptages
$sql = $comptagesM->select(true)
->columns(array('resultat', 'uniteInsee', 'dateAjout'))
$sql = $comptagesM->select()
->from($comptagesM, array('resultat', 'uniteInsee', "DATE_FORMAT(dateAjout, '%d/%m/%Y %H:%i:%s') as dateAjout"))
->where('idDefinition = ?', $item['id'])
->order('dateAjout DESC')->limit(1);
$comptage = $comptagesM->fetchAll($sql)->toArray();
@ -141,9 +139,9 @@ Class Object_Dashboard
$separator = " , ";
foreach ($rows as $item) {
$output[] = array(
'label' => $item->reference . $separator . $item->date,
'value' => $item->reference,
'url' => $this->view->url(array('controller'=>'dashboard', 'action'=>'ciblagedetail', 'id'=>$item->id)),
'label' => $item->reference . $separator . $item->date,
'value' => $item->reference,
'url' => $this->view->url(array('controller'=>'dashboard', 'action'=>'ciblage', 'id'=>$item->id)),
);
}
}

View File

@ -0,0 +1,5 @@
<?php
class Object_Minmax extends Libs_Row
{
}

View File

@ -0,0 +1,5 @@
<?php
class Table_EnrichissementIdentifiants extends Zend_Db_Table_Abstract
{
public $_name = 'enrichissement_identifiants';
}

View File

@ -0,0 +1,5 @@
<?php
class Table_EnrichissementProfils extends Zend_Db_Table_Abstract
{
public $_name = 'enrichissement_profils';
}

View File

@ -0,0 +1,5 @@
<?php
class Table_MinMaxs extends Libs_Table
{
protected $_name = 'minmax';
}

View File

@ -1,12 +1,13 @@
<?php
Class Zend_View_Helper_Field extends Zend_View_Helper_Abstract
{
public function Field($name, $field)
public function Field($name, $field, $type = null)
{
$html = '';
if($field != null) {
$html.= '<div class="fieldgrp">';
$type = $field['type'];
if($type == null)
$type = $field['type'];
switch($type)
{
case 'select':
@ -35,9 +36,22 @@ Class Zend_View_Helper_Field extends Zend_View_Helper_Abstract
$this->dateHTML($name, $field));
break;
case 'text':
switch($name) {
case 'reg':
$label = 'Localisation Régions';
break;
case 'vil':
$label = 'Localisation Villes';
break;
case 'dep':
$label = 'Localisation Départements';
break;
default:
$label = $field['label'];
}
$html.= $this->structureHTML(
$field['label'],
$this->textHTML($name, $field));
$label,
$this->textHTML($name, $field, $name));
break;
case 'textarea':
$html.= $this->structureHTML(
@ -177,12 +191,29 @@ Class Zend_View_Helper_Field extends Zend_View_Helper_Abstract
}
/* Textes */
private function textHTML($name, $field)
private function textHTML($name, $field, $name)
{
$session = new SessionCiblage();
$return = '<input style="border:1px inset silver;width:60%" class="criteres" type="text" name="'.$name.'" value="'.$session->getCritere($name).'" />';
switch($name) {
case 'ape_entrep':
case 'ape_etab':
$type = 'Naf';
break;
case 'dep':
$type = 'Dep';
break;
case 'reg':
$type = 'Reg';
break;
case 'vil':
$type= 'Vil';
break;
case 'cj':
$type = 'Cj';
break;
}
$return = '<textarea rows="5" style="border:1px inset silver;width:60%" class="criteres complited'.$type.'" id="textarea_'.$name.'" name="'.$name.'">'.$session->getCritere($name).'</textarea>';
$return .= '<a href="" class="autocomplet" textarea="'.$name.'">Valider</a>';
return ($return);
}

View File

@ -0,0 +1 @@
<?=json_encode($this->result)?>

View File

@ -1,5 +1,5 @@
<div class="dashboard" style="padding:10px">
<a href="/dashboard/index">Tableau de bord</a> > detail du ciblage
<div id="dashboard" style="padding:10px">
<a href="/dashboard/index">Tableau de bord</a> > Detail du ciblage
<h2></h2>
<fieldset>
@ -30,4 +30,33 @@
</tbody>
</table>
</fieldset>
<fieldset>
<legend>Enrichissements</legend>
<?php if ( count($this->enrichissements)>0 ) {?>
<table style="width:100%">
<thead>
<tr>
<th>Date</th>
<th>Reférence</th>
<th>Nombre de lignes</th>
<th>Fichier</th>
</tr>
</thead>
<tbody>
<?php foreach($this->enrichissements as $item):?>
<tr>
<th><?=$item['dateAdded']?></th>
<th><?=$item['reference']?></th>
<th><?=number_format($item['nbLigneTotales'], 0, '', ' ')?></th>
<th><?=$item['fichier']?></th>
</tr>
<?php endforeach;?>
</tbody>
</table>
<?php }?>
</fieldset>
</div>

View File

@ -17,22 +17,20 @@ Liste de vos ciblages
<th>Nombre d'entité</th>
<th>Unité Insee</th>
<th>Date</th>
<th>Action</th>
<th colspan="4"></th>
</tr>
</thead>
<tbody>
<?php foreach($this->ciblages as $item):?>
<tr>
<td><?=$item['reference']?></td>
<td><?=number_format($item['resultat'], 0, ',', ' ')?></td>
<td><?=number_format($item['uniteInsee'], 0, ',', ' ')?></td>
<td><?=$item['dateComptage']?></td>
<td>
[<a href="<?=$this->url(array('controller'=> 'dashboard','action'=>'ciblagedetail', 'id'=>$item['id']))?>">Détails</a>] -
[<a href="<?=$this->url(array('controller'=> 'index','action'=>'index', 'id'=>$item['id']))?>">Recharger les critères de ciblage</a>] -
[<a href="<?=$this->url(array('controller'=> 'comptage','action'=>'update', 'id'=>$item['id']))?>">Actualiser le comptage</a>] -
[<a href="<?=$this->url(array('controller'=> 'comptage','action'=>'update', 'id'=>$item['id']))?>">Enrichissement</a>]
</td>
<td class="reference"><?=$item['reference']?></td>
<td class="update resultat"><?=number_format($item['resultat'], 0, ',', ' ')?></td>
<td class="update insee"><?=number_format($item['uniteInsee'], 0, ',', ' ')?></td>
<td class="update date"><?=$item['dateComptage']?></td>
<td><a class="update" href="<?=$this->url(array('controller'=> 'comptage','action'=>'update', 'id'=>$item['id']))?>">Actualiser</a></td>
<td><a href="<?=$this->url(array('controller'=> 'index','action'=>'index', 'id'=>$item['id']))?>">Recharger les critères de ciblage</a></td>
<td><a href="<?=$this->url(array('controller'=> 'dashboard','action'=>'ciblage', 'id'=>$item['id']))?>">Detail</a></td>
<td><a class="enrichissementref" href="<?=$this->url(array('controller'=> 'enrichissement','action'=>'reference', 'id'=>$item['id']))?>">Enrichissement</a></td>
</tr>
<?php endforeach;?>
</tbody>

View File

@ -0,0 +1,94 @@
<div id="dashboard">
<div class="chemin">
<a href="<?=$this->url(array('controller'=>'dashboard', 'action'=>''))?>">Tableau de bord</a> >
Enrichissement à partir d'un ciblage
</div>
<h2>Fichiers en cours d'enrichissement</h2>
<?php if(count($this->encours) > 0):?>
<table>
<thead>
<tr>
<th>Référence</th>
<th>Nombre de lignes totales</th>
<th>Nombre de lignes traitées</th>
<th>Date</th>
<th>Etat</th>
</tr>
</thead>
<tbody>
<?php foreach($this->encours as $item):?>
<tr>
<td><?=$item['reference']?></td>
<td><?=number_format($item['nbLigneTotales'], 0, ',', ' ')?></td>
<td><?=number_format($item['nbLigneTraites'], 0, ',', ' ')?></td>
<td><?=$item['dateAdded']?></td>
<td>
<?php if ( $item['dateStart']!='0000-00-00 00:00:00' ) {?>
En cours de traitement
<?php } else {?>
En attente de traitement
<?php } ?>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<?php else:?>
<p>Aucun enrichissement en cours.<p>
<?php endif;?>
<h2>Fichiers enrichis</h2>
<?php if(count($this->fini) > 0):?>
<table>
<thead>
<tr>
<th>Référence</th>
<th>Nombre de lignes totales</th>
<th>Date</th>
<th>Fichier</th>
</tr>
</thead>
<tbody>
<?php foreach($this->fini as $item):?>
<tr>
<td><?=$item['reference']?></td>
<td><?=number_format($item['nbLigneTotales'], 0, ',', ' ')?></td>
<td><?=$item['dateAdded']?></td>
<td><?=$item['fichier']?></td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<?php else:?>
<p>Aucun enrichissement.<p>
<?php endif;?>
</div>
<script>
$(document).ready(function()
{
$(document).focusin(function(){
timer = setInterval(updateInfo, 10000);
});
$(document).focusout(function(){
clearInterval(timer);
});
timer = setInterval(updateInfo, 10000);
});
var timer;
function updateInfo()
{
$('tr.encours').each(function(){
var objet = $(this);
var id = $(this).attr('id');
$.getJSON('/index/getinfo', {id: id}, function(data){
if (data!=''){ objet.find('td.ligne').text(data.nbLigneT); }
});
});
}
</script>

View File

@ -1,17 +0,0 @@
<div id="dashboard">
<div class="chemin">
<a href="<?=$this->url(array('controller'=>'dashboard', 'action'=>''))?>">Tableau de bord</a> >
Enrichissement de fichier
</div>
<a href="<?=$this->url(array('controller'=>'enrichissement', 'action'=>'fileform'))?>">Envoyer votre fichier pour enrichissement</a>
<h2>Fichiers en cours d'enrichissement</h2>
<h2>Fichiers enrichis</h2>
</div>

View File

@ -5,9 +5,10 @@
</div>
<div id="menu">
<a href="<?=$this->url(array('controller'=>'dashboard', 'action'=>'ciblages'))?>">Historique de vos ciblages</a> -
<a href="<?=$this->url(array('controller'=>'dashboard', 'action'=>'ciblages'))?>">Liste de vos ciblages</a> -
<a href="<?=$this->url(array('controller'=>'dashboard', 'action'=>'enrichissements'))?>">Liste de vos enrichissements</a> -
<a href="<?=$this->url(array('controller'=>'dashboard', 'action'=>'configuration'))?>">Préférences de l'application</a> -
<a href="<?=$this->url(array('controller'=>'dashboard', 'action'=>'exports'))?>">Enrichissement de fichier</a>
<a href="<?=$this->url(array('controller'=>'dashboard', 'action'=>''))?>">Enrichissement de fichier</a>
</div>
<div id="rechercheCiblage">
@ -25,21 +26,21 @@
<th>Référence</th>
<th>Nombre d'entité</th>
<th>Unité Insee</th>
<th colspan="4">actions sur vos comptages</th>
<th>Date</th>
<th colspan="4"></th>
</tr>
</thead>
<tbody>
<?php foreach($this->comptages as $name => $item):?>
<tr class="tooltip" id="<?php echo $item['id'];?>">
<tr>
<td class="reference"><?=$item['reference']?></td>
<td class="resultat"><?=number_format($item['resultat'], 0, ',', ' ')?></td>
<td class="insee"><?=number_format($item['uniteInsee'], 0, ',', ' ')?></td>
<td><a class="chargement" href="/dashboard/ciblagedetail/id/<?php echo $item['id'];?>">Detail</a></td>
<td><a href="<?//=$this->url(array('controller'=> 'index','action'=>'index', 'id'=>$item['id']))?>">Recharger les critères de ciblage</a></td>
<td><a href="<?//=$this->url(array('controller'=> 'comptage','action'=>'update', 'id'=>$item['id']))?>">Actualiser le comptage</a></td>
<td><a href="<?//=$this->url(array('controller'=> 'comptage','action'=>'update', 'id'=>$item['id']))?>">Enrichissement</a></td>
<td id="ch_<?php echo $item['id'];?>" class="date"><?=$item['dateComptage']?></td>
<td class="update resultat"><?=number_format($item['resultat'], 0, ',', ' ')?></td>
<td class="update insee"><?=number_format($item['uniteInsee'], 0, ',', ' ')?></td>
<td class="update date"><?=$item['dateComptage']?></td>
<td><a class="update" href="<?=$this->url(array('controller'=> 'comptage','action'=>'update', 'id'=>$item['id']))?>">Actualiser</a></td>
<td><a href="<?=$this->url(array('controller'=> 'index','action'=>'index', 'id'=>$item['id']))?>">Recharger les critères de ciblage</a></td>
<td><a href="<?=$this->url(array('controller'=> 'dashboard','action'=>'ciblage', 'id'=>$item['id']))?>">Detail</a></td>
<td><a class="enrichissementref" href="<?=$this->url(array('controller'=> 'enrichissement','action'=>'reference', 'id'=>$item['id']))?>">Enrichissement</a></td>
</tr>
<?php endforeach;?>
</tbody>
@ -52,4 +53,36 @@
<div id="lastEnrichissement">
<h2>Vos derniers enrichissements</h2>
<?php if(count($this->enrichissement) > 0):?>
<table>
<thead>
<tr>
<th>Référence</th>
<th>Nombre de lignes totales</th>
<th>Date</th>
<th>Etat</th>
</tr>
</thead>
<tbody>
<?php foreach($this->enrichissement as $item):?>
<tr>
<td><?=$item['reference']?></td>
<td><?=number_format($item['nbLigneTotales'], 0, ',', ' ')?></td>
<td><?=$item['dateAdded']?></td>
<td>
<?php if ( $item['dateStop']!='0000-00-00 00:00:00' ) {?>
Terminé
<?php }elseif ( $item['dateStart']!='0000-00-00 00:00:00' ) {?>
En cours de traitement
<?php } else {?>
En attente de traitement
<?php } ?>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<?php else:?>
<p>Aucun enrichissement.<p>
<?php endif;?>
</div>

View File

@ -5,7 +5,9 @@
<ul id="fieldsblock">
<li><?php echo $this->Field('capital', $this->fields->get('capital'));?></li>
<li><?php echo $this->Field('ape_etab', $this->fields->get('ape_etab'));?></li>
<li style="background-image:none;height:80px;"><?php echo $this->Field('ape_etab', $this->fields->get('ape_etab'), 'text');?></li>
<li><?php echo $this->Field('ape_entrep', $this->fields->get('ape_entrep'));?></li>
<li style="background-image:none;height:80px;"><?php echo $this->Field('ape_entrep', $this->fields->get('ape_entrep'), 'text');?></li>
<li><?php echo $this->Field('age_entrep', $this->fields->get('age_entrep'));?></li>
<li><?php echo $this->Field('age_etab', $this->fields->get('age_etab'));?></li>
<li><?php echo $this->Field('teff_entrep', $this->fields->get('teff_entrep'));?></li>

View File

@ -0,0 +1,35 @@
<?php if ( !$this->profil ) {?>
Aucun profil d'enrichissement, Merci de prendre contact avec le service commercial.
<?php }elseif ( empty($this->id) ) {?>
Erreur
<?php } elseif ($this->resultat>50000) {?>
<p>Le nombre de lignes à enrichir est trop important.
Vous pouvez prendre contact avec le service commercial en cliquant ici.
Vos critères seront enregistrées et une référence vous sera fourni.</p>
<?php } else {?>
<p>Votre ciblage a été actualisé</p>
<p>
Nombre d'unités : <?=$this->resultat?><br/>
Nombre d'unités Insee : <?=$this->uniteInsee?><br/>
<strong>Prix du fichier : <?=$this->prix?></strong> € (dont <?=$this->prixInsee?> € de redevance Insee)
</p>
<?php if (!empty($this->infoInsee)) {?>
<br/>
<p><?=$this->infoInsee?></p>
<?php }?>
<br/>
<p>Les tarifs sont données à titre indicatif et peuvent variées suivant les spécificités de votre compte.</p>
<br/>
<p>
Les informations permettant l'enrichissement seront enregistrées, après la saisie de votre référence.
</p>
<br/>
<form>
<input type="hidden" name="id" value="<?=$this->id?>" />
<label>Référence : </label><input type="text" name="ref">
</form>
<script>
</script>
<?php }?>

View File

@ -15,7 +15,9 @@
<li id="nbMPublic" ><?php echo $this->Field('nbMPubli', $this->fields->get('nbMPubli'));?></li>
<li id="li_dateCrea_etab" ><?php echo $this->Field('dateCrea_ent',$this->fields->get('dateCrea_ent'));?></li>
<li id="li_dateCrea_etab" ><?php echo $this->Field('dateCrea_etab', $this->fields->get('dateCrea_etab'));?></li>
<li id="action" ><?php echo $this->Field('action', $this->fields->get('action'));?></li>
<li id="nbActio" ><?php echo $this->Field('nbActio', $this->fields->get('nbActio'));?></li>
<li id="part" ><?php echo $this->Field('part', $this->fields->get('part'));?></li>
<li id="nbPart" ><?php echo $this->Field('nbPart', $this->fields->get('nbPart'));?></li>
</ul>
</div>

View File

@ -1,6 +1,9 @@
<div id="geographique">
<ul id="fieldsblock">
<li><?php echo $this->Field('adr_com', $this->fields->get('adr_com'));?></li>
<li style="background-image:none;height:80px;"><?php echo $this->Field('vil', $this->fields->get('adr_com'), 'text');?></li>
<li style="background-image:none;height:80px;"><?php echo $this->Field('dep', $this->fields->get('adr_com'), 'text');?></li>
<li style="background-image:none;height:80px;"><?php echo $this->Field('reg', $this->fields->get('adr_com'), 'text');?></li>
</ul>
</div>
<div style="text-align:right;margin-top:20px;">

View File

@ -0,0 +1,13 @@
<div id="dashboard">
<h2>Gestion des profils</h2>
<a href="<?=$this->url(array('controller'=>'gestion', 'action'=>'profils'))?>">Lister les profils</a><br/>
<a href="<?=$this->url(array('controller'=>'gestion', 'action'=>'profiladd'))?>">Créer un profil d'enrichissement pour un client (idClient, login)</a>
<h2>Gestion des commandes</h2>
<a href="">Commande</a><br/>
<a href="">Lister les commandes</a>
<h2>Facturation</h2>
</div>

View File

@ -0,0 +1 @@
<?php

View File

@ -0,0 +1,41 @@
<div id="dashboard">
<form>
<label>idClient</label>
<input type="text" name="idClient" />
<br/>
<label>login</label>
<input type="text" name="login" />
<br/>
<label>Reference</label>
<input type="text" name="reference" />
<br/>
<label>tarifLigne</label>
<input type="text" name="tarifLigne" />
<br/>
<div style="width:100%;">
<div style="width:45%;float:left;">
<label>Selection des données pour l'enrichissement</label>
<select name="listcriteres">
<option value="">-</option>
<?php if ( count($this->fields)>0 ) {?>
<?php foreach ( $this->fields as $value => $lib ) {?>
<option value="<?=$value?>"><?=$lib?></option>
<?php }?>
<?php }?>
</select>
</div>
<div style="width:45%;float:right;" id="criteres">
Criteres
</div>
</div>
<div style="clear:both;"></div>
</form>
</div>

View File

@ -0,0 +1 @@
<?php

View File

@ -0,0 +1,33 @@
<div id="dashboard">
<h2>Liste des profils</h2>
<table>
<thead>
<tr>
<th>idClient</th>
<th>login</th>
<th>reference</th>
<th>tarifLigne</th>
<th>dateAjout</th>
<th>dateSuppr</th>
<th>actif</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php foreach ( $this->profils as $profil ) {?>
<tr>
<td><?=$profil['idClient']?></td>
<td><?=$profil['login']?></td>
<td><?=$profil['reference']?></td>
<td><?=$profil['tarifLigne']?></td>
<td><?=$profil['dateAjout']?></td>
<td><?=$profil['dateSuppr']?></td>
<td><?=$profil['actif']?></td>
<td></td>
</tr>
<?php }?>
</tbody>
</table>
</div>

View File

@ -0,0 +1 @@
<?php

View File

@ -16,5 +16,5 @@
</td>
</tr>
<?php endif; ?>
<?php endforeach; ?>
<?php endforeach;?>
</table>

View File

@ -1,6 +1,7 @@
<div id="juridique">
<ul id="fieldsblock">
<li><?php echo $this->Field('cj', $this->fields->get('cj'));?></li>
<li style="background-image:none;height:80px;"><?php echo $this->Field('cj', $this->fields->get('cj'), 'text');?></li>
<li><?php echo $this->Field('actifEco', $this->fields->get('actifEco'));?></li>
<li><?php echo $this->Field('procolHisto', $this->fields->get('procolHisto'));?></li>
<li><?php echo $this->Field('tvaIntraValide', $this->fields->get('tvaIntraValide'));?></li>

70
batch/cron.php Normal file
View File

@ -0,0 +1,70 @@
#!/usr/bin/php
<?php
// Define path to application directory
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
// Define application environment
define('APPLICATION_ENV', 'production');
// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
realpath(APPLICATION_PATH . '/../library'),
get_include_path(),
)));
/** Zend_Application */
require_once 'Zend/Application.php';
// Create application, bootstrap, and run
$application = new Zend_Application(
APPLICATION_ENV,
APPLICATION_PATH . '/configs/application.ini'
);
try {
$opts = new Zend_Console_Getopt(
//Options
array(
'help|?' => "Aide.",
)
);
$opts->parse();
} catch (Zend_Console_Getopt_Exception $e) {
echo $e->getUsageMessage();
exit;
}
//Usage
if(isset($opts->help))
{
echo $opts->getUsageMessage();
exit;
}
$dbConfig = new Zend_Config_Ini(APPLICATION_PATH . '/configs/configuration.ini', 'databases');
$db = Zend_Db::factory($dbConfig->db);
$commandesM = new Table_EnrichissementCommandes($db);
$sql = $commandesM->select()
->where('idProfil != ?', 0)
->where("dateStart != '0000-00-00 00:00:00'")
->where("dateStop = '0000-00-00 00:00:00'");
$result = $commandesM->fetchAll($sql);
if (count($result)>0){
exit;
}
//Si pas de traitement en cours alors on lance
$sql = $commandesM->select()
->where('idProfil != ?', 0)
->where("dateStart = '0000-00-00 00:00:00'")
->where("dateStop = '0000-00-00 00:00:00'")
->order('dateAdded ASC')->limit(1);
$result = $commandesM->fetchAll($sql);
if (count($result)>0) {
$info = $result->current();
echo "Lancement enrichissement $info->id\n";
exec(realpath(dirname(__FILE__))."/enrichissement.php --id ".$info->id." &");
}

158
batch/enrichissement.php Normal file
View File

@ -0,0 +1,158 @@
#!/usr/bin/php
<?php
error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING);
// Define path to application directory
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
// Define application environment
define('APPLICATION_ENV', 'production');
// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
realpath(APPLICATION_PATH . '/../library'),
get_include_path(),
)));
/** Zend_Application */
require_once 'Zend/Application.php';
// Create application, bootstrap, and run
$application = new Zend_Application(
APPLICATION_ENV,
APPLICATION_PATH . '/configs/application.ini'
);
try {
$opts = new Zend_Console_Getopt(
//Options
array(
'help|?' => "Aide.",
'id=s' => "Identifiant du traitement",
'file=s' => "Traitement manuel avec spécification du fichier"
)
);
$opts->parse();
} catch (Zend_Console_Getopt_Exception $e) {
echo $e->getUsageMessage();
exit;
}
//Usage
if(isset($opts->help) || !isset($opts->id) && !isset($opts->file) )
{
echo $opts->getUsageMessage();
exit;
}
//Définition bdd
$dbConfig = new Zend_Config_Ini(APPLICATION_PATH . '/configs/configuration.ini', 'databases');
try {
$db = Zend_Db::factory($dbConfig->db);
} catch ( Exception $e ) {
exit ( $e->getMessage() );
}
//Définition bdd metier
try {
$dbMetier = Zend_Db::factory('Mysqli', $dbConfig->jo);
} catch ( Exception $e ) {
exit ( $e->getMessage() );
}
if ($opts->id) {
$commandesM = new Table_EnrichissementCommandes($db);
$commande = $commandesM->find(intval($opts->id))->current();
} else {
$file = $opts->file;
}
/* == FUNCTION == */
/**
* Verifie si un SIREN est valide
* @param Le code SIREN dont on veut vérifier la validité.
* @return Un booléen qui vaut 'true' si le code SIREN passé en
* paramètre est valide, false sinon.
*/
function sirenValide($siren) {
if ( (strlen($siren) != 9) || (is_nan($siren)) )
$estValide = false;
else {
// Donc le SIREN est un numérique à 9 chiffres
$somme = 0;
$tmp = 0;
for ($cpt = 0; $cpt<strlen($siren); $cpt++) {
if (($cpt % 2) == 1) { // Les positions paires : 2ème, 4ème, 6ème et 8ème chiffre
$tmp = substr($siren, $cpt, 1) * 2; // On le multiplie par 2
if ($tmp > 9)
$tmp-= 9; // Si le résultat est supérieur à 9, on lui soustrait 9
}
else
$tmp = substr($siren, $cpt, 1);
$somme+= intval($tmp);
}
if (($somme % 10) == 0)
$estValide = true; // Si la somme est un multiple de 10 alors le SIREN est valide
else
$estValide = false;
}
return $estValide;
}
/**
* Verifie si un SIRET est valide
* @param Le code SIRET dont on veut vérifier la validité.
* @return Un booléen qui vaut 'true' si le code SIRET passé en
* paramètre est valide, false sinon.
*/
function siretValide($siret) {
if ( (strlen($siret) != 14) || (is_nan($siret)) )
$estValide = false;
else {
// Donc le SIRET est un numérique à 14 chiffres
// Les 9 premiers chiffres sont ceux du SIREN (ou RCS), les 4 suivants
// correspondent au numéro d'établissement
// et enfin le dernier chiffre est une clef de LUHN.
$somme = 0;
$tmp = 0;
for ($cpt = 0; $cpt<strlen($siret); $cpt++) {
if (($cpt % 2) == 0) { // Les positions impaires : 1er, 3è, 5è, etc...
$tmp = substr($siret, $cpt, 1) * 2; // On le multiplie par 2
if ($tmp > 9)
$tmp-= 9; // Si le résultat est supérieur à 9, on lui soustrait 9
}
else
$tmp = substr($siret, $cpt, 1);
$somme+= intval($tmp);
}
if (($somme % 10) == 0)
$estValide = true; // Si la somme est un multiple de 10 alors le SIRET est valide
else
$estValide = false;
}
return $estValide;
}
/**
* writeCSV
* @param array $list
* @param array $entete
* @param string $filename
*/
function writeCSV($list, $entete, $filename)
{
$fp = fopen($filename, 'w');
if (count($entete)>0){
fputcsv($fp, $entete, ',', '"');
}
foreach ($list as $fields) {
fputcsv($fp, $fields, ',', '"');
}
fclose($fp);
}

88
batch/setMinMax.php Normal file
View File

@ -0,0 +1,88 @@
#!/usr/bin/php
<?php
// Define path to application directory
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
// Define application environment
define('APPLICATION_ENV', 'production');
// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
realpath(APPLICATION_PATH . '/../library'),
get_include_path(),
)));
/** Zend_Application */
require_once 'Zend/Application.php';
// Create application, bootstrap, and run
$application = new Zend_Application(
APPLICATION_ENV,
APPLICATION_PATH . '/configs/application.ini'
);
try {
$opts = new Zend_Console_Getopt(
//Options
array(
'help|?' => "Aide.",
'cron' => "Mode automatique",
'manuel' => "Mode manuel",
)
);
$opts->parse();
} catch (Zend_Console_Getopt_Exception $e) {
echo $e->getUsageMessage();
exit;
}
//Usage
if(isset($opts->help))
{
echo $opts->getUsageMessage();
exit;
}
$dbConfig = new Zend_Config_Ini(APPLICATION_PATH . '/configs/configuration.ini', 'databases');
try {
$db = Zend_Db::factory($dbConfig->db);
} catch ( Exception $e ) {
exit ( $e->getMessage() );
}
//Définition bdd metier
try {
$dbMetier = Zend_Db::factory($dbConfig->jo);
} catch ( Exception $e ) {
exit ( $e->getMessage() );
}
$keys = array(
'nbActio','nbPart', 'teff_entrep', 'teff_etab', 'nbEtab',
'eff_entrep', 'eff_etab', 'capital', 'bilEE', 'bilFL', 'bilFK', 'bilFR', 'bilGF',
'bilGP', 'bilGW', 'bilHD', 'bilHH', 'bilHL', 'bilHM', 'bilHN', 'bilYP'
);
$sql = 'TRUNCATE TABLE minmax';
if ( !$db->query($sql) ) {
die ('Impossible de vider la table minmax');
}
foreach($keys as $key) {
//Lecture
$sql = 'SELECT MIN('.$key.') AS min, MAX('.$key.') AS max FROM etablissements_act';
$dbMetier->setFetchMode(Zend_Db::FETCH_ASSOC);
$result = $stmt->fetchAll($sql);
//Insertion
$data = array(
'key' => $key,
'min' => $result['min'],
'max' => $result['max'],
);
$db->insert('minmax', $data);
if ($opts->manuel) print($key.'-> min:'.$result['min'].' max:'.$result['max']."\n");
}
if ($opts->manuel) print('Terminé');

View File

@ -0,0 +1,16 @@
CREATE TABLE IF NOT EXISTS `enrichissement_fichiers` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`idProfil` int(11) NOT NULL,
`reference` varchar(50) NOT NULL,
`identifiants` longtext NOT NULL,
`nbLigneTotales` int(11) NOT NULL,
`nbLigneTraites` int(11) NOT NULL,
`uniteInsee` int(11) NOT NULL DEFAULT '0',
`error` varchar(100) NOT NULL,
`dateAdded` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`dateStart` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`dateStop` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`fichierIn` varchar(100) NOT NULL,
`fichierOut` varchar(100) NOT NULL,
PRIMARY KEY (`id`)
) DEFAULT CHARSET=utf8;

View File

@ -1,8 +1,10 @@
CREATE TABLE IF NOT EXISTS `enrichissement_commandes` (
CREATE TABLE IF NOT EXISTS `enrichissement_identifiants` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`idComptage` int(11) NOT NULL,
`idCriteres` int(11) NOT NULL DEFAULT '0',
`idProfil` int(11) NOT NULL,
`fichier` varchar(100) NOT NULL,
`reference` varchar(50) NOT NULL,
`identifiants` longtext NOT NULL,
`nbLigneTotales` int(11) NOT NULL,
`nbLigneTraites` int(11) NOT NULL,
`uniteInsee` int(11) NOT NULL DEFAULT '0',
@ -10,5 +12,6 @@ CREATE TABLE IF NOT EXISTS `enrichissement_commandes` (
`dateAdded` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`dateStart` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`dateStop` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`fichier` varchar(100) NOT NULL,
PRIMARY KEY (`id`)
) DEFAULT CHARSET=utf8;

View File

@ -5,6 +5,7 @@ CREATE TABLE IF NOT EXISTS `enrichissement_profils` (
`reference` varchar(50) NOT NULL,
`criteres` text NOT NULL,
`tarifLigne` float NOT NULL,
`dataInsee` tinyint(4) NOT NULL,
`dateAjout` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`dateSuppr` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`actif` tinyint(4) NOT NULL,

5
config/_sql/minmax.sql Normal file
View File

@ -0,0 +1,5 @@
CREATE TABLE `minmax` (
`cle` INTEGER PRIMARY KEY NOT NULL,
`min` INTEGER NOT NULL,
`max` BIGINT NOT NULL
);

View File

@ -79,6 +79,13 @@ class Application_Controller_Plugin_Auth extends Zend_Controller_Plugin_Abstract
}
}
if ( $auth && $auth->getIdentity()->profil=='SuperAdministrateur' ){
$layout = Zend_Layout::getMVCInstance();
$view = $layout->getView();
$view->admin = true;
}
}
}
}

View File

@ -12,16 +12,32 @@ Class Ciblage
public $nb_results = 5000;
public $max_results = 500000;
public $mysql_host = '192.168.78.230';
public $mysql_user = 'sphinx';
public $mysql_password = 'indexer';
public $mysql_database = 'jo';
public $sphinx_host = '192.168.78.252';
public $sphinx_port = 3312;
public $sphinx_match = SPH_MATCH_EXTENDED2;
public $sphinx_sort = SPH_SORT_EXTENDED;
protected function setMinMax($name, $valeur)
{
if(!empty($name)) {
$default = Fields::getMinMax($name);
if(empty($valeur[0])){$valeur[0] = $default[0]['min'];}
if(empty($valeur[1])){$valeur[1] = $default[0]['max'];}
}
return ($valeur);
}
public function __construct($structure, $need = false)
{
$configuration = Zend_Registry::get('configuration');
//Instantiation Sphinx
$this->sphinx = new SphinxClient();
$this->sphinx->SetServer($configuration->sphinx->host, intval($configuration->sphinx->port));
$this->sphinx->SetServer($this->sphinx_host, $this->sphinx_port);
$this->sphinx->SetMatchMode(SPH_MATCH_EXTENDED2);
$this->sphinx->ResetFilters();
foreach($structure as $key => $valeur) {
@ -37,6 +53,21 @@ Class Ciblage
}
}
public function extract()
{
$resultats = $this->execute(true);
$siret = array();
foreach ($resutlats['matches'] as $element) {
$siret[] = $element['attrs']['siren'].$element['attrs']['nic'];
}
$total = array(
'total' => count($resultats),
'insee' => $this->calculRedevanceInsee(),
'result'=> $siret
);
return $total;
}
public function calculRedevanceInsee()
{
$this->sphinx->SetFilter('presentrcs', array(0));
@ -46,25 +77,10 @@ Class Ciblage
public function execute($need = false)
{
if($need) {
$i = 0;
$siret = array();
$resSphinx = $this->sphinx->Query($this->alpha, $this->index);
do {
$this->sphinx->SetLimits($i, $this->nb_results, $this->max_results);
$resSphinx = $this->sphinx->Query($this->alpha, $this->index);
if($resSphinx['total'] > 0) {
foreach($resSphinx['matches'] as $matches) {
if($matches['attrs']['presentrcs'] == 0)
$siret[] = $matches['attrs']['siren'];
}
$i += $this->nb_results;
}else
break;
} while($i < $resSphinx['total_found']);
return ($resSphinx['total_found']);
} else {
$resSphinx = $this->sphinx->Query($this->alpha, $this->index);
if($need) {
return ($resSphinx);
}
return ($resSphinx['total_found']);
}
@ -141,6 +157,14 @@ Class Ciblage
$this->setFilter('adr_com', $valeur);
}
protected function action($valeur) {
$this->setFilter('action', $valeur);
}
protected function part($valeur) {
$this->setFilter('part', $valeur);
}
protected function tel($valeur) {
$this->setFilter('tel', $valeur);
}
@ -154,8 +178,9 @@ Class Ciblage
}
protected function capital($valeur) {
if($valeur[0] != 0 or $valeur[1] != 0)
$this->setFilterRange('capital', $valeur);
$valeur = $this->setMinMax($name, $valeur);
$this->setFilterRange('capital', $valeur);
}
protected function ape_etab($valeur) {
@ -184,8 +209,9 @@ Class Ciblage
}
protected function teff_etab($valeur) {
if($valeur[0] != 0 or $valeur[1] != 0)
$this->setFilterRange('teff_etab', $valeur);
$valeur = $this->setMinMax($name, $valeur);
$this->setFilterRange('teff_etab', $valeur);
}
protected function rang($valeur) {
@ -217,6 +243,9 @@ Class Ciblage
}
protected function dateCrea_etab($valeur) {
if(empty($valeur[0])) {$valeur[0] = date('Ymd');}
if(empty($valeur[1])) {$valeur[1] = date('Ymd');}
if(!is_array($valeur)) {
$format = explode('/', $valeur);
$valeur = $format[2].$format[1].$format[0];
@ -232,6 +261,9 @@ Class Ciblage
}
protected function dateCrea_ent($valeur) {
if(empty($valeur[0])) {$valeur[0] = date('Ymd');}
if(empty($valeur[1])) {$valeur[1] = date('Ymd');}
if(!is_array($valeur)) {
$format = explode('/', $valeur);
$valeur = $format[2].$format[1].$format[0];
@ -246,6 +278,9 @@ Class Ciblage
}
protected function dateImmat($valeur) {
if(empty($valeur[0])) {$valeur[0] = date('Ymd');}
if(empty($valeur[1])) {$valeur[1] = date('Ymd');}
if(!is_array($valeur)) {
$format = explode('/', $valeur);
$valeur = $format[2].$format[1].$format[0];
@ -260,10 +295,14 @@ Class Ciblage
}
protected function eff_entrep($valeur) {
$valeur = $this->setMinMax($name, $valeur);
$this->setFilter('eff_entrep', $valeur);
}
protected function eff_etab($valeur) {
$valeur = $this->setMinMax($name, $valeur);
$this->setFilter('eff_etab', $valeur);
}
@ -272,6 +311,7 @@ Class Ciblage
}
protected function nbEtab($valeur) {
$valeur = $this->setMinMax($name, $valeur);
$this->setFilterRange('nbEtab', $valeur);
}
@ -280,6 +320,8 @@ Class Ciblage
}
protected function nbActio($valeur) {
$valeur = $this->setMinMax('nbActio', $valeur);
$this->setFilterRange('nbActio', $valeur);
}
@ -288,6 +330,8 @@ Class Ciblage
}
protected function nbPart($valeur) {
$valeur = $this->setMinMax('nbPart', $valeur);
$this->setFilterRange('nbPart', $valeur);
}
@ -308,54 +352,67 @@ Class Ciblage
}
protected function bilEE($valeur) {
$valeur = $this->setMinMax('bilEE', $valeur);
$this->setFilterRange('bilEE', $valeur);
}
protected function bilFL($valeur) {
$valeur = $this->setMinMax('bilFL', $valeur);
$this->setFilterRange('bilFL', $valeur);
}
protected function bilFK($valeur) {
$valeur = $this->setMinMax('bilFK', $valeur);
$this->setFilterRange('bilFK', $valeur);
}
protected function bilFR($valeur) {
$valeur = $this->setMinMax('bilFR', $valeur);
$this->setFilterRange('bilFR', $valeur);
}
protected function bilGF($valeur) {
$valeur = $this->setMinMax('bilGF', $valeur);
$this->setFilterRange('bilGF', $valeur);
}
protected function bilGP($valeur) {
$valeur = $this->setMinMax('bilGP', $valeur);
$this->setFilterRange('bilGP', $valeur);
}
protected function bilGU($valeur) {
$valeur = $this->setMinMax('bilGU', $valeur);
$this->setFilterRange('bilGU', $valeur);
}
protected function bilGW($valeur) {
$valeur = $this->setMinMax('bilGW', $valeur);
$this->setFilterRange('bilGW', $valeur);
}
protected function bilHD($valeur) {
$valeur = $this->setMinMax('bilHD', $valeur);
$this->setFilterRange('bilHD', $valeur);
}
protected function bilHL($valeur) {
$valeur = $this->setMinMax('bilHL', $valeur);
$this->setFilterRange('bilHL', $valeur);
}
protected function bilHM($valeur) {
$valeur = $this->setMinMax('bilHM', $valeur);
$this->setFilterRange('bilHM', $valeur);
}
protected function bilHN($valeur) {
$valeur = $this->setMinMax('bilHN', $valeur);
$this->setFilterRange('bilHN', $valeur);
}
protected function bilYP($valeur) {
$valeur = $this->setMinMax('bilYP', $valeur);
$this->setFilterRange('bilYP', $valeur);
}

View File

@ -1,4 +1,22 @@
<?php
/**
* Structure
* [name] => array(
* label =>
* fields => array(
* select => array()
* ...
* )
* famille =>
* activated =>
* type =>
*
* export => array( //Si présent paramètres pour l'enrichissement
* 'label' => Libellé pour affichage dans l'enrichissement
* 'valuedesc' => array( / valeur => libellé / )
* )
* )
*/
Class Fields
{
protected $fields = array
@ -10,7 +28,14 @@ Class Fields
),
'famille' => 'entreprise',
'activated' => true,
'type' => 'select'
'type' => 'select',
'export' => array(
'label' => "Type d'établissement",
'valuedesc' => array(
'1' => "Etablissement Siege",
'0' => "Etablissement Secondaire",
),
),
),
'sirenGrp' => array(
'label' => 'Présence d\'un groupe',
@ -131,6 +156,16 @@ Class Fields
'type' => 'interval',
'class' => 'datepicker'
),
'action' => array(
'label' => 'Présence d\'actionnaires',
'fields' => array(
'select' => array('value' => array('1' => 'Oui', '0' => 'Non'))
),
'famille' => 'entreprise',
'activated' => true,
'type' => 'select',
'class' => null
),
'nbActio' => array(
'label' => 'Nombre d\'actionnaires connus',
'fields' => array(
@ -141,6 +176,16 @@ Class Fields
'type' => 'interval',
'class' => null
),
'part' => array(
'label' => 'Nombre de participations connues',
'fields' => array(
'select' => array('value' => array('1' => 'Oui', '0' => 'Non'))
),
'famille' => 'entreprise',
'activated' => true,
'type' => 'select',
'class' => null
),
'nbPart' => array(
'label' => 'Nombre de participations connues',
'fields' => array(
@ -612,13 +657,16 @@ Class Fields
);
protected $requeteSql = array('cj');
public function getValues()
public function getValues($val = null)
{
require_once 'Scores/SessionCiblage.php';
$session = new SessionCiblage();
$values = array();
if ( $val === null ) {
require_once 'Scores/SessionCiblage.php';
$session = new SessionCiblage();
$val = $session->getCriteres();
}
$values = array();
foreach($session->getCriteres() as $key => $item)
foreach($val as $key => $item)
{
if($item != '') {
if($this->fields[$key]['type'] == 'interval' or
@ -645,8 +693,10 @@ Class Fields
case 'ape_etab' :
case 'ape_entrep' :
$nafs = explode(',', $valeur);
foreach($nafs as $naf)
$values = array_merge($values, $this->nafArbo($name, $naf));
foreach($nafs as $naf) {
if($naf != ' ')
$values = array_merge($values, $this->nafArbo($name, $naf));
}
break;
case 'adr_com':
$valeurs = explode(',', $valeur);
@ -661,6 +711,7 @@ Class Fields
foreach($valeurs as $valeur)
$values = array_merge($values, $this->fj($name, $valeur));
}
return ($values);
}
@ -686,7 +737,7 @@ Class Fields
protected function localisationArbo($name, $valeur)
{
if(strlen($valeur) == 3) {
if(strlen($valeur) <= 3) {
switch($valeur[0]) {
case 'R':
$table = new Table_Departements();
@ -696,12 +747,13 @@ Class Fields
->where('codeRegionInsee ='.substr($valeur, 1, strlen($valeur)))
->setIntegrityCheck(false);
$result = $table->fetchAll($sql)->toArray();
foreach ($result as $res) {
$return[] = $res['INSEE'];
}
break;
case 'D':
$table = new Table_Departements();
$table = new Table_Departements();
$sql = $table->select()
->from('departements')
->join(array('cp' => 'codepostaux'), 'cp.codepos LIKE CONCAT(departements.numdep, "%")', array('INSEE'))
@ -715,6 +767,7 @@ Class Fields
}
} else
return (array($valeur));
return ($return);
}
@ -755,13 +808,13 @@ Class Fields
{
$sql = $table->select()->where('parent = ?', $valeur);
$result =$table->fetchAll($sql)->toArray();
foreach($result as $code) $where .= " code LIKE '".$code['code']."%' and niveau = 5 or ";
foreach($result as $code) $where .= " code LIKE '".trim($code['code'])."%' and niveau = 5 or ";
$where = substr($where, 0, (strlen($where)) - 3);
$sql = $table->select()->where($where);
$result = $table->fetchAll($sql)->toArray();
foreach($result as $code) $value[] = $code['code'];
} else if(strlen($valeur) < 5){
$sql = $table->select()->where("code LIKE '".$valeur."%' and niveau = 5");
$sql = $table->select()->where('code LIKE "'.trim($valeur).'%" and niveau = 5');
$result = $table->fetchAll($sql)->toArray();
foreach($result as $code) $value[] = $code['code'];
} else if(strlen($valeur) == 5) {
@ -770,47 +823,27 @@ Class Fields
return ($value);
}
public function __construct($login)
public function __construct()
{
require_once('Scores/SessionCiblage.php');
$session = new SessionCiblage();
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
$db = Zend_Registry::get('db');
/*$prefsModel = new Application_Model_Prefs($db);
$prefs = $prefsModel->find($login);
$json = $prefs->json;*/
foreach($this->fields as $name => $valeur) {
/*if(!empty($json))
{
$prefs = json_decode($json);
if(!empty($prefs)) {
if(array_key_exists($name, $prefs)) {
$this->fields[$name]['activated'] = false;
if(is_array($this->fields[$name]['type'])) {
$this->fields[$name]['type'] = $prefs[$name];
}
}
}
}*/
/*if(in_array($name, $this->requeteSql)) {
$formeJuridiques = new Application_Model_Formejuridique();
$sql = $formeJuridiques->select()->where('fjCode > 1000');
$formeJuridiques = $formeJuridiques->fetchAll($sql)->toArray();
$value = array();
foreach($formeJuridiques as $form) {
$value[$form['fjCode']] = $form['fjLibelle'].' ['.$form['fjCode'].']';
}
asort($value);
$this->fields[$name]['fields']['select']['value'] = $value;
}*/
if($this->fields[$name]['type'] == 'interval') {
$minmax = $this->getMinMax($name);
$this->fields[$name]['fields'][$this->fields['type']]['value']
= array($minmax[0]['min'], $minmax[0]['max']);
}
}
}
static public function getMinMax($name)
{
$tab = array('dateCrea_ent','dateCrea_etab');
if(!in_array($name, $tab)) {
$table = new Table_Minmaxs();
return ($table->fetchAll($table->select()->where('cle = ?', $name))->toArray());
}
return (array());
}
public function getFields() {
return ($this->fields);
}

View File

@ -1,16 +0,0 @@
<?php
function Connexion_base()
{
$db = @mysql_connect('localhost','root','') or die('Erreur de connexion au MYSQL local');
$select_base=@mysql_selectdb('geo', $db);
}
function Deconnexion_base()
{
@mysql_close;
}
?>

View File

@ -0,0 +1,93 @@
function split( val ) {
return val.split( /,\s*/ );
}
function extractLast( term ) {
return split( term ).pop();
}
$(document).ready(function(){
$('textarea.complitedCj').autocomplete({
delay:600,
source: function(request, response) {
$.getJSON('/juridique/completed', { q: extractLast( request.term ) },
function(data) { response(data); }
);
},
select: function(event, ui){
var terms = split( this.value );
terms.pop();
terms.push( ui.item.value );
terms.push( "" );
this.value = terms.join( ", " );
return false;
}
});
$('textarea.complitedNaf').autocomplete({
delay:600,
source: function(request, response) {
$.getJSON('/economique/completed', { q: extractLast( request.term ) },
function(data) { response(data); }
);
},
select: function(event, ui){
var terms = split( this.value );
terms.pop();
terms.push( ui.item.value );
terms.push( "" );
this.value = terms.join( ", " );
return false;
}
});
$('textarea.complitedDep').autocomplete({
delay:600,
source: function(request, response) {
$.getJSON('/geographique/completed/dep/1', { q: extractLast( request.term ) },
function(data) { response(data); }
);
},
select: function(event, ui){
var terms = split( this.value );
terms.pop();
terms.push( ui.item.value );
terms.push( "" );
this.value = terms.join( ", " );
return false;
}
});
$('textarea.complitedReg').autocomplete({
delay:600,
source: function(request, response) {
$.getJSON('/geographique/completed/reg/1', { q: extractLast( request.term ) },
function(data) { response(data); }
);
},
select: function(event, ui){
var terms = split( this.value );
terms.pop();
terms.push( ui.item.value );
terms.push( "" );
this.value = terms.join( ", " );
return false;
}
});
$('textarea.complitedVil').autocomplete({
delay:600,
source: function(request, response) {
$.getJSON('/geographique/completed/vil/1', { q: extractLast( request.term ) },
function(data) { response(data); }
);
},
select: function(event, ui){
var terms = split( this.value );
terms.pop();
terms.push( ui.item.value );
terms.push( "" );
this.value = terms.join( ", " );
return false;
}
});
});

View File

@ -13,20 +13,38 @@ $(document).ready(function(){
}
});
$(".tooltip").click(function(){
var id = $(this).attr('id');
var date = $('#ch_'+id).html();
$('#ch_'+id).html('<img src="/themes/default/images/ajax.gif" />');
$.ajax({
type : "GET",
cache : false,
url : 'dashboard/ciblagedetail/id/'+id,
data : $(this).serializeArray(),
success: function(data) {
$('#ch_'+id).html(date);
$('.previsualisation').html(data);
}
});
$("a.update").click(function(e){
e.preventDefault();
var href = $(this).attr('href');
var ligne = $(this).parent().parent();
ligne.find('td.update').html('<img src="/themes/default/images/ajax.gif" />');
$.getJSON(href, function(data){
ligne.find('td.resultat').html(data.resultat);
ligne.find('td.insee').html(data.uniteInsee);
ligne.find('td.date').html(data.dateAjout);
});
});
$('a.enrichissementref').on('click', function(){
var title = "Commande d'un enrichissment";
var href = $(this).attr('href');
var dialogOpts = {
bgiframe: true,
title: title,
width: 500,
height: 300,
modal: true,
open: function(event, ui) {
$(this).html('Chargement...');
$(this).load(href);
},
buttons: {
Annuler: function() { $(this).dialog('close'); }
},
close: function() { $('#dialog').remove(); }
};
$('<div id="dialog"></div>').dialog(dialogOpts);
return false;
});

View File

@ -99,9 +99,18 @@ $(document).ready(function()
set($(this).attr('name'), $(this).val());
});
$('#tabs').delegate('textarea', 'blur', function(e){
/*$('#tabs').delegate('textarea', 'change', function(e){
e.stopPropagation();
set($(this).attr('name'), $(this).val());
});*/
$('#tabs').delegate('a.autocomplet', 'click', function(e){
e.preventDefault();
var key = $(this).attr('textarea');
var values = $('#textarea_'+$(this).attr('textarea')).val();
set(key, values);
return false;
});
$('#tabs').delegate('a.interval', 'click', function(e){

View File

@ -34,7 +34,6 @@
#dashboard tbody tr {
background-repeat: repeat-x;
cursor:pointer;
}
#dashboard thead tr {

View File

@ -1,35 +1,3 @@
#economique .arborescence {
border-top: 1px solid #838587;
background: #b8b8b8;
background: -webkit-gradient(linear, left top, left bottom, from(#87898a), to(#b8b8b8));
background: -webkit-linear-gradient(top, #87898a, #b8b8b8);
background: -moz-linear-gradient(top, #87898a, #b8b8b8);
background: -ms-linear-gradient(top, #87898a, #b8b8b8);
background: -o-linear-gradient(top, #87898a, #b8b8b8);
padding: 4.5px 9px;
-webkit-border-radius: 0px;
-moz-border-radius: 0px;
border-radius: 0px;
-webkit-box-shadow: rgba(0,0,0,1) 0 1px 0;
-moz-box-shadow: rgba(0,0,0,1) 0 1px 0;
box-shadow: rgba(0,0,0,1) 0 1px 0;
text-shadow: rgba(0,0,0,.4) 0 1px 0;
color: #FFFFFF;
font-size: 11px;
font-family: Georgia, serif;
text-decoration: none;
vertical-align: middle;
}
#economique .arborescence:hover {
border-top-color: #cccccc;
background: #cccccc;
color: #000000;
}
#economique .arborescence:active {
border-top-color: #3f4142;
background: #3f4142;
}
#economique
{
font-size:13px;

View File

@ -1,35 +1,3 @@
#financiere .arborescence {
border-top: 1px solid #838587;
background: #b8b8b8;
background: -webkit-gradient(linear, left top, left bottom, from(#87898a), to(#b8b8b8));
background: -webkit-linear-gradient(top, #87898a, #b8b8b8);
background: -moz-linear-gradient(top, #87898a, #b8b8b8);
background: -ms-linear-gradient(top, #87898a, #b8b8b8);
background: -o-linear-gradient(top, #87898a, #b8b8b8);
padding: 4.5px 9px;
-webkit-border-radius: 0px;
-moz-border-radius: 0px;
border-radius: 0px;
-webkit-box-shadow: rgba(0,0,0,1) 0 1px 0;
-moz-box-shadow: rgba(0,0,0,1) 0 1px 0;
box-shadow: rgba(0,0,0,1) 0 1px 0;
text-shadow: rgba(0,0,0,.4) 0 1px 0;
color: #FFFFFF;
font-size: 11px;
font-family: Georgia, serif;
text-decoration: none;
vertical-align: middle;
}
#financiere .arborescence:hover {
border-top-color: #cccccc;
background: #cccccc;
color: #000000;
}
#financiere .arborescence:active {
border-top-color: #3f4142;
background: #3f4142;
}
#financiere
{
font-size:13px;

View File

@ -1,35 +1,3 @@
#geographique .arborescence {
border-top: 1px solid #838587;
background: #b8b8b8;
background: -webkit-gradient(linear, left top, left bottom, from(#87898a), to(#b8b8b8));
background: -webkit-linear-gradient(top, #87898a, #b8b8b8);
background: -moz-linear-gradient(top, #87898a, #b8b8b8);
background: -ms-linear-gradient(top, #87898a, #b8b8b8);
background: -o-linear-gradient(top, #87898a, #b8b8b8);
padding: 4.5px 9px;
-webkit-border-radius: 0px;
-moz-border-radius: 0px;
border-radius: 0px;
-webkit-box-shadow: rgba(0,0,0,1) 0 1px 0;
-moz-box-shadow: rgba(0,0,0,1) 0 1px 0;
box-shadow: rgba(0,0,0,1) 0 1px 0;
text-shadow: rgba(0,0,0,.4) 0 1px 0;
color: #FFFFFF;
font-size: 11px;
font-family: Georgia, serif;
text-decoration: none;
vertical-align: middle;
}
#geographique .arborescence:hover {
border-top-color: #cccccc;
background: #cccccc;
color: #000000;
}
#geographique .arborescence:active {
border-top-color: #3f4142;
background: #3f4142;
}
#geographique
{
font-size:13px;

View File

@ -1,38 +1,3 @@
#juridique .arborescence {
border-top: 1px solid #838587;
background: #b8b8b8;
background: -webkit-gradient(linear, left top, left bottom, from(#87898a), to(#b8b8b8));
background: -webkit-linear-gradient(top, #87898a, #b8b8b8);
background: -moz-linear-gradient(top, #87898a, #b8b8b8);
background: -ms-linear-gradient(top, #87898a, #b8b8b8);
background: -o-linear-gradient(top, #87898a, #b8b8b8);
padding: 4.5px 9px;
-webkit-border-radius: 0px;
-moz-border-radius: 0px;
border-radius: 0px;
-webkit-box-shadow: rgba(0,0,0,1) 0 1px 0;
-moz-box-shadow: rgba(0,0,0,1) 0 1px 0;
box-shadow: rgba(0,0,0,1) 0 1px 0;
text-shadow: rgba(0,0,0,.4) 0 1px 0;
color: #FFFFFF;
font-size: 11px;
font-family: Georgia, serif;
text-decoration: none;
vertical-align: middle;
}
#juridique .arborescence:hover
{
border-top-color: #cccccc;
background: #cccccc;
color: #000000;
}
#juridique .arborescence:active
{
border-top-color: #3f4142;
background: #3f4142;
}
#juridique
{
font-size:13px;

View File

@ -257,13 +257,6 @@ h3 {
zoom:1;
}
.ui-corner-all {
border-bottom-right-radius:0;
border-bottom-left-radius:0;
border-top-right-radius:0;
border-top-left-radius:0;
}
#naf li { width:650px; }
#naf a { }
#naf a ins { }