Compare commits

..

303 Commits
1.0 ... 1.1

Author SHA1 Message Date
Michael RICOIS
4bf2ca7a4b css et js inexistant 2012-05-01 09:42:19 +00:00
Michael RICOIS
8c4fb83566 Création des répertoires de sessions 2012-04-24 11:26:27 +00:00
Michael RICOIS
6889d5294a Suppression require_once inutile 2012-04-24 10:34:34 +00:00
Michael RICOIS
57aa0bc875 Ordre du plugin 2012-04-24 10:21:45 +00:00
Michael RICOIS
77368058b1 Modification complete de l'authentification 2012-04-24 10:17:18 +00:00
Michael RICOIS
286ad446cf Suppression include path déjà déclarer dans index.php 2012-04-24 10:03:38 +00:00
Michael RICOIS
676e15833e Suppression du style qui fait chier 2012-04-24 09:56:21 +00:00
Michael RICOIS
d9ac13d453 Mise à jour librairie JQuery-UI en version 1.8.18 2012-04-24 09:52:25 +00:00
Michael RICOIS
2d6c9545c8 Suppression style sur hover 2012-04-24 09:45:14 +00:00
Michael RICOIS
4adddfb061 Correction url lien 2012-04-24 09:30:15 +00:00
Michael RICOIS
b0c5b83115 Tri par ordre alphabétique et suppression des codes 2012-04-24 09:22:24 +00:00
Michael RICOIS
8bc286bdab Colonne référence à remplir 2012-04-20 14:55:28 +00:00
Michael RICOIS
5a47a6a24a Affichage de la reference 2012-04-20 14:53:42 +00:00
Michael RICOIS
4fd7614f58 Ajout de l'age : age_entrep, age_etab 2012-04-20 14:49:05 +00:00
Michael RICOIS
85ed70bdb0 Todo 2012-04-20 14:40:36 +00:00
Michael RICOIS
fcafbe31f8 Correction pour bonne detection des chiffres 2012-04-20 14:39:53 +00:00
Michael RICOIS
70e6ac262a Ajout des valeurs pour les tranches teff_entrep et teff_etab 2012-04-20 14:37:36 +00:00
Michael RICOIS
1f29e9f4d8 Ajout tranche effectif et effectif 2012-04-20 14:25:45 +00:00
Michael RICOIS
5f86ae58b6 Correction colunm 2012-04-20 14:17:55 +00:00
Damien LASSERRE
0f81a66b90 correction batch 2012-04-19 09:48:17 +00:00
Damien LASSERRE
f0285eb499 erreur 2012-04-18 15:59:02 +00:00
Damien LASSERRE
0eab5291e9 corection ex 2012-04-18 15:56:56 +00:00
Damien LASSERRE
511e2af345 corrdction ex 2012-04-18 15:56:45 +00:00
Damien LASSERRE
2180eb9f3a date 2012-04-18 15:54:10 +00:00
Damien LASSERRE
adaaa66dd1 css 2012-04-18 14:37:43 +00:00
Damien LASSERRE
0db3c8907c correction des mode avancé dans economique. 2012-04-18 14:36:07 +00:00
Damien LASSERRE
95a57d9446 correction des mode avancé dans economique. 2012-04-18 13:53:09 +00:00
Damien LASSERRE
fdd3dddbe1 ajouts des icones 2012-04-18 13:17:10 +00:00
Damien LASSERRE
8932eb138a la gestion des modes 2012-04-18 12:34:49 +00:00
Damien LASSERRE
619da73aae Ajout fonctionnalités 2012-04-17 15:10:17 +00:00
Damien LASSERRE
3a78d2bb5c Correction javascript + ajout de la fonction help 2012-04-17 14:08:12 +00:00
Damien LASSERRE
d8d52662f4 Correction prévu et autre bug 2012-04-16 15:23:17 +00:00
Damien LASSERRE
605e963695 correctioon des AGE entrep en filter et non pas en alpha 2012-04-16 15:14:29 +00:00
Damien LASSERRE
a153844832 ajout des teff 2012-04-13 15:33:59 +00:00
Damien LASSERRE
51cab1e5d2 correction 2012-04-13 14:49:08 +00:00
Damien LASSERRE
42710f7528 correction provisoir arbo geo 2012-04-13 12:57:58 +00:00
Damien LASSERRE
0610903073 Correction rapiditer de la prévisualisation 2012-04-13 12:37:55 +00:00
Damien LASSERRE
b62d3189e9 prérempli du formulaire enrichissement 2012-04-13 09:57:06 +00:00
Damien LASSERRE
4526fe80f0 indentation 2012-04-13 09:38:05 +00:00
Damien LASSERRE
a65a9fc2a2 formulaire de validation de comptage prédéfini et bouton popup associé 2012-04-13 09:36:57 +00:00
Damien LASSERRE
75c0391a19 ajout exclusion et corrections 2012-04-13 08:56:39 +00:00
Damien LASSERRE
d2cd06d96b gestion des download par id 2012-04-13 08:13:22 +00:00
Damien LASSERRE
2931f21cc4 format date 2012-04-13 07:47:50 +00:00
Damien LASSERRE
d99f974c7c correction bug dans les id 2012-04-13 07:33:23 +00:00
Damien LASSERRE
046db3272d Ajout du dossier mois a la création des fichiers d'enrichissement 2012-04-13 07:23:43 +00:00
Damien LASSERRE
d68cf89d21 nom du fichier rectifié 2012-04-12 16:00:15 +00:00
Damien LASSERRE
e097a2074d f 2012-04-12 14:26:33 +00:00
Damien LASSERRE
d4a3ca4360 enrichissement depuis la previsualisation 2012-04-12 14:23:02 +00:00
Damien LASSERRE
f7fd60c9a0 css 2012-04-12 14:08:42 +00:00
Damien LASSERRE
5399c57010 Prévisualisation 2012-04-12 13:54:45 +00:00
Damien LASSERRE
d0a0857987 Probleme SVN 2012-04-12 09:57:19 +00:00
Damien LASSERRE
35e837af81 Probleme SVN 2012-04-12 09:55:53 +00:00
Damien LASSERRE
fbb019c7d4 probleme svn 2012-04-12 09:55:33 +00:00
Damien LASSERRE
7ca32d69e4 nom a la création du fichier 2012-04-12 09:54:49 +00:00
Damien LASSERRE
088dd975a6 nom a la création du fichier 2012-04-12 09:53:08 +00:00
Damien LASSERRE
6487cb4532 gestion des headers 2012-04-12 09:52:48 +00:00
Damien LASSERRE
83d3cb5f4a gestion des headers 2012-04-12 09:48:08 +00:00
Damien LASSERRE
e96ce7127b gestion des headers 2012-04-12 09:47:29 +00:00
Damien LASSERRE
b06cd50d82 gestion des headers 2012-04-12 09:46:35 +00:00
Damien LASSERRE
6a22104b36 gestion des headers 2012-04-12 09:46:16 +00:00
Damien LASSERRE
3e48103956 cc 2012-04-12 09:34:22 +00:00
Damien LASSERRE
4ad4c24221 enrichissement par un admin 2012-04-12 09:25:37 +00:00
Damien LASSERRE
62fc0c17d5 correction faute orthographe 2012-04-12 08:16:38 +00:00
Damien LASSERRE
401dfa0cf3 correction faute orthographe 2012-04-12 08:16:23 +00:00
Damien LASSERRE
d2996c69f7 probleme svn 2012-04-12 08:14:26 +00:00
Damien LASSERRE
2ab8d3e583 probleme svn 2012-04-12 08:10:10 +00:00
Damien LASSERRE
55e05fbe63 probleme svn 2012-04-12 08:09:18 +00:00
Damien LASSERRE
512abb9d38 probleme svn 2012-04-12 08:07:35 +00:00
Damien LASSERRE
e6e169fbe7 exclusion sur ape_entrep 2012-04-11 07:20:54 +00:00
Damien LASSERRE
349dde60de exclusion sur ape_entrep 2012-04-11 07:11:48 +00:00
Damien LASSERRE
f6a9e222c1 exclusion sur les naf etablissements. 2012-04-10 15:53:10 +00:00
Damien LASSERRE
1bdce6771c gestion des exclusion sur bilType 2012-04-10 14:46:22 +00:00
Damien LASSERRE
4197ad76cb Gestion des exclusions 2012-04-10 14:02:40 +00:00
Damien LASSERRE
da28d19390 Exclusion OK ! geographique 2012-04-10 13:20:08 +00:00
Damien LASSERRE
38922b0fd0 vider le champs de recherche par régions. 2012-04-10 09:33:23 +00:00
Damien LASSERRE
9fc24e0ab1 correction libellé 2012-04-10 09:20:48 +00:00
Damien LASSERRE
697c7ebb5d Correction du bug avec les departements. 2012-04-10 09:16:59 +00:00
Damien LASSERRE
82a99a4efa localisation geogra dans les critères de rapelles 2012-04-10 08:15:07 +00:00
Damien LASSERRE
bb82175e59 correction order DESC sur les comptages 2012-04-10 07:29:26 +00:00
Damien LASSERRE
b0207bf239 redirection a l'enrigistrement du ciblage. 2012-04-10 07:24:57 +00:00
Damien LASSERRE
9510505afd redirection a l'enrigistrement du ciblage. 2012-04-10 07:24:44 +00:00
Damien LASSERRE
a346cf5505 images 2012-04-06 15:44:29 +00:00
Damien LASSERRE
7c18e4a4b1 Correction partiel des départements. 2012-04-06 15:15:13 +00:00
Damien LASSERRE
17e152ce0b Dashboard 2012-04-06 09:49:41 +00:00
Damien LASSERRE
0233d4b34f correction du rechargement des critères. 2012-04-06 09:27:33 +00:00
Damien LASSERRE
b0962b753c Exclusions 2012-04-06 08:29:25 +00:00
Damien LASSERRE
5ad2717112 correction javascript pour le popup enrigistrement. 2012-04-06 08:29:04 +00:00
Damien LASSERRE
2f26c2409d Gestion des exclusion sur la localisation 2012-04-06 08:28:37 +00:00
Damien LASSERRE
42c9f843e3 correction javascript pour le popup enrigistrement. 2012-04-06 08:28:13 +00:00
Damien LASSERRE
7cf0b68865 correction bug 2012-04-06 08:27:59 +00:00
Damien LASSERRE
0d1a39b237 correction javascript pour le popup enrigistrement. 2012-04-06 08:27:34 +00:00
Damien LASSERRE
e18f1b3b40 correction recomptage a la suppression d'un critère 2012-04-06 08:27:10 +00:00
Damien LASSERRE
3d867a8c7f Exclusions
voir #0001117 mantis
2012-04-05 15:50:33 +00:00
Damien LASSERRE
9db6f449a1 ajout des champs multiples 2012-04-05 09:04:59 +00:00
Damien LASSERRE
7f3954d470 ajout des champs multiples 2012-04-05 09:04:43 +00:00
Damien LASSERRE
e2bc5393a7 ajout des champs multiples 2012-04-05 09:04:34 +00:00
Damien LASSERRE
b3bc52e460 ajout des champs multiples 2012-04-05 09:04:25 +00:00
Damien LASSERRE
57c1766c60 affichage des enrichissements 2012-04-05 08:20:37 +00:00
Damien LASSERRE
003681a91d affichage des enrichissements 2012-04-05 08:20:14 +00:00
Damien LASSERRE
f83053458e affichage des enrichissements 2012-04-05 08:19:57 +00:00
Damien LASSERRE
cbe5f56cc4 correction date pour l'affichage des comptages 2012-04-05 07:39:15 +00:00
Damien LASSERRE
26fdd036c4 Création de la fonction de recupération des enrichissement / Comptage 2012-04-05 07:09:12 +00:00
Damien LASSERRE
e2c64172fb correction de enrichissement 2012-04-04 14:06:46 +00:00
Damien LASSERRE
a638ebf87f Calcule de date 2012-04-04 13:15:56 +00:00
Damien LASSERRE
bbd9d47187 correction 2012-04-04 09:12:58 +00:00
Damien LASSERRE
572eaf92c9 Création de la fonction de recupération des enrichissement / Comptage 2012-04-04 08:33:37 +00:00
Damien LASSERRE
875025e507 Création de la fonction de recupération des enrichissement / Comptage 2012-04-04 08:33:22 +00:00
Damien LASSERRE
4686cbc8d5 Modification du nombre de lignes afficher dans l'index dashboard pour les enrichissements 2012-04-04 08:09:59 +00:00
Damien LASSERRE
838c0aeb4a Modification du tableau enrichissement 2012-04-04 08:04:19 +00:00
Damien LASSERRE
26d4ad4ae0 image loader enrichissement 2012-04-04 08:03:54 +00:00
Damien LASSERRE
18bd65b991 modification de l'enrichissement + recomptage (actualisation du comptage) et rapelle des criteres 2012-04-03 13:49:38 +00:00
Damien LASSERRE
3993257e59 modification de l'enrichissement + recomptage (actualisation du comptage) et rapelle des criteres 2012-04-03 13:42:35 +00:00
Damien LASSERRE
27438be586 suppression du libeller dans la vue (information sur le champ). 2012-04-03 08:39:15 +00:00
Damien LASSERRE
b0ba3c25ba correction des bugs d'affichages 2012-04-03 08:38:34 +00:00
Damien LASSERRE
82fd8a3fae Gestion des min max 2012-04-03 08:37:54 +00:00
Damien LASSERRE
943eb22c7c ajout des min max 2012-04-03 08:37:39 +00:00
Damien LASSERRE
ee95e69664 Print_r oublié 2012-04-03 07:47:41 +00:00
Damien LASSERRE
bfe9a89091 correction des bug minmax 2012-04-03 07:41:47 +00:00
Damien LASSERRE
8cd4fe17d0 #0001135 resolu 2012-04-03 07:34:57 +00:00
Damien LASSERRE
fe9747f9e4 Correction de l'extraction des siret pour les nafs... 2012-03-28 07:40:36 +00:00
Damien LASSERRE
976e10b434 correction bug requete sphinx 2012-03-26 15:11:46 +00:00
Damien LASSERRE
6025314471 correction bug requete sphinx 2012-03-26 15:11:20 +00:00
Damien LASSERRE
9983e9c1eb Quelques corrections 2012-03-26 14:47:50 +00:00
Damien LASSERRE
d6bcd86464 Correction des codes postaux 2012-03-26 14:47:09 +00:00
Damien LASSERRE
b9cec9515b Correction de l'interpretations des données pour le count 2012-03-26 14:46:47 +00:00
Damien LASSERRE
af1730d2e6 Correction de Fields + ajouts des nouveaux champs 2012-03-26 14:46:20 +00:00
Damien LASSERRE
fa03081e67 Correction du moteur (departement + problèmes majeurs) 2012-03-26 14:45:42 +00:00
Damien LASSERRE
d9253f962e correction configuration 2012-03-22 10:51:38 +00:00
Michael RICOIS
a2568e417b Suppression table inexistante 2012-03-20 08:34:01 +00:00
Damien LASSERRE
21ddf64775 MAJ 2012-03-20 08:24:41 +00:00
Damien LASSERRE
7135be80d3 Grosse MAJ 2012-03-15 15:44:10 +00:00
Michael RICOIS
d668dbc2d1 Correction appel db 2012-03-15 10:07:49 +00:00
Michael RICOIS
9581c825db Ajout des boutons en javascript 2012-03-14 11:23:20 +00:00
Michael RICOIS
1da719624c Suppression javascript 2012-03-14 11:02:53 +00:00
Michael RICOIS
791e5c14ad Gestion pour l'enregistrement de la commande 2012-03-14 11:01:53 +00:00
Michael RICOIS
80e214a19b Boite de dialog plus grande en hauteur 2012-03-14 10:43:26 +00:00
Michael RICOIS
ecc492c1ce batch enrichissement à tester 2012-03-14 10:42:09 +00:00
Michael RICOIS
189a519597 Formattage 2012-03-14 10:41:37 +00:00
Michael RICOIS
58b1e456f7 Vue gestion en mode developement 2012-03-14 09:52:29 +00:00
Michael RICOIS
eb58f69819 Fonction pour récupérer les valeurs définies dans les colonnes 2012-03-14 08:45:26 +00:00
Michael RICOIS
23166356d4 Ajout définition champs pour l'enrichissement 2012-03-14 08:30:45 +00:00
Michael RICOIS
28f7d52e43 Ajout description des champs 2012-03-12 14:19:56 +00:00
Damien LASSERRE
75e6913ccf correction gros bug dans structure 2012-03-12 13:52:14 +00:00
Michael RICOIS
78c4d98eee Ajout de la classe Mail 2012-03-09 09:14:24 +00:00
Damien LASSERRE
4b4608f306 bug layout 2012-03-08 15:25:27 +00:00
Damien LASSERRE
edf7b7e028 bug layout 2012-03-08 15:25:16 +00:00
Damien LASSERRE
0e43da9d1c bug 2012-03-08 15:05:51 +00:00
Damien LASSERRE
3c89575003 optimisation du helper 2012-03-08 15:05:34 +00:00
Damien LASSERRE
e5929d53c4 Controller Upload pour l'insertion e fichier (en cours de réalisation...) 2012-03-08 15:04:52 +00:00
Damien LASSERRE
d6b00d4063 Commit de l'action de suppression des criteres 2012-03-08 15:04:08 +00:00
Damien LASSERRE
a4391f3886 ajout de l'icone cross pour la suppression des criteres 2012-03-08 15:03:01 +00:00
Damien LASSERRE
c1c8449c72 afficher les panel au rafraichissement 2012-03-08 15:01:21 +00:00
Michael RICOIS
d3684f6835 Fichier qui ont disparus de la 1.0 2012-03-07 11:18:08 +00:00
Damien LASSERRE
05b829d0d7 Critere dans les details des comptages. 2012-03-07 11:14:27 +00:00
Damien LASSERRE
2bb37b2e11 Critere dans les details des comptages. 2012-03-07 11:14:14 +00:00
Michael RICOIS
71b6864bcc Correction sauvegarde du comptage 2012-03-07 11:13:53 +00:00
Damien LASSERRE
90031051ee correction de bug javascript + le rafraichissement des page pour les familles. 2012-03-07 11:13:52 +00:00
Michael RICOIS
d6532f955a On définit le marqueur profil 2012-03-07 10:41:49 +00:00
Michael RICOIS
efa137c644 Correction 2012-03-07 09:01:38 +00:00
Michael RICOIS
2c816731ed Modification pour la gestion de l'enrichissement 2012-03-06 17:10:51 +00:00
Michael RICOIS
ffc27e0766 Gestion des données insee 2012-03-06 16:24:28 +00:00
Michael RICOIS
59df244e79 Enregistrer un profil 2012-03-06 15:02:50 +00:00
Michael RICOIS
85dd71c9fa Création d'une structure pour l'enrichissement 2012-03-06 14:06:38 +00:00
Damien LASSERRE
4a3f20b578 correction des champs labels 2012-03-06 13:38:42 +00:00
Damien LASSERRE
74187e5e35 premiére beta affichage des critères. 2012-03-06 13:15:01 +00:00
Damien LASSERRE
ad3c39fcfc premiére beta affichage des critères. 2012-03-06 13:14:53 +00:00
Michael RICOIS
9c860a1f1f Diverses corrections 2012-03-05 16:55:26 +00:00
Michael RICOIS
42c7be5e22 Correction batch 2012-03-05 15:31:31 +00:00
Michael RICOIS
fe9a39bd82 Ajout spécification pour l'enrichissement 2012-03-05 15:05:30 +00:00
Michael RICOIS
9a0853c2ea Gestion du profil, données pour l'enrichissement 2012-03-05 15:03:56 +00:00
Damien LASSERRE
e579d3a90a correction css sur les lien des arbos (juridique) 2012-03-05 08:19:42 +00:00
Damien LASSERRE
06c50d0d36 correction css sur les lien des arbos (geographique) 2012-03-05 08:19:12 +00:00
Damien LASSERRE
aaf95f0b35 correction css sur les lien des arbos (financier) 2012-03-05 08:18:02 +00:00
Damien LASSERRE
3d8bdbba8b correction css sur les lien des arbos (economique) 2012-03-05 08:17:26 +00:00
Damien LASSERRE
cee2fe1bd3 correction bug table minmax structure 2012-03-05 08:12:19 +00:00
Michael RICOIS
a76be3aae3 Suppression de la table Enrichissement_Commandes 2012-02-27 09:36:49 +00:00
Michael RICOIS
aade0196ae Renommage action ciblagedetail en ciblage 2012-02-27 08:31:19 +00:00
Michael RICOIS
b8933aa09a Javascript dans le controller pour de meilleur performance 2012-02-24 17:23:20 +00:00
Michael RICOIS
d8d87f04f2 Titre facturation 2012-02-24 17:14:21 +00:00
Michael RICOIS
23fae60167 Affichage des derniers enrichissements 2012-02-24 17:11:41 +00:00
Michael RICOIS
398171e813 Correction requete sql 2012-02-24 16:26:20 +00:00
Damien LASSERRE
1b7965fbd2 correction d'erreur dans la simplification 2012-02-24 16:19:50 +00:00
Michael RICOIS
4b99c809fc Suppression menu action 2012-02-24 15:46:43 +00:00
Michael RICOIS
b790b950f1 Correction incompatibilité 2012-02-24 15:45:15 +00:00
Michael RICOIS
878b621a08 Affichage des enrichissements 2012-02-24 15:32:15 +00:00
Damien LASSERRE
24eb5def51 ajout du script autocompleted 2012-02-24 15:05:23 +00:00
Damien LASSERRE
bb5b0b707a Modification des champs + création de nouveau champs et des recherches autocompleted 2012-02-24 14:59:27 +00:00
Michael RICOIS
26869a2fd8 Modification du titre 2012-02-24 13:41:07 +00:00
Michael RICOIS
41a7d74bfd Batch au couleur de zend 2012-02-24 11:19:34 +00:00
Michael RICOIS
db04d8c77e Création du script pour l'enrichissement 2012-02-24 11:02:36 +00:00
Michael RICOIS
6ec41300d2 Suppression condition inutile 2012-02-24 10:50:56 +00:00
Michael RICOIS
79dd70b755 Ajout du fichier pour le lancement des enrichissements 2012-02-24 10:49:48 +00:00
Michael RICOIS
0ea33fb71b Respect de la structure par rapport aux autres projets 2012-02-24 10:44:39 +00:00
Michael RICOIS
87e98e8848 Préparation ajout du profil 2012-02-24 10:43:39 +00:00
Michael RICOIS
3038e83be4 Affichage avant commande du fichier 2012-02-24 10:42:06 +00:00
Michael RICOIS
504d74b63e Ajout marqueur présence de données Insee 2012-02-24 10:27:10 +00:00
Michael RICOIS
eb097d1535 Liste des profils 2012-02-24 09:54:21 +00:00
Michael RICOIS
b530470273 Mise à jour du comptage OK 2012-02-22 20:28:44 +00:00
Michael RICOIS
ba61d4c817 Performance 2012-02-22 19:17:11 +00:00
Michael RICOIS
f4f050dadd Ajout Gestion 2012-02-22 17:08:39 +00:00
Michael RICOIS
a79970de29 Commande du ciblage 2012-02-22 16:30:54 +00:00
Michael RICOIS
b33b364f32 Update 2012-02-22 16:02:28 +00:00
Michael RICOIS
843bb1fb5b Mise à jour du comptage 2012-02-22 15:55:16 +00:00
Michael RICOIS
c1c655d84b Ajout des valeurs en dehors de la session 2012-02-22 15:43:35 +00:00
Michael RICOIS
537340d274 HTML et Javacript 2012-02-22 15:40:19 +00:00
Michael RICOIS
54c828c7ff Reference et Commande pour l'enrichissement 2012-02-22 15:39:44 +00:00
Michael RICOIS
219f23f227 Action update pour la mise à jour dans la liste du comptage 2012-02-22 15:38:57 +00:00
Michael RICOIS
cc1f7de75c Suppression fichier 2012-02-22 15:34:50 +00:00
Michael RICOIS
1568c4ad72 Simplification 2012-02-22 15:30:28 +00:00
Michael RICOIS
21f4d8824c Simplification 2012-02-22 15:28:19 +00:00
Michael RICOIS
f5f3711cbf Harmonisation 2012-02-22 14:47:16 +00:00
Michael RICOIS
2966e158cd Augmentation de la taille de la fenêtre en hauteur 2012-02-22 14:39:22 +00:00
Michael RICOIS
d2ff25fc12 Structure table minmax 2012-02-22 13:29:54 +00:00
Michael RICOIS
f6e540eb64 Ajout référence dans les structures 2012-02-22 13:16:41 +00:00
Michael RICOIS
626795a877 Ajout formulaire demande de référence d'enrichissement 2012-02-22 13:07:06 +00:00
Michael RICOIS
6bdf5bfa6e Ajout script pour dialog demande de référence dans l'enrichissement 2012-02-22 13:06:11 +00:00
Michael RICOIS
1e678a2311 Suppression style qui surcharge mal les paramètres par defaut 2012-02-22 13:05:28 +00:00
Michael RICOIS
f3805d0982 Demande de reference 2012-02-22 12:56:54 +00:00
Michael RICOIS
eb6586aaac Demande de reference 2012-02-22 11:38:57 +00:00
Michael RICOIS
a66664c166 Revu de la structure des tables d'enrichissements 2012-02-22 11:37:39 +00:00
Michael RICOIS
9a97455d5b Action pour l'affichage des informations d'enrichissements 2012-02-22 11:35:18 +00:00
Michael RICOIS
94503708a4 LIBRARY_PATH inconnue 2012-02-22 10:24:20 +00:00
Michael RICOIS
b28cf0c144 Vue pour l'action Enrichissement/Commande 2012-02-22 09:30:46 +00:00
Michael RICOIS
a7d3ac6158 Ajout préambule de l'action commande 2012-02-22 09:30:25 +00:00
Michael RICOIS
c88eb0c2fb Modification du retour de la méthode extract 2012-02-22 09:29:53 +00:00
Michael RICOIS
9a8d4b6967 Modification vue 2012-02-22 09:24:38 +00:00
Michael RICOIS
8cb021d031 Modification de l'affichage 2012-02-21 16:31:33 +00:00
Michael RICOIS
6e6d0e7eae Model pour les différentes table nécessaire à l'enrichissement 2012-02-21 16:07:43 +00:00
Michael RICOIS
d9bb3e8a74 Liaison entre la table Commandes et la table Identifiants 2012-02-21 14:37:56 +00:00
Michael RICOIS
d10344ae41 Table pour l'enregistrement des identifiants afin de réaliser l'enrichissement 2012-02-21 14:37:11 +00:00
Damien LASSERRE
faf22f9755 suppression extract 2012-02-21 13:39:23 +00:00
Damien LASSERRE
5bcee45652 Ajout de la fonction extract 2012-02-21 13:39:02 +00:00
Damien LASSERRE
915d54a719 correction bug login 2012-02-21 13:01:54 +00:00
Damien LASSERRE
57c6565b86 Fonction du controlleur enrichissement 2012-02-21 13:01:26 +00:00
Damien LASSERRE
2155ccfc3d simplification de la fonction execute 2012-02-21 12:59:50 +00:00
Damien LASSERRE
bc1a47cc5c Fonction d'extraction 2012-02-21 12:58:44 +00:00
Michael RICOIS
ef01f0d618 Lien commande enrichissement 2012-02-21 09:43:27 +00:00
Michael RICOIS
32d7023345 Enrichissement 2012-02-21 09:38:04 +00:00
Michael RICOIS
c81c3a6b29 Correction typo 2012-02-20 16:21:05 +00:00
Michael RICOIS
8881b8f576 Correction pour css 2012-02-20 16:19:49 +00:00
Damien LASSERRE
57c2bfa9a1 Ajouts des minmax et modification criteres 2012-02-20 14:08:40 +00:00
Damien LASSERRE
9fb82f87a1 Ajout des batchs 2012-02-20 14:08:13 +00:00
Damien LASSERRE
9a70310c6a Ajout des valeurs pas defaut mix max contenues dans la base local 2012-02-20 14:07:55 +00:00
Damien LASSERRE
af568d45d2 Correction moteur 2012-02-20 14:07:14 +00:00
Damien LASSERRE
38bb1176ee correction domtom 2012-02-17 09:33:09 +00:00
Damien LASSERRE
e235c8545b Remise a jours de la configuration 2012-02-16 14:25:54 +00:00
Damien LASSERRE
fb2d7b2c4e Correction d'un empty pas bon. 2012-02-16 10:03:24 +00:00
Damien LASSERRE
c5cdaa3e8c correction nbmpubli 2012-02-16 09:58:31 +00:00
Damien LASSERRE
52aecfd2e2 Correction des sessions sur les interval select 2012-02-16 09:20:21 +00:00
Damien LASSERRE
792c243f3a Correction session interval... 2012-02-16 09:17:20 +00:00
Damien LASSERRE
80e12eda14 correction dans le helper probleme avec les selected des selects... 2012-02-16 09:15:14 +00:00
Damien LASSERRE
fe2e2dfb74 Correction sur bilTca filterRange passé en filter simple. 2012-02-16 09:08:27 +00:00
Damien LASSERRE
71f591e16a Ajout de la fonction bilDuree 2012-02-16 09:06:11 +00:00
Damien LASSERRE
2100693b79 indentation 2012-02-16 08:52:02 +00:00
Damien LASSERRE
a3fe0d3af0 espace 2012-02-16 08:51:28 +00:00
Damien LASSERRE
abe6ad158e correction affichage du rapelle des critères. 2012-02-16 08:50:08 +00:00
Damien LASSERRE
04c7bb6f02 correction bug sur les départements... (majeur !) 2012-02-16 08:42:47 +00:00
Damien LASSERRE
3d54b21d08 Correction tritre + valeur null dans le rapelle des critères 2012-02-16 08:22:02 +00:00
Damien LASSERRE
a48e8eeaaf Création function reset (mise a jours) 2012-02-16 08:20:03 +00:00
Damien LASSERRE
d2a574d49e correction bug session FJ 2012-02-16 08:18:18 +00:00
Damien LASSERRE
9312fee50b correction bug 2012-02-15 17:19:36 +00:00
Damien LASSERRE
2bf6e1bb6d Mise a jours du JS pour IE6. 2012-02-15 17:07:12 +00:00
Michael RICOIS
c49a520bf5 Vue pour enrichissement 2012-02-15 16:18:35 +00:00
Michael RICOIS
f600df4cd6 Modification pour les enrichissements 2012-02-15 16:15:51 +00:00
Michael RICOIS
e3e2587a08 Suppression style pour les selections des dates avec jquery-ui 2012-02-15 13:03:12 +00:00
Michael RICOIS
55845ab56e Petit modification 2012-02-15 12:56:55 +00:00
Michael RICOIS
df51ce2355 Enrichissement 2012-02-15 12:46:40 +00:00
Michael RICOIS
25147d0665 On remet comme avant 2012-02-15 11:36:34 +00:00
Michael RICOIS
fed721dff2 On revient comme avant 2012-02-15 11:29:00 +00:00
Michael RICOIS
833dd45596 Suppression style 2012-02-15 11:19:11 +00:00
Michael RICOIS
9592b189b5 Suppression charset 2012-02-15 10:58:53 +00:00
Michael RICOIS
cceb47deaf Suppression du fichier reset.css et inclusion dans main 2012-02-15 10:50:48 +00:00
Michael RICOIS
31667cac6c Supprimer les truc inutils 2012-02-15 10:48:22 +00:00
Damien LASSERRE
8677f04e5a Correction du logout pour la reconnection. 2012-02-15 10:47:58 +00:00
Michael RICOIS
8d7fb98111 Set separator pour le titre 2012-02-15 10:40:34 +00:00
Michael RICOIS
6762b15a00 Simplification 2012-02-15 10:35:07 +00:00
Michael RICOIS
60b733b8b6 Suppression chargement fichier javascript inutile 2012-02-15 10:23:38 +00:00
Damien LASSERRE
e12080b214 remise à jours des fichiers 2012-02-15 09:41:59 +00:00
Damien LASSERRE
5fdd0a9e0a suppression du backend 2012-02-15 09:32:54 +00:00
Damien LASSERRE
bed36082ae comment de la route pour le backend 2012-02-15 09:32:34 +00:00
Damien LASSERRE
2677c972bf remise à jours des fichiers 2012-02-15 09:31:22 +00:00
Damien LASSERRE
6baa4f4edd remise à jours des fichiers 2012-02-15 09:30:57 +00:00
Damien LASSERRE
8f72a9e539 remise à jours des fichiers 2012-02-15 09:25:21 +00:00
Damien LASSERRE
68126b1576 remise à jours des fichiers 2012-02-15 09:13:31 +00:00
Damien LASSERRE
f7f2574321 remise à jours des fichiers 2012-02-15 09:12:22 +00:00
Michael RICOIS
6c3fa57080 Amélioration 2012-02-09 12:59:08 +00:00
Michael RICOIS
3f7061b48d On prend la configuration dans le fichier ini 2012-02-09 12:44:00 +00:00
Michael RICOIS
99ba700276 Suppression fichier de configuration 2012-02-09 11:16:18 +00:00
Michael RICOIS
6adc157fc9 Ajout du staging 2012-02-09 10:29:11 +00:00
Michael RICOIS
b906fc56ea Utilisateur unique mysql 2012-02-08 16:16:43 +00:00
Michael RICOIS
e6f1065c19 svn ignore 2012-02-08 16:08:14 +00:00
Michael RICOIS
8e6c107fe2 Suppression fichier de configuration 2012-02-08 16:07:07 +00:00
Michael RICOIS
65cc5b272b Ajout de la configuration 2012-02-08 16:06:17 +00:00
Michael RICOIS
dee2273c53 Suppression .htaccess 2012-02-08 16:02:56 +00:00
Michael RICOIS
f7a0c0d33a svn ignore 2012-02-08 15:51:59 +00:00
Michael RICOIS
b888f2b128 Suppression fichier 2012-02-08 15:37:02 +00:00
Damien LASSERRE
d0cac19a26 Version 1.1 de ODEA
Stable
2012-02-02 17:29:14 +00:00
Damien LASSERRE
3f4e689a90 erreur 2012-02-02 17:27:13 +00:00
Damien LASSERRE
9619043e94 Nouvelle version de ODEA
stable.
2012-02-02 17:26:53 +00:00
Damien LASSERRE
cbbc35290c Premiere version de ODEA
Peut stable...
2012-02-02 17:26:24 +00:00
Damien LASSERRE
ccfc6ac497 erreur 2012-02-02 17:25:38 +00:00
Damien LASSERRE
f9175c5e8b Premiere version de ODEA
Peut stable...
2012-02-02 17:24:48 +00:00
Damien LASSERRE
a72755c3a1 Premiere version de ODEA
Peut stable...
2012-02-02 17:24:48 +00:00
207 changed files with 6258 additions and 44728 deletions

