Compare commits

...

691 Commits
1.0 ... 1.3

Author SHA1 Message Date
Michael RICOIS
b161cf13a7 Correction previsualisation 2015-09-30 13:19:03 +00:00
Michael RICOIS
8dd8df9503 Diverses corrections 2015-09-11 14:38:16 +00:00
Michael RICOIS
8ef3d03e11 Cache ? 2015-06-18 08:48:03 +00:00
Michael RICOIS
90a9db1af9 Update Assets 2015-06-17 09:40:28 +00:00
Michael RICOIS
ebb9c71832 Extraction : Tranche de chiffre d'affaire 2015-06-17 09:11:08 +00:00
Michael RICOIS
ad492e74b7 Mise à jour de quelques options 2015-06-11 15:06:00 +00:00
Michael RICOIS
425401f8eb Autorisé les connexions de tous les utilisateurs actifs 2015-06-11 12:59:59 +00:00
Michael RICOIS
3340c99443 Modification "commande" par "demande" 2015-06-11 12:31:42 +00:00
Michael RICOIS
a0981d0a66 Ajout rapide de la detection des proxy 2015-04-08 08:57:49 +00:00
Michael RICOIS
a6dd1294d0 Ajout dateImmage dans le fichier de sortie 2015-01-27 14:57:26 +00:00
Michael RICOIS
e10bc9d574 Correction libellé 2015-01-27 10:51:34 +00:00
Michael RICOIS
0a7f3b7c6d Colonne presentRCS déplacé après le SIREN NIC 2015-01-27 10:40:28 +00:00
Michael RICOIS
801993cd0b Upgrade Zend to version 1.12.10 2015-01-23 08:17:10 +00:00
Michael RICOIS
50ec0c9009 Suppression flag execution sur le script cron, il n'existe plus 2015-01-22 16:39:08 +00:00
Michael RICOIS
f6e5cc30a3 Suppression du script cron 2015-01-22 16:38:12 +00:00
Michael RICOIS
2b510ba1eb Ajout remontée des erreurs + amélioration pour la suppression du script cron.php 2015-01-22 16:37:52 +00:00
Michael RICOIS
403411ec85 Ajout données supplémentaires pour l'extraction 2015-01-22 16:36:52 +00:00
Michael RICOIS
07e5d2d316 Affichage de la liste des enrichissements avec possibilité de télécharger le fichier 2015-01-22 16:33:23 +00:00
Michael RICOIS
d5057c314d Formattage 2015-01-21 15:26:58 +00:00
Michael RICOIS
d51252b829 Mise a jour de la prévisualisation 2014-12-17 15:46:12 +00:00
Michael RICOIS
d0b6af7b1f Préparation mode verbeux 2014-12-17 15:18:55 +00:00
Michael RICOIS
80388d6e64 Mise à jour des types d'établissements 2014-12-17 15:18:24 +00:00
Michael RICOIS
cfff5a3d74 Correction pour l'enrichissement 2014-12-09 18:16:57 +00:00
Michael RICOIS
f703eed68c Correction formattage URL après le rechargment des critères 2014-11-17 13:37:55 +00:00
Michael RICOIS
577120979f Correction 2014-10-27 13:49:29 +00:00
Michael RICOIS
3fe1ffa0e6 issue #0001784 : Backport amélioration 2.0 2014-06-26 08:09:26 +00:00
Michael RICOIS
65c8980eb7 Correction pour enrichissement 2014-06-19 07:48:54 +00:00
Michael RICOIS
82c098cc6a Upgrade Zend to version 1.12.7 2014-06-18 08:19:07 +00:00
Michael RICOIS
89e1226ebf Add new fields 2014-02-28 10:28:32 +00:00
Michael RICOIS
f968c9cb8c issue #0001796: dashboard cache added 2013-11-29 06:45:22 +00:00
Michael RICOIS
05c54cbf47 issue #0001784: new method for db join 2013-11-28 13:41:26 +00:00
Michael RICOIS
0b1512f9b1 issue #0001643: Add a paginator for "ciblage" and "enrichissements" 2013-11-22 13:22:27 +00:00
Michael RICOIS
e930a8bbeb Validate translate 2013-11-20 09:29:53 +00:00
Michael RICOIS
7e439446d4 issue #0001784:
- Add a new column SIRET 
- "Type d'établissement" : Replace 1 by "Siège" and 0 by "Secondaire" is done
- Add a new columns "Dirigeant - Code Fonction" and "Dirigeants - Libelle Fonction"
- Add a new columns "Libelle NAF Etablissement" and "Libelle NAF Entreprise"
2013-11-19 14:02:05 +00:00
Michael RICOIS
82b21d631d issue #0001781: improve translation logic, 'Home' page translated 2013-11-15 13:36:39 +00:00
Michael RICOIS
9e3545391f issue #0001781: add logic to change language, using zend_translate 2013-11-13 12:27:04 +00:00
Michael RICOIS
2eb5440573 Complete documentation 2013-11-04 09:13:56 +00:00
Michael RICOIS
cd8e318b1d Documentation 2013-10-30 13:24:51 +00:00
Michael RICOIS
f53575a435 Documentation 2013-10-30 13:23:31 +00:00
Michael RICOIS
4d32d30a14 Correction 2013-10-10 11:49:08 +00:00
Michael RICOIS
f95a5f0927 Update Javascript Librarires 2013-06-04 09:58:22 +00:00
Michael RICOIS
a12873e7eb Prix en compte des paramètres limite 2013-05-27 12:53:46 +00:00
Michael RICOIS
5a703145f6 Remove autoloading Form_ 2013-05-23 06:51:18 +00:00
Michael RICOIS
81a4e690fa Change adapter déclaration 2013-05-23 06:49:29 +00:00
Michael RICOIS
4ba0a041bb Add function codesdepts 2013-05-22 14:59:03 +00:00
Michael RICOIS
fc5cdc796e Correct 2013-04-12 20:16:32 +00:00
Michael RICOIS
6f39ab82ae bdd ciblage by default 2013-04-12 09:38:42 +00:00
Michael RICOIS
27c1e6964b Update style list 2013-04-12 06:55:38 +00:00
Michael RICOIS
af98ca2d07 Correct typo 2013-03-19 10:44:15 +00:00
Michael RICOIS
c9f5ceb2c9 issue #1579 : Add models and select client 2013-03-19 10:14:40 +00:00
Michael RICOIS
86bc121292 issue #1579 : Add models 2013-03-19 09:42:10 +00:00
Michael RICOIS
83d545c0c8 issue #0001590 : Modification du code pour connexion sur une seule base de données 2013-03-19 08:45:27 +00:00
Michael RICOIS
42865deac9 issue #0001590 : Modification du code pour connexion sur une seule base de données 2013-03-19 08:42:10 +00:00
Michael RICOIS
44e9dd0278 Add the possibility to modify account 2013-03-12 15:49:33 +00:00
Michael RICOIS
58495b61df Path file 2013-01-16 14:36:56 +00:00
Michael RICOIS
0383b4d1f8 Correct path 2013-01-14 19:15:38 +00:00
Michael RICOIS
5383139da4 Correction 2013-01-14 16:52:10 +00:00
Michael RICOIS
dbfaad4eea Correction configuration 2013-01-09 16:58:46 +00:00
Michael RICOIS
4de758ca38 Correction fonctionnement champs de recherche 2013-01-09 16:58:17 +00:00
Michael RICOIS
15cdb9a46d Affichage code juridique 2013-01-09 13:59:51 +00:00
Michael RICOIS
6900b9a18b Affichage code géographique 2013-01-09 13:41:06 +00:00
Michael RICOIS
e1fdcf662e Affichage code géographique 2013-01-09 13:40:11 +00:00
Michael RICOIS
3f256dba7e Update Qtip to version 2.0.0 2013-01-09 11:39:03 +00:00
Michael RICOIS
75e191cbf0 Affichage des criteres d'un ciblage client 2013-01-09 11:38:22 +00:00
Michael RICOIS
e1305a5365 Gestion des dates 2013-01-09 11:13:44 +00:00
Michael RICOIS
92e7788117 Ajout condition pour l'affichage des préférences 2013-01-09 10:47:32 +00:00
Michael RICOIS
b5ff0b4654 Afficahge forfait montant 2013-01-09 10:43:44 +00:00
Michael RICOIS
caccc9d9fd Filtre RNCS à partir des paramètres client sur l'enrichissement 2013-01-09 10:38:45 +00:00
Michael RICOIS
9716e52619 Filtre RNCS à partir des paramètres client sur l'enrichissement 2013-01-09 10:36:57 +00:00
Michael RICOIS
07168bcb82 Label pour les boites de dialog 2012-12-26 16:20:44 +00:00
Michael RICOIS
c7988a3953 issue #0001477 : Recherche à partir de 2 positions 2012-12-26 16:20:20 +00:00
Michael RICOIS
09a3134052 issue #0001477 : Ajout nouveau champs code départements 2012-12-26 16:20:00 +00:00
Michael RICOIS
e986fc30f1 issue #0001477 : Ajout nouveau champs code départements 2012-12-26 16:19:45 +00:00
Michael RICOIS
fbaa25862e Add port behind the server url 2012-12-26 16:18:53 +00:00
Michael RICOIS
30c312b067 Tri des commandes selon l'année et le mois 2012-12-21 10:52:17 +00:00
Michael RICOIS
afcd6f0b4d Gestion des criteres pour le profil utilisateur 2012-12-21 09:17:31 +00:00
Michael RICOIS
acb2313b99 Update Zend Framework to version 1.12.1 2012-12-21 09:07:54 +00:00
Michael RICOIS
250e5c9819 Use php executable 2012-12-20 13:02:56 +00:00
Michael RICOIS
e1951a6468 Config loading 2012-12-19 20:53:30 +00:00
Michael RICOIS
c1b1def04d Correction condition dateFin de contrat 2012-12-19 17:05:14 +00:00
Michael RICOIS
39320764dc Stupid config 2012-12-19 16:51:59 +00:00
Michael RICOIS
297acc9fcd Configure : path 2012-12-19 16:29:18 +00:00
Michael RICOIS
5ebf98e79d Remove config 2012-12-19 16:08:57 +00:00
Michael RICOIS
3e78aad0c4 Remove config 2012-12-19 16:05:43 +00:00
Michael RICOIS
27df43931e Test date fin de contrat 2012-12-19 14:56:50 +00:00
Michael RICOIS
7b2eb49921 Script and Install 2012-12-19 14:07:00 +00:00
Michael RICOIS
1d827af35a Suppression du répertoire batch (voir scripts/jobs) 2012-12-11 16:23:08 +00:00
Michael RICOIS
d28ba0de01 Change client parameters 2012-12-10 16:50:08 +00:00
Michael RICOIS
05a7a3df36 Complete Redraw 2012-12-06 16:51:14 +00:00
Michael RICOIS
f237db692b Javascript correction 2012-11-06 10:15:24 +00:00
Michael RICOIS
b92f2b1019 Remove notice 2012-11-06 09:50:35 +00:00
Michael RICOIS
0dd41a8c11 Change search request for autocomplete with multiple value 2012-10-27 13:27:36 +00:00
Michael RICOIS
eae1265e37 Typo 2012-10-25 15:58:30 +00:00
Michael RICOIS
e2c371e251 Add execute permission on file 2012-10-25 15:37:17 +00:00
Michael RICOIS
1897655908 Delete some code 2012-10-25 15:33:57 +00:00
Michael RICOIS
5ab102b6cf Remove dataInsee, change sql request 2012-10-25 15:25:53 +00:00
Michael RICOIS
9de2875931 Message de chargement lors de l'enregistrement de la commande 2012-10-25 15:06:54 +00:00
Michael RICOIS
6eb2ed367b Message de chargement lors de l'enregistrement du ciblage 2012-10-25 14:52:03 +00:00
Michael RICOIS
501533fc8f Forget require 2012-10-25 14:41:54 +00:00
Michael RICOIS
d622977dac Typo 2012-10-25 13:36:59 +00:00
Michael RICOIS
08700967e2 Correct user information 2012-10-25 13:26:51 +00:00
Michael RICOIS
33214f44dd issue #0001377 : Changement condition car nous avons des chaines de caractères 2012-10-05 14:37:22 +00:00
Michael RICOIS
d013580b01 issue #0001377 : Typo 2012-10-05 14:34:41 +00:00
Michael RICOIS
010bc0fd87 issue #0001377 : Correction 2012-10-05 14:30:07 +00:00
Michael RICOIS
4ae685d76d issue #0001377 : Définir les minimums et maximums dans tous les cas 2012-10-05 14:08:18 +00:00
Michael RICOIS
e91eed0e1a issue #0001377 : Vérification des minimums et maximums 2012-10-02 13:13:34 +00:00
Michael RICOIS
e5897edb25 Meilleur fonctionnement du javascript lors du passage de la commande 2012-10-02 10:01:08 +00:00
Michael RICOIS
337ff7750a Configuration data path 2012-10-02 09:22:51 +00:00
Michael RICOIS
4f37e8be76 Change in trunk 2012-10-02 09:21:55 +00:00
Michael RICOIS
dfb1be9d65 Transform fields as selectMultiple 2012-10-01 15:56:32 +00:00
Michael RICOIS
a773fb2860 Correction bilDuree 2012-10-01 08:51:56 +00:00
Michael RICOIS
2509368825 issue #0001346 : Affichage croix de suppression 2012-10-01 08:30:54 +00:00
Michael RICOIS
b0e6e4ca4d issue #0001347 : Unité 2012-10-01 08:24:25 +00:00
Michael RICOIS
8acb962cb6 issue #0001343 : Ajout de données et commentaire pour les autres 2012-09-11 14:00:03 +00:00
Michael RICOIS
13dc936b6c Merge from trunk 2012-09-10 11:16:49 +00:00
Michael RICOIS
8c66f28b90 Affichage des paramètres du compte 2012-09-10 09:34:14 +00:00
Michael RICOIS
4c2db4ef20 Correction base de données 2012-09-10 08:08:53 +00:00
Michael RICOIS
b703307f7c issue #0001341 : Random sort mode 2012-09-07 12:53:39 +00:00
Michael RICOIS
5239c18102 Correction plantage prévisulation 2012-09-07 11:58:43 +00:00
Michael RICOIS
9b22b4ca3d Correction plantage prévisulation 2012-09-07 11:56:18 +00:00
Michael RICOIS
64a68e1cc7 issue #0001326 : Gestion des intervalles de dates comme les intervalles 2012-09-07 09:29:13 +00:00
Michael RICOIS
c335f30312 issue #0001334 : Mail sur erreur 2012-09-06 14:27:23 +00:00
Michael RICOIS
61e457e56b Update JQuery to version 1.8.1 2012-09-06 14:11:13 +00:00
Michael RICOIS
d866b5d840 Integrate bin directory of Zf 2012-09-06 12:40:57 +00:00
Michael RICOIS
40b91ad9c0 Update Zend Framework to version 1.12 2012-09-06 12:34:39 +00:00
Michael RICOIS
02d4a8ae5f Delete Zend Librairy before reintegrate 2012-09-06 12:28:28 +00:00
Michael RICOIS
18f059d82f Update Zend Framework to version 1.12 2012-09-06 12:18:36 +00:00
Michael RICOIS
4e71d73328 Merge 2012-09-04 19:35:44 +00:00
Michael RICOIS
35df1838e8 Naf queries 2012-09-04 19:23:38 +00:00
Michael RICOIS
0874dee8df Merge pour correction 2012-09-04 06:11:42 +00:00
Michael RICOIS
1771bd0554 Correction exclusion sur liste autocomplete 2012-09-03 16:04:37 +00:00
Michael RICOIS
ffdaecb9ac Correction chemin style 2012-09-03 15:45:11 +00:00
Michael RICOIS
d809739961 Redirect fonctionnel avec port différent de 80 2012-09-03 15:30:52 +00:00
Michael RICOIS
ca6488677b Message de déconnexion dès le départ 2012-09-03 15:11:41 +00:00
Michael RICOIS
7046c7a453 Change table name 2012-09-03 14:50:50 +00:00
Michael RICOIS
ab8d3415b8 Merge from 1.2 2012-08-23 09:26:40 +00:00
Michael RICOIS
9284a04ec1 Better logout message 2012-08-22 20:13:05 +00:00
Michael RICOIS
954dca6944 Correct image path 2012-08-22 19:55:56 +00:00
Michael RICOIS
5d26f823fd path correction 2012-08-22 19:29:39 +00:00
Michael RICOIS
aa0db85f31 issue #0001311 : Traitement des formes juridiques sous forme de liste 2012-08-22 13:59:48 +00:00
Michael RICOIS
ad1a877ef4 Suppression 2012-08-22 13:56:52 +00:00
Michael RICOIS
f66ea54a81 Big update of Javascript Libraries 2012-08-22 13:02:58 +00:00
Michael RICOIS
f804e4710a issue #0001285 : conflit sur element list 2012-08-22 10:00:59 +00:00
Michael RICOIS
117dec028d issue #0001285 : Affichage des infobulles à droites et correction conflit sur element list 2012-08-22 09:48:54 +00:00
Michael RICOIS
f0bd4fc3dc Upgrade Zend to version 1.11.13 2012-08-21 19:37:35 +00:00
Michael RICOIS
3583fdd333 Better search 2012-08-21 15:33:02 +00:00
Michael RICOIS
a785f81f33 Merge from 1.2 2012-08-14 12:23:23 +00:00
Michael RICOIS
e5fcc48b05 Typo 2012-08-14 10:08:48 +00:00
Michael RICOIS
e2608152a2 Prise en compte des champs "list" 2012-08-13 15:42:20 +00:00
Michael RICOIS
f7d5ef8060 Merge from 1.2 2012-08-08 12:30:46 +00:00
Michael RICOIS
206c19e3e2 Use Version 2.3 of webservice 2012-08-08 12:27:07 +00:00
Michael RICOIS
b53665953f Recherche par mots sur les NAFs 2012-08-07 08:40:29 +00:00
Michael RICOIS
7c574d164e Correct condition 2012-08-01 12:07:42 +00:00
Michael RICOIS
b4ddca623b Check date contrat 2012-08-01 09:50:48 +00:00
Michael RICOIS
9affb31118 Merge from 1.2 2012-07-31 16:02:06 +00:00
Michael RICOIS
ffd7eb8c80 Forget method parameter 2012-07-31 15:23:46 +00:00
Michael RICOIS
b9cad4af3f Textarea 2012-07-31 15:15:29 +00:00
Michael RICOIS
136f9623be Search by code postal and use code insee as code 2012-07-31 15:10:51 +00:00
Michael RICOIS
67eb3dd084 Remove init action 2012-07-31 15:09:39 +00:00
Michael RICOIS
a929f17e50 Retour 2012-07-31 15:01:40 +00:00
Michael RICOIS
f22c5b06af Add new advanced codespostaux, codesinsee 2012-07-31 11:38:31 +00:00
Michael RICOIS
06569d15f0 Codes postaux et Codes Insee 2012-07-31 11:37:52 +00:00
Michael RICOIS
a1dd0324bf Remove items after they are selected 2012-07-31 09:57:45 +00:00
Michael RICOIS
6a399901ad Merge from 1.2 2012-07-31 08:14:08 +00:00
Michael RICOIS
56babddc4b Correct database name 2012-07-31 08:11:52 +00:00
Michael RICOIS
8e813e7918 Merge from 1.2 2012-07-31 07:32:46 +00:00
Michael RICOIS
749fdffcc7 Correct database name 2012-07-31 07:18:26 +00:00
Michael RICOIS
f710381f5d Remove field not used 2012-07-30 12:09:20 +00:00
Michael RICOIS
fe37b17fac Control result of database 2012-07-30 11:30:47 +00:00
Michael RICOIS
e249753b24 Correct typo 2012-07-30 09:03:48 +00:00
Michael RICOIS
8e04267928 Merge from 1.2 2012-07-30 08:43:58 +00:00
Michael RICOIS
f74ecd6ad1 Delete file not needed 2012-07-30 08:34:31 +00:00
Michael RICOIS
c6c53f90b5 Correct condition on date 2012-07-30 08:29:06 +00:00
Michael RICOIS
070894f087 Don't get parameter on each request in database 2012-07-30 07:52:15 +00:00
Michael RICOIS
e59403cf84 issue #0001218 : Redesign completely autocomplete fields 2012-07-30 07:50:37 +00:00
Michael RICOIS
a1ba1ac947 Firebug database profiler 2012-07-30 07:48:19 +00:00
Michael RICOIS
d6ad8fde55 Merge from 1.2 2012-07-26 14:09:11 +00:00
Michael RICOIS
c2bd5bd412 Changement du nom du bouton 2012-07-26 14:04:18 +00:00
Michael RICOIS
bf0d109eaa issue #0001284 : Correction système d'afficahge des erreurs 2012-07-26 13:58:35 +00:00
Michael RICOIS
3cf10adb90 Merge from branche 1.2 2012-07-25 09:29:21 +00:00
Michael RICOIS
e03047ee7d issue #0001284 : Remove sample message 2012-07-25 07:18:48 +00:00
Michael RICOIS
c0149839e0 issue #0001284 : Add simple error message 2012-07-24 15:33:46 +00:00
Michael RICOIS
346d4ce860 Merge from branche 1.2 2012-07-24 09:39:16 +00:00
Michael RICOIS
e17b72819b Add title for interval 2012-07-24 09:32:44 +00:00
Michael RICOIS
bf893a2cbb Merge from branche 1.2 2012-07-24 08:34:23 +00:00
Michael RICOIS
029566c346 fix issue #0001280 : Traitement des valeurs d'avisCs 2012-07-24 07:57:34 +00:00
Michael RICOIS
b12e852e68 Resolve bug introduce by issue #0001219 2012-07-23 13:05:00 +00:00
Michael RICOIS
923671261b Resolve bug introduce by issue #0001219 2012-07-23 12:48:51 +00:00
Michael RICOIS
88478b95f9 issue #0001219 : Rearrange criteres 2012-07-23 11:13:34 +00:00
Michael RICOIS
dc8246438f Corrected create of table 2012-07-23 08:18:03 +00:00
Michael RICOIS
71011bd775 Configuration machine Odea 2012-07-23 08:15:00 +00:00
Michael RICOIS
771dd362be disable authentication check on logout 2012-07-19 15:51:16 +00:00
Michael RICOIS
fc74474639 Correction suite à installation 2012-07-19 15:42:35 +00:00
Michael RICOIS
141dc9264c Merge 2012-07-09 14:16:45 +00:00
Michael RICOIS
c7535df8c5 Correction niveau et paramètres 2012-07-09 14:06:51 +00:00
Michael RICOIS
a398a06edf Merge 2012-07-06 13:19:58 +00:00
Michael RICOIS
ef9584e5e4 Correction table des commandes 2012-07-06 13:05:07 +00:00
Michael RICOIS
c4698d9a6e Si forfaire inférieur à 0 alors ne pas faire de commande d'enrichissement 2012-07-04 07:07:28 +00:00
Michael RICOIS
6f0d1af9f6 Ajout lien commande enrichissement 2012-06-29 15:10:22 +00:00
Michael RICOIS
cdb35ba4c9 Correction 2012-06-29 12:26:04 +00:00
Michael RICOIS
10d03aa74c Forfait et profil 2012-06-29 12:17:21 +00:00
Michael RICOIS
9d904e3876 Intégration des forfaits, changement sur la base de données 2012-06-29 10:27:41 +00:00
Michael RICOIS
c6725dd0af Changement suite à intégration forfait 2012-06-29 10:15:12 +00:00
Michael RICOIS
ae2178ec7a Ajout référence 2012-06-26 14:27:54 +00:00
Michael RICOIS
eb08f6dcdc Ajout enrichissements et référence 2012-06-26 14:25:43 +00:00
Michael RICOIS
2590f8d1ab Update Zend Framework to version 1.11.12 2012-06-25 20:06:50 +00:00
Michael RICOIS
61ea754b45 Redirect to home 2012-06-25 14:00:33 +00:00
Michael RICOIS
656e8a12b2 Nouvelle page de login 2012-06-25 13:52:58 +00:00
Michael RICOIS
a3651c6ad7 preg_replace to eliminate bad character 2012-06-20 06:56:46 +00:00
Michael RICOIS
4c17580749 Merge 2012-06-19 16:14:19 +00:00
Michael RICOIS
1ffa5eebf1 Load configuration for good path of file 2012-06-19 16:05:29 +00:00
Michael RICOIS
3c696c0443 Merge 2012-06-19 15:58:02 +00:00
Michael RICOIS
e6cbf1a006 Add debug 2012-06-19 15:56:59 +00:00
Michael RICOIS
2d0eba0bde Use dateAdded to directory 2012-06-19 15:49:09 +00:00
Michael RICOIS
da50e8f4ce Merge 2012-06-19 15:41:45 +00:00
Michael RICOIS
5dd639878c Some change for file directory 2012-06-19 15:33:05 +00:00
Michael RICOIS
520f167aaa Add some text to inform customer about ref 2012-06-19 15:29:42 +00:00
Michael RICOIS
fced0a8da7 Protect string reference, needed for internal ref 2012-06-19 15:29:16 +00:00
Michael RICOIS
ef22877b66 Use format 'Ym' for directory 2012-06-19 15:20:29 +00:00
Michael RICOIS
1aeecef0c5 Add fichier column 2012-06-19 15:18:52 +00:00
Michael RICOIS
5ee9bee799 Merge 2012-06-19 15:10:56 +00:00
Michael RICOIS
13b785873e Display column "fichier" 2012-06-19 14:59:34 +00:00
Michael RICOIS
5edaa7e031 Merge 2012-06-14 12:04:41 +00:00
Michael RICOIS
45eba61cd9 Params for user is now define in Auth plugin 2012-06-14 11:51:28 +00:00
Michael RICOIS
df1a2e8f38 Merge 2012-06-12 10:02:40 +00:00
Michael RICOIS
967b1dd9d2 Add a global var in session for the RNCS filter and change display of configuration 2012-06-12 10:00:42 +00:00
Michael RICOIS
4d9951d9d4 Add customer params and correct exclude on NAF 2012-06-11 14:40:07 +00:00
Michael RICOIS
4ffb8f00a3 Merge 2012-06-11 12:38:29 +00:00
Michael RICOIS
27d8212a18 correct name for var exclude 2012-06-11 12:35:01 +00:00
Michael RICOIS
cdd951fd11 Add the exclude parameters to method 2012-06-08 18:37:44 +00:00
Michael RICOIS
9d7c856846 Get the current line only when we have a result 2012-06-01 14:36:43 +00:00
Michael RICOIS
65447d43b8 Merge 2012-06-01 13:01:56 +00:00
Michael RICOIS
2e6ef7b72f Correct bilType 2012-06-01 12:58:22 +00:00
Michael RICOIS
43dfab2b12 Right syntax for update 2012-06-01 12:22:19 +00:00
Michael RICOIS
46a3115524 Siret extraction 2012-06-01 10:30:44 +00:00
Michael RICOIS
cd18a049e7 Merge 2012-06-01 09:52:20 +00:00
Michael RICOIS
d567502e7d point virgule 2012-06-01 09:51:25 +00:00
Michael RICOIS
ef51dd969e Display ref for an order 2012-06-01 09:42:24 +00:00
Michael RICOIS
14966da858 Merge 2012-06-01 09:08:57 +00:00
Michael RICOIS
e716181a4d Class include forget 2012-06-01 09:08:11 +00:00
Michael RICOIS
3e247f1321 Merge 2012-06-01 08:54:16 +00:00
Michael RICOIS
e130cf3881 Correction sur les selections simple en inclusion 2012-06-01 08:50:42 +00:00
Michael RICOIS
5eeea93401 Value NN is transform as 99 in order to become a integer 2012-06-01 08:24:07 +00:00
Michael RICOIS
53421fba5c Value NN is transform as 99 in order to become a integer 2012-06-01 08:11:52 +00:00
Michael RICOIS
951ab7efd4 Merge 2012-05-29 15:52:05 +00:00
Michael RICOIS
6de0dc1a0c Only if the preference INSEE is set, we display count of insee unit 2012-05-29 15:51:16 +00:00
Michael RICOIS
a03520736a Merge 2012-05-29 15:45:35 +00:00
Michael RICOIS
1f7158d2b1 Take care 0 is send as first position so use false in condition 2012-05-29 15:44:15 +00:00
Michael RICOIS
2254b415cf Make always the first index begin at 0 for all list of criteres 2012-05-29 15:43:05 +00:00
Michael RICOIS
5e7a3e04a5 Text size for tooltip 2012-05-29 15:21:26 +00:00
Michael RICOIS
da3a701f47 Documentation 2012-05-29 15:20:52 +00:00
Michael RICOIS
da715c8465 Update Qtip to nightly revision 2012-05-29 13:56:59 +00:00
Michael RICOIS
81fd108a54 Use of delegate, and make qtip always show on visibla part of the display 2012-05-29 13:56:28 +00:00
Michael RICOIS
6f4ed6d185 Merge 2012-05-29 12:30:52 +00:00
Michael RICOIS
4961e1ee7f Gestion de la suppression des élements sous forme de liste 2012-05-29 09:58:15 +00:00
Michael RICOIS
993dc60000 Add profil if not exist during preview 2012-05-28 15:41:16 +00:00
Michael RICOIS
a523b6d772 Add profil whe we can't have in database 2012-05-28 15:36:19 +00:00
Michael RICOIS
49b174cc27 Merge 2012-05-28 15:30:43 +00:00
Michael RICOIS
1cd65fb0ab Preferences 2012-05-28 15:17:18 +00:00
Michael RICOIS
5ab91eb8c7 Delete SIRETs column during preview 2012-05-28 12:49:45 +00:00
Michael RICOIS
b1ab4180f1 Modification diverses 2012-05-28 12:46:52 +00:00
Michael RICOIS
cb5fb9c434 Update 2012-05-28 09:32:44 +00:00
Michael RICOIS
439262b28a Minute in date 2012-05-28 09:14:22 +00:00
Michael RICOIS
94c051b362 Commande d'un enrichissement 2012-05-28 09:10:26 +00:00
Michael RICOIS
788c2210b1 Meilleur approche pour la mise à jour du comptage 2012-05-28 08:44:06 +00:00
Michael RICOIS
87e1a3faac Texte 2012-05-25 14:05:01 +00:00
Michael RICOIS
28baec0921 Retour configuration 2012-05-25 13:24:30 +00:00
Michael RICOIS
9a2175ed4a Change link label 2012-05-25 12:42:20 +00:00
Michael RICOIS
e079513039 translate value database by their text 2012-05-25 12:21:49 +00:00
Michael RICOIS
934f1e621f Change dialog behavior 2012-05-25 12:15:01 +00:00
Michael RICOIS
0bee1619ab text 2012-05-25 09:48:41 +00:00
Michael RICOIS
1791817fcf Ciblage status, New Display of Values, Date form 2012-05-25 09:22:13 +00:00
Michael RICOIS
37151eb6c5 Display status of ciblage motor 2012-05-25 09:19:42 +00:00
Michael RICOIS
78c7fb02e2 Suppression lecture registry 2012-05-25 08:18:00 +00:00
Michael RICOIS
a6f07c411e Ajout des titres d'aide 2012-05-25 08:15:38 +00:00
Michael RICOIS
cb2c082d04 Affichage des critères selectionnées dans les intervalles 2012-05-25 08:15:03 +00:00
Yoann LENAOUR
ec0110389c Ajout d'aides en ligne sur les zones du ciblage 2012-05-24 16:35:38 +00:00
Michael RICOIS
0141276b90 dateImmat 2012-05-24 14:14:00 +00:00
Michael RICOIS
89428b43cf Fenêtre de prévisualisation 2012-05-24 14:02:28 +00:00
Michael RICOIS
5e00bdf6d5 Date interval selection 2012-05-24 13:44:37 +00:00
Michael RICOIS
5c74b398f5 Date interval selection 2012-05-24 13:43:15 +00:00
Michael RICOIS
5f412b2315 Define min max for interval value 2012-05-24 07:34:12 +00:00
Michael RICOIS
42cf983eb5 Interval works on some fields 2012-05-23 19:40:49 +00:00
Michael RICOIS
a6f17922bd Modification du batch d'enrichissement 2012-05-23 14:07:24 +00:00
Michael RICOIS
c343c5197a Change SQL request to display preview 2012-05-23 13:35:29 +00:00
Michael RICOIS
2911697d75 Label géographique et juridique 2012-05-23 12:10:16 +00:00
Michael RICOIS
0f922f7d02 Correction 2012-05-23 10:06:06 +00:00
Michael RICOIS
991423a077 getValueLabelJuridique 2012-05-23 10:03:36 +00:00
Michael RICOIS
389509d700 getValueLabelGeographique 2012-05-23 09:52:10 +00:00
Michael RICOIS
fc9e1fdfd4 Update 2012-05-23 07:45:50 +00:00
Michael RICOIS
6e6647c4d8 Add getValueLavelGeographique and getValueLabelJuridique 2012-05-23 07:45:12 +00:00
Michael RICOIS
a11b00afd5 Redesign 2012-05-22 06:38:00 +00:00
Michael RICOIS
220641782d Redesign 2012-05-22 06:10:32 +00:00
Michael RICOIS
53e751a9f3 Ajout cache pour les métadonnées des tables 2012-05-21 10:21:47 +00:00
Michael RICOIS
8ad1bbf357 Delete directory 2012-05-21 07:51:32 +00:00
Michael RICOIS
99493051cf Ajout code pour la gestion du mode autocomplete 2012-05-21 07:30:51 +00:00
Michael RICOIS
505a8a5802 Update Zend to version 1.11.11 2012-05-21 07:28:59 +00:00
Michael RICOIS
1d60e3a51a Code spéciaux pour gérer efficacement 2012-05-20 17:35:13 +00:00
Michael RICOIS
34624d7bbb Update Zend to version 1.11.11 2012-05-20 08:29:38 +00:00
Michael RICOIS
1d75b3a650 Redesign previsualisation 2012-05-19 17:23:12 +00:00
Michael RICOIS
7eaa286977 Prévisualisation 2012-05-18 15:28:24 +00:00
Michael RICOIS
3b3df7a964 Rechargement des critères 2012-05-18 08:26:27 +00:00
Michael RICOIS
996f785440 Suppression des objets 2012-05-18 07:52:40 +00:00
Michael RICOIS
b09c5dfd97 Tooltip d'aide 2012-05-17 19:44:16 +00:00
Michael RICOIS
37fe20d668 Suppression upload.js 2012-05-17 18:12:55 +00:00
Michael RICOIS
b557b7e757 Modification de la configuration 2012-05-16 15:52:56 +00:00
Michael RICOIS
d139dc886f Suppression dernier objet 2012-05-16 15:52:34 +00:00
Michael RICOIS
ff681eaa64 Admin et Gestion 2012-05-16 14:28:32 +00:00
Michael RICOIS
23bcadcf02 Suppression objet 2012-05-16 14:17:23 +00:00
Michael RICOIS
fc600f3be2 Rappel des critères dans l'arborescence 2012-05-16 14:16:58 +00:00
Michael RICOIS
95f1d2054d Modification de la règle de preg_match 2012-05-16 14:16:26 +00:00
Michael RICOIS
053d4d0b89 Gestion des imbrications entre codeCommune et départements 2012-05-16 14:14:19 +00:00
Michael RICOIS
1444bd6283 Gestion régions, départements, codeCommune 2012-05-16 12:00:40 +00:00
Michael RICOIS
49aded2279 Revue complete du code version 1.2 2012-05-16 08:12:57 +00:00
Michael RICOIS
5fb0a6c8a0 Suppression objet 2012-05-16 07:48:46 +00:00
Michael RICOIS
c0c6df3346 Remove duplicate entry 2012-05-15 15:42:18 +00:00
Michael RICOIS
c188a96f09 Correction recherche enfant 2012-05-15 15:33:26 +00:00
Michael RICOIS
12a1930b1c Gestion arborescence juridique 2012-05-15 15:20:09 +00:00
Michael RICOIS
b939e9604e Nombreuses améliorations 2012-05-15 11:38:51 +00:00
Michael RICOIS
92d20339f7 Chemin 2012-05-14 18:56:09 +00:00
Michael RICOIS
8bfa2f6f2b Arborescence des NAFs 2012-05-14 15:32:50 +00:00
Michael RICOIS
81f4059371 Corrections 2012-05-14 13:28:58 +00:00
Michael RICOIS
cf528a531a autocomplete 2012-05-14 13:16:14 +00:00
Michael RICOIS
5196da2329 Traitement des selectMultiple 2012-05-14 08:25:05 +00:00
Michael RICOIS
be87fb8352 Suppression SessionCiblage 2012-05-14 08:02:57 +00:00
Michael RICOIS
a4ac98b4e6 Diverses corrections 2012-05-14 07:49:58 +00:00
Michael RICOIS
41f9ce83e3 Pris en compte que des select simple 2012-05-14 07:36:27 +00:00
Michael RICOIS
66d8069d91 Modification pour la suppression du critère 2012-05-13 13:59:15 +00:00
Michael RICOIS
1d261f6c7f Suppression adr_reg_ex 2012-05-13 13:21:15 +00:00
Michael RICOIS
2c9d24dfb1 Ajout bil 2012-05-13 13:20:28 +00:00
Michael RICOIS
df5ebbdb7f Suppression de Session Ciblage 2012-05-12 16:46:00 +00:00
Michael RICOIS
2697e8933d Modification de l'affichage des champs 2012-05-11 20:25:55 +00:00
Michael RICOIS
daabfd826a Modification structure des définitions 2012-05-11 12:26:16 +00:00
Michael RICOIS
075b6e9918 Amélioration du style 2012-05-11 09:38:07 +00:00
Michael RICOIS
c69ebd101e Ajout librairie Qtip 2012-05-11 08:20:02 +00:00
Michael RICOIS
e06561b438 Corrections forme juridique 2012-05-10 15:38:44 +00:00
Michael RICOIS
557235c760 Corrections 2012-05-10 15:07:20 +00:00
Michael RICOIS
fd1e1edc19 Correction forme juridique 2012-05-10 12:32:57 +00:00
Michael RICOIS
fae32b348d Corrections 2012-05-10 12:23:24 +00:00
Michael RICOIS
ec615a6e80 Replacement des valeurs tous par - 2012-05-10 11:58:42 +00:00
Michael RICOIS
b6893999e3 Correction conflit avec l'objet du même nom 2012-05-10 11:44:28 +00:00
Michael RICOIS
51ba06b275 Passage à la version 1.2 2012-05-10 09:44:20 +00:00
Michael RICOIS
0a046d046f Todo 2012-05-10 09:24:29 +00:00
Michael RICOIS
ccd2641ab3 Test 2012-05-10 09:24:05 +00:00
Michael RICOIS
fb3ecd7321 Modifications visuelles 2012-05-10 08:58:34 +00:00
Michael RICOIS
639b476294 Simplification de l'affichage des critères 2012-05-06 14:42:11 +00:00
Michael RICOIS
c9bba47a74 Simplification 2012-05-06 13:53:19 +00:00
Michael RICOIS
944d26d7b5 Simplification 2012-05-06 13:05:00 +00:00
Michael RICOIS
77174d28c0 Suppression stripe dans les styles 2012-05-06 12:56:07 +00:00
Michael RICOIS
69d2803b08 WebService Score en autoload 2012-05-06 12:41:35 +00:00
Michael RICOIS
abfc928ee7 Regroupement du script autocompleted.js dans fields.js 2012-05-04 18:21:51 +00:00
Michael RICOIS
599380552d Regroupement des styles 2012-05-03 19:06:09 +00:00
Michael RICOIS
b403056e93 Elimination 2012-05-02 19:31:00 +00:00
Michael RICOIS
cec606ae72 Suppression lecture de fichier configuration.ini 2012-05-02 19:14:50 +00:00
Michael RICOIS
10d5a73b4f Ok pour les modeles 2012-05-02 19:06:36 +00:00
Michael RICOIS
c52157ea20 Changement des noms pour les models 2012-05-02 18:27:04 +00:00
Michael RICOIS
1d87d5af73 Suppression de libs 2012-05-02 18:19:07 +00:00
Michael RICOIS
b80891b53d Changement des noms pour les models 2012-05-02 18:06:04 +00:00
Michael RICOIS
06c1bab20a Changement des noms pour les models 2012-05-02 18:05:26 +00:00
Michael RICOIS
4afd6106e6 Changement des noms pour les models 2012-05-02 18:04:41 +00:00
Michael RICOIS
bc400c658c Modification extreme pour collé à la structure des autres projets 2012-05-02 16:52:28 +00:00
Michael RICOIS
26e2c2ee69 Revue de code complete 2012-05-02 16:03:28 +00:00
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
Michael RICOIS
10668fd3f6 Merge from 1.1 2012-03-27 08:37:46 +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
ff7707563e Merge 2012-03-20 08:40:42 +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
Michael RICOIS
7397619660 Merge depuis branches 1.1 2012-03-09 09:03:35 +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
8dd8af6fa4 Et sans les majuscules ? 2012-03-05 16:08:37 +00:00
Michael RICOIS
630f45adce Correction Class Object_MinMax not found, car l'autoload spécial ça ne marche pas 2012-03-05 16:07:43 +00:00
Michael RICOIS
112081aba9 Correction type colonne 2012-03-05 15:53:54 +00:00
Michael RICOIS
493cf24376 Debug 2012-03-05 15:49:49 +00:00
Michael RICOIS
99ebc365fd Correction 2012-03-05 15:47:31 +00:00
Michael RICOIS
b7185d60c3 debug 2012-03-05 15:46:40 +00:00
Michael RICOIS
18869a8e31 debug 2012-03-05 15:43:42 +00:00
Michael RICOIS
5a50253960 Test fetch 2012-03-05 15:43:11 +00:00
Michael RICOIS
7612d0e17c Debuggage 2012-03-05 15:40:55 +00:00
Michael RICOIS
90eb13188e Correction execution de la requete 2012-03-05 15:39:45 +00:00
Michael RICOIS
a97b6a01d6 Merge from branche 1.1 : Correction batch suite à changement structure sql 2012-03-05 15:34:14 +00:00
Michael RICOIS
42c7be5e22 Correction batch 2012-03-05 15:31:31 +00:00
Michael RICOIS
ebd7fae292 Merge from branche 1.1 2012-03-05 15:25:20 +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
Michael RICOIS
395f1ed792 Merge diverses petites corrections 2012-02-16 15:01:06 +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
Michael RICOIS
63250c48f1 Merge correction javascript 2012-02-15 17:23:06 +00:00
Damien LASSERRE
9312fee50b correction bug 2012-02-15 17:19:36 +00:00
Michael RICOIS
919b6b584d Merge de la version 1.1 2012-02-15 17:14:30 +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
c106a20371 Ajout mode staging 2012-02-09 10:35:41 +00:00
Michael RICOIS
6adc157fc9 Ajout du staging 2012-02-09 10:29:11 +00:00
Michael RICOIS
07dd375992 Merge configuration 2012-02-08 16:21:48 +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
7aa5734a70 Svn ignore 2012-02-08 15:42:28 +00:00
Michael RICOIS
b888f2b128 Suppression fichier 2012-02-08 15:37:02 +00:00
Michael RICOIS
d521ca2f05 Ces fichiers ne doivent pas être là 2012-02-08 15:36:44 +00:00
Michael RICOIS
15cfb485eb Branches 1.1 2012-02-06 15:20:16 +00:00
Damien LASSERRE
eb1a313f70 réinitialisation 2012-02-06 10:12:23 +00:00
Damien LASSERRE
920470b1c2 modification svn 2012-02-03 08:43:38 +00:00
Damien LASSERRE
d0b4043cd0 Passage de la version 2 sur le lan 2012-02-03 08:33:13 +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
3661 changed files with 527856 additions and 142918 deletions

