Compare commits

...

562 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
Michael RICOIS
e08564bad5 Correction Bilan association 2014-03-05 15:11:14 +00:00
Michael RICOIS
c087d459ff Only prop 2014-03-04 15:46:50 +00:00
Michael RICOIS
c996d61419 Prepare for release 2014-03-03 16:40:07 +00:00
Michael RICOIS
42815cbbcd ....c... 2014-02-27 15:09:27 +00:00
Michael RICOIS
a435cc2d2c Merge for release 2014-02-27 10:32:09 +00:00
Michael RICOIS
af003f159d issue #0001870 : Merge pagination 2014-02-25 20:39:38 +00:00
Michael RICOIS
c7df7e757a Prepare for release 2014-02-25 16:58:40 +00:00
Michael RICOIS
7fe024283d Prepare for release 2014-02-13 14:41:39 +00:00
Michael RICOIS
9ba1a34095 Merge from 2.4, prepare to release 2014-01-16 09:33:31 +00:00
Michael RICOIS
c9b083ceb8 Merge from branch 2.4 2013-12-26 14:42:44 +00:00
Michael RICOIS
43d2addc09 Merge from 2.4 for release 2013-11-29 13:54:52 +00:00
Michael RICOIS
b9c388a79f Merge for release in staging 2013-11-21 16:31:49 +00:00
Michael RICOIS
d3ffafb3fe Merge from branch 2.4 - Ready for release 2013-11-18 14:49:04 +00:00
Michael RICOIS
0f71a6bcaf Merge from branch 2.4 2013-11-13 14:10:30 +00:00
Michael RICOIS
5b5270159c Import change and correction after the staging release 2013-11-06 16:26:14 +00:00
Michael RICOIS
dcaae4acfc Merge from 2.4 2013-11-05 14:45:25 +00:00
Michael RICOIS
b2563fe35f Merge following to correct regression from the last release 2013-10-25 14:30:46 +00:00
Michael RICOIS
ebe57c498c Merge from branche 2.4 : Prepare to release in staging 2013-10-23 14:20:56 +00:00
Michael RICOIS
201a2b45e4 Merge from branch 2.4 2013-10-04 12:41:24 +00:00
Michael RICOIS
de20a05968 Correction after release 2013-09-23 15:26:02 +00:00
Michael RICOIS
9a0cbca281 Merge for release 2013-09-23 08:47:30 +00:00
Michael RICOIS
2e565ac066 Merge all change from 2.4 2013-09-16 15:41:31 +00:00
Michael RICOIS
932e5fc208 Merge correction 2013-08-20 13:56:03 +00:00
Michael RICOIS
492534c329 Merge giant 2013-08-20 13:48:53 +00:00
Michael RICOIS
57b17a329e Merge from branch 2.4 2013-08-12 12:08:03 +00:00
Michael RICOIS
cd99eb5db3 issue #0001556 : Gestion des emails 2013-07-30 09:08:40 +00:00
Michael RICOIS
28bd244e1b issue #0001667 : Merge 2013-07-30 08:58:23 +00:00
Michael RICOIS
0aa86a6e88 Merge 2013-07-30 08:56:48 +00:00
Michael RICOIS
4bb3252707 Merge 2013-07-30 08:54:58 +00:00
Michael RICOIS
348f26f6ff issue #0001636 : Merge 2013-07-30 08:52:33 +00:00
Michael RICOIS
b551647bbb fixed issue #0001672 2013-07-30 08:46:49 +00:00
Michael RICOIS
d555dbee67 issue #0001652 : Merge cutoff 2013-07-30 08:42:29 +00:00
Michael RICOIS
a0c64ca14a issue #0001668 : Merge 2013-07-30 08:41:29 +00:00
Michael RICOIS
e3beb98ef8 issue #0001654 : Merge 2013-07-30 08:36:50 +00:00
Michael RICOIS
9a67a4bd0c issue #0001652 : Merge cutoff script 2013-07-30 08:31:24 +00:00
Michael RICOIS
8475760345 issue #0001372 : Merge button to add link company from dirigeants 2013-07-30 08:30:03 +00:00
Michael RICOIS
247bbb49aa issue #0001652 : Merge cutoff 2013-07-30 08:28:31 +00:00
Michael RICOIS
8edf0be950 issue #0001653 : Merge worldcheck 2013-07-30 08:26:23 +00:00
Michael RICOIS
6111f32f22 Merge giant 2013-07-30 08:24:34 +00:00
Michael RICOIS
9fdbd1adf3 Properties 2013-07-30 08:21:56 +00:00
Michael RICOIS
904eb0e816 Doc and config upgrade 2013-07-30 08:20:27 +00:00
Michael RICOIS
15321bbd21 Librairies upgrade 2013-07-30 08:18:24 +00:00
Michael RICOIS
78b3ac1e87 Prepare merge : correction affichage bilan 2013-07-26 15:18:33 +00:00
Michael RICOIS
878324e95d fix issue #0001372 : Add button to add link company from dirigeants 2013-07-26 15:05:18 +00:00
Michael RICOIS
90e8f98cc0 Prepare merge : update files 2013-07-26 14:57:59 +00:00
Michael RICOIS
f8e65beef3 Prepare merge : update files 2013-07-26 14:50:47 +00:00
Michael RICOIS
6a7fb9f81c Prepare merge : update Zend Framework and others files 2013-07-26 14:46:39 +00:00
4619 changed files with 143940 additions and 1276920 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,124 +0,0 @@
<?php
class DirigeantController extends Zend_Controller_Action
{
protected $siret;
protected $id;
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/SessionEntreprise.php';
require_once 'common/dates.php';
}
/**
* Forward
*/
public function indexAction()
{
$this->_forward('index', 'index');
}
/**
* Affichage de la liste des dirigeants
*/
public function listeAction()
{
$siren = substr($this->siret, 0, 9);
$this->view->headTitle()->append('Liste des dirigeants');
$this->view->headTitle()->append('Siret '.$this->siret);
$ws = new WsScores();
$infos = $ws->getDirigeants($siren);
if ($infos === false){
$this->_forward('soap', 'error');
}
$dirigeants = $infos->result->item;
$session = new SessionEntreprise($this->siret, $this->id);
$user = new Scores_Utilisateur();
if ($user->checkPerm('dirigeantsop')){
$href = $this->view->url(array('controller'=>'dirigeant', 'action'=>'op', 'siret'=>$this->siret));
$this->view->assign('dirigeantsop', $href);
}
$this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale());
$this->view->assign('dirigeants', $dirigeants);
$this->view->assign('exportObjet', $dirigeants);
$this->view->assign('AutrePage', $this->getRequest()->getParam('apage'));
$this->view->assign('surveillance', $user->checkPerm('survdirigeants'));
}
/**
* Affichage de l'historiques des dirigeants
*/
public function histoAction()
{
$siren = substr($this->siret, 0, 9);
$this->view->headTitle()->append('Historique des dirigeants');
$this->view->headTitle()->append('Siret '.$this->siret);
$ws = new WsScores();
$infos = $ws->getDirigeants($siren, true);
if ($infos === false){
$this->_forward('soap', 'error');
}
$dirigeants = $infos->result->item;
$session = new SessionEntreprise($this->siret, $this->id);
$this->view->assign('dirigeants', $dirigeants);
$this->view->assign('exportObjet', $dirigeants);
$this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale());
$this->view->assign('infos', $infos);
$user = new Scores_Utilisateur();
$this->view->assign('surveillance', $user->checkPerm('survdirigeants'));
}
public function opAction()
{
$siren = substr($this->siret, 0, 9);
$this->view->headTitle()->append('Liste des dirigeants opérationnels');
$this->view->headTitle()->append('Siret '.$this->siret);
$ws = new WsScores();
$infos = $ws->getDirigeantsOp($siren);
if ($infos === false){
$this->_forward('soap', 'error');
}
$dirigeants = $infos->item;
$session = new SessionEntreprise($this->siret, $this->id);
$this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale());
$this->view->assign('dirigeants', $dirigeants);
$this->view->assign('exportObjet', $dirigeants);
$this->view->assign('AutrePage', $this->getRequest()->getParam('apage'));
$user = new Scores_Utilisateur();
$this->view->assign('surveillance', $user->checkPerm('survdirigeants'));
}
}

View File