View File

@ -1,65 +1,90 @@
<?php
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
//Initialisation global des paramètres de vue
protected function _initViewSettings()
{
$this->bootstrap('view');
$view = $this->getResource('view');
/*
* Si on détecte un périphérique mobile alors on charge
* les bons scripts
$theme = 'mobile';
$path = realpath(APPLICATION_PATH.'/views/'.$theme);
$view = new Zend_View();
$view->addBasePath($path);
*/
$theme = 'default';
$pathStyle = '/themes/'.$theme.'/styles';
$pathScript = '/themes/'.$theme.'/scripts';
$view = $this->getResource('view');
$pathStyle = '/themes/default/styles';
$pathScript = '/themes/default/scripts';
$view->setEncoding('UTF-8');
$view->doctype('XHTML1_STRICT');
$view->headMeta()
->appendHttpEquiv('Content-Type', 'text/html; charset=UTF-8')
->appendHttpEquiv('Content-Language', 'fr-FR');
->appendHttpEquiv('Content-Language', 'fr-FR');
$view->headLink()
->appendStylesheet($pathStyle.'/reset.css', 'all')
->appendStylesheet($pathStyle.'/jquery.qtip.css', 'all')
->appendStylesheet('/themes/jstree/default/style.css')
->appendStylesheet('/themes/jqueryui/jquery-ui.css', 'all')
->appendStylesheet($pathStyle.'/main.css', 'all');
//->appendStylesheet('/themes/multiselect/css/ui.multiselect.css', 'all');
$view->headScript()
->appendFile($pathScript.'/jquery.js', 'text/javascript')
->appendFile($pathScript.'/jquery.bgiframe.js', 'text/javascript')
->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');
$view->headTitle()->setSeparator(' - ');
$view->headTitle('Odea');
->appendFile($pathScript.'/upload.js', 'text/javascript')
->appendFile($pathScript.'/scripts.js', 'text/javascript');
//->appendFile($pathScript.'/ui.multiselect.js', 'text/javascript');
$view->headTitle()->setSeparator(' - ');
$view->headTitle('Odea');
}
protected function _initLogging()
{
//Logger de développement
//Logger de développement
$writer = new Zend_Log_Writer_Firebug();
if(APPLICATION_ENV=='production') $writer->setEnabled(false);
$logger = new Zend_Log($writer);
Zend_Registry::set('firebug', $logger);
}
}
protected function _initDb()
{
$dbConfig = new Zend_Config_Ini(APPLICATION_PATH . '/configs/configuration.ini', 'databases');
try {
$db = Zend_Db::factory($dbConfig->db);
$db = Zend_Db::factory($dbConfig->db);
Zend_Db_Table::setDefaultAdapter ($db);
} catch ( Exception $e ) {
exit ( $e->getMessage() );
}
Zend_Registry::set('db', $db);
Zend_Registry::set('db', $db);
}
}
protected function _initAutoload()
{
require_once APPLICATION_PATH . '/../library/Zend/Loader/Autoloader.php';
$appPath = realpath(dirname(__FILE__));
$rootPath = dirname($appPath);
$autoload = Zend_Loader_Autoloader::getInstance();
$application = new Zend_Loader_Autoloader_Resource(array(
'basePath' => $appPath . '/modules/frontend/models/',
'namespace' => '',
'resourceTypes' => array('tables'=>array('path'=>'Tables/','namespace'=>'Table'),
'objects'=>array('path'=>'Objects/', 'namespace'=>'Object'),
'forms'=>array('path'=>'Forms/', 'namespace'=>'Form')
)));
$libs = new Zend_Loader_Autoloader_Resource(array(
'basePath' => $rootPath . '/library',
'namespace' => 'library',
'resourceTypes' => array('libs'=>array('path'=>'libs/','namespace'=>'Libs'),
)));
$loader = new Zend_Application_Module_Autoloader(array(
'namespace' => '',
'basePath' => APPLICATION_PATH));
return $loader;
}
}