View File

@ -1,65 +1,98 @@
<?php
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
//Initialisation global des paramètres de vue
protected function _initViewSettings()
protected function _initConfig()
{
$config = new Zend_Config($this->getOptions());
Zend_Registry::set('config', $config);
return $config;
}
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->doctype('HTML5');
$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('/libs/qtip/jquery.qtip.min.css', 'all')
->appendStylesheet('/libs/tree/themes/default/style.css')
->appendStylesheet('/libs/ui-1.10.3/themes/smoothness/jquery-ui.css', 'all')
->appendStylesheet($pathStyle.'/main.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('/libs/jquery/jquery-1.11.3.min.js', 'text/javascript')
->appendFile('/libs/jquery/jquery.cookie.js', 'text/javascript')
->appendFile('/libs/ui-1.10.3/jquery-ui.min.js', 'text/javascript')
->appendFile('/libs/qtip/jquery.qtip.min.js', 'text/javascript')
->appendFile($pathScript.'/scripts.js', 'text/javascript');
$view->headTitle()->setSeparator(' - ');
$view->headTitle('Odea');
}
protected function _initLogging()
{
//Logger de développement
//Firebug
$writer = new Zend_Log_Writer_Firebug();
if(APPLICATION_ENV=='production') $writer->setEnabled(false);
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);
$c = new Zend_Config($this->getOptions());
try {
$db = Zend_Db::factory($c->profil->db->metier);
Zend_Db_Table::setDefaultAdapter ($db);
} catch ( Exception $e ) {
exit ( $e->getMessage() );
if (APPLICATION_ENV == 'development') {
print_r($e);
} else {
echo "Le service est actuellement indisponible.";
}
exit;
}
/**
* Set the default adapter to use with all model
*/
Zend_Db_Table::setDefaultAdapter($db);
/**
* Set Firebug Database profiler
*/
if (APPLICATION_ENV == 'development') {
$profiler = new Zend_Db_Profiler_Firebug('All DB Queries');
$profiler->setEnabled(true);
$db->setProfiler($profiler);
}
Zend_Registry::set('db', $db);
}
protected function _initCache()
{
//MetadataCache pour la base de données
$frontendOptions = array(
'lifetime' => 14400,
'automatic_serialization' => true
);
$backendOptions = array();
$cache = Zend_Cache::factory('Core','Apc', $frontendOptions, $backendOptions);
Zend_Db_Table_Abstract::setDefaultMetadataCache($cache);
//Cache pour les données de la base à stocker
}
}

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

