Compare commits
562 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 |
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,14 +1,40 @@
|
||||
<?php
|
||||
use Monolog\Logger;
|
||||
use Monolog\Handler\StreamHandler;
|
||||
use Monolog\Processor\IntrospectionProcessor;
|
||||
use Monolog\Handler\ChromePHPHandler;
|
||||
|
||||
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||
{
|
||||
protected function _initConfig()
|
||||
/**
|
||||
* Set config available in all apps
|
||||
*/
|
||||
protected function _initConfig()
|
||||
{
|
||||
$config = new Zend_Config($this->getOptions());
|
||||
Zend_Registry::set('config', $config);
|
||||
return $config;
|
||||
}
|
||||
|
||||
//Initialisation global des paramètres de vue
|
||||
/**
|
||||
* Init controller with modules
|
||||
*/
|
||||
protected function _initController()
|
||||
{
|
||||
$this->bootstrap('frontController');
|
||||
$front = $this->getResource('frontController');
|
||||
$front->setControllerDirectory(array(
|
||||
'default' => __DIR__ . '/modules/default/controllers',
|
||||
'admin' => __DIR__ . '/modules/admin/controllers',
|
||||
'file' => __DIR__ . '/modules/file/controllers',
|
||||
));
|
||||
|
||||
return $front;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialisation global des paramètres de vue
|
||||
*/
|
||||
protected function _initViewSettings()
|
||||
{
|
||||
$this->bootstrap('view');
|
||||
@ -18,27 +44,37 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||
$view->headTitle('Extranet Scores & Décisions');
|
||||
}
|
||||
|
||||
/**
|
||||
* Some specific route
|
||||
* @return unknown
|
||||
*/
|
||||
protected function _initRouter()
|
||||
{
|
||||
$this->bootstrap('frontController');
|
||||
$front = $this->getResource('frontController');
|
||||
$router = $front->getRouter();
|
||||
|
||||
$localauthRoute = new Zend_Controller_Router_Route('localauth/', array(
|
||||
'module' => 'default',
|
||||
'controller' => 'user',
|
||||
'action' => 'login'
|
||||
));
|
||||
$fichierRoute = new Zend_Controller_Router_Route('fichier/:action/:fichier', array(
|
||||
'controller' => 'fichier',
|
||||
'fichier' => '',
|
||||
'action' => 'login'
|
||||
));
|
||||
$router->addRoute('localauth', $localauthRoute);
|
||||
|
||||
$printRoute = new Zend_Controller_Router_Route('editer/:action/:fichier', array(
|
||||
'module' => 'default',
|
||||
'controller' => 'print',
|
||||
'fichier' => '',
|
||||
));
|
||||
|
||||
$router->addRoute('localauth', $localauthRoute);
|
||||
$router->addRoute('fichier', $fichierRoute);
|
||||
$router->addRoute('print', $printRoute);
|
||||
|
||||
$ssoRoute = new Zend_Controller_Router_Route('sso/:partner/', array(
|
||||
'module' => 'default',
|
||||
'controller' => 'auth',
|
||||
'action' => 'index',
|
||||
));
|
||||
$router->addRoute('sso', $ssoRoute);
|
||||
|
||||
return $router;
|
||||
}
|
||||
|
||||
@ -52,9 +88,6 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||
$logger = new Zend_Log($writer);
|
||||
Zend_Registry::set('firebug', $logger);
|
||||
|
||||
//ChromePHP - a voir comment désactiver
|
||||
require_once 'Vendors/ChromePHP/ChromePhp.php';
|
||||
|
||||
//Application Logger en Production
|
||||
$AppLogger = new Zend_Log();
|
||||
if (APPLICATION_ENV == 'production')
|
||||
@ -67,16 +100,42 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||
$AppMailWriter->addFilter(Zend_Log::ERR);
|
||||
$AppLogger->addWriter($AppMailWriter);
|
||||
}
|
||||
/* Remove as it's not use
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = $c->profil->path->data.'/log';
|
||||
$AppFileWriter = new Zend_Log_Writer_Stream($path.'/application.log');
|
||||
$AppFileWriter->addFilter(Zend_Log::ERR);
|
||||
$AppLogger->addWriter($AppFileWriter);
|
||||
*/
|
||||
Zend_Registry::set('log', $AppLogger);
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs and Debug
|
||||
*/
|
||||
protected function _initLogger()
|
||||
{
|
||||
$config = new Zend_Config($this->getOptions());
|
||||
$logFile = $config->profil->path->shared.'/log/application.log';
|
||||
|
||||
$log = new Logger('APP');
|
||||
|
||||
// Console Handler
|
||||
if (in_array(APPLICATION_ENV, array('development', 'staging'))) {
|
||||
//$log->pushHandler(new BrowserConsoleHandler());
|
||||
//$log->pushHandler(new ChromePHPHandler());
|
||||
}
|
||||
|
||||
// File Handler
|
||||
if (APPLICATION_ENV == 'development') {
|
||||
$level = Logger::DEBUG;
|
||||
} else {
|
||||
$level = Logger::INFO;
|
||||
}
|
||||
$log->pushHandler(new StreamHandler($logFile), $level);
|
||||
|
||||
// Processor
|
||||
$log->pushProcessor(new IntrospectionProcessor());
|
||||
|
||||
Zend_Registry::set('logger', $log);
|
||||
}
|
||||
|
||||
/**
|
||||
* Init database
|
||||
*/
|
||||
protected function _initDb()
|
||||
{
|
||||
$c = Zend_Registry::get('config');
|
||||
@ -107,13 +166,15 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Init cache
|
||||
*/
|
||||
protected function _initCache()
|
||||
{
|
||||
// @todo : Remove for PHP7 Compatibility
|
||||
//MetadataCache pour la base de données
|
||||
$cache = Zend_Cache::factory(
|
||||
'Core',
|
||||
'Apc',
|
||||
array('lifetime' => 28800,'automatic_serialization' => true),
|
||||
$cache = Zend_Cache::factory('Core', 'Apc',
|
||||
array('lifetime' => 28800, 'automatic_serialization' => true),
|
||||
array()
|
||||
);
|
||||
Zend_Db_Table_Abstract::setDefaultMetadataCache($cache);
|
||||
|
1
application/configs/.gitignore
vendored
Normal file
1
application/configs/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/application.ini
|
@ -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,881 +0,0 @@
|
||||
<?php
|
||||
class EvaluationController extends Zend_Controller_Action
|
||||
{
|
||||
protected $siret = null;
|
||||
protected $id = 0;
|
||||
|
||||
public function init()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$this->siret = $request->getParam('siret');
|
||||
$this->id = $request->getParam('id', 0);
|
||||
|
||||
require_once 'common/dates.php';
|
||||
require_once 'Scores/WsScores.php';
|
||||
require_once 'Scores/SessionEntreprise.php';
|
||||
require_once 'Scores/IdentiteEntreprise.php';
|
||||
require_once 'Finance/RatiosData.php';
|
||||
}
|
||||
|
||||
public function indexAction()
|
||||
{
|
||||
$this->_forward('entreprise', 'recherche');
|
||||
}
|
||||
|
||||
/**
|
||||
* Affichage d'une reglette représentant le score
|
||||
*/
|
||||
public function printscoresAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$request = $this->getRequest();
|
||||
$score = strtolower($request->getParam('score'));
|
||||
|
||||
if( $score == 'indiscore' ){
|
||||
$user = new Scores_Utilisateur();
|
||||
switch($user->getTypeScore()) {
|
||||
case '20': $score.='20'; break;
|
||||
case '100':
|
||||
default: $score.='100'; break;
|
||||
}
|
||||
}
|
||||
|
||||
$note = $request->getParam('note');
|
||||
$bornes = array(
|
||||
'conanh' => array( 'min' => -4.5 , 'max' => 16 ),
|
||||
'afdcc2' => array( 'min' => 0 , 'max' => 5 ),
|
||||
'afdcc1' => array( 'min' => -10 , 'max' => 10 ),
|
||||
'z' => array( 'min' => -3 , 'max' => 3 ),
|
||||
'indiscore100' => array( 'min' => 0 , 'max' => 100 ),
|
||||
'indiscore20' => array( 'min' => 0 , 'max' => 20 ),
|
||||
);
|
||||
$note = round(($note - $bornes[$score]['min'])*100/($bornes[$score]['max'] - $bornes[$score]['min']));
|
||||
|
||||
if($note < 0) $note = 0;
|
||||
if($note > 100) $note = 100;
|
||||
|
||||
$this->view->assign('note', $note);
|
||||
$this->view->assign('min', $bornes[$score]['min']);
|
||||
$this->view->assign('max', $bornes[$score]['max']);
|
||||
}
|
||||
|
||||
/**
|
||||
* IndiScore
|
||||
*/
|
||||
public function indiscoreAction()
|
||||
{
|
||||
$user = new Scores_Utilisateur();
|
||||
|
||||
if(!$user->checkPerm('INDISCORE') && !$user->checkPerm('INDISCOREP'))
|
||||
$this->_forward('perms', 'error');
|
||||
|
||||
$this->view->assign('edition', $user->checkModeEdition());
|
||||
|
||||
$request = $this->getRequest();
|
||||
$autrePage = $request->getParam('apage');
|
||||
|
||||
//Récupération des informations
|
||||
if (empty($autrePage)) {
|
||||
$plus = false;
|
||||
if ($user->checkPerm('indiscorep')){
|
||||
$plus = true;
|
||||
}
|
||||
$ref = $request->getParam('ref', '');
|
||||
$encours = $request->getParam('encours', 0);
|
||||
$email = $request->getParam('email', '');
|
||||
|
||||
$ws = new WsScores();
|
||||
$infos = $ws->getIndiScore(substr($this->siret, 0,9), 0, 1, $plus, $ref, $encours, $email);
|
||||
if ($infos === false) $this->_forward('soap', 'error');
|
||||
} else {
|
||||
$infos = $this->getRequest()->getParam('infos');
|
||||
}
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('typeScore', $user->getTypeScore());
|
||||
$this->view->assign('indiscore', $infos);
|
||||
$this->view->assign('AutrePage', $autrePage);
|
||||
$this->view->assign('exportObjet', $infos);
|
||||
|
||||
$this->view->assign('aviscredit', $user->checkPerm('aviscredit'));
|
||||
$this->view->assign('surveillance', $user->checkPerm('survscore'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Rapport de synthese
|
||||
*/
|
||||
public function indiscore2Action()
|
||||
{
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/finance.js', 'text/javascript');
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
|
||||
if(!$user->checkPerm('INDISCORE2') && !$user->checkPerm('INDISCORE2P'))
|
||||
$this->_forward('perms', 'error');
|
||||
|
||||
$siren = substr($this->siret,0,9);
|
||||
|
||||
$ws = new WsScores();
|
||||
$entreprise = new SessionEntreprise($this->siret, $this->id);
|
||||
$identite = $ws->getIdentite($siren);
|
||||
$indiscore = $ws->getIndiScore($siren);
|
||||
$infos = $ws->getRatios($siren, 'indiscore2'); // @todo : vérifier la page
|
||||
|
||||
$score = array();
|
||||
$tabRatio = array(
|
||||
'r5' => array('total'=>'r5', 'total_info'=>'% ca', 'op' => 1000, 'titre'=>'CHIFFRE D\'AFFAIRES'),
|
||||
'r16' => array('total'=>'r5', 'total_info'=>'% ca', 'op' => 1000, 'titre'=>'RESULTAT D\'EXPLOITATION'),
|
||||
'r7' => array('total'=>'r5', 'total_info'=>'% ca', 'op' => 1000, 'titre'=>'RESULTAT COURANT'),
|
||||
'r10' => array('total'=>'r5', 'total_info'=>'% ca', 'op' => 1000, 'titre'=>'RESULTAT NET'),
|
||||
'r18' => array('total'=>'r22', 'total_info'=>'% bilan', 'op' => 1000, 'titre'=>'FONDS PROPRES'),
|
||||
'r231' => array('total'=>'r22', 'total_info'=>'% bilan', 'op' => 1000, 'titre'=>'FONDS DE ROULEMENT'),
|
||||
'r232' => array('total'=>'r22', 'total_info'=>'% bilan', 'op' => 1000, 'titre'=>'BESOIN EN FONDS DE ROULEMENT'),
|
||||
'r249' => array('total'=>'', 'total_info'=>'', 'op' => 1000, 'titre'=>'TRESORERIE NETTE'),
|
||||
'r20' => array('total'=>'r5', 'total_info'=>'% ca', 'op' => 1000, 'titre'=>'FRAIS FINANCIER'),
|
||||
);
|
||||
|
||||
//Formattage des données
|
||||
$typeBilan = 'N';
|
||||
$ratiosData = new RatiosData($infos);
|
||||
|
||||
$nbBilanN = $ratiosData->getNbBilan('N');
|
||||
$nbBilanC = $ratiosData->getNbBilan('C');
|
||||
|
||||
if ($nbBilanN!=0)
|
||||
{
|
||||
foreach($tabRatio as $idRatio => $valRatio){
|
||||
$tabRatio[$idRatio]['comment'] = $ratiosData->wrapComment($idRatio);
|
||||
}
|
||||
$this->view->assign('tabRatio', $tabRatio);
|
||||
|
||||
$infosAnnee = $ratiosData->getBilansInfo($typeBilan);
|
||||
$annees = array_keys($infosAnnee);
|
||||
|
||||
//On prend les 3 derniers bilans pour l'affichage
|
||||
$nbMaxBilan = 3;
|
||||
rsort($annees);
|
||||
$annees = array_slice($annees, 0, $nbMaxBilan);
|
||||
sort($annees);
|
||||
$tabResult = array();
|
||||
foreach($annees as $annee){
|
||||
$data = array();
|
||||
$dataEvol = array();
|
||||
//Formatter les données
|
||||
foreach($tabRatio as $idRatio => $valRatio){
|
||||
$data[$idRatio] = $ratiosData->dRatio($typeBilan, $annee, $idRatio);
|
||||
$dataTotal[$idRatio] = $ratiosData->dTotal($typeBilan, $annee, $idRatio, $valRatio['total']);
|
||||
$dInfo[$idRatio] = $valRatio['total_info'];
|
||||
}
|
||||
$tabResult[] = array(
|
||||
'dateCloture' => WDate::dateT('Ymd','d/m/Y',$annee),
|
||||
'duree' => $infosAnnee[$annee]->duree.' Mois',
|
||||
'ratio' => $data,
|
||||
'total' => $dataTotal,
|
||||
'info' => $dInfo,
|
||||
);
|
||||
}
|
||||
$this->view->assign('tabResult', $tabResult);
|
||||
}
|
||||
|
||||
$this->view->assign('tabRatio', $tabRatio);
|
||||
/*
|
||||
Correction pour indiscore seule
|
||||
$indiscore->Siege;
|
||||
$indiscore->SiretSiege;
|
||||
$indiscore->NumRC;
|
||||
*/
|
||||
$indiscore->SiretSiege = $identite->SiretSiege;
|
||||
|
||||
$identite = new IdentiteEntreprise($identite);
|
||||
//Définition des blocks
|
||||
$blocks = array(
|
||||
'Siret',
|
||||
'SiretSiege',
|
||||
'NumRC',
|
||||
'Actif',
|
||||
'RaisonSociale',
|
||||
'FormeJuridique',
|
||||
'DateImmat',
|
||||
'DateCreaEt',
|
||||
'Adresse',
|
||||
'ActiviteEn',
|
||||
'Naf4',
|
||||
'OrigineFond',
|
||||
'TypeExploitation',
|
||||
'Saisonnalite',
|
||||
'Capital',
|
||||
'ChiffreAffaire',
|
||||
);
|
||||
$dBlock = array();
|
||||
foreach ($blocks as $item) {
|
||||
$display = array(
|
||||
'label' => method_exists($identite, 'get'.$item.'Label') ? $identite->{'get'.$item.'Label'}() : '',
|
||||
'texte' => method_exists($identite, 'get'.$item.'Texte') ? $identite->{'get'.$item.'Texte'}() : '',
|
||||
'titre' => method_exists($identite, 'get'.$item.'Titre') ? $identite->{'get'.$item.'Titre'}() : '',
|
||||
);
|
||||
$dBlock[$item] = $display;
|
||||
}
|
||||
$this->view->assign('dBlock', $dBlock);
|
||||
|
||||
$dateRadiation = '';
|
||||
if(isset($indiscore->DateRadiation) && $indiscore->DateRadiation!='' && $indiscore->DateRadiation!='0000-00-00')
|
||||
$this->view->assign('dateRadiation', WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$indiscore->DateRadiation)));
|
||||
|
||||
foreach($indiscore->scores as $name => $sc){
|
||||
if($name == 'ConanH')
|
||||
$score[$name] = array($sc, 'Score Conan Holder');
|
||||
if($name == 'Afdcc2')
|
||||
$score[$name] = array($sc, 'Score Afdcc 2');
|
||||
if($name == 'Z')
|
||||
$score[$name] = array($sc, 'Score Z');
|
||||
}
|
||||
|
||||
$typeScore = $user->getTypeScore();
|
||||
switch($typeScore) {
|
||||
case '20':
|
||||
$maxIndiscore = $typeScore;
|
||||
$score['Indiscore'] = array($indiscore->Indiscore20, 'IndiScore');
|
||||
break;
|
||||
case '100':
|
||||
default:
|
||||
$maxIndiscore = empty($typeScore)? '100' : $typeScore;
|
||||
$score['Indiscore'] = array($indiscore->Indiscore, 'IndiScore');
|
||||
break;
|
||||
}
|
||||
|
||||
$score['Indiscore'] = array($indiscore->Indiscore20, 'IndiScore');
|
||||
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('id', $this->id);
|
||||
$this->view->assign('siren', $siren);
|
||||
|
||||
$this->view->assign('encours', $indiscore->encours);
|
||||
$this->view->assign('TendanceIndiscore', $indiscore->TendanceIndiscore);
|
||||
$this->view->assign('SituationJuridique', $indiscore->SituationJuridique);
|
||||
$this->view->assign('paiement', $indiscore->infoPaiement);
|
||||
|
||||
$this->view->assign('scores', $score);
|
||||
|
||||
$this->view->assign('bilanReference', $bilanReference);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rapport complet
|
||||
*/
|
||||
public function indiscore3Action()
|
||||
{
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/evaluation.js', 'text/javascript');
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
if(!$user->checkPerm('INDISCORE3') && !$user->checkPerm('INDISCORE3P'))
|
||||
$this->_forward('perms', 'error');
|
||||
|
||||
// Lien pour le rapport personnalisé
|
||||
if ($user->getIdClient() == '110' || $user->checkModeEdition()) {
|
||||
$this->view->assign('customRapport', $this->view->url(array(
|
||||
'controller'=>'evaluation',
|
||||
'action'=>'customindiscore3',
|
||||
'siret'=>$this->siret,
|
||||
'id'=>$this->id)
|
||||
));
|
||||
}
|
||||
|
||||
$sessionEntreprise = new SessionEntreprise($this->siret, $this->id);
|
||||
$ws = new WsScores();
|
||||
$siren = substr($this->siret,0,9);
|
||||
|
||||
$plus = false;
|
||||
if ($user->checkPerm('indiscore3p')){
|
||||
$plus = true;
|
||||
}
|
||||
$request = $this->getRequest();
|
||||
$ref = $request->getParam('ref', '');
|
||||
$encours = $request->getParam('encours', 0);
|
||||
$email = $request->getParam('email', '');
|
||||
|
||||
$infos = $ws->getRapport($siren, 3, 0, $plus, $ref, $encours, $email);
|
||||
Zend_Registry::get('firebug')->info($infos);
|
||||
if ($infos === false) {
|
||||
$this->forward('soap', 'error');
|
||||
}
|
||||
|
||||
$this->view->assign('Identite', $infos->Identite);
|
||||
$this->view->assign('Dirigeants', $infos->Dirigeants);
|
||||
$this->view->assign('Liens', $infos->Liens);
|
||||
$this->view->assign('Annonces', $infos->Annonces);
|
||||
$this->view->assign('Ratios', $infos->Ratios);
|
||||
$this->view->assign('Indiscore', $infos->Indiscore);
|
||||
|
||||
require_once 'Scores/RapportComment.php';
|
||||
$rapportComment = new RapportComment($siren, $this->id,
|
||||
$infos->Indiscore->tabCommentaires->item,
|
||||
$infos->Ratios->RatiosInfos,
|
||||
$infos->Ratios->BilansInfos,
|
||||
$infos->Ratios->RatiosSecteur,
|
||||
$infos->Indiscore->tabVariables
|
||||
);
|
||||
$this->view->assign('comment',$rapportComment->out());
|
||||
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('id', $this->id);
|
||||
$this->view->assign('siren', $siren);
|
||||
$this->view->assign('raisonSociale', $sessionEntreprise->getRaisonSociale());
|
||||
$this->view->assign('exportObjet', $infos);
|
||||
}
|
||||
|
||||
/**
|
||||
* Génération de rapport personnalisé
|
||||
* @todo : à améliorer
|
||||
*/
|
||||
public function customindiscore3Action()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
|
||||
$request = $this->getRequest();
|
||||
$upload = $request->getParam('upload', null);
|
||||
|
||||
$siren = substr($this->siret, 0, 9);
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
|
||||
if (empty($upload)){
|
||||
$adresse = array();
|
||||
if ($user->checkModeEdition() || $user->getIdClient()==110) {
|
||||
$adresse[] = 'Order to Cash';
|
||||
$adresse[] = '6, rue Euryale Dehaynin ';
|
||||
$adresse[] = '75019 PARIS';
|
||||
$color1 = '#DFDB00';
|
||||
$color2 = '#EFED9A';
|
||||
$background = "background-image:url('/themes/default/images/customrapport/logo_ordertocash.jpg');background-repeat:no-repeat;background-position:center";
|
||||
} else {
|
||||
$adresse[] = 'Financement Entreprise';
|
||||
$adresse[] = '16 RUE SENAC DE MEILHAN';
|
||||
$adresse[] = '17000 LA ROCHELLE';
|
||||
$color1 = '#6699FF';
|
||||
$color2 = '##66CCFF';
|
||||
$background = null;
|
||||
}
|
||||
|
||||
$this->view->assign('adresse', $adresse);
|
||||
$this->view->assign('color1', $color1);
|
||||
$this->view->assign('color2', $color2);
|
||||
$this->view->assign('background', $background);
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('id', $this->id);
|
||||
|
||||
$sessionEntreprise = new SessionEntreprise($this->siret, $this->id);
|
||||
$this->view->assign('rs', $sessionEntreprise->getRaisonSociale());
|
||||
|
||||
} else {
|
||||
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
||||
$couleurh1 = $request->getParam('couleurh1', null);
|
||||
$couleurh2 = $request->getParam('couleurh2', null);
|
||||
$texth1 = $request->getParam('texth1', null);
|
||||
$texth2 = $request->getParam('texth2', null);
|
||||
$societe_name = $request->getParam('societe_name', null);
|
||||
$adresse = $request->getParam('adresse', null);
|
||||
$logo_background = $request->getParam('logo_background', null);
|
||||
|
||||
$siren = substr($this->siret, 0, 9);
|
||||
|
||||
if ($this->id!=0){
|
||||
$file = 'evaluation-indiscore3-'.$this->siret.'-'.$this->id.'.html';
|
||||
} else {
|
||||
$file = 'evaluation-indiscore3-'.$this->siret.'.html';
|
||||
}
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = $c->profil->path->pages;
|
||||
if (file_exists($path.'/'.$file))
|
||||
{
|
||||
$doc = new DOMDocument();
|
||||
$doc->preserveWhiteSpace = true;
|
||||
@$doc->loadHTMLFile($path.'/'.$file);
|
||||
|
||||
//Générer style particulier pour le rapport
|
||||
$style.= 'body {background-color:#ffffff;} ';
|
||||
$style.= '#footer {display:none;} ';
|
||||
$style.= '#customRapport {display:none;} ';
|
||||
$style.= '.notvisible{display:none;} ';
|
||||
$style.= '#center h1 {background-color:'.$couleurh1.';color:'.$texth1.';border:1px solid;} ';
|
||||
if($logo_background) {
|
||||
$style.= '#center {background-image:url(./themes/default/images/customrapport/logo_ordertocash_background.jpg);background-repeat:no-repeat;background-position:center;} ';
|
||||
}
|
||||
$style.= '#center h2 {background-color:'.$couleurh2.';color:'.$texth2.'} ';
|
||||
$style.= 'p#rsynthese {font-size:14px;font-weight:bold;} ';
|
||||
|
||||
$styleDom = $doc->createElement('style', $style);
|
||||
|
||||
//Ajout information
|
||||
$contentDom = $doc->createElement('div');
|
||||
if(!$user->checkModeEdition()) {
|
||||
$element = $doc->createElement('img');
|
||||
$element->setAttribute('src', './themes/default/images/customrapport/logo_ordertocash.jpg');
|
||||
$element->setAttribute('width', '12%');
|
||||
} else {
|
||||
$element = $doc->createElement('img');
|
||||
$element->setAttribute('src', './themes/default/images/customrapport/logo_ordertocash.jpg');
|
||||
$element->setAttribute('width', '12%');
|
||||
}
|
||||
$div = $doc->createElement('div');
|
||||
$div->setAttribute('style', "clear:both;");
|
||||
$div->appendChild($element);
|
||||
$contentDom->appendChild($div);
|
||||
|
||||
$i = 0;
|
||||
foreach($adresse as $item){
|
||||
$element = $doc->createElement('span', $item);
|
||||
$contentDom->appendChild($element);
|
||||
$element = $doc->createElement('br');
|
||||
$contentDom->appendChild($element);
|
||||
$i++;
|
||||
}
|
||||
|
||||
$element = $doc->createElement('center', $societe_name.' Enquête Financière');
|
||||
$element->setAttribute('style', 'font-size:17px');
|
||||
$contentDom->appendChild($element);
|
||||
|
||||
if ($user->checkModeEdition() || $user->getIdClient()==110) {
|
||||
$element = $doc->createElement('span', "Les équipes d'Order To Cash se tiennent à votre disposition pour vous assister dans l'interprétation de ces données au 01 84 16 50 00 ou par mail à l'adresse suivante : contact@ordertocash.fr");
|
||||
$element->setAttribute('style', 'text-align:left;');
|
||||
$contentDom->appendChild($element);
|
||||
}
|
||||
|
||||
$ajout = $doc->createElement('div');
|
||||
$ajout->appendChild($styleDom);
|
||||
$ajout->appendChild($contentDom);
|
||||
|
||||
//Après <div id="center"> on insére le contenu
|
||||
$body = $doc->getElementsByTagName('body')->item(0);
|
||||
$div = $body->getElementsByTagName('div');
|
||||
foreach($div as $item){
|
||||
if ($item->hasAttribute('id') && $item->getAttribute('id') == 'center'){
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$item->parentNode->insertBefore($ajout, $item);
|
||||
$xml = $doc->saveXML();
|
||||
|
||||
$c = Zend_Registry::get('config');
|
||||
$outfile = $c->profil->path->pages.'/p'.$user->getIdClient().'-'.$file;
|
||||
file_put_contents($outfile, $xml);
|
||||
|
||||
//Génération du pdf
|
||||
require_once 'wkhtmltopdf/wkhtmltopdf.php';
|
||||
$wkhtmltopdf = new wkhtmltopdf();
|
||||
$wkhtmltopdf->setOptions('footer-right', 'Page [page] sur [toPage]');
|
||||
$wkhtmltopdf->setOptions('header-right', date('d/m/Y H:i:s'));
|
||||
$wkhtmltopdf->setOptions('disable-external-links');
|
||||
$wkhtmltopdf->setOptions('disable-internal-links');
|
||||
$pdfFile = $wkhtmltopdf->exec($outfile);
|
||||
|
||||
if (file_exists($pdfFile)){
|
||||
echo '<center>Votre fichier est prêt pour être téléchargé !<br />' .
|
||||
'<a target="_blank" href="'.$this->view->url(
|
||||
array('controller'=>'fichier',
|
||||
'action'=>'customrapport',
|
||||
'fichier'=>basename($pdfFile)), null, true).'">Télécharger</a></center>';
|
||||
} else {
|
||||
echo "Erreur lors de la génération du PDF.";
|
||||
}
|
||||
} else {
|
||||
echo "Erreur fichier non présent !";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Enquete commerciale
|
||||
* @todo : Vérifier l'enregistrement
|
||||
*/
|
||||
public function enquetecAction()
|
||||
{
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/enquetec.js', 'text/javascript');
|
||||
|
||||
//isset($_REQUEST['pays']) ? $pays=$_REQUEST['pays'] : $pays='' ;
|
||||
|
||||
$commandeEnquete = false;
|
||||
$request = $this->getRequest();
|
||||
|
||||
if ($request->isPost()){
|
||||
|
||||
$InfoUser = $request->getParam('InfoUser');
|
||||
$InfoEnq = $request->getParam('InfoEnq');
|
||||
|
||||
//Affichage de la demande
|
||||
//Vérification des informations
|
||||
$formError = false;
|
||||
$fields = array();
|
||||
|
||||
//Info utilisateur obligatoire :
|
||||
if($InfoUser['Identite']==''){ $fields[] ='Votre Identite'; $formError=true;}
|
||||
if($InfoUser['Tel']==''){ $fields[] ='Votre Téléphone'; $formError=true;}
|
||||
if($InfoUser['Email']==''){ $fields[] ='Votre Email'; $formError=true;}
|
||||
|
||||
//Info entreprise obligatoire :
|
||||
if( isset($InfoEnq['Type']) && $InfoEnq['Type']==''){ $fields[] ='Choix du type d\'enquête'; $formError=true;}
|
||||
if($InfoEnq['PrecisionsChoix']=='1'){
|
||||
if($InfoEnq['Precisions']['Motif']==''){ $fields[] ='Mofif de la demande'; $formError=true;}
|
||||
}elseif($InfoEnq['PrecisionsChoix']=='3' || $InfoEnq['PrecisionsChoix']=='4'){
|
||||
if($InfoEnq['Precisions']['MontantCA']==''){ $fields[] ='Précisions de la demande'; $formError=true;}
|
||||
}elseif($InfoEnq['PrecisionsChoix']=='5'){
|
||||
if($InfoEnq['Precisions']['Autre']==''){ $fields[] ='Précisions de la demande'; $formError=true;}
|
||||
}
|
||||
|
||||
if(isset($InfoEnq['ImpayeesChoix']) && $InfoEnq['ImpayeesChoix']=='oui' ){
|
||||
if($InfoEnq['Impayees']['Montant']=='' || $InfoEnq['Impayees']['Nombre']=='' || $InfoEnq['Impayees']['Date']==''){ $fields[] ='Précisions sur les impayées'; $formError=true;}
|
||||
}
|
||||
if(isset($InfoEnq['RetardPaiementChoix']) && $InfoEnq['RetardPaiementChoix']=='oui' ){
|
||||
if($InfoEnq['RetardPaiement']['Montant']=='' || $InfoEnq['Nombre']=='' || $InfoEnq['RetardPaiement']['Date']==''){ $fields[] ='Précisions sur le retarde de paiement'; $formError=true;}
|
||||
}
|
||||
if(isset($_REQUEST['InfoEnq']['LitigeChoix']) && $_REQUEST['InfoEnq']['LitigeChoix']=='oui' ){
|
||||
if($_REQUEST['InfoEnq']['Litige']['Precisions']=='' || $_REQUEST['InfoEnq']['Litige']['Precisions']==''){ $fields[] ='Précisions sur le litige'; $formError=TRUE;}
|
||||
}
|
||||
|
||||
if ($formError==true){
|
||||
$message = '<font color="red">';
|
||||
$message.= 'Veuillez remplir les champs suivants : ';
|
||||
$message.= join(', ', $fields);
|
||||
$message.= '</font>';
|
||||
}else{
|
||||
$InfoDemande = $InfoUser;
|
||||
$siren = $InfoEnq['Siren'];
|
||||
unset($InfoEnq['Siren']);
|
||||
//Suppression et assigation des valeurs pour le webservice
|
||||
if($InfoEnq['PrecisionsChoix'] = 1){
|
||||
$InfoEnq['Precisions']['Type'] = "Enquête sur un client (contrôle crédit)";
|
||||
unset($InfoEnq['PrecisionsChoix']);
|
||||
}elseif($InfoEnq['PrecisionsChoix']==2){
|
||||
$InfoEnq['Precisions']['Type'] = "Enquête sur un prospect (ouverture de compte)";
|
||||
unset($InfoEnq['PrecisionsChoix']);
|
||||
}elseif($InfoEnq['PrecisionsChoix']==3){
|
||||
$InfoEnq['Precisions']['Type'] = "Enquête sur un fournisseur stratégique";
|
||||
unset($InfoEnq['PrecisionsChoix']);
|
||||
}elseif($InfoEnq['PrecisionsChoix']==4){
|
||||
$InfoEnq['Precisions']['Type'] = "Enquête sur un fournisseur non stratégique";
|
||||
unset($InfoEnq['PrecisionsChoix']);
|
||||
}elseif($InfoEnq['PrecisionsChoix']==5){
|
||||
$InfoEnq['Precisions']['Type'] = "Autre type d'enquête (Précisez...)";
|
||||
unset($InfoEnq['PrecisionsChoix']);
|
||||
}
|
||||
|
||||
$ws = new WsScore();
|
||||
$result = $ws->commandeEnquete($siren, $InfoEnq, $InfoDemande);
|
||||
if ($result === false) {
|
||||
$this->_forward('soap', 'error');
|
||||
} else {
|
||||
$this->view->assign('annee', substr($result->dateCommande,0,4));
|
||||
$this->view->assign('mois', substr($result->dateCommande,4,2));
|
||||
$this->view->assign('jour', substr($result->dateCommande,6,2));
|
||||
$this->view->assign('heure', substr($result->dateCommande,8,2));
|
||||
$this->view->assign('minutes', substr($result->dateCommande,10,2));
|
||||
$this->view->assign('ref', substr($result->refCmde,1));
|
||||
$this->view->assign('siren', $result->siren);
|
||||
$commandeEnquete = true;
|
||||
}
|
||||
$this->view->assign('commandeEnquete', $commandeEnquete);
|
||||
}
|
||||
$this->view->assign('formError', $formError);
|
||||
$this->view->assign('message', $message);
|
||||
$this->view->assign('InfoUser', $InfoUser);
|
||||
$this->view->assign('InfoEnq', $InfoEnq);
|
||||
}
|
||||
|
||||
if ($commandeEnquete == false) {
|
||||
$ws = new WsScores();
|
||||
$infosEntrep = $ws->getIdentite($this->siret, $this->id);
|
||||
$this->view->assign('Etab', $infosEntrep);
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
$this->view->assign('user', $user);
|
||||
}
|
||||
|
||||
|
||||
$this->view->assign('commandeEnquete', $commandeEnquete);
|
||||
}
|
||||
|
||||
public function aviscreditAction()
|
||||
{
|
||||
$commande = false;
|
||||
|
||||
$request = $this->getRequest();
|
||||
|
||||
//Reception des données du formulaire
|
||||
if ($request->isPost())
|
||||
{
|
||||
$InfoUser = $request->getParam('InfoUser');
|
||||
$InfoEnq = $request->getParam('InfoEnq');
|
||||
|
||||
$formError = false;
|
||||
$fields = array();
|
||||
|
||||
//Info utilisateur obligatoire :
|
||||
if($InfoUser['Identite']==''){
|
||||
$fields[] ='Votre Identite'; $formError=true;
|
||||
}
|
||||
if($InfoUser['Tel']==''){
|
||||
$fields[] ='Votre Téléphone'; $formError=true;
|
||||
}
|
||||
if($InfoUser['Email']==''){
|
||||
$fields[] ='Votre Email'; $formError=true;
|
||||
}
|
||||
|
||||
//Info entreprise obligatoire :
|
||||
if( isset($InfoEnq['Type']) && $InfoEnq['Type']==''){
|
||||
$fields[] ='Choix du type d\'enquête'; $formError=true;
|
||||
}
|
||||
|
||||
if(isset($InfoEnq['ImpayeesChoix']) && $InfoEnq['ImpayeesChoix']=='oui' ){
|
||||
if($InfoEnq['Impayees']['Montant']=='' || $InfoEnq['Impayees']['Nombre']=='' || $InfoEnq['Impayees']['Date']==''){
|
||||
$fields[] ='Précisions sur les impayées'; $formError=true;
|
||||
}
|
||||
}
|
||||
if(isset($InfoEnq['RetardPaiementChoix']) && $InfoEnq['RetardPaiementChoix']=='oui' ){
|
||||
if($InfoEnq['RetardPaiement']['Montant']=='' || $InfoEnq['Nombre']=='' || $InfoEnq['RetardPaiement']['Date']==''){
|
||||
$fields[] ='Précisions sur le retard de paiement'; $formError=true;
|
||||
}
|
||||
}
|
||||
if(isset($_REQUEST['InfoEnq']['LitigeChoix']) && $_REQUEST['InfoEnq']['LitigeChoix']=='oui' ){
|
||||
if($_REQUEST['InfoEnq']['Litige']['Precisions']=='' || $_REQUEST['InfoEnq']['Litige']['Precisions']==''){
|
||||
$fields[] ='Précisions sur le litige'; $formError=TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Envoi du mail formatté
|
||||
|
||||
if ( $formError==true )
|
||||
{
|
||||
$message = '<font color="red">';
|
||||
$message.= 'Veuillez remplir les champs suivants : ';
|
||||
$message.= join(', ', $fields);
|
||||
$message.= '</font>';
|
||||
|
||||
$this->view->assign('message', $message);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
$sujet = "Demande d'avis personnalisé";
|
||||
$texte = "<pre>".print_r($InfoUser, 1)."</pre>".
|
||||
"<pre>".print_r($InfoEnq, 1)."</pre>";
|
||||
|
||||
require_once 'Scores/Mail.php';
|
||||
$mail = new Mail();
|
||||
$mail->setFrom('production');
|
||||
$mail->addToKey('support');
|
||||
$mail->setSubject($sujet);
|
||||
$mail->setBodyHtml($texte);
|
||||
|
||||
if ($mail->send()) {
|
||||
$commande = true;
|
||||
}
|
||||
}
|
||||
|
||||
$this->view->assign('commande', $commande);
|
||||
|
||||
$this->view->assign('formError', $formError);
|
||||
$this->view->assign('message', $message);
|
||||
$this->view->assign('InfoUser', $InfoUser);
|
||||
$this->view->assign('InfoEnq', $InfoEnq);
|
||||
|
||||
$this->view->assign('siren', substr($this->siret, 0,9));
|
||||
|
||||
}
|
||||
|
||||
//Affichage du formulaire
|
||||
if ($commande == false) {
|
||||
$ws = new WsScores();
|
||||
$infosEntrep = $ws->getIdentite($this->siret, $this->id);
|
||||
$this->view->assign('Etab', $infosEntrep);
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
$this->view->assign('user', $user);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Affichage des informations de scoring creditsafe
|
||||
*/
|
||||
public function scoringAction()
|
||||
{
|
||||
$user = new Scores_Utilisateur();
|
||||
if(!$user->checkModeEdition() or !$user->checkPerm('SCORECSF'))
|
||||
$this->render('error/perms', null, 'error');
|
||||
|
||||
require_once 'Evaluation/DomDocument2.lib.php';
|
||||
require_once 'common/curl.php';
|
||||
|
||||
define('CREDITSAFE_WS_URL', 'https://www.creditsafe.fr/getdata/service/CSFRServices.asmx');
|
||||
define('CREDITSAFE_WS_URI', 'https://www.creditsafe.fr/getdata/service/');
|
||||
define('CREDITSAFE_WS_USER', 'scores_decisions');
|
||||
define('CREDITSAFE_WS_PASS', 'yoann1306');
|
||||
define('CREDITSAFE_WS_REF', 'ref');
|
||||
/**
|
||||
* L'Url du WSDL est bonne simplament le formatage des données a changés, il faut respecter les données !
|
||||
* comparer les exemples donnés.
|
||||
*
|
||||
*/
|
||||
$req='<xmlrequest>'.
|
||||
'<header>'.
|
||||
'<username>'.CREDITSAFE_WS_USER.'</username>'.
|
||||
'<password>'.CREDITSAFE_WS_PASS.'</password>'.
|
||||
//'<operation>getcompanyinformation</operation>'.
|
||||
'<operation>getratinglimit</operation>'.
|
||||
'<country>FR</country>'.
|
||||
'<language>FR</language>'.
|
||||
'<chargereference>'.CREDITSAFE_WS_REF.'</chargereference>'.
|
||||
'</header>'.
|
||||
'<body>'.
|
||||
//'<package>standard</package>'.
|
||||
'<package>ratinglimit</package>'.
|
||||
"<companynumber>".$this->siret."</companynumber>".
|
||||
'</body>'.
|
||||
'</xmlrequest>';
|
||||
|
||||
$success = true;
|
||||
$date = date('Ymd');
|
||||
$url = 'https://www.creditsafe.fr/getdata/service/CSFRServices.asmx/GetData?RequestXmlStr='.$req;
|
||||
$referer = $cookie = '';
|
||||
$page = getUrl($url, $cookie, '', $referer, false, '', '');
|
||||
$referer = $url;
|
||||
$file = APPLICATION_PATH.'/../../data/creditsafe/'.$this->siret.'.xml';
|
||||
$xml = html_entity_decode($page['body'], ENT_QUOTES, 'UTF-8');
|
||||
$dom_object = new DomDocument2();
|
||||
$ws = new WsScores();
|
||||
if(!file_exists($file)) {
|
||||
file_put_contents($file, $xml); // Ne pas oublier de metre les bons droits sur le dossier.
|
||||
$ws->setLog('scorecsf', $this->siret);
|
||||
} else {
|
||||
$ws->setLog('scorecsf', $this->siret, 0, 'local');
|
||||
}
|
||||
$dom_object->load($file);
|
||||
$companyname = $dom_object->getValueFromTag('companyname');
|
||||
$rating = $dom_object->getValueFromTag('rating');
|
||||
$ratingdesc1 = str_replace('?',"'",$dom_object->getValueFromTag('ratingdesc1'));
|
||||
$ratingdesc2 = str_replace('?',"'",$dom_object->getValueFromTag('ratingdesc2'));
|
||||
$creditlimit = $dom_object->getValueFromTag('creditlimit');
|
||||
$libelle = '';
|
||||
if (strtoupper($creditlimit)<>strtolower($creditlimit) || $creditlimit=='')
|
||||
$strCreditlimit = $creditlimit;
|
||||
else
|
||||
$strCreditlimit = number_format($creditlimit,null,null,' '). ' €';
|
||||
|
||||
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();
|
||||
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = $c->profil->path->data.'/log';
|
||||
|
||||
$fp=fopen($path.'/surveillance_scf.csv', 'a');
|
||||
fwrite($fp, date('Y/m/d H:i:s').";$siren;".$email.';'.$login.';'.$user->getEmail().';'.$user->getIpAddress()."\n");
|
||||
fclose($fp);
|
||||
|
||||
} else {
|
||||
$message = "ERREUR : Veuillez saisir une adresse email valide pour la mise sous surveillance";
|
||||
}
|
||||
$this->view->assign('message', $message);
|
||||
}
|
||||
}
|
||||
|
||||
public function valorisationAction()
|
||||
{
|
||||
$user = new Scores_Utilisateur();
|
||||
if(!$user->checkPerm('INDISCORE3') && !$user->checkPerm('INDISCORE3P'))
|
||||
$this->_forward('perms', 'error');
|
||||
|
||||
$sessionEntreprise = new SessionEntreprise($this->siret, $this->id);
|
||||
$ws = new WsScores();
|
||||
$siren = substr($this->siret,0,9);
|
||||
|
||||
$request = $this->getRequest();
|
||||
$ref = $request->getParam('ref', '');
|
||||
$encours = $request->getParam('encours', 0);
|
||||
$email = $request->getParam('email', '');
|
||||
|
||||
$infos = $ws->getEntrepriseValo($siren);
|
||||
|
||||
require_once 'Scores/RapportComment.php';
|
||||
$rapportComment = new RapportComment($siren, $this->id,
|
||||
$infos->Indiscore->tabCommentaires->item,
|
||||
$infos->RatiosInfos,
|
||||
$infos->RatiosBilansInfos,
|
||||
$infos->RatiosSecteur,
|
||||
$infos->Indiscore->tabVariables
|
||||
);
|
||||
$this->view->assign('comment',$rapportComment->out());
|
||||
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('id', $this->id);
|
||||
$this->view->assign('siren', $siren);
|
||||
$this->view->assign('raisonSociale', $sessionEntreprise->getRaisonSociale());
|
||||
$this->view->assign('exportObjet', $infos);
|
||||
}
|
||||
}
|
@ -1,458 +0,0 @@
|
||||
<?php
|
||||
class FichierController extends Zend_Controller_Action
|
||||
{
|
||||
|
||||
public function init()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
}
|
||||
|
||||
public function indexAction(){}
|
||||
|
||||
/**
|
||||
* Gestion du chargement des logos
|
||||
*/
|
||||
public function logoAction()
|
||||
{
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$explode = explode('.', $file);
|
||||
switch ($explode[1]) {
|
||||
case 'png' : $content_type = 'image/png'; break;
|
||||
case 'gif' : $content_type = 'image/gif'; break;
|
||||
case 'jpeg':
|
||||
case 'jpg' : $content_type = 'image/jpeg'; break;
|
||||
}
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->data).'/logos/';
|
||||
if ( file_exists($path.$file) ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo 'Impossible de charger le logo.';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion du chargement des images du cache
|
||||
*/
|
||||
public function imgcacheAction()
|
||||
{
|
||||
$content_type = 'image/png';
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = $c->profil->path->pages.'/imgcache/';
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
if ( file_exists($path.$file) ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo 'Impossible de charger le fichier.';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion du chargement des fichiers des marques
|
||||
*/
|
||||
public function marqueAction()
|
||||
{
|
||||
$content_type = 'application/pdf';
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->data).'/marques/';
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
if(file_exists($path.$file) && filesize($path.$file)>0) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo "Erreur lors de l'affichage du fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion des fichiers Actes et Bilans
|
||||
*/
|
||||
public function pdfAction()
|
||||
{
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$content_type = 'application/pdf';
|
||||
$c = Zend_Registry::get('config');
|
||||
//bilan
|
||||
if (preg_match('/^bilan-[0-9]{9}-(consolides|sociaux)-([0-9]{8})/', $file, $matches)) {
|
||||
$path = realpath($c->profil->path->data).
|
||||
'/greffes/bilans/'.$matches[1].'/'.substr($matches[2],0,4).'/';
|
||||
}
|
||||
//acte
|
||||
else if (preg_match('/^acte-[0-9]{9}-(.*)-([0-9]{8})-.*-.*-.*-.*-.*-.*$/', $file, $matches)) {
|
||||
$type = $matches[1];
|
||||
$date = $matches[2];
|
||||
$annee = substr($date,0,4);
|
||||
$mois = substr($date,4,2);
|
||||
$path = realpath($c->profil->path->data).'/greffes/actes/'.$annee.'/'.$mois.'/';
|
||||
}
|
||||
|
||||
Zend_Registry::get('firebug')->info($path);
|
||||
|
||||
if(file_exists($path.$file) && filesize($path.$file)>0) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo "Erreur lors de l'affichage du fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion des fichiers Actes et Bilans
|
||||
*/
|
||||
public function pdfassociationAction()
|
||||
{
|
||||
$content_type = 'application/pdf';
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->data).'/association/';
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$type = $this->getRequest()->getParam('type');
|
||||
$file = $type.'/'.$file;
|
||||
if(file_exists($path.$file) && filesize($path.$file)>0) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo "Erreur lors de l'affichage du fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion des liasses au formats excel
|
||||
*/
|
||||
public function liasseAction()
|
||||
{
|
||||
$content_type = 'application/vnd.ms-excel';
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->files).'/';
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
//Envoi du fichier sur la sortie standard
|
||||
if ( file_exists($path.$file) ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo 'Impossible de charger le fichier.';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion des log de consommation
|
||||
*/
|
||||
public function consommationAction()
|
||||
{
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$content_type = 'application/csv-tab-delimited-table';
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->files).'/';
|
||||
//Envoi du fichier sur la sortie standard
|
||||
if ( file_exists($path.$file) ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo 'Impossible de charger le fichier.';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Export du portefeuille au format CSV
|
||||
*/
|
||||
public function portefeuilleAction()
|
||||
{
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$content_type = 'application/csv-tab-delimited-table';
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->files).'/';
|
||||
//Envoi du fichier sur la sortie standard
|
||||
if ( file_exists($path.$file) ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo 'Impossible de charger le fichier.';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Export de la liste des surveillances au format CSV
|
||||
*/
|
||||
public function surveillanceAction()
|
||||
{
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$content_type = 'application/csv-tab-delimited-table';
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->files).'/';
|
||||
//Envoi du fichier sur la sortie standard
|
||||
if ( file_exists($path.$file) ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo 'Impossible de charger le fichier.';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion des fichiers bilan saisie par les clients
|
||||
*/
|
||||
public function bilanclientAction()
|
||||
{
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->data).'/bilanclient/';
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$explode = explode('.', $file);
|
||||
switch ($explode[1]) {
|
||||
case 'pdf' : $content_type = 'application/pdf'; break;
|
||||
case 'tiff' : $content_type = 'image/tiff'; break;
|
||||
}
|
||||
if ( file_exists($path.$file) && filesize($path.$file)>0 ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo "Erreur lors de l'affichage du fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion des kbis
|
||||
*/
|
||||
public function kbisAction()
|
||||
{
|
||||
$content_type = 'application/pdf';
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->files).'/';
|
||||
if ( file_exists($path.$file) && filesize($path.$file)>0 ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo "Erreur lors de l'affichage du fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion des rapports personnalisés
|
||||
*/
|
||||
public function customrapportAction()
|
||||
{
|
||||
$content_type = 'application/pdf';
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->pages).'/';
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$output_file = $directory.'/'.$file;
|
||||
if ( file_exists($path.$file) && filesize($path.$file)>0 ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo "Impossible de charger le fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion bodacc au format PDF
|
||||
*/
|
||||
public function bodaccAction()
|
||||
{
|
||||
$content_type = 'application/pdf';
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->data).'/bodacc/';
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
//Construire le chemin du dossier
|
||||
preg_match('/BODACC_(A|B|C)_([0-9]{4})_(.*)\.pdf/', $file, $matches);
|
||||
$path.= $matches[1].'/'.$matches[2].'/';
|
||||
if ( file_exists($path.$file) && filesize($path.$file)>0 ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo "Impossible de charger le fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion des fichiers PDF des nouveautés
|
||||
*/
|
||||
public function newAction()
|
||||
{
|
||||
$content_type = 'application/pdf';
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->data).'/nouveautes/';
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
if ( file_exists($path.$file) && filesize($path.$file)>0 ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo "Impossible de charger le fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Bodacc history file
|
||||
*/
|
||||
public function histopdfAction()
|
||||
{
|
||||
$content_type = 'application/pdf';
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->files).'/';
|
||||
if ( file_exists($path.$file) && filesize($path.$file)>0 ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo "Impossible de charger le fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Internal files for groupes
|
||||
*/
|
||||
public function groupesAction()
|
||||
{
|
||||
$content_type = 'application/pdf';
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->data).'/groupes/';
|
||||
if ( file_exists($path.$file) && filesize($path.$file)>0 ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo "Impossible de charger le fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Bilan : Association
|
||||
*/
|
||||
public function bilanAction()
|
||||
{
|
||||
$content_type = 'application/pdf';
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = $c->profil->path->files.'/';
|
||||
Zend_Registry::get('firebug')->info($path.$file);
|
||||
if ( file_exists($path.$file) && filesize($path.$file)>0 ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo "Impossible de charger le fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,332 +0,0 @@
|
||||
<?php
|
||||
require_once 'Scores/RechercheHistorique.php';
|
||||
require_once 'Giant/WSgiant.php';
|
||||
require_once 'Giant/Controllers.lib.php';
|
||||
require_once 'Giant/RequestDatabase.lib.php';
|
||||
require_once 'Giant/Functions.lib.php';
|
||||
require_once 'common/dates.php';
|
||||
|
||||
class GiantController extends Zend_Controller_Action
|
||||
{
|
||||
protected $TestIndication = true;
|
||||
|
||||
protected $TestCompanies = array(
|
||||
'BE' => array(
|
||||
'0439546194', '0436576412', '0430459076', '0430000604', '0404869783', '0404869783',
|
||||
'0406952018'
|
||||
),
|
||||
'ES' => array(
|
||||
'A00000000', 'A80192727'
|
||||
),
|
||||
'GB' => array(
|
||||
'00000086', '00082932', '98888888', '214436', '1777777', '991581', '1800000'
|
||||
),
|
||||
'NL' => array(
|
||||
'533885', '1383988', '1383989', '891962239', '891974008', '892130032', '896614719',
|
||||
'896614735', '896614735', '896615243'
|
||||
),
|
||||
'FR' => array(
|
||||
'55214450300018', '49496793800031', '47997411500012', '48765114300017',
|
||||
'43235433000040', '39435613300022', '39504742600014', '76980020200020',
|
||||
'35379698000020', '56202109700018', '70204756400068', '70204756400068'
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
public function init()
|
||||
{
|
||||
$this->view->headLink()->appendStylesheet('/themes/default/styles/giant.css', 'all');
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/giant.js', 'text/javascript');
|
||||
$this->view->debug = false;
|
||||
}
|
||||
|
||||
public function searchAction()
|
||||
{
|
||||
$user = new Scores_Utilisateur();
|
||||
$params = $this->getRequest()->getParams();
|
||||
$search = new GiantRechercheController($params['pays'], $this->TestIndication);
|
||||
$result = $search->Liste($params, $this->getRequest()->getParam('page'));
|
||||
$this->view->label = $search->getObjet()->getLabelDesc();
|
||||
$this->view->labelResults = $search->getObjet()->getLabelResults();
|
||||
$this->view->pays = $params['pays'];
|
||||
$this->view->currentPage = $search->getObjet()->getCurrentPage();
|
||||
$this->view->userMaxResult = $user->getNbRep();
|
||||
$this->view->resultats = $result;
|
||||
$this->view->page = $this->getRequest()->getParam('page');
|
||||
$this->view->referer = $search->getObjet()->getQuery();
|
||||
$this->view->lienReferer = $search->getQueryLink($params);
|
||||
if($this->view->debug)
|
||||
$this->view->soap = $search->soapG;
|
||||
}
|
||||
|
||||
public function identiteAction()
|
||||
{
|
||||
$rechercheParams = new RechercheHistorique();
|
||||
$giantFunction = new GiantFunction();
|
||||
if (count($rechercheParams->liste()) > 0)
|
||||
{
|
||||
$recherche = $rechercheParams->item(0);
|
||||
$type = $recherche['type'];
|
||||
$params = $recherche['params'];
|
||||
}
|
||||
$Commande = new Commandes();
|
||||
$user = new Scores_Utilisateur();
|
||||
$listeCommandes = $Commande->getCommandesByLogin($user->getLogin());
|
||||
$total = 0;
|
||||
$liste = $giantFunction->divCommande($listeCommandes, $total);
|
||||
$ListeRapport = new GiantRechercheController($params['pays'], $this->TestIndication);
|
||||
$result = $ListeRapport->ListeRapport($this->getRequest()->getParam('CompanyId'));
|
||||
$this->view->total = $total;
|
||||
$this->view->listeCommandes = $liste;
|
||||
$this->view->modification = (isset($result->MonitoringOptions))?($ListeRapport->getModification($result->MonitoringOptions->MonitoringOption[0])):null;
|
||||
$this->view->description = $ListeRapport->getDescription();
|
||||
$this->view->raisonSociale = $this->getRequest()->getParam('raisonSociale');
|
||||
$this->view->listeRapport = $result;
|
||||
$this->view->telephone = $this->getRequest()->getParam('telephone');
|
||||
$this->view->CompanyId = $this->getRequest()->getParam('CompanyId');
|
||||
$this->view->raisonSociale = $this->getRequest()->getParam('raisonSociale');
|
||||
$this->view->CompanyRegisterNumber = $this->getRequest()->getParam('CompanyRegisterNumber');
|
||||
$this->view->Pays = $this->getRequest()->getParam('Pays');
|
||||
$this->view->Adresse = explode(':', $this->getRequest()->getParam('Adresse'));
|
||||
if($this->view->debug)
|
||||
$this->view->soap = $ListeRapport->soapG;
|
||||
}
|
||||
|
||||
public function creditrecommendationAction()
|
||||
{
|
||||
$giantController = new GiantControllerLib($this->getRequest()->getParam('CompanyId'));
|
||||
$id = $giantController->commande($this->getRequest()->getParam('CompanyId'),
|
||||
$this->getRequest()->getParam('Type'),
|
||||
$this->getRequest()->getParam('Pays'),
|
||||
$this->getRequest()->getParam('Language'),
|
||||
$this->TestIndication
|
||||
);
|
||||
$creditrecommendationAction = array('getAvisDeCredit' => 'CreditRecommendation');
|
||||
$creditrecommendation = unserialize(base64_decode($id));
|
||||
$identiteController = new GiantIdentiteController($creditrecommendation);
|
||||
$giantConstroller = new GiantControllerLib($this->getRequest()->getParam('CompanyId').'-'.$this->getRequest()->getParam('Type'));
|
||||
$identiteController->ficheAction();
|
||||
$fiche = $identiteController->getObjet('fiche');
|
||||
foreach($creditrecommendationAction as $action => $val) {
|
||||
if(isset($creditrecommendation->DataSet->Company->$val)) {
|
||||
$creditrecommendation = $giantConstroller->$action($creditrecommendation);
|
||||
}
|
||||
}
|
||||
$fiche = $giantConstroller->getInformationGenerale($creditrecommendation);
|
||||
$this->view->carte = $this->getRequest()->getParam('Pays');
|
||||
$this->view->reportType = $this->getRequest()->getParam('Type');
|
||||
$this->view->report = $fiche;
|
||||
$this->view->Type = $this->getRequest()->getParam('Type');
|
||||
$this->view->dateFunction = new WDate();
|
||||
}
|
||||
|
||||
public function compactAction()
|
||||
{
|
||||
$giantController = new GiantControllerLib($this->getRequest()->getParam('CompanyId'));
|
||||
$id = $giantController->commande($this->getRequest()->getParam('CompanyId'),
|
||||
$this->getRequest()->getParam('Type'),
|
||||
$this->getRequest()->getParam('Pays'),
|
||||
$this->getRequest()->getParam('Language'),
|
||||
$this->TestIndication
|
||||
);
|
||||
$compactAction = array('getAvisDeCredit' => 'CreditRecommendation', 'getPositionFinanciere' => 'FinancialSummary',
|
||||
'getStructureEntreprise' => 'Associated', 'getDirigeant' => 'Position'
|
||||
);
|
||||
$compact = unserialize(base64_decode($id));
|
||||
$identiteController = new GiantIdentiteController($compact);
|
||||
$giantConstroller = new GiantControllerLib($this->getRequest()->getParam('CompanyId').'-'.$this->getRequest()->getParam('Type'));
|
||||
$identiteController->ficheAction();
|
||||
$fiche = $identiteController->getObjet('fiche');
|
||||
|
||||
foreach($compactAction as $action => $val) {
|
||||
if(isset($compact->DataSet->Company->$val)) {
|
||||
$compact = $giantConstroller->$action($compact);
|
||||
}
|
||||
}
|
||||
$fiche = $giantConstroller->getInformationGenerale($compact);
|
||||
$this->view->carte = $this->getRequest()->getParam('Pays');
|
||||
$this->view->reportType = $this->getRequest()->getParam('Type');
|
||||
$this->view->report = $fiche;
|
||||
$this->view->Type = $this->getRequest()->getParam('Type');
|
||||
$this->view->dateFunction = new WDate();
|
||||
}
|
||||
|
||||
public function fullAction()
|
||||
{
|
||||
$giantController = new GiantControllerLib($this->getRequest()->getParam('CompanyId').'-'.$this->getRequest()->getParam('Type'));
|
||||
$id = $giantController->commande($this->getRequest()->getParam('CompanyId'),
|
||||
$this->getRequest()->getParam('Type'),
|
||||
$this->getRequest()->getParam('Pays'),
|
||||
$this->getRequest()->getParam('Language'),
|
||||
$this->TestIndication
|
||||
);
|
||||
$fullAction = array('getAvisDeCredit' => 'CreditRecommendation', 'getComptesAnnuels' => 'AnnualAccounts', 'getPositionFinanciere' => 'FinancialSummary',
|
||||
'getComportementPaiement' => 'PaymentBehaviour', 'getStructureEntreprise' => 'Associated', 'getDirigeant' => 'Position',
|
||||
'getComparaisonValeurs'=> 'PeerGroup', 'getHistoriques' => 'Event'
|
||||
);
|
||||
$full = unserialize(base64_decode($id));
|
||||
$full->DataSet->Company->CompanyId= $this->getRequest()->getParam('CompanyId');
|
||||
$identiteController = new GiantIdentiteController($full);
|
||||
$giantConstroller = new GiantControllerLib($this->getRequest()->getParam('CompanyId').'-'.$this->getRequest()->getParam('Type'));
|
||||
$identiteController->ficheAction();
|
||||
$fiche = $identiteController->getObjet('fiche');
|
||||
|
||||
foreach($fullAction as $action => $val) {
|
||||
if(isset($full->DataSet->Company->$val))
|
||||
$full = $giantConstroller->$action($full);
|
||||
}
|
||||
$fiche = $giantConstroller->getInformationGenerale($full);
|
||||
$this->view->carte = $this->getRequest()->getParam('Pays');
|
||||
$this->view->reportType = $this->getRequest()->getParam('Type');
|
||||
$this->view->report = $fiche;
|
||||
$this->view->Type = $this->getRequest()->getParam('Type');
|
||||
$this->view->dateFunction = new WDate();
|
||||
}
|
||||
|
||||
public function getForm()
|
||||
{
|
||||
$form = new Zend_Form();
|
||||
$form->setMethod('post')
|
||||
->setAction('investigation');
|
||||
|
||||
$reference = $form->createElement('text', 'reference', array('label' => 'Votre Reference'));
|
||||
$reference->setRequired(true);
|
||||
$elements[] = $reference;
|
||||
|
||||
$telephone = $form->createElement('text', 'telephone', array('label' => 'Votre téléphone'));
|
||||
$telephone->setRequired(true);
|
||||
$elements[] = $telephone;
|
||||
|
||||
$mail = $form->createElement('text', 'mail', array('label' => 'Adresse Email'));
|
||||
$mail->setRequired(true);
|
||||
$elements[] = $mail;
|
||||
|
||||
$elements[] = $form->createElement('textarea', 'remarque', array('label' => 'Remarque ou commentaire à destination de l\'enquêteur :'));
|
||||
$elements[] = $form->createElement('text', 'domiciliation', array('label' => 'Domiciliation Bancaire :'));
|
||||
$elements[] = $form->createElement('text', 'Encours', array('label' => 'Encours demandé :'));
|
||||
$elements[] = $form->createElement('text', 'nbEcheance', array('label' => 'Nombre d\'échéances :'));
|
||||
|
||||
$form->addElements($elements)
|
||||
->addElement('submit', 'Envoyer', array('label' => 'Envoyer'));
|
||||
return ($form);
|
||||
}
|
||||
|
||||
public function investigationAction()
|
||||
{
|
||||
|
||||
if($this->getRequest()->isPost()) {
|
||||
$data = $this->getRequest()->getPost();
|
||||
if($this->getForm()->isValid($data))
|
||||
$this->view->form = $this->getRequest()->getParam('reference');
|
||||
else {
|
||||
return ($this->view->form = $this->getForm());
|
||||
}
|
||||
} else
|
||||
$this->view->form = $this->getForm();
|
||||
}
|
||||
public function startmonitoringAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->view->headLink()->appendStylesheet('/themes/default/styles/giant.css', 'all');
|
||||
$this->view->lang = $this->getRequest()->getParam('lang');
|
||||
$this->view->CompanyId = $this->getRequest()->getParam('CompanyId');
|
||||
$this->view->Pays = $this->getRequest()->getParam('Pays');
|
||||
$this->view->CompanyName = $this->getRequest()->getParam('CompanyName');
|
||||
$this->view->action = $this->getRequest()->getParam('action');
|
||||
$this->view->values = $this->getRequest()->getParams();
|
||||
|
||||
if ($this->getRequest()->isPost()) {
|
||||
$giantController = new GiantControllerLib($this->getRequest()->getParam('CompanyId'));
|
||||
$result = $giantController->startmonitoring($this->getRequest()->getParam('CompanyId'),
|
||||
$this->getRequest()->getParam('CategoryName'),
|
||||
$this->getRequest()->getParam('EventType'),
|
||||
$this->getRequest()->getParam('StartDate'),
|
||||
$this->getRequest()->getParam('EndDate'),
|
||||
$this->getRequest()->getParam('Version'),
|
||||
$this->getRequest()->getParam('LanguageCode'),
|
||||
$this->getRequest()->getParam('Pays'),
|
||||
$this->TestIndication
|
||||
);
|
||||
$this->view->result = $result;
|
||||
}
|
||||
|
||||
}
|
||||
public function stopmonitoringAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->view->headLink()->appendStylesheet('/themes/default/styles/giant.css', 'all');
|
||||
$this->view->CompanyId = $this->getRequest()->getParam('CompanyId');
|
||||
$this->view->Pays = $this->getRequest()->getParam('Pays');
|
||||
$this->view->InternalOrderId = $this->getRequest()->getParam('InternalOrderId');
|
||||
$this->view->CompanyName = $this->getRequest()->getParam('CompanyName');
|
||||
$this->view->action = $this->getRequest()->getParam('action');
|
||||
$this->view->values = $this->getRequest()->getParams();
|
||||
|
||||
if ($this->getRequest()->isPost()) {
|
||||
$giantController = new GiantControllerLib($this->getRequest()->getParam('CompanyId'));
|
||||
$result = $giantController->stopmonitoring($this->getRequest()->getParam('CompanyId'),
|
||||
$this->getRequest()->getParam('EndDate'),
|
||||
$this->getRequest()->getParam('InternalOrderId'),
|
||||
$this->getRequest()->getParam('Pays'),
|
||||
$this->TestIndication
|
||||
);
|
||||
$this->view->result = $result;
|
||||
}
|
||||
}
|
||||
public function updatemonitoringAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->view->headLink()->appendStylesheet('/themes/default/styles/giant.css', 'all');
|
||||
$this->view->lang = $this->getRequest()->getParam('lang');
|
||||
$this->view->CompanyId = $this->getRequest()->getParam('CompanyId');
|
||||
$this->view->Pays = $this->getRequest()->getParam('Pays');
|
||||
$this->view->CompanyName = $this->getRequest()->getParam('CompanyName');
|
||||
$this->view->action = $this->getRequest()->getParam('action');
|
||||
$this->view->values = $this->getRequest()->getParams();
|
||||
|
||||
if ($this->getRequest()->isPost()) {
|
||||
$giantController = new GiantControllerLib($this->getRequest()->getParam('CompanyId'));
|
||||
$result = $giantController->updatemonitoring($this->getRequest()->getParam('CompanyId'),
|
||||
$this->getRequest()->getParam('InternalOrderId'),
|
||||
$this->getRequest()->getParam('CategoryName'),
|
||||
$this->getRequest()->getParam('EventType'),
|
||||
$this->getRequest()->getParam('StartDate'),
|
||||
$this->getRequest()->getParam('Version'),
|
||||
$this->getRequest()->getParam('LanguageCode'),
|
||||
$this->getRequest()->getParam('Pays'),
|
||||
$this->TestIndication
|
||||
);
|
||||
$this->view->result = $result;
|
||||
}
|
||||
|
||||
}
|
||||
public function retrivemonitoringAction()
|
||||
{
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/giant_monitoring.js', 'text/javascript');
|
||||
$this->view->CompanyId = $this->getRequest()->getParam('CompanyId');
|
||||
$this->view->Pays = $this->getRequest()->getParam('Pays');
|
||||
$this->view->CompanyName = $this->getRequest()->getParam('CompanyName');
|
||||
$this->view->action = $this->getRequest()->getParam('action');
|
||||
$this->view->values = $this->getRequest()->getParams();
|
||||
|
||||
$giantController = new GiantControllerLib($this->getRequest()->getParam('CompanyId'));
|
||||
$result = $giantController->retrivemonitoring($this->getRequest()->getParam('CompanyId'),
|
||||
$this->getRequest()->getParam('StartFrom'),
|
||||
$this->getRequest()->getParam('InternalOrderId'),
|
||||
$this->getRequest()->getParam('Pays'),
|
||||
$this->TestIndication,
|
||||
$this->getRequest()->getParam('monitor_type')
|
||||
);
|
||||
$this->view->result = $result;
|
||||
|
||||
$merged =Array();
|
||||
foreach ($result->MonitoringEvents->MonitoringEvent as $MonitoringEvent):
|
||||
if ($merged[$MonitoringEvent->Company->Event[0]->EventCode]){
|
||||
array_push($merged[$MonitoringEvent->Company->Event[0]->EventCode],$MonitoringEvent) ;
|
||||
} else {
|
||||
$merged[$MonitoringEvent->Company->Event[0]->EventCode][]=$MonitoringEvent;
|
||||
}
|
||||
endforeach;
|
||||
$this->view->val = $merged;
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,58 +0,0 @@
|
||||
<?php
|
||||
class IndexController extends Zend_Controller_Action
|
||||
{
|
||||
|
||||
public function indexAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$page = $request->getParam('page');
|
||||
if ($page == 'annonces')
|
||||
{
|
||||
$siret = $request->getParam('siret');
|
||||
$source = $request->getParam('source');
|
||||
$idAnn = $request->getParam('idAnn');
|
||||
$lien = '/juridique/annonces/siret/'.$siret;
|
||||
if (!empty($source)) $lien.= '/source/'.$source;
|
||||
if (!empty($idAnn)) $lien.= '/idAnn/'.$idAnn;
|
||||
$this->_redirect($lien);
|
||||
}
|
||||
elseif ( Zend_Registry::get('theme')->name=='mobile' )
|
||||
{
|
||||
//Afficher le menu pour la version mobile
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->_forward('entreprise', 'recherche');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retourne l'url pour le csv d'export du portefeuille
|
||||
*/
|
||||
public function portefeuillecsvAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
||||
require_once 'Scores/WsScores.php';
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
$login = $user->getLogin();
|
||||
$idClient = $user->getIdClient();
|
||||
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getPortefeuilleCsv($login, $idClient);
|
||||
|
||||
$log = Zend_Registry::get('config')->profil->path->data.'/log/altisys.log';
|
||||
|
||||
if ($reponse === false){
|
||||
file_put_contents($log, date('Y-m-d H:i:s')." - URL = ERREUR\n", FILE_APPEND);
|
||||
echo "Erreur";
|
||||
} elseif (!empty($reponse->result->Url)) {
|
||||
file_put_contents($log, date('Y-m-d H:i:s')." - URL = ".$reponse->result->Url."\n", FILE_APPEND);
|
||||
echo $reponse->result->Url;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,452 +0,0 @@
|
||||
<?php
|
||||
class JuridiqueController extends Zend_Controller_Action
|
||||
{
|
||||
protected $siret = null;
|
||||
protected $id = 0;
|
||||
|
||||
public function init()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$this->siret = $request->getParam('siret');
|
||||
$this->id = $request->getParam('id', 0);
|
||||
|
||||
require_once 'Scores/WsScores.php';
|
||||
require_once 'Scores/SessionEntreprise.php';
|
||||
require_once 'common/dates.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* Affichage de la liste des annonces ou d'une annonce
|
||||
*/
|
||||
public function annoncesAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
|
||||
$vue = $request->getParam('vue', 'bodacc');
|
||||
|
||||
$p = $request->getParam('p', 1);
|
||||
$this->view->assign('p', $p);
|
||||
|
||||
$idAnn = $request->getParam('idAnn', null);
|
||||
$siren = substr($this->siret, 0,9);
|
||||
|
||||
$source = $request->getParam('source');
|
||||
if (!empty($source)) {
|
||||
switch ($source){
|
||||
case 1: $vue='bodacc'; break;
|
||||
case 2: $vue='balo'; break;
|
||||
case 3: $vue='asso'; break;
|
||||
}
|
||||
}
|
||||
|
||||
$session = new SessionEntreprise($this->siret, $this->id);
|
||||
$fj = $session->getFormeJuridique();
|
||||
if ( $fj>9000 && $fj<9999 && intval($siren)==0 ) {
|
||||
$vue = 'asso';
|
||||
}
|
||||
|
||||
$this->view->assign('id', $session->getId());
|
||||
$this->view->assign('siren', $siren);
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('raisonSociale', $session->getRaisonSociale());
|
||||
$this->view->assign('AutrePage', $request->getParam('apage'));
|
||||
|
||||
if ($session->getSource()=='006') {
|
||||
|
||||
$this->view->assign('AutreSource', true);
|
||||
|
||||
} else {
|
||||
|
||||
$this->view->assign('vue', $vue);
|
||||
|
||||
$nbAnnonces = 20;
|
||||
$position = ($p-1)*$nbAnnonces;
|
||||
|
||||
$ws = new WsScores();
|
||||
switch ( $vue ) {
|
||||
case 'bodacc':
|
||||
case 'abod':
|
||||
default:
|
||||
if(intval($siren)==0) {
|
||||
$idAnn = $session->getSourceId();
|
||||
}
|
||||
$infos = $ws->getAnnoncesLegales($siren, $idAnn, null, $position, $nbAnnonces);
|
||||
break;
|
||||
case 'balo':
|
||||
$infos = $ws->getAnnoncesBalo($siren, $idAnn, null, $position, $nbAnnonces);
|
||||
break;
|
||||
case 'asso':
|
||||
if ( intval($siren)==0 && substr($session->getAutreId(),0,1)=='W' ) {
|
||||
$infos = $ws->getAnnoncesAsso($session->getAutreId(), $idAnn, null, $position, $nbAnnonces);
|
||||
} elseif (intval($siren)!=0) {
|
||||
$infos = $ws->getAnnoncesAsso($siren, $idAnn, null, $position, $nbAnnonces);
|
||||
} else {
|
||||
$idAnn = $session->getSourceId();
|
||||
$infos = $ws->getAnnoncesAsso($siren, $idAnn, null, $position, $nbAnnonces);
|
||||
}
|
||||
break;
|
||||
case 'bomp':
|
||||
$filtre = $request->getParam('filtre', null);
|
||||
$this->view->assign('filtre', $filtre);
|
||||
$infos = $ws->getAnnoncesBoamp($siren, $idAnn, $filtre, $position, $nbAnnonces);
|
||||
break;
|
||||
}
|
||||
if ($infos === false) $this->_forward('soap', 'error');
|
||||
Zend_Registry::get('firebug')->info($infos);
|
||||
require_once 'Scores/Annonces.php';
|
||||
$objAnnonces = new Annonces($infos->result->item);
|
||||
|
||||
$typeAnnonces = array(
|
||||
'Bodacc',
|
||||
'Balo',
|
||||
'Bomp',
|
||||
'Asso',
|
||||
);
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
$this->view->assign('hasModeEdition', $user->checkModeEdition());
|
||||
|
||||
$this->view->assign('exportObjet', $infos);
|
||||
$this->view->assign('surveillance', $user->checkPerm('survannonce'));
|
||||
|
||||
//Affichage pour une annonce
|
||||
if (!empty($idAnn) && in_array($vue, array('bodacc', 'abod', 'balo', 'asso', 'bomp')) ) {
|
||||
|
||||
if ( $user->checkModeEdition() ){
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/saisieannonces.js', 'text/javascript');
|
||||
}
|
||||
|
||||
$classType = 'annonces'.ucfirst($vue);
|
||||
foreach($objAnnonces->$classType as $ann) {
|
||||
if($ann->id==$idAnn) break;
|
||||
}
|
||||
Zend_Registry::get('firebug')->info($ann);
|
||||
$annonce = array(
|
||||
'Desc' => $objAnnonces->getAnnonceDesc($ann),
|
||||
'Entree' => $objAnnonces->getAnnonceEntree($ann),
|
||||
'EntreeSD' => $objAnnonces->getAnnonceEntreeSD($ann),
|
||||
'Even' => $objAnnonces->getAnnonceEven($ann),
|
||||
'Texte' => $objAnnonces->getAnnonceTexte($ann),
|
||||
'Type' => $objAnnonces->getType($ann),
|
||||
'Code' => $objAnnonces->getCode($ann),
|
||||
'Annee' => $objAnnonces->getAnnee($ann),
|
||||
'Num' => $objAnnonces->getNum($ann),
|
||||
'Deleted' => $objAnnonces->isDeleted($ann),
|
||||
'Entites' => $objAnnonces->getAnnonceEntite($ann)
|
||||
);
|
||||
|
||||
$this->view->assign('source', $session->getSource());
|
||||
if ( intval($this->siret)==0 ){
|
||||
$this->view->assign('sourceId', $session->getSourceId());
|
||||
} else {
|
||||
$this->view->assign('sourceId', null);
|
||||
}
|
||||
$this->view->assign('idAnn', $idAnn);
|
||||
$this->view->assign('annonce', $annonce);
|
||||
|
||||
if ($request->getParam('q')=='ajax')
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
//$this->_helper->viewRenderer->setNoRender(true);
|
||||
$this->renderScript('juridique/annonce-ajax.phtml');
|
||||
} else {
|
||||
//Définir url pour téléchargement pdf
|
||||
if ( in_array($annonce['Code'], array('BODA', 'BODB', 'BODC')) && intval($annonce['Annee'])>=2008) {
|
||||
$lienBodacc = $this->view->url(array(
|
||||
'controller' => 'juridique',
|
||||
'action' => 'bodaccpdf',
|
||||
'type' => substr($annonce['Code'],3,1),
|
||||
'annee' => $annonce['Annee'],
|
||||
'num' => $annonce['Num'],
|
||||
), null, true);
|
||||
$this->view->assign('lienBodacc', $lienBodacc);
|
||||
}
|
||||
|
||||
$this->renderScript('juridique/annonce.phtml');
|
||||
}
|
||||
|
||||
//Affichage pour la liste des annonces
|
||||
} else {
|
||||
|
||||
$nbReponses = $infos->nbReponses;
|
||||
$nbPages = ceil($nbReponses/$nbAnnonces);
|
||||
|
||||
//Attention ajout des filtres
|
||||
if ( $p <= 1 ) {
|
||||
$lienPagePrecedente = false;
|
||||
} else {
|
||||
$lienPagePrecedente = $this->view->url(array(
|
||||
'controller' => 'juridique',
|
||||
'action' => 'annonces',
|
||||
'vue'=> $vue,
|
||||
'p' => $p-1
|
||||
));
|
||||
}
|
||||
|
||||
if ( $p+1 > $nbPages ) {
|
||||
$lienPageSuivante = false;
|
||||
} else {
|
||||
$lienPageSuivante = $this->view->url(array(
|
||||
'controller' => 'juridique',
|
||||
'action' => 'annonces',
|
||||
'vue' => $vue,
|
||||
'p' => $p+1
|
||||
));
|
||||
}
|
||||
|
||||
$this->view->assign('nbPages',$nbPages);
|
||||
$this->view->assign('lienPagePrecedente',$lienPagePrecedente);
|
||||
$this->view->assign('lienPageSuivante',$lienPageSuivante);
|
||||
|
||||
foreach ($typeAnnonces as $type)
|
||||
{
|
||||
$classType = 'annonces'.$type;
|
||||
$annonces = array();
|
||||
if (count($objAnnonces->$classType)>0)
|
||||
{
|
||||
foreach($objAnnonces->$classType as $ann)
|
||||
{
|
||||
Zend_Registry::get('firebug')->info('id:'.$ann->id.', deleted:'.$ann->deleted);
|
||||
$annonces[] = $objAnnonces->getAnnonceResume($ann);
|
||||
}
|
||||
$this->view->assign($classType, $annonces);
|
||||
}
|
||||
}
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/annonces.js', 'text/javascript');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Affichage infos réglementées
|
||||
*/
|
||||
public function infosregAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$idAnn = $request->getParam('idann', false);
|
||||
$siren = substr($this->siret, 0,9);
|
||||
$session = new SessionEntreprise($this->siret, $this->id);
|
||||
|
||||
$ws = new WsScores();
|
||||
if ($idAnn!=false) {
|
||||
$this->view->assign('idAnn', $idAnn);
|
||||
$infos = $ws->getInfosReg($siren,$idAnn);
|
||||
} else {
|
||||
$infos = $ws->getInfosReg($siren);
|
||||
}
|
||||
if ($infos === false) $this->_forward('soap', 'error');
|
||||
|
||||
if (is_string($infos)){
|
||||
$this->view->assign('message', $infos);
|
||||
}
|
||||
|
||||
$objAnnonces = $infos->result->item;
|
||||
$annonces = array();
|
||||
if (count($objAnnonces)>0) {
|
||||
foreach ( $objAnnonces as $item ) {
|
||||
$annonces[] = array(
|
||||
'id' => $item->id,
|
||||
'titre' => $item->titre,
|
||||
'communique' => $item->communique,
|
||||
'source' => $item->source,
|
||||
'DateParution' => WDate::dateT('Y-m-d','d/m/Y',$item->DateParution),
|
||||
'dateInsertionSD' => WDate::dateT('Y-m-d','d/m/Y',$item->dateInsertionSD),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$this->view->assign('annonces', $annonces);
|
||||
$this->view->assign('siren', $siren);
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('raisonSociale', $session->getRaisonSociale());
|
||||
$this->view->assign('exportObjet', $infos);
|
||||
}
|
||||
|
||||
/**
|
||||
* Affichage listes des compétences
|
||||
*/
|
||||
public function competencesAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$type = $request->getParam('type', '');
|
||||
$siren = substr($this->siret,0,9);
|
||||
$session = new SessionEntreprise($this->siret, $this->id);
|
||||
|
||||
$abbrev = array(
|
||||
' TGI ' => 'TRIBUNAL DE GRANDE INSTANCE DE ',
|
||||
' TI ' => 'TRIBUNAL D\'INSTANCE DE ',
|
||||
' TC ' => 'TRIBUNAL DE COMMERCE DE ',
|
||||
' TGICC ' => 'TRIBUNAL DE GRANDE INSTANCE A COMPETENCE COMMERCIALE ',
|
||||
' TICC ' => 'TRIBUNAL D\'INSTANCE A COMPETENCE COMMERCIALE '
|
||||
);
|
||||
|
||||
if (!empty($type)){
|
||||
$ws = new WsScores();
|
||||
$infos = $ws->getListeCompetences($siret, $type, $session->getCodeCommune());
|
||||
if ($infos === false) $this->_forward('soap', 'error');
|
||||
|
||||
$competences = $infos->result->item;
|
||||
Zend_Registry::get('firebug')->info($infos);
|
||||
if( $type=='tri' || $type=='cfe' ) {
|
||||
$i=0;
|
||||
foreach($competences as $comp){
|
||||
$competences[$i]->Nom = strtr(' '.strtoupper($comp->Nom), $abbrev);
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
$this->view->assign('competences', $competences);
|
||||
$this->view->assign('type', $type);
|
||||
$this->view->assign('exportObjet', $infos);
|
||||
}
|
||||
|
||||
$this->view->assign('siren', $siren);
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('raisonSociale', $session->getRaisonSociale());
|
||||
}
|
||||
|
||||
/**
|
||||
* Affichage des la listes des conventions collectives
|
||||
* Enter description here ...
|
||||
*/
|
||||
public function conventionsAction()
|
||||
{
|
||||
$siren = substr($this->siret, 0,9);
|
||||
$session = new SessionEntreprise($this->siret, $this->id);
|
||||
$this->view->assign('siren', $siren);
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('raisonSociale', $session->getRaisonSociale());
|
||||
$ws = new WsScores();
|
||||
$infos = $ws->getListeConventions($siren);
|
||||
$conventions = $infos->result->item;
|
||||
Zend_Registry::get('firebug')->info($conventions);
|
||||
$this->view->assign('conventions', $conventions);
|
||||
$this->view->assign('exportObjet', $infos);
|
||||
}
|
||||
|
||||
/**
|
||||
* Affichage des marques déposées
|
||||
*/
|
||||
public function marquesAction()
|
||||
{
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/marques.js', 'text/javascript');
|
||||
|
||||
$request = $this->getRequest();
|
||||
$idObject = $request->getParam('idObject', 0);
|
||||
$siren = substr($this->siret, 0,9);
|
||||
$session = new SessionEntreprise($this->siret, $this->id);
|
||||
$this->view->assign('siren', $siren);
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('raisonSociale', $session->getRaisonSociale());
|
||||
$ws = new WsScores();
|
||||
$infos = $ws->getMarques($siren, $idObject);
|
||||
if ($infos === false) $this->_forward('soap', 'error');
|
||||
|
||||
$marques = $infos->result->item;
|
||||
$this->view->assign('marques', $marques);
|
||||
$this->view->assign('idObject', $idObject);
|
||||
$this->view->assign('exportObjet', $marques);
|
||||
Zend_Registry::get('firebug')->info($infos);
|
||||
}
|
||||
|
||||
/**
|
||||
* Affiche le lien pour télécharger le fichier concernant le dépot
|
||||
*/
|
||||
public function getmarqueAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
$request = $this->getRequest();
|
||||
$numdepot = $request->getParam('numdepot', '');
|
||||
if (empty($numdepot)){
|
||||
echo 'Paramètres incorrects';
|
||||
exit;
|
||||
}
|
||||
$c = Zend_Registry::get('config');
|
||||
$directory = realpath($c->profil->path->data).'/marques';
|
||||
$file = $numdepot.'.pdf';
|
||||
|
||||
//Le fichier n'existe pas alors on le télécharger
|
||||
if(!file_exists($directory.'/'.$file)
|
||||
|| filesize($directory.'/'.$file)==0 ) {
|
||||
$cmd = 'php ' . APPLICATION_PATH . '/../scripts/jobs/getMarque.php ' . $numdepot;
|
||||
Zend_Registry::get('firebug')->info($cmd);
|
||||
$result = exec($cmd);
|
||||
Zend_Registry::get('firebug')->info($result);
|
||||
}
|
||||
//On vérfie que le fichier existe après le téléchargement
|
||||
if(file_exists($directory.'/'.$file) && filesize($directory.'/'.$file)>0) {
|
||||
$href = $this->view->baseUrl().'/fichier/marque/'.$file;
|
||||
echo '<a href="'.$href.'" target="_blank">Télécharger le PDF de l\'insciption au BOPI.</a>';
|
||||
} else {
|
||||
echo 'Document introuvable.';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function bodaccpdfAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
$request = $this->getRequest();
|
||||
|
||||
$type = $request->getParam('type');
|
||||
$annee = $request->getParam('annee');
|
||||
$num = $request->getParam('num');
|
||||
|
||||
//$num doit être retraité pour être sur 4 position
|
||||
$c = strlen($num);
|
||||
for($i=0;$i<4-$c;$i++){
|
||||
$num = '0'.$num;
|
||||
}
|
||||
|
||||
$c = Zend_Registry::get('config');
|
||||
$file = realpath($c->profil->path->data)
|
||||
.'/bodacc/'.$type.'/'.$annee.'/'.
|
||||
'BODACC_'.$type.'_'.$annee.'_'.$num.'.pdf';
|
||||
|
||||
if ( !file_exists($file) ) {
|
||||
exec('php ' . APPLICATION_PATH . "/../scripts/jobs/getBodaccPdf.php $type $annee $num >> getBodaccPdf.log");
|
||||
}
|
||||
|
||||
if (file_exists($file)) {
|
||||
$href = $this->view->url(array(
|
||||
'controller' => 'fichier',
|
||||
'action' => 'bodacc',
|
||||
'fichier' => basename($file),
|
||||
), null, true);
|
||||
echo "<a target=\"_blank\" href=\"".$href."\">Cliquer ici pour télécharger le fichier.</a>";
|
||||
} else {
|
||||
echo "Erreur lors du chargement du fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function annoncenumAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
|
||||
$request = $this->getRequest();
|
||||
$siren = $request->getParam('siren');
|
||||
|
||||
$ws = new WsScores();
|
||||
$result = $ws->getAnnoncesNum($siren);
|
||||
Zend_Registry::get('firebug')->info($result);
|
||||
$numWS = array();
|
||||
if (count($result->item)>0) {
|
||||
foreach ($result->item as $item) {
|
||||
$numWS[$item->type] = $item->num;
|
||||
}
|
||||
}
|
||||
$types = array('bodacc', 'balo', 'boamp', 'asso');
|
||||
|
||||
$num = array();
|
||||
foreach($types as $type) {
|
||||
if ( array_key_exists($type, $numWS) ) {
|
||||
$num['Type'.ucfirst($type)] = $numWS[$type];
|
||||
}
|
||||
}
|
||||
|
||||
$this->view->assign('num', $num);
|
||||
}
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,300 +0,0 @@
|
||||
<?php
|
||||
class TelechargementController extends Zend_Controller_Action
|
||||
{
|
||||
/**
|
||||
* Temps de mis en cache en heure
|
||||
* @var interger
|
||||
*/
|
||||
protected $filetime = 8;
|
||||
|
||||
/**
|
||||
* Répertoire de stockage pour le fichier
|
||||
* @var string
|
||||
*/
|
||||
protected $path = '';
|
||||
|
||||
/**
|
||||
* Vérifie ou télécharge le fichier sur une url
|
||||
* @param string $url
|
||||
* URL of file to download
|
||||
* @param mixed $filename
|
||||
* Override filename
|
||||
*/
|
||||
protected function getFile($url, $filename=null)
|
||||
{
|
||||
if (!is_dir($this->path)) mkdir($this->path);
|
||||
|
||||
require_once 'common/curl.php';
|
||||
|
||||
// Recuperation du nom du fichier
|
||||
if ($filename===null) {
|
||||
$tableau = explode('/', $url);
|
||||
$file = $tableau[sizeof($tableau) - 1];
|
||||
} else {
|
||||
$file = $filename;
|
||||
}
|
||||
|
||||
// Suppression du fichier si le temps de cache est depasse
|
||||
if (file_exists($this->path.'/'.$file)){
|
||||
$dateFile = filemtime($this->path.'/'.$file);
|
||||
$now = mktime(date('G'), date('i'), date('s'),
|
||||
date('m') , date('d'), date('Y'));
|
||||
$maxTime = mktime(date('G',$dateFile)+$this->filetime, date('i',$dateFile),
|
||||
date('s',$dateFile), date('m',$dateFile),
|
||||
date('d',$dateFile), date('Y',$dateFile));
|
||||
if ($maxTime-$now<0) {
|
||||
unlink($this->path.'/'.$file);
|
||||
}
|
||||
}
|
||||
|
||||
// Recuperation du fichier sur le serveur
|
||||
if (!file_exists($this->path.'/'.$file)) {
|
||||
// On check si le fichier est present sur l'url
|
||||
Zend_Registry::get('firebug')->info('URL : '.$url);
|
||||
$url_tab = getUrl($url, '', '', '', false);
|
||||
if ($url_tab['code'] == 408 ||
|
||||
$url_tab['code'] == 400 ||
|
||||
$url_tab['code'] == 404) {
|
||||
// Fichier non disponible
|
||||
Zend_Registry::get('firebug')->info('Fichier non disponible !');
|
||||
return false;
|
||||
} else {
|
||||
// Ecriture du fichier sur le serveur en local
|
||||
$body = $url_tab['body'];
|
||||
Zend_Registry::get('firebug')->info('Taille fichier '.strlen($body));
|
||||
if ( strlen($body) ) {
|
||||
$fp = fopen($this->path.'/'.$file, 'w');
|
||||
fwrite($fp, $body);
|
||||
fclose($fp);
|
||||
Zend_Registry::get('firebug')->info('Ecriture fichier : '.$this->path.'/'.$file);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $file;
|
||||
}
|
||||
|
||||
public function init()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
||||
$c = Zend_Registry::get('config');
|
||||
$this->path = $c->profil->path->files;
|
||||
|
||||
require_once 'Scores/WsScores.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* Télécharge la consommation client sous forme de fichier csv et affiche le lien
|
||||
*/
|
||||
public function consommationAction()
|
||||
{
|
||||
$this->filetime = 1;
|
||||
|
||||
$request = $this->getRequest();
|
||||
$start = $request->getParam('start', false);
|
||||
|
||||
//On souhaite récupérer l'url du fichier
|
||||
if ($start==1) {
|
||||
$mois = $request->getParam('mois');
|
||||
$detail = $request->getParam('detail', 0);
|
||||
$idClient = $request->getParam('idClient', 0);
|
||||
$login = $request->getParam('login', '');
|
||||
$all = $request->getParam('all', 0);
|
||||
|
||||
$date = substr($mois, 3, 4).substr($mois, 0, 2);
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
if (empty($login) && (!$user->isAdmin() && !$user->isSuperAdmin()) ) {
|
||||
$login = $user->getLogin();
|
||||
}
|
||||
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getLogsClients($date, $detail, $idClient, $login, $all);
|
||||
|
||||
if (!empty($reponse->result->Url)) {
|
||||
echo $reponse->result->Url;
|
||||
} else {
|
||||
echo 'FALSE';
|
||||
}
|
||||
} else {
|
||||
$url = $request->getParam('url', '');
|
||||
$file = $this->getFile($url);
|
||||
|
||||
// Le fichier existe sur l'extranet
|
||||
if ($file && file_exists($this->path.'/'.$file)) {
|
||||
if (filesize($this->path.'/'.$file) > 0) {
|
||||
echo '<u><a title="Té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->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->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()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
|
||||
$q = $request->getParam('q', '');
|
||||
$host = base64_decode($request->getParam('host', ''));
|
||||
|
||||
//Authenticate info
|
||||
$auth = Zend_Auth::getInstance();
|
||||
$identity = $auth->getIdentity();
|
||||
$authinfo = '/login/'.$identity->username.'/hach/'.$identity->password;
|
||||
$url = $host.$authinfo.'/q/'.$q;
|
||||
|
||||
Zend_Registry::get('firebug')->info($url);
|
||||
|
||||
$file = $this->getFile($url, uniqid('histo-').'.pdf');
|
||||
|
||||
// Le fichier existe sur l'extranet
|
||||
if ($file && file_exists($this->path.'/'.$file)) {
|
||||
if (filesize($this->path.'/'.$file) > 0) {
|
||||
echo '<u><a title="Té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.";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Download bilan pdf file
|
||||
*/
|
||||
public function bilanAction()
|
||||
{
|
||||
$this->filetime = 40;
|
||||
|
||||
$request = $this->getRequest();
|
||||
$siren = $request->getParam('siren');
|
||||
$dateCloture = $request->getParam('dateCloture');
|
||||
$reference = $request->getParam('reference');
|
||||
|
||||
//Récupération du l'URL
|
||||
require_once 'Scores/WsScores.php';
|
||||
$ws = new WsScores();
|
||||
$url = $ws->getPiecesBilan($siren, 'T', $dateCloture, $reference);
|
||||
|
||||
//Téléchargement
|
||||
if( $url !== false) {
|
||||
Zend_Registry::get('firebug')->info($url);
|
||||
$file = $this->getFile($url);
|
||||
Zend_Registry::get('firebug')->info('File:'.$this->path.'/'.$file);
|
||||
// Le fichier existe sur l'extranet
|
||||
if ($file && file_exists($this->path.'/'.$file)) {
|
||||
if (filesize($this->path.'/'.$file) > 0) {
|
||||
echo '<br/><u><a title="Té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,680 +0,0 @@
|
||||
<?php
|
||||
class UserController extends Zend_Controller_Action
|
||||
{
|
||||
/**
|
||||
* Récupére les valeurs du profil depuis le webservice
|
||||
* @param unknown_type $login
|
||||
* @param unknown_type $password
|
||||
*/
|
||||
protected function updateProfil($login, $password)
|
||||
{
|
||||
Zend_Registry::get('firebug')->info('updateProfil');
|
||||
$ws = new WsScores();
|
||||
$utilisateur = new Scores_Utilisateur();
|
||||
$InfosLogin = $ws->getInfosLogin($login, $_SERVER['REMOTE_ADDR']);
|
||||
$identity = new stdClass;
|
||||
$identity->username = $login;
|
||||
$identity->password = $password;
|
||||
$identity->email = $InfosLogin->result->email;
|
||||
$identity->profil = $InfosLogin->result->profil;
|
||||
$identity->pref = $InfosLogin->result->pref;
|
||||
$identity->droits = $InfosLogin->result->droits;
|
||||
$identity->droitsClients = $InfosLogin->result->droitsClients;
|
||||
$identity->nom = $InfosLogin->result->nom;
|
||||
$identity->prenom = $InfosLogin->result->prenom;
|
||||
$identity->tel = $InfosLogin->result->tel;
|
||||
$identity->fax = $InfosLogin->result->fax;
|
||||
$identity->mobile = $InfosLogin->result->mobile;
|
||||
$identity->id = $InfosLogin->result->id;
|
||||
$identity->idClient = $InfosLogin->result->idClient;
|
||||
$identity->reference = $InfosLogin->result->reference;
|
||||
$identity->nbReponses = $InfosLogin->result->nbReponses;
|
||||
$identity->typeScore = $InfosLogin->result->typeScore;
|
||||
$identity->dateValidation = $InfosLogin->result->dateValidation;
|
||||
$identity->nombreConnexions = $InfosLogin->result->nombreConnexions;
|
||||
$identity->dateDerniereConnexion = $InfosLogin->result->dateDerniereConnexion;
|
||||
$identity->dateDebutCompte = $InfosLogin->result->dateDebutCompte;
|
||||
$identity->dateFinCompte = $InfosLogin->result->dateFinCompte;
|
||||
$identity->ip = $_SERVER['REMOTE_ADDR'];
|
||||
$identity->timeout = (!empty($InfosLogin->result->timeout)) ?
|
||||
$InfosLogin->result->timeout : 1800;
|
||||
$identity->time = time() + $identity->timeout;
|
||||
$identity->modeEdition = false;
|
||||
$identity->acceptationCGU = $InfosLogin->result->acceptationCGU;
|
||||
$lang = in_array($InfosLogin->result->lang,array('fr','en')) ? $InfosLogin->result->lang : 'fr';
|
||||
$identity->lang = $lang;
|
||||
$identity->langtmp = $lang;
|
||||
$identity->browser = $utilisateur->getBrowserInfo();
|
||||
return $identity;
|
||||
}
|
||||
|
||||
public function init()
|
||||
{
|
||||
require_once 'Scores/WsScores.php';
|
||||
$this->view->headLink()->appendStylesheet('/themes/default/styles/user.css', 'all');
|
||||
}
|
||||
|
||||
/**
|
||||
* Affiche le fomulaire d'edition des paramètres utilisateur
|
||||
*/
|
||||
public function indexAction()
|
||||
{
|
||||
$user = new Scores_Utilisateur();
|
||||
|
||||
if (!$user->checkPerm('MONPROFIL')){
|
||||
$this->_forward('perms', 'error');
|
||||
}
|
||||
|
||||
$this->view->assign('device_type', $user->getBrowserInfo()->mobile);
|
||||
$this->view->assign('browser_info', $user->getBrowserInfo()->name.' '.$user->getBrowserInfo()->version);
|
||||
|
||||
$this->view->headLink()->appendStylesheet('/themes/default/styles/form.css', 'all');
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/user.js', 'text/javascript');
|
||||
|
||||
$request = $this->getRequest();
|
||||
|
||||
$messages = '';
|
||||
$isProfilUpdated = false;
|
||||
$isPasswordUpdated = false;
|
||||
$updateResult = false;
|
||||
|
||||
$ws = new WsScores();
|
||||
|
||||
$login = $request->getParam('login', '');
|
||||
$op = $request->getParam('op');
|
||||
|
||||
//Récupération des informations de l'identité
|
||||
$auth = Zend_Auth::getInstance();
|
||||
$identity = $auth->getIdentity();
|
||||
|
||||
//Save data
|
||||
if ( $request->isPost() ) {
|
||||
$options = $request->getParam('frmOptions', '');
|
||||
$action = $options['action'];
|
||||
|
||||
if ($login=='') $login = $options['login'];
|
||||
|
||||
//Enregistrement des données new & update
|
||||
if (in_array($action, array('new','update'))) {
|
||||
|
||||
if ($options['changepwd']!=1) {
|
||||
$options['password'] = '';
|
||||
}
|
||||
|
||||
if ( in_array($options['profil'], array('Administrateur', 'SuperAdministrateur'))
|
||||
&& !in_array('monprofil', $options['droits']) ) {
|
||||
$options['droits'][] = 'monprofil';
|
||||
}
|
||||
|
||||
if( !isset($options['profil']) ) {
|
||||
$options['profil'] = 'Utilisateur';
|
||||
}
|
||||
|
||||
$reponse = $ws->setInfosLogin($login, $action, $options);
|
||||
|
||||
$isProfilUpdated = true;
|
||||
$message = 'Erreur lors de la mise à jour du compte !';
|
||||
if (is_string($reponse)) {
|
||||
$message = $reponse;
|
||||
} elseif ($reponse){
|
||||
$updateResult = true;
|
||||
$message = 'Compte mis à jour.';
|
||||
}
|
||||
}
|
||||
|
||||
//Write change in session
|
||||
if ($identity->idClient == $options['idClient'] && $identity->username == $login) {
|
||||
//Modification lors du changement de mot de passe
|
||||
if ($options['changepwd']==1 && $updateResult) {
|
||||
|
||||
$identity->password = md5($login.'|'.$options['password']);
|
||||
$auth->getStorage()->write($identity);
|
||||
|
||||
}
|
||||
//Mise à jour du profil
|
||||
if ($isProfilUpdated && $updateResult) {
|
||||
|
||||
$identity = $this->updateProfil($identity->username, $identity->password);
|
||||
$auth->getStorage()->write($identity);
|
||||
|
||||
}
|
||||
//Gestion mode edition en SESSION
|
||||
if ($action=='update') {
|
||||
$modeEdition = $request->getParam('modeEdition', false);
|
||||
if ( $modeEdition ) {
|
||||
|
||||
$identity->modeEdition = true;
|
||||
$auth->getStorage()->write($identity);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( $isProfilUpdated || $isPasswordUpdated ) {
|
||||
$this->view->assign('message', $message);
|
||||
}
|
||||
|
||||
$isAdmin = false;
|
||||
if ( $identity->profil == 'Administrateur'
|
||||
|| $identity->profil == 'SuperAdministrateur' ) {
|
||||
$isAdmin = true;
|
||||
}
|
||||
$this->view->assign('isAdmin', $isAdmin);
|
||||
|
||||
$isSuperAdmin = false;
|
||||
if ($identity->profil == 'SuperAdministrateur') {
|
||||
$isSuperAdmin = true;
|
||||
}
|
||||
$this->view->assign('isSuperAdmin', $isSuperAdmin);
|
||||
|
||||
if ($op=='new')
|
||||
{
|
||||
$idClient = $request->getParam('idClient', '');
|
||||
if ($idClient == '') {
|
||||
$idClient = $identity->idClient;
|
||||
}
|
||||
$reponse = $ws->getNextLogin($idClient);
|
||||
$options->idClient = $idClient;
|
||||
if ($identity->idClient!=1 && $identity->profil!='SuperAdministrateur') {
|
||||
$options->profil = 'Utilisateur';
|
||||
}
|
||||
$this->view->assign('options', $options);
|
||||
|
||||
$this->view->assign('loginNew', $reponse->result->racine);
|
||||
$this->view->assign('droitsClients', explode(' ', strtolower($reponse->result->droitsClients)));
|
||||
$this->view->assign('action', 'new');
|
||||
$this->view->assign('pref', array());
|
||||
}
|
||||
elseif (!empty($op) || $op!='new')
|
||||
{
|
||||
if ( !empty($login) && $identity->username != $login ) {
|
||||
Zend_Registry::get('firebug')->info('getInfosLogin');
|
||||
$reponse = $ws->getInfosLogin($login, $_SERVER['REMOTE_ADDR']);
|
||||
$this->view->assign('options', $reponse->result);
|
||||
$this->view->assign('loginVu', $reponse->result->login);
|
||||
$this->view->assign('droits', explode(' ', strtolower($reponse->result->droits)));
|
||||
$this->view->assign('droitsClients', explode(' ', strtolower($reponse->result->droitsClients)));
|
||||
} else {
|
||||
$this->view->assign('options', $identity);
|
||||
$this->view->assign('loginVu', $identity->username);
|
||||
$this->view->assign('droits', explode(' ', strtolower($identity->droits)));
|
||||
$this->view->assign('droitsClients', explode(' ', strtolower($identity->droitsClients)));
|
||||
}
|
||||
$this->view->assign('loginNew', '');
|
||||
$this->view->assign('action', 'update');
|
||||
$this->view->assign('pref', explode(' ',$identity->pref));
|
||||
}
|
||||
|
||||
//Liste des catégories des accès
|
||||
$reponse = $ws->getCategory();
|
||||
$wscategory = $reponse->item;
|
||||
$this->view->assign('wscategory', $wscategory);
|
||||
|
||||
//Liste de tous les droits
|
||||
$listeDroits = $ws->getListeDroits();
|
||||
$droitsLib = array();
|
||||
foreach($listeDroits->item as $droit) {
|
||||
$droitsLib[strtoupper($droit->code)] = $droit->desc;
|
||||
}
|
||||
$this->view->assign('droitsLib', $droitsLib);
|
||||
|
||||
//Liste de toutes les préférences
|
||||
$listePrefs = $ws->getListePrefs();
|
||||
$prefsLib = array();
|
||||
foreach($listePrefs->item as $pref) {
|
||||
$prefsLib[strtoupper($pref->code)] = $pref->desc;
|
||||
}
|
||||
$this->view->assign('prefsLib', $prefsLib);
|
||||
}
|
||||
|
||||
/**
|
||||
* Display box to enter emails
|
||||
* One main email and two secondary
|
||||
* Email length 80 * 3 = 240
|
||||
* 255 chars is the length to store emails (email1;email2;email3)
|
||||
*/
|
||||
public function emailsAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
|
||||
$nbEmails = 3;
|
||||
|
||||
$request = $this->getRequest();
|
||||
$emails = $request->getParam('q');
|
||||
|
||||
if (null !== $emails) {
|
||||
$emailList = explode(';', $emails);
|
||||
if ( count($emailList)>0 ) {
|
||||
$i = 1;
|
||||
foreach ( $emailList as $email ) {
|
||||
$this->view->assign('email'.$i, $email);
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate email
|
||||
*/
|
||||
public function emailvalidAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
|
||||
$request = $this->getRequest();
|
||||
$email = $request->getParam('q');
|
||||
|
||||
$valid = false;
|
||||
|
||||
if (null !== $email) {
|
||||
$validateur = new Zend_Validate_EmailAddress();
|
||||
$valid = $validateur->isValid($email);
|
||||
}
|
||||
|
||||
$result = array(
|
||||
'valid' => $valid,
|
||||
);
|
||||
|
||||
$this->view->assign('result', $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Téléchargement de la consommation au format CSV
|
||||
*/
|
||||
public function consoAction()
|
||||
{
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/conso.js', 'text/javascript');
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
|
||||
$request = $this->getRequest();
|
||||
$idClient = $request->getParam('idClient', $user->getIdClient());
|
||||
$login = $request->getParam('login', '');
|
||||
|
||||
$this->view->assign('idClient', $idClient);
|
||||
$this->view->assign('login', $login);
|
||||
$this->view->assign('profil', $user->getProfil());
|
||||
}
|
||||
|
||||
/**
|
||||
* Renvoi vers le formulaire utilisateur avec les paramètres de la requete
|
||||
*/
|
||||
public function editAction()
|
||||
{
|
||||
$params = $this->getRequest()->getParams();
|
||||
$this->_forward('index', 'user', null, $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Suppression d'un utilisateur
|
||||
*/
|
||||
public function deleteAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$login = $request->getParam('login');
|
||||
$action = 'delete';
|
||||
$ws = new WsScores();
|
||||
$ws->setInfosLogin($login, $action);
|
||||
//Redirect
|
||||
$this->_forward('liste');
|
||||
}
|
||||
|
||||
/**
|
||||
* Activation d'un utilisateur
|
||||
*/
|
||||
public function enableAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$login = $request->getParam('login');
|
||||
$action = 'enable';
|
||||
$ws = new WsScores();
|
||||
$ws->setInfosLogin($login, $action);
|
||||
//Redirect
|
||||
$this->_forward('liste');
|
||||
}
|
||||
|
||||
/**
|
||||
* Désactivation d'un utilisateur
|
||||
*/
|
||||
public function disableAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$login = $request->getParam('login');
|
||||
$action = 'disable';
|
||||
$ws = new WsScores();
|
||||
$ws->setInfosLogin($login, $action);
|
||||
//Redirect
|
||||
$this->_forward('liste');
|
||||
}
|
||||
|
||||
/**
|
||||
* Méthode AJAX pour modifier le password d'un utilisateur
|
||||
*/
|
||||
public function changepwdAction()
|
||||
{
|
||||
//Redirect
|
||||
}
|
||||
|
||||
/**
|
||||
* Affiche la liste des utiliateurs
|
||||
*/
|
||||
public function listeAction()
|
||||
{
|
||||
$user = new Scores_Utilisateur();
|
||||
|
||||
$request = $this->getRequest();
|
||||
$idClient = $request->getParam('idClient', $user->getIdClient());
|
||||
|
||||
if (!$user->isSuperAdmin() && !$user->isAdmin()) {
|
||||
$this->renderScript('error/perms.phtml');
|
||||
}
|
||||
if ($user->isAdmin()){
|
||||
$idClient = $user->getIdClient();
|
||||
}
|
||||
$ws = new WsScores();
|
||||
$infos = $ws->getListeUtilisateurs($user->getLogin(), $idClient);
|
||||
$utilisateurs = $infos->result->item;
|
||||
$this->view->assign('utilisateurs', $utilisateurs);
|
||||
$this->view->assign('idClient', $idClient);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion de l'authentification
|
||||
*/
|
||||
public function loginAction()
|
||||
{
|
||||
$this->view->headScript()
|
||||
->appendFile('/libs/jquery/jquery.infieldlabel.min.js');
|
||||
|
||||
//@todo : gestion des affichages particuliers pour les clients
|
||||
$this->view->headTitle()->append('Connexion');
|
||||
$form = new Application_Form_Login();
|
||||
$this->view->form = $form;
|
||||
$request = $this->getRequest();
|
||||
if ( $request->isPost() ) {
|
||||
$formData = $request->getPost ();
|
||||
if ($form->isValid($formData)) {
|
||||
$login = $form->getValue('login');
|
||||
$pass = $form->getValue('pass');
|
||||
|
||||
$auth = Zend_Auth::getInstance();
|
||||
$authAdapter = new Scores_AuthAdapter($login, md5($login.'|'.$pass));
|
||||
$result = $auth->authenticate($authAdapter);
|
||||
|
||||
//Auth is valid
|
||||
if ( $result->isValid() ) {
|
||||
|
||||
//Save browser information
|
||||
$screenSize = $request->getParam('screenSize', 'unknow');
|
||||
$user = new Scores_Utilisateur();
|
||||
$info = get_browser();
|
||||
$isMobile = ($info->ismobiledevice==1) ? 1 : 0;
|
||||
$user->setBrowserInfo($info->platform, $info->browser, $info->version, $isMobile, $screenSize);
|
||||
|
||||
//Get previous url if user has been disconnected
|
||||
$url = '';
|
||||
if (Zend_Session::namespaceIsset('login')){
|
||||
$session = new Zend_Session_Namespace('login');
|
||||
if (isset($session->url)) {
|
||||
$url = $session->url;
|
||||
}
|
||||
}
|
||||
if (!empty($url) && $url!='/user/login' && $url!='/user/logout' && $url!='/localauth'){
|
||||
$this->_redirect($url);
|
||||
}
|
||||
$this->_redirect('/');
|
||||
}
|
||||
//Auth error
|
||||
else {
|
||||
|
||||
$this->view->message = '';
|
||||
Zend_Registry::get('firebug')->info($result);
|
||||
foreach ($result->getMessages() as $message) {
|
||||
$this->view->message.= $message."<br/>";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->_helper->layout()->disableLayout();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion de la déconnexion
|
||||
*/
|
||||
public function logoutAction()
|
||||
{
|
||||
Zend_Auth::getInstance()->clearIdentity();
|
||||
$this->_helper->layout()->disableLayout();
|
||||
|
||||
$request = $this->getRequest();
|
||||
$message = $request->getParam('message');
|
||||
$this->view->assign('message', $message);
|
||||
|
||||
$ajax = $request->getParam('ajax', 0);
|
||||
$this->view->assign('ajax', $ajax);
|
||||
|
||||
$refresh = 5;
|
||||
|
||||
$url = 'http://'.$_SERVER['SERVER_NAME'].$this->view->url(array(
|
||||
'controller' => 'user',
|
||||
'action' => 'login',
|
||||
), null, true);
|
||||
|
||||
$this->view->assign('url', $url);
|
||||
|
||||
if (!$ajax) {
|
||||
$this->view->assign('refresh', $refresh);
|
||||
$this->view->headMeta()->appendHttpEquiv('refresh', $refresh.'; url='.$url);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Mettre à jour le mode edition en session sans refresh de la page
|
||||
*/
|
||||
public function editionsessionAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
$request = $this->getRequest();
|
||||
$mode = $request->getParam('mode', 'false');
|
||||
$auth = Zend_Auth::getInstance();
|
||||
$identity = $auth->getIdentity();
|
||||
if ($identity->idClient == 1) {
|
||||
if ($mode == 'false') {
|
||||
$identity->modeEdition = false;
|
||||
echo 0;
|
||||
} else {
|
||||
$identity->modeEdition = true;
|
||||
echo 1;
|
||||
}
|
||||
$auth->getStorage()->write($identity);
|
||||
} else {
|
||||
echo 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Override email in surveillance portfolio
|
||||
*/
|
||||
public function emailsurveillanceAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$request = $this->getRequest();
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
|
||||
//Execute webservice operation
|
||||
if ( $request->isPost() ) {
|
||||
$email = trim($request->getParam('email'));
|
||||
if ($user->isAdmin() || $user->isSuperAdmin()) {
|
||||
$login = $request->getParam('login');
|
||||
}
|
||||
|
||||
if (empty($email)) {
|
||||
$result = "Aucun email défini!";
|
||||
} else if (empty($login)) {
|
||||
$result = "Aucun utilisateur défini!";
|
||||
} else {
|
||||
$ws = new WsScores();
|
||||
$result = $ws->setSurveillancesMail($login, $email);
|
||||
}
|
||||
|
||||
$this->view->assign('result', $result);
|
||||
}
|
||||
//Display form in dialog
|
||||
else {
|
||||
if ($user->isAdmin() || $user->isSuperAdmin()) {
|
||||
$login = $request->getParam('login');
|
||||
} else {
|
||||
$login = $user->getLogin();
|
||||
}
|
||||
$this->view->assign('login', $login);
|
||||
$this->view->assign('dialog',true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Changer la langue de l'utilisateur
|
||||
*/
|
||||
public function langAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
||||
$lang = $this->getRequest()->getParam('lang', null);
|
||||
|
||||
$auth = Zend_Auth::getInstance();
|
||||
$identity = $auth->getIdentity();
|
||||
|
||||
$identity->langtmp = $lang;
|
||||
|
||||
$auth->getStorage()->write($identity);
|
||||
}
|
||||
|
||||
/**
|
||||
* Changer le theme de l'utilisateur
|
||||
*/
|
||||
public function changethemeAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
||||
$request = $this->getRequest();
|
||||
$nom = $request->getParam('nom', 'default');
|
||||
|
||||
$auth = Zend_Auth::getInstance();
|
||||
$identity = $auth->getIdentity();
|
||||
|
||||
$identity->theme = $nom;
|
||||
|
||||
$auth->getStorage()->write($identity);
|
||||
|
||||
//Rediriger vers l'écran de recherche
|
||||
$this->_redirect('/');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Display browser informations on a simple page
|
||||
*/
|
||||
public function browserAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
||||
//Load bootstrap
|
||||
$bootstrap = Zend_Controller_Front::getInstance()->getParam('bootstrap');
|
||||
|
||||
//Get useragent and device informations
|
||||
$userAgent = $bootstrap->getResource('useragent');
|
||||
$device = $userAgent->getDevice();
|
||||
|
||||
//Display
|
||||
echo "<pre>";
|
||||
print_r(get_browser());
|
||||
print_r($device->getAllFeatures());
|
||||
echo "</pre>";
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends email to the specific client, who requests for forgotten password
|
||||
*/
|
||||
public function motpasseAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$name = 'Identifiants oubliés ?';
|
||||
$params = array(
|
||||
'identifiant' => '',
|
||||
'telephone' => '',
|
||||
'email' => '',
|
||||
'nom' => '',
|
||||
'prenom' => '',
|
||||
'fonction' => '',
|
||||
'service' => '',
|
||||
'rsociale' => '',
|
||||
);
|
||||
|
||||
$this->_helper->layout()->disableLayout();
|
||||
if ( $request->isPost() ) {
|
||||
$params = $request->getParams();
|
||||
$message = '';
|
||||
|
||||
$paramlist = array(
|
||||
'telephone' => 'Numéro de téléphone direct',
|
||||
'email' => 'Adresse email',
|
||||
'nom' => 'Nom',
|
||||
'prenom' => 'Prénom',
|
||||
'fonction' => 'Fonction',
|
||||
'service' => 'Service',
|
||||
'rsociale' => 'Sociale',
|
||||
);
|
||||
|
||||
foreach ($paramlist as $item => $val) {
|
||||
if (!isset($params[$item])) {
|
||||
$message .= "Champs $val vide !<br/>";
|
||||
}
|
||||
}
|
||||
|
||||
$validator = new Zend_Validate_EmailAddress();
|
||||
if (isset($params['email'])){
|
||||
if (!$validator->isValid($params['email'])) {
|
||||
$message .="Adresse email invalide ! <br/>";
|
||||
}
|
||||
}
|
||||
|
||||
if ($message == '') {
|
||||
|
||||
$mailbody = '<style type="text/css">table {font-family:Arial, Helvetica, sans-serif; font-size: 12px; width: 550px; border: none;}table td{padding: 4px 8px;}</style>';
|
||||
$mailbody .= "Demande de envoi des identifiants<br /><br />";
|
||||
$mailbody .= "S'il vous plaît envoyez-moi encore une fois l'identifiant et/ou le mot de passe qui me permettra d'avoir un accès au site.";
|
||||
$mailbody .= "<p>Ci-dessous, les informations nécessaire pour me contacter:</p>";
|
||||
$mailbody .= "<table><tr bgcolor='#eeeeee'><td width='200px'><strong>Identifiant :</strong></td><td>".$params['identifiant']."</td></tr>";
|
||||
$mailbody .= "<tr><td><strong>Adresse email:</strong></td><td>".$params['email']."</td></tr>";
|
||||
$mailbody .= "<tr bgcolor='#eeeeee'><td><strong>Numéro de téléphone direct:</strong></td><td>".$params['telephone']."</td></tr>";
|
||||
$mailbody .= "<tr><td><strong>Nom:</strong></td><td>".$params['nom']."</td></tr>";
|
||||
$mailbody .= "<tr bgcolor='#eeeeee'><td><strong>Prénom:</strong></td><td>".$params['prenom']."</td></tr>";
|
||||
$mailbody .= "<tr><td><strong>Fonction:</strong></td><td>".$params['fonction']."</td></tr>";
|
||||
$mailbody .= "<tr bgcolor='#eeeeee'><td><strong>Service:</strong></td><td>".$params['service']."</td></tr>";
|
||||
$mailbody .= "<tr><td><strong>Raison Sociale:</strong></td><td>".$params['rsociale']."</td></tr></table>";
|
||||
|
||||
require_once 'Scores/Mail.php';
|
||||
$mail = new Mail();
|
||||
$mail->setSubject("Demande de envoi des identifiants");
|
||||
$mail->setBodyHTML($mailbody);
|
||||
$mail->setFrom('support');
|
||||
$mail->addToKey('support');
|
||||
$mail->setReplyTo($params['email']);
|
||||
try {
|
||||
$mail->send();
|
||||
$message = "Votre demande avec les informations suivantes a été envoyée. Nous vous contacterons prochainement.";
|
||||
}
|
||||
catch ( Zend_Mail_Transport_Exception $e ){
|
||||
$message = $e->getMessage();
|
||||
}
|
||||
}
|
||||
$this->view->assign('message', $message);
|
||||
}
|
||||
$this->view->assign('params', $params);
|
||||
}
|
||||
}
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -1,31 +1,4 @@
|
||||
<?php
|
||||
//General
|
||||
$this->translate('Scores & Decisions');
|
||||
$this->translate('Page');
|
||||
$this->translate('Dernière mise à jour le');
|
||||
$this->translate('Oui');
|
||||
$this->translate('Non');
|
||||
$this->translate('Edition');
|
||||
$this->translate('Mettre sous surveillance');
|
||||
$this->translate('Néant');
|
||||
$this->translate('Aucune information');
|
||||
$this->translate('Mois');
|
||||
|
||||
//Bouttons
|
||||
$this->translate('Recherche');
|
||||
$this->translate('Effacer');
|
||||
$this->translate('Ok');
|
||||
$this->translate('Sauver');
|
||||
$this->translate('ici');
|
||||
$this->translate('Modifier le client');
|
||||
$this->translate('Valider');
|
||||
|
||||
//Header
|
||||
|
||||
//Footer
|
||||
$this->translate('Mentions légales');
|
||||
$this->translate('Scores & Decisions SAS - Tous droits réservés - ');
|
||||
|
||||
//Menu
|
||||
$this->translate('RECHERCHES');
|
||||
$this->translate('Rechercher une entreprise');
|
||||
@ -92,868 +65,4 @@ $this->translate('GESTION S&D');
|
||||
$this->translate('Gestion');
|
||||
$this->translate('Saisie / Edition');
|
||||
$this->translate('Saisie Fiche Etrangère');
|
||||
|
||||
//Rechercher une entreprise
|
||||
$this->translate('RECHERCHE ENTREPRISE');
|
||||
$this->translate('SIREN');
|
||||
$this->translate('RAISON SOCIALE / ENSEIGNE / SIGLE');
|
||||
$this->translate('N° & Voie');
|
||||
$this->translate('CP OU DÉP. / VILLE');
|
||||
$this->translate('TÉL / FAX');
|
||||
$this->translate('NAF');
|
||||
$this->translate('Forme Juridique');
|
||||
$this->translate('Pays');
|
||||
$this->translate('Recherche par SIREN, SIRET, N° TVA intracommunautaire, N° RC, R.N.A., ISIN');
|
||||
$this->translate('Accès direct à la fiche identité (Racourci clavier : Maintenir CTRL puis ENTREE)');
|
||||
$this->translate('France');
|
||||
$this->translate('Belgique');
|
||||
$this->translate('Espagne');
|
||||
$this->translate('Royaume-Uni');
|
||||
$this->translate('Pays-Bas');
|
||||
|
||||
//Rechercher par dirigeant
|
||||
$this->translate('RECHERCHE DIRIGEANT');
|
||||
$this->translate('PRENOM');
|
||||
$this->translate('NOM');
|
||||
$this->translate('DATE NAISSANCE');
|
||||
$this->translate('CP OU DEP. / VILLE DE NAISSANCE');
|
||||
|
||||
//Rechercher une annonce
|
||||
$this->translate('Rechercher une annonce');
|
||||
$this->translate('Source');
|
||||
$this->translate('Bodacc');
|
||||
$this->translate('Historique jusqu\'à');
|
||||
$this->translate('Année ou Date de parution');
|
||||
$this->translate('Numéro de parution');
|
||||
$this->translate('Page');
|
||||
$this->translate('Numéro d\'annonce');
|
||||
$this->translate('BODACC / BORC');
|
||||
$this->translate('JO Association');
|
||||
$this->translate('BALO');
|
||||
$this->translate('Désélection');
|
||||
|
||||
//Rechercher par actionnaire
|
||||
$this->translate('RECHERCHE PAR ACTIONNAIRE');
|
||||
$this->translate('SIREN');
|
||||
$this->translate('RAISON SOCIAL / NOM');
|
||||
$this->translate('CP OU DEP./VILLE');
|
||||
$this->translate('PAYS');
|
||||
$this->translate('PAR ACTION, DE');
|
||||
$this->translate('A');
|
||||
|
||||
//Dernière recherche
|
||||
$this->translate('réponses avec les critères');
|
||||
$this->translate('résultats affichés.');
|
||||
$this->translate('Exporter les résultats de la recherche en CSV.');
|
||||
$this->translate('Si aucun résultat ne correspond à votre recherche.');
|
||||
$this->translate('Cliquez-ici.');
|
||||
$this->translate('Afficher tous les résultats');
|
||||
$this->translate('Afficher uniquement les actifs');
|
||||
$this->translate('Afficher uniquement les inactifs');
|
||||
|
||||
//Liste des dernières recherches
|
||||
$this->translate('LISTE DE VOS DERNIÈRES RECHERCHE');
|
||||
$this->translate('RECHERCHE ENTREPRISE');
|
||||
$this->translate('Lancer la recherche');
|
||||
$this->translate('Afficher le formulaire');
|
||||
|
||||
//Fiche d'identité
|
||||
$this->translate('FICHE D\'IDENTITÉ');
|
||||
$this->translate('Numéro identifiant Siret');
|
||||
$this->translate('Numéro de TVA Intracom.');
|
||||
$this->translate('Numéro R.C.');
|
||||
$this->translate('Etablissement actif');
|
||||
$this->translate('Situation au répertoire SIRENE');
|
||||
$this->translate('Situation juridique Actif au RCS');
|
||||
$this->translate('Raison sociale & Coordonnées');
|
||||
$this->translate('Raison Sociale');
|
||||
$this->translate('Forme juridique');
|
||||
$this->translate('Date d\'immatriculation');
|
||||
$this->translate('Création de l\'entreprise');
|
||||
$this->translate('Création de l\'établissement');
|
||||
$this->translate('Adresse');
|
||||
$this->translate('Téléphone');
|
||||
$this->translate('Fax');
|
||||
$this->translate('Site Internet');
|
||||
$this->translate('Courriel');
|
||||
$this->translate('Activité(s) & Chiffre d\'affaires');
|
||||
$this->translate('Activité de l\'entreprise');
|
||||
$this->translate('Activité de l\'établissement');
|
||||
$this->translate('Anciens codes NAF');
|
||||
$this->translate('Codes NACE');
|
||||
$this->translate('Type d\'exploitation');
|
||||
$this->translate('Nombre d\'établissements actifs');
|
||||
$this->translate('Capital');
|
||||
$this->translate('Chiffre d\'affaires estimé');
|
||||
$this->translate('Principaux Dirigeants');
|
||||
$this->translate('Effectif de l\'entreprise');
|
||||
$this->translate('Localisation géographique');
|
||||
$this->translate('Information géographique :');
|
||||
$this->translate('Latitude :');
|
||||
$this->translate('Longitude :');
|
||||
$this->translate('Afficher l\'adresse sur Google Map');
|
||||
$this->translate('Code commune / Rivoli :');
|
||||
$this->translate('Iris :');
|
||||
$this->translate('Code :');
|
||||
$this->translate('Libellé :');
|
||||
$this->translate('Information presse (Source Google News ©)');
|
||||
$this->translate('La consultation ou la réception de documents n\'entraîne aucun transfert de droit de propriété intellectuelle en faveur du Client. Ce dernier s\'engage à ne pas rediffuser ou reproduire les données fournies autrement que pour son usage dans le cadre de la relation contractuelle établie entre Scores & Decisions SAS et "le Client".');
|
||||
|
||||
//Fiche Procédure Collective
|
||||
$this->translate('FICHE PROCÉDURE COLLECTIVES');
|
||||
$this->translate('Numéro identifiant Siret');
|
||||
$this->translate('Numéro de TVA Intracom.');
|
||||
$this->translate('Code ISIN');
|
||||
$this->translate('Capitalisation');
|
||||
$this->translate('Numéro R.C.');
|
||||
$this->translate('Etablissement actif');
|
||||
$this->translate('Raison sociale & Coordonnées');
|
||||
$this->translate('Raison Sociale');
|
||||
$this->translate('Forme juridique');
|
||||
$this->translate('Composition et répartition du capital social');
|
||||
$this->translate('Information à vérifier dans les derniers statuts');
|
||||
$this->translate('Diminution de capital');
|
||||
$this->translate('Augmentation de capital');
|
||||
$this->translate('publié au');
|
||||
$this->translate('Organes de la procédure');
|
||||
$this->translate('Types de procédure');
|
||||
$this->translate('Potentiel de récupération et réalisation d\'actifs');
|
||||
$this->translate('Dépôt des comptes annuels et des comptes consolidés');
|
||||
$this->translate('Dépôt des comptes annuels');
|
||||
$this->translate('Dépôt des comptes consolidés');
|
||||
$this->translate('Jugements de clôture');
|
||||
$this->translate('Autres événements');
|
||||
$this->translate('Procédure d\'insolvabilité européene');
|
||||
|
||||
//Liste des établissements
|
||||
$this->translate('LISTE DES ÉTABLISSEMNTS');
|
||||
$this->translate('Actif/Inactif');
|
||||
$this->translate('Tous');
|
||||
$this->translate('Actif');
|
||||
$this->translate('Inactif');
|
||||
$this->translate('Établissements');
|
||||
$this->translate('siège actif');
|
||||
$this->translate('établ. inactif');
|
||||
$this->translate('L\'entreprise à 1 établissements actifs et 1 établissements radiés');
|
||||
|
||||
//Liens inter-entreprises
|
||||
$this->translate('LIENS INTER-ENTREPRISES');
|
||||
$this->translate('Organigramme du groupe');
|
||||
$this->translate('Documents');
|
||||
$this->translate('Aucun document');
|
||||
$this->translate('Lier un document');
|
||||
$this->translate('organigramme du groupe');
|
||||
$this->translate('Editer la fiche');
|
||||
$this->translate('Actionnariat');
|
||||
$this->translate('Ajouter un actionnaire');
|
||||
$this->translate('PUBLIC / BOURSE');
|
||||
$this->translate('FFP');
|
||||
$this->translate('ETABLISSEMENTS %s FRERES');
|
||||
$this->translate('FAMILLE %s');
|
||||
$this->translate('Participations');
|
||||
$this->translate('Ajouter une participation');
|
||||
$this->translate('Fonctions de directions');
|
||||
$this->translate('Administrateur');
|
||||
$this->translate('Chargement...');
|
||||
$this->translate('Les données transmises sont indicatives et traitées en conformité avec les usages en vigueur. Scores & Decisions SAS agrège et fournit l\'information en l\'état et ne saurait accorder une garantie quelconque notamment pour la fiabilité, l\'actualité, l\'exhaustivité des données. La responsabilité de Scores & Decisions SAS ne pourra être engagée pour tout dommage indirect et notamment pour manque à gagner, préjudice commercial ou financier, recours de tiers, cette liste n’étant pas limitative. "Le Client" recherche, sélectionne et interprète les données sous sa propre responsabilité');
|
||||
|
||||
//Informations Groupe
|
||||
$this->translate('Informations Groupe');
|
||||
$this->translate('Siren');
|
||||
$this->translate('TVA');
|
||||
$this->translate('RCS PARIS');
|
||||
$this->translate('ISIN');
|
||||
$this->translate('Nom du groupe');
|
||||
$this->translate('Sigle');
|
||||
$this->translate('Adresse');
|
||||
$this->translate('Code Commune');
|
||||
$this->translate('Tél.');
|
||||
$this->translate('Fax');
|
||||
$this->translate('Site Web');
|
||||
$this->translate('Année de création');
|
||||
$this->translate('Grand Groupe Français');
|
||||
$this->translate('Nombre d\'entreprises Française du groupe');
|
||||
$this->translate('Effectif salarié du groupe en France');
|
||||
$this->translate('CA France');
|
||||
$this->translate('CA Export');
|
||||
$this->translate('Organigramme du groupe');
|
||||
$this->translate('Secteurs');
|
||||
$this->translate('Nb Entrep.');
|
||||
$this->translate('CA');
|
||||
$this->translate('Effectif');
|
||||
|
||||
//Modifications INSEE
|
||||
$this->translate('LISTE DES ÉVÉNEMENTS');
|
||||
$this->translate('Mettre sous surveillance Insee');
|
||||
$this->translate('Événements INSEE');
|
||||
|
||||
//Liste des dirigeants
|
||||
$this->translate('DIRIGEANTS');
|
||||
$this->translate('Mettre sous surveillance Dirigeants');
|
||||
$this->translate('Consulter la liste des dirigeants opérationnels');
|
||||
$this->translate('Président du conseil de surveillance');
|
||||
$this->translate('Président du directoire');
|
||||
$this->translate('Commissaire aux comptes suppléant');
|
||||
$this->translate('Commissaire aux comptes titulaire');
|
||||
$this->translate('Liste des dirigeants actifs');
|
||||
|
||||
//Historique des dirigeants
|
||||
$this->translate('Historique des dirigeants');
|
||||
$this->translate('Président du directoire');
|
||||
$this->translate('Membre du directoire');
|
||||
$this->translate('Membre du conseil de surveillance');
|
||||
$this->translate('Commissaire aux comptes suppléant');
|
||||
$this->translate('Commissaire aux comptes titulaire');
|
||||
|
||||
//Synthèse
|
||||
|
||||
//Bilans, Compte de résultat
|
||||
|
||||
//Ratios
|
||||
|
||||
//Flux de trésorerie
|
||||
$this->translate('Flux de Trésorerie');
|
||||
$this->translate('Type de bilans');
|
||||
$this->translate('Réel normal ou Simplifié');
|
||||
$this->translate('Consolidé');
|
||||
$this->translate('mois');
|
||||
$this->translate('ACTIVITE');
|
||||
$this->translate('INVESTISSEMENT');
|
||||
$this->translate('FINANCEMENT');
|
||||
$this->translate('VARIATION DE TRESORERIE D\'ACTIF');
|
||||
$this->translate('Chiffre d\'affaires HT & autres produits d\'exploitation');
|
||||
$this->translate('Variation des creances clients & autres creances d\'exploitation');
|
||||
$this->translate('Recettes d\'exploitation');
|
||||
$this->translate('Achats & autres charges d\'exploitation');
|
||||
$this->translate('Variation des dettes fournisseurs & autres dettes d\'exploitation');
|
||||
$this->translate('Depenses d\'exploitation');
|
||||
$this->translate('Excedent de Tresorerie d\'Exploitation');
|
||||
$this->translate('Flux lies aux operations hors exploitation');
|
||||
$this->translate('Interets bancaires');
|
||||
$this->translate('Impots sur les benefices');
|
||||
$this->translate('Flux affectes a la participation des salaries');
|
||||
$this->translate('Dividendes verses');
|
||||
$this->translate('Flux de tresorerie interne');
|
||||
$this->translate('Investissements d\'exploitation hors production immobilisee');
|
||||
$this->translate('Acquisition de participations & autres titres immobilises');
|
||||
$this->translate('Variation des autres actifs immobilises hors charges a repartir');
|
||||
$this->translate('Subventions d\'investissement recues');
|
||||
$this->translate('Variation des dettes sur immobilisations');
|
||||
$this->translate('Encaissements sur cessions d\'immobilisations');
|
||||
$this->translate('Flux d\'investissement');
|
||||
$this->translate('Augmentation-Reduction de capital');
|
||||
$this->translate('Variation des creances sur capital appele non verse');
|
||||
$this->translate('Flux du capital');
|
||||
$this->translate('Variation des emprunts');
|
||||
$this->translate('Variation de la tresorerie du passif');
|
||||
$this->translate('Flux du financement');
|
||||
$this->translate('Variation du disponible');
|
||||
$this->translate('Variation des valeurs mobilieres de placement');
|
||||
$this->translate('Variation de la tresorerie d\'actif');
|
||||
|
||||
//Liasse fiscale
|
||||
$this->translate('Valeurs exprimées en');
|
||||
$this->translate('Millesime');
|
||||
$this->translate('Corriger le bilan sélectionné');
|
||||
$this->translate('ou Saisir une nouvelle liasse au format');
|
||||
$this->translate('Normal');
|
||||
$this->translate('Consolidé');
|
||||
$this->translate('Simplifié');
|
||||
$this->translate('Exporter en fichier Excel.');
|
||||
$this->translate('Vous possèdez un bilan plus récent');
|
||||
$this->translate('Mettre sous surveillance Bilans');
|
||||
$this->translate('Actif');
|
||||
$this->translate('Passif');
|
||||
$this->translate('Compte de résultat');
|
||||
$this->translate('Valeurs exprimées en K€');
|
||||
$this->translate('Capital souscrit non appelé');
|
||||
$this->translate('Frais d\'établissement');
|
||||
$this->translate('Frais de rech. et dév.');
|
||||
$this->translate('Immobilisations incorporelles');
|
||||
$this->translate('Concessions, brevets, ...');
|
||||
$this->translate('Fond commercial');
|
||||
$this->translate('Autres immo. incorporelles');
|
||||
$this->translate('Avances et acomptes sur immo. incorp.');
|
||||
$this->translate('Terrains');
|
||||
$this->translate('Constructions');
|
||||
$this->translate('Instal. techniques, ...');
|
||||
$this->translate('Autres immo. corp.');
|
||||
$this->translate('Immobilisations corporelles');
|
||||
$this->translate('Immo. en cours');
|
||||
$this->translate('Avances et acomptes');
|
||||
$this->translate('Participations évaluées selon la méthode de mise en équivalence');
|
||||
$this->translate('Autres participations');
|
||||
$this->translate('Créances rattachées à des participations');
|
||||
$this->translate('Autres titres immobilisés');
|
||||
$this->translate('Immobilisations financières');
|
||||
$this->translate('Prêts');
|
||||
$this->translate('Autres immo. financières');
|
||||
$this->translate('Matières 1ère, approvisionnements');
|
||||
$this->translate('En cours de production de biens');
|
||||
$this->translate('En cours de production de services');
|
||||
$this->translate('Stocks');
|
||||
$this->translate('ACTIF CIRCULANT');
|
||||
$this->translate('Produits intermédiaires et finis');
|
||||
$this->translate('Marchandises');
|
||||
$this->translate('Avances et accomp. versés sur command.');
|
||||
$this->translate('Clients et comptes rattachés');
|
||||
$this->translate('Autres créances');
|
||||
$this->translate('Créances');
|
||||
$this->translate('Capital souscrit et appelé, non versé');
|
||||
$this->translate('Valeurs mobilières de placement (dont actions propres)');
|
||||
$this->translate('Disponibilités');
|
||||
$this->translate('Divers');
|
||||
$this->translate('REGULARISATIONS Charges constatées d\'avance');
|
||||
$this->translate('TOTAL');
|
||||
$this->translate('');
|
||||
$this->translate('');
|
||||
|
||||
//Bourse & Cotations
|
||||
$this->translate('INFORMATIONS BOURSIÈRES');
|
||||
$this->translate('Code Mnémo');
|
||||
$this->translate('Code Bloomberg');
|
||||
$this->translate('Code Datastream');
|
||||
$this->translate('Code Ric');
|
||||
$this->translate('Place de cotation');
|
||||
$this->translate('Marché');
|
||||
$this->translate('Nombre de titres');
|
||||
$this->translate('Éligible SRD / PEA');
|
||||
$this->translate('Logo');
|
||||
$this->translate('Coordonnées');
|
||||
$this->translate('Adresse');
|
||||
$this->translate('Date d\'introduction en bourse');
|
||||
$this->translate('Date dernière assemblée générale');
|
||||
$this->translate('Téléphone');
|
||||
$this->translate('Fax');
|
||||
$this->translate('Site Internet');
|
||||
$this->translate('Courriel');
|
||||
$this->translate('Activité(s)');
|
||||
$this->translate('Activité');
|
||||
$this->translate('Secteur');
|
||||
$this->translate('Dernier cours');
|
||||
$this->translate('Dernière cotation connue');
|
||||
$this->translate('Clôture');
|
||||
$this->translate('Ouverture');
|
||||
$this->translate('Plus haut');
|
||||
$this->translate('Plus Bas');
|
||||
$this->translate('Volume échangé');
|
||||
$this->translate('Capitalisation');
|
||||
$this->translate('Minimum historique');
|
||||
$this->translate('Maximum historique');
|
||||
$this->translate('Cours moyen');
|
||||
|
||||
//Relations bancaires
|
||||
$this->translate('RELATIONS BANCAIRES');
|
||||
$this->translate('Liste des relations bancaires');
|
||||
|
||||
//Annonces Légales
|
||||
|
||||
//Information Réglementée
|
||||
|
||||
//Compétences Territoriales
|
||||
$this->translate('Tribunaux');
|
||||
$this->translate('Administrateurs & Mandataires judiciaires');
|
||||
$this->translate('Huissiers de justice');
|
||||
$this->translate('Préfectures & Sous-préfectures');
|
||||
$this->translate('Centres de formalités des Entreprises (CCI, Greffes, Métiers, Artisanat, Agriculture, URSSAF, Impôts, etc...)');
|
||||
$this->translate('Journaux d\'Annonces Légales');
|
||||
|
||||
//Marques déposées
|
||||
$this->translate('PROPRIÉTÉ INTELLECTUELLE');
|
||||
$this->translate('Marque(s) déposée(s)');
|
||||
$this->translate('Dépôt');
|
||||
|
||||
//IndiScore
|
||||
$this->translate('INDISCORE');
|
||||
$this->translate('Définir un Cut-off');
|
||||
$this->translate('Mettre sous surveillance IndiScore');
|
||||
$this->translate('Saisir votre demande d\'avis credit personnalisé');
|
||||
$this->translate('Évaluation');
|
||||
$this->translate('L\'évaluation indiScore© est en partie basée sur les points notables suivants');
|
||||
$this->translate('Conformité légale :');
|
||||
$this->translate('L\'analyse de la conformité est correcte.');
|
||||
$this->translate('Dirigeance :');
|
||||
$this->translate('L\'étude de la dirigeance ne relève aucun problème.');
|
||||
$this->translate('Solvabilité :');
|
||||
$this->translate('L\'analyse de la solvabilité est Bonne');
|
||||
$this->translate('La situation financière de l\'entreprise ne peut être évaluée en détail car le dernier bilan disponible date de 2010.');
|
||||
$this->translate('Paiements');
|
||||
$this->translate('Depuis Mars 2013 : Aucune difficulté significative ne nous a été signalée Paiements à 30 jours maximum');
|
||||
$this->translate('Conclusion');
|
||||
$this->translate('Compte tenu des informations disponibles auprès des sources officielles Scores et Décisions présente la conclusion suivante :');
|
||||
$this->translate('LE SCORE EST DE 17 SUR 20 POINTS');
|
||||
$this->translate('La tendance de la note est Stable');
|
||||
$this->translate('L\'ENCOURS MAXIMUM CONSEILLÉ EST DE 500 K€');
|
||||
|
||||
//Rapport de synthèse
|
||||
$this->translate('RAPPORT DE SYNTHESE');
|
||||
$this->translate('Numéro R.C.');
|
||||
$this->translate('Etablissement actif');
|
||||
$this->translate('Situation au répertoire SIRENE');
|
||||
$this->translate('Raison sociale & Coordonnées');
|
||||
$this->translate('Forme juridique');
|
||||
$this->translate('Date d\'immatriculation');
|
||||
$this->translate('Création de l\'établissement');
|
||||
$this->translate('Activité(s) & Chiffre d\'affaires');
|
||||
$this->translate('Activité de l\'entreprise');
|
||||
$this->translate('Anciens codes NAF');
|
||||
$this->translate('Origine du fonds');
|
||||
$this->translate('Type d\'exploitation');
|
||||
$this->translate('Capital');
|
||||
$this->translate('Chiffre d\'affaires');
|
||||
$this->translate('Liste des dirigeants actifs');
|
||||
$this->translate('Actionnariat');
|
||||
$this->translate('Ajouter un actionnaire');
|
||||
$this->translate('Ajouter une participation');
|
||||
$this->translate('Fonctions de directions');
|
||||
$this->translate('Eléments financiers');
|
||||
$this->translate('Paiement');
|
||||
$this->translate('Depuis');
|
||||
$this->translate('Aucune difficulté significative ne nous a été signalée Paiements à %s jours maximum');
|
||||
$this->translate('Procédures collectives');
|
||||
$this->translate('Situation juridique');
|
||||
$this->translate('Aucune procédure enregistrée à ce jour par nos services.');
|
||||
$this->translate('Scores et encours');
|
||||
$this->translate('Score Afdcc 2');
|
||||
$this->translate('Score Z');
|
||||
$this->translate('IndiScore');
|
||||
$this->translate('Encours conseillé');
|
||||
$this->translate('Stable');
|
||||
|
||||
//Rapport complet
|
||||
|
||||
//Valorisation
|
||||
$this->translate('VALORISATION');
|
||||
$this->translate('SOCIÉTÉ');
|
||||
$this->translate('COMMENTAIRES');
|
||||
$this->translate('BILAN');
|
||||
$this->translate('Situation financière');
|
||||
$this->translate('Compte de Résultat');
|
||||
$this->translate('CONCLUSION');
|
||||
$this->translate('estimation haute');
|
||||
$this->translate('estimation basse');
|
||||
$this->translate('Réserves');
|
||||
$this->translate('L\'estimation finale devrait intégrer l\'ensemble des dettes à court, moyen et long termes exigibles au moment de la cession.');
|
||||
|
||||
//Enquête commerciale
|
||||
$this->translate('ENQUÊTE COMMERCIALE');
|
||||
$this->translate('Nos enquêtes commerciales sont réalisées par des analystes financiers.');
|
||||
$this->translate('Entreprise concernée');
|
||||
$this->translate('Téléphone / Fax');
|
||||
$this->translate('Autre téléphone');
|
||||
$this->translate('E-mail');
|
||||
$this->translate('Autre e-mail');
|
||||
$this->translate('Domiciliation bancaire');
|
||||
$this->translate('Encours demandé');
|
||||
$this->translate('Nombre d\'échéances');
|
||||
$this->translate('Avis de l\'assureur crédit');
|
||||
$this->translate('Favorable');
|
||||
$this->translate('Défavorable');
|
||||
$this->translate('Demandeur');
|
||||
$this->translate('Votre profil');
|
||||
$this->translate('Votre Identité');
|
||||
$this->translate('Votre Téléphone');
|
||||
$this->translate('Votre Fax');
|
||||
$this->translate('Votre E-mail');
|
||||
$this->translate('Votre Référence');
|
||||
$this->translate('Service Achats');
|
||||
$this->translate('Commerce');
|
||||
$this->translate('Recouvrement');
|
||||
$this->translate('Contentieux');
|
||||
$this->translate('Autre');
|
||||
$this->translate('Enquête');
|
||||
$this->translate('Type d\'enquête');
|
||||
$this->translate('Délais de livraison');
|
||||
$this->translate('Précisions sur la demande');
|
||||
$this->translate('Ancienneté de la relation');
|
||||
$this->translate('Impayées');
|
||||
$this->translate('Retard de paiement');
|
||||
$this->translate('Litiges techniques ou commerciaux');
|
||||
$this->translate('Observations ou questions spéciales');
|
||||
$this->translate('Envoyez');
|
||||
$this->translate('EXPRESS');
|
||||
$this->translate('DECISION');
|
||||
$this->translate('SECTEUR BTP');
|
||||
$this->translate('encours inférieur à');
|
||||
$this->translate('encours supérieur à');
|
||||
$this->translate('Choisissez...');
|
||||
$this->translate('Enquête sur un client (contrôl crédit)');
|
||||
$this->translate('Enquête sur un prospect (ouverture de compte)');
|
||||
$this->translate('Enquête sur un fournisseur stratégique');
|
||||
$this->translate('Enquête sur un fournisseur non stratégique');
|
||||
$this->translate('Autre type d\'enquête (Précisez...)');
|
||||
$this->translate('%s jours ou +');
|
||||
|
||||
//Commande de Pièces
|
||||
$this->translate('COMMANDES DE PIÈCES');
|
||||
$this->translate('EXTRAIT KBIS');
|
||||
$this->translate('Visualiser/Télécharger le kbis');
|
||||
$this->translate('Recevoir le kbis par email');
|
||||
$this->translate('Recevoir le kbis original par courrier');
|
||||
$this->translate('PRIVILÉGES & NANTISSEMENTS');
|
||||
$this->translate('Privilèges de la sécurité sociale et des régimes complémentaires et Trésor Public
|
||||
(avec surveillance, retour sous 48 à 72h)');
|
||||
$this->translate('Privilèges de la sécurité sociale et des régimes complémentaires (mail sous 12h ouvrées)');
|
||||
$this->translate('Privilèges du Trésor Public (mail sous 12h ouvrées)');
|
||||
$this->translate('Nantissements du fonds de commerce ou du fonds artisanal (conventionnels et judiciaires)');
|
||||
$this->translate('Privilèges du vendeur de fonds de commerce et d\'action résolutoire');
|
||||
$this->translate('Déclarations de créances');
|
||||
|
||||
//Comptes annuels
|
||||
$this->translate('PIÈCES OFFICIELLES');
|
||||
$this->translate('Mettre sous surveillance Actes');
|
||||
$this->translate('Compte annuels');
|
||||
$this->translate('Date de clôture');
|
||||
$this->translate('Décisions');
|
||||
$this->translate('Comptes millésime');
|
||||
|
||||
//Actes & Status
|
||||
$this->translate('Actes & Status');
|
||||
$this->translate('EXTRAIT DE PROCES-VERBAL');
|
||||
$this->translate('Créer une commande factice');
|
||||
$this->translate('Acte modificatif');
|
||||
$this->translate('Nomination/démission des organes de gestion');
|
||||
$this->translate('Procuration');
|
||||
$this->translate('PROCES-VERBAL D\'ASSEMBLEE GENERALE ORDINAIRE ET EXTRAORDINAIRE');
|
||||
$this->translate('Augmentation de Capital');
|
||||
$this->translate('CERTIFICAT');
|
||||
$this->translate('STATUTS MIS A JOUR');
|
||||
$this->translate('DU CONSEIL DE SURVEILLANCE');
|
||||
|
||||
//Suivi Privilèges
|
||||
$this->translate('Synthèse des inscriptions d\'endettement');
|
||||
$this->translate('Mettre sous surveillance Privilèges');
|
||||
$this->translate('Privilèges de la sécurité sociale et des régimes complémentaires');
|
||||
$this->translate('Privilèges du trésor public');
|
||||
|
||||
//Nouveautés
|
||||
$this->translate('Nouveautés');
|
||||
$this->translate('Liste par date');
|
||||
$this->translate('Intitulé');
|
||||
$this->translate('Catégorie');
|
||||
|
||||
//Mes options
|
||||
$this->translate('PROFIL UTILISATEUR');
|
||||
$this->translate('Identifiant utilisateur');
|
||||
$this->translate('Identité (NOM/Prénom)');
|
||||
$this->translate('Réf. facturation (service, etc...)');
|
||||
$this->translate('Adresse e-mail');
|
||||
$this->translate('Numéros de téléphone (Fixe, Fax, Mobile)');
|
||||
$this->translate('Mot de passe');
|
||||
$this->translate('Relevé de consommation');
|
||||
$this->translate('Modifier le mot de passe.');
|
||||
$this->translate('Relevé de consommation');
|
||||
$this->translate('Détails');
|
||||
$this->translate('Mois/Année');
|
||||
$this->translate('Ok');
|
||||
$this->translate('Langue de l\'interface par défaut');
|
||||
$this->translate('Informations');
|
||||
$this->translate('Type d\'appareil actuel');
|
||||
$this->translate('Résolution d\'écran actuel');
|
||||
$this->translate('Navigateur actuel');
|
||||
$this->translate('Poste de travail');
|
||||
$this->translate('Moteur de recherche');
|
||||
$this->translate('Résultats par page');
|
||||
$this->translate('Inclure');
|
||||
$this->translate('Surveillance');
|
||||
$this->translate('Supports pour les alertes');
|
||||
$this->translate('Gestion des droits');
|
||||
$this->translate('Type de profil');
|
||||
$this->translate('Droits d\'accès');
|
||||
$this->translate('Préférences');
|
||||
$this->translate('les associations');
|
||||
$this->translate('les actifs');
|
||||
$this->translate('les radiés');
|
||||
$this->translate('les établissements secondaires');
|
||||
$this->translate('SMS');
|
||||
$this->translate('Fax');
|
||||
$this->translate('Mail');
|
||||
$this->translate('Utilisateur');
|
||||
$this->translate('Administrateur');
|
||||
$this->translate('SuperAdministrateur');
|
||||
|
||||
//Mes surveillances
|
||||
$this->translate('SURVEILLANCE');
|
||||
$this->translate('Nombre d\'entités affichées');
|
||||
$this->translate('Nombre de surveillances');
|
||||
$this->translate('Extraction des surveillances');
|
||||
$this->translate('Extraire uniquement les surveillances de type');
|
||||
$this->translate('toutes');
|
||||
$this->translate('Anonces');
|
||||
$this->translate('Insee');
|
||||
$this->translate('Bilans');
|
||||
$this->translate('Indiscore');
|
||||
$this->translate('Actes');
|
||||
$this->translate('Dirigeants');
|
||||
$this->translate('Privilèges');
|
||||
$this->translate('Paiements');
|
||||
$this->translate('Liens');
|
||||
$this->translate('Options de recherche');
|
||||
$this->translate('Afficher uniquement les suveillances de type');
|
||||
$this->translate('Tri');
|
||||
$this->translate('croissant');
|
||||
$this->translate('décroissant');
|
||||
$this->translate('par');
|
||||
$this->translate('Siren');
|
||||
$this->translate('Référence');
|
||||
$this->translate('Date d\'ajoute');
|
||||
$this->translate('Date d\'envoi');
|
||||
$this->translate('Liste des surveillances');
|
||||
$this->translate('Ajout le');
|
||||
$this->translate('Envoyé le');
|
||||
|
||||
//Mon portefeuille
|
||||
$this->translate('PORTEFEUILLE');
|
||||
$this->translate('Nombre d\'entités affichées');
|
||||
$this->translate('Nombre de surveillances');
|
||||
$this->translate('Exportation de votre portefeuille');
|
||||
$this->translate('Exporter votre portefeuille au format CSV');
|
||||
$this->translate('Options de recherche');
|
||||
$this->translate('Tri par');
|
||||
$this->translate('Surveillance Score');
|
||||
$this->translate('Aucune surveillance Score.');
|
||||
|
||||
//Administration
|
||||
$this->translate('ADMINISTRATION');
|
||||
$this->translate('Relevé de consommation complet');
|
||||
$this->translate('Tous les utilisateurs');
|
||||
$this->translate('Détails');
|
||||
$this->translate('Liste des profils utilisateurs');
|
||||
$this->translate('Login');
|
||||
$this->translate('Actions');
|
||||
$this->translate('Créer un profil utilisateur');
|
||||
$this->translate('Mode spéciaux');
|
||||
$this->translate('Mode Edition');
|
||||
|
||||
//Se déconnecter
|
||||
$this->translate('Vous avez été déconnecté.');
|
||||
$this->translate('Si cette page ne disparait pas au bout de 5 seconde(s), veuillez cliquer');
|
||||
|
||||
//Gestion
|
||||
$this->translate('Gestion Système');
|
||||
$this->translate('Gestion des clients');
|
||||
$this->translate('Gestion des commandes');
|
||||
$this->translate('Gestion des fichiers nouveautés');
|
||||
$this->translate('Statistiques');
|
||||
|
||||
//Saisie / Edition
|
||||
$this->translate('IDENTITE DE L\'ENTREPRISE');
|
||||
$this->translate('Numéro identifiant Siret');
|
||||
$this->translate('Numéro identifiant Siret du siège');
|
||||
$this->translate('Raison Sociale');
|
||||
$this->translate('Adresse');
|
||||
$this->translate('Établissement');
|
||||
$this->translate('Activité(s) et Chiffres d\'Affaires');
|
||||
$this->translate('Code ISIN');
|
||||
$this->translate('Activité déclarée de l\'entreprise');
|
||||
$this->translate('Capital Montant');
|
||||
$this->translate('Capital Devise');
|
||||
$this->translate('BODACC');
|
||||
$this->translate('Source');
|
||||
$this->translate('Date évènement / jugement');
|
||||
$this->translate('Tribunal');
|
||||
$this->translate('Évènement / Jugement');
|
||||
$this->translate('Informations diverses');
|
||||
$this->translate('Autre siren (doublon)');
|
||||
$this->translate('Refus d’inscription au Registre du Commerce et des Sociétés');
|
||||
$this->translate('Identifiant R.N.A.');
|
||||
$this->translate('Entreprise de domiciliation');
|
||||
$this->translate('Entreprise ayant exercée son droit d\'opposition en');
|
||||
$this->translate('Sans objet');
|
||||
|
||||
//Saisie Fiche Entrangère
|
||||
$this->translate('Adresse complément');
|
||||
$this->translate('CP');
|
||||
$this->translate('Ville');
|
||||
$this->translate('Pays');
|
||||
$this->translate('Selectionner un pays pour afficher les identifiants locaux');
|
||||
$this->translate('Téléphone');
|
||||
$this->translate('au capital de');
|
||||
$this->translate('en date du');
|
||||
$this->translate('découpé en');
|
||||
$this->translate('action(s)');
|
||||
$this->translate('(JJ/MM/AAAA)');
|
||||
|
||||
//Gestion des clients
|
||||
$this->translate('GESTION DES CLIENTS');
|
||||
$this->translate('Créer un client');
|
||||
$this->translate('Liste des clients');
|
||||
$this->translate('Actions');
|
||||
$this->translate('Nom');
|
||||
$this->translate('Editer');
|
||||
$this->translate('Prestations fichier');
|
||||
$this->translate('Tarification');
|
||||
$this->translate('Services');
|
||||
$this->translate('Utilisateurs');
|
||||
$this->translate('EDITION CLIENT');
|
||||
$this->translate('Identification');
|
||||
$this->translate('Facturation');
|
||||
$this->translate('Livraison : Informations sur le destinataire de la livraison');
|
||||
$this->translate('Paramétrage');
|
||||
$this->translate('Divers');
|
||||
$this->translate('Obtention Raison sociale');
|
||||
$this->translate('Nic du siège');
|
||||
$this->translate('Siren');
|
||||
$this->translate('Racine des identifiants');
|
||||
$this->translate('Test');
|
||||
$this->translate('Date de signature');
|
||||
$this->translate('(AAAA-MM-YY)');
|
||||
$this->translate('Type de contrat');
|
||||
$this->translate('Commercial S&D');
|
||||
$this->translate('Contrat');
|
||||
$this->translate('Marché');
|
||||
$this->translate('Nom de l\'apporteur d\'affaire');
|
||||
$this->translate('Type d\'accès Remarques / Observations');
|
||||
$this->translate('userPassword');
|
||||
$this->translate('userPasswordIP');
|
||||
$this->translate('IP');
|
||||
$this->translate('N° de TVA');
|
||||
$this->translate('Compte client rattaché');
|
||||
$this->translate('Editer la facture automatiquement');
|
||||
$this->translate('Editer le détail de la facture');
|
||||
$this->translate('Nom du destinataire de la facture');
|
||||
$this->translate('Adresse1');
|
||||
$this->translate('Adresse2');
|
||||
$this->translate('Adresse3');
|
||||
$this->translate('RIB joint à la facture');
|
||||
$this->translate('BPOSTALE');
|
||||
$this->translate('CCOOP');
|
||||
$this->translate('CDNORD');
|
||||
$this->translate('Liste des adresses IP');
|
||||
$this->translate('Aucune IPs.');
|
||||
$this->translate('Ajouter une adresse IP');
|
||||
$this->translate('Listes des Droits');
|
||||
$this->translate('Recherche');
|
||||
$this->translate('Timeout');
|
||||
$this->translate('forfaitExtranetPeriode');
|
||||
$this->translate('forfaitExtranetMontant');
|
||||
$this->translate('reconductionAuto');
|
||||
$this->translate('Mensuel');
|
||||
$this->translate('Trimestriel');
|
||||
$this->translate('Semestriel');
|
||||
$this->translate('Nombre de pièces officielles inclues dans le forfait client');
|
||||
$this->translate('Montant du forfait des pièces officielles');
|
||||
$this->translate('Tarif unitaire en cas de dépassement');
|
||||
$this->translate('Nombre d\'investigations inclues dans le forfait client');
|
||||
$this->translate('Montant du forfait des investigations');
|
||||
$this->translate('Tarif unitaire pour les indiscore');
|
||||
$this->translate('Accès Webservice');
|
||||
$this->translate('Intersud - Login');
|
||||
$this->translate('Intersud - Mot de passe');
|
||||
$this->translate('Export des résultats de la recherche');
|
||||
$this->translate('Investigation par l\'image IparI');
|
||||
$this->translate('Historique des annonces bodacc');
|
||||
$this->translate('Investigation');
|
||||
$this->translate('Recherche Entreprise');
|
||||
$this->translate('Recherche Dirigeant');
|
||||
$this->translate('Recherche Actionnaire');
|
||||
$this->translate('Fiche d\'identité');
|
||||
$this->translate('Fiche procédure collective');
|
||||
$this->translate('Liens inter-entreprise');
|
||||
$this->translate('Liste des établissements');
|
||||
$this->translate('Informations et organigramme du groupe');
|
||||
$this->translate('Évènements INSEE');
|
||||
$this->translate('Avis de situation INSEE');
|
||||
$this->translate('Liste des dirigeants');
|
||||
$this->translate('Liste des dirigeants opérationnels');
|
||||
$this->translate('Synthèse');
|
||||
$this->translate('Ratios');
|
||||
$this->translate('Flux de trésorerie');
|
||||
$this->translate('Liasse fiscale');
|
||||
$this->translate('Export des Liasses au format XLS');
|
||||
$this->translate('Saisie de bilan');
|
||||
$this->translate('Bourse & cotations');
|
||||
$this->translate('Relations bancaires');
|
||||
$this->translate('Annonces légales');
|
||||
$this->translate('Informations réglementée');
|
||||
$this->translate('Compétences territoriales');
|
||||
$this->translate('Conventions collectives');
|
||||
$this->translate('Marques déposées');
|
||||
$this->translate('indiScore');
|
||||
$this->translate('Rapport synthetique');
|
||||
$this->translate('Rapport complet');
|
||||
$this->translate('Enquête commerciale');
|
||||
$this->translate('Avis de crédit personnalisé');
|
||||
$this->translate('Extrait RCS');
|
||||
$this->translate('Pièces officielles');
|
||||
$this->translate('Privilèges');
|
||||
$this->translate('Surveillance des annonces légales');
|
||||
$this->translate('Surveillance des événements INSEE');
|
||||
$this->translate('Surveillance des bilans');
|
||||
$this->translate('Surveillance des événements sur le score');
|
||||
$this->translate('Surveillance des actes');
|
||||
$this->translate('Surveillance des dirigeants');
|
||||
$this->translate('Surveillance des paiements');
|
||||
$this->translate('Surveillance des liens financiers');
|
||||
$this->translate('Surveillance des privilèges');
|
||||
$this->translate('Mon profil');
|
||||
$this->translate('Liste des surveillances');
|
||||
$this->translate('Portefeuille');
|
||||
$this->translate('Mode Edition');
|
||||
$this->translate('Recherche Internationale');
|
||||
$this->translate('Banque de France');
|
||||
$this->translate('Gestion des commandes kbis');
|
||||
$this->translate('Gestion des commandes greffes');
|
||||
$this->translate('Gestion des commandes KBIS');
|
||||
$this->translate('Gestion des commandes');
|
||||
$this->translate('Rechercher une commande');
|
||||
$this->translate('N° de commande ou siren');
|
||||
$this->translate('Etat');
|
||||
$this->translate('Mode');
|
||||
$this->translate('courrier S&D');
|
||||
$this->translate('e-mail');
|
||||
$this->translate('Liste des commandes');
|
||||
$this->translate('Aucunes commandes.');
|
||||
$this->translate('Gestion des nouveautés');
|
||||
$this->translate('Catégorie');
|
||||
$this->translate('Intitulé');
|
||||
$this->translate('Fichier PDF');
|
||||
$this->translate('Format AAAA-MM-JJ');
|
||||
$this->translate('Toutes les statistiques');
|
||||
$this->translate('Navigateur');
|
||||
$this->translate('Résolution d\'écran');
|
||||
$this->translate('Type d\'appareil');
|
||||
$this->translate('Ordinateur');
|
||||
$this->translate('Mobile');
|
||||
|
||||
$this->translate('Dernière mise à jour le');
|
||||
$this->translate('Capitalisation');
|
||||
$this->translate('Forme juridique à l\'INSEE: Autre SA à directoire (5699)');
|
||||
$this->translate('France');
|
||||
$this->translate('Belgium');
|
||||
$this->translate('United Kingdom');
|
||||
$this->translate('Spain');
|
||||
$this->translate('The Netherlands');
|
||||
$this->translate('');
|
||||
$this->translate('');
|
||||
$this->translate('');
|
||||
$this->translate('');
|
||||
$this->translate('');
|
||||
$this->translate('');
|
||||
$this->translate('');
|
||||
$this->translate('');
|
||||
$this->translate('');
|
||||
$this->translate('');
|
||||
$this->translate('');
|
||||
$this->translate('');
|
||||
$this->translate('');
|
||||
$this->translate('');
|
||||
$this->translate('');
|
||||
$this->translate('');
|
||||
$this->translate('');
|
||||
$this->translate('');
|
||||
$this->translate('');
|
||||
$this->translate('');
|
||||
$this->translate('');
|
||||
$this->translate('');
|
||||
$this->translate('');
|
||||
$this->translate('');
|
||||
$this->translate('');
|
||||
|
||||
//Dashboard controller
|
||||
$this->translate('Ordinateur');
|
||||
$this->translate('Mobile');
|
||||
$this->translate('Navigateur');
|
||||
$this->translate('Résolution d\'écran');
|
||||
$this->translate('Type d\'appareil');
|
||||
?>
|
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 }?>
|
@ -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 +1,23 @@
|
||||
<?php
|
||||
class AideController extends Zend_Controller_Action
|
||||
{
|
||||
protected $theme;
|
||||
|
||||
/**
|
||||
* Logger
|
||||
* @var \Monolog\Logger
|
||||
*/
|
||||
protected $logger;
|
||||
|
||||
public function init()
|
||||
{
|
||||
if (Zend_Registry::isRegistered('logger')) {
|
||||
$this->logger = Zend_Registry::get('logger');
|
||||
}
|
||||
|
||||
// --- Theme
|
||||
$this->theme = Zend_Registry::get('theme');
|
||||
}
|
||||
|
||||
/**
|
||||
* Afficher bulle pour les nouveautés
|
||||
@ -24,7 +41,6 @@ class AideController extends Zend_Controller_Action
|
||||
->where("date>='".$dateglissant."' AND date<='".$now."'")
|
||||
->order('date DESC')
|
||||
->limit($nbNewsMax);
|
||||
//Zend_Registry::get('firebug')->info($sql->__toString());
|
||||
$nouveautes = $nouveautesM->fetchAll($sql);
|
||||
}
|
||||
$this->view->assign('nouveautes', $nouveautes);
|
||||
@ -35,6 +51,8 @@ class AideController extends Zend_Controller_Action
|
||||
*/
|
||||
public function newlisteAction()
|
||||
{
|
||||
$this->view->headTitle()->prepend('Nouveautés');
|
||||
|
||||
$request = $this->getRequest();
|
||||
|
||||
//Selection
|
||||
@ -47,6 +65,10 @@ class AideController extends Zend_Controller_Action
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Affichage et validation de "cgu"
|
||||
* Conditions d’accès à l'extranet
|
||||
*/
|
||||
public function cguAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
@ -58,7 +80,7 @@ class AideController extends Zend_Controller_Action
|
||||
require_once 'Scores/WsScores.php';
|
||||
$ws = new WsScores();
|
||||
$accept = $ws->setCGU();
|
||||
Zend_Registry::get('firebug')->info($accept);
|
||||
$this->logger->info($accept);
|
||||
if ($accept) {
|
||||
//Put in session
|
||||
$auth = Zend_Auth::getInstance();
|
||||
@ -66,12 +88,16 @@ class AideController extends Zend_Controller_Action
|
||||
$identity->acceptationCGU = date('Y-m-d H:i:s');
|
||||
$auth->getStorage()->write($identity);
|
||||
//Redirect
|
||||
$this->_redirect('/');
|
||||
$this->redirect('/');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Afficher des propriétés du navigateur
|
||||
* Compatibilités et version
|
||||
*/
|
||||
public function navinfoAction()
|
||||
{
|
||||
$bootstrap = $this->getInvokeArg('bootstrap');
|
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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -1,7 +1,9 @@
|
||||
<?php
|
||||
class DashboardController extends Zend_Controller_Action
|
||||
{
|
||||
protected $typeActes= array(
|
||||
protected $theme;
|
||||
|
||||
protected $typeActes= array(
|
||||
'a00' => 'MODIFICATION',
|
||||
'a01' => 'MODIFICATION',
|
||||
'a02' => 'DISSOLUTION',
|
||||
@ -99,6 +101,12 @@ class DashboardController extends Zend_Controller_Action
|
||||
'aUA' => 'ATTESTATION DU CONJOINT COMMUN EN BIENS',
|
||||
);
|
||||
|
||||
/**
|
||||
* Logger
|
||||
* @var \Monolog\Logger
|
||||
*/
|
||||
protected $logger;
|
||||
|
||||
/**
|
||||
* Return a ramdom password
|
||||
* @param int $length
|
||||
@ -126,8 +134,14 @@ class DashboardController extends Zend_Controller_Action
|
||||
|
||||
public function init()
|
||||
{
|
||||
if (Zend_Registry::isRegistered('logger')) {
|
||||
$this->logger = Zend_Registry::get('logger');
|
||||
}
|
||||
|
||||
// --- Theme
|
||||
$this->theme = Zend_Registry::get('theme');
|
||||
|
||||
require_once 'Scores/WsScores.php';
|
||||
require_once 'common/dates.php';
|
||||
}
|
||||
|
||||
public function preDispatch()
|
||||
@ -173,7 +187,7 @@ class DashboardController extends Zend_Controller_Action
|
||||
*/
|
||||
protected function statChart($data, $labels, $name)
|
||||
{
|
||||
require_once("Vendors/ChartDirector/phpchartdir.php");
|
||||
require_once 'ChartDirector/phpchartdir.php';
|
||||
|
||||
$hChart = 210;
|
||||
|
||||
@ -239,7 +253,7 @@ class DashboardController extends Zend_Controller_Action
|
||||
*/
|
||||
public function commandesAction()
|
||||
{
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/dashboard.js', 'text/javascript');
|
||||
$this->view->headScript()->appendFile($this->theme->pathScript.'/dashboard.js', 'text/javascript');
|
||||
|
||||
$request = $this->getRequest();
|
||||
$type = $request->getParam('type', '');
|
||||
@ -435,13 +449,14 @@ class DashboardController extends Zend_Controller_Action
|
||||
$document = 'DERNIER STATUS À JOUR';
|
||||
} else {
|
||||
$explodedRef = explode('-', $listCommandes[$i]->refDocument);
|
||||
$dateref = WDate::dateT('Ymd','d/m/Y',$explodedRef[1]);
|
||||
$date = new Zend_Date($explodedRef[1], 'yyyyMMdd');
|
||||
$dateref = $date->toString('dd/MM/yyyy');
|
||||
$depot = ', Dépôt n°'.$explodedRef[6].' au '.$dateref;
|
||||
$document = $this->typeActes['a'.substr($listCommandes[$i]->refDocument,0,2)].$depot;
|
||||
}
|
||||
|
||||
$c = Zend_Registry::get('config');
|
||||
$refFile = realpath($c->profil->path->data).'/pdf/acte-'.
|
||||
$refFile = $c->profil->path->shared.'/pdf/acte-'.
|
||||
$listCommandes[$i]->siren.'-'.
|
||||
trim($listCommandes[$i]->refDocument).'.pdf';
|
||||
|
||||
@ -456,7 +471,7 @@ class DashboardController extends Zend_Controller_Action
|
||||
'controller' => 'pieces',
|
||||
'action' => 'actes',
|
||||
'siret' => $listCommandes[$i]->siren,
|
||||
), null, true);
|
||||
), 'default', true);
|
||||
|
||||
} elseif (preg_match('/^([0-9]{4}).*?$/', $listCommandes[$i]->refDocument, $matches)){
|
||||
|
||||
@ -475,7 +490,7 @@ class DashboardController extends Zend_Controller_Action
|
||||
'controller' => 'pieces',
|
||||
'action' => 'bilans',
|
||||
'siret' => $listCommandes[$i]->siren,
|
||||
), null, true);
|
||||
), 'default', true);
|
||||
|
||||
}
|
||||
break;
|
||||
@ -521,7 +536,7 @@ class DashboardController extends Zend_Controller_Action
|
||||
}
|
||||
|
||||
/**
|
||||
* Affichage de la raison sociale à partir du siren
|
||||
* Affichage de la dénomination sociale à partir du siren
|
||||
*/
|
||||
public function rsAction()
|
||||
{
|
||||
@ -568,8 +583,7 @@ class DashboardController extends Zend_Controller_Action
|
||||
$this->_forward('perms', 'error');
|
||||
}
|
||||
|
||||
$this->view->headScript()
|
||||
->appendFile('/themes/default/scripts/dashboard.js', 'text/javascript');
|
||||
$this->view->headScript()->appendFile($this->theme->pathScript.'/dashboard.js', 'text/javascript');
|
||||
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getListeClients();
|
||||
@ -632,16 +646,16 @@ class DashboardController extends Zend_Controller_Action
|
||||
$request = $this->getRequest();
|
||||
$infos = $request->getParams();
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->setClient($infos);
|
||||
if ($reponse->error->errnum==1) {
|
||||
$this->_forward('client', 'dashboard', null, array('idClient' => $infos['idClient']));
|
||||
$response = $ws->setClient($infos);
|
||||
if (is_string($response) || $response === false) {
|
||||
$this->forward('client', 'dashboard', 'default', array('idClient' => $infos['idClient']));
|
||||
}
|
||||
$this->view->assign('infos', $request->getParams());
|
||||
}
|
||||
|
||||
public function usersAction()
|
||||
{
|
||||
$this->view->headLink()->appendStylesheet('/themes/default/styles/user.css', 'all');
|
||||
$this->view->headLink()->appendStylesheet($this->theme->pathStyle.'/user.css', 'all');
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
|
||||
@ -658,20 +672,9 @@ class DashboardController extends Zend_Controller_Action
|
||||
|
||||
$ws = new WsScores();
|
||||
|
||||
$services = $ws->getServices($idClient);
|
||||
if (is_array($services)) {
|
||||
$this->view->assign('services', $services->item);
|
||||
} else {
|
||||
$this->view->assign('services', array());
|
||||
}
|
||||
if ( null === $service ) {
|
||||
$infos = $ws->getListeUtilisateurs($user->getLogin(), $idClient);
|
||||
$utilisateurs = $infos->result->item;
|
||||
} else {
|
||||
$infos = $ws->getServiceUsers($idClient, $service);
|
||||
$utilisateurs = $infos->item;
|
||||
$this->view->assign('service', $service);
|
||||
}
|
||||
$this->view->assign('services', array());
|
||||
$infos = $ws->getListeUtilisateurs($user->getLogin(), $idClient);
|
||||
$utilisateurs = $infos->result->item;
|
||||
|
||||
$this->view->assign('utilisateurs', $utilisateurs);
|
||||
$this->view->assign('idClient', $idClient);
|
||||
@ -679,10 +682,8 @@ class DashboardController extends Zend_Controller_Action
|
||||
|
||||
public function userAction()
|
||||
{
|
||||
$this->view->headLink()
|
||||
->appendStylesheet('/themes/default/styles/user.css', 'all')
|
||||
->appendStylesheet('/themes/default/styles/form.css', 'all');
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/user.js', 'text/javascript');
|
||||
$this->view->headLink()->appendStylesheet($this->theme->pathStyle.'/user.css', 'all');
|
||||
$this->view->headScript()->appendFile($this->theme->pathScript.'/user.js', 'text/javascript');
|
||||
|
||||
$request = $this->getRequest();
|
||||
|
||||
@ -791,7 +792,7 @@ class DashboardController extends Zend_Controller_Action
|
||||
$user = $ws->getUser($login);
|
||||
$options = json_decode($user, true);
|
||||
|
||||
Zend_Registry::get('firebug')->info($user);
|
||||
$this->logger->info(print_r($user,1));
|
||||
|
||||
$this->view->assign('droits', explode(' ',$options['droits']));
|
||||
$this->view->assign('prefs', explode(' ',$options['pref']));
|
||||
@ -877,7 +878,7 @@ class DashboardController extends Zend_Controller_Action
|
||||
}
|
||||
}
|
||||
|
||||
Zend_Registry::get('firebug')->info($output);
|
||||
$this->logger->info(print_r($output,1));
|
||||
|
||||
$this->view->assign('output', $output);
|
||||
}
|
||||
@ -900,7 +901,7 @@ class DashboardController extends Zend_Controller_Action
|
||||
|
||||
if ( isset($_FILES) && count($_FILES)==1 ) {
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->data).'/nouveautes';
|
||||
$path = $c->profil->path->shared.'/persist/nouveautes';
|
||||
if(!file_exists($path)) mkdir($path);
|
||||
|
||||
$tmp_name = $_FILES['fichier']['tmp_name'];
|
||||
@ -992,7 +993,7 @@ class DashboardController extends Zend_Controller_Action
|
||||
|
||||
//Liste des periodes de facturation
|
||||
$contrats = $ws->getClientTarifs($idClient);
|
||||
Zend_Registry::get('firebug')->info($contrats);
|
||||
$this->logger->info(print_r($contrats,1));
|
||||
$this->view->assign('contrats', $contrats->item);
|
||||
|
||||
//Liste des services
|
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());
|
||||
}
|
||||
}
|
@ -1,7 +1,23 @@
|
||||
<?php
|
||||
class ErrorController extends Zend_Controller_Action
|
||||
{
|
||||
public function init(){}
|
||||
protected $theme;
|
||||
|
||||
/**
|
||||
* Logger
|
||||
* @var \Monolog\Logger
|
||||
*/
|
||||
protected $logger;
|
||||
|
||||
public function init()
|
||||
{
|
||||
if (Zend_Registry::isRegistered('logger')) {
|
||||
$this->logger = Zend_Registry::get('logger');
|
||||
}
|
||||
|
||||
// --- Theme
|
||||
$this->theme = Zend_Registry::get('theme');
|
||||
}
|
||||
|
||||
public function errorAction()
|
||||
{
|
||||
@ -51,13 +67,12 @@ class ErrorController extends Zend_Controller_Action
|
||||
$message.= "Referer : ".$_SERVER['HTTP_REFERER']."\n";
|
||||
|
||||
$c = Zend_Registry::get('config');
|
||||
require_once 'Scores/Mail.php';
|
||||
$mail = new Mail();
|
||||
$mail = new Scores_Mail_Method();
|
||||
$mail->setSubject('[ERREUR APPLICATIVE] - '.$c->profil->server->name.' -'.date('Ymd'));
|
||||
$mail->setBodyTexte($message);
|
||||
$mail->setFrom('supportdev');
|
||||
$mail->setBodyText($message);
|
||||
$mail->setFromKey('support');
|
||||
$mail->addToKey('supportdev');
|
||||
$mail->send();
|
||||
$mail->execute();
|
||||
}
|
||||
// Log exception, if logger available
|
||||
if ($log = $this->getLog()) {
|
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,14 +1,28 @@
|
||||
<?php
|
||||
class LogoController extends Zend_Controller_Action
|
||||
{
|
||||
protected $pathLogo = '';
|
||||
|
||||
protected $theme;
|
||||
protected $pathLogo = '';
|
||||
|
||||
/**
|
||||
* Logger
|
||||
* @var \Monolog\Logger
|
||||
*/
|
||||
protected $logger;
|
||||
|
||||
public function init()
|
||||
{
|
||||
$c = Zend_Registry::get('config');
|
||||
$this->pathLogo = $c->profil->path->data.'/logos';
|
||||
if (Zend_Registry::isRegistered('logger')) {
|
||||
$this->logger = Zend_Registry::get('logger');
|
||||
}
|
||||
|
||||
// --- Theme
|
||||
$this->theme = Zend_Registry::get('theme');
|
||||
|
||||
$c = Zend_Registry::get('config');
|
||||
$this->pathLogo = $c->profil->path->shared.'/persist/logos';
|
||||
}
|
||||
|
||||
|
||||
public function indexAction()
|
||||
{
|
||||
$this->_helper->layout->disableLayout();
|
||||
@ -16,18 +30,18 @@ class LogoController extends Zend_Controller_Action
|
||||
$siren = $request->getParam('siren', '');
|
||||
$isin = $request->getParam('isin', '');
|
||||
$logo = $this->_findlogo($siren, $isin);
|
||||
|
||||
|
||||
$this->view->assign('siren', $siren);
|
||||
$this->view->assign('logo', $logo);
|
||||
}
|
||||
|
||||
|
||||
public function uploadAction()
|
||||
{
|
||||
$this->_helper->layout->disableLayout();
|
||||
$request = $this->getRequest();
|
||||
|
||||
|
||||
$siren = $request->getParam('siren');
|
||||
|
||||
|
||||
if ($request->isPost()) {
|
||||
|
||||
if ( !empty($siren) && isset($_FILES['file']) && $_FILES['file']['error']!=UPLOAD_ERR_NO_FILE )
|
||||
@ -66,25 +80,25 @@ class LogoController extends Zend_Controller_Action
|
||||
}
|
||||
$this->view->assign('siren', $siren);
|
||||
}
|
||||
|
||||
|
||||
public function cropAction()
|
||||
{
|
||||
$this->_helper->layout->disableLayout();
|
||||
$request = $this->getRequest();
|
||||
|
||||
|
||||
$siren = $request->getParam('siren');
|
||||
$image = $request->getParam('image');
|
||||
|
||||
|
||||
if ($request->isPost())
|
||||
{
|
||||
$jpeg_quality = 90;
|
||||
$png_quality = 9;
|
||||
|
||||
|
||||
list($name, $ext) = explode('.', $image);
|
||||
|
||||
|
||||
$src = $name.'.'.$ext;
|
||||
$dst = str_replace('tmp_', '', $src);
|
||||
|
||||
|
||||
//Création image
|
||||
switch($ext){
|
||||
case 'gif':
|
||||
@ -125,14 +139,14 @@ class LogoController extends Zend_Controller_Action
|
||||
}
|
||||
$this->view->assign('siren', $siren);
|
||||
}
|
||||
|
||||
|
||||
public function saveAction()
|
||||
{
|
||||
$this->_helper->layout->disableLayout();
|
||||
$request = $this->getRequest();
|
||||
|
||||
|
||||
$file = $request->getParam('image');
|
||||
|
||||
|
||||
if ( !empty($file) ) {
|
||||
list($name, $ext) = explode('.', $file);
|
||||
$name_dst = str_replace('tmp_','',$name);
|
||||
@ -196,79 +210,81 @@ class LogoController extends Zend_Controller_Action
|
||||
}
|
||||
}
|
||||
$this->view->assign('message', $message);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function urlAction()
|
||||
{
|
||||
$this->_helper->layout->disableLayout();
|
||||
$request = $this->getRequest();
|
||||
|
||||
|
||||
$siren = $request->getParam('siren');
|
||||
|
||||
|
||||
if ($request->isPost()){
|
||||
|
||||
require_once 'common/curl.php';
|
||||
|
||||
$logoUrl = $request->getParam('url');
|
||||
$tabTmp = parse_url($logoUrl);
|
||||
$hostUrl = $tabTmp['host'];
|
||||
$pathUrl = $tabTmp['path'];
|
||||
$tmp = explode('.', basename($pathUrl));
|
||||
$ext = strtolower(end($tmp));
|
||||
|
||||
$page = getUrl($logoUrl, '', '', '', false, $hostUrl, '', 7);
|
||||
$body = $page['body'];
|
||||
|
||||
|
||||
$extAuthorized = array('jpeg', 'jpg', 'png', 'gif', 'bmp');
|
||||
|
||||
|
||||
//Vérification fichier est une image
|
||||
if ( in_array($ext, $extAuthorized ) )
|
||||
{
|
||||
$name_file = $siren.'.'.$ext;
|
||||
$fp = fopen($this->pathLogo.'/'.$name_file, 'w');
|
||||
fwrite($fp, $body);
|
||||
fclose($fp);
|
||||
$this->view->assign('image', $name_file);
|
||||
|
||||
try {
|
||||
$client = new Zend_Http_Client($logoUrl);
|
||||
$client->setStream();
|
||||
$response = $client->request('GET');
|
||||
if ( $response->isSuccessful()
|
||||
&& copy($response->getStreamName(), $this->pathLogo.'/'.$name_file) ) {
|
||||
$this->view->assign('image', $name_file);
|
||||
}
|
||||
} catch (Zend_Http_Client_Exception $e) {}
|
||||
}
|
||||
$this->view->assign('isPost', true);
|
||||
}
|
||||
$this->view->assign('siren', $siren);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function deleteAction()
|
||||
{
|
||||
$this->_helper->layout->disableLayout();
|
||||
$request = $this->getRequest();
|
||||
|
||||
|
||||
$file = $request->getParam('image');
|
||||
|
||||
|
||||
if ( !empty($file) ){
|
||||
$message = "Erreur suppression fichier.";
|
||||
if ( unlink($this->pathLogo.'/'.$file)){
|
||||
$message = 'Fichier supprimé.';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$this->view->assign('message', $message);
|
||||
}
|
||||
|
||||
|
||||
//====> Function interne
|
||||
|
||||
|
||||
function _logo( $siren )
|
||||
{
|
||||
$message = '';
|
||||
if ( isset($_FILES['logoFile']) &&
|
||||
$_FILES['logoFile']['error']!=UPLOAD_ERR_NO_FILE ) {
|
||||
|
||||
|
||||
/** Un fichier a été uploadé **/
|
||||
$logoFile = $_FILES['logoFile'];
|
||||
$tmp_file = $logoFile['tmp_name'];
|
||||
|
||||
|
||||
if ( $logoFile['error']!=UPLOAD_ERR_OK ) {
|
||||
$message = 'Erreur lors de la copie du fichier';
|
||||
}
|
||||
|
||||
|
||||
if ( !is_uploaded_file($tmp_file) ){
|
||||
$message = "Le fichier est introuvable";
|
||||
} else {
|
||||
@ -294,9 +310,9 @@ class LogoController extends Zend_Controller_Action
|
||||
}
|
||||
//Suppression ou URL fichier image
|
||||
} elseif ( isset($_REQUEST['logoUrl']['del']) ||
|
||||
( isset($_REQUEST['logoUrl']['url']) &&
|
||||
$_REQUEST['logoUrl']['url']!='' ) ) {
|
||||
|
||||
( isset($_REQUEST['logoUrl']['url']) &&
|
||||
$_REQUEST['logoUrl']['url']!='' ) ) {
|
||||
|
||||
//Suppression du fichier
|
||||
if ( isset($_REQUEST['logoUrl']['del']) && $_REQUEST['logoUrl']['del'] )
|
||||
{
|
||||
@ -307,12 +323,12 @@ class LogoController extends Zend_Controller_Action
|
||||
}
|
||||
}
|
||||
} else {
|
||||
saisie_getlogo($siren);
|
||||
$this->_getlogo($siren);
|
||||
}
|
||||
}
|
||||
return $message;
|
||||
}
|
||||
|
||||
|
||||
function _saveimg( $siren )
|
||||
{
|
||||
$message = '';
|
||||
@ -349,7 +365,7 @@ class LogoController extends Zend_Controller_Action
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
function _findlogo( $siren, $isin = '' )
|
||||
{
|
||||
$img = '';
|
||||
@ -372,14 +388,14 @@ class LogoController extends Zend_Controller_Action
|
||||
}
|
||||
return $img;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function _loadlogo( $siren, $isin = '' )
|
||||
{
|
||||
$urlImg = '';
|
||||
$locImg = $this->pathLogo.'/'.$siren;
|
||||
$extensions = array('jpeg', 'jpg', 'png', 'gif', 'bmp');
|
||||
|
||||
|
||||
//Recherche image sur base siren
|
||||
foreach ( $extensions as $ext ) {
|
||||
if ( file_exists($locImg.'.'.$ext) ) {
|
||||
@ -387,7 +403,7 @@ class LogoController extends Zend_Controller_Action
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Recherche image sur base isin
|
||||
if ( $urlImg == '' && $isin != '' ) {
|
||||
$locImg = PATH_LOGOS . $isin;
|
||||
@ -398,7 +414,7 @@ class LogoController extends Zend_Controller_Action
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$output = '';
|
||||
//Redimensionnement
|
||||
if ( $urlImg != '' ) {
|
||||
@ -410,34 +426,36 @@ class LogoController extends Zend_Controller_Action
|
||||
} else {
|
||||
$strSize = '';
|
||||
}
|
||||
|
||||
|
||||
$output = '<img src="'.$urlImg.'" '.$strSize.'/>';
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
function _getlogo( $siren )
|
||||
{
|
||||
require_once 'common/curl.php';
|
||||
$logoUrl = $_REQUEST['logoUrl']['url'];
|
||||
$tabTmp = parse_url($logoUrl);
|
||||
$hostUrl = $tabTmp['host'];
|
||||
$pathUrl = $tabTmp['path'];
|
||||
$tmp = explode('.', basename($pathUrl));
|
||||
$ext = strtolower(end($tmp));
|
||||
$page = getUrl($logoUrl, '', '', '', false, $hostUrl, '', 7);
|
||||
$body = $page['body'];
|
||||
$extAuthorized = array('jpeg', 'jpg', 'png', 'gif', 'bmp');
|
||||
if ( !in_array($ext, $extAuthorized ) )
|
||||
{
|
||||
$tmp = explode('/', $page['header']['Content-Type']);
|
||||
$ext = trim ( str_replace('?', '',strtolower(end($tmp)) ) );
|
||||
}
|
||||
$name_file = $siren.'.'.$ext;
|
||||
$fp = @fopen($this->pathLogo.'/'.$name_file, 'w');
|
||||
@fwrite($fp, $body);
|
||||
@fclose($fp);
|
||||
chmod($this->pathLogo.'/'.$name_file, 0755);
|
||||
|
||||
try {
|
||||
$client = new Zend_Http_Client($pathUrl);
|
||||
$client->setStream();
|
||||
$response = $client->request('GET');
|
||||
if ( $response->isSuccessful() ) {
|
||||
|
||||
$tmp = explode('.', basename($response->getStreamName()));
|
||||
$ext = strtolower(end($tmp));
|
||||
if ( !in_array($ext, $extAuthorized ) )
|
||||
{
|
||||
$tmp = explode('/', $page['header']['Content-Type']);
|
||||
$ext = trim ( str_replace('?', '',strtolower(end($tmp)) ) );
|
||||
}
|
||||
$name_file = $siren.'.'.$ext;
|
||||
if( copy($response->getStreamName(), $this->pathLogo.'/'.$name_file) ) {
|
||||
chmod($this->pathLogo.'/'.$name_file, 0755);
|
||||
}
|
||||
}
|
||||
} catch (Zend_Http_Client_Exception $e) {}
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,6 +1,20 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @todo vérifier contenu de la table des cours d'appel en dur
|
||||
* au 20150305:
|
||||
* 98713 PAPEETE CEDEX
|
||||
* 97262 FORT DE FRANCE CEDEX
|
||||
* Chambre Détachée de la Cour d'Appel de Fort de France à Cayenne", "triCP"=>"97300
|
||||
* qui devrait être "cours d'appel de Cayenne"
|
||||
* 97600 MAMOUDZOU
|
||||
* 97500 ST PIERRE ET MIQUELON
|
||||
*
|
||||
*/
|
||||
class MandataireController extends Zend_Controller_Action
|
||||
{
|
||||
protected $theme;
|
||||
|
||||
protected $coursAppel = array(
|
||||
array( "triId"=>"1756", "triCode"=>"AIXPRL", "triNom"=>"Cour d'Appel d'Aix-en-Provence", "triCP"=>"13616" ),
|
||||
array( "triId"=>"1757", "triCode"=>"AMIENL", "triNom"=>"Cour d'Appel d'Amiens", "triCP"=>"80027" ),
|
||||
@ -39,33 +53,46 @@ class MandataireController extends Zend_Controller_Action
|
||||
array( "triId"=>"1790", "triCode"=>"CAYENL", "triNom"=>"Chambre Détachée de la Cour d'Appel de Fort de France à Cayenne", "triCP"=>"97300" ),
|
||||
array( "triId"=>"1798", "triCode"=>"AGENL", "triNom"=>"Cour d'Appel d'Agen", "triCP"=>"47916" ),
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
* Logger
|
||||
* @var \Monolog\Logger
|
||||
*/
|
||||
protected $logger;
|
||||
|
||||
public function init()
|
||||
{
|
||||
require_once 'Scores/WsScores.php';
|
||||
if (Zend_Registry::isRegistered('logger')) {
|
||||
$this->logger = Zend_Registry::get('logger');
|
||||
}
|
||||
|
||||
// --- Theme
|
||||
$this->theme = Zend_Registry::get('theme');
|
||||
|
||||
require_once 'Scores/WsScores.php';
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Enregistrement d'un mandataire
|
||||
*/
|
||||
public function addAction()
|
||||
{
|
||||
$this->_helper->layout->disableLayout();
|
||||
|
||||
|
||||
$request = $this->getRequest();
|
||||
$idMandataire = $request->getParam('idMand', '');
|
||||
$tribunal = $request->getParam('tribunal', '');
|
||||
|
||||
|
||||
$ws = new WsScores();
|
||||
|
||||
Zend_Registry::get('firebug')->info('idMandataire : '.$idMandataire);
|
||||
|
||||
|
||||
$this->logger->info('idMandataire : '.$idMandataire);
|
||||
|
||||
//Mode edition
|
||||
if ($idMandataire != '') {
|
||||
$idMandataire = (int)substr($idMandataire,1);
|
||||
$reponse = $ws->getMandataire($idMandataire);
|
||||
Zend_Registry::get('firebug')->info($reponse);
|
||||
$this->logger->info(print_r($reponse,1));
|
||||
if ($reponse!==false) {
|
||||
$tabMandataires = json_decode($reponse, true);
|
||||
} else {
|
||||
@ -75,26 +102,26 @@ class MandataireController extends Zend_Controller_Action
|
||||
} else {
|
||||
$tabMandataires = $request->getParam('tabMandataires');
|
||||
}
|
||||
|
||||
|
||||
if ($tribunal!='') {
|
||||
//La cour d'appel suivant le tribunal sélectionné
|
||||
$codeCourAppel = $ws->getIdCoursAppel($tribunal);
|
||||
|
||||
|
||||
//Les tribunaux
|
||||
$tmp = $ws->getTribunaux(array('C','I','G')); //
|
||||
|
||||
|
||||
$tribunaux = $tmp->result->item;
|
||||
}else{
|
||||
$message = 'Pas de tribunal sélectionné.';
|
||||
}
|
||||
|
||||
|
||||
$this->view->assign('message', $message);
|
||||
$this->view->assign('tabMandataires', $tabMandataires);
|
||||
$this->view->assign('coursAppel', $this->coursAppel);
|
||||
$this->view->assign('tribunal', $tribunal);
|
||||
$this->view->assign('tribunaux', $tribunaux);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Edition d'un mandataire
|
||||
*/
|
||||
@ -102,7 +129,7 @@ class MandataireController extends Zend_Controller_Action
|
||||
{
|
||||
$this->_forward('add');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Recherche d'un mandataire à partir d'une chaine de caractères
|
||||
* "nom, departement"
|
||||
@ -111,40 +138,40 @@ class MandataireController extends Zend_Controller_Action
|
||||
{
|
||||
$this->_helper->layout->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender();
|
||||
|
||||
|
||||
$request = $this->getRequest();
|
||||
$search = $request->getParam('search', '');
|
||||
|
||||
|
||||
if (empty($search)) { echo ''; }
|
||||
else { $search = strtolower($search); }
|
||||
|
||||
|
||||
list($searchStr, $filtre) = explode(',', $search);
|
||||
$searchStr = trim($searchStr);
|
||||
$filtre = str_replace(' ', '', $filtre);
|
||||
if( strlen($filtre) != 5 && strlen($filtre) != 2 ){
|
||||
$filtre = '';
|
||||
}
|
||||
|
||||
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->searchMandataires(
|
||||
$searchStr,
|
||||
array('V', 'N', 'H', 'A', 'M'), //types de mandataires
|
||||
$filtre
|
||||
);
|
||||
|
||||
|
||||
if ($reponse == false){
|
||||
echo 'Erreur durant la recherche';
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
$mandataires = $reponse->result->item;
|
||||
|
||||
|
||||
$output = array();
|
||||
$output[] = array(
|
||||
'label' => "A l'adresse du bien vendu",
|
||||
'id' => 'adresse'
|
||||
);
|
||||
|
||||
|
||||
/*
|
||||
REGEX Code Postal : ^(F-)?((2[A|B])|[0-9]{2})[0-9]{3}$
|
||||
(?<!/BP /i) Ne pas avoir la présence de BP devant les 5 chiffres
|
||||
@ -158,7 +185,7 @@ class MandataireController extends Zend_Controller_Action
|
||||
$tabResults[$i]['lib'] = htmlspecialchars_decode(
|
||||
html_entity_decode($mandataire->mand, ENT_COMPAT | ENT_HTML401, 'UTF-8')
|
||||
, ENT_QUOTES);
|
||||
|
||||
|
||||
preg_match('/(?<!bp )((2[A|B])|[0-9]{2})[0-9]{3}( )/i', $mandataire->mand, $matches);
|
||||
$tabResults[$i]['cp'] = $matches[0];
|
||||
$i++;
|
||||
@ -170,7 +197,7 @@ class MandataireController extends Zend_Controller_Action
|
||||
}
|
||||
//Classement du tableau
|
||||
array_multisort($cp, SORT_NUMERIC, $tabResults);
|
||||
|
||||
|
||||
//Affichage des valeurs
|
||||
foreach ($tabResults as $item){
|
||||
$output[] = array(
|
||||
@ -181,7 +208,7 @@ class MandataireController extends Zend_Controller_Action
|
||||
}
|
||||
echo json_encode($output);
|
||||
}
|
||||
|
||||
|
||||
public function getAction()
|
||||
{
|
||||
$this->_helper->layout->disableLayout();
|
||||
@ -190,7 +217,7 @@ class MandataireController extends Zend_Controller_Action
|
||||
$request = $this->getRequest();
|
||||
$siren = $request->getParam('siren');
|
||||
$siren = str_replace(' ','',$siren); //Remplacer les espaces
|
||||
|
||||
|
||||
if ( $siren=='' || strlen($siren)!=14 ) {
|
||||
$output = array(
|
||||
'Siret' => 'Siret incorrect',
|
||||
@ -198,36 +225,36 @@ class MandataireController extends Zend_Controller_Action
|
||||
echo json_encode($output);
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
$tabEntrep = array();
|
||||
$ws = new WsScores();
|
||||
$tabEntrep = $ws->getIdentite($siren);
|
||||
if ($tabEntrep!==false){
|
||||
/**
|
||||
* Utiliser la raison sociale la plus longue
|
||||
* Utiliser la dénomination sociale la plus longue
|
||||
* Nom, Nom2, NomLong
|
||||
*/
|
||||
if (!empty($tabEntrep->NomLong) && strlen($tabEntrep->NomLong)>strlen($tabEntrep->Nom)){
|
||||
$tabEntrep->Nom = $tabEntrep->NomLong;
|
||||
}
|
||||
|
||||
|
||||
//Retourner le tableau sous forme json
|
||||
echo json_encode($tabEntrep);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function saveAction()
|
||||
{
|
||||
$this->_helper->layout->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender();
|
||||
|
||||
|
||||
$request = $this->getRequest();
|
||||
|
||||
|
||||
$error = false;
|
||||
|
||||
$tabMandataires = $request->getParam('tabMandataires', array());
|
||||
|
||||
|
||||
//Vérification des données
|
||||
$fields = array();
|
||||
if($tabMandataires['sirenGrp']=='' && $tabMandataires['sirenMand']==''){
|
||||
@ -242,7 +269,7 @@ class MandataireController extends Zend_Controller_Action
|
||||
$fields = 'Siret avec la bonne taille';
|
||||
$error = true;
|
||||
}
|
||||
|
||||
|
||||
if($tabMandataires['Nom']=='' ){$fields[] ='Nom'; $error = true;}
|
||||
if($tabMandataires['type']==''){$fields[] ='Type'; $error = true;}
|
||||
if($tabMandataires['tribunal']==''){$fields[] ='Tribunal'; $error = true;}
|
||||
@ -252,24 +279,26 @@ class MandataireController extends Zend_Controller_Action
|
||||
if($tabMandataires['cp']==''){$fields[] ='Code Postal'; $error = true;}
|
||||
if($tabMandataires['ville']==''){$fields[] ='Ville'; $error = true;}
|
||||
if($tabMandataires['tel']==''){$fields[] ='Téléphone'; $error = true;}
|
||||
|
||||
|
||||
//Envoi de la requête au webservices
|
||||
if ($error==true){
|
||||
$message = '<font color="red">';
|
||||
$message.= 'Veuillez remplir les champs suivants : ';
|
||||
$message.= join(', ', $fields);
|
||||
$message.= '</font>';
|
||||
}else{
|
||||
} else {
|
||||
$message='';
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->setMandataire($tabMandataires);
|
||||
if ($reponse===false || $reponse->result==false){
|
||||
$message = 'Une erreur s\'est produite durant l\'enregistrement';
|
||||
if ( $reponse===false ){
|
||||
$message = "Une erreur s'est produite durant l'enregistrement";
|
||||
} elseif ( is_string($reponse) ) {
|
||||
$message = $reponse;
|
||||
}
|
||||
}
|
||||
echo $message;
|
||||
}
|
||||
|
||||
|
||||
protected function htmlentitydecode_deep($value)
|
||||
{
|
||||
$value = is_array($value) ?
|
||||
@ -277,7 +306,7 @@ class MandataireController extends Zend_Controller_Action
|
||||
html_entity_decode($value, ENT_QUOTES);
|
||||
return $value;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
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,34 +132,33 @@ class PrintController extends Zend_Controller_Action
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$fichier = $request->getParam('fichier');
|
||||
|
||||
|
||||
if (substr($fichier,-4)!='.pdf') {
|
||||
echo 'Fichier incorrect';
|
||||
exit;
|
||||
}
|
||||
$fichier = str_replace('.pdf', '', $fichier);
|
||||
|
||||
|
||||
$c = Zend_Registry::get('config');
|
||||
$file = $c->profil->path->pages.'/'.$fichier.'.html';
|
||||
$file = $c->profil->path->shared.'/pages/'.$fichier.'.html';
|
||||
if (!file_exists($file))
|
||||
{
|
||||
echo 'Fichier introuvable';
|
||||
exit;
|
||||
}
|
||||
|
||||
require_once 'wkhtmltopdf/wkhtmltopdf.php';
|
||||
$pdf = new wkhtmltopdf();
|
||||
|
||||
$pdf = new Scores_Wkhtml_Pdf();
|
||||
$pdf->setOptions('footer-right', 'Page [page] sur [toPage]');
|
||||
$pdf->setOptions('header-right', date('d/m/Y H:i:s'));
|
||||
$output_file = $pdf->exec($file);
|
||||
|
||||
|
||||
//Envoi au navigateur
|
||||
if(!file_exists($output_file))
|
||||
{
|
||||
echo 'Impossible de générer le fichier PDF';
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
$content_type = 'application/pdf';
|
||||
$dest = 'I';
|
||||
switch($dest)
|
||||
@ -169,7 +194,7 @@ class PrintController extends Zend_Controller_Action
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Imprime la page en activant le javascript d'impression
|
||||
* Il faut récupérer le controller et l'action du nom du fichier, ainsi que
|
||||
@ -181,12 +206,12 @@ class PrintController extends Zend_Controller_Action
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$fichier = $request->getParam('fichier', '');
|
||||
|
||||
|
||||
if (substr($fichier,-5)!='.html') {
|
||||
echo 'Fichier incorrect';
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
$fichier = str_replace('.html', '', $fichier);
|
||||
$elements = $this->pageParams($fichier);
|
||||
if ($elements===false){
|
||||
@ -194,9 +219,10 @@ class PrintController extends Zend_Controller_Action
|
||||
}
|
||||
$this->view->assign('controller', $elements['controller']);
|
||||
$this->view->assign('action', $elements['action']);
|
||||
$this->logger->info(print_r($elements['params'],1));
|
||||
$this->view->assign('params', $elements['params']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Envoi le fichier XML de l'objet sérialiser sur la sortie standard
|
||||
*/
|
||||
@ -206,19 +232,19 @@ class PrintController extends Zend_Controller_Action
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
$request = $this->getRequest();
|
||||
$fichier = $request->getParam('fichier', '');
|
||||
|
||||
|
||||
if (substr($fichier,-4)!='.xml') {
|
||||
echo 'Fichier incorrect.';
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
$c = Zend_Registry::get('config');
|
||||
$file = $c->profil->path->files.'/'.$fichier;
|
||||
$file = $c->profil->path->shared.'/files/'.$fichier;
|
||||
if (!file_exists($file)){
|
||||
echo "Erreur lors de la génération du fichier.";
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
header("Content-type: application/xml");
|
||||
header("Content-Disposition: attachement; filename=\"$fichier\"");
|
||||
flush();
|
@ -1,23 +1,36 @@
|
||||
<?php
|
||||
class RechercheController extends Zend_Controller_Action
|
||||
{
|
||||
protected $theme;
|
||||
|
||||
/**
|
||||
* Logger
|
||||
* @var \Monolog\Logger
|
||||
*/
|
||||
protected $logger;
|
||||
|
||||
public function init()
|
||||
{
|
||||
if (Zend_Registry::isRegistered('logger')) {
|
||||
$this->logger = Zend_Registry::get('logger');
|
||||
}
|
||||
|
||||
// --- Theme
|
||||
$this->theme = Zend_Registry::get('theme');
|
||||
|
||||
/** Pour Giant **/
|
||||
if(isset($_SESSION['recherche']['giant']))
|
||||
unset($_SESSION['recherche']['giant']);
|
||||
|
||||
require_once 'Scores/RechercheHistorique.php';
|
||||
require_once 'Scores/WsScores.php';
|
||||
|
||||
$theme = Zend_Registry::get('theme');
|
||||
$this->view->headScript()->appendFile($theme->pathScript.'/recherche.js', 'text/javascript');
|
||||
$this->theme = Zend_Registry::get('theme');
|
||||
$this->view->inlineScript()->appendFile($this->theme->pathScript.'/recherche.js', 'text/javascript');
|
||||
}
|
||||
|
||||
public function indexAction()
|
||||
{
|
||||
$this->_forward('entreprise');
|
||||
$this->forward('entreprise');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -26,7 +39,7 @@ class RechercheController extends Zend_Controller_Action
|
||||
public function entrepriseAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$this->view->headTitle()->append('Recherche Entreprise');
|
||||
$this->view->headTitle()->prepend('Recherche Entreprise');
|
||||
$form = new Application_Form_RechercheEntreprise();
|
||||
if ( $request->isPost() || $request->isGet() ){
|
||||
$form->populate($request->getParams());
|
||||
@ -45,7 +58,7 @@ class RechercheController extends Zend_Controller_Action
|
||||
public function dirigeantAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$this->view->headTitle()->append('Recherche Dirigeant');
|
||||
$this->view->headTitle()->prepend('Recherche Dirigeant');
|
||||
$form = new Application_Form_RechercheDirigeant();
|
||||
if ( $request->isPost() || $request->isGet() ){
|
||||
$form->populate($request->getParams());
|
||||
@ -53,6 +66,20 @@ class RechercheController extends Zend_Controller_Action
|
||||
$this->view->assign('form', $form);
|
||||
}
|
||||
|
||||
/**
|
||||
* Affiche le formulaire de recherche WorldCheck
|
||||
*/
|
||||
public function worldcheckAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$this->view->headTitle()->prepend('Recherche WorldCheck');
|
||||
$form = new Application_Form_RechercheWorldcheck();
|
||||
if ( $request->isPost() || $request->isGet() ){
|
||||
$form->populate($request->getParams());
|
||||
}
|
||||
$this->view->assign('form', $form);
|
||||
}
|
||||
|
||||
/**
|
||||
* Affiche le formulaire de recherche actionnaire
|
||||
* @todo : style pour les pourcentages
|
||||
@ -73,9 +100,9 @@ class RechercheController extends Zend_Controller_Action
|
||||
*/
|
||||
public function annonceAction()
|
||||
{
|
||||
$this->view->headTitle()->append('Recherche Annonce');
|
||||
$this->view->headTitle()->prepend('Recherche Annonce');
|
||||
|
||||
$session = new RechercheHistorique();
|
||||
$session = new Scores_Session_Recherche();
|
||||
$recherche = $session->item(0);
|
||||
if ($recherche['type']=='annonce') {
|
||||
$params = $recherche['params']['formA'];
|
||||
@ -91,7 +118,7 @@ class RechercheController extends Zend_Controller_Action
|
||||
$params = $request->getParams();
|
||||
$token = $request->getParam('token', null);
|
||||
|
||||
$session = new RechercheHistorique();
|
||||
$session = new Scores_Session_Recherche();
|
||||
|
||||
if (array_key_exists('formA', $params)) {
|
||||
$token = $session->save('annonce', $params);
|
||||
@ -156,9 +183,8 @@ class RechercheController extends Zend_Controller_Action
|
||||
|
||||
} else {
|
||||
|
||||
require_once 'i18n/cleanchar.php';
|
||||
//Suppression des caractères accentués
|
||||
$txt = cleanstring($params['formA']['txt']);
|
||||
$txt = Scores_Locale_String::cleanstring($params['formA']['txt']);
|
||||
//Remplacement du caractère § par ~
|
||||
$txt = str_replace('$', '~', $txt);
|
||||
// Recherche siren tenant compte des anomalies d'OCR
|
||||
@ -197,11 +223,8 @@ class RechercheController extends Zend_Controller_Action
|
||||
'annee' => $annonce->Annee,
|
||||
'code' => $code,
|
||||
'text' => $texte,
|
||||
'file' => $this->view->url(array(
|
||||
'controller'=>'telechargement',
|
||||
'action'=>'histopdf',
|
||||
'q' => $fichier,
|
||||
'host' => base64_encode($host))
|
||||
'file' => $this->view->url(array('controller'=>'telechargement', 'action'=>'histopdf',
|
||||
'q' => $fichier, 'host' => base64_encode($host)), 'default', true
|
||||
),
|
||||
);
|
||||
}
|
||||
@ -246,7 +269,7 @@ class RechercheController extends Zend_Controller_Action
|
||||
{
|
||||
$this->view->headTitle()->append('Liste des dernières recherches');
|
||||
// @todo : Attention lorsqu'il n'y pas de recherche enregistré
|
||||
$rechercheSession = new RechercheHistorique();
|
||||
$rechercheSession = new Scores_Session_Recherche();
|
||||
$derniereRecherche = $rechercheSession->item(0);
|
||||
$params = array_merge(array('type'=> $derniereRecherche['type']), $derniereRecherche['params']);
|
||||
$this->_forward('liste', 'recherche', null, $params);
|
||||
@ -255,7 +278,7 @@ class RechercheController extends Zend_Controller_Action
|
||||
public function listAction()
|
||||
{
|
||||
$this->view->headTitle()->append('Liste des dernières recherches');
|
||||
$rechercheSession = new RechercheHistorique();
|
||||
$rechercheSession = new Scores_Session_Recherche();
|
||||
$this->view->assign('historique', $rechercheSession->liste());
|
||||
}
|
||||
|
||||
@ -273,10 +296,10 @@ class RechercheController extends Zend_Controller_Action
|
||||
$request = $this->getRequest();
|
||||
if ($request->isPost() && $form->isValid($request->getParams())) {
|
||||
|
||||
Zend_Registry::get('firebug')->info($form->getValues());
|
||||
$this->logger->info(print_r($form->getValues(),1));
|
||||
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->data).'/log';
|
||||
$path = $c->profil->path->shared.'/persist/log';
|
||||
$fp = fopen($path.'/enquetes.csv', 'a');
|
||||
fwrite($fp, date('Y/m/d H:i:s').' - '.print_r($form->getValues(),true)."\n");
|
||||
fclose($fp);
|
||||
@ -292,13 +315,12 @@ class RechercheController extends Zend_Controller_Action
|
||||
$message.= "Prénom : ".$user->getPrenom()."<br/>";
|
||||
$objet = "Demande d'investigation";
|
||||
|
||||
require_once 'Scores/Mail.php';
|
||||
$mail = new Mail();
|
||||
$mail->setFrom('contact');
|
||||
$mail = new Scores_Mail_Method();
|
||||
$mail->setFromKey('contact');
|
||||
$mail->addToKey('support');
|
||||
$mail->setSubject($objet);
|
||||
$mail->setBodyHtml($message);
|
||||
$mail->send();
|
||||
$mail->execute();
|
||||
|
||||
} else {
|
||||
//Affichage formulaire
|
||||
@ -338,9 +360,13 @@ class RechercheController extends Zend_Controller_Action
|
||||
$action = 'actionnaire';
|
||||
$listParams = array('siret', 'actNomRs', 'cpVille', 'pays', 'cpVille', 'pctMin', 'pctMax');
|
||||
break;
|
||||
case 'wcheck':
|
||||
$action = 'worldcheck';
|
||||
$listParams = array('dirNom', 'dirPrenom', 'dirType');
|
||||
break;
|
||||
}
|
||||
|
||||
$rechercheParams = new RechercheHistorique();
|
||||
$rechercheParams = new Scores_Session_Recherche();
|
||||
|
||||
//Si le formulaire a été soumis alors on enregistre en session et on redirige
|
||||
if ( !empty($type) ) {
|
||||
@ -348,7 +374,7 @@ class RechercheController extends Zend_Controller_Action
|
||||
$nbField = count($listParams);
|
||||
foreach($listParams as $key){
|
||||
if(!empty($params[$key])){
|
||||
$params[$key] = strip_tags($params[$key]);
|
||||
$params[$key] = strip_tags($params[$key]);
|
||||
} else {
|
||||
$nbField--;
|
||||
}
|
||||
@ -357,9 +383,21 @@ class RechercheController extends Zend_Controller_Action
|
||||
$this->_redirect('/recherche/'.$action);
|
||||
}
|
||||
|
||||
//Worldcheck - Vérification si les champs demandés (NOM et TYPE) ont été saisie
|
||||
if ($type=='wcheck')
|
||||
{
|
||||
$required = array('dirNom', 'dirType');
|
||||
foreach($required as $item){
|
||||
if(empty($params[$item])){
|
||||
$this->redirect('/recherche/worldcheck');
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Redirection
|
||||
$token = $rechercheParams->save($type, $params);
|
||||
$this->_redirect('recherche/liste/token/'.$token);
|
||||
$this->redirect('recherche/liste/token/'.$token);
|
||||
}
|
||||
|
||||
//On selectionne en session
|
||||
@ -371,18 +409,22 @@ class RechercheController extends Zend_Controller_Action
|
||||
|
||||
//Giant
|
||||
if( !empty($params['pays']) && $type == 'ent' ){
|
||||
Zend_Registry::get('firebug')->info('RECHERCHE GIANT');
|
||||
$this->logger->info('RECHERCHE GIANT');
|
||||
$this->_forward('search', 'giant', null, $params);
|
||||
//Worldcheck
|
||||
} elseif ($type == 'wcheck' ) {
|
||||
$this->_forward('index', 'worldcheck', null, $params);
|
||||
//Recherche
|
||||
} else {
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
$this->view->assign('IDENTITE', $user->checkPerm('IDENTITE'));
|
||||
|
||||
$page = $request->getParam('page', 1);
|
||||
if ($page==0) $page = 1;
|
||||
$page = $page-1;
|
||||
$position = $page*$user->getNbRep();
|
||||
//Pagination
|
||||
$page = $request->getParam('page', 1);
|
||||
if ( $page <= 0 ) $page = 1;
|
||||
$nbAffichage = $user->getNbRep();
|
||||
$position = ($page - 1 ) * $nbAffichage;
|
||||
|
||||
require_once 'Scores/WsScores.php';
|
||||
$ws = new WsScores();
|
||||
@ -390,14 +432,12 @@ class RechercheController extends Zend_Controller_Action
|
||||
//Criteres recherche entreprise
|
||||
if ( $type=='ent' ) {
|
||||
|
||||
require_once 'i18n/cleanchar.php';
|
||||
|
||||
// Type de recherche = entreprises
|
||||
$telFax = trim(preg_replace('/[^0-9]/', '', $params['telFax']));
|
||||
$naf = trim(preg_replace('/[^0-9A-Z]/i', '', $params['naf']));
|
||||
|
||||
// Traitement des données formulaire
|
||||
$raisonSociale = cleanutf8($params['raisonSociale']);
|
||||
$raisonSociale = Scores_Locale_String::cleanutf8($params['raisonSociale']);
|
||||
$raisonSociale = str_replace(array('(',')', '/'), array('', '', ' '), $raisonSociale);
|
||||
|
||||
$numVoie = preg_replace('/[^0-9]/', '', $params['numero']);
|
||||
@ -405,10 +445,10 @@ class RechercheController extends Zend_Controller_Action
|
||||
$numVoie = '';
|
||||
}
|
||||
|
||||
$libVoie = cleanutf8($params['voie']);
|
||||
$libVoie = Scores_Locale_String::cleanutf8($params['voie']);
|
||||
$libVoie = str_replace(array('(',')', '/'), array('', '', ' '), $libVoie);
|
||||
|
||||
$cpVille = cleanutf8($params['cpVille']);
|
||||
$cpVille = Scores_Locale_String::cleanutf8($params['cpVille']);
|
||||
$cpVille = str_replace(array('(',')', '/'), array('', '', ' '), $cpVille);
|
||||
|
||||
|
||||
@ -462,7 +502,7 @@ class RechercheController extends Zend_Controller_Action
|
||||
$this->view->assign('rechCsv', $user->checkPerm('rechcsv'));
|
||||
|
||||
//Criteres recherche dirigeants
|
||||
} else if ( $type=='dir' ) {
|
||||
} else if ( $type == 'dir' ) {
|
||||
|
||||
// Type de recherche = dirigeants
|
||||
//$dirNom = preg_replace('/[^0-9A-Z]/', ' ', strtoupper($params['dirNom']));
|
||||
@ -551,16 +591,7 @@ class RechercheController extends Zend_Controller_Action
|
||||
$params[$key] = str_replace('/', ' ', $params[$key]);
|
||||
}
|
||||
|
||||
$criteresLien = $this->view->url($params, null, true);
|
||||
$info = $reponse->info;
|
||||
$nbReponses = $reponse->nbReponses;
|
||||
$nbReponsesTotal = $reponse->nbReponsesTotal;
|
||||
if ($nbReponses < $nbReponsesTotal) {
|
||||
$totPage = ceil($nbReponsesTotal/$user->getNbRep());
|
||||
$curPage = $page+1;
|
||||
} else {
|
||||
$totPage = $curPage = 1;
|
||||
}
|
||||
$criteresLien = $this->view->url($params, 'default', true);
|
||||
|
||||
$liste = array();
|
||||
if (count($etabs)>0) {
|
||||
@ -572,6 +603,8 @@ class RechercheController extends Zend_Controller_Action
|
||||
$item['siret'] = $etab->Siren.$etab->Nic;
|
||||
$item['InfoSiret'] = $etab->Siren.' '.$etab->Nic;
|
||||
$item['InfoNom'] = $etab->Nom;
|
||||
$item['source'] = $etab->Source;
|
||||
$item['sourceId'] = $etab->SourceId;
|
||||
|
||||
$nomDetail = '';
|
||||
if ($etab->Nom2<>'' || $etab->Enseigne<>'' || $etab->Sigle<>'') {
|
||||
@ -598,7 +631,6 @@ class RechercheController extends Zend_Controller_Action
|
||||
} else {
|
||||
$infoEtab.= 'Établissement secondaire ';
|
||||
}
|
||||
Zend_Registry::get('firebug')->info('Nic: '.$etab->Nic.' , Siege: '.$etab->Siege);
|
||||
|
||||
if ($etab->Actif==1){
|
||||
$infoEtab.= 'actif';
|
||||
@ -617,7 +649,7 @@ class RechercheController extends Zend_Controller_Action
|
||||
'action'=>'fiche',
|
||||
'id' => $etab->id,
|
||||
'siret' => $etab->Siren,
|
||||
), null, true);
|
||||
), 'default', true);
|
||||
|
||||
if ( $user->checkPerm('IDENTITE') ) {
|
||||
$infoEtab.= ' <a title="Voir la fiche d\'identité du siège de cette entreprise"'.
|
||||
@ -632,15 +664,14 @@ class RechercheController extends Zend_Controller_Action
|
||||
|
||||
$item['InfoEtab'] = $infoEtab;
|
||||
|
||||
$adresse = $etab->Adresse.'<br/>';
|
||||
if (isset($etab->Adresse2) && $etab->Adresse2 != '') {
|
||||
$adresse.= $etab->Adresse2.'<br/>';
|
||||
$adresse = $etab->Adresse;
|
||||
if ( !empty($etab->Adresse2) ) {
|
||||
$adresse.= '<br/>'.$etab->Adresse2;
|
||||
}
|
||||
$adresse.= "<b>".$etab->CP." ".$etab->Ville."</b>";
|
||||
|
||||
if (null === $etab->Pays) {
|
||||
$adresse.= '<br/><b>France</b>';
|
||||
} else {
|
||||
if ( !empty($etab->Ville) && intval($etab->CP) > 0) {
|
||||
$adresse.= '<br/><b>'.$etab->CP." ".$etab->Ville."</b>";
|
||||
}
|
||||
if (null !== $etab->Pays) {
|
||||
$adresse.= '<br/><b>'.$etab->Pays.'</b>';
|
||||
}
|
||||
|
||||
@ -666,19 +697,19 @@ class RechercheController extends Zend_Controller_Action
|
||||
}
|
||||
$item['InfoActivite'] = $activite;
|
||||
|
||||
if ($type=='dir') {
|
||||
if ( $type == 'dir' ) {
|
||||
|
||||
$item['InfoDirigeant'] = '<u>Dirigeant recherché :</u> ';
|
||||
if ($etab->DirRs!='') {
|
||||
$item['InfoDirigeant'].= '<b>'.$etab->DirRs.'</b>, représenté par ';
|
||||
}
|
||||
$item['InfoDirigeant'].= $etab->DirNom .' '. $etab->DirPrenom;
|
||||
if ($etab->DirNomUsage<>'' && $etab->DirNomUsage<>$etab->DirNom) {
|
||||
if ( $etab->DirNomUsage != '' && $etab->DirNomUsage != $etab->DirNom) {
|
||||
$item['InfoDirigeant'].= ' ('. $etab->DirNomUsage . ')';
|
||||
}
|
||||
$item['InfoDirigeant'].= '<i>, '.$etab->DirFonction.'</i><br/>';
|
||||
|
||||
} elseif ($type=='act'){
|
||||
} elseif ( $type == 'act' ) {
|
||||
|
||||
$item['InfoActionnaire'] = '<u>Actionnaire recherché :</u> ';
|
||||
if ($etab->ActNomRs<>'') {
|
||||
@ -690,8 +721,8 @@ class RechercheController extends Zend_Controller_Action
|
||||
if ($etab->ActActif==0){
|
||||
$preDate = ', avant le ';
|
||||
}
|
||||
require_once 'common/dates.php';
|
||||
if ($etab->ActDateLien!='') $item['InfoActionnaire'].= $preDate.WDate::dateT('Y-m-d', 'd/m/Y',$etab->ActDateLien);
|
||||
$date = new Zend_Date($etab->ActDateLien, 'yyyy-MM-dd');
|
||||
if ($etab->ActDateLien!='') $item['InfoActionnaire'].= $preDate.$date->toString('dd/MM/yyyy');
|
||||
if ($etab->ActPmin!='') {
|
||||
if($etab->ActPmin<1){
|
||||
$item['InfoActionnaire'].= ', minoritaire ';
|
||||
@ -705,6 +736,11 @@ class RechercheController extends Zend_Controller_Action
|
||||
|
||||
//Affichage accès direct aux pages
|
||||
$liens = array();
|
||||
/**
|
||||
* test en dur clients pour bilans
|
||||
* @todo client = 34
|
||||
* @todo client = 60
|
||||
*/
|
||||
if ($user->getIdClient()==34 || $user->getIdClient()==60) {
|
||||
$liens[] = array(
|
||||
'title' => 'Comptes annuels',
|
||||
@ -712,22 +748,26 @@ class RechercheController extends Zend_Controller_Action
|
||||
'controller'=>'pieces',
|
||||
'action'=>'bilans',
|
||||
'siret'=>$etab->Siren.$etab->Nic,
|
||||
'id'=>$etab->id), null, true),
|
||||
'id'=>$etab->id), 'default', true),
|
||||
);
|
||||
$liens[] = array(
|
||||
'title' => 'Actes et status',
|
||||
'href' => $this->view->url(array(
|
||||
'controller'=>'pieces', 'action'=>'actes',
|
||||
'siret'=>$etab->Siren.$etab->Nic, 'id'=>$etab->id), null, true),
|
||||
'siret'=>$etab->Siren.$etab->Nic, 'id'=>$etab->id), 'default', true),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* test en dur clients pour fiche
|
||||
* @todo client = 60
|
||||
*/
|
||||
if ($user->getIdClient()==60) {
|
||||
$liens[] = array(
|
||||
'title' => 'Fiche AGS',
|
||||
'href' => $this->view->url(array(
|
||||
'controller'=>'identite', 'action'=>'fichepc',
|
||||
'siret'=>$etab->Siren.$etab->Nic, 'id'=>$etab->id), null, true),
|
||||
'siret'=>$etab->Siren.$etab->Nic, 'id'=>$etab->id), 'default', true),
|
||||
);
|
||||
}
|
||||
if (count($liens)>0) {
|
||||
@ -756,20 +796,45 @@ class RechercheController extends Zend_Controller_Action
|
||||
'action' => 'liste',
|
||||
'type' => 'ent',
|
||||
'raisonSociale' => trim($criteres['dirNom'].' '.$criteres['dirPrenom'])
|
||||
), null, true));
|
||||
), 'default', true));
|
||||
} else {
|
||||
$this->view->assign('blockDirToEntreprise', false);
|
||||
}
|
||||
|
||||
$this->view->assign('token', $token);
|
||||
$this->view->assign('liste', $liste);
|
||||
$this->view->assign('totPage', $totPage);
|
||||
$this->view->assign('curPage', $curPage);
|
||||
$this->view->assign('liste', $liste);
|
||||
|
||||
//Calcul pagination
|
||||
$nbReponses = $reponse->nbReponses;
|
||||
$nbReponsesTotal = $reponse->nbReponsesTotal;
|
||||
$pagePrev=1;
|
||||
$pageNext=1;
|
||||
if ($nbReponses < $nbReponsesTotal) {
|
||||
$pageTotal = ceil( $nbReponsesTotal / $nbAffichage );
|
||||
$pageCurrent = $page;
|
||||
$pagePrev = $page - 1;
|
||||
if ($pagePrev < 1) {
|
||||
$pagePrev = 1;
|
||||
}
|
||||
$pageNext = $page + 1;
|
||||
if( $pageNext > $pageTotal ) {
|
||||
$pageNext = $pageTotal;
|
||||
}
|
||||
} else {
|
||||
$pageTotal = $pageCurrent = 1;
|
||||
}
|
||||
$this->view->assign('PageTotal', $pageTotal);
|
||||
$this->view->assign('PagePrev', $pagePrev);
|
||||
$this->view->assign('PageNext', $pageNext);
|
||||
$this->view->assign('PageCurrent', $pageCurrent);
|
||||
|
||||
$this->view->assign('nbReponses', empty($nbReponses) ? 0 : $nbReponses);
|
||||
$this->view->assign('nbReponsesTotal', empty($nbReponsesTotal) ? 0 : $nbReponsesTotal);
|
||||
|
||||
$this->view->assign('token', $token);
|
||||
|
||||
$this->view->assign('criteresTexte', $criteresTexte);
|
||||
$this->view->assign('criteresLien', $criteresLien);
|
||||
$this->view->assign('info', $info);
|
||||
$this->view->assign('info', $reponse->info);
|
||||
}
|
||||
}
|
||||
|
||||
@ -864,7 +929,7 @@ class RechercheController extends Zend_Controller_Action
|
||||
$sql->where("LOWER(libelle) ".$where);
|
||||
}
|
||||
}
|
||||
Zend_Registry::get('firebug')->info($where);
|
||||
$this->logger->info($where);
|
||||
|
||||
$rows = $table->fetchAll($sql);
|
||||
if ( count($rows)>0 ) {
|
||||
@ -893,7 +958,7 @@ class RechercheController extends Zend_Controller_Action
|
||||
$params = $request->getParams();
|
||||
$type = $request->getParam('type', '');
|
||||
|
||||
$rechercheParams = new RechercheHistorique();
|
||||
$rechercheParams = new Scores_Session_Recherche();
|
||||
|
||||
//Si le formulaire a été soumis alors on enregistre en session et on redirige
|
||||
if ( !empty($type) ) {
|
||||
@ -971,7 +1036,7 @@ class RechercheController extends Zend_Controller_Action
|
||||
'action'=>'fiche',
|
||||
'id' => $etab->id,
|
||||
'siret' => $etab->Siren,
|
||||
));
|
||||
), 'default', true);
|
||||
$infoEtab.= ' <a title="Voir la fiche d\'identité du siège de cette entreprise"'.
|
||||
' href="'.$url.'">(Accès siège)</a>';
|
||||
}
|
||||
@ -1004,9 +1069,14 @@ class RechercheController extends Zend_Controller_Action
|
||||
$item['source'] = $etab->Infos->source;
|
||||
$item['ref'] = $etab->Infos->ref;
|
||||
|
||||
require_once 'common/dates.php';
|
||||
$item['dateAjout'] = WDate::dateT('Y-m-d','d/m/Y',$etab->Infos->dateAjout);
|
||||
$item['dateEnvoi'] = ($etab->Infos->dateEnvoi!='0000-00-00') ? WDate::dateT('Y-m-d','d/m/Y',$etab->Infos->dateEnvoi) : '';
|
||||
$date = new Zend_Date($etab->Infos->dateAjout, 'yyyy-MM-dd');
|
||||
$item['dateAjout'] = $date->toString('dd/MM/yyyy');
|
||||
if ( $etab->Infos->dateEnvoi!='0000-00-00' ) {
|
||||
$date = new Zend_Date($etab->Infos->dateEnvoi, 'yyyy-MM-dd');
|
||||
$item['dateEnvoi'] = $date->toString('dd/MM/yyyy');
|
||||
} else {
|
||||
$item['dateEnvoi'] = '';
|
||||
}
|
||||
|
||||
$liste[] = $item;
|
||||
}
|
||||
@ -1033,7 +1103,7 @@ class RechercheController extends Zend_Controller_Action
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
||||
$rechercheParams = new RechercheHistorique();
|
||||
$rechercheParams = new Scores_Session_Recherche();
|
||||
//On selectionne en session
|
||||
if (count($rechercheParams->liste())>0){
|
||||
$recherche = $rechercheParams->item(0);
|
||||
@ -1047,8 +1117,6 @@ class RechercheController extends Zend_Controller_Action
|
||||
//Criteres recherche entreprise
|
||||
if ($type=='ent'){
|
||||
|
||||
require_once 'i18n/cleanchar.php';
|
||||
|
||||
// Type de recherche = entreprises
|
||||
$telFax = trim(preg_replace('/[^0-9]/', '', $params['telFax']));
|
||||
$naf = trim(preg_replace('/[^0-9A-Z]/i', '', $params['naf']));
|
||||
@ -1062,8 +1130,8 @@ class RechercheController extends Zend_Controller_Action
|
||||
die('Numéro de voie incorrecte !');
|
||||
}
|
||||
|
||||
$libVoie = cleanutf8($params['voie']);
|
||||
$cpVille = cleanutf8($params['cpVille']);
|
||||
$libVoie = Scores_Locale_String::cleanutf8($params['voie']);
|
||||
$cpVille = Scores_Locale_String::cleanutf8($params['cpVille']);
|
||||
|
||||
if (preg_match("/^([0-9]{2,5})([\D]*)/i", $cpVille, $matches)) {
|
||||
$cp = trim($matches[1]);
|
||||
@ -1140,10 +1208,9 @@ class RechercheController extends Zend_Controller_Action
|
||||
//echo "<pre>"; print_r($etabs); echo "</pre>"; exit;
|
||||
|
||||
$c = Zend_Registry::get('config');
|
||||
$file = $c->profil->path->files . '/'.$user->getIdClient().'-'.$user->getLogin().'-'.date('YmdHis').'.csv';
|
||||
$file = $c->profil->path->shared . '/files/'.$user->getIdClient().'-'.$user->getLogin().'-'.date('YmdHis').'.csv';
|
||||
|
||||
require_once 'Scores/ExportCSV.php';
|
||||
$export = new ExportCSV($etabs, 'rechercheEntreprise');
|
||||
$export = new Scores_Export_ArrayCsv($etabs, 'rechercheEntreprise');
|
||||
$export->writeFile($file);
|
||||
|
||||
$content_type = 'application/csv-tab-delimited-table';
|
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>
|
@ -7,7 +7,7 @@ fieldset legend { font-weight:bold; font-size: 108%; padding:0; }
|
||||
div.submit { clear: both; text-align: center; }
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$(function(){
|
||||
|
||||
$('.menu-close').click(function(){
|
||||
$('div.blockh2').css('display','none');
|
||||
@ -118,7 +118,7 @@ $(document).ready(function(){
|
||||
<label>Siren</label>
|
||||
<div class="field">
|
||||
<input name="siren" type="text" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->siren : '';?>" />
|
||||
<a href="#">Obtention Raison sociale</a>
|
||||
<a href="#">Obtention Dénomination sociale</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -469,7 +469,7 @@ if (!empty($text_ip)){
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Nombre d'investigations inclues dans le forfait client</label>
|
||||
<label>Nombre d'investigations incluses dans le forfait client</label>
|
||||
<div class="field">
|
||||
<input type="text" name="forfaitInvestigNb" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->forfaitInvestigNb : '';?>" />
|
||||
</div>
|
@ -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%">
|
@ -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);
|
@ -1,5 +1,5 @@
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$(function(){
|
||||
|
||||
$('a.user-service').click(function(e){
|
||||
e.preventDefault();
|
@ -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>
|
@ -0,0 +1,177 @@
|
||||
<?php if (empty($this->AutrePage)) {?>
|
||||
<div id="center">
|
||||
<?php }?>
|
||||
|
||||
<?php if (empty($this->AutrePage)){?>
|
||||
<h1><?=$this->translate("DIRIGEANTS")?></h1>
|
||||
<div class="paragraph">
|
||||
<table class="identite">
|
||||
<tr>
|
||||
<td width="30"> </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 }?>
|
||||
<?php if( $this->dirigeantsop ){ ?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td colspan="2" width="550" class="StyleInfoData">
|
||||
<a href="<?=$this->dirigeantsop?>"><?=$this->translate("Consulter la liste des dirigeants opérationnels")?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</table>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
<h2><?=$this->translate("Liste des dirigeants actifs")?></h2>
|
||||
<div class="paragraph">
|
||||
<?php if ( count($this->dirigeants)>0 ) { ?>
|
||||
<table class="data">
|
||||
<?php foreach ($this->dirigeants as $dir) {?>
|
||||
<tr>
|
||||
<td class="StyleInfoData" width="200"><?=$dir->Titre?></td>
|
||||
<td class="StyleInfoData" width="320">
|
||||
|
||||
<?php if ($dir->Societe != '') { ?>
|
||||
<a href="<?=$this->url(array('controller' => 'recherche', 'action' => 'liste', 'type' => 'ent','raisonSociale' => $dir->Societe), 'default', true)?>"
|
||||
title="<?=$this->translate("Recherche à partir de la dénomination sociale")?>">
|
||||
<?=$dir->Societe?>
|
||||
</a>
|
||||
<br/>
|
||||
<?php }?>
|
||||
|
||||
<?php if ($dir->Nom != '') { ?>
|
||||
<a href="<?=$this->url(array(
|
||||
'controller' => 'recherche',
|
||||
'action' => 'liste',
|
||||
'type' => 'dir',
|
||||
'dirNom' => $dir->Nom,
|
||||
'dirPrenom' => $dir->Prenom,
|
||||
'dirDateNaissJJ' => substr($dir->NaissDate,0,2),
|
||||
'dirDateNaissMM' => substr($dir->NaissDate,3,2),
|
||||
'dirDateNaissAAAA' => substr($dir->NaissDate,6,4),
|
||||
'dirCpVille' => $dir->NaissVille,
|
||||
), 'default', true)?>" title="<?=$this->translate("Recherche à partir du nom du dirigeant")?>">
|
||||
<?=$dir->Nom.' '.$dir->Prenom?>
|
||||
</a>
|
||||
<?php
|
||||
if (trim($dir->NaissDate) != '' && trim($dir->NaissVille.' '.$dir->NaissDepPays) != '') { ?>
|
||||
<br/>né(e) le <?=$dir->NaissDate?> à <?=$dir->NaissVille?>
|
||||
<?php if (trim($dir->NaissDepPays) != '') { ?> (<?=$dir->NaissDepPays?>)<?php }?>
|
||||
<?php } else if (trim($dir->NaissDate) != '') { ?>
|
||||
né(e) le <?=$dir->NaissDate?>
|
||||
<?php } else if (trim($dir->NaissVille.' '.$dir->NaissDepPays) != '') { ?>
|
||||
né(e) à <?=$dir->NaissVille?> (<?=$dir->NaissDepPays?>)
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
|
||||
</td>
|
||||
<td class="StyleInfoData" width="100" valign="top">
|
||||
<?php if ($dir->Siren!='') {?>
|
||||
<a title="<?=$this->translate("Consulter la fiche identité")?>" href="<?=$this->url(array('controller'=>'identite', 'action'=>'fiche', 'siret'=>$dir->Siren), 'default', true)?>">
|
||||
<?=$this->SirenTexte($dir->Siren)?></a>
|
||||
|
||||
<?php if (empty($this->AutrePage) && $this->edition) {?>
|
||||
<div style="line-height:16px;">
|
||||
<a class="dialog" title="<?=$this->translate("Ajouter un actionnaire")?>" href="<?=$this->url(array('controller'=>'saisie','action'=>'lien','type'=>'actionnaire','mode'=>'add','siren'=>$this->siren,'createfiche'=>$dir->Siren),null,true)?>">
|
||||
<img style="vertical-align:middle;" src="/themes/default/images/interfaces/ajouter.png" /></a>
|
||||
</div>
|
||||
<?php }?>
|
||||
<?php }?>
|
||||
</td>
|
||||
<?php if (empty($this->AutrePage) && $this->accessWorldCheck) {?>
|
||||
<td>
|
||||
<?php if ($dir->Societe != '') { ?>
|
||||
<img style="cursor:pointer;" class="wcheck" data-url="<?=$this->url(array(
|
||||
'controller'=>'worldcheck','action'=>'occurence','siren'=>substr($this->siret,0,9),
|
||||
'dirType'=>'ORGANISATION','dirSociete'=>$dir->Societe),'default',true);?>" src="/themes/default/images/worldcheck/wc.png"/>
|
||||
<?php }?>
|
||||
<?php if ($dir->Nom != '') { ?>
|
||||
<img style="cursor:pointer;" class="wcheck" data-url="<?=$this->url(array(
|
||||
'controller'=>'worldcheck','action'=>'occurence','siren'=>substr($this->siret,0,9),
|
||||
'dirType'=>'INDIVIDUAL','dirNom'=>$dir->Nom,'dirPrenom'=>$dir->Prenom),'default',true);?>" src="/themes/default/images/worldcheck/wc.png"/>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<?php }?>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</table>
|
||||
<?php } else { ?>
|
||||
<table>
|
||||
<tr>
|
||||
<td class="StyleInfoData" width="550">
|
||||
<?=$this->translate("Aucune donnée n'est présente dans notre base")?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<?php if (empty($this->AutrePage)) {?>
|
||||
<?=$this->render('cgu.phtml', $this->cgu)?>
|
||||
<?php }?>
|
||||
|
||||
<?php if (empty($this->AutrePage)) {?>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
<?php if (empty($this->AutrePage) && $this->edition) {?>
|
||||
<script>
|
||||
$('a.dialog').on('click', function(){
|
||||
var href = $(this).attr('href');
|
||||
if (href!='#') {
|
||||
var title = $(this).attr('title');
|
||||
var dialogOpts = {
|
||||
bgiframe: true,
|
||||
title: title,
|
||||
width: 650,
|
||||
height: 600,
|
||||
modal: true,
|
||||
open: function(event, ui) {
|
||||
$(this).html('Chargement...');
|
||||
$(this).load(href);
|
||||
},
|
||||
buttons: {
|
||||
Quitter: function() { $(this).dialog('close'); }
|
||||
},
|
||||
close: function() { $('#dialog').remove(); }
|
||||
};
|
||||
$('<div id="dialog"></div>').dialog(dialogOpts);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<?php }?>
|
||||
|
||||
<?php if (empty($this->AutrePage) && $this->accessWorldCheck) {?>
|
||||
<script>
|
||||
$('img.wcheck').each(function(){
|
||||
$(this).qtip({
|
||||
hide: { event: 'unfocus' },
|
||||
show: { solo: true, delay: 500 },
|
||||
content: {
|
||||
button: true,
|
||||
title: 'WorlCheck',
|
||||
text: "Chargement...",
|
||||
ajax: { url: $(this).data('url') } },
|
||||
position: { my: 'right center', at: 'left center' }
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php }?>
|
@ -0,0 +1,178 @@
|
||||
<?php if (empty($this->AutrePage)){?>
|
||||
<div id="center">
|
||||
<?php }?>
|
||||
|
||||
<?php if (empty($this->AutrePage)){?>
|
||||
<h1><?=$this->translate("DIRIGEANTS OPÉRATIONNELS")?></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>
|
||||
<?php }?>
|
||||
|
||||
<h2><?=$this->translate("Liste des dirigeants actifs")?></h2>
|
||||
<div class="paragraph">
|
||||
<?php if ($this->edition) {?>
|
||||
<a class="dialog" title="Ajouter un dirigeant" href="<?=$this->url(array('controller'=>'saisie','action'=>'diropcontrol','mode'=>'add','siret'=>$this->siret), 'default', true)?>">
|
||||
<img style="vertical-align:middle;" src="/themes/default/images/interfaces/ajouter.png" /><?=$this->translate("Ajouter un dirigeant")?></a>
|
||||
<?php }?>
|
||||
<?php if ( count($this->dirigeants)>0 ) {?>
|
||||
<table class="data">
|
||||
<?php foreach ($this->dirigeants as $dir) {?>
|
||||
<tr>
|
||||
<td class="StyleInfoData" width="140"><?=$dir->Titre?></td>
|
||||
<td class="StyleInfoData" id="<?=$dir->Id?>" width="200">
|
||||
<?php if ($dir->Societe != '') { ?>
|
||||
<a href="<?=$this->url(array(
|
||||
'controller' => 'recherche',
|
||||
'action' => 'liste',
|
||||
'type' => 'ent',
|
||||
'raisonSociale' => $dir->Societe
|
||||
), 'default', true)?>"
|
||||
title="<?=$this->translate("Recherche à partir de la Dénomination sociale")?>">
|
||||
<?=$dir->Societe?>
|
||||
</a>
|
||||
|
||||
<?php }?>
|
||||
<?php if ($dir->Nom != '') { ?>
|
||||
<a href="<?=$this->url(array(
|
||||
'controller' => 'recherche',
|
||||
'action' => 'liste',
|
||||
'type' => 'dir',
|
||||
'dirNom' => $dir->Nom,
|
||||
'dirPrenom' => $dir->Prenom,
|
||||
), 'default', true)?>" title="<?=$this->translate("Recherche à partir du nom du dirigeant")?>">
|
||||
<?=$dir->Civilite.' '.$dir->Nom.' '.$dir->Prenom?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<td class="StyleInfoData" width="200">
|
||||
<?php
|
||||
$message = '';
|
||||
if (trim($dir->NaissDate) != '' && trim($dir->NaissDate)!='0000-00-00') {
|
||||
$date = new Zend_Date($dir->NaissDate, 'yyyy-MM-dd');
|
||||
$message = $message.' '.$this->translate("le").' '.$date->toString('dd/MM/yyyy');
|
||||
}
|
||||
|
||||
if (trim($dir->NaissVille.' '.$dir->NaissDepPays) != '') {
|
||||
$message = $message.' '.$this->translate("à").' '.$dir->NaissVille;
|
||||
}
|
||||
|
||||
if ($message!='') {
|
||||
if ($dir->Civilite=='' || $dir->Civilite==null) {
|
||||
$message = $this->translate("né(e)").' '.$message;
|
||||
} else if ($dir->Civilite=='M') {
|
||||
$message = $this->translate("né").' '.$message;
|
||||
} else {
|
||||
$message = $this->translate("née").' '.$message;
|
||||
}
|
||||
echo $message;
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<?php if ($this->edition) {?>
|
||||
<td>
|
||||
<a class="dialog" title="Modifier le dirigeant" href="<?=$this->url(array('controller'=>'saisie','action'=>'diropcontrol','mode'=>'edit','siret'=>$this->siret,'id'=>$dir->Id), 'default', true)?>">
|
||||
<img src="/themes/default/images/interfaces/editer.png" /></a>
|
||||
<a class="dialog" title="Supprimer le dirigeant" href="<?=$this->url(array('controller'=>'saisie','action'=>'diropcontrol','mode'=>'del','siret'=>$this->siret,'id'=>$dir->Id), 'default', true)?>">
|
||||
<img src="/themes/default/images/interfaces/supprimer.png" /></a>
|
||||
</td>
|
||||
<?php if (empty($this->AutrePage) && $this->accessWorldCheck) {?>
|
||||
<td>
|
||||
<?php if ($dir->Societe != '') { ?>
|
||||
<img style="cursor:pointer;" class="wcheck" data-url="<?=$this->url(array(
|
||||
'controller'=>'worldcheck','action'=>'occurence','siren'=>$this->siren,
|
||||
'dirType'=>'ORGANISATION','dirSociete'=>$dir->Societe),'default',true);?>" src="/themes/default/images/worldcheck/wc.png"/>
|
||||
<?php }?>
|
||||
<?php if ($dir->Nom != '') {
|
||||
$param = array(
|
||||
'controller'=>'worldcheck',
|
||||
'action'=>'occurence',
|
||||
'siren'=>$this->siren,
|
||||
'dirType'=>'INDIVIDUAL',
|
||||
'dirNom'=>$dir->Nom,
|
||||
'dirPrenom'=>$dir->Prenom,
|
||||
);
|
||||
?>
|
||||
<img style="cursor:pointer;" class="wcheck" data-url="<?=$this->url($param,'default',true);?>" src="/themes/default/images/worldcheck/wc.png"/>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<?php }?>
|
||||
<?php }?>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</table>
|
||||
<?php } else { ?>
|
||||
<table>
|
||||
<tr>
|
||||
<td class="StyleInfoData" width="550">
|
||||
<?=$this->translate("Aucune donnée n'est présente dans notre base")?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<?php if (empty($this->AutrePage)){?>
|
||||
<?=$this->render('cgu.phtml', $this->cgu)?>
|
||||
</div>
|
||||
<?php }?>
|
||||
<script>
|
||||
$('img.wcheck').each(function(){
|
||||
$(this).qtip({
|
||||
hide: { event: 'unfocus' },
|
||||
show: { solo: true, delay: 1000 },
|
||||
content: {
|
||||
button: true,
|
||||
title: 'WorlCheck',
|
||||
text: "Chargement...",
|
||||
ajax: { url: $(this).data('url') } },
|
||||
position: { my: 'right center', at: 'left center' }
|
||||
});
|
||||
});
|
||||
|
||||
$('a.dialog').on('click', function(){
|
||||
var href = $(this).attr('href');
|
||||
if (href!='#') {
|
||||
var title = $(this).attr('title');
|
||||
var dialogOpts = {
|
||||
bgiframe: true,
|
||||
title: title,
|
||||
width: 600,
|
||||
height: 550,
|
||||
modal: true,
|
||||
open: function(event, ui) {
|
||||
$(this).html('Chargement...');
|
||||
$(this).load(href);
|
||||
},
|
||||
buttons: {
|
||||
Quitter: function() { $(this).dialog('close'); }
|
||||
},
|
||||
close: function() { $('#dialog').remove(); }
|
||||
};
|
||||
$('<div id="dialog"></div>').dialog(dialogOpts);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
</script>
|
@ -1,9 +1,7 @@
|
||||
<div id="center">
|
||||
<h2>Droits d'accès</h2>
|
||||
<div class="paragraph">
|
||||
<?php
|
||||
$message = 'Vous n\'avez pas les droits nécessaires pour afficher cette page.';
|
||||
?>
|
||||
<?php $message = 'Vous n\'avez pas les droits nécessaires pour afficher cette page.'; ?>
|
||||
<div style="padding:0.7em;" class="ui-state-error ui-corner-all">
|
||||
<p><span style="float: left; margin-right: 0.3em;" class="ui-icon ui-icon-alert"></span>
|
||||
<strong>Erreur :</strong> <?=$message?></p>
|
@ -51,7 +51,7 @@ if($this->commande == false){
|
||||
<div class="infoTitle StyleInfoLib">Numéro de TVA Intracom.</div>
|
||||
<div class="infoData"><?=substr($this->Etab->TvaNumero,0,2).' '.substr($this->Etab->TvaNumero,2,2).' '.substr($this->Etab->TvaNumero,-9)?></div>
|
||||
|
||||
<div class="infoTitle StyleInfoLib">Raison Sociale</div>
|
||||
<div class="infoTitle StyleInfoLib">Dénomination Sociale</div>
|
||||
<div class="infoData"><?=$this->Etab->Nom?></div>
|
||||
|
||||
<div class="infoTitle StyleInfoLib">Adresse</div>
|
||||
@ -244,7 +244,7 @@ if($this->commande == true)
|
||||
{
|
||||
?>
|
||||
<p>Votre demande à été prise en compte pour le siren <b><?=$this->siren?></b>.</p>
|
||||
<p><a href="<?=$this->url(array('controller'=>'identite', 'action'=>'fichier', 'siret'=>$this->siren), null, true)?>">
|
||||
<p><a href="<?=$this->url(array('controller'=>'identite', 'action'=>'fichier', 'siret'=>$this->siren), 'default', true)?>">
|
||||
Retour à la fiche identite
|
||||
</a></p>
|
||||
<?php
|
@ -0,0 +1,146 @@
|
||||
<div id="center">
|
||||
|
||||
<h1>PATRIMOINE FONCIER</h1>
|
||||
|
||||
<div class="paragraph">
|
||||
<table class="identite">
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">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">Dénomination Sociale</td>
|
||||
<td width="350" class="StyleInfoData"><?=$this->raisonSociale?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php if ($this->MsgTxt) {?>
|
||||
|
||||
<div class="paragraph"><?=$this->MsgTxt?></div>
|
||||
|
||||
<?php } else {?>
|
||||
|
||||
<?php if (count($this->List) > 0) {?>
|
||||
|
||||
<h2>Propriétés baties</h2>
|
||||
<div class="paragraph">
|
||||
<table class="data">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Rôle</th>
|
||||
<th>Dépt.</th>
|
||||
<th>Commune</th>
|
||||
<th>Section</th>
|
||||
<th>N° Plan</th>
|
||||
<th>Fantoir</th>
|
||||
<th>Adresse</th>
|
||||
<th>Bât.</th>
|
||||
<th>Ent.</th>
|
||||
<th>Niv.</th>
|
||||
<th>Surface</th>
|
||||
<th>Nature</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if (count($this->List) > 0) {?>
|
||||
<?php foreach($this->List as $p) {?>
|
||||
<?php if ($p->Type == 'local') {?>
|
||||
<tr>
|
||||
<td title="<?=$p->RoleLib?>"><?=$p->Role?></td>
|
||||
<td><?=$p->Departement?></td>
|
||||
<td><?=$p->CommuneLib?></td>
|
||||
<td><?=$p->Section?></td>
|
||||
<td><?=$p->PlanNum?></td>
|
||||
<td><?=$p->Fantoir?></td>
|
||||
<td>
|
||||
<?=empty($p->AdresseNum) ? '' : $p->AdresseNum.' ' ; ?>
|
||||
<?=empty($p->AdresseInd) ? '' : $p->AdresseInd.' ' ; ?>
|
||||
<?=empty($p->AdresseType) ? '' : $p->AdresseType.' ' ; ?>
|
||||
<?=empty($p->AdresseLib) ? '' : $p->AdresseLib.' ' ; ?>
|
||||
</td>
|
||||
<td><?=$p->Batiment?></td>
|
||||
<td><?=$p->Ent?></td>
|
||||
<td><?=$p->Niveau?></td>
|
||||
<td><?=number_format($p->SurfaceTotal, 0, ",", " ")?> m²</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php if (count($p->SurfaceDetail->item) > 0) {?>
|
||||
<?php foreach($p->SurfaceDetail->item as $s) {?>
|
||||
<tr>
|
||||
<td colspan="10" align="right"><i>Detail</i></td>
|
||||
<td><?=number_format($s->Surface, 0, ",", " ")?> m²</td>
|
||||
<td><?=$s->Label?></td>
|
||||
</tr>
|
||||
<?php }?>
|
||||
<?php }?>
|
||||
<?php }?>
|
||||
<?php }?>
|
||||
<?php }?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h2>Propriétés non baties</h2>
|
||||
<div class="paragraph">
|
||||
<table class="data">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Rôle</th>
|
||||
<th>Dépt.</th>
|
||||
<th>Commune</th>
|
||||
<th>Section</th>
|
||||
<th>N° Plan</th>
|
||||
<th>Fantoir</th>
|
||||
<th>Adresse</th>
|
||||
<th>Surface</th>
|
||||
<th>Nature</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if (count($this->List) > 0) {?>
|
||||
<?php foreach($this->List as $p) {?>
|
||||
<?php if ($p->Type == 'parcelle') {?>
|
||||
<tr>
|
||||
<td title="<?=$p->RoleLib?>"><?=$p->Role?></td>
|
||||
<td><?=$p->Departement?></td>
|
||||
<td><?=$p->CommuneLib?></td>
|
||||
<td><?=$p->Section?></td>
|
||||
<td><?=$p->PlanNum?></td>
|
||||
<td><?=$p->Fantoir?></td>
|
||||
<td>
|
||||
<?=empty($p->AdresseNum) ? '' : $p->AdresseNum.' ' ; ?>
|
||||
<?=empty($p->AdresseInd) ? '' : $p->AdresseInd.' ' ; ?>
|
||||
<?=empty($p->AdresseType) ? '' : $p->AdresseType.' ' ; ?>
|
||||
<?=empty($p->AdresseLib) ? '' : $p->AdresseLib.' ' ; ?>
|
||||
</td>
|
||||
<td><?=number_format($p->SurfaceTotal, 0, ",", " ")?> m²</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php if (count($p->SurfaceDetail->item) > 0) {?>
|
||||
<?php foreach($p->SurfaceDetail->item as $s) {?>
|
||||
<tr>
|
||||
<td colspan="7" align="right"><i>Detail</i></td>
|
||||
<td><?=number_format($s->Surface, 0, ",", " ")?> m²</td>
|
||||
<td><?=$s->Label?></td>
|
||||
</tr>
|
||||
<?php }?>
|
||||
<?php }?>
|
||||
<?php }?>
|
||||
<?php }?>
|
||||
<?php }?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php } else {?>
|
||||
|
||||
Aucune information sur le patrimoine.
|
||||
|
||||
<?php }?>
|
||||
|
||||
<?php }?>
|
||||
|
||||
</div>
|
@ -49,7 +49,7 @@
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript" src="/libs/form/jquery.form.js"></script>
|
||||
<script type="text/javascript" src="/libs/form/jquery.form.min.js"/>
|
||||
<script>
|
||||
$('#uploadForm').ajaxForm({
|
||||
beforeSubmit: function() {
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user