View File

@ -1,34 +0,0 @@
- Critères
Etablissements : Tous / Seulement les actifs / Seulement les inactifs
Type Etablissements : Tous / Uniquement les sièges / Uniquement les secondaires
Entreprises appartenant à un groupe français
Entreprise appartenant à un groupe étranger
Téléphone renseigné / non renseigné
- Secteur Géographique
Régions (insee.regions)
Départements (insee.departements)
Code Postal - Communes (insee.codepostaux)
+ Recherche textuel sur ville (code postal, commune) pour affichage liste code postal
Codes Communes Insee (insee.codepostaux)
- Forme juridique (insee.tabFJ)
Arbre de selection avec déploiement des groupes
- Activité (naf) - Entreprise, Etablissements (insee.tabNAF)
Arbre de sélection avec déploiement des groupes
- Chiffre clés
Date de création - Ancienneté (Moins d'un an, de 1 à 2, 3 à 5, 6 à 9, 10 et plus )
Nombre d'établissements (inférieur, égal, supérieur, intervalle)
Intervalle Effectif (Tranches ou Réel) - Entreprise, Etablissement
- Critères bilantiel
Date de clôture de l'exercice
Intervalle CA - Selection (Moins de 15000 euros, de 15000 à 30000, de 30000 à 75000, de 75000 à 150000, de 150000 à 750000, Plus de 750000)
Intervalle Résultat net
Intervalle CA à l'export
ACTIF - PASSIF - COMPTE DE RESULTAT - ANNEXES
Ratios
Scores (Risques de défaillance)

View File

@ -1,84 +0,0 @@
Placer les critères en session
Enregistrer régulièrement en session (SessionCriteres)
On sauvegarde, seulement si le client à mis une référence, et cliquer sur le bouton sauvegarder
Exploser les critères pour des sous comptage
Enregistrement d'un fichier login-idDefinition-timestamp
Définir la structure d'envoi des critères
Formulaire
Voir avec API Ciblage Sphinx
Voir pour l'enrichissement
Pour simplifer, l'enrichissement devra se faire à partir de la table etablissements_act
+ quelques autres tables pour des données supplémentaires
Générer un fichier avec la liste des SIREN+NIC ou SIRET + les entêtes nécessaires à l'enrichissement
Voir si le fichier doit être généré sur la plateforme de ciblage, ou par le webservice
Réplication des tables sur la plateforme ciblage
Gestion d'une queue, voir todo dans webservice
Table naf
Table régions
Table departements
Table codepostaux
Table formejuridique (tabFJ)
- Table pour la sauvegarde des critères (criteres)
id int primary key autoincrement
idClient int
login varchar
reference varchar obligatoire ?
criteres text
parent int identifiant comptage parent pour les explode default 0
dateAjout
- Table pour la sauvegarde des comptages (comptages)
id
idDefinition
resultat
uniteInsee
tarif
dateComptage
- Tables pour la sauvegarde des exports de siren (refexport)
id
idDefinition
fichier
dateExport
- profilExtraction
id
idClient
reference
criteres
tarifLigne
dateAjout
dateModif
dateSuppr
actif
- tarifsInsee
id
tarifLigne
montantMax
dateEffet

View File

@ -2,29 +2,46 @@
phpSettings.date.timezone = "Europe/Paris"
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
includePaths.library = APPLICATION_PATH "/../library"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
appnamespace = "Application"
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
resources.frontController.params.displayExceptions = 0
resources.session.save_path = APPLICATION_PATH "/../cache/sessions"
resources.session.gc_maxlifetime = 86400
resources.session.cookie_lifetime = 86400
resources.session.remember_me_seconds = 86400
; so auto-loading will find our classes in library/App
autoloaderNamespaces[] = "Structure_" ;Les structures de données
autoloaderNamespaces[] = "Libs_" ;Librairies de l'application
resources.view[] = ""
; initialize front controller resource
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.frontController.defaultControllerName = "index"
resources.frontController.defaultAction = "index"
resources.frontController.defaultModule = "frontend"
autoloaderNamespaces[] = "Scores_"
autoloaderNamespaces[] = "Application_"
resources.frontController.plugins.Auth = "Application_Controller_Plugin_Auth"
resources.frontController.plugins.Comptage = "Application_Controller_Plugin_Comptage"
resources.layout.layout = "main"
resources.layout.layoutPath = APPLICATION_PATH "/views/default"
resources.view.basePath = APPLICATION_PATH "/views/default"
;Resource router Backend
;resources.router.routes.admin.type = Zend_Controller_Router_Route
;resources.router.routes.admin.route = "/backend/*"
;resources.router.routes.admin.defaults.module = backend
;resources.router.routes.admin.defaults.controller = index
;resources.router.routes.admin.defaults.action = index
; initialize layout resource
resources.layout.layoutPath = APPLICATION_PATH "/layouts"
[staging : production]
resources.frontController.params.displayExceptions = 0
phpSettings.soap.wsdl_cache_enabled = 0
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
resources.frontController.params.displayExceptions = 1
[development : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
phpSettings.soap.wsdl_cache_enabled = 0
resources.frontController.params.displayExceptions = 1
[testing : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1

View File

@ -1,331 +0,0 @@
<?php
class ArborescenceController extends Zend_Controller_Action
{
/**
* Affiche l'arborescence des NAFs de premier niveau
*/
public function nafAction()
{
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$key = $request->getParam('key');
$this->view->assign('key', $key);
//Récupération des valeurs enregistrées en session
require_once 'Scores/SessionCiblage.php';
$sessionCiblage = new SessionCiblage();
$val = $sessionCiblage->getCritere($key);
$valuesChecked = array();
$valuesUndetermined = array();
if ($val != null){
$valuesChecked = explode(',',$val);
foreach($valuesChecked as $value){
$valuesUndetermined = array_merge($valuesUndetermined, $this->getNafParent($value, true));
}
}
$niveau = $request->getParam('niveau', 1);
$nafM = new Application_Model_Naf();
$sql = $nafM->select()->where('niveau = ?', $niveau)->order('code ASC');
$result = $nafM->fetchAll($sql)->toArray();
$tabNaf = array();
foreach($result as $item)
{
$structure = array(
'data' => $item['code'].' - '.$item['lib'],
'attr' => array('id' => $item['code'], 'niveau' => $item['niveau']),
'state' => 'closed',
'children' => array(),
);
if (in_array($item['code'], $valuesChecked)){
$structure['attr']['class'] = 'jstree-checked';
}
if (in_array($item['code'], $valuesUndetermined)){
$structure['attr']['class'] = 'jstree-undetermined';
}
$tabNaf[] = $structure;
}
$this->view->assign('naf', json_encode($tabNaf));
}
/**
* Retourne l'arborecence des NAFs de niveau supérieur à 1
*/
public function nafajaxAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender();
$request = $this->getRequest();
$key = $request->getParam('key');
//Récupération des valeurs enregistrées en session
require_once 'Scores/SessionCiblage.php';
$sessionCiblage = new SessionCiblage();
$val = $sessionCiblage->getCritere($key);
$valuesChecked = array();
$valuesUndetermined = array();
if ($val != null){
$valuesChecked = explode(',',$val);
foreach($valuesChecked as $value){
$valuesUndetermined = array_merge($valuesUndetermined, $this->getNafParent($value));
}
}
$request = $this->getRequest();
$niveau = $request->getParam('niveau', 1);
$niveau++;
$parent = $request->getParam('parent', '');
$nafM = new Application_Model_Naf();
$sql = $nafM->select();
if (!empty($parent) && $niveau==2) {
$sql->where('parent = ?', $parent);
} elseif (!empty($parent) && $niveau>2) {
$sql->where("code LIKE '".$parent."%'");
}
$sql->where('niveau = ?', $niveau)->order('code ASC');
$result = $nafM->fetchAll($sql)->toArray();
$tabNaf = array();
foreach($result as $item){
$structure = array(
'data' => $item['code'].' - '.$item['lib'],
'attr' => array('id' => $item['code'], 'niveau' => $item['niveau']),
);
if (in_array($item['code'], $valuesChecked)){
$structure['attr']['class'] = 'jstree-checked';
}
if (in_array($item['code'], $valuesUndetermined)){
$structure['attr']['class'] = 'jstree-undetermined';
}
if ($niveau<5){
$structure['state'] = 'closed';
$structure['children'] = array();
}
$tabNaf[] = $structure;
}
echo json_encode($tabNaf);
}
protected function getNafParent($value, $niveau1 = false)
{
$out = array();
if (strlen($value)>2) {
$niveau = strlen($value)-1;
$new = substr($value,0,$niveau);
$out = array_merge($out, array($new), $this->getNafParent($new, $niveau1));
} elseif (strlen($value)==2 && $niveau1 === true) {
$nafM = new Application_Model_Naf();
$sql = $nafM->select()
->from($nafM, array('parent'))
->where('code = ?', $value);
$result = $nafM->fetchRow($sql);
$out[] = $result->parent;
}
return $out;
}
/**
*
* Enter description here ...
*/
public function geographiqueAction()
{
require_once 'Scores/SessionCiblage.php';
$this->_helper->layout()->disableLayout();
$this->view->inlineScript()->appendFile('/themes/default/scripts/jquery.jstree.js');
require_once 'Scores/SessionCiblage.php';
$session = new SessionCiblage();
$val = $session->getCritere('adr_cp');
$valuesCheckeds = explode(',', $val);
if(count($valuesCheckeds) > 0) {
for($i=0;count($valuesCheckeds) > $i;$i++) {
$valuesCheckeds[$i] = substr($valuesCheckeds[$i], 1);
}
}
$valuesUndetermined = array();
if($val != null)
{
$values = explode(',', $val);
foreach($values as $valuesChecked) {
if(strlen($valuesChecked) == 5) {
$dept = substr($valuesChecked, 0, 2);
$table = new Application_Model_Departements();
$sql = $table->select()->from('departements', array('codeRegionInsee'))->where('numdep = ?',$dept);
$results = $table->fetchAll($sql)->toArray();
foreach($results as $result) {
$valuesUndetermined[] = $result['codeRegionInsee'];
}
}
if(substr($valuesChecked, 0, 1) == 'R') {
$valuesCheckeds[] = substr($valuesChecked, 1);
} else if (substr($valuesChecked, 0, 1) == 'D') {
$table = new Application_Model_Departements();
$sql = $table->select()->from('departements', array('codeRegionInsee'))->where('numdep = ?', substr($valuesChecked, 1));
$result = $table->fetchAll($sql)->toArray();
foreach($result as $item) {
$valuesUndetermined[] = $item['codeRegionInsee'];
}
}
}
}
$key = $this->getRequest()->getParam('key');
$this->view->assign('key', $key);
$regionsM = new Application_Model_Regions();
$sql = $regionsM->select()->from('regions');
$regions = $regionsM->fetchAll()->toArray();
$structure = array();
foreach($regions as $region) {
$structure = array(
'data' => $region['NCCENR'],
'attr' => array('id' => 'R'.$region['REGION'], 'niveau' => 0),
'state' => 'closed',
'children' => array()
);
if(in_array($region['REGION'], $valuesCheckeds)) {
$structure['attr']['class'] = 'jstree-checked';
}
if(in_array($region['REGION'], $valuesUndetermined)) {
$structure['attr']['class'] = 'jstree-undetermined';
}
$tabAdrDep[] = $structure;
}
$this->view->regions = json_encode($tabAdrDep);
}
public function geographiqueajaxAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender();
$request = $this->getRequest();
$key = $request->getParam('key');
$id = $request->getParam('id');
if($id[0] == 'R') {
require_once 'Scores/SessionCiblage.php';
$session = new SessionCiblage();
$val = $session->getCritere('adr_cp');
$valuesCheckeds = array();
$valuesUndetermined = array();
if($val != null)
{
$values = explode(',', $val);
foreach($values as $valuesChecked) {
if(strlen($valuesChecked) == 5) {
$valuesUndetermined[] = substr($valuesChecked, 0, 2);
}
if(substr($valuesChecked, 0, 1) == 'D') {
$valuesCheckeds[] = substr($valuesChecked, 1);
} else if (substr($valuesChecked, 0, 1) == 'R') {
$table = new Application_Model_Departements();
$sql = $table->select()->from('departements', array('numdep'))->where('codeRegionInsee = ?', substr($valuesChecked, 1));
$result = $table->fetchAll($sql)->toArray();
foreach($result as $item) {
$valuesCheckeds[] = $item['numdep'];
}
}
}
}
$region = substr($request->getParam('id'), 1);
$deps = new Application_Model_Departements();
$sql = $deps->select()
->from('departements')
->where('codeRegionInsee = ?', $region);
$departements = $deps->fetchAll($sql)->toArray();
foreach($departements as $departement) {
$structure = array(
'data' => $departement['libdep'],
'attr' => array('id' => 'D'.$departement['numdep'], 'niveau' => 1),
'state' => 'closed',
'children' => array()
);
if(in_array($departement['numdep'], $valuesCheckeds)) {
$structure['attr']['class'] = 'jstree-checked';
}
if(in_array($departement['numdep'], $valuesUndetermined)) {
$structure['attr']['class'] = 'jstree-undetermined';
}
$departementTab[] = $structure;
}
echo json_encode($departementTab);
} else if ($id[0] == 'D')
{
require_once 'Scores/SessionCiblage.php';
$session = new SessionCiblage();
$val = $session->getCritere('adr_cp');
$valuesCheckeds = array();
if($val != null)
{
$values = explode(',', $val);
foreach($values as $valuesChecked) {
if(strlen($valuesChecked) == 5) {
$valuesCheckeds[] = $valuesChecked;
}
else if(substr($valuesChecked, 0, 1) == 'D') {
$table = new Application_Model_Codepostaux();
$sql = $table->select()->from('codepostaux', array('Codepos'))->where('Codepos LIKE "'.substr($valuesChecked, 1).'%"');
$results = $table->fetchAll($sql)->toArray();
foreach($results as $result) {
if(!in_array($result['Codepos'], $values))
$valuesCheckeds[] = $result['Codepos'];
}
} else if (substr($valuesChecked, 0, 1) == 'R') {
$Departements = new Application_Model_Departements();
$sql = $Departements->select()->from('departements', array('numdep'))->where('codeRegionInsee = ?', substr($valuesChecked, 1));
$results = $Departements->fetchAll($sql)->toArray();
foreach($results as $result) {
$table = new Application_Model_Codepostaux();
$sql = $table->select()->from('codepostaux', array('Codepos'))->where('Codepos LIKE "'.$result['numdep'].'%"');
$codes = $table->fetchAll($sql)->toArray();
foreach($codes as $code) {
if(!in_array($result['Codepos'], $values))
$valuesCheckeds[] = $code['Codepos'];
}
}
}
}
}
$numdep = substr($request->getParam('id'), 1);
$code = new Application_Model_Codepostaux();
$sql = $code->select()
->from('codepostaux')
->where('Codepos LIKE "'.$numdep.'%"');
$codePostaux = $code->fetchAll($sql)->toArray();
foreach($codePostaux as $codePostau) {
$structure = array(
'data' => '[ '.$codePostau['Codepos'].' ]'.ucfirst(strtolower($codePostau['Commune'])),
'attr' => array('id' => $codePostau['Codepos'], 'niveau' => 2)
);
if(in_array($codePostau['Codepos'], $valuesCheckeds)) {
$structure['attr']['class'] = 'jstree-checked';
}
$CodePostauxTab[] = $structure;
}
echo json_encode($CodePostauxTab);
}
}
/**
*
* Enter description here ...
*/
public function juridqueAction()
{
$valeurs = $this>getRequest()->getParam('');
}
}

View File

@ -1,132 +0,0 @@
<?php
class ComptageController extends Zend_Controller_Action
{
public function indexAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
//Session
require_once 'Scores/SessionCiblage.php';
$session = new SessionCiblage();
$request = $this->getRequest();
$key = $request->getParam('cle');
$valeur = $request->getParam('valeur');
$sessionValeur = $session->getCritere($key);
if($sessionValeur == "" && empty($valeur)) {
$session->unsetCritere($key);
} else {
$session->setCritere($key, $valeur);
}
$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($field->getValues());
$total = $ciblage->execute();
$insee = $ciblage->calculRedevanceInsee();
$session->setNb('total', $total);
$session->setNb('insee', $insee);
//Retour comptage, unité Insee
$result = array(
'count' => number_format($total, 0, '', ' '),
'insee' => number_format($insee, 0, '', ' ')
);
echo json_encode($result);
}
/**
* Affichage formulaire de sauvegarde
*/
public function savedialogAction()
{
$this->_helper->layout()->disableLayout();
//Récupération de la session pour le profil et les valeurs du comptage
require_once 'Scores/SessionCiblage.php';
$session = new SessionCiblage();
$criteres = $session->getCriteres();
$this->view->assign('criteres', $criteres);
if (count($criteres)==0) {
$this->view->assign('noSelection', true);
}
}
/**
* Sauvegarde du profil de ciblage et de son comptage
*/
public function saveAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$request = $this->getRequest();
$ref = $request->getParam('ref', '');
if (empty($ref)) {
echo json_encode(array(
'error'=>1,
'msg'=> "Référence non définie !"));
} else {
//Session
require_once 'Scores/SessionCiblage.php';
$session = new SessionCiblage();
$criteres = $session->getCriteres();
$resultat = $session->getNb('total');
$nbInsee = $session->getNb('insee');
//Informations utilisateur
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
$db = Zend_Registry::get('db');
//Enregistrement des critères
$criteresM = new Application_Model_Criteres($db);
$data = array(
'idClient' => $user->idClient,
'login' => $user->username,
'reference' => $ref,
'criteres' => json_encode($criteres),
'parent' => 0,
'dateAjout' => date('Y-m-d H:i:s'),
);
$id = $criteresM->insert($data);
if ($id){
//Enregistrement des valeurs du comptage
$comptageM = new Application_Model_Comptages($db);
$data = array(
'idDefinition' => $id,
'resultat' => $resultat,
'uniteInsee' => $nbInsee,
'tarif' => '',
'dateAjout' => date('Y-m-d H:i:s'),
);
if ($comptageM->insert($data)) {
echo json_encode(array(
'error'=>0,
'msg'=> "Vos critères ont été sauvegardés sous la référence $ref"));
} else {
echo json_encode(array(
'error'=>1,
'msg'=> "Erreur lors de l'enregistrement"));
}
} else {
echo json_encode(array(
'error'=>1,
'msg'=> "Erreur lors de l'enregistrement"));
}
}
}
}