@ -1,881 +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 'common/dates.php';
require_once 'Scores/WsScores.php';
require_once 'Scores/SessionEntreprise.php';
require_once 'Scores/IdentiteEntreprise.php';
require_once 'Finance/RatiosData.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)) {
$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');
$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 SessionEntreprise($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 RatiosData($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'];
}
$tabResult[] = array(
'dateCloture' => WDate::dateT('Ymd','d/m/Y',$annee),
'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')
$this->view->assign('dateRadiation', WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$indiscore->DateRadiation)));
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;
}
$score['Indiscore'] = array($indiscore->Indiscore20, 'IndiScore');
$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');
$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 SessionEntreprise($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 SessionEntreprise($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
require_once 'wkhtmltopdf/wkhtmltopdf.php';
$wkhtmltopdf = new wkhtmltopdf();
$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');
//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);
}
public function aviscreditAction()
{
$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>";
require_once 'Scores/Mail.php';
$mail = new 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()
{
$user = new Scores_Utilisateur();
if(!$user->checkModeEdition() or !$user->checkPerm('SCORECSF'))
$this->render('error/perms', null, 'error');
require_once 'Evaluation/DomDocument2.lib.php';
require_once 'common/curl.php';
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>';
$success = true;
$date = date('Ymd');
$url = 'https://www.creditsafe.fr/getdata/service/CSFRServices.asmx/GetData?RequestXmlStr='.$req;
$referer = $cookie = '';
$page = getUrl($url, $cookie, '', $referer, false, '', '');
$referer = $url;
$file = APPLICATION_PATH.'/../../data/creditsafe/'.$this->siret.'.xml';
$xml = html_entity_decode($page['body'], ENT_QUOTES, 'UTF-8');
$dom_object = new DomDocument2();
$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->getValueFromTag('companyname');
$rating = $dom_object->getValueFromTag('rating');
$ratingdesc1 = str_replace('?',"'",$dom_object->getValueFromTag('ratingdesc1'));
$ratingdesc2 = str_replace('?',"'",$dom_object->getValueFromTag('ratingdesc2'));
$creditlimit = $dom_object->getValueFromTag('creditlimit');
$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 SessionEntreprise($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;
}
/**
* 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 !';
require_once 'Scores/Mail.php';
$mail = new 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()
{
$user = new Scores_Utilisateur();
if(!$user->checkPerm('INDISCORE3') && !$user->checkPerm('INDISCORE3P'))
$this->_forward('perms', 'error');
$sessionEntreprise = new SessionEntreprise($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,458 +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 bilanAction()
{
$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.";
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,332 +0,0 @@
<?php
require_once 'Scores/RechercheHistorique.php';
require_once 'Giant/WSgiant.php';
require_once 'Giant/Controllers.lib.php';
require_once 'Giant/RequestDatabase.lib.php';
require_once 'Giant/Functions.lib.php';
require_once 'common/dates.php';
class GiantController extends Zend_Controller_Action
{
protected $TestIndication = true;
protected $TestCompanies = array(
'BE' => array(
'0439546194', '0436576412', '0430459076', '0430000604', '0404869783', '0404869783',
'0406952018'
),
'ES' => array(
'A00000000', 'A80192727'
),
'GB' => array(
'00000086', '00082932', '98888888', '214436', '1777777', '991581', '1800000'
),
'NL' => array(
'533885', '1383988', '1383989', '891962239', '891974008', '892130032', '896614719',
'896614735', '896614735', '896615243'
),
'FR' => array(
'55214450300018', '49496793800031', '47997411500012', '48765114300017',
'43235433000040', '39435613300022', '39504742600014', '76980020200020',
'35379698000020', '56202109700018', '70204756400068', '70204756400068'
),
);
public function init()
{
$this->view->headLink()->appendStylesheet('/themes/default/styles/giant.css', 'all');
$this->view->headScript()->appendFile('/themes/default/scripts/giant.js', 'text/javascript');
$this->view->debug = false;
}
public function searchAction()
{
$user = new Scores_Utilisateur();
$params = $this->getRequest()->getParams();
$search = new GiantRechercheController($params['pays'], $this->TestIndication);
$result = $search->Liste($params, $this->getRequest()->getParam('page'));
$this->view->label = $search->getObjet()->getLabelDesc();
$this->view->labelResults = $search->getObjet()->getLabelResults();
$this->view->pays = $params['pays'];
$this->view->currentPage = $search->getObjet()->getCurrentPage();
$this->view->userMaxResult = $user->getNbRep();
$this->view->resultats = $result;
$this->view->page = $this->getRequest()->getParam('page');
$this->view->referer = $search->getObjet()->getQuery();
$this->view->lienReferer = $search->getQueryLink($params);
if($this->view->debug)
$this->view->soap = $search->soapG;
}
public function identiteAction()
{
$rechercheParams = new RechercheHistorique();
$giantFunction = new GiantFunction();
if (count($rechercheParams->liste()) > 0)
{
$recherche = $rechercheParams->item(0);
$type = $recherche['type'];
$params = $recherche['params'];
}
$Commande = new Commandes();
$user = new Scores_Utilisateur();
$listeCommandes = $Commande->getCommandesByLogin($user->getLogin());
$total = 0;
$liste = $giantFunction->divCommande($listeCommandes, $total);
$ListeRapport = new GiantRechercheController($params['pays'], $this->TestIndication);
$result = $ListeRapport->ListeRapport($this->getRequest()->getParam('CompanyId'));
$this->view->total = $total;
$this->view->listeCommandes = $liste;
$this->view->modification = (isset($result->MonitoringOptions))?($ListeRapport->getModification($result->MonitoringOptions->MonitoringOption[0])):null;
$this->view->description = $ListeRapport->getDescription();
$this->view->raisonSociale = $this->getRequest()->getParam('raisonSociale');
$this->view->listeRapport = $result;
$this->view->telephone = $this->getRequest()->getParam('telephone');
$this->view->CompanyId = $this->getRequest()->getParam('CompanyId');
$this->view->raisonSociale = $this->getRequest()->getParam('raisonSociale');
$this->view->CompanyRegisterNumber = $this->getRequest()->getParam('CompanyRegisterNumber');
$this->view->Pays = $this->getRequest()->getParam('Pays');
$this->view->Adresse = explode(':', $this->getRequest()->getParam('Adresse'));
if($this->view->debug)
$this->view->soap = $ListeRapport->soapG;
}
public function creditrecommendationAction()
{
$giantController = new GiantControllerLib($this->getRequest()->getParam('CompanyId'));
$id = $giantController->commande($this->getRequest()->getParam('CompanyId'),
$this->getRequest()->getParam('Type'),
$this->getRequest()->getParam('Pays'),
$this->getRequest()->getParam('Language'),
$this->TestIndication
);
$creditrecommendationAction = array('getAvisDeCredit' => 'CreditRecommendation');
$creditrecommendation = unserialize(base64_decode($id));
$identiteController = new GiantIdentiteController($creditrecommendation);
$giantConstroller = new GiantControllerLib($this->getRequest()->getParam('CompanyId').'-'.$this->getRequest()->getParam('Type'));
$identiteController->ficheAction();
$fiche = $identiteController->getObjet('fiche');
foreach($creditrecommendationAction as $action => $val) {
if(isset($creditrecommendation->DataSet->Company->$val)) {
$creditrecommendation = $giantConstroller->$action($creditrecommendation);
}
}
$fiche = $giantConstroller->getInformationGenerale($creditrecommendation);
$this->view->carte = $this->getRequest()->getParam('Pays');
$this->view->reportType = $this->getRequest()->getParam('Type');
$this->view->report = $fiche;
$this->view->Type = $this->getRequest()->getParam('Type');
$this->view->dateFunction = new WDate();
}
public function compactAction()
{
$giantController = new GiantControllerLib($this->getRequest()->getParam('CompanyId'));
$id = $giantController->commande($this->getRequest()->getParam('CompanyId'),
$this->getRequest()->getParam('Type'),
$this->getRequest()->getParam('Pays'),
$this->getRequest()->getParam('Language'),
$this->TestIndication
);
$compactAction = array('getAvisDeCredit' => 'CreditRecommendation', 'getPositionFinanciere' => 'FinancialSummary',
'getStructureEntreprise' => 'Associated', 'getDirigeant' => 'Position'
);
$compact = unserialize(base64_decode($id));
$identiteController = new GiantIdentiteController($compact);
$giantConstroller = new GiantControllerLib($this->getRequest()->getParam('CompanyId').'-'.$this->getRequest()->getParam('Type'));
$identiteController->ficheAction();
$fiche = $identiteController->getObjet('fiche');
foreach($compactAction as $action => $val) {
if(isset($compact->DataSet->Company->$val)) {
$compact = $giantConstroller->$action($compact);
}
}
$fiche = $giantConstroller->getInformationGenerale($compact);
$this->view->carte = $this->getRequest()->getParam('Pays');
$this->view->reportType = $this->getRequest()->getParam('Type');
$this->view->report = $fiche;
$this->view->Type = $this->getRequest()->getParam('Type');
$this->view->dateFunction = new WDate();
}
public function fullAction()
{
$giantController = new GiantControllerLib($this->getRequest()->getParam('CompanyId').'-'.$this->getRequest()->getParam('Type'));
$id = $giantController->commande($this->getRequest()->getParam('CompanyId'),
$this->getRequest()->getParam('Type'),
$this->getRequest()->getParam('Pays'),
$this->getRequest()->getParam('Language'),
$this->TestIndication
);
$fullAction = array('getAvisDeCredit' => 'CreditRecommendation', 'getComptesAnnuels' => 'AnnualAccounts', 'getPositionFinanciere' => 'FinancialSummary',
'getComportementPaiement' => 'PaymentBehaviour', 'getStructureEntreprise' => 'Associated', 'getDirigeant' => 'Position',
'getComparaisonValeurs'=> 'PeerGroup', 'getHistoriques' => 'Event'
);
$full = unserialize(base64_decode($id));
$full->DataSet->Company->CompanyId= $this->getRequest()->getParam('CompanyId');
$identiteController = new GiantIdentiteController($full);
$giantConstroller = new GiantControllerLib($this->getRequest()->getParam('CompanyId').'-'.$this->getRequest()->getParam('Type'));
$identiteController->ficheAction();
$fiche = $identiteController->getObjet('fiche');
foreach($fullAction as $action => $val) {
if(isset($full->DataSet->Company->$val))
$full = $giantConstroller->$action($full);
}
$fiche = $giantConstroller->getInformationGenerale($full);
$this->view->carte = $this->getRequest()->getParam('Pays');
$this->view->reportType = $this->getRequest()->getParam('Type');
$this->view->report = $fiche;
$this->view->Type = $this->getRequest()->getParam('Type');
$this->view->dateFunction = new WDate();
}
public function getForm()
{
$form = new Zend_Form();
$form->setMethod('post')
->setAction('investigation');
$reference = $form->createElement('text', 'reference', array('label' => 'Votre Reference'));
$reference->setRequired(true);
$elements[] = $reference;
$telephone = $form->createElement('text', 'telephone', array('label' => 'Votre téléphone'));
$telephone->setRequired(true);
$elements[] = $telephone;
$mail = $form->createElement('text', 'mail', array('label' => 'Adresse Email'));
$mail->setRequired(true);
$elements[] = $mail;
$elements[] = $form->createElement('textarea', 'remarque', array('label' => 'Remarque ou commentaire à destination de l\'enquêteur :'));
$elements[] = $form->createElement('text', 'domiciliation', array('label' => 'Domiciliation Bancaire :'));
$elements[] = $form->createElement('text', 'Encours', array('label' => 'Encours demandé :'));
$elements[] = $form->createElement('text', 'nbEcheance', array('label' => 'Nombre d\'échéances :'));
$form->addElements($elements)
->addElement('submit', 'Envoyer', array('label' => 'Envoyer'));
return ($form);
}
public function investigationAction()
{
if($this->getRequest()->isPost()) {
$data = $this->getRequest()->getPost();
if($this->getForm()->isValid($data))
$this->view->form = $this->getRequest()->getParam('reference');
else {
return ($this->view->form = $this->getForm());
}
} else
$this->view->form = $this->getForm();
}
public function startmonitoringAction()
{
$this->_helper->layout()->disableLayout();
$this->view->headLink()->appendStylesheet('/themes/default/styles/giant.css', 'all');
$this->view->lang = $this->getRequest()->getParam('lang');
$this->view->CompanyId = $this->getRequest()->getParam('CompanyId');
$this->view->Pays = $this->getRequest()->getParam('Pays');
$this->view->CompanyName = $this->getRequest()->getParam('CompanyName');
$this->view->action = $this->getRequest()->getParam('action');
$this->view->values = $this->getRequest()->getParams();
if ($this->getRequest()->isPost()) {
$giantController = new GiantControllerLib($this->getRequest()->getParam('CompanyId'));
$result = $giantController->startmonitoring($this->getRequest()->getParam('CompanyId'),
$this->getRequest()->getParam('CategoryName'),
$this->getRequest()->getParam('EventType'),
$this->getRequest()->getParam('StartDate'),
$this->getRequest()->getParam('EndDate'),
$this->getRequest()->getParam('Version'),
$this->getRequest()->getParam('LanguageCode'),
$this->getRequest()->getParam('Pays'),
$this->TestIndication
);
$this->view->result = $result;
}
}
public function stopmonitoringAction()
{
$this->_helper->layout()->disableLayout();
$this->view->headLink()->appendStylesheet('/themes/default/styles/giant.css', 'all');
$this->view->CompanyId = $this->getRequest()->getParam('CompanyId');
$this->view->Pays = $this->getRequest()->getParam('Pays');
$this->view->InternalOrderId = $this->getRequest()->getParam('InternalOrderId');
$this->view->CompanyName = $this->getRequest()->getParam('CompanyName');
$this->view->action = $this->getRequest()->getParam('action');
$this->view->values = $this->getRequest()->getParams();
if ($this->getRequest()->isPost()) {
$giantController = new GiantControllerLib($this->getRequest()->getParam('CompanyId'));
$result = $giantController->stopmonitoring($this->getRequest()->getParam('CompanyId'),
$this->getRequest()->getParam('EndDate'),
$this->getRequest()->getParam('InternalOrderId'),
$this->getRequest()->getParam('Pays'),
$this->TestIndication
);
$this->view->result = $result;
}
}
public function updatemonitoringAction()
{
$this->_helper->layout()->disableLayout();
$this->view->headLink()->appendStylesheet('/themes/default/styles/giant.css', 'all');
$this->view->lang = $this->getRequest()->getParam('lang');
$this->view->CompanyId = $this->getRequest()->getParam('CompanyId');
$this->view->Pays = $this->getRequest()->getParam('Pays');
$this->view->CompanyName = $this->getRequest()->getParam('CompanyName');
$this->view->action = $this->getRequest()->getParam('action');
$this->view->values = $this->getRequest()->getParams();
if ($this->getRequest()->isPost()) {
$giantController = new GiantControllerLib($this->getRequest()->getParam('CompanyId'));
$result = $giantController->updatemonitoring($this->getRequest()->getParam('CompanyId'),
$this->getRequest()->getParam('InternalOrderId'),
$this->getRequest()->getParam('CategoryName'),
$this->getRequest()->getParam('EventType'),
$this->getRequest()->getParam('StartDate'),
$this->getRequest()->getParam('Version'),
$this->getRequest()->getParam('LanguageCode'),
$this->getRequest()->getParam('Pays'),
$this->TestIndication
);
$this->view->result = $result;
}
}
public function retrivemonitoringAction()
{
$this->view->headScript()->appendFile('/themes/default/scripts/giant_monitoring.js', 'text/javascript');
$this->view->CompanyId = $this->getRequest()->getParam('CompanyId');
$this->view->Pays = $this->getRequest()->getParam('Pays');
$this->view->CompanyName = $this->getRequest()->getParam('CompanyName');
$this->view->action = $this->getRequest()->getParam('action');
$this->view->values = $this->getRequest()->getParams();
$giantController = new GiantControllerLib($this->getRequest()->getParam('CompanyId'));
$result = $giantController->retrivemonitoring($this->getRequest()->getParam('CompanyId'),
$this->getRequest()->getParam('StartFrom'),
$this->getRequest()->getParam('InternalOrderId'),
$this->getRequest()->getParam('Pays'),
$this->TestIndication,
$this->getRequest()->getParam('monitor_type')
);
$this->view->result = $result;
$merged =Array();
foreach ($result->MonitoringEvents->MonitoringEvent as $MonitoringEvent):
if ($merged[$MonitoringEvent->Company->Event[0]->EventCode]){
array_push($merged[$MonitoringEvent->Company->Event[0]->EventCode],$MonitoringEvent) ;
} else {
$merged[$MonitoringEvent->Company->Event[0]->EventCode][]=$MonitoringEvent;
}
endforeach;
$this->view->val = $merged;
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,58 +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);
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,452 +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';
require_once 'Scores/SessionEntreprise.php';
require_once 'common/dates.php';
}
/**
* Affichage de la liste des annonces ou d'une annonce
*/
public function annoncesAction()
{
$request = $this->getRequest();
$vue = $request->getParam('vue', 'bodacc');
$p = $request->getParam('p', 1);
$this->view->assign('p', $p);
$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 SessionEntreprise($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') {
$this->view->assign('AutreSource', true);
} else {
$this->view->assign('vue', $vue);
$nbAnnonces = 20;
$position = ($p-1)*$nbAnnonces;
$ws = new WsScores();
switch ( $vue ) {
case 'bodacc':
case 'abod':
default:
if(intval($siren)==0) {
$idAnn = $session->getSourceId();
}
$infos = $ws->getAnnoncesLegales($siren, $idAnn, null, $position, $nbAnnonces);
break;
case 'balo':
$infos = $ws->getAnnoncesBalo($siren, $idAnn, null, $position, $nbAnnonces);
break;
case 'asso':
if ( intval($siren)==0 && substr($session->getAutreId(),0,1)=='W' ) {
$infos = $ws->getAnnoncesAsso($session->getAutreId(), $idAnn, null, $position, $nbAnnonces);
} elseif (intval($siren)!=0) {
$infos = $ws->getAnnoncesAsso($siren, $idAnn, null, $position, $nbAnnonces);
} else {
$idAnn = $session->getSourceId();
$infos = $ws->getAnnoncesAsso($siren, $idAnn, null, $position, $nbAnnonces);
}
break;
case 'bomp':
$filtre = $request->getParam('filtre', null);
$this->view->assign('filtre', $filtre);
$infos = $ws->getAnnoncesBoamp($siren, $idAnn, $filtre, $position, $nbAnnonces);
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 {
//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 {
$nbReponses = $infos->nbReponses;
$nbPages = ceil($nbReponses/$nbAnnonces);
//Attention ajout des filtres
if ( $p <= 1 ) {
$lienPagePrecedente = false;
} else {
$lienPagePrecedente = $this->view->url(array(
'controller' => 'juridique',
'action' => 'annonces',
'vue'=> $vue,
'p' => $p-1
));
}
if ( $p+1 > $nbPages ) {
$lienPageSuivante = false;
} else {
$lienPageSuivante = $this->view->url(array(
'controller' => 'juridique',
'action' => 'annonces',
'vue' => $vue,
'p' => $p+1
));
}
$this->view->assign('nbPages',$nbPages);
$this->view->assign('lienPagePrecedente',$lienPagePrecedente);
$this->view->assign('lienPageSuivante',$lienPageSuivante);
foreach ($typeAnnonces as $type)
{
$classType = 'annonces'.$type;
$annonces = array();
if (count($objAnnonces->$classType)>0)
{
foreach($objAnnonces->$classType as $ann)
{
Zend_Registry::get('firebug')->info('id:'.$ann->id.', deleted:'.$ann->deleted);
$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()
{
$request = $this->getRequest();
$idAnn = $request->getParam('idann', false);
$siren = substr($this->siret, 0,9);
$session = new SessionEntreprise($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 ) {
$annonces[] = array(
'id' => $item->id,
'titre' => $item->titre,
'communique' => $item->communique,
'source' => $item->source,
'DateParution' => WDate::dateT('Y-m-d','d/m/Y',$item->DateParution),
'dateInsertionSD' => WDate::dateT('Y-m-d','d/m/Y',$item->dateInsertionSD),
);
}
}
$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()
{
$request = $this->getRequest();
$type = $request->getParam('type', '');
$siren = substr($this->siret,0,9);
$session = new SessionEntreprise($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()
{
$siren = substr($this->siret, 0,9);
$session = new SessionEntreprise($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->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 SessionEntreprise($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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,300 +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);
require_once 'common/curl.php';
// 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)) {
// On check si le fichier est present sur l'url
Zend_Registry::get('firebug')->info('URL : '.$url);
$url_tab = getUrl($url, '', '', '', false);
if ($url_tab['code'] == 408 ||
$url_tab['code'] == 400 ||
$url_tab['code'] == 404) {
// Fichier non disponible
Zend_Registry::get('firebug')->info('Fichier non disponible !');
return false;
} else {
// Ecriture du fichier sur le serveur en local
$body = $url_tab['body'];
Zend_Registry::get('firebug')->info('Taille fichier '.strlen($body));
if ( strlen($body) ) {
$fp = fopen($this->path.'/'.$file, 'w');
fwrite($fp, $body);
fclose($fp);
Zend_Registry::get('firebug')->info('Ecriture fichier : '.$this->path.'/'.$file);
}
}
}
return $file;
}
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,680 +0,0 @@
<?php
class UserController extends Zend_Controller_Action
{
/**
* Récupére les valeurs du profil depuis le webservice
* @param unknown_type $login
* @param unknown_type $password
*/
protected function updateProfil($login, $password)
{
Zend_Registry::get('firebug')->info('updateProfil');
$ws = new WsScores();
$utilisateur = new Scores_Utilisateur();
$InfosLogin = $ws->getInfosLogin($login, $_SERVER['REMOTE_ADDR']);
$identity = new stdClass;
$identity->username = $login;
$identity->password = $password;
$identity->email = $InfosLogin->result->email;
$identity->profil = $InfosLogin->result->profil;
$identity->pref = $InfosLogin->result->pref;
$identity->droits = $InfosLogin->result->droits;
$identity->droitsClients = $InfosLogin->result->droitsClients;
$identity->nom = $InfosLogin->result->nom;
$identity->prenom = $InfosLogin->result->prenom;
$identity->tel = $InfosLogin->result->tel;
$identity->fax = $InfosLogin->result->fax;
$identity->mobile = $InfosLogin->result->mobile;
$identity->id = $InfosLogin->result->id;
$identity->idClient = $InfosLogin->result->idClient;
$identity->reference = $InfosLogin->result->reference;
$identity->nbReponses = $InfosLogin->result->nbReponses;
$identity->typeScore = $InfosLogin->result->typeScore;
$identity->dateValidation = $InfosLogin->result->dateValidation;
$identity->nombreConnexions = $InfosLogin->result->nombreConnexions;
$identity->dateDerniereConnexion = $InfosLogin->result->dateDerniereConnexion;
$identity->dateDebutCompte = $InfosLogin->result->dateDebutCompte;
$identity->dateFinCompte = $InfosLogin->result->dateFinCompte;
$identity->ip = $_SERVER['REMOTE_ADDR'];
$identity->timeout = (!empty($InfosLogin->result->timeout)) ?
$InfosLogin->result->timeout : 1800;
$identity->time = time() + $identity->timeout;
$identity->modeEdition = false;
$identity->acceptationCGU = $InfosLogin->result->acceptationCGU;
$lang = in_array($InfosLogin->result->lang,array('fr','en')) ? $InfosLogin->result->lang : 'fr';
$identity->lang = $lang;
$identity->langtmp = $lang;
$identity->browser = $utilisateur->getBrowserInfo();
return $identity;
}
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) {
$identity = $this->updateProfil($identity->username, $identity->password);
$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_AuthAdapter($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();
$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 de envoi des identifiants<br /><br />";
$mailbody .= "S'il vous plaît envoyez-moi encore une fois l'identifiant et/ou le mot de passe qui me permettra d'avoir un accès au site.";
$mailbody .= "<p>Ci-dessous, les informations nécessaire pour me contacter:</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>Raison Sociale:</strong></td><td>".$params['rsociale']."</td></tr></table>";
require_once 'Scores/Mail.php';
$mail = new Mail();
$mail->setSubject("Demande de envoi des identifiants");
$mail->setBodyHTML($mailbody);
$mail->setFrom('support');
$mail->addToKey('support');
$mail->setReplyTo($params['email']);
try {
$mail->send();
$message = "Votre demande avec les informations suivantes a été envoyée. Nous vous contacterons prochainement.";
}
catch ( Zend_Mail_Transport_Exception $e ){
$message = $e->getMessage();
}
}
$this->view->assign('message', $message);
}
$this->view->assign('params', $params);
}
}

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -1,31 +1,4 @@
<?php
//General
$this->translate('Scores & Decisions');
$this->translate('Page');
$this->translate('Dernière mise à jour le');
$this->translate('Oui');
$this->translate('Non');
$this->translate('Edition');
$this->translate('Mettre sous surveillance');
$this->translate('Néant');
$this->translate('Aucune information');
$this->translate('Mois');
//Bouttons
$this->translate('Recherche');
$this->translate('Effacer');
$this->translate('Ok');
$this->translate('Sauver');
$this->translate('ici');
$this->translate('Modifier le client');
$this->translate('Valider');
//Header
//Footer
$this->translate('Mentions légales');
$this->translate('Scores & Decisions SAS - Tous droits réservés - ');
//Menu
$this->translate('RECHERCHES');
$this->translate('Rechercher une entreprise');
@ -92,868 +65,4 @@ $this->translate('GESTION S&D');
$this->translate('Gestion');
$this->translate('Saisie / Edition');
$this->translate('Saisie Fiche Etrangère');
//Rechercher une entreprise
$this->translate('RECHERCHE ENTREPRISE');
$this->translate('SIREN');
$this->translate('RAISON SOCIALE / ENSEIGNE / SIGLE');
$this->translate('N° & Voie');
$this->translate('CP OU DÉP. / VILLE');
$this->translate('TÉL / FAX');
$this->translate('NAF');
$this->translate('Forme Juridique');
$this->translate('Pays');
$this->translate('Recherche par SIREN, SIRET, N° TVA intracommunautaire, N° RC, R.N.A., ISIN');
$this->translate('Accès direct à la fiche identité (Racourci clavier : Maintenir CTRL puis ENTREE)');
$this->translate('France');
$this->translate('Belgique');
$this->translate('Espagne');
$this->translate('Royaume-Uni');
$this->translate('Pays-Bas');
//Rechercher par dirigeant
$this->translate('RECHERCHE DIRIGEANT');
$this->translate('PRENOM');
$this->translate('NOM');
$this->translate('DATE NAISSANCE');
$this->translate('CP OU DEP. / VILLE DE NAISSANCE');
//Rechercher une annonce
$this->translate('Rechercher une annonce');
$this->translate('Source');
$this->translate('Bodacc');
$this->translate('Historique jusqu\'à');
$this->translate('Année ou Date de parution');
$this->translate('Numéro de parution');
$this->translate('Page');
$this->translate('Numéro d\'annonce');
$this->translate('BODACC / BORC');
$this->translate('JO Association');
$this->translate('BALO');
$this->translate('Désélection');
//Rechercher par actionnaire
$this->translate('RECHERCHE PAR ACTIONNAIRE');
$this->translate('SIREN');
$this->translate('RAISON SOCIAL / NOM');
$this->translate('CP OU DEP./VILLE');
$this->translate('PAYS');
$this->translate('PAR ACTION, DE');
$this->translate('A');
//Dernière recherche
$this->translate('réponses avec les critères');
$this->translate('résultats affichés.');
$this->translate('Exporter les résultats de la recherche en CSV.');
$this->translate('Si aucun résultat ne correspond à votre recherche.');
$this->translate('Cliquez-ici.');
$this->translate('Afficher tous les résultats');
$this->translate('Afficher uniquement les actifs');
$this->translate('Afficher uniquement les inactifs');
//Liste des dernières recherches
$this->translate('LISTE DE VOS DERNIÈRES RECHERCHE');
$this->translate('RECHERCHE ENTREPRISE');
$this->translate('Lancer la recherche');
$this->translate('Afficher le formulaire');
//Fiche d'identité
$this->translate('FICHE D\'IDENTITÉ');
$this->translate('Numéro identifiant Siret');
$this->translate('Numéro de TVA Intracom.');
$this->translate('Numéro R.C.');
$this->translate('Etablissement actif');
$this->translate('Situation au répertoire SIRENE');
$this->translate('Situation juridique Actif au RCS');
$this->translate('Raison sociale & Coordonnées');
$this->translate('Raison Sociale');
$this->translate('Forme juridique');
$this->translate('Date d\'immatriculation');
$this->translate('Création de l\'entreprise');
$this->translate('Création de l\'établissement');
$this->translate('Adresse');
$this->translate('Téléphone');
$this->translate('Fax');
$this->translate('Site Internet');
$this->translate('Courriel');
$this->translate('Activité(s) & Chiffre d\'affaires');
$this->translate('Activité de l\'entreprise');
$this->translate('Activité de l\'établissement');
$this->translate('Anciens codes NAF');
$this->translate('Codes NACE');
$this->translate('Type d\'exploitation');
$this->translate('Nombre d\'établissements actifs');
$this->translate('Capital');
$this->translate('Chiffre d\'affaires estimé');
$this->translate('Principaux Dirigeants');
$this->translate('Effectif de l\'entreprise');
$this->translate('Localisation géographique');
$this->translate('Information géographique :');
$this->translate('Latitude :');
$this->translate('Longitude :');
$this->translate('Afficher l\'adresse sur Google Map');
$this->translate('Code commune / Rivoli :');
$this->translate('Iris :');
$this->translate('Code :');
$this->translate('Libellé :');
$this->translate('Information presse (Source Google News ©)');
$this->translate('La consultation ou la réception de documents n\'entraîne aucun transfert de droit de propriété intellectuelle en faveur du Client. Ce dernier s\'engage à ne pas rediffuser ou reproduire les données fournies autrement que pour son usage dans le cadre de la relation contractuelle établie entre Scores & Decisions SAS et "le Client".');
//Fiche Procédure Collective
$this->translate('FICHE PROCÉDURE COLLECTIVES');
$this->translate('Numéro identifiant Siret');
$this->translate('Numéro de TVA Intracom.');
$this->translate('Code ISIN');
$this->translate('Capitalisation');
$this->translate('Numéro R.C.');
$this->translate('Etablissement actif');
$this->translate('Raison sociale & Coordonnées');
$this->translate('Raison Sociale');
$this->translate('Forme juridique');
$this->translate('Composition et répartition du capital social');
$this->translate('Information à vérifier dans les derniers statuts');
$this->translate('Diminution de capital');
$this->translate('Augmentation de capital');
$this->translate('publié au');
$this->translate('Organes de la procédure');
$this->translate('Types de procédure');
$this->translate('Potentiel de récupération et réalisation d\'actifs');
$this->translate('Dépôt des comptes annuels et des comptes consolidés');
$this->translate('Dépôt des comptes annuels');
$this->translate('Dépôt des comptes consolidés');
$this->translate('Jugements de clôture');
$this->translate('Autres événements');
$this->translate('Procédure d\'insolvabilité européene');
//Liste des établissements
$this->translate('LISTE DES ÉTABLISSEMNTS');
$this->translate('Actif/Inactif');
$this->translate('Tous');
$this->translate('Actif');
$this->translate('Inactif');
$this->translate('Établissements');
$this->translate('siège actif');
$this->translate('établ. inactif');
$this->translate('L\'entreprise à 1 établissements actifs et 1 établissements radiés');
//Liens inter-entreprises
$this->translate('LIENS INTER-ENTREPRISES');
$this->translate('Organigramme du groupe');
$this->translate('Documents');
$this->translate('Aucun document');
$this->translate('Lier un document');
$this->translate('organigramme du groupe');
$this->translate('Editer la fiche');
$this->translate('Actionnariat');
$this->translate('Ajouter un actionnaire');
$this->translate('PUBLIC / BOURSE');
$this->translate('FFP');
$this->translate('ETABLISSEMENTS %s FRERES');
$this->translate('FAMILLE %s');
$this->translate('Participations');
$this->translate('Ajouter une participation');
$this->translate('Fonctions de directions');
$this->translate('Administrateur');
$this->translate('Chargement...');
$this->translate('Les données transmises sont indicatives et traitées en conformité avec les usages en vigueur. Scores & Decisions SAS agrège et fournit l\'information en l\'état et ne saurait accorder une garantie quelconque notamment pour la fiabilité, l\'actualité, l\'exhaustivité des données. La responsabilité de Scores & Decisions SAS ne pourra être engagée pour tout dommage indirect et notamment pour manque à gagner, préjudice commercial ou financier, recours de tiers, cette liste nétant pas limitative. "Le Client" recherche, sélectionne et interprète les données sous sa propre responsabilité');
//Informations Groupe
$this->translate('Informations Groupe');
$this->translate('Siren');
$this->translate('TVA');
$this->translate('RCS PARIS');
$this->translate('ISIN');
$this->translate('Nom du groupe');
$this->translate('Sigle');
$this->translate('Adresse');
$this->translate('Code Commune');
$this->translate('Tél.');
$this->translate('Fax');
$this->translate('Site Web');
$this->translate('Année de création');
$this->translate('Grand Groupe Français');
$this->translate('Nombre d\'entreprises Française du groupe');
$this->translate('Effectif salarié du groupe en France');
$this->translate('CA France');
$this->translate('CA Export');
$this->translate('Organigramme du groupe');
$this->translate('Secteurs');
$this->translate('Nb Entrep.');
$this->translate('CA');
$this->translate('Effectif');
//Modifications INSEE
$this->translate('LISTE DES ÉVÉNEMENTS');
$this->translate('Mettre sous surveillance Insee');
$this->translate('Événements INSEE');
//Liste des dirigeants
$this->translate('DIRIGEANTS');
$this->translate('Mettre sous surveillance Dirigeants');
$this->translate('Consulter la liste des dirigeants opérationnels');
$this->translate('Président du conseil de surveillance');
$this->translate('Président du directoire');
$this->translate('Commissaire aux comptes suppléant');
$this->translate('Commissaire aux comptes titulaire');
$this->translate('Liste des dirigeants actifs');
//Historique des dirigeants
$this->translate('Historique des dirigeants');
$this->translate('Président du directoire');
$this->translate('Membre du directoire');
$this->translate('Membre du conseil de surveillance');
$this->translate('Commissaire aux comptes suppléant');
$this->translate('Commissaire aux comptes titulaire');
//Synthèse
//Bilans, Compte de résultat
//Ratios
//Flux de trésorerie
$this->translate('Flux de Trésorerie');
$this->translate('Type de bilans');
$this->translate('Réel normal ou Simplifié');
$this->translate('Consolidé');
$this->translate('mois');
$this->translate('ACTIVITE');
$this->translate('INVESTISSEMENT');
$this->translate('FINANCEMENT');
$this->translate('VARIATION DE TRESORERIE D\'ACTIF');
$this->translate('Chiffre d\'affaires HT & autres produits d\'exploitation');
$this->translate('Variation des creances clients & autres creances d\'exploitation');
$this->translate('Recettes d\'exploitation');
$this->translate('Achats & autres charges d\'exploitation');
$this->translate('Variation des dettes fournisseurs & autres dettes d\'exploitation');
$this->translate('Depenses d\'exploitation');
$this->translate('Excedent de Tresorerie d\'Exploitation');
$this->translate('Flux lies aux operations hors exploitation');
$this->translate('Interets bancaires');
$this->translate('Impots sur les benefices');
$this->translate('Flux affectes a la participation des salaries');
$this->translate('Dividendes verses');
$this->translate('Flux de tresorerie interne');
$this->translate('Investissements d\'exploitation hors production immobilisee');
$this->translate('Acquisition de participations & autres titres immobilises');
$this->translate('Variation des autres actifs immobilises hors charges a repartir');
$this->translate('Subventions d\'investissement recues');
$this->translate('Variation des dettes sur immobilisations');
$this->translate('Encaissements sur cessions d\'immobilisations');
$this->translate('Flux d\'investissement');
$this->translate('Augmentation-Reduction de capital');
$this->translate('Variation des creances sur capital appele non verse');
$this->translate('Flux du capital');
$this->translate('Variation des emprunts');
$this->translate('Variation de la tresorerie du passif');
$this->translate('Flux du financement');
$this->translate('Variation du disponible');
$this->translate('Variation des valeurs mobilieres de placement');
$this->translate('Variation de la tresorerie d\'actif');
//Liasse fiscale
$this->translate('Valeurs exprimées en');
$this->translate('Millesime');
$this->translate('Corriger le bilan sélectionné');
$this->translate('ou Saisir une nouvelle liasse au format');
$this->translate('Normal');
$this->translate('Consolidé');
$this->translate('Simplifié');
$this->translate('Exporter en fichier Excel.');
$this->translate('Vous possèdez un bilan plus récent');
$this->translate('Mettre sous surveillance Bilans');
$this->translate('Actif');
$this->translate('Passif');
$this->translate('Compte de résultat');
$this->translate('Valeurs exprimées en K€');
$this->translate('Capital souscrit non appelé');
$this->translate('Frais d\'établissement');
$this->translate('Frais de rech. et dév.');
$this->translate('Immobilisations incorporelles');
$this->translate('Concessions, brevets, ...');
$this->translate('Fond commercial');
$this->translate('Autres immo. incorporelles');
$this->translate('Avances et acomptes sur immo. incorp.');
$this->translate('Terrains');
$this->translate('Constructions');
$this->translate('Instal. techniques, ...');
$this->translate('Autres immo. corp.');
$this->translate('Immobilisations corporelles');
$this->translate('Immo. en cours');
$this->translate('Avances et acomptes');
$this->translate('Participations évaluées selon la méthode de mise en équivalence');
$this->translate('Autres participations');
$this->translate('Créances rattachées à des participations');
$this->translate('Autres titres immobilisés');
$this->translate('Immobilisations financières');
$this->translate('Prêts');
$this->translate('Autres immo. financières');
$this->translate('Matières 1ère, approvisionnements');
$this->translate('En cours de production de biens');
$this->translate('En cours de production de services');
$this->translate('Stocks');
$this->translate('ACTIF CIRCULANT');
$this->translate('Produits intermédiaires et finis');
$this->translate('Marchandises');
$this->translate('Avances et accomp. versés sur command.');
$this->translate('Clients et comptes rattachés');
$this->translate('Autres créances');
$this->translate('Créances');
$this->translate('Capital souscrit et appelé, non versé');
$this->translate('Valeurs mobilières de placement (dont actions propres)');
$this->translate('Disponibilités');
$this->translate('Divers');
$this->translate('REGULARISATIONS Charges constatées d\'avance');
$this->translate('TOTAL');
$this->translate('');
$this->translate('');
//Bourse & Cotations
$this->translate('INFORMATIONS BOURSIÈRES');
$this->translate('Code Mnémo');
$this->translate('Code Bloomberg');
$this->translate('Code Datastream');
$this->translate('Code Ric');
$this->translate('Place de cotation');
$this->translate('Marché');
$this->translate('Nombre de titres');
$this->translate('Éligible SRD / PEA');
$this->translate('Logo');
$this->translate('Coordonnées');
$this->translate('Adresse');
$this->translate('Date d\'introduction en bourse');
$this->translate('Date dernière assemblée générale');
$this->translate('Téléphone');
$this->translate('Fax');
$this->translate('Site Internet');
$this->translate('Courriel');
$this->translate('Activité(s)');
$this->translate('Activité');
$this->translate('Secteur');
$this->translate('Dernier cours');
$this->translate('Dernière cotation connue');
$this->translate('Clôture');
$this->translate('Ouverture');
$this->translate('Plus haut');
$this->translate('Plus Bas');
$this->translate('Volume échangé');
$this->translate('Capitalisation');
$this->translate('Minimum historique');
$this->translate('Maximum historique');
$this->translate('Cours moyen');
//Relations bancaires
$this->translate('RELATIONS BANCAIRES');
$this->translate('Liste des relations bancaires');
//Annonces Légales
//Information Réglementée
//Compétences Territoriales
$this->translate('Tribunaux');
$this->translate('Administrateurs & Mandataires judiciaires');
$this->translate('Huissiers de justice');
$this->translate('Préfectures & Sous-préfectures');
$this->translate('Centres de formalités des Entreprises (CCI, Greffes, Métiers, Artisanat, Agriculture, URSSAF, Impôts, etc...)');
$this->translate('Journaux d\'Annonces Légales');
//Marques déposées
$this->translate('PROPRIÉTÉ INTELLECTUELLE');
$this->translate('Marque(s) déposée(s)');
$this->translate('Dépôt');
//IndiScore
$this->translate('INDISCORE');
$this->translate('Définir un Cut-off');
$this->translate('Mettre sous surveillance IndiScore');
$this->translate('Saisir votre demande d\'avis credit personnalisé');
$this->translate('Évaluation');
$this->translate('L\'évaluation indiScore© est en partie basée sur les points notables suivants');
$this->translate('Conformité légale :');
$this->translate('L\'analyse de la conformité est correcte.');
$this->translate('Dirigeance :');
$this->translate('L\'étude de la dirigeance ne relève aucun problème.');
$this->translate('Solvabilité :');
$this->translate('L\'analyse de la solvabilité est Bonne');
$this->translate('La situation financière de l\'entreprise ne peut être évaluée en détail car le dernier bilan disponible date de 2010.');
$this->translate('Paiements');
$this->translate('Depuis Mars 2013 : Aucune difficulté significative ne nous a été signalée Paiements à 30 jours maximum');
$this->translate('Conclusion');
$this->translate('Compte tenu des informations disponibles auprès des sources officielles Scores et Décisions présente la conclusion suivante :');
$this->translate('LE SCORE EST DE 17 SUR 20 POINTS');
$this->translate('La tendance de la note est Stable');
$this->translate('L\'ENCOURS MAXIMUM CONSEILLÉ EST DE 500 K€');
//Rapport de synthèse
$this->translate('RAPPORT DE SYNTHESE');
$this->translate('Numéro R.C.');
$this->translate('Etablissement actif');
$this->translate('Situation au répertoire SIRENE');
$this->translate('Raison sociale & Coordonnées');
$this->translate('Forme juridique');
$this->translate('Date d\'immatriculation');
$this->translate('Création de l\'établissement');
$this->translate('Activité(s) & Chiffre d\'affaires');
$this->translate('Activité de l\'entreprise');
$this->translate('Anciens codes NAF');
$this->translate('Origine du fonds');
$this->translate('Type d\'exploitation');
$this->translate('Capital');
$this->translate('Chiffre d\'affaires');
$this->translate('Liste des dirigeants actifs');
$this->translate('Actionnariat');
$this->translate('Ajouter un actionnaire');
$this->translate('Ajouter une participation');
$this->translate('Fonctions de directions');
$this->translate('Eléments financiers');
$this->translate('Paiement');
$this->translate('Depuis');
$this->translate('Aucune difficulté significative ne nous a été signalée Paiements à %s jours maximum');
$this->translate('Procédures collectives');
$this->translate('Situation juridique');
$this->translate('Aucune procédure enregistrée à ce jour par nos services.');
$this->translate('Scores et encours');
$this->translate('Score Afdcc 2');
$this->translate('Score Z');
$this->translate('IndiScore');
$this->translate('Encours conseillé');
$this->translate('Stable');
//Rapport complet
//Valorisation
$this->translate('VALORISATION');
$this->translate('SOCIÉTÉ');
$this->translate('COMMENTAIRES');
$this->translate('BILAN');
$this->translate('Situation financière');
$this->translate('Compte de Résultat');
$this->translate('CONCLUSION');
$this->translate('estimation haute');
$this->translate('estimation basse');
$this->translate('Réserves');
$this->translate('L\'estimation finale devrait intégrer l\'ensemble des dettes à court, moyen et long termes exigibles au moment de la cession.');
//Enquête commerciale
$this->translate('ENQUÊTE COMMERCIALE');
$this->translate('Nos enquêtes commerciales sont réalisées par des analystes financiers.');
$this->translate('Entreprise concernée');
$this->translate('Téléphone / Fax');
$this->translate('Autre téléphone');
$this->translate('E-mail');
$this->translate('Autre e-mail');
$this->translate('Domiciliation bancaire');
$this->translate('Encours demandé');
$this->translate('Nombre d\'échéances');
$this->translate('Avis de l\'assureur crédit');
$this->translate('Favorable');
$this->translate('Défavorable');
$this->translate('Demandeur');
$this->translate('Votre profil');
$this->translate('Votre Identité');
$this->translate('Votre Téléphone');
$this->translate('Votre Fax');
$this->translate('Votre E-mail');
$this->translate('Votre Référence');
$this->translate('Service Achats');
$this->translate('Commerce');
$this->translate('Recouvrement');
$this->translate('Contentieux');
$this->translate('Autre');
$this->translate('Enquête');
$this->translate('Type d\'enquête');
$this->translate('Délais de livraison');
$this->translate('Précisions sur la demande');
$this->translate('Ancienneté de la relation');
$this->translate('Impayées');
$this->translate('Retard de paiement');
$this->translate('Litiges techniques ou commerciaux');
$this->translate('Observations ou questions spéciales');
$this->translate('Envoyez');
$this->translate('EXPRESS');
$this->translate('DECISION');
$this->translate('SECTEUR BTP');
$this->translate('encours inférieur à');
$this->translate('encours supérieur à');
$this->translate('Choisissez...');
$this->translate('Enquête sur un client (contrôl crédit)');
$this->translate('Enquête sur un prospect (ouverture de compte)');
$this->translate('Enquête sur un fournisseur stratégique');
$this->translate('Enquête sur un fournisseur non stratégique');
$this->translate('Autre type d\'enquête (Précisez...)');
$this->translate('%s jours ou +');
//Commande de Pièces
$this->translate('COMMANDES DE PIÈCES');
$this->translate('EXTRAIT KBIS');
$this->translate('Visualiser/Télécharger le kbis');
$this->translate('Recevoir le kbis par email');
$this->translate('Recevoir le kbis original par courrier');
$this->translate('PRIVILÉGES & NANTISSEMENTS');
$this->translate('Privilèges de la sécurité sociale et des régimes complémentaires et Trésor Public
(avec surveillance, retour sous 48 à 72h)');
$this->translate('Privilèges de la sécurité sociale et des régimes complémentaires (mail sous 12h ouvrées)');
$this->translate('Privilèges du Trésor Public (mail sous 12h ouvrées)');
$this->translate('Nantissements du fonds de commerce ou du fonds artisanal (conventionnels et judiciaires)');
$this->translate('Privilèges du vendeur de fonds de commerce et d\'action résolutoire');
$this->translate('Déclarations de créances');
//Comptes annuels
$this->translate('PIÈCES OFFICIELLES');
$this->translate('Mettre sous surveillance Actes');
$this->translate('Compte annuels');
$this->translate('Date de clôture');
$this->translate('Décisions');
$this->translate('Comptes millésime');
//Actes & Status
$this->translate('Actes & Status');
$this->translate('EXTRAIT DE PROCES-VERBAL');
$this->translate('Créer une commande factice');
$this->translate('Acte modificatif');
$this->translate('Nomination/démission des organes de gestion');
$this->translate('Procuration');
$this->translate('PROCES-VERBAL D\'ASSEMBLEE GENERALE ORDINAIRE ET EXTRAORDINAIRE');
$this->translate('Augmentation de Capital');
$this->translate('CERTIFICAT');
$this->translate('STATUTS MIS A JOUR');
$this->translate('DU CONSEIL DE SURVEILLANCE');
//Suivi Privilèges
$this->translate('Synthèse des inscriptions d\'endettement');
$this->translate('Mettre sous surveillance Privilèges');
$this->translate('Privilèges de la sécurité sociale et des régimes complémentaires');
$this->translate('Privilèges du trésor public');
//Nouveautés
$this->translate('Nouveautés');
$this->translate('Liste par date');
$this->translate('Intitulé');
$this->translate('Catégorie');
//Mes options
$this->translate('PROFIL UTILISATEUR');
$this->translate('Identifiant utilisateur');
$this->translate('Identité (NOM/Prénom)');
$this->translate('Réf. facturation (service, etc...)');
$this->translate('Adresse e-mail');
$this->translate('Numéros de téléphone (Fixe, Fax, Mobile)');
$this->translate('Mot de passe');
$this->translate('Relevé de consommation');
$this->translate('Modifier le mot de passe.');
$this->translate('Relevé de consommation');
$this->translate('Détails');
$this->translate('Mois/Année');
$this->translate('Ok');
$this->translate('Langue de l\'interface par défaut');
$this->translate('Informations');
$this->translate('Type d\'appareil actuel');
$this->translate('Résolution d\'écran actuel');
$this->translate('Navigateur actuel');
$this->translate('Poste de travail');
$this->translate('Moteur de recherche');
$this->translate('Résultats par page');
$this->translate('Inclure');
$this->translate('Surveillance');
$this->translate('Supports pour les alertes');
$this->translate('Gestion des droits');
$this->translate('Type de profil');
$this->translate('Droits d\'accès');
$this->translate('Préférences');
$this->translate('les associations');
$this->translate('les actifs');
$this->translate('les radiés');
$this->translate('les établissements secondaires');
$this->translate('SMS');
$this->translate('Fax');
$this->translate('Mail');
$this->translate('Utilisateur');
$this->translate('Administrateur');
$this->translate('SuperAdministrateur');
//Mes surveillances
$this->translate('SURVEILLANCE');
$this->translate('Nombre d\'entités affichées');
$this->translate('Nombre de surveillances');
$this->translate('Extraction des surveillances');
$this->translate('Extraire uniquement les surveillances de type');
$this->translate('toutes');
$this->translate('Anonces');
$this->translate('Insee');
$this->translate('Bilans');
$this->translate('Indiscore');
$this->translate('Actes');
$this->translate('Dirigeants');
$this->translate('Privilèges');
$this->translate('Paiements');
$this->translate('Liens');
$this->translate('Options de recherche');
$this->translate('Afficher uniquement les suveillances de type');
$this->translate('Tri');
$this->translate('croissant');
$this->translate('décroissant');
$this->translate('par');
$this->translate('Siren');
$this->translate('Référence');
$this->translate('Date d\'ajoute');
$this->translate('Date d\'envoi');
$this->translate('Liste des surveillances');
$this->translate('Ajout le');
$this->translate('Envoyé le');
//Mon portefeuille
$this->translate('PORTEFEUILLE');
$this->translate('Nombre d\'entités affichées');
$this->translate('Nombre de surveillances');
$this->translate('Exportation de votre portefeuille');
$this->translate('Exporter votre portefeuille au format CSV');
$this->translate('Options de recherche');
$this->translate('Tri par');
$this->translate('Surveillance Score');
$this->translate('Aucune surveillance Score.');
//Administration
$this->translate('ADMINISTRATION');
$this->translate('Relevé de consommation complet');
$this->translate('Tous les utilisateurs');
$this->translate('Détails');
$this->translate('Liste des profils utilisateurs');
$this->translate('Login');
$this->translate('Actions');
$this->translate('Créer un profil utilisateur');
$this->translate('Mode spéciaux');
$this->translate('Mode Edition');
//Se déconnecter
$this->translate('Vous avez été déconnecté.');
$this->translate('Si cette page ne disparait pas au bout de 5 seconde(s), veuillez cliquer');
//Gestion
$this->translate('Gestion Système');
$this->translate('Gestion des clients');
$this->translate('Gestion des commandes');
$this->translate('Gestion des fichiers nouveautés');
$this->translate('Statistiques');
//Saisie / Edition
$this->translate('IDENTITE DE L\'ENTREPRISE');
$this->translate('Numéro identifiant Siret');
$this->translate('Numéro identifiant Siret du siège');
$this->translate('Raison Sociale');
$this->translate('Adresse');
$this->translate('Établissement');
$this->translate('Activité(s) et Chiffres d\'Affaires');
$this->translate('Code ISIN');
$this->translate('Activité déclarée de l\'entreprise');
$this->translate('Capital Montant');
$this->translate('Capital Devise');
$this->translate('BODACC');
$this->translate('Source');
$this->translate('Date évènement / jugement');
$this->translate('Tribunal');
$this->translate('Évènement / Jugement');
$this->translate('Informations diverses');
$this->translate('Autre siren (doublon)');
$this->translate('Refus dinscription au Registre du Commerce et des Sociétés');
$this->translate('Identifiant R.N.A.');
$this->translate('Entreprise de domiciliation');
$this->translate('Entreprise ayant exercée son droit d\'opposition en');
$this->translate('Sans objet');
//Saisie Fiche Entrangère
$this->translate('Adresse complément');
$this->translate('CP');
$this->translate('Ville');
$this->translate('Pays');
$this->translate('Selectionner un pays pour afficher les identifiants locaux');
$this->translate('Téléphone');
$this->translate('au capital de');
$this->translate('en date du');
$this->translate('découpé en');
$this->translate('action(s)');
$this->translate('(JJ/MM/AAAA)');
//Gestion des clients
$this->translate('GESTION DES CLIENTS');
$this->translate('Créer un client');
$this->translate('Liste des clients');
$this->translate('Actions');
$this->translate('Nom');
$this->translate('Editer');
$this->translate('Prestations fichier');
$this->translate('Tarification');
$this->translate('Services');
$this->translate('Utilisateurs');
$this->translate('EDITION CLIENT');
$this->translate('Identification');
$this->translate('Facturation');
$this->translate('Livraison : Informations sur le destinataire de la livraison');
$this->translate('Paramétrage');
$this->translate('Divers');
$this->translate('Obtention Raison sociale');
$this->translate('Nic du siège');
$this->translate('Siren');
$this->translate('Racine des identifiants');
$this->translate('Test');
$this->translate('Date de signature');
$this->translate('(AAAA-MM-YY)');
$this->translate('Type de contrat');
$this->translate('Commercial S&D');
$this->translate('Contrat');
$this->translate('Marché');
$this->translate('Nom de l\'apporteur d\'affaire');
$this->translate('Type d\'accès Remarques / Observations');
$this->translate('userPassword');
$this->translate('userPasswordIP');
$this->translate('IP');
$this->translate('N° de TVA');
$this->translate('Compte client rattaché');
$this->translate('Editer la facture automatiquement');
$this->translate('Editer le détail de la facture');
$this->translate('Nom du destinataire de la facture');
$this->translate('Adresse1');
$this->translate('Adresse2');
$this->translate('Adresse3');
$this->translate('RIB joint à la facture');
$this->translate('BPOSTALE');
$this->translate('CCOOP');
$this->translate('CDNORD');
$this->translate('Liste des adresses IP');
$this->translate('Aucune IPs.');
$this->translate('Ajouter une adresse IP');
$this->translate('Listes des Droits');
$this->translate('Recherche');
$this->translate('Timeout');
$this->translate('forfaitExtranetPeriode');
$this->translate('forfaitExtranetMontant');
$this->translate('reconductionAuto');
$this->translate('Mensuel');
$this->translate('Trimestriel');
$this->translate('Semestriel');
$this->translate('Nombre de pièces officielles inclues dans le forfait client');
$this->translate('Montant du forfait des pièces officielles');
$this->translate('Tarif unitaire en cas de dépassement');
$this->translate('Nombre d\'investigations inclues dans le forfait client');
$this->translate('Montant du forfait des investigations');
$this->translate('Tarif unitaire pour les indiscore');
$this->translate('Accès Webservice');
$this->translate('Intersud - Login');
$this->translate('Intersud - Mot de passe');
$this->translate('Export des résultats de la recherche');
$this->translate('Investigation par l\'image IparI');
$this->translate('Historique des annonces bodacc');
$this->translate('Investigation');
$this->translate('Recherche Entreprise');
$this->translate('Recherche Dirigeant');
$this->translate('Recherche Actionnaire');
$this->translate('Fiche d\'identité');
$this->translate('Fiche procédure collective');
$this->translate('Liens inter-entreprise');
$this->translate('Liste des établissements');
$this->translate('Informations et organigramme du groupe');
$this->translate('Évènements INSEE');
$this->translate('Avis de situation INSEE');
$this->translate('Liste des dirigeants');
$this->translate('Liste des dirigeants opérationnels');
$this->translate('Synthèse');
$this->translate('Ratios');
$this->translate('Flux de trésorerie');
$this->translate('Liasse fiscale');
$this->translate('Export des Liasses au format XLS');
$this->translate('Saisie de bilan');
$this->translate('Bourse & cotations');
$this->translate('Relations bancaires');
$this->translate('Annonces légales');
$this->translate('Informations réglementée');
$this->translate('Compétences territoriales');
$this->translate('Conventions collectives');
$this->translate('Marques déposées');
$this->translate('indiScore');
$this->translate('Rapport synthetique');
$this->translate('Rapport complet');
$this->translate('Enquête commerciale');
$this->translate('Avis de crédit personnalisé');
$this->translate('Extrait RCS');
$this->translate('Pièces officielles');
$this->translate('Privilèges');
$this->translate('Surveillance des annonces légales');
$this->translate('Surveillance des événements INSEE');
$this->translate('Surveillance des bilans');
$this->translate('Surveillance des événements sur le score');
$this->translate('Surveillance des actes');
$this->translate('Surveillance des dirigeants');
$this->translate('Surveillance des paiements');
$this->translate('Surveillance des liens financiers');
$this->translate('Surveillance des privilèges');
$this->translate('Mon profil');
$this->translate('Liste des surveillances');
$this->translate('Portefeuille');
$this->translate('Mode Edition');
$this->translate('Recherche Internationale');
$this->translate('Banque de France');
$this->translate('Gestion des commandes kbis');
$this->translate('Gestion des commandes greffes');
$this->translate('Gestion des commandes KBIS');
$this->translate('Gestion des commandes');
$this->translate('Rechercher une commande');
$this->translate('N° de commande ou siren');
$this->translate('Etat');
$this->translate('Mode');
$this->translate('courrier S&D');
$this->translate('e-mail');
$this->translate('Liste des commandes');
$this->translate('Aucunes commandes.');
$this->translate('Gestion des nouveautés');
$this->translate('Catégorie');
$this->translate('Intitulé');
$this->translate('Fichier PDF');
$this->translate('Format AAAA-MM-JJ');
$this->translate('Toutes les statistiques');
$this->translate('Navigateur');
$this->translate('Résolution d\'écran');
$this->translate('Type d\'appareil');
$this->translate('Ordinateur');
$this->translate('Mobile');
$this->translate('Dernière mise à jour le');
$this->translate('Capitalisation');
$this->translate('Forme juridique à l\'INSEE: Autre SA à directoire (5699)');
$this->translate('France');
$this->translate('Belgium');
$this->translate('United Kingdom');
$this->translate('Spain');
$this->translate('The Netherlands');
$this->translate('');
$this->translate('');
$this->translate('');
$this->translate('');
$this->translate('');
$this->translate('');
$this->translate('');
$this->translate('');
$this->translate('');
$this->translate('');
$this->translate('');
$this->translate('');
$this->translate('');
$this->translate('');
$this->translate('');
$this->translate('');
$this->translate('');
$this->translate('');
$this->translate('');
$this->translate('');
$this->translate('');
$this->translate('');
$this->translate('');
$this->translate('');
$this->translate('');
//Dashboard controller
$this->translate('Ordinateur');
$this->translate('Mobile');
$this->translate('Navigateur');
$this->translate('Résolution d\'écran');
$this->translate('Type d\'appareil');
?>

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

@ -0,0 +1,43 @@
<?php if ($this->navigation()->menu()->hasPages()) { ?>
<div id="menu">
<div id="logo">
<img src="/themes/default/images/logos/logo_sd.gif" width="200" height="65" />
</div>
<?=$this->navigation()->menu();?>
<div class="icones">
<?php if ($this->print) {?>
<a target="_blank" title="Impression" href="/editer/ecran/<?=$this->print.'.html'?>">
<img alt="<?=$this->translate("Impression")?>" src="/themes/default/images/interfaces/printer.png">
</a>
<?php }?>
<?php if ($this->pdf) {?>
<a target="_blank" title="Impression PDF" href="/editer/pdf/<?=$this->pdf.'.pdf'?>">
<img alt="<?=$this->translate("Impression en PDF")?>" src="/themes/default/images/interfaces/pdf.png">
</a>
<?php }?>
<?php if ($this->xml) {?>
<a target="_blank" title="Export XML" href="/editer/xml/<?=$this->xml.'.xml'?>">
<img alt="<?=$this->translate("Export en XML")?>" src="/themes/default/images/interfaces/xml.png">
</a>
<?php }?>
<?php if ($this->aide) {?>
<a id="aideLigne" title="Aide en ligne" href="#">
<img alt="<?=$this->translate("Activer l'aide en ligne")?>" src="/themes/default/images/interfaces/aideligne.png">
</a>
<?php }?>
</div>
</div>
<script>
$('div#menu ul.navigation').accordion({
header: '.header',
autoHeight: false,
collapsible: true,
heightStyle: "content",
active: <?=$this->menuId?>
});
</script>
<?php }?>

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);
@ -35,6 +51,8 @@ class AideController extends Zend_Controller_Action
*/
public function newlisteAction()
{
$this->view->headTitle()->prepend('Nouveautés');
$request = $this->getRequest();
//Selection
@ -47,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();
@ -58,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();
@ -66,12 +88,16 @@ class AideController extends Zend_Controller_Action
$identity->acceptationCGU = date('Y-m-d H:i:s');
$auth->getStorage()->write($identity);
//Redirect
$this->_redirect('/');
$this->redirect('/');
}
}
}
/**
* 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,11 +1,28 @@
<?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()
{
$request = $this->getRequest();
//Type de module
$module = $request->getParam('module', '');
$siret = $request->getParam('siret', '');
@ -16,18 +33,18 @@ class BdfController extends Zend_Controller_Action
$rechet = $request->getParam('rechet', '');
$ape = $request->getParam('ape', '');
$service = $request->getParam('service', '');
if ($siret != '' && $req != '' && substr($siret, 0, 9) != $req) {
$siret = '';
} else if (substr($siret, 0, 9) == $req || empty($req)) {
$req = substr($siret, 0, 9);
}
if (is_array($module)){
$session = new Zend_Session_Namespace('BDF');
$session->module = $module;
}
//Titre
$title = 'Banque De France - '.strtoupper($service);
if ($siret == '') {
@ -35,30 +52,30 @@ class BdfController extends Zend_Controller_Action
} else {
$title .= substr($siren,0,9);
}
$this->view->headTitle()->append('Banque de France - '.$titre);
$this->view->headTitle()->prepend('Banque de France - '.$titre);
require_once 'Scores/Bdf.php';
$bdf = new BDF();
$this->view->assign('siret', $siret);
$this->view->assign('req', $req);
$this->view->assign('module', $session->module);
//Liste module FIBEN
$listModulesFiben = $bdf->bdf_modules_fiben();
$this->view->assign('listModulesFiben', $listModulesFiben);
//Liste module FCC
$listModulesFcc = $bdf->bdf_modules_fcc();
$this->view->assign('listModulesFcc', $listModulesFcc);
}
public function moduleAction()
{
$request = $this->getRequest();
//Type de module
$module = $request->getParam('bdfmodule', '');
$siret = $request->getParam('siret', '');
@ -69,20 +86,20 @@ class BdfController extends Zend_Controller_Action
$rechet = $request->getParam('rechet', '');
$ape = $request->getParam('ape', '');
$service = $request->getParam('service', '');
if ($siret != '' && $req != '' && substr($siret, 0, 9) != $req) {
$siret = '';
} else if (substr($siret, 0, 9) == $req || empty($req)) {
$req = substr($siret, 0, 9);
}
Zend_Registry::get('firebug')->info($module);
$this->logger->info($module);
$content = array();
require_once 'Scores/Bdf.php';
$bdf = new BDF();
//Mode multi module
if ($type=='u') {
if (is_array($module)) {
@ -136,7 +153,7 @@ class BdfController extends Zend_Controller_Action
}
$this->view->assign('content', $content);
}
public function module27Action()
{
$request = $this->getRequest();
@ -144,7 +161,7 @@ class BdfController extends Zend_Controller_Action
$params['bdfmodule'] = array(27);
$this->_forward('module', null, null, $params);
}
public function module28Action()
{
$request = $this->getRequest();
@ -152,7 +169,7 @@ class BdfController extends Zend_Controller_Action
$params['bdfmodule'] = array(28);
$this->_forward('module', null, null, $params);
}
public function module29Action()
{
$request = $this->getRequest();
@ -160,7 +177,7 @@ class BdfController extends Zend_Controller_Action
$params['bdfmodule'] = array(29);
$this->_forward('module', null, null, $params);
}
public function module40Action()
{
$request = $this->getRequest();
@ -168,7 +185,7 @@ class BdfController extends Zend_Controller_Action
$params['bdfmodule'] = array(40);
$this->_forward('module', null, null, $params);
}
public function module51Action()
{
$request = $this->getRequest();
@ -176,6 +193,6 @@ class BdfController extends Zend_Controller_Action
$params['bdfmodule'] = array(51);
$this->_forward('module', null, null, $params);
}
}

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,8 +134,14 @@ 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';
require_once 'common/dates.php';
}
public function preDispatch()
@ -173,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;
@ -239,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', '');
@ -435,13 +449,14 @@ class DashboardController extends Zend_Controller_Action
$document = 'DERNIER STATUS &Agrave; JOUR';
} else {
$explodedRef = explode('-', $listCommandes[$i]->refDocument);
$dateref = WDate::dateT('Ymd','d/m/Y',$explodedRef[1]);
$date = new Zend_Date($explodedRef[1], 'yyyyMMdd');
$dateref = $date->toString('dd/MM/yyyy');
$depot = ', Dépôt n°'.$explodedRef[6].' au '.$dateref;
$document = $this->typeActes['a'.substr($listCommandes[$i]->refDocument,0,2)].$depot;
}
$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;
@ -521,7 +536,7 @@ class DashboardController extends Zend_Controller_Action
}
/**
* Affichage de la raison sociale à partir du siren
* Affichage de la dénomination sociale à partir du siren
*/
public function rsAction()
{
@ -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

@ -0,0 +1,138 @@
<?php
class DirigeantController extends Zend_Controller_Action
{
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);
require_once 'Scores/WsScores.php';
}
/**
* Affichage de la liste des dirigeants
*/
public function listeAction()
{
$request = $this->getRequest();
$autrePage = $this->getRequest()->getParam('apage');
$siren = substr($this->siret, 0, 9);
if (empty($autrePage)) {
$this->view->headTitle()->prepend('Liste des dirigeants');
$this->view->headTitle()->prepend('Siret '.$this->siret);
}
$ws = new WsScores();
$infos = $ws->getDirigeants($siren);
if ($infos === false){
$this->forward('soap', 'error');
}
$dirigeants = $infos->result->item;
$user = new Scores_Utilisateur();
$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), 'default', true);
$this->view->assign('dirigeantsop', $href);
}
$this->view->assign('edition', $user->checkModeEdition());
$this->view->assign('accessWorldCheck', $user->checkPerm('WORLDCHECK'));
$this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale());
$this->view->assign('dirigeants', $dirigeants);
$this->view->assign('exportObjet', $dirigeants);
$this->view->assign('AutrePage', $this->getRequest()->getParam('apage'));
$this->view->assign('surveillance', $user->checkPerm('survdirigeants'));
}
/**
* Affichage de l'historiques des dirigeants
*/
public function histoAction()
{
$siren = substr($this->siret, 0, 9);
$this->view->headTitle()->prepend('Historique des dirigeants');
$this->view->headTitle()->prepend('Siret '.$this->siret);
$ws = new WsScores();
$infos = $ws->getDirigeants($siren, true);
if ($infos === false){
$this->_forward('soap', 'error');
}
$dirigeants = $infos->result->item;
$session = new Scores_Session_Entreprise($this->siret, $this->id);
$this->view->assign('dirigeants', $dirigeants);
$this->view->assign('exportObjet', $dirigeants);
$this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale());
$this->view->assign('infos', $infos);
$user = new Scores_Utilisateur();
$this->view->assign('surveillance', $user->checkPerm('survdirigeants'));
}
public function opAction()
{
$siren = substr($this->siret, 0, 9);
$this->view->headTitle()->prepend('Liste des dirigeants opérationnels');
$this->view->headTitle()->prepend('Siret '.$this->siret);
$ws = new WsScores();
$infos = $ws->getDirigeantsOp($siren);
if ($infos === false){
$this->_forward('soap', 'error');
}
$dirigeants = $infos->item;
$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());
$this->view->assign('dirigeants', $dirigeants);
$this->view->assign('exportObjet', $dirigeants);
$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,13 +67,12 @@ class ErrorController extends Zend_Controller_Action
$message.= "Referer : ".$_SERVER['HTTP_REFERER']."\n";
$c = Zend_Registry::get('config');
require_once 'Scores/Mail.php';
$mail = new 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

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,447 @@
<?php
require_once 'Giant/WSgiant.php';
require_once 'Giant/Controllers.lib.php';
require_once 'Giant/RequestDatabase.lib.php';
require_once 'Giant/Functions.lib.php';
class GiantController extends Zend_Controller_Action
{
protected $theme;
protected $TestIndication = false;
protected $config = array();
protected $TestCompanies = array(
'BE' => array(
'0439546194', '0436576412', '0430459076', '0430000604', '0404869783', '0404869783',
'0406952018'
),
'ES' => array(
'A00000000', 'A80192727'
),
'GB' => array(
'00000086', '00082932', '98888888', '214436', '1777777', '991581', '1800000'
),
'NL' => array(
'533885', '1383988', '1383989', '891962239', '891974008', '892130032', '896614719',
'896614735', '896614735', '896615243'
),
'FR' => array(
'55214450300018', '49496793800031', '47997411500012', '48765114300017',
'43235433000040', '39435613300022', '39504742600014', '76980020200020',
'35379698000020', '56202109700018', '70204756400068', '70204756400068'
),
);
protected $Companies = array(
'FR' =>'France',
'BE' => 'Belgium',
'ES' => 'Spain',
'GB' => 'United Kingdom',
'NL' => 'The Netherlands',
);
/**
* 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');
$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;
}
public function searchAction()
{
$user = new Scores_Utilisateur();
$params = $this->getRequest()->getParams();
$search = new GiantRechercheController($params['pays'], $this->TestIndication);
$result = $search->Liste($params, $this->getRequest()->getParam('page'));
$this->view->TestIndication= $this->TestIndication;
$this->view->TestCompanies = $this->TestCompanies[$params['pays']];
$this->view->label = $search->getObjet()->getLabelDesc();
$this->view->labelResults = $search->getObjet()->getLabelResults();
$this->view->pays = $params['pays'];
$this->view->currentPage = $search->getObjet()->getCurrentPage();
$this->view->userMaxResult = $user->getNbRep();
$this->view->resultats = $result;
$this->view->page = $this->getRequest()->getParam('page');
$this->view->referer = $search->getObjet()->getQuery();
$this->view->lienReferer = $search->getQueryLink($params);
if($this->view->debug)
$this->view->soap = $search->soapG;
}
public function identiteAction()
{
$rechercheParams = new Scores_Session_Recherche();
$giantFunction = new GiantFunction();
$test = $this->getRequest()->getParam('test');
if($test == true){
$this->TestIndication = true;
}
if (count($rechercheParams->liste()) > 0)
{
$recherche = $rechercheParams->item(0);
$type = $recherche['type'];
$params = $recherche['params'];
}
$Commande = new Commandes();
$user = new Scores_Utilisateur();
$listeCommandes = $Commande->getCommandesByLogin($user->getLogin());
$total = 0;
$liste = $giantFunction->divCommande($listeCommandes, $total);
$ListeRapport = new GiantRechercheController($params['pays'], $this->TestIndication);
$giantController = new GiantControllerLib($this->getRequest()->getParam('CompanyId'));
$result = $giantController->commandePays($this->getRequest()->getParam('CompanyId'),$params['pays'], $this->TestIndication);
$this->view->TestIndication = $this->TestIndication;
$this->view->total = $total;
$this->view->listeCommandes = $liste;
$this->view->modification = (isset($result->MonitoringOptions))?($ListeRapport->getModification($result->MonitoringOptions->MonitoringOption[0])):null;
$this->view->description = $ListeRapport->getDescription();
$this->view->raisonSociale = $this->getRequest()->getParam('raisonSociale');
$this->view->listeRapport = $result;
$this->view->telephone = $this->getRequest()->getParam('telephone');
$this->view->CompanyId = $this->getRequest()->getParam('CompanyId');
$this->view->raisonSociale = $this->getRequest()->getParam('raisonSociale');
$this->view->CompanyRegisterNumber = $this->getRequest()->getParam('CompanyRegisterNumber');
$this->view->Pays = $this->getRequest()->getParam('Pays');
$this->view->Adresse = explode(':', $this->getRequest()->getParam('Adresse'));
if($this->view->debug)
$this->view->soap = $ListeRapport->soapG;
}
public function creditrecommendationAction()
{
$test = $this->getRequest()->getParam('test');
if($test == true){
$this->TestIndication = true;
}
$giantController = new GiantControllerLib($this->getRequest()->getParam('CompanyId'));
$id = $giantController->commande($this->getRequest()->getParam('CompanyId'),
$this->getRequest()->getParam('Type'),
$this->getRequest()->getParam('Pays'),
$this->getRequest()->getParam('Language'),
$this->TestIndication
);
$creditrecommendationAction = array('getAvisDeCredit' => 'CreditRecommendation');
$creditrecommendation = unserialize(base64_decode($id));
$identiteController = new GiantIdentiteController($creditrecommendation);
$giantConstroller = new GiantControllerLib($this->getRequest()->getParam('CompanyId').'-'.$this->getRequest()->getParam('Type'));
$identiteController->ficheAction();
$fiche = $identiteController->getObjet('fiche');
foreach($creditrecommendationAction as $action => $val) {
if(isset($creditrecommendation->DataSet->Company->$val)) {
$creditrecommendation = $giantConstroller->$action($creditrecommendation);
}
}
$fiche = $giantConstroller->getInformationGenerale($creditrecommendation);
$this->view->carte = $this->getRequest()->getParam('Pays');
$this->view->reportType = $this->getRequest()->getParam('Type');
$this->view->report = $fiche;
$this->view->Type = $this->getRequest()->getParam('Type');
$this->view->assign('exportObjet', $creditrecommendation);
}
public function compactAction()
{
$test = $this->getRequest()->getParam('test');
if($test == true){
$this->TestIndication = true;
}
$giantController = new GiantControllerLib($this->getRequest()->getParam('CompanyId'));
$id = $giantController->commande($this->getRequest()->getParam('CompanyId'),
$this->getRequest()->getParam('Type'),
$this->getRequest()->getParam('Pays'),
$this->getRequest()->getParam('Language'),
$this->TestIndication
);
$compactAction = array('getAvisDeCredit' => 'CreditRecommendation', 'getPositionFinanciere' => 'FinancialSummary',
'getStructureEntreprise' => 'Associated', 'getDirigeant' => 'Position'
);
$compact = unserialize(base64_decode($id));
$identiteController = new GiantIdentiteController($compact);
$giantConstroller = new GiantControllerLib($this->getRequest()->getParam('CompanyId').'-'.$this->getRequest()->getParam('Type'));
$identiteController->ficheAction();
$fiche = $identiteController->getObjet('fiche');
foreach($compactAction as $action => $val) {
if(isset($compact->DataSet->Company->$val)) {
$compact = $giantConstroller->$action($compact);
}
}
$fiche = $giantConstroller->getInformationGenerale($compact);
$this->view->carte = $this->getRequest()->getParam('Pays');
$this->view->reportType = $this->getRequest()->getParam('Type');
$this->view->report = $fiche;
$this->view->Type = $this->getRequest()->getParam('Type');
$this->view->assign('exportObjet', $compact);
}
public function fullAction()
{
$test = $this->getRequest()->getParam('test');
if($test == true){
$this->TestIndication = true;
}
$giantController = new GiantControllerLib($this->getRequest()->getParam('CompanyId').'-'.$this->getRequest()->getParam('Type'));
$id = $giantController->commande($this->getRequest()->getParam('CompanyId'),
$this->getRequest()->getParam('Type'),
$this->getRequest()->getParam('Pays'),
$this->getRequest()->getParam('Language'),
$this->TestIndication
);
$fullAction = array('getAvisDeCredit' => 'CreditRecommendation', 'getComptesAnnuels' => 'AnnualAccounts', 'getPositionFinanciere' => 'FinancialSummary',
'getComportementPaiement' => 'PaymentBehaviour', 'getStructureEntreprise' => 'Associated', 'getDirigeant' => 'Position',
'getComparaisonValeurs'=> 'PeerGroup', 'getHistoriques' => 'Event'
);
$full = unserialize(base64_decode($id));
$full->DataSet->Company->CompanyId= $this->getRequest()->getParam('CompanyId');
$identiteController = new GiantIdentiteController($full);
$giantConstroller = new GiantControllerLib($this->getRequest()->getParam('CompanyId').'-'.$this->getRequest()->getParam('Type'));
$identiteController->ficheAction();
$fiche = $identiteController->getObjet('fiche');
foreach($fullAction as $action => $val) {
if(isset($full->DataSet->Company->$val))
$full = $giantConstroller->$action($full);
}
$fiche = $giantConstroller->getInformationGenerale($full);
$this->view->carte = $this->getRequest()->getParam('Pays');
$this->view->reportType = $this->getRequest()->getParam('Type');
$this->view->report = $fiche;
$this->view->Type = $this->getRequest()->getParam('Type');
$this->view->assign('exportObjet', $full);
}
public function getForm()
{
$form = new Zend_Form();
$form->setMethod('post')
->setAction('investigation');
$reference = $form->createElement('text', 'reference', array('label' => 'Votre Reference'));
$reference->setRequired(true);
$elements[] = $reference;
$telephone = $form->createElement('text', 'telephone', array('label' => 'Votre téléphone'));
$telephone->setRequired(true);
$elements[] = $telephone;
$mail = $form->createElement('text', 'mail', array('label' => 'Adresse Email'));
$mail->setRequired(true);
$elements[] = $mail;
$elements[] = $form->createElement('textarea', 'remarque', array('label' => 'Remarque ou commentaire à destination de l\'enquêteur :'));
$elements[] = $form->createElement('text', 'domiciliation', array('label' => 'Domiciliation Bancaire :'));
$elements[] = $form->createElement('text', 'Encours', array('label' => 'Encours demandé :'));
$elements[] = $form->createElement('text', 'nbEcheance', array('label' => 'Nombre d\'échéances :'));
$form->addElements($elements)
->addElement('submit', 'Envoyer', array('label' => 'Envoyer'));
return ($form);
}
public function investigationAction()
{
if($this->getRequest()->isPost()) {
$data = $this->getRequest()->getPost();
if($this->getForm()->isValid($data))
$this->view->form = $this->getRequest()->getParam('reference');
else {
return ($this->view->form = $this->getForm());
}
} else
$this->view->form = $this->getForm();
}
public function startmonitoringAction()
{
$this->_helper->layout()->disableLayout();
$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');
$this->view->CompanyName = $this->getRequest()->getParam('CompanyName');
$this->view->action = $this->getRequest()->getParam('action');
$this->view->values = $this->getRequest()->getParams();
$result = new GiantControllerLib();
foreach($this->Companies as $key=>$pays){
if(($value = $result->getCache($key)) === false || empty($value->MonitoringOptions->MonitoringOption[0]->LanguageCodes->LanguageCode)) {
unset($this->Companies[$key]);
}
}
$this->view->countries = $this->Companies;
if ($this->getRequest()->isPost()) {
$giantController = new GiantControllerLib($this->getRequest()->getParam('CompanyId'));
$result = $giantController->startmonitoring($this->getRequest()->getParam('CompanyId'),
$this->getRequest()->getParam('CategoryName'),
$this->getRequest()->getParam('EventType'),
$this->getRequest()->getParam('StartDate'),
$this->getRequest()->getParam('EndDate'),
$this->getRequest()->getParam('Version'),
$this->getRequest()->getParam('LanguageCode'),
$this->getRequest()->getParam('Pays'),
$this->TestIndication,
$this->getRequest()->getParam('CompanyName')
);
$this->view->result = $result;
}
}
public function stopmonitoringAction()
{
$this->_helper->layout()->disableLayout();
$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');
$this->view->InternalOrderId = $this->getRequest()->getParam('InternalOrderId');
$this->view->CompanyName = $this->getRequest()->getParam('CompanyName');
$this->view->action = $this->getRequest()->getParam('action');
$this->view->values = $this->getRequest()->getParams();
if ($this->getRequest()->isPost()) {
$giantController = new GiantControllerLib($this->getRequest()->getParam('CompanyId'));
$result = $giantController->stopmonitoring($this->getRequest()->getParam('CompanyId'),
$this->getRequest()->getParam('EndDate'),
$this->getRequest()->getParam('InternalOrderId'),
$this->getRequest()->getParam('Pays'),
$this->TestIndication
);
$this->view->result = $result;
}
}
public function updatemonitoringAction()
{
$this->_helper->layout()->disableLayout();
$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');
$this->view->Pays = $this->getRequest()->getParam('Pays');
$this->view->CompanyName = $this->getRequest()->getParam('CompanyName');
$this->view->action = $this->getRequest()->getParam('action');
$this->view->values = $this->getRequest()->getParams();
if ($this->getRequest()->isPost()) {
$giantController = new GiantControllerLib($this->getRequest()->getParam('CompanyId'));
$result = $giantController->updatemonitoring($this->getRequest()->getParam('CompanyId'),
$this->getRequest()->getParam('InternalOrderId'),
$this->getRequest()->getParam('CategoryName'),
$this->getRequest()->getParam('EventType'),
$this->getRequest()->getParam('StartDate'),
$this->getRequest()->getParam('Version'),
$this->getRequest()->getParam('LanguageCode'),
$this->getRequest()->getParam('Pays'),
$this->TestIndication
);
$this->view->result = $result;
}
}
public function retriveAction()
{
$this->view->headScript()->appendFile($this->theme->pathScript.'/giant_monitoring.js', 'text/javascript');
$giantController = new GiantControllerLib();
$auth = Zend_Auth::getInstance();
if ( $auth->hasIdentity() ) {
$identity = $auth->getIdentity();
}
$result = $auth->getStorage()->read($identity);
if(!empty($result->result->mon_result)){
$result = $result->result->mon_result;
}
else{
$result = $giantController->retrive(1,$this->TestIndication,'RetrieveMonitoringEventsForCustomer');
$sess = new stdClass();
$sess->mon_result = $result;
$identity->result = $sess;
$auth->getStorage()->write($identity);
}
$resultDB = $giantController->retrivDB();
$this->view->resultDB = $resultDB;
$this->view->result = $result;
$merged =Array();
foreach ($result->MonitoringEvents->MonitoringEvent as $MonitoringEvent):
if ($merged[$MonitoringEvent->ProviderOrderId]){
array_push($merged[$MonitoringEvent->ProviderOrderId],$MonitoringEvent) ;
} else {
$merged[$MonitoringEvent->ProviderOrderId][]=$MonitoringEvent;
}
endforeach;
$this->view->val = $merged;
$merged_siren =Array();
foreach ($result->MonitoringEvents->MonitoringEvent as $MonitoringEvent):
if ($merged_siren[$MonitoringEvent->Company->CompanyId]){
array_push($merged_siren[$MonitoringEvent->Company->CompanyId],$MonitoringEvent) ;
} else {
$merged_siren[$MonitoringEvent->Company->CompanyId][]=$MonitoringEvent;
}
endforeach;
$this->view->val_siren = $merged_siren;
}
public function retAction()
{
$giantController = new GiantControllerLib();
$resultDB = $giantController->retrivDB($this->getRequest()->getParam('date_st'));
print_r(serialize($resultDB[0]));
}
public function getpaysAction()
{
$this->_helper->layout()->disableLayout();
$pays = $this->getRequest()->getParam('Pays');
$result = new GiantControllerLib();
if(($value = $result->getCache($pays)) === false || empty($value->MonitoringOptions->MonitoringOption[0]->LanguageCodes->LanguageCode)) {
print_r(array('no'));
}
else {
print_r(json_encode($value->MonitoringOptions->MonitoringOption[0]->LanguageCodes->LanguageCode));
}
}
public function reteventsAction()
{
$this->_helper->layout()->disableLayout();
$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);
$result = $result->result->mon_result;
$merged_siren = Array();
foreach ($result->MonitoringEvents->MonitoringEvent as $MonitoringEvent):
if ($merged_siren[$MonitoringEvent->Company->CompanyId]){
array_push($merged_siren[$MonitoringEvent->Company->Event[0]->EventCode],$MonitoringEvent) ;
} else {
$merged_siren[$MonitoringEvent->Company->Event[0]->EventCode][]=$MonitoringEvent;
}
endforeach;
$type = $this->getRequest()->getParam('Type');
$id = $this->getRequest()->getParam('Id');
$merged = Array();
foreach ($merged_siren[$type] as $MonitoringEvent):
if ($merged[$MonitoringEvent->ProviderOrderId]){
array_push($merged[$MonitoringEvent->ProviderOrderId],$MonitoringEvent) ;
} else {
$merged[$MonitoringEvent->ProviderOrderId][]=$MonitoringEvent;
}
endforeach;
$this->view->result = $merged[$id];
}
}

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,14 +1,28 @@
<?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()
{
$this->_helper->layout->disableLayout();
@ -16,18 +30,18 @@ class LogoController extends Zend_Controller_Action
$siren = $request->getParam('siren', '');
$isin = $request->getParam('isin', '');
$logo = $this->_findlogo($siren, $isin);
$this->view->assign('siren', $siren);
$this->view->assign('logo', $logo);
}
public function uploadAction()
{
$this->_helper->layout->disableLayout();
$request = $this->getRequest();
$siren = $request->getParam('siren');
if ($request->isPost()) {
if ( !empty($siren) && isset($_FILES['file']) && $_FILES['file']['error']!=UPLOAD_ERR_NO_FILE )
@ -66,25 +80,25 @@ class LogoController extends Zend_Controller_Action
}
$this->view->assign('siren', $siren);
}
public function cropAction()
{
$this->_helper->layout->disableLayout();
$request = $this->getRequest();
$siren = $request->getParam('siren');
$image = $request->getParam('image');
if ($request->isPost())
{
$jpeg_quality = 90;
$png_quality = 9;
list($name, $ext) = explode('.', $image);
$src = $name.'.'.$ext;
$dst = str_replace('tmp_', '', $src);
//Création image
switch($ext){
case 'gif':
@ -125,14 +139,14 @@ class LogoController extends Zend_Controller_Action
}
$this->view->assign('siren', $siren);
}
public function saveAction()
{
$this->_helper->layout->disableLayout();
$request = $this->getRequest();
$file = $request->getParam('image');
if ( !empty($file) ) {
list($name, $ext) = explode('.', $file);
$name_dst = str_replace('tmp_','',$name);
@ -196,79 +210,81 @@ class LogoController extends Zend_Controller_Action
}
}
$this->view->assign('message', $message);
}
public function urlAction()
{
$this->_helper->layout->disableLayout();
$request = $this->getRequest();
$siren = $request->getParam('siren');
if ($request->isPost()){
require_once 'common/curl.php';
$logoUrl = $request->getParam('url');
$tabTmp = parse_url($logoUrl);
$hostUrl = $tabTmp['host'];
$pathUrl = $tabTmp['path'];
$tmp = explode('.', basename($pathUrl));
$ext = strtolower(end($tmp));
$page = getUrl($logoUrl, '', '', '', false, $hostUrl, '', 7);
$body = $page['body'];
$extAuthorized = array('jpeg', 'jpg', 'png', 'gif', 'bmp');
//Vérification fichier est une image
if ( in_array($ext, $extAuthorized ) )
{
$name_file = $siren.'.'.$ext;
$fp = fopen($this->pathLogo.'/'.$name_file, 'w');
fwrite($fp, $body);
fclose($fp);
$this->view->assign('image', $name_file);
try {
$client = new Zend_Http_Client($logoUrl);
$client->setStream();
$response = $client->request('GET');
if ( $response->isSuccessful()
&& copy($response->getStreamName(), $this->pathLogo.'/'.$name_file) ) {
$this->view->assign('image', $name_file);
}
} catch (Zend_Http_Client_Exception $e) {}
}
$this->view->assign('isPost', true);
}
$this->view->assign('siren', $siren);
}
public function deleteAction()
{
$this->_helper->layout->disableLayout();
$request = $this->getRequest();
$file = $request->getParam('image');
if ( !empty($file) ){
$message = "Erreur suppression fichier.";
if ( unlink($this->pathLogo.'/'.$file)){
$message = 'Fichier supprimé.';
}
}
$this->view->assign('message', $message);
}
//====> Function interne
function _logo( $siren )
{
$message = '';
if ( isset($_FILES['logoFile']) &&
$_FILES['logoFile']['error']!=UPLOAD_ERR_NO_FILE ) {
/** Un fichier a été uploadé **/
$logoFile = $_FILES['logoFile'];
$tmp_file = $logoFile['tmp_name'];
if ( $logoFile['error']!=UPLOAD_ERR_OK ) {
$message = 'Erreur lors de la copie du fichier';
}
if ( !is_uploaded_file($tmp_file) ){
$message = "Le fichier est introuvable";
} else {
@ -294,9 +310,9 @@ class LogoController extends Zend_Controller_Action
}
//Suppression ou URL fichier image
} elseif ( isset($_REQUEST['logoUrl']['del']) ||
( isset($_REQUEST['logoUrl']['url']) &&
$_REQUEST['logoUrl']['url']!='' ) ) {
( isset($_REQUEST['logoUrl']['url']) &&
$_REQUEST['logoUrl']['url']!='' ) ) {
//Suppression du fichier
if ( isset($_REQUEST['logoUrl']['del']) && $_REQUEST['logoUrl']['del'] )
{
@ -307,12 +323,12 @@ class LogoController extends Zend_Controller_Action
}
}
} else {
saisie_getlogo($siren);
$this->_getlogo($siren);
}
}
return $message;
}
function _saveimg( $siren )
{
$message = '';
@ -349,7 +365,7 @@ class LogoController extends Zend_Controller_Action
}
return $output;
}
function _findlogo( $siren, $isin = '' )
{
$img = '';
@ -372,14 +388,14 @@ class LogoController extends Zend_Controller_Action
}
return $img;
}
function _loadlogo( $siren, $isin = '' )
{
$urlImg = '';
$locImg = $this->pathLogo.'/'.$siren;
$extensions = array('jpeg', 'jpg', 'png', 'gif', 'bmp');
//Recherche image sur base siren
foreach ( $extensions as $ext ) {
if ( file_exists($locImg.'.'.$ext) ) {
@ -387,7 +403,7 @@ class LogoController extends Zend_Controller_Action
break;
}
}
//Recherche image sur base isin
if ( $urlImg == '' && $isin != '' ) {
$locImg = PATH_LOGOS . $isin;
@ -398,7 +414,7 @@ class LogoController extends Zend_Controller_Action
}
}
}
$output = '';
//Redimensionnement
if ( $urlImg != '' ) {
@ -410,34 +426,36 @@ class LogoController extends Zend_Controller_Action
} else {
$strSize = '';
}
$output = '<img src="'.$urlImg.'" '.$strSize.'/>';
}
return $output;
}
function _getlogo( $siren )
{
require_once 'common/curl.php';
$logoUrl = $_REQUEST['logoUrl']['url'];
$tabTmp = parse_url($logoUrl);
$hostUrl = $tabTmp['host'];
$pathUrl = $tabTmp['path'];
$tmp = explode('.', basename($pathUrl));
$ext = strtolower(end($tmp));
$page = getUrl($logoUrl, '', '', '', false, $hostUrl, '', 7);
$body = $page['body'];
$extAuthorized = array('jpeg', 'jpg', 'png', 'gif', 'bmp');
if ( !in_array($ext, $extAuthorized ) )
{
$tmp = explode('/', $page['header']['Content-Type']);
$ext = trim ( str_replace('?', '',strtolower(end($tmp)) ) );
}
$name_file = $siren.'.'.$ext;
$fp = @fopen($this->pathLogo.'/'.$name_file, 'w');
@fwrite($fp, $body);
@fclose($fp);
chmod($this->pathLogo.'/'.$name_file, 0755);
try {
$client = new Zend_Http_Client($pathUrl);
$client->setStream();
$response = $client->request('GET');
if ( $response->isSuccessful() ) {
$tmp = explode('.', basename($response->getStreamName()));
$ext = strtolower(end($tmp));
if ( !in_array($ext, $extAuthorized ) )
{
$tmp = explode('/', $page['header']['Content-Type']);
$ext = trim ( str_replace('?', '',strtolower(end($tmp)) ) );
}
$name_file = $siren.'.'.$ext;
if( copy($response->getStreamName(), $this->pathLogo.'/'.$name_file) ) {
chmod($this->pathLogo.'/'.$name_file, 0755);
}
}
} catch (Zend_Http_Client_Exception $e) {}
}
}

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,36 +225,36 @@ class MandataireController extends Zend_Controller_Action
echo json_encode($output);
exit;
}
$tabEntrep = array();
$ws = new WsScores();
$tabEntrep = $ws->getIdentite($siren);
if ($tabEntrep!==false){
/**
* Utiliser la raison sociale la plus longue
* Utiliser la dénomination sociale la plus longue
* Nom, Nom2, NomLong
*/
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,9 +1,24 @@
<?php
class PrintController 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');
}
/**
* 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,9 +83,17 @@ 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['idRapport'] = $elements[2];
$params['Pays'] = $elements[2];
$params['Type'] = $elements[3];
$params['CompanyId'] = $elements[4];
$params['Language'] = $elements[5];
break;
case 'surveillance':
switch($action){
@ -81,6 +103,10 @@ class PrintController extends Zend_Controller_Action
break;
}
break;
case 'worldcheck':
$params['matchIdentifier'] = $elements[2];
$params['nameType'] = $elements[3];
break;
default:
return false;
break;
@ -91,9 +117,9 @@ class PrintController extends Zend_Controller_Action
'params' => $params
);
}
public function indexAction(){}
/**
* Imprime la page en PDF
* Par défaut, le contenu html a déjà été enregistré..
@ -106,34 +132,33 @@ class PrintController extends Zend_Controller_Action
{
$request = $this->getRequest();
$fichier = $request->getParam('fichier');
if (substr($fichier,-4)!='.pdf') {
echo 'Fichier incorrect';
exit;
}
$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';
exit;
}
require_once 'wkhtmltopdf/wkhtmltopdf.php';
$pdf = new wkhtmltopdf();
$pdf = new Scores_Wkhtml_Pdf();
$pdf->setOptions('footer-right', 'Page [page] sur [toPage]');
$pdf->setOptions('header-right', date('d/m/Y H:i:s'));
$output_file = $pdf->exec($file);
//Envoi au navigateur
if(!file_exists($output_file))
{
echo 'Impossible de générer le fichier PDF';
exit;
}
$content_type = 'application/pdf';
$dest = 'I';
switch($dest)
@ -169,7 +194,7 @@ class PrintController extends Zend_Controller_Action
break;
}
}
/**
* Imprime la page en activant le javascript d'impression
* Il faut récupérer le controller et l'action du nom du fichier, ainsi que
@ -181,12 +206,12 @@ class PrintController extends Zend_Controller_Action
{
$request = $this->getRequest();
$fichier = $request->getParam('fichier', '');
if (substr($fichier,-5)!='.html') {
echo 'Fichier incorrect';
exit;
}
$fichier = str_replace('.html', '', $fichier);
$elements = $this->pageParams($fichier);
if ($elements===false){
@ -194,9 +219,10 @@ 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']);
}
/**
* Envoi le fichier XML de l'objet sérialiser sur la sortie standard
*/
@ -206,19 +232,19 @@ class PrintController extends Zend_Controller_Action
$this->_helper->viewRenderer->setNoRender(true);
$request = $this->getRequest();
$fichier = $request->getParam('fichier', '');
if (substr($fichier,-4)!='.xml') {
echo 'Fichier incorrect.';
exit;
}
$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;
}
header("Content-type: application/xml");
header("Content-Disposition: attachement; filename=\"$fichier\"");
flush();

