Compare commits
515 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 |
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,895 +0,0 @@
|
||||
<?php
|
||||
class EvaluationController extends Zend_Controller_Action
|
||||
{
|
||||
protected $siret = null;
|
||||
protected $id = 0;
|
||||
|
||||
public function init()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$this->siret = $request->getParam('siret');
|
||||
$this->id = $request->getParam('id', 0);
|
||||
|
||||
require_once 'Scores/WsScores.php';
|
||||
require_once 'Scores/IdentiteEntreprise.php';
|
||||
}
|
||||
|
||||
public function indexAction()
|
||||
{
|
||||
$this->forward('entreprise', 'recherche');
|
||||
}
|
||||
|
||||
/**
|
||||
* Affichage d'une reglette représentant le score
|
||||
*/
|
||||
public function printscoresAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$request = $this->getRequest();
|
||||
$score = strtolower($request->getParam('score'));
|
||||
|
||||
if( $score == 'indiscore' ){
|
||||
$user = new Scores_Utilisateur();
|
||||
switch($user->getTypeScore()) {
|
||||
case '20': $score.='20'; break;
|
||||
case '100':
|
||||
default: $score.='100'; break;
|
||||
}
|
||||
}
|
||||
|
||||
$note = $request->getParam('note');
|
||||
$bornes = array(
|
||||
'conanh' => array( 'min' => -4.5 , 'max' => 16 ),
|
||||
'afdcc2' => array( 'min' => 0 , 'max' => 5 ),
|
||||
'afdcc1' => array( 'min' => -10 , 'max' => 10 ),
|
||||
'z' => array( 'min' => -3 , 'max' => 3 ),
|
||||
'indiscore100' => array( 'min' => 0 , 'max' => 100 ),
|
||||
'indiscore20' => array( 'min' => 0 , 'max' => 20 ),
|
||||
);
|
||||
$note = round(($note - $bornes[$score]['min'])*100/($bornes[$score]['max'] - $bornes[$score]['min']));
|
||||
|
||||
if($note < 0) $note = 0;
|
||||
if($note > 100) $note = 100;
|
||||
|
||||
$this->view->assign('note', $note);
|
||||
$this->view->assign('min', $bornes[$score]['min']);
|
||||
$this->view->assign('max', $bornes[$score]['max']);
|
||||
}
|
||||
|
||||
/**
|
||||
* IndiScore
|
||||
*/
|
||||
public function indiscoreAction()
|
||||
{
|
||||
$user = new Scores_Utilisateur();
|
||||
if(!$user->checkPerm('INDISCORE') && !$user->checkPerm('INDISCOREP'))
|
||||
$this->forward('perms', 'error');
|
||||
|
||||
$this->view->assign('edition', $user->checkModeEdition());
|
||||
|
||||
$request = $this->getRequest();
|
||||
$autrePage = $request->getParam('apage');
|
||||
|
||||
//Récupération des informations
|
||||
if (empty($autrePage)) {
|
||||
$this->view->headTitle()->prepend('IndiScore');
|
||||
$this->view->headTitle()->prepend('Siret '.$this->siret);
|
||||
$plus = false;
|
||||
if ($user->checkPerm('indiscorep')){
|
||||
$plus = true;
|
||||
}
|
||||
$ref = $request->getParam('ref', '');
|
||||
$encours = $request->getParam('encours', 0);
|
||||
$email = $request->getParam('email', '');
|
||||
|
||||
$ws = new WsScores();
|
||||
$infos = $ws->getIndiScore(substr($this->siret, 0,9), 0, 1, $plus, $ref, $encours, $email);
|
||||
if ($infos === false) $this->forward('soap', 'error');
|
||||
} else {
|
||||
$infos = $this->getRequest()->getParam('infos');
|
||||
}
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('typeScore', $user->getTypeScore());
|
||||
$this->view->assign('indiscore', $infos);
|
||||
$this->view->assign('AutrePage', $autrePage);
|
||||
$this->view->assign('exportObjet', $infos);
|
||||
|
||||
$this->view->assign('aviscredit', $user->checkPerm('aviscredit'));
|
||||
$this->view->assign('surveillance', $user->checkPerm('survscore'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Rapport de synthese
|
||||
*/
|
||||
public function indiscore2Action()
|
||||
{
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/finance.js', 'text/javascript');
|
||||
$this->view->headTitle()->prepend("Rapport de synthèse");
|
||||
$this->view->headTitle()->prepend("Siret ".$this->siret);
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
if(!$user->checkPerm('INDISCORE2') && !$user->checkPerm('INDISCORE2P'))
|
||||
$this->forward('perms', 'error');
|
||||
|
||||
$siren = substr($this->siret,0,9);
|
||||
|
||||
$ws = new WsScores();
|
||||
$entreprise = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
$identite = $ws->getIdentite($siren);
|
||||
$indiscore = $ws->getIndiScore($siren);
|
||||
$infos = $ws->getRatios($siren, 'indiscore2'); // @todo : vérifier la page
|
||||
|
||||
$score = array();
|
||||
$tabRatio = array(
|
||||
'r5' => array('total'=>'r5', 'total_info'=>'% ca', 'op' => 1000, 'titre'=>'CHIFFRE D\'AFFAIRES'),
|
||||
'r16' => array('total'=>'r5', 'total_info'=>'% ca', 'op' => 1000, 'titre'=>'RESULTAT D\'EXPLOITATION'),
|
||||
'r7' => array('total'=>'r5', 'total_info'=>'% ca', 'op' => 1000, 'titre'=>'RESULTAT COURANT'),
|
||||
'r10' => array('total'=>'r5', 'total_info'=>'% ca', 'op' => 1000, 'titre'=>'RESULTAT NET'),
|
||||
'r18' => array('total'=>'r22', 'total_info'=>'% bilan', 'op' => 1000, 'titre'=>'FONDS PROPRES'),
|
||||
'r231' => array('total'=>'r22', 'total_info'=>'% bilan', 'op' => 1000, 'titre'=>'FONDS DE ROULEMENT'),
|
||||
'r232' => array('total'=>'r22', 'total_info'=>'% bilan', 'op' => 1000, 'titre'=>'BESOIN EN FONDS DE ROULEMENT'),
|
||||
'r249' => array('total'=>'', 'total_info'=>'', 'op' => 1000, 'titre'=>'TRESORERIE NETTE'),
|
||||
'r20' => array('total'=>'r5', 'total_info'=>'% ca', 'op' => 1000, 'titre'=>'FRAIS FINANCIER'),
|
||||
);
|
||||
|
||||
//Formattage des données
|
||||
$typeBilan = 'N';
|
||||
$ratiosData = new Scores_Finance_Ratios_Data($infos);
|
||||
|
||||
$nbBilanN = $ratiosData->getNbBilan('N');
|
||||
$nbBilanC = $ratiosData->getNbBilan('C');
|
||||
|
||||
if ($nbBilanN!=0)
|
||||
{
|
||||
foreach($tabRatio as $idRatio => $valRatio){
|
||||
$tabRatio[$idRatio]['comment'] = $ratiosData->wrapComment($idRatio);
|
||||
}
|
||||
$this->view->assign('tabRatio', $tabRatio);
|
||||
|
||||
$infosAnnee = $ratiosData->getBilansInfo($typeBilan);
|
||||
$annees = array_keys($infosAnnee);
|
||||
|
||||
//On prend les 3 derniers bilans pour l'affichage
|
||||
$nbMaxBilan = 3;
|
||||
rsort($annees);
|
||||
$annees = array_slice($annees, 0, $nbMaxBilan);
|
||||
sort($annees);
|
||||
$tabResult = array();
|
||||
foreach($annees as $annee){
|
||||
$data = array();
|
||||
$dataEvol = array();
|
||||
//Formatter les données
|
||||
foreach($tabRatio as $idRatio => $valRatio){
|
||||
$data[$idRatio] = $ratiosData->dRatio($typeBilan, $annee, $idRatio);
|
||||
$dataTotal[$idRatio] = $ratiosData->dTotal($typeBilan, $annee, $idRatio, $valRatio['total']);
|
||||
$dInfo[$idRatio] = $valRatio['total_info'];
|
||||
}
|
||||
$date = new Zend_Date($annee, 'yyyyMMdd');
|
||||
$tabResult[] = array(
|
||||
'dateCloture' => $date->toString('dd/MM/yyyy'),
|
||||
'duree' => $infosAnnee[$annee]->duree.' Mois',
|
||||
'ratio' => $data,
|
||||
'total' => $dataTotal,
|
||||
'info' => $dInfo,
|
||||
);
|
||||
}
|
||||
$this->view->assign('tabResult', $tabResult);
|
||||
}
|
||||
|
||||
$this->view->assign('tabRatio', $tabRatio);
|
||||
/*
|
||||
Correction pour indiscore seule
|
||||
$indiscore->Siege;
|
||||
$indiscore->SiretSiege;
|
||||
$indiscore->NumRC;
|
||||
*/
|
||||
$indiscore->SiretSiege = $identite->SiretSiege;
|
||||
|
||||
$identite = new IdentiteEntreprise($identite);
|
||||
//Définition des blocks
|
||||
$blocks = array(
|
||||
'Siret',
|
||||
'SiretSiege',
|
||||
'NumRC',
|
||||
'Actif',
|
||||
'RaisonSociale',
|
||||
'FormeJuridique',
|
||||
'DateImmat',
|
||||
'DateCreaEt',
|
||||
'Adresse',
|
||||
'ActiviteEn',
|
||||
'Naf4',
|
||||
'OrigineFond',
|
||||
'TypeExploitation',
|
||||
'Saisonnalite',
|
||||
'Capital',
|
||||
'ChiffreAffaire',
|
||||
);
|
||||
$dBlock = array();
|
||||
foreach ($blocks as $item) {
|
||||
$display = array(
|
||||
'label' => method_exists($identite, 'get'.$item.'Label') ? $identite->{'get'.$item.'Label'}() : '',
|
||||
'texte' => method_exists($identite, 'get'.$item.'Texte') ? $identite->{'get'.$item.'Texte'}() : '',
|
||||
'titre' => method_exists($identite, 'get'.$item.'Titre') ? $identite->{'get'.$item.'Titre'}() : '',
|
||||
);
|
||||
$dBlock[$item] = $display;
|
||||
}
|
||||
$this->view->assign('dBlock', $dBlock);
|
||||
|
||||
$dateRadiation = '';
|
||||
if(isset($indiscore->DateRadiation) && $indiscore->DateRadiation!='' && $indiscore->DateRadiation!='0000-00-00') {
|
||||
$date = new Zend_Date(str_replace('-','',$indiscore->DateRadiation), 'yyyyMMdd');
|
||||
$this->view->assign('dateRadiation', $date->toString('dd/MM/yyyy'));
|
||||
}
|
||||
foreach($indiscore->scores as $name => $sc){
|
||||
if($name == 'ConanH')
|
||||
$score[$name] = array($sc, 'Score Conan Holder');
|
||||
if($name == 'Afdcc2')
|
||||
$score[$name] = array($sc, 'Score Afdcc 2');
|
||||
if($name == 'Z')
|
||||
$score[$name] = array($sc, 'Score Z');
|
||||
}
|
||||
|
||||
$typeScore = $user->getTypeScore();
|
||||
switch($typeScore) {
|
||||
case '20':
|
||||
$maxIndiscore = $typeScore;
|
||||
$score['Indiscore'] = array($indiscore->Indiscore20, 'IndiScore');
|
||||
break;
|
||||
case '100':
|
||||
default:
|
||||
$maxIndiscore = empty($typeScore)? '100' : $typeScore;
|
||||
$score['Indiscore'] = array($indiscore->Indiscore, 'IndiScore');
|
||||
break;
|
||||
}
|
||||
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('id', $this->id);
|
||||
$this->view->assign('siren', $siren);
|
||||
|
||||
$this->view->assign('encours', $indiscore->encours);
|
||||
$this->view->assign('TendanceIndiscore', $indiscore->TendanceIndiscore);
|
||||
$this->view->assign('SituationJuridique', $indiscore->SituationJuridique);
|
||||
$this->view->assign('paiement', $indiscore->infoPaiement);
|
||||
|
||||
$this->view->assign('scores', $score);
|
||||
|
||||
$this->view->assign('bilanReference', $bilanReference);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rapport complet
|
||||
*/
|
||||
public function indiscore3Action()
|
||||
{
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/evaluation.js', 'text/javascript');
|
||||
$this->view->headTitle()->prepend("Rapport complet");
|
||||
$this->view->headTitle()->prepend("Siret ".$this->siret);
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
if(!$user->checkPerm('INDISCORE3') && !$user->checkPerm('INDISCORE3P'))
|
||||
$this->forward('perms', 'error');
|
||||
|
||||
// Lien pour le rapport personnalisé
|
||||
if ($user->getIdClient() == '110' || $user->checkModeEdition()) {
|
||||
$this->view->assign('customRapport', $this->view->url(array(
|
||||
'controller'=>'evaluation',
|
||||
'action'=>'customindiscore3',
|
||||
'siret'=>$this->siret,
|
||||
'id'=>$this->id)
|
||||
));
|
||||
}
|
||||
|
||||
$sessionEntreprise = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
$ws = new WsScores();
|
||||
$siren = substr($this->siret,0,9);
|
||||
|
||||
$plus = false;
|
||||
if ($user->checkPerm('indiscore3p')){
|
||||
$plus = true;
|
||||
}
|
||||
$request = $this->getRequest();
|
||||
$ref = $request->getParam('ref', '');
|
||||
$encours = $request->getParam('encours', 0);
|
||||
$email = $request->getParam('email', '');
|
||||
|
||||
$infos = $ws->getRapport($siren, 3, 0, $plus, $ref, $encours, $email);
|
||||
Zend_Registry::get('firebug')->info($infos);
|
||||
if ($infos === false) {
|
||||
$this->forward('soap', 'error');
|
||||
}
|
||||
|
||||
$this->view->assign('Identite', $infos->Identite);
|
||||
$this->view->assign('Dirigeants', $infos->Dirigeants);
|
||||
$this->view->assign('Liens', $infos->Liens);
|
||||
$this->view->assign('Annonces', $infos->Annonces);
|
||||
$this->view->assign('Ratios', $infos->Ratios);
|
||||
$this->view->assign('Indiscore', $infos->Indiscore);
|
||||
|
||||
require_once 'Scores/RapportComment.php';
|
||||
$rapportComment = new RapportComment($siren, $this->id,
|
||||
$infos->Indiscore->tabCommentaires->item,
|
||||
$infos->Ratios->RatiosInfos,
|
||||
$infos->Ratios->BilansInfos,
|
||||
$infos->Ratios->RatiosSecteur,
|
||||
$infos->Indiscore->tabVariables
|
||||
);
|
||||
$this->view->assign('comment',$rapportComment->out());
|
||||
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('id', $this->id);
|
||||
$this->view->assign('siren', $siren);
|
||||
$this->view->assign('raisonSociale', $sessionEntreprise->getRaisonSociale());
|
||||
$this->view->assign('exportObjet', $infos);
|
||||
}
|
||||
|
||||
/**
|
||||
* Génération de rapport personnalisé
|
||||
* @todo : à améliorer
|
||||
*/
|
||||
public function customindiscore3Action()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
|
||||
$request = $this->getRequest();
|
||||
$upload = $request->getParam('upload', null);
|
||||
|
||||
$siren = substr($this->siret, 0, 9);
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
|
||||
if (empty($upload)){
|
||||
$adresse = array();
|
||||
if ($user->checkModeEdition() || $user->getIdClient()==110) {
|
||||
$adresse[] = 'Order to Cash';
|
||||
$adresse[] = '6, rue Euryale Dehaynin ';
|
||||
$adresse[] = '75019 PARIS';
|
||||
$color1 = '#DFDB00';
|
||||
$color2 = '#EFED9A';
|
||||
$background = "background-image:url('/themes/default/images/customrapport/logo_ordertocash.jpg');background-repeat:no-repeat;background-position:center";
|
||||
} else {
|
||||
$adresse[] = 'Financement Entreprise';
|
||||
$adresse[] = '16 RUE SENAC DE MEILHAN';
|
||||
$adresse[] = '17000 LA ROCHELLE';
|
||||
$color1 = '#6699FF';
|
||||
$color2 = '##66CCFF';
|
||||
$background = null;
|
||||
}
|
||||
|
||||
$this->view->assign('adresse', $adresse);
|
||||
$this->view->assign('color1', $color1);
|
||||
$this->view->assign('color2', $color2);
|
||||
$this->view->assign('background', $background);
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('id', $this->id);
|
||||
|
||||
$sessionEntreprise = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
$this->view->assign('rs', $sessionEntreprise->getRaisonSociale());
|
||||
|
||||
} else {
|
||||
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
||||
$couleurh1 = $request->getParam('couleurh1', null);
|
||||
$couleurh2 = $request->getParam('couleurh2', null);
|
||||
$texth1 = $request->getParam('texth1', null);
|
||||
$texth2 = $request->getParam('texth2', null);
|
||||
$societe_name = $request->getParam('societe_name', null);
|
||||
$adresse = $request->getParam('adresse', null);
|
||||
$logo_background = $request->getParam('logo_background', null);
|
||||
|
||||
$siren = substr($this->siret, 0, 9);
|
||||
|
||||
if ($this->id!=0){
|
||||
$file = 'evaluation-indiscore3-'.$this->siret.'-'.$this->id.'.html';
|
||||
} else {
|
||||
$file = 'evaluation-indiscore3-'.$this->siret.'.html';
|
||||
}
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = $c->profil->path->pages;
|
||||
if (file_exists($path.'/'.$file))
|
||||
{
|
||||
$doc = new DOMDocument();
|
||||
$doc->preserveWhiteSpace = true;
|
||||
@$doc->loadHTMLFile($path.'/'.$file);
|
||||
|
||||
//Générer style particulier pour le rapport
|
||||
$style.= 'body {background-color:#ffffff;} ';
|
||||
$style.= '#footer {display:none;} ';
|
||||
$style.= '#customRapport {display:none;} ';
|
||||
$style.= '.notvisible{display:none;} ';
|
||||
$style.= '#center h1 {background-color:'.$couleurh1.';color:'.$texth1.';border:1px solid;} ';
|
||||
if($logo_background) {
|
||||
$style.= '#center {background-image:url(./themes/default/images/customrapport/logo_ordertocash_background.jpg);background-repeat:no-repeat;background-position:center;} ';
|
||||
}
|
||||
$style.= '#center h2 {background-color:'.$couleurh2.';color:'.$texth2.'} ';
|
||||
$style.= 'p#rsynthese {font-size:14px;font-weight:bold;} ';
|
||||
|
||||
$styleDom = $doc->createElement('style', $style);
|
||||
|
||||
//Ajout information
|
||||
$contentDom = $doc->createElement('div');
|
||||
if(!$user->checkModeEdition()) {
|
||||
$element = $doc->createElement('img');
|
||||
$element->setAttribute('src', './themes/default/images/customrapport/logo_ordertocash.jpg');
|
||||
$element->setAttribute('width', '12%');
|
||||
} else {
|
||||
$element = $doc->createElement('img');
|
||||
$element->setAttribute('src', './themes/default/images/customrapport/logo_ordertocash.jpg');
|
||||
$element->setAttribute('width', '12%');
|
||||
}
|
||||
$div = $doc->createElement('div');
|
||||
$div->setAttribute('style', "clear:both;");
|
||||
$div->appendChild($element);
|
||||
$contentDom->appendChild($div);
|
||||
|
||||
$i = 0;
|
||||
foreach($adresse as $item){
|
||||
$element = $doc->createElement('span', $item);
|
||||
$contentDom->appendChild($element);
|
||||
$element = $doc->createElement('br');
|
||||
$contentDom->appendChild($element);
|
||||
$i++;
|
||||
}
|
||||
|
||||
$element = $doc->createElement('center', $societe_name.' Enquête Financière');
|
||||
$element->setAttribute('style', 'font-size:17px');
|
||||
$contentDom->appendChild($element);
|
||||
|
||||
if ($user->checkModeEdition() || $user->getIdClient()==110) {
|
||||
$element = $doc->createElement('span', "Les équipes d'Order To Cash se tiennent à votre disposition pour vous assister dans l'interprétation de ces données au 01 84 16 50 00 ou par mail à l'adresse suivante : contact@ordertocash.fr");
|
||||
$element->setAttribute('style', 'text-align:left;');
|
||||
$contentDom->appendChild($element);
|
||||
}
|
||||
|
||||
$ajout = $doc->createElement('div');
|
||||
$ajout->appendChild($styleDom);
|
||||
$ajout->appendChild($contentDom);
|
||||
|
||||
//Après <div id="center"> on insére le contenu
|
||||
$body = $doc->getElementsByTagName('body')->item(0);
|
||||
$div = $body->getElementsByTagName('div');
|
||||
foreach($div as $item){
|
||||
if ($item->hasAttribute('id') && $item->getAttribute('id') == 'center'){
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$item->parentNode->insertBefore($ajout, $item);
|
||||
$xml = $doc->saveXML();
|
||||
|
||||
$c = Zend_Registry::get('config');
|
||||
$outfile = $c->profil->path->pages.'/p'.$user->getIdClient().'-'.$file;
|
||||
file_put_contents($outfile, $xml);
|
||||
|
||||
//Génération du pdf
|
||||
$wkhtmltopdf = new Scores_Wkhtml_Pdf();
|
||||
$wkhtmltopdf->setOptions('footer-right', 'Page [page] sur [toPage]');
|
||||
$wkhtmltopdf->setOptions('header-right', date('d/m/Y H:i:s'));
|
||||
$wkhtmltopdf->setOptions('disable-external-links');
|
||||
$wkhtmltopdf->setOptions('disable-internal-links');
|
||||
$pdfFile = $wkhtmltopdf->exec($outfile);
|
||||
|
||||
if (file_exists($pdfFile)){
|
||||
echo '<center>Votre fichier est prêt pour être téléchargé !<br />' .
|
||||
'<a target="_blank" href="'.$this->view->url(
|
||||
array('controller'=>'fichier',
|
||||
'action'=>'customrapport',
|
||||
'fichier'=>basename($pdfFile)), null, true).'">Télécharger</a></center>';
|
||||
} else {
|
||||
echo "Erreur lors de la génération du PDF.";
|
||||
}
|
||||
} else {
|
||||
echo "Erreur fichier non présent !";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Enquete commerciale
|
||||
* @todo : Vérifier l'enregistrement
|
||||
*/
|
||||
public function enquetecAction()
|
||||
{
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/enquetec.js', 'text/javascript');
|
||||
$this->view->headTitle()->prepend("Enquete commerciale");
|
||||
$this->view->headTitle()->prepend("Siret ".$this->siret);
|
||||
|
||||
//isset($_REQUEST['pays']) ? $pays=$_REQUEST['pays'] : $pays='' ;
|
||||
|
||||
$commandeEnquete = false;
|
||||
$request = $this->getRequest();
|
||||
|
||||
if ($request->isPost()){
|
||||
|
||||
$InfoUser = $request->getParam('InfoUser');
|
||||
$InfoEnq = $request->getParam('InfoEnq');
|
||||
|
||||
//Affichage de la demande
|
||||
//Vérification des informations
|
||||
$formError = false;
|
||||
$fields = array();
|
||||
|
||||
//Info utilisateur obligatoire :
|
||||
if($InfoUser['Identite']==''){ $fields[] ='Votre Identite'; $formError=true;}
|
||||
if($InfoUser['Tel']==''){ $fields[] ='Votre Téléphone'; $formError=true;}
|
||||
if($InfoUser['Email']==''){ $fields[] ='Votre Email'; $formError=true;}
|
||||
|
||||
//Info entreprise obligatoire :
|
||||
if( isset($InfoEnq['Type']) && $InfoEnq['Type']==''){ $fields[] ='Choix du type d\'enquête'; $formError=true;}
|
||||
if($InfoEnq['PrecisionsChoix']=='1'){
|
||||
if($InfoEnq['Precisions']['Motif']==''){ $fields[] ='Mofif de la demande'; $formError=true;}
|
||||
}elseif($InfoEnq['PrecisionsChoix']=='3' || $InfoEnq['PrecisionsChoix']=='4'){
|
||||
if($InfoEnq['Precisions']['MontantCA']==''){ $fields[] ='Précisions de la demande'; $formError=true;}
|
||||
}elseif($InfoEnq['PrecisionsChoix']=='5'){
|
||||
if($InfoEnq['Precisions']['Autre']==''){ $fields[] ='Précisions de la demande'; $formError=true;}
|
||||
}
|
||||
|
||||
if(isset($InfoEnq['ImpayeesChoix']) && $InfoEnq['ImpayeesChoix']=='oui' ){
|
||||
if($InfoEnq['Impayees']['Montant']=='' || $InfoEnq['Impayees']['Nombre']=='' || $InfoEnq['Impayees']['Date']==''){ $fields[] ='Précisions sur les impayées'; $formError=true;}
|
||||
}
|
||||
if(isset($InfoEnq['RetardPaiementChoix']) && $InfoEnq['RetardPaiementChoix']=='oui' ){
|
||||
if($InfoEnq['RetardPaiement']['Montant']=='' || $InfoEnq['Nombre']=='' || $InfoEnq['RetardPaiement']['Date']==''){ $fields[] ='Précisions sur le retarde de paiement'; $formError=true;}
|
||||
}
|
||||
if(isset($_REQUEST['InfoEnq']['LitigeChoix']) && $_REQUEST['InfoEnq']['LitigeChoix']=='oui' ){
|
||||
if($_REQUEST['InfoEnq']['Litige']['Precisions']=='' || $_REQUEST['InfoEnq']['Litige']['Precisions']==''){ $fields[] ='Précisions sur le litige'; $formError=TRUE;}
|
||||
}
|
||||
|
||||
if ($formError==true){
|
||||
$message = '<font color="red">';
|
||||
$message.= 'Veuillez remplir les champs suivants : ';
|
||||
$message.= join(', ', $fields);
|
||||
$message.= '</font>';
|
||||
}else{
|
||||
$InfoDemande = $InfoUser;
|
||||
$siren = $InfoEnq['Siren'];
|
||||
unset($InfoEnq['Siren']);
|
||||
//Suppression et assigation des valeurs pour le webservice
|
||||
if($InfoEnq['PrecisionsChoix'] = 1){
|
||||
$InfoEnq['Precisions']['Type'] = "Enquête sur un client (contrôle crédit)";
|
||||
unset($InfoEnq['PrecisionsChoix']);
|
||||
}elseif($InfoEnq['PrecisionsChoix']==2){
|
||||
$InfoEnq['Precisions']['Type'] = "Enquête sur un prospect (ouverture de compte)";
|
||||
unset($InfoEnq['PrecisionsChoix']);
|
||||
}elseif($InfoEnq['PrecisionsChoix']==3){
|
||||
$InfoEnq['Precisions']['Type'] = "Enquête sur un fournisseur stratégique";
|
||||
unset($InfoEnq['PrecisionsChoix']);
|
||||
}elseif($InfoEnq['PrecisionsChoix']==4){
|
||||
$InfoEnq['Precisions']['Type'] = "Enquête sur un fournisseur non stratégique";
|
||||
unset($InfoEnq['PrecisionsChoix']);
|
||||
}elseif($InfoEnq['PrecisionsChoix']==5){
|
||||
$InfoEnq['Precisions']['Type'] = "Autre type d'enquête (Précisez...)";
|
||||
unset($InfoEnq['PrecisionsChoix']);
|
||||
}
|
||||
|
||||
$ws = new WsScore();
|
||||
$result = $ws->commandeEnquete($siren, $InfoEnq, $InfoDemande);
|
||||
if ($result === false) {
|
||||
$this->_forward('soap', 'error');
|
||||
} else {
|
||||
$this->view->assign('annee', substr($result->dateCommande,0,4));
|
||||
$this->view->assign('mois', substr($result->dateCommande,4,2));
|
||||
$this->view->assign('jour', substr($result->dateCommande,6,2));
|
||||
$this->view->assign('heure', substr($result->dateCommande,8,2));
|
||||
$this->view->assign('minutes', substr($result->dateCommande,10,2));
|
||||
$this->view->assign('ref', substr($result->refCmde,1));
|
||||
$this->view->assign('siren', $result->siren);
|
||||
$commandeEnquete = true;
|
||||
}
|
||||
$this->view->assign('commandeEnquete', $commandeEnquete);
|
||||
}
|
||||
$this->view->assign('formError', $formError);
|
||||
$this->view->assign('message', $message);
|
||||
$this->view->assign('InfoUser', $InfoUser);
|
||||
$this->view->assign('InfoEnq', $InfoEnq);
|
||||
}
|
||||
|
||||
if ($commandeEnquete == false) {
|
||||
$ws = new WsScores();
|
||||
$infosEntrep = $ws->getIdentite($this->siret, $this->id);
|
||||
$this->view->assign('Etab', $infosEntrep);
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
$this->view->assign('user', $user);
|
||||
}
|
||||
|
||||
|
||||
$this->view->assign('commandeEnquete', $commandeEnquete);
|
||||
}
|
||||
|
||||
/**
|
||||
* Demande d'avis de credit
|
||||
*/
|
||||
public function aviscreditAction()
|
||||
{
|
||||
$this->view->headTitle()->prepend("Avis de crédit");
|
||||
$this->view->headTitle()->prepend("Siret ".$this->siret);
|
||||
|
||||
$commande = false;
|
||||
|
||||
$request = $this->getRequest();
|
||||
|
||||
//Reception des données du formulaire
|
||||
if ($request->isPost())
|
||||
{
|
||||
$InfoUser = $request->getParam('InfoUser');
|
||||
$InfoEnq = $request->getParam('InfoEnq');
|
||||
|
||||
$formError = false;
|
||||
$fields = array();
|
||||
|
||||
//Info utilisateur obligatoire :
|
||||
if($InfoUser['Identite']==''){
|
||||
$fields[] ='Votre Identite'; $formError=true;
|
||||
}
|
||||
if($InfoUser['Tel']==''){
|
||||
$fields[] ='Votre Téléphone'; $formError=true;
|
||||
}
|
||||
if($InfoUser['Email']==''){
|
||||
$fields[] ='Votre Email'; $formError=true;
|
||||
}
|
||||
|
||||
//Info entreprise obligatoire :
|
||||
if( isset($InfoEnq['Type']) && $InfoEnq['Type']==''){
|
||||
$fields[] ='Choix du type d\'enquête'; $formError=true;
|
||||
}
|
||||
|
||||
if(isset($InfoEnq['ImpayeesChoix']) && $InfoEnq['ImpayeesChoix']=='oui' ){
|
||||
if($InfoEnq['Impayees']['Montant']=='' || $InfoEnq['Impayees']['Nombre']=='' || $InfoEnq['Impayees']['Date']==''){
|
||||
$fields[] ='Précisions sur les impayées'; $formError=true;
|
||||
}
|
||||
}
|
||||
if(isset($InfoEnq['RetardPaiementChoix']) && $InfoEnq['RetardPaiementChoix']=='oui' ){
|
||||
if($InfoEnq['RetardPaiement']['Montant']=='' || $InfoEnq['Nombre']=='' || $InfoEnq['RetardPaiement']['Date']==''){
|
||||
$fields[] ='Précisions sur le retard de paiement'; $formError=true;
|
||||
}
|
||||
}
|
||||
if(isset($_REQUEST['InfoEnq']['LitigeChoix']) && $_REQUEST['InfoEnq']['LitigeChoix']=='oui' ){
|
||||
if($_REQUEST['InfoEnq']['Litige']['Precisions']=='' || $_REQUEST['InfoEnq']['Litige']['Precisions']==''){
|
||||
$fields[] ='Précisions sur le litige'; $formError=TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Envoi du mail formatté
|
||||
|
||||
if ( $formError==true )
|
||||
{
|
||||
$message = '<font color="red">';
|
||||
$message.= 'Veuillez remplir les champs suivants : ';
|
||||
$message.= join(', ', $fields);
|
||||
$message.= '</font>';
|
||||
|
||||
$this->view->assign('message', $message);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
$sujet = "Demande d'avis personnalisé";
|
||||
$texte = "<pre>".print_r($InfoUser, 1)."</pre>".
|
||||
"<pre>".print_r($InfoEnq, 1)."</pre>";
|
||||
|
||||
$mail = new Scores_Mail();
|
||||
$mail->setFrom('production');
|
||||
$mail->addToKey('support');
|
||||
$mail->setSubject($sujet);
|
||||
$mail->setBodyHtml($texte);
|
||||
|
||||
if ($mail->send()) {
|
||||
$commande = true;
|
||||
}
|
||||
}
|
||||
|
||||
$this->view->assign('commande', $commande);
|
||||
|
||||
$this->view->assign('formError', $formError);
|
||||
$this->view->assign('message', $message);
|
||||
$this->view->assign('InfoUser', $InfoUser);
|
||||
$this->view->assign('InfoEnq', $InfoEnq);
|
||||
|
||||
$this->view->assign('siren', substr($this->siret, 0,9));
|
||||
|
||||
}
|
||||
|
||||
//Affichage du formulaire
|
||||
if ($commande == false) {
|
||||
$ws = new WsScores();
|
||||
$infosEntrep = $ws->getIdentite($this->siret, $this->id);
|
||||
$this->view->assign('Etab', $infosEntrep);
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
$this->view->assign('user', $user);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Affichage des informations de scoring creditsafe
|
||||
*/
|
||||
public function scoringAction()
|
||||
{
|
||||
$this->view->headTitle()->prepend("Scoring Credit Safe");
|
||||
$this->view->headTitle()->prepend("Siret ".$this->siret);
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
if(!$user->checkModeEdition() or !$user->checkPerm('SCORECSF'))
|
||||
$this->render('error/perms', null, 'error');
|
||||
|
||||
define('CREDITSAFE_WS_URL', 'https://www.creditsafe.fr/getdata/service/CSFRServices.asmx');
|
||||
define('CREDITSAFE_WS_URI', 'https://www.creditsafe.fr/getdata/service/');
|
||||
define('CREDITSAFE_WS_USER', 'scores_decisions');
|
||||
define('CREDITSAFE_WS_PASS', 'yoann1306');
|
||||
define('CREDITSAFE_WS_REF', 'ref');
|
||||
/**
|
||||
* L'Url du WSDL est bonne simplament le formatage des données a changés, il faut respecter les données !
|
||||
* comparer les exemples donnés.
|
||||
*
|
||||
*/
|
||||
$req='<xmlrequest>'.
|
||||
'<header>'.
|
||||
'<username>'.CREDITSAFE_WS_USER.'</username>'.
|
||||
'<password>'.CREDITSAFE_WS_PASS.'</password>'.
|
||||
//'<operation>getcompanyinformation</operation>'.
|
||||
'<operation>getratinglimit</operation>'.
|
||||
'<country>FR</country>'.
|
||||
'<language>FR</language>'.
|
||||
'<chargereference>'.CREDITSAFE_WS_REF.'</chargereference>'.
|
||||
'</header>'.
|
||||
'<body>'.
|
||||
//'<package>standard</package>'.
|
||||
'<package>ratinglimit</package>'.
|
||||
"<companynumber>".$this->siret."</companynumber>".
|
||||
'</body>'.
|
||||
'</xmlrequest>';
|
||||
|
||||
$date = date('Ymd');
|
||||
$url = 'https://www.creditsafe.fr/getdata/service/CSFRServices.asmx/GetData?RequestXmlStr='.$req;
|
||||
$file = APPLICATION_PATH.'/../../data/creditsafe/'.$this->siret.'.xml';
|
||||
|
||||
try {
|
||||
$client = new Zend_Http_Client($url);
|
||||
$client->setStream();
|
||||
$response = $client->request('GET');
|
||||
if ( $response->isSuccessful() ) {
|
||||
$xml = html_entity_decode($response->getBody(), ENT_QUOTES, 'UTF-8');
|
||||
|
||||
$dom_object = new DOMDocument();
|
||||
$ws = new WsScores();
|
||||
if(!file_exists($file)) {
|
||||
file_put_contents($file, $xml); // Ne pas oublier de metre les bons droits sur le dossier.
|
||||
$ws->setLog('scorecsf', $this->siret);
|
||||
} else {
|
||||
$ws->setLog('scorecsf', $this->siret, 0, 'local');
|
||||
}
|
||||
$dom_object->load($file);
|
||||
$companyname = $dom_object->getElementsByTagName('companyname')->item(0)->nodeValue;
|
||||
$rating = $dom_object->getElementsByTagName('rating')->item(0)->nodeValue;
|
||||
$ratingdesc1 = str_replace('?',"'",$dom_object->getElementsByTagName('ratingdesc1')->item(0)->nodeValue);
|
||||
$ratingdesc2 = str_replace('?',"'",$dom_object->getElementsByTagName('ratingdesc2')->item(0)->nodeValue);
|
||||
$creditlimit = $dom_object->getElementsByTagName('creditlimit')->item(0)->nodeValue;
|
||||
$libelle = '';
|
||||
if (strtoupper($creditlimit)<>strtolower($creditlimit) || $creditlimit=='')
|
||||
$strCreditlimit = $creditlimit;
|
||||
else
|
||||
$strCreditlimit = number_format($creditlimit,null,null,' '). ' €';
|
||||
|
||||
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 Scores_Session_Entreprise($this->siret, $this->id);
|
||||
$this->view->raisonSociale = $session->getRaisonSociale();
|
||||
}
|
||||
$this->view->emailCommande = $user->getEmail();
|
||||
$this->view->id = $this->id;
|
||||
$this->view->siren = substr($this->siret, 0,9);
|
||||
$this->view->imgFeux = $imgFeux;
|
||||
$this->view->fontColor = $fontColor;
|
||||
$this->view->rating = $rating;
|
||||
$this->view->libelle = $libelle;
|
||||
$this->view->strCreditlimit = $strCreditlimit;
|
||||
|
||||
}
|
||||
} catch (Zend_Http_Client_Exception $e) {}
|
||||
}
|
||||
|
||||
/**
|
||||
* Commande de scoring partenaire creditsafe
|
||||
*/
|
||||
public function scoringcommandeAction()
|
||||
{
|
||||
if ($this->getRequest()->isPost()){
|
||||
$request = $this->getRequest();
|
||||
$email = $request->getParam('email', '');
|
||||
$siren = $request->getParam('siren', '');
|
||||
|
||||
if (preg_match('#^[\w.-]+@[\w.-]+\.[a-zA-Z]{2,5}$#',$email)) {
|
||||
$message = 'Entreprise mise sous surveillance scoring partenaire !';
|
||||
$mail = new Scores_Mail();
|
||||
$mail->setSubject("Demande de surveillance score CreditSafe pour $siren à ".$email);
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
$login = $user->getLogin();
|
||||
$texte = 'REQUEST='.EOL.print_r($request->getParams(),true).EOL.
|
||||
'Utilisateur='.$login;
|
||||
|
||||
$mail->setBodyTexte($texte);
|
||||
$mail->setFrom('contact');
|
||||
$mail->addToKey('contact');
|
||||
$mail->send();
|
||||
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = $c->profil->path->data.'/log';
|
||||
|
||||
$fp=fopen($path.'/surveillance_scf.csv', 'a');
|
||||
fwrite($fp, date('Y/m/d H:i:s').";$siren;".$email.';'.$login.';'.$user->getEmail().';'.$user->getIpAddress()."\n");
|
||||
fclose($fp);
|
||||
|
||||
} else {
|
||||
$message = "ERREUR : Veuillez saisir une adresse email valide pour la mise sous surveillance";
|
||||
}
|
||||
$this->view->assign('message', $message);
|
||||
}
|
||||
}
|
||||
|
||||
public function valorisationAction()
|
||||
{
|
||||
$this->view->headTitle()->prepend("Valorisation");
|
||||
$this->view->headTitle()->prepend("Siret ".$this->siret);
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
if(!$user->checkPerm('INDISCORE3') && !$user->checkPerm('INDISCORE3P'))
|
||||
$this->_forward('perms', 'error');
|
||||
|
||||
$sessionEntreprise = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
$ws = new WsScores();
|
||||
$siren = substr($this->siret,0,9);
|
||||
|
||||
$request = $this->getRequest();
|
||||
$ref = $request->getParam('ref', '');
|
||||
$encours = $request->getParam('encours', 0);
|
||||
$email = $request->getParam('email', '');
|
||||
|
||||
$infos = $ws->getEntrepriseValo($siren);
|
||||
|
||||
require_once 'Scores/RapportComment.php';
|
||||
$rapportComment = new RapportComment($siren, $this->id,
|
||||
$infos->Indiscore->tabCommentaires->item,
|
||||
$infos->RatiosInfos,
|
||||
$infos->RatiosBilansInfos,
|
||||
$infos->RatiosSecteur,
|
||||
$infos->Indiscore->tabVariables
|
||||
);
|
||||
$this->view->assign('comment',$rapportComment->out());
|
||||
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('id', $this->id);
|
||||
$this->view->assign('siren', $siren);
|
||||
$this->view->assign('raisonSociale', $sessionEntreprise->getRaisonSociale());
|
||||
$this->view->assign('exportObjet', $infos);
|
||||
}
|
||||
}
|
@ -1,488 +0,0 @@
|
||||
<?php
|
||||
class FichierController extends Zend_Controller_Action
|
||||
{
|
||||
|
||||
public function init()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
}
|
||||
|
||||
public function indexAction(){}
|
||||
|
||||
/**
|
||||
* Gestion du chargement des logos
|
||||
*/
|
||||
public function logoAction()
|
||||
{
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$explode = explode('.', $file);
|
||||
switch ($explode[1]) {
|
||||
case 'png' : $content_type = 'image/png'; break;
|
||||
case 'gif' : $content_type = 'image/gif'; break;
|
||||
case 'jpeg':
|
||||
case 'jpg' : $content_type = 'image/jpeg'; break;
|
||||
}
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->data).'/logos/';
|
||||
if ( file_exists($path.$file) ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo 'Impossible de charger le logo.';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion du chargement des images du cache
|
||||
*/
|
||||
public function imgcacheAction()
|
||||
{
|
||||
$content_type = 'image/png';
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = $c->profil->path->pages.'/imgcache/';
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
if ( file_exists($path.$file) ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo 'Impossible de charger le fichier.';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion du chargement des fichiers des marques
|
||||
*/
|
||||
public function marqueAction()
|
||||
{
|
||||
$content_type = 'application/pdf';
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->data).'/marques/';
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
if(file_exists($path.$file) && filesize($path.$file)>0) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo "Erreur lors de l'affichage du fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion des fichiers Actes et Bilans
|
||||
*/
|
||||
public function pdfAction()
|
||||
{
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$content_type = 'application/pdf';
|
||||
$c = Zend_Registry::get('config');
|
||||
//bilan
|
||||
if (preg_match('/^bilan-[0-9]{9}-(consolides|sociaux)-([0-9]{8})/', $file, $matches)) {
|
||||
$path = realpath($c->profil->path->data).
|
||||
'/greffes/bilans/'.$matches[1].'/'.substr($matches[2],0,4).'/';
|
||||
}
|
||||
//acte
|
||||
else if (preg_match('/^acte-[0-9]{9}-(.*)-([0-9]{8})-.*-.*-.*-.*-.*-.*$/', $file, $matches)) {
|
||||
$type = $matches[1];
|
||||
$date = $matches[2];
|
||||
$annee = substr($date,0,4);
|
||||
$mois = substr($date,4,2);
|
||||
$path = realpath($c->profil->path->data).'/greffes/actes/'.$annee.'/'.$mois.'/';
|
||||
}
|
||||
|
||||
Zend_Registry::get('firebug')->info($path);
|
||||
|
||||
if(file_exists($path.$file) && filesize($path.$file)>0) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo "Erreur lors de l'affichage du fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion des fichiers Actes et Bilans
|
||||
*/
|
||||
public function pdfassociationAction()
|
||||
{
|
||||
$content_type = 'application/pdf';
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->data).'/association/';
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$type = $this->getRequest()->getParam('type');
|
||||
$file = $type.'/'.$file;
|
||||
if(file_exists($path.$file) && filesize($path.$file)>0) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo "Erreur lors de l'affichage du fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion des liasses au formats excel
|
||||
*/
|
||||
public function liasseAction()
|
||||
{
|
||||
$content_type = 'application/vnd.ms-excel';
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->files).'/';
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
//Envoi du fichier sur la sortie standard
|
||||
if ( file_exists($path.$file) ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo 'Impossible de charger le fichier.';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion des log de consommation
|
||||
*/
|
||||
public function consommationAction()
|
||||
{
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$content_type = 'application/csv-tab-delimited-table';
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->files).'/';
|
||||
//Envoi du fichier sur la sortie standard
|
||||
if ( file_exists($path.$file) ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo 'Impossible de charger le fichier.';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Export du portefeuille au format CSV
|
||||
*/
|
||||
public function portefeuilleAction()
|
||||
{
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$content_type = 'application/csv-tab-delimited-table';
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->files).'/';
|
||||
//Envoi du fichier sur la sortie standard
|
||||
if ( file_exists($path.$file) ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo 'Impossible de charger le fichier.';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Export de la liste des surveillances au format CSV
|
||||
*/
|
||||
public function surveillanceAction()
|
||||
{
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$content_type = 'application/csv-tab-delimited-table';
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->files).'/';
|
||||
//Envoi du fichier sur la sortie standard
|
||||
if ( file_exists($path.$file) ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo 'Impossible de charger le fichier.';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion des fichiers bilan saisie par les clients
|
||||
*/
|
||||
public function bilanclientAction()
|
||||
{
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->data).'/bilanclient/';
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$explode = explode('.', $file);
|
||||
switch ($explode[1]) {
|
||||
case 'pdf' : $content_type = 'application/pdf'; break;
|
||||
case 'tiff' : $content_type = 'image/tiff'; break;
|
||||
}
|
||||
if ( file_exists($path.$file) && filesize($path.$file)>0 ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo "Erreur lors de l'affichage du fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion des kbis
|
||||
*/
|
||||
public function kbisAction()
|
||||
{
|
||||
$content_type = 'application/pdf';
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->files).'/';
|
||||
if ( file_exists($path.$file) && filesize($path.$file)>0 ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo "Erreur lors de l'affichage du fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion des rapports personnalisés
|
||||
*/
|
||||
public function customrapportAction()
|
||||
{
|
||||
$content_type = 'application/pdf';
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->pages).'/';
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$output_file = $directory.'/'.$file;
|
||||
if ( file_exists($path.$file) && filesize($path.$file)>0 ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo "Impossible de charger le fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion bodacc au format PDF
|
||||
*/
|
||||
public function bodaccAction()
|
||||
{
|
||||
$content_type = 'application/pdf';
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->data).'/bodacc/';
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
//Construire le chemin du dossier
|
||||
preg_match('/BODACC_(A|B|C)_([0-9]{4})_(.*)\.pdf/', $file, $matches);
|
||||
$path.= $matches[1].'/'.$matches[2].'/';
|
||||
if ( file_exists($path.$file) && filesize($path.$file)>0 ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo "Impossible de charger le fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion des fichiers PDF des nouveautés
|
||||
*/
|
||||
public function newAction()
|
||||
{
|
||||
$content_type = 'application/pdf';
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->data).'/nouveautes/';
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
if ( file_exists($path.$file) && filesize($path.$file)>0 ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo "Impossible de charger le fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Bodacc history file
|
||||
*/
|
||||
public function histopdfAction()
|
||||
{
|
||||
$content_type = 'application/pdf';
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->files).'/';
|
||||
if ( file_exists($path.$file) && filesize($path.$file)>0 ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo "Impossible de charger le fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Internal files for groupes
|
||||
*/
|
||||
public function groupesAction()
|
||||
{
|
||||
$content_type = 'application/pdf';
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->data).'/groupes/';
|
||||
if ( file_exists($path.$file) && filesize($path.$file)>0 ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo "Impossible de charger le fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Bilan : Association
|
||||
*/
|
||||
public function greffeAction()
|
||||
{
|
||||
$content_type = 'application/pdf';
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = $c->profil->path->files.'/';
|
||||
Zend_Registry::get('firebug')->info($path.$file);
|
||||
if ( file_exists($path.$file) && filesize($path.$file)>0 ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo "Impossible de charger le fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Façade d'immeuble
|
||||
*/
|
||||
public function streetviewAction()
|
||||
{
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$explode = explode('.', $file);
|
||||
switch ($explode[1]) {
|
||||
case 'png' : $content_type = 'image/png'; break;
|
||||
case 'gif' : $content_type = 'image/gif'; break;
|
||||
case 'jpeg':
|
||||
case 'jpg' : $content_type = 'image/jpeg'; break;
|
||||
}
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->data).'/google/streetview/';
|
||||
if ( file_exists($path.$file) ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo file_get_contents(APPLICATION_PATH.'/../public/themes/default/images/1x1.png');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,97 +0,0 @@
|
||||
<?php
|
||||
class IndexController extends Zend_Controller_Action
|
||||
{
|
||||
|
||||
public function indexAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$page = $request->getParam('page');
|
||||
if ($page == 'annonces')
|
||||
{
|
||||
$siret = $request->getParam('siret');
|
||||
$source = $request->getParam('source');
|
||||
$idAnn = $request->getParam('idAnn');
|
||||
$lien = '/juridique/annonces/siret/'.$siret;
|
||||
if (!empty($source)) $lien.= '/source/'.$source;
|
||||
if (!empty($idAnn)) $lien.= '/idAnn/'.$idAnn;
|
||||
$this->_redirect($lien);
|
||||
}
|
||||
elseif ( Zend_Registry::get('theme')->name=='mobile' )
|
||||
{
|
||||
//Afficher le menu pour la version mobile
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->_forward('entreprise', 'recherche');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retourne l'url pour le csv d'export du portefeuille
|
||||
*/
|
||||
public function portefeuillecsvAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
||||
//'login' and 'hach' detecte from AuthAdapter
|
||||
|
||||
$request = $this->getRequest();
|
||||
$version = $request->getParam('v', 1);
|
||||
|
||||
if (intval($version) == 2) {
|
||||
|
||||
$log = Zend_Registry::get('config')->profil->path->data.'/log/altisys.log';
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
$login = $user->getLogin();
|
||||
$idClient = $user->getIdClient();
|
||||
|
||||
$file = 'listesurv-score-'.$login.'-'.$idClient.'.csv';
|
||||
|
||||
$content_type = 'application/csv-tab-delimited-table';
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->files).'/';
|
||||
//Envoi du fichier sur la sortie standard
|
||||
if ( file_exists($path.$file) ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
file_put_contents($log, date('Y-m-d H:i:s')." APPEL ALTISYS - OK $file\n", FILE_APPEND);
|
||||
} else {
|
||||
echo 'Impossible de charger le fichier.';
|
||||
file_put_contents($log, date('Y-m-d H:i:s')." APPEL ALTISYS - ERREUR $file\n", FILE_APPEND);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
require_once 'Scores/WsScores.php';
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
$login = $user->getLogin();
|
||||
$idClient = $user->getIdClient();
|
||||
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getPortefeuilleCsv($login, $idClient);
|
||||
|
||||
$log = Zend_Registry::get('config')->profil->path->data.'/log/altisys.log';
|
||||
|
||||
if ($reponse === false){
|
||||
file_put_contents($log, date('Y-m-d H:i:s')." - URL = ERREUR\n", FILE_APPEND);
|
||||
echo "Erreur";
|
||||
} elseif (!empty($reponse->result->Url)) {
|
||||
file_put_contents($log, date('Y-m-d H:i:s')." - URL = ".$reponse->result->Url."\n", FILE_APPEND);
|
||||
echo $reponse->result->Url;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,458 +0,0 @@
|
||||
<?php
|
||||
class JuridiqueController extends Zend_Controller_Action
|
||||
{
|
||||
protected $siret = null;
|
||||
protected $id = 0;
|
||||
|
||||
public function init()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$this->siret = $request->getParam('siret');
|
||||
$this->id = $request->getParam('id', 0);
|
||||
|
||||
require_once 'Scores/WsScores.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* Affichage de la liste des annonces ou d'une annonce
|
||||
*/
|
||||
public function annoncesAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
|
||||
$vue = $request->getParam('vue', 'bodacc');
|
||||
|
||||
$idAnn = $request->getParam('idAnn', null);
|
||||
$siren = substr($this->siret, 0,9);
|
||||
|
||||
$source = $request->getParam('source');
|
||||
if (!empty($source)) {
|
||||
switch ($source){
|
||||
case 1: $vue='bodacc'; break;
|
||||
case 2: $vue='balo'; break;
|
||||
case 3: $vue='asso'; break;
|
||||
}
|
||||
}
|
||||
|
||||
$session = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
$fj = $session->getFormeJuridique();
|
||||
if ( $fj>9000 && $fj<9999 && intval($siren)==0 ) {
|
||||
$vue = 'asso';
|
||||
}
|
||||
|
||||
$this->view->assign('id', $session->getId());
|
||||
$this->view->assign('siren', $siren);
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('raisonSociale', $session->getRaisonSociale());
|
||||
$this->view->assign('AutrePage', $request->getParam('apage'));
|
||||
|
||||
if ($session->getSource()=='006' || $session->getSourceId()=='007') {
|
||||
|
||||
$this->view->assign('AutreSource', true);
|
||||
|
||||
} else {
|
||||
|
||||
$this->view->assign('vue', $vue);
|
||||
|
||||
//Pagination
|
||||
$page = $request->getParam('page', 1);
|
||||
if ( $page <= 0 ) $page = 1;
|
||||
$nbAffichage = 20;
|
||||
$position = ($page - 1 ) * $nbAffichage;
|
||||
|
||||
$ws = new WsScores();
|
||||
switch ( $vue ) {
|
||||
case 'bodacc':
|
||||
case 'abod':
|
||||
default:
|
||||
if(intval($siren)==0) {
|
||||
$idAnn = $session->getSourceId();
|
||||
}
|
||||
$infos = $ws->getAnnoncesLegales($siren, $idAnn, null, $position, $nbAffichage);
|
||||
break;
|
||||
case 'balo':
|
||||
$infos = $ws->getAnnoncesBalo($siren, $idAnn, null, $position, $nbAffichage);
|
||||
break;
|
||||
case 'asso':
|
||||
if ( intval($siren)==0 && substr($session->getAutreId(),0,1)=='W' ) {
|
||||
$infos = $ws->getAnnoncesAsso($session->getAutreId(), $idAnn, null, $position, $nbAffichage);
|
||||
} elseif (intval($siren)!=0) {
|
||||
$infos = $ws->getAnnoncesAsso($siren, $idAnn, null, $position, $nbAffichage);
|
||||
} else {
|
||||
$idAnn = $session->getSourceId();
|
||||
$infos = $ws->getAnnoncesAsso($siren, $idAnn, null, $position, $nbAffichage);
|
||||
}
|
||||
break;
|
||||
case 'bomp':
|
||||
$filtre = $request->getParam('filtre', null);
|
||||
$this->view->assign('filtre', $filtre);
|
||||
$infos = $ws->getAnnoncesBoamp($siren, $idAnn, $filtre, $position, $nbAffichage);
|
||||
break;
|
||||
}
|
||||
if ($infos === false) $this->_forward('soap', 'error');
|
||||
Zend_Registry::get('firebug')->info($infos);
|
||||
require_once 'Scores/Annonces.php';
|
||||
$objAnnonces = new Annonces($infos->result->item);
|
||||
|
||||
$typeAnnonces = array(
|
||||
'Bodacc',
|
||||
'Balo',
|
||||
'Bomp',
|
||||
'Asso',
|
||||
);
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
$this->view->assign('hasModeEdition', $user->checkModeEdition());
|
||||
|
||||
$this->view->assign('exportObjet', $infos);
|
||||
$this->view->assign('surveillance', $user->checkPerm('survannonce'));
|
||||
|
||||
//Affichage pour une annonce
|
||||
if (!empty($idAnn) && in_array($vue, array('bodacc', 'abod', 'balo', 'asso', 'bomp')) ) {
|
||||
|
||||
if ( $user->checkModeEdition() ){
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/saisieannonces.js', 'text/javascript');
|
||||
}
|
||||
|
||||
$classType = 'annonces'.ucfirst($vue);
|
||||
foreach($objAnnonces->$classType as $ann) {
|
||||
if($ann->id==$idAnn) break;
|
||||
}
|
||||
Zend_Registry::get('firebug')->info($ann);
|
||||
$annonce = array(
|
||||
'Desc' => $objAnnonces->getAnnonceDesc($ann),
|
||||
'Entree' => $objAnnonces->getAnnonceEntree($ann),
|
||||
'EntreeSD' => $objAnnonces->getAnnonceEntreeSD($ann),
|
||||
'Even' => $objAnnonces->getAnnonceEven($ann),
|
||||
'Texte' => $objAnnonces->getAnnonceTexte($ann),
|
||||
'Type' => $objAnnonces->getType($ann),
|
||||
'Code' => $objAnnonces->getCode($ann),
|
||||
'Annee' => $objAnnonces->getAnnee($ann),
|
||||
'Num' => $objAnnonces->getNum($ann),
|
||||
'Deleted' => $objAnnonces->isDeleted($ann),
|
||||
'Entites' => $objAnnonces->getAnnonceEntite($ann)
|
||||
);
|
||||
|
||||
$this->view->assign('source', $session->getSource());
|
||||
if ( intval($this->siret)==0 ){
|
||||
$this->view->assign('sourceId', $session->getSourceId());
|
||||
} else {
|
||||
$this->view->assign('sourceId', null);
|
||||
}
|
||||
$this->view->assign('idAnn', $idAnn);
|
||||
$this->view->assign('annonce', $annonce);
|
||||
|
||||
if ($request->getParam('q')=='ajax')
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
//$this->_helper->viewRenderer->setNoRender(true);
|
||||
$this->renderScript('juridique/annonce-ajax.phtml');
|
||||
} else {
|
||||
|
||||
$this->view->assign('PageCurrent', $page);
|
||||
|
||||
//Définir url pour téléchargement pdf
|
||||
if ( in_array($annonce['Code'], array('BODA', 'BODB', 'BODC')) && intval($annonce['Annee'])>=2008) {
|
||||
$lienBodacc = $this->view->url(array(
|
||||
'controller' => 'juridique',
|
||||
'action' => 'bodaccpdf',
|
||||
'type' => substr($annonce['Code'],3,1),
|
||||
'annee' => $annonce['Annee'],
|
||||
'num' => $annonce['Num'],
|
||||
), null, true);
|
||||
$this->view->assign('lienBodacc', $lienBodacc);
|
||||
}
|
||||
|
||||
$this->renderScript('juridique/annonce.phtml');
|
||||
}
|
||||
|
||||
//Affichage pour la liste des annonces
|
||||
} else {
|
||||
|
||||
//Calcul pagination
|
||||
$nbReponses = count($infos->result->item);
|
||||
$nbReponsesTotal = $infos->nbReponses;
|
||||
if ($nbReponses < $nbReponsesTotal) {
|
||||
$pageTotal = ceil( $nbReponsesTotal / $nbAffichage );
|
||||
$pageCurrent = $page;
|
||||
$pagePrev = $page - 1;
|
||||
if ($pagePrev < 1) {
|
||||
$pagePrev = 1;
|
||||
}
|
||||
$pageNext = $page + 1;
|
||||
if( $pageNext > $pageTotal ) {
|
||||
$pageNext = $pageTotal;
|
||||
}
|
||||
} else {
|
||||
$pageTotal = $pageCurrent = 1;
|
||||
}
|
||||
$this->view->assign('PageTotal', $pageTotal);
|
||||
$this->view->assign('PagePrev', $pagePrev);
|
||||
$this->view->assign('PageNext', $pageNext);
|
||||
$this->view->assign('PageCurrent', $pageCurrent);
|
||||
|
||||
$this->view->assign('nbReponses', empty($nbReponses) ? 0 : $nbReponses);
|
||||
$this->view->assign('nbReponsesTotal', empty($nbReponsesTotal) ? 0 : $nbReponsesTotal);
|
||||
|
||||
foreach ( $typeAnnonces as $type ) {
|
||||
$classType = 'annonces'.$type;
|
||||
$annonces = array();
|
||||
if ( count( $objAnnonces->$classType ) > 0 ) {
|
||||
foreach( $objAnnonces->$classType as $ann ) {
|
||||
$annonces[] = $objAnnonces->getAnnonceResume($ann);
|
||||
}
|
||||
$this->view->assign($classType, $annonces);
|
||||
}
|
||||
}
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/annonces.js', 'text/javascript');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Affichage infos réglementées
|
||||
*/
|
||||
public function infosregAction()
|
||||
{
|
||||
$this->view->headTitle()->prepend("Informations Réglementées");
|
||||
$this->view->headTitle()->prepend("Siret ".$this->siret);
|
||||
|
||||
$request = $this->getRequest();
|
||||
$idAnn = $request->getParam('idann', false);
|
||||
$siren = substr($this->siret, 0,9);
|
||||
$session = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
|
||||
$ws = new WsScores();
|
||||
if ($idAnn!=false) {
|
||||
$this->view->assign('idAnn', $idAnn);
|
||||
$infos = $ws->getInfosReg($siren,$idAnn);
|
||||
} else {
|
||||
$infos = $ws->getInfosReg($siren);
|
||||
}
|
||||
if ($infos === false) $this->forward('soap', 'error');
|
||||
|
||||
if (is_string($infos)){
|
||||
$this->view->assign('message', $infos);
|
||||
}
|
||||
|
||||
$objAnnonces = $infos->result->item;
|
||||
$annonces = array();
|
||||
if (count($objAnnonces)>0) {
|
||||
foreach ( $objAnnonces as $item ) {
|
||||
$dateParution = new Zend_Date($item->DateParution, 'yyyy-MM-dd');
|
||||
$dateInsertion = new Zend_Date($item->dateInsertionSD, 'yyyy-MM-dd');
|
||||
$annonces[] = array(
|
||||
'id' => $item->id,
|
||||
'titre' => $item->titre,
|
||||
'communique' => $item->communique,
|
||||
'source' => $item->source,
|
||||
'DateParution' => $dateParution->toString('dd/MM/yyyy'),
|
||||
'dateInsertionSD' => $dateInsertion->toString('dd/MM/yyyy'),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$this->view->assign('annonces', $annonces);
|
||||
$this->view->assign('siren', $siren);
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('raisonSociale', $session->getRaisonSociale());
|
||||
$this->view->assign('exportObjet', $infos);
|
||||
}
|
||||
|
||||
/**
|
||||
* Affichage listes des compétences
|
||||
*/
|
||||
public function competencesAction()
|
||||
{
|
||||
$this->view->headTitle()->prepend("Compétences Territoriales");
|
||||
$this->view->headTitle()->prepend("Siret ".$this->siret);
|
||||
|
||||
$request = $this->getRequest();
|
||||
$type = $request->getParam('type', '');
|
||||
$siren = substr($this->siret,0,9);
|
||||
$session = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
|
||||
$abbrev = array(
|
||||
' TGI ' => 'TRIBUNAL DE GRANDE INSTANCE DE ',
|
||||
' TI ' => 'TRIBUNAL D\'INSTANCE DE ',
|
||||
' TC ' => 'TRIBUNAL DE COMMERCE DE ',
|
||||
' TGICC ' => 'TRIBUNAL DE GRANDE INSTANCE A COMPETENCE COMMERCIALE ',
|
||||
' TICC ' => 'TRIBUNAL D\'INSTANCE A COMPETENCE COMMERCIALE '
|
||||
);
|
||||
|
||||
if (!empty($type)){
|
||||
$ws = new WsScores();
|
||||
$infos = $ws->getListeCompetences($siret, $type, $session->getCodeCommune());
|
||||
if ($infos === false) $this->_forward('soap', 'error');
|
||||
|
||||
$competences = $infos->result->item;
|
||||
Zend_Registry::get('firebug')->info($infos);
|
||||
if( $type=='tri' || $type=='cfe' ) {
|
||||
$i=0;
|
||||
foreach($competences as $comp){
|
||||
$competences[$i]->Nom = strtr(' '.strtoupper($comp->Nom), $abbrev);
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
$this->view->assign('competences', $competences);
|
||||
$this->view->assign('type', $type);
|
||||
$this->view->assign('exportObjet', $infos);
|
||||
}
|
||||
|
||||
$this->view->assign('siren', $siren);
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('raisonSociale', $session->getRaisonSociale());
|
||||
}
|
||||
|
||||
/**
|
||||
* Affichage des la listes des conventions collectives
|
||||
* Enter description here ...
|
||||
*/
|
||||
public function conventionsAction()
|
||||
{
|
||||
$this->view->headTitle()->prepend("Conventions Collectives");
|
||||
$this->view->headTitle()->prepend("Siret ".$this->siret);
|
||||
|
||||
$siren = substr($this->siret, 0,9);
|
||||
$session = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
$this->view->assign('siren', $siren);
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('raisonSociale', $session->getRaisonSociale());
|
||||
$ws = new WsScores();
|
||||
$infos = $ws->getListeConventions($siren);
|
||||
$conventions = $infos->result->item;
|
||||
Zend_Registry::get('firebug')->info($conventions);
|
||||
$this->view->assign('conventions', $conventions);
|
||||
$this->view->assign('exportObjet', $infos);
|
||||
}
|
||||
|
||||
/**
|
||||
* Affichage des marques déposées
|
||||
*/
|
||||
public function marquesAction()
|
||||
{
|
||||
$this->view->headTitle()->prepend("Marques Déposées");
|
||||
$this->view->headTitle()->prepend("Siret ".$this->siret);
|
||||
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/marques.js', 'text/javascript');
|
||||
|
||||
$request = $this->getRequest();
|
||||
$idObject = $request->getParam('idObject', 0);
|
||||
$siren = substr($this->siret, 0,9);
|
||||
$session = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
$this->view->assign('siren', $siren);
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('raisonSociale', $session->getRaisonSociale());
|
||||
$ws = new WsScores();
|
||||
$infos = $ws->getMarques($siren, $idObject);
|
||||
if ($infos === false) $this->_forward('soap', 'error');
|
||||
|
||||
$marques = $infos->result->item;
|
||||
$this->view->assign('marques', $marques);
|
||||
$this->view->assign('idObject', $idObject);
|
||||
$this->view->assign('exportObjet', $marques);
|
||||
Zend_Registry::get('firebug')->info($infos);
|
||||
}
|
||||
|
||||
/**
|
||||
* Affiche le lien pour télécharger le fichier concernant le dépot
|
||||
*/
|
||||
public function getmarqueAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
$request = $this->getRequest();
|
||||
$numdepot = $request->getParam('numdepot', '');
|
||||
if (empty($numdepot)){
|
||||
echo 'Paramètres incorrects';
|
||||
exit;
|
||||
}
|
||||
$c = Zend_Registry::get('config');
|
||||
$directory = realpath($c->profil->path->data).'/marques';
|
||||
$file = $numdepot.'.pdf';
|
||||
|
||||
//Le fichier n'existe pas alors on le télécharger
|
||||
if(!file_exists($directory.'/'.$file)
|
||||
|| filesize($directory.'/'.$file)==0 ) {
|
||||
$cmd = 'php ' . APPLICATION_PATH . '/../scripts/jobs/getMarque.php ' . $numdepot;
|
||||
Zend_Registry::get('firebug')->info($cmd);
|
||||
$result = exec($cmd);
|
||||
Zend_Registry::get('firebug')->info($result);
|
||||
}
|
||||
//On vérfie que le fichier existe après le téléchargement
|
||||
if(file_exists($directory.'/'.$file) && filesize($directory.'/'.$file)>0) {
|
||||
$href = $this->view->baseUrl().'/fichier/marque/'.$file;
|
||||
echo '<a href="'.$href.'" target="_blank">Télécharger le PDF de l\'insciption au BOPI.</a>';
|
||||
} else {
|
||||
echo 'Document introuvable.';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function bodaccpdfAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
$request = $this->getRequest();
|
||||
|
||||
$type = $request->getParam('type');
|
||||
$annee = $request->getParam('annee');
|
||||
$num = $request->getParam('num');
|
||||
|
||||
//$num doit être retraité pour être sur 4 position
|
||||
$c = strlen($num);
|
||||
for($i=0;$i<4-$c;$i++){
|
||||
$num = '0'.$num;
|
||||
}
|
||||
|
||||
$c = Zend_Registry::get('config');
|
||||
$file = realpath($c->profil->path->data)
|
||||
.'/bodacc/'.$type.'/'.$annee.'/'.
|
||||
'BODACC_'.$type.'_'.$annee.'_'.$num.'.pdf';
|
||||
|
||||
if ( !file_exists($file) ) {
|
||||
exec('php ' . APPLICATION_PATH . "/../scripts/jobs/getBodaccPdf.php $type $annee $num >> getBodaccPdf.log");
|
||||
}
|
||||
|
||||
if (file_exists($file)) {
|
||||
$href = $this->view->url(array(
|
||||
'controller' => 'fichier',
|
||||
'action' => 'bodacc',
|
||||
'fichier' => basename($file),
|
||||
), null, true);
|
||||
echo "<a target=\"_blank\" href=\"".$href."\">Cliquer ici pour télécharger le fichier.</a>";
|
||||
} else {
|
||||
echo "Erreur lors du chargement du fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function annoncenumAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
|
||||
$request = $this->getRequest();
|
||||
$siren = $request->getParam('siren');
|
||||
|
||||
$ws = new WsScores();
|
||||
$result = $ws->getAnnoncesNum($siren);
|
||||
Zend_Registry::get('firebug')->info($result);
|
||||
$numWS = array();
|
||||
if (count($result->item)>0) {
|
||||
foreach ($result->item as $item) {
|
||||
$numWS[$item->type] = $item->num;
|
||||
}
|
||||
}
|
||||
$types = array('bodacc', 'balo', 'boamp', 'asso');
|
||||
|
||||
$num = array();
|
||||
foreach($types as $type) {
|
||||
if ( array_key_exists($type, $numWS) ) {
|
||||
$num['Type'.ucfirst($type)] = $numWS[$type];
|
||||
}
|
||||
}
|
||||
|
||||
$this->view->assign('num', $num);
|
||||
}
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,292 +0,0 @@
|
||||
<?php
|
||||
class TelechargementController extends Zend_Controller_Action
|
||||
{
|
||||
/**
|
||||
* Temps de mis en cache en heure
|
||||
* @var interger
|
||||
*/
|
||||
protected $filetime = 8;
|
||||
|
||||
/**
|
||||
* Répertoire de stockage pour le fichier
|
||||
* @var string
|
||||
*/
|
||||
protected $path = '';
|
||||
|
||||
/**
|
||||
* Vérifie ou télécharge le fichier sur une url
|
||||
* @param string $url
|
||||
* URL of file to download
|
||||
* @param mixed $filename
|
||||
* Override filename
|
||||
*/
|
||||
protected function getFile($url, $filename=null)
|
||||
{
|
||||
if (!is_dir($this->path)) mkdir($this->path);
|
||||
|
||||
// Recuperation du nom du fichier
|
||||
if ($filename===null) {
|
||||
$tableau = explode('/', $url);
|
||||
$file = $tableau[sizeof($tableau) - 1];
|
||||
} else {
|
||||
$file = $filename;
|
||||
}
|
||||
|
||||
// Suppression du fichier si le temps de cache est depasse
|
||||
if (file_exists($this->path.'/'.$file)){
|
||||
$dateFile = filemtime($this->path.'/'.$file);
|
||||
$now = mktime(date('G'), date('i'), date('s'),
|
||||
date('m') , date('d'), date('Y'));
|
||||
$maxTime = mktime(date('G',$dateFile)+$this->filetime, date('i',$dateFile),
|
||||
date('s',$dateFile), date('m',$dateFile),
|
||||
date('d',$dateFile), date('Y',$dateFile));
|
||||
if ($maxTime-$now<0) {
|
||||
unlink($this->path.'/'.$file);
|
||||
}
|
||||
}
|
||||
|
||||
// Recuperation du fichier sur le serveur
|
||||
if (file_exists($this->path.'/'.$file)) {
|
||||
return $file;
|
||||
} else {
|
||||
// On check si le fichier est present sur l'url
|
||||
try {
|
||||
$client = new Zend_Http_Client($url);
|
||||
$client->setStream();
|
||||
$response = $client->request('GET');
|
||||
if ( $response->isSuccessful() && copy($response->getStreamName(), $this->path.'/'.$file) ) {
|
||||
return $file;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} catch (Zend_Http_Client_Exception $e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function init()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
||||
$c = Zend_Registry::get('config');
|
||||
$this->path = $c->profil->path->files;
|
||||
|
||||
require_once 'Scores/WsScores.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* Télécharge la consommation client sous forme de fichier csv et affiche le lien
|
||||
*/
|
||||
public function consommationAction()
|
||||
{
|
||||
$this->filetime = 1;
|
||||
|
||||
$request = $this->getRequest();
|
||||
$start = $request->getParam('start', false);
|
||||
|
||||
//On souhaite récupérer l'url du fichier
|
||||
if ($start==1) {
|
||||
$mois = $request->getParam('mois');
|
||||
$detail = $request->getParam('detail', 0);
|
||||
$idClient = $request->getParam('idClient', 0);
|
||||
$login = $request->getParam('login', '');
|
||||
$all = $request->getParam('all', 0);
|
||||
|
||||
$date = substr($mois, 3, 4).substr($mois, 0, 2);
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
if (empty($login) && (!$user->isAdmin() && !$user->isSuperAdmin()) ) {
|
||||
$login = $user->getLogin();
|
||||
}
|
||||
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getLogsClients($date, $detail, $idClient, $login, $all);
|
||||
|
||||
if (!empty($reponse->result->Url)) {
|
||||
echo $reponse->result->Url;
|
||||
} else {
|
||||
echo 'FALSE';
|
||||
}
|
||||
} else {
|
||||
$url = $request->getParam('url', '');
|
||||
$file = $this->getFile($url);
|
||||
|
||||
// Le fichier existe sur l'extranet
|
||||
if ($file && file_exists($this->path.'/'.$file)) {
|
||||
if (filesize($this->path.'/'.$file) > 0) {
|
||||
echo '<u><a title="Té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,642 +0,0 @@
|
||||
<?php
|
||||
class UserController extends Zend_Controller_Action
|
||||
{
|
||||
|
||||
public function init()
|
||||
{
|
||||
require_once 'Scores/WsScores.php';
|
||||
$this->view->headLink()->appendStylesheet('/themes/default/styles/user.css', 'all');
|
||||
}
|
||||
|
||||
/**
|
||||
* Affiche le fomulaire d'edition des paramètres utilisateur
|
||||
*/
|
||||
public function indexAction()
|
||||
{
|
||||
$user = new Scores_Utilisateur();
|
||||
|
||||
if (!$user->checkPerm('MONPROFIL')){
|
||||
$this->_forward('perms', 'error');
|
||||
}
|
||||
|
||||
$this->view->assign('device_type', $user->getBrowserInfo()->mobile);
|
||||
$this->view->assign('browser_info', $user->getBrowserInfo()->name.' '.$user->getBrowserInfo()->version);
|
||||
|
||||
$this->view->headLink()->appendStylesheet('/themes/default/styles/form.css', 'all');
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/user.js', 'text/javascript');
|
||||
|
||||
$request = $this->getRequest();
|
||||
|
||||
$messages = '';
|
||||
$isProfilUpdated = false;
|
||||
$isPasswordUpdated = false;
|
||||
$updateResult = false;
|
||||
|
||||
$ws = new WsScores();
|
||||
|
||||
$login = $request->getParam('login', '');
|
||||
$op = $request->getParam('op');
|
||||
|
||||
//Récupération des informations de l'identité
|
||||
$auth = Zend_Auth::getInstance();
|
||||
$identity = $auth->getIdentity();
|
||||
|
||||
//Save data
|
||||
if ( $request->isPost() ) {
|
||||
$options = $request->getParam('frmOptions', '');
|
||||
$action = $options['action'];
|
||||
|
||||
if ($login=='') $login = $options['login'];
|
||||
|
||||
//Enregistrement des données new & update
|
||||
if (in_array($action, array('new','update'))) {
|
||||
|
||||
if ($options['changepwd']!=1) {
|
||||
$options['password'] = '';
|
||||
}
|
||||
|
||||
if ( in_array($options['profil'], array('Administrateur', 'SuperAdministrateur'))
|
||||
&& !in_array('monprofil', $options['droits']) ) {
|
||||
$options['droits'][] = 'monprofil';
|
||||
}
|
||||
|
||||
if( !isset($options['profil']) ) {
|
||||
$options['profil'] = 'Utilisateur';
|
||||
}
|
||||
|
||||
$reponse = $ws->setInfosLogin($login, $action, $options);
|
||||
|
||||
$isProfilUpdated = true;
|
||||
$message = 'Erreur lors de la mise à jour du compte !';
|
||||
if (is_string($reponse)) {
|
||||
$message = $reponse;
|
||||
} elseif ($reponse){
|
||||
$updateResult = true;
|
||||
$message = 'Compte mis à jour.';
|
||||
}
|
||||
}
|
||||
|
||||
//Write change in session
|
||||
if ($identity->idClient == $options['idClient'] && $identity->username == $login) {
|
||||
//Modification lors du changement de mot de passe
|
||||
if ($options['changepwd']==1 && $updateResult) {
|
||||
|
||||
$identity->password = md5($login.'|'.$options['password']);
|
||||
$auth->getStorage()->write($identity);
|
||||
|
||||
}
|
||||
//Mise à jour du profil
|
||||
if ($isProfilUpdated && $updateResult) {
|
||||
|
||||
$InfosLogin = $ws->getInfosLogin($identity->username, $_SERVER['REMOTE_ADDR']);
|
||||
$identity = $user->updateProfil($InfosLogin);
|
||||
$auth->getStorage()->write($identity);
|
||||
|
||||
}
|
||||
//Gestion mode edition en SESSION
|
||||
if ($action=='update') {
|
||||
$modeEdition = $request->getParam('modeEdition', false);
|
||||
if ( $modeEdition ) {
|
||||
|
||||
$identity->modeEdition = true;
|
||||
$auth->getStorage()->write($identity);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( $isProfilUpdated || $isPasswordUpdated ) {
|
||||
$this->view->assign('message', $message);
|
||||
}
|
||||
|
||||
$isAdmin = false;
|
||||
if ( $identity->profil == 'Administrateur'
|
||||
|| $identity->profil == 'SuperAdministrateur' ) {
|
||||
$isAdmin = true;
|
||||
}
|
||||
$this->view->assign('isAdmin', $isAdmin);
|
||||
|
||||
$isSuperAdmin = false;
|
||||
if ($identity->profil == 'SuperAdministrateur') {
|
||||
$isSuperAdmin = true;
|
||||
}
|
||||
$this->view->assign('isSuperAdmin', $isSuperAdmin);
|
||||
|
||||
if ($op=='new')
|
||||
{
|
||||
$idClient = $request->getParam('idClient', '');
|
||||
if ($idClient == '') {
|
||||
$idClient = $identity->idClient;
|
||||
}
|
||||
$reponse = $ws->getNextLogin($idClient);
|
||||
$options->idClient = $idClient;
|
||||
if ($identity->idClient!=1 && $identity->profil!='SuperAdministrateur') {
|
||||
$options->profil = 'Utilisateur';
|
||||
}
|
||||
$this->view->assign('options', $options);
|
||||
|
||||
$this->view->assign('loginNew', $reponse->result->racine);
|
||||
$this->view->assign('droitsClients', explode(' ', strtolower($reponse->result->droitsClients)));
|
||||
$this->view->assign('action', 'new');
|
||||
$this->view->assign('pref', array());
|
||||
}
|
||||
elseif (!empty($op) || $op!='new')
|
||||
{
|
||||
if ( !empty($login) && $identity->username != $login ) {
|
||||
Zend_Registry::get('firebug')->info('getInfosLogin');
|
||||
$reponse = $ws->getInfosLogin($login, $_SERVER['REMOTE_ADDR']);
|
||||
$this->view->assign('options', $reponse->result);
|
||||
$this->view->assign('loginVu', $reponse->result->login);
|
||||
$this->view->assign('droits', explode(' ', strtolower($reponse->result->droits)));
|
||||
$this->view->assign('droitsClients', explode(' ', strtolower($reponse->result->droitsClients)));
|
||||
} else {
|
||||
$this->view->assign('options', $identity);
|
||||
$this->view->assign('loginVu', $identity->username);
|
||||
$this->view->assign('droits', explode(' ', strtolower($identity->droits)));
|
||||
$this->view->assign('droitsClients', explode(' ', strtolower($identity->droitsClients)));
|
||||
}
|
||||
$this->view->assign('loginNew', '');
|
||||
$this->view->assign('action', 'update');
|
||||
$this->view->assign('pref', explode(' ',$identity->pref));
|
||||
}
|
||||
|
||||
//Liste des catégories des accès
|
||||
$reponse = $ws->getCategory();
|
||||
$wscategory = $reponse->item;
|
||||
$this->view->assign('wscategory', $wscategory);
|
||||
|
||||
//Liste de tous les droits
|
||||
$listeDroits = $ws->getListeDroits();
|
||||
$droitsLib = array();
|
||||
foreach($listeDroits->item as $droit) {
|
||||
$droitsLib[strtoupper($droit->code)] = $droit->desc;
|
||||
}
|
||||
$this->view->assign('droitsLib', $droitsLib);
|
||||
|
||||
//Liste de toutes les préférences
|
||||
$listePrefs = $ws->getListePrefs();
|
||||
$prefsLib = array();
|
||||
foreach($listePrefs->item as $pref) {
|
||||
$prefsLib[strtoupper($pref->code)] = $pref->desc;
|
||||
}
|
||||
$this->view->assign('prefsLib', $prefsLib);
|
||||
}
|
||||
|
||||
/**
|
||||
* Display box to enter emails
|
||||
* One main email and two secondary
|
||||
* Email length 80 * 3 = 240
|
||||
* 255 chars is the length to store emails (email1;email2;email3)
|
||||
*/
|
||||
public function emailsAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
|
||||
$nbEmails = 3;
|
||||
|
||||
$request = $this->getRequest();
|
||||
$emails = $request->getParam('q');
|
||||
|
||||
if (null !== $emails) {
|
||||
$emailList = explode(';', $emails);
|
||||
if ( count($emailList)>0 ) {
|
||||
$i = 1;
|
||||
foreach ( $emailList as $email ) {
|
||||
$this->view->assign('email'.$i, $email);
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate email
|
||||
*/
|
||||
public function emailvalidAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
|
||||
$request = $this->getRequest();
|
||||
$email = $request->getParam('q');
|
||||
|
||||
$valid = false;
|
||||
|
||||
if (null !== $email) {
|
||||
$validateur = new Zend_Validate_EmailAddress();
|
||||
$valid = $validateur->isValid($email);
|
||||
}
|
||||
|
||||
$result = array(
|
||||
'valid' => $valid,
|
||||
);
|
||||
|
||||
$this->view->assign('result', $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Téléchargement de la consommation au format CSV
|
||||
*/
|
||||
public function consoAction()
|
||||
{
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/conso.js', 'text/javascript');
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
|
||||
$request = $this->getRequest();
|
||||
$idClient = $request->getParam('idClient', $user->getIdClient());
|
||||
$login = $request->getParam('login', '');
|
||||
|
||||
$this->view->assign('idClient', $idClient);
|
||||
$this->view->assign('login', $login);
|
||||
$this->view->assign('profil', $user->getProfil());
|
||||
}
|
||||
|
||||
/**
|
||||
* Renvoi vers le formulaire utilisateur avec les paramètres de la requete
|
||||
*/
|
||||
public function editAction()
|
||||
{
|
||||
$params = $this->getRequest()->getParams();
|
||||
$this->_forward('index', 'user', null, $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Suppression d'un utilisateur
|
||||
*/
|
||||
public function deleteAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$login = $request->getParam('login');
|
||||
$action = 'delete';
|
||||
$ws = new WsScores();
|
||||
$ws->setInfosLogin($login, $action);
|
||||
//Redirect
|
||||
$this->_forward('liste');
|
||||
}
|
||||
|
||||
/**
|
||||
* Activation d'un utilisateur
|
||||
*/
|
||||
public function enableAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$login = $request->getParam('login');
|
||||
$action = 'enable';
|
||||
$ws = new WsScores();
|
||||
$ws->setInfosLogin($login, $action);
|
||||
//Redirect
|
||||
$this->_forward('liste');
|
||||
}
|
||||
|
||||
/**
|
||||
* Désactivation d'un utilisateur
|
||||
*/
|
||||
public function disableAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$login = $request->getParam('login');
|
||||
$action = 'disable';
|
||||
$ws = new WsScores();
|
||||
$ws->setInfosLogin($login, $action);
|
||||
//Redirect
|
||||
$this->_forward('liste');
|
||||
}
|
||||
|
||||
/**
|
||||
* Méthode AJAX pour modifier le password d'un utilisateur
|
||||
*/
|
||||
public function changepwdAction()
|
||||
{
|
||||
//Redirect
|
||||
}
|
||||
|
||||
/**
|
||||
* Affiche la liste des utiliateurs
|
||||
*/
|
||||
public function listeAction()
|
||||
{
|
||||
$user = new Scores_Utilisateur();
|
||||
|
||||
$request = $this->getRequest();
|
||||
$idClient = $request->getParam('idClient', $user->getIdClient());
|
||||
|
||||
if (!$user->isSuperAdmin() && !$user->isAdmin()) {
|
||||
$this->renderScript('error/perms.phtml');
|
||||
}
|
||||
if ($user->isAdmin()){
|
||||
$idClient = $user->getIdClient();
|
||||
}
|
||||
$ws = new WsScores();
|
||||
$infos = $ws->getListeUtilisateurs($user->getLogin(), $idClient);
|
||||
$utilisateurs = $infos->result->item;
|
||||
$this->view->assign('utilisateurs', $utilisateurs);
|
||||
$this->view->assign('idClient', $idClient);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion de l'authentification
|
||||
*/
|
||||
public function loginAction()
|
||||
{
|
||||
$this->view->headScript()
|
||||
->appendFile('/libs/jquery/jquery.infieldlabel.min.js');
|
||||
|
||||
//@todo : gestion des affichages particuliers pour les clients
|
||||
$this->view->headTitle()->append('Connexion');
|
||||
$form = new Application_Form_Login();
|
||||
$this->view->form = $form;
|
||||
$request = $this->getRequest();
|
||||
if ( $request->isPost() ) {
|
||||
$formData = $request->getPost();
|
||||
if ($form->isValid($formData)) {
|
||||
$login = $form->getValue('login');
|
||||
$pass = $form->getValue('pass');
|
||||
|
||||
$auth = Zend_Auth::getInstance();
|
||||
$authAdapter = new Scores_Auth_Adapter_Ws($login, md5($login.'|'.$pass));
|
||||
$result = $auth->authenticate($authAdapter);
|
||||
|
||||
//Auth is valid
|
||||
if ( $result->isValid() ) {
|
||||
|
||||
//Save browser information
|
||||
$screenSize = $request->getParam('screenSize', 'unknow');
|
||||
$user = new Scores_Utilisateur();
|
||||
$info = get_browser();
|
||||
$isMobile = ($info->ismobiledevice==1) ? 1 : 0;
|
||||
$user->setBrowserInfo($info->platform, $info->browser, $info->version, $isMobile, $screenSize);
|
||||
|
||||
//Get previous url if user has been disconnected
|
||||
$url = '';
|
||||
if (Zend_Session::namespaceIsset('login')){
|
||||
$session = new Zend_Session_Namespace('login');
|
||||
if (isset($session->url)) {
|
||||
$url = $session->url;
|
||||
}
|
||||
}
|
||||
if (!empty($url) && $url!='/user/login' && $url!='/user/logout' && $url!='/localauth'){
|
||||
$this->_redirect($url);
|
||||
}
|
||||
$this->_redirect('/');
|
||||
}
|
||||
//Auth error
|
||||
else {
|
||||
|
||||
$this->view->message = '';
|
||||
Zend_Registry::get('firebug')->info($result);
|
||||
foreach ($result->getMessages() as $message) {
|
||||
$this->view->message.= $message."<br/>";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->_helper->layout()->disableLayout();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion de la déconnexion
|
||||
*/
|
||||
public function logoutAction()
|
||||
{
|
||||
Zend_Auth::getInstance()->clearIdentity();
|
||||
$session = new Zend_Session_Namespace('wcheck');
|
||||
$session->unsetAll();
|
||||
$this->_helper->layout()->disableLayout();
|
||||
|
||||
$request = $this->getRequest();
|
||||
$message = $request->getParam('message');
|
||||
$this->view->assign('message', $message);
|
||||
|
||||
$ajax = $request->getParam('ajax', 0);
|
||||
$this->view->assign('ajax', $ajax);
|
||||
|
||||
$refresh = 5;
|
||||
|
||||
$url = 'http://'.$_SERVER['SERVER_NAME'].$this->view->url(array(
|
||||
'controller' => 'user',
|
||||
'action' => 'login',
|
||||
), null, true);
|
||||
|
||||
$this->view->assign('url', $url);
|
||||
|
||||
if (!$ajax) {
|
||||
$this->view->assign('refresh', $refresh);
|
||||
$this->view->headMeta()->appendHttpEquiv('refresh', $refresh.'; url='.$url);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Mettre à jour le mode edition en session sans refresh de la page
|
||||
*/
|
||||
public function editionsessionAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
$request = $this->getRequest();
|
||||
$mode = $request->getParam('mode', 'false');
|
||||
$auth = Zend_Auth::getInstance();
|
||||
$identity = $auth->getIdentity();
|
||||
if ($identity->idClient == 1) {
|
||||
if ($mode == 'false') {
|
||||
$identity->modeEdition = false;
|
||||
echo 0;
|
||||
} else {
|
||||
$identity->modeEdition = true;
|
||||
echo 1;
|
||||
}
|
||||
$auth->getStorage()->write($identity);
|
||||
} else {
|
||||
echo 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Override email in surveillance portfolio
|
||||
*/
|
||||
public function emailsurveillanceAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$request = $this->getRequest();
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
|
||||
//Execute webservice operation
|
||||
if ( $request->isPost() ) {
|
||||
$email = trim($request->getParam('email'));
|
||||
if ($user->isAdmin() || $user->isSuperAdmin()) {
|
||||
$login = $request->getParam('login');
|
||||
}
|
||||
|
||||
if (empty($email)) {
|
||||
$result = "Aucun email défini!";
|
||||
} else if (empty($login)) {
|
||||
$result = "Aucun utilisateur défini!";
|
||||
} else {
|
||||
$ws = new WsScores();
|
||||
$result = $ws->setSurveillancesMail($login, $email);
|
||||
}
|
||||
|
||||
$this->view->assign('result', $result);
|
||||
}
|
||||
//Display form in dialog
|
||||
else {
|
||||
if ($user->isAdmin() || $user->isSuperAdmin()) {
|
||||
$login = $request->getParam('login');
|
||||
} else {
|
||||
$login = $user->getLogin();
|
||||
}
|
||||
$this->view->assign('login', $login);
|
||||
$this->view->assign('dialog',true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Changer la langue de l'utilisateur
|
||||
*/
|
||||
public function langAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
||||
$lang = $this->getRequest()->getParam('lang', null);
|
||||
|
||||
$auth = Zend_Auth::getInstance();
|
||||
$identity = $auth->getIdentity();
|
||||
|
||||
$identity->langtmp = $lang;
|
||||
|
||||
$auth->getStorage()->write($identity);
|
||||
}
|
||||
|
||||
/**
|
||||
* Changer le theme de l'utilisateur
|
||||
*/
|
||||
public function changethemeAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
||||
$request = $this->getRequest();
|
||||
$nom = $request->getParam('nom', 'default');
|
||||
|
||||
$auth = Zend_Auth::getInstance();
|
||||
$identity = $auth->getIdentity();
|
||||
|
||||
$identity->theme = $nom;
|
||||
|
||||
$auth->getStorage()->write($identity);
|
||||
|
||||
//Rediriger vers l'écran de recherche
|
||||
$this->_redirect('/');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Display browser informations on a simple page
|
||||
*/
|
||||
public function browserAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
||||
//Load bootstrap
|
||||
$bootstrap = Zend_Controller_Front::getInstance()->getParam('bootstrap');
|
||||
|
||||
//Get useragent and device informations
|
||||
$userAgent = $bootstrap->getResource('useragent');
|
||||
$device = $userAgent->getDevice();
|
||||
|
||||
//Display
|
||||
echo "<pre>";
|
||||
print_r(get_browser());
|
||||
print_r($device->getAllFeatures());
|
||||
echo "</pre>";
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends email to the specific client, who requests for forgotten password
|
||||
*/
|
||||
public function motpasseAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$name = 'Identifiants oubliés ?';
|
||||
$params = array(
|
||||
'identifiant' => '',
|
||||
'telephone' => '',
|
||||
'email' => '',
|
||||
'nom' => '',
|
||||
'prenom' => '',
|
||||
'fonction' => '',
|
||||
'service' => '',
|
||||
'rsociale' => '',
|
||||
);
|
||||
|
||||
$this->_helper->layout()->disableLayout();
|
||||
if ( $request->isPost() ) {
|
||||
$params = $request->getParams();
|
||||
$message = '';
|
||||
|
||||
$paramlist = array(
|
||||
'telephone' => 'Numéro de téléphone direct',
|
||||
'email' => 'Adresse email',
|
||||
'nom' => 'Nom',
|
||||
'prenom' => 'Prénom',
|
||||
'fonction' => 'Fonction',
|
||||
'service' => 'Service',
|
||||
'rsociale' => 'Sociale',
|
||||
);
|
||||
|
||||
foreach ($paramlist as $item => $val) {
|
||||
if (!isset($params[$item])) {
|
||||
$message .= "Champs $val vide !<br/>";
|
||||
}
|
||||
}
|
||||
|
||||
$validator = new Zend_Validate_EmailAddress();
|
||||
if (isset($params['email'])){
|
||||
if (!$validator->isValid($params['email'])) {
|
||||
$message .="Adresse email invalide ! <br/>";
|
||||
}
|
||||
}
|
||||
|
||||
if ($message == '') {
|
||||
|
||||
$mailbody = '<style type="text/css">table {font-family:Arial, Helvetica, sans-serif; font-size: 12px; width: 550px; border: none;}table td{padding: 4px 8px;}</style>';
|
||||
$mailbody .= "Demande d'envoi des identifiants.<br /><br />";
|
||||
$mailbody .= "L'un de nos clients a égaré son(ses) identifiant(s).<br />";
|
||||
$mailbody .= "Via notre lien -identifiants oubliés- il a effectué une demande de transmission de ces codes.<br />";
|
||||
$mailbody .= "<p>A l'aide des informations ci-dessous, merci de retrouver ces codes et les lui envoyer par email.</p>";
|
||||
$mailbody .= "<table><tr bgcolor='#eeeeee'><td width='200px'><strong>Identifiant :</strong></td><td>".$params['identifiant']."</td></tr>";
|
||||
$mailbody .= "<tr><td><strong>Adresse email:</strong></td><td>".$params['email']."</td></tr>";
|
||||
$mailbody .= "<tr bgcolor='#eeeeee'><td><strong>Numéro de téléphone direct:</strong></td><td>".$params['telephone']."</td></tr>";
|
||||
$mailbody .= "<tr><td><strong>Nom:</strong></td><td>".$params['nom']."</td></tr>";
|
||||
$mailbody .= "<tr bgcolor='#eeeeee'><td><strong>Prénom:</strong></td><td>".$params['prenom']."</td></tr>";
|
||||
$mailbody .= "<tr><td><strong>Fonction:</strong></td><td>".$params['fonction']."</td></tr>";
|
||||
$mailbody .= "<tr bgcolor='#eeeeee'><td><strong>Service:</strong></td><td>".$params['service']."</td></tr>";
|
||||
$mailbody .= "<tr><td><strong>Dénomination Sociale:</strong></td><td>".$params['rsociale']."</td></tr></table>";
|
||||
$mailbody .= "<p>Si les informations fournies ne permettent pas d'identifier correctement l'utilisateur, ";
|
||||
$mailbody .= "merci d'émettre un message sur le mail communiquer en précisant que \"Les éléments confiés ne permettent pas d'identifier l'utilisateur ";
|
||||
$mailbody .= "et par conséquence de vous délivrer les codes d'accès demandés\".<br />";
|
||||
$mailbody .= "Aussi nous vous invitons à vous rapprocher de votre interlocuteur commercial habituel ";
|
||||
$mailbody .= "ou de votre responsable suivi relations Scores & Décisions au sein de votre société.</p>";
|
||||
|
||||
$mail = new Scores_Mail();
|
||||
$mail->setSubject("Demande d'envoi des identifiants");
|
||||
$mail->setBodyHTML($mailbody);
|
||||
$mail->setFrom('support');
|
||||
$mail->addToKey('support');
|
||||
$mail->setReplyTo($params['email']);
|
||||
try {
|
||||
$mail->send();
|
||||
$this->view->assign('sendEmail' , true);
|
||||
}
|
||||
catch ( Zend_Mail_Transport_Exception $e ){
|
||||
$message = $e->getMessage();
|
||||
}
|
||||
|
||||
}
|
||||
$this->view->assign('message', $message);
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
@ -1,8 +1,8 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Extranet2.4\n"
|
||||
"POT-Creation-Date: 2013-12-26 11:07+0100\n"
|
||||
"PO-Revision-Date: 2013-12-26 11:18+0100\n"
|
||||
"POT-Creation-Date: 2014-04-24 09:31+0100\n"
|
||||
"PO-Revision-Date: 2014-04-24 09:32+0100\n"
|
||||
"Last-Translator: Michael RICOIS <mricois@scores-decisions.com>\n"
|
||||
"Language-Team: SND-A\n"
|
||||
"Language: en\n"
|
||||
@ -31,80 +31,87 @@ msgstr "News"
|
||||
msgid "Banque de France - "
|
||||
msgstr "BANK OF FRANCE"
|
||||
|
||||
#: application/controllers/DirigeantController.php:23
|
||||
#: application/controllers/DirigeantController.php:27
|
||||
#: application/languages/totranslate.php:20
|
||||
msgid "Liste des dirigeants"
|
||||
msgstr "List of managers"
|
||||
|
||||
#: application/controllers/DirigeantController.php:24
|
||||
#: application/controllers/DirigeantController.php:64
|
||||
#: application/controllers/DirigeantController.php:93
|
||||
#: application/controllers/EvaluationController.php:76
|
||||
#: application/controllers/EvaluationController.php:108
|
||||
#: application/controllers/EvaluationController.php:267
|
||||
#: application/controllers/EvaluationController.php:496
|
||||
#: application/controllers/EvaluationController.php:606
|
||||
#: application/controllers/EvaluationController.php:711
|
||||
#: application/controllers/EvaluationController.php:862
|
||||
#: application/controllers/DirigeantController.php:28
|
||||
#: application/controllers/DirigeantController.php:69
|
||||
#: application/controllers/DirigeantController.php:98
|
||||
#: application/controllers/EvaluationController.php:70
|
||||
#: application/controllers/EvaluationController.php:164
|
||||
#: application/controllers/EvaluationController.php:196
|
||||
#: application/controllers/EvaluationController.php:355
|
||||
#: application/controllers/EvaluationController.php:584
|
||||
#: application/controllers/EvaluationController.php:694
|
||||
#: application/controllers/EvaluationController.php:799
|
||||
#: application/controllers/EvaluationController.php:950
|
||||
#: application/controllers/FinanceController.php:39
|
||||
#: application/controllers/FinanceController.php:215
|
||||
#: application/controllers/FinanceController.php:465
|
||||
#: application/controllers/FinanceController.php:826
|
||||
#: application/controllers/FinanceController.php:972
|
||||
#: application/controllers/FinanceController.php:1014
|
||||
#: application/controllers/FinanceController.php:1035
|
||||
#: application/controllers/FinanceController.php:1279
|
||||
#: application/controllers/FinanceController.php:1304
|
||||
#: application/controllers/IdentiteController.php:1398
|
||||
#: application/controllers/IdentiteController.php:1415
|
||||
#: application/controllers/JuridiqueController.php:224
|
||||
#: application/controllers/JuridiqueController.php:274
|
||||
#: application/controllers/JuridiqueController.php:320
|
||||
#: application/controllers/JuridiqueController.php:341
|
||||
#: application/controllers/FinanceController.php:979
|
||||
#: application/controllers/FinanceController.php:1021
|
||||
#: application/controllers/FinanceController.php:1042
|
||||
#: application/controllers/FinanceController.php:1286
|
||||
#: application/controllers/FinanceController.php:1311
|
||||
#: application/controllers/IdentiteController.php:1476
|
||||
#: application/controllers/IdentiteController.php:1493
|
||||
#: application/controllers/JuridiqueController.php:226
|
||||
#: application/controllers/JuridiqueController.php:276
|
||||
#: application/controllers/JuridiqueController.php:322
|
||||
#: application/controllers/JuridiqueController.php:343
|
||||
msgid "Siret "
|
||||
msgstr "Siret"
|
||||
|
||||
#: application/controllers/DirigeantController.php:63
|
||||
#: application/controllers/DirigeantController.php:68
|
||||
#: application/languages/totranslate.php:21
|
||||
#: application/views/default/scripts/dirigeant/histo.phtml:29
|
||||
msgid "Historique des dirigeants"
|
||||
msgstr "History of Managers"
|
||||
|
||||
#: application/controllers/DirigeantController.php:92
|
||||
#: application/controllers/DirigeantController.php:97
|
||||
msgid "Liste des dirigeants opérationnels"
|
||||
msgstr "List of operational managers"
|
||||
|
||||
#: application/controllers/EvaluationController.php:75
|
||||
#: application/controllers/EvaluationController.php:69
|
||||
#, fuzzy
|
||||
msgid "Historique indiScore"
|
||||
msgstr "INDISCORE"
|
||||
|
||||
#: application/controllers/EvaluationController.php:163
|
||||
#: application/languages/totranslate.php:44
|
||||
#: application/views/default/scripts/evaluation/indiscorehisto.phtml:28
|
||||
msgid "IndiScore"
|
||||
msgstr "IndiScore"
|
||||
|
||||
#: application/controllers/EvaluationController.php:107
|
||||
#: application/controllers/EvaluationController.php:195
|
||||
#: application/languages/totranslate.php:45
|
||||
msgid "Rapport de synthèse"
|
||||
msgstr "Synthesis Report"
|
||||
|
||||
#: application/controllers/EvaluationController.php:266
|
||||
#: application/controllers/EvaluationController.php:354
|
||||
#: application/languages/totranslate.php:46
|
||||
msgid "Rapport complet"
|
||||
msgstr "Full report"
|
||||
|
||||
#: application/controllers/EvaluationController.php:495
|
||||
#: application/controllers/EvaluationController.php:583
|
||||
#, fuzzy
|
||||
msgid "Enquete commerciale"
|
||||
msgstr "Commercial survey"
|
||||
|
||||
#: application/controllers/EvaluationController.php:605
|
||||
#: application/controllers/EvaluationController.php:693
|
||||
#, fuzzy
|
||||
msgid "Avis de crédit"
|
||||
msgstr "Reviews custom credit"
|
||||
|
||||
#: application/controllers/EvaluationController.php:710
|
||||
#: application/controllers/EvaluationController.php:798
|
||||
#: application/languages/totranslate.php:48
|
||||
msgid "Scoring Credit Safe"
|
||||
msgstr "Scoring Credit Safe"
|
||||
|
||||
#: application/controllers/EvaluationController.php:861
|
||||
#: application/controllers/EvaluationController.php:949
|
||||
#: application/languages/totranslate.php:47
|
||||
msgid "Valorisation"
|
||||
msgstr "Valuation"
|
||||
@ -117,7 +124,7 @@ msgstr "Financial situation"
|
||||
#: application/controllers/FinanceController.php:214
|
||||
#, fuzzy
|
||||
msgid "Bilan, Compte de résultat"
|
||||
msgstr "Balances, Income statement"
|
||||
msgstr "Income Statement"
|
||||
|
||||
#: application/controllers/FinanceController.php:464
|
||||
#: application/languages/totranslate.php:25
|
||||
@ -129,37 +136,38 @@ msgstr "Ratios"
|
||||
msgid "Liasse fiscale"
|
||||
msgstr "Tax return"
|
||||
|
||||
#: application/controllers/FinanceController.php:971
|
||||
#: application/controllers/FinanceController.php:978
|
||||
#: application/languages/totranslate.php:28
|
||||
msgid "Bourse & Cotations"
|
||||
msgstr "Purse & Quotes"
|
||||
|
||||
#: application/controllers/FinanceController.php:1013
|
||||
#: application/controllers/FinanceController.php:1020
|
||||
msgid "Relations Banquaires"
|
||||
msgstr "Bank Account"
|
||||
|
||||
#: application/controllers/FinanceController.php:1034
|
||||
#: application/controllers/FinanceController.php:1041
|
||||
#: application/languages/totranslate.php:26
|
||||
msgid "Flux de trésorerie"
|
||||
msgstr "Cash flow"
|
||||
|
||||
#: application/controllers/FinanceController.php:1278
|
||||
#: application/controllers/FinanceController.php:1285
|
||||
msgid "Subventions"
|
||||
msgstr ""
|
||||
|
||||
#: application/controllers/FinanceController.php:1303
|
||||
#: application/controllers/FinanceController.php:1310
|
||||
msgid "Subvention"
|
||||
msgstr ""
|
||||
|
||||
#: application/controllers/IdentiteController.php:52
|
||||
msgid "Identité - "
|
||||
msgstr "Identity -"
|
||||
#: application/controllers/IdentiteController.php:58
|
||||
#, fuzzy
|
||||
msgid "Fiche Identité - "
|
||||
msgstr "See identity card"
|
||||
|
||||
#: application/controllers/IdentiteController.php:203
|
||||
#: application/controllers/IdentiteController.php:202
|
||||
msgid "Fiche procédure collective - "
|
||||
msgstr "Legal review -"
|
||||
|
||||
#: application/controllers/IdentiteController.php:314
|
||||
#: application/controllers/IdentiteController.php:313
|
||||
msgid "Liste des établissements - Siren "
|
||||
msgstr "Branch List - Siren "
|
||||
|
||||
@ -167,41 +175,63 @@ msgstr "Branch List - Siren "
|
||||
msgid "Liens inter-entreprises - Id "
|
||||
msgstr "Associated Links - Id "
|
||||
|
||||
#: application/controllers/IdentiteController.php:599
|
||||
#: application/controllers/IdentiteController.php:607
|
||||
msgid "Liens inter-entreprises - Siren "
|
||||
msgstr "Associated Links - Siren "
|
||||
|
||||
#: application/controllers/IdentiteController.php:976
|
||||
#: application/controllers/IdentiteController.php:1006
|
||||
msgid "Evènements - Siren "
|
||||
msgstr "INSEE events - Siren"
|
||||
|
||||
#: application/controllers/IdentiteController.php:1397
|
||||
#: application/controllers/IdentiteController.php:1475
|
||||
msgid "Groupe"
|
||||
msgstr "Parent Company"
|
||||
|
||||
#: application/controllers/IdentiteController.php:1414
|
||||
#: application/controllers/IdentiteController.php:1492
|
||||
msgid "Contacts"
|
||||
msgstr "Contacts"
|
||||
|
||||
#: application/controllers/JuridiqueController.php:223
|
||||
#: application/controllers/JuridiqueController.php:178
|
||||
#, fuzzy
|
||||
msgid "Annonces Légales - "
|
||||
msgstr "Legal Notices"
|
||||
|
||||
#: application/controllers/JuridiqueController.php:225
|
||||
#, fuzzy
|
||||
msgid "Informations Réglementées"
|
||||
msgstr "Informations"
|
||||
|
||||
#: application/controllers/JuridiqueController.php:273
|
||||
#: application/controllers/JuridiqueController.php:275
|
||||
#: application/languages/totranslate.php:33
|
||||
msgid "Compétences Territoriales"
|
||||
msgstr "Territorial competences"
|
||||
|
||||
#: application/controllers/JuridiqueController.php:319
|
||||
#: application/controllers/JuridiqueController.php:321
|
||||
#, fuzzy
|
||||
msgid "Conventions Collectives"
|
||||
msgstr "Collective agreements"
|
||||
|
||||
#: application/controllers/JuridiqueController.php:340
|
||||
#: application/controllers/JuridiqueController.php:342
|
||||
msgid "Marques Déposées"
|
||||
msgstr "Trademarks"
|
||||
|
||||
#: application/controllers/PiecesController.php:682
|
||||
#, fuzzy
|
||||
msgid "Votre demande de reception de Kbis par email a été prise en compte"
|
||||
msgstr "Receive kbis by email"
|
||||
|
||||
#: application/controllers/PiecesController.php:736
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
"Votre commande à été prise en compte, vous recevrez ce document sous 3/5 "
|
||||
"jours"
|
||||
msgstr "You have been disconnected"
|
||||
|
||||
#: application/controllers/PiecesController.php:743
|
||||
#, fuzzy
|
||||
msgid "Erreur : Tous les champs doivent être renseigner."
|
||||
msgstr "All users"
|
||||
|
||||
#: application/controllers/RechercheController.php:29
|
||||
msgid "Recherche Entreprise"
|
||||
msgstr "Search Company"
|
||||
@ -232,12 +262,36 @@ msgstr "List of recent searches"
|
||||
msgid "Enquête"
|
||||
msgstr "Investigation"
|
||||
|
||||
#: application/controllers/SaisieController.php:134
|
||||
#: application/controllers/SaisieController.php:1961
|
||||
#: application/controllers/SaisieController.php:333
|
||||
#: application/controllers/SaisieController.php:2162
|
||||
msgid "Saisie - "
|
||||
msgstr "Edit - "
|
||||
|
||||
#: application/controllers/UserController.php:346
|
||||
#: application/controllers/SaisieController.php:2648
|
||||
#, fuzzy
|
||||
msgid "Ajout"
|
||||
msgstr "Add the"
|
||||
|
||||
#: application/controllers/SaisieController.php:2650
|
||||
msgid "Edition"
|
||||
msgstr "Edit"
|
||||
|
||||
#: application/controllers/SaisieController.php:2652
|
||||
#, fuzzy
|
||||
msgid "Suppression"
|
||||
msgstr "Print"
|
||||
|
||||
#: application/controllers/SaisieController.php:2658
|
||||
#, fuzzy
|
||||
msgid "a été réussi!"
|
||||
msgstr "You have been disconnected"
|
||||
|
||||
#: application/controllers/SaisieController.php:2660
|
||||
#, fuzzy
|
||||
msgid "n'a pas été réussi!"
|
||||
msgstr "You have been disconnected"
|
||||
|
||||
#: application/controllers/UserController.php:395
|
||||
msgid "Connexion"
|
||||
msgstr "Connextion"
|
||||
|
||||
@ -493,13 +547,13 @@ msgstr "Siren identification number"
|
||||
msgid "Dénomination Sociale"
|
||||
msgstr "Company Name"
|
||||
|
||||
#: application/views/default/scripts/dirigeant/histo.phtml:40
|
||||
#: application/views/default/scripts/dirigeant/histo.phtml:41
|
||||
msgid "Modification le"
|
||||
msgstr "Change done the"
|
||||
|
||||
#: application/views/default/scripts/dirigeant/histo.phtml:58
|
||||
#: application/views/default/scripts/dirigeant/histo.phtml:51
|
||||
#: application/views/default/scripts/dirigeant/liste.phtml:119
|
||||
#: application/views/default/scripts/dirigeant/op.phtml:86
|
||||
#: application/views/default/scripts/dirigeant/op.phtml:130
|
||||
msgid "Aucune donnée n'est présente dans notre base"
|
||||
msgstr "No data is present in our database"
|
||||
|
||||
@ -517,7 +571,7 @@ msgid "Recherche à partir de la dénomination sociale"
|
||||
msgstr "Search from the company name"
|
||||
|
||||
#: application/views/default/scripts/dirigeant/liste.phtml:70
|
||||
#: application/views/default/scripts/dirigeant/op.phtml:62
|
||||
#: application/views/default/scripts/dirigeant/op.phtml:65
|
||||
msgid "Recherche à partir du nom du dirigeant"
|
||||
msgstr "Search from the name of manager"
|
||||
|
||||
@ -533,18 +587,86 @@ msgstr "Add a shareholder"
|
||||
msgid "DIRIGEANTS OPÉRATIONNELS"
|
||||
msgstr "OPERATIONAL MANAGERS"
|
||||
|
||||
#: application/views/default/scripts/dirigeant/op.phtml:50
|
||||
#: application/views/default/scripts/dirigeant/op.phtml:38
|
||||
#, fuzzy
|
||||
msgid "Ajouter un dirigeant"
|
||||
msgstr "Add a shareholder"
|
||||
|
||||
#: application/views/default/scripts/dirigeant/op.phtml:53
|
||||
msgid "Recherche à partir de la Dénomination sociale"
|
||||
msgstr "Search from the Companyname"
|
||||
|
||||
#: application/views/default/scripts/dirigeant/op.phtml:69
|
||||
#: application/views/default/scripts/dirigeant/op.phtml:74
|
||||
msgid "né(e) le"
|
||||
#: application/views/default/scripts/dirigeant/op.phtml:75
|
||||
#: application/views/default/scripts/identite/lienfiche.phtml:21
|
||||
#, fuzzy
|
||||
msgid "le"
|
||||
msgstr "Add the"
|
||||
|
||||
#: application/views/default/scripts/dirigeant/op.phtml:79
|
||||
#: application/views/default/scripts/identite/lienfiche.phtml:25
|
||||
#, fuzzy
|
||||
msgid "à"
|
||||
msgstr "Born in"
|
||||
|
||||
#: application/views/default/scripts/dirigeant/op.phtml:84
|
||||
#, fuzzy
|
||||
msgid "né(e)"
|
||||
msgstr "Born in"
|
||||
|
||||
#: application/views/default/scripts/dirigeant/op.phtml:86
|
||||
#, fuzzy
|
||||
msgid "né"
|
||||
msgstr "Born in"
|
||||
|
||||
#: application/views/default/scripts/dirigeant/op.phtml:88
|
||||
#, fuzzy
|
||||
msgid "née"
|
||||
msgstr "born the"
|
||||
|
||||
#: application/views/default/scripts/dirigeant/op.phtml:76
|
||||
msgid "né(e) à"
|
||||
msgstr "born in"
|
||||
#: application/views/default/scripts/evaluation/indiscore.phtml:41
|
||||
#, fuzzy
|
||||
msgid "Consulter l'historique des IndiScore"
|
||||
msgstr "Check the list of operational managers"
|
||||
|
||||
#: application/views/default/scripts/evaluation/indiscorehisto.phtml:3
|
||||
#, fuzzy
|
||||
msgid "HISTORIQUE INDISCORE"
|
||||
msgstr "INDISCORE"
|
||||
|
||||
#: application/views/default/scripts/evaluation/indiscorehisto.phtml:8
|
||||
#, fuzzy
|
||||
msgid "Numéro identifiant Siren"
|
||||
msgstr "Siret identification number"
|
||||
|
||||
#: application/views/default/scripts/evaluation/indiscorehisto.phtml:13
|
||||
#, fuzzy
|
||||
msgid "Dénomination sociale"
|
||||
msgstr "Company Name"
|
||||
|
||||
#: application/views/default/scripts/evaluation/indiscorehisto.phtml:19
|
||||
#, fuzzy
|
||||
msgid "Historique des scores"
|
||||
msgstr "History of bodacc announces"
|
||||
|
||||
#: application/views/default/scripts/evaluation/indiscorehisto.phtml:27
|
||||
#, fuzzy
|
||||
msgid "Date"
|
||||
msgstr "Registration date"
|
||||
|
||||
#: application/views/default/scripts/evaluation/indiscorehisto.phtml:29
|
||||
#, fuzzy
|
||||
msgid "Motif du changement"
|
||||
msgstr "Search from the name of manager"
|
||||
|
||||
#: application/views/default/scripts/evaluation/indiscorehisto.phtml:51
|
||||
#, fuzzy
|
||||
msgid "Impossible de générer le graphique"
|
||||
msgstr "Modify password"
|
||||
|
||||
#: application/views/default/scripts/evaluation/indiscorehisto.phtml:58
|
||||
#, fuzzy
|
||||
msgid "Aucune information sur l'historique disponible."
|
||||
msgstr "No IP"
|
||||
|
||||
#: application/views/default/scripts/identite/etablissements.phtml:2
|
||||
msgid "LISTE DES ÉTABLISSEMNTS"
|
||||
@ -578,7 +700,7 @@ msgstr "Inactive"
|
||||
msgid "Tous"
|
||||
msgstr "All"
|
||||
|
||||
#: application/views/default/scripts/identite/etablissements.phtml:75
|
||||
#: application/views/default/scripts/identite/etablissements.phtml:69
|
||||
msgid "Voir la fiche d'identité"
|
||||
msgstr "See the copany identity"
|
||||
|
||||
@ -598,6 +720,134 @@ msgstr "Company name & Contacts"
|
||||
msgid "Activité(s) & Chiffre d'affaires"
|
||||
msgstr "Activities & Turnover"
|
||||
|
||||
#: application/views/default/scripts/identite/lienfiche.phtml:30
|
||||
#, fuzzy
|
||||
msgid "Né(e)"
|
||||
msgstr "Born in"
|
||||
|
||||
#: application/views/default/scripts/identite/lienfiche.phtml:32
|
||||
#, fuzzy
|
||||
msgid "Né"
|
||||
msgstr "Born in"
|
||||
|
||||
#: application/views/default/scripts/identite/lienfiche.phtml:34
|
||||
#, fuzzy
|
||||
msgid "Née"
|
||||
msgstr "None"
|
||||
|
||||
#: application/views/default/scripts/pieces/commande.phtml:39
|
||||
#, fuzzy
|
||||
msgid "K-Bis inexistant pour cette forme juridique"
|
||||
msgstr "Legal form"
|
||||
|
||||
#: application/views/default/scripts/pieces/commande.phtml:46
|
||||
#, fuzzy
|
||||
msgid "Visualiser/Télécharger le kbis"
|
||||
msgstr "Receive kbis by email"
|
||||
|
||||
#: application/views/default/scripts/pieces/commande.phtml:59
|
||||
msgid "Recevoir le kbis par email"
|
||||
msgstr "Receive kbis by email"
|
||||
|
||||
#: application/views/default/scripts/pieces/commande.phtml:60
|
||||
msgid "Recevoir le kbis original par courrier"
|
||||
msgstr "Receive the original kbis by mail"
|
||||
|
||||
#: application/views/default/scripts/pieces/commande.phtml:62
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
"Les pièces demandées seront commandées par courrier auprès du greffe. "
|
||||
"Prévoir un délai de 2 à 3 semaines."
|
||||
msgstr "Receive the original kbis by mail"
|
||||
|
||||
#: application/views/default/scripts/pieces/commande.phtml:72
|
||||
#: application/views/default/scripts/pieces/commande.phtml:104
|
||||
#, fuzzy
|
||||
msgid "Commande de KBIS demandé pour la société"
|
||||
msgstr "SOCIETY"
|
||||
|
||||
#: application/views/default/scripts/pieces/commande.phtml:73
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
"Vous recevrez un email (sous 3/5 jours ouvrés) lorsque le document sera "
|
||||
"disponible."
|
||||
msgstr "Link a document"
|
||||
|
||||
#: application/views/default/scripts/pieces/commande.phtml:77
|
||||
#: application/views/default/scripts/pieces/commande.phtml:108
|
||||
#, fuzzy
|
||||
msgid "Votre email"
|
||||
msgstr "Receive kbis by email"
|
||||
|
||||
#: application/views/default/scripts/pieces/commande.phtml:84
|
||||
#: application/views/default/scripts/pieces/commande.phtml:114
|
||||
#, fuzzy
|
||||
msgid "Votre référence"
|
||||
msgstr "Your Reference"
|
||||
|
||||
#: application/views/default/scripts/pieces/commande.phtml:87
|
||||
#: application/views/default/scripts/pieces/commande.phtml:116
|
||||
msgid "(facultatif)"
|
||||
msgstr ""
|
||||
|
||||
#: application/views/default/scripts/pieces/commande.phtml:92
|
||||
#: application/views/default/scripts/pieces/commande.phtml:144
|
||||
msgid "Valider"
|
||||
msgstr "Validate"
|
||||
|
||||
#: application/views/default/scripts/pieces/commande.phtml:96
|
||||
#, fuzzy
|
||||
msgid "Commande impossible. L'email de votre compte est invalide."
|
||||
msgstr "Exporting your portfolio"
|
||||
|
||||
#: application/views/default/scripts/pieces/commande.phtml:105
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
"Vous recevrez un email (sous 2 à 3 semaines) lorsque le document sera "
|
||||
"disponible."
|
||||
msgstr "Link a document"
|
||||
|
||||
#: application/views/default/scripts/pieces/commande.phtml:119
|
||||
#, fuzzy
|
||||
msgid "Votre Societe"
|
||||
msgstr "Your profile"
|
||||
|
||||
#: application/views/default/scripts/pieces/commande.phtml:123
|
||||
#, fuzzy
|
||||
msgid "Votre Nom"
|
||||
msgstr "Last name"
|
||||
|
||||
#: application/views/default/scripts/pieces/commande.phtml:127
|
||||
#, fuzzy
|
||||
msgid "Votre Prenom"
|
||||
msgstr "Your profile"
|
||||
|
||||
#: application/views/default/scripts/pieces/commande.phtml:131
|
||||
#, fuzzy
|
||||
msgid "Votre Adresse"
|
||||
msgstr "Address"
|
||||
|
||||
#: application/views/default/scripts/pieces/commande.phtml:135
|
||||
#, fuzzy
|
||||
msgid "Votre Code Postal"
|
||||
msgstr "Code :"
|
||||
|
||||
#: application/views/default/scripts/pieces/commande.phtml:139
|
||||
#, fuzzy
|
||||
msgid "Votre Ville"
|
||||
msgstr "City"
|
||||
|
||||
#: application/views/default/scripts/pieces/commande.phtml:148
|
||||
#, fuzzy
|
||||
msgid "Commande impossible. L'email de votre compte est invalide"
|
||||
msgstr "Exporting your portfolio"
|
||||
|
||||
#: application/views/default/scripts/pieces/commande.phtml:157
|
||||
#: application/views/default/scripts/pieces/commande.phtml:226
|
||||
#, fuzzy
|
||||
msgid "Vous n'avez pas les droits d'accès pour cette fonctionalité."
|
||||
msgstr "Permissions"
|
||||
|
||||
#: application/views/default/scripts/recherche/actionnaire.phtml:6
|
||||
msgid "RECHERCHE PAR ACTIONNAIRE"
|
||||
msgstr "SEARCH BY SHAREHOLDER"
|
||||
@ -617,20 +867,82 @@ msgstr "SEARCH A COMPANY"
|
||||
#: application/views/default/scripts/recherche/refclient.phtml:1
|
||||
#, fuzzy
|
||||
msgid "RECHERCHE SURVEILLANCE"
|
||||
msgstr "Search"
|
||||
msgstr "Monitoring"
|
||||
|
||||
#: application/views/default/scripts/recherche/worldcheck.phtml:4
|
||||
#, fuzzy
|
||||
msgid "RECHERCHE WORLDCHECK"
|
||||
msgstr "Search in WorldCheck"
|
||||
|
||||
#: application/views/default/scripts/user/login.phtml:613
|
||||
#: application/views/default/scripts/user/login.phtml:614
|
||||
#: application/views/default/scripts/saisie/diropcontrol-form.phtml:10
|
||||
#, fuzzy
|
||||
msgid "Civilité"
|
||||
msgstr "Solvency :"
|
||||
|
||||
#: application/views/default/scripts/saisie/diropcontrol-form.phtml:23
|
||||
msgid "Nom"
|
||||
msgstr "Last name"
|
||||
|
||||
#: application/views/default/scripts/saisie/diropcontrol-form.phtml:30
|
||||
msgid "Prenom"
|
||||
msgstr ""
|
||||
|
||||
#: application/views/default/scripts/saisie/diropcontrol-form.phtml:37
|
||||
#, fuzzy
|
||||
msgid "Nom d'usage"
|
||||
msgstr "Last name"
|
||||
|
||||
#: application/views/default/scripts/saisie/diropcontrol-form.phtml:44
|
||||
#, fuzzy
|
||||
msgid "Fonction"
|
||||
msgstr "Constructions"
|
||||
|
||||
#: application/views/default/scripts/saisie/diropcontrol-form.phtml:56
|
||||
#, fuzzy
|
||||
msgid "Date de naissance"
|
||||
msgstr "Closing date"
|
||||
|
||||
#: application/views/default/scripts/saisie/diropcontrol-form.phtml:69
|
||||
#, fuzzy
|
||||
msgid "Lieu de naissance"
|
||||
msgstr "Intracom VAT number."
|
||||
|
||||
#: application/views/default/scripts/saisie/diropcontrol-form.phtml:76
|
||||
msgid "Téléphone"
|
||||
msgstr "Telephone"
|
||||
|
||||
#: application/views/default/scripts/saisie/diropcontrol-form.phtml:83
|
||||
#, fuzzy
|
||||
msgid "Télécopie"
|
||||
msgstr "Telephone"
|
||||
|
||||
#: application/views/default/scripts/saisie/diropcontrol-form.phtml:90
|
||||
#, fuzzy
|
||||
msgid "Email"
|
||||
msgstr "Receive kbis by email"
|
||||
|
||||
#: application/views/default/scripts/saisie/diropcontrol.phtml:9
|
||||
#, fuzzy
|
||||
msgid "Ajouter un dirigeant opérationnel"
|
||||
msgstr "Add a shareholder"
|
||||
|
||||
#: application/views/default/scripts/saisie/diropcontrol.phtml:12
|
||||
#, fuzzy
|
||||
msgid "Modifier le dirigeant opérationnel"
|
||||
msgstr "Modify password"
|
||||
|
||||
#: application/views/default/scripts/saisie/diropcontrol.phtml:15
|
||||
#, fuzzy
|
||||
msgid "Supprimer le dirigeant opérationnel"
|
||||
msgstr "Search a Manager"
|
||||
|
||||
#: application/views/default/scripts/user/login.phtml:30
|
||||
#: application/views/default/scripts/user/login.phtml:31
|
||||
msgid "Identifiants oubliés ?"
|
||||
msgstr "Forgotten you login ?"
|
||||
|
||||
#: application/views/default/scripts/user/logout.phtml:3
|
||||
#: application/views/default/scripts/user/logout.phtml:16
|
||||
#: application/views/default/scripts/user/logout.phtml:21
|
||||
msgid "Vous avez été déconnecté."
|
||||
msgstr "You have been disconnected"
|
||||
|
||||
@ -639,16 +951,21 @@ msgid "Veuillez cliquer"
|
||||
msgstr "Click"
|
||||
|
||||
#: application/views/default/scripts/user/logout.phtml:4
|
||||
#: application/views/default/scripts/user/logout.phtml:20
|
||||
#: application/views/default/scripts/user/logout.phtml:25
|
||||
msgid "ici"
|
||||
msgstr "here"
|
||||
|
||||
#: application/views/default/scripts/user/logout.phtml:20
|
||||
#: application/views/default/scripts/user/logout.phtml:24
|
||||
#, fuzzy, php-format
|
||||
msgid "Si cette page ne disparait pas au bout de %1$s seconde(s)"
|
||||
msgstr "If this page does not disappear after 5 second(s), please click"
|
||||
|
||||
#: application/views/default/scripts/user/logout.phtml:25
|
||||
msgid "veuillez cliquer "
|
||||
msgstr "click"
|
||||
|
||||
#~ msgid "Numéro identifiant Siret"
|
||||
#~ msgstr "Siret identification number"
|
||||
#~ msgid "né(e) à"
|
||||
#~ msgstr "born in"
|
||||
|
||||
#~ msgid "Numéro de TVA Intracom."
|
||||
#~ msgstr "Intracom VAT number."
|
||||
@ -681,12 +998,6 @@ msgstr "click"
|
||||
#~ msgid "Création de l'établissement"
|
||||
#~ msgstr "Creation of the establishment"
|
||||
|
||||
#~ msgid "Adresse"
|
||||
#~ msgstr "Address"
|
||||
|
||||
#~ msgid "Téléphone"
|
||||
#~ msgstr "Telephone"
|
||||
|
||||
#~ msgid "Fax"
|
||||
#~ msgstr "FAX"
|
||||
|
||||
@ -916,9 +1227,6 @@ msgstr "click"
|
||||
#~ msgid "ISIN"
|
||||
#~ msgstr "ISIN"
|
||||
|
||||
#~ msgid "Nom du groupe"
|
||||
#~ msgstr "Group name"
|
||||
|
||||
#~ msgid "Sigle"
|
||||
#~ msgstr "Acronym"
|
||||
|
||||
@ -1183,9 +1491,6 @@ msgstr "click"
|
||||
#~ msgid "Avances et acomptes sur immo. incorp."
|
||||
#~ msgstr "Scores and outstandings"
|
||||
|
||||
#~ msgid "Constructions"
|
||||
#~ msgstr "Constructions"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Instal. techniques, ..."
|
||||
#~ msgstr "Technical or commercial disputes"
|
||||
@ -1394,9 +1699,6 @@ msgstr "click"
|
||||
#~ msgid "Dépôt"
|
||||
#~ msgstr "Deposit"
|
||||
|
||||
#~ msgid "INDISCORE"
|
||||
#~ msgstr "INDISCORE"
|
||||
|
||||
#~ msgid "Définir un Cut-off"
|
||||
#~ msgstr "Define a Cut-off"
|
||||
|
||||
@ -1429,9 +1731,6 @@ msgstr "click"
|
||||
#~ msgid "L'étude de la dirigeance ne relève aucun problème."
|
||||
#~ msgstr "Managers :"
|
||||
|
||||
#~ msgid "Solvabilité :"
|
||||
#~ msgstr "Solvency :"
|
||||
|
||||
#~ msgid "L'analyse de la solvabilité est Bonne"
|
||||
#~ msgstr "The solvency analysis is Good"
|
||||
|
||||
@ -1575,9 +1874,6 @@ msgstr "click"
|
||||
#~ msgid "Autre téléphone"
|
||||
#~ msgstr "Other telephone"
|
||||
|
||||
#~ msgid "E-mail"
|
||||
#~ msgstr "E-mail"
|
||||
|
||||
#~ msgid "Autre e-mail"
|
||||
#~ msgstr "Other e-mail"
|
||||
|
||||
@ -1601,9 +1897,6 @@ msgstr "click"
|
||||
#~ msgid "Demandeur"
|
||||
#~ msgstr "Applicant"
|
||||
|
||||
#~ msgid "Votre profil"
|
||||
#~ msgstr "Your profile"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Votre Identité"
|
||||
#~ msgstr "Identity -"
|
||||
@ -1614,12 +1907,6 @@ msgstr "click"
|
||||
#~ msgid "Votre Fax"
|
||||
#~ msgstr "Your fax"
|
||||
|
||||
#~ msgid "Votre E-mail"
|
||||
#~ msgstr "Your E-mail"
|
||||
|
||||
#~ msgid "Votre Référence"
|
||||
#~ msgstr "Your Reference"
|
||||
|
||||
#~ msgid "Service Achats"
|
||||
#~ msgstr "Purchasing Service"
|
||||
|
||||
@ -1708,16 +1995,6 @@ msgstr "click"
|
||||
#~ msgid "EXTRAIT KBIS"
|
||||
#~ msgstr "Monitoring of kbis commands"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Visualiser/Télécharger le kbis"
|
||||
#~ msgstr "Receive kbis by email"
|
||||
|
||||
#~ msgid "Recevoir le kbis par email"
|
||||
#~ msgstr "Receive kbis by email"
|
||||
|
||||
#~ msgid "Recevoir le kbis original par courrier"
|
||||
#~ msgstr "Receive the original kbis by mail"
|
||||
|
||||
#~ msgid "PRIVILÉGES & NANTISSEMENTS"
|
||||
#~ msgstr "PRIVILEGES AND PLEDGES"
|
||||
|
||||
@ -1876,9 +2153,6 @@ msgstr "click"
|
||||
#~ msgid "Navigateur actuel"
|
||||
#~ msgstr "Actual browser"
|
||||
|
||||
#~ msgid "Poste de travail"
|
||||
#~ msgstr "Workplace"
|
||||
|
||||
#~ msgid "Moteur de recherche"
|
||||
#~ msgstr "Search engine"
|
||||
|
||||
@ -1997,12 +2271,6 @@ msgstr "click"
|
||||
#~ msgid "Date d'envoi"
|
||||
#~ msgstr "Sending date"
|
||||
|
||||
#~ msgid "Liste des surveillances"
|
||||
#~ msgstr "List of monitorings"
|
||||
|
||||
#~ msgid "Ajout le"
|
||||
#~ msgstr "Add the"
|
||||
|
||||
#~ msgid "Envoyé le"
|
||||
#~ msgstr "Sent at"
|
||||
|
||||
@ -2051,10 +2319,6 @@ msgstr "click"
|
||||
#~ msgid "Mode Edition"
|
||||
#~ msgstr "Edit mode"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "Si cette page ne disparait pas au bout de 5 seconde(s), veuillez cliquer"
|
||||
#~ msgstr "If this page does not disappear after 5 second(s), please click"
|
||||
|
||||
#~ msgid "Gestion Système"
|
||||
#~ msgstr "Management System"
|
||||
|
||||
@ -2172,9 +2436,6 @@ msgstr "click"
|
||||
#~ msgid "Liste des clients"
|
||||
#~ msgstr "List of customers"
|
||||
|
||||
#~ msgid "Nom"
|
||||
#~ msgstr "Last name"
|
||||
|
||||
#~ msgid "Editer"
|
||||
#~ msgstr "Edit"
|
||||
|
||||
@ -2211,9 +2472,6 @@ msgstr "click"
|
||||
#~ msgid "Racine des identifiants"
|
||||
#~ msgstr "Root of your login"
|
||||
|
||||
#~ msgid "Date de signature"
|
||||
#~ msgstr "Signature date"
|
||||
|
||||
#~ msgid "(AAAA-MM-YY)"
|
||||
#~ msgstr "(YYYY-MM-DD)"
|
||||
|
||||
@ -2547,15 +2805,9 @@ msgstr "click"
|
||||
#~ msgid "Non"
|
||||
#~ msgstr "No"
|
||||
|
||||
#~ msgid "Edition"
|
||||
#~ msgstr "Edit"
|
||||
|
||||
#~ msgid "Mettre sous surveillance"
|
||||
#~ msgstr "Put under surveillance"
|
||||
|
||||
#~ msgid "Néant"
|
||||
#~ msgstr "None"
|
||||
|
||||
#~ msgid "Aucune information"
|
||||
#~ msgstr "No information"
|
||||
|
||||
@ -2571,9 +2823,6 @@ msgstr "click"
|
||||
#~ msgid "Modifier le client"
|
||||
#~ msgstr "Modify a customer"
|
||||
|
||||
#~ msgid "Valider"
|
||||
#~ msgstr "Validate"
|
||||
|
||||
#~ msgid "Scores & Decisions SAS - Tous droits réservés - "
|
||||
#~ msgstr "Scores & Decisions SAS - All rights reserved - "
|
||||
|
||||
|
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>
|
@ -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);
|
||||
@ -49,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();
|
||||
@ -60,7 +80,7 @@ class AideController extends Zend_Controller_Action
|
||||
require_once 'Scores/WsScores.php';
|
||||
$ws = new WsScores();
|
||||
$accept = $ws->setCGU();
|
||||
Zend_Registry::get('firebug')->info($accept);
|
||||
$this->logger->info($accept);
|
||||
if ($accept) {
|
||||
//Put in session
|
||||
$auth = Zend_Auth::getInstance();
|
||||
@ -74,6 +94,10 @@ class AideController extends Zend_Controller_Action
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Afficher des propriétés du navigateur
|
||||
* Compatibilités et version
|
||||
*/
|
||||
public function navinfoAction()
|
||||
{
|
||||
$bootstrap = $this->getInvokeArg('bootstrap');
|
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,6 +1,23 @@
|
||||
<?php
|
||||
class BdfController extends Zend_Controller_Action
|
||||
{
|
||||
protected $theme;
|
||||
|
||||
/**
|
||||
* Logger
|
||||
* @var \Monolog\Logger
|
||||
*/
|
||||
protected $logger;
|
||||
|
||||
public function init()
|
||||
{
|
||||
if (Zend_Registry::isRegistered('logger')) {
|
||||
$this->logger = Zend_Registry::get('logger');
|
||||
}
|
||||
|
||||
// --- Theme
|
||||
$this->theme = Zend_Registry::get('theme');
|
||||
}
|
||||
|
||||
public function indexAction()
|
||||
{
|
||||
@ -76,7 +93,7 @@ class BdfController extends Zend_Controller_Action
|
||||
$req = substr($siret, 0, 9);
|
||||
}
|
||||
|
||||
Zend_Registry::get('firebug')->info($module);
|
||||
$this->logger->info($module);
|
||||
|
||||
$content = array();
|
||||
|
@ -1,7 +1,9 @@
|
||||
<?php
|
||||
class DashboardController extends Zend_Controller_Action
|
||||
{
|
||||
protected $typeActes= array(
|
||||
protected $theme;
|
||||
|
||||
protected $typeActes= array(
|
||||
'a00' => 'MODIFICATION',
|
||||
'a01' => 'MODIFICATION',
|
||||
'a02' => 'DISSOLUTION',
|
||||
@ -99,6 +101,12 @@ class DashboardController extends Zend_Controller_Action
|
||||
'aUA' => 'ATTESTATION DU CONJOINT COMMUN EN BIENS',
|
||||
);
|
||||
|
||||
/**
|
||||
* Logger
|
||||
* @var \Monolog\Logger
|
||||
*/
|
||||
protected $logger;
|
||||
|
||||
/**
|
||||
* Return a ramdom password
|
||||
* @param int $length
|
||||
@ -126,6 +134,13 @@ class DashboardController extends Zend_Controller_Action
|
||||
|
||||
public function init()
|
||||
{
|
||||
if (Zend_Registry::isRegistered('logger')) {
|
||||
$this->logger = Zend_Registry::get('logger');
|
||||
}
|
||||
|
||||
// --- Theme
|
||||
$this->theme = Zend_Registry::get('theme');
|
||||
|
||||
require_once 'Scores/WsScores.php';
|
||||
}
|
||||
|
||||
@ -172,7 +187,7 @@ class DashboardController extends Zend_Controller_Action
|
||||
*/
|
||||
protected function statChart($data, $labels, $name)
|
||||
{
|
||||
require_once("Vendors/ChartDirector/phpchartdir.php");
|
||||
require_once 'ChartDirector/phpchartdir.php';
|
||||
|
||||
$hChart = 210;
|
||||
|
||||
@ -238,7 +253,7 @@ class DashboardController extends Zend_Controller_Action
|
||||
*/
|
||||
public function commandesAction()
|
||||
{
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/dashboard.js', 'text/javascript');
|
||||
$this->view->headScript()->appendFile($this->theme->pathScript.'/dashboard.js', 'text/javascript');
|
||||
|
||||
$request = $this->getRequest();
|
||||
$type = $request->getParam('type', '');
|
||||
@ -441,7 +456,7 @@ class DashboardController extends Zend_Controller_Action
|
||||
}
|
||||
|
||||
$c = Zend_Registry::get('config');
|
||||
$refFile = realpath($c->profil->path->data).'/pdf/acte-'.
|
||||
$refFile = $c->profil->path->shared.'/pdf/acte-'.
|
||||
$listCommandes[$i]->siren.'-'.
|
||||
trim($listCommandes[$i]->refDocument).'.pdf';
|
||||
|
||||
@ -456,7 +471,7 @@ class DashboardController extends Zend_Controller_Action
|
||||
'controller' => 'pieces',
|
||||
'action' => 'actes',
|
||||
'siret' => $listCommandes[$i]->siren,
|
||||
), null, true);
|
||||
), 'default', true);
|
||||
|
||||
} elseif (preg_match('/^([0-9]{4}).*?$/', $listCommandes[$i]->refDocument, $matches)){
|
||||
|
||||
@ -475,7 +490,7 @@ class DashboardController extends Zend_Controller_Action
|
||||
'controller' => 'pieces',
|
||||
'action' => 'bilans',
|
||||
'siret' => $listCommandes[$i]->siren,
|
||||
), null, true);
|
||||
), 'default', true);
|
||||
|
||||
}
|
||||
break;
|
||||
@ -568,8 +583,7 @@ class DashboardController extends Zend_Controller_Action
|
||||
$this->_forward('perms', 'error');
|
||||
}
|
||||
|
||||
$this->view->headScript()
|
||||
->appendFile('/themes/default/scripts/dashboard.js', 'text/javascript');
|
||||
$this->view->headScript()->appendFile($this->theme->pathScript.'/dashboard.js', 'text/javascript');
|
||||
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getListeClients();
|
||||
@ -632,16 +646,16 @@ class DashboardController extends Zend_Controller_Action
|
||||
$request = $this->getRequest();
|
||||
$infos = $request->getParams();
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->setClient($infos);
|
||||
if ($reponse->error->errnum==1) {
|
||||
$this->_forward('client', 'dashboard', null, array('idClient' => $infos['idClient']));
|
||||
$response = $ws->setClient($infos);
|
||||
if (is_string($response) || $response === false) {
|
||||
$this->forward('client', 'dashboard', 'default', array('idClient' => $infos['idClient']));
|
||||
}
|
||||
$this->view->assign('infos', $request->getParams());
|
||||
}
|
||||
|
||||
public function usersAction()
|
||||
{
|
||||
$this->view->headLink()->appendStylesheet('/themes/default/styles/user.css', 'all');
|
||||
$this->view->headLink()->appendStylesheet($this->theme->pathStyle.'/user.css', 'all');
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
|
||||
@ -658,20 +672,9 @@ class DashboardController extends Zend_Controller_Action
|
||||
|
||||
$ws = new WsScores();
|
||||
|
||||
$services = $ws->getServices($idClient);
|
||||
if (is_array($services)) {
|
||||
$this->view->assign('services', $services->item);
|
||||
} else {
|
||||
$this->view->assign('services', array());
|
||||
}
|
||||
if ( null === $service ) {
|
||||
$infos = $ws->getListeUtilisateurs($user->getLogin(), $idClient);
|
||||
$utilisateurs = $infos->result->item;
|
||||
} else {
|
||||
$infos = $ws->getServiceUsers($idClient, $service);
|
||||
$utilisateurs = $infos->item;
|
||||
$this->view->assign('service', $service);
|
||||
}
|
||||
$this->view->assign('services', array());
|
||||
$infos = $ws->getListeUtilisateurs($user->getLogin(), $idClient);
|
||||
$utilisateurs = $infos->result->item;
|
||||
|
||||
$this->view->assign('utilisateurs', $utilisateurs);
|
||||
$this->view->assign('idClient', $idClient);
|
||||
@ -679,10 +682,8 @@ class DashboardController extends Zend_Controller_Action
|
||||
|
||||
public function userAction()
|
||||
{
|
||||
$this->view->headLink()
|
||||
->appendStylesheet('/themes/default/styles/user.css', 'all')
|
||||
->appendStylesheet('/themes/default/styles/form.css', 'all');
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/user.js', 'text/javascript');
|
||||
$this->view->headLink()->appendStylesheet($this->theme->pathStyle.'/user.css', 'all');
|
||||
$this->view->headScript()->appendFile($this->theme->pathScript.'/user.js', 'text/javascript');
|
||||
|
||||
$request = $this->getRequest();
|
||||
|
||||
@ -791,7 +792,7 @@ class DashboardController extends Zend_Controller_Action
|
||||
$user = $ws->getUser($login);
|
||||
$options = json_decode($user, true);
|
||||
|
||||
Zend_Registry::get('firebug')->info($user);
|
||||
$this->logger->info(print_r($user,1));
|
||||
|
||||
$this->view->assign('droits', explode(' ',$options['droits']));
|
||||
$this->view->assign('prefs', explode(' ',$options['pref']));
|
||||
@ -877,7 +878,7 @@ class DashboardController extends Zend_Controller_Action
|
||||
}
|
||||
}
|
||||
|
||||
Zend_Registry::get('firebug')->info($output);
|
||||
$this->logger->info(print_r($output,1));
|
||||
|
||||
$this->view->assign('output', $output);
|
||||
}
|
||||
@ -900,7 +901,7 @@ class DashboardController extends Zend_Controller_Action
|
||||
|
||||
if ( isset($_FILES) && count($_FILES)==1 ) {
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->data).'/nouveautes';
|
||||
$path = $c->profil->path->shared.'/persist/nouveautes';
|
||||
if(!file_exists($path)) mkdir($path);
|
||||
|
||||
$tmp_name = $_FILES['fichier']['tmp_name'];
|
||||
@ -992,7 +993,7 @@ class DashboardController extends Zend_Controller_Action
|
||||
|
||||
//Liste des periodes de facturation
|
||||
$contrats = $ws->getClientTarifs($idClient);
|
||||
Zend_Registry::get('firebug')->info($contrats);
|
||||
$this->logger->info(print_r($contrats,1));
|
||||
$this->view->assign('contrats', $contrats->item);
|
||||
|
||||
//Liste des services
|
@ -1,11 +1,25 @@
|
||||
<?php
|
||||
class DirigeantController extends Zend_Controller_Action
|
||||
{
|
||||
protected $siret;
|
||||
protected $theme;
|
||||
protected $siret;
|
||||
protected $id;
|
||||
|
||||
/**
|
||||
* Logger
|
||||
* @var \Monolog\Logger
|
||||
*/
|
||||
protected $logger;
|
||||
|
||||
public function init()
|
||||
{
|
||||
if (Zend_Registry::isRegistered('logger')) {
|
||||
$this->logger = Zend_Registry::get('logger');
|
||||
}
|
||||
|
||||
// --- Theme
|
||||
$this->theme = Zend_Registry::get('theme');
|
||||
|
||||
$request = $this->getRequest();
|
||||
$this->siret = $request->getParam('siret');
|
||||
$this->id = $request->getParam('id', 0);
|
||||
@ -41,7 +55,7 @@ class DirigeantController extends Zend_Controller_Action
|
||||
$session = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
|
||||
if ($user->checkPerm('dirigeantsop')){
|
||||
$href = $this->view->url(array('controller'=>'dirigeant', 'action'=>'op', 'siret'=>$this->siret));
|
||||
$href = $this->view->url(array('controller'=>'dirigeant', 'action'=>'op', 'siret'=>$this->siret), 'default', true);
|
||||
$this->view->assign('dirigeantsop', $href);
|
||||
}
|
||||
|
||||
@ -117,6 +131,8 @@ class DirigeantController extends Zend_Controller_Action
|
||||
$this->view->assign('AutrePage', $this->getRequest()->getParam('apage'));
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
$this->view->assign('accessWorldCheck', $user->checkPerm('WORLDCHECK'));
|
||||
$this->view->assign('surveillance', $user->checkPerm('survdirigeants'));
|
||||
$this->view->assign('edition', $user->checkModeEdition());
|
||||
}
|
||||
}
|
@ -1,7 +1,23 @@
|
||||
<?php
|
||||
class ErrorController extends Zend_Controller_Action
|
||||
{
|
||||
public function init(){}
|
||||
protected $theme;
|
||||
|
||||
/**
|
||||
* Logger
|
||||
* @var \Monolog\Logger
|
||||
*/
|
||||
protected $logger;
|
||||
|
||||
public function init()
|
||||
{
|
||||
if (Zend_Registry::isRegistered('logger')) {
|
||||
$this->logger = Zend_Registry::get('logger');
|
||||
}
|
||||
|
||||
// --- Theme
|
||||
$this->theme = Zend_Registry::get('theme');
|
||||
}
|
||||
|
||||
public function errorAction()
|
||||
{
|
||||
@ -51,12 +67,12 @@ class ErrorController extends Zend_Controller_Action
|
||||
$message.= "Referer : ".$_SERVER['HTTP_REFERER']."\n";
|
||||
|
||||
$c = Zend_Registry::get('config');
|
||||
$mail = new Scores_Mail();
|
||||
$mail = new Scores_Mail_Method();
|
||||
$mail->setSubject('[ERREUR APPLICATIVE] - '.$c->profil->server->name.' -'.date('Ymd'));
|
||||
$mail->setBodyTexte($message);
|
||||
$mail->setFrom('supportdev');
|
||||
$mail->setBodyText($message);
|
||||
$mail->setFromKey('support');
|
||||
$mail->addToKey('supportdev');
|
||||
$mail->send();
|
||||
$mail->execute();
|
||||
}
|
||||
// Log exception, if logger available
|
||||
if ($log = $this->getLog()) {
|
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
@ -1,18 +1,32 @@
|
||||
<?php
|
||||
class FinanceController extends Zend_Controller_Action
|
||||
{
|
||||
protected $theme;
|
||||
protected $siret = null;
|
||||
protected $id = 0;
|
||||
|
||||
/**
|
||||
* Logger
|
||||
* @var \Monolog\Logger
|
||||
*/
|
||||
protected $logger;
|
||||
|
||||
public function init()
|
||||
{
|
||||
if (Zend_Registry::isRegistered('logger')) {
|
||||
$this->logger = Zend_Registry::get('logger');
|
||||
}
|
||||
|
||||
// --- Theme
|
||||
$this->theme = Zend_Registry::get('theme');
|
||||
|
||||
require_once 'Scores/WsScores.php';
|
||||
|
||||
$request = $this->getRequest();
|
||||
$this->siret = $request->getParam('siret');
|
||||
$this->id = $request->getParam('id', 0);
|
||||
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/finance.js', 'text/javascript');
|
||||
$this->view->headScript()->appendFile($this->theme->pathScript.'/finance.js', 'text/javascript');
|
||||
}
|
||||
|
||||
public function indexAction()
|
||||
@ -168,10 +182,10 @@ class FinanceController extends Zend_Controller_Action
|
||||
$request = $this->getRequest();
|
||||
$ratio = $request->getParam('ratio');
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = $c->profil->path->pages . '/imgcache/';
|
||||
$path = $c->profil->path->shared . '/pages/imgcache/';
|
||||
$file = 'syntheseEvol-'.$this->siret.'-'.$this->id.'-'.$ratio.'.png';
|
||||
if (file_exists($path.$file)) {
|
||||
echo '<img src="/fichier/imgcache/'.$file.'" />';
|
||||
echo '<img src="/file/image/cache/q/'.$file.'" />';
|
||||
} else {
|
||||
echo "Erreur de génération du graphique";
|
||||
}
|
||||
@ -187,10 +201,10 @@ class FinanceController extends Zend_Controller_Action
|
||||
$request = $this->getRequest();
|
||||
$typeBilan = $request->getParam('typeBilan');
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = $c->profil->path->pages . '/imgcache/';
|
||||
$path = $c->profil->path->shared . '/pages/imgcache/';
|
||||
$file = 'synthese-linecompare-'.$this->siret.'-'.$this->id.'-'.$typeBilan.'.png';
|
||||
if (file_exists($path.$file)) {
|
||||
echo '<img src="/fichier/imgcache/'.$file.'" />';
|
||||
echo '<img src="/file/image/cache/q/'.$file.'" />';
|
||||
} else {
|
||||
echo "Erreur de génération du graphique";
|
||||
}
|
||||
@ -429,10 +443,8 @@ class FinanceController extends Zend_Controller_Action
|
||||
$typeBilan = $request->getParam('typeBilan');
|
||||
$dateCloture = $request->getParam('dateCloture');
|
||||
|
||||
Zend_Registry::get('firebug')->info($request->getParams());
|
||||
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = $c->profil->path->pages . '/imgcache/';
|
||||
$path = $c->profil->path->shared . '/pages/imgcache/';
|
||||
switch($type){
|
||||
case 'actif':
|
||||
$file = 'bilansgraphactif-'.$this->siret.'-'.$this->id.'-'.$typeBilan.$dateCloture.'.png';
|
||||
@ -445,7 +457,7 @@ class FinanceController extends Zend_Controller_Action
|
||||
break;
|
||||
}
|
||||
if (file_exists($path.$file)) {
|
||||
echo '<img src="/fichier/imgcache/'.$file.'" />';
|
||||
echo '<img src="/file/image/cache/q/'.$file.'" />';
|
||||
} else {
|
||||
echo "Erreur de génération du graphique";
|
||||
}
|
||||
@ -628,10 +640,10 @@ class FinanceController extends Zend_Controller_Action
|
||||
$request = $this->getRequest();
|
||||
$ratio = $request->getParam('ratio');
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = $c->profil->path->pages . '/imgcache/';
|
||||
$path = $c->profil->path->shared . '/pages/imgcache/';
|
||||
$file = 'ratiosgraph-'.$this->siret.'-'.$this->id.'-'.$ratio.'.png';
|
||||
if (file_exists($path.$file)) {
|
||||
echo '<img src="/fichier/imgcache/'.$file.'" />';
|
||||
echo '<img src="/file/image/cache/q/'.$file.'" />';
|
||||
} else {
|
||||
echo "Erreur de génération du graphique";
|
||||
}
|
||||
@ -675,7 +687,7 @@ class FinanceController extends Zend_Controller_Action
|
||||
$data[$element->id] = $element->val;
|
||||
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = $c->profil->path->files . '/';
|
||||
$path = $c->profil->path->shared . '/files/';
|
||||
$file = 'liasse-'.substr($this->siret, 0, 9).'-'.$this->id.'-'.$type.$date.'.xls';
|
||||
|
||||
$liasse = new Scores_Finance_Liasse_XLS($model);
|
||||
@ -690,126 +702,171 @@ class FinanceController extends Zend_Controller_Action
|
||||
}
|
||||
|
||||
/**
|
||||
* Envoi de bilan pour saisie
|
||||
* L'envoi se déroule en plusieurs étapes
|
||||
* 1 - Saisie des informations
|
||||
* 2 - Validation du formulaire
|
||||
* 3 -
|
||||
* Commande de la saisie de bilan
|
||||
* Enregistrement des caractéristiques, obtention référence commande puis upload fichier
|
||||
*/
|
||||
public function saisiebilanAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
|
||||
$request = $this->getRequest();
|
||||
$user = new Scores_Utilisateur();
|
||||
$params = $request->getParams();
|
||||
$request = $this->getRequest();
|
||||
$user = new Scores_Utilisateur();
|
||||
$params = $request->getParams();
|
||||
|
||||
$bilanSaisie = new Application_Model_BilanSaisie();
|
||||
|
||||
$this->view->assign('email', $user->getEmail());
|
||||
$this->view->assign('siren', $params['siren']);
|
||||
Zend_Registry::get('firebug')->info($params);
|
||||
|
||||
$ref = $params['ref'];
|
||||
if ($request->isPost())
|
||||
{
|
||||
//Validation du formulaire
|
||||
$valideField = true;
|
||||
if ( empty($params['siren']))
|
||||
{
|
||||
$valideField = false;
|
||||
}
|
||||
if ( empty($params['dateCloture'])
|
||||
&& !preg_match('/^[0-9]{2}\/[0-9]{2}\/[0-9]{4}/', $params['dateCloture'])
|
||||
&& !checkdate(substr($params['dateCloture'],3,2),substr($params['dateCloture'],0,2),substr($params['dateCloture'],6,2)))
|
||||
{
|
||||
$valideField = false;
|
||||
}
|
||||
if ( empty($params['dureeExercice']))
|
||||
{
|
||||
$valideField = false;
|
||||
}
|
||||
if ($valideField === true)
|
||||
{
|
||||
$ws = new Scores_Ws_Client('order', '0.1');
|
||||
$parameters = new stdClass();
|
||||
$parameters->siren = $params['siren'];
|
||||
$parameters->date = substr($params['dateCloture'],6,4).'-'.substr($params['dateCloture'],3,2).'-'.substr($params['dateCloture'],0,2);
|
||||
$parameters->type = $params['format'];
|
||||
$parameters->source = 'extranet';
|
||||
$parameters->private = $params['confidentiel'];
|
||||
$result = $ws->setBilanInput($parameters);
|
||||
if ($result === false) {
|
||||
$this->view->msg = "Erreur lors de l'enregistrement des informations";
|
||||
} else {
|
||||
$this->logger->info(print_r($result,1));
|
||||
$this->view->ref = strtoupper($result);
|
||||
$this->view->fileref = $params['siren'] . '_' . $params['format'] . '_' .
|
||||
substr($params['dateCloture'],6,4) . substr($params['dateCloture'],3,2) .
|
||||
substr($params['dateCloture'],0,2) . '_' . strtoupper($result);
|
||||
$session = new Scores_Session_Entreprise($params['siren']);
|
||||
$this->view->raisonSociale = $session->getRaisonSociale();
|
||||
$this->view->bilanCloture = $params['dateCloture'];
|
||||
$this->view->bilanDuree = $params['dureeExercice'];
|
||||
switch($params['format']){
|
||||
case 'C':
|
||||
$this->view->type = 'consolidé';
|
||||
break;
|
||||
case 'N':
|
||||
$this->view->type = 'réel normal (liasse 2050)';
|
||||
break;
|
||||
case 'S':
|
||||
$this->view->type = 'simplifié (liasse 2033)';
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$this->view->msg = "Formulaire invalide.";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Annulation de la saisie
|
||||
if ($params['annule'])
|
||||
{
|
||||
$data = array( 'fichier' => '' );
|
||||
$bilanSaisie->update($data, "ref='$ref'");
|
||||
echo 'Saisie bilan annulé';
|
||||
exit;
|
||||
}
|
||||
//Envoi du fichier @todo ça passe pas
|
||||
elseif ($params['upload'])
|
||||
{
|
||||
if ( count($_FILES)==1 ){
|
||||
$n = $_FILES['fichier']['name'];
|
||||
$s = $_FILES['fichier']['size'];
|
||||
$tmp_name = $_FILES['fichier']['tmp_name'];
|
||||
//Vérifier que l'extension du fichier est bien correcte
|
||||
$extValide = array('pdf', 'tiff');
|
||||
$extension = strrchr($n,'.');
|
||||
$extension = strtolower(substr($extension,1));
|
||||
if ( in_array($extension, $extValide) ){
|
||||
//Lecture dans la bdd des informations
|
||||
$infos = $bilanSaisie->getInfosBilan($ref);
|
||||
$name = $infos['ref'].'-'.$infos['siren'].'.'.$extension;
|
||||
$c = Zend_Registry::get('config');
|
||||
$file = realpath($c->profil->path->data).'/bilanclient/'.$name;
|
||||
if ( move_uploaded_file($tmp_name, $file) ){
|
||||
$bilanSaisie->setFilename($ref, $name);
|
||||
switch($infos['format']){
|
||||
case 'C':
|
||||
$type = 'consolidé';
|
||||
break;
|
||||
case 'N':
|
||||
$type = 'réel normal ou simplifié';
|
||||
break;
|
||||
}
|
||||
$session = new Scores_Session_Entreprise($params['siren']);
|
||||
$this->view->assign('raisonSociale', $session->getRaisonSociale());
|
||||
$this->view->assign('size', filesize($file));
|
||||
$this->view->assign('name', $name);
|
||||
$this->view->assign('infos', $infos);
|
||||
$this->view->assign('ref', $ref);
|
||||
$this->view->assign('upload', true);
|
||||
} else {
|
||||
$this->view->assign('upload', false);
|
||||
$this->view->assign('errMsg', "<br/>Erreur lors de l'envoi du fichier!");
|
||||
}
|
||||
} else {
|
||||
$this->view->assign('upload', false);
|
||||
$this->view->assign('errMsg', "Extension de fichier invalide.");
|
||||
}
|
||||
} else {
|
||||
$this->view->assign('upload', false);
|
||||
$this->view->assign('errMsg', "<br/>Erreur.");
|
||||
}
|
||||
$this->renderScript('finance/saisiebilan-upload.phtml');
|
||||
}
|
||||
//Validation du formulaire
|
||||
elseif (isset($params['method']))
|
||||
{
|
||||
$valideField = true;
|
||||
if ( empty($params['email'])) {
|
||||
$valideField = false;
|
||||
}
|
||||
if ( empty($params['method'])) {
|
||||
$valideField = false;
|
||||
}
|
||||
if ( empty($params['siren'])) {
|
||||
$valideField = false;
|
||||
}
|
||||
if ( empty($params['dateCloture'])
|
||||
&& !preg_match('/^[0-9]{2}\/[0-9]{2}\/[0-9]{4}/', $params['dateCloture'])
|
||||
&& checkdate(substr($params['dateCloture'],3,2),substr($params['dateCloture'],0,2),substr($params['dateCloture'],6,2))){
|
||||
$valideField = false;
|
||||
}
|
||||
if ( empty($params['dureeExercice'])) {
|
||||
$valideField = false;
|
||||
}
|
||||
if ($valideField){
|
||||
$ref = $bilanSaisie->setInformations(
|
||||
$user->getIdClient(),
|
||||
$user->getId(),
|
||||
$user->getLogin(),
|
||||
$params['email'],
|
||||
$params['method'],
|
||||
$params['confidentiel'],
|
||||
$params['siren'],
|
||||
$params['dateCloture'],
|
||||
$params['format'],
|
||||
$params['dureeExercice']
|
||||
);
|
||||
$this->view->assign('ref', $ref);
|
||||
if ($params['method']=='courrier'){
|
||||
$this->renderScript('finance/saisiebilan-courrier.phtml');
|
||||
} elseif ($params['method']=='fichier') {
|
||||
$this->renderScript('finance/saisiebilan-upload.phtml');
|
||||
}
|
||||
}
|
||||
}
|
||||
public function saisiebilanupAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
|
||||
$request = $this->getRequest();
|
||||
$ref = $request->getParam('ref');
|
||||
$fileref = $request->getParam('fileref');
|
||||
|
||||
if ($request->isPost()) {
|
||||
if (count($_FILES)==1 ) {
|
||||
$n = $_FILES['fichier']['name'];
|
||||
$s = $_FILES['fichier']['size'];
|
||||
$tmp_name = $_FILES['fichier']['tmp_name'];
|
||||
//Vérifier que l'extension du fichier est bien correcte
|
||||
$extValide = array('pdf', 'tiff');
|
||||
$extension = strrchr($n,'.');
|
||||
$extension = strtolower(substr($extension,1));
|
||||
if ( in_array($extension, $extValide) ) {
|
||||
$name = $fileref.'.'.$extension;
|
||||
$c = Zend_Registry::get('config');
|
||||
$file = $c->profil->path->shared.'/persist/bilanclient/'.$name;
|
||||
if ( move_uploaded_file($tmp_name, $file) ) {
|
||||
$ws = new Scores_Ws_Client('order', '0.1');
|
||||
$parameters = new stdClass();
|
||||
$parameters->ref = $ref;
|
||||
$parameters->filename = $name;
|
||||
$result = $ws->setBilanInputFile($parameters);
|
||||
$this->view->assign('upload', true);
|
||||
$this->view->file = $name;
|
||||
} else {
|
||||
$this->view->assign('upload', false);
|
||||
$this->view->assign('errMsg', "<br/>Erreur lors de l'envoi du fichier!");
|
||||
}
|
||||
} else {
|
||||
$this->view->assign('upload', false);
|
||||
$this->view->assign('errMsg', "Extension de fichier invalide.");
|
||||
}
|
||||
} else {
|
||||
$this->view->assign('upload', false);
|
||||
$this->view->assign('errMsg', "<br/>Erreur.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Liste des liasses
|
||||
*/
|
||||
public function liasselistAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
|
||||
$this->view->headTitle()->prepend("Liasse fiscale");
|
||||
$this->view->headTitle()->prepend("Siret ".$this->siret);
|
||||
|
||||
//Paramètres utilisateur
|
||||
$user = new Scores_Utilisateur();
|
||||
$this->view->assign('edition', $user->checkModeEdition());
|
||||
if ( $user->checkPerm('UPLOADBILAN') ) {
|
||||
$this->view->assign('saisiebilan', true);
|
||||
}
|
||||
$this->view->assign('surveillance', $user->checkPerm('survbilan'));
|
||||
|
||||
$ws = new WsScores();
|
||||
$bilanList = $ws->getListeBilans(substr($this->siret, 0, 9));
|
||||
if ($bilanList === false) $this->forward('soap', 'error');
|
||||
|
||||
/** La liste des types de bilan existant **/
|
||||
$liste = array (
|
||||
'N' => array(),
|
||||
'S' => array(),
|
||||
'C' => array(),
|
||||
'B' => array(),
|
||||
'A' => array(),
|
||||
);
|
||||
|
||||
$entreprise = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
$this->view->assign('raisonSociale', $entreprise->getRaisonSociale());
|
||||
$this->view->assign('siren', substr($this->siret, 0, 9));
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('idClient', $user->identity->idClient);
|
||||
|
||||
$this->view->haveLiasse = ($bilanList->nbReponses > 0) ? true : false;
|
||||
|
||||
if( $bilanList->nbReponses > 0 ) {
|
||||
// Tri des bilans par type
|
||||
foreach ( array_keys($liste) as $t) {
|
||||
foreach ( $bilanList->result->item as $item ) {
|
||||
if ( $t == $item->typeBilan ) {
|
||||
$liste[$item->typeBilan][] = $item;
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->view->BilanList = $liste;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -827,6 +884,11 @@ class FinanceController extends Zend_Controller_Action
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
$this->view->assign('edition', $user->checkModeEdition());
|
||||
//Gestion saisie bilan
|
||||
if ( $user->checkPerm('UPLOADBILAN') ) {
|
||||
$this->view->assign('saisiebilan', true);
|
||||
}
|
||||
$this->view->assign('surveillance', $user->checkPerm('survbilan'));
|
||||
|
||||
/** Les ancres pour les liens **/
|
||||
$ancres = array(
|
||||
@ -870,23 +932,6 @@ class FinanceController extends Zend_Controller_Action
|
||||
),
|
||||
);
|
||||
|
||||
/** La liste des types de bilan existant **/
|
||||
$liste = array (
|
||||
'N' => array(),
|
||||
'S' => array(),
|
||||
'C' => array(),
|
||||
'B' => array(),
|
||||
'A' => array());
|
||||
|
||||
/** Le nom des types pour le select */
|
||||
$type = array (
|
||||
'A' => 'Assurance',
|
||||
'B' => 'Banque',
|
||||
'C' => 'Consolidé',
|
||||
'S' => 'Simplifié',
|
||||
'N' => ''
|
||||
);
|
||||
|
||||
/** Liste des unités que l'ont proposent **/
|
||||
$unit = array (
|
||||
'E' => '€',
|
||||
@ -896,38 +941,41 @@ class FinanceController extends Zend_Controller_Action
|
||||
$liasse = array ();
|
||||
$request = $this->getRequest();
|
||||
$unite = $request->getParam('unit','K');
|
||||
|
||||
$ws = new WsScores();
|
||||
$listBilan = $ws->getListeBilans(substr($this->siret, 0, 9));
|
||||
if ($listBilan === false) $this->_forward('soap', 'error');
|
||||
|
||||
$entreprise = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
|
||||
if( $listBilan->nbReponses > 0 )
|
||||
{
|
||||
$date = $request->getParam('date',$listBilan->result->item[0]->dateExercice.':'.$listBilan->result->item[0]->typeBilan);
|
||||
// Récupération de la date
|
||||
$dateAndType = $request->getParam('date', $defaultTypeBilan.$defaultDateExercice);
|
||||
|
||||
foreach ($listBilan->result->item as $item)
|
||||
$liste[$item->typeBilan][] = $item->dateExercice;
|
||||
if ( !empty($dateAndType) ) {
|
||||
|
||||
if (!empty($date))
|
||||
{
|
||||
$dateAndType = explode(':', $date);
|
||||
$type = substr($dateAndType, 0, 1);
|
||||
$date = substr($dateAndType, 1);
|
||||
|
||||
$infos = $ws->getBilan(substr($this->siret, 0, 9), $dateAndType[0], $dateAndType[1], true);
|
||||
// Récupération des postes du bilan
|
||||
try {
|
||||
$ws = new Scores_Ws_Client('entreprise', '0.8');
|
||||
$params = new stdClass();
|
||||
$params->siren = substr($this->siret, 0, 9);
|
||||
$params->millesime = $date;
|
||||
$params->typeBilan = $type;
|
||||
$params->ref = '';
|
||||
$infos = $ws->getBilan($params);
|
||||
|
||||
if ($infos === false) $this->_forward('soap', 'error');
|
||||
// Error
|
||||
if ($infos === false) {
|
||||
$this->forward('soap', 'error');
|
||||
}
|
||||
|
||||
// Formatage de la liasse
|
||||
$infoLiasse = new Scores_Finance_Liasse($infos, $unite);
|
||||
$this->view->assign('dateCloture', $infoLiasse->getInfo('dateCloture'));
|
||||
$this->view->assign('dateCloture', $infoLiasse->getInfo('dateCloture'));
|
||||
$this->view->assign('dateCloturePre', $infoLiasse->getInfo('dateCloturePre'));
|
||||
|
||||
$date = new Zend_Date($infoLiasse->getInfo('dateCloture'), 'yyyyMMdd');
|
||||
$this->view->assign('dateClotureD', $date->toString('dd/MM/yyyy'));
|
||||
|
||||
Zend_Registry::get('firebug')->info('test:'.$infoLiasse->getInfo('dateCloturePre'));
|
||||
$dateCloturePre = $infoLiasse->getInfo('dateCloturePre');
|
||||
if ( $dateCloturePre == '' ) {
|
||||
if ($dateCloturePre == '') {
|
||||
$this->view->assign('dateCloturePreD', '-');
|
||||
} else {
|
||||
$date = new Zend_Date($dateCloturePre, 'yyyyMMdd');
|
||||
@ -937,33 +985,24 @@ class FinanceController extends Zend_Controller_Action
|
||||
$this->view->assign('dureesMois', $infoLiasse->getInfo('dureeMois'));
|
||||
$this->view->assign('dureesMoisPre', $infoLiasse->getInfo('dureeMoisPre'));
|
||||
|
||||
$this->view->assign('date', $dateAndType[0]);
|
||||
$this->view->assign('champType', $dateAndType[1]);
|
||||
$this->view->assign('liasse', $infoLiasse->getPostes());
|
||||
$this->view->assign('ancres', $ancres[$dateAndType[1]]);
|
||||
$this->view->assign('date', $date);
|
||||
$this->view->assign('champType', $type);
|
||||
$this->view->assign('liasse', $infoLiasse->getPostes());
|
||||
$this->view->assign('ancres', $ancres[$type]);
|
||||
} catch (Exception $e) {
|
||||
$this->view->msg = $e->getMessage();
|
||||
}
|
||||
|
||||
//Gestion export de la liasse au format XLS
|
||||
if ($user->checkPerm('liassexls')
|
||||
&& in_array($dateAndType[1],array('C', 'N', 'S')) ) {
|
||||
$this->view->assign('exportxls', true);
|
||||
}
|
||||
//Gestion export de la liasse au format XLS
|
||||
if ( $user->checkPerm('liassexls') && in_array($type,array('C', 'N', 'S')) ) {
|
||||
$this->view->assign('exportxls', true);
|
||||
}
|
||||
$this->view->assign('liste', $liste);
|
||||
$this->view->assign('id', $id);
|
||||
$this->view->assign('type', $type);
|
||||
$this->view->assign('unite', $unite);
|
||||
$this->view->assign('unit', $unit);
|
||||
}
|
||||
}
|
||||
|
||||
//Gestion saisie bilan
|
||||
if ( $user->checkPerm('UPLOADBILAN') ) {
|
||||
$this->view->assign('saisiebilan', true);
|
||||
}
|
||||
$this->view->assign('surveillance', $user->checkPerm('survbilan'));
|
||||
$this->view->assign('id', $id);
|
||||
$this->view->assign('unite', $unite);
|
||||
$this->view->assign('unit', $unit);
|
||||
|
||||
|
||||
/** Partie vue **/
|
||||
$this->view->haveLiasse = ($listBilan->nbReponses > 0) ? true : false;
|
||||
$this->view->assign('raisonSociale', $entreprise->getRaisonSociale());
|
||||
$this->view->assign('siren', substr($this->siret, 0, 9));
|
||||
$this->view->assign('siret', $this->siret);
|
||||
@ -998,7 +1037,7 @@ class FinanceController extends Zend_Controller_Action
|
||||
'controller'=>'saisie',
|
||||
'action'=>'bourse',
|
||||
'siren' => $siren
|
||||
), null, true));
|
||||
), 'default', true));
|
||||
}
|
||||
|
||||
$this->view->assign('id', $this->id);
|
||||
@ -1026,11 +1065,16 @@ class FinanceController extends Zend_Controller_Action
|
||||
$infos = $this->getRequest()->getParam('infos');
|
||||
}
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
$this->view->assign('edition', $user->checkModeEdition());
|
||||
|
||||
|
||||
$entreprise = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
$this->view->assign('banques', $infos->result->item);
|
||||
$this->view->assign('banques', isset($infos->result->item)?$infos->result->item:array());
|
||||
$this->view->assign('raisonSociale', $entreprise->getRaisonSociale());
|
||||
$this->view->assign('siren', substr($this->siret, 0, 9));
|
||||
$this->view->assign('exportObjet', $infos);
|
||||
$this->view->assign('siret', $this->siret);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1067,8 +1111,6 @@ class FinanceController extends Zend_Controller_Action
|
||||
foreach ($bilansInfos as $infos) {
|
||||
$dateCloture[] = $infos->dateCloture;
|
||||
}
|
||||
sort($dateCloture);
|
||||
$this->view->assign('dateCloture', $dateCloture);
|
||||
$this->view->assign('bilansInfos', $bilansInfos);
|
||||
|
||||
$ratiosInfos = $ratiosData->getTableRatiosInfos();
|
||||
@ -1243,18 +1285,30 @@ class FinanceController extends Zend_Controller_Action
|
||||
),
|
||||
);
|
||||
|
||||
//Valeur pour le tableau
|
||||
rsort($dateCloture);
|
||||
$dateClotureTable = array();
|
||||
foreach ($dateCloture as $k => $date) {
|
||||
if ($k > 5) break;
|
||||
$dateClotureTable[] = $date;
|
||||
}
|
||||
sort($dateClotureTable);
|
||||
$this->view->assign('dateCloture', $dateClotureTable);
|
||||
|
||||
for ( $i=0 ; $i<count($dataTable) ; $i++ ) {
|
||||
|
||||
$values = array();
|
||||
if ( !empty($dataTable[$i]['r']) ) {
|
||||
foreach ($dateCloture as $k=>$date) {
|
||||
foreach ($dateClotureTable as $k => $date) {
|
||||
$values[$date] = $ratiosData->dRatio($typeBilan, $date, 'r'.$dataTable[$i]['r']);
|
||||
}
|
||||
}
|
||||
|
||||
$dataTable[$i]['values'] = $values;
|
||||
}
|
||||
$this->view->assign('dataTable',$dataTable);
|
||||
|
||||
//Calcul du graph
|
||||
//Valeur pour le graphique
|
||||
$labels = array();
|
||||
$data = array();
|
||||
$graphRatio = array(28, 21, 13);
|
||||
@ -1265,10 +1319,12 @@ class FinanceController extends Zend_Controller_Action
|
||||
$data[$iRatio]['values'][] = $ratiosEntrep[$date]['r'.$dataTable[$ratio]['r']];
|
||||
}
|
||||
}
|
||||
foreach ($dateCloture as $k=>$date) {
|
||||
sort($dateCloture);
|
||||
foreach ($dateCloture as $k => $date) {
|
||||
$labels[] = substr($date, 0, 4);
|
||||
}
|
||||
|
||||
//Création du graphique
|
||||
$graph = new Scores_Finance_Ratios_Graph($this->siret, $this->id);
|
||||
$image = $graph->flux($labels, $data, $typeBilan);
|
||||
if ( $image != false ){
|
||||
@ -1372,4 +1428,34 @@ class FinanceController extends Zend_Controller_Action
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Affichage en ajax des informations dernière date de cloture du bilan et etat de saisie
|
||||
*/
|
||||
public function liasseinfosAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
|
||||
$request = $this->getRequest();
|
||||
$siren = $request->getParam('siren');
|
||||
|
||||
$ws = new WsScores();
|
||||
$response = $ws->getEntrepriseLiasseInfos($siren);
|
||||
|
||||
if ( $response === null ) {
|
||||
$this->view->assign('msg','Aucun bilan déposé.');
|
||||
} else {
|
||||
$date = new Zend_Date($response->BilanDateCloture, 'yyyy-MM-dd');
|
||||
$this->view->assign('BilanDateCloture', $date->toString('dd/MM/yyyy'));
|
||||
$this->view->assign('BilanDateClotureIso', $response->BilanDateCloture);
|
||||
$this->view->assign('BilanType', $response->BilanType);
|
||||
$this->view->assign('SaisieCode', $response->SaisieCode);
|
||||
$this->view->assign('SaisieLabel', $response->SaisieLabel);
|
||||
if ( $response->SaisieDate!='' || $response->SaisieDate!='0000-00-00' ) {
|
||||
$this->view->assign('SaisieDateIso', $response->SaisieDate);
|
||||
$date = new Zend_Date($response->SaisieDate, 'yyyy-MM-dd');
|
||||
$this->view->assign('SaisieDate', $date->toString('dd/MM/yyyy'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -6,7 +6,8 @@ require_once 'Giant/Functions.lib.php';
|
||||
|
||||
class GiantController extends Zend_Controller_Action
|
||||
{
|
||||
protected $TestIndication = false;
|
||||
protected $theme;
|
||||
protected $TestIndication = false;
|
||||
protected $config = array();
|
||||
|
||||
protected $TestCompanies = array(
|
||||
@ -39,12 +40,23 @@ class GiantController extends Zend_Controller_Action
|
||||
'NL' => 'The Netherlands',
|
||||
);
|
||||
|
||||
/**
|
||||
* Logger
|
||||
* @var \Monolog\Logger
|
||||
*/
|
||||
protected $logger;
|
||||
|
||||
public function init()
|
||||
{
|
||||
if (Zend_Registry::isRegistered('logger')) {
|
||||
$this->logger = Zend_Registry::get('logger');
|
||||
}
|
||||
|
||||
$this->view->headLink()->appendStylesheet('/themes/default/styles/giant.css', 'all');
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/giant.js', 'text/javascript');
|
||||
// --- Theme
|
||||
$this->theme = Zend_Registry::get('theme');
|
||||
|
||||
$this->view->headLink()->appendStylesheet($this->theme->pathStyle.'/giant.css', 'all');
|
||||
$this->view->headScript()->appendFile($this->theme->pathScript.'/giant.js', 'text/javascript');
|
||||
$this->view->debug = false;
|
||||
$this->config = new Zend_Config_Ini( APPLICATION_PATH.'/../library/Giant/giant.ini' );
|
||||
$this->TestIndication = $this->config->test->TestIndication;
|
||||
@ -257,8 +269,8 @@ class GiantController extends Zend_Controller_Action
|
||||
public function startmonitoringAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->view->headLink()->appendStylesheet('/themes/default/styles/giant.css', 'all');
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/giant.js', 'text/javascript');
|
||||
$this->view->headLink()->appendStylesheet($this->theme->pathStyle.'/giant.css', 'all');
|
||||
$this->view->headScript()->appendFile($this->theme->pathScript.'/giant.js', 'text/javascript');
|
||||
$this->view->lang = $this->getRequest()->getParam('lang');
|
||||
$this->view->CompanyId = $this->getRequest()->getParam('CompanyId');
|
||||
$this->view->Pays = $this->getRequest()->getParam('Pays');
|
||||
@ -292,7 +304,7 @@ class GiantController extends Zend_Controller_Action
|
||||
public function stopmonitoringAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->view->headLink()->appendStylesheet('/themes/default/styles/giant.css', 'all');
|
||||
$this->view->headLink()->appendStylesheet($this->theme->pathStyle.'/giant.css', 'all');
|
||||
$this->view->CompanyId = $this->getRequest()->getParam('CompanyId');
|
||||
$this->view->InternalOrderId = $this->getRequest()->getParam('InternalOrderId');
|
||||
$this->view->Pays = $this->getRequest()->getParam('Pays');
|
||||
@ -315,7 +327,7 @@ class GiantController extends Zend_Controller_Action
|
||||
public function updatemonitoringAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->view->headLink()->appendStylesheet('/themes/default/styles/giant.css', 'all');
|
||||
$this->view->headLink()->appendStylesheet($this->theme->pathStyle.'/giant.css', 'all');
|
||||
$this->view->lang = $this->getRequest()->getParam('lang');
|
||||
$this->view->CompanyId = $this->getRequest()->getParam('CompanyId');
|
||||
$this->view->InternalOrderId = $this->getRequest()->getParam('InternalOrderId');
|
||||
@ -342,7 +354,7 @@ class GiantController extends Zend_Controller_Action
|
||||
}
|
||||
public function retriveAction()
|
||||
{
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/giant_monitoring.js', 'text/javascript');
|
||||
$this->view->headScript()->appendFile($this->theme->pathScript.'/giant_monitoring.js', 'text/javascript');
|
||||
$giantController = new GiantControllerLib();
|
||||
$auth = Zend_Auth::getInstance();
|
||||
if ( $auth->hasIdentity() ) {
|
||||
@ -405,8 +417,8 @@ class GiantController extends Zend_Controller_Action
|
||||
public function reteventsAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/giant_monitoring.js', 'text/javascript');
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/giant.js', 'text/javascript');
|
||||
$this->view->headScript()->appendFile($this->theme->pathScript.'/giant_monitoring.js', 'text/javascript');
|
||||
$this->view->headScript()->appendFile($this->theme->pathScript.'/giant.js', 'text/javascript');
|
||||
$auth = Zend_Auth::getInstance();
|
||||
$identity = $auth->getIdentity();
|
||||
$result = $auth->getStorage()->read($identity);
|
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,12 +1,26 @@
|
||||
<?php
|
||||
class LogoController extends Zend_Controller_Action
|
||||
{
|
||||
protected $pathLogo = '';
|
||||
protected $theme;
|
||||
protected $pathLogo = '';
|
||||
|
||||
/**
|
||||
* Logger
|
||||
* @var \Monolog\Logger
|
||||
*/
|
||||
protected $logger;
|
||||
|
||||
public function init()
|
||||
{
|
||||
$c = Zend_Registry::get('config');
|
||||
$this->pathLogo = $c->profil->path->data.'/logos';
|
||||
if (Zend_Registry::isRegistered('logger')) {
|
||||
$this->logger = Zend_Registry::get('logger');
|
||||
}
|
||||
|
||||
// --- Theme
|
||||
$this->theme = Zend_Registry::get('theme');
|
||||
|
||||
$c = Zend_Registry::get('config');
|
||||
$this->pathLogo = $c->profil->path->shared.'/persist/logos';
|
||||
}
|
||||
|
||||
public function indexAction()
|
@ -1,6 +1,20 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @todo vérifier contenu de la table des cours d'appel en dur
|
||||
* au 20150305:
|
||||
* 98713 PAPEETE CEDEX
|
||||
* 97262 FORT DE FRANCE CEDEX
|
||||
* Chambre Détachée de la Cour d'Appel de Fort de France à Cayenne", "triCP"=>"97300
|
||||
* qui devrait être "cours d'appel de Cayenne"
|
||||
* 97600 MAMOUDZOU
|
||||
* 97500 ST PIERRE ET MIQUELON
|
||||
*
|
||||
*/
|
||||
class MandataireController extends Zend_Controller_Action
|
||||
{
|
||||
protected $theme;
|
||||
|
||||
protected $coursAppel = array(
|
||||
array( "triId"=>"1756", "triCode"=>"AIXPRL", "triNom"=>"Cour d'Appel d'Aix-en-Provence", "triCP"=>"13616" ),
|
||||
array( "triId"=>"1757", "triCode"=>"AMIENL", "triNom"=>"Cour d'Appel d'Amiens", "triCP"=>"80027" ),
|
||||
@ -39,33 +53,46 @@ class MandataireController extends Zend_Controller_Action
|
||||
array( "triId"=>"1790", "triCode"=>"CAYENL", "triNom"=>"Chambre Détachée de la Cour d'Appel de Fort de France à Cayenne", "triCP"=>"97300" ),
|
||||
array( "triId"=>"1798", "triCode"=>"AGENL", "triNom"=>"Cour d'Appel d'Agen", "triCP"=>"47916" ),
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
* Logger
|
||||
* @var \Monolog\Logger
|
||||
*/
|
||||
protected $logger;
|
||||
|
||||
public function init()
|
||||
{
|
||||
require_once 'Scores/WsScores.php';
|
||||
if (Zend_Registry::isRegistered('logger')) {
|
||||
$this->logger = Zend_Registry::get('logger');
|
||||
}
|
||||
|
||||
// --- Theme
|
||||
$this->theme = Zend_Registry::get('theme');
|
||||
|
||||
require_once 'Scores/WsScores.php';
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Enregistrement d'un mandataire
|
||||
*/
|
||||
public function addAction()
|
||||
{
|
||||
$this->_helper->layout->disableLayout();
|
||||
|
||||
|
||||
$request = $this->getRequest();
|
||||
$idMandataire = $request->getParam('idMand', '');
|
||||
$tribunal = $request->getParam('tribunal', '');
|
||||
|
||||
|
||||
$ws = new WsScores();
|
||||
|
||||
Zend_Registry::get('firebug')->info('idMandataire : '.$idMandataire);
|
||||
|
||||
|
||||
$this->logger->info('idMandataire : '.$idMandataire);
|
||||
|
||||
//Mode edition
|
||||
if ($idMandataire != '') {
|
||||
$idMandataire = (int)substr($idMandataire,1);
|
||||
$reponse = $ws->getMandataire($idMandataire);
|
||||
Zend_Registry::get('firebug')->info($reponse);
|
||||
$this->logger->info(print_r($reponse,1));
|
||||
if ($reponse!==false) {
|
||||
$tabMandataires = json_decode($reponse, true);
|
||||
} else {
|
||||
@ -75,26 +102,26 @@ class MandataireController extends Zend_Controller_Action
|
||||
} else {
|
||||
$tabMandataires = $request->getParam('tabMandataires');
|
||||
}
|
||||
|
||||
|
||||
if ($tribunal!='') {
|
||||
//La cour d'appel suivant le tribunal sélectionné
|
||||
$codeCourAppel = $ws->getIdCoursAppel($tribunal);
|
||||
|
||||
|
||||
//Les tribunaux
|
||||
$tmp = $ws->getTribunaux(array('C','I','G')); //
|
||||
|
||||
|
||||
$tribunaux = $tmp->result->item;
|
||||
}else{
|
||||
$message = 'Pas de tribunal sélectionné.';
|
||||
}
|
||||
|
||||
|
||||
$this->view->assign('message', $message);
|
||||
$this->view->assign('tabMandataires', $tabMandataires);
|
||||
$this->view->assign('coursAppel', $this->coursAppel);
|
||||
$this->view->assign('tribunal', $tribunal);
|
||||
$this->view->assign('tribunaux', $tribunaux);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Edition d'un mandataire
|
||||
*/
|
||||
@ -102,7 +129,7 @@ class MandataireController extends Zend_Controller_Action
|
||||
{
|
||||
$this->_forward('add');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Recherche d'un mandataire à partir d'une chaine de caractères
|
||||
* "nom, departement"
|
||||
@ -111,40 +138,40 @@ class MandataireController extends Zend_Controller_Action
|
||||
{
|
||||
$this->_helper->layout->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender();
|
||||
|
||||
|
||||
$request = $this->getRequest();
|
||||
$search = $request->getParam('search', '');
|
||||
|
||||
|
||||
if (empty($search)) { echo ''; }
|
||||
else { $search = strtolower($search); }
|
||||
|
||||
|
||||
list($searchStr, $filtre) = explode(',', $search);
|
||||
$searchStr = trim($searchStr);
|
||||
$filtre = str_replace(' ', '', $filtre);
|
||||
if( strlen($filtre) != 5 && strlen($filtre) != 2 ){
|
||||
$filtre = '';
|
||||
}
|
||||
|
||||
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->searchMandataires(
|
||||
$searchStr,
|
||||
array('V', 'N', 'H', 'A', 'M'), //types de mandataires
|
||||
$filtre
|
||||
);
|
||||
|
||||
|
||||
if ($reponse == false){
|
||||
echo 'Erreur durant la recherche';
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
$mandataires = $reponse->result->item;
|
||||
|
||||
|
||||
$output = array();
|
||||
$output[] = array(
|
||||
'label' => "A l'adresse du bien vendu",
|
||||
'id' => 'adresse'
|
||||
);
|
||||
|
||||
|
||||
/*
|
||||
REGEX Code Postal : ^(F-)?((2[A|B])|[0-9]{2})[0-9]{3}$
|
||||
(?<!/BP /i) Ne pas avoir la présence de BP devant les 5 chiffres
|
||||
@ -158,7 +185,7 @@ class MandataireController extends Zend_Controller_Action
|
||||
$tabResults[$i]['lib'] = htmlspecialchars_decode(
|
||||
html_entity_decode($mandataire->mand, ENT_COMPAT | ENT_HTML401, 'UTF-8')
|
||||
, ENT_QUOTES);
|
||||
|
||||
|
||||
preg_match('/(?<!bp )((2[A|B])|[0-9]{2})[0-9]{3}( )/i', $mandataire->mand, $matches);
|
||||
$tabResults[$i]['cp'] = $matches[0];
|
||||
$i++;
|
||||
@ -170,7 +197,7 @@ class MandataireController extends Zend_Controller_Action
|
||||
}
|
||||
//Classement du tableau
|
||||
array_multisort($cp, SORT_NUMERIC, $tabResults);
|
||||
|
||||
|
||||
//Affichage des valeurs
|
||||
foreach ($tabResults as $item){
|
||||
$output[] = array(
|
||||
@ -181,7 +208,7 @@ class MandataireController extends Zend_Controller_Action
|
||||
}
|
||||
echo json_encode($output);
|
||||
}
|
||||
|
||||
|
||||
public function getAction()
|
||||
{
|
||||
$this->_helper->layout->disableLayout();
|
||||
@ -190,7 +217,7 @@ class MandataireController extends Zend_Controller_Action
|
||||
$request = $this->getRequest();
|
||||
$siren = $request->getParam('siren');
|
||||
$siren = str_replace(' ','',$siren); //Remplacer les espaces
|
||||
|
||||
|
||||
if ( $siren=='' || strlen($siren)!=14 ) {
|
||||
$output = array(
|
||||
'Siret' => 'Siret incorrect',
|
||||
@ -198,7 +225,7 @@ class MandataireController extends Zend_Controller_Action
|
||||
echo json_encode($output);
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
$tabEntrep = array();
|
||||
$ws = new WsScores();
|
||||
$tabEntrep = $ws->getIdentite($siren);
|
||||
@ -210,24 +237,24 @@ class MandataireController extends Zend_Controller_Action
|
||||
if (!empty($tabEntrep->NomLong) && strlen($tabEntrep->NomLong)>strlen($tabEntrep->Nom)){
|
||||
$tabEntrep->Nom = $tabEntrep->NomLong;
|
||||
}
|
||||
|
||||
|
||||
//Retourner le tableau sous forme json
|
||||
echo json_encode($tabEntrep);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function saveAction()
|
||||
{
|
||||
$this->_helper->layout->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender();
|
||||
|
||||
|
||||
$request = $this->getRequest();
|
||||
|
||||
|
||||
$error = false;
|
||||
|
||||
$tabMandataires = $request->getParam('tabMandataires', array());
|
||||
|
||||
|
||||
//Vérification des données
|
||||
$fields = array();
|
||||
if($tabMandataires['sirenGrp']=='' && $tabMandataires['sirenMand']==''){
|
||||
@ -242,7 +269,7 @@ class MandataireController extends Zend_Controller_Action
|
||||
$fields = 'Siret avec la bonne taille';
|
||||
$error = true;
|
||||
}
|
||||
|
||||
|
||||
if($tabMandataires['Nom']=='' ){$fields[] ='Nom'; $error = true;}
|
||||
if($tabMandataires['type']==''){$fields[] ='Type'; $error = true;}
|
||||
if($tabMandataires['tribunal']==''){$fields[] ='Tribunal'; $error = true;}
|
||||
@ -252,24 +279,26 @@ class MandataireController extends Zend_Controller_Action
|
||||
if($tabMandataires['cp']==''){$fields[] ='Code Postal'; $error = true;}
|
||||
if($tabMandataires['ville']==''){$fields[] ='Ville'; $error = true;}
|
||||
if($tabMandataires['tel']==''){$fields[] ='Téléphone'; $error = true;}
|
||||
|
||||
|
||||
//Envoi de la requête au webservices
|
||||
if ($error==true){
|
||||
$message = '<font color="red">';
|
||||
$message.= 'Veuillez remplir les champs suivants : ';
|
||||
$message.= join(', ', $fields);
|
||||
$message.= '</font>';
|
||||
}else{
|
||||
} else {
|
||||
$message='';
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->setMandataire($tabMandataires);
|
||||
if ($reponse===false || $reponse->result==false){
|
||||
$message = 'Une erreur s\'est produite durant l\'enregistrement';
|
||||
if ( $reponse===false ){
|
||||
$message = "Une erreur s'est produite durant l'enregistrement";
|
||||
} elseif ( is_string($reponse) ) {
|
||||
$message = $reponse;
|
||||
}
|
||||
}
|
||||
echo $message;
|
||||
}
|
||||
|
||||
|
||||
protected function htmlentitydecode_deep($value)
|
||||
{
|
||||
$value = is_array($value) ?
|
||||
@ -277,7 +306,7 @@ class MandataireController extends Zend_Controller_Action
|
||||
html_entity_decode($value, ENT_QUOTES);
|
||||
return $value;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
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,8 +1,23 @@
|
||||
<?php
|
||||
class PrintController extends Zend_Controller_Action
|
||||
{
|
||||
protected $theme;
|
||||
|
||||
public function init(){}
|
||||
/**
|
||||
* Logger
|
||||
* @var \Monolog\Logger
|
||||
*/
|
||||
protected $logger;
|
||||
|
||||
public function init()
|
||||
{
|
||||
if (Zend_Registry::isRegistered('logger')) {
|
||||
$this->logger = Zend_Registry::get('logger');
|
||||
}
|
||||
|
||||
// --- Theme
|
||||
$this->theme = Zend_Registry::get('theme');
|
||||
}
|
||||
|
||||
/**
|
||||
* Renvoie les paramètres pour l'impression
|
||||
@ -30,8 +45,7 @@ class PrintController extends Zend_Controller_Action
|
||||
$params['mil'] = $elements[5];
|
||||
break;
|
||||
case 'liasse':
|
||||
$params['unit'] = $elements[4];
|
||||
$params['date'] = $elements[5];
|
||||
$params['date'] = $elements[3];
|
||||
break;
|
||||
}
|
||||
$params['siret'] = $elements[2];
|
||||
@ -69,6 +83,11 @@ class PrintController extends Zend_Controller_Action
|
||||
case 'evaluation':
|
||||
$params['siret'] = $elements[2];
|
||||
$params['id'] = $elements[3];
|
||||
switch($action){
|
||||
case 'scoreshisto':
|
||||
$params['type'] = $elements[4];
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 'giant':
|
||||
$params['Pays'] = $elements[2];
|
||||
@ -121,7 +140,7 @@ class PrintController extends Zend_Controller_Action
|
||||
$fichier = str_replace('.pdf', '', $fichier);
|
||||
|
||||
$c = Zend_Registry::get('config');
|
||||
$file = $c->profil->path->pages.'/'.$fichier.'.html';
|
||||
$file = $c->profil->path->shared.'/pages/'.$fichier.'.html';
|
||||
if (!file_exists($file))
|
||||
{
|
||||
echo 'Fichier introuvable';
|
||||
@ -200,6 +219,7 @@ class PrintController extends Zend_Controller_Action
|
||||
}
|
||||
$this->view->assign('controller', $elements['controller']);
|
||||
$this->view->assign('action', $elements['action']);
|
||||
$this->logger->info(print_r($elements['params'],1));
|
||||
$this->view->assign('params', $elements['params']);
|
||||
}
|
||||
|
||||
@ -219,7 +239,7 @@ class PrintController extends Zend_Controller_Action
|
||||
}
|
||||
|
||||
$c = Zend_Registry::get('config');
|
||||
$file = $c->profil->path->files.'/'.$fichier;
|
||||
$file = $c->profil->path->shared.'/files/'.$fichier;
|
||||
if (!file_exists($file)){
|
||||
echo "Erreur lors de la génération du fichier.";
|
||||
exit;
|
@ -3,8 +3,21 @@ class RechercheController extends Zend_Controller_Action
|
||||
{
|
||||
protected $theme;
|
||||
|
||||
/**
|
||||
* Logger
|
||||
* @var \Monolog\Logger
|
||||
*/
|
||||
protected $logger;
|
||||
|
||||
public function init()
|
||||
{
|
||||
if (Zend_Registry::isRegistered('logger')) {
|
||||
$this->logger = Zend_Registry::get('logger');
|
||||
}
|
||||
|
||||
// --- Theme
|
||||
$this->theme = Zend_Registry::get('theme');
|
||||
|
||||
/** Pour Giant **/
|
||||
if(isset($_SESSION['recherche']['giant']))
|
||||
unset($_SESSION['recherche']['giant']);
|
||||
@ -170,9 +183,8 @@ class RechercheController extends Zend_Controller_Action
|
||||
|
||||
} else {
|
||||
|
||||
require_once 'i18n/cleanchar.php';
|
||||
//Suppression des caractères accentués
|
||||
$txt = cleanstring($params['formA']['txt']);
|
||||
$txt = Scores_Locale_String::cleanstring($params['formA']['txt']);
|
||||
//Remplacement du caractère § par ~
|
||||
$txt = str_replace('$', '~', $txt);
|
||||
// Recherche siren tenant compte des anomalies d'OCR
|
||||
@ -211,11 +223,8 @@ class RechercheController extends Zend_Controller_Action
|
||||
'annee' => $annonce->Annee,
|
||||
'code' => $code,
|
||||
'text' => $texte,
|
||||
'file' => $this->view->url(array(
|
||||
'controller'=>'telechargement',
|
||||
'action'=>'histopdf',
|
||||
'q' => $fichier,
|
||||
'host' => base64_encode($host))
|
||||
'file' => $this->view->url(array('controller'=>'telechargement', 'action'=>'histopdf',
|
||||
'q' => $fichier, 'host' => base64_encode($host)), 'default', true
|
||||
),
|
||||
);
|
||||
}
|
||||
@ -287,10 +296,10 @@ class RechercheController extends Zend_Controller_Action
|
||||
$request = $this->getRequest();
|
||||
if ($request->isPost() && $form->isValid($request->getParams())) {
|
||||
|
||||
Zend_Registry::get('firebug')->info($form->getValues());
|
||||
$this->logger->info(print_r($form->getValues(),1));
|
||||
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->data).'/log';
|
||||
$path = $c->profil->path->shared.'/persist/log';
|
||||
$fp = fopen($path.'/enquetes.csv', 'a');
|
||||
fwrite($fp, date('Y/m/d H:i:s').' - '.print_r($form->getValues(),true)."\n");
|
||||
fclose($fp);
|
||||
@ -306,12 +315,12 @@ class RechercheController extends Zend_Controller_Action
|
||||
$message.= "Prénom : ".$user->getPrenom()."<br/>";
|
||||
$objet = "Demande d'investigation";
|
||||
|
||||
$mail = new Scores_Mail();
|
||||
$mail->setFrom('contact');
|
||||
$mail = new Scores_Mail_Method();
|
||||
$mail->setFromKey('contact');
|
||||
$mail->addToKey('support');
|
||||
$mail->setSubject($objet);
|
||||
$mail->setBodyHtml($message);
|
||||
$mail->send();
|
||||
$mail->execute();
|
||||
|
||||
} else {
|
||||
//Affichage formulaire
|
||||
@ -380,7 +389,7 @@ class RechercheController extends Zend_Controller_Action
|
||||
$required = array('dirNom', 'dirType');
|
||||
foreach($required as $item){
|
||||
if(empty($params[$item])){
|
||||
$this->_redirect('/recherche/worldcheck');
|
||||
$this->redirect('/recherche/worldcheck');
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -388,7 +397,7 @@ class RechercheController extends Zend_Controller_Action
|
||||
|
||||
//Redirection
|
||||
$token = $rechercheParams->save($type, $params);
|
||||
$this->_redirect('recherche/liste/token/'.$token);
|
||||
$this->redirect('recherche/liste/token/'.$token);
|
||||
}
|
||||
|
||||
//On selectionne en session
|
||||
@ -400,7 +409,7 @@ class RechercheController extends Zend_Controller_Action
|
||||
|
||||
//Giant
|
||||
if( !empty($params['pays']) && $type == 'ent' ){
|
||||
Zend_Registry::get('firebug')->info('RECHERCHE GIANT');
|
||||
$this->logger->info('RECHERCHE GIANT');
|
||||
$this->_forward('search', 'giant', null, $params);
|
||||
//Worldcheck
|
||||
} elseif ($type == 'wcheck' ) {
|
||||
@ -423,14 +432,12 @@ class RechercheController extends Zend_Controller_Action
|
||||
//Criteres recherche entreprise
|
||||
if ( $type=='ent' ) {
|
||||
|
||||
require_once 'i18n/cleanchar.php';
|
||||
|
||||
// Type de recherche = entreprises
|
||||
$telFax = trim(preg_replace('/[^0-9]/', '', $params['telFax']));
|
||||
$naf = trim(preg_replace('/[^0-9A-Z]/i', '', $params['naf']));
|
||||
|
||||
// Traitement des données formulaire
|
||||
$raisonSociale = cleanutf8($params['raisonSociale']);
|
||||
$raisonSociale = Scores_Locale_String::cleanutf8($params['raisonSociale']);
|
||||
$raisonSociale = str_replace(array('(',')', '/'), array('', '', ' '), $raisonSociale);
|
||||
|
||||
$numVoie = preg_replace('/[^0-9]/', '', $params['numero']);
|
||||
@ -438,10 +445,10 @@ class RechercheController extends Zend_Controller_Action
|
||||
$numVoie = '';
|
||||
}
|
||||
|
||||
$libVoie = cleanutf8($params['voie']);
|
||||
$libVoie = Scores_Locale_String::cleanutf8($params['voie']);
|
||||
$libVoie = str_replace(array('(',')', '/'), array('', '', ' '), $libVoie);
|
||||
|
||||
$cpVille = cleanutf8($params['cpVille']);
|
||||
$cpVille = Scores_Locale_String::cleanutf8($params['cpVille']);
|
||||
$cpVille = str_replace(array('(',')', '/'), array('', '', ' '), $cpVille);
|
||||
|
||||
|
||||
@ -495,7 +502,7 @@ class RechercheController extends Zend_Controller_Action
|
||||
$this->view->assign('rechCsv', $user->checkPerm('rechcsv'));
|
||||
|
||||
//Criteres recherche dirigeants
|
||||
} else if ( $type=='dir' ) {
|
||||
} else if ( $type == 'dir' ) {
|
||||
|
||||
// Type de recherche = dirigeants
|
||||
//$dirNom = preg_replace('/[^0-9A-Z]/', ' ', strtoupper($params['dirNom']));
|
||||
@ -584,7 +591,7 @@ class RechercheController extends Zend_Controller_Action
|
||||
$params[$key] = str_replace('/', ' ', $params[$key]);
|
||||
}
|
||||
|
||||
$criteresLien = $this->view->url($params, null, true);
|
||||
$criteresLien = $this->view->url($params, 'default', true);
|
||||
|
||||
$liste = array();
|
||||
if (count($etabs)>0) {
|
||||
@ -642,7 +649,7 @@ class RechercheController extends Zend_Controller_Action
|
||||
'action'=>'fiche',
|
||||
'id' => $etab->id,
|
||||
'siret' => $etab->Siren,
|
||||
), null, true);
|
||||
), 'default', true);
|
||||
|
||||
if ( $user->checkPerm('IDENTITE') ) {
|
||||
$infoEtab.= ' <a title="Voir la fiche d\'identité du siège de cette entreprise"'.
|
||||
@ -690,19 +697,19 @@ class RechercheController extends Zend_Controller_Action
|
||||
}
|
||||
$item['InfoActivite'] = $activite;
|
||||
|
||||
if ($type=='dir') {
|
||||
if ( $type == 'dir' ) {
|
||||
|
||||
$item['InfoDirigeant'] = '<u>Dirigeant recherché :</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<>'') {
|
||||
@ -729,6 +736,11 @@ class RechercheController extends Zend_Controller_Action
|
||||
|
||||
//Affichage accès direct aux pages
|
||||
$liens = array();
|
||||
/**
|
||||
* test en dur clients pour bilans
|
||||
* @todo client = 34
|
||||
* @todo client = 60
|
||||
*/
|
||||
if ($user->getIdClient()==34 || $user->getIdClient()==60) {
|
||||
$liens[] = array(
|
||||
'title' => 'Comptes annuels',
|
||||
@ -736,22 +748,26 @@ class RechercheController extends Zend_Controller_Action
|
||||
'controller'=>'pieces',
|
||||
'action'=>'bilans',
|
||||
'siret'=>$etab->Siren.$etab->Nic,
|
||||
'id'=>$etab->id), null, true),
|
||||
'id'=>$etab->id), 'default', true),
|
||||
);
|
||||
$liens[] = array(
|
||||
'title' => 'Actes et status',
|
||||
'href' => $this->view->url(array(
|
||||
'controller'=>'pieces', 'action'=>'actes',
|
||||
'siret'=>$etab->Siren.$etab->Nic, 'id'=>$etab->id), null, true),
|
||||
'siret'=>$etab->Siren.$etab->Nic, 'id'=>$etab->id), 'default', true),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* test en dur clients pour fiche
|
||||
* @todo client = 60
|
||||
*/
|
||||
if ($user->getIdClient()==60) {
|
||||
$liens[] = array(
|
||||
'title' => 'Fiche AGS',
|
||||
'href' => $this->view->url(array(
|
||||
'controller'=>'identite', 'action'=>'fichepc',
|
||||
'siret'=>$etab->Siren.$etab->Nic, 'id'=>$etab->id), null, true),
|
||||
'siret'=>$etab->Siren.$etab->Nic, 'id'=>$etab->id), 'default', true),
|
||||
);
|
||||
}
|
||||
if (count($liens)>0) {
|
||||
@ -780,7 +796,7 @@ class RechercheController extends Zend_Controller_Action
|
||||
'action' => 'liste',
|
||||
'type' => 'ent',
|
||||
'raisonSociale' => trim($criteres['dirNom'].' '.$criteres['dirPrenom'])
|
||||
), null, true));
|
||||
), 'default', true));
|
||||
} else {
|
||||
$this->view->assign('blockDirToEntreprise', false);
|
||||
}
|
||||
@ -790,6 +806,8 @@ class RechercheController extends Zend_Controller_Action
|
||||
//Calcul pagination
|
||||
$nbReponses = $reponse->nbReponses;
|
||||
$nbReponsesTotal = $reponse->nbReponsesTotal;
|
||||
$pagePrev=1;
|
||||
$pageNext=1;
|
||||
if ($nbReponses < $nbReponsesTotal) {
|
||||
$pageTotal = ceil( $nbReponsesTotal / $nbAffichage );
|
||||
$pageCurrent = $page;
|
||||
@ -911,7 +929,7 @@ class RechercheController extends Zend_Controller_Action
|
||||
$sql->where("LOWER(libelle) ".$where);
|
||||
}
|
||||
}
|
||||
Zend_Registry::get('firebug')->info($where);
|
||||
$this->logger->info($where);
|
||||
|
||||
$rows = $table->fetchAll($sql);
|
||||
if ( count($rows)>0 ) {
|
||||
@ -1018,7 +1036,7 @@ class RechercheController extends Zend_Controller_Action
|
||||
'action'=>'fiche',
|
||||
'id' => $etab->id,
|
||||
'siret' => $etab->Siren,
|
||||
));
|
||||
), 'default', true);
|
||||
$infoEtab.= ' <a title="Voir la fiche d\'identité du siège de cette entreprise"'.
|
||||
' href="'.$url.'">(Accès siège)</a>';
|
||||
}
|
||||
@ -1099,8 +1117,6 @@ class RechercheController extends Zend_Controller_Action
|
||||
//Criteres recherche entreprise
|
||||
if ($type=='ent'){
|
||||
|
||||
require_once 'i18n/cleanchar.php';
|
||||
|
||||
// Type de recherche = entreprises
|
||||
$telFax = trim(preg_replace('/[^0-9]/', '', $params['telFax']));
|
||||
$naf = trim(preg_replace('/[^0-9A-Z]/i', '', $params['naf']));
|
||||
@ -1114,8 +1130,8 @@ class RechercheController extends Zend_Controller_Action
|
||||
die('Numéro de voie incorrecte !');
|
||||
}
|
||||
|
||||
$libVoie = cleanutf8($params['voie']);
|
||||
$cpVille = cleanutf8($params['cpVille']);
|
||||
$libVoie = Scores_Locale_String::cleanutf8($params['voie']);
|
||||
$cpVille = Scores_Locale_String::cleanutf8($params['cpVille']);
|
||||
|
||||
if (preg_match("/^([0-9]{2,5})([\D]*)/i", $cpVille, $matches)) {
|
||||
$cp = trim($matches[1]);
|
||||
@ -1192,7 +1208,7 @@ class RechercheController extends Zend_Controller_Action
|
||||
//echo "<pre>"; print_r($etabs); echo "</pre>"; exit;
|
||||
|
||||
$c = Zend_Registry::get('config');
|
||||
$file = $c->profil->path->files . '/'.$user->getIdClient().'-'.$user->getLogin().'-'.date('YmdHis').'.csv';
|
||||
$file = $c->profil->path->shared . '/files/'.$user->getIdClient().'-'.$user->getLogin().'-'.date('YmdHis').'.csv';
|
||||
|
||||
$export = new Scores_Export_ArrayCsv($etabs, 'rechercheEntreprise');
|
||||
$export->writeFile($file);
|
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,8 @@
|
||||
<?php
|
||||
class SurveillanceController extends Zend_Controller_Action
|
||||
{
|
||||
protected $theme;
|
||||
|
||||
/**
|
||||
* Association source => texte
|
||||
* @var array
|
||||
@ -33,8 +35,21 @@ class SurveillanceController extends Zend_Controller_Action
|
||||
'liens' => 'survliens',
|
||||
);
|
||||
|
||||
/**
|
||||
* Logger
|
||||
* @var \Monolog\Logger
|
||||
*/
|
||||
protected $logger;
|
||||
|
||||
public function init()
|
||||
{
|
||||
if (Zend_Registry::isRegistered('logger')) {
|
||||
$this->logger = Zend_Registry::get('logger');
|
||||
}
|
||||
|
||||
// --- Theme
|
||||
$this->theme = Zend_Registry::get('theme');
|
||||
|
||||
require_once 'Scores/WsScores.php';
|
||||
}
|
||||
|
||||
@ -52,12 +67,13 @@ class SurveillanceController extends Zend_Controller_Action
|
||||
$this->_helper->layout->disableLayout();
|
||||
$request = $this->getRequest();
|
||||
$siret = $request->getParam('siret', '');
|
||||
$email = $request->getParam('email', '');
|
||||
$ref = $request->getParam('ref', '');
|
||||
$ref = $request->getParam('ref', '');
|
||||
$source = $request->getParam('source', '');
|
||||
$encours = $request->getParam('encours', 0);
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
|
||||
// Main email
|
||||
$email = $user->getEmail();
|
||||
|
||||
if( empty($source) ) {
|
||||
@ -102,6 +118,7 @@ class SurveillanceController extends Zend_Controller_Action
|
||||
|
||||
$page = $request->getParam('page');
|
||||
$from = $request->getParam('from');
|
||||
$q = $request->getParam('q');
|
||||
|
||||
$siret = $request->getParam('siret', '');
|
||||
$email = $request->getParam('email', '');
|
||||
@ -119,9 +136,11 @@ class SurveillanceController extends Zend_Controller_Action
|
||||
echo "Erreur lors de la suppression";
|
||||
}
|
||||
} elseif (isset($page)) {
|
||||
$this->_redirect('surveillance/liste/page/'.$page);
|
||||
$this->redirect('surveillance/liste/page/'.$page);
|
||||
} elseif (isset($q)) {
|
||||
$this->redirect('surveillance/liste/q/'.$q);
|
||||
} else {
|
||||
$this->_redirect('surveillance/liste');
|
||||
$this->redirect('surveillance/liste');
|
||||
}
|
||||
}
|
||||
|
||||
@ -140,27 +159,53 @@ class SurveillanceController extends Zend_Controller_Action
|
||||
$delete = $request->getParam('delete', false);
|
||||
$encours = $request->getParam('encours', 0);
|
||||
|
||||
//Vérification siret / email / ref
|
||||
if (empty($siret) || empty($email) | empty($ref)){
|
||||
$msg = 'Erreur email ou reférence non définie !';
|
||||
$validateur = new Zend_Validate_EmailAddress();
|
||||
|
||||
// --- Vérification siret
|
||||
if ( empty($siret) ){
|
||||
$msg = 'Erreur SIRET non définie !';
|
||||
}
|
||||
//Vérification de l'encours (chiffres)
|
||||
elseif (!preg_match('/([0-9]+)/', $encours)){
|
||||
$msg = 'Encours incorrect';
|
||||
// --- Vérification email
|
||||
elseif ( empty($email) ){
|
||||
$msg = 'Erreur email non définie !';
|
||||
}
|
||||
// --- Vérification ref
|
||||
elseif ( empty($ref) ){
|
||||
$msg = 'Erreur reférence non définie !';
|
||||
} else {
|
||||
if (!empty($delete)){
|
||||
$delete = true;
|
||||
}
|
||||
$ws = new WsScores();
|
||||
$set = $ws->setSurveillance($siret, $email, $ref, $source, $delete, $encours);
|
||||
if ($set) {
|
||||
if ($delete) { $msg = "Suppression surveillance $source"; }
|
||||
else { $msg = "Mise sous surveillance $source"; }
|
||||
} else {
|
||||
if ($delete) { $msg = "Erreur lors de la suppression de la surveillance $source"; }
|
||||
else { $msg = "Erreur lors de la mise sous surveillance $source"; }
|
||||
}
|
||||
// --- Vérification des emails
|
||||
$emails = explode(';', $email);
|
||||
$emailsValid = true;
|
||||
foreach ( $emails as $e ) {
|
||||
if ( !$validateur->isValid($e) ) {
|
||||
$emailsValid = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ( $emailsValid ) {
|
||||
//Vérification de l'encours (chiffres)
|
||||
if (!preg_match('/([0-9]+)/', $encours)){
|
||||
$msg = 'Encours incorrect';
|
||||
} else {
|
||||
if (!empty($delete)){
|
||||
$delete = true;
|
||||
}
|
||||
$ws = new WsScores();
|
||||
$set = $ws->setSurveillance($siret, $email, $ref, $source, $delete, $encours);
|
||||
if ($set) {
|
||||
if ($delete) { $msg = "Suppression surveillance $source"; }
|
||||
else { $msg = "Mise sous surveillance $source"; }
|
||||
} else {
|
||||
if ($delete) { $msg = "Erreur lors de la suppression de la surveillance $source"; }
|
||||
else { $msg = "Erreur lors de la mise sous surveillance $source"; }
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$msg = "Email invalide.";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$this->view->assign('msg', $msg);
|
||||
}
|
||||
|
||||
@ -207,7 +252,7 @@ class SurveillanceController extends Zend_Controller_Action
|
||||
$filtre->detail = false;
|
||||
|
||||
$infos = $ws->getSurveillances($filtre);
|
||||
Zend_Registry::get('firebug')->info($infos);
|
||||
$this->logger->info(print_r($infos,1));
|
||||
|
||||
if (property_exists($infos->result, 'item') && count($infos->result->item)>0) {
|
||||
$titre = 'Ajouter une surveillance';
|
||||
@ -265,7 +310,7 @@ class SurveillanceController extends Zend_Controller_Action
|
||||
|
||||
$this->view->headScript()
|
||||
->appendFile('/libs/tablesorter/jquery.tablesorter.js', 'text/javascript')
|
||||
->appendFile('/themes/default/scripts/surveillance.js', 'text/javascript');
|
||||
->appendFile($this->theme->pathScript.'/surveillance.js', 'text/javascript');
|
||||
|
||||
$request = $this->getRequest();
|
||||
|
||||
@ -338,7 +383,7 @@ class SurveillanceController extends Zend_Controller_Action
|
||||
$ws = new WsScores();
|
||||
$infos = $ws->getSurveillances($filtre, $position, $nbAffichage);
|
||||
|
||||
$surveillances = $infos->result->item;
|
||||
$surveillances = isset($infos->result->item)?$infos->result->item:null;
|
||||
|
||||
$listTrier = array();
|
||||
if ( count($surveillances)>0 ) {
|
||||
@ -380,10 +425,12 @@ class SurveillanceController extends Zend_Controller_Action
|
||||
}
|
||||
} else {
|
||||
$pageTotal = $pageCurrent = 1;
|
||||
$pagePrev = 1;
|
||||
$pageNext = 1;
|
||||
}
|
||||
$this->view->assign('PageTotal', $pageTotal);
|
||||
$this->view->assign('PagePrev', $pagePrev);
|
||||
$this->view->assign('PageNext', $pageNext);
|
||||
$this->view->assign('PagePrev', isset($pagePrev)?$pagePrev:1);
|
||||
$this->view->assign('PageNext', isset($pageNext)?$pageNext:1);
|
||||
$this->view->assign('PageCurrent', $pageCurrent);
|
||||
|
||||
$this->view->assign('nbReponses', empty($nbReponses) ? 0 : $nbReponses);
|
||||
@ -406,9 +453,12 @@ class SurveillanceController extends Zend_Controller_Action
|
||||
$this->_forward('perms', 'error');
|
||||
}
|
||||
|
||||
$this->view->headLink()
|
||||
->appendStylesheet('/libs/tablesorter/themes/blue/style.css', 'all');
|
||||
|
||||
$this->view->headScript()
|
||||
->appendFile('/libs/tablesorter/jquery.tablesorter.js', 'text/javascript')
|
||||
->appendFile('/themes/default/scripts/surveillance.js', 'text/javascript');
|
||||
->appendFile($this->theme->pathScript.'/surveillance.js', 'text/javascript');
|
||||
|
||||
$request = $this->getRequest();
|
||||
|
||||
@ -459,15 +509,15 @@ class SurveillanceController extends Zend_Controller_Action
|
||||
);
|
||||
|
||||
$couleurRisque100 = array(
|
||||
'rouge' => array('min'=>0, 'max'=>40),
|
||||
'orange' => array('min'=>41, 'max'=>50),
|
||||
'vert' => array('min'=>51, 'max'=>100),
|
||||
'rouge' => array('min' => 0, 'max' => 40),
|
||||
'orange' => array('min' => 41, 'max' => 50),
|
||||
'vert' => array('min' => 51, 'max' => 100),
|
||||
);
|
||||
|
||||
$couleurRisque20 = array(
|
||||
'rouge' => array('min'=>0, 'max'=>6),
|
||||
'orange' => array('min'=>7, 'max'=>10),
|
||||
'vert' => array('min'=>11, 'max'=>20),
|
||||
'rouge' => array('min' => 0, 'max' => 6),
|
||||
'orange' => array('min' => 7, 'max' => 10),
|
||||
'vert' => array('min' => 11, 'max' => 20),
|
||||
);
|
||||
|
||||
$ws = new WsScores();
|
||||
@ -596,6 +646,8 @@ class SurveillanceController extends Zend_Controller_Action
|
||||
}
|
||||
} else {
|
||||
$pageTotal = $pageCurrent = 1;
|
||||
$pagePrev = 1;
|
||||
$pageNext = 1;
|
||||
}
|
||||
$this->view->assign('PageTotal', $pageTotal);
|
||||
$this->view->assign('PagePrev', $pagePrev);
|
||||
@ -613,7 +665,7 @@ class SurveillanceController extends Zend_Controller_Action
|
||||
*/
|
||||
public function portefeuillecsvAction()
|
||||
{
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/portefeuillecsv.js', 'text/javascript');
|
||||
$this->view->headScript()->appendFile($this->theme->pathScript.'/portefeuillecsv.js', 'text/javascript');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -621,7 +673,7 @@ class SurveillanceController extends Zend_Controller_Action
|
||||
*/
|
||||
public function surveillancecsvAction()
|
||||
{
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/surveillancecsv.js', 'text/javascript');
|
||||
$this->view->headScript()->appendFile($this->theme->pathScript.'/surveillancecsv.js', 'text/javascript');
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
|
||||
@ -649,30 +701,25 @@ class SurveillanceController extends Zend_Controller_Action
|
||||
*/
|
||||
public function fichierAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
ini_set('max_execution_time', 120);
|
||||
|
||||
$request = $this->getRequest();
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
|
||||
$this->view->assign('login', $user->getLogin());
|
||||
$this->view->assign('nom', $user->getNom());
|
||||
|
||||
$client = new SoapClient(null, array(
|
||||
'trace' => 1,
|
||||
'soap_version' => SOAP_1_1,
|
||||
'location' => 'http://78.31.45.206/ws2/',
|
||||
'uri' => 'http://78.31.45.206/',
|
||||
'login' => $user->getLogin(),
|
||||
'password' => $user->getPassword()
|
||||
));
|
||||
$client = new Scores_Ws_Client('interne', '0.6');
|
||||
|
||||
$nomFic = $request->getParam('nomFic', '');
|
||||
$getCSV = $request->getParam('get', '');
|
||||
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = $c->profil->path->files;
|
||||
$path = $c->profil->path->shared.'/files';
|
||||
|
||||
//Lister les fichiers
|
||||
if (empty($nomFic)){
|
||||
// --- Lister les fichiers
|
||||
if (empty($nomFic)) {
|
||||
$ref = $user->getPrenom();
|
||||
if ( strtolower($user->getLogin())=='cnasea95'
|
||||
|| strtolower($user->getLogin())=='cnasea96'
|
||||
@ -687,21 +734,25 @@ class SurveillanceController extends Zend_Controller_Action
|
||||
$ref='*';
|
||||
}
|
||||
try {
|
||||
$O = $client->getListeFichierSurv($user->getLogin(), $ref, $nomFic);
|
||||
$tabFichier = $O['results'];
|
||||
$params = new stdClass();
|
||||
$params->login = $user->getLogin();
|
||||
$params->ref = $ref;
|
||||
$params->nomFic = '';
|
||||
$response = $client->getListeFichierSurv($params);
|
||||
$tabFichier = $response->result->item;
|
||||
} catch (SoapFault $fault) {}
|
||||
|
||||
$listeFichier = array();
|
||||
foreach($tabFichier as $fichier){
|
||||
$tabTmp = explode('_', $fichier);
|
||||
$tabTmp = explode('_', $fichier->UrlFichier);
|
||||
$date = new Zend_Date(substr($tabTmp[2],0,8),'yyyyMMdd');
|
||||
$localfile = $path.'/'.$fichier;
|
||||
$localfile = $path.'/'.basename($fichier->UrlFichier);
|
||||
$dejaLu = false;
|
||||
if (!file_exists($localfile)) {
|
||||
$dejaLu = true;
|
||||
}
|
||||
$result = array(
|
||||
'fichier' => $fichier,
|
||||
'fichier' => basename($fichier->UrlFichier),
|
||||
'date' => $date->toString('dd/MM/yyyy'),
|
||||
'dejaLu' => $dejaLu,
|
||||
);
|
||||
@ -709,14 +760,14 @@ class SurveillanceController extends Zend_Controller_Action
|
||||
}
|
||||
$this->view->assign('listeFichier', $listeFichier);
|
||||
}
|
||||
//Lister les annonces
|
||||
elseif (empty($getCSV))
|
||||
{
|
||||
// --- Lister les annonces
|
||||
elseif (empty($getCSV)) {
|
||||
|
||||
$selectFiltre = array(
|
||||
'procol' => array('lib'=> 'Procédures collectives', 'select'=>''),
|
||||
'radiations' => array('lib'=> 'Radiations', 'select'=>''),
|
||||
'ventes' => array('lib'=> 'Ventes/Cessions', 'select'=>''),
|
||||
'mmd' => array('lib'=> 'Modifications diverses', 'select'=>''),
|
||||
'procol' => array('lib'=> 'Procédures collectives', 'select'=>''),
|
||||
'radiations' => array('lib'=> 'Radiations', 'select'=>''),
|
||||
'ventes' => array('lib'=> 'Ventes/Cessions', 'select'=>''),
|
||||
'mmd' => array('lib'=> 'Modifications diverses', 'select'=>''),
|
||||
);
|
||||
|
||||
$filtre = $request->getParam('filtre', '');
|
||||
@ -728,9 +779,9 @@ class SurveillanceController extends Zend_Controller_Action
|
||||
$filtre = 'procol';
|
||||
} elseif (strtolower($user->getLogin())=='cpcambr14') {
|
||||
$selectFiltre = array(
|
||||
'radiations' => array('lib'=> 'Radiations', 'select'=>''),
|
||||
'ventes' => array('lib'=> 'Ventes/Cessions', 'select'=>''),
|
||||
'mmd' => array('lib'=> 'Modifications diverses', 'select'=>''),
|
||||
'radiations' => array('lib'=> 'Radiations', 'select'=>''),
|
||||
'ventes' => array('lib'=> 'Ventes/Cessions', 'select'=>''),
|
||||
'mmd' => array('lib'=> 'Modifications diverses', 'select'=>''),
|
||||
);
|
||||
}
|
||||
|
||||
@ -756,16 +807,21 @@ class SurveillanceController extends Zend_Controller_Action
|
||||
if (!file_exists($file) || filesize($file)==0 ) {
|
||||
//Génération du fichier
|
||||
try {
|
||||
$O = $client->getListeFichierSurv($user->getLogin(), $user->getPrenom(), $nomFic);
|
||||
$params = new stdClass();
|
||||
$params->login = $user->getLogin();
|
||||
$params->ref = $ref;
|
||||
$params->nomFic = $nomFic;
|
||||
$response = $client->getListeFichierSurv($params);
|
||||
$fileUrl = $response->result->item[0]->UrlFichier.'.bz2';
|
||||
} catch (SoapFault $fault) {}
|
||||
|
||||
try {
|
||||
$client = new Zend_Http_Client('http://78.31.45.206/csv/'.$nomFic.'.bz2');
|
||||
$client = new Zend_Http_Client($fileUrl);
|
||||
$client->setStream();
|
||||
$response = $client->request('GET');
|
||||
if ( copy($response->getStreamName(), $file.'.bz2') ) {
|
||||
$bz = bzopen($file.'.bz2', "r") or die("Impossible d'ouvrir le fichier $file");
|
||||
$fp=fopen($file, 'w');
|
||||
$bz = bzopen($file.'.bz2', "r");
|
||||
$fp = fopen($file, 'w');
|
||||
while (!feof($bz)) {
|
||||
fwrite($fp, bzread($bz, 4096));
|
||||
}
|
||||
@ -842,7 +898,10 @@ class SurveillanceController extends Zend_Controller_Action
|
||||
$this->view->assign('annonces', $tab);
|
||||
$this->view->assign('nomFic', $nomFic);
|
||||
$this->renderScript('surveillance/fichier-ann.phtml');
|
||||
} else {
|
||||
|
||||
}
|
||||
// --- Livraison du fichier
|
||||
else {
|
||||
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
@ -851,17 +910,22 @@ class SurveillanceController extends Zend_Controller_Action
|
||||
$file = $path.'/'.$nomFic;
|
||||
if (!file_exists($file) || filesize($file)==0 ) {
|
||||
//Génération du fichier
|
||||
try {
|
||||
$O = $client->getListeFichierSurv($user->getLogin(), $user->getPrenom(), $nomFic);
|
||||
try {
|
||||
$params = new stdClass();
|
||||
$params->login = $user->getLogin();
|
||||
$params->ref = $ref;
|
||||
$params->nomFic = $nomFic;
|
||||
$response = $client->getListeFichierSurv($params);
|
||||
$fileUrl = $response->result->item[0]->UrlFichier.'.bz2';
|
||||
} catch (SoapFault $fault) {}
|
||||
|
||||
try {
|
||||
$client = new Zend_Http_Client('http://78.31.45.206/csv/'.$nomFic.'.bz2');
|
||||
$client = new Zend_Http_Client($fileUrl);
|
||||
$client->setStream();
|
||||
$response = $client->request('GET');
|
||||
if ( copy($response->getStreamName(), $file.'.bz2') ) {
|
||||
$bz = bzopen($file.'.bz2', "r") or die("Impossible d'ouvrir le fichier $file");
|
||||
$fp=fopen($file, 'w');
|
||||
$bz = bzopen($file.'.bz2', "r");
|
||||
$fp = fopen($file, 'w');
|
||||
while (!feof($bz)) {
|
||||
fwrite($fp, bzread($bz, 4096));
|
||||
}
|
||||
@ -901,14 +965,7 @@ class SurveillanceController extends Zend_Controller_Action
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
|
||||
$client = new SoapClient(null, array(
|
||||
'trace' => 1,
|
||||
'soap_version' => SOAP_1_1,
|
||||
'location' => 'http://78.31.45.206/ws2/',
|
||||
'uri' => 'http://78.31.45.206/',
|
||||
'login' => $user->getLogin(),
|
||||
'password' => $user->getPassword()
|
||||
));
|
||||
$client = new Scores_Ws_Client('interne', '0.6');
|
||||
|
||||
$nomFic = $request->getParam('q', '');
|
||||
|
||||
@ -931,18 +988,23 @@ class SurveillanceController extends Zend_Controller_Action
|
||||
}
|
||||
}
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = $c->profil->path->files;
|
||||
$path = $c->profil->path->shared.'/files';
|
||||
|
||||
//Récupération du fichier
|
||||
$file = $path.'/'.$nomFic;
|
||||
if (!file_exists($file) || filesize($file)==0 ) {
|
||||
//Génération du fichier
|
||||
try {
|
||||
$O = $client->getListeFichierSurv($user->getLogin(), $user->getPrenom(), $nomFic);
|
||||
} catch (SoapFault $fault) {}
|
||||
try {
|
||||
$params = new stdClass();
|
||||
$params->login = $user->getLogin();
|
||||
$params->ref = $ref;
|
||||
$params->nomFic = $nomFic;
|
||||
$response = $client->getListeFichierSurv($params);
|
||||
$fileUrl = $response->item[0]->UrlFichier;
|
||||
} catch (SoapFault $fault) {}
|
||||
|
||||
try {
|
||||
$client = new Zend_Http_Client('http://78.31.45.206/csv/'.$nomFic.'.bz2');
|
||||
$client = new Zend_Http_Client($fileUrl);
|
||||
$client->setStream();
|
||||
$response = $client->request('GET');
|
||||
if ( copy($response->getStreamName(), $file.'.bz2') ) {
|
||||
@ -1085,7 +1147,7 @@ class SurveillanceController extends Zend_Controller_Action
|
||||
}
|
||||
$count++;
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
/*
|
||||
* Fermeture de la balise page lorsqu'il n'y a aucune annonce
|
||||
* afin de générer un fichier pdf vide et non pas une erreur
|
||||
@ -1093,9 +1155,60 @@ class SurveillanceController extends Zend_Controller_Action
|
||||
$output = '</page>';
|
||||
}
|
||||
// conversion HTML => PDF
|
||||
require_once 'Vendors/html2pdf/html2pdf.class.php';
|
||||
$html2pdf = new HTML2PDF('P','A4','fr');
|
||||
$html2pdf->WriteHTML(utf8_decode($output));
|
||||
$html2pdf->Output(str_replace('.csv', '.pdf', $nomFic), 'D');
|
||||
}
|
||||
|
||||
/**
|
||||
* Import surveillance en fichier csv
|
||||
*/
|
||||
public function surveillanceserieAction(){
|
||||
//echo 'coucou';die;
|
||||
$request = $this->getRequest();
|
||||
if($request->getParam('ref')>""){
|
||||
$cs=new Scores_Import_FileCsv();
|
||||
$verif=$cs->verifandupload($_FILES,$request);
|
||||
if($verif['success']){
|
||||
$this->view->assign('msg', 'Nous avons enregistré votre fichier de '.$verif['message'].' lignes.<br><br>Les surveillances seront enregistrées durant la nuit.');
|
||||
$this->view->assign('step', 2);
|
||||
}else{
|
||||
$this->view->assign('msg', $verif['message']);
|
||||
$this->view->assign('step', 2);
|
||||
}
|
||||
return;
|
||||
}
|
||||
//Affichage formulaire demande ref et email
|
||||
$this->_helper->layout->disableLayout();
|
||||
$source = $request->getParam('source', '');
|
||||
$encours = $request->getParam('encours', 0);
|
||||
$this->view->pathScript=$this->theme->pathScript;
|
||||
$this->view->pathStyle=$this->theme->pathStyle;
|
||||
$user = new Scores_Utilisateur();
|
||||
|
||||
$request = $this->getRequest();
|
||||
$source = $request->getParam('source');
|
||||
|
||||
$tabSource = array();
|
||||
$user = new Scores_Utilisateur();
|
||||
|
||||
// Main email
|
||||
$email = $user->getEmail();
|
||||
$ref=$user->identity->id . 'surv'.Date('YmdHis');
|
||||
foreach ($this->sourceDroit as $s => $perm) {
|
||||
if ($user->checkPerm($perm)) {
|
||||
$tabSource[] = array(
|
||||
'value' => $s,
|
||||
'name' => $this->sourceTxt[$s],
|
||||
'select' => (!empty($source) && $source==$s) ? ' selected' : '',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$this->view->assign('tabSource', $tabSource);
|
||||
$this->view->assign('email', $email);
|
||||
$this->view->assign('ref', $ref);
|
||||
$this->view->assign('encours', $encours);
|
||||
$this->view->msg="Sélectionnez votre fichier";
|
||||
}
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,13 +1,27 @@
|
||||
<?php
|
||||
class WorldcheckController extends Zend_Controller_Action
|
||||
{
|
||||
protected $wcConfig;
|
||||
|
||||
protected $theme;
|
||||
protected $wcConfig;
|
||||
|
||||
/**
|
||||
* Logger
|
||||
* @var \Monolog\Logger
|
||||
*/
|
||||
protected $logger;
|
||||
|
||||
public function init()
|
||||
{
|
||||
require_once 'WorldCheck/WsWorldCheck.php';
|
||||
if (Zend_Registry::isRegistered('logger')) {
|
||||
$this->logger = Zend_Registry::get('logger');
|
||||
}
|
||||
|
||||
// --- Theme
|
||||
$this->theme = Zend_Registry::get('theme');
|
||||
|
||||
require_once 'WorldCheck/WsWorldCheck.php';
|
||||
require_once 'Scores/Cache.php';
|
||||
|
||||
|
||||
$configWC = new Zend_Config_Ini(APPLICATION_PATH . '/../library/WorldCheck/applicationWC.ini');
|
||||
$this->wcConfig = $configWC->worldcheck->toArray();
|
||||
}
|
||||
@ -23,7 +37,7 @@ class WorldcheckController extends Zend_Controller_Action
|
||||
$param->dirNom = ($dirNom)?$dirNom:$request->getParam('dirSociete');
|
||||
$param->dirPrenom = $request->getParam('dirPrenom');
|
||||
$param->dirType = $request->getParam('dirType');
|
||||
|
||||
|
||||
$entityId = $request->getParam('entityId', null);
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
@ -35,7 +49,7 @@ class WorldcheckController extends Zend_Controller_Action
|
||||
$localDBParams = $wcLocal->getScreenerId($param);
|
||||
$param->matchCount = $localDBParams->matchCount;
|
||||
$param->nameIdentifier = $localDBParams->nameIdentifier;
|
||||
|
||||
|
||||
if ($entityId===null) {
|
||||
//$this->_redirect('/worldcheck/list');
|
||||
$params = array(
|
||||
@ -45,7 +59,7 @@ class WorldcheckController extends Zend_Controller_Action
|
||||
$this->forward('list', null, null, $params);
|
||||
} else {
|
||||
$id = $request->getParam('id', null);
|
||||
|
||||
|
||||
$data = new stdClass();
|
||||
$data->nameIdentifier = $param->nameIdentifier;
|
||||
$data->matchType = 'WATCHLIST';
|
||||
@ -54,14 +68,14 @@ class WorldcheckController extends Zend_Controller_Action
|
||||
$paramAssoc = new stdClass();
|
||||
$paramAssoc->matchIdentifier = $matchArr[$entityId];
|
||||
$paramAssoc->nameType = $param->dirType;
|
||||
|
||||
|
||||
$nodeParam = $wc->getAssociates($paramAssoc);
|
||||
$wcLocal->setTree($nodeParam);
|
||||
|
||||
$this->redirect('/worldcheck/orgchildren/entityid/'.$entityId.'/id/'.$id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* List results of WorldCheck search
|
||||
*/
|
||||
@ -71,7 +85,7 @@ class WorldcheckController extends Zend_Controller_Action
|
||||
|
||||
$wc = new WsWorldCheck();
|
||||
$param = new stdClass();
|
||||
|
||||
|
||||
$nameIdentifier = $request->getParam('nameIdentifier');
|
||||
$matchCount = $request->getParam('matchCount');
|
||||
$dirNom = $request->getParam('dirNom');
|
||||
@ -160,7 +174,7 @@ class WorldcheckController extends Zend_Controller_Action
|
||||
if ($request->getParam('dirNom')) $data->Nom = $request->getParam('dirNom');
|
||||
if ($request->getParam('dirPrenom')) $data->Prenom = $request->getParam('dirPrenom');
|
||||
if ($request->getParam('dirSociete')) $data->Societe = $request->getParam('dirSociete');
|
||||
|
||||
|
||||
$data->Soc = new stdClass();
|
||||
if ($request->getParam('dirSocNom2')) $data->Soc->Nom2 = $request->getParam('dirSocNom2');
|
||||
if ($request->getParam('dirSocNomLong')) $data->Soc->NomLong = $request->getParam('dirSocNomLong');
|
||||
@ -192,7 +206,7 @@ class WorldcheckController extends Zend_Controller_Action
|
||||
|
||||
$db = new Application_Model_Worldcheck();
|
||||
$db->setTree($nodeParam);
|
||||
|
||||
|
||||
$cache = new Cache();
|
||||
$content = $cache->wcCache($this->wcConfig['cachedir'], $wc, "getDetailsContent", $param, $param->matchIdentifier);
|
||||
|
||||
@ -200,7 +214,7 @@ class WorldcheckController extends Zend_Controller_Action
|
||||
$this->view->assign('nameType', $param->nameType);
|
||||
$this->view->assign('exportObjet', $content[0]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* le Parent de l'organigramme des associés
|
||||
*/
|
||||
@ -211,7 +225,7 @@ class WorldcheckController extends Zend_Controller_Action
|
||||
|
||||
$request = $this->getRequest();
|
||||
$entityId = $request->getParam('entityid', null);
|
||||
|
||||
|
||||
$wcLocal = new Application_Model_Worldcheck();
|
||||
$currentBranch = $wcLocal->getTree($entityId);
|
||||
|
||||
@ -222,14 +236,14 @@ class WorldcheckController extends Zend_Controller_Action
|
||||
$data = new stdClass();
|
||||
$data->title = $primary['fullName'];
|
||||
$data->icon = "/themes/default/images/worldcheck/".strtolower($primary['nameType']).".png";
|
||||
|
||||
|
||||
$attr = new stdClass();
|
||||
$attr->id = uniqid('wc_');
|
||||
$attr->entityId = $primary['entityId'];
|
||||
$attr->nameType = $primary['nameType'];
|
||||
$attr->lastName = $primary['lastName'];
|
||||
$attr->givenName = $primary['givenName'];
|
||||
|
||||
|
||||
$parent[] = array(
|
||||
"data" => $data,
|
||||
"attr" => $attr,
|
||||
@ -252,7 +266,7 @@ class WorldcheckController extends Zend_Controller_Action
|
||||
$request = $this->getRequest();
|
||||
$entityId = $request->getParam('entityid', null);
|
||||
$id = $request->getParam('id', null);
|
||||
|
||||
|
||||
$wcLocal = new Application_Model_Worldcheck();
|
||||
$currentBranch = $wcLocal->getTree($entityId);
|
||||
|
||||
@ -261,18 +275,18 @@ class WorldcheckController extends Zend_Controller_Action
|
||||
$children = array();
|
||||
|
||||
foreach ($associates as $associate) {
|
||||
|
||||
|
||||
$data = new stdClass();
|
||||
$data->title = $associate['fullName'];
|
||||
$data->icon = "/themes/default/images/worldcheck/".strtolower($associate['nameType']).".png";
|
||||
|
||||
|
||||
$attr = new stdClass();
|
||||
$attr->id = uniqid('wc_');
|
||||
$attr->entityId = $associate['entityId'];
|
||||
$attr->nameType = $associate['nameType'];
|
||||
$attr->lastName = $associate['lastName'];
|
||||
$attr->givenName = $associate['givenName'];
|
||||
|
||||
|
||||
$children[] = array(
|
||||
"data" => $data,
|
||||
"attr" => $attr,
|
||||
@ -284,7 +298,7 @@ class WorldcheckController extends Zend_Controller_Action
|
||||
$jData = json_encode($children);
|
||||
$this->view->assign('data', $jData);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Affichage de l'information courte de chaque node dans le popup
|
||||
*/
|
@ -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');
|
||||
@ -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>
|
@ -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();
|
@ -36,17 +36,13 @@
|
||||
<td class="StyleInfoData" width="270"><?=$dir->Titre?></td>
|
||||
<td class="StyleInfoData" width="200"><?=$dir->Societe.' '.$dir->Nom.' '.$dir->Prenom?></td>
|
||||
<td class="StyleInfoData" width="200">
|
||||
<?php if ($dir->DateFct != '') { ?>
|
||||
<?=$this->translate("Modification le")?>
|
||||
<?php
|
||||
if (strpos($dir->DateFct, '/') != false) {
|
||||
echo $dir->DateFct.' ';
|
||||
} else {
|
||||
$date = new Zend_Date($dir->DateFct,'yyyy-MM-dd');
|
||||
echo $date->toString('dd/MM/yyyy');
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if ($dir->DateFct != '0000-00-00') {
|
||||
$date = new Zend_Date($dir->DateFct,'yyyy-MM-dd'); ?>
|
||||
<?php if ( Zend_Date::isDate($date) ) { ?>
|
||||
<?=$this->translate("Modification le") . ' ' . $date->toString('dd/MM/yyyy');?>
|
||||
<?php }?>
|
||||
<?php }?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php }?>
|
@ -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>
|
@ -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() {
|
@ -0,0 +1,299 @@
|
||||
<?php if ( empty($this->AutrePage) ) {?>
|
||||
<div id="center">
|
||||
<?php }?>
|
||||
|
||||
<?php if ( empty($this->AutrePage) ) {?>
|
||||
<h1>INDISCORE©</h1>
|
||||
<div class="paragraph">
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Numéro identifiant Siren</td>
|
||||
<td width="350" class="StyleInfoData"><?=$this->SirenTexte($this->indiscore->Siren)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Numéro identifiant Siret du siège</td>
|
||||
<td width="350" class="StyleInfoData"><?=$this->SiretTexte($this->indiscore->Siret)?></td>
|
||||
</tr>
|
||||
<?php if (isset($this->indiscore->NumRC) && $this->indiscore->NumRC*1!=0) { ?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Numéro R.C.</td>
|
||||
<td width="350" class="StyleInfoData"><?=$this->indiscore->NumRC?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr><td colspan="3"> </td></tr>
|
||||
<?php if ( $this->edition && empty($this->AutrePage) ) {?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib"></td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?=$this->action('scorecutoff','saisie',null, array('siren'=>$this->indiscore->Siren)); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php }?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib"> </td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<a href=<?=$this->url(array('controller'=>'evaluation', 'action'=>'scoreshisto', 'siret' => $this->siret)); ?>>
|
||||
<?=$this->translate("Consulter l'historique des IndiScore");?></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php }?>
|
||||
<h2>Dénomination sociale & coordonnées</h2>
|
||||
<div class="paragraph">
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"></td>
|
||||
<td width="200" class="StyleInfoLib">Dénomination Sociale</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?php
|
||||
echo $this->indiscore->Nom;
|
||||
if (!empty($this->indiscore->Nom2)) {
|
||||
echo '<br/>'.$this->indiscore->Nom2;
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
$titre='';
|
||||
if ($this->indiscore->Enseigne!='' && $this->indiscore->Sigle!='') {
|
||||
$titre = 'Enseigne / Sigle'; $lib = $this->indiscore->Enseigne.' / '.$this->indiscore->Sigle;
|
||||
} elseif ($this->indiscore->Enseigne!='' && $this->indiscore->Sigle=='') {
|
||||
$titre = 'Enseigne'; $lib = $this->indiscore->Enseigne;
|
||||
} elseif ($this->indiscore->Enseigne=='' && $this->indiscore->Sigle!='') {
|
||||
$titre = 'Sigle'; $lib = $this->indiscore->Sigle;
|
||||
}?>
|
||||
|
||||
<?php if ( !empty($titre) ) {?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib"><?=$titre?></td>
|
||||
<td width="350" class="StyleInfoData"><?=$lib?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<td width="30"></td>
|
||||
<td width="200" class="StyleInfoLib">Forme juridique</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?=$this->indiscore->FJ_lib?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"></td>
|
||||
<td width="200" class="StyleInfoLib">Date de création de l'entreprise</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?php $date = new Zend_Date($this->indiscore->DateCreaEn, 'yyyyMMdd');?>
|
||||
<?=$date->toString('dd/MM/yyyy')?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"></td>
|
||||
<td width="200" class="StyleInfoLib">Adresse</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?=$this->indiscore->Adresse?><br/>
|
||||
<?php if ($this->indiscore->Adresse2<>'') echo $this->indiscore->Adresse2.'<br/>';?>
|
||||
<?=$this->indiscore->CP?> <?=$this->indiscore->Ville?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"></td>
|
||||
<td width="200" class="StyleInfoLib">Téléphone</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?=$this->indiscore->Tel?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if ( $this->surveillance && empty($this->AutrePage) ) {?>
|
||||
<tr>
|
||||
<td width="30"></td>
|
||||
<td colspan="2">
|
||||
<?=$this->action('infos','surveillance', null, array(
|
||||
'source' => 'score',
|
||||
'siret' => $this->siret
|
||||
));?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php }?>
|
||||
|
||||
<?php if ( $this->aviscredit && empty($this->AutrePage) ) {?>
|
||||
<tr>
|
||||
<td width="30"></td>
|
||||
<td colspan="2">
|
||||
<a href="<?=$this->url(array('controller'=>'evaluation', 'action'=>'aviscredit', 'siret' => $this->siret))?>">
|
||||
Saisir votre demande d'avis credit personnalisé</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php }?>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h2>Évaluation</h2>
|
||||
<div class="paragraph">
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoData">
|
||||
L'évaluation indiScore© est en partie basée sur les points notables suivants :<br/>
|
||||
<h3><u>Conformité légale :</u></h3>
|
||||
<div class="stats gradiant_pic">
|
||||
<ul>
|
||||
<li>
|
||||
<i><?=$this->indiscore->AnalyseConfor; ?></i>
|
||||
<div class="blocdegrade clearfix">
|
||||
<span class="textdegrade">Conformité <? if ($this->edition) { echo '('.$this->indiscore->ScoreConfor.')';}?></span>
|
||||
<div class="imgdegrade"><img class="borderimg" src="/themes/default/images/indiscore/imgscores-<?=$this->FormatPct($this->indiscore->ScoreConfor)?>.png"/></div>
|
||||
<div class="regle"><img src="/themes/default/images/indiscore/sgradiant2.png" /></div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<h3><u>Dirigeance :</u></h3>
|
||||
<div class="stats gradiant_pic">
|
||||
<ul>
|
||||
<li>
|
||||
<i><?=$this->indiscore->AnalyseDirigeance?></i>
|
||||
<div class="blocdegrade clearfix">
|
||||
<span class="textdegrade">Dirigeance <? if ($this->edition) { echo '('.$this->indiscore->ScoreDirigeance.')';}?></span>
|
||||
<div class="imgdegrade"><img class="borderimg" src="/themes/default/images/indiscore/imgscores-<?=$this->FormatPct($this->indiscore->ScoreDirigeance)?>.png"/></div>
|
||||
<div class="regle"><img src="/themes/default/images/indiscore/sgradiant2.png" /></div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<h3><u>Solvabilité :</u></h3>
|
||||
<div class="stats gradiant_pic">
|
||||
<ul>
|
||||
<li>
|
||||
<i>L'analyse de la solvabilité est <?=$this->indiscore->AnalyseSolvabilite?></i>
|
||||
<div class="blocdegrade clearfix">
|
||||
<span class="textdegrade">Solvabilité <? if ($this->edition) { echo '('.$this->indiscore->Indiscore.')';}?></span>
|
||||
<div class="imgdegrade"><img class="borderimg" src="/themes/default/images/indiscore/imgscores-<?php echo $this->FormatPct($this->indiscore->Indiscore);?>.png"/></div>
|
||||
<div class="regle"><img src="/themes/default/images/indiscore/sgradiant2.png" /></div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php $millesimeMax = date('Ymd', mktime(0, 0, 0, date('m'), date('d'), date('Y')-2));?>
|
||||
<?php if($this->indiscore->NbBilansScore > 0 && $this->indiscore->Bilans->item[0]->Millesime >= $millesimeMax) {?>
|
||||
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoData">
|
||||
A la lecture du dernier bilan, cloturé le <?=substr($this->indiscore->Bilans->item[0]->Millesime,6,2).'/'.substr($this->indiscore->Bilans->item[0]->Millesime,4,2).'/'.substr($this->indiscore->Bilans->item[0]->Millesime,0,4)?>, la situation financière de l'entreprise <?php echo $this->Nom;?> est <b><?php echo $this->indiscore->tabInfosNotations->SituationFinanciere;?></b>.<br/>
|
||||
<?php
|
||||
if (html_entity_decode($this->indiscore->tabInfosNotations->ProbabiliteDefaut) <> 'En défaut')
|
||||
echo 'La probabilité de défaillance associée à cette note avoisine les '. number_format($this->indiscore->tabInfosNotations->ProbabiliteDefaut,3,',',' ') .' %';
|
||||
else
|
||||
echo 'Cette entreprise est défaillante ou sur le point de le devenir.';
|
||||
//[EquivalenceBDF]
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoData">
|
||||
<i>Pour information, les méthodes standards donnent : Conan & Holder = <b><?php echo $this->indiscore->scores->ConanH;?></b>,
|
||||
Afdcc1 = <b><?php echo $this->indiscore->scores->Afdcc1;?></b>, Afdcc2 = <b><?php echo $this->indiscore->scores->Afdcc2;?></b>
|
||||
et Score Z = <b><?php echo $this->indiscore->scores->Z;?></b>.</i>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php } else {?>
|
||||
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoData">
|
||||
La situation financière de l'entreprise ne peut être évaluée en détail car
|
||||
<?php
|
||||
if($this->indiscore->Bilans->item[0]->Millesime < $millesimeMax && count($this->indiscore->Bilans->item) > 0 ) {
|
||||
echo 'le dernier bilan disponible date de '.substr($this->indiscore->Bilans->item[0]->Millesime,0,4).'.';
|
||||
} else {
|
||||
echo 'aucun bilan n\'est disponible.';
|
||||
} ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php }?>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h2>Paiements</h2>
|
||||
<div class="paragraph">
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoData">
|
||||
<?php if(!empty($this->indiscore->infoPaiement)):?>
|
||||
<?php echo html_entity_decode($this->indiscore->infoPaiement);?>
|
||||
<?php else :?>
|
||||
Aucune information sur les paiements disponible.
|
||||
<?php endif;?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h2>Conclusion</h2>
|
||||
<div class="paragraph">
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoData">
|
||||
<span class="notvisible">
|
||||
Compte tenu des informations disponibles auprès des sources officielles
|
||||
Scores et Décisions présente la conclusion suivante :</span><br/>
|
||||
<?php
|
||||
$color = '';
|
||||
if ($this->indiscore->Indiscore20 < $this->bornes['indiScore']['rouge']) {
|
||||
$color = ' indiscore-red';
|
||||
} elseif ($this->indiscore->Indiscore20 < $this->bornes['indiScore']['orange']) {
|
||||
$color = ' indiscore-orange';
|
||||
} else {
|
||||
$color = ' indiscore-green';
|
||||
}
|
||||
switch($this->typeScore) {
|
||||
case '20':
|
||||
$maxIndiscore = $this->typeScore;
|
||||
$indiscore = $this->indiscore->Indiscore20;
|
||||
break;
|
||||
case '100':
|
||||
default:
|
||||
$maxIndiscore = empty($this->typeScore)? '100' : $this->typeScore;
|
||||
$indiscore = $this->indiscore->Indiscore;
|
||||
break;
|
||||
}
|
||||
?>
|
||||
<h3 class="indiscore<?=$color?>">LE SCORE EST DE <?=$indiscore?> SUR <?=$maxIndiscore?> POINTS</h3>
|
||||
<?php
|
||||
if ($this->indiscore->infoEncours != '' && !is_numeric($this->indiscore->encours) && $this->indiscore->encours == 'N/A'){ ?>
|
||||
<h3><?=$this->indiscore->infoEncours?></h3>
|
||||
<?php } else{ ?>
|
||||
<?php if ($indiscore != 0) {?>
|
||||
<i>La tendance de la note est <?=$this->indiscore->TendanceIndiscore?></i>
|
||||
<h3 class="indiscore">L'ENCOURS MAXIMUM CONSEILLÉ EST DE <?=round($this->indiscore->encours / 1000)?> K€</h3>
|
||||
<?php }?>
|
||||
<h3><?=$this->indiscore->infoEncours?></h3>
|
||||
<?php }?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="3" align="center"><img class="notvisible" src="/themes/default/images/indiscore/logo_indiscore.png"/></td></tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<?php if ( empty($this->AutrePage) ) {?>
|
||||
<?=$this->render('cgu.phtml', $this->cgu);?>
|
||||
</div>
|
||||
<?php }?>
|
@ -55,9 +55,6 @@ echo $this->action('liens', 'identite', null, array('siret' => $this->siret, 'id
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
Zend_Registry::get('firebug')->info($this->tabResult);
|
||||
?>
|
||||
<?php foreach($this->tabRatio as $ratio => $info) { ?>
|
||||
<tr>
|
||||
<td class="head"><a class="tooltip" title="<?=$info['comment']?>"><?=$info['titre']?></a></td>
|
||||
@ -66,7 +63,7 @@ Zend_Registry::get('firebug')->info($this->tabResult);
|
||||
<td class="right"><?=$this->tabResult[1]['ratio'][$ratio]?></td>
|
||||
<td class="right" title="<?=$this->tabResult[1]['info'][$ratio]?>"><?=$this->tabResult[1]['total'][$ratio]?> %</td>
|
||||
<td class="right"><?=$this->tabResult[2]['ratio'][$ratio]?></td>
|
||||
<td class="right" title="<?=$this->tabResult[2]['info'][$ratio]?>"><?=$this->tabResult[3]['total'][$ratio]?> %</td>
|
||||
<td class="right" title="<?=$this->tabResult[2]['info'][$ratio]?>"><?=$this->tabResult[2]['total'][$ratio]?> %</td>
|
||||
</tr>
|
||||
<?php }?>
|
||||
</tbody>
|
||||
@ -93,31 +90,24 @@ Aucun bilan disponible.
|
||||
<td width="30"></td>
|
||||
<td class="StyleInfoLib" width="200">Situation juridique</td>
|
||||
<td class="StyleInfoData" width="350">
|
||||
<?php if ($this->SituationJuridique == 'P'):?>
|
||||
<a href="<?=$this->url(array(
|
||||
'controller' => 'juridique',
|
||||
'action' => 'annonces',
|
||||
'siret' => $this->siret,
|
||||
'id' => $this->id,
|
||||
))?>">
|
||||
<font color="red">
|
||||
<b>En procédure collective</b>
|
||||
</font>
|
||||
</a>
|
||||
<?php if($this->dateRadiation != ''):?>
|
||||
<br/>Radié du RCS le <?php echo $this->dateRadiation;?>
|
||||
<?php endif;?>
|
||||
<?php elseif ($this->SituationJuridique == 'RR'):?>
|
||||
Radié du RCS <?php if($this->dateRadiation != ''):?>
|
||||
<?php if ($this->SituationJuridique == 'P') {?>
|
||||
<a href="<?=$this->url(array('controller' => 'juridique', 'action' => 'annonces',
|
||||
'siret' => $this->siret,'id' => $this->id))?>">
|
||||
<font color="red"><b>En procédure collective</b></font></a>
|
||||
<?php if($this->dateRadiation != '') {?>
|
||||
<br/>Radié du RCS le <?=$this->dateRadiation?>
|
||||
<?php }?>
|
||||
<?php } elseif ($this->SituationJuridique == 'RR') {?>
|
||||
Radié du RCS <?php if($this->dateRadiation != '') {?>
|
||||
le <?php echo $this->dateRadiation;?>
|
||||
<?php endif;?>
|
||||
<?php elseif ($this->SituationJuridique == 'RP'):?>
|
||||
Radiation publiée <?php if($this->dateRadiation != ''):?>
|
||||
le <?php echo $this->dateRadiation;?>
|
||||
<?php endif;?>
|
||||
<?php else:?>
|
||||
<?php }?>
|
||||
<?php } elseif ($this->SituationJuridique == 'RP') {?>
|
||||
Radiation publiée <?php if($this->dateRadiation != '') {?>
|
||||
le <?=$this->dateRadiation?>
|
||||
<?php }?>
|
||||
<?php } else {?>
|
||||
Aucune procédure enregistrée à ce jour par nos services.
|
||||
<?php endif;?>
|
||||
<?php }?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -126,7 +116,7 @@ Aucun bilan disponible.
|
||||
<h2>Scores et encours</h2>
|
||||
<div class="paragraph">
|
||||
<table>
|
||||
<?php foreach ($this->scores as $name => $score):?>
|
||||
<?php foreach ($this->scores as $name => $score) {?>
|
||||
<tr>
|
||||
<td width="30"></td>
|
||||
<td width="250" class="StyleInfoLib"><?=$score[1]?></td>
|
||||
@ -139,7 +129,7 @@ Aucun bilan disponible.
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
<?php }?>
|
||||
<tr>
|
||||
<td width="30"></td>
|
||||
<td class="StyleInfoLib">Encours conseillé</td>
|
@ -0,0 +1,151 @@
|
||||
<div id="center">
|
||||
<h1><?=$this->translate("HISTORIQUE").' '.strtoupper($this->types[$this->type]);?></h1>
|
||||
<div class="paragraph">
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </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>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h2><?=$this->translate("Historique des scores")?></h2>
|
||||
|
||||
<div class="paragraph" style="text-align:right;">
|
||||
<select name="type">
|
||||
<?php foreach($this->types as $key=>$val) {?>
|
||||
<?php $selected = ($key == $this->type)?'selected':'';?>
|
||||
<option value="<?=$this->url(array('siret'=>$this->siret, 'id'=>$this->id, 'type'=>$key))?>" <?=$selected;?>><?=$val?></option>
|
||||
<?php }?>
|
||||
</select>
|
||||
<script>
|
||||
$('select[name=type]').change(function(e){
|
||||
window.location = $(this).val();
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
<div class="paragraph">
|
||||
<p>
|
||||
<?php if ($this->typeTxt == 'indiScore20') {?>
|
||||
L'indiscore évalue le risque de faillite d'entreprise à 12 mois à partir de trois axes: le respect,
|
||||
l'analyse historique des représentants légaux et l'analyse du bilan. Les informations sur l’environnement économique
|
||||
des entreprises (secteurs d'activité, groupe, paiements) complètent l'analyse de l'indiscore. Un indiscore entre 0 et
|
||||
6/20 indiquera un risque élevé, entre 7 et 10/20 un risque moyen et un indiscore compris entre 11 et 20/20
|
||||
un risque faible. Un avis de crédit fournisseur/client est donné, jusqu'à concurrence de 500 K€.
|
||||
<?php } ?>
|
||||
<?php if ($this->typeTxt == 'indiScore') {?>
|
||||
L'indiscore évalue le risque de faillite d'entreprise à 12 mois à partir de trois axes: le respect,
|
||||
l'analyse historique des représentants légaux et l'analyse du bilan. Les informations sur l’environnement économique
|
||||
des entreprises (secteurs d'activité, groupe, paiements) complètent l'analyse de l'indiscore. Un indiscore entre 0 et
|
||||
40/100 indiquera un risque élevé, entre 41 et 50/100 un risque moyen et un indiscore compris entre 51 et 100/100
|
||||
un risque faible. Un avis de crédit fournisseur/client est donné, jusqu'à concurrence de 500 K€.
|
||||
<?php } ?>
|
||||
<?php if ($this->typeTxt == 'scoreDir') {?>
|
||||
Évaluation de l'équipe dirigeante en place. Système S&D
|
||||
<?php } ?>
|
||||
<?php if ($this->typeTxt == 'scoreConf') {?>
|
||||
Évaluation de l'adéquation entre les déclarations et l'information disponible auprès des sources officielles françaises. Système S&D
|
||||
<?php } ?>
|
||||
<?php if ($this->typeTxt == 'scoreZ') {?>
|
||||
Le score Z de la Banque de France permet de déceler les défaillances d’entreprises. Ces dernières sont caractérisées
|
||||
par 19 ratios retraçant quatre aspects de leur comportement : structure financière, dynamisme, rentabilité, gestion courante.
|
||||
<?php } ?>
|
||||
<?php if ($this->typeTxt == 'scoreCH') {?>
|
||||
Le score CONAN et HOLDER (1979) est une méthode conseillée pour les entreprises industrielles réalisant un chiffre
|
||||
d'affaires de 1,5 à 75 millions d’euros. Il permet un classement des sociétés des plus risquées (score inférieur à
|
||||
6,8) aux plus saines (score supérieur à 16,4).
|
||||
<?php } ?>
|
||||
<?php if ($this->typeTxt == 'scoreAfdcc1') {?>
|
||||
1er indicateur synthétique de vulnérabilité établi par l'Association Françaises des Crédits managers et Conseils.
|
||||
<?php } ?>
|
||||
<?php if ($this->typeTxt == 'scoreAfdcc2') {?>
|
||||
Le score sectoriel AFDCC2 (1999) s’applique aux sociétés réalisant un chiffre d’affaires de 150.000 à 75 millions
|
||||
d'euros. Il comprend 11 fonctions pour 7 secteurs d'activité en différenciant les TPE des PME. Il s'adresse plus
|
||||
spécialement au Credit Manager, étant axé sur la solvabilité de l'entreprise à court terme.
|
||||
<?php } ?>
|
||||
<?php if ($this->typeTxt == 'scoreAltman') {?>
|
||||
Évaluation synthétique permettant la prévision de défaillance d'une entreprise à partir de ratios, liquidité,
|
||||
solvablilité, rentabilité, activité, croissance. Appelé aussi Z Score d'Altman.
|
||||
<?php } ?>
|
||||
<?php if ($this->typeTxt == 'scoreCCF') {?>
|
||||
Évaluation à 3 ans de la probabilité de défaillance d'une entreprise.
|
||||
<?php } ?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?php if ( count($this->scores)> 0 ) {?>
|
||||
<div class="paragraph">
|
||||
<table class="tablesorter" id="synthese">
|
||||
<thead>
|
||||
<tr>
|
||||
<th align="center"><?=$this->translate("Date")?></th>
|
||||
<th align="center"><?=$this->types[$this->type]?></th>
|
||||
<th align="center"><?=$this->translate("Encours")?> (K€)</th>
|
||||
<th><?=$this->translate("Motif du changement")?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($this->scores as $score) {?>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<?php $date = new Zend_Date($score->date, 'yyyy-MM-dd');?>
|
||||
<?=$date->toString('dd/MM/yyyy')?>
|
||||
</td>
|
||||
<?php
|
||||
$style = '';
|
||||
//Color value - @todo redraw the table and add it before view
|
||||
if ( $score->value < $this->bornes[$this->type]['rouge'] ) {
|
||||
$style = ' style="color:red;"';
|
||||
} elseif ( $score->value < $this->bornes[$this->type]['orange'] ) {
|
||||
$style = ' style="color:orange;"';
|
||||
} else {
|
||||
$style = ' style="color:green;"';
|
||||
}
|
||||
?>
|
||||
<td align="center"<?=$style?>><?=$score->value?></td>
|
||||
<td align="center"><?=number_format($score->encours,2)?></td>
|
||||
<td><?=$score->label?></td>
|
||||
</tr>
|
||||
<?php }?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<script>
|
||||
$(function(){
|
||||
$('#synthese').tablesorter({
|
||||
dateFormat: 'uk',
|
||||
headers: {
|
||||
0: {sorter: 'shortDate'},
|
||||
3: {sorter: false},
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div class="paragraph">
|
||||
<?php if ( $this->graph ) {?>
|
||||
<img src="/file/image/cache/q/<?=$this->graph?>" usemap="#graphMap">
|
||||
<map name="graphMap">
|
||||
<?=$this->graphMap;?>
|
||||
</map>
|
||||
<?php } else {?>
|
||||
<b><?=$this->translate("Impossible de générer le graphique")?></b>
|
||||
<?php }?>
|
||||
</div>
|
||||
|
||||
<?php } else {?>
|
||||
|
||||
<div class="paragraph">
|
||||
<?=$this->translate("Aucune information sur l'historique disponible.")?>
|
||||
</div>
|
||||
|
||||
<?php }?>
|
||||
|
||||
<?=$this->render('cgu.phtml', $this->cgu)?>
|
||||
</div>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user