View File

@ -1,42 +0,0 @@
<?php
class CriteresController extends Zend_Controller_Action
{
public function init()
{
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
$field = new Fields($user->username);
$this->view->fields = $field;
$this->view->headScript()->appendFile('/themes/default/scripts/jquery.jstree.js', 'text/javascript');
}
public function indexAction()
{
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
if ($user->customisation) {
$this->view->assign('preferences', $user->customisation);
}
}
public function entrepriseAction(){
$this->view->headLink()->appendStylesheet('/themes/default/styles/criteres/'.$this->getRequest()->getActionName().'.css', 'all');
}
public function economiqueAction(){
$this->view->headLink()->appendStylesheet('/themes/default/styles/criteres/'.$this->getRequest()->getActionName().'.css', 'all');
}
public function geographiqueAction(){
$this->view->headLink()->appendStylesheet('/themes/default/styles/criteres/'.$this->getRequest()->getActionName().'.css', 'all');
}
public function juridiqueAction(){
$this->view->headLink()->appendStylesheet('/themes/default/styles/criteres/'.$this->getRequest()->getActionName().'.css', 'all');
}
public function financiereAction(){
$this->view->headLink()->appendStylesheet('/themes/default/styles/criteres/'.$this->getRequest()->getActionName().'.css', 'all');
}
}

View File

@ -1,227 +0,0 @@
<?php
/**
* Tableau de bord de gestion pour le client
* Permet de retrouver ces différents comptages et export
*
*/
class DashboardController extends Zend_Controller_Action
{
public function init()
{
$this->view->headScript()->appendFile('/themes/default/scripts/dashboard.js', 'text/javascript');
$this->view->headLink()->appendStylesheet('/themes/default/styles/dashboard.css');
}
/**
* Affiche le tableau de bord
*/
public function indexAction()
{
//Liste des derniers comptages
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
$db = Zend_Registry::get('db');
$criteresM = new Application_Model_Criteres($db);
$sql = $criteresM->select(true)
->columns(array('id', 'reference', 'dateAjout'))
->where("idClient = ?", $user->idClient)
->where("login = ?", $user->username)
->order('dateAjout DESC')
->limit(5);
$rows = $criteresM->fetchAll($sql);
$results = array();
$comptagesM = new Application_Model_Comptages($db);
foreach($rows->toArray() as $item)
{
$info = array(
'id' => $item['id'],
'reference' => $item['reference'],
'dateCriteres' => $item['dateAjout'],
);
//Recherche des comptages
$sql = $comptagesM->select(true)
->columns(array('resultat', 'uniteInsee', 'dateAjout'))
->where('idDefinition = ?', $item['id'])
->order('dateAjout DESC')->limit(1);
$comptage = $comptagesM->fetchAll($sql)->toArray();
if (count($comptage)>0){
$info['resultat'] = $comptage[0]['resultat'];
$info['uniteInsee'] = $comptage[0]['uniteInsee'];
$info['dateComptage'] = $comptage[0]['dateAjout'];
}
$results[] = $info;
}
$this->view->assign('comptages', $results);
//Rechercher un comptage
}
public function menuAction()
{
}
/**
* Affiche la liste des ciblages avec pagination
*/
public function ciblagesAction()
{
$request = $this->getRequest();
$page = $request->getParam('page', 1);
$offset = 20;
//Liste des ciblages par paquet de n
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
$db = Zend_Registry::get('db');
$criteresM = new Application_Model_Criteres($db);
//Compter le nombre de page
$sql = $criteresM->select()
->from($criteresM, array('nb' => 'COUNT(*)'))
->where("idClient = ?", $user->idClient)
->where("login = ?", $user->username);
$count = $criteresM->fetchRow($sql);
$nbCiblage = $count->nb;
//Récupérer les informations
$position = ($page-1)*$offset+1;
$sql = $criteresM->select()
->from($criteresM, array('id', 'reference', 'dateAjout'))
->where("idClient = ?", $user->idClient)
->where("login = ?", $user->username)
->order('dateAjout DESC')
->limitPage($position, $offset);
$rows = $criteresM->fetchAll($sql);
$results = array();
$comptagesM = new Application_Model_Comptages($db);
foreach($rows->toArray() as $item)
{
$info = array(
'id' => $item['id'],
'reference' => $item['reference'],
'dateCriteres' => $item['dateAjout'],
);
//Recherche des comptages
$sql = $comptagesM->select(true)
->columns(array('resultat', 'uniteInsee', 'dateAjout'))
->where('idDefinition = ?', $item['id'])
->order('dateAjout DESC')->limit(1);
$comptage = $comptagesM->fetchAll($sql)->toArray();
if (count($comptage)>0){
$info['resultat'] = $comptage[0]['resultat'];
$info['uniteInsee'] = $comptage[0]['uniteInsee'];
$info['dateComptage'] = $comptage[0]['dateAjout'];
}
$results[] = $info;
}
$this->view->assign('ciblages', $results);
$this->view->assign('nbCiblage', $nbCiblage);
}
/**
* Affiche le détail du comptage
* comptage multiple, fichier, etc....
*/
public function ciblagedetailAction()
{
$request = $this->getRequest();
$id = $request->getParam('id');
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
$db = Zend_Registry::get('db');
$criteresM = new Application_Model_Criteres($db);
$sql = $criteresM->select()
->where("idClient = ?", $user->idClient)
->where("login = ?", $user->username)
->where("id = ?", $id);
$criteres = $criteresM->fetchRow($sql);
$this->view->assign('criteres', $criteres->toArray());
if ($criteres != null){
$comptagesM = new Application_Model_Comptages($db);
$sql = $comptagesM->select()
->where('idDefinition = ?', $id);
$comptages = $comptagesM->fetchAll($sql);
$this->view->assign('comptages', $comptages->toArray());
}
}
/**
* Recherche un comptage avec la référence ou la date
*/
public function rcomptageAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$request = $this->getRequest();
$q = strtolower($this->getRequest()->getParam('q', ''));
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
$db = Zend_Registry::get('db');
$criteresM = new Application_Model_Criteres($db);
$sql = $criteresM->select()
->from($criteresM, array('id', 'reference', "DATE_FORMAT(dateAjout, '%d/%m/%Y') as date"))
->where("idClient = ?", $user->idClient)
->where("login = ?", $user->username)
->where("reference LIKE ?", $q.'%');
$rows = $criteresM->fetchAll($sql);
if (count($rows)>0){
$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)),
);
}
}
echo json_encode($output);
}
/**
* Gestion de la configuration de l'application
*/
public function configurationAction()
{
//Préférences
//Profil extraction
}
/**
* Liste des exportations simple non lié à un ciblage
*/
public function exportsAction()
{
}
}

View File

@ -1,68 +0,0 @@
<?php
class EnrichissementController extends Zend_Controller_Action
{
public function init()
{
$this->view->headScript()->appendFile('/themes/default/scripts/enrichissement.js', 'text/javascript');
$this->view->headLink()->appendStylesheet('/themes/default/styles/enrichissement.css');
}
/**
* Enter description here ...
*/
public function indexAction(){}
public function fileformAction()
{
$this->view->headScript()->appendFile('/themes/default/scripts/jquery.form.js', 'text/javascript');
$this->view->headScript()->appendFile('/themes/default/scripts/jqueryprogressbar.js', 'text/javascript');
$this->view->assign('filesize', ini_get('upload_max_filesize'));
}
public function fileuploadAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$config = new Zend_Config_Ini(APPLICATION_PATH . '/configs/configuration.ini', 'path');
$path = realpath($config->data).'/clients';
if(!file_exists($path)) mkdir($path);
if ( isset($_FILES) && count($_FILES)==1 ){
$n = $_FILES['fichier']['name'];
$s = $_FILES['fichier']['size'];
$tmp_name = $_FILES['fichier']['tmp_name'];
$name = $_REQUEST['ref'];
$extValide = array('csv');
$extension = strrchr($n,'.');
$extension = substr($extension,1);
//@todo : vérifier l'extension du fichier
if (move_uploaded_file($tmp_name, $path.'/'.$name.'.'.$extension)){
echo "Uploadé !";
} else {
echo "Erreur : ".$_FILES['fichier']['error'];
}
}
}
/**
* Etat de progression de l'upload du fichier
*/
public function fileprogressAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$request = $this->getRequest();
$key = $request->getParam('key', '');
if (!empty($key)) {
//$rep sera égal à false si la clef n'existe pas dans le cache apc
$rep = apc_fetch('upload_'.$key);
echo json_encode($rep);
}
}
}

View File

@ -1,7 +0,0 @@
<?php
class ExtractionController extends Zend_Controller_Action
{
public function indexAction(){
}
}

View File

@ -1,72 +0,0 @@
<?php
class IndexController extends Zend_Controller_Action
{
public function init(){}
public function indexAction()
{
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
if ($user->customisation) {
$this->view->assign('preferences', $user->customisation);
}
}
public function selectionAction(){}
public function historiqueAction(){}
public function criteresAction()
{
$this->view->headScript()->appendFile('/themes/default/scripts/fields.js', 'text/javascript');
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
$session = new SessionCiblage();
//Chargement de la structure des champs et des préférences utilisateurs
require_once 'Scores/Field.php';
$fields = new Fields($user->username);
$this->view->fields = $fields;
$this->view->criteres = $session->getCriteres();
}
public function resetAction()
{
require_once 'Scores/SessionCiblage.php';
$session = new SessionCiblage();
$session->clearCiblage();
$this->_redirect('./');
}
public function saveAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender();
$field = $this->getRequest()->getParam('name');
$fields = $this->fields->getFields();
$fields[$field]['activated'] = (($fields[$field]['activated'] == false)?true:false);
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
$db = Zend_Registry::get('db');
$prefsModel = new Application_Model_Prefs($db);
$data = array(
'login' => $user->username,
'json' => $this->fields->getNotActivated($fields),
);
$prefsModel->select()->where('login = "?"', $user->username);
$rows =$prefsModel->fetchRow();
$rows = $rows->toArray();
if (count($rows) > 0) {
$prefsModel->update($data, 'login = "'.$user->unsername.'"');
} else {
$prefsModel->insert($data);
}
$this->_redirect('./');
}
}

View File

@ -1,57 +0,0 @@
<?php
class PreferencesController extends Zend_Controller_Action
{
public function saveAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender();
$fields = $this->getRequest()->getParam('fields');
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
$db = Zend_Registry::get('db');
$prefsModel = new Application_Model_Prefs($db);
$data = array(
'login' => $user->username,
'json' => json_encode($this->getNotActivated(json_decode($fields))),
);
$sql = $prefsModel->select()->where('login = ?', $user->username);
$rows = $prefsModel->fetchAll($sql);
if (count($rows)>0) {
$prefsModel->update($data, 'login = '.$user->unsername);
} else {
$prefsModel->insert($data);
}
$this->_redirect('./');
}
public function getNotActivated($fields)
{
foreach($fields as $name => $field)
{
if(!$field['activated']) {
$desactivated[] = array($name => "");
}
}
return ($desactivated);
}
/**
* Place un marqueur d'activation du mode de personnalisation dans la session Utilisateur
* On retourne ensuite dans index/index pour permettre le choix des préférences d'affichage
*/
public function activeAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender();
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
//@todo : Vérifier que l'utilisateur à le droit de customiser
$user->customisation = true;
$auth->getStorage()->write($user);
$this->_redirect('./');
}
}

View File

@ -1,16 +0,0 @@
<?php
class PrefsController extends Zend_Controller_Action
{
public function indexAction()
{
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
$db = Zend_Registry::get('db');
$prefs = new Application_Model_Prefs($db);
$sql = $prefs->select()->where('login = ?', $user->username);
$this->view->entries = $prefs->fetchAll($sql);
}
}

View File

@ -1,30 +0,0 @@
<?php
class RechercheController extends Zend_Controller_Action
{
/**
*
* Enter description here ...
*/
public function nafAction()
{
}
/**
*
* Enter description here ...
*/
public function geographiqueAction()
{
}
/**
*
* Enter description here ...
*/
public function juridiqueAction()
{
}
}

View File

@ -1,91 +0,0 @@
<?php
class UserController extends Zend_Controller_Action
{
public function init()
{
require_once 'Forms/Login.php';
require_once 'Scores/WebAuthAdapter.php';
require_once 'Scores/WsScores.php';
}
/**
* Gestion de l'authentification
*/
public function loginAction()
{
$this->view->headTitle()->append('Connexion');
$form = new Form_Login();
$this->view->form = $form;
$request = $this->getRequest();
if ($request->isPost()) {
$formData = $request->getPost();
if ($form->isValid($formData)) {
$login = $form->getValue('login');
$pass = $form->getValue('pass');
$auth = Zend_Auth::getInstance();
$authAdapter = new WebAuthAdapter($login, md5($login.'|'.$pass));
$result = $auth->authenticate($authAdapter);
if (!$result->isValid()){
$this->view->message = '';
Zend_Registry::get('firebug')->info($result);
foreach ($result->getMessages() as $message) {
$this->view->message.= $message."<br/>";
}
} else {
$timeout = $auth->getIdentity()->timeout;
//Ecrit un cookie persistant valide pendant le temps definit
Zend_Session::rememberMe($timeout);
$storage = new Zend_Auth_Storage_Session();
$sessionNamespace = new Zend_Session_Namespace($storage->getNamespace());
$sessionNamespace->setExpirationSeconds($timeout);
$auth->setStorage($storage);
$url = '';
if (Zend_Session::namespaceIsset('login')){
$session = new Zend_Session_Namespace('login');
if (isset($session->url)) {
$url = $session->url;
}
}
if (!empty($url) && $url!='/user/login' && $url!='/localauth'){
$this->_redirect($url);
}
$this->_redirect('/');
}
}
}
$this->_helper->layout()->disableLayout();
$this->render('login');
}
/**
* Gestion de la déconnexion
*/
public function logoutAction()
{
//Suppression des critères de comptage en session
require_once 'Scores/SessionCiblage.php';
$session = new SessionCiblage();
$session->clearCiblage();
//Suppression de l'identité
Zend_Auth::getInstance()->clearIdentity();
$this->_helper->layout()->disableLayout();
$url = 'http://www.scores-decisions.com/';
$refresh = 5;
if (APPLICATION_ENV != 'production'){
$url = 'http://'.$_SERVER['SERVER_NAME'].$this->view->url(array(
'controller' => 'user',
'action' => 'login',
));
}
$this->view->assign('url', $url);
$this->view->headMeta()->appendHttpEquiv('refresh', '5; url='.$url);
$this->render('logout');
}
}

View File

@ -0,0 +1,35 @@
<div id="primaryNavigation" class="clearfix">
<ul>
<li><a href="<?=$this->url(array('controller'=>'index', 'action'=>'index'), null, true)?>">Accueil</a></li>
<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>
<div id="logo">
<h1>Odea</h1>
</div>
<div id="message">
<?php if ($this->msgComptage){?>
<div id="comptage" >
<?php if (!empty($this->total)) {?>
Nombre sélectionnées :
<span class="valeur"><?=$this->total?></span>
(dont <span class="valeur"><?=$this->insee?></span> unité(s) insee)
<?php } else {?>
Aucune sélection.
<?php }?>
</div>
<div id="attente" style="display:none;">
<img src="/themes/default/images/ajax.gif" />
</div>
<div id="control">
[<a href="<?=$this->url(array('controller'=>'comptage', 'action'=> 'reset'))?>">Initialiser les critères</a>],
[<a class="saveciblage" href="<?=$this->url(array('controller'=>'comptage', 'action'=>'savedialog'))?>">Sauvegarder le profil du ciblage</a>]
</div>
<?php }?>
</div>

View File

@ -1,5 +0,0 @@
<?php
class Application_Model_Codepostaux extends Zend_Db_Table_Abstract
{
protected $_name = 'codepostaux';
}

View File

@ -1,5 +0,0 @@
<?php
class Application_Model_Comptages extends Zend_Db_Table_Abstract
{
protected $_name = 'comptages';
}

View File

@ -1,5 +0,0 @@
<?php
class Application_Model_Criteres extends Zend_Db_Table_Abstract
{
protected $_name = 'criteres';
}

View File

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

View File

@ -1,5 +0,0 @@
<?php
class Application_Model_Naf extends Zend_Db_Table_Abstract
{
protected $_name = 'naf';
}

View File

@ -1,5 +0,0 @@
<?php
class Application_Model_Prefs extends Zend_Db_Table_Abstract
{
protected $_name = 'prefs';
}

View File

@ -1,5 +0,0 @@
<?php
class Application_Model_ProfilExtraction extends Zend_Db_Table_Abstract
{
protected $_name = 'profilExtraction';
}

View File

@ -1,5 +0,0 @@
<?php
class Application_Model_RefExport extends Zend_Db_Table_Abstract
{
protected $_name = 'refexport';
}

View File

@ -1,6 +0,0 @@
<?php
class Application_Model_Regions extends Zend_Db_Table_Abstract
{
protected $_name = 'regions';
}

View File

