Compare commits

...

515 Commits

Author SHA1 Message Date
Claire DELBOS
fe0fb41d04 SD-28 2017-04-14 09:34:29 +02:00
Claire DELBOS
220aa8e27c SD-32 2017-04-14 09:11:10 +02:00
Claire DELBOS
9a8a008d03 SD-28 2017-04-13 12:10:44 +02:00
Claire DELBOS
65831d3194 SD-35 SD-28 2017-04-11 16:37:57 +02:00
Claire DELBOS
b63addf2a4 SD-30+SD-33 2017-04-07 11:20:55 +02:00
potier
d1d3448e2d Merge branch 'bilanconfidentiel' into 'develop'
Bilanconfidentiel

See merge request !1
2017-03-29 08:29:02 +00:00
benoitpotier
0e2ad852b2 delete cash 2017-03-27 17:02:45 +02:00
benoitpotier
442ded2379 Merge branch 'develop' of gitlab.factory.insight.doubletrade.com:scores/extranet into bilanconfidentiel 2017-03-27 14:38:05 +02:00
Michael RICOIS
71d9e899f9 Plus de vérification à la connexion 2017-03-23 21:08:18 +01:00
benoitpotier
2b9e237d31 delete dead code 2017-03-23 15:28:50 +01:00
benoitpotier
bdc8be3670 progress confidentiel 2017-03-21 16:16:53 +01:00
benoitpotier
a0ebfe4d14 modification de la visibilité des rapports confidentiels 2017-03-21 09:47:05 +01:00
benoitpotier
5313c9265b suppression renseignement du confidentiel ou non lors de la saisie du bilan 2017-03-21 08:53:24 +01:00
benoitpotier
3510df43e2 ne pass visualiser un bilan confidentiel 2017-03-20 14:31:58 +01:00
benoitpotier
9eec98395b saisi bilan confidentiel peut avoir une valeur 2017-03-17 16:25:22 +01:00
benoitpotier
4a384d6f79 ajout message bilan confidentiel lors de la consultations d'un bilan de liasse fiscale, ajout d'un champ confidentiel lors de la saisie d'un bilan 2017-03-17 11:55:24 +01:00
Michael RICOIS
c12ac41b8a Bilan confidentiel : Design 2017-03-09 12:32:52 +01:00
Michael RICOIS
1fd1e78603 Remove cache 2017-03-09 12:09:01 +01:00
Michael RICOIS
e8ad4db136 Remove IDE syntax error 2017-03-09 11:07:44 +01:00
Michael RICOIS
ed53d33b7e Gestion de l'affichage des bilans confidentiel 2017-03-08 16:17:07 +01:00
Michael RICOIS
23bd68129c Fix typo 2017-03-07 15:56:34 +01:00
Michael RICOIS
693675583e Delete config key, n'existe pas ! 2017-03-07 14:55:17 +01:00
Michael RICOIS
f74eef8399 Remove "temp" directory in shared 2017-03-07 14:50:28 +01:00
Michael RICOIS
b9b5c774e5 Comment Console et ChromePHP handler to not disturb ajax request 2017-02-20 16:59:03 +01:00
Michael RICOIS
2346302684 Use ChromePhpHandler 2017-02-20 12:07:51 +01:00
Michael RICOIS
98378fa6df Typo 2017-02-16 11:13:20 +01:00
Michael RICOIS
d1936057f9 Merge branch 'logger' into develop 2017-02-16 11:05:32 +01:00
Michael RICOIS
511dfa92d7 Soap Try-Catch 2017-02-14 11:40:29 +01:00
Michael RICOIS
4a1ea34d41 Dialog annonce : javascript redesign 2017-02-14 11:37:32 +01:00
Michael RICOIS
7f43461f7d dupliqueAnnonce : errorMsg 2017-02-14 11:33:51 +01:00
Michael RICOIS
8a95034deb Uncomment 2017-02-14 11:33:24 +01:00
Claire DELBOS
f59827e869 Passage webservice en version 2 + correction affichage du dialogue 2017-02-14 09:56:20 +01:00
Michael RICOIS
b8cd36c2a2 Fix var type for logger 2017-02-13 16:56:06 +01:00
Michael RICOIS
cc4592eddd Logger 2017-02-13 14:08:23 +01:00
Michael RICOIS
f55fa25915 Add logger 2017-02-13 13:53:52 +01:00
Michael RICOIS
a880dea68d Add use 2017-02-13 13:53:40 +01:00
Michael RICOIS
0c6e07b12c Declare logger 2017-02-13 12:06:18 +01:00
Michael RICOIS
3f814645e5 Add logger var 2017-02-13 12:02:09 +01:00
Michael RICOIS
af0d432680 Monolog in registry 2017-02-10 16:54:46 +01:00
Michael RICOIS
f19057dcca Add Monolog 2017-02-10 16:54:29 +01:00
Michael RICOIS
5f27da2646 Mail : From and To 2017-02-10 16:38:46 +01:00
Michael RICOIS
4b2e22ba21 Mise à jour de la documentation et simplification 2017-02-10 15:22:47 +01:00
Michael RICOIS
2c2d31afe6 Change config 2017-02-10 11:12:01 +01:00
Michael RICOIS
9069fd32e3 Attribut class manquant pour appel javascript 2017-02-07 13:33:17 +01:00
Michael RICOIS
cb9ff5f7b1 Fix TcPdf 2017-02-01 13:16:30 +01:00
Michael RICOIS
7dd700c160 Reduce notice 2017-01-31 11:27:03 +01:00
Michael RICOIS
47b413ee21 Change from pour l'envoi des emails 2017-01-31 10:50:52 +01:00
Michael RICOIS
781441ff56 Impression annonce unitaire 2017-01-27 10:58:34 +01:00
Michael RICOIS
d491b35fcd Nettoyage jstree 2017-01-27 10:49:06 +01:00
Michael RICOIS
dd75075e2c Merge branch 'jstree' into develop 2017-01-27 10:16:47 +01:00
Michael RICOIS
a408af31b6 Formattage 2017-01-27 10:16:18 +01:00
Jean Vladimir TWAHIRWA
612b8176df modif dans le code d'impression 2017-01-27 09:39:47 +01:00
Jean Vladimir TWAHIRWA
fe436afb8e use jstree-3.3.3 2017-01-27 09:10:08 +01:00
Michael RICOIS
25b8870f16 Bascule des alertes dans suivi 2017-01-19 11:10:25 +01:00
Michael RICOIS
cae5250e25 Validation visuel 2017-01-18 10:50:04 +01:00
Michael RICOIS
c0960cfa21 Format 2017-01-18 10:28:09 +01:00
Michael RICOIS
aab33cf83b Format 2017-01-17 16:45:06 +01:00
Michael RICOIS
0205411e8c Normalize.css version 5.0.0 2017-01-17 16:41:15 +01:00
Michael RICOIS
38cc757542 Explode view annonce 2017-01-17 16:23:31 +01:00
Michael RICOIS
4363454eb1 Target 2017-01-17 14:07:15 +01:00
Michael RICOIS
2367e4ca0f Lien vers le site avis de situation dans le message d'erreur 2017-01-17 14:05:46 +01:00
Michael RICOIS
db1fb57858 Récupération du bodacc PDF
Modification de la récupération du bodacc pdf pour gérer les témoins de
publication unitaire
2017-01-17 13:51:10 +01:00
Michael RICOIS
e8d13e6044 cli getTemoinPdf 2017-01-16 17:12:04 +01:00
Michael RICOIS
7b441166ec Composer 2017-01-16 15:09:23 +01:00
Michael RICOIS
e5d5446299 Action on ID 2017-01-05 11:09:58 +01:00
Michael RICOIS
5c96452849 Comment PHP7 2017-01-05 11:06:18 +01:00
Michael RICOIS
de8413e567 Comment PHP7 2017-01-05 11:04:40 +01:00
Jean Vladimir TWAHIRWA
1d004772b2 Merge branch 'develop' of ssh://git@172.18.8.5:10022/SCORES/extranet.git into develop 2017-01-05 11:03:59 +01:00
Michael RICOIS
178909c96d Test sans A 2017-01-05 10:51:14 +01:00
Michael RICOIS
4c1b289301 Correction sur le select 2017-01-03 16:06:01 +01:00
Michael RICOIS
bc4178eab1 Modification des liens "recherche directe"
Lien direct fiche identité
Lien direct indiscore
Utilisation de font awesome
Intégration des modifications réalisées dans develop
2017-01-03 15:38:40 +01:00
Michael RICOIS
9bff3e63f7 Merge branch 'develop' into indiscore-color 2017-01-03 14:05:51 +01:00
Michael RICOIS
a0bbaa731a Nouvelles icones avec font awesome 2017-01-03 14:02:46 +01:00
Michael RICOIS
fff3e2c4c7 Vert-Orange-Rouge pour l'affichage du score 2017-01-03 13:26:07 +01:00
Michael RICOIS
a9943ea9ec Comment border on content 2017-01-02 09:46:57 +01:00
Michael RICOIS
972feba6b8 Logo 2016-12-23 15:06:45 +01:00
Michael RICOIS
e78dcb7b87 Add logo 2016-12-23 15:03:23 +01:00
Michael RICOIS
f450fbdee2 Background blanc 2016-12-23 15:02:54 +01:00
Michael RICOIS
c002f0ca73 Merge branch 'ui-1.12' into develop 2016-12-23 11:22:52 +01:00
Michael RICOIS
f11f90079f Merge branch 'ol-3.20.1' into develop 2016-12-23 11:22:44 +01:00
Michael RICOIS
95c8720db7 Font Awesome version 4.7.0 2016-12-23 11:18:56 +01:00
Michael RICOIS
63c56c8319 Update OpenLayers to version 3.20.1 2016-12-23 11:07:39 +01:00
Michael RICOIS
b164a1e211 JQuery UI 1.12.1 2016-12-23 11:02:19 +01:00
Michael RICOIS
375643c23d Suppression InExtenso BETA 2016-12-22 14:56:06 +01:00
Michael RICOIS
12b82219fd Suppression errorMsg 2016-12-22 14:45:14 +01:00
Michael RICOIS
65bcaff595 Ne pas lever d'exception sur ssoAuthenticate 2016-12-22 11:34:59 +01:00
Michael RICOIS
93383f9bd9 Orthographe 2016-12-12 11:48:29 +01:00
Michael RICOIS
bcb2eff28a Remove beta 2016-12-12 10:29:13 +01:00
Michael RICOIS
3898d7ee9e CS 2016-12-02 15:35:08 +01:00
Michael RICOIS
c3a98c7c4a BOMP 2016-11-29 10:53:25 +01:00
Michael RICOIS
1bb82500a1 Fix issue sur la liste BOAMP et la panination 2016-11-28 11:48:38 +01:00
Jean Vladimir TWAHIRWA
60657ac327 Merge branch 'develop' of ssh://git@192.168.78.249:10022/SCORES/extranet.git into develop 2016-11-21 17:26:34 +01:00
Jean Vladimir TWAHIRWA
0692653f61 2016-11-09 12:14:29 +01:00
Michael RICOIS
0f27e69168 Suppression de la liste des JALs 2016-10-28 14:18:57 +02:00
Michael RICOIS
c84f16d90c Prise en compte de l'Absorption et Dissolution dans l'affichage 2016-10-28 09:36:03 +02:00
Jean Vladimir TWAHIRWA
38402789f7 print pdf and save streetview img 2016-10-26 17:11:04 +02:00
Michael RICOIS
b03b403ea5 Etc file move to ansible 2016-10-25 15:57:22 +02:00
Michael RICOIS
70990e4d6e Update documentation 2016-10-25 15:55:26 +02:00
Michael RICOIS
5b64ab8996 Remove old file 2016-10-25 15:55:09 +02:00
Michael RICOIS
6a66500da6 Add better style for printing 2016-10-25 15:43:32 +02:00
Michael RICOIS
195865a347 Merge branch 'develop' of ssh://git@192.168.78.249:10022/SCORES/extranet.git into develop 2016-10-24 11:27:21 +02:00
Michael RICOIS
933691c9be Remove service Gestion v0.3 and add service Account v0.1 2016-10-24 11:27:06 +02:00
Jean Vladimir TWAHIRWA
d2f865f9b9 Merge branch 'develop' of ssh://git@192.168.78.249:10022/SCORES/extranet.git into develop 2016-10-12 17:17:41 +02:00
Jean Vladimir TWAHIRWA
9fd67f1c30 ajouter le formulaire d'ajout , d'edution et suppression d'un RIB/IBAN 2016-10-12 17:17:25 +02:00
Abdoulaye SIBY
6f23a8fc20 commit 2016-10-12 16:01:10 +02:00
Abdoulaye SIBY
d63f1d0e6e Menu Evaluation>Patrimoine:
Ajout de libellés pour la colonne Rôle en info bulle + m² pour les
superficies.
2016-10-12 16:01:10 +02:00
Michael RICOIS
2be85368b2 forward 2016-10-12 15:45:40 +02:00
Abdoulaye SIBY
f104f8364d Menu Eléments juridiques>Contentieus Judiciaires
correction pagination
2016-10-10 16:57:39 +02:00
Michael RICOIS
6846c9934f Indiscore2 : Suppression des commentaires 2016-09-26 11:38:05 +02:00
Michael RICOIS
182a6c1b8e Gestion erreur dans cadastre 2016-09-26 11:19:06 +02:00
Michael RICOIS
b012fa258c JS document.ready shorthand 2016-09-22 14:18:55 +02:00
Michael RICOIS
39a3940463 Typo 2016-09-20 17:19:12 +02:00
Michael RICOIS
eb4197440b Typo 2016-09-20 17:18:11 +02:00
Michael RICOIS
3ba5c8d1cb Deprecated 2016-09-20 16:37:56 +02:00
Michael RICOIS
82f3479ba1 Pas d'information cadastre 2016-09-14 15:22:04 +02:00
Michael RICOIS
9da9eb6c43 Amélioration connexion IP Only avec ajout de debug 2016-09-14 13:33:37 +02:00
Michael RICOIS
ebde33371c Remove placeholder 2016-09-14 11:45:25 +02:00
Michael RICOIS
d88a8797c9 Update Zend Framework to version 1.12.20 2016-09-09 09:55:01 +02:00
Michael RICOIS
56bb17e306 Surveillance : Chaine email(s) original 2016-09-06 16:46:25 +02:00
Michael RICOIS
788421dca0 Surveillance : Tous les emails 2016-09-06 16:44:57 +02:00
Michael RICOIS
a499b8f62c Move .user.ini in public 2016-08-30 17:20:46 +02:00
Michael RICOIS
e9dbfcacd9 Remove mobile theme 2016-08-30 17:15:51 +02:00
Michael RICOIS
19622ba55b Remove IE6 upgrade information 2016-08-30 17:13:49 +02:00
Michael RICOIS
a9f78a96b9 Font Awesome 4.6.3 2016-08-30 17:08:01 +02:00
Michael RICOIS
4c4d8f8020 JQuery version 1.12.4 2016-08-30 17:06:28 +02:00
Michael RICOIS
1dceec275c JQuery UI version 1.11.4 2016-08-30 17:03:59 +02:00
Michael RICOIS
6cbb49ba03 Remove IE6 support 2016-08-30 16:51:58 +02:00
Michael RICOIS
794980e4bf Upgrade bootstrap to version 3.3.7 2016-08-30 16:46:58 +02:00
Michael RICOIS
4e6b6f1830 Cadastre : Test affichage 2016-08-01 12:04:58 +02:00
Michael RICOIS
978c11bd20 Vue cadastre, patrimoine foncier 2016-07-29 17:37:50 +02:00
Michael RICOIS
53c96de7cd Logging by email sur les requetes WS 2016-07-11 14:20:18 +02:00
Michael RICOIS
3c181592e0 Message editon utilisateur 2016-07-08 15:28:42 +02:00
Michael RICOIS
775954a8c0 Add prefetch 2016-07-07 10:19:18 +02:00
Michael RICOIS
dcfe78b3c3 Saisie de bilan : Correction pour la création de nouveau bilan 2016-06-22 11:36:53 +02:00
Michael RICOIS
cff02fad4b Correction du n'importe quoi webservice 2016-06-20 11:20:13 +02:00
Michael RICOIS
ab23f5e9db Affichage dans la vue NumRM et ActiviteArtisanale 2016-06-20 09:40:03 +02:00
Michael RICOIS
05af026824 Activité Artisanale et NumRM 2016-06-20 09:09:57 +02:00
Michael RICOIS
1d7a0b91ee Ignore 2016-05-13 16:03:32 +02:00
Michael RICOIS
a43e1bc0f7 Commentaire 2016-05-13 16:01:06 +02:00
Michael RICOIS
b509df228c Merge error 2016-04-20 17:31:16 +02:00
Michael RICOIS
4425400587 Merge branch 'hotfix-bodaccpdf' into develop
Conflicts:
	.gitignore
2016-04-20 17:30:20 +02:00
Michael RICOIS
b8a7edc0c2 Bodacc Pdf : Changement de l'url de détail de l'annonce 2016-04-20 17:28:14 +02:00
Michael RICOIS
91cc5d9dc2 Ignore eclipse file 2016-04-20 17:27:32 +02:00
Michael RICOIS
7aba73e82f Ignore eclipse file 2016-04-19 17:33:02 +02:00
Michael RICOIS
e672855857 Merge : Contentieux et plus 2016-04-18 09:32:50 +00:00
Michael RICOIS
b27361b00f Contentieux : libellé demandeur/defendeur 2016-04-14 15:27:19 +00:00
Michael RICOIS
f3b2ab1b8c Contentieux : Formulaire demandeur / défendeur 2016-04-14 15:03:49 +00:00
Michael RICOIS
95940ad113 Gestion des Exceptions après retour de l'API 2016-04-12 15:36:05 +00:00
Michael RICOIS
7a7819dffd JQuery to version 1.2.3 2016-04-12 13:29:09 +00:00
Michael RICOIS
9d221555d9 Debug 2016-04-12 11:42:09 +00:00
Michael RICOIS
6aae492e1a Contentieux : affichage multiple de tiers 2016-04-11 13:23:44 +00:00
Michael RICOIS
632b7379bf Contentieux : Modification des libellés et des dates 2016-04-11 12:47:33 +00:00
Michael RICOIS
2f3b0d96e8 Svn ignore 2016-04-07 15:58:19 +00:00
Michael RICOIS
02db4d4415 Plugin ajout debug 2016-04-07 15:48:55 +00:00
Michael RICOIS
f29a3b62d8 Contentieux : Liste et Détails (alpha) 2016-04-06 12:29:06 +00:00
Michael RICOIS
5942b7f910 Redraw 2016-03-24 14:27:50 +00:00
Michael RICOIS
039c4a9389 Avis de situation Insee : changement URL 2016-03-16 08:45:29 +00:00
Michael RICOIS
fe876711c4 Insee : Avis de situation changement d'url 2016-03-15 16:53:16 +00:00
Michael RICOIS
304942f6eb Redirection avis de situation Insee 2016-03-15 16:14:46 +00:00
Michael RICOIS
aa1da6105a Merge from 2.9 2016-03-10 09:06:11 +00:00
Michael RICOIS
47aa8d5120 Fichier bilan association : correction 2016-03-10 09:04:22 +00:00
Michael RICOIS
ec16449ace Association : Suppression upload fichier - tout dans le backoffice 2016-03-04 13:11:29 +00:00
Michael RICOIS
7f8c21a1b7 Chemin statut association - directement télécharger depuis le webservice 2016-03-04 13:06:29 +00:00
Michael RICOIS
27b3470ef3 Chemin statut association 2016-03-04 12:52:05 +00:00
Michael RICOIS
ef725bdccf Merge Telechargement : Use view 2016-03-03 10:31:32 +00:00
Michael RICOIS
2dc2888d59 Telechargement : Use view 2016-03-03 10:29:28 +00:00
Michael RICOIS
d7a26d08fb Merge : Correction Typo et chemin fichier 2016-03-03 10:18:20 +00:00
Michael RICOIS
7bd5c35c0b Typo 2016-03-03 10:16:02 +00:00
Michael RICOIS
f30e5e99b3 bilaninput : Correction chemin 2016-02-29 14:52:18 +00:00
Michael RICOIS
040abaf47a Merge from 2.9 - ready to release 2016-02-25 14:26:26 +00:00
Michael RICOIS
35dc1b6fa2 Changement texte 2016-02-24 15:43:10 +00:00
Michael RICOIS
90d77a46b2 Situation Juridique : Prise en compte de l'indicateur CL 2016-02-24 15:06:56 +00:00
Michael RICOIS
c208e4d983 Permission facade 2016-02-17 15:01:34 +00:00
Michael RICOIS
1f810e6f35 Correction apache_get_modules pour php-fpm 2016-02-16 20:51:22 +00:00
Michael RICOIS
2d05c013e3 Correction chemin du cache 2016-02-15 16:26:06 +00:00
Michael RICOIS
2b50287f74 Correction config 2016-02-12 16:41:07 +00:00
Michael RICOIS
4e18b0e3ca Correction chemin 2016-02-12 15:19:50 +00:00
Michael RICOIS
2652a543d8 Changement des chemins 2016-02-12 14:25:27 +00:00
Michael RICOIS
a4852ad06c Change path 2016-02-11 21:17:32 +00:00
Michael RICOIS
36a4224564 Merge from 2.8 2016-02-11 21:17:00 +00:00
Michael RICOIS
00968f0717 Merge from branch 2.8 - Ready to release 2016-02-09 08:41:36 +00:00
Michael RICOIS
fa22480576 Merge from branch 2.8 2016-01-27 10:25:32 +00:00
Michael RICOIS
b61f5eb7b2 Merge from branch 2.8 2016-01-14 11:06:51 +00:00
Michael RICOIS
ea9a06bf1e Merge : add footer 2015-11-18 13:36:17 +00:00
Michael RICOIS
f48f518288 Merge avec quelques corrections 2015-10-29 13:03:45 +00:00
Michael RICOIS
4db5749fac Update 2015-10-27 10:57:40 +00:00
Michael RICOIS
0cd5a11b1a Intégration des modules 2015-10-27 08:31:20 +00:00
Michael RICOIS
fe7ab9bd0c Helper path 2015-10-06 10:15:01 +00:00
Michael RICOIS
2c44586f73 Put cgu.phtml in hte right place 2015-10-06 09:42:53 +00:00
Michael RICOIS
88266275e1 Formattage 2015-10-06 09:34:39 +00:00
Michael RICOIS
8a7b5aef09 Use modules 2015-10-05 15:38:02 +00:00
Michael RICOIS
dd6d0d4de0 Include phpexcel and ChromePHP to composer 2015-10-05 15:22:42 +00:00
Michael RICOIS
46713404f9 Test module in Zend 2015-10-05 10:14:32 +00:00
Michael RICOIS
321b287009 Update from branch 2.7 2015-09-25 15:52:54 +00:00
Michael RICOIS
232836c58b Suppression Zend 2015-09-25 15:41:50 +00:00
Michael RICOIS
bcda409a92 Composer, Nettoyage 2015-09-25 12:38:03 +00:00
Michael RICOIS
629738175e Toujours ecrasé la configuration 2015-09-25 08:41:30 +00:00
Michael RICOIS
3f0c5ff9cc Acte association : correction url de téléchargement du fichier 2015-09-09 15:44:07 +00:00
Michael RICOIS
a9c63bda99 Supprime commentaire 2015-09-03 12:12:32 +00:00
Michael RICOIS
c130761fbe Supprime double appel 2015-09-03 12:10:34 +00:00
Michael RICOIS
33dceaf10c Small Merge 2015-09-01 12:29:38 +00:00
Michael RICOIS
38e4d0fe61 Correction livraison des fichiers 2015-08-31 13:29:59 +00:00
Michael RICOIS
95bf03bf01 Liste des établissements sur even 6700 2015-08-31 13:22:53 +00:00
Michael RICOIS
2e6000dfe2 Mise à jour de l'authentification 2015-08-31 12:18:19 +00:00
Michael RICOIS
3c5952ba55 Format 2015-08-31 08:21:20 +00:00
Michael RICOIS
f35ea85ff1 Remove comment 2015-08-27 14:08:30 +00:00
Michael RICOIS
b991ccce98 Merge from branch 2.7 2015-08-07 13:41:38 +00:00
Michael RICOIS
80be8e6120 Add max execution time 2015-08-07 13:33:53 +00:00
Michael RICOIS
ff47b388b1 Surveillance Fichier 2015-08-07 12:44:55 +00:00
Michael RICOIS
cf6187afd3 Lien odea 2015-08-06 09:46:04 +00:00
Michael RICOIS
1d18085804 Gestion des fichiers CRM 2015-08-06 09:37:27 +00:00
Michael RICOIS
399ed2f638 Merge from branch 2.8, ready to release 2015-07-28 14:20:44 +00:00
Michael RICOIS
bb730beb21 Asso Statut 2015-07-28 13:24:59 +00:00
Michael RICOIS
20995376c5 Acte Association : Branchement webservice 2015-07-28 08:51:50 +00:00
Michael RICOIS
d44264c7bf ClassMap 2015-07-22 12:16:08 +00:00
Michael RICOIS
2895ef2238 Modification graphique 2015-07-21 09:34:10 +00:00
Michael RICOIS
6fc8a8f263 Variable theme 2015-07-16 15:48:12 +00:00
Michael RICOIS
755371360a Un seul fichier classmap 2015-07-16 15:42:55 +00:00
Michael RICOIS
662b4f598a Simplification de la gestion du theme 2015-07-15 13:17:26 +00:00
Michael RICOIS
e2d7be2280 Log by mail 2015-07-15 07:18:25 +00:00
Michael RICOIS
188a0c6941 Carte Geocodage 2015-07-10 18:40:07 +00:00
Michael RICOIS
ccc10ba342 Chemin du theme 2015-07-10 14:14:55 +00:00
Michael RICOIS
21e1787258 User with mode edition could only update gps 2015-07-09 20:12:52 +00:00
Michael RICOIS
4874a840dc RNVP : Tooltip bottom 2015-07-09 20:10:57 +00:00
Michael RICOIS
0be6a056f9 Mail ISO-8859-15 2015-07-09 20:10:17 +00:00
Michael RICOIS
035dabfe72 Configuration de la variable theme 2015-07-08 20:38:22 +00:00
Michael RICOIS
95dee93d55 Ajout theme dans les controllers 2015-07-08 13:48:28 +00:00
Michael RICOIS
42579572e7 Simplification de la gestion des scripts et styles 2015-07-07 12:16:24 +00:00
Michael RICOIS
1840e464d3 Remove form.css 2015-07-07 05:31:30 +00:00
Michael RICOIS
ff7e71dcb8 Ajout des éléments pour openstreetmap 2015-07-06 14:45:23 +00:00
Michael RICOIS
d34b17bd16 Préparation modification affichage carte 2015-07-06 12:29:13 +00:00
Michael RICOIS
60fe74b931 Diverses corrections 2015-07-05 19:31:11 +00:00
Michael RICOIS
e2d59d385a Mise à jour pour les connexions en IP 2015-07-04 15:06:35 +00:00
Michael RICOIS
849b3fd592 Merge to release 2015-07-03 09:39:58 +00:00
Michael RICOIS
02cf20aa85 Amélioration javascript mise en surveillance 2015-07-03 09:19:34 +00:00
Michael RICOIS
8b39a102dd Mise à jour autoload 2015-07-03 09:19:11 +00:00
Michael RICOIS
d36d1bf3fd RNVP : Correction obtention CP, issue #0002113 2015-07-01 09:52:03 +00:00
Michael RICOIS
9d9967a194 Font 2015-07-01 09:47:05 +00:00
Michael RICOIS
3dea181b3f Changement pour la carte google 2015-06-24 08:20:19 +00:00
Michael RICOIS
4fc8741011 Prepare release with bug correction and update on libs 2015-06-22 14:51:33 +00:00
Michael RICOIS
9b6faac530 Update autoload 2015-06-21 16:08:23 +00:00
Michael RICOIS
f9303bb6ab Remove elements 2015-06-19 15:17:25 +00:00
Michael RICOIS
f4ee5ee3b7 Amélioration de la gestion de l'authentification 2015-06-19 14:02:41 +00:00
Michael RICOIS
d86685b235 Gestion du mode cli lors de requete SOAP 2015-06-17 15:55:24 +00:00
Michael RICOIS
d171491909 AltiScore : Meilleure gestion des erreurs 2015-06-17 15:54:46 +00:00
Michael RICOIS
8e434a509c RVNP, gestion des permissions, cedexa et bug affichage sur autre page, issue #0002113 2015-06-16 15:34:57 +00:00
Michael RICOIS
be3e54c893 Correction envoi mail mot de passe oublié 2015-06-16 09:24:43 +00:00
Michael RICOIS
d1abec4736 Nettoyage 2015-06-16 08:26:31 +00:00
Michael RICOIS
9fc9b4a1f5 Compatibility PHP 5.3 2015-06-12 12:54:55 +00:00
Michael RICOIS
c9283be530 Marqueur de la carte google 2015-06-12 12:54:31 +00:00
Michael RICOIS
25238322c6 Prepare release 2015-06-12 10:11:01 +00:00
Michael RICOIS
888a4c9ff0 Modification pour Altiscore 2015-06-12 10:05:20 +00:00
Michael RICOIS
9d112408b2 Correction libellé detail et affichage de l'adresse officielle, issue #0002113 2015-06-12 09:34:41 +00:00
Michael RICOIS
34a5d27545 New Mail Method 2015-06-11 15:29:14 +00:00
Michael RICOIS
98249c732b Correction affichage 2015-06-11 15:09:03 +00:00
Michael RICOIS
552826b24d Update JQuery 1.11.3 et Boostrap version 3.3.4 2015-06-10 19:13:54 +00:00
Michael RICOIS
254a307a00 Correction affichage de la date précédente dans la liste des liasses 2015-06-10 15:20:39 +00:00
Michael RICOIS
e341f05b27 Des trucs sur les pièces officielles 2015-06-10 15:06:21 +00:00
Michael RICOIS
414aaf0b06 Mise en place des la nouvelle architecture des mails 2015-06-10 14:52:05 +00:00
Michael RICOIS
bc6aa8dd56 Affichage RNVP, issue #0002113 2015-06-10 14:47:21 +00:00
Michael RICOIS
caa6b3e352 Affichage RNVP, issue #0002113 2015-06-10 14:40:05 +00:00
Michael RICOIS
a9f701f686 Init url 2015-06-03 15:05:59 +00:00
Michael RICOIS
6747741f73 Commande de statuts association 2015-06-03 08:10:07 +00:00
Michael RICOIS
2c6ca95cf4 RNVP : lien dans le pop-up, issue #0002113 2015-06-02 09:00:39 +00:00
Michael RICOIS
097398b8d6 Groupe d'appartenance avec lien de redirection 2015-06-02 08:54:10 +00:00
Michael RICOIS
15c1692954 RNVP : id dans la vue, issue #0002113 2015-06-01 13:10:59 +00:00
Michael RICOIS
773ad16984 RNVP : url detail, issue #0002113 2015-06-01 13:05:33 +00:00
Michael RICOIS
2ff0ab71d3 Toujours ecraser la configuration 2015-06-01 12:30:29 +00:00
Michael RICOIS
299b82d7bb Add Staging config 2015-06-01 12:25:41 +00:00
Michael RICOIS
1a85db9a0e Webservice version 2.8 2015-06-01 12:24:23 +00:00
Michael RICOIS
292b6be99a RNVP : icone enveloppe barré, issue #0002113 2015-06-01 12:09:10 +00:00
Michael RICOIS
fc1b2bd641 Prise en compte de la selection du mois 2015-06-01 10:26:11 +00:00
Michael RICOIS
680eeeb122 Formattage 2015-05-28 14:37:48 +00:00
Michael RICOIS
d1f75a8473 Commandes et Jugements 2015-05-28 14:32:46 +00:00
Michael RICOIS
140d10497e issue #0002113 : Menu RNVP 2015-05-28 14:10:32 +00:00
Michael RICOIS
bb276c2e42 issue #0002113 : Affichage de la normalisation postale 2015-05-28 13:36:10 +00:00
Michael RICOIS
09b46a6146 Changement pour l'appel au webservice 2015-05-28 13:28:12 +00:00
Michael RICOIS
37eb6af5a7 Export liasse XLS : Truc de merde 2015-05-27 10:30:49 +00:00
Michael RICOIS
36708cb12f Prepare release 2015-05-19 15:38:35 +00:00
Michael RICOIS
1a6f1cd192 PHPExcel version 1.8.0 2015-05-18 15:35:15 +00:00
Michael RICOIS
fe7b6d2670 INEXTENSO : Changement 2015-05-18 15:13:49 +00:00
Michael RICOIS
333cdb4fd4 Ajout compatibilité avec le reverse proxy 2015-04-15 07:45:11 +00:00
Michael RICOIS
8c1ee84980 Correction 2015-04-15 07:21:45 +00:00
Michael RICOIS
b3fec8fcc9 Merge to prepare release 2015-04-10 12:06:16 +00:00
Michael RICOIS
0537dbf145 Harmonie dans la gestion des scrores 2015-04-10 11:57:56 +00:00
Michael RICOIS
93822b64b2 Harmonie dans la gestion des scrores 2015-04-09 15:10:42 +00:00
Michael RICOIS
3acfe69edb Merge from branch 2.7 to prepare release 2015-04-09 08:22:33 +00:00
Michael RICOIS
51bfe130d0 Geo localisation : Ajout du siret au marqueur et validation du fonctionnement 2015-04-07 15:49:53 +00:00
Michael RICOIS
1ee1a7f6d7 Envoi geocodate et elevation au webservice 2015-04-07 09:50:54 +00:00
Michael RICOIS
ff7ef8d930 Meilleur gestion des comandes associations, bilan en saisie, privileges 2015-04-03 12:57:04 +00:00
Michael RICOIS
0cb2febdf9 Comment 2015-04-01 13:34:43 +00:00
Michael RICOIS
445a33f64f Correction pour la carte 2015-03-30 09:24:26 +00:00
Michael RICOIS
6616e7c86a Suppression tableau static des cours d'appel 2015-03-29 17:29:07 +00:00
Michael RICOIS
a68d1224ce Modification des libellés du Menu 2015-03-26 07:10:56 +00:00
Michael RICOIS
5b8ae3de07 Mise à jour model, crontab, incron 2015-03-25 19:32:32 +00:00
Michael RICOIS
f3586e1100 Saisie de bilan : Suppression lors de la création des dates prévues pour la modification 2015-03-25 15:53:17 +00:00
Michael RICOIS
65de830533 KBIS : Suppression interface et envoi mail, voir backoffice dorénavant 2015-03-25 15:38:43 +00:00
Michael RICOIS
44b801d142 Saisie Bilan : Suppression vue 2015-03-25 13:49:47 +00:00
Michael RICOIS
eac7586f9d Saisie bilan : Message sur bilan consolidé 2015-03-25 13:48:42 +00:00
Michael RICOIS
3e44cb15cd Mise a jour du fichier d'autloading 2015-03-20 10:28:46 +00:00
Michael RICOIS
7516f12a57 Move cleanchar librairie avec compatibilité autoloading 2015-03-20 09:46:52 +00:00
Michael RICOIS
2c4a3c0c87 Correction non prise en compte des bilans simplifié dans les grahiques du rapport 2015-03-20 08:32:27 +00:00
Michael RICOIS
8b13ecb596 Double comment 2015-03-18 08:21:32 +00:00
Michael RICOIS
a76a486d52 Prepare for release 2015-03-16 09:34:42 +00:00
Michael RICOIS
30bf34da4a Commande de saisie de bilan 2015-03-11 14:39:45 +00:00
Michael RICOIS
b03da5d6e8 Avis RNCS : amélioration affichage, issue #0002107 2015-03-11 14:24:27 +00:00
Michael RICOIS
6e8ab4acc6 Forward 2015-03-09 19:51:21 +00:00
Michael RICOIS
8a8f2fe7ca Formattage 2015-03-09 09:55:18 +00:00
Michael RICOIS
fa7108d999 Merge small change to upgrade 2.8 2015-03-09 09:24:29 +00:00
Jean-Marie CHAMPEAU
0cad2bae9a Corrections orthographiques 2015-03-06 11:19:11 +00:00
Jean-Marie CHAMPEAU
42c3481486 reperage des tests en dur principalement sur client (IdClient) mise à "@todo" 2015-03-06 09:14:43 +00:00
Jean-Marie CHAMPEAU
84bd15651b commentaires dans le source 2015-03-05 14:55:03 +00:00
Michael RICOIS
27280a1bf3 Change path explication 2015-03-04 16:48:22 +00:00
Michael RICOIS
ff8fade3af Add svn ignore 2015-03-03 15:59:12 +00:00
Michael RICOIS
dc83bcb73a Saisie : Correction lien "Corriger les bilans" 2015-03-03 13:47:34 +00:00
Michael RICOIS
f86a25add3 Formattage 2015-03-02 13:43:42 +00:00
Michael RICOIS
5bb8b42f24 Finance : Modification des paramètres de la liasse 2015-03-02 13:43:10 +00:00
Michael RICOIS
1b9364bff6 Set property 2015-03-02 13:35:01 +00:00
Michael RICOIS
074464fe0c Saisie : Correction Genre 2015-03-02 12:59:58 +00:00
Michael RICOIS
a7eaf870d0 Désactive l'affichage du menu lors de l'impression, issue #0002106 2015-02-25 16:02:59 +00:00
Michael RICOIS
1c5dfbef59 Prepare for release 2015-02-16 08:48:31 +00:00
Aram HARUTYUNYAN
512661073a Issue #0002089: Gestion des informations de paiement dans la table des cut-offs 2015-02-13 04:48:37 +00:00
Michael RICOIS
5e131027d6 Merge from branch 2.7 ready for release 2015-02-12 14:57:05 +00:00
Michael RICOIS
5944510d4b Upgrade Zend Framework to version 1.12.11, due to a bug in viewRender 2015-02-12 10:09:52 +00:00
Michael RICOIS
ece66a4aa5 Suppression fichier inutile 2015-02-10 11:20:59 +00:00
Michael RICOIS
1a74660ad1 correction affichage liasse, issue #0002100 2015-02-10 11:20:36 +00:00
Michael RICOIS
9c819120bf condition pour affichage commentaires indiscore 20 ou 100, issue #0002091 2015-02-04 13:12:14 +00:00
Michael RICOIS
3631fd280f Ajout du commentaire spécifique à l'indiscore 20, issue #0002091 2015-02-03 14:04:30 +00:00
Michael RICOIS
e2a8e10e05 Correction transformation poste BN, issue #0002093 2015-02-03 13:22:48 +00:00
Aram HARUTYUNYAN
8bbe87d4e9 Issue #0002088: Ajouter le score AFDCC 1 sur la page "Indiscore" et "Rapport complet" 2015-01-31 21:25:13 +00:00
Michael RICOIS
a72312608d Upgrade Bootstrap to version 3.3.2 2015-01-30 16:11:57 +00:00
Michael RICOIS
ea32a8f6dd Mise à jour des styles pour l'impression PDF et ecran 2015-01-29 16:15:40 +00:00
Michael RICOIS
918e273d97 Saisie Liasse : Correction poste LJ 2015-01-29 16:14:23 +00:00
Michael RICOIS
3e26df4a85 Correction pour les paramètres d'export des liasses 2015-01-29 16:10:09 +00:00
Michael RICOIS
5acd0b8b14 Meilleur affichage avant lancement de l'impression 2015-01-29 16:06:25 +00:00
Michael RICOIS
488288ac01 Correction pour les paramètres d'impression des liasses 2015-01-29 16:05:26 +00:00
Michael RICOIS
94b4221407 Ne pas afficher le titre de la page lors d'un appel depuis une autre page 2015-01-29 15:15:48 +00:00
Michael RICOIS
f392963dee Formattage 2015-01-26 16:11:38 +00:00
Michael RICOIS
731db00ada Non prise en compte des dates à 0000-00-00, fixed issue #0002090 2015-01-26 13:35:21 +00:00
Aram HARUTYUNYAN
4871350141 Issue #0002088: Ajouter le score AFDCC 1 sur la page "Rapport de synthèse" 2015-01-26 04:46:22 +00:00
Michael RICOIS
da429b2d1d Suppression debuggage 2015-01-22 10:53:21 +00:00
Michael RICOIS
6933de2d40 Correction affichage pourcentage ratios 2015-01-22 10:46:35 +00:00
Michael RICOIS
283d91742e Impossible d'exporter les 3 requetes webservices en XML 2015-01-22 09:09:13 +00:00
Michael RICOIS
a70a68b079 Correction affichage Nom Commercial, issue #0001920 2015-01-21 09:39:09 +00:00
Michael RICOIS
d9dafac04d Upgrade Zend to version 1.12.10 2015-01-20 21:54:47 +00:00
Michael RICOIS
a4b27fec83 Remove ini set 2015-01-20 19:39:21 +00:00
Michael RICOIS
0772c774de Add max-width to Qtip 2015-01-19 20:59:28 +00:00
Michael RICOIS
5d96d81ce2 Only cache on development 2015-01-19 11:02:26 +00:00
Michael RICOIS
dee9de2142 Prepare release 2015-01-19 09:53:49 +00:00
Michael RICOIS
7e5ad72f7e Update browscap.ini version 5038 2015-01-19 09:15:49 +00:00
Michael RICOIS
94e4793fb7 Add Apache 2.4 vhosts example 2015-01-15 15:31:39 +00:00
Yoann LENAOUR
8835ec5113 Fixed Issue #0002053: adresse et orthographe corrigées 2015-01-14 17:17:49 +00:00
Michael RICOIS
5246e7e67e Avis RNCS : Couleur "entreprise radiée" et gestion erreur, issue #0001920 2015-01-14 13:56:08 +00:00
Michael RICOIS
f40c0fb74a Correction SSO 2015-01-13 19:59:31 +00:00
Michael RICOIS
615b6a308b Evite une mauvaise reconnection lors du changement du mot de passe 2015-01-13 13:05:26 +00:00
Michael RICOIS
1c8facda82 Merge for release 2015-01-09 08:34:12 +00:00
Michael RICOIS
20269c169c Mise à jour du fonctionnement de la récupération des fichier sur le webservice 2015-01-08 13:52:49 +00:00
Michael RICOIS
c661a303d3 Update JQuery to version 1.11.2 2015-01-08 13:50:45 +00:00
Michael RICOIS
7a335eb227 In Extenso : Mise à jour des liens et paramètres 2015-01-08 13:22:00 +00:00
Michael RICOIS
51fef82a50 AvisRNCS : Création du fichier pdf et modification de l'affichage des données, issue #0001920 2015-01-08 09:58:01 +00:00
Michael RICOIS
c4bc27dabe Update Normalize.css 2015-01-07 09:38:43 +00:00
Michael RICOIS
e8bbf842da Saisie Bilan : sql format 2015-01-06 21:37:24 +00:00
Michael RICOIS
9db0232201 Saisie de bilan : séparation de réel normal et simplifié 2015-01-06 21:25:31 +00:00
Michael RICOIS
41d6a77191 Update HTML2PDF 2015-01-06 19:01:31 +00:00
Michael RICOIS
14ddffc57b Update ChromePHP logger 2015-01-06 18:58:41 +00:00
Michael RICOIS
3ef62e0b07 Remove HTML2PDF for update 2015-01-06 18:50:53 +00:00
Michael RICOIS
ad7fb3e30b Update FPDI and TCPDF 2015-01-06 18:48:53 +00:00
Michael RICOIS
a28a25a666 Remove fpdi and tcpdf for update 2015-01-06 16:53:57 +00:00
Michael RICOIS
8d3e3ad696 AvisRNCS : ajout des champs, issue #0001920 2015-01-05 15:44:32 +00:00
Michael RICOIS
046965b325 Update bootstrap to version 3.3.1 2014-12-22 14:08:43 +00:00
Michael RICOIS
faaca4e3ae CSS : Style liste des compétences 2014-12-22 11:18:25 +00:00
Michael RICOIS
99cf227b88 Only use fallback autoloader 2014-12-19 14:13:42 +00:00
Michael RICOIS
f4eb1ade06 Id client IN EXTENSO 2014-12-19 12:49:03 +00:00
Michael RICOIS
3649bc8147 Update ChartDir librairies 2014-12-19 12:42:31 +00:00
Michael RICOIS
520a769350 Liste Compétences : Correction appel 2014-12-18 16:04:47 +00:00
Michael RICOIS
d76c91833f Utilisation de profil pour la configuration 2014-12-18 15:58:10 +00:00
Michael RICOIS
7a3052aea9 Format 2014-12-17 10:01:13 +00:00
Michael RICOIS
98c3c7b6ed format 2014-12-15 16:35:42 +00:00
Michael RICOIS
b825c4f94d Update link to qtip to use minified version 2014-12-12 13:14:36 +00:00
Michael RICOIS
18579dabb0 Update JQuery Qtip2 to version 2.2.1 2014-12-12 13:13:22 +00:00
Michael RICOIS
77233c2eff Update JQuery Form to version 3.51 2014-12-12 13:12:50 +00:00
Michael RICOIS
08b5fc1917 Remove var $dir_actif 2014-12-12 12:44:46 +00:00
Michael RICOIS
348b232ba9 Format 2014-12-12 12:44:14 +00:00
Michael RICOIS
7c0fc0828e In Extenso SSO fonctionnel 2014-12-12 10:04:17 +00:00
Michael RICOIS
6b3ef76d42 Affichage du lien de saisie 2014-12-11 16:04:37 +00:00
Michael RICOIS
45e91981ab Ajout d'un logo 2014-12-11 15:53:39 +00:00
Michael RICOIS
44566343c7 New Auth method with SSO 2014-12-09 11:28:12 +00:00
Michael RICOIS
5cee230b74 Formattage 2014-12-09 11:26:12 +00:00
Aram HARUTYUNYAN
2882035024 Issue #0002077: changement de requête de ville dans la citysearchAction() 2014-12-01 03:54:39 +00:00
Michael RICOIS
279d06325d Merge from branch 2.7 2014-11-28 15:31:43 +00:00
Michael RICOIS
aad077b568 cron.d file to clear temp files 2014-11-28 15:23:35 +00:00
Michael RICOIS
c1c7cf0ac9 issue 0002080 : Meilleur prise en compte du jour à 00. On estime toujours commencer à 01. 2014-11-28 13:13:08 +00:00
Michael RICOIS
6f7947c33a Error 2014-11-28 12:55:44 +00:00
Michael RICOIS
b280097e98 cron file to remove temp file 2014-11-26 16:51:02 +00:00
Michael RICOIS
a113750f8d Typo 2014-11-26 16:45:26 +00:00
Michael RICOIS
acf4db74fb CS 2014-11-26 16:45:13 +00:00
Michael RICOIS
063fce47d5 CS 2014-11-26 16:44:40 +00:00
Michael RICOIS
fff13f6d0a Mise à jour élément Finance 2014-11-26 10:08:09 +00:00
Michael RICOIS
449e734bc4 Add readme for etc conf 2014-11-26 09:50:30 +00:00
Michael RICOIS
1d23fd4749 Update browscap definition to version 5036 2014-11-26 09:03:16 +00:00
Michael RICOIS
2017d1e548 Add auth version to user 2014-11-24 11:25:07 +00:00
Michael RICOIS
bdc6311614 Reintegrate PHPExcel 1.8.0 2014-11-21 13:43:14 +00:00
Michael RICOIS
62fa964566 Remove PHPExcel 2014-11-21 13:41:32 +00:00
Michael RICOIS
8e522a5406 Clean PHPExcel 2014-11-21 13:15:48 +00:00
Michael RICOIS
e0888c4e9c Upgrade PHPExcel to version 1.8.0 2014-11-16 18:17:46 +00:00
Michael RICOIS
e2d3086b15 issue#0001563 : Ajout version dans l'identite session 2014-11-12 15:38:02 +00:00
Michael RICOIS
761ab9796a Remove lib not use in order to recreate a new one 2014-11-04 19:17:45 +00:00
Michael RICOIS
389aae552f Prepare release 2014-10-31 13:28:29 +00:00
Michael RICOIS
47086b3f3c comment 2014-10-30 13:53:19 +00:00
Michael RICOIS
495b894b67 issue #0002067 : Saisie de bilan avec possibilité de changement date de cloture et type du bilan 2014-10-29 19:15:30 +00:00
Michael RICOIS
fe12a3f8db Merge from branch 2.7 2014-10-29 15:54:27 +00:00
Michael RICOIS
c0d2c97a2b issue #0002067 : Saisie de bilan - add maxdate 2014-10-29 13:55:14 +00:00
Aram HARUTYUNYAN
08ef62d870 Issue #0002052: ajouter la civilité 'MLLE' sur interface, car les sources officielles l'utilisent 2014-10-23 13:52:49 +00:00
Aram HARUTYUNYAN
905ed789ad Issue #0002052: Supprimer la civilité 'MLLE' de l'interface 2014-10-22 17:00:10 +00:00
Michael RICOIS
f4deebbea3 Small update 2014-10-16 18:46:23 +00:00
Michael RICOIS
630d420cb5 Liens : Visuel 2014-10-13 15:08:46 +00:00
Michael RICOIS
6b3e101020 Move extra files near installation script 2014-10-10 15:25:34 +00:00
Michael RICOIS
8014a903ae To do not surcharge site with pace, i have a bad idea 2014-09-25 07:44:55 +00:00
Michael RICOIS
7e260c46b8 Liens : Pays dans l'arborescence des groupes 2014-09-19 08:30:42 +00:00
Michael RICOIS
55c89f45a6 Visualize password when you create a new user 2014-09-04 12:58:12 +00:00
Michael RICOIS
d2c6424055 issue #0002046 : Ajout de la boite de dialog pour la commande de la saisie de bilan 2014-08-28 14:12:47 +00:00
Michael RICOIS
c670fb098b Url 2014-08-26 16:56:51 +00:00
Michael RICOIS
7bc6ff66c8 Prepare release 2014-08-25 12:23:36 +00:00
Michael RICOIS
2a723c19e0 Nom2 2014-08-21 12:48:57 +00:00
Michael RICOIS
cbb89b3c4b Reintegrate 2014-08-21 06:47:56 +00:00
Michael RICOIS
18ce347155 Upgrade bgiframe to version 3.0.1 2014-08-19 13:03:23 +00:00
Michael RICOIS
3be57511db Remove sourceMap - 404 error on IE 2014-08-19 11:59:20 +00:00
Michael RICOIS
6eef5c24fa remove file 2014-08-19 11:58:41 +00:00
Michael RICOIS
34dad882aa issue #0002043 : Ajout de configuration spécifique en dehors de l'installation 2014-08-19 09:46:02 +00:00
Michael RICOIS
a167e23c09 issue #0002043 : Ajout de configuration spécifique en dehors de l'installation 2014-08-19 07:46:54 +00:00
Michael RICOIS
3f1610665f issue #0002043 : Add option to use incron 2014-08-19 07:36:02 +00:00
Michael RICOIS
1d8e854e89 Prepare release, merge from 2.7 2014-08-14 09:41:45 +00:00
Michael RICOIS
0779441f29 OderToCash 2014-08-14 07:41:51 +00:00
Michael RICOIS
793ec60127 IE6 Support 2014-08-12 20:19:45 +00:00
Michael RICOIS
2e18c920f5 Integrate change in branch 2.7 2014-08-11 13:41:48 +00:00
Michael RICOIS
bfb8aa21f5 Update autoload_classmap.php 2014-08-11 12:56:50 +00:00
Michael RICOIS
5161d84375 issue #0002037 : Add default instead of null for the route name 2014-08-11 12:11:23 +00:00
Michael RICOIS
8f7ff3be9c New Browscap 2014-08-11 09:50:37 +00:00
Michael RICOIS
ee12ac166f Upgrade to bootstrap 3.2.0 2014-08-11 09:15:34 +00:00
Aram HARUTYUNYAN
7ec3a6fcf9 Issue #0002031: CHARSET=utf8 pour les tables créées par getCatalogue 2014-07-30 08:24:35 +00:00
Aram HARUTYUNYAN
a0d5d9ffea Issue #0002030: $_name='tabdepartements' -> $_name='tabDepartements' 2014-07-30 07:54:49 +00:00
Michael RICOIS
3929cd5acd Debug 2014-07-29 19:02:32 +00:00
Aram HARUTYUNYAN
977d49261e Issue #0002028: Récupérer le nic du siret par substr($siret, 9, 5); 2014-07-29 11:56:11 +00:00
Aram HARUTYUNYAN
a22f0b3e36 Issue #0002027: Scores_Finance_Liasse->setData(): vérification de présence des valeurs correctes dans le array des champs specifiques 2014-07-28 11:33:37 +00:00
Michael RICOIS
fa991ca764 Changement ordre d'affichage de la liasse 2014-07-17 20:28:50 +00:00
Aram HARUTYUNYAN
0664fa10d1 Issue #0001886: getCatalogDepartements() a la place de getDepartements(). Nouvelle instruction 'dep' dans le getCatalog.php pour charger les départements 2014-07-17 12:57:27 +00:00
Aram HARUTYUNYAN
b15599b5a0 Issue #0002014: Pouvoir saisir le champs "dateEffetLien" lorsqu'on supprime un lien 2014-07-15 11:54:16 +00:00
Aram HARUTYUNYAN
dfad847c53 Issue #0001925: Ne pas valider les codes isin dans l'extranet lors de la saisie (valider dans le webservice) 2014-07-11 11:51:04 +00:00
Michael RICOIS
7939ca8f9a AVIS RNCS : Numéro de dépot 2014-07-11 07:33:54 +00:00
Aram HARUTYUNYAN
3df8cd9160 Issue #0002012: [liens inter-entreprises] - Gestion des départements de naissance (PP) 2014-07-08 13:16:56 +00:00
Michael RICOIS
6be6aae252 Merge from trunk 2014-07-01 14:33:08 +00:00
Michael RICOIS
dd9d7513cb Merge from branch 2.6 2014-07-01 14:18:55 +00:00
Michael RICOIS
80f5a5b7d1 issue #0002013 : Modification sur l'affichage de la liste des établissements, saisie et liste 2014-07-01 09:15:44 +00:00
Aram HARUTYUNYAN
be343438c2 Issue #0002012: [liens inter-entreprises] - blocage de pression sur "Entrée" sur le champs de 'autocomplete' 2014-06-30 12:12:07 +00:00
Michael RICOIS
763c681d6d Merge after release 2014-06-29 20:20:41 +00:00
Aram HARUTYUNYAN
bece6ab3b1 Issue #0002003: [liens inter-entreprises] - supprimer les espaces du Siren 2014-06-26 10:53:22 +00:00
Michael RICOIS
44a94d8633 Update from trunk 2014-06-25 14:34:22 +00:00
Michael RICOIS
a6ac9ea1e0 Prepare release, Update trunk 2014-06-25 14:31:57 +00:00
Aram HARUTYUNYAN
13da6932dd Issue #0001999: corriger la formule de GW 2014-06-25 11:44:59 +00:00
Michael RICOIS
3e6af9a0d7 Correction script getBodaccPdf 2014-06-25 08:25:24 +00:00
Michael RICOIS
4ccfddc7b2 issue #0001950 : Texte des scores, issue #0001947 : Borne scores CCF 2014-06-24 15:48:08 +00:00
Michael RICOIS
81d7fc4cc8 issue #0001920 : Ajout impression 2014-06-24 13:40:29 +00:00
Michael RICOIS
4e88bf29ca issue #0001920 : Date de constitution 2014-06-24 13:34:32 +00:00
Michael RICOIS
c0bb19ec70 Merge from trunk 2014-06-23 11:09:19 +00:00
Michael RICOIS
4a886f7f56 Reintegrate Branch 2.6 2014-06-23 07:19:05 +00:00
Michael RICOIS
f5acf80d58 Use siren instead siret 2014-06-20 14:55:54 +00:00
Michael RICOIS
ce84a98925 Start the 2.7 branch dev 2014-06-20 13:03:22 +00:00
Michael RICOIS
b0a5a81c0a issue #0001920 : Date Format 2014-06-20 12:49:06 +00:00
Michael RICOIS
ede76763f1 issue #0001920 : Design et CGU 2014-06-20 08:28:02 +00:00
Michael RICOIS
a205784401 Correction variables 2014-06-20 08:00:43 +00:00
Michael RICOIS
7deeb90b8e issue #0001920 : Design et modification suite à remarques 2014-06-20 07:57:14 +00:00
Michael RICOIS
3e31c1c430 issue #0001993 : Modification du fonctionnement de la saisie des mandataires, avece retour erreur 2014-06-19 12:13:02 +00:00
Aram HARUTYUNYAN
9e528fc1a9 Issue #0001991: [Liens inter-entreprises] Effacer par trim() les tabs et espaces inutiles du nom , qu'on recherche 2014-06-19 08:02:49 +00:00
Michael RICOIS
bd1fdc8581 issue #0001986 : Gestion des commandes Kbis 2014-06-18 13:29:09 +00:00
Michael RICOIS
53c9c4c3f2 Browscap 2014-06-17 12:39:34 +00:00
Michael RICOIS
cb7d92aea9 Typo 2014-06-17 08:40:07 +00:00
Aram HARUTYUNYAN
021282fac7 Issue #0001415: Allow dates to have empty value (null), use datepicker 2014-06-17 08:32:49 +00:00
Michael RICOIS
6dbbf074b4 issue #0001979 : Récupération des coordonnées GPS en base pour utilisation sur la carte 2014-06-17 07:57:51 +00:00
Aram HARUTYUNYAN
55d4a3b63f Issue #0001415: Edition des informations boursières 2014-06-17 07:17:41 +00:00
Michael RICOIS
7829c48320 issue #0001920 : Menu Avis de situation RNCS 2014-06-16 15:31:15 +00:00
Michael RICOIS
63c13330d3 issue #0001920 : Affichage suite à ajout dans la partie données 2014-06-16 15:16:36 +00:00
Michael RICOIS
f205164cb7 Update Zend to version 1.12.7 2014-06-13 13:04:02 +00:00
Michael RICOIS
ee8f29789f Update Javascript 2014-06-12 18:47:37 +00:00
Aram HARUTYUNYAN
e310066ed7 Issue #0001984: [Liens inter-entreproses] Assigner la valeur indTel, après avoir sélecter le pays 2014-06-12 13:14:18 +00:00
Aram HARUTYUNYAN
ea7e3ff18b Issue #0001983: [Liens inter-entreproses] quand l'appelle d'Ajax est fini, afficher les barres (css - overflow:auto) 2014-06-12 09:08:34 +00:00
Michael RICOIS
7347a33d96 issue #0001920 : Draft page avis RNCS 2014-06-10 09:19:24 +00:00
Aram HARUTYUNYAN
b4b1df302f Issue #0001872: [Liens inter-entreprises] liensaveAction() - augmantation de la productivité 2014-06-10 05:18:42 +00:00
Aram HARUTYUNYAN
6451f9591f Issue #0001872: [Liens inter-entreprises] Transférer les filiales directes et indirectes sous l'entité absorbante. 2014-06-06 08:38:45 +00:00
Michael RICOIS
3aed5d85f9 issue #0001896 : 50 établissements 2014-06-03 12:48:04 +00:00
Michael RICOIS
d0f65c01b5 Import change from trunk 2014-06-02 09:40:38 +00:00
Michael RICOIS
2888c5af5e Merge from trunk - avis de situation - issue #0001974 2014-06-02 09:32:34 +00:00
Michael RICOIS
eb01476eef Import change from trunk 2014-05-24 09:30:11 +00:00
Michael RICOIS
a38da161b2 Set email after order 2014-05-24 09:22:50 +00:00
Aram HARUTYUNYAN
3335c25243 Issue #0001969: [WorldCheck] affichage de la pagination 2014-05-21 13:07:44 +00:00
Aram HARUTYUNYAN
e6f8d9f4a1 Issue #0001896: [Liste des établissements] pagination, sans limit=200 2014-05-21 07:35:07 +00:00
Aram HARUTYUNYAN
65387e8fc8 Issue #0001960: [Commandes de pièces] changer les noms des champs "Votre référence" 2014-05-14 11:51:03 +00:00
Michael RICOIS
d48a6a1675 issue #0001889, issue #0001950 : Simplification, no more javascript 2014-05-13 20:39:35 +00:00
Aram HARUTYUNYAN
f91d0866bb Issue #0001950: [Evolution des scores] motif -> label , affichage dans la table 2014-05-13 08:58:40 +00:00
Michael RICOIS
59be0f7023 Make configure script compatbile with windows 2014-05-12 09:06:39 +00:00
Michael RICOIS
d19284db97 issue #0001889 : Data key name change 2014-05-10 14:34:40 +00:00
Michael RICOIS
6c0368161b Switch to webservice version 2.7 2014-05-09 20:40:25 +00:00
Michael RICOIS
3a34e8533f Merge from trunk 2014-05-09 20:31:32 +00:00
Michael RICOIS
5f129ca83d Merge last update from 2.5 2014-05-09 20:24:46 +00:00
Aram HARUTYUNYAN
56e605a75f Issue #0001949: Theme plugin - corriger la version de la lib jQuery 2014-05-08 11:38:55 +00:00
Michael RICOIS
f065bd3233 Make configure script compatbile with windows 2014-05-05 13:08:24 +00:00
Michael RICOIS
bb11325716 issue #0001943 : Add id for edit 2014-05-03 15:36:25 +00:00
Michael RICOIS
4344f6936b Update JQuery to version 1.11.1 and remove old files 2014-05-02 13:51:23 +00:00
Michael RICOIS
3c0e7a3dc1 Change corporama label 2014-05-02 13:21:57 +00:00
Michael RICOIS
8368fbc6df Upgrade Zend to version 1.12.6 2014-05-01 19:27:23 +00:00
Michael RICOIS
e7a5598922 Merge from trunk 2014-05-01 17:35:11 +00:00
Michael RICOIS
83fb8d486d Merge 2014-05-01 17:19:47 +00:00
Michael RICOIS
c7611da75e Start on 2014-04-25 2014-04-25 07:21:49 +00:00
Michael RICOIS
97f2d63ae7 Integrate branch 2.5 - Ready to release 2014-04-24 10:46:36 +00:00
Michael RICOIS
ffd84c49f3 Merge new page corporama 2014-03-20 16:55:47 +00:00
Michael RICOIS
38df487e08 Merge for tag 2.5-20140317 2014-03-14 10:42:09 +00:00
4640 changed files with 97286 additions and 1319136 deletions

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
/.settings/
/.buildpath
/.project
/vendor/

9
TODELETE Normal file
View File

@ -0,0 +1,9 @@
table => actes_files
library\Application\Model\ActesFiles.php
table commandes
table commandes_erreur
table commandes_kbis
table commandes_pieces
table commandes_statut
table commandes_tarifs => Needed dans GenCourrier

View File

@ -1,14 +1,40 @@
<?php
use Monolog\Logger;
use Monolog\Handler\StreamHandler;
use Monolog\Processor\IntrospectionProcessor;
use Monolog\Handler\ChromePHPHandler;
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
protected function _initConfig()
/**
* Set config available in all apps
*/
protected function _initConfig()
{
$config = new Zend_Config($this->getOptions());
Zend_Registry::set('config', $config);
return $config;
}
//Initialisation global des paramètres de vue
/**
* Init controller with modules
*/
protected function _initController()
{
$this->bootstrap('frontController');
$front = $this->getResource('frontController');
$front->setControllerDirectory(array(
'default' => __DIR__ . '/modules/default/controllers',
'admin' => __DIR__ . '/modules/admin/controllers',
'file' => __DIR__ . '/modules/file/controllers',
));
return $front;
}
/**
* Initialisation global des paramètres de vue
*/
protected function _initViewSettings()
{
$this->bootstrap('view');
@ -18,27 +44,37 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
$view->headTitle('Extranet Scores & Décisions');
}
/**
* Some specific route
* @return unknown
*/
protected function _initRouter()
{
$this->bootstrap('frontController');
$front = $this->getResource('frontController');
$router = $front->getRouter();
$localauthRoute = new Zend_Controller_Router_Route('localauth/', array(
'module' => 'default',
'controller' => 'user',
'action' => 'login'
));
$fichierRoute = new Zend_Controller_Router_Route('fichier/:action/:fichier', array(
'controller' => 'fichier',
'fichier' => '',
'action' => 'login'
));
$router->addRoute('localauth', $localauthRoute);
$printRoute = new Zend_Controller_Router_Route('editer/:action/:fichier', array(
'module' => 'default',
'controller' => 'print',
'fichier' => '',
));
$router->addRoute('localauth', $localauthRoute);
$router->addRoute('fichier', $fichierRoute);
$router->addRoute('print', $printRoute);
$ssoRoute = new Zend_Controller_Router_Route('sso/:partner/', array(
'module' => 'default',
'controller' => 'auth',
'action' => 'index',
));
$router->addRoute('sso', $ssoRoute);
return $router;
}
@ -52,9 +88,6 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
$logger = new Zend_Log($writer);
Zend_Registry::set('firebug', $logger);
//ChromePHP - a voir comment désactiver
require_once 'Vendors/ChromePHP/ChromePhp.php';
//Application Logger en Production
$AppLogger = new Zend_Log();
if (APPLICATION_ENV == 'production')
@ -67,16 +100,42 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
$AppMailWriter->addFilter(Zend_Log::ERR);
$AppLogger->addWriter($AppMailWriter);
}
/* Remove as it's not use
$c = Zend_Registry::get('config');
$path = $c->profil->path->data.'/log';
$AppFileWriter = new Zend_Log_Writer_Stream($path.'/application.log');
$AppFileWriter->addFilter(Zend_Log::ERR);
$AppLogger->addWriter($AppFileWriter);
*/
Zend_Registry::set('log', $AppLogger);
}
/**
* Logs and Debug
*/
protected function _initLogger()
{
$config = new Zend_Config($this->getOptions());
$logFile = $config->profil->path->shared.'/log/application.log';
$log = new Logger('APP');
// Console Handler
if (in_array(APPLICATION_ENV, array('development', 'staging'))) {
//$log->pushHandler(new BrowserConsoleHandler());
//$log->pushHandler(new ChromePHPHandler());
}
// File Handler
if (APPLICATION_ENV == 'development') {
$level = Logger::DEBUG;
} else {
$level = Logger::INFO;
}
$log->pushHandler(new StreamHandler($logFile), $level);
// Processor
$log->pushProcessor(new IntrospectionProcessor());
Zend_Registry::set('logger', $log);
}
/**
* Init database
*/
protected function _initDb()
{
$c = Zend_Registry::get('config');
@ -107,13 +166,15 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
}
}
/**
* Init cache
*/
protected function _initCache()
{
// @todo : Remove for PHP7 Compatibility
//MetadataCache pour la base de données
$cache = Zend_Cache::factory(
'Core',
'Apc',
array('lifetime' => 28800,'automatic_serialization' => true),
$cache = Zend_Cache::factory('Core', 'Apc',
array('lifetime' => 28800, 'automatic_serialization' => true),
array()
);
Zend_Db_Table_Abstract::setDefaultMetadataCache($cache);

1
application/configs/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/application.ini

View File

@ -1,895 +0,0 @@
<?php
class EvaluationController extends Zend_Controller_Action
{
protected $siret = null;
protected $id = 0;
public function init()
{
$request = $this->getRequest();
$this->siret = $request->getParam('siret');
$this->id = $request->getParam('id', 0);
require_once 'Scores/WsScores.php';
require_once 'Scores/IdentiteEntreprise.php';
}
public function indexAction()
{
$this->forward('entreprise', 'recherche');
}
/**
* Affichage d'une reglette représentant le score
*/
public function printscoresAction()
{
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$score = strtolower($request->getParam('score'));
if( $score == 'indiscore' ){
$user = new Scores_Utilisateur();
switch($user->getTypeScore()) {
case '20': $score.='20'; break;
case '100':
default: $score.='100'; break;
}
}
$note = $request->getParam('note');
$bornes = array(
'conanh' => array( 'min' => -4.5 , 'max' => 16 ),
'afdcc2' => array( 'min' => 0 , 'max' => 5 ),
'afdcc1' => array( 'min' => -10 , 'max' => 10 ),
'z' => array( 'min' => -3 , 'max' => 3 ),
'indiscore100' => array( 'min' => 0 , 'max' => 100 ),
'indiscore20' => array( 'min' => 0 , 'max' => 20 ),
);
$note = round(($note - $bornes[$score]['min'])*100/($bornes[$score]['max'] - $bornes[$score]['min']));
if($note < 0) $note = 0;
if($note > 100) $note = 100;
$this->view->assign('note', $note);
$this->view->assign('min', $bornes[$score]['min']);
$this->view->assign('max', $bornes[$score]['max']);
}
/**
* IndiScore
*/
public function indiscoreAction()
{
$user = new Scores_Utilisateur();
if(!$user->checkPerm('INDISCORE') && !$user->checkPerm('INDISCOREP'))
$this->forward('perms', 'error');
$this->view->assign('edition', $user->checkModeEdition());
$request = $this->getRequest();
$autrePage = $request->getParam('apage');
//Récupération des informations
if (empty($autrePage)) {
$this->view->headTitle()->prepend('IndiScore');
$this->view->headTitle()->prepend('Siret '.$this->siret);
$plus = false;
if ($user->checkPerm('indiscorep')){
$plus = true;
}
$ref = $request->getParam('ref', '');
$encours = $request->getParam('encours', 0);
$email = $request->getParam('email', '');
$ws = new WsScores();
$infos = $ws->getIndiScore(substr($this->siret, 0,9), 0, 1, $plus, $ref, $encours, $email);
if ($infos === false) $this->forward('soap', 'error');
} else {
$infos = $this->getRequest()->getParam('infos');
}
$this->view->assign('siret', $this->siret);
$this->view->assign('typeScore', $user->getTypeScore());
$this->view->assign('indiscore', $infos);
$this->view->assign('AutrePage', $autrePage);
$this->view->assign('exportObjet', $infos);
$this->view->assign('aviscredit', $user->checkPerm('aviscredit'));
$this->view->assign('surveillance', $user->checkPerm('survscore'));
}
/**
* Rapport de synthese
*/
public function indiscore2Action()
{
$this->view->headScript()->appendFile('/themes/default/scripts/finance.js', 'text/javascript');
$this->view->headTitle()->prepend("Rapport de synthèse");
$this->view->headTitle()->prepend("Siret ".$this->siret);
$user = new Scores_Utilisateur();
if(!$user->checkPerm('INDISCORE2') && !$user->checkPerm('INDISCORE2P'))
$this->forward('perms', 'error');
$siren = substr($this->siret,0,9);
$ws = new WsScores();
$entreprise = new Scores_Session_Entreprise($this->siret, $this->id);
$identite = $ws->getIdentite($siren);
$indiscore = $ws->getIndiScore($siren);
$infos = $ws->getRatios($siren, 'indiscore2'); // @todo : vérifier la page
$score = array();
$tabRatio = array(
'r5' => array('total'=>'r5', 'total_info'=>'% ca', 'op' => 1000, 'titre'=>'CHIFFRE D\'AFFAIRES'),
'r16' => array('total'=>'r5', 'total_info'=>'% ca', 'op' => 1000, 'titre'=>'RESULTAT D\'EXPLOITATION'),
'r7' => array('total'=>'r5', 'total_info'=>'% ca', 'op' => 1000, 'titre'=>'RESULTAT COURANT'),
'r10' => array('total'=>'r5', 'total_info'=>'% ca', 'op' => 1000, 'titre'=>'RESULTAT NET'),
'r18' => array('total'=>'r22', 'total_info'=>'% bilan', 'op' => 1000, 'titre'=>'FONDS PROPRES'),
'r231' => array('total'=>'r22', 'total_info'=>'% bilan', 'op' => 1000, 'titre'=>'FONDS DE ROULEMENT'),
'r232' => array('total'=>'r22', 'total_info'=>'% bilan', 'op' => 1000, 'titre'=>'BESOIN EN FONDS DE ROULEMENT'),
'r249' => array('total'=>'', 'total_info'=>'', 'op' => 1000, 'titre'=>'TRESORERIE NETTE'),
'r20' => array('total'=>'r5', 'total_info'=>'% ca', 'op' => 1000, 'titre'=>'FRAIS FINANCIER'),
);
//Formattage des données
$typeBilan = 'N';
$ratiosData = new Scores_Finance_Ratios_Data($infos);
$nbBilanN = $ratiosData->getNbBilan('N');
$nbBilanC = $ratiosData->getNbBilan('C');
if ($nbBilanN!=0)
{
foreach($tabRatio as $idRatio => $valRatio){
$tabRatio[$idRatio]['comment'] = $ratiosData->wrapComment($idRatio);
}
$this->view->assign('tabRatio', $tabRatio);
$infosAnnee = $ratiosData->getBilansInfo($typeBilan);
$annees = array_keys($infosAnnee);
//On prend les 3 derniers bilans pour l'affichage
$nbMaxBilan = 3;
rsort($annees);
$annees = array_slice($annees, 0, $nbMaxBilan);
sort($annees);
$tabResult = array();
foreach($annees as $annee){
$data = array();
$dataEvol = array();
//Formatter les données
foreach($tabRatio as $idRatio => $valRatio){
$data[$idRatio] = $ratiosData->dRatio($typeBilan, $annee, $idRatio);
$dataTotal[$idRatio] = $ratiosData->dTotal($typeBilan, $annee, $idRatio, $valRatio['total']);
$dInfo[$idRatio] = $valRatio['total_info'];
}
$date = new Zend_Date($annee, 'yyyyMMdd');
$tabResult[] = array(
'dateCloture' => $date->toString('dd/MM/yyyy'),
'duree' => $infosAnnee[$annee]->duree.' Mois',
'ratio' => $data,
'total' => $dataTotal,
'info' => $dInfo,
);
}
$this->view->assign('tabResult', $tabResult);
}
$this->view->assign('tabRatio', $tabRatio);
/*
Correction pour indiscore seule
$indiscore->Siege;
$indiscore->SiretSiege;
$indiscore->NumRC;
*/
$indiscore->SiretSiege = $identite->SiretSiege;
$identite = new IdentiteEntreprise($identite);
//Définition des blocks
$blocks = array(
'Siret',
'SiretSiege',
'NumRC',
'Actif',
'RaisonSociale',
'FormeJuridique',
'DateImmat',
'DateCreaEt',
'Adresse',
'ActiviteEn',
'Naf4',
'OrigineFond',
'TypeExploitation',
'Saisonnalite',
'Capital',
'ChiffreAffaire',
);
$dBlock = array();
foreach ($blocks as $item) {
$display = array(
'label' => method_exists($identite, 'get'.$item.'Label') ? $identite->{'get'.$item.'Label'}() : '',
'texte' => method_exists($identite, 'get'.$item.'Texte') ? $identite->{'get'.$item.'Texte'}() : '',
'titre' => method_exists($identite, 'get'.$item.'Titre') ? $identite->{'get'.$item.'Titre'}() : '',
);
$dBlock[$item] = $display;
}
$this->view->assign('dBlock', $dBlock);
$dateRadiation = '';
if(isset($indiscore->DateRadiation) && $indiscore->DateRadiation!='' && $indiscore->DateRadiation!='0000-00-00') {
$date = new Zend_Date(str_replace('-','',$indiscore->DateRadiation), 'yyyyMMdd');
$this->view->assign('dateRadiation', $date->toString('dd/MM/yyyy'));
}
foreach($indiscore->scores as $name => $sc){
if($name == 'ConanH')
$score[$name] = array($sc, 'Score Conan Holder');
if($name == 'Afdcc2')
$score[$name] = array($sc, 'Score Afdcc 2');
if($name == 'Z')
$score[$name] = array($sc, 'Score Z');
}
$typeScore = $user->getTypeScore();
switch($typeScore) {
case '20':
$maxIndiscore = $typeScore;
$score['Indiscore'] = array($indiscore->Indiscore20, 'IndiScore');
break;
case '100':
default:
$maxIndiscore = empty($typeScore)? '100' : $typeScore;
$score['Indiscore'] = array($indiscore->Indiscore, 'IndiScore');
break;
}
$this->view->assign('siret', $this->siret);
$this->view->assign('id', $this->id);
$this->view->assign('siren', $siren);
$this->view->assign('encours', $indiscore->encours);
$this->view->assign('TendanceIndiscore', $indiscore->TendanceIndiscore);
$this->view->assign('SituationJuridique', $indiscore->SituationJuridique);
$this->view->assign('paiement', $indiscore->infoPaiement);
$this->view->assign('scores', $score);
$this->view->assign('bilanReference', $bilanReference);
}
/**
* Rapport complet
*/
public function indiscore3Action()
{
$this->view->headScript()->appendFile('/themes/default/scripts/evaluation.js', 'text/javascript');
$this->view->headTitle()->prepend("Rapport complet");
$this->view->headTitle()->prepend("Siret ".$this->siret);
$user = new Scores_Utilisateur();
if(!$user->checkPerm('INDISCORE3') && !$user->checkPerm('INDISCORE3P'))
$this->forward('perms', 'error');
// Lien pour le rapport personnalisé
if ($user->getIdClient() == '110' || $user->checkModeEdition()) {
$this->view->assign('customRapport', $this->view->url(array(
'controller'=>'evaluation',
'action'=>'customindiscore3',
'siret'=>$this->siret,
'id'=>$this->id)
));
}
$sessionEntreprise = new Scores_Session_Entreprise($this->siret, $this->id);
$ws = new WsScores();
$siren = substr($this->siret,0,9);
$plus = false;
if ($user->checkPerm('indiscore3p')){
$plus = true;
}
$request = $this->getRequest();
$ref = $request->getParam('ref', '');
$encours = $request->getParam('encours', 0);
$email = $request->getParam('email', '');
$infos = $ws->getRapport($siren, 3, 0, $plus, $ref, $encours, $email);
Zend_Registry::get('firebug')->info($infos);
if ($infos === false) {
$this->forward('soap', 'error');
}
$this->view->assign('Identite', $infos->Identite);
$this->view->assign('Dirigeants', $infos->Dirigeants);
$this->view->assign('Liens', $infos->Liens);
$this->view->assign('Annonces', $infos->Annonces);
$this->view->assign('Ratios', $infos->Ratios);
$this->view->assign('Indiscore', $infos->Indiscore);
require_once 'Scores/RapportComment.php';
$rapportComment = new RapportComment($siren, $this->id,
$infos->Indiscore->tabCommentaires->item,
$infos->Ratios->RatiosInfos,
$infos->Ratios->BilansInfos,
$infos->Ratios->RatiosSecteur,
$infos->Indiscore->tabVariables
);
$this->view->assign('comment',$rapportComment->out());
$this->view->assign('siret', $this->siret);
$this->view->assign('id', $this->id);
$this->view->assign('siren', $siren);
$this->view->assign('raisonSociale', $sessionEntreprise->getRaisonSociale());
$this->view->assign('exportObjet', $infos);
}
/**
* Génération de rapport personnalisé
* @todo : à améliorer
*/
public function customindiscore3Action()
{
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$upload = $request->getParam('upload', null);
$siren = substr($this->siret, 0, 9);
$user = new Scores_Utilisateur();
if (empty($upload)){
$adresse = array();
if ($user->checkModeEdition() || $user->getIdClient()==110) {
$adresse[] = 'Order to Cash';
$adresse[] = '6, rue Euryale Dehaynin ';
$adresse[] = '75019 PARIS';
$color1 = '#DFDB00';
$color2 = '#EFED9A';
$background = "background-image:url('/themes/default/images/customrapport/logo_ordertocash.jpg');background-repeat:no-repeat;background-position:center";
} else {
$adresse[] = 'Financement Entreprise';
$adresse[] = '16 RUE SENAC DE MEILHAN';
$adresse[] = '17000 LA ROCHELLE';
$color1 = '#6699FF';
$color2 = '##66CCFF';
$background = null;
}
$this->view->assign('adresse', $adresse);
$this->view->assign('color1', $color1);
$this->view->assign('color2', $color2);
$this->view->assign('background', $background);
$this->view->assign('siret', $this->siret);
$this->view->assign('id', $this->id);
$sessionEntreprise = new Scores_Session_Entreprise($this->siret, $this->id);
$this->view->assign('rs', $sessionEntreprise->getRaisonSociale());
} else {
$this->_helper->viewRenderer->setNoRender(true);
$couleurh1 = $request->getParam('couleurh1', null);
$couleurh2 = $request->getParam('couleurh2', null);
$texth1 = $request->getParam('texth1', null);
$texth2 = $request->getParam('texth2', null);
$societe_name = $request->getParam('societe_name', null);
$adresse = $request->getParam('adresse', null);
$logo_background = $request->getParam('logo_background', null);
$siren = substr($this->siret, 0, 9);
if ($this->id!=0){
$file = 'evaluation-indiscore3-'.$this->siret.'-'.$this->id.'.html';
} else {
$file = 'evaluation-indiscore3-'.$this->siret.'.html';
}
$c = Zend_Registry::get('config');
$path = $c->profil->path->pages;
if (file_exists($path.'/'.$file))
{
$doc = new DOMDocument();
$doc->preserveWhiteSpace = true;
@$doc->loadHTMLFile($path.'/'.$file);
//Générer style particulier pour le rapport
$style.= 'body {background-color:#ffffff;} ';
$style.= '#footer {display:none;} ';
$style.= '#customRapport {display:none;} ';
$style.= '.notvisible{display:none;} ';
$style.= '#center h1 {background-color:'.$couleurh1.';color:'.$texth1.';border:1px solid;} ';
if($logo_background) {
$style.= '#center {background-image:url(./themes/default/images/customrapport/logo_ordertocash_background.jpg);background-repeat:no-repeat;background-position:center;} ';
}
$style.= '#center h2 {background-color:'.$couleurh2.';color:'.$texth2.'} ';
$style.= 'p#rsynthese {font-size:14px;font-weight:bold;} ';
$styleDom = $doc->createElement('style', $style);
//Ajout information
$contentDom = $doc->createElement('div');
if(!$user->checkModeEdition()) {
$element = $doc->createElement('img');
$element->setAttribute('src', './themes/default/images/customrapport/logo_ordertocash.jpg');
$element->setAttribute('width', '12%');
} else {
$element = $doc->createElement('img');
$element->setAttribute('src', './themes/default/images/customrapport/logo_ordertocash.jpg');
$element->setAttribute('width', '12%');
}
$div = $doc->createElement('div');
$div->setAttribute('style', "clear:both;");
$div->appendChild($element);
$contentDom->appendChild($div);
$i = 0;
foreach($adresse as $item){
$element = $doc->createElement('span', $item);
$contentDom->appendChild($element);
$element = $doc->createElement('br');
$contentDom->appendChild($element);
$i++;
}
$element = $doc->createElement('center', $societe_name.' Enquête Financière');
$element->setAttribute('style', 'font-size:17px');
$contentDom->appendChild($element);
if ($user->checkModeEdition() || $user->getIdClient()==110) {
$element = $doc->createElement('span', "Les équipes d'Order To Cash se tiennent à votre disposition pour vous assister dans l'interprétation de ces données au 01 84 16 50 00 ou par mail à l'adresse suivante : contact@ordertocash.fr");
$element->setAttribute('style', 'text-align:left;');
$contentDom->appendChild($element);
}
$ajout = $doc->createElement('div');
$ajout->appendChild($styleDom);
$ajout->appendChild($contentDom);
//Après <div id="center"> on insére le contenu
$body = $doc->getElementsByTagName('body')->item(0);
$div = $body->getElementsByTagName('div');
foreach($div as $item){
if ($item->hasAttribute('id') && $item->getAttribute('id') == 'center'){
break;
}
}
$item->parentNode->insertBefore($ajout, $item);
$xml = $doc->saveXML();
$c = Zend_Registry::get('config');
$outfile = $c->profil->path->pages.'/p'.$user->getIdClient().'-'.$file;
file_put_contents($outfile, $xml);
//Génération du pdf
$wkhtmltopdf = new Scores_Wkhtml_Pdf();
$wkhtmltopdf->setOptions('footer-right', 'Page [page] sur [toPage]');
$wkhtmltopdf->setOptions('header-right', date('d/m/Y H:i:s'));
$wkhtmltopdf->setOptions('disable-external-links');
$wkhtmltopdf->setOptions('disable-internal-links');
$pdfFile = $wkhtmltopdf->exec($outfile);
if (file_exists($pdfFile)){
echo '<center>Votre fichier est prêt pour être téléchargé !<br />' .
'<a target="_blank" href="'.$this->view->url(
array('controller'=>'fichier',
'action'=>'customrapport',
'fichier'=>basename($pdfFile)), null, true).'">Télécharger</a></center>';
} else {
echo "Erreur lors de la génération du PDF.";
}
} else {
echo "Erreur fichier non présent !";
}
}
}
/**
* Enquete commerciale
* @todo : Vérifier l'enregistrement
*/
public function enquetecAction()
{
$this->view->headScript()->appendFile('/themes/default/scripts/enquetec.js', 'text/javascript');
$this->view->headTitle()->prepend("Enquete commerciale");
$this->view->headTitle()->prepend("Siret ".$this->siret);
//isset($_REQUEST['pays']) ? $pays=$_REQUEST['pays'] : $pays='' ;
$commandeEnquete = false;
$request = $this->getRequest();
if ($request->isPost()){
$InfoUser = $request->getParam('InfoUser');
$InfoEnq = $request->getParam('InfoEnq');
//Affichage de la demande
//Vérification des informations
$formError = false;
$fields = array();
//Info utilisateur obligatoire :
if($InfoUser['Identite']==''){ $fields[] ='Votre Identite'; $formError=true;}
if($InfoUser['Tel']==''){ $fields[] ='Votre Téléphone'; $formError=true;}
if($InfoUser['Email']==''){ $fields[] ='Votre Email'; $formError=true;}
//Info entreprise obligatoire :
if( isset($InfoEnq['Type']) && $InfoEnq['Type']==''){ $fields[] ='Choix du type d\'enquête'; $formError=true;}
if($InfoEnq['PrecisionsChoix']=='1'){
if($InfoEnq['Precisions']['Motif']==''){ $fields[] ='Mofif de la demande'; $formError=true;}
}elseif($InfoEnq['PrecisionsChoix']=='3' || $InfoEnq['PrecisionsChoix']=='4'){
if($InfoEnq['Precisions']['MontantCA']==''){ $fields[] ='Précisions de la demande'; $formError=true;}
}elseif($InfoEnq['PrecisionsChoix']=='5'){
if($InfoEnq['Precisions']['Autre']==''){ $fields[] ='Précisions de la demande'; $formError=true;}
}
if(isset($InfoEnq['ImpayeesChoix']) && $InfoEnq['ImpayeesChoix']=='oui' ){
if($InfoEnq['Impayees']['Montant']=='' || $InfoEnq['Impayees']['Nombre']=='' || $InfoEnq['Impayees']['Date']==''){ $fields[] ='Précisions sur les impayées'; $formError=true;}
}
if(isset($InfoEnq['RetardPaiementChoix']) && $InfoEnq['RetardPaiementChoix']=='oui' ){
if($InfoEnq['RetardPaiement']['Montant']=='' || $InfoEnq['Nombre']=='' || $InfoEnq['RetardPaiement']['Date']==''){ $fields[] ='Précisions sur le retarde de paiement'; $formError=true;}
}
if(isset($_REQUEST['InfoEnq']['LitigeChoix']) && $_REQUEST['InfoEnq']['LitigeChoix']=='oui' ){
if($_REQUEST['InfoEnq']['Litige']['Precisions']=='' || $_REQUEST['InfoEnq']['Litige']['Precisions']==''){ $fields[] ='Précisions sur le litige'; $formError=TRUE;}
}
if ($formError==true){
$message = '<font color="red">';
$message.= 'Veuillez remplir les champs suivants : ';
$message.= join(', ', $fields);
$message.= '</font>';
}else{
$InfoDemande = $InfoUser;
$siren = $InfoEnq['Siren'];
unset($InfoEnq['Siren']);
//Suppression et assigation des valeurs pour le webservice
if($InfoEnq['PrecisionsChoix'] = 1){
$InfoEnq['Precisions']['Type'] = "Enquête sur un client (contrôle crédit)";
unset($InfoEnq['PrecisionsChoix']);
}elseif($InfoEnq['PrecisionsChoix']==2){
$InfoEnq['Precisions']['Type'] = "Enquête sur un prospect (ouverture de compte)";
unset($InfoEnq['PrecisionsChoix']);
}elseif($InfoEnq['PrecisionsChoix']==3){
$InfoEnq['Precisions']['Type'] = "Enquête sur un fournisseur stratégique";
unset($InfoEnq['PrecisionsChoix']);
}elseif($InfoEnq['PrecisionsChoix']==4){
$InfoEnq['Precisions']['Type'] = "Enquête sur un fournisseur non stratégique";
unset($InfoEnq['PrecisionsChoix']);
}elseif($InfoEnq['PrecisionsChoix']==5){
$InfoEnq['Precisions']['Type'] = "Autre type d'enquête (Précisez...)";
unset($InfoEnq['PrecisionsChoix']);
}
$ws = new WsScore();
$result = $ws->commandeEnquete($siren, $InfoEnq, $InfoDemande);
if ($result === false) {
$this->_forward('soap', 'error');
} else {
$this->view->assign('annee', substr($result->dateCommande,0,4));
$this->view->assign('mois', substr($result->dateCommande,4,2));
$this->view->assign('jour', substr($result->dateCommande,6,2));
$this->view->assign('heure', substr($result->dateCommande,8,2));
$this->view->assign('minutes', substr($result->dateCommande,10,2));
$this->view->assign('ref', substr($result->refCmde,1));
$this->view->assign('siren', $result->siren);
$commandeEnquete = true;
}
$this->view->assign('commandeEnquete', $commandeEnquete);
}
$this->view->assign('formError', $formError);
$this->view->assign('message', $message);
$this->view->assign('InfoUser', $InfoUser);
$this->view->assign('InfoEnq', $InfoEnq);
}
if ($commandeEnquete == false) {
$ws = new WsScores();
$infosEntrep = $ws->getIdentite($this->siret, $this->id);
$this->view->assign('Etab', $infosEntrep);
$user = new Scores_Utilisateur();
$this->view->assign('user', $user);
}
$this->view->assign('commandeEnquete', $commandeEnquete);
}
/**
* Demande d'avis de credit
*/
public function aviscreditAction()
{
$this->view->headTitle()->prepend("Avis de crédit");
$this->view->headTitle()->prepend("Siret ".$this->siret);
$commande = false;
$request = $this->getRequest();
//Reception des données du formulaire
if ($request->isPost())
{
$InfoUser = $request->getParam('InfoUser');
$InfoEnq = $request->getParam('InfoEnq');
$formError = false;
$fields = array();
//Info utilisateur obligatoire :
if($InfoUser['Identite']==''){
$fields[] ='Votre Identite'; $formError=true;
}
if($InfoUser['Tel']==''){
$fields[] ='Votre Téléphone'; $formError=true;
}
if($InfoUser['Email']==''){
$fields[] ='Votre Email'; $formError=true;
}
//Info entreprise obligatoire :
if( isset($InfoEnq['Type']) && $InfoEnq['Type']==''){
$fields[] ='Choix du type d\'enquête'; $formError=true;
}
if(isset($InfoEnq['ImpayeesChoix']) && $InfoEnq['ImpayeesChoix']=='oui' ){
if($InfoEnq['Impayees']['Montant']=='' || $InfoEnq['Impayees']['Nombre']=='' || $InfoEnq['Impayees']['Date']==''){
$fields[] ='Précisions sur les impayées'; $formError=true;
}
}
if(isset($InfoEnq['RetardPaiementChoix']) && $InfoEnq['RetardPaiementChoix']=='oui' ){
if($InfoEnq['RetardPaiement']['Montant']=='' || $InfoEnq['Nombre']=='' || $InfoEnq['RetardPaiement']['Date']==''){
$fields[] ='Précisions sur le retard de paiement'; $formError=true;
}
}
if(isset($_REQUEST['InfoEnq']['LitigeChoix']) && $_REQUEST['InfoEnq']['LitigeChoix']=='oui' ){
if($_REQUEST['InfoEnq']['Litige']['Precisions']=='' || $_REQUEST['InfoEnq']['Litige']['Precisions']==''){
$fields[] ='Précisions sur le litige'; $formError=TRUE;
}
}
//Envoi du mail formatté
if ( $formError==true )
{
$message = '<font color="red">';
$message.= 'Veuillez remplir les champs suivants : ';
$message.= join(', ', $fields);
$message.= '</font>';
$this->view->assign('message', $message);
}
else
{
$sujet = "Demande d'avis personnalisé";
$texte = "<pre>".print_r($InfoUser, 1)."</pre>".
"<pre>".print_r($InfoEnq, 1)."</pre>";
$mail = new Scores_Mail();
$mail->setFrom('production');
$mail->addToKey('support');
$mail->setSubject($sujet);
$mail->setBodyHtml($texte);
if ($mail->send()) {
$commande = true;
}
}
$this->view->assign('commande', $commande);
$this->view->assign('formError', $formError);
$this->view->assign('message', $message);
$this->view->assign('InfoUser', $InfoUser);
$this->view->assign('InfoEnq', $InfoEnq);
$this->view->assign('siren', substr($this->siret, 0,9));
}
//Affichage du formulaire
if ($commande == false) {
$ws = new WsScores();
$infosEntrep = $ws->getIdentite($this->siret, $this->id);
$this->view->assign('Etab', $infosEntrep);
$user = new Scores_Utilisateur();
$this->view->assign('user', $user);
}
}
/**
* Affichage des informations de scoring creditsafe
*/
public function scoringAction()
{
$this->view->headTitle()->prepend("Scoring Credit Safe");
$this->view->headTitle()->prepend("Siret ".$this->siret);
$user = new Scores_Utilisateur();
if(!$user->checkModeEdition() or !$user->checkPerm('SCORECSF'))
$this->render('error/perms', null, 'error');
define('CREDITSAFE_WS_URL', 'https://www.creditsafe.fr/getdata/service/CSFRServices.asmx');
define('CREDITSAFE_WS_URI', 'https://www.creditsafe.fr/getdata/service/');
define('CREDITSAFE_WS_USER', 'scores_decisions');
define('CREDITSAFE_WS_PASS', 'yoann1306');
define('CREDITSAFE_WS_REF', 'ref');
/**
* L'Url du WSDL est bonne simplament le formatage des données a changés, il faut respecter les données !
* comparer les exemples donnés.
*
*/
$req='<xmlrequest>'.
'<header>'.
'<username>'.CREDITSAFE_WS_USER.'</username>'.
'<password>'.CREDITSAFE_WS_PASS.'</password>'.
//'<operation>getcompanyinformation</operation>'.
'<operation>getratinglimit</operation>'.
'<country>FR</country>'.
'<language>FR</language>'.
'<chargereference>'.CREDITSAFE_WS_REF.'</chargereference>'.
'</header>'.
'<body>'.
//'<package>standard</package>'.
'<package>ratinglimit</package>'.
"<companynumber>".$this->siret."</companynumber>".
'</body>'.
'</xmlrequest>';
$date = date('Ymd');
$url = 'https://www.creditsafe.fr/getdata/service/CSFRServices.asmx/GetData?RequestXmlStr='.$req;
$file = APPLICATION_PATH.'/../../data/creditsafe/'.$this->siret.'.xml';
try {
$client = new Zend_Http_Client($url);
$client->setStream();
$response = $client->request('GET');
if ( $response->isSuccessful() ) {
$xml = html_entity_decode($response->getBody(), ENT_QUOTES, 'UTF-8');
$dom_object = new DOMDocument();
$ws = new WsScores();
if(!file_exists($file)) {
file_put_contents($file, $xml); // Ne pas oublier de metre les bons droits sur le dossier.
$ws->setLog('scorecsf', $this->siret);
} else {
$ws->setLog('scorecsf', $this->siret, 0, 'local');
}
$dom_object->load($file);
$companyname = $dom_object->getElementsByTagName('companyname')->item(0)->nodeValue;
$rating = $dom_object->getElementsByTagName('rating')->item(0)->nodeValue;
$ratingdesc1 = str_replace('?',"'",$dom_object->getElementsByTagName('ratingdesc1')->item(0)->nodeValue);
$ratingdesc2 = str_replace('?',"'",$dom_object->getElementsByTagName('ratingdesc2')->item(0)->nodeValue);
$creditlimit = $dom_object->getElementsByTagName('creditlimit')->item(0)->nodeValue;
$libelle = '';
if (strtoupper($creditlimit)<>strtolower($creditlimit) || $creditlimit=='')
$strCreditlimit = $creditlimit;
else
$strCreditlimit = number_format($creditlimit,null,null,' '). ' &euro;';
if ($rating >= 40){
$fontColor = 'green';
$imgFeux = '<img src="/themes/default/images/scoring/feux_vert.png"/>';
if ($rating>=71) $libelle='Très bonne cote de crédit/solvabilité';
elseif ($rating>=51) $libelle='Bonne cote de crédit/solvabilité';
else $libelle = 'Solvable';
} elseif ($rating >= 20) {
$fontColor = 'yellow';//#f2be2c';
$imgFeux = '<img src="/themes/default/images/scoring/feux_orange.png"/>';
$libelle = 'Précautions recommandées';
} elseif (strtoupper($rating) <> strtolower($rating)) {
$fontColor = 'black';
$imgFeux='&nbsp;';
}
elseif ($rating == '') {
$fontColor = 'black';
$imgFeux = '&nbsp;';
}
else {
$fontColor = 'red';
$imgFeux = '<img src="/themes/default/images/scoring/feux_rouge.png"/>';
if ($rating == 0) $libelle='Entreprise en situation de défaillance et ayant un très fort risque de radiation';
else $libelle = 'Avertissement - Crédit à votre discrétion';
}
/** Assigne les valeur a la vue **/
if (!empty($companyname)) {
$this->view->raisonSociale = $companyname;
} else {
$session = new Scores_Session_Entreprise($this->siret, $this->id);
$this->view->raisonSociale = $session->getRaisonSociale();
}
$this->view->emailCommande = $user->getEmail();
$this->view->id = $this->id;
$this->view->siren = substr($this->siret, 0,9);
$this->view->imgFeux = $imgFeux;
$this->view->fontColor = $fontColor;
$this->view->rating = $rating;
$this->view->libelle = $libelle;
$this->view->strCreditlimit = $strCreditlimit;
}
} catch (Zend_Http_Client_Exception $e) {}
}
/**
* Commande de scoring partenaire creditsafe
*/
public function scoringcommandeAction()
{
if ($this->getRequest()->isPost()){
$request = $this->getRequest();
$email = $request->getParam('email', '');
$siren = $request->getParam('siren', '');
if (preg_match('#^[\w.-]+@[\w.-]+\.[a-zA-Z]{2,5}$#',$email)) {
$message = 'Entreprise mise sous surveillance scoring partenaire !';
$mail = new Scores_Mail();
$mail->setSubject("Demande de surveillance score CreditSafe pour $siren à ".$email);
$user = new Scores_Utilisateur();
$login = $user->getLogin();
$texte = 'REQUEST='.EOL.print_r($request->getParams(),true).EOL.
'Utilisateur='.$login;
$mail->setBodyTexte($texte);
$mail->setFrom('contact');
$mail->addToKey('contact');
$mail->send();
$c = Zend_Registry::get('config');
$path = $c->profil->path->data.'/log';
$fp=fopen($path.'/surveillance_scf.csv', 'a');
fwrite($fp, date('Y/m/d H:i:s').";$siren;".$email.';'.$login.';'.$user->getEmail().';'.$user->getIpAddress()."\n");
fclose($fp);
} else {
$message = "ERREUR : Veuillez saisir une adresse email valide pour la mise sous surveillance";
}
$this->view->assign('message', $message);
}
}
public function valorisationAction()
{
$this->view->headTitle()->prepend("Valorisation");
$this->view->headTitle()->prepend("Siret ".$this->siret);
$user = new Scores_Utilisateur();
if(!$user->checkPerm('INDISCORE3') && !$user->checkPerm('INDISCORE3P'))
$this->_forward('perms', 'error');
$sessionEntreprise = new Scores_Session_Entreprise($this->siret, $this->id);
$ws = new WsScores();
$siren = substr($this->siret,0,9);
$request = $this->getRequest();
$ref = $request->getParam('ref', '');
$encours = $request->getParam('encours', 0);
$email = $request->getParam('email', '');
$infos = $ws->getEntrepriseValo($siren);
require_once 'Scores/RapportComment.php';
$rapportComment = new RapportComment($siren, $this->id,
$infos->Indiscore->tabCommentaires->item,
$infos->RatiosInfos,
$infos->RatiosBilansInfos,
$infos->RatiosSecteur,
$infos->Indiscore->tabVariables
);
$this->view->assign('comment',$rapportComment->out());
$this->view->assign('siret', $this->siret);
$this->view->assign('id', $this->id);
$this->view->assign('siren', $siren);
$this->view->assign('raisonSociale', $sessionEntreprise->getRaisonSociale());
$this->view->assign('exportObjet', $infos);
}
}

View File

@ -1,488 +0,0 @@
<?php
class FichierController extends Zend_Controller_Action
{
public function init()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
}
public function indexAction(){}
/**
* Gestion du chargement des logos
*/
public function logoAction()
{
$file = $this->getRequest()->getParam('fichier');
$explode = explode('.', $file);
switch ($explode[1]) {
case 'png' : $content_type = 'image/png'; break;
case 'gif' : $content_type = 'image/gif'; break;
case 'jpeg':
case 'jpg' : $content_type = 'image/jpeg'; break;
}
$c = Zend_Registry::get('config');
$path = realpath($c->profil->path->data).'/logos/';
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 logo.';
}
}
/**
* Gestion du chargement des images du cache
*/
public function imgcacheAction()
{
$content_type = 'image/png';
$c = Zend_Registry::get('config');
$path = $c->profil->path->pages.'/imgcache/';
$file = $this->getRequest()->getParam('fichier');
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.';
}
}
/**
* Gestion du chargement des fichiers des marques
*/
public function marqueAction()
{
$content_type = 'application/pdf';
$c = Zend_Registry::get('config');
$path = realpath($c->profil->path->data).'/marques/';
$file = $this->getRequest()->getParam('fichier');
if(file_exists($path.$file) && filesize($path.$file)>0) {
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 "Erreur lors de l'affichage du fichier.";
}
}
/**
* Gestion des fichiers Actes et Bilans
*/
public function pdfAction()
{
$file = $this->getRequest()->getParam('fichier');
$content_type = 'application/pdf';
$c = Zend_Registry::get('config');
//bilan
if (preg_match('/^bilan-[0-9]{9}-(consolides|sociaux)-([0-9]{8})/', $file, $matches)) {
$path = realpath($c->profil->path->data).
'/greffes/bilans/'.$matches[1].'/'.substr($matches[2],0,4).'/';
}
//acte
else if (preg_match('/^acte-[0-9]{9}-(.*)-([0-9]{8})-.*-.*-.*-.*-.*-.*$/', $file, $matches)) {
$type = $matches[1];
$date = $matches[2];
$annee = substr($date,0,4);
$mois = substr($date,4,2);
$path = realpath($c->profil->path->data).'/greffes/actes/'.$annee.'/'.$mois.'/';
}
Zend_Registry::get('firebug')->info($path);
if(file_exists($path.$file) && filesize($path.$file)>0) {
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 "Erreur lors de l'affichage du fichier.";
}
}
/**
* Gestion des fichiers Actes et Bilans
*/
public function pdfassociationAction()
{
$content_type = 'application/pdf';
$c = Zend_Registry::get('config');
$path = realpath($c->profil->path->data).'/association/';
$file = $this->getRequest()->getParam('fichier');
$type = $this->getRequest()->getParam('type');
$file = $type.'/'.$file;
if(file_exists($path.$file) && filesize($path.$file)>0) {
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 "Erreur lors de l'affichage du fichier.";
}
}
/**
* Gestion des liasses au formats excel
*/
public function liasseAction()
{
$content_type = 'application/vnd.ms-excel';
$c = Zend_Registry::get('config');
$path = realpath($c->profil->path->files).'/';
$file = $this->getRequest()->getParam('fichier');
//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.';
}
}
/**
* Gestion des log de consommation
*/
public function consommationAction()
{
$file = $this->getRequest()->getParam('fichier');
$content_type = 'application/csv-tab-delimited-table';
$c = Zend_Registry::get('config');
$path = realpath($c->profil->path->files).'/';
//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.';
}
}
/**
* Export du portefeuille au format CSV
*/
public function portefeuilleAction()
{
$file = $this->getRequest()->getParam('fichier');
$content_type = 'application/csv-tab-delimited-table';
$c = Zend_Registry::get('config');
$path = realpath($c->profil->path->files).'/';
//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.';
}
}
/**
* Export de la liste des surveillances au format CSV
*/
public function surveillanceAction()
{
$file = $this->getRequest()->getParam('fichier');
$content_type = 'application/csv-tab-delimited-table';
$c = Zend_Registry::get('config');
$path = realpath($c->profil->path->files).'/';
//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.';
}
}
/**
* Gestion des fichiers bilan saisie par les clients
*/
public function bilanclientAction()
{
$c = Zend_Registry::get('config');
$path = realpath($c->profil->path->data).'/bilanclient/';
$file = $this->getRequest()->getParam('fichier');
$explode = explode('.', $file);
switch ($explode[1]) {
case 'pdf' : $content_type = 'application/pdf'; break;
case 'tiff' : $content_type = 'image/tiff'; break;
}
if ( file_exists($path.$file) && filesize($path.$file)>0 ) {
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 "Erreur lors de l'affichage du fichier.";
}
}
/**
* Gestion des kbis
*/
public function kbisAction()
{
$content_type = 'application/pdf';
$file = $this->getRequest()->getParam('fichier');
$c = Zend_Registry::get('config');
$path = realpath($c->profil->path->files).'/';
if ( file_exists($path.$file) && filesize($path.$file)>0 ) {
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 "Erreur lors de l'affichage du fichier.";
}
}
/**
* Gestion des rapports personnalisés
*/
public function customrapportAction()
{
$content_type = 'application/pdf';
$c = Zend_Registry::get('config');
$path = realpath($c->profil->path->pages).'/';
$file = $this->getRequest()->getParam('fichier');
$output_file = $directory.'/'.$file;
if ( file_exists($path.$file) && filesize($path.$file)>0 ) {
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.";
}
}
/**
* Gestion bodacc au format PDF
*/
public function bodaccAction()
{
$content_type = 'application/pdf';
$c = Zend_Registry::get('config');
$path = realpath($c->profil->path->data).'/bodacc/';
$file = $this->getRequest()->getParam('fichier');
//Construire le chemin du dossier
preg_match('/BODACC_(A|B|C)_([0-9]{4})_(.*)\.pdf/', $file, $matches);
$path.= $matches[1].'/'.$matches[2].'/';
if ( file_exists($path.$file) && filesize($path.$file)>0 ) {
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.";
}
}
/**
* Gestion des fichiers PDF des nouveautés
*/
public function newAction()
{
$content_type = 'application/pdf';
$c = Zend_Registry::get('config');
$path = realpath($c->profil->path->data).'/nouveautes/';
$file = $this->getRequest()->getParam('fichier');
if ( file_exists($path.$file) && filesize($path.$file)>0 ) {
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.";
}
}
/**
* Bodacc history file
*/
public function histopdfAction()
{
$content_type = 'application/pdf';
$file = $this->getRequest()->getParam('fichier');
$c = Zend_Registry::get('config');
$path = realpath($c->profil->path->files).'/';
if ( file_exists($path.$file) && filesize($path.$file)>0 ) {
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.";
}
}
/**
* Internal files for groupes
*/
public function groupesAction()
{
$content_type = 'application/pdf';
$file = $this->getRequest()->getParam('fichier');
$c = Zend_Registry::get('config');
$path = realpath($c->profil->path->data).'/groupes/';
if ( file_exists($path.$file) && filesize($path.$file)>0 ) {
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.";
}
}
/**
* Bilan : Association
*/
public function greffeAction()
{
$content_type = 'application/pdf';
$file = $this->getRequest()->getParam('fichier');
$c = Zend_Registry::get('config');
$path = $c->profil->path->files.'/';
Zend_Registry::get('firebug')->info($path.$file);
if ( file_exists($path.$file) && filesize($path.$file)>0 ) {
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.";
}
}
/**
* Façade d'immeuble
*/
public function streetviewAction()
{
$file = $this->getRequest()->getParam('fichier');
$explode = explode('.', $file);
switch ($explode[1]) {
case 'png' : $content_type = 'image/png'; break;
case 'gif' : $content_type = 'image/gif'; break;
case 'jpeg':
case 'jpg' : $content_type = 'image/jpeg'; break;
}
$c = Zend_Registry::get('config');
$path = realpath($c->profil->path->data).'/google/streetview/';
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 file_get_contents(APPLICATION_PATH.'/../public/themes/default/images/1x1.png');
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,97 +0,0 @@
<?php
class IndexController extends Zend_Controller_Action
{
public function indexAction()
{
$request = $this->getRequest();
$page = $request->getParam('page');
if ($page == 'annonces')
{
$siret = $request->getParam('siret');
$source = $request->getParam('source');
$idAnn = $request->getParam('idAnn');
$lien = '/juridique/annonces/siret/'.$siret;
if (!empty($source)) $lien.= '/source/'.$source;
if (!empty($idAnn)) $lien.= '/idAnn/'.$idAnn;
$this->_redirect($lien);
}
elseif ( Zend_Registry::get('theme')->name=='mobile' )
{
//Afficher le menu pour la version mobile
}
else
{
$this->_forward('entreprise', 'recherche');
}
}
/**
* Retourne l'url pour le csv d'export du portefeuille
*/
public function portefeuillecsvAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
//'login' and 'hach' detecte from AuthAdapter
$request = $this->getRequest();
$version = $request->getParam('v', 1);
if (intval($version) == 2) {
$log = Zend_Registry::get('config')->profil->path->data.'/log/altisys.log';
$user = new Scores_Utilisateur();
$login = $user->getLogin();
$idClient = $user->getIdClient();
$file = 'listesurv-score-'.$login.'-'.$idClient.'.csv';
$content_type = 'application/csv-tab-delimited-table';
$c = Zend_Registry::get('config');
$path = realpath($c->profil->path->files).'/';
//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);
file_put_contents($log, date('Y-m-d H:i:s')." APPEL ALTISYS - OK $file\n", FILE_APPEND);
} else {
echo 'Impossible de charger le fichier.';
file_put_contents($log, date('Y-m-d H:i:s')." APPEL ALTISYS - ERREUR $file\n", FILE_APPEND);
}
} else {
require_once 'Scores/WsScores.php';
$user = new Scores_Utilisateur();
$login = $user->getLogin();
$idClient = $user->getIdClient();
$ws = new WsScores();
$reponse = $ws->getPortefeuilleCsv($login, $idClient);
$log = Zend_Registry::get('config')->profil->path->data.'/log/altisys.log';
if ($reponse === false){
file_put_contents($log, date('Y-m-d H:i:s')." - URL = ERREUR\n", FILE_APPEND);
echo "Erreur";
} elseif (!empty($reponse->result->Url)) {
file_put_contents($log, date('Y-m-d H:i:s')." - URL = ".$reponse->result->Url."\n", FILE_APPEND);
echo $reponse->result->Url;
}
}
}
}

View File

@ -1,458 +0,0 @@
<?php
class JuridiqueController extends Zend_Controller_Action
{
protected $siret = null;
protected $id = 0;
public function init()
{
$request = $this->getRequest();
$this->siret = $request->getParam('siret');
$this->id = $request->getParam('id', 0);
require_once 'Scores/WsScores.php';
}
/**
* Affichage de la liste des annonces ou d'une annonce
*/
public function annoncesAction()
{
$request = $this->getRequest();
$vue = $request->getParam('vue', 'bodacc');
$idAnn = $request->getParam('idAnn', null);
$siren = substr($this->siret, 0,9);
$source = $request->getParam('source');
if (!empty($source)) {
switch ($source){
case 1: $vue='bodacc'; break;
case 2: $vue='balo'; break;
case 3: $vue='asso'; break;
}
}
$session = new Scores_Session_Entreprise($this->siret, $this->id);
$fj = $session->getFormeJuridique();
if ( $fj>9000 && $fj<9999 && intval($siren)==0 ) {
$vue = 'asso';
}
$this->view->assign('id', $session->getId());
$this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale());
$this->view->assign('AutrePage', $request->getParam('apage'));
if ($session->getSource()=='006' || $session->getSourceId()=='007') {
$this->view->assign('AutreSource', true);
} else {
$this->view->assign('vue', $vue);
//Pagination
$page = $request->getParam('page', 1);
if ( $page <= 0 ) $page = 1;
$nbAffichage = 20;
$position = ($page - 1 ) * $nbAffichage;
$ws = new WsScores();
switch ( $vue ) {
case 'bodacc':
case 'abod':
default:
if(intval($siren)==0) {
$idAnn = $session->getSourceId();
}
$infos = $ws->getAnnoncesLegales($siren, $idAnn, null, $position, $nbAffichage);
break;
case 'balo':
$infos = $ws->getAnnoncesBalo($siren, $idAnn, null, $position, $nbAffichage);
break;
case 'asso':
if ( intval($siren)==0 && substr($session->getAutreId(),0,1)=='W' ) {
$infos = $ws->getAnnoncesAsso($session->getAutreId(), $idAnn, null, $position, $nbAffichage);
} elseif (intval($siren)!=0) {
$infos = $ws->getAnnoncesAsso($siren, $idAnn, null, $position, $nbAffichage);
} else {
$idAnn = $session->getSourceId();
$infos = $ws->getAnnoncesAsso($siren, $idAnn, null, $position, $nbAffichage);
}
break;
case 'bomp':
$filtre = $request->getParam('filtre', null);
$this->view->assign('filtre', $filtre);
$infos = $ws->getAnnoncesBoamp($siren, $idAnn, $filtre, $position, $nbAffichage);
break;
}
if ($infos === false) $this->_forward('soap', 'error');
Zend_Registry::get('firebug')->info($infos);
require_once 'Scores/Annonces.php';
$objAnnonces = new Annonces($infos->result->item);
$typeAnnonces = array(
'Bodacc',
'Balo',
'Bomp',
'Asso',
);
$user = new Scores_Utilisateur();
$this->view->assign('hasModeEdition', $user->checkModeEdition());
$this->view->assign('exportObjet', $infos);
$this->view->assign('surveillance', $user->checkPerm('survannonce'));
//Affichage pour une annonce
if (!empty($idAnn) && in_array($vue, array('bodacc', 'abod', 'balo', 'asso', 'bomp')) ) {
if ( $user->checkModeEdition() ){
$this->view->headScript()->appendFile('/themes/default/scripts/saisieannonces.js', 'text/javascript');
}
$classType = 'annonces'.ucfirst($vue);
foreach($objAnnonces->$classType as $ann) {
if($ann->id==$idAnn) break;
}
Zend_Registry::get('firebug')->info($ann);
$annonce = array(
'Desc' => $objAnnonces->getAnnonceDesc($ann),
'Entree' => $objAnnonces->getAnnonceEntree($ann),
'EntreeSD' => $objAnnonces->getAnnonceEntreeSD($ann),
'Even' => $objAnnonces->getAnnonceEven($ann),
'Texte' => $objAnnonces->getAnnonceTexte($ann),
'Type' => $objAnnonces->getType($ann),
'Code' => $objAnnonces->getCode($ann),
'Annee' => $objAnnonces->getAnnee($ann),
'Num' => $objAnnonces->getNum($ann),
'Deleted' => $objAnnonces->isDeleted($ann),
'Entites' => $objAnnonces->getAnnonceEntite($ann)
);
$this->view->assign('source', $session->getSource());
if ( intval($this->siret)==0 ){
$this->view->assign('sourceId', $session->getSourceId());
} else {
$this->view->assign('sourceId', null);
}
$this->view->assign('idAnn', $idAnn);
$this->view->assign('annonce', $annonce);
if ($request->getParam('q')=='ajax')
{
$this->_helper->layout()->disableLayout();
//$this->_helper->viewRenderer->setNoRender(true);
$this->renderScript('juridique/annonce-ajax.phtml');
} else {
$this->view->assign('PageCurrent', $page);
//Définir url pour téléchargement pdf
if ( in_array($annonce['Code'], array('BODA', 'BODB', 'BODC')) && intval($annonce['Annee'])>=2008) {
$lienBodacc = $this->view->url(array(
'controller' => 'juridique',
'action' => 'bodaccpdf',
'type' => substr($annonce['Code'],3,1),
'annee' => $annonce['Annee'],
'num' => $annonce['Num'],
), null, true);
$this->view->assign('lienBodacc', $lienBodacc);
}
$this->renderScript('juridique/annonce.phtml');
}
//Affichage pour la liste des annonces
} else {
//Calcul pagination
$nbReponses = count($infos->result->item);
$nbReponsesTotal = $infos->nbReponses;
if ($nbReponses < $nbReponsesTotal) {
$pageTotal = ceil( $nbReponsesTotal / $nbAffichage );
$pageCurrent = $page;
$pagePrev = $page - 1;
if ($pagePrev < 1) {
$pagePrev = 1;
}
$pageNext = $page + 1;
if( $pageNext > $pageTotal ) {
$pageNext = $pageTotal;
}
} else {
$pageTotal = $pageCurrent = 1;
}
$this->view->assign('PageTotal', $pageTotal);
$this->view->assign('PagePrev', $pagePrev);
$this->view->assign('PageNext', $pageNext);
$this->view->assign('PageCurrent', $pageCurrent);
$this->view->assign('nbReponses', empty($nbReponses) ? 0 : $nbReponses);
$this->view->assign('nbReponsesTotal', empty($nbReponsesTotal) ? 0 : $nbReponsesTotal);
foreach ( $typeAnnonces as $type ) {
$classType = 'annonces'.$type;
$annonces = array();
if ( count( $objAnnonces->$classType ) > 0 ) {
foreach( $objAnnonces->$classType as $ann ) {
$annonces[] = $objAnnonces->getAnnonceResume($ann);
}
$this->view->assign($classType, $annonces);
}
}
$this->view->headScript()->appendFile('/themes/default/scripts/annonces.js', 'text/javascript');
}
}
}
/**
* Affichage infos réglementées
*/
public function infosregAction()
{
$this->view->headTitle()->prepend("Informations Réglementées");
$this->view->headTitle()->prepend("Siret ".$this->siret);
$request = $this->getRequest();
$idAnn = $request->getParam('idann', false);
$siren = substr($this->siret, 0,9);
$session = new Scores_Session_Entreprise($this->siret, $this->id);
$ws = new WsScores();
if ($idAnn!=false) {
$this->view->assign('idAnn', $idAnn);
$infos = $ws->getInfosReg($siren,$idAnn);
} else {
$infos = $ws->getInfosReg($siren);
}
if ($infos === false) $this->forward('soap', 'error');
if (is_string($infos)){
$this->view->assign('message', $infos);
}
$objAnnonces = $infos->result->item;
$annonces = array();
if (count($objAnnonces)>0) {
foreach ( $objAnnonces as $item ) {
$dateParution = new Zend_Date($item->DateParution, 'yyyy-MM-dd');
$dateInsertion = new Zend_Date($item->dateInsertionSD, 'yyyy-MM-dd');
$annonces[] = array(
'id' => $item->id,
'titre' => $item->titre,
'communique' => $item->communique,
'source' => $item->source,
'DateParution' => $dateParution->toString('dd/MM/yyyy'),
'dateInsertionSD' => $dateInsertion->toString('dd/MM/yyyy'),
);
}
}
$this->view->assign('annonces', $annonces);
$this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale());
$this->view->assign('exportObjet', $infos);
}
/**
* Affichage listes des compétences
*/
public function competencesAction()
{
$this->view->headTitle()->prepend("Compétences Territoriales");
$this->view->headTitle()->prepend("Siret ".$this->siret);
$request = $this->getRequest();
$type = $request->getParam('type', '');
$siren = substr($this->siret,0,9);
$session = new Scores_Session_Entreprise($this->siret, $this->id);
$abbrev = array(
' TGI ' => 'TRIBUNAL DE GRANDE INSTANCE DE ',
' TI ' => 'TRIBUNAL D\'INSTANCE DE ',
' TC ' => 'TRIBUNAL DE COMMERCE DE ',
' TGICC ' => 'TRIBUNAL DE GRANDE INSTANCE A COMPETENCE COMMERCIALE ',
' TICC ' => 'TRIBUNAL D\'INSTANCE A COMPETENCE COMMERCIALE '
);
if (!empty($type)){
$ws = new WsScores();
$infos = $ws->getListeCompetences($siret, $type, $session->getCodeCommune());
if ($infos === false) $this->_forward('soap', 'error');
$competences = $infos->result->item;
Zend_Registry::get('firebug')->info($infos);
if( $type=='tri' || $type=='cfe' ) {
$i=0;
foreach($competences as $comp){
$competences[$i]->Nom = strtr(' '.strtoupper($comp->Nom), $abbrev);
$i++;
}
}
$this->view->assign('competences', $competences);
$this->view->assign('type', $type);
$this->view->assign('exportObjet', $infos);
}
$this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale());
}
/**
* Affichage des la listes des conventions collectives
* Enter description here ...
*/
public function conventionsAction()
{
$this->view->headTitle()->prepend("Conventions Collectives");
$this->view->headTitle()->prepend("Siret ".$this->siret);
$siren = substr($this->siret, 0,9);
$session = new Scores_Session_Entreprise($this->siret, $this->id);
$this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale());
$ws = new WsScores();
$infos = $ws->getListeConventions($siren);
$conventions = $infos->result->item;
Zend_Registry::get('firebug')->info($conventions);
$this->view->assign('conventions', $conventions);
$this->view->assign('exportObjet', $infos);
}
/**
* Affichage des marques déposées
*/
public function marquesAction()
{
$this->view->headTitle()->prepend("Marques Déposées");
$this->view->headTitle()->prepend("Siret ".$this->siret);
$this->view->headScript()->appendFile('/themes/default/scripts/marques.js', 'text/javascript');
$request = $this->getRequest();
$idObject = $request->getParam('idObject', 0);
$siren = substr($this->siret, 0,9);
$session = new Scores_Session_Entreprise($this->siret, $this->id);
$this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale());
$ws = new WsScores();
$infos = $ws->getMarques($siren, $idObject);
if ($infos === false) $this->_forward('soap', 'error');
$marques = $infos->result->item;
$this->view->assign('marques', $marques);
$this->view->assign('idObject', $idObject);
$this->view->assign('exportObjet', $marques);
Zend_Registry::get('firebug')->info($infos);
}
/**
* Affiche le lien pour télécharger le fichier concernant le dépot
*/
public function getmarqueAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$request = $this->getRequest();
$numdepot = $request->getParam('numdepot', '');
if (empty($numdepot)){
echo 'Paramètres incorrects';
exit;
}
$c = Zend_Registry::get('config');
$directory = realpath($c->profil->path->data).'/marques';
$file = $numdepot.'.pdf';
//Le fichier n'existe pas alors on le télécharger
if(!file_exists($directory.'/'.$file)
|| filesize($directory.'/'.$file)==0 ) {
$cmd = 'php ' . APPLICATION_PATH . '/../scripts/jobs/getMarque.php ' . $numdepot;
Zend_Registry::get('firebug')->info($cmd);
$result = exec($cmd);
Zend_Registry::get('firebug')->info($result);
}
//On vérfie que le fichier existe après le téléchargement
if(file_exists($directory.'/'.$file) && filesize($directory.'/'.$file)>0) {
$href = $this->view->baseUrl().'/fichier/marque/'.$file;
echo '<a href="'.$href.'" target="_blank">Télécharger le PDF de l\'insciption au BOPI.</a>';
} else {
echo 'Document introuvable.';
}
}
public function bodaccpdfAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$request = $this->getRequest();
$type = $request->getParam('type');
$annee = $request->getParam('annee');
$num = $request->getParam('num');
//$num doit être retraité pour être sur 4 position
$c = strlen($num);
for($i=0;$i<4-$c;$i++){
$num = '0'.$num;
}
$c = Zend_Registry::get('config');
$file = realpath($c->profil->path->data)
.'/bodacc/'.$type.'/'.$annee.'/'.
'BODACC_'.$type.'_'.$annee.'_'.$num.'.pdf';
if ( !file_exists($file) ) {
exec('php ' . APPLICATION_PATH . "/../scripts/jobs/getBodaccPdf.php $type $annee $num >> getBodaccPdf.log");
}
if (file_exists($file)) {
$href = $this->view->url(array(
'controller' => 'fichier',
'action' => 'bodacc',
'fichier' => basename($file),
), null, true);
echo "<a target=\"_blank\" href=\"".$href."\">Cliquer ici pour télécharger le fichier.</a>";
} else {
echo "Erreur lors du chargement du fichier.";
}
}
public function annoncenumAction()
{
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$siren = $request->getParam('siren');
$ws = new WsScores();
$result = $ws->getAnnoncesNum($siren);
Zend_Registry::get('firebug')->info($result);
$numWS = array();
if (count($result->item)>0) {
foreach ($result->item as $item) {
$numWS[$item->type] = $item->num;
}
}
$types = array('bodacc', 'balo', 'boamp', 'asso');
$num = array();
foreach($types as $type) {
if ( array_key_exists($type, $numWS) ) {
$num['Type'.ucfirst($type)] = $numWS[$type];
}
}
$this->view->assign('num', $num);
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,292 +0,0 @@
<?php
class TelechargementController extends Zend_Controller_Action
{
/**
* Temps de mis en cache en heure
* @var interger
*/
protected $filetime = 8;
/**
* Répertoire de stockage pour le fichier
* @var string
*/
protected $path = '';
/**
* Vérifie ou télécharge le fichier sur une url
* @param string $url
* URL of file to download
* @param mixed $filename
* Override filename
*/
protected function getFile($url, $filename=null)
{
if (!is_dir($this->path)) mkdir($this->path);
// Recuperation du nom du fichier
if ($filename===null) {
$tableau = explode('/', $url);
$file = $tableau[sizeof($tableau) - 1];
} else {
$file = $filename;
}
// Suppression du fichier si le temps de cache est depasse
if (file_exists($this->path.'/'.$file)){
$dateFile = filemtime($this->path.'/'.$file);
$now = mktime(date('G'), date('i'), date('s'),
date('m') , date('d'), date('Y'));
$maxTime = mktime(date('G',$dateFile)+$this->filetime, date('i',$dateFile),
date('s',$dateFile), date('m',$dateFile),
date('d',$dateFile), date('Y',$dateFile));
if ($maxTime-$now<0) {
unlink($this->path.'/'.$file);
}
}
// Recuperation du fichier sur le serveur
if (file_exists($this->path.'/'.$file)) {
return $file;
} else {
// On check si le fichier est present sur l'url
try {
$client = new Zend_Http_Client($url);
$client->setStream();
$response = $client->request('GET');
if ( $response->isSuccessful() && copy($response->getStreamName(), $this->path.'/'.$file) ) {
return $file;
} else {
return false;
}
} catch (Zend_Http_Client_Exception $e) {
return false;
}
}
}
public function init()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$c = Zend_Registry::get('config');
$this->path = $c->profil->path->files;
require_once 'Scores/WsScores.php';
}
/**
* Télécharge la consommation client sous forme de fichier csv et affiche le lien
*/
public function consommationAction()
{
$this->filetime = 1;
$request = $this->getRequest();
$start = $request->getParam('start', false);
//On souhaite récupérer l'url du fichier
if ($start==1) {
$mois = $request->getParam('mois');
$detail = $request->getParam('detail', 0);
$idClient = $request->getParam('idClient', 0);
$login = $request->getParam('login', '');
$all = $request->getParam('all', 0);
$date = substr($mois, 3, 4).substr($mois, 0, 2);
$user = new Scores_Utilisateur();
if (empty($login) && (!$user->isAdmin() && !$user->isSuperAdmin()) ) {
$login = $user->getLogin();
}
$ws = new WsScores();
$reponse = $ws->getLogsClients($date, $detail, $idClient, $login, $all);
if (!empty($reponse->result->Url)) {
echo $reponse->result->Url;
} else {
echo 'FALSE';
}
} else {
$url = $request->getParam('url', '');
$file = $this->getFile($url);
// Le fichier existe sur l'extranet
if ($file && file_exists($this->path.'/'.$file)) {
if (filesize($this->path.'/'.$file) > 0) {
echo '<u><a title="T&eacute;l&eacute;charger le fichier"'.
' target="_blank" href="/fichier/consommation/'.$file.
'">Cliquez-ici pour t&eacute;l&eacute;charger'.
' le fichier.</a></u>';
} else {
echo 'Aucune consommmation enregistr&eacute;e.';
}
}
}
}
/**
* Télécharge les surveillances sous forme de fichier csv et affiche le lien
*/
public function surveillanceAction()
{
$this->filetime = 4;
$request = $this->getRequest();
$start = $request->getParam('start', false);
if ($start==1) {
$source = $request->getParam('source', '');
$user = new Scores_Utilisateur();
$login = $user->getLogin();
$idClient = $user->getIdClient();
$ws = new WsScores();
$reponse = $ws->getListeSurveillancesCsv($source, $login, $idClient);
if (!empty($reponse->result->Url)) {
echo $reponse->result->Url;
exit;
}
echo 'FALSE';
exit;
} else {
$url = $request->getParam('url', '');
$file = $this->getFile($url);
// Le fichier existe sur l'extranet
if ($file && file_exists($this->path.'/'.$file)) {
if (filesize($this->path.'/'.$file) > 0) {
echo '<u><a title="T&eacute;l&eacute;charger le fichier"'.
' target="_blank" href="/fichier/surveillance/'.$file.
'">Cliquez-ici pour t&eacute;l&eacute;charger'.
' le fichier.</a></u>';
} else {
echo 'Aucune surveillance enregistr&eacute;e.';
}
}
exit;
}
}
/**
* Télécharge le portefeuille sous forme de fichier csv et affiche le lien
* Enter description here ...
*/
public function portefeuilleAction()
{
$this->filetime = 4;
$request = $this->getRequest();
$start = $request->getParam('start', false);
if ($start==1) {
$user = new Scores_Utilisateur();
$login = $user->getLogin();
$idClient = $user->getIdClient();
$ws = new WsScores();
$reponse = $ws->getPortefeuilleCsv($login, $idClient);
if (!empty($reponse->result->Url)) {
echo $reponse->result->Url;
exit;
}
echo 'FALSE';
exit;
} else {
$url = $request->getParam('url', '');
$file = $this->getFile($url);
// Le fichier existe sur l'extranet
if ($file && file_exists($this->path.'/'.$file)) {
if (filesize($this->path.'/'.$file) > 0) {
echo '<u><a title="T&eacute;l&eacute;charger le fichier"'.
' target="_blank" href="/fichier/portefeuille/'.$file.
'">Cliquez-ici pour t&eacute;l&eacute;charger'.
' le fichier.</a></u>';
} else {
echo 'Aucune surveillance enregistr&eacute;e.';
}
}
exit;
}
}
/**
* Download pdf of bodacc history
*/
public function histopdfAction()
{
$request = $this->getRequest();
$q = $request->getParam('q', '');
$host = base64_decode($request->getParam('host', ''));
//Authenticate info
$auth = Zend_Auth::getInstance();
$identity = $auth->getIdentity();
$authinfo = '/login/'.$identity->username.'/hach/'.$identity->password;
$url = $host.$authinfo.'/q/'.$q;
Zend_Registry::get('firebug')->info($url);
$file = $this->getFile($url, uniqid('histo-').'.pdf');
// Le fichier existe sur l'extranet
if ($file && file_exists($this->path.'/'.$file)) {
if (filesize($this->path.'/'.$file) > 0) {
echo '<u><a title="T&eacute;l&eacute;charger le fichier"'.
' target="_blank" href="/fichier/histopdf/'.$file.
'">Cliquez-ici pour t&eacute;l&eacute;charger'.
' le fichier.</a></u>';
} else {
echo "Erreur lors du téléchargement du fichier.";
}
}
}
/**
* Download bilan pdf file
*/
public function bilanAction()
{
$this->filetime = 40;
$request = $this->getRequest();
$siren = $request->getParam('siren');
$dateCloture = $request->getParam('dateCloture');
$reference = $request->getParam('reference');
//Récupération du l'URL
require_once 'Scores/WsScores.php';
$ws = new WsScores();
$url = $ws->getPiecesBilan($siren, 'T', $dateCloture, $reference);
//Téléchargement
if( $url !== false) {
Zend_Registry::get('firebug')->info($url);
$file = $this->getFile($url);
Zend_Registry::get('firebug')->info('File:'.$this->path.'/'.$file);
// Le fichier existe sur l'extranet
if ($file && file_exists($this->path.'/'.$file)) {
if (filesize($this->path.'/'.$file) > 0) {
echo '<br/><u><a title="T&eacute;l&eacute;charger le fichier"'.
' target="_blank" href="/fichier/bilan/'.$file.
'">Cliquez-ici pour t&eacute;l&eacute;charger'.
' le fichier.</a></u>';
} else {
echo "<br/>Erreur lors du téléchargement du fichier.";
}
}
} else {
echo "<br/>Erreur.";
}
}
}

View File

@ -1,642 +0,0 @@
<?php
class UserController extends Zend_Controller_Action
{
public function init()
{
require_once 'Scores/WsScores.php';
$this->view->headLink()->appendStylesheet('/themes/default/styles/user.css', 'all');
}
/**
* Affiche le fomulaire d'edition des paramètres utilisateur
*/
public function indexAction()
{
$user = new Scores_Utilisateur();
if (!$user->checkPerm('MONPROFIL')){
$this->_forward('perms', 'error');
}
$this->view->assign('device_type', $user->getBrowserInfo()->mobile);
$this->view->assign('browser_info', $user->getBrowserInfo()->name.' '.$user->getBrowserInfo()->version);
$this->view->headLink()->appendStylesheet('/themes/default/styles/form.css', 'all');
$this->view->headScript()->appendFile('/themes/default/scripts/user.js', 'text/javascript');
$request = $this->getRequest();
$messages = '';
$isProfilUpdated = false;
$isPasswordUpdated = false;
$updateResult = false;
$ws = new WsScores();
$login = $request->getParam('login', '');
$op = $request->getParam('op');
//Récupération des informations de l'identité
$auth = Zend_Auth::getInstance();
$identity = $auth->getIdentity();
//Save data
if ( $request->isPost() ) {
$options = $request->getParam('frmOptions', '');
$action = $options['action'];
if ($login=='') $login = $options['login'];
//Enregistrement des données new & update
if (in_array($action, array('new','update'))) {
if ($options['changepwd']!=1) {
$options['password'] = '';
}
if ( in_array($options['profil'], array('Administrateur', 'SuperAdministrateur'))
&& !in_array('monprofil', $options['droits']) ) {
$options['droits'][] = 'monprofil';
}
if( !isset($options['profil']) ) {
$options['profil'] = 'Utilisateur';
}
$reponse = $ws->setInfosLogin($login, $action, $options);
$isProfilUpdated = true;
$message = 'Erreur lors de la mise à jour du compte !';
if (is_string($reponse)) {
$message = $reponse;
} elseif ($reponse){
$updateResult = true;
$message = 'Compte mis à jour.';
}
}
//Write change in session
if ($identity->idClient == $options['idClient'] && $identity->username == $login) {
//Modification lors du changement de mot de passe
if ($options['changepwd']==1 && $updateResult) {
$identity->password = md5($login.'|'.$options['password']);
$auth->getStorage()->write($identity);
}
//Mise à jour du profil
if ($isProfilUpdated && $updateResult) {
$InfosLogin = $ws->getInfosLogin($identity->username, $_SERVER['REMOTE_ADDR']);
$identity = $user->updateProfil($InfosLogin);
$auth->getStorage()->write($identity);
}
//Gestion mode edition en SESSION
if ($action=='update') {
$modeEdition = $request->getParam('modeEdition', false);
if ( $modeEdition ) {
$identity->modeEdition = true;
$auth->getStorage()->write($identity);
}
}
}
}
if ( $isProfilUpdated || $isPasswordUpdated ) {
$this->view->assign('message', $message);
}
$isAdmin = false;
if ( $identity->profil == 'Administrateur'
|| $identity->profil == 'SuperAdministrateur' ) {
$isAdmin = true;
}
$this->view->assign('isAdmin', $isAdmin);
$isSuperAdmin = false;
if ($identity->profil == 'SuperAdministrateur') {
$isSuperAdmin = true;
}
$this->view->assign('isSuperAdmin', $isSuperAdmin);
if ($op=='new')
{
$idClient = $request->getParam('idClient', '');
if ($idClient == '') {
$idClient = $identity->idClient;
}
$reponse = $ws->getNextLogin($idClient);
$options->idClient = $idClient;
if ($identity->idClient!=1 && $identity->profil!='SuperAdministrateur') {
$options->profil = 'Utilisateur';
}
$this->view->assign('options', $options);
$this->view->assign('loginNew', $reponse->result->racine);
$this->view->assign('droitsClients', explode(' ', strtolower($reponse->result->droitsClients)));
$this->view->assign('action', 'new');
$this->view->assign('pref', array());
}
elseif (!empty($op) || $op!='new')
{
if ( !empty($login) && $identity->username != $login ) {
Zend_Registry::get('firebug')->info('getInfosLogin');
$reponse = $ws->getInfosLogin($login, $_SERVER['REMOTE_ADDR']);
$this->view->assign('options', $reponse->result);
$this->view->assign('loginVu', $reponse->result->login);
$this->view->assign('droits', explode(' ', strtolower($reponse->result->droits)));
$this->view->assign('droitsClients', explode(' ', strtolower($reponse->result->droitsClients)));
} else {
$this->view->assign('options', $identity);
$this->view->assign('loginVu', $identity->username);
$this->view->assign('droits', explode(' ', strtolower($identity->droits)));
$this->view->assign('droitsClients', explode(' ', strtolower($identity->droitsClients)));
}
$this->view->assign('loginNew', '');
$this->view->assign('action', 'update');
$this->view->assign('pref', explode(' ',$identity->pref));
}
//Liste des catégories des accès
$reponse = $ws->getCategory();
$wscategory = $reponse->item;
$this->view->assign('wscategory', $wscategory);
//Liste de tous les droits
$listeDroits = $ws->getListeDroits();
$droitsLib = array();
foreach($listeDroits->item as $droit) {
$droitsLib[strtoupper($droit->code)] = $droit->desc;
}
$this->view->assign('droitsLib', $droitsLib);
//Liste de toutes les préférences
$listePrefs = $ws->getListePrefs();
$prefsLib = array();
foreach($listePrefs->item as $pref) {
$prefsLib[strtoupper($pref->code)] = $pref->desc;
}
$this->view->assign('prefsLib', $prefsLib);
}
/**
* Display box to enter emails
* One main email and two secondary
* Email length 80 * 3 = 240
* 255 chars is the length to store emails (email1;email2;email3)
*/
public function emailsAction()
{
$this->_helper->layout()->disableLayout();
$nbEmails = 3;
$request = $this->getRequest();
$emails = $request->getParam('q');
if (null !== $emails) {
$emailList = explode(';', $emails);
if ( count($emailList)>0 ) {
$i = 1;
foreach ( $emailList as $email ) {
$this->view->assign('email'.$i, $email);
$i++;
}
}
}
}
/**
* Validate email
*/
public function emailvalidAction()
{
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$email = $request->getParam('q');
$valid = false;
if (null !== $email) {
$validateur = new Zend_Validate_EmailAddress();
$valid = $validateur->isValid($email);
}
$result = array(
'valid' => $valid,
);
$this->view->assign('result', $result);
}
/**
* Téléchargement de la consommation au format CSV
*/
public function consoAction()
{
$this->view->headScript()->appendFile('/themes/default/scripts/conso.js', 'text/javascript');
$user = new Scores_Utilisateur();
$request = $this->getRequest();
$idClient = $request->getParam('idClient', $user->getIdClient());
$login = $request->getParam('login', '');
$this->view->assign('idClient', $idClient);
$this->view->assign('login', $login);
$this->view->assign('profil', $user->getProfil());
}
/**
* Renvoi vers le formulaire utilisateur avec les paramètres de la requete
*/
public function editAction()
{
$params = $this->getRequest()->getParams();
$this->_forward('index', 'user', null, $params);
}
/**
* Suppression d'un utilisateur
*/
public function deleteAction()
{
$request = $this->getRequest();
$login = $request->getParam('login');
$action = 'delete';
$ws = new WsScores();
$ws->setInfosLogin($login, $action);
//Redirect
$this->_forward('liste');
}
/**
* Activation d'un utilisateur
*/
public function enableAction()
{
$request = $this->getRequest();
$login = $request->getParam('login');
$action = 'enable';
$ws = new WsScores();
$ws->setInfosLogin($login, $action);
//Redirect
$this->_forward('liste');
}
/**
* Désactivation d'un utilisateur
*/
public function disableAction()
{
$request = $this->getRequest();
$login = $request->getParam('login');
$action = 'disable';
$ws = new WsScores();
$ws->setInfosLogin($login, $action);
//Redirect
$this->_forward('liste');
}
/**
* Méthode AJAX pour modifier le password d'un utilisateur
*/
public function changepwdAction()
{
//Redirect
}
/**
* Affiche la liste des utiliateurs
*/
public function listeAction()
{
$user = new Scores_Utilisateur();
$request = $this->getRequest();
$idClient = $request->getParam('idClient', $user->getIdClient());
if (!$user->isSuperAdmin() && !$user->isAdmin()) {
$this->renderScript('error/perms.phtml');
}
if ($user->isAdmin()){
$idClient = $user->getIdClient();
}
$ws = new WsScores();
$infos = $ws->getListeUtilisateurs($user->getLogin(), $idClient);
$utilisateurs = $infos->result->item;
$this->view->assign('utilisateurs', $utilisateurs);
$this->view->assign('idClient', $idClient);
}
/**
* Gestion de l'authentification
*/
public function loginAction()
{
$this->view->headScript()
->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_Auth_Adapter_Ws($login, md5($login.'|'.$pass));
$result = $auth->authenticate($authAdapter);
//Auth is valid
if ( $result->isValid() ) {
//Save browser information
$screenSize = $request->getParam('screenSize', 'unknow');
$user = new Scores_Utilisateur();
$info = get_browser();
$isMobile = ($info->ismobiledevice==1) ? 1 : 0;
$user->setBrowserInfo($info->platform, $info->browser, $info->version, $isMobile, $screenSize);
//Get previous url if user has been disconnected
$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!='/user/logout' && $url!='/localauth'){
$this->_redirect($url);
}
$this->_redirect('/');
}
//Auth error
else {
$this->view->message = '';
Zend_Registry::get('firebug')->info($result);
foreach ($result->getMessages() as $message) {
$this->view->message.= $message."<br/>";
}
}
}
}
$this->_helper->layout()->disableLayout();
}
/**
* Gestion de la déconnexion
*/
public function logoutAction()
{
Zend_Auth::getInstance()->clearIdentity();
$session = new Zend_Session_Namespace('wcheck');
$session->unsetAll();
$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'].$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);
}
}
/**
* Mettre à jour le mode edition en session sans refresh de la page
*/
public function editionsessionAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$request = $this->getRequest();
$mode = $request->getParam('mode', 'false');
$auth = Zend_Auth::getInstance();
$identity = $auth->getIdentity();
if ($identity->idClient == 1) {
if ($mode == 'false') {
$identity->modeEdition = false;
echo 0;
} else {
$identity->modeEdition = true;
echo 1;
}
$auth->getStorage()->write($identity);
} else {
echo 0;
}
}
/**
* Override email in surveillance portfolio
*/
public function emailsurveillanceAction()
{
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$user = new Scores_Utilisateur();
//Execute webservice operation
if ( $request->isPost() ) {
$email = trim($request->getParam('email'));
if ($user->isAdmin() || $user->isSuperAdmin()) {
$login = $request->getParam('login');
}
if (empty($email)) {
$result = "Aucun email défini!";
} else if (empty($login)) {
$result = "Aucun utilisateur défini!";
} else {
$ws = new WsScores();
$result = $ws->setSurveillancesMail($login, $email);
}
$this->view->assign('result', $result);
}
//Display form in dialog
else {
if ($user->isAdmin() || $user->isSuperAdmin()) {
$login = $request->getParam('login');
} else {
$login = $user->getLogin();
}
$this->view->assign('login', $login);
$this->view->assign('dialog',true);
}
}
/**
* 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);
}
/**
* Changer le theme de l'utilisateur
*/
public function changethemeAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$request = $this->getRequest();
$nom = $request->getParam('nom', 'default');
$auth = Zend_Auth::getInstance();
$identity = $auth->getIdentity();
$identity->theme = $nom;
$auth->getStorage()->write($identity);
//Rediriger vers l'écran de recherche
$this->_redirect('/');
}
/**
* Display browser informations on a simple page
*/
public function browserAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
//Load bootstrap
$bootstrap = Zend_Controller_Front::getInstance()->getParam('bootstrap');
//Get useragent and device informations
$userAgent = $bootstrap->getResource('useragent');
$device = $userAgent->getDevice();
//Display
echo "<pre>";
print_r(get_browser());
print_r($device->getAllFeatures());
echo "</pre>";
}
/**
* Sends email to the specific client, who requests for forgotten password
*/
public function motpasseAction()
{
$request = $this->getRequest();
$name = 'Identifiants oubliés ?';
$params = array(
'identifiant' => '',
'telephone' => '',
'email' => '',
'nom' => '',
'prenom' => '',
'fonction' => '',
'service' => '',
'rsociale' => '',
);
$this->_helper->layout()->disableLayout();
if ( $request->isPost() ) {
$params = $request->getParams();
$message = '';
$paramlist = array(
'telephone' => 'Numéro de téléphone direct',
'email' => 'Adresse email',
'nom' => 'Nom',
'prenom' => 'Prénom',
'fonction' => 'Fonction',
'service' => 'Service',
'rsociale' => 'Sociale',
);
foreach ($paramlist as $item => $val) {
if (!isset($params[$item])) {
$message .= "Champs $val vide !<br/>";
}
}
$validator = new Zend_Validate_EmailAddress();
if (isset($params['email'])){
if (!$validator->isValid($params['email'])) {
$message .="Adresse email invalide ! <br/>";
}
}
if ($message == '') {
$mailbody = '<style type="text/css">table {font-family:Arial, Helvetica, sans-serif; font-size: 12px; width: 550px; border: none;}table td{padding: 4px 8px;}</style>';
$mailbody .= "Demande d'envoi des identifiants.<br /><br />";
$mailbody .= "L'un de nos clients a égaré son(ses) identifiant(s).<br />";
$mailbody .= "Via notre lien -identifiants oubliés- il a effectué une demande de transmission de ces codes.<br />";
$mailbody .= "<p>A l'aide des informations ci-dessous, merci de retrouver ces codes et les lui envoyer par email.</p>";
$mailbody .= "<table><tr bgcolor='#eeeeee'><td width='200px'><strong>Identifiant :</strong></td><td>".$params['identifiant']."</td></tr>";
$mailbody .= "<tr><td><strong>Adresse email:</strong></td><td>".$params['email']."</td></tr>";
$mailbody .= "<tr bgcolor='#eeeeee'><td><strong>Numéro de téléphone direct:</strong></td><td>".$params['telephone']."</td></tr>";
$mailbody .= "<tr><td><strong>Nom:</strong></td><td>".$params['nom']."</td></tr>";
$mailbody .= "<tr bgcolor='#eeeeee'><td><strong>Prénom:</strong></td><td>".$params['prenom']."</td></tr>";
$mailbody .= "<tr><td><strong>Fonction:</strong></td><td>".$params['fonction']."</td></tr>";
$mailbody .= "<tr bgcolor='#eeeeee'><td><strong>Service:</strong></td><td>".$params['service']."</td></tr>";
$mailbody .= "<tr><td><strong>Dénomination Sociale:</strong></td><td>".$params['rsociale']."</td></tr></table>";
$mailbody .= "<p>Si les informations fournies ne permettent pas d'identifier correctement l'utilisateur, ";
$mailbody .= "merci d'émettre un message sur le mail communiquer en précisant que \"Les éléments confiés ne permettent pas d'identifier l'utilisateur ";
$mailbody .= "et par conséquence de vous délivrer les codes d'accès demandés\".<br />";
$mailbody .= "Aussi nous vous invitons à vous rapprocher de votre interlocuteur commercial habituel ";
$mailbody .= "ou de votre responsable suivi relations Scores & Décisions au sein de votre société.</p>";
$mail = new Scores_Mail();
$mail->setSubject("Demande d'envoi des identifiants");
$mail->setBodyHTML($mailbody);
$mail->setFrom('support');
$mail->addToKey('support');
$mail->setReplyTo($params['email']);
try {
$mail->send();
$this->view->assign('sendEmail' , true);
}
catch ( Zend_Mail_Transport_Exception $e ){
$message = $e->getMessage();
}
}
$this->view->assign('message', $message);
}
}
}

Binary file not shown.

View File

@ -1,8 +1,8 @@
msgid ""
msgstr ""
"Project-Id-Version: Extranet2.4\n"
"POT-Creation-Date: 2013-12-26 11:07+0100\n"
"PO-Revision-Date: 2013-12-26 11:18+0100\n"
"POT-Creation-Date: 2014-04-24 09:31+0100\n"
"PO-Revision-Date: 2014-04-24 09:32+0100\n"
"Last-Translator: Michael RICOIS <mricois@scores-decisions.com>\n"
"Language-Team: SND-A\n"
"Language: en\n"
@ -31,80 +31,87 @@ msgstr "News"
msgid "Banque de France - "
msgstr "BANK OF FRANCE"
#: application/controllers/DirigeantController.php:23
#: application/controllers/DirigeantController.php:27
#: application/languages/totranslate.php:20
msgid "Liste des dirigeants"
msgstr "List of managers"
#: application/controllers/DirigeantController.php:24
#: application/controllers/DirigeantController.php:64
#: application/controllers/DirigeantController.php:93
#: application/controllers/EvaluationController.php:76
#: application/controllers/EvaluationController.php:108
#: application/controllers/EvaluationController.php:267
#: application/controllers/EvaluationController.php:496
#: application/controllers/EvaluationController.php:606
#: application/controllers/EvaluationController.php:711
#: application/controllers/EvaluationController.php:862
#: application/controllers/DirigeantController.php:28
#: application/controllers/DirigeantController.php:69
#: application/controllers/DirigeantController.php:98
#: application/controllers/EvaluationController.php:70
#: application/controllers/EvaluationController.php:164
#: application/controllers/EvaluationController.php:196
#: application/controllers/EvaluationController.php:355
#: application/controllers/EvaluationController.php:584
#: application/controllers/EvaluationController.php:694
#: application/controllers/EvaluationController.php:799
#: application/controllers/EvaluationController.php:950
#: application/controllers/FinanceController.php:39
#: application/controllers/FinanceController.php:215
#: application/controllers/FinanceController.php:465
#: application/controllers/FinanceController.php:826
#: application/controllers/FinanceController.php:972
#: application/controllers/FinanceController.php:1014
#: application/controllers/FinanceController.php:1035
#: application/controllers/FinanceController.php:1279
#: application/controllers/FinanceController.php:1304
#: application/controllers/IdentiteController.php:1398
#: application/controllers/IdentiteController.php:1415
#: application/controllers/JuridiqueController.php:224
#: application/controllers/JuridiqueController.php:274
#: application/controllers/JuridiqueController.php:320
#: application/controllers/JuridiqueController.php:341
#: application/controllers/FinanceController.php:979
#: application/controllers/FinanceController.php:1021
#: application/controllers/FinanceController.php:1042
#: application/controllers/FinanceController.php:1286
#: application/controllers/FinanceController.php:1311
#: application/controllers/IdentiteController.php:1476
#: application/controllers/IdentiteController.php:1493
#: application/controllers/JuridiqueController.php:226
#: application/controllers/JuridiqueController.php:276
#: application/controllers/JuridiqueController.php:322
#: application/controllers/JuridiqueController.php:343
msgid "Siret "
msgstr "Siret"
#: application/controllers/DirigeantController.php:63
#: application/controllers/DirigeantController.php:68
#: application/languages/totranslate.php:21
#: application/views/default/scripts/dirigeant/histo.phtml:29
msgid "Historique des dirigeants"
msgstr "History of Managers"
#: application/controllers/DirigeantController.php:92
#: application/controllers/DirigeantController.php:97
msgid "Liste des dirigeants opérationnels"
msgstr "List of operational managers"
#: application/controllers/EvaluationController.php:75
#: application/controllers/EvaluationController.php:69
#, fuzzy
msgid "Historique indiScore"
msgstr "INDISCORE"
#: application/controllers/EvaluationController.php:163
#: application/languages/totranslate.php:44
#: application/views/default/scripts/evaluation/indiscorehisto.phtml:28
msgid "IndiScore"
msgstr "IndiScore"
#: application/controllers/EvaluationController.php:107
#: application/controllers/EvaluationController.php:195
#: application/languages/totranslate.php:45
msgid "Rapport de synthèse"
msgstr "Synthesis Report"
#: application/controllers/EvaluationController.php:266
#: application/controllers/EvaluationController.php:354
#: application/languages/totranslate.php:46
msgid "Rapport complet"
msgstr "Full report"
#: application/controllers/EvaluationController.php:495
#: application/controllers/EvaluationController.php:583
#, fuzzy
msgid "Enquete commerciale"
msgstr "Commercial survey"
#: application/controllers/EvaluationController.php:605
#: application/controllers/EvaluationController.php:693
#, fuzzy
msgid "Avis de crédit"
msgstr "Reviews custom credit"
#: application/controllers/EvaluationController.php:710
#: application/controllers/EvaluationController.php:798
#: application/languages/totranslate.php:48
msgid "Scoring Credit Safe"
msgstr "Scoring Credit Safe"
#: application/controllers/EvaluationController.php:861
#: application/controllers/EvaluationController.php:949
#: application/languages/totranslate.php:47
msgid "Valorisation"
msgstr "Valuation"
@ -117,7 +124,7 @@ msgstr "Financial situation"
#: application/controllers/FinanceController.php:214
#, fuzzy
msgid "Bilan, Compte de résultat"
msgstr "Balances, Income statement"
msgstr "Income Statement"
#: application/controllers/FinanceController.php:464
#: application/languages/totranslate.php:25
@ -129,37 +136,38 @@ msgstr "Ratios"
msgid "Liasse fiscale"
msgstr "Tax return"
#: application/controllers/FinanceController.php:971
#: application/controllers/FinanceController.php:978
#: application/languages/totranslate.php:28
msgid "Bourse & Cotations"
msgstr "Purse & Quotes"
#: application/controllers/FinanceController.php:1013
#: application/controllers/FinanceController.php:1020
msgid "Relations Banquaires"
msgstr "Bank Account"
#: application/controllers/FinanceController.php:1034
#: application/controllers/FinanceController.php:1041
#: application/languages/totranslate.php:26
msgid "Flux de trésorerie"
msgstr "Cash flow"
#: application/controllers/FinanceController.php:1278
#: application/controllers/FinanceController.php:1285
msgid "Subventions"
msgstr ""
#: application/controllers/FinanceController.php:1303
#: application/controllers/FinanceController.php:1310
msgid "Subvention"
msgstr ""
#: application/controllers/IdentiteController.php:52
msgid "Identité - "
msgstr "Identity -"
#: application/controllers/IdentiteController.php:58
#, fuzzy
msgid "Fiche Identité - "
msgstr "See identity card"
#: application/controllers/IdentiteController.php:203
#: application/controllers/IdentiteController.php:202
msgid "Fiche procédure collective - "
msgstr "Legal review -"
#: application/controllers/IdentiteController.php:314
#: application/controllers/IdentiteController.php:313
msgid "Liste des établissements - Siren "
msgstr "Branch List - Siren "
@ -167,41 +175,63 @@ msgstr "Branch List - Siren "
msgid "Liens inter-entreprises - Id "
msgstr "Associated Links - Id "
#: application/controllers/IdentiteController.php:599
#: application/controllers/IdentiteController.php:607
msgid "Liens inter-entreprises - Siren "
msgstr "Associated Links - Siren "
#: application/controllers/IdentiteController.php:976
#: application/controllers/IdentiteController.php:1006
msgid "Evènements - Siren "
msgstr "INSEE events - Siren"
#: application/controllers/IdentiteController.php:1397
#: application/controllers/IdentiteController.php:1475
msgid "Groupe"
msgstr "Parent Company"
#: application/controllers/IdentiteController.php:1414
#: application/controllers/IdentiteController.php:1492
msgid "Contacts"
msgstr "Contacts"
#: application/controllers/JuridiqueController.php:223
#: application/controllers/JuridiqueController.php:178
#, fuzzy
msgid "Annonces Légales - "
msgstr "Legal Notices"
#: application/controllers/JuridiqueController.php:225
#, fuzzy
msgid "Informations Réglementées"
msgstr "Informations"
#: application/controllers/JuridiqueController.php:273
#: application/controllers/JuridiqueController.php:275
#: application/languages/totranslate.php:33
msgid "Compétences Territoriales"
msgstr "Territorial competences"
#: application/controllers/JuridiqueController.php:319
#: application/controllers/JuridiqueController.php:321
#, fuzzy
msgid "Conventions Collectives"
msgstr "Collective agreements"
#: application/controllers/JuridiqueController.php:340
#: application/controllers/JuridiqueController.php:342
msgid "Marques Déposées"
msgstr "Trademarks"
#: application/controllers/PiecesController.php:682
#, fuzzy
msgid "Votre demande de reception de Kbis par email a été prise en compte"
msgstr "Receive kbis by email"
#: application/controllers/PiecesController.php:736
#, fuzzy
msgid ""
"Votre commande à été prise en compte, vous recevrez ce document sous 3/5 "
"jours"
msgstr "You have been disconnected"
#: application/controllers/PiecesController.php:743
#, fuzzy
msgid "Erreur : Tous les champs doivent être renseigner."
msgstr "All users"
#: application/controllers/RechercheController.php:29
msgid "Recherche Entreprise"
msgstr "Search Company"
@ -232,12 +262,36 @@ msgstr "List of recent searches"
msgid "Enquête"
msgstr "Investigation"
#: application/controllers/SaisieController.php:134
#: application/controllers/SaisieController.php:1961
#: application/controllers/SaisieController.php:333
#: application/controllers/SaisieController.php:2162
msgid "Saisie - "
msgstr "Edit - "
#: application/controllers/UserController.php:346
#: application/controllers/SaisieController.php:2648
#, fuzzy
msgid "Ajout"
msgstr "Add the"
#: application/controllers/SaisieController.php:2650
msgid "Edition"
msgstr "Edit"
#: application/controllers/SaisieController.php:2652
#, fuzzy
msgid "Suppression"
msgstr "Print"
#: application/controllers/SaisieController.php:2658
#, fuzzy
msgid "a été réussi!"
msgstr "You have been disconnected"
#: application/controllers/SaisieController.php:2660
#, fuzzy
msgid "n'a pas été réussi!"
msgstr "You have been disconnected"
#: application/controllers/UserController.php:395
msgid "Connexion"
msgstr "Connextion"
@ -493,13 +547,13 @@ msgstr "Siren identification number"
msgid "Dénomination Sociale"
msgstr "Company Name"
#: application/views/default/scripts/dirigeant/histo.phtml:40
#: application/views/default/scripts/dirigeant/histo.phtml:41
msgid "Modification le"
msgstr "Change done the"
#: application/views/default/scripts/dirigeant/histo.phtml:58
#: application/views/default/scripts/dirigeant/histo.phtml:51
#: application/views/default/scripts/dirigeant/liste.phtml:119
#: application/views/default/scripts/dirigeant/op.phtml:86
#: application/views/default/scripts/dirigeant/op.phtml:130
msgid "Aucune donn&eacute;e n'est pr&eacute;sente dans notre base"
msgstr "No data is present in our database"
@ -517,7 +571,7 @@ msgid "Recherche à partir de la dénomination sociale"
msgstr "Search from the company name"
#: application/views/default/scripts/dirigeant/liste.phtml:70
#: application/views/default/scripts/dirigeant/op.phtml:62
#: application/views/default/scripts/dirigeant/op.phtml:65
msgid "Recherche à partir du nom du dirigeant"
msgstr "Search from the name of manager"
@ -533,18 +587,86 @@ msgstr "Add a shareholder"
msgid "DIRIGEANTS OP&Eacute;RATIONNELS"
msgstr "OPERATIONAL MANAGERS"
#: application/views/default/scripts/dirigeant/op.phtml:50
#: application/views/default/scripts/dirigeant/op.phtml:38
#, fuzzy
msgid "Ajouter un dirigeant"
msgstr "Add a shareholder"
#: application/views/default/scripts/dirigeant/op.phtml:53
msgid "Recherche à partir de la Dénomination sociale"
msgstr "Search from the Companyname"
#: application/views/default/scripts/dirigeant/op.phtml:69
#: application/views/default/scripts/dirigeant/op.phtml:74
msgid "né(e) le"
#: application/views/default/scripts/dirigeant/op.phtml:75
#: application/views/default/scripts/identite/lienfiche.phtml:21
#, fuzzy
msgid "le"
msgstr "Add the"
#: application/views/default/scripts/dirigeant/op.phtml:79
#: application/views/default/scripts/identite/lienfiche.phtml:25
#, fuzzy
msgid "à"
msgstr "Born in"
#: application/views/default/scripts/dirigeant/op.phtml:84
#, fuzzy
msgid "né(e)"
msgstr "Born in"
#: application/views/default/scripts/dirigeant/op.phtml:86
#, fuzzy
msgid "né"
msgstr "Born in"
#: application/views/default/scripts/dirigeant/op.phtml:88
#, fuzzy
msgid "née"
msgstr "born the"
#: application/views/default/scripts/dirigeant/op.phtml:76
msgid "né(e) à"
msgstr "born in"
#: application/views/default/scripts/evaluation/indiscore.phtml:41
#, fuzzy
msgid "Consulter l'historique des IndiScore"
msgstr "Check the list of operational managers"
#: application/views/default/scripts/evaluation/indiscorehisto.phtml:3
#, fuzzy
msgid "HISTORIQUE INDISCORE"
msgstr "INDISCORE"
#: application/views/default/scripts/evaluation/indiscorehisto.phtml:8
#, fuzzy
msgid "Numéro identifiant Siren"
msgstr "Siret identification number"
#: application/views/default/scripts/evaluation/indiscorehisto.phtml:13
#, fuzzy
msgid "Dénomination sociale"
msgstr "Company Name"
#: application/views/default/scripts/evaluation/indiscorehisto.phtml:19
#, fuzzy
msgid "Historique des scores"
msgstr "History of bodacc announces"
#: application/views/default/scripts/evaluation/indiscorehisto.phtml:27
#, fuzzy
msgid "Date"
msgstr "Registration date"
#: application/views/default/scripts/evaluation/indiscorehisto.phtml:29
#, fuzzy
msgid "Motif du changement"
msgstr "Search from the name of manager"
#: application/views/default/scripts/evaluation/indiscorehisto.phtml:51
#, fuzzy
msgid "Impossible de générer le graphique"
msgstr "Modify password"
#: application/views/default/scripts/evaluation/indiscorehisto.phtml:58
#, fuzzy
msgid "Aucune information sur l'historique disponible."
msgstr "No IP"
#: application/views/default/scripts/identite/etablissements.phtml:2
msgid "LISTE DES &Eacute;TABLISSEMNTS"
@ -578,7 +700,7 @@ msgstr "Inactive"
msgid "Tous"
msgstr "All"
#: application/views/default/scripts/identite/etablissements.phtml:75
#: application/views/default/scripts/identite/etablissements.phtml:69
msgid "Voir la fiche d'identité"
msgstr "See the copany identity"
@ -598,6 +720,134 @@ msgstr "Company name &amp; Contacts"
msgid "Activité(s) &amp; Chiffre d'affaires"
msgstr "Activities &amp; Turnover"
#: application/views/default/scripts/identite/lienfiche.phtml:30
#, fuzzy
msgid "Né(e)"
msgstr "Born in"
#: application/views/default/scripts/identite/lienfiche.phtml:32
#, fuzzy
msgid "Né"
msgstr "Born in"
#: application/views/default/scripts/identite/lienfiche.phtml:34
#, fuzzy
msgid "Née"
msgstr "None"
#: application/views/default/scripts/pieces/commande.phtml:39
#, fuzzy
msgid "K-Bis inexistant pour cette forme juridique"
msgstr "Legal form"
#: application/views/default/scripts/pieces/commande.phtml:46
#, fuzzy
msgid "Visualiser/Télécharger le kbis"
msgstr "Receive kbis by email"
#: application/views/default/scripts/pieces/commande.phtml:59
msgid "Recevoir le kbis par email"
msgstr "Receive kbis by email"
#: application/views/default/scripts/pieces/commande.phtml:60
msgid "Recevoir le kbis original par courrier"
msgstr "Receive the original kbis by mail"
#: application/views/default/scripts/pieces/commande.phtml:62
#, fuzzy
msgid ""
"Les pièces demandées seront commandées par courrier auprès du greffe. "
"Prévoir un délai de 2 à 3 semaines."
msgstr "Receive the original kbis by mail"
#: application/views/default/scripts/pieces/commande.phtml:72
#: application/views/default/scripts/pieces/commande.phtml:104
#, fuzzy
msgid "Commande de KBIS demandé pour la société"
msgstr "SOCIETY"
#: application/views/default/scripts/pieces/commande.phtml:73
#, fuzzy
msgid ""
"Vous recevrez un email (sous 3/5 jours ouvrés) lorsque le document sera "
"disponible."
msgstr "Link a document"
#: application/views/default/scripts/pieces/commande.phtml:77
#: application/views/default/scripts/pieces/commande.phtml:108
#, fuzzy
msgid "Votre email"
msgstr "Receive kbis by email"
#: application/views/default/scripts/pieces/commande.phtml:84
#: application/views/default/scripts/pieces/commande.phtml:114
#, fuzzy
msgid "Votre référence"
msgstr "Your Reference"
#: application/views/default/scripts/pieces/commande.phtml:87
#: application/views/default/scripts/pieces/commande.phtml:116
msgid "(facultatif)"
msgstr ""
#: application/views/default/scripts/pieces/commande.phtml:92
#: application/views/default/scripts/pieces/commande.phtml:144
msgid "Valider"
msgstr "Validate"
#: application/views/default/scripts/pieces/commande.phtml:96
#, fuzzy
msgid "Commande impossible. L'email de votre compte est invalide."
msgstr "Exporting your portfolio"
#: application/views/default/scripts/pieces/commande.phtml:105
#, fuzzy
msgid ""
"Vous recevrez un email (sous 2 à 3 semaines) lorsque le document sera "
"disponible."
msgstr "Link a document"
#: application/views/default/scripts/pieces/commande.phtml:119
#, fuzzy
msgid "Votre Societe"
msgstr "Your profile"
#: application/views/default/scripts/pieces/commande.phtml:123
#, fuzzy
msgid "Votre Nom"
msgstr "Last name"
#: application/views/default/scripts/pieces/commande.phtml:127
#, fuzzy
msgid "Votre Prenom"
msgstr "Your profile"
#: application/views/default/scripts/pieces/commande.phtml:131
#, fuzzy
msgid "Votre Adresse"
msgstr "Address"
#: application/views/default/scripts/pieces/commande.phtml:135
#, fuzzy
msgid "Votre Code Postal"
msgstr "Code :"
#: application/views/default/scripts/pieces/commande.phtml:139
#, fuzzy
msgid "Votre Ville"
msgstr "City"
#: application/views/default/scripts/pieces/commande.phtml:148
#, fuzzy
msgid "Commande impossible. L'email de votre compte est invalide"
msgstr "Exporting your portfolio"
#: application/views/default/scripts/pieces/commande.phtml:157
#: application/views/default/scripts/pieces/commande.phtml:226
#, fuzzy
msgid "Vous n'avez pas les droits d'accès pour cette fonctionalité."
msgstr "Permissions"
#: application/views/default/scripts/recherche/actionnaire.phtml:6
msgid "RECHERCHE PAR ACTIONNAIRE"
msgstr "SEARCH BY SHAREHOLDER"
@ -617,20 +867,82 @@ msgstr "SEARCH A COMPANY"
#: application/views/default/scripts/recherche/refclient.phtml:1
#, fuzzy
msgid "RECHERCHE SURVEILLANCE"
msgstr "Search"
msgstr "Monitoring"
#: application/views/default/scripts/recherche/worldcheck.phtml:4
#, fuzzy
msgid "RECHERCHE WORLDCHECK"
msgstr "Search in WorldCheck"
#: application/views/default/scripts/user/login.phtml:613
#: application/views/default/scripts/user/login.phtml:614
#: application/views/default/scripts/saisie/diropcontrol-form.phtml:10
#, fuzzy
msgid "Civilité"
msgstr "Solvency :"
#: application/views/default/scripts/saisie/diropcontrol-form.phtml:23
msgid "Nom"
msgstr "Last name"
#: application/views/default/scripts/saisie/diropcontrol-form.phtml:30
msgid "Prenom"
msgstr ""
#: application/views/default/scripts/saisie/diropcontrol-form.phtml:37
#, fuzzy
msgid "Nom d'usage"
msgstr "Last name"
#: application/views/default/scripts/saisie/diropcontrol-form.phtml:44
#, fuzzy
msgid "Fonction"
msgstr "Constructions"
#: application/views/default/scripts/saisie/diropcontrol-form.phtml:56
#, fuzzy
msgid "Date de naissance"
msgstr "Closing date"
#: application/views/default/scripts/saisie/diropcontrol-form.phtml:69
#, fuzzy
msgid "Lieu de naissance"
msgstr "Intracom VAT number."
#: application/views/default/scripts/saisie/diropcontrol-form.phtml:76
msgid "Téléphone"
msgstr "Telephone"
#: application/views/default/scripts/saisie/diropcontrol-form.phtml:83
#, fuzzy
msgid "Télécopie"
msgstr "Telephone"
#: application/views/default/scripts/saisie/diropcontrol-form.phtml:90
#, fuzzy
msgid "Email"
msgstr "Receive kbis by email"
#: application/views/default/scripts/saisie/diropcontrol.phtml:9
#, fuzzy
msgid "Ajouter un dirigeant opérationnel"
msgstr "Add a shareholder"
#: application/views/default/scripts/saisie/diropcontrol.phtml:12
#, fuzzy
msgid "Modifier le dirigeant opérationnel"
msgstr "Modify password"
#: application/views/default/scripts/saisie/diropcontrol.phtml:15
#, fuzzy
msgid "Supprimer le dirigeant opérationnel"
msgstr "Search a Manager"
#: application/views/default/scripts/user/login.phtml:30
#: application/views/default/scripts/user/login.phtml:31
msgid "Identifiants oubliés ?"
msgstr "Forgotten you login ?"
#: application/views/default/scripts/user/logout.phtml:3
#: application/views/default/scripts/user/logout.phtml:16
#: application/views/default/scripts/user/logout.phtml:21
msgid "Vous avez été déconnecté."
msgstr "You have been disconnected"
@ -639,16 +951,21 @@ msgid "Veuillez cliquer"
msgstr "Click"
#: application/views/default/scripts/user/logout.phtml:4
#: application/views/default/scripts/user/logout.phtml:20
#: application/views/default/scripts/user/logout.phtml:25
msgid "ici"
msgstr "here"
#: application/views/default/scripts/user/logout.phtml:20
#: application/views/default/scripts/user/logout.phtml:24
#, fuzzy, php-format
msgid "Si cette page ne disparait pas au bout de %1$s seconde(s)"
msgstr "If this page does not disappear after 5 second(s), please click"
#: application/views/default/scripts/user/logout.phtml:25
msgid "veuillez cliquer "
msgstr "click"
#~ msgid "Numéro identifiant Siret"
#~ msgstr "Siret identification number"
#~ msgid "né(e) à"
#~ msgstr "born in"
#~ msgid "Numéro de TVA Intracom."
#~ msgstr "Intracom VAT number."
@ -681,12 +998,6 @@ msgstr "click"
#~ msgid "Création de l'établissement"
#~ msgstr "Creation of the establishment"
#~ msgid "Adresse"
#~ msgstr "Address"
#~ msgid "Téléphone"
#~ msgstr "Telephone"
#~ msgid "Fax"
#~ msgstr "FAX"
@ -916,9 +1227,6 @@ msgstr "click"
#~ msgid "ISIN"
#~ msgstr "ISIN"
#~ msgid "Nom du groupe"
#~ msgstr "Group name"
#~ msgid "Sigle"
#~ msgstr "Acronym"
@ -1183,9 +1491,6 @@ msgstr "click"
#~ msgid "Avances et acomptes sur immo. incorp."
#~ msgstr "Scores and outstandings"
#~ msgid "Constructions"
#~ msgstr "Constructions"
#, fuzzy
#~ msgid "Instal. techniques, ..."
#~ msgstr "Technical or commercial disputes"
@ -1394,9 +1699,6 @@ msgstr "click"
#~ msgid "Dépôt"
#~ msgstr "Deposit"
#~ msgid "INDISCORE"
#~ msgstr "INDISCORE"
#~ msgid "Définir un Cut-off"
#~ msgstr "Define a Cut-off"
@ -1429,9 +1731,6 @@ msgstr "click"
#~ msgid "L'étude de la dirigeance ne relève aucun problème."
#~ msgstr "Managers :"
#~ msgid "Solvabilité :"
#~ msgstr "Solvency :"
#~ msgid "L'analyse de la solvabilité est Bonne"
#~ msgstr "The solvency analysis is Good"
@ -1575,9 +1874,6 @@ msgstr "click"
#~ msgid "Autre téléphone"
#~ msgstr "Other telephone"
#~ msgid "E-mail"
#~ msgstr "E-mail"
#~ msgid "Autre e-mail"
#~ msgstr "Other e-mail"
@ -1601,9 +1897,6 @@ msgstr "click"
#~ msgid "Demandeur"
#~ msgstr "Applicant"
#~ msgid "Votre profil"
#~ msgstr "Your profile"
#, fuzzy
#~ msgid "Votre Identité"
#~ msgstr "Identity -"
@ -1614,12 +1907,6 @@ msgstr "click"
#~ msgid "Votre Fax"
#~ msgstr "Your fax"
#~ msgid "Votre E-mail"
#~ msgstr "Your E-mail"
#~ msgid "Votre Référence"
#~ msgstr "Your Reference"
#~ msgid "Service Achats"
#~ msgstr "Purchasing Service"
@ -1708,16 +1995,6 @@ msgstr "click"
#~ msgid "EXTRAIT KBIS"
#~ msgstr "Monitoring of kbis commands"
#, fuzzy
#~ msgid "Visualiser/Télécharger le kbis"
#~ msgstr "Receive kbis by email"
#~ msgid "Recevoir le kbis par email"
#~ msgstr "Receive kbis by email"
#~ msgid "Recevoir le kbis original par courrier"
#~ msgstr "Receive the original kbis by mail"
#~ msgid "PRIVILÉGES & NANTISSEMENTS"
#~ msgstr "PRIVILEGES AND PLEDGES"
@ -1876,9 +2153,6 @@ msgstr "click"
#~ msgid "Navigateur actuel"
#~ msgstr "Actual browser"
#~ msgid "Poste de travail"
#~ msgstr "Workplace"
#~ msgid "Moteur de recherche"
#~ msgstr "Search engine"
@ -1997,12 +2271,6 @@ msgstr "click"
#~ msgid "Date d'envoi"
#~ msgstr "Sending date"
#~ msgid "Liste des surveillances"
#~ msgstr "List of monitorings"
#~ msgid "Ajout le"
#~ msgstr "Add the"
#~ msgid "Envoyé le"
#~ msgstr "Sent at"
@ -2051,10 +2319,6 @@ msgstr "click"
#~ msgid "Mode Edition"
#~ msgstr "Edit mode"
#~ msgid ""
#~ "Si cette page ne disparait pas au bout de 5 seconde(s), veuillez cliquer"
#~ msgstr "If this page does not disappear after 5 second(s), please click"
#~ msgid "Gestion Système"
#~ msgstr "Management System"
@ -2172,9 +2436,6 @@ msgstr "click"
#~ msgid "Liste des clients"
#~ msgstr "List of customers"
#~ msgid "Nom"
#~ msgstr "Last name"
#~ msgid "Editer"
#~ msgstr "Edit"
@ -2211,9 +2472,6 @@ msgstr "click"
#~ msgid "Racine des identifiants"
#~ msgstr "Root of your login"
#~ msgid "Date de signature"
#~ msgstr "Signature date"
#~ msgid "(AAAA-MM-YY)"
#~ msgstr "(YYYY-MM-DD)"
@ -2547,15 +2805,9 @@ msgstr "click"
#~ msgid "Non"
#~ msgstr "No"
#~ msgid "Edition"
#~ msgstr "Edit"
#~ msgid "Mettre sous surveillance"
#~ msgstr "Put under surveillance"
#~ msgid "Néant"
#~ msgstr "None"
#~ msgid "Aucune information"
#~ msgstr "No information"
@ -2571,9 +2823,6 @@ msgstr "click"
#~ msgid "Modifier le client"
#~ msgstr "Modify a customer"
#~ msgid "Valider"
#~ msgstr "Validate"
#~ msgid "Scores & Decisions SAS - Tous droits réservés - "
#~ msgstr "Scores & Decisions SAS - All rights reserved - "

View File

@ -0,0 +1,7 @@
<p>&copy; 2006-<?php echo date('Y')?> Scores &amp; D&eacute;cisions SAS -
<?=$this->translate("Tous droits r&eacute;serv&eacute;s")?> -
<a href="http://www.scores-decisions.com/mentions.php" target="_blank">
<?=$this->translate("Mentions l&eacute;gales")?></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

@ -1,18 +0,0 @@
<?php
class Application_Model_Aide extends Zend_Db_Table_Abstract
{
protected $_name = 'aide';
/**
* Enter description here ...
* @param array $keys
*/
public function texte($methode, $keys)
{
$sql = $this->select()
->where('methode = ?', $methode)
->where('champ IN ?', $keys);
return $this->fetchAll($sql);
}
}

View File

@ -1,74 +0,0 @@
<?php
class Application_Model_BilanSaisie extends Zend_Db_Table_Abstract
{
protected $_name = 'bilansaisie';
/**
* Enregistre les informations nécessaire pour la saisie
* @param unknown_type $email
* @param unknown_type $method
* @param unknown_type $confidentiel
* @param unknown_type $siren
* @param unknown_type $bilanCloture
* @param unknown_type $format
* @param unknown_type $bilanDuree
*/
public function setInformations($cliendId, $utilisateurId, $utilisateurLogin, $email, $method, $confidentiel, $siren, $bilanCloture, $format, $bilanDuree)
{
$env = 'PRD';
$data = array(
'clientId' => $cliendId,
'utilisateurId' => $utilisateurId,
'utilisateurLogin' => $utilisateurLogin,
'utilisateurEmail' => $email,
'method' => $method,
'confidentiel' => $confidentiel,
'siren' => $siren,
'env' => $env,
'fichier' => '',
'bilanCloture' => $bilanCloture,
'format' => $format,
'bilanDuree' => $bilanDuree,
'dateInsert' => date('Y-m-d H:i:s'),
);
return $this->insert($data);
}
/**
* Retourne les informations
* @param string $ref
*/
public function getInfosBilan($ref)
{
$sql = $this->select()->where(" ref='$ref'");
$result = $this->fetchAll($sql)->toArray();
return $result[0];
}
/**
* Enregistre le nom du fichier
* @param string $ref
* @param string $name
*/
public function setFilename($ref, $name)
{
$data = array( 'fichier' => $name );
$this->update($data, "ref='$ref'");
}
public function listBilans()
{
$sql = $this->select()
->from($this, array('ref','utilisateurId','confidentiel','siren','bilanCloture','bilanDuree','fichier','env'))
->where("dateEnvoi='0000-00-00 00:00:00' AND fichier!=''");
$result = $this->fetchAll($sql)->toArray();
return $result;
}
public function setDateEnvoi($ref)
{
$data = array( 'dateEnvoi' => date('Y-m-d H:m:s') );
return $this->update($data, "ref='$ref'");
}
}

View File

@ -1,6 +1,23 @@
<?php
class AideController extends Zend_Controller_Action
{
protected $theme;
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init()
{
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme
$this->theme = Zend_Registry::get('theme');
}
/**
* Afficher bulle pour les nouveautés
@ -24,7 +41,6 @@ class AideController extends Zend_Controller_Action
->where("date>='".$dateglissant."' AND date<='".$now."'")
->order('date DESC')
->limit($nbNewsMax);
//Zend_Registry::get('firebug')->info($sql->__toString());
$nouveautes = $nouveautesM->fetchAll($sql);
}
$this->view->assign('nouveautes', $nouveautes);
@ -49,6 +65,10 @@ class AideController extends Zend_Controller_Action
}
/**
* Affichage et validation de "cgu"
* Conditions daccès à l'extranet
*/
public function cguAction()
{
$this->_helper->layout()->disableLayout();
@ -60,7 +80,7 @@ class AideController extends Zend_Controller_Action
require_once 'Scores/WsScores.php';
$ws = new WsScores();
$accept = $ws->setCGU();
Zend_Registry::get('firebug')->info($accept);
$this->logger->info($accept);
if ($accept) {
//Put in session
$auth = Zend_Auth::getInstance();
@ -74,6 +94,10 @@ class AideController extends Zend_Controller_Action
}
/**
* Afficher des propriétés du navigateur
* Compatibilités et version
*/
public function navinfoAction()
{
$bootstrap = $this->getInvokeArg('bootstrap');

View File

@ -0,0 +1,276 @@
<?php
class AuthController extends Zend_Controller_Action
{
protected $theme;
protected $partnerConfig = array(
'inextenso' => array(
'logo' => 'logo-in-extenso.gif',
'clientId' => 195,
'serviceCode' => 'SSO',
'authType' => 'userSSO',
'login' => 'mail',
'token' => 'token',
)
);
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init()
{
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme
$this->theme = Zend_Registry::get('theme');
}
/**
* Point d'entrée pour les connexions partenaires.
* L'utilisateur s'identifie sur son portail habituel.
*/
public function indexAction()
{
// --- Désactiver le layout
$this->_helper->layout()->disableLayout();
$this->view->headLink()
->appendStylesheet($this->theme->pathStyle.'/inexweb.css', 'all')
->appendStylesheet($this->theme->pathStyle.'/user.css', 'all');
$request = $this->getRequest();
/**
* Get partner name - see route in bootstrap
*/
$partner = $request->getParam('partner');
if ( array_key_exists($partner, $this->partnerConfig) ) {
$config = $this->partnerConfig[$partner];
$this->view->logo = $config['logo'];
$params = $request->getParams();
$objectParams = array();
foreach ($params as $label => $value) {
if (in_array($label, array('controller', 'action'))) continue;
$object = new stdClass();
$object->label = $label;
$object->value = $value;
$objectParams[] = $object;
}
$this->view->Params = $objectParams;
$login = $params[$config['login']];
$part = strstr($login, '@', true);
if ($part !== false) {
$login = $part;
}
$token = $params[$config['token']];
try {
$parameters = new stdClass();
$parameters->client = $config['clientId'];
$parameters->login = $login;
$parameters->token = $token;
$parameters->params = $objectParams;
$ws = new Scores_Ws_Client('account', '0.1');
$hash = $ws->ssoAuthenticate($parameters);
// --- Utilisateur inexistant
if ( $hash === 'false' || $hash === false ) {
$this->view->NoUser = true;
$urlParams = array('controller'=>'auth', 'action'=>'userssoform');
$urlParams = array_merge($params, $urlParams);
$this->view->FormUrlParams = $urlParams;
}
// --- Redirection
else {
$auth = Zend_Auth::getInstance();
// --- Set partial identity
$identity = new stdClass();
$identity->username = $login;
$identity->password = $hash;
$auth->getStorage()->write($identity);
// --- End Set partial identity
// --- Get InfosLogin
$adressIp = $_SERVER['REMOTE_ADDR'];
$parameters = new stdClass();
$parameters->login = $login;
$parameters->ipUtilisateur = $adressIp;
$parameters->from = 'auth';
try {
$ws = new Scores_Ws_Client('gestion', '0.3');
$InfosLogin = $ws->getInfosLogin($parameters);
$this->logger->info(print_r($InfosLogin,1));
if ( is_string($InfosLogin) || $InfosLogin->error->errnum != 0 ) {
$this->view->Error = true;
} else {
$user = new Scores_Utilisateur();
$identity = $user->updateProfil($InfosLogin);
$auth->getStorage()->write($identity);
// --- Redirect
$this->redirect('/');
}
} catch ( Exception $e ) {
switch ( $e->getCode() ) {
case 'MSG':
$this->view->Message = $e->getMessage();
break;
default:
$this->view->Error = true;
break;
}
}
// --- End Get InfosLogin
}
} catch ( Exception $e ) {
switch ( $e->getCode() ) {
case 'MSG':
$this->view->Message = $e->getMessage();
break;
default:
$this->view->Error = true;
break;
}
}
} else {
$this->view->Message = "Erreur dans les paramètres.";
}
}
/**
* Affichage du formulaire pour l'inscription des utilisateurs
*/
public function userssoformAction()
{
// --- Désactiver le layout
$this->_helper->layout()->disableLayout();
$this->view->headLink()->appendStylesheet($this->theme->pathStyle.'/user.css', 'all');
$request = $this->getRequest();
/**
* Get partner name - see route in bootstrap
*/
$partner = $request->getParam('partner');
if ( array_key_exists($partner, $this->partnerConfig) ) {
$config = $this->partnerConfig[$partner];
$this->view->logo = $config['logo'];
$params = $request->getParams();
$objectParams = array();
foreach ($params as $label => $value) {
if (in_array($label, array('controller', 'action'))) continue;
$object = new stdClass();
$object->label = $label;
$object->value = $value;
$objectParams[] = $object;
}
$this->view->Params = $objectParams;
$login = $params[$config['login']];
$part = strstr($login, '@', true);
if ($part !== false) {
$login = $part;
}
$token = $params[$config['token']];
$this->view->NoUser = true;
// --- Set form value
$this->view->FormPartner = $partner;
$this->view->FormIdentifiant = $login;
$this->view->FormCourriel = $request->getParam('mail');
$this->view->FormSiret = $request->getParam('siret');
$this->view->FormNom = $request->getParam('lastname');
$this->view->FormPrenom = $request->getParam('name');
}
else {
$this->view->Message = "Erreur dans les paramètres.";
}
}
/**
* Creation d'un utilisateur en SSO
*/
public function userssocreateAction()
{
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$partner = $request->getParam('partner');
if ( array_key_exists($partner, $this->partnerConfig) ) {
$config = $this->partnerConfig[$partner];
$this->view->logo = $config['logo'];
$data = array(
'idClient' => $config['clientId'],
'login' => $request->getParam('login'),
'email' => $request->getParam('email', ''),
'actif' => 1,
'nom' => $request->getParam('nom', ''),
'prenom' => $request->getParam('prenom', ''),
'siret' => str_replace(' ', '', $request->getParam('siret', '')),
'tel' => str_replace(array(' ','.'), array('',''), $request->getParam('tel', '')),
'Service' => $config['serviceCode'],
);
try {
$ws = new Scores_Ws_Client('account', '0.1');
$parameters = new stdClass();
$parameters->data = json_encode($data);
$created = $ws->setUserSSO($parameters);
if ($created === false ) {
$this->view->Message = "Erreur lors de la création de votre compte.";
} else {
$this->view->UserCreated = true;
// --- Data to go back
$params = $request->getParams();
$urlArgs = array();
foreach ($params as $label => $value) {
if (in_array($label, array('controller', 'action'))) continue;
if (substr($label, 0, 2) == 'P-') {
$urlArgs[substr($label, 2)] = $value;
}
}
$urlArgs['partner'] = 'inextenso';
$this->view->UrlArgs = $urlArgs;
}
} catch ( Exception $e ) {
switch ( $e->getCode() ) {
case 'MSG':
$this->view->Message = $e->getMessage();
break;
default:
$this->view->Error = true;
break;
}
}
} else {
$this->view->Message = "Erreur dans les paramètres.";
}
}
/**
* Lien de validation depuis email
* Paramètres
* - login ou email
* - key
* L'action renvoi sur un affichage spécifique suivant le type de client
*/
public function validateAction()
{
$request = $this->getRequest();
//Validation en erreur
//Validation invalide
//Validation Ok => Comment afficher les particularités
}
}

View File

@ -1,6 +1,23 @@
<?php
class BdfController extends Zend_Controller_Action
{
protected $theme;
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init()
{
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme
$this->theme = Zend_Registry::get('theme');
}
public function indexAction()
{
@ -76,7 +93,7 @@ class BdfController extends Zend_Controller_Action
$req = substr($siret, 0, 9);
}
Zend_Registry::get('firebug')->info($module);
$this->logger->info($module);
$content = array();

View File

@ -1,7 +1,9 @@
<?php
class DashboardController extends Zend_Controller_Action
{
protected $typeActes= array(
protected $theme;
protected $typeActes= array(
'a00' => 'MODIFICATION',
'a01' => 'MODIFICATION',
'a02' => 'DISSOLUTION',
@ -99,6 +101,12 @@ class DashboardController extends Zend_Controller_Action
'aUA' => 'ATTESTATION DU CONJOINT COMMUN EN BIENS',
);
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
/**
* Return a ramdom password
* @param int $length
@ -126,6 +134,13 @@ class DashboardController extends Zend_Controller_Action
public function init()
{
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme
$this->theme = Zend_Registry::get('theme');
require_once 'Scores/WsScores.php';
}
@ -172,7 +187,7 @@ class DashboardController extends Zend_Controller_Action
*/
protected function statChart($data, $labels, $name)
{
require_once("Vendors/ChartDirector/phpchartdir.php");
require_once 'ChartDirector/phpchartdir.php';
$hChart = 210;
@ -238,7 +253,7 @@ class DashboardController extends Zend_Controller_Action
*/
public function commandesAction()
{
$this->view->headScript()->appendFile('/themes/default/scripts/dashboard.js', 'text/javascript');
$this->view->headScript()->appendFile($this->theme->pathScript.'/dashboard.js', 'text/javascript');
$request = $this->getRequest();
$type = $request->getParam('type', '');
@ -441,7 +456,7 @@ class DashboardController extends Zend_Controller_Action
}
$c = Zend_Registry::get('config');
$refFile = realpath($c->profil->path->data).'/pdf/acte-'.
$refFile = $c->profil->path->shared.'/pdf/acte-'.
$listCommandes[$i]->siren.'-'.
trim($listCommandes[$i]->refDocument).'.pdf';
@ -456,7 +471,7 @@ class DashboardController extends Zend_Controller_Action
'controller' => 'pieces',
'action' => 'actes',
'siret' => $listCommandes[$i]->siren,
), null, true);
), 'default', true);
} elseif (preg_match('/^([0-9]{4}).*?$/', $listCommandes[$i]->refDocument, $matches)){
@ -475,7 +490,7 @@ class DashboardController extends Zend_Controller_Action
'controller' => 'pieces',
'action' => 'bilans',
'siret' => $listCommandes[$i]->siren,
), null, true);
), 'default', true);
}
break;
@ -568,8 +583,7 @@ class DashboardController extends Zend_Controller_Action
$this->_forward('perms', 'error');
}
$this->view->headScript()
->appendFile('/themes/default/scripts/dashboard.js', 'text/javascript');
$this->view->headScript()->appendFile($this->theme->pathScript.'/dashboard.js', 'text/javascript');
$ws = new WsScores();
$reponse = $ws->getListeClients();
@ -632,16 +646,16 @@ class DashboardController extends Zend_Controller_Action
$request = $this->getRequest();
$infos = $request->getParams();
$ws = new WsScores();
$reponse = $ws->setClient($infos);
if ($reponse->error->errnum==1) {
$this->_forward('client', 'dashboard', null, array('idClient' => $infos['idClient']));
$response = $ws->setClient($infos);
if (is_string($response) || $response === false) {
$this->forward('client', 'dashboard', 'default', array('idClient' => $infos['idClient']));
}
$this->view->assign('infos', $request->getParams());
}
public function usersAction()
{
$this->view->headLink()->appendStylesheet('/themes/default/styles/user.css', 'all');
$this->view->headLink()->appendStylesheet($this->theme->pathStyle.'/user.css', 'all');
$user = new Scores_Utilisateur();
@ -658,20 +672,9 @@ class DashboardController extends Zend_Controller_Action
$ws = new WsScores();
$services = $ws->getServices($idClient);
if (is_array($services)) {
$this->view->assign('services', $services->item);
} else {
$this->view->assign('services', array());
}
if ( null === $service ) {
$infos = $ws->getListeUtilisateurs($user->getLogin(), $idClient);
$utilisateurs = $infos->result->item;
} else {
$infos = $ws->getServiceUsers($idClient, $service);
$utilisateurs = $infos->item;
$this->view->assign('service', $service);
}
$this->view->assign('services', array());
$infos = $ws->getListeUtilisateurs($user->getLogin(), $idClient);
$utilisateurs = $infos->result->item;
$this->view->assign('utilisateurs', $utilisateurs);
$this->view->assign('idClient', $idClient);
@ -679,10 +682,8 @@ class DashboardController extends Zend_Controller_Action
public function userAction()
{
$this->view->headLink()
->appendStylesheet('/themes/default/styles/user.css', 'all')
->appendStylesheet('/themes/default/styles/form.css', 'all');
$this->view->headScript()->appendFile('/themes/default/scripts/user.js', 'text/javascript');
$this->view->headLink()->appendStylesheet($this->theme->pathStyle.'/user.css', 'all');
$this->view->headScript()->appendFile($this->theme->pathScript.'/user.js', 'text/javascript');
$request = $this->getRequest();
@ -791,7 +792,7 @@ class DashboardController extends Zend_Controller_Action
$user = $ws->getUser($login);
$options = json_decode($user, true);
Zend_Registry::get('firebug')->info($user);
$this->logger->info(print_r($user,1));
$this->view->assign('droits', explode(' ',$options['droits']));
$this->view->assign('prefs', explode(' ',$options['pref']));
@ -877,7 +878,7 @@ class DashboardController extends Zend_Controller_Action
}
}
Zend_Registry::get('firebug')->info($output);
$this->logger->info(print_r($output,1));
$this->view->assign('output', $output);
}
@ -900,7 +901,7 @@ class DashboardController extends Zend_Controller_Action
if ( isset($_FILES) && count($_FILES)==1 ) {
$c = Zend_Registry::get('config');
$path = realpath($c->profil->path->data).'/nouveautes';
$path = $c->profil->path->shared.'/persist/nouveautes';
if(!file_exists($path)) mkdir($path);
$tmp_name = $_FILES['fichier']['tmp_name'];
@ -992,7 +993,7 @@ class DashboardController extends Zend_Controller_Action
//Liste des periodes de facturation
$contrats = $ws->getClientTarifs($idClient);
Zend_Registry::get('firebug')->info($contrats);
$this->logger->info(print_r($contrats,1));
$this->view->assign('contrats', $contrats->item);
//Liste des services

View File

@ -1,11 +1,25 @@
<?php
class DirigeantController extends Zend_Controller_Action
{
protected $siret;
protected $theme;
protected $siret;
protected $id;
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init()
{
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme
$this->theme = Zend_Registry::get('theme');
$request = $this->getRequest();
$this->siret = $request->getParam('siret');
$this->id = $request->getParam('id', 0);
@ -41,7 +55,7 @@ class DirigeantController extends Zend_Controller_Action
$session = new Scores_Session_Entreprise($this->siret, $this->id);
if ($user->checkPerm('dirigeantsop')){
$href = $this->view->url(array('controller'=>'dirigeant', 'action'=>'op', 'siret'=>$this->siret));
$href = $this->view->url(array('controller'=>'dirigeant', 'action'=>'op', 'siret'=>$this->siret), 'default', true);
$this->view->assign('dirigeantsop', $href);
}
@ -117,6 +131,8 @@ class DirigeantController extends Zend_Controller_Action
$this->view->assign('AutrePage', $this->getRequest()->getParam('apage'));
$user = new Scores_Utilisateur();
$this->view->assign('accessWorldCheck', $user->checkPerm('WORLDCHECK'));
$this->view->assign('surveillance', $user->checkPerm('survdirigeants'));
$this->view->assign('edition', $user->checkModeEdition());
}
}

View File

@ -1,7 +1,23 @@
<?php
class ErrorController extends Zend_Controller_Action
{
public function init(){}
protected $theme;
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init()
{
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme
$this->theme = Zend_Registry::get('theme');
}
public function errorAction()
{
@ -51,12 +67,12 @@ class ErrorController extends Zend_Controller_Action
$message.= "Referer : ".$_SERVER['HTTP_REFERER']."\n";
$c = Zend_Registry::get('config');
$mail = new Scores_Mail();
$mail = new Scores_Mail_Method();
$mail->setSubject('[ERREUR APPLICATIVE] - '.$c->profil->server->name.' -'.date('Ymd'));
$mail->setBodyTexte($message);
$mail->setFrom('supportdev');
$mail->setBodyText($message);
$mail->setFromKey('support');
$mail->addToKey('supportdev');
$mail->send();
$mail->execute();
}
// Log exception, if logger available
if ($log = $this->getLog()) {

File diff suppressed because it is too large Load Diff

View File

@ -1,18 +1,32 @@
<?php
class FinanceController extends Zend_Controller_Action
{
protected $theme;
protected $siret = null;
protected $id = 0;
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init()
{
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme
$this->theme = Zend_Registry::get('theme');
require_once 'Scores/WsScores.php';
$request = $this->getRequest();
$this->siret = $request->getParam('siret');
$this->id = $request->getParam('id', 0);
$this->view->headScript()->appendFile('/themes/default/scripts/finance.js', 'text/javascript');
$this->view->headScript()->appendFile($this->theme->pathScript.'/finance.js', 'text/javascript');
}
public function indexAction()
@ -168,10 +182,10 @@ class FinanceController extends Zend_Controller_Action
$request = $this->getRequest();
$ratio = $request->getParam('ratio');
$c = Zend_Registry::get('config');
$path = $c->profil->path->pages . '/imgcache/';
$path = $c->profil->path->shared . '/pages/imgcache/';
$file = 'syntheseEvol-'.$this->siret.'-'.$this->id.'-'.$ratio.'.png';
if (file_exists($path.$file)) {
echo '<img src="/fichier/imgcache/'.$file.'" />';
echo '<img src="/file/image/cache/q/'.$file.'" />';
} else {
echo "Erreur de génération du graphique";
}
@ -187,10 +201,10 @@ class FinanceController extends Zend_Controller_Action
$request = $this->getRequest();
$typeBilan = $request->getParam('typeBilan');
$c = Zend_Registry::get('config');
$path = $c->profil->path->pages . '/imgcache/';
$path = $c->profil->path->shared . '/pages/imgcache/';
$file = 'synthese-linecompare-'.$this->siret.'-'.$this->id.'-'.$typeBilan.'.png';
if (file_exists($path.$file)) {
echo '<img src="/fichier/imgcache/'.$file.'" />';
echo '<img src="/file/image/cache/q/'.$file.'" />';
} else {
echo "Erreur de génération du graphique";
}
@ -429,10 +443,8 @@ class FinanceController extends Zend_Controller_Action
$typeBilan = $request->getParam('typeBilan');
$dateCloture = $request->getParam('dateCloture');
Zend_Registry::get('firebug')->info($request->getParams());
$c = Zend_Registry::get('config');
$path = $c->profil->path->pages . '/imgcache/';
$path = $c->profil->path->shared . '/pages/imgcache/';
switch($type){
case 'actif':
$file = 'bilansgraphactif-'.$this->siret.'-'.$this->id.'-'.$typeBilan.$dateCloture.'.png';
@ -445,7 +457,7 @@ class FinanceController extends Zend_Controller_Action
break;
}
if (file_exists($path.$file)) {
echo '<img src="/fichier/imgcache/'.$file.'" />';
echo '<img src="/file/image/cache/q/'.$file.'" />';
} else {
echo "Erreur de génération du graphique";
}
@ -628,10 +640,10 @@ class FinanceController extends Zend_Controller_Action
$request = $this->getRequest();
$ratio = $request->getParam('ratio');
$c = Zend_Registry::get('config');
$path = $c->profil->path->pages . '/imgcache/';
$path = $c->profil->path->shared . '/pages/imgcache/';
$file = 'ratiosgraph-'.$this->siret.'-'.$this->id.'-'.$ratio.'.png';
if (file_exists($path.$file)) {
echo '<img src="/fichier/imgcache/'.$file.'" />';
echo '<img src="/file/image/cache/q/'.$file.'" />';
} else {
echo "Erreur de génération du graphique";
}
@ -675,7 +687,7 @@ class FinanceController extends Zend_Controller_Action
$data[$element->id] = $element->val;
$c = Zend_Registry::get('config');
$path = $c->profil->path->files . '/';
$path = $c->profil->path->shared . '/files/';
$file = 'liasse-'.substr($this->siret, 0, 9).'-'.$this->id.'-'.$type.$date.'.xls';
$liasse = new Scores_Finance_Liasse_XLS($model);
@ -690,126 +702,171 @@ class FinanceController extends Zend_Controller_Action
}
/**
* Envoi de bilan pour saisie
* L'envoi se déroule en plusieurs étapes
* 1 - Saisie des informations
* 2 - Validation du formulaire
* 3 -
* Commande de la saisie de bilan
* Enregistrement des caractéristiques, obtention référence commande puis upload fichier
*/
public function saisiebilanAction()
{
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$user = new Scores_Utilisateur();
$params = $request->getParams();
$request = $this->getRequest();
$user = new Scores_Utilisateur();
$params = $request->getParams();
$bilanSaisie = new Application_Model_BilanSaisie();
$this->view->assign('email', $user->getEmail());
$this->view->assign('siren', $params['siren']);
Zend_Registry::get('firebug')->info($params);
$ref = $params['ref'];
if ($request->isPost())
{
//Validation du formulaire
$valideField = true;
if ( empty($params['siren']))
{
$valideField = false;
}
if ( empty($params['dateCloture'])
&& !preg_match('/^[0-9]{2}\/[0-9]{2}\/[0-9]{4}/', $params['dateCloture'])
&& !checkdate(substr($params['dateCloture'],3,2),substr($params['dateCloture'],0,2),substr($params['dateCloture'],6,2)))
{
$valideField = false;
}
if ( empty($params['dureeExercice']))
{
$valideField = false;
}
if ($valideField === true)
{
$ws = new Scores_Ws_Client('order', '0.1');
$parameters = new stdClass();
$parameters->siren = $params['siren'];
$parameters->date = substr($params['dateCloture'],6,4).'-'.substr($params['dateCloture'],3,2).'-'.substr($params['dateCloture'],0,2);
$parameters->type = $params['format'];
$parameters->source = 'extranet';
$parameters->private = $params['confidentiel'];
$result = $ws->setBilanInput($parameters);
if ($result === false) {
$this->view->msg = "Erreur lors de l'enregistrement des informations";
} else {
$this->logger->info(print_r($result,1));
$this->view->ref = strtoupper($result);
$this->view->fileref = $params['siren'] . '_' . $params['format'] . '_' .
substr($params['dateCloture'],6,4) . substr($params['dateCloture'],3,2) .
substr($params['dateCloture'],0,2) . '_' . strtoupper($result);
$session = new Scores_Session_Entreprise($params['siren']);
$this->view->raisonSociale = $session->getRaisonSociale();
$this->view->bilanCloture = $params['dateCloture'];
$this->view->bilanDuree = $params['dureeExercice'];
switch($params['format']){
case 'C':
$this->view->type = 'consolidé';
break;
case 'N':
$this->view->type = 'réel normal (liasse 2050)';
break;
case 'S':
$this->view->type = 'simplifié (liasse 2033)';
break;
}
}
} else {
$this->view->msg = "Formulaire invalide.";
}
}
}
//Annulation de la saisie
if ($params['annule'])
{
$data = array( 'fichier' => '' );
$bilanSaisie->update($data, "ref='$ref'");
echo 'Saisie bilan annulé';
exit;
}
//Envoi du fichier @todo ça passe pas
elseif ($params['upload'])
{
if ( count($_FILES)==1 ){
$n = $_FILES['fichier']['name'];
$s = $_FILES['fichier']['size'];
$tmp_name = $_FILES['fichier']['tmp_name'];
//Vérifier que l'extension du fichier est bien correcte
$extValide = array('pdf', 'tiff');
$extension = strrchr($n,'.');
$extension = strtolower(substr($extension,1));
if ( in_array($extension, $extValide) ){
//Lecture dans la bdd des informations
$infos = $bilanSaisie->getInfosBilan($ref);
$name = $infos['ref'].'-'.$infos['siren'].'.'.$extension;
$c = Zend_Registry::get('config');
$file = realpath($c->profil->path->data).'/bilanclient/'.$name;
if ( move_uploaded_file($tmp_name, $file) ){
$bilanSaisie->setFilename($ref, $name);
switch($infos['format']){
case 'C':
$type = 'consolidé';
break;
case 'N':
$type = 'réel normal ou simplifié';
break;
}
$session = new Scores_Session_Entreprise($params['siren']);
$this->view->assign('raisonSociale', $session->getRaisonSociale());
$this->view->assign('size', filesize($file));
$this->view->assign('name', $name);
$this->view->assign('infos', $infos);
$this->view->assign('ref', $ref);
$this->view->assign('upload', true);
} else {
$this->view->assign('upload', false);
$this->view->assign('errMsg', "<br/>Erreur lors de l'envoi du fichier!");
}
} else {
$this->view->assign('upload', false);
$this->view->assign('errMsg', "Extension de fichier invalide.");
}
} else {
$this->view->assign('upload', false);
$this->view->assign('errMsg', "<br/>Erreur.");
}
$this->renderScript('finance/saisiebilan-upload.phtml');
}
//Validation du formulaire
elseif (isset($params['method']))
{
$valideField = true;
if ( empty($params['email'])) {
$valideField = false;
}
if ( empty($params['method'])) {
$valideField = false;
}
if ( empty($params['siren'])) {
$valideField = false;
}
if ( empty($params['dateCloture'])
&& !preg_match('/^[0-9]{2}\/[0-9]{2}\/[0-9]{4}/', $params['dateCloture'])
&& checkdate(substr($params['dateCloture'],3,2),substr($params['dateCloture'],0,2),substr($params['dateCloture'],6,2))){
$valideField = false;
}
if ( empty($params['dureeExercice'])) {
$valideField = false;
}
if ($valideField){
$ref = $bilanSaisie->setInformations(
$user->getIdClient(),
$user->getId(),
$user->getLogin(),
$params['email'],
$params['method'],
$params['confidentiel'],
$params['siren'],
$params['dateCloture'],
$params['format'],
$params['dureeExercice']
);
$this->view->assign('ref', $ref);
if ($params['method']=='courrier'){
$this->renderScript('finance/saisiebilan-courrier.phtml');
} elseif ($params['method']=='fichier') {
$this->renderScript('finance/saisiebilan-upload.phtml');
}
}
}
public function saisiebilanupAction()
{
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$ref = $request->getParam('ref');
$fileref = $request->getParam('fileref');
if ($request->isPost()) {
if (count($_FILES)==1 ) {
$n = $_FILES['fichier']['name'];
$s = $_FILES['fichier']['size'];
$tmp_name = $_FILES['fichier']['tmp_name'];
//Vérifier que l'extension du fichier est bien correcte
$extValide = array('pdf', 'tiff');
$extension = strrchr($n,'.');
$extension = strtolower(substr($extension,1));
if ( in_array($extension, $extValide) ) {
$name = $fileref.'.'.$extension;
$c = Zend_Registry::get('config');
$file = $c->profil->path->shared.'/persist/bilanclient/'.$name;
if ( move_uploaded_file($tmp_name, $file) ) {
$ws = new Scores_Ws_Client('order', '0.1');
$parameters = new stdClass();
$parameters->ref = $ref;
$parameters->filename = $name;
$result = $ws->setBilanInputFile($parameters);
$this->view->assign('upload', true);
$this->view->file = $name;
} else {
$this->view->assign('upload', false);
$this->view->assign('errMsg', "<br/>Erreur lors de l'envoi du fichier!");
}
} else {
$this->view->assign('upload', false);
$this->view->assign('errMsg', "Extension de fichier invalide.");
}
} else {
$this->view->assign('upload', false);
$this->view->assign('errMsg', "<br/>Erreur.");
}
}
}
/**
* Liste des liasses
*/
public function liasselistAction()
{
$request = $this->getRequest();
$this->view->headTitle()->prepend("Liasse fiscale");
$this->view->headTitle()->prepend("Siret ".$this->siret);
//Paramètres utilisateur
$user = new Scores_Utilisateur();
$this->view->assign('edition', $user->checkModeEdition());
if ( $user->checkPerm('UPLOADBILAN') ) {
$this->view->assign('saisiebilan', true);
}
$this->view->assign('surveillance', $user->checkPerm('survbilan'));
$ws = new WsScores();
$bilanList = $ws->getListeBilans(substr($this->siret, 0, 9));
if ($bilanList === false) $this->forward('soap', 'error');
/** La liste des types de bilan existant **/
$liste = array (
'N' => array(),
'S' => array(),
'C' => array(),
'B' => array(),
'A' => array(),
);
$entreprise = new Scores_Session_Entreprise($this->siret, $this->id);
$this->view->assign('raisonSociale', $entreprise->getRaisonSociale());
$this->view->assign('siren', substr($this->siret, 0, 9));
$this->view->assign('siret', $this->siret);
$this->view->assign('idClient', $user->identity->idClient);
$this->view->haveLiasse = ($bilanList->nbReponses > 0) ? true : false;
if( $bilanList->nbReponses > 0 ) {
// Tri des bilans par type
foreach ( array_keys($liste) as $t) {
foreach ( $bilanList->result->item as $item ) {
if ( $t == $item->typeBilan ) {
$liste[$item->typeBilan][] = $item;
}
}
}
$this->view->BilanList = $liste;
}
}
/**
@ -827,6 +884,11 @@ class FinanceController extends Zend_Controller_Action
$user = new Scores_Utilisateur();
$this->view->assign('edition', $user->checkModeEdition());
//Gestion saisie bilan
if ( $user->checkPerm('UPLOADBILAN') ) {
$this->view->assign('saisiebilan', true);
}
$this->view->assign('surveillance', $user->checkPerm('survbilan'));
/** Les ancres pour les liens **/
$ancres = array(
@ -870,23 +932,6 @@ class FinanceController extends Zend_Controller_Action
),
);
/** La liste des types de bilan existant **/
$liste = array (
'N' => array(),
'S' => array(),
'C' => array(),
'B' => array(),
'A' => array());
/** Le nom des types pour le select */
$type = array (
'A' => 'Assurance',
'B' => 'Banque',
'C' => 'Consolidé',
'S' => 'Simplifié',
'N' => ''
);
/** Liste des unités que l'ont proposent **/
$unit = array (
'E' => '€',
@ -896,38 +941,41 @@ class FinanceController extends Zend_Controller_Action
$liasse = array ();
$request = $this->getRequest();
$unite = $request->getParam('unit','K');
$ws = new WsScores();
$listBilan = $ws->getListeBilans(substr($this->siret, 0, 9));
if ($listBilan === false) $this->_forward('soap', 'error');
$entreprise = new Scores_Session_Entreprise($this->siret, $this->id);
if( $listBilan->nbReponses > 0 )
{
$date = $request->getParam('date',$listBilan->result->item[0]->dateExercice.':'.$listBilan->result->item[0]->typeBilan);
// Récupération de la date
$dateAndType = $request->getParam('date', $defaultTypeBilan.$defaultDateExercice);
foreach ($listBilan->result->item as $item)
$liste[$item->typeBilan][] = $item->dateExercice;
if ( !empty($dateAndType) ) {
if (!empty($date))
{
$dateAndType = explode(':', $date);
$type = substr($dateAndType, 0, 1);
$date = substr($dateAndType, 1);
$infos = $ws->getBilan(substr($this->siret, 0, 9), $dateAndType[0], $dateAndType[1], true);
// Récupération des postes du bilan
try {
$ws = new Scores_Ws_Client('entreprise', '0.8');
$params = new stdClass();
$params->siren = substr($this->siret, 0, 9);
$params->millesime = $date;
$params->typeBilan = $type;
$params->ref = '';
$infos = $ws->getBilan($params);
if ($infos === false) $this->_forward('soap', 'error');
// Error
if ($infos === false) {
$this->forward('soap', 'error');
}
// Formatage de la liasse
$infoLiasse = new Scores_Finance_Liasse($infos, $unite);
$this->view->assign('dateCloture', $infoLiasse->getInfo('dateCloture'));
$this->view->assign('dateCloture', $infoLiasse->getInfo('dateCloture'));
$this->view->assign('dateCloturePre', $infoLiasse->getInfo('dateCloturePre'));
$date = new Zend_Date($infoLiasse->getInfo('dateCloture'), 'yyyyMMdd');
$this->view->assign('dateClotureD', $date->toString('dd/MM/yyyy'));
Zend_Registry::get('firebug')->info('test:'.$infoLiasse->getInfo('dateCloturePre'));
$dateCloturePre = $infoLiasse->getInfo('dateCloturePre');
if ( $dateCloturePre == '' ) {
if ($dateCloturePre == '') {
$this->view->assign('dateCloturePreD', '-');
} else {
$date = new Zend_Date($dateCloturePre, 'yyyyMMdd');
@ -937,33 +985,24 @@ class FinanceController extends Zend_Controller_Action
$this->view->assign('dureesMois', $infoLiasse->getInfo('dureeMois'));
$this->view->assign('dureesMoisPre', $infoLiasse->getInfo('dureeMoisPre'));
$this->view->assign('date', $dateAndType[0]);
$this->view->assign('champType', $dateAndType[1]);
$this->view->assign('liasse', $infoLiasse->getPostes());
$this->view->assign('ancres', $ancres[$dateAndType[1]]);
$this->view->assign('date', $date);
$this->view->assign('champType', $type);
$this->view->assign('liasse', $infoLiasse->getPostes());
$this->view->assign('ancres', $ancres[$type]);
} catch (Exception $e) {
$this->view->msg = $e->getMessage();
}
//Gestion export de la liasse au format XLS
if ($user->checkPerm('liassexls')
&& in_array($dateAndType[1],array('C', 'N', 'S')) ) {
$this->view->assign('exportxls', true);
}
//Gestion export de la liasse au format XLS
if ( $user->checkPerm('liassexls') && in_array($type,array('C', 'N', 'S')) ) {
$this->view->assign('exportxls', true);
}
$this->view->assign('liste', $liste);
$this->view->assign('id', $id);
$this->view->assign('type', $type);
$this->view->assign('unite', $unite);
$this->view->assign('unit', $unit);
}
}
//Gestion saisie bilan
if ( $user->checkPerm('UPLOADBILAN') ) {
$this->view->assign('saisiebilan', true);
}
$this->view->assign('surveillance', $user->checkPerm('survbilan'));
$this->view->assign('id', $id);
$this->view->assign('unite', $unite);
$this->view->assign('unit', $unit);
/** Partie vue **/
$this->view->haveLiasse = ($listBilan->nbReponses > 0) ? true : false;
$this->view->assign('raisonSociale', $entreprise->getRaisonSociale());
$this->view->assign('siren', substr($this->siret, 0, 9));
$this->view->assign('siret', $this->siret);
@ -998,7 +1037,7 @@ class FinanceController extends Zend_Controller_Action
'controller'=>'saisie',
'action'=>'bourse',
'siren' => $siren
), null, true));
), 'default', true));
}
$this->view->assign('id', $this->id);
@ -1026,11 +1065,16 @@ class FinanceController extends Zend_Controller_Action
$infos = $this->getRequest()->getParam('infos');
}
$user = new Scores_Utilisateur();
$this->view->assign('edition', $user->checkModeEdition());
$entreprise = new Scores_Session_Entreprise($this->siret, $this->id);
$this->view->assign('banques', $infos->result->item);
$this->view->assign('banques', isset($infos->result->item)?$infos->result->item:array());
$this->view->assign('raisonSociale', $entreprise->getRaisonSociale());
$this->view->assign('siren', substr($this->siret, 0, 9));
$this->view->assign('exportObjet', $infos);
$this->view->assign('siret', $this->siret);
}
/**
@ -1067,8 +1111,6 @@ class FinanceController extends Zend_Controller_Action
foreach ($bilansInfos as $infos) {
$dateCloture[] = $infos->dateCloture;
}
sort($dateCloture);
$this->view->assign('dateCloture', $dateCloture);
$this->view->assign('bilansInfos', $bilansInfos);
$ratiosInfos = $ratiosData->getTableRatiosInfos();
@ -1243,18 +1285,30 @@ class FinanceController extends Zend_Controller_Action
),
);
//Valeur pour le tableau
rsort($dateCloture);
$dateClotureTable = array();
foreach ($dateCloture as $k => $date) {
if ($k > 5) break;
$dateClotureTable[] = $date;
}
sort($dateClotureTable);
$this->view->assign('dateCloture', $dateClotureTable);
for ( $i=0 ; $i<count($dataTable) ; $i++ ) {
$values = array();
if ( !empty($dataTable[$i]['r']) ) {
foreach ($dateCloture as $k=>$date) {
foreach ($dateClotureTable as $k => $date) {
$values[$date] = $ratiosData->dRatio($typeBilan, $date, 'r'.$dataTable[$i]['r']);
}
}
$dataTable[$i]['values'] = $values;
}
$this->view->assign('dataTable',$dataTable);
//Calcul du graph
//Valeur pour le graphique
$labels = array();
$data = array();
$graphRatio = array(28, 21, 13);
@ -1265,10 +1319,12 @@ class FinanceController extends Zend_Controller_Action
$data[$iRatio]['values'][] = $ratiosEntrep[$date]['r'.$dataTable[$ratio]['r']];
}
}
foreach ($dateCloture as $k=>$date) {
sort($dateCloture);
foreach ($dateCloture as $k => $date) {
$labels[] = substr($date, 0, 4);
}
//Création du graphique
$graph = new Scores_Finance_Ratios_Graph($this->siret, $this->id);
$image = $graph->flux($labels, $data, $typeBilan);
if ( $image != false ){
@ -1372,4 +1428,34 @@ class FinanceController extends Zend_Controller_Action
}
}
/**
* Affichage en ajax des informations dernière date de cloture du bilan et etat de saisie
*/
public function liasseinfosAction()
{
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$siren = $request->getParam('siren');
$ws = new WsScores();
$response = $ws->getEntrepriseLiasseInfos($siren);
if ( $response === null ) {
$this->view->assign('msg','Aucun bilan déposé.');
} else {
$date = new Zend_Date($response->BilanDateCloture, 'yyyy-MM-dd');
$this->view->assign('BilanDateCloture', $date->toString('dd/MM/yyyy'));
$this->view->assign('BilanDateClotureIso', $response->BilanDateCloture);
$this->view->assign('BilanType', $response->BilanType);
$this->view->assign('SaisieCode', $response->SaisieCode);
$this->view->assign('SaisieLabel', $response->SaisieLabel);
if ( $response->SaisieDate!='' || $response->SaisieDate!='0000-00-00' ) {
$this->view->assign('SaisieDateIso', $response->SaisieDate);
$date = new Zend_Date($response->SaisieDate, 'yyyy-MM-dd');
$this->view->assign('SaisieDate', $date->toString('dd/MM/yyyy'));
}
}
}
}

View File

@ -6,7 +6,8 @@ require_once 'Giant/Functions.lib.php';
class GiantController extends Zend_Controller_Action
{
protected $TestIndication = false;
protected $theme;
protected $TestIndication = false;
protected $config = array();
protected $TestCompanies = array(
@ -39,12 +40,23 @@ class GiantController extends Zend_Controller_Action
'NL' => 'The Netherlands',
);
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init()
{
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
$this->view->headLink()->appendStylesheet('/themes/default/styles/giant.css', 'all');
$this->view->headScript()->appendFile('/themes/default/scripts/giant.js', 'text/javascript');
// --- Theme
$this->theme = Zend_Registry::get('theme');
$this->view->headLink()->appendStylesheet($this->theme->pathStyle.'/giant.css', 'all');
$this->view->headScript()->appendFile($this->theme->pathScript.'/giant.js', 'text/javascript');
$this->view->debug = false;
$this->config = new Zend_Config_Ini( APPLICATION_PATH.'/../library/Giant/giant.ini' );
$this->TestIndication = $this->config->test->TestIndication;
@ -257,8 +269,8 @@ class GiantController extends Zend_Controller_Action
public function startmonitoringAction()
{
$this->_helper->layout()->disableLayout();
$this->view->headLink()->appendStylesheet('/themes/default/styles/giant.css', 'all');
$this->view->headScript()->appendFile('/themes/default/scripts/giant.js', 'text/javascript');
$this->view->headLink()->appendStylesheet($this->theme->pathStyle.'/giant.css', 'all');
$this->view->headScript()->appendFile($this->theme->pathScript.'/giant.js', 'text/javascript');
$this->view->lang = $this->getRequest()->getParam('lang');
$this->view->CompanyId = $this->getRequest()->getParam('CompanyId');
$this->view->Pays = $this->getRequest()->getParam('Pays');
@ -292,7 +304,7 @@ class GiantController extends Zend_Controller_Action
public function stopmonitoringAction()
{
$this->_helper->layout()->disableLayout();
$this->view->headLink()->appendStylesheet('/themes/default/styles/giant.css', 'all');
$this->view->headLink()->appendStylesheet($this->theme->pathStyle.'/giant.css', 'all');
$this->view->CompanyId = $this->getRequest()->getParam('CompanyId');
$this->view->InternalOrderId = $this->getRequest()->getParam('InternalOrderId');
$this->view->Pays = $this->getRequest()->getParam('Pays');
@ -315,7 +327,7 @@ class GiantController extends Zend_Controller_Action
public function updatemonitoringAction()
{
$this->_helper->layout()->disableLayout();
$this->view->headLink()->appendStylesheet('/themes/default/styles/giant.css', 'all');
$this->view->headLink()->appendStylesheet($this->theme->pathStyle.'/giant.css', 'all');
$this->view->lang = $this->getRequest()->getParam('lang');
$this->view->CompanyId = $this->getRequest()->getParam('CompanyId');
$this->view->InternalOrderId = $this->getRequest()->getParam('InternalOrderId');
@ -342,7 +354,7 @@ class GiantController extends Zend_Controller_Action
}
public function retriveAction()
{
$this->view->headScript()->appendFile('/themes/default/scripts/giant_monitoring.js', 'text/javascript');
$this->view->headScript()->appendFile($this->theme->pathScript.'/giant_monitoring.js', 'text/javascript');
$giantController = new GiantControllerLib();
$auth = Zend_Auth::getInstance();
if ( $auth->hasIdentity() ) {
@ -405,8 +417,8 @@ class GiantController extends Zend_Controller_Action
public function reteventsAction()
{
$this->_helper->layout()->disableLayout();
$this->view->headScript()->appendFile('/themes/default/scripts/giant_monitoring.js', 'text/javascript');
$this->view->headScript()->appendFile('/themes/default/scripts/giant.js', 'text/javascript');
$this->view->headScript()->appendFile($this->theme->pathScript.'/giant_monitoring.js', 'text/javascript');
$this->view->headScript()->appendFile($this->theme->pathScript.'/giant.js', 'text/javascript');
$auth = Zend_Auth::getInstance();
$identity = $auth->getIdentity();
$result = $auth->getStorage()->read($identity);

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,131 @@
<?php
class IndexController extends Zend_Controller_Action
{
protected $theme;
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init()
{
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
}
/**
* Page d'accueil et de redirection
*/
public function indexAction()
{
$request = $this->getRequest();
$page = $request->getParam('page');
if ($page == 'annonces')
{
$siret = $request->getParam('siret');
$source = $request->getParam('source');
$idAnn = $request->getParam('idAnn');
$lien = '/juridique/annonces/siret/'.$siret;
if (!empty($source)) $lien.= '/source/'.$source;
if (!empty($idAnn)) $lien.= '/idAnn/'.$idAnn;
$this->_redirect($lien);
}
elseif ( Zend_Registry::get('theme')->name=='mobile' )
{
//Afficher le menu pour la version mobile
}
else
{
$this->_forward('entreprise', 'recherche');
}
}
/**
* Retourne l'url pour le csv d'export du portefeuille
*/
public function portefeuillecsvAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
//'login' and 'hach' detecte from AuthAdapter
$request = $this->getRequest();
$version = $request->getParam('v', 1);
if (intval($version) == 2) {
$log = Zend_Registry::get('config')->profil->path->shared.'/log/altisys.log';
$user = new Scores_Utilisateur();
$login = $user->getLogin();
$idClient = $user->getIdClient();
$file = 'listesurv-score-'.$login.'-'.$idClient.'.csv';
$content_type = 'application/csv-tab-delimited-table';
$c = Zend_Registry::get('config');
$path = $c->profil->path->shared.'/files/';
//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);
file_put_contents($log, date('Y-m-d H:i:s')." APPEL ALTISYS - OK $file\n", FILE_APPEND);
} else {
echo 'Impossible de charger le fichier.';
file_put_contents($log, date('Y-m-d H:i:s')." APPEL ALTISYS - ERREUR $file\n", FILE_APPEND);
}
} else {
require_once 'Scores/WsScores.php';
$user = new Scores_Utilisateur();
$login = $user->getLogin();
$idClient = $user->getIdClient();
$ws = new WsScores();
$reponse = $ws->getPortefeuilleCsv($login, $idClient);
$log = Zend_Registry::get('config')->profil->path->shared.'/log/altisys.log';
if ($reponse === false){
file_put_contents($log, date('Y-m-d H:i:s')." - URL = ERREUR\n", FILE_APPEND);
echo "Erreur";
} elseif (!empty($reponse->result->Url)) {
file_put_contents($log, date('Y-m-d H:i:s')." - URL = ".$reponse->result->Url."\n", FILE_APPEND);
echo $reponse->result->Url;
}
}
}
public function odeaAction()
{
$this->redirect('http://odea.scores-decisions.com');
}
/**
* Display browser agent
*/
public function browserAction()
{
$info = get_browser();
echo $_SERVER['HTTP_USER_AGENT'];
echo "<pre>";
print_r($info);
echo "</pre>";
exit;
}
}

View File

@ -0,0 +1,701 @@
<?php
class JuridiqueController extends Zend_Controller_Action
{
protected $theme;
protected $siret = null;
protected $id = 0;
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init()
{
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme
$this->theme = Zend_Registry::get('theme');
$request = $this->getRequest();
$this->siret = $request->getParam('siret');
$this->id = $request->getParam('id', 0);
require_once 'Scores/WsScores.php';
}
/**
* Affichage de la liste des annonces ou d'une annonce
*/
public function annoncesAction()
{
$request = $this->getRequest();
$autrePage = $request->getParam('apage');
$idAnn = $request->getParam('idAnn', null);
$siren = substr($this->siret, 0,9);
$vue = $request->getParam('vue', 'bodacc');
$source = $request->getParam('source');
if (!empty($source)) {
switch ($source){
case 1: $vue = 'bodacc'; break;
case 2: $vue = 'balo'; break;
case 3: $vue = 'asso'; break;
}
}
$session = new Scores_Session_Entreprise($this->siret, $this->id);
$fj = $session->getFormeJuridique();
if ($fj > 9000 && $fj < 9999 && intval($siren) == 0) {
$vue = 'asso';
}
$this->view->assign('id', $session->getId());
$this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale());
$this->view->assign('AutrePage', $autrePage);
if ($session->getSource() == '006' || $session->getSourceId() == '007') {
$this->view->assign('AutreSource', true);
} else {
$this->view->assign('vue', $vue);
// Pagination
$page = $request->getParam('page', 1);
if ($page <= 0) {
$page = 1;
}
$nbAffichage = 20;
$position = ($page - 1) * $nbAffichage;
$ws = new WsScores();
switch ($vue) {
case 'balo':
$infos = $ws->getAnnoncesBalo($siren, $idAnn, null, $position, $nbAffichage);
break;
case 'asso':
if (intval($siren) == 0 && substr($session->getAutreId(),0,1) == 'W') {
$infos = $ws->getAnnoncesAsso($session->getAutreId(), $idAnn, null, $position, $nbAffichage);
} elseif (intval($siren) != 0) {
$infos = $ws->getAnnoncesAsso($siren, $idAnn, null, $position, $nbAffichage);
} else {
$idAnn = $session->getSourceId();
$this->redirect($this->view->url(array('controller'=>'juridique',
'action'=>'annonce', 'siret'=>$this->siret, 'id'=>$this->id,
'idAnn'=>$idAnn, 'vue'=>$vue), 'default', true));
}
break;
case 'bomp':
$filtre = $request->getParam('filtre', 'A');
$this->view->assign('filtre', $filtre);
$this->logger->info("getAnnoncesBoamp");
$infos = $ws->getAnnoncesBoamp($siren, $idAnn, $filtre, $position, $nbAffichage);
break;
case 'bodacc':
case 'abod':
default:
if(intval($siren) == 0) {
$idAnn = $session->getSourceId();
$this->redirect($this->view->url(array('controller'=>'juridique',
'action'=>'annonce', 'siret'=>$this->siret, 'id'=>$this->id,
'idAnn'=>$idAnn, 'vue'=>$vue), 'default', true));
}
$infos = $ws->getAnnoncesLegales($siren, $idAnn, null, $position, $nbAffichage);
break;
}
$this->logger->info(print_r($infos,1));
if ($infos === false) {
$this->forward('soap', 'error');
}
require_once 'Scores/Annonces.php';
$objAnnonces = new Annonces($infos->result->item);
$typeAnnonces = array(
'Bodacc',
'Balo',
'Bomp',
'Asso',
);
$user = new Scores_Utilisateur();
$this->view->assign('hasModeEdition', $user->checkModeEdition());
$this->view->assign('exportObjet', $infos);
$this->view->assign('surveillance', $user->checkPerm('survannonce'));
// --- Titre de la page
if ( empty($autrePage) ) {
if( empty($siren) ){
$titre = 'Identifiant '.$this->id;
} else {
$titre = 'Siret '.$siren;
}
$this->view->headTitle()->prepend('Annonces Légales - '.$titre);
}
// ---- Calcul pagination
$nbReponses = count($infos->result->item);
$nbReponsesTotal = $infos->nbReponses;
if ($nbReponses < $nbReponsesTotal) {
$pageTotal = ceil( $nbReponsesTotal / $nbAffichage );
$pageCurrent = $page;
$pagePrev = $page - 1;
if ($pagePrev < 1) {
$pagePrev = 1;
}
$pageNext = $page + 1;
if( $pageNext > $pageTotal ) {
$pageNext = $pageTotal;
}
} else {
$pageTotal = $pageCurrent = 1;
$pagePrev = 1;
$pageNext = 1;
}
$this->view->assign('PageTotal', $pageTotal);
$this->view->assign('PagePrev', $pagePrev);
$this->view->assign('PageNext', $pageNext);
$this->view->assign('PageCurrent', $pageCurrent);
$this->view->assign('nbReponses', empty($nbReponses) ? 0 : $nbReponses);
$this->view->assign('nbReponsesTotal', empty($nbReponsesTotal) ? 0 : $nbReponsesTotal);
$classType = 'annonces'.ucfirst($vue);;
$annonces = array();
if (count($objAnnonces->$classType) > 0) {
foreach($objAnnonces->$classType as $ann) {
$annonces[] = $objAnnonces->getAnnonceResume($ann);
}
$this->logger->info(print_r($annonces,1));
$this->view->assign('annonces', $annonces);
}
$this->view->headScript()->appendFile($this->theme->pathScript.'/annonces.js', 'text/javascript');
}
}
/**
* Affichage d'une annonce
*/
public function annonceAction()
{
$request = $this->getRequest();
$autrePage = $request->getParam('apage');
$idAnn = $request->getParam('idAnn', null);
$siren = substr($this->siret, 0,9);
$vue = $request->getParam('vue', 'bodacc');
$source = $request->getParam('source');
if (!empty($source)) {
switch ($source){
case 1: $vue = 'bodacc'; break;
case 2: $vue = 'balo'; break;
case 3: $vue = 'asso'; break;
}
}
$session = new Scores_Session_Entreprise($this->siret, $this->id);
$fj = $session->getFormeJuridique();
if ($fj > 9000 && $fj < 9999 && intval($siren) == 0) {
$vue = 'asso';
}
$page = $request->getParam('page');
$this->view->assign('page', $page);
$this->view->assign('id', $session->getId());
$this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale());
$this->view->assign('AutrePage', $autrePage);
if ($session->getSource() == '006' || $session->getSourceId() == '007') {
$this->view->assign('AutreSource', true);
} else {
$this->view->assign('vue', $vue);
$ws = new WsScores();
switch ($vue) {
case 'balo':
$infos = $ws->getAnnoncesBalo($siren, $idAnn, null, $position, $nbAffichage);
break;
case 'asso':
if ( intval($siren)==0 && substr($session->getAutreId(),0,1)=='W' ) {
$infos = $ws->getAnnoncesAsso($session->getAutreId(), $idAnn, null, $position, $nbAffichage);
} elseif (intval($siren)!=0) {
$infos = $ws->getAnnoncesAsso($siren, $idAnn, null, $position, $nbAffichage);
} else {
$idAnn = $session->getSourceId();
$infos = $ws->getAnnoncesAsso($siren, $idAnn, null, $position, $nbAffichage);
}
break;
case 'bomp':
$filtre = $request->getParam('filtre', 'A');
$this->view->assign('filtre', $filtre);
$infos = $ws->getAnnoncesBoamp($siren, $idAnn, $filtre, $position, $nbAffichage);
break;
case 'bodacc':
case 'abod':
default:
if(intval($siren)==0) {
$idAnn = $session->getSourceId();
}
$infos = $ws->getAnnoncesLegales($siren, $idAnn, null, $position, $nbAffichage);
break;
}
$this->logger->info(print_r($infos,1));
if ($infos === false) {
$this->forward('soap', 'error');
}
require_once 'Scores/Annonces.php';
$objAnnonces = new Annonces($infos->result->item);
$typeAnnonces = array(
'Bodacc',
'Balo',
'Bomp',
'Asso',
);
$user = new Scores_Utilisateur();
$this->view->assign('hasModeEdition', $user->checkModeEdition());
$this->view->assign('exportObjet', $infos);
$this->view->assign('surveillance', $user->checkPerm('survannonce'));
if ( $user->checkModeEdition() ){
$this->view->headScript()
->appendFile($this->theme->pathScript.'/saisieannonces.js', 'text/javascript');
}
$classType = 'annonces'.ucfirst($vue);
foreach($objAnnonces->$classType as $ann) {
if($ann->id==$idAnn) break;
}
$this->logger->info(print_r($ann,1));
$annonce = array(
'Desc' => $objAnnonces->getAnnonceDesc($ann),
'Entree' => $objAnnonces->getAnnonceEntree($ann),
'EntreeSD' => $objAnnonces->getAnnonceEntreeSD($ann),
'Even' => $objAnnonces->getAnnonceEven($ann),
'Texte' => $objAnnonces->getAnnonceTexte($ann),
'Type' => $objAnnonces->getType($ann),
'Code' => $objAnnonces->getCode($ann),
'Annee' => $objAnnonces->getAnnee($ann),
'Num' => $objAnnonces->getNum($ann),
'Deleted' => $objAnnonces->isDeleted($ann),
'Entites' => $objAnnonces->getAnnonceEntite($ann)
);
$this->view->assign('source', $session->getSource());
if (intval($this->siret) == 0){
$this->view->assign('sourceId', $session->getSourceId());
} else {
$this->view->assign('sourceId', null);
}
$this->view->assign('idAnn', $idAnn);
$this->view->assign('annonce', $annonce);
if ($request->getParam('q') == 'ajax') {
$this->_helper->layout()->disableLayout();
$this->view->assign('ajax', 1);
} else {
// Définir url pour téléchargement pdf
if (in_array($annonce['Code'], array('BODA', 'BODB', 'BODC'))) {
$datePublication = DateTime::createFromFormat('Y-m-d', $ann->DateParution);
$dateBodacc = DateTime::createFromFormat('Ymd', '20080101');
$dateTemoinA = DateTime::createFromFormat('Ymd', '20161115');
$dateTemoinB = DateTime::createFromFormat('Ymd', '20161011');
$dateTemoinC = DateTime::createFromFormat('Ymd', '20160223');
$params = null;
if ($annonce['Code'] == 'BODA' && $datePublication >= $dateTemoinA) {
$params = array('unit'=>1);
$this->view->assign('bodaccLinkLabel', 'Télécharger le témoin de publication');
} elseif ($annonce['Code'] == 'BODB' && $datePublication >= $dateTemoinB) {
$params = array('unit'=>1);
$this->view->assign('bodaccLinkLabel', 'Télécharger le témoin de publication');
} elseif ($annonce['Code'] == 'BODC' && $datePublication >= $dateTemoinC) {
$params = array('unit'=>1);
$this->view->assign('bodaccLinkLabel', 'Télécharger le témoin de publication');
} elseif ($datePublication >= $dateBodacc) {
$params = array();
$this->view->assign('bodaccLinkLabel', 'Télécharger le bulletin officiel');
}
if ($params !== null) {
$params = array_merge($params, array('controller'=>'juridique',
'action'=>'bodaccpdf', 'siren'=>$siren, 'type'=>substr($annonce['Code'],3,1),
'parution'=>$annonce['Annee'].str_pad($ann->BodaccNum, 4, '0', STR_PAD_LEFT),
'annonce'=>$ann->NumAnnonce
));
$lienBodacc = $this->view->url($params, 'default', true);
$this->view->assign('bodaccLink', $lienBodacc);
}
}
}
}
}
/**
* Liste des contentieux
*/
public function ctxAction()
{
$request = $this->getRequest();
$session = new Scores_Session_Entreprise($this->siret, $this->id);
$this->view->headTitle()->prepend("Contentieux");
$this->view->headTitle()->prepend("Siret ".$this->siret);
$siren = substr($this->siret, 0,9);
$type = $request->getParam('type', 'DF');
$this->view->Type = $type;
$typeList = array(
'DE' => 'demandeur',
'DF' => 'défendeur',
);
$this->view->TypeLabel = '';
if (array_key_exists($type, $typeList)) {
$this->view->TypeLabel = $typeList[$type];
}
$this->view->TypeList = $typeList;
$nbReponses = 20;
$page = $request->getParam('page', 1);
if ( $page <= 0 ) $page = 1;
$position = ($page - 1 ) * $nbReponses;
$params = new stdClass();
$params->companyId = $siren;
$params->tiers = $type;
$params->p = $position;
$params->limit = $nbReponses;
try {
$ws = new Scores_Ws_Client('entreprise', '0.9');
$response = $ws->getGreffeAffaireList($params);
if ($response === false) {
$this->view->msg = "Erreur";
} else {
$this->view->List = isset($response->List->item)?$response->List->item:null;
// --- Pagination
$nbReponsesTotal = $response->Nb;
if ($nbReponses < $nbReponsesTotal) {
$pageTotal = ceil( $nbReponsesTotal / $nbReponses );
$pageCurrent = $page;
$pagePrev = $page - 1;
if ($pagePrev < 1) {
$pagePrev = 1;
}
$pageNext = $page + 1;
if( $pageNext > $pageTotal ) {
$pageNext = $pageTotal;
}
} else {
$pageTotal = $pageCurrent = 1;
$pagePrev = 1;
$pageNext = 1;
}
$this->view->assign('PageTotal', $pageTotal);
$this->view->assign('PagePrev', $pagePrev);
$this->view->assign('PageNext', $pageNext);
$this->view->assign('PageCurrent', $pageCurrent);
$this->view->assign('nbReponses', empty($nbReponses) ? 0 : $nbReponses);
$this->view->assign('nbReponsesTotal', empty($nbReponsesTotal) ? 0 : $nbReponsesTotal);
$this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale());
}
} catch (Exception $e) {
$this->view->msg = $e->getMessage();
}
}
public function ctxdetailAction()
{
$request = $this->getRequest();
$session = new Scores_Session_Entreprise($this->siret, $this->id);
$siren = substr($this->siret, 0,9);
$this->view->headTitle()->prepend("Contentieux");
$this->view->headTitle()->prepend("Siret ".$this->siret);
$this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale());
$id = $request->getParam('affaireId');
$params = new stdClass();
$params->id = $id;
try {
$ws = new Scores_Ws_Client('entreprise', '0.9');
$response = $ws->getGreffeAffaireDetail($params);
if ($response === false) {
$this->view->msg = "Erreur";
} else {
$this->view->Affaire = $response;
}
} catch (Exception $e) {
$this->view->msg = $e->getMessage();
}
}
/**
* Affichage infos réglementées
*/
public function infosregAction()
{
$this->view->headTitle()->prepend("Informations Réglementées");
$this->view->headTitle()->prepend("Siret ".$this->siret);
$request = $this->getRequest();
$idAnn = $request->getParam('idann', false);
$siren = substr($this->siret, 0,9);
$session = new Scores_Session_Entreprise($this->siret, $this->id);
$ws = new WsScores();
if ($idAnn!=false) {
$this->view->assign('idAnn', $idAnn);
$infos = $ws->getInfosReg($siren,$idAnn);
} else {
$infos = $ws->getInfosReg($siren);
}
if ($infos === false) $this->forward('soap', 'error');
if (is_string($infos)){
$this->view->assign('message', $infos);
}
$objAnnonces = $infos->result->item;
$annonces = array();
if (count($objAnnonces)>0) {
foreach ( $objAnnonces as $item ) {
$dateParution = new Zend_Date($item->DateParution, 'yyyy-MM-dd');
$dateInsertion = new Zend_Date($item->dateInsertionSD, 'yyyy-MM-dd');
$annonces[] = array(
'id' => $item->id,
'titre' => $item->titre,
'communique' => $item->communique,
'source' => $item->source,
'DateParution' => $dateParution->toString('dd/MM/yyyy'),
'dateInsertionSD' => $dateInsertion->toString('dd/MM/yyyy'),
);
}
}
$this->view->assign('annonces', $annonces);
$this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale());
$this->view->assign('exportObjet', $infos);
}
/**
* Affichage listes des compétences
*/
public function competencesAction()
{
$this->view->headTitle()->prepend("Compétences Territoriales");
$this->view->headTitle()->prepend("Siret ".$this->siret);
$request = $this->getRequest();
$type = $request->getParam('type', '');
$siren = substr($this->siret,0,9);
$session = new Scores_Session_Entreprise($this->siret, $this->id);
$abbrev = array(
' TGI ' => 'TRIBUNAL DE GRANDE INSTANCE DE ',
' TI ' => 'TRIBUNAL D\'INSTANCE DE ',
' TC ' => 'TRIBUNAL DE COMMERCE DE ',
' TGICC ' => 'TRIBUNAL DE GRANDE INSTANCE A COMPETENCE COMMERCIALE ',
' TICC ' => 'TRIBUNAL D\'INSTANCE A COMPETENCE COMMERCIALE '
);
if (!empty($type)){
$ws = new WsScores();
$infos = $ws->getListeCompetences($this->siret, $type, $session->getCodeCommune());
if ($infos === false) $this->_forward('soap', 'error');
$competences = $infos->result->item;
$this->logger->info(print_r($infos,1));
if( $type=='tri' || $type=='cfe' ) {
$i=0;
foreach($competences as $comp){
$competences[$i]->Nom = strtr(' '.strtoupper($comp->Nom), $abbrev);
$i++;
}
}
$this->view->assign('competences', $competences);
$this->view->assign('type', $type);
$this->view->assign('exportObjet', $infos);
}
$this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale());
}
/**
* Affichage des la listes des conventions collectives
* Enter description here ...
*/
public function conventionsAction()
{
$this->view->headTitle()->prepend("Conventions Collectives");
$this->view->headTitle()->prepend("Siret ".$this->siret);
$siren = substr($this->siret, 0,9);
$session = new Scores_Session_Entreprise($this->siret, $this->id);
$this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale());
$ws = new WsScores();
$infos = $ws->getListeConventions($siren);
$conventions = $infos->result->item;
$this->logger->info(print_r($conventions,1));
$this->view->assign('conventions', $conventions);
$this->view->assign('exportObjet', $infos);
}
/**
* Affichage des marques déposées
*/
public function marquesAction()
{
$this->view->headTitle()->prepend("Marques Déposées");
$this->view->headTitle()->prepend("Siret ".$this->siret);
$this->view->headScript()->appendFile($this->theme->pathScript.'/marques.js', 'text/javascript');
$request = $this->getRequest();
$idObject = $request->getParam('idObject', 0);
$siren = substr($this->siret, 0,9);
$session = new Scores_Session_Entreprise($this->siret, $this->id);
$this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale());
$ws = new WsScores();
$infos = $ws->getMarques($siren, $idObject);
if ($infos === false) $this->_forward('soap', 'error');
$marques = $infos->result->item;
$this->view->assign('marques', $marques);
$this->view->assign('idObject', $idObject);
$this->view->assign('exportObjet', $marques);
$this->logger->info(print_r($infos,1));
}
/**
* Affiche le lien pour télécharger le fichier concernant le dépot
*/
public function getmarqueAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$request = $this->getRequest();
$numdepot = $request->getParam('numdepot', '');
if (empty($numdepot)){
echo 'Paramètres incorrects';
exit;
}
$c = Zend_Registry::get('config');
$directory = $c->profil->path->shared.'/persist/marques';
$file = $numdepot.'.pdf';
//Le fichier n'existe pas alors on le télécharger
if(!file_exists($directory.'/'.$file)
|| filesize($directory.'/'.$file)==0 ) {
$cmd = 'php ' . APPLICATION_PATH . '/../scripts/jobs/getMarque.php ' . $numdepot;
$this->logger->info($cmd);
$result = exec($cmd);
$this->logger->info($result);
}
//On vérfie que le fichier existe après le téléchargement
if(file_exists($directory.'/'.$file) && filesize($directory.'/'.$file)>0) {
$href = $this->view->url(array('module'=>'file', 'controller'=>'index', 'action'=>'marque', 'q'=>$file), 'default', true);
echo '<a href="'.$href.'" target="_blank">Télécharger le PDF de l\'insciption au BOPI.</a>';
} else {
echo 'Document introuvable.';
}
}
/**
* Gestion téléchargement du Bodacc au format pdf
*/
public function bodaccpdfAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$request = $this->getRequest();
$siren = $request->getParam('siren');
$type = $request->getParam('type');
$parution = $request->getParam('parution');
$annonce = $request->getParam('annonce');
$unit = $request->getParam('unit');
$annee = substr($parution,0,4);
$c = Zend_Registry::get('config');
$path = $c->profil->path->shared.'/persist/bodacc/'.$type.'/'.$annee;
if ($unit == 1) {
$file = $path."/BODACC_".$type."_".$annee."_".substr($parution,4)."_".$annonce.".pdf";
} else {
$file = $path."/BODACC_".$type."_".$annee."_".substr($parution,4).".pdf";
}
if (!file_exists($file)) {
$cli = "/../scripts/jobs/getBodaccPdf.php";
$params = "--siren ".$siren."--type ".$type." --parution ".$parution." --annonce ".$annonce;
exec('php ' . APPLICATION_PATH . "$cli $params >> getBodaccPdf.log");
}
if (file_exists($file)) {
$href = $this->view->url(array('module'=>'file', 'controller'=>'bodacc',
'action'=>'actual', 'q' => basename($file)), 'default', true);
echo "<a target=\"_blank\" href=\"".$href."\">Cliquer ici pour télécharger le fichier.</a>";
} else {
echo "Erreur lors du chargement du fichier.";
}
}
public function annoncenumAction()
{
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$siren = $request->getParam('siren');
$ws = new WsScores();
$result = $ws->getAnnoncesNum($siren);
$this->logger->info(print_r($result,1));
$numWS = array();
if (count($result->item)>0) {
foreach ($result->item as $item) {
$numWS[$item->type] = $item->num;
}
}
$types = array('bodacc', 'balo', 'boamp', 'asso');
$num = array();
foreach($types as $type) {
if ( array_key_exists($type, $numWS) ) {
$num['Type'.ucfirst($type)] = $numWS[$type];
}
}
$this->view->assign('num', $num);
}
}

View File

@ -1,12 +1,26 @@
<?php
class LogoController extends Zend_Controller_Action
{
protected $pathLogo = '';
protected $theme;
protected $pathLogo = '';
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init()
{
$c = Zend_Registry::get('config');
$this->pathLogo = $c->profil->path->data.'/logos';
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme
$this->theme = Zend_Registry::get('theme');
$c = Zend_Registry::get('config');
$this->pathLogo = $c->profil->path->shared.'/persist/logos';
}
public function indexAction()

View File

@ -1,6 +1,20 @@
<?php
/**
*
* @todo vérifier contenu de la table des cours d'appel en dur
* au 20150305:
* 98713 PAPEETE CEDEX
* 97262 FORT DE FRANCE CEDEX
* Chambre Détachée de la Cour d'Appel de Fort de France à Cayenne", "triCP"=>"97300
* qui devrait être "cours d'appel de Cayenne"
* 97600 MAMOUDZOU
* 97500 ST PIERRE ET MIQUELON
*
*/
class MandataireController extends Zend_Controller_Action
{
protected $theme;
protected $coursAppel = array(
array( "triId"=>"1756", "triCode"=>"AIXPRL", "triNom"=>"Cour d'Appel d'Aix-en-Provence", "triCP"=>"13616" ),
array( "triId"=>"1757", "triCode"=>"AMIENL", "triNom"=>"Cour d'Appel d'Amiens", "triCP"=>"80027" ),
@ -39,33 +53,46 @@ class MandataireController extends Zend_Controller_Action
array( "triId"=>"1790", "triCode"=>"CAYENL", "triNom"=>"Chambre Détachée de la Cour d'Appel de Fort de France à Cayenne", "triCP"=>"97300" ),
array( "triId"=>"1798", "triCode"=>"AGENL", "triNom"=>"Cour d'Appel d'Agen", "triCP"=>"47916" ),
);
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init()
{
require_once 'Scores/WsScores.php';
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme
$this->theme = Zend_Registry::get('theme');
require_once 'Scores/WsScores.php';
}
/**
* Enregistrement d'un mandataire
*/
public function addAction()
{
$this->_helper->layout->disableLayout();
$request = $this->getRequest();
$idMandataire = $request->getParam('idMand', '');
$tribunal = $request->getParam('tribunal', '');
$ws = new WsScores();
Zend_Registry::get('firebug')->info('idMandataire : '.$idMandataire);
$this->logger->info('idMandataire : '.$idMandataire);
//Mode edition
if ($idMandataire != '') {
$idMandataire = (int)substr($idMandataire,1);
$reponse = $ws->getMandataire($idMandataire);
Zend_Registry::get('firebug')->info($reponse);
$this->logger->info(print_r($reponse,1));
if ($reponse!==false) {
$tabMandataires = json_decode($reponse, true);
} else {
@ -75,26 +102,26 @@ class MandataireController extends Zend_Controller_Action
} else {
$tabMandataires = $request->getParam('tabMandataires');
}
if ($tribunal!='') {
//La cour d'appel suivant le tribunal sélectionné
$codeCourAppel = $ws->getIdCoursAppel($tribunal);
//Les tribunaux
$tmp = $ws->getTribunaux(array('C','I','G')); //
$tribunaux = $tmp->result->item;
}else{
$message = 'Pas de tribunal sélectionné.';
}
$this->view->assign('message', $message);
$this->view->assign('tabMandataires', $tabMandataires);
$this->view->assign('coursAppel', $this->coursAppel);
$this->view->assign('tribunal', $tribunal);
$this->view->assign('tribunaux', $tribunaux);
}
/**
* Edition d'un mandataire
*/
@ -102,7 +129,7 @@ class MandataireController extends Zend_Controller_Action
{
$this->_forward('add');
}
/**
* Recherche d'un mandataire à partir d'une chaine de caractères
* "nom, departement"
@ -111,40 +138,40 @@ class MandataireController extends Zend_Controller_Action
{
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender();
$request = $this->getRequest();
$search = $request->getParam('search', '');
if (empty($search)) { echo ''; }
else { $search = strtolower($search); }
list($searchStr, $filtre) = explode(',', $search);
$searchStr = trim($searchStr);
$filtre = str_replace(' ', '', $filtre);
if( strlen($filtre) != 5 && strlen($filtre) != 2 ){
$filtre = '';
}
$ws = new WsScores();
$reponse = $ws->searchMandataires(
$searchStr,
array('V', 'N', 'H', 'A', 'M'), //types de mandataires
$filtre
);
if ($reponse == false){
echo 'Erreur durant la recherche';
exit;
}
$mandataires = $reponse->result->item;
$output = array();
$output[] = array(
'label' => "A l'adresse du bien vendu",
'id' => 'adresse'
);
/*
REGEX Code Postal : ^(F-)?((2[A|B])|[0-9]{2})[0-9]{3}$
(?<!/BP /i) Ne pas avoir la présence de BP devant les 5 chiffres
@ -158,7 +185,7 @@ class MandataireController extends Zend_Controller_Action
$tabResults[$i]['lib'] = htmlspecialchars_decode(
html_entity_decode($mandataire->mand, ENT_COMPAT | ENT_HTML401, 'UTF-8')
, ENT_QUOTES);
preg_match('/(?<!bp )((2[A|B])|[0-9]{2})[0-9]{3}( )/i', $mandataire->mand, $matches);
$tabResults[$i]['cp'] = $matches[0];
$i++;
@ -170,7 +197,7 @@ class MandataireController extends Zend_Controller_Action
}
//Classement du tableau
array_multisort($cp, SORT_NUMERIC, $tabResults);
//Affichage des valeurs
foreach ($tabResults as $item){
$output[] = array(
@ -181,7 +208,7 @@ class MandataireController extends Zend_Controller_Action
}
echo json_encode($output);
}
public function getAction()
{
$this->_helper->layout->disableLayout();
@ -190,7 +217,7 @@ class MandataireController extends Zend_Controller_Action
$request = $this->getRequest();
$siren = $request->getParam('siren');
$siren = str_replace(' ','',$siren); //Remplacer les espaces
if ( $siren=='' || strlen($siren)!=14 ) {
$output = array(
'Siret' => 'Siret incorrect',
@ -198,7 +225,7 @@ class MandataireController extends Zend_Controller_Action
echo json_encode($output);
exit;
}
$tabEntrep = array();
$ws = new WsScores();
$tabEntrep = $ws->getIdentite($siren);
@ -210,24 +237,24 @@ class MandataireController extends Zend_Controller_Action
if (!empty($tabEntrep->NomLong) && strlen($tabEntrep->NomLong)>strlen($tabEntrep->Nom)){
$tabEntrep->Nom = $tabEntrep->NomLong;
}
//Retourner le tableau sous forme json
echo json_encode($tabEntrep);
}
}
public function saveAction()
{
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender();
$request = $this->getRequest();
$error = false;
$tabMandataires = $request->getParam('tabMandataires', array());
//Vérification des données
$fields = array();
if($tabMandataires['sirenGrp']=='' && $tabMandataires['sirenMand']==''){
@ -242,7 +269,7 @@ class MandataireController extends Zend_Controller_Action
$fields = 'Siret avec la bonne taille';
$error = true;
}
if($tabMandataires['Nom']=='' ){$fields[] ='Nom'; $error = true;}
if($tabMandataires['type']==''){$fields[] ='Type'; $error = true;}
if($tabMandataires['tribunal']==''){$fields[] ='Tribunal'; $error = true;}
@ -252,24 +279,26 @@ class MandataireController extends Zend_Controller_Action
if($tabMandataires['cp']==''){$fields[] ='Code Postal'; $error = true;}
if($tabMandataires['ville']==''){$fields[] ='Ville'; $error = true;}
if($tabMandataires['tel']==''){$fields[] ='Téléphone'; $error = true;}
//Envoi de la requête au webservices
if ($error==true){
$message = '<font color="red">';
$message.= 'Veuillez remplir les champs suivants : ';
$message.= join(', ', $fields);
$message.= '</font>';
}else{
} else {
$message='';
$ws = new WsScores();
$reponse = $ws->setMandataire($tabMandataires);
if ($reponse===false || $reponse->result==false){
$message = 'Une erreur s\'est produite durant l\'enregistrement';
if ( $reponse===false ){
$message = "Une erreur s'est produite durant l'enregistrement";
} elseif ( is_string($reponse) ) {
$message = $reponse;
}
}
echo $message;
}
protected function htmlentitydecode_deep($value)
{
$value = is_array($value) ?
@ -277,7 +306,7 @@ class MandataireController extends Zend_Controller_Action
html_entity_decode($value, ENT_QUOTES);
return $value;
}
}

View File

@ -0,0 +1,235 @@
<?php
class OrderController extends Zend_Controller_Action
{
protected $theme;
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init()
{
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme
$this->theme = Zend_Registry::get('theme');
}
public function indexAction(){}
public function kbisAction()
{
$request = $this->getRequest();
// --- Année de départ
$user = new Scores_Utilisateur();
$startYear = substr($user->identity->dateDebutCompte,0,4);
if (empty($startYear)) {
$startYear = 2006;
}
// --- Date
$date = new Zend_Date();
$year = $date->toString('yyyy'); //Année en cours
$month = $date->toString('MM'); //Mois en cours
$nbYear = $year - $startYear + 1;
$selectYear = array();
for( $i=0; $i<$nbYear; $i++ ) {
$selectYear[] = $startYear + $i;
}
$this->view->Years = $selectYear;
$selectMonth = array('01','02','03','04','05','06','07','08','09','10','11','12');
$this->view->Months = $selectMonth;
$selectedYear = $request->getParam('y', date('Y'));
$this->view->year = $selectedYear;
$selectedMonth = $request->getParam('m', date('m'));
$this->view->month = $selectedMonth;
// --- Fin Date
$ws = new Scores_Ws_Client('order', '0.1');
$params = new stdClass();
$params->month = $selectedYear.'-'.$selectedMonth;
$response = $ws->getKbisList($params);
if ($response === false) {
$this->view->Error = true;
} else {
$this->view->Cmd = $response->item;
}
}
public function bilaninputAction()
{
$request = $this->getRequest();
// --- Année de départ
$user = new Scores_Utilisateur();
$startYear = substr($user->identity->dateDebutCompte,0,4);
if (empty($startYear)) {
$startYear = 2006;
}
// --- Date
$date = new Zend_Date();
$year = $date->toString('yyyy'); //Année en cours
$month = $date->toString('MM'); //Mois en cours
$nbYear = $year - $startYear + 1;
$selectYear = array();
for( $i=0; $i<$nbYear; $i++ ) {
$selectYear[] = $startYear + $i;
}
$this->view->Years = $selectYear;
$selectMonth = array('01','02','03','04','05','06','07','08','09','10','11','12');
$this->view->Months = $selectMonth;
$selectedYear = $request->getParam('y', date('Y'));
$this->view->year = $selectedYear;
$selectedMonth = $request->getParam('m', date('m'));
$this->view->month = $selectedMonth;
// --- Fin Date
$ws = new Scores_Ws_Client('order', '0.1');
$params = new stdClass();
$params->month = $selectedYear.'-'.$selectedMonth;
$response = $ws->getBilanInputList($params);
if ($response === false) {
$this->view->Error = true;
} else {
$this->view->Cmd = $response->item;;
}
}
public function greffebilanAction()
{
$request = $this->getRequest();
// --- Année de départ
$user = new Scores_Utilisateur();
$startYear = substr($user->identity->dateDebutCompte,0,4);
if (empty($startYear)) {
$startYear = 2006;
}
// --- Date
$date = new Zend_Date();
$year = $date->toString('yyyy'); //Année en cours
$month = $date->toString('MM'); //Mois en cours
$nbYear = $year - $startYear + 1;
$selectYear = array();
for( $i=0; $i<$nbYear; $i++ ) {
$selectYear[] = $startYear + $i;
}
$this->view->Years = $selectYear;
$selectMonth = array('01','02','03','04','05','06','07','08','09','10','11','12');
$this->view->Months = $selectMonth;
$selectedYear = $request->getParam('y', date('Y'));
$this->view->year = $selectedYear;
$selectedMonth = $request->getParam('m', date('m'));
$this->view->month = $selectedMonth;
// --- Fin Date
$ws = new Scores_Ws_Client('order', '0.1');
$params = new stdClass();
$params->month = $selectedYear.'-'.$selectedMonth;
$response = $ws->getBilanList($params);
if ($response === false) {
$this->view->Error = true;
} else {
$this->view->Cmd = $response->item;;
}
}
public function greffeacteAction()
{
$request = $this->getRequest();
// --- Année de départ
$user = new Scores_Utilisateur();
$startYear = substr($user->identity->dateDebutCompte,0,4);
if (empty($startYear)) {
$startYear = 2006;
}
// --- Date
$date = new Zend_Date();
$year = $date->toString('yyyy'); //Année en cours
$month = $date->toString('MM'); //Mois en cours
$nbYear = $year - $startYear + 1;
$selectYear = array();
for( $i=0; $i<$nbYear; $i++ ) {
$selectYear[] = $startYear + $i;
}
$this->view->Years = $selectYear;
$selectMonth = array('01','02','03','04','05','06','07','08','09','10','11','12');
$this->view->Months = $selectMonth;
$selectedYear = $request->getParam('y', date('Y'));
$this->view->year = $selectedYear;
$selectedMonth = $request->getParam('m', date('m'));
$this->view->month = $selectedMonth;
// --- Fin Date
$ws = new Scores_Ws_Client('order', '0.1');
$params = new stdClass();
$params->month = $selectedYear.'-'.$selectedMonth;
$response = $ws->getActeList($params);
if ($response === false) {
$this->view->Error = true;
} else {
$this->view->Cmd = $response->item;;
}
}
public function assostatutAction()
{
$request = $this->getRequest();
// --- Année de départ
$user = new Scores_Utilisateur();
$startYear = substr($user->identity->dateDebutCompte,0,4);
if (empty($startYear)) {
$startYear = 2006;
}
// --- Date
$date = new Zend_Date();
$year = $date->toString('yyyy'); //Année en cours
$month = $date->toString('MM'); //Mois en cours
$nbYear = $year - $startYear + 1;
$selectYear = array();
for( $i=0; $i<$nbYear; $i++ ) {
$selectYear[] = $startYear + $i;
}
$this->view->Years = $selectYear;
$selectMonth = array('01','02','03','04','05','06','07','08','09','10','11','12');
$this->view->Months = $selectMonth;
$selectedYear = $request->getParam('y', date('Y'));
$this->view->year = $selectedYear;
$selectedMonth = $request->getParam('m', date('m'));
$this->view->month = $selectedMonth;
// --- Fin Date
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,23 @@
<?php
class PrintController extends Zend_Controller_Action
{
protected $theme;
public function init(){}
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init()
{
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme
$this->theme = Zend_Registry::get('theme');
}
/**
* Renvoie les paramètres pour l'impression
@ -30,8 +45,7 @@ class PrintController extends Zend_Controller_Action
$params['mil'] = $elements[5];
break;
case 'liasse':
$params['unit'] = $elements[4];
$params['date'] = $elements[5];
$params['date'] = $elements[3];
break;
}
$params['siret'] = $elements[2];
@ -69,6 +83,11 @@ class PrintController extends Zend_Controller_Action
case 'evaluation':
$params['siret'] = $elements[2];
$params['id'] = $elements[3];
switch($action){
case 'scoreshisto':
$params['type'] = $elements[4];
break;
}
break;
case 'giant':
$params['Pays'] = $elements[2];
@ -121,7 +140,7 @@ class PrintController extends Zend_Controller_Action
$fichier = str_replace('.pdf', '', $fichier);
$c = Zend_Registry::get('config');
$file = $c->profil->path->pages.'/'.$fichier.'.html';
$file = $c->profil->path->shared.'/pages/'.$fichier.'.html';
if (!file_exists($file))
{
echo 'Fichier introuvable';
@ -200,6 +219,7 @@ class PrintController extends Zend_Controller_Action
}
$this->view->assign('controller', $elements['controller']);
$this->view->assign('action', $elements['action']);
$this->logger->info(print_r($elements['params'],1));
$this->view->assign('params', $elements['params']);
}
@ -219,7 +239,7 @@ class PrintController extends Zend_Controller_Action
}
$c = Zend_Registry::get('config');
$file = $c->profil->path->files.'/'.$fichier;
$file = $c->profil->path->shared.'/files/'.$fichier;
if (!file_exists($file)){
echo "Erreur lors de la génération du fichier.";
exit;

View File

@ -3,8 +3,21 @@ class RechercheController extends Zend_Controller_Action
{
protected $theme;
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init()
{
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme
$this->theme = Zend_Registry::get('theme');
/** Pour Giant **/
if(isset($_SESSION['recherche']['giant']))
unset($_SESSION['recherche']['giant']);
@ -170,9 +183,8 @@ class RechercheController extends Zend_Controller_Action
} else {
require_once 'i18n/cleanchar.php';
//Suppression des caractères accentués
$txt = cleanstring($params['formA']['txt']);
$txt = Scores_Locale_String::cleanstring($params['formA']['txt']);
//Remplacement du caractère § par ~
$txt = str_replace('$', '~', $txt);
// Recherche siren tenant compte des anomalies d'OCR
@ -211,11 +223,8 @@ class RechercheController extends Zend_Controller_Action
'annee' => $annonce->Annee,
'code' => $code,
'text' => $texte,
'file' => $this->view->url(array(
'controller'=>'telechargement',
'action'=>'histopdf',
'q' => $fichier,
'host' => base64_encode($host))
'file' => $this->view->url(array('controller'=>'telechargement', 'action'=>'histopdf',
'q' => $fichier, 'host' => base64_encode($host)), 'default', true
),
);
}
@ -287,10 +296,10 @@ class RechercheController extends Zend_Controller_Action
$request = $this->getRequest();
if ($request->isPost() && $form->isValid($request->getParams())) {
Zend_Registry::get('firebug')->info($form->getValues());
$this->logger->info(print_r($form->getValues(),1));
$c = Zend_Registry::get('config');
$path = realpath($c->profil->path->data).'/log';
$path = $c->profil->path->shared.'/persist/log';
$fp = fopen($path.'/enquetes.csv', 'a');
fwrite($fp, date('Y/m/d H:i:s').' - '.print_r($form->getValues(),true)."\n");
fclose($fp);
@ -306,12 +315,12 @@ class RechercheController extends Zend_Controller_Action
$message.= "Prénom : ".$user->getPrenom()."<br/>";
$objet = "Demande d'investigation";
$mail = new Scores_Mail();
$mail->setFrom('contact');
$mail = new Scores_Mail_Method();
$mail->setFromKey('contact');
$mail->addToKey('support');
$mail->setSubject($objet);
$mail->setBodyHtml($message);
$mail->send();
$mail->execute();
} else {
//Affichage formulaire
@ -380,7 +389,7 @@ class RechercheController extends Zend_Controller_Action
$required = array('dirNom', 'dirType');
foreach($required as $item){
if(empty($params[$item])){
$this->_redirect('/recherche/worldcheck');
$this->redirect('/recherche/worldcheck');
break;
}
}
@ -388,7 +397,7 @@ class RechercheController extends Zend_Controller_Action
//Redirection
$token = $rechercheParams->save($type, $params);
$this->_redirect('recherche/liste/token/'.$token);
$this->redirect('recherche/liste/token/'.$token);
}
//On selectionne en session
@ -400,7 +409,7 @@ class RechercheController extends Zend_Controller_Action
//Giant
if( !empty($params['pays']) && $type == 'ent' ){
Zend_Registry::get('firebug')->info('RECHERCHE GIANT');
$this->logger->info('RECHERCHE GIANT');
$this->_forward('search', 'giant', null, $params);
//Worldcheck
} elseif ($type == 'wcheck' ) {
@ -423,14 +432,12 @@ class RechercheController extends Zend_Controller_Action
//Criteres recherche entreprise
if ( $type=='ent' ) {
require_once 'i18n/cleanchar.php';
// Type de recherche = entreprises
$telFax = trim(preg_replace('/[^0-9]/', '', $params['telFax']));
$naf = trim(preg_replace('/[^0-9A-Z]/i', '', $params['naf']));
// Traitement des données formulaire
$raisonSociale = cleanutf8($params['raisonSociale']);
$raisonSociale = Scores_Locale_String::cleanutf8($params['raisonSociale']);
$raisonSociale = str_replace(array('(',')', '/'), array('', '', ' '), $raisonSociale);
$numVoie = preg_replace('/[^0-9]/', '', $params['numero']);
@ -438,10 +445,10 @@ class RechercheController extends Zend_Controller_Action
$numVoie = '';
}
$libVoie = cleanutf8($params['voie']);
$libVoie = Scores_Locale_String::cleanutf8($params['voie']);
$libVoie = str_replace(array('(',')', '/'), array('', '', ' '), $libVoie);
$cpVille = cleanutf8($params['cpVille']);
$cpVille = Scores_Locale_String::cleanutf8($params['cpVille']);
$cpVille = str_replace(array('(',')', '/'), array('', '', ' '), $cpVille);
@ -495,7 +502,7 @@ class RechercheController extends Zend_Controller_Action
$this->view->assign('rechCsv', $user->checkPerm('rechcsv'));
//Criteres recherche dirigeants
} else if ( $type=='dir' ) {
} else if ( $type == 'dir' ) {
// Type de recherche = dirigeants
//$dirNom = preg_replace('/[^0-9A-Z]/', ' ', strtoupper($params['dirNom']));
@ -584,7 +591,7 @@ class RechercheController extends Zend_Controller_Action
$params[$key] = str_replace('/', ' ', $params[$key]);
}
$criteresLien = $this->view->url($params, null, true);
$criteresLien = $this->view->url($params, 'default', true);
$liste = array();
if (count($etabs)>0) {
@ -642,7 +649,7 @@ class RechercheController extends Zend_Controller_Action
'action'=>'fiche',
'id' => $etab->id,
'siret' => $etab->Siren,
), null, true);
), 'default', true);
if ( $user->checkPerm('IDENTITE') ) {
$infoEtab.= ' <a title="Voir la fiche d\'identité du siège de cette entreprise"'.
@ -690,19 +697,19 @@ class RechercheController extends Zend_Controller_Action
}
$item['InfoActivite'] = $activite;
if ($type=='dir') {
if ( $type == 'dir' ) {
$item['InfoDirigeant'] = '<u>Dirigeant recherch&eacute; :</u> ';
if ($etab->DirRs!='') {
$item['InfoDirigeant'].= '<b>'.$etab->DirRs.'</b>, repr&eacute;sent&eacute; par ';
}
$item['InfoDirigeant'].= $etab->DirNom .' '. $etab->DirPrenom;
if ($etab->DirNomUsage<>'' && $etab->DirNomUsage<>$etab->DirNom) {
if ( $etab->DirNomUsage != '' && $etab->DirNomUsage != $etab->DirNom) {
$item['InfoDirigeant'].= ' ('. $etab->DirNomUsage . ')';
}
$item['InfoDirigeant'].= '<i>, '.$etab->DirFonction.'</i><br/>';
} elseif ($type=='act'){
} elseif ( $type == 'act' ) {
$item['InfoActionnaire'] = '<u>Actionnaire recherch&eacute; :</u> ';
if ($etab->ActNomRs<>'') {
@ -729,6 +736,11 @@ class RechercheController extends Zend_Controller_Action
//Affichage accès direct aux pages
$liens = array();
/**
* test en dur clients pour bilans
* @todo client = 34
* @todo client = 60
*/
if ($user->getIdClient()==34 || $user->getIdClient()==60) {
$liens[] = array(
'title' => 'Comptes annuels',
@ -736,22 +748,26 @@ class RechercheController extends Zend_Controller_Action
'controller'=>'pieces',
'action'=>'bilans',
'siret'=>$etab->Siren.$etab->Nic,
'id'=>$etab->id), null, true),
'id'=>$etab->id), 'default', true),
);
$liens[] = array(
'title' => 'Actes et status',
'href' => $this->view->url(array(
'controller'=>'pieces', 'action'=>'actes',
'siret'=>$etab->Siren.$etab->Nic, 'id'=>$etab->id), null, true),
'siret'=>$etab->Siren.$etab->Nic, 'id'=>$etab->id), 'default', true),
);
}
/**
* test en dur clients pour fiche
* @todo client = 60
*/
if ($user->getIdClient()==60) {
$liens[] = array(
'title' => 'Fiche AGS',
'href' => $this->view->url(array(
'controller'=>'identite', 'action'=>'fichepc',
'siret'=>$etab->Siren.$etab->Nic, 'id'=>$etab->id), null, true),
'siret'=>$etab->Siren.$etab->Nic, 'id'=>$etab->id), 'default', true),
);
}
if (count($liens)>0) {
@ -780,7 +796,7 @@ class RechercheController extends Zend_Controller_Action
'action' => 'liste',
'type' => 'ent',
'raisonSociale' => trim($criteres['dirNom'].' '.$criteres['dirPrenom'])
), null, true));
), 'default', true));
} else {
$this->view->assign('blockDirToEntreprise', false);
}
@ -790,6 +806,8 @@ class RechercheController extends Zend_Controller_Action
//Calcul pagination
$nbReponses = $reponse->nbReponses;
$nbReponsesTotal = $reponse->nbReponsesTotal;
$pagePrev=1;
$pageNext=1;
if ($nbReponses < $nbReponsesTotal) {
$pageTotal = ceil( $nbReponsesTotal / $nbAffichage );
$pageCurrent = $page;
@ -911,7 +929,7 @@ class RechercheController extends Zend_Controller_Action
$sql->where("LOWER(libelle) ".$where);
}
}
Zend_Registry::get('firebug')->info($where);
$this->logger->info($where);
$rows = $table->fetchAll($sql);
if ( count($rows)>0 ) {
@ -1018,7 +1036,7 @@ class RechercheController extends Zend_Controller_Action
'action'=>'fiche',
'id' => $etab->id,
'siret' => $etab->Siren,
));
), 'default', true);
$infoEtab.= ' <a title="Voir la fiche d\'identité du siège de cette entreprise"'.
' href="'.$url.'">(Accès siège)</a>';
}
@ -1099,8 +1117,6 @@ class RechercheController extends Zend_Controller_Action
//Criteres recherche entreprise
if ($type=='ent'){
require_once 'i18n/cleanchar.php';
// Type de recherche = entreprises
$telFax = trim(preg_replace('/[^0-9]/', '', $params['telFax']));
$naf = trim(preg_replace('/[^0-9A-Z]/i', '', $params['naf']));
@ -1114,8 +1130,8 @@ class RechercheController extends Zend_Controller_Action
die('Numéro de voie incorrecte !');
}
$libVoie = cleanutf8($params['voie']);
$cpVille = cleanutf8($params['cpVille']);
$libVoie = Scores_Locale_String::cleanutf8($params['voie']);
$cpVille = Scores_Locale_String::cleanutf8($params['cpVille']);
if (preg_match("/^([0-9]{2,5})([\D]*)/i", $cpVille, $matches)) {
$cp = trim($matches[1]);
@ -1192,7 +1208,7 @@ class RechercheController extends Zend_Controller_Action
//echo "<pre>"; print_r($etabs); echo "</pre>"; exit;
$c = Zend_Registry::get('config');
$file = $c->profil->path->files . '/'.$user->getIdClient().'-'.$user->getLogin().'-'.date('YmdHis').'.csv';
$file = $c->profil->path->shared . '/files/'.$user->getIdClient().'-'.$user->getLogin().'-'.date('YmdHis').'.csv';
$export = new Scores_Export_ArrayCsv($etabs, 'rechercheEntreprise');
$export->writeFile($file);

View File

@ -1,6 +1,8 @@
<?php
class SurveillanceController extends Zend_Controller_Action
{
protected $theme;
/**
* Association source => texte
* @var array
@ -33,8 +35,21 @@ class SurveillanceController extends Zend_Controller_Action
'liens' => 'survliens',
);
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init()
{
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme
$this->theme = Zend_Registry::get('theme');
require_once 'Scores/WsScores.php';
}
@ -52,12 +67,13 @@ class SurveillanceController extends Zend_Controller_Action
$this->_helper->layout->disableLayout();
$request = $this->getRequest();
$siret = $request->getParam('siret', '');
$email = $request->getParam('email', '');
$ref = $request->getParam('ref', '');
$ref = $request->getParam('ref', '');
$source = $request->getParam('source', '');
$encours = $request->getParam('encours', 0);
$user = new Scores_Utilisateur();
// Main email
$email = $user->getEmail();
if( empty($source) ) {
@ -102,6 +118,7 @@ class SurveillanceController extends Zend_Controller_Action
$page = $request->getParam('page');
$from = $request->getParam('from');
$q = $request->getParam('q');
$siret = $request->getParam('siret', '');
$email = $request->getParam('email', '');
@ -119,9 +136,11 @@ class SurveillanceController extends Zend_Controller_Action
echo "Erreur lors de la suppression";
}
} elseif (isset($page)) {
$this->_redirect('surveillance/liste/page/'.$page);
$this->redirect('surveillance/liste/page/'.$page);
} elseif (isset($q)) {
$this->redirect('surveillance/liste/q/'.$q);
} else {
$this->_redirect('surveillance/liste');
$this->redirect('surveillance/liste');
}
}
@ -140,27 +159,53 @@ class SurveillanceController extends Zend_Controller_Action
$delete = $request->getParam('delete', false);
$encours = $request->getParam('encours', 0);
//Vérification siret / email / ref
if (empty($siret) || empty($email) | empty($ref)){
$msg = 'Erreur email ou reférence non définie !';
$validateur = new Zend_Validate_EmailAddress();
// --- Vérification siret
if ( empty($siret) ){
$msg = 'Erreur SIRET non définie !';
}
//Vérification de l'encours (chiffres)
elseif (!preg_match('/([0-9]+)/', $encours)){
$msg = 'Encours incorrect';
// --- Vérification email
elseif ( empty($email) ){
$msg = 'Erreur email non définie !';
}
// --- Vérification ref
elseif ( empty($ref) ){
$msg = 'Erreur reférence non définie !';
} else {
if (!empty($delete)){
$delete = true;
}
$ws = new WsScores();
$set = $ws->setSurveillance($siret, $email, $ref, $source, $delete, $encours);
if ($set) {
if ($delete) { $msg = "Suppression surveillance $source"; }
else { $msg = "Mise sous surveillance $source"; }
} else {
if ($delete) { $msg = "Erreur lors de la suppression de la surveillance $source"; }
else { $msg = "Erreur lors de la mise sous surveillance $source"; }
}
// --- Vérification des emails
$emails = explode(';', $email);
$emailsValid = true;
foreach ( $emails as $e ) {
if ( !$validateur->isValid($e) ) {
$emailsValid = false;
break;
}
}
if ( $emailsValid ) {
//Vérification de l'encours (chiffres)
if (!preg_match('/([0-9]+)/', $encours)){
$msg = 'Encours incorrect';
} else {
if (!empty($delete)){
$delete = true;
}
$ws = new WsScores();
$set = $ws->setSurveillance($siret, $email, $ref, $source, $delete, $encours);
if ($set) {
if ($delete) { $msg = "Suppression surveillance $source"; }
else { $msg = "Mise sous surveillance $source"; }
} else {
if ($delete) { $msg = "Erreur lors de la suppression de la surveillance $source"; }
else { $msg = "Erreur lors de la mise sous surveillance $source"; }
}
}
} else {
$msg = "Email invalide.";
}
}
$this->view->assign('msg', $msg);
}
@ -207,7 +252,7 @@ class SurveillanceController extends Zend_Controller_Action
$filtre->detail = false;
$infos = $ws->getSurveillances($filtre);
Zend_Registry::get('firebug')->info($infos);
$this->logger->info(print_r($infos,1));
if (property_exists($infos->result, 'item') && count($infos->result->item)>0) {
$titre = 'Ajouter une surveillance';
@ -265,7 +310,7 @@ class SurveillanceController extends Zend_Controller_Action
$this->view->headScript()
->appendFile('/libs/tablesorter/jquery.tablesorter.js', 'text/javascript')
->appendFile('/themes/default/scripts/surveillance.js', 'text/javascript');
->appendFile($this->theme->pathScript.'/surveillance.js', 'text/javascript');
$request = $this->getRequest();
@ -338,7 +383,7 @@ class SurveillanceController extends Zend_Controller_Action
$ws = new WsScores();
$infos = $ws->getSurveillances($filtre, $position, $nbAffichage);
$surveillances = $infos->result->item;
$surveillances = isset($infos->result->item)?$infos->result->item:null;
$listTrier = array();
if ( count($surveillances)>0 ) {
@ -380,10 +425,12 @@ class SurveillanceController extends Zend_Controller_Action
}
} else {
$pageTotal = $pageCurrent = 1;
$pagePrev = 1;
$pageNext = 1;
}
$this->view->assign('PageTotal', $pageTotal);
$this->view->assign('PagePrev', $pagePrev);
$this->view->assign('PageNext', $pageNext);
$this->view->assign('PagePrev', isset($pagePrev)?$pagePrev:1);
$this->view->assign('PageNext', isset($pageNext)?$pageNext:1);
$this->view->assign('PageCurrent', $pageCurrent);
$this->view->assign('nbReponses', empty($nbReponses) ? 0 : $nbReponses);
@ -406,9 +453,12 @@ class SurveillanceController extends Zend_Controller_Action
$this->_forward('perms', 'error');
}
$this->view->headLink()
->appendStylesheet('/libs/tablesorter/themes/blue/style.css', 'all');
$this->view->headScript()
->appendFile('/libs/tablesorter/jquery.tablesorter.js', 'text/javascript')
->appendFile('/themes/default/scripts/surveillance.js', 'text/javascript');
->appendFile($this->theme->pathScript.'/surveillance.js', 'text/javascript');
$request = $this->getRequest();
@ -459,15 +509,15 @@ class SurveillanceController extends Zend_Controller_Action
);
$couleurRisque100 = array(
'rouge' => array('min'=>0, 'max'=>40),
'orange' => array('min'=>41, 'max'=>50),
'vert' => array('min'=>51, 'max'=>100),
'rouge' => array('min' => 0, 'max' => 40),
'orange' => array('min' => 41, 'max' => 50),
'vert' => array('min' => 51, 'max' => 100),
);
$couleurRisque20 = array(
'rouge' => array('min'=>0, 'max'=>6),
'orange' => array('min'=>7, 'max'=>10),
'vert' => array('min'=>11, 'max'=>20),
'rouge' => array('min' => 0, 'max' => 6),
'orange' => array('min' => 7, 'max' => 10),
'vert' => array('min' => 11, 'max' => 20),
);
$ws = new WsScores();
@ -596,6 +646,8 @@ class SurveillanceController extends Zend_Controller_Action
}
} else {
$pageTotal = $pageCurrent = 1;
$pagePrev = 1;
$pageNext = 1;
}
$this->view->assign('PageTotal', $pageTotal);
$this->view->assign('PagePrev', $pagePrev);
@ -613,7 +665,7 @@ class SurveillanceController extends Zend_Controller_Action
*/
public function portefeuillecsvAction()
{
$this->view->headScript()->appendFile('/themes/default/scripts/portefeuillecsv.js', 'text/javascript');
$this->view->headScript()->appendFile($this->theme->pathScript.'/portefeuillecsv.js', 'text/javascript');
}
/**
@ -621,7 +673,7 @@ class SurveillanceController extends Zend_Controller_Action
*/
public function surveillancecsvAction()
{
$this->view->headScript()->appendFile('/themes/default/scripts/surveillancecsv.js', 'text/javascript');
$this->view->headScript()->appendFile($this->theme->pathScript.'/surveillancecsv.js', 'text/javascript');
$user = new Scores_Utilisateur();
@ -649,30 +701,25 @@ class SurveillanceController extends Zend_Controller_Action
*/
public function fichierAction()
{
$request = $this->getRequest();
ini_set('max_execution_time', 120);
$request = $this->getRequest();
$user = new Scores_Utilisateur();
$this->view->assign('login', $user->getLogin());
$this->view->assign('nom', $user->getNom());
$client = new SoapClient(null, array(
'trace' => 1,
'soap_version' => SOAP_1_1,
'location' => 'http://78.31.45.206/ws2/',
'uri' => 'http://78.31.45.206/',
'login' => $user->getLogin(),
'password' => $user->getPassword()
));
$client = new Scores_Ws_Client('interne', '0.6');
$nomFic = $request->getParam('nomFic', '');
$getCSV = $request->getParam('get', '');
$c = Zend_Registry::get('config');
$path = $c->profil->path->files;
$path = $c->profil->path->shared.'/files';
//Lister les fichiers
if (empty($nomFic)){
// --- Lister les fichiers
if (empty($nomFic)) {
$ref = $user->getPrenom();
if ( strtolower($user->getLogin())=='cnasea95'
|| strtolower($user->getLogin())=='cnasea96'
@ -687,21 +734,25 @@ class SurveillanceController extends Zend_Controller_Action
$ref='*';
}
try {
$O = $client->getListeFichierSurv($user->getLogin(), $ref, $nomFic);
$tabFichier = $O['results'];
$params = new stdClass();
$params->login = $user->getLogin();
$params->ref = $ref;
$params->nomFic = '';
$response = $client->getListeFichierSurv($params);
$tabFichier = $response->result->item;
} catch (SoapFault $fault) {}
$listeFichier = array();
foreach($tabFichier as $fichier){
$tabTmp = explode('_', $fichier);
$tabTmp = explode('_', $fichier->UrlFichier);
$date = new Zend_Date(substr($tabTmp[2],0,8),'yyyyMMdd');
$localfile = $path.'/'.$fichier;
$localfile = $path.'/'.basename($fichier->UrlFichier);
$dejaLu = false;
if (!file_exists($localfile)) {
$dejaLu = true;
}
$result = array(
'fichier' => $fichier,
'fichier' => basename($fichier->UrlFichier),
'date' => $date->toString('dd/MM/yyyy'),
'dejaLu' => $dejaLu,
);
@ -709,14 +760,14 @@ class SurveillanceController extends Zend_Controller_Action
}
$this->view->assign('listeFichier', $listeFichier);
}
//Lister les annonces
elseif (empty($getCSV))
{
// --- Lister les annonces
elseif (empty($getCSV)) {
$selectFiltre = array(
'procol' => array('lib'=> 'Procédures collectives', 'select'=>''),
'radiations' => array('lib'=> 'Radiations', 'select'=>''),
'ventes' => array('lib'=> 'Ventes/Cessions', 'select'=>''),
'mmd' => array('lib'=> 'Modifications diverses', 'select'=>''),
'procol' => array('lib'=> 'Procédures collectives', 'select'=>''),
'radiations' => array('lib'=> 'Radiations', 'select'=>''),
'ventes' => array('lib'=> 'Ventes/Cessions', 'select'=>''),
'mmd' => array('lib'=> 'Modifications diverses', 'select'=>''),
);
$filtre = $request->getParam('filtre', '');
@ -728,9 +779,9 @@ class SurveillanceController extends Zend_Controller_Action
$filtre = 'procol';
} elseif (strtolower($user->getLogin())=='cpcambr14') {
$selectFiltre = array(
'radiations' => array('lib'=> 'Radiations', 'select'=>''),
'ventes' => array('lib'=> 'Ventes/Cessions', 'select'=>''),
'mmd' => array('lib'=> 'Modifications diverses', 'select'=>''),
'radiations' => array('lib'=> 'Radiations', 'select'=>''),
'ventes' => array('lib'=> 'Ventes/Cessions', 'select'=>''),
'mmd' => array('lib'=> 'Modifications diverses', 'select'=>''),
);
}
@ -756,16 +807,21 @@ class SurveillanceController extends Zend_Controller_Action
if (!file_exists($file) || filesize($file)==0 ) {
//Génération du fichier
try {
$O = $client->getListeFichierSurv($user->getLogin(), $user->getPrenom(), $nomFic);
$params = new stdClass();
$params->login = $user->getLogin();
$params->ref = $ref;
$params->nomFic = $nomFic;
$response = $client->getListeFichierSurv($params);
$fileUrl = $response->result->item[0]->UrlFichier.'.bz2';
} catch (SoapFault $fault) {}
try {
$client = new Zend_Http_Client('http://78.31.45.206/csv/'.$nomFic.'.bz2');
$client = new Zend_Http_Client($fileUrl);
$client->setStream();
$response = $client->request('GET');
if ( copy($response->getStreamName(), $file.'.bz2') ) {
$bz = bzopen($file.'.bz2', "r") or die("Impossible d'ouvrir le fichier $file");
$fp=fopen($file, 'w');
$bz = bzopen($file.'.bz2', "r");
$fp = fopen($file, 'w');
while (!feof($bz)) {
fwrite($fp, bzread($bz, 4096));
}
@ -842,7 +898,10 @@ class SurveillanceController extends Zend_Controller_Action
$this->view->assign('annonces', $tab);
$this->view->assign('nomFic', $nomFic);
$this->renderScript('surveillance/fichier-ann.phtml');
} else {
}
// --- Livraison du fichier
else {
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
@ -851,17 +910,22 @@ class SurveillanceController extends Zend_Controller_Action
$file = $path.'/'.$nomFic;
if (!file_exists($file) || filesize($file)==0 ) {
//Génération du fichier
try {
$O = $client->getListeFichierSurv($user->getLogin(), $user->getPrenom(), $nomFic);
try {
$params = new stdClass();
$params->login = $user->getLogin();
$params->ref = $ref;
$params->nomFic = $nomFic;
$response = $client->getListeFichierSurv($params);
$fileUrl = $response->result->item[0]->UrlFichier.'.bz2';
} catch (SoapFault $fault) {}
try {
$client = new Zend_Http_Client('http://78.31.45.206/csv/'.$nomFic.'.bz2');
$client = new Zend_Http_Client($fileUrl);
$client->setStream();
$response = $client->request('GET');
if ( copy($response->getStreamName(), $file.'.bz2') ) {
$bz = bzopen($file.'.bz2', "r") or die("Impossible d'ouvrir le fichier $file");
$fp=fopen($file, 'w');
$bz = bzopen($file.'.bz2', "r");
$fp = fopen($file, 'w');
while (!feof($bz)) {
fwrite($fp, bzread($bz, 4096));
}
@ -901,14 +965,7 @@ class SurveillanceController extends Zend_Controller_Action
$user = new Scores_Utilisateur();
$client = new SoapClient(null, array(
'trace' => 1,
'soap_version' => SOAP_1_1,
'location' => 'http://78.31.45.206/ws2/',
'uri' => 'http://78.31.45.206/',
'login' => $user->getLogin(),
'password' => $user->getPassword()
));
$client = new Scores_Ws_Client('interne', '0.6');
$nomFic = $request->getParam('q', '');
@ -931,18 +988,23 @@ class SurveillanceController extends Zend_Controller_Action
}
}
$c = Zend_Registry::get('config');
$path = $c->profil->path->files;
$path = $c->profil->path->shared.'/files';
//Récupération du fichier
$file = $path.'/'.$nomFic;
if (!file_exists($file) || filesize($file)==0 ) {
//Génération du fichier
try {
$O = $client->getListeFichierSurv($user->getLogin(), $user->getPrenom(), $nomFic);
} catch (SoapFault $fault) {}
try {
$params = new stdClass();
$params->login = $user->getLogin();
$params->ref = $ref;
$params->nomFic = $nomFic;
$response = $client->getListeFichierSurv($params);
$fileUrl = $response->item[0]->UrlFichier;
} catch (SoapFault $fault) {}
try {
$client = new Zend_Http_Client('http://78.31.45.206/csv/'.$nomFic.'.bz2');
$client = new Zend_Http_Client($fileUrl);
$client->setStream();
$response = $client->request('GET');
if ( copy($response->getStreamName(), $file.'.bz2') ) {
@ -1085,7 +1147,7 @@ class SurveillanceController extends Zend_Controller_Action
}
$count++;
}
}else{
} else {
/*
* Fermeture de la balise page lorsqu'il n'y a aucune annonce
* afin de générer un fichier pdf vide et non pas une erreur
@ -1093,9 +1155,60 @@ class SurveillanceController extends Zend_Controller_Action
$output = '</page>';
}
// conversion HTML => PDF
require_once 'Vendors/html2pdf/html2pdf.class.php';
$html2pdf = new HTML2PDF('P','A4','fr');
$html2pdf->WriteHTML(utf8_decode($output));
$html2pdf->Output(str_replace('.csv', '.pdf', $nomFic), 'D');
}
/**
* Import surveillance en fichier csv
*/
public function surveillanceserieAction(){
//echo 'coucou';die;
$request = $this->getRequest();
if($request->getParam('ref')>""){
$cs=new Scores_Import_FileCsv();
$verif=$cs->verifandupload($_FILES,$request);
if($verif['success']){
$this->view->assign('msg', 'Nous avons enregistré votre fichier de '.$verif['message'].' lignes.<br><br>Les surveillances seront enregistrées durant la nuit.');
$this->view->assign('step', 2);
}else{
$this->view->assign('msg', $verif['message']);
$this->view->assign('step', 2);
}
return;
}
//Affichage formulaire demande ref et email
$this->_helper->layout->disableLayout();
$source = $request->getParam('source', '');
$encours = $request->getParam('encours', 0);
$this->view->pathScript=$this->theme->pathScript;
$this->view->pathStyle=$this->theme->pathStyle;
$user = new Scores_Utilisateur();
$request = $this->getRequest();
$source = $request->getParam('source');
$tabSource = array();
$user = new Scores_Utilisateur();
// Main email
$email = $user->getEmail();
$ref=$user->identity->id . 'surv'.Date('YmdHis');
foreach ($this->sourceDroit as $s => $perm) {
if ($user->checkPerm($perm)) {
$tabSource[] = array(
'value' => $s,
'name' => $this->sourceTxt[$s],
'select' => (!empty($source) && $source==$s) ? ' selected' : '',
);
}
}
$this->view->assign('tabSource', $tabSource);
$this->view->assign('email', $email);
$this->view->assign('ref', $ref);
$this->view->assign('encours', $encours);
$this->view->msg="Sélectionnez votre fichier";
}
}

View File

@ -0,0 +1,340 @@
<?php
class TelechargementController extends Zend_Controller_Action
{
/**
* Temps de mis en cache en heure
* @var interger
*/
protected $filetime = 8;
/**
* Répertoire de stockage pour le fichier
* @var string
*/
protected $path = '';
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init()
{
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$c = Zend_Registry::get('config');
$this->path = $c->profil->path->shared.'/files';
require_once 'Scores/WsScores.php';
}
/**
* Vérifie ou télécharge le fichier sur une url
* @param string $url
* URL of file to download
* @param mixed $filename
* Override filename
*/
protected function getFile($url, $filename=null)
{
if (!is_dir($this->path)) mkdir($this->path);
// --- Recuperation du nom du fichier
if ( $filename === null ) {
$tableau = explode('/', $url);
$file = $tableau[sizeof($tableau) - 1];
} else {
$file = $filename;
}
// --- Suppression du fichier si le temps de cache est depasse
if ( $this->filetime == 0 && file_exists($this->path.'/'.$file) ){
unlink($this->path.'/'.$file);
} elseif ( file_exists($this->path.'/'.$file) ) {
$dateFile = filemtime($this->path.'/'.$file);
$now = mktime(date('G'), date('i'), date('s'),
date('m') , date('d'), date('Y'));
$maxTime = mktime(date('G',$dateFile)+$this->filetime, date('i',$dateFile),
date('s',$dateFile), date('m',$dateFile),
date('d',$dateFile), date('Y',$dateFile));
if ( $maxTime - $now < 0 ) {
unlink($this->path.'/'.$file);
}
}
// --- Lock file exist
if ( file_exists($this->path.'/'.$file.'.lock') ) {
return null;
}
// --- Recuperation du fichier sur le serveur
if ( file_exists($this->path.'/'.$file) ) {
return $file;
} else {
// --- On check si le fichier est present sur l'url
try {
$client = new Zend_Http_Client($url);
$client->setStream();
$response = $client->request('GET');
if ( $response->isSuccessful() ) {
// --- Add a lock
file_put_contents($this->path.'/'.$file.'.lock', '');
if ( copy($response->getStreamName(), $this->path.'/'.$file) ) {
// --- Remove lock
unlink($this->path.'/'.$file.'.lock');
return $file;
}
// --- Remove lock
unlink($this->path.'/'.$file.'.lock');
}
return null;
} catch (Zend_Http_Client_Exception $e) {
return false;
}
}
}
/**
* Télécharge la consommation client sous forme de fichier csv et affiche le lien
*/
public function consommationAction()
{
$this->filetime = 0;
$request = $this->getRequest();
$start = $request->getParam('start', false);
//On souhaite récupérer l'url du fichier
if ( $start == 1 ) {
$mois = $request->getParam('mois');
$detail = $request->getParam('detail', 0);
$idClient = $request->getParam('idClient', 0);
$login = $request->getParam('login', '');
$all = $request->getParam('all', 0);
$date = substr($mois, 3, 4).substr($mois, 0, 2);
$user = new Scores_Utilisateur();
if (empty($login) && (!$user->isAdmin() && !$user->isSuperAdmin()) ) {
$login = $user->getLogin();
}
$ws = new WsScores();
$reponse = $ws->getLogsClients($date, $detail, $idClient, $login, $all);
if ( !empty($reponse->result->Url) ) {
echo $reponse->result->Url;
} else {
echo 'FALSE';
}
} else {
$url = $request->getParam('url', '');
$file = $this->getFile($url);
// --- En attente
if ( $file === null ) {
echo '';
}
// --- Fichier en erreur
elseif ( $file === false ) {
echo 'Erreur lors du chargement du fichier.';
}
// --- Fichier disponible
elseif ( file_exists($this->path.'/'.$file) ) {
echo '<u><a title="Télécharger le fichier"'.
' target="_blank" href="'.$this->view->url(array('module'=>'file', 'controller'=>'index',
'action'=>'consommation', 'q'=>$file), 'default', true).
'">Cliquez-ici pour télécharger le fichier.</a></u>';
}
}
}
/**
* Télécharge les surveillances sous forme de fichier csv et affiche le lien
*/
public function surveillanceAction()
{
$this->filetime = 4;
$request = $this->getRequest();
$start = $request->getParam('start', false);
// --- Get File Url
if ( $start == 1) {
$source = $request->getParam('source', '');
$user = new Scores_Utilisateur();
$login = $user->getLogin();
$idClient = $user->getIdClient();
$ws = new WsScores();
$reponse = $ws->getListeSurveillancesCsv($source, $login, $idClient);
if ( !empty($reponse->result->Url) ) {
echo $reponse->result->Url;
} else {
echo 'FALSE';
}
}
// --- Get File
else {
$url = $request->getParam('url', '');
$file = $this->getFile($url);
// --- En attente
if ( $file === null ) {
echo '';
}
// --- Fichier en erreur
elseif ( $file === false ) {
echo 'Erreur lors du chargement du fichier.';
}
// --- Fichier disponible
elseif ( file_exists($this->path.'/'.$file) ) {
echo '<u><a title="Télécharger le fichier"'.
' target="_blank" href="'.$this->view->url(array('module'=>'file', 'controller'=>'index',
'action'=>'surveillance', 'q'=>$file), 'default', true).
'">Cliquez-ici pour télécharger le fichier.</a></u>';
}
}
}
/**
* Télécharge le portefeuille sous forme de fichier csv et affiche le lien
* Enter description here ...
*/
public function portefeuilleAction()
{
$this->filetime = 4;
$request = $this->getRequest();
$start = $request->getParam('start', false);
if ($start==1) {
$user = new Scores_Utilisateur();
$login = $user->getLogin();
$idClient = $user->getIdClient();
$ws = new WsScores();
$reponse = $ws->getPortefeuilleCsv($login, $idClient);
if ( !empty($reponse->result->Url) ) {
echo $reponse->result->Url;
} else {
echo 'FALSE';
}
} else {
$url = $request->getParam('url', '');
$file = $this->getFile($url);
// --- En attente
if ( $file === null ) {
echo '';
}
// --- Fichier en erreur
elseif ( $file === false ) {
echo 'Erreur lors du chargement du fichier.';
}
// --- Fichier disponible
elseif ( file_exists($this->path.'/'.$file) ) {
echo '<u><a title="Télécharger le fichier"'.
' target="_blank" href="'.$this->view->url(array('module'=>'file', 'controller'=>'index',
'action'=>'portefeuille', 'q'=>$file), 'default', true).
'">Cliquez-ici pour télécharger le fichier.</a></u>';
}
}
}
/**
* Download pdf of bodacc history
*/
public function histopdfAction()
{
$request = $this->getRequest();
$q = $request->getParam('q', '');
$host = base64_decode($request->getParam('host', ''));
//Authenticate info
$auth = Zend_Auth::getInstance();
$identity = $auth->getIdentity();
$authinfo = '/login/'.$identity->username.'/hach/'.$identity->password;
$url = $host.$authinfo.'/q/'.$q;
$this->logger->info($url);
$file = $this->getFile($url, uniqid('histo-').'.pdf');
// --- En attente
if ( $file === null ) {
echo '';
}
// --- Fichier en erreur
elseif ( $file === false ) {
echo 'Erreur lors du chargement du fichier.';
}
// --- Fichier disponible
elseif ( file_exists($this->path.'/'.$file) ) {
if (filesize($this->path.'/'.$file) > 0) {
echo '<u><a title="Télécharger le fichier" target="_blank" href="'.$this->view->url(array('module'=>'file',
'controller'=>'bodacc', 'action'=>'histo', 'q'=>$file), 'default', true).
'">Cliquez-ici pour télécharger le fichier.</a></u>';
} else {
echo "Erreur lors du téléchargement du fichier.";
}
}
}
/**
* Download bilan pdf file
*/
public function bilanAction()
{
$this->filetime = 40;
$request = $this->getRequest();
$siren = $request->getParam('siren');
$dateCloture = $request->getParam('dateCloture');
$reference = $request->getParam('reference');
//Récupération du l'URL
require_once 'Scores/WsScores.php';
$ws = new WsScores();
$url = $ws->getPiecesBilan($siren, 'T', $dateCloture, $reference);
//Téléchargement
if( $url !== false) {
$this->logger->info($url);
$file = $this->getFile($url);
$this->logger->info('File:'.$this->path.'/'.$file);
// --- En attente
if ( $file === null ) {
echo '';
}
// --- Fichier en erreur
elseif ( $file === false ) {
echo 'Erreur lors du chargement du fichier.';
}
// --- Fichier disponible
elseif ( file_exists($this->path.'/'.$file) ) {
if (filesize($this->path.'/'.$file) > 0) {
echo '<br/><u><a title="Télécharger le fichier" target="_blank" href="'.$this->view->url(array(
'module'=>'file', 'controller'=>'greffe', 'action'=>'bilan', 'q'=>$file), 'default', true).
'">Cliquez-ici pour télécharger le fichier.</a></u>';
} else {
echo "<br/>Erreur lors du téléchargement du fichier.";
}
}
} else {
echo "<br/>Erreur.";
}
}
}

View File

@ -0,0 +1,759 @@
<?php
class UserController extends Zend_Controller_Action
{
protected $theme;
/**
* Return a ramdom password
* @param int $length
* Length of the string
* @param int $strength
* $strength = 1:- 0-9
* $strength = 2:- A-Z0-9
* $strength = 3:- A-Za-z0-9
* $strength = 4:- A-Za-z0-9 and # $ % &
* $strength = 5:- A-Za-z0-9 and # $ % & = > ? @
* @return string
*/
protected function randomPassword($length,$strength)
{
$char_sets=array('48-57','65-90','97-122','35-38','61-64');
$new_password='';
srand(microtime()*10000000);
for($i=0;$i<$length;$i++){
$random=rand(0,$strength-1);
list($start,$end)=explode('-',$char_sets[$random]);
$new_password.=chr(rand($start,$end));
}
return $new_password;
}
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init()
{
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme
$this->theme = Zend_Registry::get('theme');
require_once 'Scores/WsScores.php';
}
/**
* Affiche le fomulaire d'edition des paramètres utilisateur
*/
public function indexAction()
{
$this->view->headLink()->appendStylesheet($this->theme->pathStyle.'/user.css', 'all');
$user = new Scores_Utilisateur();
if (!$user->checkPerm('MONPROFIL')){
$this->forward('perms', 'error');
}
$this->view->assign('device_type', $user->getBrowserInfo()->mobile);
$this->view->assign('browser_info', $user->getBrowserInfo()->name.' '.$user->getBrowserInfo()->version);
$this->view->headScript()->appendFile($this->theme->pathScript.'/user.js', 'text/javascript');
$request = $this->getRequest();
$messages = '';
$isProfilUpdated = false;
$isPasswordUpdated = false;
$updateResult = false;
$login = $request->getParam('login', '');
$op = $request->getParam('op');
//Récupération des informations de l'identité
$auth = Zend_Auth::getInstance();
$identity = $auth->getIdentity();
//Save data
if ( $request->isPost() ) {
$options = $request->getParam('frmOptions', '');
$action = $options['action'];
if ($login=='') $login = $options['login'];
//Enregistrement des données new & update
if (in_array($action, array('new','update'))) {
if ( $options['changepwd'] != 1 ) {
$options['password'] = '';
}
if ( in_array($options['profil'], array('Administrateur', 'SuperAdministrateur'))
&& !in_array('monprofil', $options['droits']) ) {
$options['droits'][] = 'monprofil';
}
if( !isset($options['profil']) ) {
$options['profil'] = 'Utilisateur';
}
$ws = new WsScores();
$this->logger->info('setInfosLogin');
$this->logger->info(print_r($options,1));
$reponse = $ws->setInfosLogin($login, $action, $options);
$this->logger->info(print_r($response,1));
$isProfilUpdated = true;
$message = 'Erreur lors de la mise à jour du compte !';
if (is_string($reponse)) {
$message = $reponse;
} elseif ($reponse){
$updateResult = true;
$message = 'Compte mis à jour.';
}
}
// --- Write change in session
if ($identity->idClient == $options['idClient'] && $identity->username == $login) {
// --- Modification lors du changement de mot de passe
if ($options['changepwd']==1 && $updateResult) {
$identity->password = md5($login.'|'.$options['password']);
$auth->getStorage()->write($identity);
}
// --- Mise à jour du profil
if ($isProfilUpdated && $updateResult) {
$ws = new Scores_Ws_Client('gestion', '0.3');
$adressIp = $_SERVER['REMOTE_ADDR'];
$parameters = new stdClass();
$parameters->login = $identity->username;
$parameters->ipUtilisateur = $adressIp;
$parameters->from = null;
$InfosLogin = $ws->getInfosLogin($parameters);
$identity = $user->updateProfil($InfosLogin);
$auth->getStorage()->write($identity);
}
// --- Gestion mode edition en SESSION
if ($action=='update') {
$modeEdition = $request->getParam('modeEdition', false);
if ( $modeEdition ) {
$identity->modeEdition = true;
$auth->getStorage()->write($identity);
}
}
}
}
if ( $isProfilUpdated || $isPasswordUpdated ) {
$this->view->assign('message', $message);
}
$isAdmin = false;
if ( $identity->profil == 'Administrateur'
|| $identity->profil == 'SuperAdministrateur' ) {
$isAdmin = true;
}
$this->view->assign('isAdmin', $isAdmin);
$isSuperAdmin = false;
if ($identity->profil == 'SuperAdministrateur') {
$isSuperAdmin = true;
}
$this->view->assign('isSuperAdmin', $isSuperAdmin);
if ($op=='new')
{
$idClient = $request->getParam('idClient', '');
if ($idClient == '') {
$idClient = $identity->idClient;
}
$ws = new WsScores();
$reponse = $ws->getNextLogin($idClient);
$options->idClient = $idClient;
if ($identity->idClient!=1 && $identity->profil!='SuperAdministrateur') {
$options->profil = 'Utilisateur';
}
$this->view->assign('options', $options);
$this->view->assign('password', $this->randomPassword(10, 3));
$this->view->assign('loginNew', $reponse->result->racine);
$this->view->assign('droitsClients', explode(' ', strtolower($reponse->result->droitsClients)));
$this->view->assign('action', 'new');
$this->view->assign('pref', array());
}
elseif (!empty($op) || $op!='new')
{
if ( !empty($login) && $identity->username != $login ) {
$ws = new Scores_Ws_Client('gestion', '0.3');
$adressIp = $_SERVER['REMOTE_ADDR'];
$parameters = new stdClass();
$parameters->login = $login;
$parameters->ipUtilisateur = $adressIp;
$parameters->from = null;
try {
$reponse = $ws->getInfosLogin($parameters);
if ($reponse === false) {
$this->view->message = "Impossible d'afficher l'utilisateur.";
} else {
$this->view->assign('options', $reponse->result);
$this->view->assign('loginVu', $reponse->result->login);
$this->view->assign('droits', explode(' ', strtolower($reponse->result->droits)));
$this->view->assign('droitsClients', explode(' ', strtolower($reponse->result->droitsClients)));
}
} catch (Exception $e) {
$this->view->message = $e->getMessage();
}
} else {
$this->view->assign('options', $identity);
$this->view->assign('loginVu', $identity->username);
$this->view->assign('droits', explode(' ', strtolower($identity->droits)));
$this->view->assign('droitsClients', explode(' ', strtolower($identity->droitsClients)));
}
$this->view->assign('loginNew', '');
$this->view->assign('action', 'update');
$this->view->assign('pref', explode(' ',$identity->pref));
}
$ws = new WsScores();
//Liste des catégories des accès
$reponse = $ws->getCategory();
$wscategory = $reponse->item;
$this->view->assign('wscategory', $wscategory);
//Liste de tous les droits
$listeDroits = $ws->getListeDroits();
$droitsLib = array();
foreach($listeDroits->item as $droit) {
$droitsLib[strtoupper($droit->code)] = $droit->desc;
}
$this->view->assign('droitsLib', $droitsLib);
//Liste de toutes les préférences
$listePrefs = $ws->getListePrefs();
$prefsLib = array();
foreach($listePrefs->item as $pref) {
$prefsLib[strtoupper($pref->code)] = $pref->desc;
}
$this->view->assign('prefsLib', $prefsLib);
}
/**
* Display box to enter emails
* One main email and two secondary
* Email length 80 * 3 = 240
* 255 chars is the length to store emails (email1;email2;email3)
*/
public function emailAction()
{
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$check = $request->getParam('check');
$email = $request->getParam('q');
if ( $check == 1) {
$this->view->assign('checkemail', true);
$valid = false;
$this->view->assign('msg', 'Email invalide !');
if (null !== $email) {
$validateur = new Zend_Validate_EmailAddress();
$valid = $validateur->isValid($email);
if ( $valid ) {
$this->view->assign('msg', 'Modification effectué.');
$this->view->assign('email', $email);
}
}
} else {
$this->view->assign('email', $email);
}
}
public function emailsecondaryAction()
{
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$user = new Scores_Utilisateur();
$mode = $request->getParam('mode');
$this->view->assign('mode', $mode);
$email = $request->getParam('email');
$login = $request->getParam('login', $user->getLogin());
$this->view->assign('login', $login);
$idClient = $request->getParam('client', $user->getIdClient());
if ( $mode === null ) {
$ws = new WsScores();
$result = $ws->getGestionEmail($login);
$emails = array();
if (count($result->item)>0) {
$emails = $result->item;
}
$this->view->assign('emails', $emails);
} elseif ( $mode == 'set' ) {
$this->view->assign('msg', 'Email invalide !');
if (null !== $email) {
$validateur = new Zend_Validate_EmailAddress();
$valid = $validateur->isValid($email);
if ( $valid ) {
$ws = new WsScores();
$result = $ws->setGestionEmail($email, $login);
if ( $result ) {
$this->view->assign('msg', 'Modification effectué.');
$this->view->assign('email', $email);
}
}
}
} elseif ( $mode == 'del' ) {
$this->view->assign('msg', 'Erreur lors de la suppression !');
$id = $request->getParam('id');
$ws = new WsScores();
$result = $ws->setGestionEmail($email, $login, $id, $mode);
if ( $result ) {
$this->view->assign('msg', 'Adresse email supprimé.');
}
}
}
/**
* Téléchargement de la consommation au format CSV
*/
public function consoAction()
{
$this->view->headScript()->appendFile($this->theme->pathScript.'/conso.js', 'text/javascript');
$user = new Scores_Utilisateur();
$request = $this->getRequest();
$idClient = $request->getParam('idClient', $user->getIdClient());
$login = $request->getParam('login', '');
$this->view->assign('idClient', $idClient);
$this->view->assign('login', $login);
$this->view->assign('profil', $user->getProfil());
}
/**
* Renvoi vers le formulaire utilisateur avec les paramètres de la requete
*/
public function editAction()
{
$params = $this->getRequest()->getParams();
$this->_forward('index', 'user', null, $params);
}
/**
* Suppression d'un utilisateur
*/
public function deleteAction()
{
$request = $this->getRequest();
$login = $request->getParam('login');
$action = 'delete';
$ws = new WsScores();
$ws->setInfosLogin($login, $action);
//Redirect
$this->_forward('liste');
}
/**
* Activation d'un utilisateur
*/
public function enableAction()
{
$request = $this->getRequest();
$login = $request->getParam('login');
$action = 'enable';
$ws = new WsScores();
$ws->setInfosLogin($login, $action);
//Redirect
$this->_forward('liste');
}
/**
* Désactivation d'un utilisateur
*/
public function disableAction()
{
$request = $this->getRequest();
$login = $request->getParam('login');
$action = 'disable';
$ws = new WsScores();
$ws->setInfosLogin($login, $action);
//Redirect
$this->_forward('liste');
}
/**
* Méthode AJAX pour modifier le password d'un utilisateur
*/
public function changepwdAction()
{
//Redirect
}
/**
* Affiche la liste des utiliateurs
*/
public function listeAction()
{
$user = new Scores_Utilisateur();
$request = $this->getRequest();
$idClient = $request->getParam('idClient', $user->getIdClient());
if (!$user->isSuperAdmin() && !$user->isAdmin()) {
$this->renderScript('error/perms.phtml');
}
if ($user->isAdmin()){
$idClient = $user->getIdClient();
}
$ws = new WsScores();
$infos = $ws->getListeUtilisateurs($user->getLogin(), $idClient);
$utilisateurs = $infos->result->item;
$this->view->assign('utilisateurs', $utilisateurs);
$this->view->assign('idClient', $idClient);
}
/**
* Gestion de l'authentification
*/
public function loginAction()
{
$this->_helper->layout()->disableLayout();
$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_Auth_Adapter_Ws($login, $pass);
$result = $auth->authenticate($authAdapter);
//Auth is valid
if ( $result->isValid() ) {
//Save browser information
$screenSize = $request->getParam('screenSize', 'unknow');
$user = new Scores_Utilisateur();
$info = get_browser();
$isMobile = ($info->ismobiledevice==1) ? 1 : 0;
$user->setBrowserInfo($info->platform, $info->browser, $info->version, $isMobile, $screenSize);
//Get previous url if user has been disconnected
$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!='/user/logout' && $url!='/localauth'){
$this->redirect($url);
}
$this->redirect('/');
}
//Auth error
else {
$this->view->message = '';
$this->logger->info(print_r($result));
foreach ($result->getMessages() as $message) {
$this->view->message.= $message."<br/>";
}
}
}
}
// Pas de validation du formulaire
else {
$this->logger->info('DISPLAY');
}
}
/**
* Gestion de la déconnexion
*/
public function logoutAction()
{
Zend_Auth::getInstance()->clearIdentity();
$session = new Zend_Session_Namespace('wcheck');
$session->unsetAll();
$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'].$this->view->url(array(
'controller' => 'user',
'action' => 'login',
), 'default', true);
$this->view->assign('url', $url);
if ( $ajax == 0 ) {
$this->view->assign('refresh', $refresh);
$this->view->headMeta()->appendHttpEquiv('refresh', $refresh.'; url='.$url);
}
}
/**
* Erreur pour les connexions en ipOnly
*/
public function iponlyAction()
{
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$message = $request->getParam('message');
$this->view->assign('message', $message);
}
/**
* Mettre à jour le mode edition en session sans refresh de la page
*/
public function editionsessionAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$request = $this->getRequest();
$mode = $request->getParam('mode', 'false');
$auth = Zend_Auth::getInstance();
$identity = $auth->getIdentity();
if ($identity->idClient == 1) {
if ($mode == 'false') {
$identity->modeEdition = false;
echo 0;
} else {
$identity->modeEdition = true;
echo 1;
}
$auth->getStorage()->write($identity);
} else {
echo 0;
}
}
/**
* Override email in surveillance portfolio
*/
public function emailsurveillanceAction()
{
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$user = new Scores_Utilisateur();
//Execute webservice operation
if ( $request->isPost() ) {
$email = trim($request->getParam('email'));
if ($user->isAdmin() || $user->isSuperAdmin()) {
$login = $request->getParam('login');
}
if (empty($email)) {
$result = "Aucun email défini!";
} else if (empty($login)) {
$result = "Aucun utilisateur défini!";
} else {
$ws = new WsScores();
$result = $ws->setSurveillancesMail($login, $email);
}
$this->view->assign('result', $result);
}
//Display form in dialog
else {
if ($user->isAdmin() || $user->isSuperAdmin()) {
$login = $request->getParam('login');
} else {
$login = $user->getLogin();
}
$this->view->assign('login', $login);
$this->view->assign('dialog',true);
}
}
/**
* 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);
}
/**
* Changer le theme de l'utilisateur
*/
public function changethemeAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$request = $this->getRequest();
$nom = $request->getParam('nom', 'default');
$auth = Zend_Auth::getInstance();
$identity = $auth->getIdentity();
$identity->theme = $nom;
$auth->getStorage()->write($identity);
//Rediriger vers l'écran de recherche
$this->_redirect('/');
}
/**
* Display browser informations on a simple page
*/
public function browserAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
//Load bootstrap
$bootstrap = Zend_Controller_Front::getInstance()->getParam('bootstrap');
//Get useragent and device informations
$userAgent = $bootstrap->getResource('useragent');
$device = $userAgent->getDevice();
//Display
echo "<pre>";
print_r(get_browser());
print_r($device->getAllFeatures());
echo "</pre>";
}
/**
* Sends email to the specific client, who requests for forgotten password
*/
public function motpasseAction()
{
$request = $this->getRequest();
$name = 'Identifiants oubliés ?';
$params = array(
'identifiant' => '',
'telephone' => '',
'email' => '',
'nom' => '',
'prenom' => '',
'fonction' => '',
'service' => '',
'rsociale' => '',
);
$this->_helper->layout()->disableLayout();
if ( $request->isPost() ) {
$params = $request->getParams();
$message = '';
$paramlist = array(
'telephone' => 'Numéro de téléphone direct',
'email' => 'Adresse email',
'nom' => 'Nom',
'prenom' => 'Prénom',
'fonction' => 'Fonction',
'service' => 'Service',
'rsociale' => 'Sociale',
);
foreach ($paramlist as $item => $val) {
if (!isset($params[$item])) {
$message .= "Champs $val vide !<br/>";
}
}
$validator = new Zend_Validate_EmailAddress();
if (isset($params['email'])){
if (!$validator->isValid($params['email'])) {
$message .="Adresse email invalide ! <br/>";
}
}
if ($message == '') {
$mailbody = '<style type="text/css">table {font-family:Arial, Helvetica, sans-serif; font-size: 12px; width: 550px; border: none;}table td{padding: 4px 8px;}</style>';
$mailbody .= "Demande d'envoi des identifiants.<br /><br />";
$mailbody .= "L'un de nos clients a égaré son(ses) identifiant(s).<br />";
$mailbody .= "Via notre lien -identifiants oubliés- il a effectué une demande de transmission de ces codes.<br />";
$mailbody .= "<p>A l'aide des informations ci-dessous, merci de retrouver ces codes et les lui envoyer par email.</p>";
$mailbody .= "<table><tr bgcolor='#eeeeee'><td width='200px'><strong>Identifiant :</strong></td><td>".$params['identifiant']."</td></tr>";
$mailbody .= "<tr><td><strong>Adresse email:</strong></td><td>".$params['email']."</td></tr>";
$mailbody .= "<tr bgcolor='#eeeeee'><td><strong>Numéro de téléphone direct:</strong></td><td>".$params['telephone']."</td></tr>";
$mailbody .= "<tr><td><strong>Nom:</strong></td><td>".$params['nom']."</td></tr>";
$mailbody .= "<tr bgcolor='#eeeeee'><td><strong>Prénom:</strong></td><td>".$params['prenom']."</td></tr>";
$mailbody .= "<tr><td><strong>Fonction:</strong></td><td>".$params['fonction']."</td></tr>";
$mailbody .= "<tr bgcolor='#eeeeee'><td><strong>Service:</strong></td><td>".$params['service']."</td></tr>";
$mailbody .= "<tr><td><strong>Dénomination Sociale:</strong></td><td>".$params['rsociale']."</td></tr></table>";
$mailbody .= "<p>Si les informations fournies ne permettent pas d'identifier correctement l'utilisateur, ";
$mailbody .= "merci d'émettre un message sur le mail communiquer en précisant que \"Les éléments confiés ne permettent pas d'identifier l'utilisateur ";
$mailbody .= "et par conséquence de vous délivrer les codes d'accès demandés\".<br />";
$mailbody .= "Aussi nous vous invitons à vous rapprocher de votre interlocuteur commercial habituel ";
$mailbody .= "ou de votre responsable suivi relations Scores & Décisions au sein de votre société.</p>";
$mail = new Scores_Mail_Method();
$mail->setSubject("Demande d'envoi des identifiants");
$mail->setBodyHtmlC($mailbody);
$mail->setFromKey('supportdev');
$mail->addToKey('support');
$mail->setReplyTo($params['email']);
try {
$mail->execute();
$this->view->assign('sendEmail' , true);
}
catch ( Zend_Mail_Transport_Exception $e ){
$message = $e->getMessage();
}
}
$this->view->assign('message', $message);
}
}
}

View File

@ -1,13 +1,27 @@
<?php
class WorldcheckController extends Zend_Controller_Action
{
protected $wcConfig;
protected $theme;
protected $wcConfig;
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init()
{
require_once 'WorldCheck/WsWorldCheck.php';
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme
$this->theme = Zend_Registry::get('theme');
require_once 'WorldCheck/WsWorldCheck.php';
require_once 'Scores/Cache.php';
$configWC = new Zend_Config_Ini(APPLICATION_PATH . '/../library/WorldCheck/applicationWC.ini');
$this->wcConfig = $configWC->worldcheck->toArray();
}
@ -23,7 +37,7 @@ class WorldcheckController extends Zend_Controller_Action
$param->dirNom = ($dirNom)?$dirNom:$request->getParam('dirSociete');
$param->dirPrenom = $request->getParam('dirPrenom');
$param->dirType = $request->getParam('dirType');
$entityId = $request->getParam('entityId', null);
$user = new Scores_Utilisateur();
@ -35,7 +49,7 @@ class WorldcheckController extends Zend_Controller_Action
$localDBParams = $wcLocal->getScreenerId($param);
$param->matchCount = $localDBParams->matchCount;
$param->nameIdentifier = $localDBParams->nameIdentifier;
if ($entityId===null) {
//$this->_redirect('/worldcheck/list');
$params = array(
@ -45,7 +59,7 @@ class WorldcheckController extends Zend_Controller_Action
$this->forward('list', null, null, $params);
} else {
$id = $request->getParam('id', null);
$data = new stdClass();
$data->nameIdentifier = $param->nameIdentifier;
$data->matchType = 'WATCHLIST';
@ -54,14 +68,14 @@ class WorldcheckController extends Zend_Controller_Action
$paramAssoc = new stdClass();
$paramAssoc->matchIdentifier = $matchArr[$entityId];
$paramAssoc->nameType = $param->dirType;
$nodeParam = $wc->getAssociates($paramAssoc);
$wcLocal->setTree($nodeParam);
$this->redirect('/worldcheck/orgchildren/entityid/'.$entityId.'/id/'.$id);
}
}
/**
* List results of WorldCheck search
*/
@ -71,7 +85,7 @@ class WorldcheckController extends Zend_Controller_Action
$wc = new WsWorldCheck();
$param = new stdClass();
$nameIdentifier = $request->getParam('nameIdentifier');
$matchCount = $request->getParam('matchCount');
$dirNom = $request->getParam('dirNom');
@ -160,7 +174,7 @@ class WorldcheckController extends Zend_Controller_Action
if ($request->getParam('dirNom')) $data->Nom = $request->getParam('dirNom');
if ($request->getParam('dirPrenom')) $data->Prenom = $request->getParam('dirPrenom');
if ($request->getParam('dirSociete')) $data->Societe = $request->getParam('dirSociete');
$data->Soc = new stdClass();
if ($request->getParam('dirSocNom2')) $data->Soc->Nom2 = $request->getParam('dirSocNom2');
if ($request->getParam('dirSocNomLong')) $data->Soc->NomLong = $request->getParam('dirSocNomLong');
@ -192,7 +206,7 @@ class WorldcheckController extends Zend_Controller_Action
$db = new Application_Model_Worldcheck();
$db->setTree($nodeParam);
$cache = new Cache();
$content = $cache->wcCache($this->wcConfig['cachedir'], $wc, "getDetailsContent", $param, $param->matchIdentifier);
@ -200,7 +214,7 @@ class WorldcheckController extends Zend_Controller_Action
$this->view->assign('nameType', $param->nameType);
$this->view->assign('exportObjet', $content[0]);
}
/**
* le Parent de l'organigramme des associés
*/
@ -211,7 +225,7 @@ class WorldcheckController extends Zend_Controller_Action
$request = $this->getRequest();
$entityId = $request->getParam('entityid', null);
$wcLocal = new Application_Model_Worldcheck();
$currentBranch = $wcLocal->getTree($entityId);
@ -222,14 +236,14 @@ class WorldcheckController extends Zend_Controller_Action
$data = new stdClass();
$data->title = $primary['fullName'];
$data->icon = "/themes/default/images/worldcheck/".strtolower($primary['nameType']).".png";
$attr = new stdClass();
$attr->id = uniqid('wc_');
$attr->entityId = $primary['entityId'];
$attr->nameType = $primary['nameType'];
$attr->lastName = $primary['lastName'];
$attr->givenName = $primary['givenName'];
$parent[] = array(
"data" => $data,
"attr" => $attr,
@ -252,7 +266,7 @@ class WorldcheckController extends Zend_Controller_Action
$request = $this->getRequest();
$entityId = $request->getParam('entityid', null);
$id = $request->getParam('id', null);
$wcLocal = new Application_Model_Worldcheck();
$currentBranch = $wcLocal->getTree($entityId);
@ -261,18 +275,18 @@ class WorldcheckController extends Zend_Controller_Action
$children = array();
foreach ($associates as $associate) {
$data = new stdClass();
$data->title = $associate['fullName'];
$data->icon = "/themes/default/images/worldcheck/".strtolower($associate['nameType']).".png";
$attr = new stdClass();
$attr->id = uniqid('wc_');
$attr->entityId = $associate['entityId'];
$attr->nameType = $associate['nameType'];
$attr->lastName = $associate['lastName'];
$attr->givenName = $associate['givenName'];
$children[] = array(
"data" => $data,
"attr" => $attr,
@ -284,7 +298,7 @@ class WorldcheckController extends Zend_Controller_Action
$jData = json_encode($children);
$this->view->assign('data', $jData);
}
/**
* Affichage de l'information courte de chaque node dans le popup
*/

View File

@ -11,7 +11,7 @@ p { margin:10px 0;}
div#content { float:none; width:auto;}
</style>
<script>
$(document).ready(function(){
$(function(){
$('input[type=checkbox][name=accept]').click(function(e){
$('form[name=cgu]').css('display', 'none');
$('#msgsave').css('display', 'block');

View File

@ -2,16 +2,17 @@
<div style="position:absolute;width:680px;top:5px;" class="ui-state-highlight ui-corner-all">
<p>
<span style="float:left;margin-right:0.3em;" class="ui-icon ui-icon-info"></span>
<strong>Nouveau !</strong>
<strong>Nouveau !</strong>
<?php $cpt = 0;?>
<?php foreach ( $this->nouveautes as $nouveaute) {?>
<a href="<?=$this->url(array('controller'=>'fichier', 'action'=>'new', 'fichier'=>$nouveaute->fichier))?>" target="_blank">
<a href="<?=$this->url(array('module'=>'file','controller'=>'index', 'action'=>'new',
'q'=>$nouveaute->fichier))?>" target="_blank">
<?=$nouveaute->intitule?></a>
<?php $cpt++;?>
<?php if ( $cpt < count($this->nouveautes) ) {?>,<?php }?>
<?php }?>
<br/>
<span style="font-size:10px;">Cliquez sur les intitulés pour consulter le document,
<span style="font-size:10px;">Cliquez sur les intitulés pour consulter le document,
ou <a href="<?=$this->url(array('controller'=>'aide', 'action'=>'newliste'))?>">ici</a> pour retrouver la liste des modifications</span>
</p>
</div>

View File

@ -0,0 +1,42 @@
<style>
table { width:100%; }
table th { border:1px solid; font-weight:bold; padding:5px; }
table tr { }
table td { border:1px solid; padding:5px; }
</style>
<div id="center">
<h1>Nouveautés</h1>
<div class="paragraph">
<!-- Tri par date - Tri par catégorie -->
</div>
<h2>Liste par date</h2>
<div class="paragraph">
<table>
<thead>
<tr>
<th>Date</th>
<th>Intitulé</th>
<th>Catégorie</th>
</tr>
</thead>
<tbody>
<?php if ( count($this->nouveautes)>0 ){?>
<?php foreach ( $this->nouveautes as $nouveau) {?>
<tr>
<td><?=substr($nouveau->date,8,2).'/'.substr($nouveau->date,5,2).'/'.substr($nouveau->date,0,4)?></td>
<td>
<a href="<?=$this->url(array('module'=>'file', 'controller'=>'index', 'action'=>'new',
'q'=>$nouveau->fichier))?>" target="_blank">
<?=$nouveau->intitule?></a>
</td>
<td><?=$nouveau->categorie?></td>
</tr>
<?php }?>
<?php }?>
</tbody>
</table>
</div>
</div>

View File

@ -0,0 +1,96 @@
<?php echo $this->doctype(); ?>
<html>
<head>
<?php echo $this->headMeta(); ?>
<?php echo $this->headTitle(); ?>
<?php echo $this->headStyle(); ?>
<?php echo $this->headLink(); ?>
<?php echo $this->headScript(); ?>
</head>
<body>
<div id="wrap">
<div class="container">
<div class="row">
<div class="col-md-6">
<h1 class="text-center">Scores & Decisions</h1>
<br/>
<p>
Scores & Decisions est l'éditeur d'une base de données de référence sur toutes les entreprises de France.
Scores & Decisions est licencié officiel depuis 2008 pour la rediffusion du répertoire Sirène (INSEE), du RNCS
Registre National du Commerce et des Sociétés (INPI) et des Journaux Officiels (DILA). Scores & Decisions est
un service privé distinct des services publics cités.
</p>
<br/>
<div class="panel panel-default">
<div class="panel-body">
<p class="text-primary">Spécialiste de l'information légales et financières sur les entreprises, Scores & Décisions vous permet par
confirmation des éléments ci-contre d'accéder à toute sa base de données.</p>
<ul class="list-group">
<li class="list-group-item">
Télécharger nos Conditions Générales de Services
<a href="<?=$this->baseUrl()?>/documents/inextenso_cgs.pdf" target="_blank">
<span class="glyphicon glyphicon-file pull-right" aria-hidden="true"></span></a>
</li>
<li class="list-group-item">
Télécharger nos Conditions Tarifaires
<a href="#" target="_blank">
<span class="glyphicon glyphicon-file pull-right" aria-hidden="true"></span></a>
</li>
<li class="list-group-item">
Télécharger les coordonnées de vos contacts
<a href="<?=$this->baseUrl()?>/documents/inextenso_contacts.pdf" target="_blank">
<span class="glyphicon glyphicon-file pull-right" aria-hidden="true"></span></a>
</li>
</ul>
</div>
</div>
</div>
<div class="col-md-6">
<h2>Trouvez les réponses à vos questions !</h2>
<ul class="arguments">
<li><strong>Disposez de certitudes sur l'identité de vos interlocuteurs, les liens financiers et les liens
dirigeants... ></strong> Mon client a t il une existence légale ? Quels sont les derniers événements qui ont touché l'entreprise ?</li>
<li><strong>Évitez les mauvais payeurs ></strong>
Ce prospect paye t'il rapidement, est-il en procédure collective ? Quel est sa rentabilité, son niveau de
trésorerie ?</li>
<li><strong>Surveillez la solvabilité de vos partenaires, clients et fournisseurs ou concurrents ></strong>
Mes clients sont ils viables dans la durée, puis je continuer et développer les ventes ?</li>
<li><strong>Découvrez la valeur de votre entreprises ou celles de vos concurrents ></strong> Mon entreprise a t elle de la
valeur ? combien me coûterait le rachat d'un concurrent ?</li>
<li><strong>Trouvez vos futurs clients ></strong> Où sont et qui sont mes prospects ?</li>
</ul>
<p>Les données agrégées sont officielles, exhaustives, fraîches et opposables aux tiers. Elles sont utilisées
par des grands groupes et institutionnels dans des cadres contentieux, de conformité, de fraude...</p>
<?php if ($this->FormUrlParams) {?>
<a type="button" class="btn btn-success btn-lg" href="<?=$this->url($this->FormUrlParams, 'default', true)?>">Accédez au site</a>
<?php }?>
</div>
</div>
</div>
</div>
<?php echo $this->inlineScript(); ?>
</body>
</html>

View File

@ -0,0 +1,58 @@
<?php echo $this->doctype(); ?>
<html>
<head>
<?php echo $this->headMeta(); ?>
<?php echo $this->headTitle(); ?>
<?php echo $this->headStyle(); ?>
<?php echo $this->headLink(); ?>
<?php echo $this->headScript(); ?>
</head>
<body>
<div id="wrap">
<div class="container">
<div class="row">
<div class="col-md-6"><img src="/themes/default/images/partner/<?=$this->logo?>"/></div>
<div class="col-md-6">
<h2 class="form-signin-heading">Extranet <small>Scores & Décisions</small></h2>
<?php
//Error
if ($this->Error) {?>
<div style="text-align:center;"><p class="text-danger"><span>Une erreur est survenue</span></p></div>
<?php
}
//Message
else if ($this->Message) {?>
<div style="text-align:center;"><p class="text-danger"><span><?=$this->Message?></span></p></div>
<?php
}
//OK
else if ($this->UserCreated) {?>
<div>
<p class="text-success">
<span>Votre compte a été crée avec succès.</span>
<a href="<?=$this->url(array_merge(array('controller'=> 'auth', 'action' => 'index'), $this->UrlArgs))?>">
Cliquez ici pour être redirigé vers la page d'accueil.</a>
</p>
</div>
<?php }?>
</div>
</div>
</div>
</div>
<div id="footer">
<div class="container">
<p class="text-muted credit"> &copy; <?=date('Y')?> <a href="http://www.scores-decisions.com">Scores & Décisions SAS</a>.</p>
</div>
</div>
<?php echo $this->inlineScript(); ?>
</body>
</html>

View File

@ -0,0 +1,126 @@
<?php echo $this->doctype(); ?>
<html>
<head>
<?php echo $this->headMeta(); ?>
<?php echo $this->headTitle(); ?>
<?php echo $this->headStyle(); ?>
<?php echo $this->headLink(); ?>
<?php echo $this->headScript(); ?>
</head>
<body>
<div id="wrap">
<div class="container">
<div class="row">
<div class="col-md-6">
<p><img src="/themes/default/images/partner/<?=$this->logo?>"/></p>
<div class="panel panel-default">
<div class="panel-body">
<p class="text-primary">Spécialiste de l'information légales et financières sur les entreprises, Scores & Décisions vous permet par
confirmation des éléments ci-contre d'accéder à toute sa base de données.</p>
<ul class="list-group">
<li class="list-group-item">
Télécharger nos Conditions Générales de Services
<a href="<?=$this->baseUrl()?>/documents/inextenso_cgs.pdf" target="_blank">
<span class="glyphicon glyphicon-file pull-right" aria-hidden="true"></span></a>
</li>
<li class="list-group-item">
Télécharger nos Conditions Tarifaires
<a href="#" target="_blank">
<span class="glyphicon glyphicon-file pull-right" aria-hidden="true"></span></a>
</li>
<li class="list-group-item">
Télécharger les coordonnées de vos contacts
<a href="<?=$this->baseUrl()?>/documents/inextenso_contacts.pdf" target="_blank">
<span class="glyphicon glyphicon-file pull-right" aria-hidden="true"></span></a>
</li>
</ul>
</div>
</div>
</div>
<div class="col-md-6">
<form method="post" action="<?=$this->url(array('controller'=>'auth', 'action'=>'userssocreate'), 'default', true)?>">
<h2 class="form-signin-heading">Extranet <small>Scores &amp; Décisions</small></h2>
<?php
//Error
if ($this->Error) {?>
<div style="text-align:center;"><p class="text-danger"><span>Une erreur est survenue</span></p></div>
<?php
}
//Message
else if ($this->Message) {?>
<div style="text-align:center;"><p class="text-danger"><span><?=$this->Message?></span></p></div>
<?php
}
//NoUser
else if ($this->NoUser) {?>
<div><p class="text-warning"><span>
Votre compte n'existe pas encore. Compléter le formulaire puis valider pour créer votre compte.
</span></p>
</div>
<?php foreach ($this->Params as $item) {?>
<input type="hidden" name="P-<?=$item->label?>" value="<?=$item->value?>"/>
<?php }?>
<input type="hidden" name="partner" value="<?=$this->FormPartner?>"/>
<div class="form-group">
<label for="identifiant">Identifiant</label>
<input type="text" id="identifiant" value="<?=$this->FormIdentifiant?>" class="form-control" disabled>
<input type="hidden" name="login" value="<?=$this->FormIdentifiant?>">
</div>
<div class="form-group">
<label for="email">Email</label>
<input type="text" class="form-control" value="<?=$this->FormCourriel?>" disabled>
<input type="hidden" name="email" value="<?=$this->FormCourriel?>">
</div>
<div class="form-group">
<label for="siret">SIRET</label>
<input type="text" class="form-control" name="siret" value="<?=$this->FormSiret?>">
</div>
<div class="form-group">
<label for="nom">Nom</label>
<input type="text" class="form-control" name="nom" value="<?=$this->FormNom?>">
</div>
<div class="form-group">
<label for="prenom">Prénom</label>
<input type="text" class="form-control" name="prenom" value="<?=$this->FormPrenom?>">
</div>
<div class="form-group">
<label for="tel">Téléphone</label>
<input type="text" class="form-control" name="tel" value="<?=$this->FormTel?>">
</div>
<button class="btn btn-lg btn-primary btn-block clearfix" type="submit">Valider</button>
<?php }?>
</form>
</div>
</div>
</div>
</div>
<div id="footer">
<div class="container">
<p class="text-muted credit"> &copy; <?=date('Y')?> <a href="http://www.scores-decisions.com">Scores & Décisions SAS</a>.</p>
</div>
</div>
<?php echo $this->inlineScript(); ?>
</body>
</html>

View File

@ -0,0 +1,190 @@
<style>
#identifiant {
float:left;
width:40%;
}
#modules {
float:left;
width:40%;
}
#listeModules {
position:absolute;
width:500px;
display:none;
background-color:#FBF7AA;
border:1px solid #000000;
z-index:3;
}
#closelisteModules {
float:right;
padding:0.4em 1em;
}
#listeModules ul {
width:100%;
margin-left:-10px;
list-style-type:none;
}
#listeModules ul li {
display:inline;
float:left;
width:50%;
}
</style>
<div id="center">
<h1>Banque de France - Modules</h1>
<h2>Recherche FIBEN / FCC identifiant unique</h2>
<div class="paragraph">
<form name="rFibenU" method="post" action="<?=$this->url(array('controller'=>'bdf', 'action'=>'module'))?>">
<input type="hidden" name="type" value="u"/>
<input type="hidden" name="siret" value="<?=$this->siret?>"/>
<div id="identifiant">
<label>Identifiant</label> <input type="text" name="req" value="<?=$this->req?>"/>
<br/><span>SIREN ou clé BDF</span>
</div>
<div id="modules" class="clearfix">
<a href='#' id="listeModulesD">Liste des modules</a>
<span id="selected">
<?php if ($this->module && is_array($this->module)){ ?>
<?php
foreach ($this->listModulesFiben as $id => $module) {
if (isset($module['liste']) == false || $module['liste'] !== false) {
if (in_array($id, $this->module))
{
echo '<br/>'.$module['titre'];
}
}
}
foreach ($this->listModulesFcc as $id => $module) {
if (isset($module['liste']) == false || $module['liste'] !== false) {
if (in_array($id, $this->module))
{
echo '<br/>'.$module['titre'];
}
}
}
?>
<?php } ?>
</span>
</div>
<div id="listeModules">
<a href="#" id="closelisteModules">Fermer</a>
<ul>
<?php
foreach ($this->listModulesFiben as $id => $module) {
if (isset($module['liste']) == false || $module['liste'] !== false) {
$checked = '';
if (isset($this->module) && is_array($this->module) && in_array($id, $this->module))
{
$checked = 'checked';
}
?>
<li>
<input type="checkbox" name="bdfmodule[]" value="<?=$id?>" <?=$checked?>/>
<?=$module['titre']?>
</li>
<?php
}
}
foreach ($this->listModulesFcc as $id => $module) {
if (isset($module['liste']) == false || $module['liste'] !== false) {
$checked = '';
if (isset($this->module) && is_array($this->module) && in_array($id, $this->module))
{
$checked = 'checked';
}
?>
<li>
<input type="checkbox" name="module[]" value="<?=$id?>" <?=$checked?>/>
<?=$module['titre']?>
</li>
<?php
}
}
?>
</ul>
<br/>
</div>
<input class="button" type="submit" name="rFiben" value="Afficher"/>
</form>
</div>
<br/>
<h2>Recherche FIBEN / FCC identifiants multiples</h2>
<div class="paragraph">
<form name="rFibenM" method="post" action="<?=$this->url(array('controller'=>'bdf', 'action'=>'module'))?>">
<input type="hidden" name="type" value="m"/>
<input type="hidden" name="siret" value="<?=$siret?>"/>
<div id="identifiant">
<label>Identifiant</label>
<input type="text" name="identifiant[]" value="<?=$req?>" />
<a href="#" id="addIdentifiant">Ajouter</a>
</div>
<div id="modules" class="clearfix">
<label>Module</label>
<select name="bdfmodule">
<?php
foreach ($this->listModulesFiben as $id => $module) {
if (isset($module['liste']) == false || $module['liste'] !== false) {
echo '<option value="'.$id.'">'.$module['titre'].'</option>';
}
}
foreach ($this->listModulesFcc as $id => $module) {
if (isset($module['liste']) == false || $module['liste'] !== false) {
echo '<option value="'.$id.'">'.$module['titre'].'</option>';
}
}
?>
</select>
</div>
<input class="button" type="submit" name="rFiben" value="Afficher"/>
</form>
</div>
<br/>
<h2>Recherche FICP</h2>
<div class="paragraph">
<form name="rFicp" method="post" action="<?=$this->url(array('controller'=>'bdf', 'action'=>'module'))?>">
<input type="hidden" name="bdfmodule" value="G"/>
<input type="hidden" name="service" value="ficp"/>
<label>Clé BDF</label>
<input type="text" name="req"/>
<input class="button" type="submit" name="rFicp" value="Ok"/>
</form>
</div>
</div>
<script>
$(function(){
$('#listeModulesD').click(function(){
var position = $(this).position();
$('#listeModules').css('top', position.top);
$('#listeModules').css('left', position.left-200);
var display = $('#listeModules').css('display');
if(display=='none') $('#listeModules').css('display', 'block');
else $('#listeModules').css('display', 'none');
});
$('#closelisteModules').click(function(){
$('#listeModules').css('display', 'none');
$('#modules > #selected').html('');
$('input[name="module[]"]').each(function(){
if ($(this).prop('checked')){
$('#modules > #selected').append('<br/>'+$(this).parent().text());
}
});
});
$('#addIdentifiant').click(function(){
$('form[name=rFibenM] > #identifiant').append('<br/><label>Identifiant</label> <input type="text" name="identifiant[]" />');
});
});
</script>

View File

@ -7,7 +7,7 @@ fieldset legend { font-weight:bold; font-size: 108%; padding:0; }
div.submit { clear: both; text-align: center; }
</style>
<script type="text/javascript">
$(document).ready(function(){
$(function(){
$('.menu-close').click(function(){
$('div.blockh2').css('display','none');
@ -469,7 +469,7 @@ if (!empty($text_ip)){
</div>
<div class="fieldgrp">
<label>Nombre d'investigations inclues dans le forfait client</label>
<label>Nombre d'investigations incluses dans le forfait client</label>
<div class="field">
<input type="text" name="forfaitInvestigNb" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->forfaitInvestigNb : '';?>" />
</div>

View File

@ -16,23 +16,22 @@ Fichier PDF : <input type="file" name="fichier" />
<input type="submit" name="upload" value="Valider" />
</form>
<div id="uploadOutput"></div>
<script type="text/javascript" src="/libs/form/jquery.form.js">
</script>
<script type="text/javascript" src="/libs/form/jquery.form.min.js"/>
<script>
var timer;
function checkProgress() {
$.getJSON('<?=$this->url(array('controller'=>'dashboard', 'action'=>'newprogress'))?>',
{key: $('#key').val()}, function(data) {
$.getJSON('<?=$this->url(array('controller'=>'dashboard', 'action'=>'newprogress'))?>',
{key: $('#key').val()}, function(data) {
$('#uploadOutput').html(data.current+'/'+data.total);
});
}
$(document).ready(function() {
$(function() {
$('#uploadForm').ajaxForm({
beforeSubmit: function() {
$('#uploadOutput').html('Envoi en cours...');
timer = setInterval(checkProgress,500);
timer = setInterval(checkProgress,500);
},
success: function(data) {
clearInterval(timer);

View File

@ -1,5 +1,5 @@
<script>
$(document).ready(function(){
$(function(){
$('a.user-service').click(function(e){
e.preventDefault();

View File

@ -36,17 +36,13 @@
<td class="StyleInfoData" width="270"><?=$dir->Titre?></td>
<td class="StyleInfoData" width="200"><?=$dir->Societe.' '.$dir->Nom.' '.$dir->Prenom?></td>
<td class="StyleInfoData" width="200">
<?php if ($dir->DateFct != '') { ?>
<?=$this->translate("Modification le")?>
<?php
if (strpos($dir->DateFct, '/') != false) {
echo $dir->DateFct.' ';
} else {
$date = new Zend_Date($dir->DateFct,'yyyy-MM-dd');
echo $date->toString('dd/MM/yyyy');
}
}
?>
<?php
if ($dir->DateFct != '0000-00-00') {
$date = new Zend_Date($dir->DateFct,'yyyy-MM-dd'); ?>
<?php if ( Zend_Date::isDate($date) ) { ?>
<?=$this->translate("Modification le") . ' ' . $date->toString('dd/MM/yyyy');?>
<?php }?>
<?php }?>
</td>
</tr>
<?php }?>

View File

@ -0,0 +1,177 @@
<?php if (empty($this->AutrePage)) {?>
<div id="center">
<?php }?>
<?php if (empty($this->AutrePage)){?>
<h1><?=$this->translate("DIRIGEANTS")?></h1>
<div class="paragraph">
<table class="identite">
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib"><?=$this->translate("Num&eacute;ro identifiant Siren")?></td>
<td width="350" class="StyleInfoData"><?=$this->SirenTexte($this->siren)?></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib"><?=$this->translate("Dénomination Sociale")?></td>
<td width="350" class="StyleInfoData"><?=$this->raisonSociale?></td>
</tr>
<?php if ($this->surveillance) {?>
<tr>
<td width="30">&nbsp;</td>
<td colspan="2" width="550" class="StyleInfoData">
<?=$this->action('infos','surveillance', null, array(
'source' => 'dirigeants',
'siret' => $this->siret
))?>
</td>
</tr>
<?php }?>
<?php if( $this->dirigeantsop ){ ?>
<tr>
<td width="30">&nbsp;</td>
<td colspan="2" width="550" class="StyleInfoData">
<a href="<?=$this->dirigeantsop?>"><?=$this->translate("Consulter la liste des dirigeants opérationnels")?></a>
</td>
</tr>
<?php } ?>
</table>
</div>
<?php }?>
<h2><?=$this->translate("Liste des dirigeants actifs")?></h2>
<div class="paragraph">
<?php if ( count($this->dirigeants)>0 ) { ?>
<table class="data">
<?php foreach ($this->dirigeants as $dir) {?>
<tr>
<td class="StyleInfoData" width="200"><?=$dir->Titre?></td>
<td class="StyleInfoData" width="320">
<?php if ($dir->Societe != '') { ?>
<a href="<?=$this->url(array('controller' => 'recherche', 'action' => 'liste', 'type' => 'ent','raisonSociale' => $dir->Societe), 'default', true)?>"
title="<?=$this->translate("Recherche à partir de la dénomination sociale")?>">
<?=$dir->Societe?>
</a>
<br/>
<?php }?>
<?php if ($dir->Nom != '') { ?>
<a href="<?=$this->url(array(
'controller' => 'recherche',
'action' => 'liste',
'type' => 'dir',
'dirNom' => $dir->Nom,
'dirPrenom' => $dir->Prenom,
'dirDateNaissJJ' => substr($dir->NaissDate,0,2),
'dirDateNaissMM' => substr($dir->NaissDate,3,2),
'dirDateNaissAAAA' => substr($dir->NaissDate,6,4),
'dirCpVille' => $dir->NaissVille,
), 'default', true)?>" title="<?=$this->translate("Recherche à partir du nom du dirigeant")?>">
<?=$dir->Nom.' '.$dir->Prenom?>
</a>
<?php
if (trim($dir->NaissDate) != '' && trim($dir->NaissVille.' '.$dir->NaissDepPays) != '') { ?>
<br/>né(e) le <?=$dir->NaissDate?> à <?=$dir->NaissVille?>
<?php if (trim($dir->NaissDepPays) != '') { ?>&nbsp;(<?=$dir->NaissDepPays?>)<?php }?>
<?php } else if (trim($dir->NaissDate) != '') { ?>
né(e) le <?=$dir->NaissDate?>
<?php } else if (trim($dir->NaissVille.' '.$dir->NaissDepPays) != '') { ?>
né(e) à <?=$dir->NaissVille?> &nbsp;(<?=$dir->NaissDepPays?>)
<?php } ?>
<?php } ?>
</td>
<td class="StyleInfoData" width="100" valign="top">
<?php if ($dir->Siren!='') {?>
<a title="<?=$this->translate("Consulter la fiche identité")?>" href="<?=$this->url(array('controller'=>'identite', 'action'=>'fiche', 'siret'=>$dir->Siren), 'default', true)?>">
<?=$this->SirenTexte($dir->Siren)?></a>
<?php if (empty($this->AutrePage) && $this->edition) {?>
<div style="line-height:16px;">
<a class="dialog" title="<?=$this->translate("Ajouter un actionnaire")?>" href="<?=$this->url(array('controller'=>'saisie','action'=>'lien','type'=>'actionnaire','mode'=>'add','siren'=>$this->siren,'createfiche'=>$dir->Siren),null,true)?>">
<img style="vertical-align:middle;" src="/themes/default/images/interfaces/ajouter.png" /></a>
</div>
<?php }?>
<?php }?>
</td>
<?php if (empty($this->AutrePage) && $this->accessWorldCheck) {?>
<td>
<?php if ($dir->Societe != '') { ?>
<img style="cursor:pointer;" class="wcheck" data-url="<?=$this->url(array(
'controller'=>'worldcheck','action'=>'occurence','siren'=>substr($this->siret,0,9),
'dirType'=>'ORGANISATION','dirSociete'=>$dir->Societe),'default',true);?>" src="/themes/default/images/worldcheck/wc.png"/>
<?php }?>
<?php if ($dir->Nom != '') { ?>
<img style="cursor:pointer;" class="wcheck" data-url="<?=$this->url(array(
'controller'=>'worldcheck','action'=>'occurence','siren'=>substr($this->siret,0,9),
'dirType'=>'INDIVIDUAL','dirNom'=>$dir->Nom,'dirPrenom'=>$dir->Prenom),'default',true);?>" src="/themes/default/images/worldcheck/wc.png"/>
<?php } ?>
</td>
<?php }?>
</tr>
<?php } ?>
</table>
<?php } else { ?>
<table>
<tr>
<td class="StyleInfoData" width="550">
<?=$this->translate("Aucune donn&eacute;e n'est pr&eacute;sente dans notre base")?>
</td>
</tr>
</table>
<?php } ?>
</div>
<?php if (empty($this->AutrePage)) {?>
<?=$this->render('cgu.phtml', $this->cgu)?>
<?php }?>
<?php if (empty($this->AutrePage)) {?>
</div>
<?php }?>
<?php if (empty($this->AutrePage) && $this->edition) {?>
<script>
$('a.dialog').on('click', function(){
var href = $(this).attr('href');
if (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>
<?php }?>
<?php if (empty($this->AutrePage) && $this->accessWorldCheck) {?>
<script>
$('img.wcheck').each(function(){
$(this).qtip({
hide: { event: 'unfocus' },
show: { solo: true, delay: 500 },
content: {
button: true,
title: 'WorlCheck',
text: "Chargement...",
ajax: { url: $(this).data('url') } },
position: { my: 'right center', at: 'left center' }
});
});
</script>
<?php }?>

View File

@ -0,0 +1,178 @@
<?php if (empty($this->AutrePage)){?>
<div id="center">
<?php }?>
<?php if (empty($this->AutrePage)){?>
<h1><?=$this->translate("DIRIGEANTS OP&Eacute;RATIONNELS")?></h1>
<div class="paragraph">
<table class="identite">
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib"><?=$this->translate("Num&eacute;ro identifiant Siren")?></td>
<td width="350" class="StyleInfoData"><?=$this->SirenTexte($this->siren)?></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib"><?=$this->translate("Dénomination Sociale")?></td>
<td width="350" class="StyleInfoData"><?=$this->raisonSociale?></td>
</tr>
<?php if ($this->surveillance) {?>
<tr>
<td width="30">&nbsp;</td>
<td colspan="2" width="550" class="StyleInfoData">
<?=$this->action('infos','surveillance', null, array(
'source' => 'dirigeants',
'siret' => $this->siret
))?>
</td>
</tr>
<?php }?>
</table>
</div>
<?php }?>
<h2><?=$this->translate("Liste des dirigeants actifs")?></h2>
<div class="paragraph">
<?php if ($this->edition) {?>
<a class="dialog" title="Ajouter un dirigeant" href="<?=$this->url(array('controller'=>'saisie','action'=>'diropcontrol','mode'=>'add','siret'=>$this->siret), 'default', true)?>">
<img style="vertical-align:middle;" src="/themes/default/images/interfaces/ajouter.png" /><?=$this->translate("Ajouter un dirigeant")?></a>
<?php }?>
<?php if ( count($this->dirigeants)>0 ) {?>
<table class="data">
<?php foreach ($this->dirigeants as $dir) {?>
<tr>
<td class="StyleInfoData" width="140"><?=$dir->Titre?></td>
<td class="StyleInfoData" id="<?=$dir->Id?>" width="200">
<?php if ($dir->Societe != '') { ?>
<a href="<?=$this->url(array(
'controller' => 'recherche',
'action' => 'liste',
'type' => 'ent',
'raisonSociale' => $dir->Societe
), 'default', true)?>"
title="<?=$this->translate("Recherche à partir de la Dénomination sociale")?>">
<?=$dir->Societe?>
</a>
&nbsp;
<?php }?>
<?php if ($dir->Nom != '') { ?>
<a href="<?=$this->url(array(
'controller' => 'recherche',
'action' => 'liste',
'type' => 'dir',
'dirNom' => $dir->Nom,
'dirPrenom' => $dir->Prenom,
), 'default', true)?>" title="<?=$this->translate("Recherche à partir du nom du dirigeant")?>">
<?=$dir->Civilite.' '.$dir->Nom.' '.$dir->Prenom?>
</a>
<?php } ?>
</td>
<td class="StyleInfoData" width="200">
<?php
$message = '';
if (trim($dir->NaissDate) != '' && trim($dir->NaissDate)!='0000-00-00') {
$date = new Zend_Date($dir->NaissDate, 'yyyy-MM-dd');
$message = $message.' '.$this->translate("le").' '.$date->toString('dd/MM/yyyy');
}
if (trim($dir->NaissVille.' '.$dir->NaissDepPays) != '') {
$message = $message.' '.$this->translate("à").' '.$dir->NaissVille;
}
if ($message!='') {
if ($dir->Civilite=='' || $dir->Civilite==null) {
$message = $this->translate("né(e)").' '.$message;
} else if ($dir->Civilite=='M') {
$message = $this->translate("né").' '.$message;
} else {
$message = $this->translate("née").' '.$message;
}
echo $message;
}
?>
</td>
<?php if ($this->edition) {?>
<td>
<a class="dialog" title="Modifier le dirigeant" href="<?=$this->url(array('controller'=>'saisie','action'=>'diropcontrol','mode'=>'edit','siret'=>$this->siret,'id'=>$dir->Id), 'default', true)?>">
<img src="/themes/default/images/interfaces/editer.png" /></a>
<a class="dialog" title="Supprimer le dirigeant" href="<?=$this->url(array('controller'=>'saisie','action'=>'diropcontrol','mode'=>'del','siret'=>$this->siret,'id'=>$dir->Id), 'default', true)?>">
<img src="/themes/default/images/interfaces/supprimer.png" /></a>
</td>
<?php if (empty($this->AutrePage) && $this->accessWorldCheck) {?>
<td>
<?php if ($dir->Societe != '') { ?>
<img style="cursor:pointer;" class="wcheck" data-url="<?=$this->url(array(
'controller'=>'worldcheck','action'=>'occurence','siren'=>$this->siren,
'dirType'=>'ORGANISATION','dirSociete'=>$dir->Societe),'default',true);?>" src="/themes/default/images/worldcheck/wc.png"/>
<?php }?>
<?php if ($dir->Nom != '') {
$param = array(
'controller'=>'worldcheck',
'action'=>'occurence',
'siren'=>$this->siren,
'dirType'=>'INDIVIDUAL',
'dirNom'=>$dir->Nom,
'dirPrenom'=>$dir->Prenom,
);
?>
<img style="cursor:pointer;" class="wcheck" data-url="<?=$this->url($param,'default',true);?>" src="/themes/default/images/worldcheck/wc.png"/>
<?php } ?>
</td>
<?php }?>
<?php }?>
</tr>
<?php } ?>
</table>
<?php } else { ?>
<table>
<tr>
<td class="StyleInfoData" width="550">
<?=$this->translate("Aucune donn&eacute;e n'est pr&eacute;sente dans notre base")?>
</td>
</tr>
</table>
<?php } ?>
</div>
<?php if (empty($this->AutrePage)){?>
<?=$this->render('cgu.phtml', $this->cgu)?>
</div>
<?php }?>
<script>
$('img.wcheck').each(function(){
$(this).qtip({
hide: { event: 'unfocus' },
show: { solo: true, delay: 1000 },
content: {
button: true,
title: 'WorlCheck',
text: "Chargement...",
ajax: { url: $(this).data('url') } },
position: { my: 'right center', at: 'left center' }
});
});
$('a.dialog').on('click', function(){
var href = $(this).attr('href');
if (href!='#') {
var title = $(this).attr('title');
var dialogOpts = {
bgiframe: true,
title: title,
width: 600,
height: 550,
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

@ -1,9 +1,7 @@
<div id="center">
<h2>Droits d'accès</h2>
<div class="paragraph">
<?php
$message = 'Vous n\'avez pas les droits nécessaires pour afficher cette page.';
?>
<?php $message = 'Vous n\'avez pas les droits nécessaires pour afficher cette page.'; ?>
<div style="padding:0.7em;" class="ui-state-error ui-corner-all">
<p><span style="float: left; margin-right: 0.3em;" class="ui-icon ui-icon-alert"></span>
<strong>Erreur :</strong> <?=$message?></p>

View File

@ -244,7 +244,7 @@ if($this->commande == true)
{
?>
<p>Votre demande à été prise en compte pour le siren <b><?=$this->siren?></b>.</p>
<p><a href="<?=$this->url(array('controller'=>'identite', 'action'=>'fichier', 'siret'=>$this->siren), null, true)?>">
<p><a href="<?=$this->url(array('controller'=>'identite', 'action'=>'fichier', 'siret'=>$this->siren), 'default', true)?>">
Retour à la fiche identite
</a></p>
<?php

View File

@ -0,0 +1,146 @@
<div id="center">
<h1>PATRIMOINE FONCIER</h1>
<div class="paragraph">
<table class="identite">
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Num&eacute;ro identifiant Siren</td>
<td width="350" class="StyleInfoData"><?=$this->SirenTexte($this->siren)?></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Dénomination Sociale</td>
<td width="350" class="StyleInfoData"><?=$this->raisonSociale?></td>
</tr>
</table>
</div>
<?php if ($this->MsgTxt) {?>
<div class="paragraph"><?=$this->MsgTxt?></div>
<?php } else {?>
<?php if (count($this->List) > 0) {?>
<h2>Propriétés baties</h2>
<div class="paragraph">
<table class="data">
<thead>
<tr>
<th>Rôle</th>
<th>Dépt.</th>
<th>Commune</th>
<th>Section</th>
<th>N° Plan</th>
<th>Fantoir</th>
<th>Adresse</th>
<th>Bât.</th>
<th>Ent.</th>
<th>Niv.</th>
<th>Surface</th>
<th>Nature</th>
</tr>
</thead>
<tbody>
<?php if (count($this->List) > 0) {?>
<?php foreach($this->List as $p) {?>
<?php if ($p->Type == 'local') {?>
<tr>
<td title="<?=$p->RoleLib?>"><?=$p->Role?></td>
<td><?=$p->Departement?></td>
<td><?=$p->CommuneLib?></td>
<td><?=$p->Section?></td>
<td><?=$p->PlanNum?></td>
<td><?=$p->Fantoir?></td>
<td>
<?=empty($p->AdresseNum) ? '' : $p->AdresseNum.' ' ; ?>
<?=empty($p->AdresseInd) ? '' : $p->AdresseInd.' ' ; ?>
<?=empty($p->AdresseType) ? '' : $p->AdresseType.' ' ; ?>
<?=empty($p->AdresseLib) ? '' : $p->AdresseLib.' ' ; ?>
</td>
<td><?=$p->Batiment?></td>
<td><?=$p->Ent?></td>
<td><?=$p->Niveau?></td>
<td><?=number_format($p->SurfaceTotal, 0, ",", " ")?></td>
<td></td>
</tr>
<?php if (count($p->SurfaceDetail->item) > 0) {?>
<?php foreach($p->SurfaceDetail->item as $s) {?>
<tr>
<td colspan="10" align="right"><i>Detail</i></td>
<td><?=number_format($s->Surface, 0, ",", " ")?></td>
<td><?=$s->Label?></td>
</tr>
<?php }?>
<?php }?>
<?php }?>
<?php }?>
<?php }?>
</tbody>
</table>
</div>
<h2>Propriétés non baties</h2>
<div class="paragraph">
<table class="data">
<thead>
<tr>
<th>Rôle</th>
<th>Dépt.</th>
<th>Commune</th>
<th>Section</th>
<th>N° Plan</th>
<th>Fantoir</th>
<th>Adresse</th>
<th>Surface</th>
<th>Nature</th>
</tr>
</thead>
<tbody>
<?php if (count($this->List) > 0) {?>
<?php foreach($this->List as $p) {?>
<?php if ($p->Type == 'parcelle') {?>
<tr>
<td title="<?=$p->RoleLib?>"><?=$p->Role?></td>
<td><?=$p->Departement?></td>
<td><?=$p->CommuneLib?></td>
<td><?=$p->Section?></td>
<td><?=$p->PlanNum?></td>
<td><?=$p->Fantoir?></td>
<td>
<?=empty($p->AdresseNum) ? '' : $p->AdresseNum.' ' ; ?>
<?=empty($p->AdresseInd) ? '' : $p->AdresseInd.' ' ; ?>
<?=empty($p->AdresseType) ? '' : $p->AdresseType.' ' ; ?>
<?=empty($p->AdresseLib) ? '' : $p->AdresseLib.' ' ; ?>
</td>
<td><?=number_format($p->SurfaceTotal, 0, ",", " ")?></td>
<td></td>
</tr>
<?php if (count($p->SurfaceDetail->item) > 0) {?>
<?php foreach($p->SurfaceDetail->item as $s) {?>
<tr>
<td colspan="7" align="right"><i>Detail</i></td>
<td><?=number_format($s->Surface, 0, ",", " ")?></td>
<td><?=$s->Label?></td>
</tr>
<?php }?>
<?php }?>
<?php }?>
<?php }?>
<?php }?>
</tbody>
</table>
</div>
<?php } else {?>
Aucune information sur le patrimoine.
<?php }?>
<?php }?>
</div>

View File

@ -49,7 +49,7 @@
</table>
</form>
</div>
<script type="text/javascript" src="/libs/form/jquery.form.js"></script>
<script type="text/javascript" src="/libs/form/jquery.form.min.js"/>
<script>
$('#uploadForm').ajaxForm({
beforeSubmit: function() {

View File

@ -0,0 +1,299 @@
<?php if ( empty($this->AutrePage) ) {?>
<div id="center">
<?php }?>
<?php if ( empty($this->AutrePage) ) {?>
<h1>INDISCORE©</h1>
<div class="paragraph">
<table>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Num&eacute;ro identifiant Siren</td>
<td width="350" class="StyleInfoData"><?=$this->SirenTexte($this->indiscore->Siren)?></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Num&eacute;ro identifiant Siret du si&egrave;ge</td>
<td width="350" class="StyleInfoData"><?=$this->SiretTexte($this->indiscore->Siret)?></td>
</tr>
<?php if (isset($this->indiscore->NumRC) && $this->indiscore->NumRC*1!=0) { ?>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Num&eacute;ro R.C.</td>
<td width="350" class="StyleInfoData"><?=$this->indiscore->NumRC?></td>
</tr>
<?php } ?>
<tr><td colspan="3">&nbsp;</td></tr>
<?php if ( $this->edition && empty($this->AutrePage) ) {?>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib"></td>
<td width="350" class="StyleInfoData">
<?=$this->action('scorecutoff','saisie',null, array('siren'=>$this->indiscore->Siren)); ?>
</td>
</tr>
<?php }?>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">&nbsp;</td>
<td width="350" class="StyleInfoData">
<a href=<?=$this->url(array('controller'=>'evaluation', 'action'=>'scoreshisto', 'siret' => $this->siret)); ?>>
<?=$this->translate("Consulter l'historique des IndiScore");?></a>
</td>
</tr>
</table>
</div>
<?php }?>
<h2>Dénomination sociale & coordonnées</h2>
<div class="paragraph">
<table>
<tr>
<td width="30"></td>
<td width="200" class="StyleInfoLib">Dénomination Sociale</td>
<td width="350" class="StyleInfoData">
<?php
echo $this->indiscore->Nom;
if (!empty($this->indiscore->Nom2)) {
echo '<br/>'.$this->indiscore->Nom2;
}
?>
</tr>
<?php
$titre='';
if ($this->indiscore->Enseigne!='' && $this->indiscore->Sigle!='') {
$titre = 'Enseigne / Sigle'; $lib = $this->indiscore->Enseigne.' / '.$this->indiscore->Sigle;
} elseif ($this->indiscore->Enseigne!='' && $this->indiscore->Sigle=='') {
$titre = 'Enseigne'; $lib = $this->indiscore->Enseigne;
} elseif ($this->indiscore->Enseigne=='' && $this->indiscore->Sigle!='') {
$titre = 'Sigle'; $lib = $this->indiscore->Sigle;
}?>
<?php if ( !empty($titre) ) {?>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib"><?=$titre?></td>
<td width="350" class="StyleInfoData"><?=$lib?></td>
</tr>
<?php } ?>
<tr>
<td width="30"></td>
<td width="200" class="StyleInfoLib">Forme juridique</td>
<td width="350" class="StyleInfoData">
<?=$this->indiscore->FJ_lib?>
</td>
</tr>
<tr>
<td width="30"></td>
<td width="200" class="StyleInfoLib">Date de création de l'entreprise</td>
<td width="350" class="StyleInfoData">
<?php $date = new Zend_Date($this->indiscore->DateCreaEn, 'yyyyMMdd');?>
<?=$date->toString('dd/MM/yyyy')?>
</td>
</tr>
<tr>
<td width="30"></td>
<td width="200" class="StyleInfoLib">Adresse</td>
<td width="350" class="StyleInfoData">
<?=$this->indiscore->Adresse?><br/>
<?php if ($this->indiscore->Adresse2<>'') echo $this->indiscore->Adresse2.'<br/>';?>
<?=$this->indiscore->CP?>&nbsp;<?=$this->indiscore->Ville?>
</td>
</tr>
<tr>
<td width="30"></td>
<td width="200" class="StyleInfoLib">Téléphone</td>
<td width="350" class="StyleInfoData">
<?=$this->indiscore->Tel?>
</td>
</tr>
<?php if ( $this->surveillance && empty($this->AutrePage) ) {?>
<tr>
<td width="30"></td>
<td colspan="2">
<?=$this->action('infos','surveillance', null, array(
'source' => 'score',
'siret' => $this->siret
));?>
</td>
</tr>
<?php }?>
<?php if ( $this->aviscredit && empty($this->AutrePage) ) {?>
<tr>
<td width="30"></td>
<td colspan="2">
<a href="<?=$this->url(array('controller'=>'evaluation', 'action'=>'aviscredit', 'siret' => $this->siret))?>">
Saisir votre demande d'avis credit personnalisé</a>
</td>
</tr>
<?php }?>
</table>
</div>
<h2>Évaluation</h2>
<div class="paragraph">
<table>
<tr>
<td width="30">&nbsp;</td>
<td width="550" colspan="2" class="StyleInfoData">
L'&eacute;valuation indiScore&copy; est en partie basée sur les points notables suivants :<br/>
<h3><u>Conformit&eacute; l&eacute;gale :</u></h3>
<div class="stats gradiant_pic">
<ul>
<li>
<i><?=$this->indiscore->AnalyseConfor; ?></i>
<div class="blocdegrade clearfix">
<span class="textdegrade">Conformit&eacute;&nbsp;<? if ($this->edition) { echo '('.$this->indiscore->ScoreConfor.')';}?></span>
<div class="imgdegrade"><img class="borderimg" src="/themes/default/images/indiscore/imgscores-<?=$this->FormatPct($this->indiscore->ScoreConfor)?>.png"/></div>
<div class="regle"><img src="/themes/default/images/indiscore/sgradiant2.png" /></div>
</div>
</li>
</ul>
</div>
<h3><u>Dirigeance :</u></h3>
<div class="stats gradiant_pic">
<ul>
<li>
<i><?=$this->indiscore->AnalyseDirigeance?></i>
<div class="blocdegrade clearfix">
<span class="textdegrade">Dirigeance&nbsp;<? if ($this->edition) { echo '('.$this->indiscore->ScoreDirigeance.')';}?></span>
<div class="imgdegrade"><img class="borderimg" src="/themes/default/images/indiscore/imgscores-<?=$this->FormatPct($this->indiscore->ScoreDirigeance)?>.png"/></div>
<div class="regle"><img src="/themes/default/images/indiscore/sgradiant2.png" /></div>
</div>
</li>
</ul>
</div>
<h3><u>Solvabilit&eacute; :</u></h3>
<div class="stats gradiant_pic">
<ul>
<li>
<i>L'analyse de la solvabilit&eacute; est <?=$this->indiscore->AnalyseSolvabilite?></i>
<div class="blocdegrade clearfix">
<span class="textdegrade">Solvabilit&eacute;&nbsp;<? if ($this->edition) { echo '('.$this->indiscore->Indiscore.')';}?></span>
<div class="imgdegrade"><img class="borderimg" src="/themes/default/images/indiscore/imgscores-<?php echo $this->FormatPct($this->indiscore->Indiscore);?>.png"/></div>
<div class="regle"><img src="/themes/default/images/indiscore/sgradiant2.png" /></div>
</div>
</li>
</ul>
</div>
</td>
</tr>
<?php $millesimeMax = date('Ymd', mktime(0, 0, 0, date('m'), date('d'), date('Y')-2));?>
<?php if($this->indiscore->NbBilansScore > 0 && $this->indiscore->Bilans->item[0]->Millesime >= $millesimeMax) {?>
<tr>
<td width="30">&nbsp;</td>
<td width="550" colspan="2" class="StyleInfoData">
A la lecture du dernier bilan, cloturé le <?=substr($this->indiscore->Bilans->item[0]->Millesime,6,2).'/'.substr($this->indiscore->Bilans->item[0]->Millesime,4,2).'/'.substr($this->indiscore->Bilans->item[0]->Millesime,0,4)?>, la situation financi&egrave;re de l'entreprise <?php echo $this->Nom;?> est <b><?php echo $this->indiscore->tabInfosNotations->SituationFinanciere;?></b>.<br/>
<?php
if (html_entity_decode($this->indiscore->tabInfosNotations->ProbabiliteDefaut) <> 'En défaut')
echo 'La probabilit&eacute; de d&eacute;faillance associ&eacute;e &agrave; cette note avoisine les '. number_format($this->indiscore->tabInfosNotations->ProbabiliteDefaut,3,',',' ') .' %';
else
echo 'Cette entreprise est d&eacute;faillante ou sur le point de le devenir.';
//[EquivalenceBDF]
?>
</td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="550" colspan="2" class="StyleInfoData">
<i>Pour information, les méthodes standards donnent : Conan &amp; Holder = <b><?php echo $this->indiscore->scores->ConanH;?></b>,
Afdcc1 = <b><?php echo $this->indiscore->scores->Afdcc1;?></b>, Afdcc2 = <b><?php echo $this->indiscore->scores->Afdcc2;?></b>
et Score Z = <b><?php echo $this->indiscore->scores->Z;?></b>.</i>
</td>
</tr>
<?php } else {?>
<tr>
<td width="30">&nbsp;</td>
<td width="550" colspan="2" class="StyleInfoData">
La situation financi&egrave;re de l'entreprise ne peut être évaluée en détail car
<?php
if($this->indiscore->Bilans->item[0]->Millesime < $millesimeMax && count($this->indiscore->Bilans->item) > 0 ) {
echo 'le dernier bilan disponible date de '.substr($this->indiscore->Bilans->item[0]->Millesime,0,4).'.';
} else {
echo 'aucun bilan n\'est disponible.';
} ?>
</td>
</tr>
<?php }?>
</table>
</div>
<h2>Paiements</h2>
<div class="paragraph">
<table>
<tr>
<td width="30">&nbsp;</td>
<td width="550" colspan="2" class="StyleInfoData">
<?php if(!empty($this->indiscore->infoPaiement)):?>
<?php echo html_entity_decode($this->indiscore->infoPaiement);?>
<?php else :?>
Aucune information sur les paiements disponible.
<?php endif;?>
</td>
</tr>
</table>
</div>
<h2>Conclusion</h2>
<div class="paragraph">
<table>
<tr>
<td width="30">&nbsp;</td>
<td width="550" colspan="2" class="StyleInfoData">
<span class="notvisible">
Compte tenu des informations disponibles aupr&egrave;s des sources officielles
Scores et D&eacute;cisions pr&eacute;sente la conclusion suivante :</span><br/>
<?php
$color = '';
if ($this->indiscore->Indiscore20 < $this->bornes['indiScore']['rouge']) {
$color = ' indiscore-red';
} elseif ($this->indiscore->Indiscore20 < $this->bornes['indiScore']['orange']) {
$color = ' indiscore-orange';
} else {
$color = ' indiscore-green';
}
switch($this->typeScore) {
case '20':
$maxIndiscore = $this->typeScore;
$indiscore = $this->indiscore->Indiscore20;
break;
case '100':
default:
$maxIndiscore = empty($this->typeScore)? '100' : $this->typeScore;
$indiscore = $this->indiscore->Indiscore;
break;
}
?>
<h3 class="indiscore<?=$color?>">LE SCORE EST DE <?=$indiscore?> SUR <?=$maxIndiscore?> POINTS</h3>
<?php
if ($this->indiscore->infoEncours != '' && !is_numeric($this->indiscore->encours) && $this->indiscore->encours == 'N/A'){ ?>
<h3><?=$this->indiscore->infoEncours?></h3>
<?php } else{ ?>
<?php if ($indiscore != 0) {?>
<i>La tendance de la note est <?=$this->indiscore->TendanceIndiscore?></i>
<h3 class="indiscore">L'ENCOURS MAXIMUM CONSEILL&Eacute; EST DE <?=round($this->indiscore->encours / 1000)?> K&euro;</h3>
<?php }?>
<h3><?=$this->indiscore->infoEncours?></h3>
<?php }?>
</td>
</tr>
<tr><td colspan="3" align="center"><img class="notvisible" src="/themes/default/images/indiscore/logo_indiscore.png"/></td></tr>
</table>
</div>
<?php if ( empty($this->AutrePage) ) {?>
<?=$this->render('cgu.phtml', $this->cgu);?>
</div>
<?php }?>

View File

@ -55,9 +55,6 @@ echo $this->action('liens', 'identite', null, array('siret' => $this->siret, 'id
</tr>
</thead>
<tbody>
<?php
Zend_Registry::get('firebug')->info($this->tabResult);
?>
<?php foreach($this->tabRatio as $ratio => $info) { ?>
<tr>
<td class="head"><a class="tooltip" title="<?=$info['comment']?>"><?=$info['titre']?></a></td>
@ -66,7 +63,7 @@ Zend_Registry::get('firebug')->info($this->tabResult);
<td class="right"><?=$this->tabResult[1]['ratio'][$ratio]?></td>
<td class="right" title="<?=$this->tabResult[1]['info'][$ratio]?>"><?=$this->tabResult[1]['total'][$ratio]?> %</td>
<td class="right"><?=$this->tabResult[2]['ratio'][$ratio]?></td>
<td class="right" title="<?=$this->tabResult[2]['info'][$ratio]?>"><?=$this->tabResult[3]['total'][$ratio]?> %</td>
<td class="right" title="<?=$this->tabResult[2]['info'][$ratio]?>"><?=$this->tabResult[2]['total'][$ratio]?> %</td>
</tr>
<?php }?>
</tbody>
@ -93,31 +90,24 @@ Aucun bilan disponible.
<td width="30"></td>
<td class="StyleInfoLib" width="200">Situation juridique</td>
<td class="StyleInfoData" width="350">
<?php if ($this->SituationJuridique == 'P'):?>
<a href="<?=$this->url(array(
'controller' => 'juridique',
'action' => 'annonces',
'siret' => $this->siret,
'id' => $this->id,
))?>">
<font color="red">
<b>En proc&eacute;dure collective</b>
</font>
</a>
<?php if($this->dateRadiation != ''):?>
<br/>Radié du RCS le <?php echo $this->dateRadiation;?>
<?php endif;?>
<?php elseif ($this->SituationJuridique == 'RR'):?>
Radié du RCS <?php if($this->dateRadiation != ''):?>
<?php if ($this->SituationJuridique == 'P') {?>
<a href="<?=$this->url(array('controller' => 'juridique', 'action' => 'annonces',
'siret' => $this->siret,'id' => $this->id))?>">
<font color="red"><b>En proc&eacute;dure collective</b></font></a>
<?php if($this->dateRadiation != '') {?>
<br/>Radié du RCS le <?=$this->dateRadiation?>
<?php }?>
<?php } elseif ($this->SituationJuridique == 'RR') {?>
Radié du RCS <?php if($this->dateRadiation != '') {?>
le <?php echo $this->dateRadiation;?>
<?php endif;?>
<?php elseif ($this->SituationJuridique == 'RP'):?>
Radiation publiée <?php if($this->dateRadiation != ''):?>
le <?php echo $this->dateRadiation;?>
<?php endif;?>
<?php else:?>
<?php }?>
<?php } elseif ($this->SituationJuridique == 'RP') {?>
Radiation publiée <?php if($this->dateRadiation != '') {?>
le <?=$this->dateRadiation?>
<?php }?>
<?php } else {?>
Aucune procédure enregistrée à ce jour par nos services.
<?php endif;?>
<?php }?>
</td>
</tr>
</table>
@ -126,7 +116,7 @@ Aucun bilan disponible.
<h2>Scores et encours</h2>
<div class="paragraph">
<table>
<?php foreach ($this->scores as $name => $score):?>
<?php foreach ($this->scores as $name => $score) {?>
<tr>
<td width="30"></td>
<td width="250" class="StyleInfoLib"><?=$score[1]?></td>
@ -139,7 +129,7 @@ Aucun bilan disponible.
</a>
</td>
</tr>
<?php endforeach;?>
<?php }?>
<tr>
<td width="30"></td>
<td class="StyleInfoLib">Encours conseillé</td>

View File

@ -0,0 +1,151 @@
<div id="center">
<h1><?=$this->translate("HISTORIQUE").' '.strtoupper($this->types[$this->type]);?></h1>
<div class="paragraph">
<table>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib"><?=$this->translate("Numéro identifiant Siren")?></td>
<td width="350" class="StyleInfoData"><?=$this->SirenTexte($this->siren)?></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib"><?=$this->translate("Dénomination sociale")?></td>
<td width="350" class="StyleInfoData"><?=$this->raisonSociale?></td>
</tr>
</table>
</div>
<h2><?=$this->translate("Historique des scores")?></h2>
<div class="paragraph" style="text-align:right;">
<select name="type">
<?php foreach($this->types as $key=>$val) {?>
<?php $selected = ($key == $this->type)?'selected':'';?>
<option value="<?=$this->url(array('siret'=>$this->siret, 'id'=>$this->id, 'type'=>$key))?>" <?=$selected;?>><?=$val?></option>
<?php }?>
</select>
<script>
$('select[name=type]').change(function(e){
window.location = $(this).val();
});
</script>
</div>
<div class="paragraph">
<p>
<?php if ($this->typeTxt == 'indiScore20') {?>
L'indiscore évalue le risque de faillite d'entreprise à 12 mois à partir de trois axes: le respect,
l'analyse historique des représentants légaux et l'analyse du bilan. Les informations sur lenvironnement économique
des entreprises (secteurs d'activité, groupe, paiements) complètent l'analyse de l'indiscore. Un indiscore entre 0 et
6/20 indiquera un risque élevé, entre 7 et 10/20 un risque moyen et un indiscore compris entre 11 et 20/20
un risque faible. Un avis de crédit fournisseur/client est donné, jusqu'à concurrence de 500 K€.
<?php } ?>
<?php if ($this->typeTxt == 'indiScore') {?>
L'indiscore évalue le risque de faillite d'entreprise à 12 mois à partir de trois axes: le respect,
l'analyse historique des représentants légaux et l'analyse du bilan. Les informations sur lenvironnement économique
des entreprises (secteurs d'activité, groupe, paiements) complètent l'analyse de l'indiscore. Un indiscore entre 0 et
40/100 indiquera un risque élevé, entre 41 et 50/100 un risque moyen et un indiscore compris entre 51 et 100/100
un risque faible. Un avis de crédit fournisseur/client est donné, jusqu'à concurrence de 500 K€.
<?php } ?>
<?php if ($this->typeTxt == 'scoreDir') {?>
Évaluation de l'équipe dirigeante en place. Système S&D
<?php } ?>
<?php if ($this->typeTxt == 'scoreConf') {?>
Évaluation de l'adéquation entre les déclarations et l'information disponible auprès des sources officielles françaises. Système S&D
<?php } ?>
<?php if ($this->typeTxt == 'scoreZ') {?>
Le score Z de la Banque de France permet de déceler les défaillances dentreprises. Ces dernières sont caractérisées
par 19 ratios retraçant quatre aspects de leur comportement : structure financière, dynamisme, rentabilité, gestion courante.
<?php } ?>
<?php if ($this->typeTxt == 'scoreCH') {?>
Le score CONAN et HOLDER (1979) est une méthode conseillée pour les entreprises industrielles réalisant un chiffre
d'affaires de 1,5 à 75 millions deuros. Il permet un classement des sociétés des plus risquées (score inférieur à
6,8) aux plus saines (score supérieur à 16,4).
<?php } ?>
<?php if ($this->typeTxt == 'scoreAfdcc1') {?>
1er indicateur synthétique de vulnérabilité établi par l'Association Françaises des Crédits managers et Conseils.
<?php } ?>
<?php if ($this->typeTxt == 'scoreAfdcc2') {?>
Le score sectoriel AFDCC2 (1999) sapplique aux sociétés réalisant un chiffre daffaires de 150.000 à 75 millions
d'euros. Il comprend 11 fonctions pour 7 secteurs d'activité en différenciant les TPE des PME. Il s'adresse plus
spécialement au Credit Manager, étant axé sur la solvabilité de l'entreprise à court terme.
<?php } ?>
<?php if ($this->typeTxt == 'scoreAltman') {?>
Évaluation synthétique permettant la prévision de défaillance d'une entreprise à partir de ratios, liquidité,
solvablilité, rentabilité, activité, croissance. Appelé aussi Z Score d'Altman.
<?php } ?>
<?php if ($this->typeTxt == 'scoreCCF') {?>
Évaluation à 3 ans de la probabilité de défaillance d'une entreprise.
<?php } ?>
</p>
</div>
<?php if ( count($this->scores)> 0 ) {?>
<div class="paragraph">
<table class="tablesorter" id="synthese">
<thead>
<tr>
<th align="center"><?=$this->translate("Date")?></th>
<th align="center"><?=$this->types[$this->type]?></th>
<th align="center"><?=$this->translate("Encours")?> (K&euro;)</th>
<th><?=$this->translate("Motif du changement")?></th>
</tr>
</thead>
<tbody>
<?php foreach($this->scores as $score) {?>
<tr>
<td align="center">
<?php $date = new Zend_Date($score->date, 'yyyy-MM-dd');?>
<?=$date->toString('dd/MM/yyyy')?>
</td>
<?php
$style = '';
//Color value - @todo redraw the table and add it before view
if ( $score->value < $this->bornes[$this->type]['rouge'] ) {
$style = ' style="color:red;"';
} elseif ( $score->value < $this->bornes[$this->type]['orange'] ) {
$style = ' style="color:orange;"';
} else {
$style = ' style="color:green;"';
}
?>
<td align="center"<?=$style?>><?=$score->value?></td>
<td align="center"><?=number_format($score->encours,2)?></td>
<td><?=$score->label?></td>
</tr>
<?php }?>
</tbody>
</table>
</div>
<script>
$(function(){
$('#synthese').tablesorter({
dateFormat: 'uk',
headers: {
0: {sorter: 'shortDate'},
3: {sorter: false},
}
});
});
</script>
<div class="paragraph">
<?php if ( $this->graph ) {?>
<img src="/file/image/cache/q/<?=$this->graph?>" usemap="#graphMap">
<map name="graphMap">
<?=$this->graphMap;?>
</map>
<?php } else {?>
<b><?=$this->translate("Impossible de générer le graphique")?></b>
<?php }?>
</div>
<?php } else {?>
<div class="paragraph">
<?=$this->translate("Aucune information sur l'historique disponible.")?>
</div>
<?php }?>
<?=$this->render('cgu.phtml', $this->cgu)?>
</div>

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