View File

@ -1,23 +1,36 @@
<?php
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']);
require_once 'Scores/RechercheHistorique.php';
require_once 'Scores/WsScores.php';
$theme = Zend_Registry::get('theme');
$this->view->headScript()->appendFile($theme->pathScript.'/recherche.js', 'text/javascript');
$this->theme = Zend_Registry::get('theme');
$this->view->inlineScript()->appendFile($this->theme->pathScript.'/recherche.js', 'text/javascript');
}
public function indexAction()
{
$this->_forward('entreprise');
$this->forward('entreprise');
}
/**
@ -26,7 +39,7 @@ class RechercheController extends Zend_Controller_Action
public function entrepriseAction()
{
$request = $this->getRequest();
$this->view->headTitle()->append('Recherche Entreprise');
$this->view->headTitle()->prepend('Recherche Entreprise');
$form = new Application_Form_RechercheEntreprise();
if ( $request->isPost() || $request->isGet() ){
$form->populate($request->getParams());
@ -45,7 +58,7 @@ class RechercheController extends Zend_Controller_Action
public function dirigeantAction()
{
$request = $this->getRequest();
$this->view->headTitle()->append('Recherche Dirigeant');
$this->view->headTitle()->prepend('Recherche Dirigeant');
$form = new Application_Form_RechercheDirigeant();
if ( $request->isPost() || $request->isGet() ){
$form->populate($request->getParams());
@ -53,6 +66,20 @@ class RechercheController extends Zend_Controller_Action
$this->view->assign('form', $form);
}
/**
* Affiche le formulaire de recherche WorldCheck
*/
public function worldcheckAction()
{
$request = $this->getRequest();
$this->view->headTitle()->prepend('Recherche WorldCheck');
$form = new Application_Form_RechercheWorldcheck();
if ( $request->isPost() || $request->isGet() ){
$form->populate($request->getParams());
}
$this->view->assign('form', $form);
}
/**
* Affiche le formulaire de recherche actionnaire
* @todo : style pour les pourcentages
@ -73,9 +100,9 @@ class RechercheController extends Zend_Controller_Action
*/
public function annonceAction()
{
$this->view->headTitle()->append('Recherche Annonce');
$this->view->headTitle()->prepend('Recherche Annonce');
$session = new RechercheHistorique();
$session = new Scores_Session_Recherche();
$recherche = $session->item(0);
if ($recherche['type']=='annonce') {
$params = $recherche['params']['formA'];
@ -91,7 +118,7 @@ class RechercheController extends Zend_Controller_Action
$params = $request->getParams();
$token = $request->getParam('token', null);
$session = new RechercheHistorique();
$session = new Scores_Session_Recherche();
if (array_key_exists('formA', $params)) {
$token = $session->save('annonce', $params);
@ -156,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
@ -197,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
),
);
}
@ -246,7 +269,7 @@ class RechercheController extends Zend_Controller_Action
{
$this->view->headTitle()->append('Liste des dernières recherches');
// @todo : Attention lorsqu'il n'y pas de recherche enregistré
$rechercheSession = new RechercheHistorique();
$rechercheSession = new Scores_Session_Recherche();
$derniereRecherche = $rechercheSession->item(0);
$params = array_merge(array('type'=> $derniereRecherche['type']), $derniereRecherche['params']);
$this->_forward('liste', 'recherche', null, $params);
@ -255,7 +278,7 @@ class RechercheController extends Zend_Controller_Action
public function listAction()
{
$this->view->headTitle()->append('Liste des dernières recherches');
$rechercheSession = new RechercheHistorique();
$rechercheSession = new Scores_Session_Recherche();
$this->view->assign('historique', $rechercheSession->liste());
}
@ -273,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);
@ -292,13 +315,12 @@ class RechercheController extends Zend_Controller_Action
$message.= "Prénom : ".$user->getPrenom()."<br/>";
$objet = "Demande d'investigation";
require_once 'Scores/Mail.php';
$mail = new 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
@ -338,9 +360,13 @@ class RechercheController extends Zend_Controller_Action
$action = 'actionnaire';
$listParams = array('siret', 'actNomRs', 'cpVille', 'pays', 'cpVille', 'pctMin', 'pctMax');
break;
case 'wcheck':
$action = 'worldcheck';
$listParams = array('dirNom', 'dirPrenom', 'dirType');
break;
}
$rechercheParams = new RechercheHistorique();
$rechercheParams = new Scores_Session_Recherche();
//Si le formulaire a été soumis alors on enregistre en session et on redirige
if ( !empty($type) ) {
@ -348,7 +374,7 @@ class RechercheController extends Zend_Controller_Action
$nbField = count($listParams);
foreach($listParams as $key){
if(!empty($params[$key])){
$params[$key] = strip_tags($params[$key]);
$params[$key] = strip_tags($params[$key]);
} else {
$nbField--;
}
@ -357,9 +383,21 @@ class RechercheController extends Zend_Controller_Action
$this->_redirect('/recherche/'.$action);
}
//Worldcheck - Vérification si les champs demandés (NOM et TYPE) ont été saisie
if ($type=='wcheck')
{
$required = array('dirNom', 'dirType');
foreach($required as $item){
if(empty($params[$item])){
$this->redirect('/recherche/worldcheck');
break;
}
}
}
//Redirection
$token = $rechercheParams->save($type, $params);
$this->_redirect('recherche/liste/token/'.$token);
$this->redirect('recherche/liste/token/'.$token);
}
//On selectionne en session
@ -371,18 +409,22 @@ 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' ) {
$this->_forward('index', 'worldcheck', null, $params);
//Recherche
} else {
$user = new Scores_Utilisateur();
$this->view->assign('IDENTITE', $user->checkPerm('IDENTITE'));
$page = $request->getParam('page', 1);
if ($page==0) $page = 1;
$page = $page-1;
$position = $page*$user->getNbRep();
//Pagination
$page = $request->getParam('page', 1);
if ( $page <= 0 ) $page = 1;
$nbAffichage = $user->getNbRep();
$position = ($page - 1 ) * $nbAffichage;
require_once 'Scores/WsScores.php';
$ws = new WsScores();
@ -390,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']);
@ -405,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);
@ -462,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']));
@ -551,16 +591,7 @@ class RechercheController extends Zend_Controller_Action
$params[$key] = str_replace('/', ' ', $params[$key]);
}
$criteresLien = $this->view->url($params, null, true);
$info = $reponse->info;
$nbReponses = $reponse->nbReponses;
$nbReponsesTotal = $reponse->nbReponsesTotal;
if ($nbReponses < $nbReponsesTotal) {
$totPage = ceil($nbReponsesTotal/$user->getNbRep());
$curPage = $page+1;
} else {
$totPage = $curPage = 1;
}
$criteresLien = $this->view->url($params, 'default', true);
$liste = array();
if (count($etabs)>0) {
@ -572,6 +603,8 @@ class RechercheController extends Zend_Controller_Action
$item['siret'] = $etab->Siren.$etab->Nic;
$item['InfoSiret'] = $etab->Siren.' '.$etab->Nic;
$item['InfoNom'] = $etab->Nom;
$item['source'] = $etab->Source;
$item['sourceId'] = $etab->SourceId;
$nomDetail = '';
if ($etab->Nom2<>'' || $etab->Enseigne<>'' || $etab->Sigle<>'') {
@ -598,7 +631,6 @@ class RechercheController extends Zend_Controller_Action
} else {
$infoEtab.= '&Eacute;tablissement secondaire ';
}
Zend_Registry::get('firebug')->info('Nic: '.$etab->Nic.' , Siege: '.$etab->Siege);
if ($etab->Actif==1){
$infoEtab.= 'actif';
@ -617,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"'.
@ -632,15 +664,14 @@ class RechercheController extends Zend_Controller_Action
$item['InfoEtab'] = $infoEtab;
$adresse = $etab->Adresse.'<br/>';
if (isset($etab->Adresse2) && $etab->Adresse2 != '') {
$adresse.= $etab->Adresse2.'<br/>';
$adresse = $etab->Adresse;
if ( !empty($etab->Adresse2) ) {
$adresse.= '<br/>'.$etab->Adresse2;
}
$adresse.= "<b>".$etab->CP." ".$etab->Ville."</b>";
if (null === $etab->Pays) {
$adresse.= '<br/><b>France</b>';
} else {
if ( !empty($etab->Ville) && intval($etab->CP) > 0) {
$adresse.= '<br/><b>'.$etab->CP." ".$etab->Ville."</b>";
}
if (null !== $etab->Pays) {
$adresse.= '<br/><b>'.$etab->Pays.'</b>';
}
@ -666,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<>'') {
@ -690,8 +721,8 @@ class RechercheController extends Zend_Controller_Action
if ($etab->ActActif==0){
$preDate = ', avant le ';
}
require_once 'common/dates.php';
if ($etab->ActDateLien!='') $item['InfoActionnaire'].= $preDate.WDate::dateT('Y-m-d', 'd/m/Y',$etab->ActDateLien);
$date = new Zend_Date($etab->ActDateLien, 'yyyy-MM-dd');
if ($etab->ActDateLien!='') $item['InfoActionnaire'].= $preDate.$date->toString('dd/MM/yyyy');
if ($etab->ActPmin!='') {
if($etab->ActPmin<1){
$item['InfoActionnaire'].= ', minoritaire ';
@ -705,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',
@ -712,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) {
@ -756,20 +796,45 @@ 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);
}
$this->view->assign('token', $token);
$this->view->assign('liste', $liste);
$this->view->assign('totPage', $totPage);
$this->view->assign('curPage', $curPage);
$this->view->assign('liste', $liste);
//Calcul pagination
$nbReponses = $reponse->nbReponses;
$nbReponsesTotal = $reponse->nbReponsesTotal;
$pagePrev=1;
$pageNext=1;
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);
$this->view->assign('token', $token);
$this->view->assign('criteresTexte', $criteresTexte);
$this->view->assign('criteresLien', $criteresLien);
$this->view->assign('info', $info);
$this->view->assign('info', $reponse->info);
}
}
@ -864,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 ) {
@ -893,7 +958,7 @@ class RechercheController extends Zend_Controller_Action
$params = $request->getParams();
$type = $request->getParam('type', '');
$rechercheParams = new RechercheHistorique();
$rechercheParams = new Scores_Session_Recherche();
//Si le formulaire a été soumis alors on enregistre en session et on redirige
if ( !empty($type) ) {
@ -971,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>';
}
@ -1004,9 +1069,14 @@ class RechercheController extends Zend_Controller_Action
$item['source'] = $etab->Infos->source;
$item['ref'] = $etab->Infos->ref;
require_once 'common/dates.php';
$item['dateAjout'] = WDate::dateT('Y-m-d','d/m/Y',$etab->Infos->dateAjout);
$item['dateEnvoi'] = ($etab->Infos->dateEnvoi!='0000-00-00') ? WDate::dateT('Y-m-d','d/m/Y',$etab->Infos->dateEnvoi) : '';
$date = new Zend_Date($etab->Infos->dateAjout, 'yyyy-MM-dd');
$item['dateAjout'] = $date->toString('dd/MM/yyyy');
if ( $etab->Infos->dateEnvoi!='0000-00-00' ) {
$date = new Zend_Date($etab->Infos->dateEnvoi, 'yyyy-MM-dd');
$item['dateEnvoi'] = $date->toString('dd/MM/yyyy');
} else {
$item['dateEnvoi'] = '';
}
$liste[] = $item;
}
@ -1033,7 +1103,7 @@ class RechercheController extends Zend_Controller_Action
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$rechercheParams = new RechercheHistorique();
$rechercheParams = new Scores_Session_Recherche();
//On selectionne en session
if (count($rechercheParams->liste())>0){
$recherche = $rechercheParams->item(0);
@ -1047,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']));
@ -1062,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]);
@ -1140,10 +1208,9 @@ 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';
require_once 'Scores/ExportCSV.php';
$export = new ExportCSV($etabs, 'rechercheEntreprise');
$export = new Scores_Export_ArrayCsv($etabs, 'rechercheEntreprise');
$export->writeFile($file);
$content_type = 'application/csv-tab-delimited-table';

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

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