@ -0,0 +1,88 @@
<?php
class ArborescenceController extends Libs_Controller
{
/* Nafs */
public function nafAction()
{
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$key = $request->getParam('key');
$object = new Object_Naf();
$this->view->key = $key;
$this->view->naf = $object->naf($request->getParam('niveau', 1), $key);
}
public function nafajaxAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender();
$request = $this->getRequest();
$key = $request->getParam('key');
$object = new Object_Naf();
echo $object->ajax($request->getParam('parent', ''),
$request->getParam('niveau', 1),
$request->getParam('key')
);
}
/* Geographiques */
public function geographiqueAction()
{
$this->_helper->layout()->disableLayout();
$object = new Object_Codepostaux();
$key = $this->getRequest()->getParam('key');
$this->view->key = $key;
$this->view->regions = $object->_getRegions();
}
public function geographiqueajaxAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender();
$request = $this->getRequest();
$id = $request->getParam('id');
$niveau = $request->getParam('niveau');
$object = new Object_Codepostaux();
if($niveau == 0) {
echo ($object->_getDepartements($id));
} else if ($niveau == 1) {
echo ($object->_getCommunes($id));
}
}
/* Forme Juridique */
public function juridiqueAction()
{
$this->_helper->layout()->disableLayout();
$object = new Object_Formejuridique();
$key = $this->getRequest()->getParam('key');
$this->view->key = $key;
$this->view->formejuridiques = $object->_getParents();
}
public function juridiqueajaxAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender();
$object = new Object_Formejuridique();
$request = $this->getRequest();
$id = $request->getParam('id');
echo ($object->_getFils($id));
}
}

View File

@ -0,0 +1,137 @@
<?php
class ComptageController extends Zend_Controller_Action
{
public function init()
{
/* Initialize action controller here */
}
public function indexAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$request = $this->getRequest();
$object = new Object_Comptage();
echo $object->count($request->getParam('cle'), $request->getParam('valeur'));
}
public function resetAction()
{
require_once 'Scores/SessionCiblage.php';
$erreurs = new Zend_Session_Namespace('erreurs');
$session = new SessionCiblage();
$session->clearCiblage();
unset($erreurs->erreurs);
$this->_redirect('./');
}
public function savedialogAction()
{
$this->_helper->layout()->disableLayout();
//Récupération de la session pour le profil et les valeurs du comptage
require_once 'Scores/SessionCiblage.php';
$session = new SessionCiblage();
$criteres = $session->getCriteres();
$this->view->criteres = $criteres;
if (count($criteres) == 0) {
$this->view->noSelection = true;
}
}
public function saveAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$request = $this->getRequest();
$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['uniteInsee'], 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->result = $result;
}
public function previsualisationAction()
{
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$object = new Object_Comptage();
$sirets = $object->count(null, null, true);
$dbConfig = new Zend_Config_Ini(APPLICATION_PATH . '/configs/configuration.ini', 'databases');
try {
$dbMetier = Zend_Db::factory($dbConfig->jo);
} catch ( Exception $e ) {
exit ( $e->getMessage() );
}
$i = 0;
foreach($sirets as $siret) {
if($i>10)
break;
$sql = $dbMetier->select()->from('etablissements_act')->where('siren = ?', substr($siret, 0, 9))
->where('nic = ?', substr($siret, 9, strlen($siret)));
$result = $dbMetier->fetchRow($sql);
/*Provisoir...*/
$result['tel'] = str_pad($result['tel'], 10, 0, STR_PAD_LEFT);
$result['fax'] = str_pad($result['fax'], 10, 0, STR_PAD_LEFT);
$previ[] = $result;
$i++;
}
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
//$object->getProfil($user->username, $user->idClient);
$table = new Table_EnrichissementProfils();
$sql = $table->select()
->where('login = ?', $user->username)
->where('idClient = ?', $user->idClient);
$result = $table->fetchRow($sql);
if(!empty($result)) {
$result = $result->toArray();
$champs = json_decode($result['criteres']);
require_once('Scores/Enrichissement.php');
$fields = new Enrichissement();
$this->view->reference = $fields->getFields();
}
$this->view->champs = $champs;
$this->view->liste = $previ;
}
}

View File

@ -0,0 +1,152 @@
<?php
class DashboardController extends Libs_Controller
{
public function init()
{
$this->view->headLink()->appendStylesheet('/themes/default/styles/dashboard.css', 'all');
$this->view->headScript()->appendFile('/themes/default/scripts/dashboard.js', 'text/javascript');
}
public function indexAction()
{
$object = new Object_Dashboard();
$this->view->comptages = $object->index();
$this->view->enrichissements = $object->enrichissements();
}
public function ciblagesAction()
{
$object = new Object_Dashboard();
$request = $this->getRequest();
$assigns = $object->ciblage($request->getParam('page', 1));
$this->view->ciblages = $assigns['ciblages'];
$this->view->nbCiblage = $assigns['nbCiblage'];
}
public function ciblageAction()
{
require_once('Scores/Field.php');
$config = new Zend_Config_Ini(APPLICATION_PATH.'/configs/configuration.ini');
$object = new Object_Dashboard();
$request = $this->getRequest();
$comptage = $object->ciblagedetail($request->getParam('id'));
$enrichissement = $object->enrichissement($request->getParam('id'));
$this->view->comptageId = $request->getParam('id');
$this->view->label = new Fields();
$this->view->criteres = $comptage['criteres'];
$this->view->comptages = $comptage['comptages'];
$this->view->enrichissements = $enrichissement;
$this->view->pathfile = $config->path->data;
}
public function rcomptageAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$request = $this->getRequest();
$q = $request->getParam('q');
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
$criteresM = new Table_Criteres();
$sql = $criteresM->select()
->from($criteresM, array('id', 'reference', "DATE_FORMAT(dateAjout, '%d/%m/%Y') as date"))
->where("idClient = ?", $user->idClient)
->where("login = ?", $user->username)
->where("reference LIKE ?", $q.'%');
$rows = $criteresM->fetchAll($sql);
if (count($rows)>0){
$separator = " , ";
foreach ($rows as $item) {
$output[] = array(
'label' => $item->reference . $separator . $item->date,
'value' => $item->reference,
'url' => $this->view->url(array('controller'=>'dashboard', 'action'=>'ciblage', 'id'=>$item->id)),
);
}
}
echo json_encode($output);
}
/**
* Liste des enrichissements
*/
public function enrichissementsAction()
{
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
$config = new Zend_Config_Ini(APPLICATION_PATH.'/configs/configuration.ini');
//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->encours = $encours;
// Impossible de copie la varible issu d'un select car sinon elle conserve les meme propriété que sont parent
// donc les selects... donc obliger de faire deux requetes pour le moment.
$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('criteres.idClient = ?', $user->idClient)
->where('criteres.login = ?', $user->username)
->where('i.dateStart != ?', '0000-00-00 00:00:00');
$fini = $enrichissementsM->fetchAll($sql)->toArray();
$this->view->fini = $fini;
$this->view->pathfile = $config->path->data;
}
/**
* Détail d'un enrichissment
*/
public function enrichissementAction()
{
}
}

View File

@ -0,0 +1,46 @@
<?php
class EconomiqueController extends Libs_Controller
{
public function init()
{
/* Initialize action controller here */
}
public function indexAction()
{
require_once('Scores/Field.php');
$this->view->headLink()->appendStylesheet('/themes/default/styles/'.$this->getRequest()->getControllerName().'.css', 'all');
$field = new Fields();
$this->view->fields = $field;
}
public function resetAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender();
require_once('Scores/SessionCiblage.php');
$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

@ -0,0 +1,253 @@
<?php
class EnrichissementController extends Zend_Controller_Action
{
public function init()
{
$this->view->headScript()->appendFile('/themes/default/scripts/enrichissement.js', 'text/javascript');
$this->view->headLink()->appendStylesheet('/themes/default/styles/enrichissement.css');
}
/**
* Enter description here ...
*/
public function indexAction(){}
public function fileformAction()
{
$this->view->headScript()->appendFile('/themes/default/scripts/jquery.form.js', 'text/javascript');
$this->view->headScript()->appendFile('/themes/default/scripts/jqueryprogressbar.js', 'text/javascript');
$this->view->assign('filesize', ini_get('upload_max_filesize'));
}
public function fileuploadAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$config = Zend_Registrey::get('configuration');
$path = realpath($config->path->data).'/clients';
if(!file_exists($path)) mkdir($path);
if ( isset($_FILES) && count($_FILES)==1 ){
$n = $_FILES['fichier']['name'];
$s = $_FILES['fichier']['size'];
$tmp_name = $_FILES['fichier']['tmp_name'];
$name = $_REQUEST['ref'];
$extValide = array('csv');
$extension = strrchr($n,'.');
$extension = substr($extension,1);
//@todo : vérifier l'extension du fichier
if (move_uploaded_file($tmp_name, $path.'/'.$name.'.'.$extension)){
echo "Uploadé !";
} else {
echo "Erreur : ".$_FILES['fichier']['error'];
}
}
}
/**
* Etat de progression de l'upload du fichier
*/
public function fileprogressAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$request = $this->getRequest();
$key = $request->getParam('key', '');
if ( !empty($key) ) {
//$rep sera égal à false si la clef n'existe pas dans le cache apc
$rep = apc_fetch('upload_'.$key);
echo json_encode($rep);
}
}
/**
* Enregistrement de la commande pour l'ennrichissement
*/
public function commandeAction()
{
set_time_limit(60);
$this->_helper->layout()->disableLayout();
$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
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
$profilsM = new Table_EnrichissementProfils();
$sql = $profilsM->select()
->from($profilsM, array('id'))
->where('idClient=?', $user->idClient)
->where('login=?', $user->username)
->where('actif=?', 1);
$profil = $profilsM->fetchRow($sql);
$idProfil = $profil->id;
}
$comptage = new Table_Comptages();
$sql = $comptage->select()->where('idDefinition = ?', $idCriteres);
$result = $comptage->fetchRow($sql);
$idComptage = $result['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);
//Récupération des SIRET
require_once 'Scores/Ciblage.php';
$ciblage = new Ciblage($values, true);
$infosExtraction = $ciblage->execute(true);
//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,
'reference' => $this->getRequest()->getParam('ref'),
'idCriteres' => $criteres->id,
'idProfil' => $idProfil,
'identifiants' => json_encode($infosExtraction),
'idProfil' => $idProfil,
'fichier' => '',
'nbLigneTotales' => count($infosExtraction),
'nbLigneTraites' => 0,
'uniteInsee' => $ciblage->calculRedevanceInsee(),
'error' => '',
'dateAdded' => date('YmdHms'),
);
$identifiantsM = new Table_EnrichissementIdentifiants();
$idIdentifiant = $identifiantsM->insert($data);
exec('php '.APPLICATION_PATH.'/../batch/enrichissement.php --id '.$idIdentifiant);
}
/**
* 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!==null)
{
$this->view->assign('profil', true);
$idCritere = $request->getParam('id', null);
$comptagesM = new Table_Comptages();
$sql = $comptagesM->select()
->where('idDefinition = ?', $idCritere)
->order('dateAjout DESC')
->limit(1);
$comptages = $comptagesM->fetchAll($sql);
$old = $comptages;
$oldResultat = $old[0]->resultat;
$oldResultatInsee = $old[0]->uniteInsee;
if ( $comptages->count()>0 ) {
$item = $comptages[0];
$date = explode(' ', $item->dateAjout);
$date = $date[0];
if($date != '0000-00-00') {
if($date != date('Y-m-d')) {
$criteres = new Table_Criteres();
$sql = $criteres->select()->where('id = ?', $idCritere);
$result = $criteres->fetchRow($sql)->toArray();
$criteres = json_decode($result['criteres'], true);
require_once('Scores/Field.php');
require_once('Scores/Ciblage.php');
$field = new Fields();
$count = new Ciblage($field->getValues($criteres));
$item['resultat'] = $count->execute();
$item['uniteInsee'] = $count->calculRedevanceInsee();
}
}
$this->view->assign('resultat', $item['resultat']);
$this->view->assign('uniteInsee', $item['uniteInsee']);
//Calcul du prix
$redevanceInsee = 3.295/100; //Seuil de facturation 52 734 euros
$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->prix = round($prix, 2);
$this->view->prixInsee = round($prixInsee, 2);
$this->view->infoInsee = $infoInsee;
$this->view->id = $item['id'];
/*$this->view->oldDate = $date;
$this->view->oldResult = $oldResultat;
$this->view->oldResultInsee = $oldResultatInsee;
$this->view->oldPrice = round(($oldResultat* $profil->tarifLigne)+ $oldResultatInsee);
$this->view->oldPriceInsee = round($oldResultatInsee*$redevanceInsee, 2);*/
$this->view->criteres = $criteres;
}
}
}
public function downloadAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$id = $this->getRequest()->getParam('id');
$table = new Table_EnrichissementIdentifiants();
$sql = $table->select()
->where('id = ?', $id);
$result = $table->fetchRow($sql);
if(!empty($result)) {
$config = new Zend_Config_Ini(APPLICATION_PATH.'/configs/configuration.ini');
$result = $result->toArray();
$date = explode(' ', $result['dateAdded']);
$path = $config->path->data.'/'.substr($date[0], 0, 7).'/';
$file = $result['fichier'];
}
$content_type = 'application/csv-tab-delimited-table';
//Envoi du fichier sur la sortie standard
if ( file_exists($path.$file) ) {
header('Content-Transfer-Encoding: none');
header('Content-type: ' . $content_type.'');
header('Content-Length: ' . filesize($path.$file));
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
header('Content-Disposition: filename="' . basename($path.$file) . '"');
header('Cache-Control: private, max-age=0, must-revalidate');
header('Pragma: public');
ini_set('zlib.output_compression', '0');
echo file_get_contents($path.$file);
} else {
echo 'Impossible de charger le fichier.';
}
}
}

View File

@ -0,0 +1,27 @@
<?php
class EntrepriseController extends Libs_Controller
{
public function init()
{
/* Initialize action controller here */
}
public function indexAction()
{
require_once('Scores/Field.php');
$this->view->headLink()->appendStylesheet('/themes/default/styles/'.$this->getRequest()->getControllerName().'.css', 'all');
$field = new Fields();
$this->view->fields = $field;
}
public function resetAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender();
require_once('Scores/SessionCiblage.php');
$session = new SessionCiblage();
$session->resetFamille('entreprise');
}
}

View File

@ -0,0 +1,43 @@
<?php
class ErreurController extends Libs_Controller
{
protected $correlation = array(
'siege' => array('fax', 'tel'),
'fax'=> array('siege'))
;
public function getAction()
{
$session = new Zend_Session_Namespace('erreurs');
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$key = $request->getParam('key');
$valeur = $request->getParam('valeur');
$this->correlation($key, $valeur);
$this->view->erreurs = $session->erreurs;
}
protected function correlation($key, $valeurs)
{
$session = new Zend_Session_Namespace('erreurs');
$session->erreurs[$key] = array('erreur' => false, 'valeur' => $valeurs);
foreach($session->erreurs as $erreur => $valeurs)
{
if(in_array($erreur, $this->correlation[$key]))
{
if($session->erreurs[$key]['valeur'] != 'tous')
$session->erreurs[$key]['erreur'] = true;
else
unset($session->erreurs[$key]);
}
}
}
}

View File

@ -6,7 +6,7 @@ class ErrorController extends Zend_Controller_Action
$errors = $this->_getParam('error_handler');
switch ($errors->type) {
case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ROUTE:
case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ROUTE:
case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:
case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:
@ -14,13 +14,14 @@ class ErrorController extends Zend_Controller_Action
$this->getResponse()->setHttpResponseCode(404);
$this->view->message = 'Page not found';
break;
default:
// application error
$this->getResponse()->setHttpResponseCode(500);
$this->view->message = 'Application error';
break;
}
// Log exception, if logger available
if ($log = $this->getLog()) {
$log->crit($this->view->message, $errors->exception);
@ -33,7 +34,7 @@ class ErrorController extends Zend_Controller_Action
$this->view->request = $errors->request;
}
public function getLog()
{
$bootstrap = $this->getInvokeArg('bootstrap');

View File

@ -0,0 +1,22 @@
<?php
Class ExtractController extends Zend_Controller_Action
{
public function indexAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
require_once 'Scores/Ciblage.php';
require_once 'Scores/Field.php';
$field = new Fields();
$ciblage = new Ciblage($field->getValues());
$ciblage->extract();
}
public function batchAction()
{
$action = $this->getRequest();
$request = $action->getParam('reference');
}
}

View File

@ -0,0 +1,30 @@
<?php
class FinancierController extends Libs_Controller
{
public function init()
{
/* Initialize action controller here */
}
public function indexAction()
{
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();
$this->view->fields = $field;
}
public function resetAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender();
require_once('Scores/SessionCiblage.php');
$session = new SessionCiblage();
$session->resetFamille('financier');
}
}

View File

@ -0,0 +1,113 @@
<?php
class GeographiqueController extends Libs_Controller
{
public function init()
{
/* Initialize action controller here */
}
public function indexAction()
{
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();
$this->view->fields = $field;
}
public function resetAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender();
require_once('Scores/SessionCiblage.php');
$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'));
}else if($request->getParam('adr_com')) {
$output = $this->completedVil($request->getParam('q'));
}else if($request->getParam('adr_com_ex')) {
$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' => $item->numdep
);
}
return ($output);
}
protected function completedVil($q)
{
$table = new Table_Codepostauxs();
$separator = ' ';
$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 getDeptFromReg($dep)
{
$table = new Table_Departements();
$sql = $table->select()
->where('codeRegionInsee = '.$dep);
$result = $table->fetchAll($sql)->toArray();
$string = '';
foreach ($result as $res) {
$string .= $res['numdep'].',';
}
$string = substr($string, 0, strlen($string)-1);
return ($string);
}
protected function completedReg($q)
{
$table = new Table_Regions();
$separator = ' ';
$sql = $table->select()
->where('NCCENR LIKE "%'.$q.'%" OR REGION LIKE "%'.$q.'%"');
$result = $table->fetchAll($sql);
foreach ($result as $item) {
$output[] = array(
'label' => $item->REGION .' '.$item->NCCENR . $separator . $item->REGION,
'value' => $this->getDeptFromReg($item->REGION)
);
}
return ($output);
}
}

View File

