Compare commits
1132 Commits
release-2.
...
SD-32
Author | SHA1 | Date | |
---|---|---|---|
|
fe0fb41d04 | ||
|
220aa8e27c | ||
|
9a8a008d03 | ||
|
65831d3194 | ||
|
b63addf2a4 | ||
|
d1d3448e2d | ||
|
0e2ad852b2 | ||
|
442ded2379 | ||
|
71d9e899f9 | ||
|
2b9e237d31 | ||
|
bdc8be3670 | ||
|
a0ebfe4d14 | ||
|
5313c9265b | ||
|
3510df43e2 | ||
|
9eec98395b | ||
|
4a384d6f79 | ||
|
c12ac41b8a | ||
|
1fd1e78603 | ||
|
e8ad4db136 | ||
|
ed53d33b7e | ||
|
23bd68129c | ||
|
693675583e | ||
|
f74eef8399 | ||
|
b9b5c774e5 | ||
|
2346302684 | ||
|
98378fa6df | ||
|
d1936057f9 | ||
|
511dfa92d7 | ||
|
4a1ea34d41 | ||
|
7f43461f7d | ||
|
8a95034deb | ||
|
f59827e869 | ||
|
b8cd36c2a2 | ||
|
cc4592eddd | ||
|
f55fa25915 | ||
|
a880dea68d | ||
|
0c6e07b12c | ||
|
3f814645e5 | ||
|
af0d432680 | ||
|
f19057dcca | ||
|
5f27da2646 | ||
|
4b2e22ba21 | ||
|
2c2d31afe6 | ||
|
9069fd32e3 | ||
|
cb9ff5f7b1 | ||
|
7dd700c160 | ||
|
47b413ee21 | ||
|
781441ff56 | ||
|
d491b35fcd | ||
|
dd75075e2c | ||
|
a408af31b6 | ||
|
612b8176df | ||
|
fe436afb8e | ||
|
25b8870f16 | ||
|
cae5250e25 | ||
|
c0960cfa21 | ||
|
aab33cf83b | ||
|
0205411e8c | ||
|
38cc757542 | ||
|
4363454eb1 | ||
|
2367e4ca0f | ||
|
db1fb57858 | ||
|
e8d13e6044 | ||
|
7b441166ec | ||
|
e5d5446299 | ||
|
5c96452849 | ||
|
de8413e567 | ||
|
1d004772b2 | ||
|
178909c96d | ||
|
4c1b289301 | ||
|
bc4178eab1 | ||
|
9bff3e63f7 | ||
|
a0bbaa731a | ||
|
fff3e2c4c7 | ||
|
a9943ea9ec | ||
|
972feba6b8 | ||
|
e78dcb7b87 | ||
|
f450fbdee2 | ||
|
c002f0ca73 | ||
|
f11f90079f | ||
|
95c8720db7 | ||
|
63c56c8319 | ||
|
b164a1e211 | ||
|
375643c23d | ||
|
12b82219fd | ||
|
65bcaff595 | ||
|
93383f9bd9 | ||
|
bcb2eff28a | ||
|
3898d7ee9e | ||
|
c3a98c7c4a | ||
|
1bb82500a1 | ||
|
60657ac327 | ||
|
0692653f61 | ||
|
0f27e69168 | ||
|
c84f16d90c | ||
|
38402789f7 | ||
|
b03b403ea5 | ||
|
70990e4d6e | ||
|
5b64ab8996 | ||
|
6a66500da6 | ||
|
195865a347 | ||
|
933691c9be | ||
|
d2f865f9b9 | ||
|
9fd67f1c30 | ||
|
6f23a8fc20 | ||
|
d63f1d0e6e | ||
|
2be85368b2 | ||
|
f104f8364d | ||
|
6846c9934f | ||
|
182a6c1b8e | ||
|
b012fa258c | ||
|
39a3940463 | ||
|
eb4197440b | ||
|
3ba5c8d1cb | ||
|
82f3479ba1 | ||
|
9da9eb6c43 | ||
|
ebde33371c | ||
|
d88a8797c9 | ||
|
56bb17e306 | ||
|
788421dca0 | ||
|
a499b8f62c | ||
|
e9dbfcacd9 | ||
|
19622ba55b | ||
|
a9f78a96b9 | ||
|
4c4d8f8020 | ||
|
1dceec275c | ||
|
6cbb49ba03 | ||
|
794980e4bf | ||
|
4e6b6f1830 | ||
|
978c11bd20 | ||
|
53c96de7cd | ||
|
3c181592e0 | ||
|
775954a8c0 | ||
|
dcfe78b3c3 | ||
|
cff02fad4b | ||
|
ab23f5e9db | ||
|
05af026824 | ||
|
1d7a0b91ee | ||
|
a43e1bc0f7 | ||
|
b509df228c | ||
|
4425400587 | ||
|
b8a7edc0c2 | ||
|
91cc5d9dc2 | ||
|
7aba73e82f | ||
|
e672855857 | ||
|
b27361b00f | ||
|
f3b2ab1b8c | ||
|
95940ad113 | ||
|
7a7819dffd | ||
|
9d221555d9 | ||
|
6aae492e1a | ||
|
632b7379bf | ||
|
2f3b0d96e8 | ||
|
02db4d4415 | ||
|
f29a3b62d8 | ||
|
5942b7f910 | ||
|
039c4a9389 | ||
|
fe876711c4 | ||
|
304942f6eb | ||
|
aa1da6105a | ||
|
47aa8d5120 | ||
|
ec16449ace | ||
|
7f8c21a1b7 | ||
|
27b3470ef3 | ||
|
ef725bdccf | ||
|
2dc2888d59 | ||
|
d7a26d08fb | ||
|
7bd5c35c0b | ||
|
f30e5e99b3 | ||
|
040abaf47a | ||
|
35dc1b6fa2 | ||
|
90d77a46b2 | ||
|
c208e4d983 | ||
|
1f810e6f35 | ||
|
2d05c013e3 | ||
|
2b50287f74 | ||
|
4e18b0e3ca | ||
|
2652a543d8 | ||
|
a4852ad06c | ||
|
36a4224564 | ||
|
00968f0717 | ||
|
fa22480576 | ||
|
b61f5eb7b2 | ||
|
ea9a06bf1e | ||
|
f48f518288 | ||
|
4db5749fac | ||
|
0cd5a11b1a | ||
|
fe7ab9bd0c | ||
|
2c44586f73 | ||
|
88266275e1 | ||
|
8a7b5aef09 | ||
|
dd6d0d4de0 | ||
|
46713404f9 | ||
|
321b287009 | ||
|
232836c58b | ||
|
bcda409a92 | ||
|
629738175e | ||
|
3f0c5ff9cc | ||
|
a9c63bda99 | ||
|
c130761fbe | ||
|
33dceaf10c | ||
|
38e4d0fe61 | ||
|
95bf03bf01 | ||
|
2e6000dfe2 | ||
|
3c5952ba55 | ||
|
f35ea85ff1 | ||
|
b991ccce98 | ||
|
80be8e6120 | ||
|
ff47b388b1 | ||
|
cf6187afd3 | ||
|
1d18085804 | ||
|
399ed2f638 | ||
|
bb730beb21 | ||
|
20995376c5 | ||
|
d44264c7bf | ||
|
2895ef2238 | ||
|
6fc8a8f263 | ||
|
755371360a | ||
|
662b4f598a | ||
|
e2d7be2280 | ||
|
188a0c6941 | ||
|
ccc10ba342 | ||
|
21e1787258 | ||
|
4874a840dc | ||
|
0be6a056f9 | ||
|
035dabfe72 | ||
|
95dee93d55 | ||
|
42579572e7 | ||
|
1840e464d3 | ||
|
ff7e71dcb8 | ||
|
d34b17bd16 | ||
|
60fe74b931 | ||
|
e2d59d385a | ||
|
849b3fd592 | ||
|
02cf20aa85 | ||
|
8b39a102dd | ||
|
d36d1bf3fd | ||
|
9d9967a194 | ||
|
3dea181b3f | ||
|
4fc8741011 | ||
|
9b6faac530 | ||
|
f9303bb6ab | ||
|
f4ee5ee3b7 | ||
|
d86685b235 | ||
|
d171491909 | ||
|
8e434a509c | ||
|
be3e54c893 | ||
|
d1abec4736 | ||
|
9fc9b4a1f5 | ||
|
c9283be530 | ||
|
25238322c6 | ||
|
888a4c9ff0 | ||
|
9d112408b2 | ||
|
34a5d27545 | ||
|
98249c732b | ||
|
552826b24d | ||
|
254a307a00 | ||
|
e341f05b27 | ||
|
414aaf0b06 | ||
|
bc6aa8dd56 | ||
|
caa6b3e352 | ||
|
a9f701f686 | ||
|
6747741f73 | ||
|
2c6ca95cf4 | ||
|
097398b8d6 | ||
|
15c1692954 | ||
|
773ad16984 | ||
|
2ff0ab71d3 | ||
|
299b82d7bb | ||
|
1a85db9a0e | ||
|
292b6be99a | ||
|
fc1b2bd641 | ||
|
680eeeb122 | ||
|
d1f75a8473 | ||
|
140d10497e | ||
|
bb276c2e42 | ||
|
09b46a6146 | ||
|
37eb6af5a7 | ||
|
36708cb12f | ||
|
1a6f1cd192 | ||
|
fe7b6d2670 | ||
|
333cdb4fd4 | ||
|
8c1ee84980 | ||
|
b3fec8fcc9 | ||
|
0537dbf145 | ||
|
93822b64b2 | ||
|
3acfe69edb | ||
|
51bfe130d0 | ||
|
1ee1a7f6d7 | ||
|
ff7ef8d930 | ||
|
0cb2febdf9 | ||
|
445a33f64f | ||
|
6616e7c86a | ||
|
a68d1224ce | ||
|
5b8ae3de07 | ||
|
f3586e1100 | ||
|
65de830533 | ||
|
44b801d142 | ||
|
eac7586f9d | ||
|
3e44cb15cd | ||
|
7516f12a57 | ||
|
2c4a3c0c87 | ||
|
8b13ecb596 | ||
|
a76a486d52 | ||
|
30bf34da4a | ||
|
b03da5d6e8 | ||
|
6e8ab4acc6 | ||
|
8a8f2fe7ca | ||
|
fa7108d999 | ||
|
0cad2bae9a | ||
|
42c3481486 | ||
|
84bd15651b | ||
|
27280a1bf3 | ||
|
ff8fade3af | ||
|
dc83bcb73a | ||
|
f86a25add3 | ||
|
5bb8b42f24 | ||
|
1b9364bff6 | ||
|
074464fe0c | ||
|
a7eaf870d0 | ||
|
1c5dfbef59 | ||
|
512661073a | ||
|
5e131027d6 | ||
|
5944510d4b | ||
|
ece66a4aa5 | ||
|
1a74660ad1 | ||
|
9c819120bf | ||
|
3631fd280f | ||
|
e2a8e10e05 | ||
|
8bbe87d4e9 | ||
|
a72312608d | ||
|
ea32a8f6dd | ||
|
918e273d97 | ||
|
3e26df4a85 | ||
|
5acd0b8b14 | ||
|
488288ac01 | ||
|
94b4221407 | ||
|
f392963dee | ||
|
731db00ada | ||
|
4871350141 | ||
|
da429b2d1d | ||
|
6933de2d40 | ||
|
283d91742e | ||
|
a70a68b079 | ||
|
d9dafac04d | ||
|
a4b27fec83 | ||
|
0772c774de | ||
|
5d96d81ce2 | ||
|
dee9de2142 | ||
|
7e5ad72f7e | ||
|
94e4793fb7 | ||
|
8835ec5113 | ||
|
5246e7e67e | ||
|
f40c0fb74a | ||
|
615b6a308b | ||
|
1c8facda82 | ||
|
20269c169c | ||
|
c661a303d3 | ||
|
7a335eb227 | ||
|
51fef82a50 | ||
|
c4bc27dabe | ||
|
e8bbf842da | ||
|
9db0232201 | ||
|
41d6a77191 | ||
|
14ddffc57b | ||
|
3ef62e0b07 | ||
|
ad7fb3e30b | ||
|
a28a25a666 | ||
|
8d3e3ad696 | ||
|
046965b325 | ||
|
faaca4e3ae | ||
|
99cf227b88 | ||
|
f4eb1ade06 | ||
|
3649bc8147 | ||
|
520a769350 | ||
|
d76c91833f | ||
|
7a3052aea9 | ||
|
98c3c7b6ed | ||
|
b825c4f94d | ||
|
18579dabb0 | ||
|
77233c2eff | ||
|
08b5fc1917 | ||
|
348b232ba9 | ||
|
7c0fc0828e | ||
|
6b3ef76d42 | ||
|
45e91981ab | ||
|
44566343c7 | ||
|
5cee230b74 | ||
|
2882035024 | ||
|
279d06325d | ||
|
aad077b568 | ||
|
c1c7cf0ac9 | ||
|
6f7947c33a | ||
|
b280097e98 | ||
|
a113750f8d | ||
|
acf4db74fb | ||
|
063fce47d5 | ||
|
fff13f6d0a | ||
|
449e734bc4 | ||
|
1d23fd4749 | ||
|
2017d1e548 | ||
|
bdc6311614 | ||
|
62fa964566 | ||
|
8e522a5406 | ||
|
e0888c4e9c | ||
|
e2d3086b15 | ||
|
761ab9796a | ||
|
389aae552f | ||
|
47086b3f3c | ||
|
495b894b67 | ||
|
fe12a3f8db | ||
|
c0d2c97a2b | ||
|
08ef62d870 | ||
|
905ed789ad | ||
|
f4deebbea3 | ||
|
630d420cb5 | ||
|
6b3e101020 | ||
|
8014a903ae | ||
|
7e260c46b8 | ||
|
55c89f45a6 | ||
|
d2c6424055 | ||
|
c670fb098b | ||
|
7bc6ff66c8 | ||
|
2a723c19e0 | ||
|
cbb89b3c4b | ||
|
18ce347155 | ||
|
3be57511db | ||
|
6eef5c24fa | ||
|
34dad882aa | ||
|
a167e23c09 | ||
|
3f1610665f | ||
|
1d8e854e89 | ||
|
0779441f29 | ||
|
793ec60127 | ||
|
2e18c920f5 | ||
|
bfb8aa21f5 | ||
|
5161d84375 | ||
|
8f7ff3be9c | ||
|
ee12ac166f | ||
|
7ec3a6fcf9 | ||
|
a0d5d9ffea | ||
|
3929cd5acd | ||
|
977d49261e | ||
|
a22f0b3e36 | ||
|
fa991ca764 | ||
|
0664fa10d1 | ||
|
b15599b5a0 | ||
|
dfad847c53 | ||
|
7939ca8f9a | ||
|
3df8cd9160 | ||
|
6be6aae252 | ||
|
dd9d7513cb | ||
|
80f5a5b7d1 | ||
|
be343438c2 | ||
|
763c681d6d | ||
|
bece6ab3b1 | ||
|
44a94d8633 | ||
|
a6ac9ea1e0 | ||
|
13da6932dd | ||
|
3e6af9a0d7 | ||
|
4ccfddc7b2 | ||
|
81d7fc4cc8 | ||
|
4e88bf29ca | ||
|
c0bb19ec70 | ||
|
4a886f7f56 | ||
|
f5acf80d58 | ||
|
ce84a98925 | ||
|
b0a5a81c0a | ||
|
ede76763f1 | ||
|
a205784401 | ||
|
7deeb90b8e | ||
|
3e31c1c430 | ||
|
9e528fc1a9 | ||
|
bd1fdc8581 | ||
|
53c9c4c3f2 | ||
|
cb7d92aea9 | ||
|
021282fac7 | ||
|
6dbbf074b4 | ||
|
55d4a3b63f | ||
|
7829c48320 | ||
|
63c13330d3 | ||
|
f205164cb7 | ||
|
ee8f29789f | ||
|
e310066ed7 | ||
|
ea7e3ff18b | ||
|
7347a33d96 | ||
|
b4b1df302f | ||
|
6451f9591f | ||
|
3aed5d85f9 | ||
|
d0f65c01b5 | ||
|
2888c5af5e | ||
|
eb01476eef | ||
|
a38da161b2 | ||
|
3335c25243 | ||
|
e6f8d9f4a1 | ||
|
65387e8fc8 | ||
|
d48a6a1675 | ||
|
f91d0866bb | ||
|
59be0f7023 | ||
|
d19284db97 | ||
|
6c0368161b | ||
|
3a34e8533f | ||
|
5f129ca83d | ||
|
56e605a75f | ||
|
f065bd3233 | ||
|
bb11325716 | ||
|
4344f6936b | ||
|
3c0e7a3dc1 | ||
|
8368fbc6df | ||
|
e7a5598922 | ||
|
83fb8d486d | ||
|
c7611da75e | ||
|
97f2d63ae7 | ||
|
ffd84c49f3 | ||
|
38df487e08 | ||
|
e08564bad5 | ||
|
c087d459ff | ||
|
c996d61419 | ||
|
42815cbbcd | ||
|
a435cc2d2c | ||
|
af003f159d | ||
|
c7df7e757a | ||
|
7fe024283d | ||
|
9ba1a34095 | ||
|
c9b083ceb8 | ||
|
43d2addc09 | ||
|
b9c388a79f | ||
|
d3ffafb3fe | ||
|
0f71a6bcaf | ||
|
5b5270159c | ||
|
dcaae4acfc | ||
|
b2563fe35f | ||
|
ebe57c498c | ||
|
201a2b45e4 | ||
|
de20a05968 | ||
|
9a0cbca281 | ||
|
2e565ac066 | ||
|
932e5fc208 | ||
|
492534c329 | ||
|
57b17a329e | ||
|
cd99eb5db3 | ||
|
28bd244e1b | ||
|
0aa86a6e88 | ||
|
4bb3252707 | ||
|
348f26f6ff | ||
|
b551647bbb | ||
|
d555dbee67 | ||
|
a0c64ca14a | ||
|
e3beb98ef8 | ||
|
9a67a4bd0c | ||
|
8475760345 | ||
|
247bbb49aa | ||
|
8edf0be950 | ||
|
6111f32f22 | ||
|
9fdbd1adf3 | ||
|
904eb0e816 | ||
|
15321bbd21 | ||
|
78b3ac1e87 | ||
|
878324e95d | ||
|
90e8f98cc0 | ||
|
f8e65beef3 | ||
|
6a7fb9f81c | ||
|
1c9c29a1e1 | ||
|
8469589a2d | ||
|
e58a45896c | ||
|
a7cf31fa61 | ||
|
1568cfc438 | ||
|
ba51166571 | ||
|
615f8bf494 | ||
|
efe59312ed | ||
|
f9bbd8b762 | ||
|
720f72ec77 | ||
|
c1bff8dd95 | ||
|
bea5f40782 | ||
|
73fd71d0e3 | ||
|
144bdce16a | ||
|
5a81c52bea | ||
|
8fb1b723c3 | ||
|
00a9837f3a | ||
|
08f53c790d | ||
|
a86bae2370 | ||
|
1e9681168c | ||
|
c906efb374 | ||
|
08dce33ceb | ||
|
88f095ef2e | ||
|
aeaa0e6a76 | ||
|
debdd7ab0e | ||
|
deb841aec8 | ||
|
9705094aa2 | ||
|
bdc5cc245a | ||
|
fdd294bc0f | ||
|
99fb9e0f07 | ||
|
cbc4bc432a | ||
|
080099ff4d | ||
|
d71dcf796c | ||
|
572643916d | ||
|
c9d3096309 | ||
|
cb0ad9160a | ||
|
6924ba9e5b | ||
|
9944df0ca9 | ||
|
8d9e826640 | ||
|
3e106a39c1 | ||
|
22122eb2ef | ||
|
6c538edb8d | ||
|
1af20a20ff | ||
|
2568237e63 | ||
|
37d3a5af7a | ||
|
2a6ecb7ac3 | ||
|
3bd9fdb312 | ||
|
e5b3ff6e7d | ||
|
73f8834db4 | ||
|
661d006438 | ||
|
bf874aff25 | ||
|
fc9bf4e8aa | ||
|
667a032ff9 | ||
|
9b28291dd9 | ||
|
d1abd6ff9b | ||
|
335320b934 | ||
|
729cad5933 | ||
|
c61855ee8f | ||
|
e6cc420e7c | ||
|
1464121fcb | ||
|
08d4c385cc | ||
|
72da28f802 | ||
|
1908f96541 | ||
|
cf5b17b10c | ||
|
a81e57fa19 | ||
|
f16f2dd1a4 | ||
|
eccd845857 | ||
|
6554f0679c | ||
|
4f90c0a4d8 | ||
|
235a70e545 | ||
|
7c59faa295 | ||
|
613431b6c6 | ||
|
088a992716 | ||
|
562d6e61fe | ||
|
317c0762ef | ||
|
8b04439d76 | ||
|
862c933436 | ||
|
f544b1e653 | ||
|
6b0b8024a2 | ||
|
3f1f6b9c59 | ||
|
d3700847aa | ||
|
9ae0a081ff | ||
|
2fcd415dc4 | ||
|
ea3f0268b1 | ||
|
fff3eda800 | ||
|
06d6f84e47 | ||
|
ee19892ff8 | ||
|
c8acfcdf6f | ||
|
8e28843c0b | ||
|
b24596be8a | ||
|
4ebb3e67ef | ||
|
ac6bede441 | ||
|
ede93de4ff | ||
|
da80d242d9 | ||
|
148a7bbb58 | ||
|
86f05fcee7 | ||
|
d6e2d29069 | ||
|
3b48b09f7e | ||
|
e7682ed198 | ||
|
46d68513a1 | ||
|
5258ddda43 | ||
|
bc8ed6f965 | ||
|
46936c2525 | ||
|
76612cba81 | ||
|
78f391c7c8 | ||
|
0dfc8512ef | ||
|
421121871c | ||
|
9910748e57 | ||
|
31cb8f9b13 | ||
|
43219a1b35 | ||
|
6abcb054fd | ||
|
dd52302193 | ||
|
dc139a255d | ||
|
55208ea650 | ||
|
30e86bf9bc | ||
|
181ee6bfe2 | ||
|
b7800a4dc9 | ||
|
c08d1ff1db | ||
|
d67f20d2e6 | ||
|
b5dbb943cf | ||
|
0d4bd452b3 | ||
|
4e5c46d29e | ||
|
c2f128dd32 | ||
|
94fcfa794c | ||
|
6ce1e7baa9 | ||
|
b2040206cd | ||
|
50fa4d5392 | ||
|
1e67fc1b74 | ||
|
94092139e5 | ||
|
eb7db17979 | ||
|
964159ea84 | ||
|
c51a12298b | ||
|
7817a9e12e | ||
|
1e7a860047 | ||
|
b686f9b5d1 | ||
|
4bfb04199e | ||
|
5da13b8a3b | ||
|
73ae374ef8 | ||
|
db8dfb832c | ||
|
6a4982c6a3 | ||
|
4030eebdd1 | ||
|
f7d4f0a895 | ||
|
fa54570f93 | ||
|
e612ccf3da | ||
|
9399e413ba | ||
|
83e198bacf | ||
|
d236f9c06e | ||
|
c2c9420a3f | ||
|
414d65c37e | ||
|
2921643f46 | ||
|
0bdd5f1151 | ||
|
867a206bb8 | ||
|
554396f6d7 | ||
|
809cc965c9 | ||
|
cee2119aff | ||
|
770f549896 | ||
|
6bf3ce4632 | ||
|
88cfa25c75 | ||
|
2debabe12e | ||
|
859094c919 | ||
|
34f2218108 | ||
|
8bf722e4ee | ||
|
3b7ea38958 | ||
|
cdced3e9f9 | ||
|
3ba814628e | ||
|
0886582687 | ||
|
a183595c3e | ||
|
a17680dc27 | ||
|
079a2db1a2 | ||
|
001af396cb | ||
|
8accc444ee | ||
|
48f046a771 | ||
|
f5513b3dea | ||
|
ac46cf4d53 | ||
|
fa864a7c5f | ||
|
1148c23b58 | ||
|
ec949e244b | ||
|
182ecfdc7a | ||
|
c7801e1bf2 | ||
|
330cce71d0 | ||
|
c1bb530134 | ||
|
634d7ffd3f | ||
|
e3fc1e1238 | ||
|
35789219d4 | ||
|
a6e339ef77 | ||
|
d0d5edd9cb | ||
|
84631456e2 | ||
|
6002827e10 | ||
|
c3d078c6fc | ||
|
e2d884ca7e | ||
|
d6391e4a3e | ||
|
0e153415c8 | ||
|
25ec4ecf7d | ||
|
9d43b07b1c | ||
|
99ff34f6a7 | ||
|
8ad09c0cd3 | ||
|
dc5a707ff1 | ||
|
6c92cba45c | ||
|
31cc63f006 | ||
|
4c9a277a69 | ||
|
42c83f8613 | ||
|
6be45f5ce3 | ||
|
ac3528d02f | ||
|
df2b10cb9c | ||
|
f3c87983bf | ||
|
18b71b825d | ||
|
91b52c43a5 | ||
|
4b6df9cee3 | ||
|
842e567772 | ||
|
6b17a251b5 | ||
|
75cc500dd1 | ||
|
c21ba75444 | ||
|
1b21144b5b | ||
|
22bc9c2ede | ||
|
6b16c952cc | ||
|
d59e251b77 | ||
|
87fdefc832 | ||
|
eba4516e54 | ||
|
f5c7a87788 | ||
|
7797763338 | ||
|
d9829b6e54 | ||
|
79b9befaaf | ||
|
4fecf3c05b | ||
|
628359df90 | ||
|
89fd829a8f | ||
|
4334454e8b | ||
|
5f68c2e194 | ||
|
656c50fa82 | ||
|
1489c1586c | ||
|
ee990dfac4 | ||
|
e1b5257d04 | ||
|
fbb96bcbf3 | ||
|
522ca0902e | ||
|
1f0b3e8c75 | ||
|
6ca91c2af1 | ||
|
d0a6eaca1e | ||
|
acba8987d2 | ||
|
1b0c20c4ed | ||
|
20bfbd3f81 | ||
|
ea6b2b5cee | ||
|
13587046f5 | ||
|
fbfa09a551 | ||
|
f4f7e747bc | ||
|
0a5961fb1d | ||
|
43c4ef4c11 | ||
|
835e9a049e | ||
|
937d907564 | ||
|
3e4a77c8bb | ||
|
8320af66c9 | ||
|
4c459ddd47 | ||
|
2b940743e1 | ||
|
8c835b9d95 | ||
|
526b7e3f18 | ||
|
65a6133664 | ||
|
446029c8f6 | ||
|
122e5c5c30 | ||
|
55cc12632e | ||
|
a111c15ee6 | ||
|
29adcb07ec | ||
|
0c9dfb90f4 | ||
|
ebfbab5391 | ||
|
d7c297a1b2 | ||
|
5280fa6630 | ||
|
33fd36833c | ||
|
b3179939a1 | ||
|
0533f35bc3 | ||
|
092f125c7f | ||
|
679435b5f6 | ||
|
0e3dbdcf9f | ||
|
225ca86818 | ||
|
d912ad9499 | ||
|
6cf4ff0884 | ||
|
06c8a54f26 | ||
|
8ab17e33b9 | ||
|
7cdeb860de | ||
|
37a893aaf6 | ||
|
7377770913 | ||
|
ea9d145882 | ||
|
a0ba4fa3fa | ||
|
c065caea28 | ||
|
fbc381f24b | ||
|
27b5654791 | ||
|
c761f75352 | ||
|
a66905028d | ||
|
69322e8099 | ||
|
0a88abe0ae | ||
|
8d36328880 | ||
|
c86e1fc7f6 | ||
|
7b0b81351a | ||
|
55a3bbcb61 | ||
|
5112b1bc5c | ||
|
e9c2a93106 | ||
|
25047e7e51 | ||
|
139c30af4d | ||
|
621a65d862 | ||
|
ecbc19d454 | ||
|
8e5e443eaa | ||
|
05fb0ede75 | ||
|
880e5ceda7 | ||
|
acf5f689e3 | ||
|
fab9901d3e | ||
|
32035088dd | ||
|
08cc29ce8b | ||
|
4354eaf9b2 | ||
|
c651fd2298 | ||
|
255ce2a299 | ||
|
1acce8ec61 | ||
|
f49674b47a | ||
|
2a99776e01 | ||
|
f1b35e1c8a | ||
|
139ba0dea2 | ||
|
3e4cb6112b | ||
|
3d292ff2f4 | ||
|
c351949d0d | ||
|
a7c20f6b92 | ||
|
214de43094 | ||
|
a2df892b99 | ||
|
7d756466af | ||
|
8cd51b9041 | ||
|
cdb3c57c90 | ||
|
49a85d2f23 | ||
|
4c6430cf8a | ||
|
5206e40b72 | ||
|
a767a26bcd | ||
|
b14726e745 | ||
|
efbae85053 | ||
|
84fe52d2c2 | ||
|
f963465825 | ||
|
b49d1050ff | ||
|
7bbba48e29 | ||
|
05b882fc4f | ||
|
aced890d1d | ||
|
06189a9e04 | ||
|
b543e17169 | ||
|
305d2c61c0 | ||
|
d6a30457fa | ||
|
9d56905af6 | ||
|
3b1d7ac70e | ||
|
94a2378168 | ||
|
33ec159510 | ||
|
65bafff8f9 | ||
|
281b9fbecd | ||
|
d4ec35b485 | ||
|
c9bff759a0 | ||
|
7b42f7d45d | ||
|
35f945ae52 | ||
|
0c04cc9881 | ||
|
3eec3b559c | ||
|
349b8f5312 | ||
|
2a1338cb1f | ||
|
aa938dc381 | ||
|
647f854ddb | ||
|
0692ae7353 | ||
|
5dbd3e975b | ||
|
f98f10031b | ||
|
90e5eac3e4 | ||
|
ba341c02a2 | ||
|
f327a796b4 | ||
|
ea101a1eb6 | ||
|
2fd81819e8 | ||
|
e4e3de18ad | ||
|
3e65976e48 | ||
|
62d94a5062 | ||
|
524ce972fc | ||
|
3988965663 | ||
|
b28f610522 | ||
|
754f85a59c | ||
|
5f936785e9 | ||
|
843a084436 | ||
|
df53573bdf | ||
|
92ccc2282a | ||
|
b5f97d0708 | ||
|
95aa47c6aa | ||
|
749e53332f | ||
|
0f87d89324 | ||
|
2a534141da | ||
|
d8839dd5b6 | ||
|
4a6a63e082 | ||
|
fb13cf48d1 | ||
|
887aa192b2 | ||
|
5fb052aa86 | ||
|
15fb42703e | ||
|
5c161730aa | ||
|
adf8d03c6c | ||
|
878e17ac12 | ||
|
00c881ecda | ||
|
0dbc212980 | ||
|
8a3f315e12 | ||
|
6aa0875ff5 | ||
|
7d5fbe5bb9 | ||
|
23292acaec | ||
|
7bd0af4762 | ||
|
8ca4a76829 | ||
|
2f305deb30 | ||
|
490907a73c | ||
|
6169f39cc0 | ||
|
d948e829da | ||
|
a45c062bb6 | ||
|
830b03ddcc | ||
|
3ac9153600 | ||
|
04b8369327 | ||
|
bc22e33e5e | ||
|
ba2661487d | ||
|
068a43b43c | ||
|
a2654c088d | ||
|
f4555ba5e4 | ||
|
aa8c854016 | ||
|
7335bf06a8 | ||
|
20342e1076 | ||
|
b7bd958194 | ||
|
8105fd158a | ||
|
1dc5a41b61 | ||
|
163aa0dd1f | ||
|
b1f903e2e3 | ||
|
a15486134b | ||
|
68ad03354f | ||
|
8e3655425f | ||
|
3b1ba2149d | ||
|
d763b52b8c | ||
|
5e5c82db89 | ||
|
e10c5e8c03 | ||
|
2bde25c1c2 | ||
|
a210261771 | ||
|
6bae4e7ef1 | ||
|
708d2d54dd | ||
|
8e4a62560d | ||
|
70c21e6429 | ||
|
0093b9dae7 | ||
|
e2a14ae0af | ||
|
9f5021d33b | ||
|
5ac01564c4 | ||
|
a7b182f02e | ||
|
526535ffc2 | ||
|
f4e0ef99d1 | ||
|
4a442bd1e5 | ||
|
749d928b2b | ||
|
9701fa30b8 | ||
|
59d1e6f956 | ||
|
5627721fe9 | ||
|
48c2dece17 | ||
|
76d9d2285c | ||
|
57dcf3e8b0 | ||
|
922b6a4bc3 | ||
|
2d491faec1 | ||
|
f0048206b3 | ||
|
25babfff72 | ||
|
60cefb4b18 | ||
|
5f6048d9e1 | ||
|
4475a5915e | ||
|
e6877b6303 | ||
|
ee945945f2 | ||
|
a10539fb22 | ||
|
d24e3713e9 | ||
|
81b033ad20 | ||
|
c49600c73d | ||
|
94dbab1e74 | ||
|
49f8494e67 | ||
|
ad1d0ff2ae | ||
|
a60eeb8a7e | ||
|
bd1774794b | ||
|
a29c1e27ff | ||
|
200e224196 | ||
|
278898ca0f | ||
|
5a04893d0f | ||
|
3f59076ba7 | ||
|
1b6bcd166b | ||
|
bf3b2ad0a0 | ||
|
9f4e5090c2 | ||
|
3f3ada75f1 | ||
|
227e25a044 | ||
|
96044b7c12 | ||
|
97ac80c803 | ||
|
8932198bb0 | ||
|
e379688513 | ||
|
0ff3a18cab | ||
|
0eaf757610 | ||
|
eb0a49b383 | ||
|
0ab2fee93c | ||
|
279e798765 | ||
|
5ae97010d3 | ||
|
e82ecfe3b8 | ||
|
c3a3e55b0b | ||
|
af559f0d30 | ||
|
e636270615 | ||
|
e3a52af3c2 | ||
|
1a3b6e977a | ||
|
1ca6c334ce | ||
|
ecdc20b868 | ||
|
1ce19d653e | ||
|
77c590f927 | ||
|
76a9bced55 | ||
|
3ab521c33e | ||
|
793203ae88 | ||
|
1ad8fa272f | ||
|
9ac92188a9 | ||
|
cecc01716f | ||
|
43bb4edf1c | ||
|
1cae6dccfe | ||
|
3b258c1bf3 | ||
|
fb091da7e7 | ||
|
cecd71d2ce | ||
|
53e77c0da3 | ||
|
a9d58695e8 | ||
|
d9fe615031 | ||
|
1d723c172e | ||
|
1a63461b34 | ||
|
96766451b1 | ||
|
64e61fa29b | ||
|
d138d680b7 | ||
|
1ba2feaae1 | ||
|
783ec3631b | ||
|
356dbe9894 | ||
|
36717079d3 | ||
|
f54c571bc6 | ||
|
57907ff83a | ||
|
ffac2e3b78 | ||
|
699de14c3d | ||
|
1d1046b635 | ||
|
474399108d | ||
|
a06fea502c | ||
|
9a5d264d20 | ||
|
b8dfbf72e0 | ||
|
c9e3cd7270 | ||
|
c204c17e1e | ||
|
6b361a75df | ||
|
f1db0b320a | ||
|
9f6914415d | ||
|
cfd9b5f952 | ||
|
055058d4bf | ||
|
1568d42dd0 | ||
|
0687801562 | ||
|
4c4f8acb1a | ||
|
a483726054 | ||
|
62eaf8757a | ||
|
9f887a60b8 | ||
|
86183ee468 | ||
|
14dfb150cc | ||
|
a52c670863 | ||
|
fc09c38b10 | ||
|
d351601c41 | ||
|
983ec6776f | ||
|
52e29f7bd6 | ||
|
d0a188ad16 | ||
|
255ebb9fb6 | ||
|
ba28bc59ae | ||
|
442ad14395 | ||
|
4e2d317b35 | ||
|
088eaa3cf8 | ||
|
bbc69b23cc | ||
|
6bc53e7f58 | ||
|
d99347b98a | ||
|
19b78918e0 | ||
|
1120595aef | ||
|
8869202403 | ||
|
8f6c2c20ad | ||
|
de77dcd907 | ||
|
93adf6d658 | ||
|
48c6a5fc44 | ||
|
e7699f0b72 | ||
|
187f42255c | ||
|
39e817de59 | ||
|
ca12b7e6b0 | ||
|
cc8011e403 | ||
|
896f0f9285 | ||
|
353578c0d4 | ||
|
ec180bd6fe | ||
|
a8a88167dc | ||
|
6c57260088 | ||
|
c347098cc8 | ||
|
8b221bb928 |
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
/.settings/
|
||||
/.buildpath
|
||||
/.project
|
||||
/vendor/
|
9
TODELETE
Normal file
9
TODELETE
Normal 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
|
@ -1,7 +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
|
||||
{
|
||||
//Initialisation global des paramètres de vue
|
||||
/**
|
||||
* Set config available in all apps
|
||||
*/
|
||||
protected function _initConfig()
|
||||
{
|
||||
$config = new Zend_Config($this->getOptions());
|
||||
Zend_Registry::set('config', $config);
|
||||
return $config;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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');
|
||||
@ -10,28 +43,38 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||
$view->headTitle()->setSeparator(' - ');
|
||||
$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;
|
||||
}
|
||||
|
||||
@ -44,10 +87,7 @@ 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')
|
||||
@ -60,69 +100,62 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||
$AppMailWriter->addFilter(Zend_Log::ERR);
|
||||
$AppLogger->addWriter($AppMailWriter);
|
||||
}
|
||||
$configuration = Zend_Registry::get('configuration');
|
||||
$path = $configuration->path->data.'/'.$configuration->path->log;
|
||||
$AppFileWriter = new Zend_Log_Writer_Stream($path.'/application.log');
|
||||
$AppFileWriter->addFilter(Zend_Log::ERR);
|
||||
$AppLogger->addWriter($AppFileWriter);
|
||||
Zend_Registry::set('log', $AppLogger);
|
||||
}
|
||||
|
||||
protected function _initZFDebug()
|
||||
|
||||
/**
|
||||
* Logs and Debug
|
||||
*/
|
||||
protected function _initLogger()
|
||||
{
|
||||
$zfdebug = false; //@todo : Mettre dans la configuration
|
||||
if (APPLICATION_ENV != 'production' && $zfdebug == true)
|
||||
{
|
||||
$autoloader = Zend_Loader_Autoloader::getInstance();
|
||||
$autoloader->registerNamespace('ZFDebug');
|
||||
$options = array(
|
||||
'plugins' => array(
|
||||
'Variables',
|
||||
'File' => array('base_path' => APPLICATION_PATH . '../' ),
|
||||
'Memory',
|
||||
'Time',
|
||||
'Exception')
|
||||
);
|
||||
# Instantiate the database adapter and setup the plugin.
|
||||
# Alternatively just add the plugin like above and rely on the autodiscovery feature.
|
||||
if ($this->hasPluginResource('db')) {
|
||||
$this->bootstrap('db');
|
||||
$db = $this->getPluginResource('db')->getDbAdapter();
|
||||
$options['plugins']['Database']['adapter'] = $db;
|
||||
}
|
||||
# Setup the cache plugin
|
||||
if ($this->hasPluginResource('cache')) {
|
||||
$this->bootstrap('cache');
|
||||
$cache = $this->getPluginResource('cache')->getDbAdapter();
|
||||
$options['plugins']['Cache']['backend'] = $cache->getBackend();
|
||||
}
|
||||
$debug = new ZFDebug_Controller_Plugin_Debug($options);
|
||||
$this->bootstrap('frontController');
|
||||
$frontController = $this->getResource('frontController');
|
||||
$frontController->registerPlugin($debug);
|
||||
}
|
||||
$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()
|
||||
{
|
||||
$configuration = Zend_Registry::get('configuration');
|
||||
$c = Zend_Registry::get('config');
|
||||
try {
|
||||
$db = Zend_Db::factory($configuration->databases->db->sdv1);
|
||||
$db = Zend_Db::factory($c->profil->db->sdv1);
|
||||
$db->getConnection();
|
||||
} catch ( Exception $e ) {
|
||||
if (APPLICATION_ENV == 'development') {
|
||||
print_r($e);
|
||||
echo '<pre>'; print_r($e); echo '</pre>';
|
||||
} else {
|
||||
echo "Le service rencontre actuellement un problème technique.";
|
||||
}
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set the default adapter to use with all model
|
||||
*/
|
||||
Zend_Db_Table::setDefaultAdapter($db);
|
||||
|
||||
|
||||
/**
|
||||
* Set Firebug Database profiler
|
||||
*/
|
||||
@ -132,21 +165,19 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||
$db->setProfiler($profiler);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Init cache
|
||||
*/
|
||||
protected function _initCache()
|
||||
{
|
||||
// @todo : Remove for PHP7 Compatibility
|
||||
//MetadataCache pour la base de données
|
||||
$frontendOptions = array(
|
||||
'lifetime' => 28800,
|
||||
'automatic_serialization' => true
|
||||
);
|
||||
$backendOptions = array();
|
||||
$cache = Zend_Cache::factory('Core','Apc', $frontendOptions, $backendOptions);
|
||||
$cache = Zend_Cache::factory('Core', 'Apc',
|
||||
array('lifetime' => 28800, 'automatic_serialization' => true),
|
||||
array()
|
||||
);
|
||||
Zend_Db_Table_Abstract::setDefaultMetadataCache($cache);
|
||||
|
||||
//Cache pour les données de la base à stocker
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
1
application/configs/.gitignore
vendored
Normal file
1
application/configs/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/application.ini
|
@ -1,41 +0,0 @@
|
||||
[production]
|
||||
;phpSettings.session.gc_maxlifetime = 432000
|
||||
;phpSettings.session.cookie_lifetime = 432000
|
||||
phpSettings.date.timezone = "Europe/Paris"
|
||||
phpSettings.display_startup_errors = 0
|
||||
phpSettings.display_errors = 0
|
||||
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
|
||||
bootstrap.class = "Bootstrap"
|
||||
appnamespace = "Application"
|
||||
resources.session.save_path = APPLICATION_PATH "/../cache/sessions"
|
||||
;resources.session.gc_maxlifetime = 432000
|
||||
;resources.session.cookie_lifetime = 432000
|
||||
;resources.session.remember_me_seconds = 432000
|
||||
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
|
||||
resources.frontController.plugins.Auth = "Application_Controller_Plugin_Auth"
|
||||
resources.frontController.plugins.Theme = "Application_Controller_Plugin_Theme"
|
||||
resources.frontController.plugins.Menu = "Application_Controller_Plugin_Menu"
|
||||
resources.frontController.plugins.Pdf = "Application_Controller_Plugin_Pdf"
|
||||
resources.frontController.plugins.Xml = "Application_Controller_Plugin_Xml"
|
||||
resources.frontController.plugins.Cgu = "Application_Controller_Plugin_Cgu"
|
||||
resources.frontController.params.displayExceptions = 0
|
||||
resources.layout.layout = "main"
|
||||
resources.layout.layoutPath = APPLICATION_PATH "/views/default"
|
||||
resources.view.basePath = APPLICATION_PATH "/views/default"
|
||||
autoloaderNamespaces[] = "Application_"
|
||||
autoloaderNamespaces[] = "Form_"
|
||||
autoloaderNamespaces[] = "Scores_"
|
||||
|
||||
[staging : production]
|
||||
resources.frontController.params.displayExceptions = 0
|
||||
phpSettings.soap.wsdl_cache_enabled = 0
|
||||
|
||||
[development : production]
|
||||
phpSettings.display_startup_errors = 1
|
||||
phpSettings.display_errors = 1
|
||||
phpSettings.soap.wsdl_cache_enabled = 0
|
||||
resources.frontController.params.displayExceptions = 1
|
||||
|
||||
[testing : production]
|
||||
phpSettings.display_startup_errors = 1
|
||||
phpSettings.display_errors = 1
|
@ -1,59 +0,0 @@
|
||||
[local]
|
||||
webservices.interne.wsdl = "http://webservice-2.3.sd.dev/interne/v0.4?wsdl-auto"
|
||||
webservices.interne.options.soap_version = SOAP_1_2
|
||||
webservices.entreprise.wsdl = "http://webservice-2.3.sd.dev/entreprise/v0.7?wsdl-auto"
|
||||
webservices.entreprise.options.soap_version = SOAP_1_2
|
||||
webservices.gestion.wsdl = "http://webservice-2.3.sd.dev/gestion/v0.3?wsdl-auto"
|
||||
webservices.gestion.options.soap_version = SOAP_1_2
|
||||
webservices.saisie.wsdl = "http://webservice-2.3.sd.dev/saisie/v0.2?wsdl-auto"
|
||||
webservices.saisie.options.soap_version = SOAP_1_2
|
||||
webservices.pieces.wsdl = "http://webservice-2.3.sd.dev/pieces/v0.1?wsdl-auto"
|
||||
webservices.pieces.options.soap_version = SOAP_1_2
|
||||
|
||||
[sdsrvdev01]
|
||||
webservices.interne.wsdl = "http://webservice-2.3.sd.lan/interne/v0.4?wsdl-auto"
|
||||
webservices.interne.options.soap_version = SOAP_1_2
|
||||
webservices.entreprise.wsdl = "http://webservice-2.3.sd.lan/entreprise/v0.7?wsdl-auto"
|
||||
webservices.entreprise.options.soap_version = SOAP_1_2
|
||||
webservices.gestion.wsdl = "http://webservice-2.3.sd.lan/gestion/v0.3?wsdl-auto"
|
||||
webservices.gestion.options.soap_version = SOAP_1_2
|
||||
webservices.saisie.wsdl = "http://webservice-2.3.sd.lan/saisie/v0.2?wsdl-auto"
|
||||
webservices.saisie.options.soap_version = SOAP_1_2
|
||||
webservices.pieces.wsdl = "http://webservice-2.3.sd.lan/pieces/v0.1?wsdl-auto"
|
||||
webservices.pieces.options.soap_version = SOAP_1_2
|
||||
|
||||
[sd-25137]
|
||||
webservices.interne.wsdl = "http://wse.scores-decisions.com:8081/interne/v0.4?wsdl"
|
||||
webservices.interne.options.soap_version = SOAP_1_2
|
||||
webservices.entreprise.wsdl = "http://wse.scores-decisions.com:8081/entreprise/v0.7?wsdl"
|
||||
webservices.entreprise.options.soap_version = SOAP_1_2
|
||||
webservices.gestion.wsdl = "http://wse.scores-decisions.com:8081/gestion/v0.3?wsdl"
|
||||
webservices.gestion.options.soap_version = SOAP_1_2
|
||||
webservices.saisie.wsdl = "http://wse.scores-decisions.com:8081/saisie/v0.2?wsdl"
|
||||
webservices.saisie.options.soap_version = SOAP_1_2
|
||||
webservices.pieces.wsdl = "http://wse.scores-decisions.com:8081/pieces/v0.1?wsdl"
|
||||
webservices.pieces.options.soap_version = SOAP_1_2
|
||||
|
||||
[celeste]
|
||||
webservices.interne.wsdl = "http://wse.scores-decisions.com:8081/interne/v0.4?wsdl"
|
||||
webservices.interne.options.soap_version = SOAP_1_2
|
||||
webservices.entreprise.wsdl = "http://wse.scores-decisions.com:8081/entreprise/v0.7?wsdl"
|
||||
webservices.entreprise.options.soap_version = SOAP_1_2
|
||||
webservices.gestion.wsdl = "http://wse.scores-decisions.com:8081/gestion/v0.3?wsdl"
|
||||
webservices.gestion.options.soap_version = SOAP_1_2
|
||||
webservices.saisie.wsdl = "http://wse.scores-decisions.com:8081/saisie/v0.2?wsdl"
|
||||
webservices.saisie.options.soap_version = SOAP_1_2
|
||||
webservices.pieces.wsdl = "http://wse.scores-decisions.com:8081/pieces/v0.1?wsdl"
|
||||
webservices.pieces.options.soap_version = SOAP_1_2
|
||||
|
||||
[celeste-staging]
|
||||
webservices.interne.wsdl = "http://wsrec.scores-decisions.com:8000/interne/v0.4?wsdl"
|
||||
webservices.interne.options.soap_version = SOAP_1_2
|
||||
webservices.entreprise.wsdl = "http://wsrec.scores-decisions.com:8000/entreprise/v0.7?wsdl"
|
||||
webservices.entreprise.options.soap_version = SOAP_1_2
|
||||
webservices.gestion.wsdl = "http://wsrec.scores-decisions.com:8000/gestion/v0.3?wsdl"
|
||||
webservices.gestion.options.soap_version = SOAP_1_2
|
||||
webservices.saisie.wsdl = "http://wsrec.scores-decisions.com:8000/saisie/v0.1?wsdl"
|
||||
webservices.saisie.options.soap_version = SOAP_1_2
|
||||
webservices.pieces.wsdl = "http://wsrec.scores-decisions.com:8000/pieces/v0.1?wsdl"
|
||||
webservices.pieces.options.soap_version = SOAP_1_2
|
@ -1,73 +0,0 @@
|
||||
<?php
|
||||
class AideController extends Zend_Controller_Action
|
||||
{
|
||||
|
||||
/**
|
||||
* Afficher bulle pour les nouveautés
|
||||
*/
|
||||
public function newAction()
|
||||
{
|
||||
$nbNewsMax = 5;
|
||||
$nbJourGlisssant = 5;
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
$date = $user->getDateDerniereConnexion();
|
||||
$nouveautes = array();
|
||||
if ( $date!=null || $date!='0000-00-00 00:00:00' )
|
||||
{
|
||||
$time = mktime(0, 0, 0, date('m'), date('d')-$nbJourGlisssant, date('Y'));
|
||||
$dateglissant = date('Y-m-d', $time);
|
||||
$now = date('Y-m-d');
|
||||
|
||||
$nouveautesM = new Application_Model_Nouveautes();
|
||||
$sql = $nouveautesM->select()
|
||||
->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);
|
||||
}
|
||||
|
||||
/**
|
||||
* Afficher la liste des nouveautés
|
||||
*/
|
||||
public function newlisteAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
|
||||
//Selection
|
||||
$nouveautesM = new Application_Model_Nouveautes();
|
||||
$sql = $nouveautesM->select()
|
||||
->from('nouveautes', array('categorie', 'intitule', "date", 'fichier'))
|
||||
->order('date DESC');
|
||||
$nouveautes = $nouveautesM->fetchAll($sql);
|
||||
$this->view->assign('nouveautes', $nouveautes);
|
||||
|
||||
}
|
||||
|
||||
public function cguAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$request = $this->getRequest();
|
||||
|
||||
$accept = $request->getParam('accept', 0);
|
||||
|
||||
if ( $accept == 1 ) {
|
||||
require_once 'Scores/WsScores.php';
|
||||
$ws = new WsScores();
|
||||
$accept = $ws->setCGU();
|
||||
Zend_Registry::get('firebug')->info($accept);
|
||||
if ($accept) {
|
||||
//Put in session
|
||||
$auth = Zend_Auth::getInstance();
|
||||
$identity = $auth->getIdentity();
|
||||
$identity->acceptationCGU = date('Y-m-d H:i:s');
|
||||
$auth->getStorage()->write($identity);
|
||||
//Redirect
|
||||
$this->_redirect('/');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,797 +0,0 @@
|
||||
<?php
|
||||
class DashboardController extends Zend_Controller_Action
|
||||
{
|
||||
protected $typeActes= array(
|
||||
'a00' => 'MODIFICATION',
|
||||
'a01' => 'MODIFICATION',
|
||||
'a02' => 'DISSOLUTION',
|
||||
'a03' => 'CONSTITUTION',
|
||||
'a04' => 'STATUTS CONSTITUTIFS',
|
||||
'a06' => 'STATUTS A JOUR',
|
||||
'a07' => 'STATUTS A JOUR',
|
||||
'a08' => 'STATUTS A JOUR ET DECLARATION DE CONFORMITE',
|
||||
'a09' => 'STATUTS APRES TRANSFERT DE SIEGE',
|
||||
'a1D' => 'AUGMENTATION ET REDUCTION CAPITAL',
|
||||
'a25' => 'AUGMENTATION DE CAPITAL',
|
||||
'a26' => 'REDUCTION DE CAPITAL',
|
||||
'a31' => 'TRANSFERT SIEGE SOCIAL HORS RESSORT O',
|
||||
'a33' => 'CHANGEMENT DE GERANT',
|
||||
'a39' => 'CHANGEMENT DE COMMISSAIRE AUX COMPTES',
|
||||
'a77' => 'CONTINUATION MALGRE LA PERTE DE LA MOITIE DU CAPITAL',
|
||||
'aA1' => 'STATUTS',
|
||||
'aAA' => 'ACTE',
|
||||
'aAB' => 'ACTE MODIFICATIF',
|
||||
'aAC' => 'ACTE RECTIFICATIF',
|
||||
'aAD' => 'ACTE SOUS SEING PRIVE',
|
||||
'aAE' => 'AMPLIATION',
|
||||
'aAG' => 'AVENANT',
|
||||
'aAH' => 'AVENANT AUX STATUTS',
|
||||
'aAI' => 'ATTESTATION',
|
||||
'aAJ' => 'ANNEXES',
|
||||
'aAK' => 'ATTESTATION BANCAIRE',
|
||||
'aAP' => 'PROJET APPORT PARTIEL D",ACTIF',
|
||||
'aAT' => 'DELIVRANCE DE L",INFORMATION FAITE AU CONJOINT SUR LES CONSEQUENCES DES DETTES',
|
||||
'aCA' => 'CERTIFICAT',
|
||||
'aCB' => 'COMPTES DE CLOTURE DE LIQUIDATION',
|
||||
'aCD' => 'CONTRAT',
|
||||
'aCE' => 'CONVENTION',
|
||||
'aCF' => 'CERTIFICAT DE SOUSCRIPTION D",ACTIONS',
|
||||
'aDA' => 'DECISION DE GERANCE',
|
||||
'aDB' => 'DECISION DE L",ASSOCIE UNIQUE',
|
||||
'aDC' => 'DECISION DES ASSOCIES',
|
||||
'aDE' => 'DECLARATION DE CONFORMITE',
|
||||
'aDF' => 'DECLARATION DE SOUSCRIPTION ET DE VERSEMENT',
|
||||
'aDH' => 'DECLARATION DE CONFORMITE (ART.374 L24/07/1966)',
|
||||
'aDI' => 'DECISION DE L",ACTIONNAIRE UNIQUE',
|
||||
'aDP' => 'DECISION DU PRESIDENT',
|
||||
'aEA' => 'EXPEDITION',
|
||||
'aEB' => 'EXPEDITION NOTARIEE',
|
||||
'aEC' => 'EXTRAIT DU PROCES-VERBAL',
|
||||
'aFU' => 'PROJET DE FUSION',
|
||||
'aIF' => 'PROJET APPORT PARTIEL D",ACTIF',
|
||||
'aJA' => 'JUGEMENT',
|
||||
'aLA' => 'LETTRE',
|
||||
'aLB' => 'LISTE DES SIEGES SOCIAUX ANTERIEURS',
|
||||
'aLC' => 'LETTRE DE DEMISSION',
|
||||
'aLD' => 'LETTRE DE NOMINATION',
|
||||
'aLF' => 'LISTE DES SOUSCRIPTEURS',
|
||||
'aLS' => 'CERTIFICAT DE DEPOT DES FONDS AVEC LISTE DES SOUSCRIPTEURS',
|
||||
'aNA' => 'NOMINATION DE REPRESENTANT',
|
||||
'aO9' => 'NOMINATION DE GERANT(S)',
|
||||
'aOA' => 'ORDONNANCE',
|
||||
'aOB' => 'ORDONNANCE DE REFERE',
|
||||
'aOC' => 'ORDONNANCE DU PRESIDENT',
|
||||
'aOD' => 'ORDONNANCE SUR REQUETE',
|
||||
'aOE' => 'ORDONNANCE',
|
||||
'aPA' => 'PROCES VERBAL',
|
||||
'aPC' => 'PROCES VERBAL D",ASSEMBLEE CONSTITUTIVE',
|
||||
'aPD' => 'PROCES VERBAL D",ASSEMBLEE DU DIRECTOIRE',
|
||||
'aPE' => 'PROCES VERBAL D",ASSEMBLEE GENERALE',
|
||||
'aPF' => 'PROCES VERBAL D",ASSEMBLEE GENERALE EXTRAORDINAIRE',
|
||||
'aPG' => 'PROCES VERBAL D",ASSEMBLEE GENERALE ORDINAIRE',
|
||||
'aPH' => 'PROCES VERBAL D",ASSEMBLEE MIXTE',
|
||||
'aPI' => 'PROCES VERBAL D",ASSEMBLEES ORDINAIRE ET EXTRAORDINAIRE',
|
||||
'aPL' => 'PROCES VERBAL DIRIGEANT SOCIAL',
|
||||
'aPM' => 'PROCES VERBAL DU CONSEIL D",ADMINISTRATION',
|
||||
'aPN' => 'PROCES VERBAL DU CONSEIL DE SURVEILLANCE',
|
||||
'aPO' => 'PROCES VERBAL DE LA GERANCE',
|
||||
'aPT' => 'PROJET DE TRAITE D",APPORT',
|
||||
'aPU' => 'PROJET DE FUSION',
|
||||
'aPV' => 'PV D",ASSEMBLEE',
|
||||
'aQ2' => 'CONSTITUTION DE LA SOCIETE',
|
||||
'aR1' => 'CESSION DE PARTS (OU DONATION)',
|
||||
'aR4' => 'TRAITE DE FUSION',
|
||||
'aRA' => 'RAPPORT',
|
||||
'aRB' => 'RAPPORT COMMISSAIRE AUX COMPTES',
|
||||
'aRC' => 'RAPPORT COMMISSAIRE FUSION',
|
||||
'aRE' => 'RAPPORT CR/CPTES TRANSFORM. STE',
|
||||
'aRG' => 'RAPPORT DU COMMISSAIRE A LA FUSION',
|
||||
'aRH' => 'RAPPORT DU COMMISSAIRE A LA SCISSION',
|
||||
'aRI' => 'RAPPORT DU COMMISSAIRE A LA TRANSFORMATION',
|
||||
'aRK' => 'RAPPORT DU COMMISSAIRE AUX APPORTS',
|
||||
'aRL' => 'RAPPORT DU COMMISSAIRE AUX APPORTS ET A LA FUSION',
|
||||
'aRQ' => 'RAPPORT GERANCE',
|
||||
'aRS' => 'RAPPORT SPECIAL DU CONSEIL D",ADMINISTRATION',
|
||||
'aRU' => 'PROJET',
|
||||
'aTA' => 'TRAITE',
|
||||
'aTB' => 'TRAITE D",APPORT-FUSION',
|
||||
'aTC' => 'TRAITE DE FUSION',
|
||||
'aUA' => 'ATTESTATION DU CONJOINT COMMUN EN BIENS',
|
||||
);
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
public function init()
|
||||
{
|
||||
require_once 'Scores/WsScores.php';
|
||||
require_once 'common/dates.php';
|
||||
}
|
||||
|
||||
public function preDispatch()
|
||||
{
|
||||
$user = new Scores_Utilisateur();
|
||||
if (!$user->checkModeEdition() && $user->getIdClient()!=1 ){
|
||||
$this->_forward('perms', 'error');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Affichage des différents liens d'administration
|
||||
*/
|
||||
public function indexAction()
|
||||
{
|
||||
$liens = array(
|
||||
0 => array(
|
||||
'libelle' => 'Gestion des clients',
|
||||
'url' => $this->view->url(array('action'=>'clients')),
|
||||
),
|
||||
1 => array(
|
||||
'libelle' => 'Créer un client',
|
||||
'url' => $this->view->url(array('action'=>'client')),
|
||||
),
|
||||
2 => array(
|
||||
'libelle' => 'Gestion des commandes',
|
||||
'url' => $this->view->url(array('action'=>'commandes')),
|
||||
),
|
||||
3 => array(
|
||||
'libelle' => 'Gestion des fichiers nouveautés',
|
||||
'url' => $this->view->url(array('action'=>'newform')),
|
||||
),
|
||||
);
|
||||
|
||||
$this->view->assign('Liens', $liens);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion des commandes de l'extranet
|
||||
* Type : greffes | kbis | graydon | giant
|
||||
*/
|
||||
public function commandesAction()
|
||||
{
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/dashboard.js', 'text/javascript');
|
||||
|
||||
$request = $this->getRequest();
|
||||
$type = $request->getParam('type', '');
|
||||
$date = $request->getParam('date', mktime(0, 0, 0, date('n'), 1, date('Y')));
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
|
||||
$typesCommande = array('kbis', 'greffes');
|
||||
|
||||
if (in_array($type, $typesCommande))
|
||||
{
|
||||
require_once 'Scores/GestionCommandes.php';
|
||||
|
||||
//Valeur pour la sélection des dates
|
||||
$dateSelect = array();
|
||||
$dateToday = date('m');
|
||||
$dateIntervalle = 12;
|
||||
if ($user->checkModeEdition()){
|
||||
$dateIntervalle = 24;
|
||||
}
|
||||
for($i=$dateToday-$dateIntervalle; $i<=$dateToday; $i++)
|
||||
{
|
||||
$dateTime = mktime(0, 0, 0, $i, 1, date('Y'));
|
||||
$selected = '';
|
||||
if ($dateTime==$date){
|
||||
$selected = 'selected';
|
||||
}
|
||||
$dateSelect[] = array(
|
||||
'value' => $dateTime,
|
||||
'select' => $selected,
|
||||
'affichage' => date('m/Y', $dateTime)
|
||||
);
|
||||
}
|
||||
$this->view->assign('dateSelect', $dateSelect);
|
||||
|
||||
switch($type)
|
||||
{
|
||||
case 'kbis':
|
||||
$num = $request->getParam('num');
|
||||
$num = str_replace(' ', '', strtoupper($num));
|
||||
$etat = $request->getParam('etat');
|
||||
$mode = $request->getParam('mode', 'M');
|
||||
|
||||
$modeSelect = array(
|
||||
'C' => array('value' => 'C', 'select' => '', 'affichage' => 'courrier S&D'),
|
||||
'M' => array('value' => 'M', 'select' => '', 'affichage' => 'e-mail'),
|
||||
);
|
||||
$modeSelect[$mode]['select'] = ' selected';
|
||||
$gestionCommande = new GestionCommande();
|
||||
$status = $gestionCommande->listStatus($mode);
|
||||
$etatSelect = array();
|
||||
$etatSelect[] = array('value'=>0, 'select'=>'', 'affichage'=>'');
|
||||
foreach($status as $item){
|
||||
$select = '';
|
||||
if ($item['id']==$etat){
|
||||
$select = ' selected';
|
||||
}
|
||||
$etatSelect[] = array('value'=>$item['id'], 'select'=>$select, 'affichage'=>$item['libStatut']);
|
||||
}
|
||||
|
||||
${'status'.$mode} = $gestionCommande->listStatus($mode);
|
||||
|
||||
$this->view->assign('etatSelect', $etatSelect);
|
||||
$this->view->assign('modeSelect', $modeSelect);
|
||||
$this->view->assign('num', $num);
|
||||
|
||||
if (!empty($num)){
|
||||
if (preg_match('/[0-9]{9}/', $num)){
|
||||
$listCommandes = $gestionCommande->listCommandesKbisBySiren($num);
|
||||
} elseif(substr($num,0,1)=='K'){
|
||||
$listCommandes = $gestionCommande->listCommandesKbisByNum($num);
|
||||
}
|
||||
} elseif (!empty($date)) {
|
||||
$listCommandes = $gestionCommande->listCommandesKbis($date, $etat, $mode);
|
||||
}
|
||||
|
||||
//Parcours de la liste des commandes et vérification document existe
|
||||
if (count($listCommandes)>0) {
|
||||
for($i=0;$i<count($listCommandes);$i++)
|
||||
{
|
||||
//Etat de la commande
|
||||
$cmdEtatSelect = array();
|
||||
$cmdEtatSelect[] = array('value'=>0, 'select'=>'', 'affichage'=>'');
|
||||
$typeCommande = $listCommandes[$i]->type;
|
||||
if (isset(${'status'.$typeCommande})){
|
||||
foreach(${'status'.$typeCommande} as $item){
|
||||
$select = '';
|
||||
if ($item['id']==$listCommandes[$i]->statutCommande){
|
||||
$select = ' selected';
|
||||
}
|
||||
$cmdEtatSelect[] = array(
|
||||
'value' => $item['id'],
|
||||
'affichage' => $item['libStatut'],
|
||||
'select' => $select,
|
||||
);
|
||||
}
|
||||
}
|
||||
$listCommandes[$i]->cmdEtatSelect = $cmdEtatSelect;
|
||||
}
|
||||
}
|
||||
|
||||
break; //Fin Gestion Kbis
|
||||
|
||||
case 'greffes':
|
||||
|
||||
$num = $request->getParam('num');
|
||||
$num = str_replace(' ', '', strtoupper($num));
|
||||
$etat = $request->getParam('etat');
|
||||
$mode = $request->getParam('mode', 'G');
|
||||
$login = $request->getParam('login');
|
||||
|
||||
if (empty($mode) && !empty($num)) $mode = substr($num,0,1);
|
||||
|
||||
$modeSelect = array(
|
||||
'G' => array('value' => 'G', 'select' => '', 'affichage' => 'courrier infogreffe'),
|
||||
'C' => array('value' => 'C', 'select' => '', 'affichage' => 'courrier S&D'),
|
||||
'M' => array('value' => 'M', 'select' => '', 'affichage' => 'e-mail'),
|
||||
);
|
||||
$modeSelect[$mode]['select'] = ' selected';
|
||||
|
||||
$gestionCommande = new GestionCommande();
|
||||
|
||||
//Liste des états possible pour les commandes
|
||||
$status = $gestionCommande->listStatus($mode);
|
||||
$etatSelect = array();
|
||||
$etatSelect[] = array('value'=>0, 'select'=>'', 'affichage'=>'');
|
||||
foreach($status as $item){
|
||||
$select = '';
|
||||
if ($item['id']==$etat){
|
||||
$select = ' selected';
|
||||
}
|
||||
$etatSelect[] = array(
|
||||
'value' => $item['id'],
|
||||
'select' => $select,
|
||||
'affichage' => $item['libStatut']
|
||||
);
|
||||
}
|
||||
|
||||
$this->view->assign('etatSelect', $etatSelect);
|
||||
$this->view->assign('modeSelect', $modeSelect);
|
||||
$this->view->assign('num', $num);
|
||||
$this->view->assign('login', $login);
|
||||
|
||||
if (!empty($num)){
|
||||
if (preg_match('/[0-9]{9}/', $num)){
|
||||
$listCommandes = $gestionCommande->listCommandesGreffeBySiren($num);
|
||||
} elseif(substr($num,0,1)=='G' || substr($num,0,1)=='C'){
|
||||
$listCommandes = $gestionCommande->listCommandesGreffeByNum($num);
|
||||
}
|
||||
} elseif (!empty($login)) {
|
||||
$listCommandes = $gestionCommande->listCommandesGreffeByLogin($login, $date);
|
||||
} elseif (!empty($date)) {
|
||||
$listCommandes = $gestionCommande->listCommandesGreffe($date, $etat, $mode);
|
||||
}
|
||||
|
||||
//Liste des différents états pour les commandes
|
||||
${'status'.$mode} = $gestionCommande->listStatus($mode);
|
||||
|
||||
//Parcours de la liste des commandes et vérification document existe
|
||||
if (count($listCommandes)>0)
|
||||
{
|
||||
for($i=0;$i<count($listCommandes);$i++)
|
||||
{
|
||||
//Etat de la commande
|
||||
$cmdEtatSelect = array();
|
||||
$cmdEtatSelect[] = array('value'=>0, 'select'=>'', 'affichage'=>'');
|
||||
$typeCommande = $listCommandes[$i]->typeCommande;
|
||||
if (isset(${'status'.$typeCommande})){
|
||||
foreach(${'status'.$typeCommande} as $item){
|
||||
$select = '';
|
||||
if ($item['id']==$listCommandes[$i]->statutCommande){
|
||||
$select = ' selected';
|
||||
}
|
||||
$cmdEtatSelect[] = array(
|
||||
'value' => $item['id'],
|
||||
'affichage' => $item['libStatut'],
|
||||
'select' => $select,
|
||||
);
|
||||
}
|
||||
}
|
||||
$listCommandes[$i]->cmdEtatSelect = $cmdEtatSelect;
|
||||
|
||||
//Lien vers le fichier
|
||||
$documentLien = '';
|
||||
$document = '';
|
||||
$sirenLien = '';
|
||||
switch($type)
|
||||
{
|
||||
case 'greffes':
|
||||
if (preg_match('/^([0-9a-zA-Z]{2,}-).*?$/', $listCommandes[$i]->refDocument, $matches)){
|
||||
|
||||
if (substr($listCommandes[$i]->refDocument,0,3)=='ST-'){
|
||||
$document = 'DERNIER STATUS À JOUR';
|
||||
} else {
|
||||
$explodedRef = explode('-', $listCommandes[$i]->refDocument);
|
||||
$dateref = WDate::dateT('Ymd','d/m/Y',$explodedRef[1]);
|
||||
$depot = ', Dépôt n°'.$explodedRef[6].' au '.$dateref;
|
||||
$document = $this->typeActes['a'.substr($listCommandes[$i]->refDocument,0,2)].$depot;
|
||||
}
|
||||
|
||||
$configuration = Zend_Registry::get('configuration');
|
||||
$refFile = realpath($configuration->path->data).'/'.
|
||||
$configuration->path->pdf.'/acte-'.
|
||||
$listCommandes[$i]->siren.'-'.
|
||||
trim($listCommandes[$i]->refDocument).'.pdf';
|
||||
|
||||
if (file_exists($refFile)) {
|
||||
$document = '<a href="./fichier/pdf/acte-'.
|
||||
$listCommandes[$i]->siren.'-'.
|
||||
trim($listCommandes[$i]->refDocument).'.pdf'.
|
||||
'" target="_blank">'.$document.'</a>';
|
||||
}
|
||||
|
||||
$sirenLien = $this->view->url(array(
|
||||
'controller' => 'pieces',
|
||||
'action' => 'actes',
|
||||
'siret' => $listCommandes[$i]->siren,
|
||||
), null, true);
|
||||
|
||||
} elseif (preg_match('/^([0-9]{4}).*?$/', $listCommandes[$i]->refDocument, $matches)){
|
||||
|
||||
$document = 'Bilan de '.$matches[1];
|
||||
|
||||
$configuration = Zend_Registry::get('configuration');
|
||||
$refFile = realpath($configuration->path->data).'/'.
|
||||
$configuration->path->pdf.'/bilan-'.
|
||||
$listCommandes[$i]->siren.'-'.
|
||||
trim($listCommandes[$i]->refDocument).'.pdf';
|
||||
|
||||
if(file_exists($refFile)){
|
||||
$document = '<a href="./fichier/pdf/bilan-'.
|
||||
$listCommandes[$i]->siren.'-'.
|
||||
trim($listCommandes[$i]->refDocument).'.pdf'.
|
||||
'" target="_blank">'.$document.'</a>';
|
||||
}
|
||||
|
||||
$sirenLien = $this->view->url(array(
|
||||
'controller' => 'pieces',
|
||||
'action' => 'bilans',
|
||||
'siret' => $listCommandes[$i]->siren,
|
||||
), null, true);
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
$listCommandes[$i]->document = $document;
|
||||
$listCommandes[$i]->documentLien = $documentLien;
|
||||
$listCommandes[$i]->sirenLien = $sirenLien;
|
||||
}
|
||||
}
|
||||
|
||||
break; //Fin Gestion Greffes
|
||||
}
|
||||
$this->view->assign('commandes', $listCommandes);
|
||||
$this->renderScript('dashboard/commandes-'.$type.'.phtml');
|
||||
}
|
||||
|
||||
//Affichage des liens vers les différents types de commande
|
||||
$this->view->assign('typesCommande', $typesCommande);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Modification de l'état d'une commande infogreffe
|
||||
*/
|
||||
public function commandesetatchangeAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
||||
$request = $this->getRequest();
|
||||
$etat = $request->getParam('etat');
|
||||
$idCommande = $request->getParam('idCommande');
|
||||
$mode = $request->getParam('mode', 'C');
|
||||
$type = $request->getParam('type');
|
||||
|
||||
require_once 'Scores/GestionCommandes.php';
|
||||
$commande = new GestionCommande();
|
||||
if ($type == 'kbis'){
|
||||
echo $commande->changeEtatKbis($idCommande, $etat, $mode);
|
||||
} elseif ($type == 'greffe') {
|
||||
echo $commande->changeEtatGreffe($idCommande, $etat, $mode);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Affichage de la raison sociale à partir du siren
|
||||
*/
|
||||
public function rsAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
||||
$request = $this->getRequest();
|
||||
$siren = $request->getParam('siren');
|
||||
|
||||
$ws = new WsScores();
|
||||
$infos = $ws->getIdentite($siren);
|
||||
if ($infos==false) {
|
||||
echo 'Erreur';
|
||||
} else {
|
||||
echo $infos->Nom;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Génération automatique du courrier PDF / ODT
|
||||
*/
|
||||
public function courrierAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
||||
$request = $this->getRequest();
|
||||
$numCommande = $request->getParam('commande');
|
||||
|
||||
require_once 'GenCourrier/GenCourrier.php';
|
||||
$courrier = new GenCourrier($numCommande);
|
||||
|
||||
|
||||
$courrier->computeOdt();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Liste les clients
|
||||
*/
|
||||
public function clientsAction()
|
||||
{
|
||||
$user = new Scores_Utilisateur();
|
||||
if ( !$user->isSuperAdmin() ){
|
||||
$this->_forward('perms', 'error');
|
||||
}
|
||||
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/dashboard.js', 'text/javascript');
|
||||
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getListeClients();
|
||||
$listeClients = $reponse->result->item;
|
||||
|
||||
$reponse = $ws->getListeDroits();
|
||||
$wsdroits = $reponse->item;
|
||||
|
||||
$this->view->assign('ListeClients', $listeClients);
|
||||
$this->view->assign('wsdroits', $wsdroits);
|
||||
}
|
||||
|
||||
/**
|
||||
* Edition ou création d'un nouveau client
|
||||
*/
|
||||
public function clientAction()
|
||||
{
|
||||
$user = new Scores_Utilisateur();
|
||||
if ( !$user->isSuperAdmin() ) {
|
||||
$this->_forward('perms', 'error');
|
||||
}
|
||||
|
||||
$this->view->headScript()->appendFile('/libs/checkbox/jquery.checkbox.js', 'text/javascript');
|
||||
$this->view->headLink()->appendStylesheet('/libs/checkbox/jquery.checkbox.css', 'all');
|
||||
|
||||
$request = $this->getRequest();
|
||||
$idClient = $request->getParam('idClient', false);
|
||||
$titre = 'CREATION NOUVEAU CLIENT';
|
||||
$submitValue = 'Créer le client';
|
||||
if ($idClient!==false){
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getListeClients($idClient);
|
||||
$InfosClient = $reponse->result->item[0];
|
||||
$titre = 'EDITION CLIENT';
|
||||
$submitValue = 'Modifier le client';
|
||||
}
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getListeDroits();
|
||||
$wsdroits = $reponse->item;
|
||||
|
||||
$this->view->assign('idClient', $idClient);
|
||||
$this->view->assign('InfosClient', $InfosClient);
|
||||
$this->view->assign('titre', $titre);
|
||||
$this->view->assign('submitValue', $submitValue);
|
||||
$this->view->assign('wsdroits', $wsdroits);
|
||||
}
|
||||
|
||||
/**
|
||||
* Enregistre les informations sur le client
|
||||
*/
|
||||
public function clientsaveAction()
|
||||
{
|
||||
$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']));
|
||||
}
|
||||
$this->view->assign('infos', $request->getParams());
|
||||
}
|
||||
|
||||
public function usersAction()
|
||||
{
|
||||
$this->view->headLink()->appendStylesheet('/themes/default/styles/user.css', 'all');
|
||||
|
||||
$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);
|
||||
}
|
||||
|
||||
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');
|
||||
|
||||
$request = $this->getRequest();
|
||||
|
||||
$op = $request->getParam('op');
|
||||
$idClient = $request->getParam('idClient');
|
||||
$login = $request->getParam('login');
|
||||
|
||||
switch($op) {
|
||||
case 'new':
|
||||
require_once 'Scores/WsScores.php';
|
||||
$ws = new WsScores();
|
||||
|
||||
//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);
|
||||
|
||||
$options['idClient'] = $idClient;
|
||||
$this->view->assign('options', $options);
|
||||
|
||||
//Customer informations
|
||||
$reponse = $ws->getNextLogin($idClient);
|
||||
$this->view->assign('loginNew', $reponse->result->racine);
|
||||
$this->view->assign('droitsClients', explode(' ', strtolower($reponse->result->droitsClients)));
|
||||
|
||||
$this->view->assign('password', $this->randomPassword(10, 3));
|
||||
|
||||
$this->view->assign('action', 'new');
|
||||
|
||||
break;
|
||||
|
||||
case 'edit':
|
||||
|
||||
require_once 'Scores/WsScores.php';
|
||||
$ws = new WsScores();
|
||||
|
||||
//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);
|
||||
|
||||
$options->idClient = $idClient;
|
||||
$this->view->assign('options', $options);
|
||||
|
||||
//Customer informations
|
||||
$reponse = $ws->getListeClients($idClient);
|
||||
$InfosClient = $reponse->result->item[0];
|
||||
$this->view->assign('loginNew', $InfosClient->racineLogin);
|
||||
$this->view->assign('droitsClients', explode(' ', strtolower($InfosClient->droits)));
|
||||
|
||||
//User informations
|
||||
$user = $ws->getUser($login);
|
||||
$options = json_decode($user, true);
|
||||
|
||||
Zend_Registry::get('firebug')->info($user);
|
||||
|
||||
$this->view->assign('droits', explode(' ',$options['droits']));
|
||||
$this->view->assign('prefs', explode(' ',$options['pref']));
|
||||
$this->view->assign('options', $options);
|
||||
|
||||
$this->view->assign('action', 'update');
|
||||
|
||||
break;
|
||||
|
||||
case 'delete':
|
||||
$action = 'delete';
|
||||
require_once 'Scores/WsScores.php';
|
||||
$ws = new WsScores();
|
||||
$ws->setInfosLogin($login, $action);
|
||||
//Redirect
|
||||
$this->_redirect('/dashboard/users/idClient/'.$idClient);
|
||||
break;
|
||||
|
||||
case 'enable':
|
||||
$action = 'enable';
|
||||
require_once 'Scores/WsScores.php';
|
||||
$ws = new WsScores();
|
||||
$ws->setInfosLogin($login, $action);
|
||||
//Redirect
|
||||
$this->_redirect('/dashboard/users/idClient/'.$idClient);
|
||||
break;
|
||||
|
||||
case 'disable':
|
||||
$action = 'disable';
|
||||
require_once 'Scores/WsScores.php';
|
||||
$ws = new WsScores();
|
||||
$ws->setInfosLogin($login, $action);
|
||||
//Redirect
|
||||
$this->_redirect('/dashboard/users/idClient/'.$idClient);
|
||||
break;
|
||||
|
||||
case 'save':
|
||||
$action = 'new'; //update
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Affichage du formulaire pour l'envoi des fichiers concernant les nouveautées
|
||||
*/
|
||||
public function newformAction()
|
||||
{
|
||||
//Only the view
|
||||
}
|
||||
|
||||
/**
|
||||
* Réception du fichier des nouveautés et enregistrement des informations
|
||||
*/
|
||||
public function newuploadAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
||||
if ( isset($_FILES) && count($_FILES)==1 ) {
|
||||
$config = new Zend_Config_Ini(APPLICATION_PATH . '/configs/configuration.ini', 'path');
|
||||
$path = realpath($config->data).'/nouveautes';
|
||||
if(!file_exists($path)) mkdir($path);
|
||||
|
||||
$tmp_name = $_FILES['fichier']['tmp_name'];
|
||||
$n = $_FILES['fichier']['name'];
|
||||
|
||||
$name = uniqid('new');
|
||||
|
||||
$extValide = array('pdf');
|
||||
$extension = strrchr($n,'.');
|
||||
$extension = substr($extension,1);
|
||||
//Vérifier l'extension du fichier
|
||||
if(!in_array($extension, $extValide)){
|
||||
echo "Extension de fichier incorrect !";
|
||||
} elseif (move_uploaded_file($tmp_name, $path.'/'.$name.'.'.$extension)){
|
||||
|
||||
$request = $this->getRequest();
|
||||
|
||||
//Enregistrement des informations
|
||||
$data = array(
|
||||
'categorie' => $request->getParam('categorie'),
|
||||
'intitule' => $request->getParam('intitule'),
|
||||
'date' => $request->getParam('date'),
|
||||
'fichier' => $name.'.'.$extension,
|
||||
);
|
||||
$new = new Application_Model_Nouveautes();
|
||||
try {
|
||||
$new->insert($data);
|
||||
echo "Fichier enregistré";
|
||||
} catch(Exception $e) {
|
||||
echo "Erreur lors de l'enregistrement";
|
||||
if ( file_exists($path.'/'.$name.'.'.$extension) ) unlink($path.'/'.$name.'.'.$extension);
|
||||
}
|
||||
|
||||
} else {
|
||||
echo "Erreur";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function newprogressAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
||||
$request = $this->getRequest();
|
||||
$key = $request->getParam('key', '');
|
||||
if (!empty($key)) {
|
||||
//$rep sera égal à false si la clef n'existe pas dans le cache apc
|
||||
$rep = apc_fetch('upload_'.$key);
|
||||
echo json_encode($rep);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
<?php
|
||||
class DebugController extends Zend_Controller_Action
|
||||
{
|
||||
public function init()
|
||||
{
|
||||
$this->view->headLink()->appendStylesheet('/themes/default/styles/giant.css', 'all');
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/giant.js', 'text/javascript');
|
||||
|
||||
}
|
||||
|
||||
public function identiteAction()
|
||||
{
|
||||
$menu = array('Objet', 'Requete XML', 'Reponse XML');
|
||||
$request = $this->getRequest();
|
||||
$soap = $request->getParam('soap');
|
||||
|
||||
$this->view->resultat = $request->getParam('resultat');
|
||||
$this->view->menu = $menu;
|
||||
$this->view->requestXML = $soap->getLastRequest();
|
||||
$this->view->responseXML = $soap->getLastResponse();
|
||||
}
|
||||
|
||||
}
|
@ -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'));
|
||||
}
|
||||
}
|
@ -1,91 +0,0 @@
|
||||
<?php
|
||||
class ErrorController extends Zend_Controller_Action
|
||||
{
|
||||
public function init(){}
|
||||
|
||||
public function errorAction()
|
||||
{
|
||||
$params = $this->getRequest()->getParams();
|
||||
$unknow = array('MSOffice', '_vti_bin', 'crossdomain.xml');
|
||||
if (in_array($params['controller'], $unknow)){
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
echo '';
|
||||
} else {
|
||||
|
||||
$errors = $this->_getParam('error_handler');
|
||||
switch ($errors->type) {
|
||||
case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ROUTE:
|
||||
case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:
|
||||
case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:
|
||||
|
||||
// 404 error -- controller or action not found
|
||||
$this->getResponse()->setHttpResponseCode(404);
|
||||
$this->view->message = 'Page not found';
|
||||
break;
|
||||
|
||||
default:
|
||||
// application error
|
||||
$this->getResponse()->setHttpResponseCode(500);
|
||||
$this->view->message = 'Application error';
|
||||
break;
|
||||
}
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
|
||||
//Envoyer les erreurs par mail
|
||||
$message = '';
|
||||
$message.= 'Erreur Applicative : ';
|
||||
$message.= "\n";
|
||||
$message.= 'Message : '.$errors->exception->getMessage();
|
||||
$message.= "\n";
|
||||
$message.= 'Utilisateur : '.$user->getLogin();
|
||||
$message.= "\n";
|
||||
$message.= "File :".$errors->exception->getFile().", Ligne : ".$errors->exception->getLine();
|
||||
$message.= "\n";
|
||||
$message.= "Detail :\n".$errors->exception->getTraceAsString();
|
||||
$message.= "\n\n";
|
||||
$message.= "Request Parameters :\n ".print_r($this->getRequest()->getParams(), true)."\n";
|
||||
|
||||
$message.= "Referer : ".$_SERVER['HTTP_REFERER']."\n";
|
||||
|
||||
$configuration = Zend_Registry::get('configuration');
|
||||
require_once 'Scores/Mail.php';
|
||||
$mail = new Mail();
|
||||
$mail->setSubject('[ERREUR APPLICATIVE] - '.$configuration->server->name.' -'.date('Ymd'));
|
||||
$mail->setBodyTexte($message);
|
||||
$mail->setFrom('supportdev');
|
||||
$mail->addToKey('supportdev');
|
||||
$mail->send();
|
||||
|
||||
// Log exception, if logger available
|
||||
if ($log = $this->getLog()) {
|
||||
$log->crit($this->view->message, $errors->exception);
|
||||
}
|
||||
|
||||
// conditionally display exceptions
|
||||
if ($this->getInvokeArg('displayExceptions') == true) {
|
||||
$this->view->exception = $errors->exception;
|
||||
}
|
||||
|
||||
$this->view->request = $errors->request;
|
||||
}
|
||||
}
|
||||
|
||||
public function soapAction(){}
|
||||
|
||||
public function permsAction(){}
|
||||
|
||||
public function paramsAction(){}
|
||||
|
||||
public function getLog()
|
||||
{
|
||||
$bootstrap = $this->getInvokeArg('bootstrap');
|
||||
if (!$bootstrap->hasPluginResource('Log')) {
|
||||
return false;
|
||||
}
|
||||
$log = $bootstrap->getResource('Log');
|
||||
return $log;
|
||||
}
|
||||
}
|
||||
|
@ -1,830 +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';
|
||||
|
||||
$this->view->headLink()
|
||||
->appendStylesheet('/themes/default/styles/evaluation.css', 'all');
|
||||
}
|
||||
|
||||
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');
|
||||
|
||||
$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->headLink()->appendStylesheet('/themes/default/styles/comment.css', 'all');
|
||||
$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);
|
||||
|
||||
$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, $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);
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
|
||||
if (empty($upload)){
|
||||
$adresse = array();
|
||||
if ($user->checkModeEdition()){
|
||||
$adresse[] = 'Order to Cash';
|
||||
$adresse[] = '70 AVENUE DE LA MARNE ';
|
||||
$adresse[] = '92600 ASNIERES SUR SEINE';
|
||||
$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);
|
||||
|
||||
} 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';
|
||||
}
|
||||
if (file_exists(APPLICATION_PATH.'/../cache/pages/'.$file))
|
||||
{
|
||||
$doc = new DOMDocument();
|
||||
$doc->preserveWhiteSpace = true;
|
||||
@$doc->loadHTMLFile(APPLICATION_PATH.'/../cache/pages/'.$file);
|
||||
|
||||
//Générer style particulier pour le rapport
|
||||
$style.= 'body { background-color:#ffffff; }';
|
||||
$style.= '#customRapport { display:none; }';
|
||||
$style.= '#center h1 {background-color:'.$couleurh1.';color:'.$texth1.'}';
|
||||
if($logo_background) {
|
||||
$style.= '#center {background-image:url(./themes/default/images/customrapport/logo_ordertocash.jpg);background-repeat:repeat-y}';
|
||||
}
|
||||
$style.= '#center h2 {background-color:'.$couleurh2.';color:'.$texth2.'}';
|
||||
|
||||
$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()){
|
||||
$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 47 90 94 31 ou par mail à l'adresse suivante : contact@ordertocash.fr");
|
||||
$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();
|
||||
|
||||
$outfile = APPLICATION_PATH.'/../cache/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'));
|
||||
$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,' '). ' €';
|
||||
|
||||
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=' ';
|
||||
}
|
||||
elseif ($rating == '') {
|
||||
$fontColor = 'black';
|
||||
$imgFeux = ' ';
|
||||
}
|
||||
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();
|
||||
|
||||
$configuration = Zend_Registry::get('configuration');
|
||||
$path = $configuration->path->data.'/'.$configuration->path->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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -1,410 +0,0 @@
|
||||
<?php
|
||||
class FichierController extends Zend_Controller_Action
|
||||
{
|
||||
|
||||
public function init()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
}
|
||||
|
||||
public function indexAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
print_r($request->getParams());
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
$configuration = Zend_Registry::get('configuration');
|
||||
$path = realpath($configuration->path->data).'/'.$configuration->path->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.';
|
||||
}
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion du chargement des images du cache
|
||||
*/
|
||||
public function imgcacheAction()
|
||||
{
|
||||
$content_type = 'image/png';
|
||||
$path = APPLICATION_PATH.'/../cache/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()
|
||||
{
|
||||
$configuration = Zend_Registry::get('configuration');
|
||||
$directory = realpath($configuration->path->data).'/'.$configuration->path->marques;
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
//On affiche le fichier en vérifiant qu'il existe
|
||||
if(file_exists($directory.'/'.$file) && filesize($directory.'/'.$file)>0) {
|
||||
//On affiche le fichier
|
||||
header("Pragma: public");
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Cache-Control: must-revalidate");
|
||||
header("Content-type: application/pdf");
|
||||
header("Content-Disposition: inline; filename=\"$file\"");
|
||||
print file_get_contents($directory.'/'.$file);
|
||||
}else{
|
||||
echo "Erreur lors de l'affichage du fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion des fichiers Actes et Bilans
|
||||
*/
|
||||
public function pdfAction()
|
||||
{
|
||||
$configuration = Zend_Registry::get('configuration');
|
||||
$directory = realpath($configuration->path->data).'/'.$configuration->path->pdf;
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$output_file = $directory.'/'.$file;
|
||||
if (file_exists($output_file) && filesize($output_file)>0) {
|
||||
$content_type = 'application/pdf';
|
||||
header('Content-type: '.$content_type.'');
|
||||
header('Content-Length: '.filesize($output_file));
|
||||
header('Content-MD5: '.base64_encode(md5_file($output_file)));
|
||||
header('Content-Disposition: inline; filename="'.basename($output_file).'"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression','0');
|
||||
echo file_get_contents($output_file);
|
||||
} else {
|
||||
echo "Erreur lors de l'affichage du fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion des fichiers Actes et Bilans
|
||||
*/
|
||||
public function pdfassociationAction()
|
||||
{
|
||||
$configuration = Zend_Registry::get('configuration');
|
||||
$directory = realpath($configuration->path->data).'/association';
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$type = $this->getRequest()->getParam('type');
|
||||
$output_file = $directory.'/'.$type.'/'.$file;
|
||||
if (file_exists($output_file) && filesize($output_file)>0) {
|
||||
$content_type = 'application/pdf';
|
||||
header('Content-type: '.$content_type.'');
|
||||
header('Content-Length: '.filesize($output_file));
|
||||
header('Content-MD5: '.base64_encode(md5_file($output_file)));
|
||||
header('Content-Disposition: inline; filename="'.basename($output_file).'"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression','0');
|
||||
echo file_get_contents($output_file);
|
||||
} else {
|
||||
echo "Erreur lors de l'affichage du fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion des liasses au formats excel
|
||||
*/
|
||||
public function liasseAction()
|
||||
{
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$content_type = 'application/vnd.ms-excel';
|
||||
$path = APPLICATION_PATH.'/../cache/liasse/';
|
||||
//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';
|
||||
$path = APPLICATION_PATH.'/../cache/consommation/';
|
||||
//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';
|
||||
$path = APPLICATION_PATH.'/../cache/surveillance/';
|
||||
//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';
|
||||
$path = APPLICATION_PATH.'/../cache/surveillance/';
|
||||
//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()
|
||||
{
|
||||
$configuration = Zend_Registry::get('configuration');
|
||||
$directory = realpath($configuration->path->data).'/bilanclient';
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$output_file = $directory.'/'.$file;
|
||||
if (file_exists($output_file) && filesize($output_file)>0) {
|
||||
$explode = explode('.', $output_file);
|
||||
switch ($explode[1]) {
|
||||
case 'pdf' : $content_type = 'application/pdf'; break;
|
||||
case 'tiff' : $content_type = 'image/tiff'; break;
|
||||
}
|
||||
header('Content-type: '.$content_type.'');
|
||||
header('Content-Length: '.filesize($output_file));
|
||||
header('Content-MD5: '.base64_encode(md5_file($output_file)));
|
||||
header('Content-Disposition: inline; filename="'.basename($output_file).'"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression','0');
|
||||
echo file_get_contents($output_file);
|
||||
} else {
|
||||
echo "Erreur lors de l'affichage du fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion des kbis
|
||||
*/
|
||||
public function kbisAction()
|
||||
{
|
||||
$directory = realpath(APPLICATION_PATH . '/../cache/kbis/');
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$output_file = $directory.'/'.$file;
|
||||
if (file_exists($output_file) && filesize($output_file)>0) {
|
||||
$content_type = 'application/pdf';
|
||||
header('Content-type: '.$content_type.'');
|
||||
header('Content-Length: '.filesize($output_file));
|
||||
header('Content-MD5: '.base64_encode(md5_file($output_file)));
|
||||
header('Content-Disposition: inline; filename="'.basename($output_file).'"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression','0');
|
||||
echo file_get_contents($output_file);
|
||||
} else {
|
||||
echo "Erreur lors de l'affichage du fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion des rapports personnalisés
|
||||
*/
|
||||
public function customrapportAction()
|
||||
{
|
||||
$directory = realpath(APPLICATION_PATH . '/../cache/pages/');
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$output_file = $directory.'/'.$file;
|
||||
if (file_exists($output_file) && filesize($output_file)>0) {
|
||||
$content_type = 'application/pdf';
|
||||
header('Content-type: '.$content_type.'');
|
||||
header('Content-Length: '.filesize($output_file));
|
||||
header('Content-MD5: '.base64_encode(md5_file($output_file)));
|
||||
header('Content-Disposition: inline; filename="'.basename($output_file).'"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression','0');
|
||||
echo file_get_contents($output_file);
|
||||
} else {
|
||||
echo "Impossible de charger le fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion bodacc au format PDF
|
||||
*/
|
||||
public function bodaccAction()
|
||||
{
|
||||
$configuration = Zend_Registry::get('configuration');
|
||||
$directory = realpath($configuration->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);
|
||||
$directory.= '/'.$matches[1].'/'.$matches[2];
|
||||
$output_file = $directory.'/'.$file;
|
||||
if (file_exists($output_file) && filesize($output_file)>0) {
|
||||
$content_type = 'application/pdf';
|
||||
header('Content-type: '.$content_type.'');
|
||||
header('Content-Length: '.filesize($output_file));
|
||||
header('Content-MD5: '.base64_encode(md5_file($output_file)));
|
||||
header('Content-Disposition: inline; filename="'.basename($output_file).'"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression','0');
|
||||
echo file_get_contents($output_file);
|
||||
} else {
|
||||
echo "Impossible de charger le fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion des fichiers PDF des nouveautés
|
||||
*/
|
||||
public function newAction()
|
||||
{
|
||||
$configuration = Zend_Registry::get('configuration');
|
||||
$directory = realpath($configuration->path->data).'/nouveautes';
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$output_file = $directory.'/'.$file;
|
||||
if (file_exists($output_file) && filesize($output_file)>0) {
|
||||
$content_type = 'application/pdf';
|
||||
header('Content-type: '.$content_type.'');
|
||||
header('Content-Length: '.filesize($output_file));
|
||||
header('Content-MD5: '.base64_encode(md5_file($output_file)));
|
||||
header('Content-Disposition: inline; filename="'.basename($output_file).'"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression','0');
|
||||
echo file_get_contents($output_file);
|
||||
} else {
|
||||
echo "Impossible de charger le fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Bodacc history file
|
||||
*/
|
||||
public function histopdfAction()
|
||||
{
|
||||
$directory = APPLICATION_PATH.'/../cache/histopdf';
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$output_file = $directory.'/'.$file;
|
||||
if (file_exists($output_file) && filesize($output_file)>0) {
|
||||
$content_type = 'application/pdf';
|
||||
header('Content-type: '.$content_type.'');
|
||||
header('Content-Length: '.filesize($output_file));
|
||||
header('Content-MD5: '.base64_encode(md5_file($output_file)));
|
||||
header('Content-Disposition: inline; filename="'.basename($output_file).'"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression','0');
|
||||
echo file_get_contents($output_file);
|
||||
} else {
|
||||
echo "Impossible de charger le fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Bilan pdf file
|
||||
*/
|
||||
public function bilanAction()
|
||||
{
|
||||
$directory = APPLICATION_PATH.'/../cache/bilan';
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$output_file = $directory.'/'.$file;
|
||||
if (file_exists($output_file) && filesize($output_file)>0) {
|
||||
$content_type = 'application/pdf';
|
||||
header('Content-type: '.$content_type.'');
|
||||
header('Content-Length: '.filesize($output_file));
|
||||
header('Content-MD5: '.base64_encode(md5_file($output_file)));
|
||||
header('Content-Disposition: inline; filename="'.basename($output_file).'"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression','0');
|
||||
echo file_get_contents($output_file);
|
||||
} else {
|
||||
echo "Impossible de charger le fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,224 +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->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->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->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();
|
||||
}
|
||||
}
|
@ -1,916 +0,0 @@
|
||||
<?php
|
||||
class IdentiteController 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 'Scores/IdentiteEntreprise.php';
|
||||
require_once 'common/dates.php';
|
||||
|
||||
$this->view->headLink()->appendStylesheet('/themes/default/styles/identite.css', 'all');
|
||||
}
|
||||
|
||||
public function preDispatch()
|
||||
{
|
||||
switch($this->getRequest()->getActionName())
|
||||
{
|
||||
case 'fiche':
|
||||
case 'fichepc':
|
||||
if (intval($this->siret)==0 && $this->id==0){
|
||||
$this->_forward('params', 'error');
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Renvoi vers la fiche
|
||||
*/
|
||||
public function indexAction()
|
||||
{
|
||||
$this->_forward('index', 'index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Affichage de la fiche identité
|
||||
*/
|
||||
public function ficheAction()
|
||||
{
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/identite.js', 'text/javascript');
|
||||
$session = new Zend_Session_Namespace('Historique');
|
||||
|
||||
//Modification du titre
|
||||
if(empty($this->siret)){
|
||||
$titre = 'Identifiant '.$this->id;
|
||||
} else {
|
||||
$titre = 'Siret '.$this->siret;
|
||||
}
|
||||
$this->view->headTitle()->append('Identité - '.$titre);
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
|
||||
$autrePage = $this->getRequest()->getParam('apage');
|
||||
|
||||
//Récupération des informations
|
||||
if (empty($autrePage)) {
|
||||
$ws = new WsScores();
|
||||
$infos = $ws->getIdentite($this->siret, $this->id);
|
||||
if ($infos === false) $this->_forward('soap', 'error');
|
||||
} else {
|
||||
$infos = $this->getRequest()->getParam('infos');
|
||||
}
|
||||
|
||||
//Mise en session
|
||||
$session = new SessionEntreprise($this->siret, $this->id, true);
|
||||
$session->setInfoEntrep($infos);
|
||||
|
||||
//Date de dernière mise à jour
|
||||
$tabDate = array(
|
||||
'DateMajINSEE' => "Insee : ",
|
||||
'DateMajRCS' => "RCS : ",
|
||||
'DateMajBILAN' => "Bilans : ",
|
||||
'DateMajANN' => "Annonces : ",
|
||||
);
|
||||
$datemajTexte = '';
|
||||
foreach ( $tabDate as $dateId => $dateLib ) {
|
||||
if (isset($infos->{$dateId}) && !empty($infos->{$dateId}) && $infos->{$dateId}!='0000-00-00') {
|
||||
$datemajTexte.= $dateLib;
|
||||
$datemajTexte.= WDate::dateT('Y-m-d', 'd/m/Y', $infos->{$dateId});
|
||||
$datemajTexte.= '<br/>';
|
||||
}
|
||||
}
|
||||
$dateDerMaj = '';
|
||||
if (isset($infos->DateMajID) && !empty($infos->DateMajID) && $infos->DateMajID!='0000-00-00' && $infos->DateMajID!='0--' ){
|
||||
if ( $user->checkModeEdition() ){
|
||||
$datemajTexte.= "Scores & Décisions : ";
|
||||
$datemajTexte.= WDate::dateT('Y-m-d', 'd/m/Y', $infos->DateMajID);
|
||||
$datemajTexte.= '<br/>';
|
||||
}
|
||||
$dateDerMaj = ' le '.WDate::dateT('Y-m-d', 'd/m/Y', $infos->DateMajID);
|
||||
}
|
||||
|
||||
$identite = new IdentiteEntreprise($infos);
|
||||
|
||||
//Définition des blocks
|
||||
$blocks = array(
|
||||
'Siret',
|
||||
'SiretSiege',
|
||||
'TvaNumero',
|
||||
'Isin',
|
||||
'Capitalisation',
|
||||
'NumRC',
|
||||
'AutreId',
|
||||
'Actif',
|
||||
'SituationJuridique',
|
||||
'AutreSiren',
|
||||
'RaisonSociale',
|
||||
'NomCommercial',
|
||||
'EnseigneSigle',
|
||||
'FormeJuridique',
|
||||
'DateImmat',
|
||||
'DateCreaEn',
|
||||
'DateCreaEt',
|
||||
'Adresse',
|
||||
'Zones',
|
||||
'Tel',
|
||||
'Fax',
|
||||
'Web',
|
||||
'Mail',
|
||||
'ActiviteEn',
|
||||
'ActiviteEt',
|
||||
'Naf4',
|
||||
'Nace',
|
||||
'NatureActivite',
|
||||
'SurfaceMagasin',
|
||||
'OrigineFond',
|
||||
'TypeExploitation',
|
||||
'Saisonnalite',
|
||||
'NbEtabActif',
|
||||
'Capital',
|
||||
'ChiffreAffaire',
|
||||
'Dirigeants',
|
||||
'Effectif',
|
||||
'EffectifEtab'
|
||||
);
|
||||
|
||||
$dBlock = $identite->formatBlock($blocks);
|
||||
|
||||
require_once 'Scores/Logo.php';
|
||||
$logo = new Logo($infos->Siren, $infos->Isin);
|
||||
$logoImg = array(
|
||||
'label' => 'Logo',
|
||||
'texte' => $logo->affiche(),
|
||||
);
|
||||
|
||||
$this->view->assign('exportObjet', $infos);
|
||||
$this->view->assign('dBlock', $dBlock);
|
||||
$this->view->assign('logo', $logoImg);
|
||||
$this->view->assign('dateDerMaj', $dateDerMaj);
|
||||
$this->view->assign('datemajTexte', $datemajTexte);
|
||||
$this->view->assign('raisonSociale', $session->getRaisonSociale());
|
||||
$this->view->assign('infos', $infos);
|
||||
$this->view->assign('siret', $infos->Siret);
|
||||
|
||||
$survDroits = array('survannonce', 'survinsee', 'survbilan', 'survscore', 'survactes', 'survdirigeants', 'survpriv');
|
||||
$countSurvDroits = 0;
|
||||
foreach ( $survDroits as $item ) {
|
||||
if ($user->checkPerm($item)) $countSurvDroits++;
|
||||
}
|
||||
$this->view->assign('surveillance', $countSurvDroits);
|
||||
|
||||
$this->view->assign('AutrePage', $this->getRequest()->getParam('apage'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Affichage de la fiche procédure collective
|
||||
* Enter description here ...
|
||||
*/
|
||||
public function fichepcAction()
|
||||
{
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/identite.js', 'text/javascript');
|
||||
|
||||
//Vérification des permission
|
||||
$user = new Scores_Utilisateur();
|
||||
if(!$user->checkPerm('idprocol')){
|
||||
$this->_forward('perms', 'error');
|
||||
}
|
||||
|
||||
$siren = substr($this->siret,0,9);
|
||||
//Modification du titre
|
||||
if(empty($this->siret)){
|
||||
$titre = 'Identifiant '.$this->id;
|
||||
} else {
|
||||
$titre = 'Siret '.$this->siret;
|
||||
}
|
||||
$this->view->headTitle()->append('Fiche procédure collective - '.$titre);
|
||||
|
||||
//Récupération des informations
|
||||
$ws = new WsScores();
|
||||
$infos = $ws->getIdentiteProcol($this->siret, $this->id);
|
||||
if ($infos === false) $this->_forward('soap', 'error');
|
||||
|
||||
//Mise en session
|
||||
$session = new SessionEntreprise($this->siret, $this->id);
|
||||
$session->setInfoEntrep($infos->Identite);
|
||||
|
||||
//Element Fiche identite
|
||||
$identite = new IdentiteEntreprise($infos->Identite);
|
||||
//Définition des blocks
|
||||
$blocks = array(
|
||||
'Siret',
|
||||
'SiretSiege',
|
||||
'TvaNumero',
|
||||
'Isin',
|
||||
'Capitalisation',
|
||||
'NumRC',
|
||||
'AutreId',
|
||||
'Actif',
|
||||
'SituationJuridique',
|
||||
'AutreSiren',
|
||||
'RaisonSociale',
|
||||
'EnseigneSigle',
|
||||
'FormeJuridique',
|
||||
'DateImmat',
|
||||
'DateCreaEn',
|
||||
'DateCreaEt',
|
||||
'Adresse',
|
||||
'Zones',
|
||||
'Tel',
|
||||
'Fax',
|
||||
'Web',
|
||||
'Mail',
|
||||
'ActiviteEt',
|
||||
'ActiviteEn',
|
||||
'Naf4',
|
||||
'Nace',
|
||||
'NatureActivite',
|
||||
'OrigineFond',
|
||||
'TypeExploitation',
|
||||
'Saisonnalite',
|
||||
'NbEtabActif',
|
||||
'Capital',
|
||||
'ChiffreAffaire',
|
||||
'Dirigeants',
|
||||
'Effectif',
|
||||
'EffectifEtab'
|
||||
);
|
||||
|
||||
$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;
|
||||
}
|
||||
|
||||
require_once 'Scores/Logo.php';
|
||||
$logo = new Logo($infos->Siren, $infos->Isin);
|
||||
$logoImg = array(
|
||||
'label' => 'Logo',
|
||||
'texte' => $logo->affiche(),
|
||||
);
|
||||
$Identite = new stdClass();
|
||||
$Identite->siret = $this->siret;
|
||||
$Identite->dBlock = $dBlock;
|
||||
$Identite->logo = $logo;
|
||||
$Identite->AutrePage = 'fichepc';
|
||||
$this->view->assign('Identite', $Identite);
|
||||
|
||||
//Element Fiche procédure collective
|
||||
require_once 'Scores/IdentiteProcol.php';
|
||||
$procol = new IdentiteProcol($infos);
|
||||
$blocks = array(
|
||||
'CessionOffreDate',
|
||||
'CessionInvenDate',
|
||||
'CessionDesc',
|
||||
);
|
||||
$dBlock = array();
|
||||
foreach ($blocks as $item) {
|
||||
$display = array(
|
||||
'label' => method_exists($procol, 'get'.$item.'Label') ? $procol->{'get'.$item.'Label'}() : '',
|
||||
'texte' => method_exists($procol, 'get'.$item.'Texte') ? $procol->{'get'.$item.'Texte'}() : '',
|
||||
'titre' => method_exists($procol, 'get'.$item.'Titre') ? $procol->{'get'.$item.'Titre'}() : '',
|
||||
);
|
||||
$dBlock[$item] = $display;
|
||||
}
|
||||
$this->view->assign('dBlock', $dBlock);
|
||||
$this->view->assign('infosProcol', $procol);
|
||||
|
||||
$this->view->assign('exportObjet', $infos);
|
||||
$this->view->assign('infos', $infos);
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('raisonSociale', $session->getRaisonSociale());
|
||||
$this->view->assign('fj', $session->getFormeJuridique());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Affichage de la liste des établissements
|
||||
*/
|
||||
public function etablissementsAction()
|
||||
{
|
||||
$siren = substr($this->siret,0,9);
|
||||
$actif = $this->getRequest()->getParam('actif', -1);
|
||||
$this->view->headTitle()->append('Liste des établissements - Siren '.$siren);
|
||||
|
||||
$session = new SessionEntreprise($this->siret, $this->id);
|
||||
$user = new Scores_Utilisateur();
|
||||
|
||||
$ws = new WsScores();
|
||||
$infos = $ws->getListeEtablissements($siren, $actif);
|
||||
if ($infos === false) $this->_forward('soap', 'error');
|
||||
|
||||
$etabs = $infos->result->item;
|
||||
|
||||
$this->view->assign('actif', $actif);
|
||||
|
||||
$nbEtabActif = 0;
|
||||
$nbEtabRadie = 0;
|
||||
if (count($etabs)>0) {
|
||||
foreach ($etabs as $i => $etab) {
|
||||
if ($etab->Actif==1){
|
||||
$nbEtabActif++;
|
||||
} else {
|
||||
$nbEtabRadie++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->view->assign('nbEtabActif', $nbEtabActif);
|
||||
$this->view->assign('nbEtabRadie', $nbEtabRadie);
|
||||
|
||||
$this->view->assign('siren', $siren);
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('id', $this->id);
|
||||
$this->view->assign('raisonSociale', $session->getRaisonSociale());
|
||||
$this->view->assign('etabs', $etabs);
|
||||
$this->view->assign('exportObjet', $etabs);
|
||||
|
||||
// Permet de verifier si la personne a la preference d'affichage des cartes.
|
||||
$this->view->assign('hasPrefCarte', $user->checkPref('cartes'));
|
||||
$this->view->assign('listeEtablissement', $infos);
|
||||
}
|
||||
|
||||
/**
|
||||
* Affichage des établissements sur une carte (Google Maps)
|
||||
*/
|
||||
public function carteAction()
|
||||
{
|
||||
$siren = substr($this->siret,0,9);
|
||||
$actif = $this->getRequest()->getParam('actif', -1);
|
||||
|
||||
$session = new SessionEntreprise($this->siret, $this->id);
|
||||
$user = new Scores_Utilisateur();
|
||||
|
||||
$ws = new WsScores();
|
||||
$infos = $ws->getListeEtablissements($siren, $actif);
|
||||
if ($infos === false) $this->_forward('soap', 'error');
|
||||
|
||||
$etabs = $infos->result->item;
|
||||
|
||||
$marqueurs = array();
|
||||
|
||||
$j = 0;
|
||||
foreach ($etabs as $i => $etab) {
|
||||
|
||||
if ($etab->Siege == 1) {
|
||||
$type = 'Siège ';
|
||||
} else {
|
||||
$type = 'Etablissement ';
|
||||
}
|
||||
if ($etab->Actif == 1) {
|
||||
$type .= 'actif';
|
||||
} else {
|
||||
$type .= 'inactif';
|
||||
}
|
||||
$type .= ' - '.$etab->NafEtabLib;
|
||||
|
||||
$titre = "$siren ".$etab->Nic." : $type<br/>";
|
||||
if ($etab->Enseigne <> '') {
|
||||
$titre .= 'Enseigne : '.$etab->Enseigne.'<br/>';
|
||||
}
|
||||
|
||||
$texte = '';
|
||||
$texte .= 'Etablissement : '.$etab->Nic.'<br/>';
|
||||
$texte .= $etab->Adresse.'<br/>';
|
||||
$adresse = $etab->Adresse.' ';
|
||||
if ($etab->Adresse2 <> '') {
|
||||
$texte .= $etab->Adresse2.'<br/>';
|
||||
if (strlen(trim($adresse)) < 7) {
|
||||
$adresse = $etab->Adresse2.' ';
|
||||
}
|
||||
}
|
||||
$texte.='<b>'.$etab->CP.' '.$etab->Ville.'</b><br/>';
|
||||
|
||||
require_once 'Scores/classMMap.php';
|
||||
$mmap = new MMap($adresse, $etab->CP, $etab->Ville);
|
||||
if ($mmap->latitudeDec == '') {
|
||||
continue;
|
||||
}
|
||||
$photo = 'http://cbk0.google.com/cbk?output=thumbnail&w=150&h=69&ll='.
|
||||
$mmap->latitudeDec.','.
|
||||
$mmap->longitudeDec;
|
||||
|
||||
$adresse .= $etab->CP.' '.$etab->Ville;
|
||||
|
||||
$google_map = 'http://maps.google.fr/maps?q='.urlencode($adresse);
|
||||
|
||||
$texte .= '<a href='.$google_map.' target=_blank>';
|
||||
if ($mmap->precision >= 7 && @fopen($photo, 'r') != false) {
|
||||
$texte .= '<img src='.$photo.' width=\"155\" height=\"74\" />';
|
||||
} else {
|
||||
$texte .= 'Afficher l\'adresse sur Google Map ©';
|
||||
}
|
||||
$texte .= '</a>';
|
||||
$texte .= '<br/>';
|
||||
$texte .= '<i>'.$etab->NafEtab.' : '.$etab->NafEtabLib.'</i>';
|
||||
|
||||
$icone = 'http://'.$_SERVER['SERVER_NAME'].'/themes/default/images/maps/'.$this->iconeDuMarqueur($etab->NafEtab, $etab->Siege, $etab->Actif);
|
||||
|
||||
$marqueurs[$j] = array($mmap->latitudeDec, $mmap->longitudeDec, $titre, $texte, $type, $icone);
|
||||
++$j;
|
||||
// if ($j >= 30) { // Limitation du nombre d'etablissements sur la carte
|
||||
// break;
|
||||
// }
|
||||
}
|
||||
|
||||
if (count($marqueurs) > 1) {
|
||||
$min_x = $max_x = $marqueurs[0][0];
|
||||
$min_y = $max_y = $marqueurs[0][1];
|
||||
for ($i = 1; $i < count($marqueurs); ++$i) {
|
||||
$min_x = min($min_x, $marqueurs[$i][0]);
|
||||
$max_x = max($max_x, $marqueurs[$i][0]);
|
||||
$min_y = min($min_y, $marqueurs[$i][1]);
|
||||
$max_y = max($max_y, $marqueurs[$i][1]);
|
||||
}
|
||||
}
|
||||
|
||||
$this->view->assign('marqueurs', $marqueurs);
|
||||
$this->view->assign('min_x', $min_x);
|
||||
$this->view->assign('max_x', $max_x);
|
||||
$this->view->assign('min_y', $min_y);
|
||||
$this->view->assign('max_y', $max_y);
|
||||
}
|
||||
|
||||
protected function iconeDuMarqueur($naf, $siege, $actif)
|
||||
{
|
||||
if ($siege == 1) {
|
||||
return 'siege'.$actif.'.png';
|
||||
}
|
||||
switch (substr($naf, 0, 2)) {
|
||||
// A Agriculture, sylviculture et pêche
|
||||
case '01': // Culture et production animale, chasse et services annexes
|
||||
case '02': // Sylviculture et exploitation forestière
|
||||
case '03': // Pêche et aquaculture
|
||||
return 'tractor'.$actif.'.png';
|
||||
// B Industries extractives
|
||||
case '05': // Extraction de houille et de lignite
|
||||
case '06': // Extraction d'hydrocarbures
|
||||
case '07': // Extraction de minerais métalliques
|
||||
case '08': // Aures industries extractives
|
||||
case '09': // Services de soutien aux industries extractives
|
||||
// C Industrie manufacturière
|
||||
case '10': // Industries alimentaires
|
||||
case '11': // Fabrication de boissons
|
||||
case '12': // Fabrication de produits à base de tabac
|
||||
case '13': // Fabrication de textiles
|
||||
case '14': // Industrie de l'habillement
|
||||
case '15': // Industrie du cuir et de la chaussure
|
||||
case '16': // Travail du bois et fabrication d'articles en bois...
|
||||
case '17': // Industrie du papier et du carton
|
||||
case '18': // Imprimerie et reproduction d'enregistrements
|
||||
case '19': // Cokéfaction et raffinage
|
||||
case '20': // Industrie chimique
|
||||
case '21': // Industrie pharmaceutique
|
||||
case '22': // Fabrication de produits en caoutchouc et en plastique
|
||||
case '23': // Fabrication d'autres produits minéraux non métalliques
|
||||
case '24': // Métallurgie
|
||||
case '25': // Fabrication de produits métalliques...
|
||||
case '26': // Fabrication de produits informatiques...
|
||||
case '27': // Fabrication d'équipements électriques
|
||||
case '28': // Fabrication de machines et équipements n.c.a.
|
||||
case '29': // Industrie automobile
|
||||
case '30': // Fabrication d'autres matériels de transport
|
||||
case '31': // Fabrication de meubles
|
||||
case '32': // Autres industries manufacturières
|
||||
case '33': // Réparation et installation de machines et d'équipements
|
||||
// D Production et distribution d'électricité, de gaz, de vapeur...
|
||||
case '35': // Production et distribution d'électricité, de gaz...
|
||||
// E Production et distribution d'eau ; assainissement...
|
||||
case '36': // Captage, traitement et distribution d'eau
|
||||
case '37': // Collecte et traitement des eaux usées
|
||||
case '38': // Collecte, traitement et élimination des déchets...
|
||||
case '39': // Dépollution et autres services de gestion des déchets
|
||||
// F Construction
|
||||
case '41': // Construction de bâtiments
|
||||
case '42': // Génie civil
|
||||
case '43': // Travaux de construction spécialisés
|
||||
return 'usine'.$actif.'.png';
|
||||
// G Commerce ; réparation d'automobiles et de motocycles
|
||||
case '45': // Commerce et réparation d'automobiles et de motocycles
|
||||
case '46': // Commerce de gros, à l'exception des automobiles...
|
||||
case '47': // Commerce de détail, à l'exception des automobiles...
|
||||
return 'shop'.$actif.'.png';
|
||||
// H Transports et entreposage
|
||||
case '49': // Transports terrestres et transport par conduites
|
||||
case '50': // Transports par eau
|
||||
case '51': // Transports aériens
|
||||
case '53': // Activités de poste et de courrier
|
||||
return 'etab'.$actif.'.png';
|
||||
case '52': // Entreposage et services auxiliaires des transports
|
||||
return 'entrepot'.$actif.'.png';
|
||||
// I Hébergement et restauration
|
||||
case '55': // Hébergement
|
||||
case '56': // Restauration
|
||||
// J Information et communication
|
||||
case '58': // Édition
|
||||
case '59': // Production de films cinématographiques, de vidéo...
|
||||
case '60': // Programmation et diffusion
|
||||
case '61': // Télécommunications
|
||||
case '62': // Programmation, conseil et autres activités informatiques
|
||||
case '63': // Services d'information
|
||||
// K Activités financières et d'assurance
|
||||
case '64': // Activités des services financiers, hors assurance...
|
||||
case '65': // Assurance
|
||||
case '66': // Activités auxiliaires de services financiers et d'assurance
|
||||
// L Activités immobilières
|
||||
case '68': // Activités immobilières
|
||||
// M Activités spécialisées, scientifiques et techniques
|
||||
case '69': // Activités juridiques et comptables
|
||||
case '70': // Activités des sièges sociaux ; conseil de gestion
|
||||
case '71': // Activités d'architecture et d'ingénierie...
|
||||
case '72': // Recherche-développement scientifique
|
||||
case '73': // Publicité et études de marché
|
||||
case '74': // Autres activités spécialisées, scientifiques et techniques
|
||||
case '75': // Activités vétérinaires
|
||||
// N Activités de services administratifs et de soutien
|
||||
case '77': // Activités de location et location-bail
|
||||
case '78': // Activités liées à l'emploi
|
||||
case '79': // Activités des agences de voyage, voyagistes...
|
||||
case '80': // Enquêtes et sécurité
|
||||
case '81': // Services relatifs aux bâtiments et aménagement paysager
|
||||
case '82': // Activités administratives et autres activités de soutien...
|
||||
return 'etab'.$actif.'.png';
|
||||
// O Administration publique
|
||||
case '84': // Administration publique et défense ; sécurité sociale...
|
||||
// P Enseignement
|
||||
case '85': // Enseignement
|
||||
return 'admin'.$actif.'.png';
|
||||
// Q Santé humaine et action sociale
|
||||
case '86': // Activités pour la santé humaine
|
||||
case '87': // Hébergement médico-social et social
|
||||
case '88': // Action sociale sans hébergement
|
||||
// R Arts, spectacles et activités récréatives
|
||||
case '90': // Activités créatives, artistiques et de spectacle
|
||||
case '91': // Bibliothèques, archives, musées...
|
||||
case '92': // Organisation de jeux de hasard et d'argent
|
||||
case '93': // Activités sportives, récréatives et de loisirs
|
||||
// S Autres activités de services
|
||||
case '94': // Activités des organisations associatives
|
||||
case '95': // Réparation d'ordinateurs et de biens personnels...
|
||||
case '96': // Autres services personnels
|
||||
// T Activités des ménages en tant qu'employeurs...
|
||||
case '97': // Activités des ménages en tant qu'employeurs de personnel...
|
||||
case '98': // Activités indifférenciées des ménages...
|
||||
// U Activités extra-territoriales
|
||||
case '99': // Activités des organisations et organismes extraterritoriaux
|
||||
return 'etab'.$actif.'.png';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Affichage des liens inter-entreprise
|
||||
*/
|
||||
public function liensAction()
|
||||
{
|
||||
$siren = substr($this->siret,0,9);
|
||||
$this->view->headTitle()->append('Liens inter-entreprises - Siren '.$siren);
|
||||
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/identite.js', 'text/javascript');
|
||||
|
||||
$session = new SessionEntreprise($this->siret, $this->id);
|
||||
|
||||
$this->view->assign('siren', $siren);
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('raisonSociale', $session->getRaisonSociale());
|
||||
|
||||
if ( ($session->getFormeJuridique()>=1000 && $session->getFormeJuridique()<=1999)
|
||||
|| ($session->getFormeJuridique()>=10 && $session->getFormeJuridique()<=19) ) {
|
||||
$this->renderScript('identite/liens-personne-physique.phtml');
|
||||
}
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
if ( $user->checkPerm('GROUPE') ) {
|
||||
$this->view->assign('liengroupe', $this->view->url(array(
|
||||
'controller' =>'identite',
|
||||
'action' => 'groupesarbo',
|
||||
'siret' => $siren
|
||||
), null, true) );
|
||||
}
|
||||
|
||||
require_once 'Scores/WsScores.php';
|
||||
$ws = new WsScores();
|
||||
$infos = $ws->getLiens($siren);
|
||||
|
||||
$actionnaires = $infos->actionnaires->item;
|
||||
$participations = $infos->participations->item;
|
||||
|
||||
//Informations de MAJ
|
||||
if(count($actionnaires)>0){
|
||||
$nb = count($actionnaires)-1;
|
||||
$source = $actionnaires[$nb]->Source;
|
||||
$dateMaj = $actionnaires[$nb]->DateMaj;
|
||||
} else if (count($participations)>0){
|
||||
$nb = count($participations)-1;
|
||||
$source = $participations[$nb]->Source;
|
||||
$dateMaj = $participations[$nb]->DateMaj;
|
||||
} else {
|
||||
$source = '';
|
||||
$dateLien = '';
|
||||
$dateMaj = '';
|
||||
}
|
||||
|
||||
$this->view->assign('exportObjet', $infos);
|
||||
$this->view->assign('source', $source);
|
||||
$this->view->assign('dateLien', $dateLien);
|
||||
$this->view->assign('dateMaj', $dateMaj);
|
||||
$this->view->assign('actionnaires', $actionnaires);
|
||||
$this->view->assign('participations', $participations);
|
||||
|
||||
$this->view->assign('AutrePage', $this->getRequest()->getParam('apage'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Affichage des modifications Insee
|
||||
*/
|
||||
public function evenementsAction()
|
||||
{
|
||||
$siren = substr($this->siret,0,9);
|
||||
$this->view->headTitle()->append('Evènements - Siren '.$siren);
|
||||
|
||||
$session = new SessionEntreprise($this->siret, $this->id);
|
||||
|
||||
require_once 'Scores/WsScores.php';
|
||||
$ws = new WsScores();
|
||||
$infos = $ws->getListeEvenements($siren);
|
||||
|
||||
$evens = $infos->result->item;
|
||||
|
||||
$this->view->assign('siren', $siren);
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('id', $this->id);
|
||||
$this->view->assign('raisonSociale', $session->getRaisonSociale());
|
||||
$this->view->assign('evens', $evens);
|
||||
$this->view->assign('exportObjet', $evens);
|
||||
}
|
||||
|
||||
/**
|
||||
* Affichage des news
|
||||
*/
|
||||
public function newsAction()
|
||||
{
|
||||
$googleNews = true;
|
||||
$nbNews = 15;
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
if ($user->checkPref('news'))
|
||||
{
|
||||
$session = new SessionEntreprise($this->siret, $this->id);
|
||||
|
||||
$items = array();
|
||||
if ($googleNews!==false){
|
||||
|
||||
$url = 'http://news.google.fr/news?hl=fr&gl=fr&q='.
|
||||
urlencode($session->getRaisonSociale()).'&output=rss';
|
||||
|
||||
$items = array();
|
||||
try {
|
||||
$canal = new Zend_Feed_Rss($url);
|
||||
} catch (Exception $e) {
|
||||
//Do nothing
|
||||
}
|
||||
|
||||
if (count($canal)>0)
|
||||
{
|
||||
$i=0;
|
||||
foreach ($canal as $element)
|
||||
{
|
||||
$items[] = $element;
|
||||
$i++;
|
||||
if ($i==$nbNews) break;
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->view->assign('items', $items);
|
||||
} else {
|
||||
$this->view->assign('disable', true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Téléchargement d'un avis de situation
|
||||
*/
|
||||
public function avisAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
// ==> Start
|
||||
require_once 'Scores/AvisSituation.php';
|
||||
$avis = new AvisSituation($this->siret);
|
||||
|
||||
if (!$avis->erreur()){
|
||||
$avis->erreurcpt('raz');
|
||||
$body = $avis->get('pdf', 1);
|
||||
if($body !== false) {
|
||||
header("Pragma: public");
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
|
||||
header("Cache-Control: must-revalidate");
|
||||
header("Content-type: application/pdf");
|
||||
header("Content-Length: ".strlen($body));
|
||||
header('Content-disposition: inline; filename="avis-'.$this->siret.'.pdf"');
|
||||
header("Accept-Ranges: ".strlen($body));
|
||||
echo $body;
|
||||
$ws = new WsScores();
|
||||
$ws->setLog('avis_situation', $this->siret, 0, '');
|
||||
} else {
|
||||
$avis->erreurcpt('plus');
|
||||
echo $avis->erreurmsg();
|
||||
}
|
||||
} else {
|
||||
if ($avis->nberreur()==5){
|
||||
$avis->mailerreur();
|
||||
}
|
||||
$avis->erreurcpt('plus');
|
||||
echo $avis->erreurmsg();
|
||||
}
|
||||
}
|
||||
|
||||
public function irisAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
||||
$request = $this->getRequest();
|
||||
$codeCommune = $request->getParam('code');
|
||||
// ==> Start
|
||||
require_once 'Scores/Iris.php';
|
||||
$iris = new Iris($codeCommune);
|
||||
$body = $iris->get('pdf');
|
||||
if($body !== false) {
|
||||
header("Pragma: public");
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
|
||||
header("Cache-Control: must-revalidate");
|
||||
header("Content-type: application/pdf");
|
||||
header("Content-Length: ".strlen($body));
|
||||
header('Content-disposition: inline; filename="carte_iris_'.$codeCommune.'.pdf"');
|
||||
header("Accept-Ranges: ".strlen($body));
|
||||
echo $body;
|
||||
} else {
|
||||
echo $iris->erreur();
|
||||
}
|
||||
}
|
||||
|
||||
public function geoAction()
|
||||
{
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/geolocalisation.js', 'text/javascript');
|
||||
$this->view->headLink()->appendStylesheet('/themes/default/styles/geolocalisation.css', 'all');
|
||||
|
||||
$infos = $this->getRequest()->getParam('infos');
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
$this->view->assign('facade', $user->checkPref('mappy'));
|
||||
|
||||
require_once 'Scores/Google.php';
|
||||
$google = new Google();
|
||||
$decLat = $google->dec2dms($infos->GeoLat);
|
||||
$decLon = $google->dec2dms($infos->GeoLon);
|
||||
$mapsHref = $google->getGoogleMapLink(urlencode(
|
||||
$infos->AdresseNum.', '.$infos->AdresseVoie.' '.
|
||||
htmlspecialchars_decode($infos->AdresseRue, ENT_QUOTES).
|
||||
', '.$infos->CP.' '.$infos->Ville));
|
||||
|
||||
$this->view->assign('mapsHref', $mapsHref);
|
||||
$this->view->assign('decLat', $decLat);
|
||||
$this->view->assign('decLon', $decLon);
|
||||
$this->view->assign('infos', $infos);
|
||||
}
|
||||
|
||||
public function facadeAction()
|
||||
{
|
||||
require_once 'Scores/Mappy.php';
|
||||
$infos = $this->getRequest()->getParam('infos');
|
||||
$mappy = new Mappy();
|
||||
if ($mappy->villeCouverte($infos->Ville))
|
||||
{
|
||||
$adresse = '';
|
||||
$adresse.= $infos->AdresseNum;
|
||||
|
||||
//Corriger la voie pour Mappy
|
||||
$adresse.= ' '.strtr($infos->AdresseVoie, array(
|
||||
'R' => 'RUE',
|
||||
'AV' => 'AVENUE',
|
||||
'RLE' => 'RUELLE',
|
||||
));
|
||||
|
||||
$adresse.= ' '.$infos->AdresseRue;
|
||||
$adresse.= ' '.$infos->Ville;
|
||||
|
||||
//Définir le pays
|
||||
if ($infos->Pays == '') {
|
||||
$adresse.= ' FRANCE';
|
||||
} else {
|
||||
$adresse.= ' '.$infos->Pays;
|
||||
}
|
||||
|
||||
$this->view->assign('adresse', $adresse);
|
||||
$this->view->assign('source', 'mappy');
|
||||
$this->view->assign('lienJs', $mappy->getJs());
|
||||
}
|
||||
else
|
||||
{
|
||||
require_once 'Scores/Google.php';
|
||||
$google = new Google();
|
||||
$googleKey = $google->getGoogleKey($_SERVER['SERVER_NAME']);
|
||||
$this->view->assign('googleKey', $googleKey);
|
||||
$this->view->assign('source', 'google');
|
||||
$this->view->assign('infos', $infos);
|
||||
}
|
||||
}
|
||||
|
||||
public function groupesarboAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$siren = substr($this->siret,0,9);
|
||||
|
||||
require_once 'Scores/WsScores.php';
|
||||
$ws = new WsScores();
|
||||
$result = $ws->getGroupesArbo($siren);
|
||||
|
||||
if ( $result!==false ) {
|
||||
$infos = json_decode($result, true);
|
||||
Zend_Registry::get('firebug')->info($infos);
|
||||
if (count($infos)>0) {
|
||||
$structure = array();
|
||||
|
||||
$name = $infos['name'].' ('.$infos['siren'].')';
|
||||
|
||||
$structure[] = array(
|
||||
'data' => $name,
|
||||
'state' => 'open',
|
||||
'children' => $this->groupesArboChildren($infos['children'], $siren),
|
||||
);
|
||||
Zend_Registry::get('firebug')->info($structure);
|
||||
$this->view->assign('data', json_encode($structure));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function groupesArboChildren($items, $detectSiren = '')
|
||||
{
|
||||
$output = array();
|
||||
if ( count($items)>0 ) {
|
||||
foreach ( $items as $item ) {
|
||||
|
||||
$name = $item['name'];
|
||||
if ( intval($item['siren'])!=0 ) {
|
||||
$name.= ' (<a href="'.
|
||||
$this->view->url(array(
|
||||
'controller'=>'identite',
|
||||
'action'=>'fiche',
|
||||
'siret' => $item['siren'],
|
||||
), null, true)
|
||||
.'">'.$item['siren'].'</a>)';
|
||||
} else {
|
||||
$name.= ' ('.$item['pays'].')';
|
||||
}
|
||||
$name.= ' - '.$item['pmin'].'%';
|
||||
|
||||
$structure = array(
|
||||
'data' => $name,
|
||||
'state' => 'open',
|
||||
);
|
||||
|
||||
if ($item['siren']==$detectSiren) {
|
||||
$structure['class'] = 'jstree-search';
|
||||
}
|
||||
|
||||
if (count($item['children'])>0){
|
||||
$structure['children'] = $this->groupesArboChildren($item['children'], $detectSiren);
|
||||
} else {
|
||||
$structure['children'] = array();
|
||||
}
|
||||
$output[] = $structure;
|
||||
}
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
public function groupeAction()
|
||||
{
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/identite.js', 'text/javascript');
|
||||
|
||||
$siren = substr($this->siret,0,9);
|
||||
|
||||
require_once 'Scores/WsScores.php';
|
||||
$ws = new WsScores();
|
||||
$result = $ws->getGroupeInfos($siren);
|
||||
|
||||
$this->view->assign('result', $result);
|
||||
$this->view->assign('siren', $siren);
|
||||
}
|
||||
|
||||
}
|
@ -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('configuration')->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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,461 +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';
|
||||
|
||||
$this->view->headLink()->appendStylesheet('/themes/default/styles/juridique.css', 'all');
|
||||
}
|
||||
|
||||
/**
|
||||
* 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', 0);
|
||||
$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('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('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'));
|
||||
$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;
|
||||
}
|
||||
|
||||
$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)
|
||||
);
|
||||
|
||||
$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)
|
||||
{
|
||||
$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();
|
||||
$idCom = $request->getParam('idCom', false);
|
||||
$siren = substr($this->siret, 0,9);
|
||||
$session = new SessionEntreprise($this->siret, $this->id);
|
||||
|
||||
$ws = new WsScores();
|
||||
$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),
|
||||
);
|
||||
}
|
||||
}
|
||||
if ($idCom!=false) {
|
||||
$this->view->assign('liste', false);
|
||||
$this->view->assign('idCom', $idCom);
|
||||
} else {
|
||||
$this->view->assign('liste', true);
|
||||
}
|
||||
$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);
|
||||
}
|
||||
|
||||
/**
|
||||
* Récupére la page pdf concernant le dépot de marque
|
||||
* @param unknown_type $idObject
|
||||
* @param unknown_type $directory
|
||||
*/
|
||||
protected function getMarques($idObject, $directory)
|
||||
{
|
||||
require_once 'common/curl.php';
|
||||
$url = 'http://bases-marques.inpi.fr/Typo3_INPI_Marques/getPdf?idObjet='.$idObject.'_FMARK-1,FMARK-2';
|
||||
$page = getUrl($url, '', '', '', false, '', '', 7);
|
||||
$body = $page['body'];
|
||||
//On test si il y a eu une erreur
|
||||
if($page['code']==200){
|
||||
$fp=@fopen($directory.'/'.$idObject.'.pdf', 'w');
|
||||
@fwrite($fp, $body);
|
||||
@fclose($fp);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
$configuration = Zend_Registry::get('configuration');
|
||||
$directory = realpath($configuration->path->data).'/'.$configuration->path->marques;
|
||||
$file = $numdepot.'.pdf';
|
||||
|
||||
//Le fichier n'existe pas alors on le télécharger
|
||||
if(!file_exists($directory.'/'.$file)
|
||||
|| filesize($directory.'/'.$file)==0
|
||||
|| date('Ymd', filemtime($directory.'/'.$file))!=date('Ymd') ) {
|
||||
$this->getMarques($numdepot, $directory);
|
||||
}
|
||||
usleep(500);
|
||||
//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;
|
||||
}
|
||||
|
||||
$configuration = Zend_Registry::get('configuration');
|
||||
$file = realpath($configuration->path->data)
|
||||
.'/bodacc/'.$type.'/'.$annee.'/'.
|
||||
'BODACC_'.$type.'_'.$annee.'_'.$num.'.pdf';
|
||||
|
||||
if ( !file_exists($file) ) {
|
||||
exec('php '.APPLICATION_PATH . "/../batch/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
File diff suppressed because it is too large
Load Diff
@ -1,296 +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
|
||||
$url_tab = getUrl($url, '', '', '', false);
|
||||
if ($url_tab['code'] == 408 ||
|
||||
$url_tab['code'] == 400 ||
|
||||
$url_tab['code'] == 404) {
|
||||
// Fichier non disponible
|
||||
return false;
|
||||
} else {
|
||||
// Ecriture du fichier sur le serveur en local
|
||||
$body = $url_tab['body'];
|
||||
$fp = fopen($this->path.'/'.$file, 'w');
|
||||
fwrite($fp, $body);
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
return $file;
|
||||
}
|
||||
|
||||
public function init()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
||||
require_once 'Scores/WsScores.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* Télécharge la consommation client sous forme de fichier csv et affiche le lien
|
||||
*/
|
||||
public function consommationAction()
|
||||
{
|
||||
$this->path = APPLICATION_PATH.'/../cache/consommation';
|
||||
$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élécharger le fichier"'.
|
||||
' target="_blank" href="/fichier/consommation/'.$file.
|
||||
'">Cliquez-ici pour télécharger'.
|
||||
' le fichier.</a></u>';
|
||||
} else {
|
||||
echo 'Aucune consommmation enregistrée.';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Télécharge les surveillances sous forme de fichier csv et affiche le lien
|
||||
*/
|
||||
public function surveillanceAction()
|
||||
{
|
||||
$this->path = APPLICATION_PATH.'/../cache/surveillance';
|
||||
$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élécharger le fichier"'.
|
||||
' target="_blank" href="/fichier/surveillance/'.$file.
|
||||
'">Cliquez-ici pour télécharger'.
|
||||
' le fichier.</a></u>';
|
||||
} else {
|
||||
echo 'Aucune surveillance enregistrée.';
|
||||
}
|
||||
}
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Télécharge le portefeuille sous forme de fichier csv et affiche le lien
|
||||
* Enter description here ...
|
||||
*/
|
||||
public function portefeuilleAction()
|
||||
{
|
||||
$this->path = APPLICATION_PATH.'/../cache/surveillance';
|
||||
$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élécharger le fichier"'.
|
||||
' target="_blank" href="/fichier/portefeuille/'.$file.
|
||||
'">Cliquez-ici pour télécharger'.
|
||||
' le fichier.</a></u>';
|
||||
} else {
|
||||
echo 'Aucune surveillance enregistrée.';
|
||||
}
|
||||
}
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Download pdf of bodacc history
|
||||
*/
|
||||
public function histopdfAction()
|
||||
{
|
||||
$this->path = APPLICATION_PATH.'/../cache/histopdf';
|
||||
|
||||
$request = $this->getRequest();
|
||||
|
||||
$url = "http://wse.scores-decisions.com:8081/fichier/bodacc";
|
||||
|
||||
$q = $request->getParam('q', '');
|
||||
|
||||
//Authenticate info
|
||||
$auth = Zend_Auth::getInstance();
|
||||
$identity = $auth->getIdentity();
|
||||
$authinfo = '/login/'.$identity->username.'/hach/'.$identity->password;
|
||||
$url = $url.$authinfo.'/q/'.$q;
|
||||
|
||||
$file = $this->getFile($url, uniqid().'.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élécharger le fichier"'.
|
||||
' target="_blank" href="/fichier/histopdf/'.$file.
|
||||
'">Cliquez-ici pour télécharger'.
|
||||
' le fichier.</a></u>';
|
||||
} else {
|
||||
echo "Erreur lors du téléchargement du fichier.";
|
||||
}
|
||||
}
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Download bilan pdf file
|
||||
*/
|
||||
public function bilanAction()
|
||||
{
|
||||
$this->path = APPLICATION_PATH.'/../cache/bilan';
|
||||
$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);
|
||||
// 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élécharger le fichier"'.
|
||||
' target="_blank" href="/fichier/bilan/'.$file.
|
||||
'">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.";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,440 +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();
|
||||
$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->timeout = (!empty($InfosLogin->result->timeout)) ?
|
||||
$InfosLogin->result->timeout : 1800;
|
||||
$identity->time = time() + $identity->timeout;
|
||||
$identity->modeEdition = false;
|
||||
$identity->acceptationCGU = $InfosLogin->result->acceptationCGU;;
|
||||
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->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');
|
||||
|
||||
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 ($reponse){
|
||||
$updateResult = true;
|
||||
$message = 'Compte mis à jour.';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//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);
|
||||
|
||||
//Récupération des informations de l'identité
|
||||
$auth = Zend_Auth::getInstance();
|
||||
$identity = $auth->getIdentity();
|
||||
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);
|
||||
|
||||
Zend_Registry::get('firebug')->info('action : '.$action);
|
||||
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(' ', $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(' ', $identity->droitsClients));
|
||||
}
|
||||
$this->view->assign('loginNew', '');
|
||||
$this->view->assign('action', 'update');
|
||||
$this->view->assign('pref', explode(' ',$identity->pref));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Renvoi vers le wiki
|
||||
*/
|
||||
public function documentationAction()
|
||||
{
|
||||
$user = new Scores_Utilisateur();
|
||||
$login = $user->getLogin();
|
||||
$password = $user->getPassword();
|
||||
$url = 'http://infos.scores-decisions.com/?do=login&u='.$login.'&p='.$password;
|
||||
$this->_redirect($url);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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->inlineScript()
|
||||
->appendFile('/libs/jquery/jquery.js')
|
||||
->appendFile('/libs/jquery/jquery.infieldlabel.min.js');
|
||||
|
||||
//@todo : gestion des affichages particuliers pour les clients
|
||||
$this->view->headTitle()->append('Connexion');
|
||||
$form = new Form_Login();
|
||||
$this->view->form = $form;
|
||||
$request = $this->getRequest();
|
||||
if ($request->isPost()) {
|
||||
$formData = $request->getPost ();
|
||||
if ($form->isValid($formData)) {
|
||||
$login = $form->getValue('login');
|
||||
$pass = $form->getValue('pass');
|
||||
|
||||
$auth = Zend_Auth::getInstance();
|
||||
$authAdapter = new Scores_AuthAdapter($login, md5($login.'|'.$pass));
|
||||
$result = $auth->authenticate($authAdapter);
|
||||
if (!$result->isValid()){
|
||||
$this->view->message = '';
|
||||
Zend_Registry::get('firebug')->info($result);
|
||||
foreach ($result->getMessages() as $message) {
|
||||
$this->view->message.= $message."<br/>";
|
||||
}
|
||||
} else {
|
||||
$url = '';
|
||||
if (Zend_Session::namespaceIsset('login')){
|
||||
$session = new Zend_Session_Namespace('login');
|
||||
if (isset($session->url)) {
|
||||
$url = $session->url;
|
||||
}
|
||||
}
|
||||
if (!empty($url) && $url!='/user/login' && $url!='/user/logout' && $url!='/localauth'){
|
||||
$this->_redirect($url);
|
||||
}
|
||||
$this->_redirect('/');
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->render('login');
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion de la déconnexion
|
||||
*/
|
||||
public function logoutAction()
|
||||
{
|
||||
Zend_Auth::getInstance()->clearIdentity();
|
||||
$this->_helper->layout()->disableLayout();
|
||||
|
||||
$request = $this->getRequest();
|
||||
$message = $request->getParam('message');
|
||||
$this->view->assign('message', $message);
|
||||
|
||||
$refresh = 5;
|
||||
|
||||
$url = 'http://'.$_SERVER['SERVER_NAME'].$this->view->url(array(
|
||||
'controller' => 'user',
|
||||
'action' => 'login',
|
||||
));
|
||||
|
||||
$this->view->assign('url', $url);
|
||||
$this->view->assign('refresh', $refresh);
|
||||
$this->view->headMeta()->appendHttpEquiv('refresh', $refresh.'; url='.$url);
|
||||
$this->render('logout');
|
||||
}
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('/');
|
||||
|
||||
}
|
||||
|
||||
}
|
BIN
application/languages/en.mo
Normal file
BIN
application/languages/en.mo
Normal file
Binary file not shown.
2985
application/languages/en.po
Normal file
2985
application/languages/en.po
Normal file
File diff suppressed because it is too large
Load Diff
BIN
application/languages/fr.mo
Normal file
BIN
application/languages/fr.mo
Normal file
Binary file not shown.
3339
application/languages/fr.po
Normal file
3339
application/languages/fr.po
Normal file
File diff suppressed because it is too large
Load Diff
68
application/languages/totranslate.php
Normal file
68
application/languages/totranslate.php
Normal file
@ -0,0 +1,68 @@
|
||||
<?php
|
||||
//Menu
|
||||
$this->translate('RECHERCHES');
|
||||
$this->translate('Rechercher une entreprise');
|
||||
$this->translate('Rechercher par dirigeant');
|
||||
$this->translate('Recherche Internationale');
|
||||
$this->translate('Rechercher une annonce');
|
||||
$this->translate('Rechercher par actionnaire');
|
||||
$this->translate('Dernière recherche');
|
||||
$this->translate('Liste des dernières recherches');
|
||||
$this->translate('Centrale IparI');
|
||||
$this->translate('IDENTITE');
|
||||
$this->translate('Fiche d\'identité');
|
||||
$this->translate('Fiche Procédure Collective');
|
||||
$this->translate('Liste des établissements');
|
||||
$this->translate('Liens inter-entreprises');
|
||||
$this->translate('Informations Groupe');
|
||||
$this->translate('Modifications Insee');
|
||||
$this->translate('DIRIGEANTS');
|
||||
$this->translate('Liste des dirigeants');
|
||||
$this->translate('Historique des dirigeants');
|
||||
$this->translate('ELEMENTS FINANCIERS');
|
||||
$this->translate('Synthèse');
|
||||
$this->translate('Bilans, Compte de résultat');
|
||||
$this->translate('Ratios');
|
||||
$this->translate('Flux de trésorerie');
|
||||
$this->translate('Liasse fiscale');
|
||||
$this->translate('Bourse & Cotations');
|
||||
$this->translate('Relations bancaires');
|
||||
$this->translate('ELEMENTS JURIDIQUES');
|
||||
$this->translate('Annonces Légales');
|
||||
$this->translate('Information Réglementée');
|
||||
$this->translate('Compétences Territoriales');
|
||||
$this->translate('Conventions collectives');
|
||||
$this->translate('Marques déposées');
|
||||
$this->translate('BANQUE DE FRANCE');
|
||||
$this->translate('27. Panorama');
|
||||
$this->translate('28. Concours Bancaires');
|
||||
$this->translate('29. Impayés');
|
||||
$this->translate('40. Relations Bancaires');
|
||||
$this->translate('51. Dirigeants');
|
||||
$this->translate('Autres');
|
||||
$this->translate('EVALUATION');
|
||||
$this->translate('IndiScore');
|
||||
$this->translate('Rapport de synthèse');
|
||||
$this->translate('Rapport complet');
|
||||
$this->translate('Valorisation');
|
||||
$this->translate('Scoring Credit Safe');
|
||||
$this->translate('Enquête commerciale');
|
||||
$this->translate('PIECES OFFICIELLES');
|
||||
$this->translate('Commande de Pièces');
|
||||
$this->translate('Comptes annuels');
|
||||
$this->translate('Actes & Statuts');
|
||||
$this->translate('Suivi Privilèges');
|
||||
$this->translate('OPTIONS');
|
||||
$this->translate('Nouveautés');
|
||||
$this->translate('Mes options');
|
||||
$this->translate('Mes surveillances');
|
||||
$this->translate('Surveillances fichier');
|
||||
$this->translate('Mon portefeuille');
|
||||
$this->translate('Administration');
|
||||
$this->translate('Surveillances');
|
||||
$this->translate('Se déconnecter');
|
||||
$this->translate('GESTION S&D');
|
||||
$this->translate('Gestion');
|
||||
$this->translate('Saisie / Edition');
|
||||
$this->translate('Saisie Fiche Etrangère');
|
||||
?>
|
7
application/layouts/default/footer.phtml
Normal file
7
application/layouts/default/footer.phtml
Normal file
@ -0,0 +1,7 @@
|
||||
<p>© 2006-<?php echo date('Y')?> Scores & Décisions SAS -
|
||||
<?=$this->translate("Tous droits réservés")?> -
|
||||
<a href="http://www.scores-decisions.com/mentions.php" target="_blank">
|
||||
<?=$this->translate("Mentions lé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>
|
43
application/layouts/default/header.phtml
Normal file
43
application/layouts/default/header.phtml
Normal 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 }?>
|
21
application/layouts/default/layout.phtml
Normal file
21
application/layouts/default/layout.phtml
Normal file
@ -0,0 +1,21 @@
|
||||
<?php echo $this->doctype()?>
|
||||
<html>
|
||||
<head>
|
||||
<?php echo $this->headMeta()?>
|
||||
<?php echo $this->headTitle()?>
|
||||
<?php echo $this->headLink()?>
|
||||
<?php echo $this->headScript()?>
|
||||
</head>
|
||||
<body>
|
||||
<div id="global">
|
||||
<?php echo $this->render('header.phtml')?>
|
||||
<div id="content">
|
||||
<?php echo $this->layout()->content?>
|
||||
<div id="footer">
|
||||
<?php echo $this->render('footer.phtml')?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo $this->inlineScript()?>
|
||||
</body>
|
||||
</html>
|
19
application/layouts/helpers/Editable.php
Normal file
19
application/layouts/helpers/Editable.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
class Zend_View_Helper_Editable extends Zend_View_Helper_Abstract
|
||||
{
|
||||
public function Editable($name, $value, $category)
|
||||
{
|
||||
$class = 'editable-change';
|
||||
if ( null === $value ) {
|
||||
$value = $name;
|
||||
$class = 'editable';
|
||||
}
|
||||
if ( !empty($class) ) {
|
||||
$class = 'class="'.$class.' '.$category.'"';
|
||||
}
|
||||
$html = '<span id="'.$name.'" '.$class.'>';
|
||||
$html.= $value;
|
||||
$html.= '</span>';
|
||||
return $html;
|
||||
}
|
||||
}
|
21
application/layouts/helpers/SiretTexte.php
Normal file
21
application/layouts/helpers/SiretTexte.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
class Zend_View_Helper_SiretTexte extends Zend_View_Helper_Abstract
|
||||
{
|
||||
public function SiretTexte($siret)
|
||||
{
|
||||
if (intval(substr($siret,0,9))<1000) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$fSiret = substr($siret, 0, 3).' '.
|
||||
substr($siret, 3, 3).' '.
|
||||
substr($siret, 6, 3);
|
||||
|
||||
$nic = substr($siret, 9, 5);
|
||||
if (intval($nic)>0) {
|
||||
$fSiret.= ' <i>'.$nic.'</i>';
|
||||
}
|
||||
|
||||
return $fSiret;
|
||||
}
|
||||
}
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
@ -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'");
|
||||
}
|
||||
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
<?php
|
||||
class Application_Model_Naf5 extends Zend_Db_Table_Abstract
|
||||
{
|
||||
protected $_name = 'tabnaf5';
|
||||
}
|
||||
|
@ -1,42 +0,0 @@
|
||||
<?php
|
||||
class Application_Model_RapportsGiants extends Zend_Db_Table_Abstract
|
||||
{
|
||||
protected $_name = 'rapports_giants';
|
||||
|
||||
public function getReportById($companyId)
|
||||
{
|
||||
$sql = $this->select('report')
|
||||
->where('companyId = ?', $companyId);
|
||||
$result = $this->getAdapter()->fetchAll($sql);
|
||||
return ($result);
|
||||
}
|
||||
|
||||
public function getReportByIdAndType($companyId, $type)
|
||||
{
|
||||
if($type == 'CR') {
|
||||
$where = 'type="FU" or type="CO"';
|
||||
} else $where = 'type = "FU"';
|
||||
$sql = $this->select()
|
||||
->where('companyId = ? and '.$where, $companyId);
|
||||
$result = $this->getAdapter()->fetchRow($sql);
|
||||
if($type == 'FU') {
|
||||
$where = $this->getAdapter()->quoteInto('companyId = ? AND type = "CR" OR type = "CO"' , $companyId);
|
||||
//var_dump($where);exit;
|
||||
$this->delete($where);
|
||||
} else if($type == 'CO') {
|
||||
$where = $this->getAdapter()->quoteInto('companyId = ? and type = "CR"', $companyId);
|
||||
$this->delete($where);
|
||||
}
|
||||
return ($result['report']);
|
||||
}
|
||||
|
||||
public function getReportDate($companyId, $type)
|
||||
{
|
||||
$sql = $this->select('date')
|
||||
->where('companyId = ?', $companyId)
|
||||
->where('type = ?', $type);
|
||||
$result = $this->getAdapter()->fetchAll($sql);
|
||||
return ($result);
|
||||
}
|
||||
}
|
||||
?>
|
118
application/modules/default/controllers/AideController.php
Normal file
118
application/modules/default/controllers/AideController.php
Normal file
@ -0,0 +1,118 @@
|
||||
<?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
|
||||
*/
|
||||
public function newAction()
|
||||
{
|
||||
$nbNewsMax = 5;
|
||||
$nbJourGlisssant = 5;
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
$date = $user->getDateDerniereConnexion();
|
||||
$nouveautes = array();
|
||||
if ( $date!=null || $date!='0000-00-00 00:00:00' )
|
||||
{
|
||||
$time = mktime(0, 0, 0, date('m'), date('d')-$nbJourGlisssant, date('Y'));
|
||||
$dateglissant = date('Y-m-d', $time);
|
||||
$now = date('Y-m-d');
|
||||
|
||||
$nouveautesM = new Application_Model_Nouveautes();
|
||||
$sql = $nouveautesM->select()
|
||||
->where("date>='".$dateglissant."' AND date<='".$now."'")
|
||||
->order('date DESC')
|
||||
->limit($nbNewsMax);
|
||||
$nouveautes = $nouveautesM->fetchAll($sql);
|
||||
}
|
||||
$this->view->assign('nouveautes', $nouveautes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Afficher la liste des nouveautés
|
||||
*/
|
||||
public function newlisteAction()
|
||||
{
|
||||
$this->view->headTitle()->prepend('Nouveautés');
|
||||
|
||||
$request = $this->getRequest();
|
||||
|
||||
//Selection
|
||||
$nouveautesM = new Application_Model_Nouveautes();
|
||||
$sql = $nouveautesM->select()
|
||||
->from('nouveautes', array('categorie', 'intitule', "date", 'fichier'))
|
||||
->order('date DESC');
|
||||
$nouveautes = $nouveautesM->fetchAll($sql);
|
||||
$this->view->assign('nouveautes', $nouveautes);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Affichage et validation de "cgu"
|
||||
* Conditions d’accès à l'extranet
|
||||
*/
|
||||
public function cguAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$request = $this->getRequest();
|
||||
|
||||
$accept = $request->getParam('accept', 0);
|
||||
|
||||
if ( $accept == 1 ) {
|
||||
require_once 'Scores/WsScores.php';
|
||||
$ws = new WsScores();
|
||||
$accept = $ws->setCGU();
|
||||
$this->logger->info($accept);
|
||||
if ($accept) {
|
||||
//Put in session
|
||||
$auth = Zend_Auth::getInstance();
|
||||
$identity = $auth->getIdentity();
|
||||
$identity->acceptationCGU = date('Y-m-d H:i:s');
|
||||
$auth->getStorage()->write($identity);
|
||||
//Redirect
|
||||
$this->redirect('/');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Afficher des propriétés du navigateur
|
||||
* Compatibilités et version
|
||||
*/
|
||||
public function navinfoAction()
|
||||
{
|
||||
$bootstrap = $this->getInvokeArg('bootstrap');
|
||||
$userAgent = $bootstrap->getResource('useragent');
|
||||
|
||||
$device = $userAgent->getDevice();
|
||||
|
||||
echo $device->getFeature('browser_compatibility').'<br/>';
|
||||
echo $device->getFeature('browser_version').'<br/>';
|
||||
|
||||
echo "<pre>";
|
||||
print_r($device);
|
||||
echo "</pre>";
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
}
|
276
application/modules/default/controllers/AuthController.php
Normal file
276
application/modules/default/controllers/AuthController.php
Normal 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
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
1102
application/modules/default/controllers/DashboardController.php
Normal file
1102
application/modules/default/controllers/DashboardController.php
Normal file
File diff suppressed because it is too large
Load Diff
138
application/modules/default/controllers/DirigeantController.php
Normal file
138
application/modules/default/controllers/DirigeantController.php
Normal 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());
|
||||
}
|
||||
}
|
107
application/modules/default/controllers/ErrorController.php
Normal file
107
application/modules/default/controllers/ErrorController.php
Normal file
@ -0,0 +1,107 @@
|
||||
<?php
|
||||
class ErrorController 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 errorAction()
|
||||
{
|
||||
$params = $this->getRequest()->getParams();
|
||||
$unknow = array('MSOffice', '_vti_bin', 'crossdomain.xml');
|
||||
if (in_array($params['controller'], $unknow)){
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
echo '';
|
||||
} else {
|
||||
|
||||
$errors = $this->_getParam('error_handler');
|
||||
switch ($errors->type) {
|
||||
case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ROUTE:
|
||||
case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:
|
||||
case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:
|
||||
|
||||
// 404 error -- controller or action not found
|
||||
$this->getResponse()->setHttpResponseCode(404);
|
||||
$this->view->message = 'Page not found';
|
||||
break;
|
||||
|
||||
default:
|
||||
// application error
|
||||
$this->getResponse()->setHttpResponseCode(500);
|
||||
$this->view->message = 'Application error';
|
||||
break;
|
||||
}
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
|
||||
//Envoyer les erreurs par mail
|
||||
if (APPLICATION_ENV != 'development') {
|
||||
$message = '';
|
||||
$message.= 'Erreur Applicative : ';
|
||||
$message.= "\n";
|
||||
$message.= 'Message : '.$errors->exception->getMessage();
|
||||
$message.= "\n";
|
||||
$message.= 'Utilisateur : '.$user->getLogin();
|
||||
$message.= "\n";
|
||||
$message.= "File :".$errors->exception->getFile().", Ligne : ".$errors->exception->getLine();
|
||||
$message.= "\n";
|
||||
$message.= "Detail :\n".$errors->exception->getTraceAsString();
|
||||
$message.= "\n\n";
|
||||
$message.= "Request Parameters :\n ".print_r($this->getRequest()->getParams(), true)."\n";
|
||||
|
||||
$message.= "Referer : ".$_SERVER['HTTP_REFERER']."\n";
|
||||
|
||||
$c = Zend_Registry::get('config');
|
||||
$mail = new Scores_Mail_Method();
|
||||
$mail->setSubject('[ERREUR APPLICATIVE] - '.$c->profil->server->name.' -'.date('Ymd'));
|
||||
$mail->setBodyText($message);
|
||||
$mail->setFromKey('support');
|
||||
$mail->addToKey('supportdev');
|
||||
$mail->execute();
|
||||
}
|
||||
// Log exception, if logger available
|
||||
if ($log = $this->getLog()) {
|
||||
$log->crit($this->view->message, $errors->exception);
|
||||
}
|
||||
|
||||
// conditionally display exceptions
|
||||
if ($this->getInvokeArg('displayExceptions') == true) {
|
||||
$this->view->exception = $errors->exception;
|
||||
}
|
||||
|
||||
$this->view->request = $errors->request;
|
||||
}
|
||||
}
|
||||
|
||||
public function soapAction(){}
|
||||
|
||||
public function permsAction(){}
|
||||
|
||||
public function paramsAction(){}
|
||||
|
||||
public function getLog()
|
||||
{
|
||||
$bootstrap = $this->getInvokeArg('bootstrap');
|
||||
if (!$bootstrap->hasPluginResource('Log')) {
|
||||
return false;
|
||||
}
|
||||
$log = $bootstrap->getResource('Log');
|
||||
return $log;
|
||||
}
|
||||
}
|
||||
|
1096
application/modules/default/controllers/EvaluationController.php
Normal file
1096
application/modules/default/controllers/EvaluationController.php
Normal file
File diff suppressed because it is too large
Load Diff
1461
application/modules/default/controllers/FinanceController.php
Normal file
1461
application/modules/default/controllers/FinanceController.php
Normal file
File diff suppressed because it is too large
Load Diff
447
application/modules/default/controllers/GiantController.php
Normal file
447
application/modules/default/controllers/GiantController.php
Normal 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];
|
||||
}
|
||||
}
|
2342
application/modules/default/controllers/IdentiteController.php
Normal file
2342
application/modules/default/controllers/IdentiteController.php
Normal file
File diff suppressed because it is too large
Load Diff
131
application/modules/default/controllers/IndexController.php
Normal file
131
application/modules/default/controllers/IndexController.php
Normal 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;
|
||||
}
|
||||
}
|
||||
|
701
application/modules/default/controllers/JuridiqueController.php
Normal file
701
application/modules/default/controllers/JuridiqueController.php
Normal 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);
|
||||
}
|
||||
|
||||
}
|
@ -1,37 +1,50 @@
|
||||
<?php
|
||||
<?php
|
||||
class LogoController extends Zend_Controller_Action
|
||||
{
|
||||
protected $pathLogo = '';
|
||||
|
||||
protected $theme;
|
||||
protected $pathLogo = '';
|
||||
|
||||
/**
|
||||
* Logger
|
||||
* @var \Monolog\Logger
|
||||
*/
|
||||
protected $logger;
|
||||
|
||||
public function init()
|
||||
{
|
||||
$configuration = Zend_Registry::get('configuration');
|
||||
$path = $configuration->path;
|
||||
$this->pathLogo = $path->data.'/'.$path->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();
|
||||
$request = $this->getRequest();
|
||||
$siren = $request->getParam('siren', '');
|
||||
$isin = $request->getParam('isin', '');
|
||||
$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 )
|
||||
if ( !empty($siren) && isset($_FILES['file']) && $_FILES['file']['error']!=UPLOAD_ERR_NO_FILE )
|
||||
{
|
||||
$logoFile = $_FILES['file'];
|
||||
$tmp_file = $logoFile['tmp_name'];
|
||||
@ -67,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':
|
||||
@ -123,17 +136,17 @@ class LogoController extends Zend_Controller_Action
|
||||
$this->view->assign('isPost', true);
|
||||
} else {
|
||||
$this->view->assign('image', $image);
|
||||
}
|
||||
}
|
||||
$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);
|
||||
@ -197,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 {
|
||||
@ -295,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'] )
|
||||
{
|
||||
@ -308,12 +323,12 @@ class LogoController extends Zend_Controller_Action
|
||||
}
|
||||
}
|
||||
} else {
|
||||
saisie_getlogo($siren);
|
||||
$this->_getlogo($siren);
|
||||
}
|
||||
}
|
||||
return $message;
|
||||
}
|
||||
|
||||
|
||||
function _saveimg( $siren )
|
||||
{
|
||||
$message = '';
|
||||
@ -350,7 +365,7 @@ class LogoController extends Zend_Controller_Action
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
function _findlogo( $siren, $isin = '' )
|
||||
{
|
||||
$img = '';
|
||||
@ -373,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) ) {
|
||||
@ -388,7 +403,7 @@ class LogoController extends Zend_Controller_Action
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Recherche image sur base isin
|
||||
if ( $urlImg == '' && $isin != '' ) {
|
||||
$locImg = PATH_LOGOS . $isin;
|
||||
@ -399,7 +414,7 @@ class LogoController extends Zend_Controller_Action
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$output = '';
|
||||
//Redimensionnement
|
||||
if ( $urlImg != '' ) {
|
||||
@ -411,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) {}
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -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,32 +53,48 @@ 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('idMandataire', '');
|
||||
$idMandataire = $request->getParam('idMand', '');
|
||||
$tribunal = $request->getParam('tribunal', '');
|
||||
|
||||
|
||||
$ws = new WsScores();
|
||||
|
||||
|
||||
$this->logger->info('idMandataire : '.$idMandataire);
|
||||
|
||||
//Mode edition
|
||||
if ($idMandataire != '') {
|
||||
$idMandataire = (int)substr($idMandataire,1);
|
||||
$reponse = $ws->getMandataire($idMandataire);
|
||||
$this->logger->info(print_r($reponse,1));
|
||||
if ($reponse!==false) {
|
||||
$tabMandataires = $ws->result;
|
||||
$tabMandataires = json_decode($reponse, true);
|
||||
} else {
|
||||
$message = 'Une erreur est survenue durant la recherche de mandataire.';
|
||||
}
|
||||
@ -72,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
|
||||
*/
|
||||
@ -99,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"
|
||||
@ -108,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
|
||||
@ -153,8 +183,9 @@ class MandataireController extends Zend_Controller_Action
|
||||
foreach ($mandataires as $mandataire) {
|
||||
$tabResults[$i]['code'] = $mandataire->id;
|
||||
$tabResults[$i]['lib'] = htmlspecialchars_decode(
|
||||
html_entity_decode($mandataire->mand), ENT_QUOTES);
|
||||
|
||||
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++;
|
||||
@ -166,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(
|
||||
@ -177,7 +208,7 @@ class MandataireController extends Zend_Controller_Action
|
||||
}
|
||||
echo json_encode($output);
|
||||
}
|
||||
|
||||
|
||||
public function getAction()
|
||||
{
|
||||
$this->_helper->layout->disableLayout();
|
||||
@ -186,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',
|
||||
@ -194,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){
|
||||
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']==''){
|
||||
@ -238,35 +269,36 @@ 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;}
|
||||
if($tabMandataires['coursAppel']==''){$fields[] ='Cours d\'appel'; $error = true;}
|
||||
if($tabMandataires['Statut']==''){$fields[] ='Statut'; $error = true;}
|
||||
if($tabMandataires['adresse']==''){$fields[] ='Adresse'; $error = true;}
|
||||
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) ?
|
||||
@ -274,7 +306,7 @@ class MandataireController extends Zend_Controller_Action
|
||||
html_entity_decode($value, ENT_QUOTES);
|
||||
return $value;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
235
application/modules/default/controllers/OrderController.php
Normal file
235
application/modules/default/controllers/OrderController.php
Normal 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
|
||||
|
||||
}
|
||||
|
||||
}
|
1266
application/modules/default/controllers/PiecesController.php
Normal file
1266
application/modules/default/controllers/PiecesController.php
Normal file
File diff suppressed because it is too large
Load Diff
@ -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,32 +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);
|
||||
|
||||
if (!file_exists(APPLICATION_PATH.'/../cache/pages/'.$fichier.'.html'))
|
||||
|
||||
$c = Zend_Registry::get('config');
|
||||
$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(APPLICATION_PATH.'/../cache/pages/'.$fichier.'.html');
|
||||
|
||||
$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)
|
||||
@ -167,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
|
||||
@ -179,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){
|
||||
@ -192,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
|
||||
*/
|
||||
@ -204,20 +232,22 @@ 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;
|
||||
}
|
||||
|
||||
if (!file_exists(APPLICATION_PATH.'/../cache/pagesxml/'.$fichier)){
|
||||
|
||||
$c = Zend_Registry::get('config');
|
||||
$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();
|
||||
echo file_get_contents(APPLICATION_PATH.'/../cache/pagesxml/'.$fichier);
|
||||
echo file_get_contents($file);
|
||||
}
|
||||
}
|
1235
application/modules/default/controllers/RechercheController.php
Normal file
1235
application/modules/default/controllers/RechercheController.php
Normal file
File diff suppressed because it is too large
Load Diff
2990
application/modules/default/controllers/SaisieController.php
Normal file
2990
application/modules/default/controllers/SaisieController.php
Normal file
File diff suppressed because it is too large
Load Diff
1214
application/modules/default/controllers/SurveillanceController.php
Normal file
1214
application/modules/default/controllers/SurveillanceController.php
Normal file
File diff suppressed because it is too large
Load Diff
@ -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.";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
759
application/modules/default/controllers/UserController.php
Normal file
759
application/modules/default/controllers/UserController.php
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
342
application/modules/default/controllers/WorldcheckController.php
Normal file
342
application/modules/default/controllers/WorldcheckController.php
Normal 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);
|
||||
}
|
||||
}
|
@ -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');
|
@ -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>
|
@ -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>
|
@ -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>
|
||||
|
@ -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"> © <?=date('Y')?> <a href="http://www.scores-decisions.com">Scores & Décisions SAS</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php echo $this->inlineScript(); ?>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -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 & 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"> © <?=date('Y')?> <a href="http://www.scores-decisions.com">Scores & Décisions SAS</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php echo $this->inlineScript(); ?>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -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>
|
@ -0,0 +1,526 @@
|
||||
<style type="text/css">
|
||||
.close { display: none; }
|
||||
.open { display: block; }
|
||||
.field span { display:inline; }
|
||||
fieldset { margin:10px 0;}
|
||||
fieldset legend { font-weight:bold; font-size: 108%; padding:0; }
|
||||
div.submit { clear: both; text-align: center; }
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
|
||||
$('.menu-close').click(function(){
|
||||
$('div.blockh2').css('display','none');
|
||||
$(this).next('div.blockh2').css('display','block');
|
||||
});
|
||||
|
||||
$('a#addIp').click(function(e){
|
||||
e.preventDefault();
|
||||
var text = $('div.formip').html();
|
||||
var title = $(this).html();
|
||||
var dialogOpts = {
|
||||
bgiframe: true,
|
||||
title: title,
|
||||
width: 250,
|
||||
height: 130,
|
||||
modal: true,
|
||||
open: function(event, ui) { $(this).html(text); },
|
||||
buttons: {
|
||||
'Ajouter' : function() {
|
||||
var select1 = $('#formip input[name=ip0]').val()+'.'+
|
||||
$('#formip input[name=ip1]').val()+'.'+
|
||||
$('#formip input[name=ip2]').val()+'.'+
|
||||
$('#formip input[name=ip3]').val();
|
||||
var select2 = $('#formip input[name=ip4]').val()+'.'+
|
||||
$('#formip input[name=ip5]').val()+'.'+
|
||||
$('#formip input[name=ip6]').val()+'.'+
|
||||
$('#formip input[name=ip7]').val();
|
||||
VerifIp = new RegExp('^([0-9]{1,3}\.){3}[0-9]{1,3}$');
|
||||
if ( (VerifIp.test(select1) && VerifIp.test(select2)) || (VerifIp.test(select1) && select2=='...') ){
|
||||
var txt = $('input[name=filtres_ip]').val();
|
||||
if (select2=='...'){
|
||||
select = select1;
|
||||
} else {
|
||||
select = select1+'-'+select2;
|
||||
}
|
||||
(txt.length>0) ? txt = txt+';'+select : txt = select;
|
||||
var concat = '';
|
||||
var liste = txt.split(';');
|
||||
for (item in liste){
|
||||
concat = concat+liste[item]+' [<a href="#" class="deleteIP" id="'+liste[item]+'">Suppression</a>]<br/>';
|
||||
}
|
||||
$('input[name=filtres_ip]').val(txt);
|
||||
$('#listeip').html(concat);
|
||||
}
|
||||
$(this).dialog('close');
|
||||
},
|
||||
'Fermer': function() { $(this).dialog('close'); }
|
||||
},
|
||||
close: function() { $('div#formip').remove(); }
|
||||
};
|
||||
$('<div id="formip"></div>').dialog(dialogOpts);
|
||||
return false;
|
||||
});
|
||||
|
||||
$('body').delegate('.deleteIP', 'click', function(e){
|
||||
e.preventDefault();
|
||||
var select = $(this).attr('id');
|
||||
var txt = '';
|
||||
var concat = '';
|
||||
var strListe = $('input[name=filtres_ip]').val();
|
||||
strListe = strListe.substring(0, strListe.length-1);
|
||||
var liste = strListe.split(';');
|
||||
for (item in liste){
|
||||
if (liste[item]!=select){
|
||||
(txt.length>0) ? txt = txt+';'+liste[item] : txt = liste[item];
|
||||
concat = concat+liste[item]+' [<a href="#" class="deleteIP" id="'+liste[item]+'">Suppression</a>]<br/>';
|
||||
}
|
||||
}
|
||||
$('input[name=filtres_ip]').val(txt);
|
||||
$('#listeip').html(concat);
|
||||
});
|
||||
|
||||
$('input.checkskin[type=checkbox]').checkbox();
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<div id="center">
|
||||
|
||||
<h1><?=$this->titre?></h1>
|
||||
|
||||
<div class="formip" style="display: none;">
|
||||
<input type="text" maxlength="3" size="3" name="ip0" /> .
|
||||
<input type="text" maxlength="3" size="3" name="ip1" /> .
|
||||
<input type="text" maxlength="3" size="3" name="ip2" /> .
|
||||
<input type="text" maxlength="3" size="3" name="ip3" /> -
|
||||
<input type="text" maxlength="3" size="3" name="ip4" /> .
|
||||
<input type="text" maxlength="3" size="3" name="ip5" /> .
|
||||
<input type="text" maxlength="3" size="3" name="ip6" /> .
|
||||
<input type="text" maxlength="3" size="3" name="ip7" />
|
||||
</div>
|
||||
|
||||
<form name="client" method="post" action="<?=$this->url(array('controller'=>'dashboard', 'action'=>'clientsave'), null, true)?>">
|
||||
<input type="hidden" name="action" value="client" />
|
||||
<input type="hidden" name="idClient" value="<?=$this->idClient?>" />
|
||||
|
||||
<h2 class="menu-close">Identification</h2>
|
||||
<div class="blockh2 close">
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Nom</label>
|
||||
<div class="field">
|
||||
<input name="nom" type="text" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->nom : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Siren</label>
|
||||
<div class="field">
|
||||
<input name="siren" type="text" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->siren : '';?>" />
|
||||
<a href="#">Obtention Dénomination sociale</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Nic du siège</label>
|
||||
<div class="field">
|
||||
<input name="nic" type="text" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->nic : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Racine des identifiants</label>
|
||||
<div class="field">
|
||||
<input name="racineLogin" type="text" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->racineLogin: '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Test</label>
|
||||
<div class="field">
|
||||
<select name="test">
|
||||
<option value="Oui" <?php if ($this->InfosClient->test=='Oui') echo 'selected';?>>Oui</option>
|
||||
<option value="Non" <?php if ($this->InfosClient->test=='Non') echo 'selected';?>>Non</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Actif</label>
|
||||
<div class="field">
|
||||
<select name="actif">
|
||||
<option value="Oui" <?php if ($this->InfosClient->actif=='Oui') echo 'selected';?>>Oui</option>
|
||||
<option value="Non" <?php if ($this->InfosClient->actif=='Non') echo 'selected';?>>Non</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Date de signature</label>
|
||||
<div class="field">
|
||||
<input name="dateSignature" type="text" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->dateSignature : '';?>" />
|
||||
(AAAA-MM-YY)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Type de contrat</label>
|
||||
<div class="field">
|
||||
<select name="typeContrat">
|
||||
<option value="Contrat" <?php if ($this->InfosClient->typeContrat=='Contrat') echo 'selected';?>>Contrat</option>
|
||||
<option value="Marché" <?php if ($this->InfosClient->typeContrat=='Marché') echo 'selected';?>>Marché</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Commercial S&D</label>
|
||||
<div class="field">
|
||||
<input name="respComSD" type="text" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->respComSD : '';?>" disabled />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Nom de l'apporteur d'affaire</label>
|
||||
<div class="field">
|
||||
<input name="apporteurAffaire" type="text" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->apporteurAffaire: '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Type d'accès</label>
|
||||
<div class="field">
|
||||
<select name="typeAcces">
|
||||
<option value="userPassword" <?php if ($this->InfosClient->typeAcces=='userPassword') echo 'selected';?>>userPassword</option>
|
||||
<option value="userPasswordIP" <?php if ($this->InfosClient->typeAcces=='userPasswordIP') echo 'selected';?>>userPasswordIP</option>
|
||||
<option value="IP" <?php if ($this->InfosClient->typeAcces=='IP') echo 'selected';?>>IP</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Remarques / Observations</label>
|
||||
<div class="field">
|
||||
<textarea name="remarque">
|
||||
<?php echo isset($this->InfosClient) ? $this->InfosClient->remarque : '';?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2 class="menu-close">Facturation</h2>
|
||||
<div class="blockh2 close">
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>N° de TVA</label>
|
||||
<div class="field">
|
||||
<input name="tva" type="text" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->tva : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Compte client rattaché</label>
|
||||
<div class="field">
|
||||
<input name="xxxx" type="text" value="" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Editer la facture automatiquement</label>
|
||||
<div class="field">
|
||||
<select name="editerFacture">
|
||||
<option value="Oui" <?php if ($this->InfosClient->editerFacture=='Oui') echo 'selected';?>>Oui</option>
|
||||
<option value="Non" <?php if ($this->InfosClient->editerFacture=='Non') echo 'selected';?>>Non</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Editer le détail de la facture</label>
|
||||
<div class="field">
|
||||
<select name="fact_detail">
|
||||
<option value="Oui" <?php if ($this->InfosClient->editerFacture=='Oui') echo 'selected';?>>Oui</option>
|
||||
<option value="Non" <?php if ($this->InfosClient->fact_detail=='Non') echo 'selected';?>>Non</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Nom du destinataire de la facture</label>
|
||||
<div class="field">
|
||||
<input name="fac_dest" type="text" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->fac_dest : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Adresse1</label>
|
||||
<div class="field">
|
||||
<input name="fac_adr1" type="text" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->fac_adr1 : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Adresse2</label>
|
||||
<div class="field">
|
||||
<input name="fac_adr2" type="text" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->fac_adr2 : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Adresse3</label>
|
||||
<div class="field">
|
||||
<input name="fac_adr3" type="text" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->fac_adr3 : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Email</label>
|
||||
<div class="field">
|
||||
<input name="fac_email" type="text" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->fac_email : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Téléphone</label>
|
||||
<div class="field">
|
||||
<input name="fac_tel" type="text" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->fac_tel : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>RIB joint à la facture</label>
|
||||
<div class="field">
|
||||
<select name="fact_rib">
|
||||
<option value="BPOSTALE" <?php if ($this->InfosClient->fact_rib=='BPOSTALE') echo 'selected';?>>BPOSTALE</option>
|
||||
<option value="CCOOP" <?php if ($this->InfosClient->fact_rib=='CCOOP') echo 'selected';?>>CCOOP</option>
|
||||
<option value="CDNORD" <?php if ($this->InfosClient->fact_rib=='CDNORD') echo 'selected';?>>CDNORD</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<h2 class="menu-close">Livraison : Informations sur le destinataire de la livraison</h2>
|
||||
<div class="blockh2 close">
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Nom</label>
|
||||
<div class="field">
|
||||
<input name="liv_dest" type="text" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->liv_dest : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Adresse1</label>
|
||||
<div class="field">
|
||||
<input name="liv_adr1" type="text" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->liv_adr1 : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Adresse2</label>
|
||||
<div class="field">
|
||||
<input name="liv_adr2" type="text" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->liv_adr2 : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Adresse3</label>
|
||||
<div class="field">
|
||||
<input name="liv_adr3" type="text" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->liv_adr3 : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Email</label>
|
||||
<div class="field">
|
||||
<input name="liv_email" type="text" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->liv_email : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Téléphone</label>
|
||||
<div class="field">
|
||||
<input name="liv_tel" type="text" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->liv_tel : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<h2 class="menu-close">Paramétrage</h2>
|
||||
<div class="blockh2 close">
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>IndiScore</label>
|
||||
<div class="field">
|
||||
<select name="typeScore">
|
||||
<option value="100" <?php if ($this->InfosClient->typeScore=='100') echo 'selected';?>>100</option>
|
||||
<option value="20" <?php if ($this->InfosClient->typeScore=='20') echo 'selected';?>>20</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Liste des adresses IP</label>
|
||||
<div class="field">
|
||||
<?php
|
||||
$text_ip = '';
|
||||
$filtres_ip = '';
|
||||
if (isset($this->InfosClient) && !empty($this->InfosClient->filtres_ip)){
|
||||
$ips = explode(';',$this->InfosClient->filtres_ip);
|
||||
foreach ($ips as $ip){
|
||||
$filtres_ip.= $ip.';';
|
||||
$text_ip.= $ip.' [<a href="#" class="deleteIP" id="'.$ip.'">Suppression</a>]<br/>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<input type="hidden" name="filtres_ip" value="<?php echo $filtres_ip?>">
|
||||
<span id="listeip">
|
||||
<?php
|
||||
if (!empty($text_ip)){
|
||||
echo $text_ip;
|
||||
} else {
|
||||
echo "Aucune IPs.";
|
||||
}
|
||||
?> </span> <br /> <a href="#" id="addIp">Ajouter une adresse IP</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Listes des Droits</label>
|
||||
<div class="field">
|
||||
<?php $listedroits = explode(' ', $this->InfosClient->droits); ?>
|
||||
<?php foreach($this->wscategory as $category) { ?>
|
||||
<fieldset>
|
||||
<legend><?=$category->desc?></legend>
|
||||
<?php foreach($category->droits->item as $droit) {
|
||||
$check = '';
|
||||
if (in_array(strtolower($droit), $listedroits)) {
|
||||
$check = ' checked';
|
||||
}
|
||||
?>
|
||||
<input class="checkskin" type="checkbox" name="droits[]" value="<?=strtolower($droit)?>"<?=$check?>/>
|
||||
<?=$this->wsdroits[$droit]?><br/>
|
||||
<?php } ?>
|
||||
</fieldset>
|
||||
<?php }?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Timeout</label>
|
||||
<div class="field">
|
||||
<input type="text" name="timeout" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->timeout : '3600';?>" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2 class="menu-close">Tarification</h2>
|
||||
<div class="blockh2 close">
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>forfaitExtranetPeriode</label>
|
||||
<div class="field">
|
||||
<select name="forfaitExtranetPeriode">
|
||||
<option value="Mensuel" <?php if ($this->InfosClient->forfaitExtranetPeriode=='Mensuel') echo 'selected';?>>Mensuel</option>
|
||||
<option value="Trimestriel" <?php if ($this->InfosClient->forfaitExtranetPeriode=='Trimestriel') echo 'selected';?>>Trimestriel</option>
|
||||
<option value="Semestriel" <?php if ($this->InfosClient->forfaitExtranetPeriode=='Semestriel') echo 'selected';?>>Semestriel</option>
|
||||
<option value="Annuel" <?php if ($this->InfosClient->forfaitExtranetPeriode=='Annuel') echo 'selected';?>>Annuel</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>forfaitExtranetMontant</label>
|
||||
<div class="field">
|
||||
<input type="text" name="forfaitExtranetMontant" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->forfaitExtranetMontant : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>reconductionAuto</label>
|
||||
<div class="field">
|
||||
<select name="reconductionAuto">
|
||||
<option value="Oui" <?php if ($this->InfosClient->reconductionAuto=='Oui') echo 'selected';?>>Oui</option>
|
||||
<option value="Non" <?php if ($this->InfosClient->reconductionAuto=='Non') echo 'selected';?>>Non</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Nombre de pièces officielles inclues dans le forfait client</label>
|
||||
<div class="field">
|
||||
<input type="text" name="forfaitPiecesNb" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->forfaitPiecesNb : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Montant du forfait des pièces officielles</label>
|
||||
<div class="field">
|
||||
<input type="text" name="forfaitPiecesMt" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->forfaitPiecesMt : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Tarif unitaire en cas de dépassement</label>
|
||||
<div class="field">
|
||||
<input type="text" name="forfaitPiecesDep" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->forfaitPiecesDep : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Montant du forfait des investigations</label>
|
||||
<div class="field">
|
||||
<input type="text" name="forfaitInvestigMt" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->forfaitInvestigMt : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Tarif unitaire pour les indiscore</label>
|
||||
<div class="field">
|
||||
<input type="text" name="tarifIndiscore" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->tarifIndiscore : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<h2 class="menu-close">Divers</h2>
|
||||
<div class="blockh2 close">
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Accès Webservice</label>
|
||||
<div class="field">
|
||||
<input type="text" name="accesWS" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->accesWS : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Intersud - Login</label>
|
||||
<div class="field">
|
||||
<input type="text" name="InterSudLogin" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->InterSudLogin : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Intersud - Mot de passe</label>
|
||||
<div class="field">
|
||||
<input type="text" name="InterSudPass" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->InterSudPass : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="submit">
|
||||
<p class="submit-button">
|
||||
<input type="submit" class="button" value="<?php echo $this->submitValue?>" />
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
@ -0,0 +1,85 @@
|
||||
<style type="text/css">
|
||||
#utilisateur { border-collapse:collapse; width:100%;}
|
||||
#utilisateur tr.titre td { background-color: #D9EEF1; font-weight:bold; }
|
||||
#utilisateur tr.border td { border:1px dashed #939393; padding:5px; margin:0; vertical-align:top; }
|
||||
#utilisateur tr.bordertop td { border:1px dashed #939393; border-top:1px solid; padding:5px; margin:0; vertical-align:top; }
|
||||
#utilisateur tr.borderbottom td { border:1px dashed #939393; border-bottom:1px solid; padding:5px; margin:0; vertical-align:top; }
|
||||
#utilisateur tr.actif { background-color:#D9EEF1; }
|
||||
#utilisateur tr.noactif { background-color:#F0F0F6; }
|
||||
.cadreinfo {display:none;}
|
||||
</style>
|
||||
|
||||
<div id="center">
|
||||
|
||||
<h1>GESTION DES CLIENTS</h1>
|
||||
<div class="paragraph">
|
||||
<a href="<?=$this->url(array('action'=>'client'))?>">Créer un client</a>
|
||||
</div>
|
||||
|
||||
<h2>Liste des clients</h2>
|
||||
<div class="paragraph">
|
||||
<table id="utilisateur" >
|
||||
<tr class="border titre">
|
||||
<td class="StyleInfoLib">Nom</td>
|
||||
<td class="StyleInfoLib">Actions</td>
|
||||
</tr>
|
||||
<?php
|
||||
if (count($this->ListeClients) > 0) {
|
||||
foreach ($this->ListeClients as $cl) {
|
||||
if ($cl->actif == 'Oui') {
|
||||
$class = 'actif';
|
||||
} else {
|
||||
$class = 'noactif';
|
||||
}
|
||||
?>
|
||||
<tr class="bordertop <?=$class?>">
|
||||
<td><?=$cl->nom?></td>
|
||||
<td>
|
||||
|
||||
<div>
|
||||
<div>
|
||||
<button class="action">Action</button>
|
||||
<button class="select">Select an action</button>
|
||||
</div>
|
||||
<ul style="position:absolute;z-index:1;">
|
||||
<?php if ($cl->actif == 'Oui') {?>
|
||||
<li><a href="<?=$this->url(array('controller'=>'dashboard','action'=>'client','idClient'=>$cl->idClient),null,true)?>">Editer</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="<?=$this->url(array('controller'=>'dashboard','action'=>'prestations','idClient'=>$cl->idClient),null,true)?>">Prestations fichier</a></li>
|
||||
<li><a href="<?=$this->url(array('controller'=>'dashboard','action'=>'tarifs','idClient'=>$cl->idClient),null,true)?>">Tarification</a></li>
|
||||
<li><a href="<?=$this->url(array('controller'=>'dashboard','action'=>'services','idClient'=>$cl->idClient),null,true)?>">Services</a></li>
|
||||
<li><a href="<?=$this->url(array('controller'=>'dashboard','action'=>'users','idClient' => $cl->idClient),null,true)?>">Utilisateurs</a></li>
|
||||
<?php }?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
$( ".action" ).button().click(function() {
|
||||
alert( "Selectionner une action" );
|
||||
}).next().button({
|
||||
text: false,
|
||||
icons: { primary: "ui-icon-triangle-1-s" }
|
||||
}).click(function() {
|
||||
var menu = $( this ).parent().next().show().position({
|
||||
my: "left top",
|
||||
at: "left bottom",
|
||||
of: this
|
||||
});
|
||||
$( document ).one( "click", function() {
|
||||
menu.hide();
|
||||
});
|
||||
return false;
|
||||
}).parent().buttonset().next().hide().menu();
|
||||
</script>
|
@ -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%">
|
@ -0,0 +1,27 @@
|
||||
<div class="contrat">
|
||||
<div>Du <?=$contrat->dateBegin?> au <?=$contrat->dateEnd?></div>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Log</th>
|
||||
<th>Service</th>
|
||||
<th>Type</th>
|
||||
<th>Prix unitaire</th>
|
||||
<th>Limit</th>
|
||||
<th>Dédoublonnage</th>
|
||||
</tr>
|
||||
<?php foreach ($contrat->tarifs->item as $tarif ) {?>
|
||||
<tr>
|
||||
<td><?=$tarif->log?></td>
|
||||
<td><?=$tarif->service?></td>
|
||||
<td><?=$tarif->type?></td>
|
||||
<td><?=$tarif->priceUnit?></td>
|
||||
<td><?=$tarif->limit?></td>
|
||||
<td><?=$tarif->doublon?></td>
|
||||
</tr>
|
||||
<?php }?>
|
||||
</table>
|
||||
<div style="line-height:16px;">
|
||||
<a class="tarif-add" title="Ajouter un tarif" href="#">
|
||||
<img style="vertical-align:middle;" src="/themes/default/images/interfaces/ajouter.png" />Ajouter un tarif</a>
|
||||
</div>
|
||||
</div>
|
@ -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);
|
@ -0,0 +1,291 @@
|
||||
<style type="text/css">
|
||||
.close {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.open {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.fieldgrp {
|
||||
clear: both;
|
||||
width: 100%;
|
||||
margin-bottom: .5em;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.fieldgrp:after {
|
||||
content: ".";
|
||||
display: block;
|
||||
clear: both;
|
||||
visibility: hidden;
|
||||
line-height: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.fieldgrp label {
|
||||
font-weight: bold;
|
||||
margin-left: 30px;
|
||||
width: 180px;
|
||||
clear: both;
|
||||
padding: 0 10px 0 0;
|
||||
line-height: 22px;
|
||||
_padding-top: 3px;
|
||||
float: left;
|
||||
display: block;
|
||||
font-size: 108%;
|
||||
}
|
||||
|
||||
.field {
|
||||
width: 320px;
|
||||
float: left;
|
||||
padding: 0 10px 0 0;
|
||||
line-height: 22px;
|
||||
_padding-top: 3px;
|
||||
}
|
||||
|
||||
.field .longfield {
|
||||
width: 215px;
|
||||
}
|
||||
|
||||
.field .longfield-select {
|
||||
width: 220px;
|
||||
}
|
||||
|
||||
.field .smallfield {
|
||||
width: 95px;
|
||||
}
|
||||
|
||||
.field .medfield {
|
||||
width: 110px;
|
||||
}
|
||||
|
||||
.field input,.field select {
|
||||
font-size: 110%;
|
||||
margin: 2px 0;
|
||||
}
|
||||
|
||||
.field input[type="radio"] {
|
||||
margin: 0 5px 0 5px;
|
||||
}
|
||||
|
||||
fieldset { margin:10px 0;}
|
||||
fieldset legend { font-weight:bold; font-size: 108%; }
|
||||
|
||||
div.submit {
|
||||
clear: both;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="center">
|
||||
<h1>Prestations fichier client (idClient=<?=$this->idClient?>)</h1>
|
||||
<div class="paragraph">
|
||||
|
||||
<form>
|
||||
<input type="hidden" name="idClient" value="<?=$this->idClient?>"/>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Type de prestation : </label>
|
||||
<div class="field">
|
||||
<select name="typeprestation">
|
||||
<option>-</option>
|
||||
<option value="Diffusion">Diffusion</option>
|
||||
<option value="Surveillance">Surveillance</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Source</label>
|
||||
<div class="field">
|
||||
<select name="source">
|
||||
<option>-</option>
|
||||
<option value="Bodacc">Bodacc</option>
|
||||
<option value="Insee">Insee</option>
|
||||
<option value="Rncs">Rncs</option>
|
||||
<option value="Bilans">Bilans</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Date de mise en place</label>
|
||||
<div class="field">
|
||||
<input type="text" name="datemiseenplace" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Date première facture</label>
|
||||
<div class="field">
|
||||
<input type="text" name="datepremierefacture" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Fréquence de facturation (en mois)</label>
|
||||
<div class="field">
|
||||
<select name="freqfacturation">
|
||||
<option value="Unitaire">Unitaire</option>
|
||||
<option value="Quotidien">Quotidien</option>
|
||||
<option value="Hebdo">Hebdo</option>
|
||||
<option value="Mensuel">Mensuel</option>
|
||||
<option value="Trimestriel">Trimestriel</option>
|
||||
<option value="Semestriel">Semestriel</option>
|
||||
<option value="Annuel">Annuel</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Date de fin</label>
|
||||
<div class="field">
|
||||
<input type="text" name="datefinprestation" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Test</label>
|
||||
<div class="field">
|
||||
<select name="prestatest">
|
||||
<option value="0">Non</option>
|
||||
<option value="1">Oui</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Identifiant</label>
|
||||
<div class="field">
|
||||
<input type="text" name="identifiantPrestation" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Password</label>
|
||||
<div class="field">
|
||||
<input type="text" name="passwordprestation" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Support de livraison</label>
|
||||
<div class="field">
|
||||
<select name="supportprestation">
|
||||
<option value="FTP">FTP</option>
|
||||
<option value="Email">EMAIL</option>
|
||||
<option value="CD/DVD">CD/DVD</option>
|
||||
<option value="CFT">CFT</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Identifiant CFT</label>
|
||||
<div class="field">
|
||||
<input type="text" name="identifiantCFT" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Durée du contrat</label>
|
||||
<div class="field">
|
||||
<input type="text" name="dureecontrat" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Montant annuel facturation</label>
|
||||
<div class="field">
|
||||
<input type="text" name="montantannuelfact" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Fréquence des envois</label>
|
||||
<div class="field">
|
||||
<select name="freqenvois">
|
||||
<option value="Unitaire">Unitaire</option>
|
||||
<option value="Quotidien">Quotidien</option>
|
||||
<option value="Hebdo">Hebdo</option>
|
||||
<option value="Mensuel">Mensuel</option>
|
||||
<option value="Trimestriel">Trimestriel</option>
|
||||
<option value="Semestriel">Semestriel</option>
|
||||
<option value="Annuel">Annuel</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Options (format INI)</label>
|
||||
<div class="field">
|
||||
<textarea name="optionsprestation"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Active</label>
|
||||
<div class="field">
|
||||
<select name="prestationactive">
|
||||
<option value="oui">Oui</option>
|
||||
<option value="non">Non</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Options support (format INI)</label>
|
||||
<div class="field">
|
||||
<textarea name="optionssupport"></textarea>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Main d'info fichier entrant</label>
|
||||
<div class="field">
|
||||
<input type="text" name="mailIN" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Main d'info fichier sortant</label>
|
||||
<div class="field">
|
||||
<input type="text" name="mailOUT" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>osClient</label>
|
||||
<div class="field">
|
||||
<select name="osClient">
|
||||
<option value="WINDOWS">WINDOWS</option>
|
||||
<option value="LINUX">LINUX</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Compression</label>
|
||||
<div class="field">
|
||||
<select name="compression">
|
||||
<option value="none">none</option>
|
||||
<option value="zip">zip</option>
|
||||
<option value="gzip">gzip</option>
|
||||
<option value="bzip2">bzip2</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="submit">
|
||||
<p class="submit-button">
|
||||
<input type="submit" class="button" value="<?=$this->submitValue?>" />
|
||||
</p>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
@ -0,0 +1,55 @@
|
||||
<style type="text/css">
|
||||
#utilisateur { border-collapse:collapse; width:100%;}
|
||||
#utilisateur tr.titre td { background-color: #D9EEF1; font-weight:bold; }
|
||||
#utilisateur tr.border td {
|
||||
border:1px dashed #939393; padding:5px; margin:0; vertical-align:top; }
|
||||
#utilisateur tr.actif { background-color:#D9EEF1; }
|
||||
#utilisateur tr.noactif { background-color:#F0F0F6; }
|
||||
.cadreinfo {display:none;}
|
||||
</style>
|
||||
<div id="center">
|
||||
<h1>Prestations fichier client (idClient=<?=$this->idClient?>)</h1>
|
||||
<div class="paragraph">
|
||||
<a href="<?=$this->url(array('controller'=>'dashboard','action'=>'prestation'))?>">Ajouter une prestation</a>
|
||||
</div>
|
||||
|
||||
<h2>Liste</h2>
|
||||
<div class="paragraph">
|
||||
<?php if (count($this->prestations) > 0) { ?>
|
||||
<table id="utilisateur" >
|
||||
<tr class="border titre">
|
||||
<td class="StyleInfoLib">Nom</td>
|
||||
<td class="StyleInfoLib">Type</td>
|
||||
<td class="StyleInfoLib">Debut</td>
|
||||
<td class="StyleInfoLib">Fin</td>
|
||||
<td class="StyleInfoLib"></td>
|
||||
</tr>
|
||||
<?php
|
||||
foreach ($this->prestations as $prestation) {
|
||||
if ($prestation->active == 'Oui') {
|
||||
$class = 'actif';
|
||||
} else {
|
||||
$class = 'noactif';
|
||||
}
|
||||
?>
|
||||
<tr class="border <?=$class?>">
|
||||
<td><?=$prestation->identifiant?></td>
|
||||
<td><?=$prestation->type?></td>
|
||||
<td><?=$prestation->dateDebut?></td>
|
||||
<td><?=$prestation->dateFin?></td>
|
||||
<td><?php if ($prestation->active == 'Oui') { ?>
|
||||
<a href="<?=$this->url(array('controller'=>'dashboard','action'=>'prestation','id'=>$prestation->id))?>">
|
||||
<img src="/themes/default/images/interfaces/editer_trans.png" title="Editer" width="16" height="16"/>
|
||||
</a><?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
?>
|
||||
Aucune prestation.
|
||||
<?php }?>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
@ -0,0 +1,47 @@
|
||||
<div id="center">
|
||||
|
||||
<h1>Ajout d'un service</h1>
|
||||
|
||||
<?php if ($this->message) {?>
|
||||
|
||||
<?=$this->message?>
|
||||
|
||||
<?php } else {?>
|
||||
|
||||
<form method="post" action="<?=$this->url(array('controller'=>'dashboard','action'=>'service'),null,true)?>">
|
||||
<div class="paragraph">
|
||||
|
||||
<input type="hidden" name="idClient" value="<?=$this->idClient?>"/>
|
||||
Code <input type="text" name="code" value="<?=$this->code?>" />,
|
||||
Libellé <input type="text" name="label" value="<?=$this->label?>" />
|
||||
|
||||
<div class="infoTitle StyleInfoLib">Droits d'accès</div>
|
||||
<div class="infoData">
|
||||
<?php foreach($this->wscategory as $category) {?>
|
||||
<fieldset>
|
||||
<legend><?=$category->desc?></legend>
|
||||
<?php
|
||||
foreach($category->droits->item as $droit) {
|
||||
$droit = strtolower($droit);
|
||||
if (in_array($droit, $this->droitsClients)) {
|
||||
$check = '';
|
||||
if ( count($this->droits)>0 && in_array($droit, $this->droits) ) {
|
||||
$check = ' checked';
|
||||
}
|
||||
?>
|
||||
<input type="checkbox" name="droits[]" value="<?=$droit?>"<?=$check?> class="noborder"/>
|
||||
<?=$this->droitsLib[strtoupper($droit)]?><br/>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</fieldset>
|
||||
<?php }?>
|
||||
</div>
|
||||
|
||||
<div class="submit"><p class="submit-button"><input type="submit" name="submit" value="Ajouter" class="button"/></p></div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<?php }?>
|
||||
|
||||
</div>
|
@ -0,0 +1,12 @@
|
||||
<div id="center">
|
||||
<h1>Toutes les statistiques</h1>
|
||||
|
||||
<?php
|
||||
$statTypes = $this->statTypes;
|
||||
while($statType = current($statTypes)) {
|
||||
echo "<h2>" . key($statTypes) . "</h2>";
|
||||
echo "<div style='padding-left: 50px'><img src='/themes/default/images/charts/chart-".$statType.".png' /></div>";
|
||||
next($statTypes);
|
||||
}
|
||||
?>
|
||||
</div>
|
@ -0,0 +1,61 @@
|
||||
<?php if ($this->error) {?>
|
||||
<?=$this->error?>
|
||||
<?php } else {?>
|
||||
<form method="post" action="<?=$this->url(array('controller'=>'dashboard','action'=>'tarif'),null,true)?>">
|
||||
<input type="hidden" name="idClient" value="<?=$this->idClient?>"/>
|
||||
|
||||
<label>Log</label>
|
||||
<select name="log">
|
||||
<?php foreach($this->logs as $log) {?>
|
||||
<?php $select = ''; if ($log->code==$this->log) $select = ' selected';?>
|
||||
<option value="<?=$log->code?>"<?=$select?>><?=$log->desc?> (<?=$log->code?>)</option>
|
||||
<?php }?>
|
||||
</select>
|
||||
<br/>
|
||||
|
||||
<label>Service</label>
|
||||
<select name="service">
|
||||
<option value="DEFAULT"<?php if ('DEFAULT'==$this->service) echo ' selected';?>>Default</option>
|
||||
<?php foreach($this->services as $service) {?>
|
||||
<?php $select = ''; if ($service->code==$this->service) $select = ' selected';?>
|
||||
<option value="<?=$service->code?>"<?=$select?>><?=$service->label?> (<?=$service->code?>)</option>
|
||||
<?php }?>
|
||||
</select>
|
||||
<br/>
|
||||
|
||||
<label>Type</label>
|
||||
<select name="type">
|
||||
<option value="Unitaire"<?=$select?>>Unitaire</option>
|
||||
<option value="ForfaitLimit"<?=$select?>>Forfait avec limite</option>
|
||||
<option value="ForfaitNoLimit"<?=$select?>>Forfait sans limite</option>
|
||||
</select><br/>
|
||||
<label>Prix unitaire</label> <input type="text" name="priceUnit"/><br/>
|
||||
<label>Nb Limit</label> <input type="text" name="limit"/><br/>
|
||||
<label>Date</label> <input type="text" name="date"/> (AAAAMMJJ)<br/>
|
||||
<label>Durée</label> <input type="text" name="duree"/> (Jours)<br/>
|
||||
<label>Doublon</label>
|
||||
<select name="doublon">
|
||||
<option value="none"<?=$select?>>Aucun</option>
|
||||
<option value="jour"<?=$select?>>Mois</option>
|
||||
<option value="mois"<?=$select?>>Jour</option>
|
||||
<option value="period"<?=$select?>>Periode du contrat</option>
|
||||
</select>
|
||||
<br/>
|
||||
|
||||
</form>
|
||||
<script>
|
||||
var windowhref = window.location.href;
|
||||
$('#dialog').dialog({ buttons: [
|
||||
{ text: "Valider", click: function() { survSubmit(); } },
|
||||
{ text: "Annuler", click: function() { $(this).dialog("close"); } }
|
||||
]});
|
||||
|
||||
function survSubmit(){
|
||||
$('#dialogsurv').dialog({buttons: []});
|
||||
|
||||
$('#dialogsurv').dialog({ buttons: [
|
||||
{ text: "Fermer", click: function() { window.location.href = windowhref; $(this).dialog("close"); } }
|
||||
]});
|
||||
}
|
||||
</script>
|
||||
<?php }?>
|
@ -0,0 +1,102 @@
|
||||
<div id="center">
|
||||
<h1>TARIFS</h1>
|
||||
<div class="paragraph">
|
||||
<a class="contrat-add" href="#">Créer une nouvelle période de tarification</a>
|
||||
</div>
|
||||
|
||||
<h2>Liste des tarifs</h2>
|
||||
<div class="paragraph">
|
||||
<?php if(count($this->contrats)>0) {?>
|
||||
<style>
|
||||
table {width:100%;}
|
||||
table th {border:1px solid #cccccc; padding:2px; text-align:center;}
|
||||
table td {border:1px solid #cccccc; padding:2px; height:16px; text-align:center;}
|
||||
</style>
|
||||
|
||||
<?php foreach ( $this->contrats as $contrat ) {?>
|
||||
<div class="contrat">
|
||||
<div>Du <span class="date-begin"><?=$contrat->dateBegin?></span> au <span><?=$contrat->dateEnd?></span></div>
|
||||
<br/>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Element</th>
|
||||
<th>Service</th>
|
||||
<th>Type</th>
|
||||
<th>Prix unitaire</th>
|
||||
<th>Limite</th>
|
||||
<th>Dédoublonnage</th>
|
||||
</tr>
|
||||
<?php foreach ($contrat->tarifs->item as $tarif ) {?>
|
||||
<tr>
|
||||
<td class="edit-log"><?=$tarif->log?></td>
|
||||
<td class="edit-service"><?=$tarif->service?></td>
|
||||
<td class="edit-type"><?=$tarif->type?></td>
|
||||
<td class="edit-priceUnit"><?=$tarif->priceUnit?></td>
|
||||
<td class="edit-limit"><?=$tarif->limit?></td>
|
||||
<td class="edit-doublon"><?=$tarif->doublon?></td>
|
||||
</tr>
|
||||
<?php }?>
|
||||
</table>
|
||||
<br/>
|
||||
<div style="line-height:16px;">
|
||||
<a class="tarif-add" title="Ajouter un tarif" href="<?=$this->url(array('controller'=>'dashboard','action'=>'tarif','date'=>$contrat->dateBegin))?>">
|
||||
<img style="vertical-align:middle;" src="/themes/default/images/interfaces/ajouter.png" />Ajouter un tarif</a>
|
||||
</div>
|
||||
<br/>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
<hr/>
|
||||
|
||||
<?php } else {?>
|
||||
Aucun tarif défini.
|
||||
<?php }?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
$('a.tarif-add').click(function(e){
|
||||
e.preventDefault();
|
||||
var title = "Ajout d'un tarif";
|
||||
var href = $(this).attr('href');
|
||||
var dialogOpts = {
|
||||
bgiframe: true,
|
||||
title: title,
|
||||
width: 500,
|
||||
height: 400,
|
||||
modal: true,
|
||||
open: function(event, ui) {
|
||||
$(this).html('Chargement...');
|
||||
$(this).load(href);
|
||||
},
|
||||
buttons: {
|
||||
Annuler: function() { $(this).dialog('close'); }
|
||||
},
|
||||
close: function() { $('#dialog').remove(); }
|
||||
};
|
||||
$('<div id="dialog"></div>').dialog(dialogOpts);
|
||||
});
|
||||
|
||||
$('a.contrat-add').click(function(e){
|
||||
e.preventDefault();
|
||||
var title = "Ajout d'un contrat";
|
||||
var href = $(this).attr('href');
|
||||
var dialogOpts = {
|
||||
bgiframe: true,
|
||||
title: title,
|
||||
width: 500,
|
||||
height: 200,
|
||||
modal: true,
|
||||
open: function(event, ui) {
|
||||
$(this).html('Chargement...');
|
||||
$(this).load(href);
|
||||
},
|
||||
buttons: {
|
||||
Annuler: function() { $(this).dialog('close'); }
|
||||
},
|
||||
close: function() { $('#dialog').remove(); }
|
||||
};
|
||||
$('<div id="dialog"></div>').dialog(dialogOpts);
|
||||
});
|
||||
</script>
|
@ -9,7 +9,7 @@
|
||||
|
||||
<h1 class="titre">PROFIL UTILISATEUR</h1>
|
||||
|
||||
<form id="moncompte" name="moncompte" action="/user" method="post">
|
||||
<form id="moncompte" name="moncompte" action="/dashboard/user/op/save" method="post">
|
||||
|
||||
<div class="paragraph">
|
||||
|
||||
@ -43,6 +43,11 @@ if ($this->action == 'new') {
|
||||
<div class="infoTitle StyleInfoLib">Adresse e-mail</div>
|
||||
<div class="infoData">
|
||||
<input type="text" size="30" maxlength="80" name="frmOptions[email]" value="<?=$this->options['email']?>"/>
|
||||
<?php if ($this->action != 'new') {?>
|
||||
<br/><a id="email-surveillance"
|
||||
href="<?=$this->url(array('controller'=>'user', 'action'=>'emailsurveillance', 'login'=>$this->options['login']), null, true)?>"
|
||||
title="Initialiser email des surveillances">Initialiser email des surveillances</a>
|
||||
<?php }?>
|
||||
</div>
|
||||
|
||||
<div class="infoTitle StyleInfoLib">
|
||||
@ -74,6 +79,21 @@ if ($this->action=='new') {
|
||||
<input type="hidden" name="frmOptions[changepwd]" value="<?=$changePassword?>"/>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<div class="infoTitle StyleInfoLib">Langue de l'interface par défaut</div>
|
||||
<div class="infoData">
|
||||
<select name="frmOptions[lang]">
|
||||
<?php
|
||||
$lngOpts = array('fr' => 'Français', 'en' => 'English');
|
||||
foreach($lngOpts as $lngKey => $lngVal)
|
||||
{
|
||||
$selected = '';
|
||||
if($lngKey == $this->options['lang']) $selected = 'selected';
|
||||
?><option value="<?=$lngKey?>" <?=$selected?>><?=$lngVal?></option><?php
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2>Paramètres spécifiques</h2>
|
||||
@ -207,7 +227,7 @@ $opts = array(0 =>'Non', 1=>'Oui');
|
||||
foreach($opts as $opt => $lib)
|
||||
{
|
||||
$selected = '';
|
||||
if($opt == $this->options['accesWs']) $selected = 'selected';
|
||||
if($opt == $this->options['accesWS']) $selected = 'selected';
|
||||
?><option value="<?=$opt?>" <?=$selected?>><?=$lib?></option><?php
|
||||
}
|
||||
?>
|
||||
@ -239,16 +259,23 @@ foreach($opts as $opt => $lib)
|
||||
|
||||
<div class="infoTitle StyleInfoLib">Droits d'accès</div>
|
||||
<div class="infoData">
|
||||
<?php foreach($this->wscategory as $category) {?>
|
||||
<fieldset>
|
||||
<legend><?=$category->desc?></legend>
|
||||
<?php
|
||||
foreach ($this->droitsClients as $droit) {
|
||||
if (empty($droit)) continue;
|
||||
$check = '';
|
||||
if ( count($this->droits)>0 && in_array(strtolower($droit), $this->droits) ) {
|
||||
$check = ' checked';
|
||||
}
|
||||
foreach($category->droits->item as $droit) {
|
||||
$droit = strtolower($droit);
|
||||
if (in_array($droit, $this->droitsClients)) {
|
||||
$check = '';
|
||||
if ( count($this->droits)>0 && in_array($droit, $this->droits) ) {
|
||||
$check = ' checked';
|
||||
}
|
||||
?>
|
||||
<input type="checkbox" name="frmOptions[droits][]" value="<?=$droit?>"<?=$check?> class="noborder"/>
|
||||
<input type="checkbox" name="frmOptions[droits][]" value="<?=$droit?>"<?=$check?> class="noborder"/>
|
||||
<?=$this->droitsLib[strtoupper($droit)]?><br/>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</fieldset>
|
||||
<?php }?>
|
||||
</div>
|
||||
|
||||
@ -272,7 +299,7 @@ foreach ($this->prefsLib as $code => $lib) {
|
||||
|
||||
</div>
|
||||
|
||||
<div id="dialog" title="Modifier le mot de passe">
|
||||
<div id="dialog-password" title="Modifier le mot de passe">
|
||||
<form>
|
||||
<label for="npass1">Nouveau mot de passe</label><br/>
|
||||
<input type="password" name="npass1" size="15" maxlength="32"/><br/>
|
@ -0,0 +1,196 @@
|
||||
<script>
|
||||
$(function(){
|
||||
|
||||
$('a.user-service').click(function(e){
|
||||
e.preventDefault();
|
||||
var title = $(this).attr('title');
|
||||
var href = $(this).attr('href');
|
||||
var dialogOpts = {
|
||||
bgiframe: true,
|
||||
title: title,
|
||||
width: 500,
|
||||
height: 350,
|
||||
modal: true,
|
||||
open: function(event, ui) {
|
||||
$(this).html('Chargement...');
|
||||
$(this).load(href);
|
||||
},
|
||||
buttons: {
|
||||
'Fermer': function() { $(this).dialog('close'); }
|
||||
},
|
||||
close: function() { $('#dialog').remove(); }
|
||||
};
|
||||
$('<div id="dialog"></div>').dialog(dialogOpts);
|
||||
return false;
|
||||
});
|
||||
|
||||
$('a.delete').on('click', function(e){
|
||||
e.preventDefault();
|
||||
var href = $(this).attr('href');
|
||||
var title = $(this).attr('title');
|
||||
if (confirm(title)) {
|
||||
document.location.href=href;
|
||||
}
|
||||
});
|
||||
|
||||
$('a.enable').on('click', function(e){
|
||||
e.preventDefault();
|
||||
var href = $(this).attr('href');
|
||||
var title = $(this).attr('title');
|
||||
if (confirm(title)) {
|
||||
document.location.href=href;
|
||||
}
|
||||
});
|
||||
|
||||
$('a.disable').on('click', function(e){
|
||||
e.preventDefault();
|
||||
var href = $(this).attr('href');
|
||||
var title = $(this).attr('title');
|
||||
if (confirm(title)) {
|
||||
document.location.href=href;
|
||||
}
|
||||
});
|
||||
|
||||
$('input[name=searchLogin]').autocomplete({
|
||||
minLength:3,
|
||||
source: function(request, response) {
|
||||
$.getJSON('<?=$this->url(array('controller'=>'dashboard','action'=>'usersearch','idClient'=>$this->idClient))?>', { q: request.term },
|
||||
function(data) { response(data); }
|
||||
);
|
||||
},
|
||||
select: function (event, ui) {
|
||||
var href = '<?=$this->url(array('controller'=>'dashboard','action'=>'user','op'=>'edit','idClient'=>$this->idClient))?>/login/'+ui.item.value;
|
||||
document.location.href=href;
|
||||
}
|
||||
});
|
||||
|
||||
$('select[name=service]').change(function(e){
|
||||
e.preventDefault();
|
||||
document.location.href='<?=$this->url(array('controller'=>'dashboard','action'=>'users','idClient'=>$this->idClient),null,true)?>/service/'+$(this).val();
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
<div id="center">
|
||||
<h1>GESTION DES CLIENTS</h1>
|
||||
<div class="paragraph">
|
||||
Recherche de login <input type="text" name="searchLogin"/>
|
||||
<a href="<?=$this->url(array('controller'=>'dashboard','action'=>'user','op' =>'new'))?>">
|
||||
Créer un profil utilisateur</a>
|
||||
</div>
|
||||
<h2>Services</h2>
|
||||
<div class="paragraph">
|
||||
<select name="service">
|
||||
<option value="">Afficher tout</option>
|
||||
<option value="DEFAULT"<?php if ('DEFAULT'==$this->service) echo ' selected';?>>Default</option>
|
||||
<?php foreach($this->services as $service) {?>
|
||||
<?php $select = ''; if ($service->code==$this->service) $select = ' selected';?>
|
||||
<option value="<?=$service->code?>"<?=$select?>><?=$service->label?> (<?=$service->code?>)</option>
|
||||
<?php }?>
|
||||
</select>
|
||||
<a href="<?=$this->url(array('controller'=>'dashboard','action'=>'service','idClient'=>$this->idClient),null,true)?>">
|
||||
Editer le service</a>
|
||||
| <a href="<?=$this->url(array('controller'=>'dashboard','action'=>'service','idClient'=>$this->idClient),null,true)?>">
|
||||
Créer un service</a>
|
||||
</div>
|
||||
|
||||
<?php if (!empty($this->service)) {?>
|
||||
<div class="paragraph">
|
||||
<input type="button" class="button" name="overrideAccess" Value="Ecraser les droits de tous les utilisateurs"/>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
<h2>Liste des profils utilisateurs</h2>
|
||||
<div class="paragraph">
|
||||
<table id="utilisateur">
|
||||
<?php if (isset($message) && $message != '') {?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td colspan="5" class="StyleInfoData" align="center">
|
||||
<h3><?=$message?></h3>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr class="border titre">
|
||||
<td class="StyleInfoLib">Login</td>
|
||||
<td class="StyleInfoLib">Informations</td>
|
||||
<td class="StyleInfoLib">Référence</td>
|
||||
<td class="StyleInfoLib">Service</td>
|
||||
<td class="StyleInfoLib">Actions</td>
|
||||
<td class="StyleInfoLib">Actif</td>
|
||||
</tr>
|
||||
<?php if (count($this->utilisateurs)>0) { ?>
|
||||
<?php
|
||||
foreach ($this->utilisateurs as $uti) {
|
||||
$lienParams = ' login="'.$uti->login.'"';
|
||||
?>
|
||||
<tr class="border">
|
||||
<td class="StyleInfoData"><?=$uti->login;?></td>
|
||||
<td class="StyleInfoData">
|
||||
<?=$uti->nom.' '.$uti->prenom?><br/>
|
||||
<a href="mailto:<?=$uti->email?>">
|
||||
<?=str_replace(array(';',','), array('<br/>', '<br/>'), $uti->email);?>
|
||||
</a>
|
||||
</td>
|
||||
<td class="StyleInfoData"><?=$uti->reference?></td>
|
||||
<td class="StyleInfoData">
|
||||
<a title="Définir un service"
|
||||
href="<?=$this->url(array('controller'=>'dashboard','action'=>'userservice',
|
||||
'idClient'=>$uti->idClient,'login'=>$uti->login,'service'=>$uti->service),null,true)?>"
|
||||
class="user-service">
|
||||
<?php if (!empty($uti->service)) {?>
|
||||
<?=$uti->service?>
|
||||
<?php } else {?>
|
||||
Default
|
||||
<?php }?>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center" valign="middle">
|
||||
<a href="<?=$this->url(array(
|
||||
'controller' => 'dashboard',
|
||||
'action' => 'user',
|
||||
'op' => 'edit',
|
||||
'login' => $uti->login,
|
||||
))?>" class="edit">
|
||||
<img src="/themes/default/images/interfaces/edit0.gif" title="Editer le profil utilisateur" width="16" height="16"/>
|
||||
</a>
|
||||
<a href="<?=$this->url(array(
|
||||
'controller' => 'dashboard',
|
||||
'action' => 'user',
|
||||
'op' => 'delete',
|
||||
'login' => $uti->login,
|
||||
'idUti' => $uti->idUti,
|
||||
))?>" class="delete" title="Supprimer l'utilisateur <?=$uti->login?>">
|
||||
<img src="/themes/default/images/interfaces/delete.gif" title="Supprimer le profil utilisateur" width="11" height="11"/>
|
||||
</a>
|
||||
</td>
|
||||
<td class="StyleInfoData">
|
||||
<?php if ($uti->actif == 1) { ?>
|
||||
<a href="<?=$this->url(array(
|
||||
'controller' => 'dashboard',
|
||||
'action' => 'user',
|
||||
'op' => 'disable',
|
||||
'login' => $uti->login,
|
||||
'idUti' => $uti->idUti,
|
||||
))?>" class="disable" title="Désactiver le profil utilisateur <?=$uti->login?>">
|
||||
<u><font color="green">Oui</font></u>
|
||||
</a>
|
||||
<?php } else { ?>
|
||||
<a href="<?=$this->url(array(
|
||||
'controller' => 'dashboard',
|
||||
'action' => 'user',
|
||||
'op' => 'enable',
|
||||
'login' => $uti->login,
|
||||
'idUti' => $uti->idUti,
|
||||
))?>" class="enable" title="Activer le profil utilisateur <?=$uti->login?>">
|
||||
<u><font color="red">Non</font></u>
|
||||
</a>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1 @@
|
||||
<?=json_encode($this->output)?>
|
@ -0,0 +1,37 @@
|
||||
<?php if ($this->post) {?>
|
||||
|
||||
<script>
|
||||
$('#dialog').dialog({ buttons: [
|
||||
{ text: "Fermer", click: function() { $(this).dialog('close'); } }
|
||||
] });
|
||||
</script>
|
||||
|
||||
<?php } else {?>
|
||||
<div id="result">
|
||||
<div>Définir un service pour le login <?=$this->login?></div>
|
||||
|
||||
<form action="<?=$this->url(array('controller'=>'dashboard','action'=>'userservice'))?>">
|
||||
<input type="hidden" name="login" value="<?=$this->login?>"/>
|
||||
<div>
|
||||
Service : <select name="service">
|
||||
<option value="DEFAULT"<?php if ('DEFAULT'==$this->service) echo ' selected';?>>Default</option>
|
||||
<?php foreach($this->services as $service) {?>
|
||||
<?php $select = ''; if ($service->code==$this->service) $select = ' selected';?>
|
||||
<option value="<?=$service->code?>"<?=$select?>><?=$service->label?> (<?=$service->code?>)</option>
|
||||
<?php }?>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
<script>
|
||||
$('#dialog').dialog({ buttons: [
|
||||
{ text: "Valider", click: function() {
|
||||
var url = $('#dialog form').attr('action');
|
||||
var login = $('#dialog input[name=login]').val();
|
||||
var service = $('#dialog select[name=service] option:selected').val();
|
||||
$.post(url, { login: login, service: service}, function(data) { $('#result').html(data); });
|
||||
} },
|
||||
{ text: "Annuler", click: function() { $(this).dialog('close'); } }
|
||||
] });
|
||||
</script>
|
||||
</div>
|
||||
<?php }?>
|
@ -0,0 +1,62 @@
|
||||
<div id="center">
|
||||
<h1><?=$this->translate("DIRIGEANTS")?></h1>
|
||||
<div class="paragraph">
|
||||
<table class="identite">
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib"><?=$this->translate("Numéro identifiant Siren")?></td>
|
||||
<td width="350" class="StyleInfoData"><?=$this->SirenTexte($this->siren)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </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"> </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ée n'est présente dans notre base")?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php }?>
|
||||
</div>
|
||||
|
||||
<?=$this->render('cgu.phtml', $this->cgu)?>
|
||||
</div>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user