@ -0,0 +1,342 @@
<?php
class WorldcheckController extends Zend_Controller_Action
{
protected $theme;
protected $wcConfig;
/**
* 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 'WorldCheck/WsWorldCheck.php';
require_once 'Scores/Cache.php';
$configWC = new Zend_Config_Ini(APPLICATION_PATH . '/../library/WorldCheck/applicationWC.ini');
$this->wcConfig = $configWC->worldcheck->toArray();
}
/**
* Get nameIdentifier and set all data into the session
*/
public function indexAction()
{
$request = $this->getRequest();
$param = new stdClass();
$dirNom = $request->getParam('dirNom');
$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();
$wc = new WsWorldCheck();
$wcLocal = new Application_Model_Worldcheck();
$param->idClient = $user->getIdClient();
$param->login = $user->getLogin();
$localDBParams = $wcLocal->getScreenerId($param);
$param->matchCount = $localDBParams->matchCount;
$param->nameIdentifier = $localDBParams->nameIdentifier;
if ($entityId===null) {
//$this->_redirect('/worldcheck/list');
$params = array(
'nameIdentifier' => $param->nameIdentifier,
'matchCount' => $param->matchCount
);
$this->forward('list', null, null, $params);
} else {
$id = $request->getParam('id', null);
$data = new stdClass();
$data->nameIdentifier = $param->nameIdentifier;
$data->matchType = 'WATCHLIST';
$matchArr = $wc->getMatchesArrName($data);
$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
*/
public function listAction()
{
$request = $this->getRequest();
$wc = new WsWorldCheck();
$param = new stdClass();
$nameIdentifier = $request->getParam('nameIdentifier');
$matchCount = $request->getParam('matchCount');
$dirNom = $request->getParam('dirNom');
$param->dirNom = ($dirNom)?$dirNom:$request->getParam('dirSociete');
$param->dirPrenom = $request->getParam('dirPrenom');
$param->dirType = $request->getParam('dirType');
print_r($param);
if ($matchCount!==0)
{
$summary = new stdClass();
$summary->nameIdentifier = $nameIdentifier;
$summary->matchType = 'WATCHLIST';
$cache = new Cache();
$unfilteredWC = $cache->wcCache($this->wcConfig['cachedir'], $wc, "getSummariesArr", $summary, $nameIdentifier);
//check if display all results (search by lastName), or filtered results (search by fullName)
$filtre = $request->getParam('filtre', 'tout');
$resultWC = $unfilteredWC;
if ($filtre=='filtered')
{
//get results by fullName (lastName and givenName)
$filteredWC = array();
foreach ($unfilteredWC as $entityId=>$shortData)
{
if (stripos($shortData->lastName, $param->dirNom)!==false || stripos($param->dirNom, $shortData->lastName)!==false) {
if (stripos($shortData->givenName, $param->dirPrenom)!==false || stripos($param->dirPrenom, $shortData->givenName)!==false) {
$filteredWC[$entityId] = $shortData;
}
}
}
//end
$resultWC = $filteredWC;
}
$filtres = array(
'tout' => array(
'txt'=>'Résultats par Nom',
'select'=>'',
'value' => 2,
),
'filtered' => array(
'txt'=>'Résultats précis',
'select'=>'',
'value' => 1,
)
);
$filtres[$filtre]['select'] = ' selected';
$this->view->assign('filtres', $filtres);
//end
//paginate results list
Zend_View_Helper_PaginationControl::setDefaultViewPartial('worldcheck/controls.phtml');
$paginator = Zend_Paginator::factory($resultWC);
$this->view->paginator = $paginator;
$itemCount = $this->wcConfig['page']['items'];
$page = $this->_getParam('page', 1);
$ol_number = ($page-1)*$itemCount+1;
$paginator->setCurrentPageNumber($page);
$paginator->setItemCountPerPage($itemCount);
$this->view->assign('ol_number', $ol_number);
$this->view->assign('itemCount', $itemCount);
//end
$this->view->assign('resultWC', $resultWC);
$this->view->assign('allMatches', $wc->getMatchesArrName($summary));
$this->view->assign('param', $param);
}
}
/**
* Affichage le quantite des occurences de la bdd en popup.
*/
public function occurenceAction()
{
$request = $this->getRequest();
if ( $request->isXmlHttpRequest() ) {
$this->_helper->layout()->disableLayout();
$data = new stdClass();
if ($request->getParam('dirType')) $data->Type = $request->getParam('dirType');
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');
if ($request->getParam('dirSocCommercial')) $data->Soc->NomCommercial = $request->getParam('dirSocCommercial');
if ($request->getParam('dirSocSigle')) $data->Soc->Sigle = $request->getParam('dirSocSigle');
if ($request->getParam('dirSocSigleLong')) $data->Soc->SigleLong = $request->getParam('dirSocSigleLong');
if ($request->getParam('dirSocEnseigne')) $data->Soc->Enseigne = $request->getParam('dirSocEnseigne');
if ($request->getParam('dirSocEnseigneLong')) $data->Soc->EnseigneLong = $request->getParam('dirSocEnseigneLong');
$wcLocal = new Application_Model_Worldcheck();
$this->view->assign('occurrence', $wcLocal->getCount($data));
$this->view->assign('data', $data);
}
}
/**
* Affichage le resultat de recherche en WorldCheck
*/
public function matchcontentAction()
{
$request = $this->getRequest();
$param = new stdClass();
$param->matchIdentifier = $request->getParam('matchIdentifier');
$param->nameType = $request->getParam('nameType');
$wc = new WsWorldCheck();
$nodeParam = $wc->getAssociates($param);
$db = new Application_Model_Worldcheck();
$db->setTree($nodeParam);
$cache = new Cache();
$content = $cache->wcCache($this->wcConfig['cachedir'], $wc, "getDetailsContent", $param, $param->matchIdentifier);
$this->view->assign('content', $content[0]);
$this->view->assign('nameType', $param->nameType);
$this->view->assign('exportObjet', $content[0]);
}
/**
* le Parent de l'organigramme des associés
*/
public function organigrammeAction()
{
$this->_helper->layout()->disableLayout();
$wc = new WsWorldCheck();
$request = $this->getRequest();
$entityId = $request->getParam('entityid', null);
$wcLocal = new Application_Model_Worldcheck();
$currentBranch = $wcLocal->getTree($entityId);
$primary = $currentBranch['primary'];
$parent = array();
$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,
"state" => "closed",
"parent" => "#"
);
$jData = json_encode($parent);
$this->view->assign('data', $jData);
}
/**
* les associés du parent de l'organigramme
*/
public function orgchildrenAction()
{
$this->_helper->layout()->disableLayout();
$wc = new WsWorldCheck();
$request = $this->getRequest();
$entityId = $request->getParam('entityid', null);
$id = $request->getParam('id', null);
$wcLocal = new Application_Model_Worldcheck();
$currentBranch = $wcLocal->getTree($entityId);
$associates = $currentBranch['associates'];
$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,
"state" => "closed",
"parent" => $id,
);
}
$jData = json_encode($children);
$this->view->assign('data', $jData);
}
/**
* Affichage de l'information courte de chaque node dans le popup
*/
public function popupAction()
{
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$entityId = $request->getParam('entityId', null);
$entityIdP = $request->getParam('entityIdP', null);
$wc = new WsWorldCheck();
$user = new Scores_Utilisateur();
$paramP = new stdClass();
$paramP->idClient = $user->getIdClient();
$paramP->dirNom = $request->getParam('dirNomP');
$paramP->dirPrenom = $request->getParam('dirPrenomP');
$paramP->dirType = $request->getParam('dirTypeP');
$wcLocal = new Application_Model_Worldcheck();
$result = $wcLocal->getScreenerId($paramP);
$data = new stdClass();
$data->nameIdentifier = $result->nameIdentifier;
$data->matchType = "WATCHLIST";
$matches = $wc->getMatchesArrName($data);
$param = new stdClass();
$param->matchIdentifier = $matches[$entityIdP];
$param->nameType = $paramP->dirType;
$associates = $wc->getAssociates($param);
foreach($associates['associates'] as $assoc)
{
if ($assoc['entityId']==$entityId)
break;
}
$this->view->assign('data', $assoc);
}
}

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');
@ -118,7 +118,7 @@ $(document).ready(function(){
<label>Siren</label>
<div class="field">
<input name="siren" type="text" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->siren : '';?>" />
<a href="#">Obtention Raison sociale</a>
<a href="#">Obtention Dénomination sociale</a>
</div>
</div>
@ -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

@ -81,7 +81,7 @@ $compteur++;
'controller' => 'dashboard',
'action' => 'rs',
'siren' => $item->siren,
), null, true)?>" class="rs">Raison sociale</a>
), null, true)?>" class="rs">Dénomination sociale</a>
</b>
</td>
<td width="40%">

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

@ -0,0 +1,62 @@
<div id="center">
<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 }?>
</table>
</div>
<h2><?=$this->translate("Historique des dirigeants")?></h2>
<div class="paragraph">
<?php if (count($this->dirigeants) > 0) {?>
<table class="data">
<?php foreach ($this->dirigeants as $dir) {?>
<tr>
<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 != '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 }?>
</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>
<?=$this->render('cgu.phtml', $this->cgu)?>
</div>

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

@ -51,7 +51,7 @@ if($this->commande == false){
<div class="infoTitle StyleInfoLib">Num&eacute;ro de TVA Intracom.</div>
<div class="infoData"><?=substr($this->Etab->TvaNumero,0,2).' '.substr($this->Etab->TvaNumero,2,2).' '.substr($this->Etab->TvaNumero,-9)?></div>
<div class="infoTitle StyleInfoLib">Raison Sociale</div>
<div class="infoTitle StyleInfoLib">Dénomination Sociale</div>
<div class="infoData"><?=$this->Etab->Nom?></div>
<div class="infoTitle StyleInfoLib">Adresse</div>
@ -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() {

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