@ -0,0 +1,127 @@
<?php
class GestionController extends Zend_Controller_Action
{
public function preDispatch()
{
}
public function init()
{
$this->view->headLink()->appendStylesheet('/themes/default/styles/dashboard.css', 'all');
$this->view->headScript()->appendFile('/themes/default/scripts/dashboard.js', 'text/javascript');
}
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() && $request->getParam('submit')=='Enregistrer' ){
$params = $request->getParams();
//Vérifier le formulaire
$errForm = 0;
foreach ( $params as $key => $value ) {
if (empty($value)) {
$errForm++;
}
}
if (!$errForm) {
$dataInsee = 0;
// Est ce qu'il existe une donnée insee
require_once 'Scores/Enrichissement.php';
$fieldsM = new Enrichissement();
$fields = $fieldsM->getFields();
foreach ( $fields as $key => $val) {
if ( array_key_exists('insee', $val) && $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,
);
$profilM = new Table_EnrichissementProfils();
if ( $profilM->insert($data) ){
$this->view->assign('message', "Profil enregistré");
} else {
$this->view->assign('message', "Erreur lors de la sauvegarde");
}
} else {
$this->view->assign('message', "Erreur lors de la saisie");
}
}
//Affichage du formulaire
require_once 'Scores/Enrichissement.php';
$fieldsM = new Enrichissement();
$allFields = $fieldsM->getFields();
$this->view->assign('fields', $allFields);
}
public function profildelAction(){}
public function comptagesAction()
{
$table = new Table_Comptages();
$sql = $table->select()
->order('dateAjout DESC');
$this->view->comptages = $table->fetchAll($sql)->toArray();
}
public function enrichissementsAction()
{
$table = new Table_EnrichissementIdentifiants();
$sql = $table->select()
->order('dateAdded DESC');
$this->view->enrichissements = $table->fetchAll($sql)->toArray();
}
public function extractAction()
{
$id = $this->getRequest()->getParam('id');
$table = new Table_EnrichissementIdentifiants();
$sql = $table->select()
->where('idComptage = ?', $id);
$result = $table->fetchRow($sql);
if(!empty($result)) {
$result = $result->toArray();
$sirets = json_decode($result['identifiants']);
foreach($sirets as $siret) {
echo $siret."\n";
}
}else {
echo 'Aucune commande d\'enrichissement sur ce comptage';
}
exit;
}
}

View File

@ -0,0 +1,47 @@
<?php
Class IndexController extends Libs_Controller
{
public function init()
{
$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()
{
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
if ($user->customisation) {
$this->view->assign('preferences', $user->customisation);
}
}
public function criteresAction()
{
$ajax = $this->getRequest()->getParam('ajax');
if($ajax)
$this->_helper->layout()->disableLayout();
require_once 'Scores/SessionCiblage.php';
require_once 'Scores/Field.php';
$session = new SessionCiblage();
$this->view->field = new Fields();
$this->view->criteres = $session->getCriteres();
}
public function removeAction()
{
require_once('Scores/SessionCiblage.php');
$this->_helper->layout()->disableLayout();
$session = new SessionCiblage();
$session->unsetCritere($this->getRequest()->getParam('critere'));
$objet = new Object_Comptage();
$objet->count(null, null);
$this->_redirect('/');
}
}

View File

@ -0,0 +1,47 @@
<?php
class JuridiqueController extends Libs_Controller
{
public function init()
{
/* Initialize action controller here */
}
public function indexAction()
{
require_once('Scores/Field.php');
$this->view->headLink()->appendStylesheet('/themes/default/styles/'.$this->getRequest()->getControllerName().'.css', 'all');
$field = new Fields();
$this->view->fields = $field;
}
public function resetAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender();
require_once('Scores/SessionCiblage.php');
$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

@ -0,0 +1,18 @@
<?php
class LoginController extends Libs_Controller
{
public function init()
{
/* Initialize action controller here */
}
public function indexAction()
{
// action body
}
}

View File

@ -0,0 +1,48 @@
<?php
Class UploadController extends Zend_Controller_Action
{
protected $path;
protected $extensions;
public function init()
{
/*$config = Zend_Registrey::get('configuration');
$path = realpath($config->path->data).'/clients';
$this->path = $path;
$this->extensions = array('.csv');
if(!file_exists($path)) mkdir($path);*/
}
public function upload()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
if(!empty($_FILES) and count($_FILES) == 1)
{
$tmp_name = $_FILES['fichier']['tmp_name'];
$extension = strrchr($_FILES['fichier']['name'], '.');
if(in_array($extension, $this->extensions)) {
if (move_uploaded_file($tmp_name, $path.'/'.$tmp_name.'.'.$extension))
return ($tmp_name);
}
}
return (false);
}
public function arborescanceAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$url = implode('/', $this->getRequest()->getParams());
echo $url;
//$file = $this->upload();
/*if($file)
{
$csv = fgetcsv($file);
$csv = str_replace(';', ',', $csv);
echo $csv;
}*/
}
}

View File

@ -0,0 +1,78 @@
<?php
class UserController extends Libs_Controller
{
public function init()
{
require_once APPLICATION_PATH.'/modules/frontend/models/Forms/Login.php';
require_once 'Scores/WsScores.php';
}
/**
* Gestion de l'authentification
*/
public function loginAction()
{
//@todo : gestion des affichages particuliers pour les clients
$this->view->headTitle()->append('Connexion');
$form = new Form_Login();
$this->view->form = $form;
$request = $this->getRequest();
if ($request->isPost()) {
$formData = $request->getPost ();
if ($form->isValid($formData)) {
$login = $form->getValue('login');
$pass = $form->getValue('pass');
$auth = Zend_Auth::getInstance();
$authAdapter = new Scores_AuthAdapter($login, md5($login.'|'.$pass));
$result = $auth->authenticate($authAdapter);
if (!$result->isValid()){
$this->view->message = '';
Zend_Registry::get('firebug')->info($result);
foreach ($result->getMessages() as $message) {
$this->view->message.= $message."<br/>";
}
} else {
$url = '';
if (Zend_Session::namespaceIsset('login')){
$session = new Zend_Session_Namespace('login');
if (isset($session->url)) {
$url = $session->url;
}
}
if (!empty($url) && $url!='/user/login' && $url!='/localauth'){
$this->_redirect($url);
}
$this->_redirect('/');
}
}
}
$this->_helper->layout()->disableLayout();
$this->render('login');
}
/**
* Gestion de la déconnexion
*/
public function logoutAction()
{
Zend_Auth::getInstance()->clearIdentity();
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$message = $request->getParam('message');
$this->view->assign('message', $message);
$url = 'http://'.$_SERVER['SERVER_NAME'].$this->view->url(array(
'controller' => 'user',
'action' => 'login',
));
$this->view->assign('url', $url);
$this->view->headMeta()->appendHttpEquiv('refresh', '5; url='.$url);
$this->render('logout');
}
}

View File

@ -0,0 +1,152 @@
<?php
class Object_Codepostaux extends Libs_Row
{
/* Selection des classes statut pour jstree */
public function _jstree_checked($type)
{
require_once('Scores/SessionCiblage.php');
$session = new SessionCiblage();
$valeurs = $session->getCritere($type);
return (substr($valeurs, 0, strlen($valeurs)-1));
}
public function _jstree_undetermined($niveau, $type)
{
require_once('Scores/SessionCiblage.php');
$session = new SessionCiblage();
$table = new Table_Departements();
$valeurs = explode(',', $session->getCritere($type));
//print_r($valeurs);
/*$valeurs = array_merge($valeurs, explode(',', $session->getCritere('adr_com')));*/
$in = array();
foreach($valeurs as $valeur) {
if($niveau == 0) {
if ($type == 'adr_dept'){
$insee = $table->fetchAll($table->select('departements', array('codeRegionInsee'))
->where('numdep = ?', substr($valeur, 0, 2)))->toArray();
foreach ($insee as $code)
$in[] = 'adr_reg:'.$code['codeRegionInsee'];
} else{
$insee = $table->fetchAll($table->select('departements', array('codeRegionInsee'))
->where('numdep = ?', substr($valeur, 0, 2)))->toArray();
foreach ($insee as $code)
$in[] = 'adr_reg:'.$code['codeRegionInsee'];
}
} else if ($niveau == 1) {
$insee = $table->fetchAll($table->select('departements', array('codeRegionInsee'))
->where('numdep = ?', substr($valeur, 0, 2)))->toArray();
foreach ($insee as $code)
$in[] = 'adr_dept:'.$code['numdep'];
}
}
return ($in);
}
public function _getClass($valeur, $niveau)
{
require_once('Scores/SessionCiblage.php');
$session = new SessionCiblage();
$valeurs = explode(',', $valeur);
$key = ((strlen($valeur) < 5)?'adr_dept':'adr_com');
$session = explode(',', $session->getCritere('adr_dept'));
$row = 0;
foreach ($session as $dept) {
if(in_array($dept, $valeurs))
$row++;
}
if($row == count($valeurs) and $row != 1) {
return ('jstree-checked');
}
else if($row > 1)
return ('jstree-undetermined');
/*$type = explode(':', $valeur);
if($type[1] == $this->_jstree_checked($type[0]))
return ('jstree-checked');
else if (in_array($valeur, $this->_jstree_undetermined($niveau, $type[0])))
return ('jstree-undetermined');*/
}
protected function getDepartement($region)
{
$table = new Table_Departements();
$sql = $table->select()
->where('codeRegionInsee = '.$region);
$result = $table->fetchAll($sql)->toArray();
$depts = array();
foreach($result as $departement) {
$depts[] = $departement['numdep'];
}
return (implode(',', $depts));
}
/* Fonctions de construction de jstree */
public function _getRegions()
{
$region = new Table_Regions();
$regions = $region->fetchAll($region->select()->order('NCCENR ASC'))->toArray();
$structure = array();
foreach($regions as $nom) {
$structure[] = array(
'data' => $nom['NCCENR'],
'attr' => array('id' => $this->getDepartement($nom['REGION']),
'niveau' => 0,
'class' => $this->_getClass($this->getDepartement($nom['REGION']), 0)
),
'state' => 'closed',
'children' => array()
);
}
return (json_encode($structure));
}
public function _getDepartements($codeRegionInsee)
{
//$code = explode(':', $codeRegionInsee);
$departement = new Table_Departements();
foreach(explode(',', $codeRegionInsee) as $dept) {
$departements[] = $departement->fetchAll($departement->select()
->where('numdep ='.$dept))->toArray();
}
$structure = array();
foreach($departements as $nom) {
$structure[] = array(
'data' => $nom[0]['numdep'].' '.$nom[0]['libdep'],
'attr' => array('id' => $nom[0]['numdep'],
'niveau' => 1,
'class' => $this->_getClass($nom[0]['numdep'], 1)
),
'state' => 'closed',
'children' => array()
);
}
return (json_encode($structure));
}
public function _getCommunes($numdep)
{
//$numdep = explode(':', $numdep);
$codepostau = new Table_Codepostauxs();
$codepostaux = $codepostau->fetchAll($codepostau->select()->where('codepos LIKE "'.$numdep.'%"'))->toArray();
$structure = array();
foreach($codepostaux as $nom) {
$structure[] = array(
'data' => $nom['Codepos'].' '.$nom['Commune'],
'attr' => array('id'=> $nom['INSEE'],
'niveau' => 2,
'class' => $this->_getClass($nom['INSEE'], 2)
),
'state' => 'closed',
'children' => array()
);
}
return (json_encode($structure));
}
}

View File

@ -0,0 +1,156 @@
<?php
class Object_Comptage extends Libs_Row
{
public function saveComptage($ref)
{
if (empty($ref)) {
echo json_encode(array(
'error'=>1,
'msg'=> "Référence non définie !"));
} else {
//Session
require_once 'Scores/SessionCiblage.php';
$session = new SessionCiblage();
$criteres = $session->getCriteres();
$resultat = $session->getNb('total');
$nbInsee = $session->getNb('insee');
//Informations utilisateur
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
//Enregistrement des critères
$criteresM = new Table_Criteres();
$data = array(
'idClient' => $user->idClient,
'login' => $user->username,
'reference' => $ref,
'criteres' => json_encode($criteres),
'parent' => 0,
'dateAjout' => date('Y-m-d H:i:s'),
);
$id = $criteresM->insert($data);
if ($id){
//Enregistrement des valeurs du comptage
$comptageM = new Table_Comptages();
$data = array(
'idDefinition' => $id,
'resultat' => $resultat,
'uniteInsee' => $nbInsee,
'dateAjout' => date('Y-m-d H:i:s'),
);
if ($comptageM->insert($data)) {
echo json_encode(array(
'error'=>0,
'msg'=> "Vos critères ont été sauvegardés sous la référence $ref",
'id' => $id));
} else {
echo json_encode(array(
'error'=>1,
'msg'=> "Erreur lors de l'enregistrement"));
}
} else {
echo json_encode(array(
'error'=>1,
'msg'=> "Erreur lors de l'enregistrement"));
}
}
}
public function count($key, $valeur, $need = false)
{
require_once 'Scores/SessionCiblage.php';
$session = new SessionCiblage();
if(in_array($key, array('adr_dept', 'adr_com', 'adr_reg', 'adr_com_ex', 'adr_dept_ex')))
{
$valeurs = explode(',', $valeur);
if($key == 'adr_dept') {
$reg_ = $session->getCritere('adr_reg');
if(!empty($reg_)) {
$reg_ = explode(',', $reg_);
$table = new Table_Departements();
$result = array();
foreach($reg_ as $item) {
$sql = $table->select()->where('codeRegionInsee = ?', $item);
$donner = $table->fetchAll($sql)->toArray();
foreach ($donner as $don) {
$result[] = $don['numdep'];
}
foreach($result as $dep) {
if(in_array($dep, $valeurs)) {
$diff[] = $dep;
}
}
$session->unsetCritereValue('adr_reg', $item);
}
}
}
foreach($valeurs as $valeur)
{
$type = explode(':', $valeur);
if(count($type) == 2) {
$key = $type[0];
$valeur = $type[1];
}
switch($key) {
case 'adr_dept':
case 'adr_reg':
$dept .= trim($valeur).',';
break;
case 'adr_com':
case 'vil':
default:
$vil .= trim($valeur).',';
break;
case 'adr_com_ex':
$adr_com_ex .= trim($valeur).',';
break;
case 'adr_dept_ex':
$adr_dept_ex .= trim($valeur).',';
break;
}
}
if(strlen($dept)>0) {
$dept = substr($dept, 0, strlen($dept)-1);
$session->setCritere('adr_dept', $dept);
}
if(strlen($vil)>0) {
$vil = substr($vil, 0, strlen($vil)-1);
$session->setCritere('adr_com', $vil);
}
if(strlen($adr_com_ex)>0) {
$adr_com_ex = substr($adr_com_ex, 0, strlen($adr_com_ex)-1);
$session->setCritere('adr_com_ex', $adr_com_ex);
}
if(strlen($adr_dept_ex)>0) {
$adr_dept_ex = substr($adr_dept_ex, 0, strlen($adr_dept_ex)-1);
$session->setCritere('adr_dept_ex', $adr_dept_ex);
}
} else
$session->setCritere($key, $valeur);
require_once 'Scores/Field.php';
$field = new Fields();
//Comptage
require_once 'Scores/Ciblage.php';
$ciblage = new Ciblage($field->getValues());
if($need) {
return $ciblage->execute(true, 10);
}
$total = $ciblage->execute();
$insee = $ciblage->calculRedevanceInsee();
$session->setNb('total', $total);
$session->setNb('insee', $insee);
//Retour comptage, unité Insee
$result = array(
'count' => number_format($total, 0, '', ' '),
'insee' => number_format($insee, 0, '', ' ')
);
return (json_encode($result));
}
}

View File

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

View File

@ -0,0 +1,196 @@
<?php
Class Object_Dashboard
{
public function index()
{
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
$criteresM = new Table_Criteres();
$sql = $criteresM->select()
->from($criteresM, array('id', 'reference', 'dateAjout'))
->where("idClient = ?", $user->idClient)
->where("login = ?", $user->username)
->order('dateAjout DESC')
->limit(5);
$rows = $criteresM->fetchAll($sql);
$results = array();
$comptagesM = new Table_Comptages();
foreach($rows->toArray() as $item)
{
$info = array(
'id' => $item['id'],
'reference' => $item['reference'],
'dateCriteres' => $item['dateAjout'],
);
//Recherche des comptages
$sql = $comptagesM->select()
->from($comptagesM, array('resultat', 'uniteInsee', "DATE_FORMAT(dateAjout, '%Y/%m/%d %H:%i:%s') as dateAjout"))
->where('idDefinition = ?', $item['id'])
->order('dateAjout DESC')->limit(1);
$comptage = $comptagesM->fetchAll($sql)->toArray();
if (count($comptage)>0){
$info['resultat'] = $comptage[0]['resultat'];
$info['uniteInsee'] = $comptage[0]['uniteInsee'];
$info['dateComptage'] = $comptage[0]['dateAjout'];
}
$results[] = $info;
}
return ($results);
}
public function enrichissement($idComptage)
{
$enrichissements = new Table_EnrichissementIdentifiants();
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
$sql = $enrichissements->select()
->setIntegrityCheck(false)
->from(
array('i' => 'enrichissement_identifiants'),
array('id', 'reference', 'fichier', 'nbLigneTotales', 'nbLigneTraites', 'error', 'dateAdded', 'dateStart', 'dateStop')
)
->join(
array('criteres' => 'criteres'), 'i.idCriteres = criteres.id',
array('')
)
->where('criteres.idClient = ?', $user->idClient)
->where('criteres.login = ?', $user->username)
->where('i.idCriteres = ?', $idComptage);
return ($enrichissements->fetchAll($sql));
}
public function enrichissements()
{
$enrichissementsM = new Table_EnrichissementIdentifiants();
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
$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');
return ($enrichissementsM->fetchAll($sql));
}
public function menu()
{
}
public function ciblage($page)
{
$offset = 20;
//Liste des ciblages par paquet de n
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
$criteresM = new Table_Criteres();
//Compter le nombre de page
$sql = $criteresM->select()
->from($criteresM, array('nb' => 'COUNT(*)'))
->where("idClient = ?", $user->idClient)
->where("login = ?", $user->username);
$count = $criteresM->fetchRow($sql);
$nbCiblage = $count->nb;
//Récupérer les informations
$position = ($page-1)*$offset+1;
$sql = $criteresM->select()
->from($criteresM, array('id', 'reference', 'dateAjout'))
->where("idClient = ?", $user->idClient)
->where("login = ?", $user->username)
->order('dateAjout DESC')
->limitPage($position, $offset);
$rows = $criteresM->fetchAll($sql);
$results = array();
$comptagesM = new Table_Comptages();
foreach($rows->toArray() as $item)
{
$info = array(
'id' => $item['id'],
'reference' => $item['reference'],
'dateCriteres' => $item['dateAjout'],
);
//Recherche des comptages
$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();
if (count($comptage)>0){
$info['resultat'] = $comptage[0]['resultat'];
$info['uniteInsee'] = $comptage[0]['uniteInsee'];
$info['dateComptage'] = $comptage[0]['dateAjout'];
}
$results[] = $info;
}
return (array('ciblages' => $results, 'nbCiblage' => $nbCiblage));
}
public function ciblagedetail($id)
{
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
$table = new Table_Criteres();
$sql = $table->select()
->where('idClient = ?', $user->idClient)
->where('login = ?', $user->username)
->where('id = ?', $id);
$criteres = $table->fetchRow($sql)->toArray();
if ($criteres != null){
$comptage = new Table_Comptages();
$sql = $comptage->select()
->where('idDefinition = ?', $id)->order('dateAjout DESC');
$comptages = $comptage->fetchAll($sql)->toArray();
}
return (array_merge(array('comptages' => $comptages), array('criteres' => $criteres)));
}
public function rcomptage($q)
{
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
$criteresM = new Table_Criteres($db);
$sql = $criteresM->select()
->from($criteresM, array('id', 'reference', "DATE_FORMAT(dateAjout, '%d/%m/%Y') as date"))
->where("idClient = ?", $user->idClient)
->where("login = ?", $user->username)
->where("reference LIKE ?", $q.'%');
$rows = $criteresM->fetchAll($sql);
if (count($rows)>0){
$separator = " , ";
foreach ($rows as $item) {
$output[] = array(
'label' => $item->reference . $separator . $item->date,
'value' => $item->reference,
'url' => $this->view->url(array('controller'=>'dashboard', 'action'=>'ciblage', 'id'=>$item->id)),
);
}
}
return (json_encode($output));
}
}