@ -1,30 +0,0 @@
[production]
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
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"
[staging : production]
resources.frontController.params.displayExceptions = 0
phpSettings.soap.wsdl_cache_enabled = 0
[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,9 +1,20 @@
<?php
class AideController extends Zend_Controller_Action
{
public function init()
{
$this->view->headLink()->appendStylesheet('/themes/default/styles/aide.css');
}
public function indexAction(){}
public function aproposdeAction(){}
public function messageAction()
{
$request = $this->getRequest();
$this->view->assign('typeMsg', $request->getParam('typeMsg'));
}
}

View File

@ -1,331 +1,424 @@
<?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));
}
}
/* Nafs */
public function nafAction()
{
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$key = $request->getParam('key');
$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();
$fields = new Scores_Fields();
$val = $fields->getCritere($key);
$valuesChecked = array();
$valuesUndetermined = array();
if ($val != null){
$valuesChecked = $val['in'];
if (count($valuesChecked)>0) {
foreach($valuesChecked as $value){
$valuesUndetermined = array_merge($valuesUndetermined, $this->getNafParent($value, true));
}
}
}
$nafM = new Application_Model_CiblageNaf();
$sql = $nafM->select()->where('niveau = ?', $niveau)->order('code ASC');
$result = $nafM->fetchAll($sql)->toArray();
$tabNaf = array();
foreach($result as $item)
{
if ( $item['niveau']==1 ) {
$data = $item['lib'];
} else {
$data = $item['lib'].' ('.$item['code'].')';
}
$structure = array(
'data' => $data,
'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->key = $key;
$this->view->naf = json_encode($tabNaf);
}
public function nafajaxAction()
{
$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('');
}
}
$request = $this->getRequest();
$key = $request->getParam('key');
$parent = $request->getParam('parent');
$niveau = $request->getParam('niveau', 1);
$niveau = $niveau + 1;
//Récupération des valeurs enregistrées en session
$fields = new Scores_Fields();
$val = $fields->getCritere($key);
$valuesChecked = array();
$valuesUndetermined = array();
if ($val != null){
$valuesChecked = $val['in'];
if (count($valuesChecked)>0) {
foreach($valuesChecked as $value){
$valuesUndetermined = array_merge($valuesUndetermined, $this->getNafParent($value, true));
}
}
}
$nafM = new Application_Model_CiblageNaf();
$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_CiblageNaf();
$sql = $nafM->select()
->from($nafM, array('parent'))
->where('code = ?', $value);
$result = $nafM->fetchRow($sql);
$out[] = $result->parent;
}
return $out;
}
/* Geographiques */
public function geographiqueAction()
{
$this->_helper->layout()->disableLayout();
$key = $this->getRequest()->getParam('key');
$fields = new Scores_Fields();
$val = $fields->getCritere($key);
$valuesChecked = array();
$valuesUndetermined = array();
if ($val != null){
$valuesChecked = $val['in'];
if (count($valuesChecked)>0) {
foreach($valuesChecked as $value) {
if ( substr($value,0,1)!='R' ) {
$valuesUndetermined = array_merge($valuesUndetermined, $this->getGeoParent($value));
}
}
}
}
$regionsM = new Application_Model_CiblageRegions();
$sql = $regionsM->select()->order('NCCENR ASC');
$regions = $regionsM->fetchAll($sql)->toArray();
$tabRegions = array();
foreach($regions as $item) {
$structure = array(
'data' => $item['NCCENR'],
'attr' => array(
'id' => 'R'.$item['REGION'],
'niveau' => 0,
),
'state' => 'closed',
'children' => array()
);
if (in_array('R'.$item['REGION'], $valuesChecked)){
$structure['attr']['class'] = 'jstree-checked';
}
if (in_array('R'.$item['REGION'], $valuesUndetermined)){
$structure['attr']['class'] = 'jstree-undetermined';
}
$tabRegions[] = $structure;
}
$this->view->key = $key;
$this->view->regions = json_encode($tabRegions);
}
public function geographiqueajaxAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender();
$request = $this->getRequest();
$id = $request->getParam('id');
$niveau = $request->getParam('niveau');
//Récupération des valeurs enregistrées en session
$fields = new Scores_Fields();
$val = $fields->getCritere('geo');
$valuesChecked = array();
$valuesUndetermined = array();
if ($val != null){
$valuesChecked = $val['in'];
if (count($valuesChecked)>0) {
foreach($valuesChecked as $value){
$valuesUndetermined = array_merge($valuesUndetermined, $this->getGeoParent($value));
}
}
}
// R[code] => Régions => recherche département
if ( substr($id,0,1)=='R' ) {
$region = substr($id,1);
$departementsM = new Application_Model_CiblageDepartements();
$sql = $departementsM->select()->where('codeRegionInsee = ?', $region);
$departements = $departementsM->fetchAll($sql)->toArray();
$tabDepartements = array();
foreach($departements as $item) {
$structure = array(
'data' => $item['libdep'].' ('.$item['numdep'].')',
'attr' => array(
'id' => 'D'.$item['numdep'],
'niveau' => 1,
),
'state' => 'closed',
'children' => array()
);
if (in_array('D'.$item['numdep'], $valuesChecked)){
$structure['attr']['class'] = 'jstree-checked';
}
if (in_array('D'.$item['numdep'], $valuesUndetermined)){
$structure['attr']['class'] = 'jstree-undetermined';
}
$tabDepartements[] = $structure;
}
echo json_encode($tabDepartements);
}
// D[code] => Départements => recherche commune
else if ( substr($id,0,1)=='D' ) {
$departement = substr($id,1);
$codePostauxM = new Application_Model_CiblageCodePostaux();
$sql = $codePostauxM->select()
->where('Codepos LIKE ?', $departement.'%')
->order('Commune ASC');
Zend_Registry::get('firebug')->info($sql->__toString());
$communes = $codePostauxM->fetchAll($sql)->toArray();
$tabCommunes = array();
foreach($communes as $item) {
$structure = array(
'data' => $item['Commune'],
'attr' => array(
'id' => 'C'.$item['INSEE'],
'niveau' => 1,
)
);
if (in_array('C'.$item['INSEE'], $valuesChecked)){
$structure['attr']['class'] = 'jstree-checked';
}
$tabCommunes[] = $structure;
}
echo json_encode($tabCommunes);
}
}
protected function getGeoParent($code)
{
if (substr($code,0,1)=='D') {
$departementsM = new Application_Model_CiblageDepartements();
$sql = $departementsM->select()
->from($departementsM, array('codeRegionInsee'))
->where('numdep = ?', substr($code,1));
$departement = $departementsM->fetchRow($sql);
return array('R'.$departement->codeRegionInsee);
} elseif ( substr($code,0,1)=='C' ) {
$codePostauxM = new Application_Model_CiblageCodePostaux();
$sql = $codePostauxM->select()
->from($codePostauxM, array('Codepos'))
->where('INSEE = ?', substr($code,1));
$commune = $codePostauxM->fetchRow($sql);
$departement = 'D'.substr($commune->Codepos,0,2);
$region = $this->getGeoParent($departement);
return array_merge(array($departement), $region);
}
return array();
}
/* Forme Juridique */
public function juridiqueAction()
{
$this->_helper->layout()->disableLayout();
$fields = new Scores_Fields();
$val = $fields->getCritere('cj');
$valuesChecked = array();
$valuesUndetermined = array();
if ($val != null){
$valuesChecked = $val['in'];
if (count($valuesChecked)>0) {
foreach($valuesChecked as $value){
if (strlen($value)>1) {
$valuesUndetermined = array_merge($valuesUndetermined, array(substr($value,0,1)));
}
}
}
}
$FormeJuridiqueM = new Application_Model_CiblageFormeJuridique();
$sql = $FormeJuridiqueM->select()
->where('LENGTH(fjCode) = 1')
->order('fjLibelle ASC');
$formes = $FormeJuridiqueM->fetchAll($sql)->toArray();
$tabFJ = array();
foreach($formes as $forme) {
$structure = array(
'data' => $forme['fjLibelle'],
'attr' => array( 'id' => $forme['fjCode'] ),
'state' => 'closed',
'children' => array(),
);
if (in_array($forme['fjCode'], $valuesChecked)){
$structure['attr']['class'] = 'jstree-checked';
}
if (in_array($forme['fjCode'], $valuesUndetermined)){
$structure['attr']['class'] = 'jstree-undetermined';
}
$tabFJ[] = $structure;
}
$key = $this->getRequest()->getParam('key');
$this->view->key = $key;
$this->view->formejuridiques = json_encode($tabFJ);
}
public function juridiqueajaxAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender();
$request = $this->getRequest();
$id = $request->getParam('id');
$length = strlen($id);
$followingLevel = 5;
if ( $length==1 ) {
$followingLevel = 2;
} elseif ( $length==2 ) {
$followingLevel = 4;
}
$fields = new Scores_Fields();
$val = $fields->getCritere('cj');
$valuesChecked = array();
$valuesUndetermined = array();
if ($val != null){
$valuesChecked = $val['in'];
if (count($valuesChecked)>0) {
foreach($valuesChecked as $value){
if (strlen($value)>$followingLevel) {
$valuesUndetermined = array_merge($valuesUndetermined, substr($value,0,$followingLevel));
}
}
}
}
Zend_Registry::get('firebug')->info($valuesChecked);
if ($length<4) {
$FormeJuridiqueM = new Application_Model_CiblageFormeJuridique();
$sql = $FormeJuridiqueM->select()
->where('fjCode LIKE "'.$id.'%"')
->where('LENGTH(fjCode)=?', $followingLevel);
$formes = $FormeJuridiqueM->fetchAll($sql)->toArray();
$tabFJ = array();
foreach($formes as $forme) {
$data = $forme['fjLibelle'];
if ( $followingLevel==4 ) {
$data = $forme['fjLibelle'].' ('.$forme['fjCode'].')';
}
$structure = array(
'data' => $data,
'attr' => array( 'id' => $forme['fjCode'] ),
);
if ( $length<2 ) {
$structure['state'] = 'closed';
$structure['children'] = array();
}
if (in_array($forme['fjCode'], $valuesChecked)){
$structure['attr']['class'] = 'jstree-checked';
}
if (in_array($forme['fjCode'], $valuesUndetermined)){
$structure['attr']['class'] = 'jstree-undetermined';
}
$tabFJ[] = $structure;
}
echo json_encode($tabFJ);
}
}
}

View File