View File

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

View File

@ -0,0 +1,75 @@
<?php
class Object_Formejuridique extends Libs_Row
{
protected function _jstree_checked()
{
require_once('Scores/SessionCiblage.php');
$session = new SessionCiblage();
$valeurs = explode(',', $session->getCritere('cj'));
foreach($valeurs as $valeur) {
if($valeur != '')
$return[] = $valeur;
}
if(is_array($return))
return ($return);
return (array($valeurs));
}
protected function _jstree_undetermined()
{
return (array());
}
public function _getClass($valeur)
{
if(in_array($valeur, $this->_jstree_checked()))
return ('jstree-checked');
else if (in_array($valeur, $this->_jstree_undetermined()))
return ('jstree-undetermined');
}
public function _getParents()
{
$formes = new Table_Formejuridiques();
$formes = $formes->fetchAll($formes->select()->where('LENGTH(fjCode) = 1'))->toArray();
$structure = array();
foreach($formes as $forme) {
$structure[] = array(
'data' => $forme['fjCode'].' : '.$forme['fjLibelle'],
'attr' => array('id' => $forme['fjCode'],
'class' => $this->_getClass($forme['fjCode'])),
'state' => 'closed',
'children' => array($this->_getFils($forme['fjCode'])),
);
}
return (json_encode($structure));
}
public function _getFils($fjcode)
{
$lenth = ((strlen($fjcode) == 2)?4:2);
$formes = new Table_Formejuridiques();
$sql = $formes->select()->from('formejuridique', array(
'size' => new Zend_Db_Expr('LENGTH(fjCode)'),
'fjCode',
'fjLibelle'))
->where('fjCode LIKE "'.$fjcode.'%"')
->having('size = ?', $lenth);
$formes = $formes->fetchAll($sql)->toArray();
$structure = array();
foreach($formes as $forme) {
$structure = array(
'data' => $forme['fjCode'].' : '.$forme['fjLibelle'],
'attr' => array('id' => $forme['fjCode'],
'class' => $this->_getClass($forme['fjCode'])),
'state' => 'close',
'children' => (($lenth < 6)?$this->_getFils($forme['fjCode']):array())
);
$tabfj[] = $structure;
}
return ($tabfj);
}
}

View File

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

View File

@ -0,0 +1,107 @@
<?php
class Object_Naf extends Libs_Row
{
public function naf($niveau, $key)
{
require_once 'Scores/SessionCiblage.php';
$sessionCiblage = new SessionCiblage();
$val = $sessionCiblage->getCritere($key);
$valuesChecked = array();
$valuesUndetermined = array();
if ($val != null){
$valuesChecked = explode(',',$val);
foreach($valuesChecked as $value){
$valuesUndetermined = array_merge($valuesUndetermined, $this->getNafParent($value, true));
}
}
$nafM = new Table_Nafs();
$sql = $nafM->select()->where('niveau = ?', $niveau)->order('code ASC');
$result = $nafM->fetchAll($sql)->toArray();
$tabNaf = array();
foreach($result as $item)
{
$structure = array(
'data' => $item['code'].' - '.$item['lib'],
'attr' => array('id' => $item['code'], 'niveau' => $item['niveau']),
'state' => 'closed',
'children' => array(),
);
if (in_array($item['code'], $valuesChecked)){
$structure['attr']['class'] = 'jstree-checked';
}
if (in_array($item['code'], $valuesUndetermined)){
$structure['attr']['class'] = 'jstree-undetermined';
}
$tabNaf[] = $structure;
}
return json_encode($tabNaf);
}
protected function getNafParent($value, $niveau1 = false)
{
$out = array();
if (strlen($value)>2) {
$niveau = strlen($value)-1;
$new = substr($value,0,$niveau);
$out = array_merge($out, array($new), $this->getNafParent($new, $niveau1));
} elseif (strlen($value)==2 && $niveau1 === true) {
$nafM = new Table_Nafs();
$sql = $nafM->select()
->from($nafM, array('parent'))
->where('code = ?', $value);
$result = $nafM->fetchRow($sql);
$out[] = $result->parent;
}
return $out;
}
public function ajax($parent, $niveau, $key)
{
//Récupération des valeurs enregistrées en session
require_once 'Scores/SessionCiblage.php';
$sessionCiblage = new SessionCiblage();
$val = $sessionCiblage->getCritere($key);
$valuesChecked = array();
$valuesUndetermined = array();
if ($val != null){
$valuesChecked = explode(',',$val);
foreach($valuesChecked as $value){
$valuesUndetermined = array_merge($valuesUndetermined, $this->getNafParent($value));
}
}
$niveau++;
$nafM = new Table_Nafs();
$sql = $nafM->select();
if (!empty($parent) && $niveau==2) {
$sql->where('parent = ?', $parent);
} elseif (!empty($parent) && $niveau>2) {
$sql->where("code LIKE '".$parent."%'");
}
$sql->where('niveau = ?', $niveau)->order('code ASC');
$result = $nafM->fetchAll($sql)->toArray();
$tabNaf = array();
foreach($result as $item){
$structure = array(
'data' => $item['code'].' - '.$item['lib'],
'attr' => array('id' => $item['code'], 'niveau' => $item['niveau']),
);
if (in_array($item['code'], $valuesChecked)){
$structure['attr']['class'] = 'jstree-checked';
}
if (in_array($item['code'], $valuesUndetermined)){
$structure['attr']['class'] = 'jstree-undetermined';
}
if ($niveau<5){
$structure['state'] = 'closed';
$structure['children'] = array();
}
$tabNaf[] = $structure;
}
return json_encode($tabNaf);
}
}

View File

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

View File

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

View File

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

View File

@ -0,0 +1,6 @@
<?php
class Object_Region extends Libs_Row
{
}

View File

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

View File

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

View File

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

View File

@ -0,0 +1,5 @@
<?php
class Table_Departements extends Libs_Table
{
public $_name = 'departements';
}

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

@ -1,5 +1,5 @@
<?php
class Application_Model_Formejuridique extends Zend_Db_Table_Abstract
class Table_Formejuridique extends Libs_Table
{
protected $_name = 'formejuridique';
protected $_primary = 'fjCode';

View File

@ -0,0 +1,7 @@
<?php
class Table_Formejuridiques extends Libs_Table
{
protected $_name = 'formejuridique';
protected $_primary = 'fjCode';
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -0,0 +1,6 @@
<?php
class Table_Regions extends Libs_Table
{
protected $_name = 'regions';
}

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,23 @@ 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':
case 'adr_com':
$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), $field['help'][ucfirst($name)]);
break;
case 'textarea':
$html.= $this->structureHTML(
@ -49,17 +64,22 @@ Class Zend_View_Helper_Field extends Zend_View_Helper_Abstract
$field['label'],
$this->radioHTML($name, $field));
break;
case 'file':
$html.= $this->structureHTML(
$field['label'],
$this->fileuploadHtml($name, $field));
break;
}
$html.= '</div>';
}
return $html;
}
private function structureHTML($label, $html, $liens = array())
private function structureHTML($label, $html, $help = null)
{
$out = '';
$out.= $this->structureLabel($label);
$out.= '<div class="field">'.$html.$this->structureLink($liens).'</div>';
$out.= $this->structureLabel($label, $help);
$out.= '<div class="field">'.$html.'</div>';
return $out;
}
@ -67,43 +87,48 @@ Class Zend_View_Helper_Field extends Zend_View_Helper_Abstract
* Définition du label
* @param unknown_type $label
*/
private function structureLabel($label)
private function structureLabel($label, $help)
{
return '<label>'.$label.'</label>';
$return = '<label>'.$label.'</label>';
if($help)
$return .= '<p style="font-size:9px;">'.$help.'</p>';
return ($return);
}
/**
* Définition des liens
*/
private function structureLink($liens = array())
protected function getMinMax($name, $valeur)
{
$html = '';
if (count($liens)>0) {
foreach($liens as $lien){
$html.= '<a href="'.$lien['url'].'">'.$lien['lib'].'</a>';
}
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'];}
}
if (!empty($html)) {
return '<span>'.$html.'</span>';
}
return '';
return ($valeur);
}
private function intervalSelectHTML($name, $field)
{
$session = new SessionCiblage();
$sessionValeur = explode(',', $session->getCritere($name));
$minMax = $this->getMinMax($name, array(0,0));
$return = '<select class="intervalSelect" name="'.$name.'1" id="'.$name.'" number="1">';
foreach($field['fields'][$field['type']]['value'] as $elements) {
$return .= '<option value="'. $elements[0].'">'.number_format($elements[0], 0,'', ' ').'</option>';
if($elements[0] == 0)
$return .= '<option value="'.$minMax[0].'">Min</option>';
else
$return .= '<option '.(($sessionValeur[0] == $elements[0])?'selected':'').' value="'. $elements[0].'">'.number_format($elements[0], 0,'', ' ').'</option>';
}
$return .= '</select> à ';
$return .= '<select class="intervalSelect" name="'.$name.'2" id="'.$name.'" number="2">';
foreach($field['fields'][$field['type']]['value'] as $elements) {
$return .= '<option value="'. $elements[1].'">'.number_format($elements[1], 0,'', ' ').'</option>';
if($elements[1] == 0)
$return .= '<option value="'.$minMax[1].'">Max</option>';
else
$return .= '<option '.(($sessionValeur[1] == $elements[1])?'selected':'').' value="'. $elements[1].'">'.number_format($elements[1], 0,'', ' ').'</option>';
}
$return .= '</select>';
$return .= ' <span id="'.$name.'"><a href="" class="intervalSelect" id="'.$name.'">Valider</a></span>';
return ($return);
@ -114,13 +139,16 @@ Class Zend_View_Helper_Field extends Zend_View_Helper_Abstract
{
$session = new SessionCiblage();
$return = '<select class="criteres" name="'.$name.'">';
$return .= '<option value="tous">Tous</option>';
$sessionValeur = $session->getCritere($name);
/*if(is_array($sessionValeur))
$sessionValeur = implode(',', $sessionValeur);*/
$return = '<select size="'.count($field['fields'][$field['type']]['value']).'" class="criteres '.$field['type']['class'].'" name="'.$name.'" multiple>';
$return .= '<option '.(($sessionValeur == 'tous')?'selected':'').' value="tous">Tous</option>';
foreach($field['fields'][$field['type']]['value'] as $value => $label) {
$selected = "";
if(($session->getCritere($name) != null) and $session->getCritere($name) == $value)
if(($sessionValeur != null) and in_array($value, $sessionValeur) and $sessionValeur != "tous")
$selected = " selected";
$return .= '<option'.((!empty($selected))?$selected:null).' value="'.$value.'">'.$label.'</option>';
$return .= '<option'.$selected.' value="'.$value.'">'.$label.'</option>';
}
$return .= '</select>';
return ($return);
@ -135,12 +163,12 @@ Class Zend_View_Helper_Field extends Zend_View_Helper_Abstract
if(is_array($sessionValeur))
$sessionValeur = implode(',', $sessionValeur);
$return = '<select class="criteres '.$field['type']['class'].'" name="'.$name.'">';
$return .= '<option value="tous">Tous</option>';
$return .= '<option '.(($sessionValeur == 'tous')?'selected':'').' value="tous">Tous</option>';
foreach($field['fields'][$field['type']]['value'] as $value => $label) {
$selected = "";
if(($sessionValeur != null) and $sessionValeur == $value)
if(($sessionValeur != null) and $sessionValeur == $value and $sessionValeur != "tous")
$selected = " selected";
$return .= '<option'.((!empty($selected))?$selected:null).' value="'.$value.'">'.$label.'</option>';
$return .= '<option'.$selected.' value="'.$value.'">'.$label.'</option>';
}
$return .= '</select>';
return ($return);
@ -151,6 +179,7 @@ Class Zend_View_Helper_Field extends Zend_View_Helper_Abstract
{
$session = new SessionCiblage();
$valeur = $session->getCritere($name);
$valeur = explode(',', $valeur);
$return = '<div class="interval" >';
$return .= '<input class="'.$field['class'].'" type="text" name="'.$name.'1" value="'.$valeur[0].'" /> à ';
@ -175,12 +204,35 @@ 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 'vil':
$type= 'Vil';
break;
case 'adr_com':
case 'adr_com_ex':
$type= $name;
break;
case 'cj':
$type = 'Cj';
break;
case 'cj_ex':
$type = 'Cj_ex';
break;
case 'adr_dept':
case 'adr_dept_ex':
$type= $name;
break;
}
/* Modifier les données */
$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> <a href="">Aide</a>';
return ($return);
}
@ -188,8 +240,16 @@ Class Zend_View_Helper_Field extends Zend_View_Helper_Abstract
private function textareaHTML($name, $field)
{
$return = '<a class="arborescence" title="'.$field['title'].'" href="'.$this->view->url(array('controller' => 'arborescence', 'action' => $field['action'], 'key' => $name)).'">
Selection dans une arborescence
</a>';
<img src="/themes/default/images/arborescence.gif" />
</a> <img style="cursor:pointer" class="manuel" ref="'.$name.'" src="/themes/default/images/Textarea.gif" title="Champs texte"/>';
if($name == 'adr_com')
$return .= ' <img src="/themes/default/images/img_carte_fr.gif" title="Carte de france"/>';
return ($return);
}
private function fileuploadHtml($name, $field)
{
$return = '<input class="upload" type="file" name="fichier" id="'.$name.'" /> ';
return ($return);
}

View File

@ -3,7 +3,7 @@
$("#<?=$this->key?>").jstree({
"themes" : {
"theme" : "default",
"url" : "/themes/jstree/default/style.css",
"url" : "/themes/jstree/classic/style.css",
"dots" : true,
"icons" : false,
},

View File

@ -0,0 +1,4 @@
<br /><br />
<div id="view-content">
<p>View script for controller <b>Arborescence</b> and script/action name <b>index</b></p>
</div>

View File

@ -0,0 +1,23 @@
<div id="<?=$this->key?>" class="jstree jstree-default" style="overflow:auto;"></div>
<script>
$("#<?=$this->key?>").jstree({
"themes" : {
"theme" : "default",
"url" : "/style.css",
"dots" : true,
"icons" : false,
},
"plugins" : ["themes", "json_data", "checkbox"],
"json_data" : {
"data" : <?=$this->formejuridiques?>,
"ajax" : {
"url" : '<?=$this->url(array('controller'=>'arborescence', 'action'=>'juridiqueajax', 'key'=> $this->key))?>',
"data" : function(n)
{
return { id: n.attr ? n.attr("id") : 0 };
},
"cache" : true,
}
}
});
</script>

View File

@ -3,9 +3,9 @@
$("#<?=$this->key?>").jstree({
"themes" : {
"theme" : "default",
"url" : "/themes/jstree/default/style.css",
"url" : "/jstree/style.css",
"dots" : true,
"icons" : false,
"icons" : false,
},
"plugins" : ["themes", "json_data", "checkbox"],
"json_data" : {

View File

@ -0,0 +1,4 @@
<br /><br />
<div id="view-content">
<p>View script for controller <b>Comptage</b> and script/action name <b>index</b></p>
</div>

View File

@ -0,0 +1,29 @@
<div style="width:100%;">
<style>
.color{
background-color: #DCE3FC;
}
</style>
<table width="100%" style="font-size:10px;">
<tr>
<?php foreach($this->champs as $champ): ?>
<th style="border-left:1px solid black;padding:2px;"><b><?php echo $champ; ?></b></th>
<?php endforeach; ?>
</tr>
<?php
$i=0;
if(count($this->liste) > 0) {
foreach($this->liste as $societe) {
echo '<tr '.((($i%2) == 0)?'class="color"':'').'>';
foreach($this->champs as $champ) {
echo '<td style="border-left:1px solid silver;padding:2px">'.$societe[$this->reference[$champ]['column']].'</td>';
}
echo '</tr>';
$i++;
}
} else {
echo '<tr><td>Vous n\'avez selectionné aucuns critères</td></tr>';
}
?>
</table>
<div>

View File

@ -0,0 +1,16 @@
<?php if ($this->noSelection): ?>
Vous n'avez pas sélectionné de critères !
<?php else:?>
<div id="result">
<form method="post" id="save" name="save" action="<?=$this->url(array('controller'=>'comptage', 'action'=>'save'))?>">
<center>
<label>Votre référence</label><br />
<input type="text" name="ref" value="<?=date('Y-m-d:H-i-m').'_'.uniqid()?>" />
</form>
<span class="message" style="color:#ff0000;"></span>
</center>
</div>
<script type="text/javascript" src="/themes/default/scripts/jquery.form.js"></script>
<?php endif;?>

View File

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

View File

@ -0,0 +1,81 @@
<div id="dashboard" style="padding:10px">
<a href="/dashboard/index">Tableau de bord</a> > Detail du ciblage<br /><br />
<a class="update" href="<?=$this->url(array('controller'=> 'comptage','action'=>'update', 'id'=>$this->comptageId))?>">Actualiser</a> |
<a href="<?=$this->url(array('controller'=> 'index','action'=>'index', 'id'=>$this->comptageId))?>">Recharger les critères de ciblage</a> |
<a class="enrichissementref" href="<?=$this->url(array('controller'=> 'enrichissement','action'=>'reference', 'id'=>$this->comptageId))?>">Enrichissement</a>
<fieldset>
<legend>Critères</legend>
<?php foreach(json_decode($this->criteres['criteres'], true) as $critere => $valeur): ?>
<?php if(!empty($valeur) and $valeur != ',' and !empty($critere)): ?>
<?php $label = $this->label->get($critere); ?>
<?php if(!is_array($valeur)): ?>
<?php if($label['type'] != 'textarea' and $label['type'] != 'interval') :?>
<?php echo '<b>'.$label['label'] . '</b> : '.$label['fields'][$label['type']]['value'][$valeur];?><br />
<?php else: ?>
<?php echo '<b>'.$label['label'] . '</b>:'.$valeur; ?><br />
<?php endif; ?>
<?php else:?>
<?php echo '<b>'.$label['label'] .'</b> : '. implode(',', $valeur).'<br />'; ?>
<?php endif; ?>
<?php endif; ?>
<?php endforeach;?>
</fieldset>
<fieldset>
<legend>Comptages</legend>
<table style="width:100%">
<thead>
<tr>
<th>Date</th>
<th>Resultat</th>
<th>Nombre d'unité Insee</th>
</tr>
</thead>
<tbody>
<?php foreach($this->comptages as $comptage):?>
<tr>
<th><?=$comptage['dateAjout']?></th>
<th><?=number_format($comptage['resultat'], 0, '', ' ')?></th>
<th><?=number_format($comptage['uniteInsee'], 0, '', ' ')?></th>
</tr>
<?php endforeach;?>
</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>
<td>
<?php if($item['dateStart']>0): ?>
<a href="/enrichissement/download/id/<?php echo $item['id'];?>"><?php echo $item['fichier']; ?></a>
<?php else: ?>
En attente de traitement
<?php endif; ?>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<?php }?>
</fieldset>
</div>

View File

@ -0,0 +1,45 @@
<div id="dashboard">
<div class="chemin">
<a href="<?=$this->url(array('controller'=>'dashboard', 'action'=>''))?>">Tableau de bord</a> >
Liste de vos ciblages
</div>
<div style="margin:5px 0;">
<h2>Liste de vos ciblages</h2>
<?php if(count($this->ciblages)>0):?>
<table class="ciblage">
<thead>
<tr>
<th>Référence</th>
<th>Nombre d'entité</th>
<th>Unité Insee</th>
<th>Date</th>
<th colspan="4"></th>
</tr>
</thead>
<tbody>
<?php foreach($this->ciblages as $item):?>
<tr>
<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>
</table>
<?php else:?>
<p>Aucun ciblage.<p>
<?php endif;?>
</div>
</div>

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 $i=0; 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><a href="/enrichissement/download/id/<?php echo $item['id'];?>"><?php echo $item['fichier']; ?></a></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

@ -0,0 +1,89 @@
<div id="dashboard">
<div class="chemin">
<a href="<?=$this->url(array('controller'=>'dashboard', 'action'=>''))?>">Tableau de bord</a>
</div>
<div id="menu">
<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'=>''))?>">Enrichissement de fichier</a>
</div>
<div id="rechercheCiblage">
<h2>Rechercher dans vos ciblages</h2>
<input type="text" name="searchCiblage" class="searchCiblage" />
<input type="submit" value="Rechercher" class="submit"/>
</div>
<div id="lastCiblage">
<h2>Vos derniers ciblages</h2>
<?php if(count($this->comptages) > 0):?>
<table>
<thead>
<tr>
<th>Référence</th>
<th>Nombre d'entité</th>
<th>Unité Insee</th>
<th>Date</th>
<th colspan="4"></th>
</tr>
</thead>
<tbody>
<?php foreach($this->comptages as $name => $item):?>
<tr>
<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>
</table>
<?php else:?>
<p>Aucun ciblage.<p>
<?php endif;?>
</div>
<div id="lastEnrichissement">
<h2>Vos derniers enrichissements</h2>
<?php if(count($this->enrichissements) > 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 $i=0;foreach($this->enrichissements as $item):?>
<?php if($i++ == 5)break;?>
<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' ) {?>
<a href="/enrichissement/download/id/<?php echo $item['id'];?>"><?php echo $item['fichier']; ?></a>
<?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

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

View File

@ -0,0 +1,55 @@
<div id="economique">
<span style="color:red;text-align:right;padding:5px;margin-top:-5px;">
*<sup>Il n'est pas nécessaire de remplire tous les champs.</sup>
</span>
<hr />
<div id="s_economique">
<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 class="ape_etab" style="display:none;background-image:none;height:100px;">
<div id="ape_etab_ex" class="exclusion" style="display:none">
<?php echo $this->Field('ape_etab_ex', $this->fields->get('ape_etab_ex'), 'text');?>
</div>
<div id="ape_etab_in" class="inclusion">
<?php echo $this->Field('ape_etab', $this->fields->get('ape_etab'), 'text');?>
</div>
Valeurs exclusions : <input value="1" type="checkbox" class="checkbox_ex" name="ape_etab" />
</li>
<li class="ape_etab" style="display:none;background-image:none;height:100px;">
<div id="ape_entrep_ex" class="exclusion" style="display:none">
<?php echo $this->Field('ape_entrep_ex', $this->fields->get('ape_entrep_ex'), 'text');?>
</div>
<div id="ape_entrep_in" class="inclusion">
<?php echo $this->Field('ape_entrep', $this->fields->get('ape_entrep'), 'text');?>
</div>
Valeurs exclusions : <input value="1" type="checkbox" class="checkbox_ex" name="ape_entrep" />
</li>
<li><?php echo $this->Field('age_etab', $this->fields->get('age_etab'));?></li>
<li><?php echo $this->Field('teff_etab', $this->fields->get('teff_etab'));?></li>
<li><?php echo $this->Field('teff_etabM', $this->fields->get('teff_etabM'));?></li>
<li><?php echo $this->Field('eff_etab', $this->fields->get('eff_etab'));?></li>
</ul>
</div>
<div id="a_economique" style="display:none">
<fieldset style="border:1px solid silver;padding:2px;">
<legend>Critères Avancés</legend>
<ul id="fieldsblock">
<li><?php echo $this->Field('age_entrep', $this->fields->get('age_entrep'));?></li>
<li><?php echo $this->Field('teff_entrep', $this->fields->get('teff_entrep'));?></li>
<li><?php echo $this->Field('teff_entrepM', $this->fields->get('teff_entrepM'));?></li>
<li><?php echo $this->Field('eff_entrep', $this->fields->get('eff_entrep'));?></li>
<li><?php echo $this->Field('nbEtab', $this->fields->get('nbEtab'));?></li>
</ul>
</fieldset>
</div>
<hr style="margin-top:5px;" />
<p>
<a class="mode" id="a_economique" style="cursor:pointer;margin-left:50%">
<img src="/themes/default/images/fleche-bas.gif" />
</a>
</p>
</div>
<div style="text-align:right;margin-top:20px;">
<a class="resetFamille" id="economique">Réinitialiser les critères economiques</a>
</div>

View File

@ -0,0 +1,9 @@
Votre commande a bien été prise en compte sous la référence
<script>
$('#dialog').dialog({ buttons: [ {
text: "Quitter",
click: function() { $(this).dialog('close'); }
} ] });
</script>

View File

@ -0,0 +1,100 @@
<?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 {?>
<div id="update">
<style>
#enrichissement
{
width:100%;
}
#enrichissement th
{
font-weight:800;
}
#enrichissement td, th
{
padding:5px;
border-left:1px solid black;
}
#enrichissement tr
{
font-size:10px;
border:1px solid silver;
}
</style>
<p style="text-align:center;color:green">Votre ciblage a été actualisé</p>
<div style="font-size:10px;padding:5px; border:1px dashed green">
Les tarifs sont données à titre indicatif et peuvent variées suivant les spécificités de votre compte.
</div>
<br/>
<div style="font-size:10px;padding:5px; border:1px dashed green">
Les informations permettant l'enrichissement seront enregistrées, après la saisie de votre référence.
</div>
<br />
<table id="enrichissement">
<tr>
<th>Libellé</th>
<th><?php echo date('Y-m-d');?></th>
</tr>
<tr>
<td>Nombre d'unités</td>
<td><?php echo $this->resultat;?></td>
</tr>
<tr>
<td>Nombre d'unités Insee</td>
<td><?php echo $this->uniteInsee;?></td>
</tr>
<tr>
<td>Prix du fichier</td>
<td><?php echo $this->prix;?></td>
</tr>
<tr>
<td>Redevance Insee</td>
<td><?php echo $this->prixInsee;?></td>
</tr>
<tr>
<td><b>Tapez votre référence</b></td>
<td colspan="2">
<form name="commande" method="post" action="<?=$this->url(array('controller'=>'enrichissement', 'action'=>'commande'))?>">
<input type="hidden" name="id" value="<?=$this->id?>" />
<input id="cache" type="text" value="<?php echo 'enr_'.date('Y-m-d_').uniqid();?>" name="ref">
<div id="progress"></div>
</form>
</td>
</tr>
</table>
<?php if (!empty($this->infoInsee)) {?>
<br/>
<p><?=$this->infoInsee?></p>
<?php }?>
<br/>
<script>
$('#dialog').dialog({ buttons: [ {
text: "Valider",
click: function() {
$('div#progress').html('<br /><center><img src="/themes/default/images/ajax_loader.gif" /></center>');
$('#cache').css('display', 'none');
$.post(
$('form[name=commande]').attr('action'),
$('form[name=commande]').serialize(),
function(data){
$('div#update').html(data);
});
}
},
{
text: "Quitter",
click: function() { $(this).dialog("close"); }
}
] });
</script>
</div>
<?php }?>

View File

@ -0,0 +1,45 @@
<!-- <div class="erreur" id="entreprise">
</div> -->
<div id="entreprise">
<span style="color:red;text-align:right;padding:5px;margin-top:-5px;">
*<sup>Il n'est pas nécessaire de remplire tous les champs.</sup>
</span>
<hr />
<div id="s_entreprise">
<ul id="fieldsblock">
<li id="siege"><?php echo $this->Field('siege', $this->fields->get('siege'));?></li>
<li id="sirenGrp" ><?php echo $this->Field('sirenGrp', $this->fields->get('sirenGrp'));?></li>
<li id="tel" ><?php echo $this->Field('tel', $this->fields->get('tel'));?></li>
<li id="fax" ><?php echo $this->Field('fax', $this->fields->get('fax'));?></li>
<li id="web" ><?php echo $this->Field('web', $this->fields->get('web'));?></li>
<li id="mail" ><?php echo $this->Field('mail', $this->fields->get('mail'));?></li>
<li id="presentRcs" ><?php echo $this->Field('present cs', $this->fields->get('presentRcs'));?></li>
<li id="adrDom" ><?php echo $this->Field('adrDom', $this->fields->get('adrDom'));?></li>
<li id="dirNom" ><?php echo $this->Field('dirNom', $this->fields->get('dirNom'));?></li>
<li id="li_dateCrea_etab" ><?php echo $this->Field('dateCrea_etab', $this->fields->get('dateCrea_etab'));?></li>
<li id="part" ><?php echo $this->Field('part', $this->fields->get('part'));?></li>
</ul>
</div>
<div id="a_entreprise" style="display:none">
<fieldset style="border:1px solid silver;padding:5px;">
<legend>Critères Avancés</legend>
<ul id="fieldsblock">
<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="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="nbPart" ><?php echo $this->Field('nbPart', $this->fields->get('nbPart'));?></li>
</ul>
</fieldset>
</div>
<hr style="margin-top:5px;" />
<p>
<a class="mode" id="a_entreprise" style="cursor:pointer;margin-left:50%">
<img src="/themes/default/images/fleche-bas.gif" />
</a>
</p>
</div>
<div id="link">
<a class="resetFamille" id="entreprise">Réinitialiser les critères entreprises</a>
</div>

View File

@ -0,0 +1,12 @@
<table style="width:100%">
<?php if(!empty($this->erreurs)): ?>
<?php foreach($this->erreurs as $erreur => $valeur):?>
<?php if($valeur['erreur'] and $valeur['valeur'] != 'tous'): ?>
<tr style="border:1px solid red;">
<td style="padding:10px"><?php echo $erreur; ?></td>
<td style="padding:10px"><?php echo $valeur['valeur']; ?></td>
</tr>
<?php endif; ?>
<?php endforeach;?>
<?php endif; ?>
</table>

View File

@ -0,0 +1,69 @@
<div id="financiere">
<span style="color:red;text-align:right;padding:5px;margin-top:-5px;">
*<sup>Il n'est pas nécessaire de remplire tous les champs.</sup>
</span>
<hr />
<div id="s_financier">
<ul id="fieldsblock" style="width:100%;height:100%;">
<li style="background: none; height:80px;">
<div id="bilType_ex" class="exclusion" style="display:none">
<?php echo $this->Field('bilType_ex', $this->fields->get('bilType_ex'));?>
</div>
<div id="bilType_in" class="inclusion">
<?php echo $this->Field('bilType', $this->fields->get('bilType'));?>
</div>
Valeurs exclusions : <input value="1" type="checkbox" class="checkbox_ex" name="bilType" />
</li>
<li style="background: none; height:150px;">
<div id="avisCs_ex" class="exclusion" style="display:none">
<?php echo $this->Field('avisCs_ex', $this->fields->get('avisCs_ex'));?>
</div>
<div id="avisCs_in" class="inclusion">
<?php echo $this->Field('avisCs', $this->fields->get('avisCs'));?>
</div>
Valeurs exclusions : <input value="1" type="checkbox" class="checkbox_ex" name="avisCs" />
</li>
<li><?php echo $this->Field('bilAnnee', $this->fields->get('bilAnnee'));?></li>
<li><?php echo $this->Field('bilCloture', $this->fields->get('bilCloture'));?></li>
<li><?php echo $this->Field('bilDuree', $this->fields->get('bilDuree'));?></li>
<li style="background: none; height:190px;">
<div id="bilTca_ex" class="exclusion" style="display:none">
<?php echo $this->Field('bilTca_ex', $this->fields->get('bilTca_ex'));?>
</div>
<div id="bilTca_in" class="inclusion">
<?php echo $this->Field('bilTca', $this->fields->get('bilTca'));?>
</div>
Valeurs exclusions : <input value="1" type="checkbox" class="checkbox_ex" name="bilTca" />
</li>
<li><?php echo $this->Field('bilFL', $this->fields->get('bilFL'));?></li>
</ul>
</div>
<div id="a_financiere" style="display:none">
<fieldset style="border:1px solid silver;padding:2px;">
<legend>Critères Avancés</legend>
<ul id="fieldsblock">
<li><?php echo $this->Field('bilEE', $this->fields->get('bilEE'));?></li>
<li><?php echo $this->Field('bilFK', $this->fields->get('bilFK'));?></li>
<li><?php echo $this->Field('bilFR', $this->fields->get('bilFR'));?></li>
<li><?php echo $this->Field('bilGF', $this->fields->get('bilGF'));?></li>
<li><?php echo $this->Field('bilGP', $this->fields->get('bilGP'));?></li>
<li><?php echo $this->Field('bilGW', $this->fields->get('bilGW'));?></li>
<li><?php echo $this->Field('bilHD', $this->fields->get('bilHD'));?></li>
<li><?php echo $this->Field('bilHH', $this->fields->get('bilHH'));?></li>
<li><?php echo $this->Field('bilHL', $this->fields->get('bilHL'));?></li>
<li><?php echo $this->Field('bilHM', $this->fields->get('bilHM'));?></li>
<li><?php echo $this->Field('bilHN', $this->fields->get('bilHN'));?></li>
<li><?php echo $this->Field('bilYP', $this->fields->get('bilYP'));?></li>
</ul>
</fieldset>
</div>
<hr style="margin-top:5px;" />
<p>
<a class="mode" id="a_financiere" style="cursor:pointer;margin-left:50%">
<img src="/themes/default/images/fleche-bas.gif" />
</a>
</p>
</div>
<div style="text-align:right;margin-top:20px;">
<a class="resetFamille" id="financier">Réinitialiser les critères financiers</a>
</div>

View File

@ -0,0 +1,42 @@
<div id="geographique">
<span style="color:red;text-align:right;padding:5px;margin-top:-5px;">
*<sup>Il n'est pas nécessaire de remplire tous les champs.</sup>
</span>
<hr />
<ul id="fieldsblock">
<li><?php echo $this->Field('adr_com', $this->fields->get('adr_com'));?></li>
<li class="adr_com" style="display:none;background-image:none;height:100px;">
<div id="adr_com_ex" class="exclusion" style="display:none">
<?php echo $this->Field('adr_com_ex', $this->fields->get('adr_com_ex'), 'text');?>
</div>
<div id="adr_com_in" class="inclusion">
<?php echo $this->Field('adr_com', $this->fields->get('adr_com'), 'text');?>
</div>
Valeurs exclusions : <input value="1" type="checkbox" class="checkbox_ex" name="adr_com" />
</li>
<li class="adr_com" style="display:none;background-image:none;height:150px;">
<div id="adr_dept_ex" class="exclusion" style="display:none">
<?php echo $this->Field('adr_dept_ex', $this->fields->get('adr_dept_ex'), 'text');?>
</div>
<div id="adr_dept_in" class="inclusion">
<?php echo $this->Field('adr_dept', $this->fields->get('adr_dept'), 'text');?>
</div><br />
Recherche régions : <input type="text" name="" id="textarea_adr_reg" /><br />
Valeurs exclusions : <input value="1" type="checkbox" class="checkbox_ex" name="adr_dept" />
</li>
<li style="height:50px;background-image:none">
Exclure DOM-TOM <input style="float:right" value="1" type="checkbox" class="ex_prede" name="ex_domtom" /><br />
Exclure Etranger <input style="float:right" value="1" type="checkbox" class="ex_prede" name="ex_entr" /><br />
Exclure Corse <input style="float:right" value="1" type="checkbox" class="ex_prede" name="ex_corse" /><br />
</li>
<li><?php echo $this->Field('zus', $this->fields->get('zus'), 'select');?></li>
<li><?php echo $this->Field('zru', $this->fields->get('zru'), 'select');?></li>
<li><?php echo $this->Field('zfu', $this->fields->get('zfu'), 'select');?></li>
<li><?php echo $this->Field('cucs', $this->fields->get('cucs'), 'select');?></li>
<li><?php echo $this->Field('zrr', $this->fields->get('zrr'), 'select');?></li>
<li><?php echo $this->Field('zafr', $this->fields->get('zafr'), 'select');?></li>
</ul>
</div>
<div style="text-align:right;margin-top:20px;">
<a class="resetFamille" id="econmique">Réinitialiser les critères geographiques</a>
</div>

Some files were not shown because too many files have changed in this diff Show More