@ -1,132 +1,374 @@
<?php
class ComptageController extends Zend_Controller_Action
{
public function indexAction()
{
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);
$request = $this->getRequest();
$cle = $request->getParam('cle');
$valeur = $request->getParam('valeur');
/**
* Error code
* 0 : OK
* 1 : Error from sphinx
* 2 : Error when insert critere
* @var int
*/
$error = 0;
//Set the flag for exclusion
$exclude = $request->getParam('exclude');
$ex = false;
if ( intval($exclude)==1 ) {
$ex = true;
}
$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, '', ' ')
$fields = new Scores_Fields();
$insert = $fields->setCritere($cle, $valeur, $ex);
if ($insert) {
//Informations utilisateur
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
//Comptage
require_once 'Scores/Ciblage.php';
$ciblage = new Ciblage($fields->getValues(), $user->globalRNCS);
//@todo : if $total = false then an error occured ?
// et si nous avons une erreur alors faut-il retirer les critères de la session
$total = $ciblage->execute();
//Define value return after counting
$fields->setNb('total', $total);
if ( $user->preferences['interface']['insee'] == 1 ) {
$insee = $ciblage->calculRedevanceInsee();
} else {
$insee = null;
}
$fields->setNb('insee', $insee);
if ( $total !== false ) {
//All is ok, save criteres and result to session
$fields->setCritereSession();
} else {
$error = 1;
}
} else {
$error = 2;
}
//@todo : Ajouter les critères sous forme json_encode
//Retour comptage, unité Insee
$result = array(
'count' => number_format($total, 0, '', ' '),
'insee' => ($insee!==null) ? number_format($insee, 0, '', ' ') : null,
'error' => $error,
);
echo json_encode($result);
}
/**
* Affichage formulaire de sauvegarde
*/
$this->view->assign('result', $result);
}
public function resetAction()
{
$erreurs = new Zend_Session_Namespace('erreurs');
$fields = new Scores_Fields();
$fields->clearCiblage();
unset($erreurs->erreurs);
$this->_redirect('/');
}
public function savedialogAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->layout()->disableLayout();
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
//No contrat define
if ( empty($user->dateContrat) || $user->dateContrat=='0000-00-00 00:00:00' ) {
//If no params are detected, display a message to contact support
$this->view->typeMsg = 'support';
}
//Check dateContrat and calculate end of contrat
else {
$hour = intval(substr($user->dateContrat,11,2));
$min = intval(substr($user->dateContrat,14,2));
$sec = intval(substr($user->dateContrat,17,2));
$month = intval(substr($user->dateContrat,5,2)) + $user->periodContrat;
$day = intval(substr($user->dateContrat,8,2));
$year = intval(substr($user->dateContrat,0,4));
$dateFinContrat = mktime($hour,$min,$sec,$month,$day,$year);
if ( time() > $dateFinContrat ) {
$this->view->typeMsg = 'contrat';
}
}
//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);
$fields = new Scores_Fields();
$criteres = $fields->getCriteres();
if (count($criteres) == 0) {
$this->view->noSelection = true;
}
$this->view->reference = $user->username.'-'.date('YmdHis');
}
/**
* 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"));
/**
* Take care of "ref", remove all special char, accent and replace space by _
*/
require_once 'i18n/cleanchar.php';
$ref = str_replace(' ', '_', $ref);
$ref = cleanutf8($ref);
$pattern = '/[^a-zA-Z0-9_-]+/';
$ref = preg_replace($pattern, '', $ref);
if (empty($ref)) {
echo json_encode(array(
'error'=>1,
'msg'=> "Référence non définie !"));
} else {
//Session
$fields = new Scores_Fields();
$criteres = $fields->getCriteres();
$resultat = $fields->getNb('total');
$nbInsee = $fields->getNb('insee');
//Informations utilisateur
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
//Enregistrement des critères
$criteresM = new Application_Model_CiblageCriteres();
$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) {
//If nbInsee == null, need to count again
if ($nbInsee===null) {
require_once 'Scores/Ciblage.php';
$ciblage = new Ciblage($criteres, $user->globalRNCS);
$nbInsee = $ciblage->calculRedevanceInsee();
}
} else {
echo json_encode(array(
'error'=>1,
'msg'=> "Erreur lors de l'enregistrement"));
}
//Enregistrement des valeurs du comptage
$comptageM = new Application_Model_CiblageComptages();
$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",
'href' => $this->view->url(array('controller'=>'dashboard', 'action'=>'ciblage', '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 updateAction()
{
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$idCriteres = $request->getParam('id');
//Récupération des critères du ciblage
$criteresM = new Application_Model_CiblageCriteres();
$criteresRow = $criteresM->find($idCriteres);
$criteres = $criteresRow->current();
$structure = json_decode($criteres->criteres, true);
$field = new Scores_Fields();
$values = $field->getValues($structure);
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
//Comptage
require_once 'Scores/Ciblage.php';
$ciblage = new Ciblage($values, $user->globalRNCS);
$data = array(
'idDefinition' => $idCriteres,
'resultat' => $ciblage->execute(),
'uniteInsee' => $ciblage->calculRedevanceInsee(),
'dateAjout' => date('YmdHis'),
);
//Enregistrement
$comptageM = new Application_Model_CiblageComptages();
$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'],0,4)
.' '.substr($data['dateAjout'],8,2).':'.substr($data['dateAjout'],10,2).':'.substr($data['dateAjout'],12,2),
);
$this->view->result = $result;
}
/**
* Get a preview of data to extract
*/
public function previsualisationAction()
{
$this->_helper->layout()->disableLayout();
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
$fields = new Scores_Fields();
//Comptage
require_once 'Scores/Ciblage.php';
$ciblage = new Ciblage($fields->getValues(), $user->globalRNCS);
$sirets = $ciblage->execute(true, 10);
/**
* Make SQL request with the client profil for columns
*/
$profilsM = new Application_Model_CiblageEnrichissementProfils();
$sql = $profilsM->select()
->from($profilsM, array('criteres'))
->where('reference=?','default')
->where('login = ?', $user->username);
$result = $profilsM->fetchRow($sql);
$profil = json_decode($result['criteres'], true);
//No profil, define it
if (count($profil)==0) {
$profil = array('raisonSociale');
}
$tabEntete = $tabEnteteLabel = array();
require_once 'Scores/Enrichissement.php';
$enrichissement = new Enrichissement();
$fields = $enrichissement->getFields();
$columns = array();
$joins = array();
foreach ( $profil as $item ) {
//Get item
if ( array_key_exists($item, $fields) ) {
$field = $fields[$item];
//Définition de l'entete
$tabEnteteLabel[] = $field['label'];
$tabEntete[] = $item;
//Construction de la requete SQL
if ( array_key_exists('sql', $field) ) {
$columns[] = new Zend_Db_Expr($field['sql']);
} else {
$columns[] = $field['column'].' AS '.$item;
}
//Pour les champs de type "code", ajouter le libellé
if ( array_key_exists('join', $field) ) {
$tabEnteteLabel[] = $field['join']['label'];
$joinColumn = $item.'Lib';
$tabEntete[] = $joinColumn;
//Sql
$tableAlias = $item.'L';
$join['name'] = $field['join']['table'].' AS '.$tableAlias;
$join['col'] = $field['join']['column'].' AS '.$joinColumn;
$join['cond'] = $field['join']['cond'];
$joins[] = $join;
}
}
}
$db = Zend_Db_Table::getDefaultAdapter();
$sql = $db->select()->from('jo.etablissements_act', $columns);
$i = 0;
foreach ( $sirets as $siret ) {
if ( $i > 0 ) {
$sql->orWhere("siren='".substr($siret,0,9)."' AND nic='".substr($siret,9,5)."'");
} else {
$sql->where("siren='".substr($siret,0,9)."' AND nic='".substr($siret,9,5)."'");
}
$i++;
}
if (count($joins)) {
foreach ( $joins as $join ) {
$sql->joinLeft($join['name'], $join['cond'], $join['col']);
}
}
try {
$result = $db->fetchAll($sql, null, Zend_Db::FETCH_ASSOC);
} catch(Zend_Db_Exception $e) {
if (APPLICATION_ENV=='development') {
echo $e->getMessage();
echo "<br/>";
echo $sql->__toString();
}
}
$liste = array();
foreach ($result as $i => $tabData) {
//Trier pour la sortie
$tabSortie = array();
foreach($tabEntete as $key) {
//Add static values
if ( array_key_exists($key, $fields) ) {
if ( array_key_exists('values', $fields[$key]) ) {
$values = $fields[$key]['values'];
//Remplace value if exist
if ( array_key_exists($tabData[$key], $values) ) {
$tabData[$key] = $values[$tabData[$key]];
}
}
}
//Order data for CSV file
$tabSortie[] = isset($tabData[$key]) ? $tabData[$key] : '';
}
$liste[] = $tabSortie;
}
Zend_Registry::get('firebug')->info($liste);
$this->view->assign('label', $tabEnteteLabel);
$this->view->assign('liste', $liste);
}
}

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 +1,467 @@
<?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();
public function init()
{
$this->view->headLink()
->appendStylesheet('/themes/default/styles/dashboard.css', 'all')
->appendStylesheet('/libs/jqpagination/jqpagination.css', 'all');
$this->view->headScript()
->appendFile('/libs/jqpagination/jquery.jqpagination.min.js', 'text/javascript')
->appendFile('/themes/default/scripts/dashboard.js', 'text/javascript');
}
public function indexAction()
{
$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();
$type = $request->getParam('type', null);
$this->view->type = $type;
$page = $request->getParam('page', 1);
$offset = 20;
//cache data
$frontendOptions = array(
'lifetime' => 86400,
'automatic_serialization' => true
);
//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()
$backendOptions = array('cache_dir' => '../data/cache/');
$cache = Zend_Cache::factory('Output','File',$frontendOptions,$backendOptions);
if(($results = $cache->load($user->username)) === false) {
$criteresM = new Application_Model_CiblageCriteres();
$sql = $criteresM->select()
->from($criteresM, array('id', 'reference', 'dateAjout'))
->where("idClient = ?", $user->idClient)
->where("login = ?", $user->username)
->order('dateAjout DESC')
->limitPage($position, $offset);
->order('dateAjout DESC');
$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'))
$rows = $criteresM->fetchAll($sql);
$results = array();
$comptagesM = new Application_Model_CiblageComptages();
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();
$comptage = $comptagesM->fetchAll($sql)->toArray();
if (count($comptage)>0){
$info['resultat'] = $comptage[0]['resultat'];
$info['uniteInsee'] = $comptage[0]['uniteInsee'];
$info['dateComptage'] = $comptage[0]['dateAjout'];
if (count($comptage)>0){
$info['resultat'] = $comptage[0]['resultat'];
$info['uniteInsee'] = $comptage[0]['uniteInsee'];
$info['dateComptage'] = $comptage[0]['dateAjout'];
}
$results[] = $info;
}
if (!empty($results)) {
$cache->save($results, $user->username);
}
$results[] = $info;
}
$this->view->assign('ciblages', $results);
$this->view->assign('nbCiblage', $nbCiblage);
//
//paginate results list
$paginator = Zend_Paginator::factory($results);
$this->view->paginator = $paginator;
$itemCount = 5;
$page = $this->_getParam('page', 1);
$paginator->setCurrentPageNumber($page);
$paginator->setItemCountPerPage($itemCount);
$this->view->assign('itemCount', $itemCount);
//end
$this->view->comptages = $results;
}
//
$enrichissements = new Application_Model_CiblageEnrichissementIdentifiants();
$sql = $enrichissements->select()
->setIntegrityCheck(false)
->from(
array('i' => 'enrichissement_identifiants'),
array('id', 'reference', 'fichier', 'nbLigneTotales', 'nbLigneTraites', 'error', 'dateAdded', 'dateStart', 'dateStop')
)
->join(
array('c' => 'ciblage_criteres'), 'i.idCriteres = c.id',
array('')
)
->where('c.idClient = ?', $user->idClient)
->where('c.login = ?', $user->username)
->order('i.dateAdded DESC');
/**
* 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();
$enrichissements = $enrichissements->fetchAll($sql);
//paginate results list
$paginatorEnrichissements = Zend_Paginator::factory($enrichissements);
$this->view->enrichissements = $paginatorEnrichissements;
$itemCountEnrichissements = 5;
$pageEnrichissements = $this->_getParam('pageEnrichissements', 1);
$paginatorEnrichissements->setCurrentPageNumber($pageEnrichissements);
$paginatorEnrichissements->setItemCountPerPage($itemCountEnrichissements);
$this->view->assign('itemCountEnrichissements', $itemCountEnrichissements);
//end
}
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();
$criteresM = new Application_Model_CiblageCriteres();
//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_CiblageComptages();
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;
}
$this->view->ciblages = $results;
$this->view->nbCiblage = $nbCiblage;
$this->view->page = $page;
$this->view->nbPages = ceil($nbCiblage/$offset);
}
public function ciblageAction()
{
$request = $this->getRequest();
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
$comptageId = $request->getParam('id');
$fields = new Scores_Fields();
//Lecture des paramètres du ciblage
$criteresM = new Application_Model_CiblageCriteres();
$sql = $criteresM->select()
->where('idClient = ?', $user->idClient)
->where('login = ?', $user->username)
->where('id = ?', $comptageId);
$criteres = $criteresM->fetchRow($sql)->toArray();
$infosCriteres = array();
if ($criteres != null) {
$comptageRef = $criteres['reference'];
$decodeCriteres = json_decode($criteres['criteres'], true);
//Construction affichage des critères
foreach ( $decodeCriteres as $key => $item ) {
$inValue = $fields->getValueLabel($key, $item['in']);
$exValue = $fields->getValueLabel($key, $item['ex']);
//Add label to struct for display
$infosCriteres[] = array(
'label' => $fields->getLabel($key),
'in' => $inValue,
'ex' => $exValue,
);
}
//Lecture des comptages
$comptageM = new Application_Model_CiblageComptages();
$sql = $comptageM->select()
->where('idDefinition = ?', $comptageId)
->order('dateAjout DESC');
$comptages = $comptageM->fetchAll($sql)->toArray();
//Lecture enrichissement existe
$enrichissementsM = new Application_Model_CiblageEnrichissementIdentifiants();
$sql = $enrichissementsM->select()
->where('idCriteres = ?', $comptageId);
$enrichissements = $enrichissementsM->fetchAll($sql);
//Affichage
$this->view->comptageId = $comptageId;
$this->view->comptageRef = $comptageRef;
$this->view->criteres = $infosCriteres;
$this->view->comptages = $comptages;
$this->view->enrichissements = $enrichissements;
}
}
public function rcomptageAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$request = $this->getRequest();
$q = strtolower($this->getRequest()->getParam('q', ''));
$request = $this->getRequest();
$q = $request->getParam('q');
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
$db = Zend_Registry::get('db');
$criteresM = new Application_Model_Criteres($db);
$criteresM = new Application_Model_CiblageCriteres();
$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);
$rows = $criteresM->fetchAll($sql);
if (count($rows)>0){
$separator = " , ";
foreach ($rows as $item) {
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)),
'value' => $item->reference,
'url' => $this->view->url(array('controller'=>'dashboard', 'action'=>'ciblage', 'id'=>$item->id)),
);
}
}
echo json_encode($output);
echo json_encode($output);
}
/**
* Liste des enrichissements
*/
public function enrichissementsAction()
{
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
//Criteres => Comptages (last) => enrichissement_identifiants => enrichissement_commandes
$enrichissementsM = new Application_Model_CiblageEnrichissementIdentifiants();
// Pending
$sql = $enrichissementsM->select()
->setIntegrityCheck(false)
->from(
array('i' => 'enrichissement_identifiants'),
array('id', 'reference', 'fichier', 'nbLigneTotales', 'nbLigneTraites', 'error', 'dateAdded', 'dateStart', 'dateStop')
)
->join(
array('c' => 'ciblage_comptages'), 'i.idComptage = c.id',
array('')
)
->join(
array('criteres' => 'ciblage_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;
$sql = $enrichissementsM->select()
->setIntegrityCheck(false)
->from(
array('i' => 'enrichissement_identifiants'),
array('id', 'reference', 'fichier', 'nbLigneTotales', 'nbLigneTraites', 'error', 'dateAdded', 'dateStart', 'dateStop')
)
->join(
array('c' => 'ciblage_comptages'), 'i.idComptage = c.id',
array('')
)
->join(
array('criteres' => 'ciblage_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()
{
}
/**
* Gestion de la configuration de l'application
* Display information about user's profil
*/
public function configurationAction()
{
//Préférences
//Profil extraction
//User's params
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
if (array_key_exists('filter', $user->preferences) && count($user->preferences['filter'])>0) {
$liste = $user->preferences['filter'];
foreach ( $liste as $name => $value ){
$this->view->assign('prefFilter'.ucfirst($name), $value);
}
}
if (array_key_exists('interface', $user->preferences) && count($user->preferences['interface'])>0) {
$liste = $user->preferences['interface'];
foreach ( $liste as $name => $value ){
$this->view->assign('prefInterface'.ucfirst($name), $value);
}
}
$timestamp = strtotime( $user->dateContrat );
$dateBegin = date( 'd/m/Y', $timestamp );
$timestamp = mktime(0,0,0,substr($dateBegin,3,2)+$user->periodContrat,substr($dateBegin,0,2), substr($dateBegin,6,4));
$dateEnd = date( 'd/m/Y', $timestamp );
$this->view->assign('dateBegin', $dateBegin);
$this->view->assign('dateEnd', $dateEnd);
//Customer params have an option on the RNCS filter
$this->view->assign('filterRNCS', $user->filterRNCS);
$this->view->assign('licenceINSEE', $user->licenceINSEE);
$this->view->assign('immediatExtract', $user->immediatExtract);
$tarifText = '';
//Tarifs
if ($user->forfait!=0) {
//Forfait de
$tarifText = 'Forfait de '.$user->forfait.' euros';
} else {
$tarifText = 'Tarif unitaire à la ligne de '.$user->priceLine.' euros';
}
//Paramètres
if ( $user->limitFiles!=0 && $user->limitLines!=0 ) {
$tarifText.= ' limité à '.$user->limitFiles.' fichiers et à '.$user->limitLines.' lignes par fichier.';
} elseif ( $user->limitFiles!=0 && $user->limitLines==0 ) {
$tarifText.= ' limité à '.$user->limitFiles.' fichiers';
} elseif ( $user->limitFiles==0 && $user->limitLines!=à ) {
$tarifText.= ' limité à '.$user->limitLines.' lignes par fichier.';
}
$this->view->assign('tarifText', $tarifText);
//List of data to extract
$profilsM = new Application_Model_CiblageEnrichissementProfils();
$sql = $profilsM->select()
->where('login = ?', $user->username)
->where('idClient = ?', $user->idClient);
$result = $profilsM->fetchRow($sql);
if ($result) {
$criteres = json_decode($result['criteres'], true);
require_once 'Scores/Enrichissement.php';
$enrichissement = new Enrichissement();
$data = $enrichissement->getFields();
$profilLabels = array();
foreach ( $data as $key => $item ) {
if (in_array($key, $criteres)) {
$profilLabels[] = $item['label'];
}
}
$profil = new stdClass();
$profil->labels = $profilLabels;
$profil->reference = $result['reference'];
$this->view->assign('profil', $profil);
}
}
/**
* Liste des exportations simple non lié à un ciblage
* Set preferences
*/
public function exportsAction()
public function prefAction()
{
$this->_helper->layout()->disableLayout();
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
//Read prefs table to load actual config
$prefsM = new Application_Model_CiblagePrefs();
$userPrefs = $prefsM->find($user->username);
if ($userPrefs) {
$data = json_decode($userPrefs->current()->json, true);
} else {
$data = array('interface'=>array(),'filter'=>array());
$prefsM->insert(array('login'=>$user->username, 'json'=>json_encode($data)));
}
$request = $this->getRequest();
$sendParam = $request->getParams();
$prefsFilter = array('rncs');
$prefsInterface = array('insee');
$filter = array();
foreach ( $prefsFilter as $item ) {
if (array_key_exists($item, $sendParam)) {
$filter = array($item => $sendParam[$item]);
}
}
if (array_key_exists('filter', $data)) {
$filter = array_merge($data['filter'], $filter);
}
$data['filter'] = $filter;
$interface = array();
foreach ( $prefsInterface as $item ) {
if (array_key_exists($item, $sendParam)) {
$interface = array($item => $sendParam[$item]);
}
}
if (array_key_exists('interface', $data)) {
$interface = array_merge($data['interface'], $interface);
}
$data['interface'] = $interface;
$newjson = json_encode($data);
$nbRow = $prefsM->update(array('json'=>$newjson), "login='".$user->username."'");
//Don't forget to save new preferences in session
$this->view->assign('nbRow', $nbRow);
}
}

View File

@ -6,47 +6,47 @@ class EnrichissementController extends Zend_Controller_Action
$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('/libs/form/jquery.form.min.js', 'text/javascript');
$this->view->headScript()->appendFile('/themes/default/scripts/jqueryprogressbar.js', 'text/javascript');
$this->view->assign('filesize', ini_get('upload_max_filesize'));
$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';
$c = Zend_Registrey::get('config');
$path = realpath($c->profil->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
*/
@ -54,15 +54,306 @@ class EnrichissementController extends Zend_Controller_Action
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$request = $this->getRequest();
$request = $this->getRequest();
$key = $request->getParam('key', '');
if (!empty($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()
{
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$idCriteres = $request->getParam('id', null);
$idProfil = $request->getParam('profil', null);
$ref = $request->getParam('ref');
//Si forfait check si le montant restant est suffisant
//Identifiant comptage
$comptage = new Application_Model_CiblageComptages();
$sql = $comptage->select()->where('idDefinition = ?', $idCriteres);
$result = $comptage->fetchRow($sql);
$idComptage = $result['id'];
//Récupération des critères du ciblage
$criteresM = new Application_Model_CiblageCriteres();
$criteresRow = $criteresM->find($idCriteres);
$criteres = $criteresRow->current();
$structure = json_decode($criteres->criteres, true);
//Informations utilisateur
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
//Récupération des SIRET
require_once 'Scores/Ciblage.php';
$ciblage = new Ciblage($structure, $user->globalRNCS);
$infosExtraction = $ciblage->execute(true);
/*
* @todo :
* Vérifier le nombre d'éléments avec le nombre de ligne
*
*
*/
//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' => $ref,
'idCriteres' => $criteres->id,
'idProfil' => $idProfil,
'identifiants' => json_encode($infosExtraction),
'idProfil' => $idProfil,
'fichier' => '',
'nbLigneTotales' => count($infosExtraction),
'nbLigneTraites' => 0,
'uniteInsee' => $result['uniteInsee'],
'error' => '',
'dateAdded' => date('YmdHis'),
);
$identifiantsM = new Application_Model_CiblageEnrichissementIdentifiants();
$idIdentifiant = $identifiantsM->insert($data);
//@todo : ajouter la valeur (prix) du fichier au compteur global afin de décompter du forfait
$this->view->assign('ref', $ref);
}
/**
* Demande de référence pour l'enrichissement
*/
public function referenceAction()
{
//Constantes
$resultatMax = 50000;
$redevanceInsee = 3.295/100;
$redevanceInseeMax = 52734; //Seuil de facturation 52 734 euros
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$selectprofil = $request->getParam('profil', 'default');
//Récupération du profil de l'utilisateur
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
//Other profil for this login ?
$profilsM = new Application_Model_CiblageEnrichissementProfils();
$sql = $profilsM->select()
->from($profilsM, array('id', 'reference', 'criteres'))
->where('actif=1')
->where('login=?', $user->username);
$profils = $profilsM->fetchAll($sql)->toArray();
$profilId = 0;
foreach($profils as $item) {
if ($selectprofil == $item['id']) {
$profilId = $item['id'];
}
if ($item['reference']=='default') {
$defaultProfilId = $item['id'];
}
}
if ($profilId == 0) {
$profilId = $defaultProfilId;
}
Zend_Registry::get('firebug')->info($profilId);
if ( count($profils)>0 ) {
$this->view->assign('profil', $profilId);
$idCritere = $request->getParam('id', null);
$comptagesM = new Application_Model_CiblageComptages();
$sql = $comptagesM->select()
->where('idDefinition = ?', $idCritere)
->order('dateAjout DESC')
->limit(1);
$comptages = $comptagesM->fetchAll($sql);
$criteresM = new Application_Model_CiblageCriteres();
$criteres = $criteresM->find($idCritere)->current();
$criteresValue = json_decode($criteres->criteres, true);
if ( $comptages->count()>0 ) {
$item = $comptages[0];
$date = explode(' ', $item->dateAjout);
$date = $date[0];
if($date != '0000-00-00' && $date != date('Y-m-d')) {
require_once 'Scores/Ciblage.php';
$count = new Ciblage($criteresValue);
$item['resultat'] = $count->execute();
$item['uniteInsee'] = $count->calculRedevanceInsee();
}
$this->view->assign('resultat', $item['resultat']);
$this->view->assign('uniteInsee', $item['uniteInsee']);
// --- Calcul du prix
//@todo : Si le client a déjà payé la redevance INSEE
$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.";
}
$this->view->prixInsee = round($prixInsee, 2);
$this->view->infoInsee = $infoInsee;
$prix = round($item['resultat'] * $user->priceLine + $prixInsee, 2);
// --- Dépassement du nombre d'unité max à enrichir
if ( $item['resultat'] > $resultatMax ) {
$this->view->assign('resultatOver', true);
}
// --- Pas de forfait
elseif ( $user->forfait == 0 ) {
// --- Fichier illimité (avec nombre de lignes max définies)
if ( $user->limitFiles == 0 ) {
// --- Nombres de lignes dépassées
if ( $item['resultat'] > $user->limitLines ) {
$this->view->assign('resultatOver', 'lines');
}
}
// --- Fichier limité (avec nombre de lignes définies)
elseif ( $user->limitFiles > 0 ) {
// --- Nombres de lignes dépassées
if ( $user->limitLines != 0 && $item['resultat'] > $user->limitLines ) {
$this->view->assign('resultatOver', 'lines');
} else {
// --- Nombre de fichier dépassés
$dateBegin = $user->dateContrat;
$dateEnd = date('Y-m-d H:i:s', mktime(0,0,0,substr($user->dateContrat,5,2)+$user->periodContrat, substr($user->dateContrat,8,2), substr($user->dateContrat,0,4)));
try {
$commandesM = new Application_Model_CiblageEnrichissementIdentifiants();
$sql = $commandesM->select()->setIntegrityCheck(false)
->from( array('commande' => 'enrichissement_identifiants'), array('id'))
->join( array('critere' => 'ciblage_criteres'), 'critere.id = commande.idCriteres', array())
->where("dateAdded BETWEEN '".$dateBegin."' AND '".$dateEnd."'")
->where('idClient = ?', $user->idClient);
$result = $commandesM->fetchAll($sql);
} catch (Zend_Db_Exception $e) {
echo "Erreur."; /*echo $sql->__toString();*/ exit;
}
if ( count($result)+1 > $user->limitFiles) {
$this->view->assign('resultatOver', 'files');
}
$result = $commandesM->fetchAll($sql);
if ( $result->count()+1 > $user->limitFiles) {
$this->view->assign('resultatOver', 'files');
}
}
}
}
// --- Forfait - Liste des commandes et calcul
else {
if ( $user->priceLine != 0 ) {
$dateBegin = $user->dateContrat;
$dateEnd = date('YmdHis', mktime(0,0,0,substr($user->dateContrat,5,2)+$user->periodContrat,
substr($user->dateContrat,8,2), substr($user->dateContrat,0,4)));
$commandesM = new Application_Model_CiblageEnrichissementIdentifiants();
$sql = $commandesM->select()->setIntegrityCheck(false)
->from( array('commande' => 'enrichissement_identifiants'), array(
'SUM(nbLigneTotales) as total', 'SUM(uniteInsee) as insee'))
->join( array('critere' => 'ciblage_criteres'), 'critere.id = commande.idCriteres', array())
->where("dateAdded BETWEEN '".$dateBegin."' AND '".$dateEnd."'")
->where('idClient = ?', $user->idClient);
$result = $commandesM->fetchRow($sql);
if ($result) {
$total = $result['total'];
$insee = $result['insee'];
$conso = round($total * $user->priceLine + $insee * $redevanceInsee, 2);
}
$this->view->forfaitRemain = $user->forfait - $conso - $prix;
$this->view->Paiement = 'LINE';
} else {
$this->view->Paiement = 'FORFAIT';
}
}
$this->view->prix = $prix;
$this->view->id = $item['id'];
$this->view->ref = $criteres->reference.'-'.uniqid();
}
}
}
public function downloadAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$auth = Zend_Auth::getInstance();
$identity = $auth->getIdentity();
$id = $this->getRequest()->getParam('id');
/*
* Do not download file that not own by the user
* List profil
*/
$profilM = new Application_Model_CiblageEnrichissementProfils();
$sql = $profilM->select()
->from($profilM, array('id'))
->where('login=?',$identity->username);
$profils = $profilM->fetchAll($sql);
if ( $profils->count()>0 ) {
$profilList = array();
foreach ( $profils->toArray() as $item ) {
$profilList[] = $item['id'];
}
}
/*
* List finish file
*/
$table = new Application_Model_CiblageEnrichissementIdentifiants();
$sql = $table->select()
->where('idProfil IN('.join(',', $profilList).')')
->where('id = ?', $id);
$result = $table->fetchRow($sql);
if(!empty($result)) {
$result = $result->toArray();
$date = substr($result['dateAdded'],0,4).substr($result['dateAdded'],5,2);
$c = Zend_Registry::get('config');
$path = $c->profil->path->data.'/'.$date.'/';
$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,42 @@
<?php
class ErreurController extends Zend_Controller_Action
{
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,42 @@ 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;
}
$auth = Zend_Auth::getInstance();
$identity = $auth->getIdentity();
//Envoyer les erreurs par mail
$message = '';
$message.= 'Erreur Applicative : ';
$message.= "\n";
$message.= 'Message : '.$errors->exception->getMessage();
$message.= "\n";
$message.= 'Utilisateur : '.$identity->username;
$message.= "\n";
$message.= "File :".$errors->exception->getFile().", Ligne : ".$errors->exception->getLine();
$message.= "\n";
$message.= "Detail :\n".$errors->exception->getTraceAsString();
$message.= "\n\n";
$message.= "Request Parameters :\n ".print_r($this->getRequest()->getParams(), true)."\n";
$message.= "Referer : ".$_SERVER['HTTP_REFERER']."\n";
$c = Zend_Registry::get('config');
require_once 'Scores/Mail.php';
$mail = new Mail();
$mail->setSubject('[ERREUR APPLICATIVE] - '.$c->profil->server->name.' -'.date('Ymd'));
$mail->setBodyTexte($message);
$mail->setFrom('supportdev');
$mail->addToKey('supportdev');
$mail->send();
// Log exception, if logger available
if ($log = $this->getLog()) {
$log->crit($this->view->message, $errors->exception);
@ -33,7 +62,7 @@ class ErrorController extends Zend_Controller_Action
$this->view->request = $errors->request;
}
public function getLog()
{
$bootstrap = $this->getInvokeArg('bootstrap');

View File

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

View File

@ -0,0 +1,246 @@
<?php
class FieldsController extends Zend_Controller_Action
{
/**
* Display fields
*/
public function indexAction()
{
$this->view->headScript()
->appendFile('/libs/tree/jquery.jstree.js', 'text/javascript')
->appendFile('/themes/default/scripts/fields.js', 'text/javascript');
$field = new Scores_Fields();
$this->view->fields = $field;
}
/**
* Reset criteres by family
*/
public function resetAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender();
$request = $this->getRequest();
$family = $request->getParam('family');
if ( !empty($family) )
{
$fields = new Scores_Fields();
$fields->resetFamille($family);
}
}
/**
* Manage autocomplete
*/
public function autocompleteAction()
{
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$name = $request->getParam('name');
$q = strtolower($request->getParam('q'));
$output = array();
switch ($name) {
case 'ape_etab':
case 'ape_entrep':
/**
* @todo : Ajouter la recherche par code
*/
$queries = explode(' ', $q);
$separator = ' , ';
$table = new Application_Model_CiblageNaf();
$sql = $table->select();
if (count($queries)>0) {
$where = '';
$i = 0;
foreach ($queries as $item) {
$i++;
if (empty($where)) {
$op = 'LIKE ';
} elseif ($i < count($queries)) {
$op = ' OR ';
}
if (strlen($item)>2) {
$where.= $op.'"%'.strtolower($item).'%"';
}
}
$sql->where("LOWER(lib) ".$where);
}
$sql->where('niveau = 5');
$result = $table->fetchAll($sql);
foreach ($result as $item) {
$output[] = array(
'label' => $item->lib . $separator . $item->code,
'value' => $item->code
);
}
break;
case 'geo':
//Replace characters ' and - in space
$q = preg_replace("/['-]/", ' ', $q);
//Remove characters
$q = preg_replace("/^[a-z]\s/i", '', $q);
//Detect if we have string
if ( preg_match("/[a-zA-Z]+/", $q) )
{
$queries = explode(' ', $q);
Zend_Registry::get('firebug')->info($queries);
//Région
$table = new Application_Model_CiblageRegions();
$sql = $table->select();
if (count($queries)>0) {
$where = '';
$i = 0;
foreach ($queries as $item) {
$i++;
if (empty($where)) {
$op = 'LIKE ';
} else {
$op = ' OR ';
}
if (strlen($item)>2) {
$where.= $op.'"%'.strtolower($item).'%"';
}
}
$sql->where("LOWER(NC) ".$where);
}
$result = $table->fetchAll($sql);
foreach ($result as $item) {
$output[] = array(
'label' => $item->NCCENR . ' (Région)',
'value' => 'R'.$item->REGION
);
}
//Département
$table = new Application_Model_CiblageDepartements();
$sql = $table->select();
if (count($queries)>0) {
$where = '';
$i = 0;
foreach ($queries as $item) {
$i++;
if (empty($where)) {
$op = 'LIKE ';
} else {
$op = ' OR ';
}
if (strlen($item)>2) {
$where.= $op.'"%'.strtolower($item).'%"';
}
}
$sql->where("LOWER(libdep) ".$where);
}
$result = $table->fetchAll($sql);
foreach ($result as $item) {
$output[] = array(
'label' => $item->libdep . ' (Département)',
'value' => 'D'.$item->numdep
);
}
//Ville
$table = new Application_Model_CiblageCodePostaux();
$sql = $table->select();
if (count($queries)>0) {
$where = '';
$i = 0;
foreach ($queries as $item) {
$i++;
if (empty($where)) {
$op = 'LIKE ';
} else {
$op = ' OR ';
}
if (strlen($item)>2) {
$where.= $op.'"%'.strtolower($item).'%"';
}
}
$sql->where("LOWER(Commune) ".$where);
}
$result = $table->fetchAll($sql);
foreach ($result as $item) {
$output[] = array(
'label' => $item->Commune . ', '. $item->Codepos .' (Ville)',
'value' => 'C'.$item->INSEE
);
}
} elseif ( preg_match('/[0-9]{1,5}/', $q) ) {
//Code Département
if (strlen($q)==2) {
$table = new Application_Model_CiblageDepartements();
$sql = $table->select()->where('numdep=?', $q);
$result = $table->fetchAll($sql);
foreach ($result as $item) {
$output[] = array(
'label' => $item->libdep . ' (Département)',
'value' => 'D'.$item->numdep
);
}
}
//Code Postal
$table = new Application_Model_CiblageCodePostaux();
$sql = $table->select()->where('Codepos LIKE "'.$q.'%"');
$result = $table->fetchAll($sql);
foreach ($result as $item) {
$output[] = array(
'label' => $item->Commune . ', '. $item->Codepos .' (Ville)',
'value' => 'C'.$item->INSEE
);
}
}
break;
case 'cj':
$table = new Application_Model_CiblageFormeJuridique();
$separator = ' , ';
$sql = $table->select();
$queries = explode(' ', $q);
if (count($queries)>0) {
$where = '';
$i = 0;
foreach ($queries as $item) {
$i++;
if (empty($where)) {
$op = 'LIKE ';
} else {
$op = ' OR ';
}
if (strlen($item)>3) {
$where.= $op.'"%'.strtolower($item).'%"';
}
}
$sql->where('LOWER(fjLibelle) '.$where);
}
$sql->where('LENGTH(fjCode) = 4');
$result = $table->fetchAll($sql);
foreach ($result as $item) {
$output[] = array(
'label' => $item->fjLibelle . $separator . $item->fjCode,
'value' => $item->fjCode
);
}
break;
}
//No results
if (count($output) == 0) {
$output[] = array('label' => 'Aucun résultat.', 'value' => '');
}
$this->view->assign('output', $output);
}
public function checkvalue(){}
}

View File

@ -0,0 +1,591 @@
<?php
class GestionController extends Zend_Controller_Action
{
protected $dbMetier;
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');
//Get Database
$c = Zend_Registry::get('config');
try {
$this->dbMetier = Zend_Db::factory($c->profil->db->jo);
} catch ( Exception $e ) {
}
}
/**
* Display all links
*/
public function indexAction()
{
}
/**
* Display profils to get data
* Filter with login and idClient
*
*/
public function profilsAction()
{
$request = $this->getRequest();
$login = $request->getParam('login', '');
$idClient = $request->getParam('idClient', null);
$profilsM = new Application_Model_CiblageEnrichissementProfils();
$sql = $profilsM->select()
->from($profilsM, array('id', 'idClient', 'login', 'reference', 'tarifLigne', 'dateAjout', 'dateSuppr', 'actif'));
if ( !empty($login) ) {
$sql->where('login = ?', $login.'%');
}
if ( $idClient!=null ) {
$sql->where('idClient = ?', $idClient);
}
$profils = $profilsM->fetchAll($sql);
if ( count($profils)>0 ) {
$clientM = new Application_Model_Sdv1Clients();
$i = 0;
foreach ($profils as $profil) {
$infoClient = $clientM->find($profil->idClient);
$profils[$i]->nom = $infoClient->nom;
$i++;
}
}
$this->view->assign('profils', $profils);
}
/**
* Define fields for extraction to user
*/
public function profiladdAction()
{
$request = $this->getRequest();
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
//Sauvegarde du formulaire
if ( $request->isPost() )
{
$params = $request->getParams();
if ($params['reference']=='default') {
//Get default profil
$profilClientM = new Application_Model_CiblageCustomerParams();
$sql = $profilClientM->select()->where('idClient=?',$request->getParam('idClient'));
$profilClient = $profilClientM->fetchRow($sql);
if ( null !== $profilClient ) {
$params['criteres'] = json_decode($profilClient->criteres,true);
}
}
if (empty($params['criteres'])) {
$this->view->assign('message', "Erreur profil vide");
} else {
$data = array(
'idClient' => $params['idClient'],
'service' => $params['service'],
'login' => $params['login'],
'reference' => $params['reference'],
'criteres' => json_encode($params['criteres']),
'dataInsee' => 0,
'dateAjout' => date('Y-m-d H:i:s'),
'actif' => 1,
);
$profilM = new Application_Model_CiblageEnrichissementProfils();
if ( $profilM->insert($data) ) {
$this->view->assign('message', "Profil enregistré");
$this->view->assign('disableForm', true);
} else {
$this->view->assign('message', "Erreur lors de la sauvegarde");
}
}
}
//Affichage du formulaire
require_once 'Scores/Enrichissement.php';
$fieldsM = new Enrichissement();
$allFields = $fieldsM->getFields();
$this->view->assign('fields', $allFields);
}
/**
* Mark profil as deleted
*/
public function profildelAction()
{
}
/**
* List commands which must be done
*/
public function commandesAction()
{
$request = $this->getRequest();
$month = $request->getParam('month', date('m'));
$year = $request->getParam('year', date('Y'));
$this->view->assign('month', $month);
$this->view->assign('year', $year);
$commandesM = new Application_Model_CiblageEnrichissementIdentifiants();
$sql = $commandesM->select()->setIntegrityCheck(false)
->from('enrichissement_identifiants AS e', array(
'e.id',
'e.reference AS commandeReference',
'e.nbLigneTotales',
'e.uniteInsee',
"DATE_FORMAT(e.dateAdded, '%Y/%m/%d %H:%i:%s') AS dateAdded"
))
->join('ciblage_criteres', 'idCriteres = ciblage_criteres.id', array(
'ciblage_criteres.reference AS critereReference',
'ciblage_criteres.login',
))
->where('e.dateStart = ?', "0000-00-00 00:00:00")
->where('fichier = ""')
->where("e.dateAdded LIKE '".$year."-".$month."%'")
->order('e.dateAdded DESC');
$this->view->commandes = $commandesM->fetchAll($sql)->toArray();
}
/**
* List commands with a file
*/
public function enrichissementsAction()
{
$request = $this->getRequest();
$month = $request->getParam('month', date('m'));
$year = $request->getParam('year', date('Y'));
$this->view->assign('month', $month);
$this->view->assign('year', $year);
$commandesM = new Application_Model_CiblageEnrichissementIdentifiants();
$sql = $commandesM->select()->setIntegrityCheck(false)
->from('enrichissement_identifiants AS e', array(
'e.id',
'e.reference AS commandeReference',
'e.nbLigneTotales',
'e.uniteInsee',
"DATE_FORMAT(e.dateAdded, '%Y/%m/%d %H:%i:%s') AS dateAdded",
"DATE_FORMAT(e.dateStart, '%Y/%m/%d %H:%i:%s') AS dateStart",
'e.fichier'
))
->join('ciblage_criteres', 'idCriteres = ciblage_criteres.id', array(
'ciblage_criteres.reference AS critereReference',
'ciblage_criteres.login',
))
->where('fichier != ""')
->where("e.dateAdded LIKE '".$year."-".$month."%'")
->order('e.dateAdded DESC');
$this->view->commandes = $commandesM->fetchAll($sql)->toArray();
}
/**
* Téléchargement des fichiers créer par les clients pour analyse
*/
public function enrichissementdlAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$auth = Zend_Auth::getInstance();
$identity = $auth->getIdentity();
$id = $this->getRequest()->getParam('id');
$table = new Application_Model_CiblageEnrichissementIdentifiants();
$sql = $table->select()
->where('id = ?', $id);
$result = $table->fetchRow($sql);
if( !empty($result) ) {
$result = $result->toArray();
$date = substr($result['dateAdded'],0,4).substr($result['dateAdded'],5,2);
$c = Zend_Registry::get('config');
$path = $c->profil->path->data.'/'.$date.'/';
$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.';
}
}
/**
* Load enrichissement batch to complete data
*/
public function enrichitAction()
{
$request = $this->getRequest();
$id = $request->getParam('id');
exec('php '.APPLICATION_PATH.'/../scripts/jobs/enrichissement.php --id '.$id.' &');
}
/**
* Extract only SIRETs from database
* @todo : To csv file
*/
public function extractAction()
{
$id = $this->getRequest()->getParam('id');
$table = new Application_Model_CiblageEnrichissementIdentifiants();
$sql = $table->select()->where('idComptage = ?', $id);
$result = $table->fetchRow($sql);
if(!empty($result)) {
$result = $result->toArray();
$sirets = json_decode($result['identifiants'], true);
$content = '';
foreach($sirets as $siret) {
$content.= $siret.",";
}
$this->view->assign('content', $content);
}else {
$this->view->assign('message', 'Aucune commande d\'enrichissement sur ce comptage');
}
}
/**
* List criteres and the last count
*/
public function ciblagesAction()
{
$request = $this->getRequest();
$month = $request->getParam('month', date('m'));
$year = $request->getParam('year', date('Y'));
$this->view->assign('month', $month);
$this->view->assign('year', $year);
$comptagesM = new Application_Model_CiblageComptages();
$sql = $comptagesM->select()->setIntegrityCheck(false)
->from('ciblage_comptages', array(
'ciblage_comptages.idDefinition',
'ciblage_comptages.resultat',
'ciblage_comptages.uniteInsee',
"DATE_FORMAT(ciblage_comptages.dateAjout, '%Y/%m/%d %H:%i:%s') as dateAjout"
))
->join('ciblage_criteres', 'ciblage_comptages.idDefinition = ciblage_criteres.id', array('ciblage_criteres.reference'))
->order('ciblage_comptages.dateAjout DESC')
->group('ciblage_criteres.id')
->where("ciblage_comptages.dateAjout LIKE '".$year."-".$month."%'")
->order('ciblage_comptages.dateAjout DESC');
$comptages = $comptagesM->fetchAll($sql)->toArray();
Zend_Registry::get('firebug')->info($comptages);
$this->view->comptages = $comptages;
}
/**
* Affichage des critères du ciblage
*/
public function ciblagecriteresAction()
{
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$id = $request->getParam('id');
//Lecture des paramètres du ciblage
$criteresM = new Application_Model_CiblageCriteres();
$sql = $criteresM->select()
->where('id = ?', $id);
$criteres = $criteresM->fetchRow($sql)->toArray();
$decodeCriteres = json_decode($criteres['criteres'], true);
$fields = new Scores_Fields();
//Construction affichage des critères
foreach ( $decodeCriteres as $key => $item ) {
$inValue = $fields->getValueLabel($key, $item['in']);
$exValue = $fields->getValueLabel($key, $item['ex']);
//Add label to struct for display
$infosCriteres[] = array(
'label' => $fields->getLabel($key),
'in' => $inValue,
'ex' => $exValue,
);
}
$this->view->criteres = $infosCriteres;
}
/**
* List customers
*/
public function customerparamsAction()
{
//@todo : what's in database
$customersM = new Application_Model_CiblageCustomerParams();
$sql = $customersM->select()
->from($customersM,array('idClient', 'service' , 'dateContrat', 'periodContrat'))
->order('dateAdded DESC')
->group('idClient');
$customers = $customersM->fetchAll($sql)->toArray();
//List login
$customerlist = array();
$profilsM = new Application_Model_CiblageEnrichissementProfils();
$clientM = new Application_Model_Sdv1Clients();
foreach($customers as $item) {
$sql = $profilsM->select()
->from($profilsM, array('login'))
->where('idClient=?',$item['idClient']);
$result = $profilsM->fetchAll($sql)->toArray();
$logins = array();
if (count($result)>0) {
foreach($result as $login) {
$logins[] = $login['login'];
}
}
$item['logins'] = $logins;
$sql = $clientM->select()->where('id=?', $item['idClient']);
$result = $clientM->fetchRow($sql);
$item['nom'] = $result->nom;
$customerlist[] = $item;
}
$this->view->assign('customerlist', $customerlist);
}
/**
* List customer's params
*/
public function customerparamAction()
{
//Fields
require_once 'Scores/Enrichissement.php';
$fieldsM = new Enrichissement();
$allFields = $fieldsM->getFields();
$this->view->assign('fields', $allFields);
$request = $this->getRequest();
$idClient= $request->getParam('idClient', null);
$this->view->assign('idClient', $idClient);
if ($idClient !== null) {
$paramsM = new Application_Model_CiblageCustomerParams();
$sql = $paramsM->select()->where('idClient = ?', $idClient);
$params = $paramsM->fetchRow($sql);
$infos = null;
if ($params!==null){
$infos = $params->toArray();
$clientM = new Application_Model_Sdv1Clients();
$sql = $clientM->select()->where('id=?', $idClient);
$result = $clientM->fetchRow($sql);
$infos['nom'] = $result->nom;
$infos['criteres'] = json_decode($infos['criteres'], true);
}
$this->view->assign('infos',$infos);
$loginsM = new Application_Model_CiblageEnrichissementProfils();
$sql = $loginsM->select()->where('idClient = ?', $idClient);
$logins = $loginsM->fetchAll($sql)->toArray();
$this->view->assign('logins', $logins);
}
}
public function customerparamaddAction()
{
//Fields
require_once 'Scores/Enrichissement.php';
$fieldsM = new Enrichissement();
$allFields = $fieldsM->getFields();
$this->view->assign('fields', $allFields);
$request = $this->getRequest();
//Sauvegarde du formulaire
if ( $request->isPost() && in_array($request->getParam('submit'), array('Enregistrer','Modifier')) ) {
$params = $request->getParams();
//Vérifier le formulaire
$errForm = 0;
foreach ( $params as $key => $value ) {
if ($value=='' && $key!='service') {
$errForm++;
}
}
if (!$errForm) {
$checkValues = array(
'filterRNCS' => 0,
'licenceINSEE' => 0,
'immediatExtract' => 0,
);
foreach ($checkValues as $key => $value) {
if (!array_key_exists($key, $params)) {
$params[$key] = $value;
}
}
$data = array(
'idClient' => $params['idClient'],
'service' => $params['service'],
'filterRNCS' => $params['filterRNCS'],
'licenceINSEE' => $params['licenceINSEE'],
'immediatExtract' => $params['immediatExtract'],
'dateContrat' => $params['dateContrat'],
'periodContrat' => $params['periodContrat'],
'periodPaiement' => $params['periodPaiement'],
'priceLine' => $params['priceLine'],
'forfait' => $params['forfait'],
'limitLines' => $params['limitLines'],
'limitFiles' => $params['limitFiles'],
'criteres' => json_encode($params['criteres']),
'dateAdded' => date('Y-m-d H:i:s'),
);
if ($request->getParam('submit')=='Modifier') {
//Overwrite default profil for each login
try {
$profilM = new Application_Model_CiblageEnrichissementProfils();
$profilM->update(array(
'criteres' => json_encode($params['criteres'])
), "reference='default' AND idClient=".$params['idClient']);
} catch ( Zend_Db_Adapter_Exception $e) {
Zend_Registry::get('firebug')->info($e->getMessage());
}
//Set parameters
try {
$customerParamsM = new Application_Model_CiblageCustomerParams();
$customerParamsM->update($data, 'id='.$params['id']);
$this->view->assign('message', "Profil enregistré");
} catch ( Zend_Db_Adapter_Exception $e) {
Zend_Registry::get('firebug')->info($e->getMessage());
$this->view->assign('message', "Erreur lors de la sauvegarde");
}
} else {
//Set parameters
$customerParamsM = new Application_Model_CiblageCustomerParams();
if ( $customerParamsM->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");
}
} else {
$idClient = $request->getParam('idClient', null);
$clientM = new Application_Model_Sdv1Clients();
$sql = $clientM->select()->where('actif=?',1);
$selectClient = $clientM->fetchAll($sql);
$this->view->assign('selectClient',$selectClient);
if ($idClient !== null) {
$paramsM = new Application_Model_CiblageCustomerParams();
$sql = $paramsM->select()->where('idClient = ?', $idClient);
$params = $paramsM->fetchRow($sql);
if ( $params!==null ) {
foreach ( $params as $key => $value ) {
switch ( $key ) {
case 'criteres':
$this->view->assign($key, json_decode($value,true));
break;
case 'dateContrat':
$this->view->assign($key, substr($value,0,10));
break;
default:
$this->view->assign($key, $value);
break;
}
}
}
} else {
$this->view->assign('filterRNCS', 1);
$this->view->assign('licenceINSEE', 0);
$this->view->assign('immediatExtract', 0);
$this->view->assign('limitLines', 50000);
$this->view->assign('limitFiles', 0);
}
}
}
public function consoAction()
{
$request = $this->getRequest();
$idClient= $request->getParam('idClient', null);
$this->view->assign('idClient', $idClient);
// --- Contrat
$paramsM = new Application_Model_CiblageCustomerParams();
$sql = $paramsM->select()->where('idClient = ?', $idClient);
$params = $paramsM->fetchRow($sql);
$contratDebut = new Zend_Date($params->dateContrat, 'yy-MM-dd');
$contratFin = new Zend_Date($params->dateContrat, 'yy-MM-dd');
$contratFin->addMonth($params->periodContrat)->subDay(1);
$this->view->ContratDateDebut = $contratDebut->toString('yyyy-MM-dd');
$this->view->ContratDateFin = $contratFin->toString('yyyy-MM-dd');
// --- Création du tableau pour la consomation
// --- Recherche tous les idProfil - login
// --- Recherche des fichiers pour chaque id
}
}

View File

@ -1,72 +1,112 @@
<?php
class IndexController extends Zend_Controller_Action
{
public function init(){}
public function indexAction()
{
$auth = Zend_Auth::getInstance();
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('./');
}
}
}
public function criteresAction()
{
$ajax = $this->getRequest()->getParam('ajax');
if($ajax)
$this->_helper->layout()->disableLayout();
$fields = new Scores_Fields();
$infosCriteres = array();
$decodeCriteres = $fields->getCriteres();
//Construction affichage des critères
foreach ( $decodeCriteres as $key => $item ) {
$inValue = $fields->getValueLabel($key, $item['in']);
$exValue = $fields->getValueLabel($key, $item['ex']);
$infosCriteres[$key] = array(
'label' => $fields->getLabel($key),
'in' => $inValue,
'ex' => $exValue,
);
}
$this->view->infos = $infosCriteres;
}
public function criterelistAction()
{
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$critere = $request->getParam('key');
$fields = new Scores_Fields();
$values = $fields->getCritere($critere);
$this->view->assign('critereName', $critere);
//Inclusion
if (count($values['in'])>0) {
$inLabels = $fields->getValueLabel($critere, $values['in']);
$inValues = array_values($values['in']);
$this->view->assign('inLabels', $inLabels);
$this->view->assign('inValues', $inValues);
}
//Exclusion
if (count($values['ex'])>0) {
$exLabels = $fields->getValueLabel($critere, $values['ex']);
$exValues = array_values($values['ex']);
$this->view->assign('exLabels', $exLabels);
$this->view->assign('exValues', $exValues);
}
}
public function removeAction()
{
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$nameCritereToDelete = $request->getParam('critere');
$posInList = $request->getParam('in', false);
$posExList = $request->getParam('ex', false);
$fields = new Scores_Fields();
if ($posInList!==false) {
$fields->unsetCritereValue($nameCritereToDelete, $posInList);
} elseif ($posExList!==false) {
$fields->unsetCritereValue($nameCritereToDelete, $posExList, true);
} else {
$fields->unsetCritere($nameCritereToDelete);
}
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
//Comptage
require_once 'Scores/Ciblage.php';
$ciblage = new Ciblage($fields->getValues(), $user->globalRNCS);
$total = $ciblage->execute();
$fields->setNb('total', $total);
if ($user->preferences['interface']['insee']==1) {
$insee = $ciblage->calculRedevanceInsee();
} else {
$insee = null;
}
$fields->setNb('insee', $insee);
$fields->setCritereSession();
$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

@ -0,0 +1,38 @@
<?php
Class UploadController extends Zend_Controller_Action
{
protected $path;
protected $extensions;
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

@ -1,91 +1,89 @@
<?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
* Gestion de l'authentification
*/
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');
}
}
public function loginAction()
{
$this->view->inlineScript()
->appendFile('/libs/jquery/jquery-1.10.1.min.js')
->appendFile('/libs/jquery/jquery.infieldlabel.min.js');
//@todo : gestion des affichages particuliers pour les clients
$this->view->headTitle()->append('Connexion');
$form = new Application_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 {
$this->_redirect('/');
}
}
}
$this->_helper->layout()->disableLayout();
}
/**
* 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);
$ajax = $request->getParam('ajax', 0);
$this->view->assign('ajax', $ajax);
$refresh = 5;
$url = 'http://'.$_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'].$this->view->url(array(
'controller' => 'user',
'action' => 'login',
), null, true);
$this->view->assign('url', $url);
if (!$ajax) {
$this->view->assign('refresh', $refresh);
$this->view->headMeta()->appendHttpEquiv('refresh', $refresh.'; url='.$url);
}
}
/**
* Changer la langue de l'utilisateur
*/
public function langAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$lang = $this->getRequest()->getParam('lang', null);
$auth = Zend_Auth::getInstance();
$identity = $auth->getIdentity();
$identity->langtmp = $lang;
$auth->getStorage()->write($identity);
}
}

BIN
application/languages/en.mo Normal file

Binary file not shown.

1908
application/languages/en.po Normal file

File diff suppressed because it is too large Load Diff

BIN
application/languages/fr.mo Normal file

Binary file not shown.

2341
application/languages/fr.po Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,27 @@
<?php
//Home
$this->translate('Accueil');
$this->translate('Préambule');
$this->translate('Ajouter un profil');
$this->translate('Désactiver');
$this->translate('Ajouter un login avec le profil du client');
$this->translate('Type d\'établissement');
$this->translate('Sièges');
$this->translate('Oui');
$this->translate('Non');
$this->translate('au');
$this->translate('Appartient à un groupe');
$this->translate('Téléphone renseigné');
$this->translate('Télécopie renseignée');
$this->translate('Site Web renseigné');
$this->translate('Email de contact renseigné');
$this->translate('Etablissement présent au RNCS');
$this->translate('Adresse de domiciliation');
$this->translate('Nom du principal dirigeant présent');
$this->translate('Date de création de l\'établissement');
$this->translate('Présence de participations');
$this->translate('Valider');
$this->translate('Réinitialiser les critères entreprises');
$this->translate('à');
$this->translate('Scores & Décisions SAS');
?>

View File

@ -0,0 +1,6 @@
<?php
class Application_Model_CiblageCodePostaux extends Zend_Db_Table_Abstract
{
protected $_name = 'fields_codepostaux';
protected $_schema = 'ciblage';
}

View File

@ -0,0 +1,6 @@
<?php
class Application_Model_CiblageComptages extends Zend_Db_Table_Abstract
{
protected $_name = 'ciblage_comptages';
protected $_schema = 'ciblage';
}

View File

@ -0,0 +1,6 @@
<?php
class Application_Model_CiblageCriteres extends Zend_Db_Table_Abstract
{
protected $_name = 'ciblage_criteres';
protected $_schema = 'ciblage';
}

View File

@ -0,0 +1,6 @@
<?php
class Application_Model_CiblageCustomerParams extends Zend_Db_Table_Abstract
{
protected $_name = 'customer_params';
protected $_schema = 'ciblage';
}

View File

@ -0,0 +1,6 @@
<?php
class Application_Model_CiblageDepartements extends Zend_Db_Table_Abstract
{
public $_name = 'fields_departements';
protected $_schema = 'ciblage';
}

View File

@ -0,0 +1,6 @@
<?php
class Application_Model_CiblageEnrichissementIdentifiants extends Zend_Db_Table_Abstract
{
protected $_name = 'enrichissement_identifiants';
protected $_schema = 'ciblage';
}

View File

@ -0,0 +1,6 @@
<?php
class Application_Model_CiblageEnrichissementProfils extends Zend_Db_Table_Abstract
{
public $_name = 'enrichissement_profils';
protected $_schema = 'ciblage';
}

View File

@ -0,0 +1,7 @@
<?php
class Application_Model_CiblageFormeJuridique extends Zend_Db_Table_Abstract
{
protected $_name = 'fields_formejuridique';
protected $_primary = 'fjCode';
protected $_schema = 'ciblage';
}

View File

@ -0,0 +1,6 @@
<?php
class Application_Model_CiblageMinMax extends Zend_Db_Table_Abstract
{
protected $_name = 'fields_minmax';
protected $_schema = 'ciblage';
}

View File

@ -0,0 +1,6 @@
<?php
class Application_Model_CiblageNaf extends Zend_Db_Table_Abstract
{
protected $_name = 'fields_naf';
protected $_schema = 'ciblage';
}

View File

@ -0,0 +1,6 @@
<?php
class Application_Model_CiblagePrefs extends Zend_Db_Table_Abstract
{
protected $_name = 'customer_prefs';
protected $_schema = 'ciblage';
}

View File

@ -0,0 +1,7 @@
<?php
class Application_Model_CiblageRegions extends Zend_Db_Table_Abstract
{
protected $_name = 'fields_regions';
protected $_schema = 'ciblage';
}

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,7 +0,0 @@
<?php
class Application_Model_Formejuridique extends Zend_Db_Table_Abstract
{
protected $_name = 'formejuridique';
protected $_primary = 'fjCode';
}

View File

@ -0,0 +1,6 @@
<?php
class Application_Model_JoSpinxIdx extends Zend_Db_Table_Abstract
{
protected $_name = 'sphinx_idx';
protected $_schema = 'jo';
}

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,6 @@
<?php
class Application_Model_Sdv1Clients extends Zend_Db_Table_Abstract
{
protected $_name = 'clients';
protected $_schema = 'sdv1';
}

View File

@ -0,0 +1,13 @@
<?php
class Application_Model_Sdv1Utilisateurs extends Zend_Db_Table_Abstract
{
protected $_name = 'utilisateurs';
protected $_schema = 'sdv1';
protected $_referenceMap = array(
'Reporter' => array(
'columns' => 'idClient',
'refTableClass' => 'Sdv1Clients',
'refColumns' => 'id'
),
);
}

View File

@ -0,0 +1,6 @@
<?php
class Application_Model_Sdv1UtilisateursService extends Zend_Db_Table_Abstract
{
protected $_name = 'utilisateurs_service';
protected $_schema = 'sdv1';
}

View File

@ -1,202 +1,380 @@
<?php
Class Zend_View_Helper_Field extends Zend_View_Helper_Abstract
{
public function Field($name, $field)
class Zend_View_Helper_Field extends Zend_View_Helper_Abstract
{
protected $display = true;
protected $name = '';
public function Field($name)
{
$this->name = $name;
//Read the dico
$fields = new Scores_Fields();
$params = $fields->get($name);
$html = '';
if($field != null) {
$html.= '<div class="fieldgrp">';
$type = $field['type'];
switch($type)
{
case 'select':
$html.= $this->structureHTML(
$field['label'],
$this->selectHTML($name, $field));
break;
case 'selectMultiple':
$html.= $this->structureHTML(
$field['label'],
$this->selectMultipleHTML($name, $field));
break;
case 'intervalSelect':
$html.= $this->structureHTML(
$field['label'],
$this->intervalSelectHTML($name, $field));
break;
case 'interval':
$html.= $this->structureHTML(
$field['label'],
$this->intervalHTML($name, $field));
break;
case 'date':
$html.= $this->structureHTML(
$field['label'],
$this->dateHTML($name, $field));
break;
case 'text':
$html.= $this->structureHTML(
$field['label'],
$this->textHTML($name, $field));
break;
case 'textarea':
$html.= $this->structureHTML(
$field['label'],
$this->textareaHTML($name, $field));
break;
case 'radio':
$html.= $this->structureHTML(
$field['label'],
$this->radioHTML($name, $field));
break;
}
$html.= '</div>';
$label = $labelG = $fields->getLabel($name);
$title = '';
if ( array_key_exists('title', $params) && !empty($params['title']) ) {
$title = $this->view->translate($params['title']);
}
return $html;
}
private function structureHTML($label, $html, $liens = array())
{
//How many type of fields is defined
$nbFields = count($params['fields']);
$display = true;
$out = '';
$out.= $this->structureLabel($label);
$out.= '<div class="field">'.$html.$this->structureLink($liens).'</div>';
//If more than one field exist we need to make a special display
if ( $nbFields > 1) {
$out.= '<div class="fieldgrp clearfix">';
$out.= $this->structureLabel($label);
$out.= '<div class="field">';
foreach ( $params['fields'] as $type => $options )
{
switch ($type) {
case 'tree':
$href = $this->view->url(array('controller' => 'arborescence', 'action' => $options['action'], 'key' => $name));
$out.= '<a class="arborescence" title="'.$options['title'].'" href="'.$href.'">';
$out.= 'Arborescence';
$out.= '</a>';
break;
case 'text':
$out.= '<a class="text" title="'.$options['title'].'" href="#" id="'.$name.'" >';
$out.= 'Recherche';
$out.= '</a>';
break;
case 'list':
$out.= '<a class="dlist" title="'.$options['title'].'" href="#" id="'.$name.'" >';
$out.= 'Liste';
$out.= '</a>';
break;
}
$out.= '&nbsp;';
}
$out.= '</div>';
$out.= '</div>';
//Masquer les champs
$display = false;
}
//Draw fields
foreach ( $params['fields'] as $type => $options )
{
switch($type)
{
case 'select':
$html = $this->selectHTML($name, $options);
break;
case 'selectMultiple':
$html = $this->selectMultipleHTML($name, $options);
break;
case 'intervalSelect':
$html = $this->intervalSelectHTML($name, $options);
break;
case 'checkbox':
$html = $this->checkboxHTML($name, $options);
break;
case 'intervalDate':
$html = $this->intervalDateHTML($name, $options);
break;
case 'interval':
$html = $this->intervalHTML($name, $options);
break;
case 'date':
$html = $this->dateHTML($name, $options);
break;
case 'text':
$html = $this->textHTML($name, $options);
break;
case 'textarea':
$html = $this->textareaHTML($name, $options);
break;
case 'radio':
$html = $this->radioHTML($name, $options);
break;
case 'file':
$html = $this->fileuploadHtml($name, $options);
break;
case 'tree':
//Do nothing
break;
case 'list':
$html = $this->textareaHTML($name, $options);
break;
default:
$html = $this->structureHTML($name, '');
break;
}
$label = $labelG;
if ( array_key_exists('label', $options) ) {
$label = $options['label'];
}
$style = '';
$class = ' class="fieldgrp"';
if ( $display===false ) {
$style = ' style="display:none;"';
}
if ( !empty($title) ) {
$title = ' title="'.$title.'"';
}
$out.= '<div id="field_'.$type.'_'.$this->name.'" '.$class.''.$style.''.$title.'>';
$out.= $this->structureLabel($this->view->translate($label));
$out.= '<div class="field">'.$html.'</div>';
$out.= '</div>';
}
return $out;
}
/**
* Définition du label
* @param unknown_type $label
*/
private function structureLabel($label)
{
return '<label>'.$label.'</label>';
$return = '<label>'.$label.'</label>';
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)) {
//$fields = new Scores_Fields();
//$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)
private function intervalSelectHTML($name, $options)
{
$session = new SessionCiblage();
$session = new Scores_Fields();
$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>';
foreach($options['value'] as $elements) {
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> '.$this->view->translate('à').' ';
$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>';
foreach($options['value'] as $elements) {
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 .= ' <span id="'.$name.'"><a href="" class="intervalSelect" id="'.$name.'">'.$this->view->translate('Valider').'</a></span>';
return ($return);
}
/* Select */
private function selectMultipleHTML($name, $field)
/**
*
* @param unknown_type $name
* @param unknown_type $options
*/
protected function checkboxHTML($name, $options)
{
$session = new SessionCiblage();
$return = '<select class="criteres" name="'.$name.'">';
$return .= '<option value="tous">Tous</option>';
foreach($field['fields'][$field['type']]['value'] as $value => $label) {
$selected = "";
if(($session->getCritere($name) != null) and $session->getCritere($name) == $value)
$selected = " selected";
$return .= '<option'.((!empty($selected))?$selected:null).' value="'.$value.'">'.$label.'</option>';
}
$return .= '</select>';
return ($return);
$session = new Scores_Fields();
$sessionValeur = $session->getCritere($name);
$select = '';
if ($sessionValeur==1) $select = ' checked';
$return = '<input type="checkbox" class="criteres" name="'.$name.'" value="'.$options['value'].'"'.$select.'>';
return $return;
}
/* Select Multiple */
private function selectHTML($name, $field)
/**
*
* @param unknown_type $name
* @param unknown_type $options
* @return string
*/
protected function selectMultipleHTML($name, $options)
{
$session = new SessionCiblage();
$session = new Scores_Fields();
$sessionValeur = $session->getCritere($name);
if(is_array($sessionValeur))
$sessionValeur = implode(',', $sessionValeur);
$return = '<select class="criteres '.$field['type']['class'].'" name="'.$name.'">';
$return .= '<option value="tous">Tous</option>';
foreach($field['fields'][$field['type']]['value'] as $value => $label) {
$return = '<select size="'.count($options['value']).'" class="criteres " name="'.$name.'" multiple>';
foreach($options['value'] as $value => $label) {
$selected = "";
if(($sessionValeur != null) and $sessionValeur == $value)
$selected = " selected";
$return .= '<option'.((!empty($selected))?$selected:null).' value="'.$value.'">'.$label.'</option>';
if( !empty($sessionValeur) ) {
if ( is_array($sessionValeur) && in_array($value, $sessionValeur) ) {
$selected = " selected";
}
}
$return .= '<option'.$selected.' value="'.$value.'">'.$label.'</option>';
}
$return .= '</select>';
return ($return);
$return .= '<a href="#" class="selectMultiple">Sélectionner</a>';
$return .= '&nbsp;<a href="#" class="selectMultipleEx">Exclure</a>';
return $return;
}
/**
*
* @param unknown_type $name
* @param unknown_type $options
* @return string
*/
protected function selectHTML($name, $options)
{
$session = new Scores_Fields();
$sessionValeur = $session->getCritere($name);
if( is_array($sessionValeur) ) {
$sessionValeur = implode(',', $sessionValeur);
}
$return = '<select class="criteres" name="'.$name.'">';
$return .= '<option '.(($sessionValeur == '-')?'selected':'').' value="-">-</option>';
foreach($options['value'] as $value => $label) {
$selected = "";
if( $sessionValeur!==null && $sessionValeur != "-" && $sessionValeur==$value )
$selected = " selected";
$return .= '<option'.$selected.' value="'.$value.'">'.$this->view->translate($label).'</option>';
}
$return .= '</select>';
return $return;
}
protected function intervalDateHTML($name, $options)
{
$session = new Scores_Fields();
$sessionValeur = $session->getCritere($name);
$return = '';
$return.= '<select name="'.$name.'1_j" style="width:45px;">';
for ($i=1;$i<=31;$i++) {
$return.= '<option>'.str_pad($i,2,'0',STR_PAD_LEFT).'</option>';
}
$return.= '</select>';
$return.= '<select name="'.$name.'1_m" style="width:45px;">';
for ($i=1;$i<=12;$i++) {
$return.= '<option>'.str_pad($i,2,'0',STR_PAD_LEFT).'</option>';
}
$return.= '</select>';
$return.= '<select name="'.$name.'1_a" style="width:60px;">';
for ($i=1900;$i<=date('Y');$i++) {
$return.= '<option>'.$i.'</option>';
}
$return.= '</select>';
$return.= ' '.$this->view->translate('au').' ';
$return.= '<select name="'.$name.'2_j" style="width:45px;">';
for ($i=1;$i<=31;$i++) {
$select = '';
if ($i==date('d')) {
$select = ' selected';
}
$return.= '<option'.$select.'>'.str_pad($i,2,'0',STR_PAD_LEFT).'</option>';
}
$return.= '</select>';
$return.= '<select name="'.$name.'2_m" style="width:45px;">';
for ($i=1;$i<=12;$i++) {
$select = '';
if ($i==date('m')) {
$select = ' selected';
}
$return.= '<option'.$select.'>'.str_pad($i,2,'0',STR_PAD_LEFT).'</option>';
}
$return.= '</select>';
$return.= '<select name="'.$name.'2_a" style="width:60px;">';
$lastYear = date('Y');
for ($i=1900;$i<=$lastYear;$i++) {
$select = '';
if ($i==$lastYear) {
$select = ' selected';
}
$return.= '<option'.$select.'>'.$i.'</option>';
}
$return.= '</select>';
$return .= '<br/><a href="#" id="'.$name.'" class="intervalDate">'.$this->view->translate('Valider').'</a>';
return $return;
}
/* Interval */
private function intervalHTML($name, $field)
{
$session = new SessionCiblage();
$session = new Scores_Fields();
$valeur = $session->getCritere($name);
$class = '';
if (array_key_exists('class', $field)) {
$class = $field['class'];
}
$return = '<div class="interval" >';
$return .= '<input class="'.$field['class'].'" type="text" name="'.$name.'1" value="'.$valeur[0].'" /> à ';
$return .= '<input class="'.$field['class'].'" type="text" name="'.$name.'2" value="'.$valeur[1].'" />';
$return .= ' <a href="" class="interval" id="'.$name.'">Valider</a>';
$return .= '<input class="'.$class.'" type="text" name="'.$name.'1" value="'.$valeur[0].'" /> '.$this->view->translate('à').' ';
$return .= '<input class="'.$class.'" type="text" name="'.$name.'2" value="'.$valeur[1].'" />';
$return .= ' <a href="" class="interval" id="'.$name.'">'.$this->view->translate('Valider').'</a>';
$return .= '</div>';
return ($return);
return $return;
}
/* Dates */
private function dateHTML($name, $field)
{
$session = new SessionCiblage();
$session = new Scores_Fields();
$return = '<div class="date" >';
$return .= '<input value="'.$session->getCritere($name).'" type="text" class="datepicker" name="'.$name.'1" /> a ';
$return .= '<input type="text" class="datepicker" name="'.$name.'2" />';
$return .= '</div>';
return ($return);
}
/* Textes */
private function textHTML($name, $field)
protected function textHTML($name, $options)
{
$session = new SessionCiblage();
$return = '<input style="border:1px inset silver;width:60%" class="criteres" type="text" name="'.$name.'" value="'.$session->getCritere($name).'" />';
return ($return);
$return = '<input type="text" class="criteres autocomplete" name="'.$name.'" />';
$return.= '<ul id="'.$name.'" class="selectqueries"></ul>';
$return.= '<a href="#" class="autocomplete">Sélectionner</a>';
$return.= '&nbsp;<a href="#" class="autocompleteEx">Exclure</a>';
return $return;
}
/* Textarea */
private function textareaHTML($name, $field)
protected 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>';
$return = '<textarea class="criteres" name="'.$name.'" ></textarea>';
$return.= '<a href="#" class="list">Sélectionner</a>';
$return.= '&nbsp;<a href="#" class="listEx">Exclure</a>';
return $return;
}
private function fileuploadHtml($name, $field)
{
$return = '<input class="upload" type="file" name="fichier" id="'.$name.'" /> ';
return ($return);
}
/* Radios */
private function radioHTML($name, $field, $item)
{
$return = '<input type="radio" name="'.$name.'" />';
$return = '<input type="radio" name="'.$name.'" />';
return ($return);
}
}

View File

@ -1,22 +0,0 @@
<?php
Class Zend_View_Helper_Radio extends Zend_View_Helper_Abstract
{
public function Radio($name, $libelle)
{
$champ = '<div>';
$champ .= '<div style="float:left;text-align:left;">
<label>'.$libelle.'</label>
</div>';
$champ .= '<div style="text-align:right;">
<input type="radio" name="'.$name.'" value="" />
<input type="radio" name="'.$name.'" value="0" />
<input type="radio" name="'.$name.'" value="1" />
</div>';
$champ .= '<div>
<hr />
</div>';
$champ .= '</div>';
return ($champ);
}
}

View File

@ -1 +1,9 @@
<?php
<div id="help" style="padding:5px;">
<h2>A propos de</h2>
<p>Pour une demande commercial vous pouvez contacter <a href="mailto:contact@scores-decisions.com">contact@scores-decisions.com</a>.</p>
<p>Pour une demande concernant votre contrat ou l'utilisation, vous pouvez prendre contact avec
<a href="mailto:support@scores-decisions.com">support@scores-decisions.com</a>, en rappelant vos références.</p>
</div>

View File

@ -1 +1,53 @@
<?php
<div id="help">
<h2>Préambule</h2>
<p>
L'application se décompose en deux parties : <br/>
- La partie ciblage<br/>
<br/><br/>
- La partie enrichissement<br/>
<br/>
</p>
<h2>Description de l'interface</h2>
<p>
Menu
Résumé des critères
</p>
<br/>
<h2>Fonctionnement des champs</h2>
<ul>
<li>Champs de sélection simple
image
<p>Plusieurs choix sont proposés, une seul sélection possible ,à chaque changement le
ciblage est actualisé</p>
</li>
<li>
Champs de sélection multiple
<p>Plusieurs choix et sélection multiple, maintenir la touche CTRL lors de chaque selection pour des
critères multiples. Utiliser les liens "Sélectionner" pour inclure les filtres ou "Exclure".
</p>
</li>
<li>Arborescence
<p>Les arborescences propose</p>
</li>
<li>Intervalle
<p>Les intervalles prédéfinies avec des valeurs,</p>
<p>Les intervalles à remplir, permette de définir une tranche, seul le minimum ou le maximum peuvent
être inscrit, les valeurs extrêmes sont automatiquement définies .</p>
</li>
</ul>
</div>

View File

@ -0,0 +1,8 @@
<div id="help">
<?php if ($this->typeMsg == 'support') {?>
Les paramètres de votre compte n'ont pas été définis. <br/>Veuillez contacter le <a href="mailto:support@scores-decisions.com">support</a>.
<br/>Par mail : <a href="mailto:support@scores-decisions.com">support@scores-decisions.com</a>
<br/>Par téléphone : 00 00 00 00 00
<br/>Ou contactez votre commercial.
<?php }?>
</div>

View File

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

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>
$("div#<?=$this->key?>").jstree({
"themes" : {
"theme" : "default",
"url" : "/libs/tree/themes/classic/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), 'default', true)?>',
"data" : function(n)
{
return { id: n.attr ? n.attr("id") : 0 };
},
"cache" : true,
}
}
});
</script>

View File

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

View File

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

View File

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

View File

@ -1,37 +1,63 @@
<?php if ($this->noSelection): ?>
Vous n'avez pas sélectionné de critères !
<?php else:?>
<?php if ($this->typeMsg) {?>
<div id="help">
<?php if ($this->typeMsg == 'support') {?>
Les paramètres de votre compte n'ont pas été définis. <br/>Veuillez contacter le <a href="mailto:support@scores-decisions.com">support</a>.
<br/>Par mail : <a href="mailto:support@scores-decisions.com">support@scores-decisions.com</a>
<br/>Ou prendre contact avec votre commercial.
<?php } elseif ($this->typeMsg == 'contrat') {?>
Votre contrat est arrivé à expiration. <br/>Veuillez contacter le <a href="mailto:support@scores-decisions.com">support</a>.
<br/>Par mail : <a href="mailto:support@scores-decisions.com">support@scores-decisions.com</a>
<br/>Ou prendre contact avec votre commercial.
<?php }?>
</div>
<?php } elseif ($this->noSelection) { ?>
Vous n'avez pas sélectionné de critères !
<?php } else {?>
<style>
span.message {
font-size:0.7em;
font-style: italic;
}
</style>
<div id="result">
<form method="post" id="save" name="save" action="<?=$this->url(array('controller'=>'comptage', 'action'=>'save'))?>">
<label>Votre référence</label>
<input type="text" name="ref" value="" />
<input type="submit" name="submit" value="Enregistrer">
<label>Votre référence : </label><input type="text" name="ref" value="<?=$this->reference?>" />
</form>
<span class="message" style="color:#ff0000;"></span>
<br/>
<span class="message">
La saisie d'une référence vous permettra de suivre vos ciblages et vos commandes.<br/>
Les accents et les carractères spéciaux, seront remplacés automatiquement.<br/>
Les espaces seront remplacés par "_"
</span>
</div>
<script type="text/javascript" src="/themes/default/scripts/jquery.form.js"></script>
<script type="text/javascript" src="/libs/form/jquery.form.min.js"></script>
<script>
$('form#save').bind('submit', function(){
var options = {
target: '#result',
dataType: 'json',
beforeSubmit: function(){},
success: function(data){
if (data.error == 0){
$('#result').html(data.msg);
} else {
$('#result span.message').html(data.msg);
}
}
};
$(this).ajaxSubmit(options);
return false;
});
$('#dialog').dialog({
buttons: [ {
text: "Enregistrer",
click: function() {
var options = {
target: '#result',
dataType: 'json',
beforeSubmit: function(){
$('#result').html('Enregistrement...');
},
success: function(data){
if (data.error == 0) {
$('#result').html(data.msg);
$(location).attr('href',data.href);
} else {
$('#result span.message').html(data.msg);
}
}
};
$('form#save').ajaxSubmit(options);
}
},
{ text: "Annuler", click: function() { $(this).dialog("close"); } }
] });
</script>
<?php endif;?>
<pre>
<?php print_r($this->criteres)?>
</pre>
<?php }?>

View File

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

View File

@ -1,20 +0,0 @@
<div id="economique">
<div style="display:none" class="error">
<div>Erreur :</div>
</div>
<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><?php echo $this->Field('ape_entrep', $this->fields->get('ape_entrep'));?></li>
<li><?php echo $this->Field('age_entrep', $this->fields->get('age_entrep'));?></li>
<li><?php echo $this->Field('age_etab', $this->fields->get('age_etab'));?></li>
<li><?php echo $this->Field('teff_entrep', $this->fields->get('teff_entrep'));?></li>
<li><?php echo $this->Field('teff_etab', $this->fields->get('teff_etab'));?></li>
<li><?php echo $this->Field('eff_entrep', $this->fields->get('eff_entrep'));?></li>
<li><?php echo $this->Field('eff_etab', $this->fields->get('eff_etab'));?></li>
<li><?php echo $this->Field('nbEtab', $this->fields->get('nbEtab'));?></li>
</ul>
</div>
<div style="text-align:right;margin-top:20px;">
<a href="">Réinitialiser les critères entreprises</a>
</div>

View File

@ -1,21 +0,0 @@
<div id="entreprise">
<ul id="fieldsblock">
<li><?php echo $this->Field('siege', $this->fields->get('siege'));?></li>
<li><?php echo $this->Field('sirenGrp', $this->fields->get('sirenGrp'));?></li>
<li><?php echo $this->Field('tel', $this->fields->get('tel'));?></li>
<li><?php echo $this->Field('fax', $this->fields->get('fax'));?></li>
<li><?php echo $this->Field('web', $this->fields->get('web'));?></li>
<li><?php echo $this->Field('mail', $this->fields->get('mail'));?></li>
<li><?php echo $this->Field('presentRcs', $this->fields->get('presentRcs'));?></li>
<li><?php echo $this->Field('adrDom', $this->fields->get('adrDom'));?></li>
<li><?php echo $this->Field('dirNom', $this->fields->get('dirNom'));?></li>
<li><?php echo $this->Field('nbMPubli', $this->fields->get('nbMPubli'));?></li>
<li><?php echo $this->Field('dateCrea_ent',$this->fields->get('dateCrea_ent'));?></li>
<li><?php echo $this->Field('dateCrea_etab', $this->fields->get('dateCrea_etab'));?></li>
<li><?php echo $this->Field('nbActio', $this->fields->get('nbActio'));?></li>
<li><?php echo $this->Field('nbPart', $this->fields->get('nbPart'));?></li>
</ul>
</div>
<div id="link">
<a href="">Réinitialiser les critères entreprises</a>
</div>

View File

@ -1,24 +0,0 @@
<div id="financiere">
<ul id="fieldsblock">
<li><?php echo $this->Field('bilType', $this->fields->get('bilType'));?></li>
<li><?php echo $this->Field('avisCs', $this->fields->get('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><?php echo $this->Field('bilTca', $this->fields->get('bilTca'));?></li>
<li><?php echo $this->Field('bilEE', $this->fields->get('bilEE'));?></li>
<li><?php echo $this->Field('bilFL', $this->fields->get('bilFL'));?></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>
</div>

View File

@ -1,9 +0,0 @@
<div id="geographique">
<ul id="fieldsblock">
<li><?php echo $this->Field('adr_cp', $this->fields->get('adr_cp'));?></li>
<li><?php echo $this->Field('adr_com', $this->fields->get('adr_com'));?></li>
</ul>
</div>
<div style="text-align:right;margin-top:20px;">
<a href="">Réinitialiser les critères entreprises</a>
</div>

View File

@ -1,12 +0,0 @@
<div id="juridique">
<ul id="fieldsblock">
<li><?php echo $this->Field('cj', $this->fields->get('cj'));?></li>
<li><?php echo $this->Field('actifEco', $this->fields->get('actifEco'));?></li>
<li><?php echo $this->Field('procolHisto', $this->fields->get('procolHisto'));?></li>
<li><?php echo $this->Field('tvaIntraValide', $this->fields->get('tvaIntraValide'));?></li>
<li><?php echo $this->Field('dateImmat', $this->fields->get('dateImmat'));?></li>
</ul>
</div>
<div style="text-align:right;margin-top:20px;">
<a href="">Réinitialiser les critères entreprises</a>
</div>

View File

@ -0,0 +1,104 @@
<ul class="chemin clearfix rounded_t">
<li class="e0"><a class="lir" href="/">Accueil</a></li>
<li><a href="/dashboard/index"><span>Tableau de bord</span></a></li>
<li class="last"><span>Detail du ciblage (<?=$this->comptageRef?>)</span></li>
</ul>
<div id="dashboard" style="padding:10px">
<a href="<?=$this->url(array('controller'=> 'index','action'=>'index', 'id'=>$this->comptageId))?>">Charger les critères de ciblage dans l'interface</a> |
<a class="update" href="<?=$this->url(array('controller'=> 'comptage','action'=>'update', 'id'=>$this->comptageId))?>">Actualiser le comptage</a> |
<a class="enrichissementref" href="<?=$this->url(array('controller'=> 'enrichissement','action'=>'reference', 'id'=>$this->comptageId))?>">Commander un enrichissement</a>
<fieldset>
<legend>Critères</legend>
<?php foreach ( $this->criteres as $criteres ) { ?>
<div>
<h3><?=$criteres['label']?></h3>
<?php if (is_string($criteres['in'])) {?>
<div><?=$criteres['in']?></div>
<?php } else {?>
<?php if ( is_array($criteres['in']) && count($criteres['in'])>0 ) { ?>
<div>
<p>Inclus :</p>
<?php foreach( $criteres['in'] as $item ) {?>
<p><?=$item?></p>
<?php }?>
</div>
<?php }?>
<?php if ( is_array($criteres['ex']) && count($criteres['ex'])>0 ) { ?>
<div>
<p>Exclus :</p>
<?php foreach( $criteres['ex'] as $item ) {?>
<p><?=$item?></p>
<?php }?>
</div>
<?php }?>
<?php }?>
</div>
<?php }?>
</fieldset>
<fieldset>
<legend>Comptages</legend>
<table class="comptages" style="width:100%">
<thead>
<tr>
<th>Date</th>
<th>Résultat</th>
<th>Nombre d'unité Insee</th>
</tr>
</thead>
<tbody>
<?php foreach($this->comptages as $comptage):?>
<tr>
<th><?=substr($comptage['dateAjout'],8,2).'/'.substr($comptage['dateAjout'],5,2).'/'.substr($comptage['dateAjout'],0,4)
.' '.substr($comptage['dateAjout'],11,2).':'.substr($comptage['dateAjout'],14,2).':'.substr($comptage['dateAjout'],17,2)?></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/<?=$item['id']?>"><?=$item['fichier']?></a>
<?php else: ?>
En attente de traitement
<?php endif; ?>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<?php } else {?>
<a class="enrichissementref" href="<?=$this->url(array('controller'=> 'enrichissement','action'=>'reference', 'id'=>$this->comptageId))?>">Commander un enrichissement</a>
<?php }?>
</fieldset>
</div>

View File

@ -1,45 +0,0 @@
<div id="dashboard">
<div class="chemin">
<a href="<?=$this->url(array('controller'=>'dashboard', 'action'=>''))?>">Tableau de bord</a> >
Détail du ciblage
</div>
<?php if (empty($this->criteres)){?>
<p>Aucun ciblage n'a été trouvé avec ces paramètres.</p>
<?php } else {?>
<h1>Ciblage <?=$this->criteres['reference']?> (<?=$this->criteres['dateAjout']?>)</h1>
<h2>Critères</h2>
<pre>
<?=print_r(json_decode($this->criteres['criteres'], true))?>
</pre>
<h2>Comptages</h2>
<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>
<?php }?>
</div>

View File

@ -1,14 +1,21 @@
<div id="dashboard">
<ul class="chemin clearfix rounded_t">
<li class="e0"><a class="lir" href="/">Accueil</a></li>
<li>
<a href="<?=$this->url(array('controller'=>'dashboard', 'action'=>'index'))?>">
<span>Tableau de bord</span>
</a>
</li>
<li class="last">
<span>Liste de vos ciblages</span>
</li>
</ul>
<div class="chemin">
<a href="<?=$this->url(array('controller'=>'dashboard', 'action'=>''))?>">Tableau de bord</a> >
Liste de vos ciblages
</div>
<div id="dashboard" class="clearfix">
<div style="margin:5px 0;">
<h2>Liste de vos ciblages</h2>
<?php if(count($this->ciblages)>0):?>
<?php if(count($this->ciblages)>0) {?>
<table class="ciblage">
<thead>
@ -17,30 +24,46 @@ Liste de vos ciblages
<th>Nombre d'entité</th>
<th>Unité Insee</th>
<th>Date</th>
<th>Action</th>
<th colspan="4"></th>
</tr>
</thead>
<tbody>
<?php foreach($this->ciblages as $item):?>
<?php foreach($this->ciblages as $item) {?>
<tr>
<td><?=$item['reference']?></td>
<td><?=number_format($item['resultat'], 0, ',', ' ')?></td>
<td><?=number_format($item['uniteInsee'], 0, ',', ' ')?></td>
<td><?=$item['dateComptage']?></td>
<td>
[<a href="<?=$this->url(array('controller'=> 'dashboard','action'=>'ciblagedetail', 'id'=>$item['id']))?>">Détails</a>] -
[<a href="<?=$this->url(array('controller'=> 'index','action'=>'index', 'id'=>$item['id']))?>">Recharger les critères de ciblage</a>] -
[<a href="<?=$this->url(array('controller'=> 'comptage','action'=>'update', 'id'=>$item['id']))?>">Actualiser le comptage</a>] -
[<a href="<?=$this->url(array('controller'=> 'comptage','action'=>'update', 'id'=>$item['id']))?>">Enrichissement</a>]
</td>
<td class="reference"><?=$item['reference']?></td>
<td class="update resultat"><?=number_format($item['resultat'], 0, ',', ' ')?></td>
<td class="update insee"><?=number_format($item['uniteInsee'], 0, ',', ' ')?></td>
<td class="update date"><?=$item['dateComptage']?></td>
<td><a href="<?=$this->url(array('controller'=> 'dashboard','action'=>'ciblage', 'id'=>$item['id']))?>">Detail</a></td>
<td><a href="<?=$this->url(array('controller'=> 'index','action'=>'index', 'id'=>$item['id']))?>">Charger les critères de ciblage dans l'interface</a></td>
</tr>
<?php endforeach;?>
<?php }?>
</tbody>
</table>
<?php else:?>
<div style="margin:5px auto;width:333px;">
<div class="pagination">
<a href="#" class="first" data-action="first">&laquo;</a>
<a href="#" class="previous" data-action="previous">&lsaquo;</a>
<input type="text" readonly="readonly" data-current-page="<?=$this->page?>" data-max-page="<?=$this->nbPages?>" />
<a href="#" class="next" data-action="next">&rsaquo;</a>
<a href="#" class="last" data-action="last">&raquo;</a>
</div>
<script>
$('.pagination').jqPagination({
page_string: "Page {current_page} sur {max_page}",
paged: function(page) {
window.location.href = window.location.href + '/page/'+page;
}
});
</script>
</div>
<?php } else {?>
<p>Aucun ciblage.<p>
<?php endif;?>
<?php }?>
</div>

View File

@ -1,47 +1,86 @@
<ul class="chemin clearfix rounded_t">
<li class="e0"><a class="lir" href="/">Accueil</a></li>
<li>
<a href="<?=$this->url(array('controller'=>'dashboard', 'action'=>'index'))?>">
<span>Tableau de bord</span>
</a>
</li>
<li class="last">
<span>Préférences</span>
</li>
</ul>
<div id="dashboard">
<div class="chemin">
<a href="<?=$this->url(array('controller'=>'dashboard', 'action'=>''))?>">Tableau de bord</a> >
Préférences
</div>
<h2>Paramètres de votre compte</h2>
<p>Service ouvert du <?=$this->dateBegin?> au <?=$this->dateEnd?></p>
<p><?=$this->tarifText?></p>
<p>Licence INSEE :<?php if ($this->licenceINSEE) {?> Non comptabilisé (déjà licencié)<?php } else {?> Paiement à chaque extraction.<?php }?></p>
<p>Filtre RNCS :<?php if ($this->filterRNCS) {?> Filtrer au seul paramètre RNCS.<?php } else {?> Aucun filtre.<?php }?></p>
<p>Extraction de fichier : <?php if ($this->immediatExtract) {?>Immédiat<?php } else { ?>Différé<?php }?></p>
<h2>Gestion des profils d'enrichissement</h2>
<p>
Afin de vous permettre un enrichissement de données à partir d'une liste de SIREN/SIRET,
Suivant la configuration de votre compte, vous avez la possibilité de sélectionner les données
disponible.
</p>
<br/>
<p>Cas profil défini pas S&D</p>
<p>- Aucun profil d'enrichissement (Contacter le support)</p>
<p>- Liste des profils avec référence, tarifs à la ligne</p>
<p>Si droits création profil d'enrichissement</p>
<p>- Aucun profil d'enrichissement (Sans profil d'enrichissement, vous ne pourrez pas extraire de données)</p>
<p>- Liste des profils avec référence, tarifs à la ligne</p>
<p> - Créer un profil d'enrichissement (avoir donc un tarifs à la colonne, pour créer le tarif à la ligne)</p>
<p>Lister les colonnes disponibles (Association SQL/Libellé) pour la configuration<p>
<h2>Gestion des préférences d'affichage</h2>
<h2>Préférences d'affichage</h2>
<p>
L'application permet la modification de l'affichage des critères de ciblage afin de permettre une
L'application permet la modification de l'affichage des critères de ciblage afin de permettre une
utilisation correspondant à vos besoins.
</p>
<br/>
<p>Vous n'avez pas les droits nécessaires pour créer/modifier les préférences d'affichage.</p>
<p>Des préférences d'affichage ont été définies pour votre profil client.</p>
<br/>
<p>Aucune préférences d'affichage définies pour votre profil utilisateur.</p>
<p>Des préférences d'affichage ont été définies pour votre profil utilisateur.</p>
<br/>
<p>
<a href="<?=$this->url(array('controller'=>'preferences', 'action'=>'active'))?>"
title="Activer le mode personnalisation afin de créer/modifier les préférences d'affichage">
Afin de choisir les critères à masquer :
<a href="#" title="Activer le mode personnalisation afin de créer/modifier les préférences d'affichage">
Activer le mode personnalisation
</a>
</p>
<br/>
<div>
<label>Filtrer au seul périmètre RNCS </label><br/>
<span>Les éléments soumis à redevance INSEE sont automatiquement retirer du ciblage</span><br/>
<?php if ($this->filterRNCS==1) {?>
<i>Votre compte est paramétré pour ne sélectionner que les entités provenant du RNCS</i>
<?php } else {?>
<input type="checkbox" name="rncs" value="1" <?php if ($this->prefFilterRncs==1) echo ' checked="checked"';?>
<?php if ($this->filterRNCS==1) echo ' disabled="disable"';?> />
<?php }?>
</div>
<br/>
<div>
<label>Afficher le nombre d'unité INSEE</label><br/>
<?php if ($this->filterRNCS==1) {?>
<i>Votre compte est paramétré pour ne sélectionner que les entités provenant du RNCS</i>
<?php } else {?>
<span><i>Pour permettre une estimation du cout de la redevance INSEE, en activant cette option,
le nombre d'unité insee est affiché à chaque comptage</i></span><br/>
<input type="checkbox" name="insee" value="1" <?php if ($this->prefInterfaceInsee==1) echo ' checked="checked"';?>
<?php if ($this->filterRNCS==1) echo ' disabled="disable"';?>/>
<?php }?>
</div>
<script>
$('input[type=checkbox]').click(function(){
if($(this).is(':checked')) {
$.post('/dashboard/pref/'+$(this).attr('name')+'/1' , function(data, status) {});
} else {
$.post('/dashboard/pref/'+$(this).attr('name')+'/0' , function(data, status) {});
}
});
</script>
<br/>
<h2>Profils d'enrichissement</h2>
<?php if ($this->profil) {?>
<p>Référence : <?=$this->profil->reference?></p>
<p>Liste des données extraites lors d'un enrichissement</p>
<?php foreach($this->profil->labels as $label) {?>
<?=$label?><br/>
<?php }?>
<?php } else {?>
<p>Aucun profil d'enrichissement (Veuillez contacter le service commercial)</p>
<?php }?>
</div>

View File

@ -0,0 +1,19 @@
<?php if ($this->pageCount) { ?>
<!-- First page link -->
<?php if (isset($this->previous)) { ?>
<a href="<?php echo $this->url(array('page' => $this->first)); ?>"><img src="/themes/default/images/pagination/first.png" title='Première page'/></a>
<?php } ?>
<!-- Previous page link -->
<?php if (isset($this->previous)) { ?>
<a href="<?php echo $this->url(array('page' => $this->previous)); ?>"><img src="/themes/default/images/pagination/prev.png" title='Page précédente'/></a>
<?php } ?>
&nbsp;
<!-- Next page link -->
<?php if (isset($this->next)) { ?>
<a href="<?php echo $this->url(array('page' => $this->next)); ?>"><img src="/themes/default/images/pagination/next.png" title='Page suivante'/></a>
<?php } ?>
<!-- Last page link -->
<?php if (isset($this->next)) { ?>
<a href="<?php echo $this->url(array('page' => $this->last)); ?>"><img src="/themes/default/images/pagination/last.png" title='Dernière page'/></a>
<?php } ?>
<?php } ?>

View File

@ -0,0 +1,19 @@
<?php if ($this->pageCount) { ?>
<!-- First page link -->
<?php if (isset($this->previous)) { ?>
<a href="<?php echo $this->url(array('pageEnrichissements' => $this->first)); ?>"><img src="/themes/default/images/pagination/first.png" title='Première page'/></a>
<?php } ?>
<!-- Previous page link -->
<?php if (isset($this->previous)) { ?>
<a href="<?php echo $this->url(array('pageEnrichissements' => $this->previous)); ?>"><img src="/themes/default/images/pagination/prev.png" title='Page précédente'/></a>
<?php } ?>
&nbsp;
<!-- Next page link -->
<?php if (isset($this->next)) { ?>
<a href="<?php echo $this->url(array('pageEnrichissements' => $this->next)); ?>"><img src="/themes/default/images/pagination/next.png" title='Page suivante'/></a>
<?php } ?>
<!-- Last page link -->
<?php if (isset($this->next)) { ?>
<a href="<?php echo $this->url(array('pageEnrichissements' => $this->last)); ?>"><img src="/themes/default/images/pagination/last.png" title='Dernière page'/></a>
<?php } ?>
<?php } ?>

View File

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

View File

@ -0,0 +1,101 @@
<ul class="chemin clearfix rounded_t">
<li class="e0"><a class="lir" href="/">Accueil</a></li>
<li>
<a href="<?=$this->url(array('controller'=>'dashboard', 'action'=>'index'))?>">
<span>Tableau de bord</span>
</a>
</li>
<li class="last">
<span>Enrichissements</span>
</li>
</ul>
<div id="dashboard">
<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

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

View File

@ -1,56 +1,98 @@
<ul class="chemin clearfix rounded_t">
<li class="e0"><a class="lir" href="/">Accueil</a></li>
<li>
<a href="<?=$this->url(array('controller'=>'dashboard', 'action'=>'index'))?>">
<span><?=$this->translate('Tableau de bord')?></span>
</a>
</li>
<li class="last">
<span></span>
</li>
</ul>
<div id="dashboard">
<div class="chemin">
<a href="<?=$this->url(array('controller'=>'dashboard', 'action'=>''))?>">Tableau de bord</a>
</div>
<div>
<a href="<?=$this->url(array('controller'=>'dashboard', 'action'=>'ciblages'))?>">Historique de vos ciblages</a> -
<a href="<?=$this->url(array('controller'=>'dashboard', 'action'=>'configuration'))?>">Préférences de l'application</a> -
<a href="<?=$this->url(array('controller'=>'dashboard', 'action'=>'exports'))?>">Enrichissement fichier</a>
<div id="menu">
<a href="<?=$this->url(array('controller'=>'dashboard', 'action'=>'ciblages'))?>"><?=$this->translate('Liste de vos ciblages')?></a> -
<a href="<?=$this->url(array('controller'=>'dashboard', 'action'=>'enrichissements'))?>"><?=$this->translate('Liste de vos enrichissements')?></a> -
<a href="<?=$this->url(array('controller'=>'dashboard', 'action'=>'configuration'))?>"><?=$this->translate('Préférences de l\'application')?></a> -
<a href="<?=$this->url(array('controller'=>'dashboard', 'action'=>''))?>"><?=$this->translate('Enrichissement de fichier')?></a>
</div>
<div id="rechercheCiblage">
<h2>Rechercher dans vos ciblages</h2>
<h2><?=$this->translate('Rechercher dans vos ciblages')?></h2>
<input type="text" name="searchCiblage" class="searchCiblage" />
<input type="submit" value="Rechercher" class="submit"/>
<input type="submit" value="<?=$this->translate('Rechercher')?>" class="submit"/>
</div>
<div id="lastCiblage" style="">
<h2>Vos derniers ciblages</h2>
<?php if(count($this->comptages)>0):?>
<div id="lastCiblage">
<h2><?=$this->translate('Vos derniers ciblages')?></h2>
<?php if(count($this->comptages) > 0):?>
<table>
<thead>
<tr>
<th><?=$this->translate('Référence')?></th>
<th><?=$this->translate('Nombre d\'entité')?></th>
<th><?=$this->translate('Unité Insee')?></th>
<th>Date</th>
<th colspan="4"></th>
</tr>
</thead>
<tbody>
<?php foreach($this->paginator 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 href="<?=$this->url(array('controller'=> 'dashboard','action'=>'ciblage', 'id'=>$item['id']))?>">Detail</a></td>
<td><a href="<?=$this->url(array('controller'=> 'index','action'=>'index', 'id'=>$item['id']))?>"><?=$this->translate('Charger les critères de ciblage dans l\'interface')?></a></td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<?php echo $this->paginationControl($this->paginator,'Sliding','dashboard/controlsCiblages.phtml'); ?>
<?php else:?>
<p><?=$this->translate('Aucun ciblage')?>.<p>
<?php endif;?>
</div>
<table class="ciblage">
<thead>
<tr>
<th>Référence</th>
<th>Nombre d'entité</th>
<th>Unité Insee</th>
<th>Date</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
<?php foreach($this->comptages as $item):?>
<tr>
<td><?=$item['reference']?></td>
<td><?=number_format($item['resultat'], 0, ',', ' ')?></td>
<td><?=number_format($item['uniteInsee'], 0, ',', ' ')?></td>
<td><?=$item['dateComptage']?></td>
<td>
[<a href="<?=$this->url(array('controller'=> 'index','action'=>'index', 'id'=>$item['id']))?>">Recharger les critères de ciblage</a>] -
[<a href="<?=$this->url(array('controller'=> 'comptage','action'=>'update', 'id'=>$item['id']))?>">Actualiser le comptage</a>] -
[<a href="<?=$this->url(array('controller'=> 'comptage','action'=>'update', 'id'=>$item['id']))?>">Enrichissement</a>]
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<?php else:?>
<p>Aucun ciblage.<p>
<?php endif;?>
<div id="lastEnrichissement">
<h2><?=$this->translate('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 foreach($this->enrichissements as $item):?>
<tr>
<td><?=$item['reference']?></td>
<td><?=number_format($item['nbLigneTotales'], 0, ',', ' ')?></td>
<td><?=$item['dateAdded']?></td>
<td>
<?php if ( $item['dateStop']!='0000-00-00 00:00:00' ) {?>
<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 echo $this->paginationControl($this->enrichissements,'Sliding','dashboard/controlsEnrichissements.phtml'); ?>
<?php else:?>
<p><?=$this->translate('Aucun enrichissement')?>.<p>
<?php endif;?>
</div>
</div>

View File

@ -0,0 +1,5 @@
<?php if ($this->nbRow>0) { ?>
Préférence enregistrée.
<?php } else {?>
Erreur lors de l'enregistrement de la préférence.
<?php } ?>

View File

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

View File

@ -0,0 +1,97 @@
<?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 === true) {?>
<p>Le nombre de lignes à enrichir est trop important.
Vous pouvez prendre contact avec le service commercial.</p>
<?php } elseif ( $this->resultat == 'lines') {?>
<p>Le nombre de lignes à enrichir est supérieur au nombre de ligne maximum définies dans la contrat.
Vous pouvez prendre contact avec le service commercial.</p>
<?php } elseif ( $this->resultat == 'files') {?>
<p>Le nombre maximum de fichier enrichit a été atteint.
Vous pouvez prendre contact avec le service commercial.</p>
<?php } elseif ( $this->forfaitRemain && $this->forfaitRemain<=0 ) { ?>
<p>Le montant de votre forfait est insuffisant
Vous pouvez prendre contact avec le service commercial.
</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/>
<table id="enrichissement">
<tr>
<th>Référence</th><th><?=$this->ref?></th>
</tr>
<tr><td>Nombre d'unités</td><td><?=number_format($this->resultat, 0, ',', ' ')?></td></tr>
<tr><td>Nombre d'unités Insee</td><td><?=number_format($this->uniteInsee, 0, ',', ' ')?></td></tr>
<tr>
<td>Redevance Insee</td>
<td><?=number_format($this->prixInsee, 2, ',', ' ')?></td>
</tr>
<tr>
<td>Prix du fichier</td><td><?=number_format($this->prix, 2, ',', ' ')?></td>
</tr>
<?php if ($this->forfaitRemain) {?>
<tr><td colspan="2"></td></tr>
<tr><td>Forfait Restant</td><td><?=number_format($this->forfaitRemain, 2, ',', ' ')?></td></tr>
<?php }?>
</table>
<?php if (!empty($this->infoInsee)) {?>
<br/>
<p><?=$this->infoInsee?></p>
<?php }?>
<br/>
<form name="commande" method="post" action="<?=$this->url(array('controller'=>'enrichissement', 'action'=>'commande'))?>">
<input type="hidden" name="id" value="<?=$this->id?>" />
<input type="hidden" type="text" value="<?=$this->ref?>" name="ref">
<input type="hidden" type="text" value="<?=$this->profil?>" name="profil">
</form>
</div>
<script>
$('#dialog').dialog({ buttons: [ {
text: "Commander",
click: function() {
var action = $('form[name=commande]').attr('action');
var values = $('form[name=commande]').serialize();
$('div#update').html('Enregistrement...');
$('#dialog').dialog({ buttons: [{}] });
$.post(action, values, function(data){
$('div#update').html(data);
}).error(function(){
$('div#update').html('Erreur');
});
}
},
{
text: "Quitter", click: function() { $(this).dialog("close"); }
}
] });
</script>
<?php }?>

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 @@
<?=json_encode($this->output)?>

View File

@ -0,0 +1,123 @@
<ul>
<li><a href="#tabs-1"><?=$this->translate('Critères Entreprise')?></a></li>
<li><a href="#tabs-2"><?=$this->translate('Situation économique')?></a></li>
<li><a href="#tabs-3"><?=$this->translate('Secteur géographique')?></a></li>
<li><a href="#tabs-4"><?=$this->translate('Situation juridique')?></a></li>
<li><a href="#tabs-5"><?=$this->translate('Situation financière')?></a></li>
</ul>
<div id="tabs-1">
<div id="entreprise">
<ul id="fieldsblock">
<li><?=$this->Field('siege')?></li>
<li><?=$this->Field('groupe')?></li>
<li><?=$this->Field('tel')?></li>
<li><?=$this->Field('fax')?></li>
<li><?=$this->Field('web')?></li>
<li><?=$this->Field('mail')?></li>
<li><?=$this->Field('presentRcs')?></li>
<li><?=$this->Field('adrDom')?></li>
<li><?=$this->Field('dirNom')?></li>
<li><?=$this->Field('dateCrea_etab')?></li>
<li><?=$this->Field('participation')?></li>
<li class="advanced"><?=$this->Field('nbMPubli')?></li>
<li class="advanced"><?=$this->Field('dateCrea_ent')?></li>
<li class="advanced"><?=$this->Field('action')?></li>
<li class="advanced"><?=$this->Field('nbActio')?></li>
<li class="advanced"><?=$this->Field('nbPart')?></li>
<li class="mode"><img src="/themes/default/images/fleche-bas.gif" /></li>
</ul>
</div>
<div id="link">
<a class="resetFamille" id="entreprise">Réinitialiser les critères entreprises</a>
</div>
</div>
<div id="tabs-2">
<div id="economique">
<ul id="fieldsblock">
<li><?=$this->Field('capital')?></li>
<li><?=$this->Field('ape_entrep')?></li>
<li class="advanced"><?=$this->Field('ape_etab')?></li>
<li><?=$this->Field('age_entrep')?></li>
<li class="advanced"><?=$this->Field('age_etab')?></li>
<li><?=$this->Field('teff_entrep')?></li>
<li class="advanced"><?=$this->Field('teff_etab')?></li>
<li><?=$this->Field('eff_entrep')?></li>
<li class="advanced"><?=$this->Field('eff_etab')?></li>
<li class="advanced"><?=$this->Field('nbEtab')?></li>
<li class="mode"><img src="/themes/default/images/fleche-bas.gif" /></li>
</ul>
</div>
<div style="text-align:right;margin-top:20px;">
<a class="resetFamille" id="economique">Réinitialiser les critères economiques</a>
</div>
</div>
<div id="tabs-3">
<div id="geographique">
<ul id="fieldsblock">
<li>
<?=$this->Field('geo')?>
<?=$this->Field('geo_domtom')?>
<?=$this->Field('geo_etranger')?>
<?=$this->Field('geo_corse')?>
</li>
<li class="advanced"><?=$this->Field('codesdepts')?></li>
<li class="advanced"><?=$this->Field('codespostaux')?></li>
<li class="advanced"><?=$this->Field('codesinsee')?></li>
<li><?=$this->Field('zus')?></li>
<li><?=$this->Field('zru')?></li>
<li><?=$this->Field('zfu')?></li>
<li><?=$this->Field('cucs')?></li>
<li><?=$this->Field('zrr')?></li>
<li><?=$this->Field('zafr')?></li>
<li class="mode"><img src="/themes/default/images/fleche-bas.gif" /></li>
</ul>
</div>
<div style="text-align:right;margin-top:20px;">
<a class="resetFamille" id="econmique">Réinitialiser les critères geographiques</a>
</div>
</div>
<div id="tabs-4">
<div id="juridique">
<ul id="fieldsblock">
<li><?=$this->Field('cj')?></li>
<li class="advanced"><?=$this->Field('cjlist')?></li>
<li><?=$this->Field('actifEco')?></li>
<li><?=$this->Field('procolHisto')?></li>
<li><?=$this->Field('dateImmat')?></li>
<li class="advanced"><?=$this->Field('tvaIntraValide')?></li>
<li class="mode"><img src="/themes/default/images/fleche-bas.gif" /></li>
</ul>
</div>
<div style="text-align:right;margin-top:20px;">
<a class="resetFamille" id="econmique">Réinitialiser les critères juridique</a>
</div>
</div>
<div id="tabs-5">
<div id="financiere">
<ul id="fieldsblock">
<li><?=$this->Field('bilType')?></li>
<li><?=$this->Field('avisCs')?></li>
<li><?=$this->Field('bilAnnee')?></li>
<li><?=$this->Field('bilCloture')?></li>
<li><?=$this->Field('bilDuree')?></li>
<li><?=$this->Field('bilTca')?></li>
<li><?=$this->Field('bilFL')?></li>
<li class="advanced"><?=$this->Field('bilEE')?></li>
<li class="advanced"><?=$this->Field('bilFK')?></li>
<li class="advanced"><?=$this->Field('bilFR')?></li>
<li class="advanced"><?=$this->Field('bilGF')?></li>
<li class="advanced"><?=$this->Field('bilGP')?></li>
<li class="advanced"><?=$this->Field('bilGW')?></li>
<li class="advanced"><?=$this->Field('bilHD')?></li>
<li class="advanced"><?=$this->Field('bilHH')?></li>
<li class="advanced"><?=$this->Field('bilHL')?></li>
<li class="advanced"><?=$this->Field('bilHM')?></li>
<li class="advanced"><?=$this->Field('bilHN')?></li>
<li class="advanced"><?=$this->Field('bilYP')?></li>
<li class="mode"><img src="/themes/default/images/fleche-bas.gif" /></li>
</ul>
</div>
<div style="text-align:right;margin-top:20px;">
<a class="resetFamille" id="financier">Réinitialiser les critères financiers</a>
</div>
</div>

View File

@ -0,0 +1,5 @@
<p class="info">
<a href="http://www.scores-decisions.com/">Scores & Décisions SAS</a>
<img class='flag' id='fr' src="/themes/default/images/drapeaux/fr.png"/>
<img class='flag' id='en' src="/themes/default/images/drapeaux/en.png"/>
</p>

View File

@ -0,0 +1,32 @@
<fieldset>
<legend>Critères</legend>
<?php foreach ( $this->criteres as $criteres ) { ?>
<div>
<h3><?=$criteres['label']?></h3>
<?php if (is_string($criteres['in'])) {?>
<div><?=$criteres['in']?></div>
<?php } else {?>
<?php if ( is_array($criteres['in']) && count($criteres['in'])>0 ) { ?>
<div>
<p>Inclus :</p>
<?php foreach( $criteres['in'] as $item ) {?>
<p><?=$item?></p>
<?php }?>
</div>
<?php }?>
<?php if ( is_array($criteres['ex']) && count($criteres['ex'])>0 ) { ?>
<div>
<p>Exclus :</p>
<?php foreach( $criteres['ex'] as $item ) {?>
<p><?=$item?></p>
<?php }?>
</div>
<?php }?>
<?php }?>
</div>
<?php }?>
</fieldset>

View File

@ -0,0 +1,71 @@
<?php
$YearBegin = 2012;
$Years = date('Y') - $YearBegin;
?>
<div id="dashboard">
<form method="post" action="">
<select name="year">
<?php for ($i=0 ; $i<=$Years ; $i++ ) {?>
<?php $select=''; if ($YearBegin+$Years-$i==$this->year) $select = ' selected';?>
<option value="<?=$YearBegin+$Years-$i?>"<?=$select?>><?=$YearBegin+$Years-$i?></option>
<?php }?>
</select>
<select name="month">
<?php for ( $i=1 ; $i<=12 ; $i++ ) {?>
<?php $select=''; if ($i==$this->month) $select = ' selected';?>
<option value="<?=$i?>"<?=$select?>><?=str_pad($i, 2, '0', STR_PAD_LEFT)?></option>
<?php }?>
</select>
<input type="submit" name="submit" value="Ok"/>
</form>
<h2>Liste des ciblages</h2>
<div>
<table>
<tr>
<th><b>Id</b></th>
<th><b>Date de création</b></th>
<th><b>Référence</b></th>
<th><b>Résultat</b></th>
<th><b>Insee</b></th>
<th><b>Actions</b></th>
</tr>
<?php foreach($this->comptages as $comptage): ?>
<tr id="<?=$comptage['idDefinition']?>">
<td><?=$comptage['idDefinition']?></td>
<td><?=$comptage['dateAjout']?></td>
<td><?=$comptage['reference']?></td>
<td><?=$comptage['resultat']?></td>
<td><?=$comptage['uniteInsee']?></td>
<td>
<a href="">Actualiser</a>
</td>
</tr>
<?php endforeach; ?>
</table>
</div>
</div>
<script>
$('table tr').on('click', function(){
var href = '/gestion/ciblagecriteres/id/'+$(this).attr('id');
if (href!='#' || href!='') {
var title = $(this).attr('title');
var dialogOpts = {
bgiframe: true,
title: title,
width: 650,
height: 600,
modal: true,
open: function(event, ui) {
$(this).html('Chargement...');
$(this).load(href);
},
buttons: {
Quitter: function() { $(this).dialog('close'); }
},
close: function() { $('#dialog').remove(); }
};
$('<div id="dialog"></div>').dialog(dialogOpts);
return false;
}
});
</script>

View File

@ -0,0 +1,51 @@
<?php
$YearBegin = 2012;
$Years = date('Y') - $YearBegin;
?>
<div id="dashboard">
<div>
<form method="post" action="">
<select name="year">
<?php for ($i=0 ; $i<=$Years ; $i++ ) {?>
<?php $select=''; if ($YearBegin+$Years-$i==$this->year) $select = ' selected';?>
<option value="<?=$YearBegin+$Years-$i?>"<?=$select?>><?=$YearBegin+$Years-$i?></option>
<?php }?>
</select>
<select name="month">
<?php for ( $i=1 ; $i<=12 ; $i++ ) {?>
<?php $select=''; if ($i==$this->month) $select = ' selected';?>
<option value="<?=str_pad($i, 2, '0', STR_PAD_LEFT)?>"<?=$select?>><?=str_pad($i, 2, '0', STR_PAD_LEFT)?></option>
<?php }?>
</select>
<input type="submit" name="submit" value="Ok"/>
</form>
</div>
<h2>Liste des commandes</h2>
<div>
<table>
<tr>
<th><b>Date de création</b></th>
<th><b>Référence</b></th>
<th><b>Résultat</b></th>
<th><b>Insee</b></th>
<th><b>login</b></th>
<th><b>Reférence ciblage</b></th>
<th><b>Actions</b></th>
</tr>
<?php foreach($this->commandes as $item): ?>
<tr>
<td><?=$item['dateAdded']?></td>
<td><?=$item['commandeReference']?></td>
<td><?=$item['nbLigneTotales']?></td>
<td><?=$item['uniteInsee']?></td>
<td><?=$item['login']?></td>
<td><?=$item['critereReference']?></td>
<td>
<a class="enrichissementref" href="<?=$this->url(array('controller'=> 'gestion','action'=>'enrichit', 'id'=>$item['id']))?>">Enrichissement</a>
<a href="<?=$this->url(array('controller'=> 'gestion','action'=>'extract', 'id'=>$item['id']))?>">Extraire les sirets</a>
</td>
</tr>
<?php endforeach; ?>
</table>
</div>
</div>

View File

@ -0,0 +1,19 @@
<div id="dashboard">
<div>
<p>Date de contrat : <?=$this->ContratDateDebut?> à <?=$this->ContratDateFin?></p>
</div>
<h2>Consommation</h2>
<div>
<table>
<thead>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>

View File

@ -0,0 +1,59 @@
<div id="dashboard">
<h2>Paramètres client</h2>
<table>
<tr><td>Nom</td><td><?=$this->infos['nom']?></td></tr>
<tr><td>service</td><td><?=$this->infos['service']?></td></tr>
<tr><td>filterRNCS</td><td><?=$this->infos['filterRNCS']?></td></tr>
<tr><td>licenceINSEE</td><td><?=$this->infos['licenceINSEE']?></td></tr>
<tr><td>immediatExtract</td><td><?=$this->infos['immediatExtract']?></td></tr>
<tr><td>dateContrat</td><td><?=$this->infos['dateContrat']?></td></tr>
<tr><td>periodContrat</td><td><?=$this->infos['periodContrat']?></td></tr>
<tr><td>periodPaiement</td><td><?=$this->infos['periodPaiement']?></td></tr>
<tr><td>priceLine</td><td><?=$this->infos['priceLine']?></td></tr>
<tr><td>forfait</td><td><?=$this->infos['forfait']?></td></tr>
<tr><td>limitLines</td><td><?=$this->infos['limitLines']?></td></tr>
<tr><td>limitFiles</td><td><?=$this->infos['limitFiles']?></td></tr>
<tr><td>criteres</td><td>
<?php foreach ( $this->infos['criteres'] as $item ) {?>
<?=$this->fields[$item]['label']?><br/>
<?php }?>
</td>
<tr><td>dataInsee</td><td><?=$this->infos['dataInsee']?></td></tr>
<tr><td>dateAdded</td><td><?=$this->infos['dateAdded']?></td></tr>
</table>
<a href="<?=$this->url(array('controller'=>'gestion','action'=>'customerparamadd','idClient'=>$this->idClient),null,true)?>">Modifier</a>
<h2>Logins autorisés</h2>
<div class="paragraph">
<form method="post" action="<?=$this->url(array('controller'=>'gestion', 'action'=>'profiladd'), null, true)?>">
<input type="hidden" name="idClient" value="<?=$this->infos['idClient']?>" />
<input type="hidden" name="service" value="<?=$this->infos['service']?>" />
<input type="hidden" name="reference" value="default" />
<label>Login : </label><input type="text" name="login" value="" />
<input type="submit" value="Ajouter un login avec le profil du client" />
</form>
</div>
<div class="paragraph">
<table>
<tr><td>Login</td><td>Service</td><td>Profil</td><td>Action</td></tr>
<?php foreach ($this->logins as $login) {?>
<tr>
<td><?=$login['login']?></td>
<td><?=$login['service']?></td>
<td><?=$login['reference']?></td>
<td>
<?php if ($login['reference']=='default') {?>
<a href="<?=$this->url(array('controller'=>'gestion', 'action'=>'profiladd'))?>">Ajouter un profil</a>
<a href="">Désactiver</a>
<?php }?>
</td>
</tr>
<?php }?>
</table>
</div>
</div>

View File

@ -0,0 +1,112 @@
<div id="dashboard">
<?php if ($this->message) {?>
<?=$this->message?>
<?php } else {?>
<form name="profil" method="post" action="<?=$this->url(array('controller'=>'gestion', 'action'=>'customerparamadd'))?>">
<?php if ($this->id) {?>
<input type="hidden" name="id" value="<?=$this->id?>"/>
<?php }?>
<div>
<label>Client</label>
<select name="idClient">
<?php foreach ( $this->selectClient as $client ) {?>
<?php $select = ''; if ($this->idClient==$client->id) { $select = ' selected'; }?>
<option value="<?=$client->id?>"<?=$select?>><?=$client->nom?></option>
<?php }?>
</select>
</div>
<div>
<label>service</label>
<input type="text" name="service" value="<?=$this->service?>"/>
</div>
<div>
<label>filterRNCS</label>
<?php $select = ''; if ($this->filterRNCS==1) $select = ' checked'?>
<input type="checkbox" name="filterRNCS" value="1"<?=$select?>/>
Filtrer au RNCS
</div>
<div>
<label>licenceINSEE</label>
<?php $select = ''; if ($this->licenceInsee==1) $select = ' checked'?>
<input type="checkbox" name="licenceINSEE" value="1"<?=$select?>/>
Le client possède la licence INSEE
</div>
<div>
<label>immediatExtract</label>
<input type="text" name="immediatExtract" value="<?=$this->immediatExtract?>" />
Nombre de ligne maximum pour une extraction immédiate
</div>
<div>
<label>dateContrat</label>
<input type="text" name="dateContrat" value="<?=$this->dateContrat?>"/>
Date de début du contract (AAAA-MM-JJ)
</div>
<div>
<label>periodContrat</label>
<input type="text" name="periodContrat" value="<?=$this->periodContrat?>"/>
Durée du contrat (1,3,6,12 mois)
</div>
<div>
<label>periodPaiement</label>
<input type="text" name="periodPaiement" value="<?=$this->periodPaiement?>"/>
Emission des factures (tous les 1,3,6,12 mois)
</div>
<div>
<label>priceLine</label>
<input type="text" name="priceLine" value="<?=$this->priceLine?>"/>
Prix à la ligne (obligatoire même en forfait pour pouvoir décompter)
</div>
<div>
<label>forfait</label>
<input type="text" name="forfait" value="<?=$this->forfait?>"/>
Montant du forfait pour l'extraction de fichier
</div>
<div>
<label>limitLines</label>
<input type="text" name="limitLines" value="<?=$this->limitLines?>"/>
Nombre maximal de lignes dans un fichier
</div>
<div>
<label>limitFiles</label>
<input type="text" name="limitFiles" value="<?=$this->limitFiles?>"/>
Nombre maximal de fichier pouvant être extrait
</div>
<div>
<label>Enrichissement</label>
<select style="padding:5px;" name="criteres[]" multiple size="20">
<?php if ( count($this->fields)>0 ) {?>
<?php foreach ( $this->fields as $value => $item ) {?>
<?php $select = ''; if (in_array($value, $this->criteres)) $select = ' selected'; ?>
<option value="<?=$value?>"<?=$select?>><?=$item['label']?></option>
<?php }?>
<?php }?>
</select>
</div>
<?php if ($this->idClient) {?>
<input type="submit" name="submit" value="Modifier"/>
<?php } else {?>
<input type="submit" name="submit" value="Enregistrer"/>
<?php }?>
</form>
<?php }?>
</div>

View File

@ -0,0 +1,38 @@
<div id="dashboard">
<h2>Liste des paramètres clients</h2>
<div class="paragraph">
<a href="<?=$this->url(array('controller'=>'gestion', 'action'=>'customerparamadd'))?>">Ajouter un client</a>
</div>
<div class="paragraph">
<table>
<tr>
<th>Nom</th>
<th>Début du contrat</th>
<th>Durée contrat</th>
<th>Logins ouvert</th>
<th>Action</th>
</tr>
<?php foreach($this->customerlist as $item) {?>
<tr>
<td><?=$item['nom']?></td>
<td><?=$item['dateContrat']?></td>
<td><?=$item['periodContrat']?></td>
<td>
<?php foreach ($item['logins'] as $login) {?>
<?=$login?><br/>
<?php }?>
</td>
<td>
<a href="<?=$this->url(array('controller'=>'gestion', 'action'=>'customerparam', 'idClient'=>$item['idClient']))?>">Détail</a>
<a href="<?=$this->url(array('controller'=>'gestion', 'action'=>'conso', 'idClient'=>$item['idClient']))?>">Conso</a>
</td>
</tr>
<?php }?>
</table>
</div>
</div>

View File

@ -0,0 +1,50 @@
<?php
$YearBegin = 2012;
$Years = date('Y') - $YearBegin;
?>
<div id="dashboard">
<form method="post" action="">
<select name="year">
<?php for ($i=0 ; $i<=$Years ; $i++ ) {?>
<?php $select=''; if ($YearBegin+$Years-$i==$this->year) $select = ' selected';?>
<option value="<?=$YearBegin+$Years-$i?>"<?=$select?>><?=$YearBegin+$Years-$i?></option>
<?php }?>
</select>
<select name="month">
<?php for ( $i=1 ; $i<=12 ; $i++ ) {?>
<?php $select=''; if ($i==$this->month) $select = ' selected';?>
<option value="<?=str_pad($i, 2, '0', STR_PAD_LEFT)?>"<?=$select?>><?=str_pad($i, 2, '0', STR_PAD_LEFT)?></option>
<?php }?>
</select>
<input type="submit" name="submit" value="Ok"/>
</form>
<h2>Liste des commandes</h2>
<div>
<table>
<tr>
<th><b>Date</b></th>
<th><b>login</b></th>
<th><b>Références</b></th>
<th><b>Résultat</b></th>
<th><b>Insee</b></th>
</tr>
<?php foreach($this->commandes as $item) { ?>
<tr>
<td>
<?=$item['dateAdded']?><br/>
<?=$item['dateStart']?>
</td>
<td><?=$item['login']?></td>
<td>
<?=$item['commandeReference']?><br/>
<?=$item['critereReference']?><br/>
<a href="<?=$this->url(array('controller'=>'gestion','action'=>'enrichissementdl', 'id'=> $item['id']),
'default', true)?>"><?=$item['fichier']?></a>
</td>
<td><?=$item['nbLigneTotales']?></td>
<td><?=$item['uniteInsee']?></td>
</tr>
<?php } ?>
</table>
</div>
</div>

View File

@ -0,0 +1,12 @@
<?php
if ($this->content) {
$content_type = 'application/csv-tab-delimited-table';
header('Content-Transfer-Encoding: none');
header('Content-type: ' . $content_type.'');
header('Cache-Control: private, max-age=0, must-revalidate');
header('Pragma: public');
ini_set('zlib.output_compression', '0');
echo $this->content;
} else {
echo $this->message;
}

View File

@ -0,0 +1,10 @@
<div id="dashboard">
<h2>Gestion des commandes</h2>
<a href="<?=$this->url(array('controller' => 'gestion', 'action' => 'commandes'))?>">Liste des commandes</a><br />
<a href="<?=$this->url(array('controller' => 'gestion', 'action' => 'enrichissements'))?>">Liste des commandes terminées</a><br/>
<a href="<?=$this->url(array('controller' => 'gestion', 'action' => 'ciblages'))?>">Liste des ciblages</a><br />
<h2>Facturation</h2>
<a href="<?=$this->url(array('controller' => 'gestion', 'action' => 'customerparams'))?>">Gestion des paramètres clients</a><br/>
</div>

View File

@ -0,0 +1,34 @@
<div id="dashboard">
<?=$this->message?>
<?php if (!$this->disableForm) {?>
<form name="profil" method="post" action="<?=$this->url(array('controller'=>'gestion', 'action'=>'profiladd'))?>">
<input type="hidden" name="idClient" value="<?=$this->idClient?>"/>
<label>login</label>
<input type="text" name="login" />
<br/>
<label>service</label>
<input type="text" name="service" />
<br/>
<label>Reference</label>
<input type="text" name="reference" />
(Pour appliquer les paramètres du client mettre "default")
<br/>
<div>
<label>Selection des données pour l'enrichissement</label>
<select style="padding:5px;" name="criteres[]" multiple size="20">
<?php if ( count($this->fields)>0 ) {?>
<?php foreach ( $this->fields as $value => $item ) {?>
<option value="<?=$value?>"><?=$item['label']?></option>
<?php }?>
<?php }?>
</select>
</div>
<input type="submit" name="submit" value="Enregistrer"/>
</form>
<?php }?>
</div>

View File

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

View File

@ -0,0 +1,45 @@
<div id="dashboard">
<div>
<form method="post" action="<?=$this->url(array('controller'=>'gestion', 'action'=>'profils'), null, true)?>">
IdClient : <input type="text" name="idClient" /> - Login : <input type="text" name="login" />
<input type="submit" name="rechercher" value="Rechercher"/>
</form>
</div>
<h2>Liste des profils</h2>
<table>
<thead>
<tr>
<th>Nom</th>
<th>login</th>
<th>reference</th>
<th>tarifLigne</th>
<th>dateAjout</th>
<th>dateSuppr</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php foreach ( $this->profils as $profil ) {?>
<tr>
<td><?=$profil['nom']?></td>
<td><?=$profil['login']?></td>
<td><?=$profil['reference']?></td>
<td><?=$profil['tarifLigne']?></td>
<td><?=$profil['dateAjout']?></td>
<td><?=$profil['dateSuppr']?></td>
<td>
<?php if ($profil['actif']==1) {?>
<a href="<?=$this->url(array('controller'=>'gestion', 'action'=>'profildel', 'id'=>$profil['id']))?>">Désactiver</a>
<?php } else {?>
<a href="#">Activer</a>
<?php }?>
</td>
</tr>
<?php }?>
</tbody>
</table>
</div>

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