Compare commits

..

3 Commits

Author SHA1 Message Date
Jean Vladimir TWAHIRWA
63b6fd8e13 utiliser la methode Scores_Ws_Client 2016-12-15 11:04:01 +01:00
Jean Vladimir TWAHIRWA
54b5952899 Ajouter une condition pour afficher l'erreur dans la vue 2016-12-15 11:03:09 +01:00
Jean Vladimir TWAHIRWA
c3c966a518 ajouter la methodes getListEtablissement 2016-12-15 11:02:35 +01:00
629 changed files with 305594 additions and 47393 deletions

View File

@ -1,9 +1,4 @@
<?php <?php
use Monolog\Logger;
use Monolog\Handler\StreamHandler;
use Monolog\Processor\IntrospectionProcessor;
use Monolog\Handler\ChromePHPHandler;
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{ {
/** /**
@ -103,36 +98,6 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
Zend_Registry::set('log', $AppLogger); 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 * Init database
*/ */
@ -171,7 +136,6 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
*/ */
protected function _initCache() protected function _initCache()
{ {
// @todo : Remove for PHP7 Compatibility
//MetadataCache pour la base de données //MetadataCache pour la base de données
$cache = Zend_Cache::factory('Core', 'Apc', $cache = Zend_Cache::factory('Core', 'Apc',
array('lifetime' => 28800, 'automatic_serialization' => true), array('lifetime' => 28800, 'automatic_serialization' => true),

View File

@ -3,18 +3,8 @@ class AideController extends Zend_Controller_Action
{ {
protected $theme; protected $theme;
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init() public function init()
{ {
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme // --- Theme
$this->theme = Zend_Registry::get('theme'); $this->theme = Zend_Registry::get('theme');
} }
@ -80,7 +70,7 @@ class AideController extends Zend_Controller_Action
require_once 'Scores/WsScores.php'; require_once 'Scores/WsScores.php';
$ws = new WsScores(); $ws = new WsScores();
$accept = $ws->setCGU(); $accept = $ws->setCGU();
$this->logger->info($accept); Zend_Registry::get('firebug')->info($accept);
if ($accept) { if ($accept) {
//Put in session //Put in session
$auth = Zend_Auth::getInstance(); $auth = Zend_Auth::getInstance();

View File

@ -14,18 +14,8 @@ class AuthController extends Zend_Controller_Action
) )
); );
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init() public function init()
{ {
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme // --- Theme
$this->theme = Zend_Registry::get('theme'); $this->theme = Zend_Registry::get('theme');
} }
@ -71,12 +61,12 @@ class AuthController extends Zend_Controller_Action
$token = $params[$config['token']]; $token = $params[$config['token']];
try { try {
$ws = new Scores_Ws_Client('account', '0.1');
$parameters = new stdClass(); $parameters = new stdClass();
$parameters->client = $config['clientId']; $parameters->client = $config['clientId'];
$parameters->login = $login; $parameters->login = $login;
$parameters->token = $token; $parameters->token = $token;
$parameters->params = $objectParams; $parameters->params = $objectParams;
$ws = new Scores_Ws_Client('account', '0.1');
$hash = $ws->ssoAuthenticate($parameters); $hash = $ws->ssoAuthenticate($parameters);
// --- Utilisateur inexistant // --- Utilisateur inexistant
if ( $hash === 'false' || $hash === false ) { if ( $hash === 'false' || $hash === false ) {
@ -106,7 +96,7 @@ class AuthController extends Zend_Controller_Action
try { try {
$ws = new Scores_Ws_Client('gestion', '0.3'); $ws = new Scores_Ws_Client('gestion', '0.3');
$InfosLogin = $ws->getInfosLogin($parameters); $InfosLogin = $ws->getInfosLogin($parameters);
$this->logger->info(print_r($InfosLogin,1)); Zend_Registry::get('firebug')->info($InfosLogin);
if ( is_string($InfosLogin) || $InfosLogin->error->errnum != 0 ) { if ( is_string($InfosLogin) || $InfosLogin->error->errnum != 0 ) {
$this->view->Error = true; $this->view->Error = true;
} else { } else {

View File

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

View File

@ -101,12 +101,6 @@ class DashboardController extends Zend_Controller_Action
'aUA' => 'ATTESTATION DU CONJOINT COMMUN EN BIENS', 'aUA' => 'ATTESTATION DU CONJOINT COMMUN EN BIENS',
); );
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
/** /**
* Return a ramdom password * Return a ramdom password
* @param int $length * @param int $length
@ -134,10 +128,6 @@ class DashboardController extends Zend_Controller_Action
public function init() public function init()
{ {
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme // --- Theme
$this->theme = Zend_Registry::get('theme'); $this->theme = Zend_Registry::get('theme');
@ -187,7 +177,7 @@ class DashboardController extends Zend_Controller_Action
*/ */
protected function statChart($data, $labels, $name) protected function statChart($data, $labels, $name)
{ {
require_once 'ChartDirector/phpchartdir.php'; require_once("Vendors/ChartDirector/phpchartdir.php");
$hChart = 210; $hChart = 210;
@ -792,7 +782,7 @@ class DashboardController extends Zend_Controller_Action
$user = $ws->getUser($login); $user = $ws->getUser($login);
$options = json_decode($user, true); $options = json_decode($user, true);
$this->logger->info(print_r($user,1)); Zend_Registry::get('firebug')->info($user);
$this->view->assign('droits', explode(' ',$options['droits'])); $this->view->assign('droits', explode(' ',$options['droits']));
$this->view->assign('prefs', explode(' ',$options['pref'])); $this->view->assign('prefs', explode(' ',$options['pref']));
@ -878,7 +868,7 @@ class DashboardController extends Zend_Controller_Action
} }
} }
$this->logger->info(print_r($output,1)); Zend_Registry::get('firebug')->info($output);
$this->view->assign('output', $output); $this->view->assign('output', $output);
} }
@ -993,7 +983,7 @@ class DashboardController extends Zend_Controller_Action
//Liste des periodes de facturation //Liste des periodes de facturation
$contrats = $ws->getClientTarifs($idClient); $contrats = $ws->getClientTarifs($idClient);
$this->logger->info(print_r($contrats,1)); Zend_Registry::get('firebug')->info($contrats);
$this->view->assign('contrats', $contrats->item); $this->view->assign('contrats', $contrats->item);
//Liste des services //Liste des services

View File

@ -5,18 +5,8 @@ class DirigeantController extends Zend_Controller_Action
protected $siret; protected $siret;
protected $id; protected $id;
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init() public function init()
{ {
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme // --- Theme
$this->theme = Zend_Registry::get('theme'); $this->theme = Zend_Registry::get('theme');

View File

@ -3,18 +3,8 @@ class ErrorController extends Zend_Controller_Action
{ {
protected $theme; protected $theme;
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init() public function init()
{ {
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme // --- Theme
$this->theme = Zend_Registry::get('theme'); $this->theme = Zend_Registry::get('theme');
} }
@ -70,7 +60,7 @@ class ErrorController extends Zend_Controller_Action
$mail = new Scores_Mail_Method(); $mail = new Scores_Mail_Method();
$mail->setSubject('[ERREUR APPLICATIVE] - '.$c->profil->server->name.' -'.date('Ymd')); $mail->setSubject('[ERREUR APPLICATIVE] - '.$c->profil->server->name.' -'.date('Ymd'));
$mail->setBodyText($message); $mail->setBodyText($message);
$mail->setFromKey('support'); $mail->setFromKey('supportdev');
$mail->addToKey('supportdev'); $mail->addToKey('supportdev');
$mail->execute(); $mail->execute();
} }

View File

@ -5,18 +5,8 @@ class EvaluationController extends Zend_Controller_Action
protected $siret = null; protected $siret = null;
protected $id = 0; protected $id = 0;
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init() public function init()
{ {
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme // --- Theme
$this->theme = Zend_Registry::get('theme'); $this->theme = Zend_Registry::get('theme');
@ -129,10 +119,10 @@ class EvaluationController extends Zend_Controller_Action
} }
//Make the graph - Ready to create a class for this char //Make the graph - Ready to create a class for this char
require_once 'ChartDirector/phpchartdir.php'; require_once 'Vendors/ChartDirector/phpchartdir.php';
require_once 'Scores/Cache.php'; require_once 'Scores/Cache.php';
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
$path = $c->profil->path->shared . '/pages/imgcache/'; $path = $c->profil->path->shared . '/temp/pages/imgcache/';
$file = 'indiscorehisto-'.$this->siret.'-'.$this->id.'-'.$type.'.png'; $file = 'indiscorehisto-'.$this->siret.'-'.$this->id.'-'.$type.'.png';
$cache = new Cache(); $cache = new Cache();
$return = null; $return = null;
@ -211,19 +201,6 @@ class EvaluationController extends Zend_Controller_Action
*/ */
public function indiscoreAction() public function indiscoreAction()
{ {
$bornes = array(
'indiScore' => array('min' => 0, 'max' => 20, 'rouge' => 7, 'orange' => 10),
'scoreDir' => array('min' => 0, 'max' => 100, 'rouge' => 45, 'orange' => 56),
'scoreConf' => array('min' => 0, 'max' => 100, 'rouge' => 45, 'orange' => 56),
'scoreZ' => array('min' => -3, 'max' => 3, 'rouge' => -0.25, 'orange' => 0.125),
'scoreCH' => array('min' => -4.5, 'max' => 16, 'rouge' => 3.75, 'orange' => 10),
'scoreAfdcc1' => array('min' => -7, 'max' => 7, 'rouge' => 0, 'orange' => 1),
'scoreAfdcc2' => array('min' => -3, 'max' => 2, 'rouge' => -1, 'orange' => 0.5),
'scoreAltman' => array('min' => -2, 'max' => 8, 'rouge' => 0, 'orange' => 2.7),
'scoreCCF' => array('min' => 500, 'max' => 5000, 'rouge' => 2160, 'orange' => 3450 ),
);
$this->view->assign('bornes', $bornes);
$user = new Scores_Utilisateur(); $user = new Scores_Utilisateur();
if(!$user->checkPerm('INDISCORE') && !$user->checkPerm('INDISCOREP')) if(!$user->checkPerm('INDISCORE') && !$user->checkPerm('INDISCOREP'))
$this->forward('perms', 'error'); $this->forward('perms', 'error');
@ -465,7 +442,7 @@ class EvaluationController extends Zend_Controller_Action
$email = $request->getParam('email', ''); $email = $request->getParam('email', '');
$infos = $ws->getRapport($siren, 3, 0, $plus, $ref, $encours, $email); $infos = $ws->getRapport($siren, 3, 0, $plus, $ref, $encours, $email);
$this->logger->info(print_r($infos,1)); Zend_Registry::get('firebug')->info($infos);
if ($infos === false) { if ($infos === false) {
$this->forward('soap', 'error'); $this->forward('soap', 'error');
} }
@ -557,7 +534,7 @@ class EvaluationController extends Zend_Controller_Action
$file = 'evaluation-indiscore3-'.$this->siret.'.html'; $file = 'evaluation-indiscore3-'.$this->siret.'.html';
} }
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
$path = $c->profil->path->shared.'/pages'; $path = $c->profil->path->shared.'/temp/pages';
if (file_exists($path.'/'.$file)) if (file_exists($path.'/'.$file))
{ {
$doc = new DOMDocument(); $doc = new DOMDocument();
@ -630,7 +607,7 @@ class EvaluationController extends Zend_Controller_Action
$xml = $doc->saveXML(); $xml = $doc->saveXML();
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
$outfile = $c->profil->path->shared.'/pages/p'.$user->getIdClient().'-'.$file; $outfile = $c->profil->path->shared.'/temp/pages/p'.$user->getIdClient().'-'.$file;
file_put_contents($outfile, $xml); file_put_contents($outfile, $xml);
//Génération du pdf //Génération du pdf
@ -839,7 +816,7 @@ class EvaluationController extends Zend_Controller_Action
"<pre>".print_r($InfoEnq, 1)."</pre>"; "<pre>".print_r($InfoEnq, 1)."</pre>";
$mail = new Scores_Mail_Method(); $mail = new Scores_Mail_Method();
$mail->setFromKey('supportdev'); $mail->setFromKey('production');
$mail->addToKey('support'); $mail->addToKey('support');
$mail->setSubject($sujet); $mail->setSubject($sujet);
$mail->setBodyHtml($texte); $mail->setBodyHtml($texte);
@ -913,7 +890,7 @@ class EvaluationController extends Zend_Controller_Action
$date = date('Ymd'); $date = date('Ymd');
$url = 'https://www.creditsafe.fr/getdata/service/CSFRServices.asmx/GetData?RequestXmlStr='.$req; $url = 'https://www.creditsafe.fr/getdata/service/CSFRServices.asmx/GetData?RequestXmlStr='.$req;
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
$file = $c->profil->path->shared.'/creditsafe/'.$this->siret.'.xml'; $file = $c->profil->path->shared.'/temp/creditsafe/'.$this->siret.'.xml';
try { try {
$client = new Zend_Http_Client($url); $client = new Zend_Http_Client($url);
@ -1008,7 +985,7 @@ class EvaluationController extends Zend_Controller_Action
'Utilisateur='.$login; 'Utilisateur='.$login;
$mail->setBodyText($texte); $mail->setBodyText($texte);
$mail->setFromKey('supportdev'); $mail->setFromKey('contact');
$mail->addToKey('contact'); $mail->addToKey('contact');
$mail->execute(); $mail->execute();

View File

@ -5,18 +5,8 @@ class FinanceController extends Zend_Controller_Action
protected $siret = null; protected $siret = null;
protected $id = 0; protected $id = 0;
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init() public function init()
{ {
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme // --- Theme
$this->theme = Zend_Registry::get('theme'); $this->theme = Zend_Registry::get('theme');
@ -182,7 +172,7 @@ class FinanceController extends Zend_Controller_Action
$request = $this->getRequest(); $request = $this->getRequest();
$ratio = $request->getParam('ratio'); $ratio = $request->getParam('ratio');
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
$path = $c->profil->path->shared . '/pages/imgcache/'; $path = $c->profil->path->shared . '/temp/pages/imgcache/';
$file = 'syntheseEvol-'.$this->siret.'-'.$this->id.'-'.$ratio.'.png'; $file = 'syntheseEvol-'.$this->siret.'-'.$this->id.'-'.$ratio.'.png';
if (file_exists($path.$file)) { if (file_exists($path.$file)) {
echo '<img src="/file/image/cache/q/'.$file.'" />'; echo '<img src="/file/image/cache/q/'.$file.'" />';
@ -201,7 +191,7 @@ class FinanceController extends Zend_Controller_Action
$request = $this->getRequest(); $request = $this->getRequest();
$typeBilan = $request->getParam('typeBilan'); $typeBilan = $request->getParam('typeBilan');
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
$path = $c->profil->path->shared . '/pages/imgcache/'; $path = $c->profil->path->shared . '/temp/pages/imgcache/';
$file = 'synthese-linecompare-'.$this->siret.'-'.$this->id.'-'.$typeBilan.'.png'; $file = 'synthese-linecompare-'.$this->siret.'-'.$this->id.'-'.$typeBilan.'.png';
if (file_exists($path.$file)) { if (file_exists($path.$file)) {
echo '<img src="/file/image/cache/q/'.$file.'" />'; echo '<img src="/file/image/cache/q/'.$file.'" />';
@ -444,7 +434,7 @@ class FinanceController extends Zend_Controller_Action
$dateCloture = $request->getParam('dateCloture'); $dateCloture = $request->getParam('dateCloture');
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
$path = $c->profil->path->shared . '/pages/imgcache/'; $path = $c->profil->path->shared . '/temp/pages/imgcache/';
switch($type){ switch($type){
case 'actif': case 'actif':
$file = 'bilansgraphactif-'.$this->siret.'-'.$this->id.'-'.$typeBilan.$dateCloture.'.png'; $file = 'bilansgraphactif-'.$this->siret.'-'.$this->id.'-'.$typeBilan.$dateCloture.'.png';
@ -640,7 +630,7 @@ class FinanceController extends Zend_Controller_Action
$request = $this->getRequest(); $request = $this->getRequest();
$ratio = $request->getParam('ratio'); $ratio = $request->getParam('ratio');
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
$path = $c->profil->path->shared . '/pages/imgcache/'; $path = $c->profil->path->shared . '/temp/pages/imgcache/';
$file = 'ratiosgraph-'.$this->siret.'-'.$this->id.'-'.$ratio.'.png'; $file = 'ratiosgraph-'.$this->siret.'-'.$this->id.'-'.$ratio.'.png';
if (file_exists($path.$file)) { if (file_exists($path.$file)) {
echo '<img src="/file/image/cache/q/'.$file.'" />'; echo '<img src="/file/image/cache/q/'.$file.'" />';
@ -687,7 +677,7 @@ class FinanceController extends Zend_Controller_Action
$data[$element->id] = $element->val; $data[$element->id] = $element->val;
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
$path = $c->profil->path->shared . '/files/'; $path = $c->profil->path->shared . '/temp/files/';
$file = 'liasse-'.substr($this->siret, 0, 9).'-'.$this->id.'-'.$type.$date.'.xls'; $file = 'liasse-'.substr($this->siret, 0, 9).'-'.$this->id.'-'.$type.$date.'.xls';
$liasse = new Scores_Finance_Liasse_XLS($model); $liasse = new Scores_Finance_Liasse_XLS($model);
@ -746,7 +736,7 @@ class FinanceController extends Zend_Controller_Action
if ($result === false) { if ($result === false) {
$this->view->msg = "Erreur lors de l'enregistrement des informations"; $this->view->msg = "Erreur lors de l'enregistrement des informations";
} else { } else {
$this->logger->info(print_r($result,1)); Zend_Registry::get('firebug')->info($result);
$this->view->ref = strtoupper($result); $this->view->ref = strtoupper($result);
$this->view->fileref = $params['siren'] . '_' . $params['format'] . '_' . $this->view->fileref = $params['siren'] . '_' . $params['format'] . '_' .
substr($params['dateCloture'],6,4) . substr($params['dateCloture'],3,2) . substr($params['dateCloture'],6,4) . substr($params['dateCloture'],3,2) .
@ -850,9 +840,8 @@ class FinanceController extends Zend_Controller_Action
$entreprise = new Scores_Session_Entreprise($this->siret, $this->id); $entreprise = new Scores_Session_Entreprise($this->siret, $this->id);
$this->view->assign('raisonSociale', $entreprise->getRaisonSociale()); $this->view->assign('raisonSociale', $entreprise->getRaisonSociale());
$this->view->assign('siren', substr($this->siret, 0, 9)); $this->view->assign('siren', substr($this->siret, 0, 9));
$this->view->assign('siret', $this->siret); $this->view->assign('siret', $this->siret);
$this->view->assign('idClient', $user->identity->idClient);
$this->view->haveLiasse = ($bilanList->nbReponses > 0) ? true : false; $this->view->haveLiasse = ($bilanList->nbReponses > 0) ? true : false;
@ -942,6 +931,8 @@ class FinanceController extends Zend_Controller_Action
$request = $this->getRequest(); $request = $this->getRequest();
$unite = $request->getParam('unit','K'); $unite = $request->getParam('unit','K');
$entreprise = new Scores_Session_Entreprise($this->siret, $this->id); $entreprise = new Scores_Session_Entreprise($this->siret, $this->id);
$ws = new WsScores();
// Récupération de la date // Récupération de la date
$dateAndType = $request->getParam('date', $defaultTypeBilan.$defaultDateExercice); $dateAndType = $request->getParam('date', $defaultTypeBilan.$defaultDateExercice);
@ -952,51 +943,38 @@ class FinanceController extends Zend_Controller_Action
$date = substr($dateAndType, 1); $date = substr($dateAndType, 1);
// Récupération des postes du bilan // Récupération des postes du bilan
try { $infos = $ws->getBilan(substr($this->siret, 0, 9), $date, $type, true);
$ws = new Scores_Ws_Client('entreprise', '0.8'); if ($infos === false) $this->forward('soap', 'error');
$params = new stdClass();
$params->siren = substr($this->siret, 0, 9);
$params->millesime = $date;
$params->typeBilan = $type;
$params->ref = '';
$infos = $ws->getBilan($params);
// Error // Formatage de la liasse
if ($infos === false) { $infoLiasse = new Scores_Finance_Liasse($infos, $unite);
$this->forward('soap', 'error'); $this->view->assign('dateCloture', $infoLiasse->getInfo('dateCloture'));
} $this->view->assign('dateCloturePre', $infoLiasse->getInfo('dateCloturePre'));
// Formatage de la liasse $date = new Zend_Date($infoLiasse->getInfo('dateCloture'), 'yyyyMMdd');
$infoLiasse = new Scores_Finance_Liasse($infos, $unite); $this->view->assign('dateClotureD', $date->toString('dd/MM/yyyy'));
$this->view->assign('dateCloture', $infoLiasse->getInfo('dateCloture'));
$this->view->assign('dateCloturePre', $infoLiasse->getInfo('dateCloturePre'));
$date = new Zend_Date($infoLiasse->getInfo('dateCloture'), 'yyyyMMdd'); $dateCloturePre = $infoLiasse->getInfo('dateCloturePre');
$this->view->assign('dateClotureD', $date->toString('dd/MM/yyyy')); if ( $dateCloturePre == '' ) {
$this->view->assign('dateCloturePreD', '-');
$dateCloturePre = $infoLiasse->getInfo('dateCloturePre'); } else {
if ($dateCloturePre == '') { $date = new Zend_Date($dateCloturePre, 'yyyyMMdd');
$this->view->assign('dateCloturePreD', '-'); $this->view->assign('dateCloturePreD', $date->toString('dd/MM/yyyy'));
} else {
$date = new Zend_Date($dateCloturePre, 'yyyyMMdd');
$this->view->assign('dateCloturePreD', $date->toString('dd/MM/yyyy'));
}
$this->view->assign('dureesMois', $infoLiasse->getInfo('dureeMois'));
$this->view->assign('dureesMoisPre', $infoLiasse->getInfo('dureeMoisPre'));
$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();
} }
$this->view->assign('dureesMois', $infoLiasse->getInfo('dureeMois'));
$this->view->assign('dureesMoisPre', $infoLiasse->getInfo('dureeMoisPre'));
$this->view->assign('date', $date);
$this->view->assign('champType', $type);
$this->view->assign('liasse', $infoLiasse->getPostes());
$this->view->assign('ancres', $ancres[$type]);
//Gestion export de la liasse au format XLS //Gestion export de la liasse au format XLS
if ( $user->checkPerm('liassexls') && in_array($type,array('C', 'N', 'S')) ) { if ( $user->checkPerm('liassexls') & in_array($type,array('C', 'N', 'S')) ) {
$this->view->assign('exportxls', true); $this->view->assign('exportxls', true);
} }
} }
$this->view->assign('id', $id); $this->view->assign('id', $id);
@ -1064,13 +1042,13 @@ class FinanceController extends Zend_Controller_Action
} else { } else {
$infos = $this->getRequest()->getParam('infos'); $infos = $this->getRequest()->getParam('infos');
} }
$user = new Scores_Utilisateur(); $user = new Scores_Utilisateur();
$this->view->assign('edition', $user->checkModeEdition()); $this->view->assign('edition', $user->checkModeEdition());
$entreprise = new Scores_Session_Entreprise($this->siret, $this->id); $entreprise = new Scores_Session_Entreprise($this->siret, $this->id);
$this->view->assign('banques', isset($infos->result->item)?$infos->result->item:array()); $this->view->assign('banques', $infos->result->item);
$this->view->assign('raisonSociale', $entreprise->getRaisonSociale()); $this->view->assign('raisonSociale', $entreprise->getRaisonSociale());
$this->view->assign('siren', substr($this->siret, 0, 9)); $this->view->assign('siren', substr($this->siret, 0, 9));
$this->view->assign('exportObjet', $infos); $this->view->assign('exportObjet', $infos);

View File

@ -40,18 +40,9 @@ class GiantController extends Zend_Controller_Action
'NL' => 'The Netherlands', 'NL' => 'The Netherlands',
); );
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init() public function init()
{ {
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme // --- Theme
$this->theme = Zend_Registry::get('theme'); $this->theme = Zend_Registry::get('theme');
@ -418,7 +409,7 @@ class GiantController extends Zend_Controller_Action
{ {
$this->_helper->layout()->disableLayout(); $this->_helper->layout()->disableLayout();
$this->view->headScript()->appendFile($this->theme->pathScript.'/giant_monitoring.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'); $this->view->headScript()->appendFile$this->theme->pathScript.'/giant.js', 'text/javascript');
$auth = Zend_Auth::getInstance(); $auth = Zend_Auth::getInstance();
$identity = $auth->getIdentity(); $identity = $auth->getIdentity();
$result = $auth->getStorage()->read($identity); $result = $auth->getStorage()->read($identity);

File diff suppressed because it is too large Load Diff

View File

@ -3,19 +3,6 @@ class IndexController extends Zend_Controller_Action
{ {
protected $theme; 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 * Page d'accueil et de redirection
*/ */
@ -58,7 +45,7 @@ class IndexController extends Zend_Controller_Action
if (intval($version) == 2) { if (intval($version) == 2) {
$log = Zend_Registry::get('config')->profil->path->shared.'/log/altisys.log'; $log = Zend_Registry::get('config')->profil->path->data.'/log/altisys.log';
$user = new Scores_Utilisateur(); $user = new Scores_Utilisateur();
$login = $user->getLogin(); $login = $user->getLogin();
@ -68,7 +55,7 @@ class IndexController extends Zend_Controller_Action
$content_type = 'application/csv-tab-delimited-table'; $content_type = 'application/csv-tab-delimited-table';
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
$path = $c->profil->path->shared.'/files/'; $path = $c->profil->path->shared.'/temp/files/';
//Envoi du fichier sur la sortie standard //Envoi du fichier sur la sortie standard
if ( file_exists($path.$file) ) { if ( file_exists($path.$file) ) {
header('Content-Transfer-Encoding: none'); header('Content-Transfer-Encoding: none');
@ -97,7 +84,7 @@ class IndexController extends Zend_Controller_Action
$ws = new WsScores(); $ws = new WsScores();
$reponse = $ws->getPortefeuilleCsv($login, $idClient); $reponse = $ws->getPortefeuilleCsv($login, $idClient);
$log = Zend_Registry::get('config')->profil->path->shared.'/log/altisys.log'; $log = Zend_Registry::get('config')->profil->path->data.'/log/altisys.log';
if ($reponse === false){ if ($reponse === false){
file_put_contents($log, date('Y-m-d H:i:s')." - URL = ERREUR\n", FILE_APPEND); file_put_contents($log, date('Y-m-d H:i:s')." - URL = ERREUR\n", FILE_APPEND);

View File

@ -5,18 +5,8 @@ class JuridiqueController extends Zend_Controller_Action
protected $siret = null; protected $siret = null;
protected $id = 0; protected $id = 0;
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init() public function init()
{ {
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme // --- Theme
$this->theme = Zend_Registry::get('theme'); $this->theme = Zend_Registry::get('theme');
@ -35,22 +25,23 @@ class JuridiqueController extends Zend_Controller_Action
$request = $this->getRequest(); $request = $this->getRequest();
$autrePage = $request->getParam('apage'); $autrePage = $request->getParam('apage');
$vue = $request->getParam('vue', 'bodacc');
$idAnn = $request->getParam('idAnn', null); $idAnn = $request->getParam('idAnn', null);
$siren = substr($this->siret, 0,9); $siren = substr($this->siret, 0,9);
$vue = $request->getParam('vue', 'bodacc');
$source = $request->getParam('source'); $source = $request->getParam('source');
if (!empty($source)) { if (!empty($source)) {
switch ($source){ switch ($source){
case 1: $vue = 'bodacc'; break; case 1: $vue='bodacc'; break;
case 2: $vue = 'balo'; break; case 2: $vue='balo'; break;
case 3: $vue = 'asso'; break; case 3: $vue='asso'; break;
} }
} }
$session = new Scores_Session_Entreprise($this->siret, $this->id); $session = new Scores_Session_Entreprise($this->siret, $this->id);
$fj = $session->getFormeJuridique(); $fj = $session->getFormeJuridique();
if ($fj > 9000 && $fj < 9999 && intval($siren) == 0) { if ( $fj>9000 && $fj<9999 && intval($siren)==0 ) {
$vue = 'asso'; $vue = 'asso';
} }
@ -60,59 +51,51 @@ class JuridiqueController extends Zend_Controller_Action
$this->view->assign('raisonSociale', $session->getRaisonSociale()); $this->view->assign('raisonSociale', $session->getRaisonSociale());
$this->view->assign('AutrePage', $autrePage); $this->view->assign('AutrePage', $autrePage);
if ($session->getSource() == '006' || $session->getSourceId() == '007') { if ($session->getSource()=='006' || $session->getSourceId()=='007') {
$this->view->assign('AutreSource', true); $this->view->assign('AutreSource', true);
} else { } else {
$this->view->assign('vue', $vue); $this->view->assign('vue', $vue);
// Pagination //Pagination
$page = $request->getParam('page', 1); $page = $request->getParam('page', 1);
if ($page <= 0) { if ( $page <= 0 ) $page = 1;
$page = 1;
}
$nbAffichage = 20; $nbAffichage = 20;
$position = ($page - 1) * $nbAffichage; $position = ($page - 1 ) * $nbAffichage;
$ws = new WsScores(); $ws = new WsScores();
switch ($vue) { 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': case 'balo':
$infos = $ws->getAnnoncesBalo($siren, $idAnn, null, $position, $nbAffichage); $infos = $ws->getAnnoncesBalo($siren, $idAnn, null, $position, $nbAffichage);
break; break;
case 'asso': case 'asso':
if (intval($siren) == 0 && substr($session->getAutreId(),0,1) == 'W') { if ( intval($siren)==0 && substr($session->getAutreId(),0,1)=='W' ) {
$infos = $ws->getAnnoncesAsso($session->getAutreId(), $idAnn, null, $position, $nbAffichage); $infos = $ws->getAnnoncesAsso($session->getAutreId(), $idAnn, null, $position, $nbAffichage);
} elseif (intval($siren) != 0) { } elseif (intval($siren)!=0) {
$infos = $ws->getAnnoncesAsso($siren, $idAnn, null, $position, $nbAffichage); $infos = $ws->getAnnoncesAsso($siren, $idAnn, null, $position, $nbAffichage);
} else { } else {
$idAnn = $session->getSourceId(); $idAnn = $session->getSourceId();
$this->redirect($this->view->url(array('controller'=>'juridique', $infos = $ws->getAnnoncesAsso($siren, $idAnn, null, $position, $nbAffichage);
'action'=>'annonce', 'siret'=>$this->siret, 'id'=>$this->id,
'idAnn'=>$idAnn, 'vue'=>$vue), 'default', true));
} }
break; break;
case 'bomp': case 'bomp':
$filtre = $request->getParam('filtre', 'A'); $filtre = $request->getParam('filtre', null);
$this->view->assign('filtre', $filtre); $this->view->assign('filtre', $filtre);
$this->logger->info("getAnnoncesBoamp");
$infos = $ws->getAnnoncesBoamp($siren, $idAnn, $filtre, $position, $nbAffichage); $infos = $ws->getAnnoncesBoamp($siren, $idAnn, $filtre, $position, $nbAffichage);
break; 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');
if ($infos === false) { Zend_Registry::get('firebug')->info($infos);
$this->forward('soap', 'error');
}
require_once 'Scores/Annonces.php'; require_once 'Scores/Annonces.php';
$objAnnonces = new Annonces($infos->result->item); $objAnnonces = new Annonces($infos->result->item);
@ -125,220 +108,120 @@ class JuridiqueController extends Zend_Controller_Action
$user = new Scores_Utilisateur(); $user = new Scores_Utilisateur();
$this->view->assign('hasModeEdition', $user->checkModeEdition()); $this->view->assign('hasModeEdition', $user->checkModeEdition());
$this->view->assign('exportObjet', $infos); $this->view->assign('exportObjet', $infos);
$this->view->assign('surveillance', $user->checkPerm('survannonce')); $this->view->assign('surveillance', $user->checkPerm('survannonce'));
// --- Titre de la page //Affichage pour une annonce
if ( empty($autrePage) ) { if (!empty($idAnn) && in_array($vue, array('bodacc', 'abod', 'balo', 'asso', 'bomp')) ) {
if( empty($siren) ){
$titre = 'Identifiant '.$this->id; if ( $user->checkModeEdition() ){
} else { $this->view->headScript()->appendFile($this->theme->pathScript.'/saisieannonces.js', 'text/javascript');
$titre = 'Siret '.$siren;
} }
$this->view->headTitle()->prepend('Annonces Légales - '.$titre);
}
// ---- Calcul pagination $classType = 'annonces'.ucfirst($vue);
$nbReponses = count($infos->result->item); foreach($objAnnonces->$classType as $ann) {
$nbReponsesTotal = $infos->nbReponses; if($ann->id==$idAnn) break;
if ($nbReponses < $nbReponsesTotal) { }
$pageTotal = ceil( $nbReponsesTotal / $nbAffichage ); Zend_Registry::get('firebug')->info($ann);
$pageCurrent = $page; $annonce = array(
$pagePrev = $page - 1; 'Desc' => $objAnnonces->getAnnonceDesc($ann),
if ($pagePrev < 1) { 'Entree' => $objAnnonces->getAnnonceEntree($ann),
$pagePrev = 1; 'EntreeSD' => $objAnnonces->getAnnonceEntreeSD($ann),
} 'Even' => $objAnnonces->getAnnonceEven($ann),
$pageNext = $page + 1; 'Texte' => $objAnnonces->getAnnonceTexte($ann),
if( $pageNext > $pageTotal ) { 'Type' => $objAnnonces->getType($ann),
$pageNext = $pageTotal; 'Code' => $objAnnonces->getCode($ann),
} 'Annee' => $objAnnonces->getAnnee($ann),
} else { 'Num' => $objAnnonces->getNum($ann),
$pageTotal = $pageCurrent = 1; 'Deleted' => $objAnnonces->isDeleted($ann),
$pagePrev = 1; 'Entites' => $objAnnonces->getAnnonceEntite($ann)
$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('source', $session->getSource());
$this->view->assign('nbReponsesTotal', empty($nbReponsesTotal) ? 0 : $nbReponsesTotal); 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);
$classType = 'annonces'.ucfirst($vue);; if ($request->getParam('q')=='ajax')
$annonces = array(); {
if (count($objAnnonces->$classType) > 0) { $this->_helper->layout()->disableLayout();
foreach($objAnnonces->$classType as $ann) { //$this->_helper->viewRenderer->setNoRender(true);
$annonces[] = $objAnnonces->getAnnonceResume($ann); $this->renderScript('juridique/annonce-ajax.phtml');
} } else {
$this->logger->info(print_r($annonces,1));
$this->view->assign('annonces', $annonces);
}
$this->view->headScript()->appendFile($this->theme->pathScript.'/annonces.js', 'text/javascript');
}
}
/** $this->view->assign('PageCurrent', $page);
* Affichage d'une annonce
*/
public function annonceAction()
{
$request = $this->getRequest();
$autrePage = $request->getParam('apage'); //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'],
), 'default', true);
$this->view->assign('lienBodacc', $lienBodacc);
}
$idAnn = $request->getParam('idAnn', null); $this->renderScript('juridique/annonce.phtml');
$siren = substr($this->siret, 0,9); }
$vue = $request->getParam('vue', 'bodacc'); // --- Affichage pour la liste des annonces
$source = $request->getParam('source'); } else {
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'); // --- Titre de la page
$this->view->assign('page', $page); if ( empty($autrePage) ) {
if( empty($siren) ){
$titre = 'Identifiant '.$this->id;
} else {
$titre = 'Siret '.$siren;
}
$this->view->headTitle()->prepend('Annonces Légales - '.$titre);
}
$this->view->assign('id', $session->getId()); // ---- Calcul pagination
$this->view->assign('siren', $siren); $nbReponses = count($infos->result->item);
$this->view->assign('siret', $this->siret); $nbReponsesTotal = $infos->nbReponses;
$this->view->assign('raisonSociale', $session->getRaisonSociale()); if ($nbReponses < $nbReponsesTotal) {
$this->view->assign('AutrePage', $autrePage); $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);
if ($session->getSource() == '006' || $session->getSourceId() == '007') { $this->view->assign('nbReponses', empty($nbReponses) ? 0 : $nbReponses);
$this->view->assign('AutreSource', true); $this->view->assign('nbReponsesTotal', empty($nbReponsesTotal) ? 0 : $nbReponsesTotal);
} 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'; foreach ( $typeAnnonces as $type ) {
$objAnnonces = new Annonces($infos->result->item); $classType = 'annonces'.$type;
$annonces = array();
$typeAnnonces = array( if ( count( $objAnnonces->$classType ) > 0 ) {
'Bodacc', foreach( $objAnnonces->$classType as $ann ) {
'Balo', $annonces[] = $objAnnonces->getAnnonceResume($ann);
'Bomp', }
'Asso', $this->view->assign($classType, $annonces);
); }
}
$user = new Scores_Utilisateur(); $this->view->headScript()->appendFile($this->theme->pathScript.'/annonces.js', 'text/javascript');
$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);
}
}
}
}
} }
/** /**
@ -383,9 +266,12 @@ class JuridiqueController extends Zend_Controller_Action
$this->view->msg = "Erreur"; $this->view->msg = "Erreur";
} else { } else {
$this->view->List = isset($response->List->item)?$response->List->item:null; $this->view->List = $response->List->item;
// --- Pagination // --- Pagination
$nbReponsesTotal = $response->Nb; $nbReponsesTotal = $response->Nb;
$pageTotal = $pageCurrent = 1;
$pagePrev = null;
$pageNext = null;
if ($nbReponses < $nbReponsesTotal) { if ($nbReponses < $nbReponsesTotal) {
$pageTotal = ceil( $nbReponsesTotal / $nbReponses ); $pageTotal = ceil( $nbReponsesTotal / $nbReponses );
$pageCurrent = $page; $pageCurrent = $page;
@ -397,10 +283,6 @@ class JuridiqueController extends Zend_Controller_Action
if( $pageNext > $pageTotal ) { if( $pageNext > $pageTotal ) {
$pageNext = $pageTotal; $pageNext = $pageTotal;
} }
} else {
$pageTotal = $pageCurrent = 1;
$pagePrev = 1;
$pageNext = 1;
} }
$this->view->assign('PageTotal', $pageTotal); $this->view->assign('PageTotal', $pageTotal);
$this->view->assign('PagePrev', $pagePrev); $this->view->assign('PagePrev', $pagePrev);
@ -528,7 +410,7 @@ class JuridiqueController extends Zend_Controller_Action
if ($infos === false) $this->_forward('soap', 'error'); if ($infos === false) $this->_forward('soap', 'error');
$competences = $infos->result->item; $competences = $infos->result->item;
$this->logger->info(print_r($infos,1)); Zend_Registry::get('firebug')->info($infos);
if( $type=='tri' || $type=='cfe' ) { if( $type=='tri' || $type=='cfe' ) {
$i=0; $i=0;
foreach($competences as $comp){ foreach($competences as $comp){
@ -563,7 +445,7 @@ class JuridiqueController extends Zend_Controller_Action
$ws = new WsScores(); $ws = new WsScores();
$infos = $ws->getListeConventions($siren); $infos = $ws->getListeConventions($siren);
$conventions = $infos->result->item; $conventions = $infos->result->item;
$this->logger->info(print_r($conventions,1)); Zend_Registry::get('firebug')->info($conventions);
$this->view->assign('conventions', $conventions); $this->view->assign('conventions', $conventions);
$this->view->assign('exportObjet', $infos); $this->view->assign('exportObjet', $infos);
} }
@ -593,7 +475,7 @@ class JuridiqueController extends Zend_Controller_Action
$this->view->assign('marques', $marques); $this->view->assign('marques', $marques);
$this->view->assign('idObject', $idObject); $this->view->assign('idObject', $idObject);
$this->view->assign('exportObjet', $marques); $this->view->assign('exportObjet', $marques);
$this->logger->info(print_r($infos,1)); Zend_Registry::get('firebug')->info($infos);
} }
/** /**
@ -617,9 +499,9 @@ class JuridiqueController extends Zend_Controller_Action
if(!file_exists($directory.'/'.$file) if(!file_exists($directory.'/'.$file)
|| filesize($directory.'/'.$file)==0 ) { || filesize($directory.'/'.$file)==0 ) {
$cmd = 'php ' . APPLICATION_PATH . '/../scripts/jobs/getMarque.php ' . $numdepot; $cmd = 'php ' . APPLICATION_PATH . '/../scripts/jobs/getMarque.php ' . $numdepot;
$this->logger->info($cmd); Zend_Registry::get('firebug')->info($cmd);
$result = exec($cmd); $result = exec($cmd);
$this->logger->info($result); Zend_Registry::get('firebug')->info($result);
} }
//On vérfie que le fichier existe après le téléchargement //On vérfie que le fichier existe après le téléchargement
if(file_exists($directory.'/'.$file) && filesize($directory.'/'.$file)>0) { if(file_exists($directory.'/'.$file) && filesize($directory.'/'.$file)>0) {
@ -631,45 +513,40 @@ class JuridiqueController extends Zend_Controller_Action
} }
/**
* Gestion téléchargement du Bodacc au format pdf
*/
public function bodaccpdfAction() public function bodaccpdfAction()
{ {
$this->_helper->layout()->disableLayout(); $this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true); $this->_helper->viewRenderer->setNoRender(true);
$request = $this->getRequest(); $request = $this->getRequest();
$siren = $request->getParam('siren');
$type = $request->getParam('type'); $type = $request->getParam('type');
$parution = $request->getParam('parution'); $annee = $request->getParam('annee');
$annonce = $request->getParam('annonce'); $num = $request->getParam('num');
$unit = $request->getParam('unit');
$annee = substr($parution,0,4);
$c = Zend_Registry::get('config'); //$num doit être retraité pour être sur 4 position
$path = $c->profil->path->shared.'/persist/bodacc/'.$type.'/'.$annee; $c = strlen($num);
if ($unit == 1) { for($i=0;$i<4-$c;$i++){
$file = $path."/BODACC_".$type."_".$annee."_".substr($parution,4)."_".$annonce.".pdf"; $num = '0'.$num;
} else {
$file = $path."/BODACC_".$type."_".$annee."_".substr($parution,4).".pdf";
} }
if (!file_exists($file)) { $c = Zend_Registry::get('config');
$cli = "/../scripts/jobs/getBodaccPdf.php"; $file = $c->profil->path->shared.'/persist/bodacc/'.$type.'/'.$annee.'/'.
$params = "--siren ".$siren."--type ".$type." --parution ".$parution." --annonce ".$annonce; 'BODACC_'.$type.'_'.$annee.'_'.$num.'.pdf';
exec('php ' . APPLICATION_PATH . "$cli $params >> getBodaccPdf.log");
if ( !file_exists($file) ) {
exec('php ' . APPLICATION_PATH . "/../scripts/jobs/getBodaccPdf.php $type $annee $num >> getBodaccPdf.log");
} }
if (file_exists($file)) { if (file_exists($file)) {
$href = $this->view->url(array('module'=>'file', 'controller'=>'bodacc', $href = $this->view->url(array('module'=>'file', 'controller'=>'bodacc', 'action'=>'actual',
'action'=>'actual', 'q' => basename($file)), 'default', true); 'q' => basename($file)), 'default', true);
echo "<a target=\"_blank\" href=\"".$href."\">Cliquer ici pour télécharger le fichier.</a>"; echo "<a target=\"_blank\" href=\"".$href."\">Cliquer ici pour télécharger le fichier.</a>";
} else { } else {
echo "Erreur lors du chargement du fichier."; echo "Erreur lors du chargement du fichier.";
} }
} }
public function annoncenumAction() public function annoncenumAction()
{ {
$this->_helper->layout()->disableLayout(); $this->_helper->layout()->disableLayout();
@ -679,7 +556,7 @@ class JuridiqueController extends Zend_Controller_Action
$ws = new WsScores(); $ws = new WsScores();
$result = $ws->getAnnoncesNum($siren); $result = $ws->getAnnoncesNum($siren);
$this->logger->info(print_r($result,1)); Zend_Registry::get('firebug')->info($result);
$numWS = array(); $numWS = array();
if (count($result->item)>0) { if (count($result->item)>0) {
foreach ($result->item as $item) { foreach ($result->item as $item) {

View File

@ -4,18 +4,8 @@ class LogoController extends Zend_Controller_Action
protected $theme; protected $theme;
protected $pathLogo = ''; protected $pathLogo = '';
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init() public function init()
{ {
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme // --- Theme
$this->theme = Zend_Registry::get('theme'); $this->theme = Zend_Registry::get('theme');

View File

@ -54,18 +54,8 @@ class MandataireController extends Zend_Controller_Action
array( "triId"=>"1798", "triCode"=>"AGENL", "triNom"=>"Cour d'Appel d'Agen", "triCP"=>"47916" ), array( "triId"=>"1798", "triCode"=>"AGENL", "triNom"=>"Cour d'Appel d'Agen", "triCP"=>"47916" ),
); );
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init() public function init()
{ {
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme // --- Theme
$this->theme = Zend_Registry::get('theme'); $this->theme = Zend_Registry::get('theme');
@ -86,13 +76,13 @@ class MandataireController extends Zend_Controller_Action
$ws = new WsScores(); $ws = new WsScores();
$this->logger->info('idMandataire : '.$idMandataire); Zend_Registry::get('firebug')->info('idMandataire : '.$idMandataire);
//Mode edition //Mode edition
if ($idMandataire != '') { if ($idMandataire != '') {
$idMandataire = (int)substr($idMandataire,1); $idMandataire = (int)substr($idMandataire,1);
$reponse = $ws->getMandataire($idMandataire); $reponse = $ws->getMandataire($idMandataire);
$this->logger->info(print_r($reponse,1)); Zend_Registry::get('firebug')->info($reponse);
if ($reponse!==false) { if ($reponse!==false) {
$tabMandataires = json_decode($reponse, true); $tabMandataires = json_decode($reponse, true);
} else { } else {

View File

@ -3,18 +3,8 @@ class OrderController extends Zend_Controller_Action
{ {
protected $theme; protected $theme;
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init() public function init()
{ {
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme // --- Theme
$this->theme = Zend_Registry::get('theme'); $this->theme = Zend_Registry::get('theme');
} }

View File

@ -18,18 +18,8 @@ class PiecesController extends Zend_Controller_Action
protected $siret; protected $siret;
protected $id; protected $id;
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init() public function init()
{ {
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme // --- Theme
$this->theme = Zend_Registry::get('theme'); $this->theme = Zend_Registry::get('theme');
@ -141,7 +131,7 @@ class PiecesController extends Zend_Controller_Action
//Affichage des actes disponible //Affichage des actes disponible
$ws = new WsScores(); $ws = new WsScores();
$responses = $ws->getPiecesActes($siren); $responses = $ws->getPiecesActes($siren);
$this->logger->info(print_r($responses,1)); Zend_Registry::get('firebug')->info($responses);
/* /*
* Construire la réponse pour affichage * Construire la réponse pour affichage
@ -499,7 +489,7 @@ class PiecesController extends Zend_Controller_Action
if ( $stream->isSuccessful() && substr($stream->getBody(),0,4)=='%PDF' ) { if ( $stream->isSuccessful() && substr($stream->getBody(),0,4)=='%PDF' ) {
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
$file = 'bilan-'.$siren.'-'.$type.'-'.$dateCloture.'.pdf'; $file = 'bilan-'.$siren.'-'.$type.'-'.$dateCloture.'.pdf';
if (copy($stream->getStreamName(), $c->profil->path->shared . '/files/' . $file)) { if (copy($stream->getStreamName(), $c->profil->path->shared . '/temp/files/' . $file)) {
$this->view->assign('url', $this->view->url(array('module'=>'file', $this->view->assign('url', $this->view->url(array('module'=>'file',
'controller'=>'greffe', 'action'=>'bilan', 'q'=>$file), 'default', true)); 'controller'=>'greffe', 'action'=>'bilan', 'q'=>$file), 'default', true));
} else { } else {
@ -509,7 +499,7 @@ class PiecesController extends Zend_Controller_Action
$this->view->assign('msg', "Erreur lors du téléchargement du fichier."); $this->view->assign('msg', "Erreur lors du téléchargement du fichier.");
} }
} catch (Zend_Http_Client_Exception $e) { } catch (Zend_Http_Client_Exception $e) {
$this->logger->info('HTTP Exception : '.$e->getMessage()); Zend_Registry::get('firebug')->info('HTTP Exception : '.$e->getMessage());
$this->view->assign('msg', "Erreur lors du téléchargement du fichier."); $this->view->assign('msg', "Erreur lors du téléchargement du fichier.");
} }
} }
@ -627,7 +617,7 @@ class PiecesController extends Zend_Controller_Action
if ( $stream->isSuccessful() && substr($stream->getBody(),0,4)=='%PDF' ) { if ( $stream->isSuccessful() && substr($stream->getBody(),0,4)=='%PDF' ) {
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
$file = 'acte-'.$siren.'-'.$depotNum.'-'.$acteNum.'.pdf'; $file = 'acte-'.$siren.'-'.$depotNum.'-'.$acteNum.'.pdf';
if (copy($stream->getStreamName(), $c->profil->path->shared . '/files/' . $file)) { if (copy($stream->getStreamName(), $c->profil->path->shared . '/temp/files/' . $file)) {
$this->view->assign('url', $this->view->url(array('module'=>'file', $this->view->assign('url', $this->view->url(array('module'=>'file',
'controller'=>'greffe', 'action'=>'acte', 'q'=>$file), 'default', true)); 'controller'=>'greffe', 'action'=>'acte', 'q'=>$file), 'default', true));
} else { } else {
@ -637,7 +627,7 @@ class PiecesController extends Zend_Controller_Action
$this->view->assign('msg', "Erreur lors du téléchargement du fichier."); $this->view->assign('msg', "Erreur lors du téléchargement du fichier.");
} }
} catch (Zend_Http_Client_Exception $e) { } catch (Zend_Http_Client_Exception $e) {
$this->logger->info('HTTP Exception : '.$e->getMessage()); Zend_Registry::get('firebug')->info('HTTP Exception : '.$e->getMessage());
$this->view->assign('msg', "Erreur lors du téléchargement du fichier."); $this->view->assign('msg', "Erreur lors du téléchargement du fichier.");
} }
} }
@ -836,10 +826,10 @@ class PiecesController extends Zend_Controller_Action
$params->companyId = $siren; $params->companyId = $siren;
$result = $ws->getAssoActes($params); $result = $ws->getAssoActes($params);
$actes = array(); $actes = array();
$this->logger->info(print_r($result,1)); Zend_Registry::get('firebug')->info($result);
if (count($result->item) > 0) { if (count($result->item) > 0) {
foreach ($result->item as $item) { foreach ($result->item as $item) {
$this->logger->info(print_r($item,1)); Zend_Registry::get('firebug')->info($item);
if ( $user->checkPerm('actes') ) { if ( $user->checkPerm('actes') ) {
$href = $this->view->url(array('controller'=>'pieces', 'action'=>'associationacte', $href = $this->view->url(array('controller'=>'pieces', 'action'=>'associationacte',
'siren'=>$siren, 'date'=> $item->Date), 'default', true); 'siren'=>$siren, 'date'=> $item->Date), 'default', true);
@ -898,7 +888,7 @@ class PiecesController extends Zend_Controller_Action
if ( $stream->isSuccessful() && substr($stream->getBody(),0,4)=='%PDF' ) { if ( $stream->isSuccessful() && substr($stream->getBody(),0,4)=='%PDF' ) {
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
$file = 'ST-'.$siren.'-'.$date.'.pdf'; $file = 'ST-'.$siren.'-'.$date.'.pdf';
if (copy($stream->getStreamName(), $c->profil->path->shared . '/files/' . $file)) { if (copy($stream->getStreamName(), $c->profil->path->shared . '/temp/files/' . $file)) {
$this->view->assign('url', $this->view->url(array('module'=>'file', 'controller'=>'greffe', $this->view->assign('url', $this->view->url(array('module'=>'file', 'controller'=>'greffe',
'action'=>'association', 'q'=>$file), 'default', true)); 'action'=>'association', 'q'=>$file), 'default', true));
} else { } else {
@ -908,7 +898,7 @@ class PiecesController extends Zend_Controller_Action
$this->view->assign('msg', "Erreur lors du téléchargement du fichier."); $this->view->assign('msg', "Erreur lors du téléchargement du fichier.");
} }
} catch (Zend_Http_Client_Exception $e) { } catch (Zend_Http_Client_Exception $e) {
$this->logger->info('HTTP Exception : '.$e->getMessage()); Zend_Registry::get('firebug')->info('HTTP Exception : '.$e->getMessage());
$this->view->assign('msg', "Erreur lors du téléchargement du fichier."); $this->view->assign('msg', "Erreur lors du téléchargement du fichier.");
} }
@ -936,7 +926,7 @@ class PiecesController extends Zend_Controller_Action
$ws = new WsScores(); $ws = new WsScores();
$reponse = $ws->getPiecesBilans($siren); $reponse = $ws->getPiecesBilans($siren);
$listBilans = $reponse->result->item; $listBilans = $reponse->result->item;
$this->logger->info(print_r($listBilans,1)); Zend_Registry::get('firebug')->info($listBilans);
$decision = ''; $decision = '';
foreach ( $listBilans as $item) { foreach ( $listBilans as $item) {
@ -1007,7 +997,7 @@ class PiecesController extends Zend_Controller_Action
if ( $stream->isSuccessful() && substr($stream->getBody(),0,4)=='%PDF' ) { if ( $stream->isSuccessful() && substr($stream->getBody(),0,4)=='%PDF' ) {
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
$file = 'bilan-'.$siren.'-'.$type.'-'.$dateCloture.'.pdf'; $file = 'bilan-'.$siren.'-'.$type.'-'.$dateCloture.'.pdf';
if (copy($stream->getStreamName(), $c->profil->path->shared . '/files/' . $file)) { if (copy($stream->getStreamName(), $c->profil->path->shared . '/temp/files/' . $file)) {
$this->view->assign('url', $this->view->url(array('module'=>'file', 'controller'=>'greffe', $this->view->assign('url', $this->view->url(array('module'=>'file', 'controller'=>'greffe',
'action' => 'association', 'q'=>$file), 'default', true)); 'action' => 'association', 'q'=>$file), 'default', true));
} else { } else {
@ -1017,7 +1007,7 @@ class PiecesController extends Zend_Controller_Action
$this->view->assign('msg', "Erreur lors du téléchargement du fichier."); $this->view->assign('msg', "Erreur lors du téléchargement du fichier.");
} }
} catch (Zend_Http_Client_Exception $e) { } catch (Zend_Http_Client_Exception $e) {
$this->logger->info('HTTP Exception : '.$e->getMessage()); Zend_Registry::get('firebug')->info('HTTP Exception : '.$e->getMessage());
$this->view->assign('msg', "Erreur lors du téléchargement du fichier."); $this->view->assign('msg', "Erreur lors du téléchargement du fichier.");
} }
@ -1054,7 +1044,7 @@ class PiecesController extends Zend_Controller_Action
case 'T': case 'T':
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
$path = $c->profil->path->shared. '/files/'; $path = $c->profil->path->shared. '/temp/files/';
//Le fichier est déjà présent sur le serveur //Le fichier est déjà présent sur le serveur
if ( file_exists($path.'kbis-'.$siren.'.pdf') if ( file_exists($path.'kbis-'.$siren.'.pdf')

View File

@ -3,18 +3,8 @@ class PrintController extends Zend_Controller_Action
{ {
protected $theme; protected $theme;
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init() public function init()
{ {
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme // --- Theme
$this->theme = Zend_Registry::get('theme'); $this->theme = Zend_Registry::get('theme');
} }
@ -140,7 +130,7 @@ class PrintController extends Zend_Controller_Action
$fichier = str_replace('.pdf', '', $fichier); $fichier = str_replace('.pdf', '', $fichier);
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
$file = $c->profil->path->shared.'/pages/'.$fichier.'.html'; $file = $c->profil->path->shared.'/temp/pages/'.$fichier.'.html';
if (!file_exists($file)) if (!file_exists($file))
{ {
echo 'Fichier introuvable'; echo 'Fichier introuvable';
@ -219,7 +209,7 @@ class PrintController extends Zend_Controller_Action
} }
$this->view->assign('controller', $elements['controller']); $this->view->assign('controller', $elements['controller']);
$this->view->assign('action', $elements['action']); $this->view->assign('action', $elements['action']);
$this->logger->info(print_r($elements['params'],1)); Zend_Registry::get('firebug')->info($elements['params']);
$this->view->assign('params', $elements['params']); $this->view->assign('params', $elements['params']);
} }
@ -239,7 +229,7 @@ class PrintController extends Zend_Controller_Action
} }
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
$file = $c->profil->path->shared.'/files/'.$fichier; $file = $c->profil->path->shared.'/temp/files/'.$fichier;
if (!file_exists($file)){ if (!file_exists($file)){
echo "Erreur lors de la génération du fichier."; echo "Erreur lors de la génération du fichier.";
exit; exit;

View File

@ -3,18 +3,8 @@ class RechercheController extends Zend_Controller_Action
{ {
protected $theme; protected $theme;
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init() public function init()
{ {
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme // --- Theme
$this->theme = Zend_Registry::get('theme'); $this->theme = Zend_Registry::get('theme');
@ -296,7 +286,7 @@ class RechercheController extends Zend_Controller_Action
$request = $this->getRequest(); $request = $this->getRequest();
if ($request->isPost() && $form->isValid($request->getParams())) { if ($request->isPost() && $form->isValid($request->getParams())) {
$this->logger->info(print_r($form->getValues(),1)); Zend_Registry::get('firebug')->info($form->getValues());
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
$path = $c->profil->path->shared.'/persist/log'; $path = $c->profil->path->shared.'/persist/log';
@ -409,7 +399,7 @@ class RechercheController extends Zend_Controller_Action
//Giant //Giant
if( !empty($params['pays']) && $type == 'ent' ){ if( !empty($params['pays']) && $type == 'ent' ){
$this->logger->info('RECHERCHE GIANT'); Zend_Registry::get('firebug')->info('RECHERCHE GIANT');
$this->_forward('search', 'giant', null, $params); $this->_forward('search', 'giant', null, $params);
//Worldcheck //Worldcheck
} elseif ($type == 'wcheck' ) { } elseif ($type == 'wcheck' ) {
@ -806,8 +796,6 @@ class RechercheController extends Zend_Controller_Action
//Calcul pagination //Calcul pagination
$nbReponses = $reponse->nbReponses; $nbReponses = $reponse->nbReponses;
$nbReponsesTotal = $reponse->nbReponsesTotal; $nbReponsesTotal = $reponse->nbReponsesTotal;
$pagePrev=1;
$pageNext=1;
if ($nbReponses < $nbReponsesTotal) { if ($nbReponses < $nbReponsesTotal) {
$pageTotal = ceil( $nbReponsesTotal / $nbAffichage ); $pageTotal = ceil( $nbReponsesTotal / $nbAffichage );
$pageCurrent = $page; $pageCurrent = $page;
@ -929,7 +917,7 @@ class RechercheController extends Zend_Controller_Action
$sql->where("LOWER(libelle) ".$where); $sql->where("LOWER(libelle) ".$where);
} }
} }
$this->logger->info($where); Zend_Registry::get('firebug')->info($where);
$rows = $table->fetchAll($sql); $rows = $table->fetchAll($sql);
if ( count($rows)>0 ) { if ( count($rows)>0 ) {
@ -1208,7 +1196,7 @@ class RechercheController extends Zend_Controller_Action
//echo "<pre>"; print_r($etabs); echo "</pre>"; exit; //echo "<pre>"; print_r($etabs); echo "</pre>"; exit;
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
$file = $c->profil->path->shared . '/files/'.$user->getIdClient().'-'.$user->getLogin().'-'.date('YmdHis').'.csv'; $file = $c->profil->path->shared . '/temp/files/'.$user->getIdClient().'-'.$user->getLogin().'-'.date('YmdHis').'.csv';
$export = new Scores_Export_ArrayCsv($etabs, 'rechercheEntreprise'); $export = new Scores_Export_ArrayCsv($etabs, 'rechercheEntreprise');
$export->writeFile($file); $export->writeFile($file);

File diff suppressed because it is too large Load Diff

View File

@ -35,18 +35,8 @@ class SurveillanceController extends Zend_Controller_Action
'liens' => 'survliens', 'liens' => 'survliens',
); );
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init() public function init()
{ {
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme // --- Theme
$this->theme = Zend_Registry::get('theme'); $this->theme = Zend_Registry::get('theme');
@ -118,7 +108,6 @@ class SurveillanceController extends Zend_Controller_Action
$page = $request->getParam('page'); $page = $request->getParam('page');
$from = $request->getParam('from'); $from = $request->getParam('from');
$q = $request->getParam('q');
$siret = $request->getParam('siret', ''); $siret = $request->getParam('siret', '');
$email = $request->getParam('email', ''); $email = $request->getParam('email', '');
@ -137,8 +126,6 @@ class SurveillanceController extends Zend_Controller_Action
} }
} elseif (isset($page)) { } 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 { } else {
$this->redirect('surveillance/liste'); $this->redirect('surveillance/liste');
} }
@ -252,7 +239,7 @@ class SurveillanceController extends Zend_Controller_Action
$filtre->detail = false; $filtre->detail = false;
$infos = $ws->getSurveillances($filtre); $infos = $ws->getSurveillances($filtre);
$this->logger->info(print_r($infos,1)); Zend_Registry::get('firebug')->info($infos);
if (property_exists($infos->result, 'item') && count($infos->result->item)>0) { if (property_exists($infos->result, 'item') && count($infos->result->item)>0) {
$titre = 'Ajouter une surveillance'; $titre = 'Ajouter une surveillance';
@ -383,7 +370,7 @@ class SurveillanceController extends Zend_Controller_Action
$ws = new WsScores(); $ws = new WsScores();
$infos = $ws->getSurveillances($filtre, $position, $nbAffichage); $infos = $ws->getSurveillances($filtre, $position, $nbAffichage);
$surveillances = isset($infos->result->item)?$infos->result->item:null; $surveillances = $infos->result->item;
$listTrier = array(); $listTrier = array();
if ( count($surveillances)>0 ) { if ( count($surveillances)>0 ) {
@ -425,12 +412,10 @@ class SurveillanceController extends Zend_Controller_Action
} }
} else { } else {
$pageTotal = $pageCurrent = 1; $pageTotal = $pageCurrent = 1;
$pagePrev = 1;
$pageNext = 1;
} }
$this->view->assign('PageTotal', $pageTotal); $this->view->assign('PageTotal', $pageTotal);
$this->view->assign('PagePrev', isset($pagePrev)?$pagePrev:1); $this->view->assign('PagePrev', $pagePrev);
$this->view->assign('PageNext', isset($pageNext)?$pageNext:1); $this->view->assign('PageNext', $pageNext);
$this->view->assign('PageCurrent', $pageCurrent); $this->view->assign('PageCurrent', $pageCurrent);
$this->view->assign('nbReponses', empty($nbReponses) ? 0 : $nbReponses); $this->view->assign('nbReponses', empty($nbReponses) ? 0 : $nbReponses);
@ -646,8 +631,6 @@ class SurveillanceController extends Zend_Controller_Action
} }
} else { } else {
$pageTotal = $pageCurrent = 1; $pageTotal = $pageCurrent = 1;
$pagePrev = 1;
$pageNext = 1;
} }
$this->view->assign('PageTotal', $pageTotal); $this->view->assign('PageTotal', $pageTotal);
$this->view->assign('PagePrev', $pagePrev); $this->view->assign('PagePrev', $pagePrev);
@ -716,7 +699,7 @@ class SurveillanceController extends Zend_Controller_Action
$getCSV = $request->getParam('get', ''); $getCSV = $request->getParam('get', '');
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
$path = $c->profil->path->shared.'/files'; $path = $c->profil->path->shared.'/temp/files';
// --- Lister les fichiers // --- Lister les fichiers
if (empty($nomFic)) { if (empty($nomFic)) {
@ -988,7 +971,7 @@ class SurveillanceController extends Zend_Controller_Action
} }
} }
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
$path = $c->profil->path->shared.'/files'; $path = $c->profil->path->shared.'/temp/files';
//Récupération du fichier //Récupération du fichier
$file = $path.'/'.$nomFic; $file = $path.'/'.$nomFic;
@ -1155,60 +1138,9 @@ class SurveillanceController extends Zend_Controller_Action
$output = '</page>'; $output = '</page>';
} }
// conversion HTML => PDF // conversion HTML => PDF
require_once 'Vendors/html2pdf/html2pdf.class.php';
$html2pdf = new HTML2PDF('P','A4','fr'); $html2pdf = new HTML2PDF('P','A4','fr');
$html2pdf->WriteHTML(utf8_decode($output)); $html2pdf->WriteHTML(utf8_decode($output));
$html2pdf->Output(str_replace('.csv', '.pdf', $nomFic), 'D'); $html2pdf->Output(str_replace('.csv', '.pdf', $nomFic), 'D');
} }
/**
* Import surveillance en fichier csv
*/
public function surveillanceserieAction(){
//echo 'coucou';die;
$request = $this->getRequest();
if($request->getParam('ref')>""){
$cs=new Scores_Import_FileCsv();
$verif=$cs->verifandupload($_FILES,$request);
if($verif['success']){
$this->view->assign('msg', 'Nous avons enregistré votre fichier de '.$verif['message'].' lignes.<br><br>Les surveillances seront enregistrées durant la nuit.');
$this->view->assign('step', 2);
}else{
$this->view->assign('msg', $verif['message']);
$this->view->assign('step', 2);
}
return;
}
//Affichage formulaire demande ref et email
$this->_helper->layout->disableLayout();
$source = $request->getParam('source', '');
$encours = $request->getParam('encours', 0);
$this->view->pathScript=$this->theme->pathScript;
$this->view->pathStyle=$this->theme->pathStyle;
$user = new Scores_Utilisateur();
$request = $this->getRequest();
$source = $request->getParam('source');
$tabSource = array();
$user = new Scores_Utilisateur();
// Main email
$email = $user->getEmail();
$ref=$user->identity->id . 'surv'.Date('YmdHis');
foreach ($this->sourceDroit as $s => $perm) {
if ($user->checkPerm($perm)) {
$tabSource[] = array(
'value' => $s,
'name' => $this->sourceTxt[$s],
'select' => (!empty($source) && $source==$s) ? ' selected' : '',
);
}
}
$this->view->assign('tabSource', $tabSource);
$this->view->assign('email', $email);
$this->view->assign('ref', $ref);
$this->view->assign('encours', $encours);
$this->view->msg="Sélectionnez votre fichier";
}
} }

View File

@ -13,23 +13,13 @@ class TelechargementController extends Zend_Controller_Action
*/ */
protected $path = ''; protected $path = '';
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init() public function init()
{ {
if (Zend_Registry::isRegistered('logger')) { $this->_helper->layout()->disableLayout();
$this->logger = Zend_Registry::get('logger');
}
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true); $this->_helper->viewRenderer->setNoRender(true);
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
$this->path = $c->profil->path->shared.'/files'; $this->path = $c->profil->path->shared.'/temp/files';
require_once 'Scores/WsScores.php'; require_once 'Scores/WsScores.php';
} }
@ -268,7 +258,7 @@ class TelechargementController extends Zend_Controller_Action
$authinfo = '/login/'.$identity->username.'/hach/'.$identity->password; $authinfo = '/login/'.$identity->username.'/hach/'.$identity->password;
$url = $host.$authinfo.'/q/'.$q; $url = $host.$authinfo.'/q/'.$q;
$this->logger->info($url); Zend_Registry::get('firebug')->info($url);
$file = $this->getFile($url, uniqid('histo-').'.pdf'); $file = $this->getFile($url, uniqid('histo-').'.pdf');
@ -311,9 +301,9 @@ class TelechargementController extends Zend_Controller_Action
//Téléchargement //Téléchargement
if( $url !== false) { if( $url !== false) {
$this->logger->info($url); Zend_Registry::get('firebug')->info($url);
$file = $this->getFile($url); $file = $this->getFile($url);
$this->logger->info('File:'.$this->path.'/'.$file); Zend_Registry::get('firebug')->info('File:'.$this->path.'/'.$file);
// --- En attente // --- En attente
if ( $file === null ) { if ( $file === null ) {
echo ''; echo '';

View File

@ -28,18 +28,8 @@ class UserController extends Zend_Controller_Action
return $new_password; return $new_password;
} }
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init() public function init()
{ {
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme // --- Theme
$this->theme = Zend_Registry::get('theme'); $this->theme = Zend_Registry::get('theme');
@ -101,10 +91,7 @@ class UserController extends Zend_Controller_Action
$options['profil'] = 'Utilisateur'; $options['profil'] = 'Utilisateur';
} }
$ws = new WsScores(); $ws = new WsScores();
$this->logger->info('setInfosLogin');
$this->logger->info(print_r($options,1));
$reponse = $ws->setInfosLogin($login, $action, $options); $reponse = $ws->setInfosLogin($login, $action, $options);
$this->logger->info(print_r($response,1));
$isProfilUpdated = true; $isProfilUpdated = true;
$message = 'Erreur lors de la mise à jour du compte !'; $message = 'Erreur lors de la mise à jour du compte !';
@ -487,7 +474,7 @@ class UserController extends Zend_Controller_Action
//Auth error //Auth error
else { else {
$this->view->message = ''; $this->view->message = '';
$this->logger->info(print_r($result)); Zend_Registry::get('firebug')->info($result);
foreach ($result->getMessages() as $message) { foreach ($result->getMessages() as $message) {
$this->view->message.= $message."<br/>"; $this->view->message.= $message."<br/>";
} }
@ -496,7 +483,7 @@ class UserController extends Zend_Controller_Action
} }
// Pas de validation du formulaire // Pas de validation du formulaire
else { else {
$this->logger->info('DISPLAY'); Zend_Registry::get('firebug')->info('DISPLAY');
} }
} }
@ -741,7 +728,7 @@ class UserController extends Zend_Controller_Action
$mail = new Scores_Mail_Method(); $mail = new Scores_Mail_Method();
$mail->setSubject("Demande d'envoi des identifiants"); $mail->setSubject("Demande d'envoi des identifiants");
$mail->setBodyHtmlC($mailbody); $mail->setBodyHtmlC($mailbody);
$mail->setFromKey('supportdev'); $mail->setFromKey('support');
$mail->addToKey('support'); $mail->addToKey('support');
$mail->setReplyTo($params['email']); $mail->setReplyTo($params['email']);
try { try {

View File

@ -4,18 +4,8 @@ class WorldcheckController extends Zend_Controller_Action
protected $theme; protected $theme;
protected $wcConfig; protected $wcConfig;
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init() public function init()
{ {
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme // --- Theme
$this->theme = Zend_Registry::get('theme'); $this->theme = Zend_Registry::get('theme');

View File

@ -49,6 +49,7 @@
<span class="glyphicon glyphicon-file pull-right" aria-hidden="true"></span></a> <span class="glyphicon glyphicon-file pull-right" aria-hidden="true"></span></a>
</li> </li>
</ul> </ul>
<p class="text-danger">Ce service est actuellement en beta. La consultation vous est offerte durant cette période.</p>
</div> </div>
</div> </div>
@ -79,13 +80,17 @@
<p>Les données agrégées sont officielles, exhaustives, fraîches et opposables aux tiers. Elles sont utilisées <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> 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> <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>
<div class="row">
<div class="col-md-12">
<p class="inexweb text-center"><img src="/themes/default/images/partner/logo-inexweb.png"/> <strong>vous offre 60 jours de gratuité, et la surveillance de votre portefeuille clients !</strong></p>
</div>
</div>
</div> </div>
</div> </div>

View File

@ -38,6 +38,7 @@
<span class="glyphicon glyphicon-file pull-right" aria-hidden="true"></span></a> <span class="glyphicon glyphicon-file pull-right" aria-hidden="true"></span></a>
</li> </li>
</ul> </ul>
<p class="text-danger">Ce service est actuellement en beta. La consultation vous est offerte durant cette période.</p>
</div> </div>
</div> </div>

View File

@ -202,8 +202,8 @@ if ($this->indiscore->Enseigne!='' && $this->indiscore->Sigle!='') {
<tr> <tr>
<td width="30">&nbsp;</td> <td width="30">&nbsp;</td>
<td width="550" colspan="2" class="StyleInfoData"> <td width="550" colspan="2" class="StyleInfoData">
<i>Pour information, les méthodes standards donnent : Conan &amp; Holder = <b><?php echo $this->indiscore->scores->ConanH;?></b>, <i>Pour information, les méthodes standards donnent : Conan &amp; Holder = <b><?php echo $this->indiscore->scores->ConanH;?></b>,
Afdcc1 = <b><?php echo $this->indiscore->scores->Afdcc1;?></b>, Afdcc2 = <b><?php echo $this->indiscore->scores->Afdcc2;?></b> 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> et Score Z = <b><?php echo $this->indiscore->scores->Z;?></b>.</i>
</td> </td>
</tr> </tr>
@ -253,15 +253,8 @@ if ($this->indiscore->Enseigne!='' && $this->indiscore->Sigle!='') {
Compte tenu des informations disponibles aupr&egrave;s des sources officielles Compte tenu des informations disponibles aupr&egrave;s des sources officielles
Scores et D&eacute;cisions pr&eacute;sente la conclusion suivante :</span><br/> Scores et D&eacute;cisions pr&eacute;sente la conclusion suivante :</span><br/>
<?php <?php
$color = ''; switch($this->typeScore)
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': case '20':
$maxIndiscore = $this->typeScore; $maxIndiscore = $this->typeScore;
$indiscore = $this->indiscore->Indiscore20; $indiscore = $this->indiscore->Indiscore20;
@ -273,21 +266,23 @@ if ($this->indiscore->Enseigne!='' && $this->indiscore->Sigle!='') {
break; break;
} }
?> ?>
<h3 class="indiscore<?=$color?>">LE SCORE EST DE <?=$indiscore?> SUR <?=$maxIndiscore?> POINTS</h3> <h3 style="font-size:13px"><b>LE SCORE EST DE <?php echo $indiscore;?> SUR <?php echo $maxIndiscore;?> POINTS</b></h3>
<?php <?php
if ($this->indiscore->infoEncours != '' && !is_numeric($this->indiscore->encours) && $this->indiscore->encours == 'N/A'){ ?> if($this->indiscore->infoEncours != '' && !is_numeric($this->indiscore->encours) && $this->indiscore->encours == 'N/A'){ ?>
<h3><?=$this->indiscore->infoEncours?></h3> <h3><?php echo $this->indiscore->infoEncours;?></h3>
<?php } else{ ?> <?php
<?php if ($indiscore != 0) {?> }else{ ?>
<i>La tendance de la note est <?=$this->indiscore->TendanceIndiscore?></i> <?php
<h3 class="indiscore">L'ENCOURS MAXIMUM CONSEILL&Eacute; EST DE <?=round($this->indiscore->encours / 1000)?> K&euro;</h3> if ($indiscore!=0) { ?>
<?php }?> <i>La tendance de la note est <?php echo $this->indiscore->TendanceIndiscore;?></i>
<h3><?=$this->indiscore->infoEncours?></h3> <h3 style="font-size:13px"><b>L'ENCOURS MAXIMUM CONSEILL&Eacute; EST DE <?php echo round($this->indiscore->encours / 1000);?> K&euro;</b></h3>
<?php }?> <?php } ?>
<h3><?php echo $this->indiscore->infoEncours;?></h3>
<?php } ?>
</td> </td>
</tr> </tr>
<tr><td colspan="3" align="center"><img class="notvisible" src="/themes/default/images/indiscore/logo_indiscore.png"/></td></tr> <tr><td colspan="3" align="center"><img class="notvisible" src="/themes/default/images/indiscore/logo_indiscore.png"/></td></tr>
</table> </table>
</div> </div>

View File

@ -90,24 +90,31 @@ Aucun bilan disponible.
<td width="30"></td> <td width="30"></td>
<td class="StyleInfoLib" width="200">Situation juridique</td> <td class="StyleInfoLib" width="200">Situation juridique</td>
<td class="StyleInfoData" width="350"> <td class="StyleInfoData" width="350">
<?php if ($this->SituationJuridique == 'P') {?> <?php if ($this->SituationJuridique == 'P'):?>
<a href="<?=$this->url(array('controller' => 'juridique', 'action' => 'annonces', <a href="<?=$this->url(array(
'siret' => $this->siret,'id' => $this->id))?>"> 'controller' => 'juridique',
<font color="red"><b>En proc&eacute;dure collective</b></font></a> 'action' => 'annonces',
<?php if($this->dateRadiation != '') {?> 'siret' => $this->siret,
<br/>Radié du RCS le <?=$this->dateRadiation?> 'id' => $this->id,
<?php }?> ))?>">
<?php } elseif ($this->SituationJuridique == 'RR') {?> <font color="red">
Radié du RCS <?php if($this->dateRadiation != '') {?> <b>En proc&eacute;dure collective</b>
</font>
</a>
<?php if($this->dateRadiation != ''):?>
<br/>Radié du RCS le <?php echo $this->dateRadiation;?>
<?php endif;?>
<?php elseif ($this->SituationJuridique == 'RR'):?>
Radié du RCS <?php if($this->dateRadiation != ''):?>
le <?php echo $this->dateRadiation;?> le <?php echo $this->dateRadiation;?>
<?php }?> <?php endif;?>
<?php } elseif ($this->SituationJuridique == 'RP') {?> <?php elseif ($this->SituationJuridique == 'RP'):?>
Radiation publiée <?php if($this->dateRadiation != '') {?> Radiation publiée <?php if($this->dateRadiation != ''):?>
le <?=$this->dateRadiation?> le <?php echo $this->dateRadiation;?>
<?php }?> <?php endif;?>
<?php } else {?> <?php else:?>
Aucune procédure enregistrée à ce jour par nos services. Aucune procédure enregistrée à ce jour par nos services.
<?php }?> <?php endif;?>
</td> </td>
</tr> </tr>
</table> </table>
@ -116,7 +123,7 @@ Aucun bilan disponible.
<h2>Scores et encours</h2> <h2>Scores et encours</h2>
<div class="paragraph"> <div class="paragraph">
<table> <table>
<?php foreach ($this->scores as $name => $score) {?> <?php foreach ($this->scores as $name => $score):?>
<tr> <tr>
<td width="30"></td> <td width="30"></td>
<td width="250" class="StyleInfoLib"><?=$score[1]?></td> <td width="250" class="StyleInfoLib"><?=$score[1]?></td>
@ -129,7 +136,7 @@ Aucun bilan disponible.
</a> </a>
</td> </td>
</tr> </tr>
<?php }?> <?php endforeach;?>
<tr> <tr>
<td width="30"></td> <td width="30"></td>
<td class="StyleInfoLib">Encours conseillé</td> <td class="StyleInfoLib">Encours conseillé</td>

View File

@ -33,50 +33,52 @@ $('select[name=type]').change(function(e){
<div class="paragraph"> <div class="paragraph">
<p> <p>
<?php if ($this->typeTxt == 'indiScore20') {?> <?php switch ( $this->typeTxt ) {?>
<?php case 'indiScore20':?>
L'indiscore évalue le risque de faillite d'entreprise à 12 mois à partir de trois axes: le respect, L'indiscore évalue le risque de faillite d'entreprise à 12 mois à partir de trois axes: le respect,
l'analyse historique des représentants légaux et l'analyse du bilan. Les informations sur lenvironnement économique l'analyse historique des représentants légaux et l'analyse du bilan. Les informations sur lenvironnement économique
des entreprises (secteurs d'activité, groupe, paiements) complètent l'analyse de l'indiscore. Un indiscore entre 0 et 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 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€. un risque faible. Un avis de crédit fournisseur/client est donné, jusqu'à concurrence de 500 K€.
<?php } ?> <?php break; ?>
<?php if ($this->typeTxt == 'indiScore') {?> <?php case 'indiScore':?>
L'indiscore évalue le risque de faillite d'entreprise à 12 mois à partir de trois axes: le respect, L'indiscore évalue le risque de faillite d'entreprise à 12 mois à partir de trois axes: le respect,
l'analyse historique des représentants légaux et l'analyse du bilan. Les informations sur lenvironnement économique l'analyse historique des représentants légaux et l'analyse du bilan. Les informations sur lenvironnement économique
des entreprises (secteurs d'activité, groupe, paiements) complètent l'analyse de l'indiscore. Un indiscore entre 0 et 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 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€. un risque faible. Un avis de crédit fournisseur/client est donné, jusqu'à concurrence de 500 K€.
<?php } ?> <?php break; ?>
<?php if ($this->typeTxt == 'scoreDir') {?> <?php case 'scoreDir':?>
Évaluation de l'équipe dirigeante en place. Système S&D Évaluation de l'équipe dirigeante en place. Système S&D
<?php } ?> <?php break; ?>
<?php if ($this->typeTxt == 'scoreConf') {?> <?php case '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 É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 break; ?>
<?php if ($this->typeTxt == 'scoreZ') {?> <?php case 'scoreZ':?>
Le score Z de la Banque de France permet de déceler les défaillances dentreprises. Ces dernières sont caractérisées Le score Z de la Banque de France permet de déceler les défaillances dentreprises. Ces dernières sont caractérisées
par 19 ratios retraçant quatre aspects de leur comportement : structure financière, dynamisme, rentabilité, gestion courante. par 19 ratios retraçant quatre aspects de leur comportement : structure financière, dynamisme, rentabilité, gestion courante.
<?php } ?> <?php break; ?>
<?php if ($this->typeTxt == 'scoreCH') {?> <?php case 'scoreCH':?>
Le score CONAN et HOLDER (1979) est une méthode conseillée pour les entreprises industrielles réalisant un chiffre Le score CONAN et HOLDER (1979) est une méthode conseillée pour les entreprises industrielles réalisant un chiffre
d'affaires de 1,5 à 75 millions deuros. Il permet un classement des sociétés des plus risquées (score inférieur à d'affaires de 1,5 à 75 millions deuros. Il permet un classement des sociétés des plus risquées (score inférieur à
6,8) aux plus saines (score supérieur à 16,4). 6,8) aux plus saines (score supérieur à 16,4).
<?php } ?> <?php break; ?>
<?php if ($this->typeTxt == 'scoreAfdcc1') {?> <?php case 'scoreAfdcc1':?>
1er indicateur synthétique de vulnérabilité établi par l'Association Françaises des Crédits managers et Conseils. 1er indicateur synthétique de vulnérabilité établi par l'Association Françaises des Crédits managers et Conseils.
<?php } ?> <?php break; ?>
<?php if ($this->typeTxt == 'scoreAfdcc2') {?> <?php case 'scoreAfdcc2':?>
Le score sectoriel AFDCC2 (1999) sapplique aux sociétés réalisant un chiffre daffaires de 150.000 à 75 millions Le score sectoriel AFDCC2 (1999) sapplique aux sociétés réalisant un chiffre daffaires de 150.000 à 75 millions
d'euros. Il comprend 11 fonctions pour 7 secteurs d'activité en différenciant les TPE des PME. Il s'adresse plus 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. spécialement au Credit Manager, étant axé sur la solvabilité de l'entreprise à court terme.
<?php } ?> <?php break; ?>
<?php if ($this->typeTxt == 'scoreAltman') {?> <?php case 'scoreAltman':?>
Évaluation synthétique permettant la prévision de défaillance d'une entreprise à partir de ratios, liquidité, É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. solvablilité, rentabilité, activité, croissance. Appelé aussi Z Score d'Altman.
<?php } ?> <?php break; ?>
<?php if ($this->typeTxt == 'scoreCCF') {?> <?php case 'scoreCCF':?>
Évaluation à 3 ans de la probabilité de défaillance d'une entreprise. Évaluation à 3 ans de la probabilité de défaillance d'une entreprise.
<?php } ?> <?php break; ?>
<?php }?>
</p> </p>
</div> </div>

View File

@ -17,14 +17,15 @@
<h2>Liste des relations bancaires</h2> <h2>Liste des relations bancaires</h2>
<div class="paragraph"> <div class="paragraph">
<?php if (empty($this->AutrePage) && $this->edition) {?> <?php if (empty($this->AutrePage) && $this->edition) {?>
<div style="line-height:16px;"> <div style="line-height:16px;">
<a class="dialog" title="Ajouter RIB/IBAN" href="<?=$this->url(array('controller'=>'saisie','action'=>'ribiban','mode'=>'add','siren'=>$this->siren), null, true)?>"> <a class="dialog" title="Ajouter RIB/IBAN" href="<?=$this->url(array('controller'=>'saisie','action'=>'ribiban','mode'=>'add','siren'=>$this->siren), null, true)?>">
<img style="vertical-align:middle;" src="/themes/default/images/interfaces/ajouter.png" /> Ajouter une autre relation bancaire</a> <img style="vertical-align:middle;" src="/themes/default/images/interfaces/ajouter.png" /> Ajouter une autre relation bancaire</a>
</div> </div>
<?php }?> <?php
}?>
<?php if(count($this->banques)>0) { ?> <?php if(count($this->banques)>0) { ?>
<table class="data"> <table class="data">
@ -42,7 +43,7 @@
<td valign="top" ><p style="text-decoration:underline;"><?=$relation->libBanque?></p> <td valign="top" ><p style="text-decoration:underline;"><?=$relation->libBanque?></p>
<?php if (empty($this->AutrePage) && $this->edition) {?> <?php if (empty($this->AutrePage) && $this->edition) {?>
<a class="dialog" title="Edition RIB/IBAN" href="<?=$this->url(array('controller'=>'saisie','action'=>'ribiban','mode'=>'edit','siren'=>$this->siren, 'guichetMod'=>$relation->codeGuichet, 'banqueMod'=>$relation->codeBanque), null, true)?>"><img src="/themes/default/images/interfaces/editer.png" /></a> <a class="dialog" title="Edition RIB/IBAN" href="<?=$this->url(array('controller'=>'saisie','action'=>'ribiban','mode'=>'edit','siren'=>$this->siren, 'guichetMod'=>$relation->codeGuichet, 'banqueMod'=>$relation->codeBanque), null, true)?>"><img src="/themes/default/images/interfaces/editer.png" /></a>
<a class="dialog" title="Supprimer RIB/IBAN" href="<?=$this->url(array('controller'=>'saisie','action'=>'ribiban','mode'=>'delete','siren'=>$this->siren, 'guichetMod'=>$relation->codeGuichet, 'banqueMod'=>$relation->codeBanque), null, true)?>"><img src="/themes/default/images/interfaces/supprimer.png" /></a> <a class="dialog" title="Supprimer RIB/IBAN" href="<?=$this->url(array('controller'=>'saisie','action'=>'ribiban','mode'=>'delete','siren'=>$this->siren,'siret'=>$this->siret), null, true)?>"><img src="/themes/default/images/interfaces/supprimer.png" /></a>
<?php }?> <?php }?>
</td> </td>
<td> <td>
@ -87,7 +88,7 @@ $('a.dialog').on('click', function(){
Quitter: function() { $(this).dialog('close'); } Quitter: function() { $(this).dialog('close'); }
}, },
close: function() { $('#dialog').remove(); } close: function() { $('#dialog').remove(); }
}; };
$('<div id="dialog"></div>').dialog(dialogOpts); $('<div id="dialog"></div>').dialog(dialogOpts);
return false; return false;
} }

View File

@ -40,15 +40,6 @@
</td> </td>
</tr> </tr>
<?php }?> <?php }?>
<?php if (0 < $this->exportObjet->TOP_CONFIDENTIEL) : ?>
<tr>
<td width="30">&nbsp;</td>
<td colspan="2">
<span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
Ce bilan est confidentiel.
</td>
</tr>
<?php endif ?>
<?php if ( $this->champType == 'S' ) {?> <?php if ( $this->champType == 'S' ) {?>
<tr> <tr>
<td colspan="3"> <td colspan="3">
@ -60,19 +51,6 @@
</table> </table>
</div> </div>
<?php if ($this->msg) {?>
<div class="paragraph">
<div style="padding:0.7em;" class="ui-state-highlight ui-corner-all">
<p><span style="float: left; margin-right: 0.3em;" class="ui-icon ui-icon-info"></span>
<?=$this->msg?>
</p>
</div>
</div>
<?php } else {?>
<?php <?php
switch ($this->champType) { switch ($this->champType) {
case 'N' : $name = 'Réel Normal'; break; case 'N' : $name = 'Réel Normal'; break;
@ -86,12 +64,12 @@ switch ($this->champType) {
<div class="paragraph"> <div class="paragraph">
<form method="post" action="<?=$this->url(array('controller'=>'finance','action'=>'liasse','siret'=>$this->siret,'id'=>$this->id))?>"> <form method="post" action="<?=$this->url(array('controller'=>'finance','action'=>'liasse','siret'=>$this->siret,'id'=>$this->id))?>">
Valeurs exprimées en Valeurs exprimées en
<select name="unit"> <select name="unit">
<?php foreach ($this->unit as $id => $titre):?> <?php foreach ($this->unit as $id => $titre):?>
<option value="<?=$id?>"<?=($id==$this->unite)? ' selected': '';?>><?=$titre?></option> <option value="<?=$id?>"<?=($id==$this->unite)? ' selected': '';?>><?=$titre?></option>
<?php endforeach;?> <?php endforeach;?>
</select> </select>
<input type="submit" value="OK" /> <input type="submit" value="OK" />
</form> </form>
</div> </div>
@ -154,7 +132,5 @@ Valeurs exprimées en
<?php }?> <?php }?>
</div> </div>
<?php }?>
<?php echo $this->render('cgu.phtml', $this->cgu);?> <?php echo $this->render('cgu.phtml', $this->cgu);?>
</div> </div>

View File

@ -92,14 +92,9 @@ switch ($type) {
$date = new Zend_Date($element->dateExercicePre, 'yyyyMMdd'); $date = new Zend_Date($element->dateExercicePre, 'yyyyMMdd');
echo $date->toString('dd/MM/yyyy'); echo $date->toString('dd/MM/yyyy');
} ?> - <?php if ($element->dureeExercicePre > 0) {?><?=$element->dureeExercicePre?> Mois<?php } ?></td> } ?> - <?php if ($element->dureeExercicePre > 0) {?><?=$element->dureeExercicePre?> Mois<?php } ?></td>
<td><?php if (in_array($this->idClient, [1, 147]) || ($element->confidentielClient == $this->idClient || 0 == $element->confidentiel)) : ?> <td><a href="<?=$this->url(array('controller'=>'finance','action'=>'liasse',
<a href="<?=$this->url(array('controller'=>'finance', 'action'=>'liasse', 'siret'=>$this->siret,'id'=>$this->id, 'date'=> $type.$element->dateExercice), 'default', true)?>">
'siret'=>$this->siret, 'id'=>$this->id, 'date'=> $type.$element->dateExercice), 'default', true)?>"> Visualiser</a>
Visualiser
</a>
<?php else :?>
Confidentiel
<?php endif; ?>
</td> </td>
</tr> </tr>
<?php break;?> <?php break;?>
@ -155,13 +150,9 @@ switch ($type) {
?> ?>
- <?php if ($element->dureeExercicePre > 0) {?><?=$element->dureeExercicePre?> Mois<?php } ?> - <?php if ($element->dureeExercicePre > 0) {?><?=$element->dureeExercicePre?> Mois<?php } ?>
</td> </td>
<td><?php if (in_array($this->idClient, [1, 147]) || ($element->confidentielClient == $this->idClient || 0 == $element->confidentiel)) : ?> <td><a href="<?=$this->url(array('controller'=>'finance', 'action'=>'liasse', 'siret'=>$this->siret,
<a href="<?=$this->url(array('controller'=>'finance', 'action'=>'liasse', 'siret'=>$this->siret, 'id'=>$this->id, 'date'=> $type.$element->dateExercice), 'default', true)?>">
'id'=>$this->id, 'date'=> $type.$element->dateExercice), 'default', true)?>"> Visualiser</a>
Visualiser</a>
<?php else :?>
Confidentiel
<?php endif; ?>
</td> </td>
</tr> </tr>
<?php }?> <?php }?>

View File

@ -1,7 +1,7 @@
<?php if ($this->msg) {?> <?php if ($this->msg) {?>
<div style="padding: 0 .7em;" class="ui-state-error ui-corner-all"> <div style="padding: 0 .7em;" class="ui-state-error ui-corner-all">
<p><span style="float: left; margin-right: .3em;" class="ui-icon ui-icon-alert"></span> <p><span style="float: left; margin-right: .3em;" class="ui-icon ui-icon-alert"></span>
<strong>Alerte :</strong> <?=$this->msg?></p> <strong>Alert:</strong> <?=$this->msg?></p>
</div> </div>
<?php }?> <?php }?>

View File

@ -13,7 +13,7 @@ $('#dialogbilanclient').dialog({ buttons: [ {
<div style="padding: 0 .7em;" class="ui-state-error ui-corner-all"> <div style="padding: 0 .7em;" class="ui-state-error ui-corner-all">
<p><span style="float: left; margin-right: .3em;" class="ui-icon ui-icon-alert"></span> <p><span style="float: left; margin-right: .3em;" class="ui-icon ui-icon-alert"></span>
<strong>Alerte :</strong> <?=$this->errMsg?></p> <strong>Alert:</strong> <?=$this->errMsg?></p>
</div> </div>
<?php } ?> <?php } ?>

View File

@ -1,5 +1,15 @@
<div id="center"> <div id="center">
<h1><?=$this->translate("LISTE DES &Eacute;TABLISSEMENTS")?></h1> <h1><?=$this->translate("LISTE DES &Eacute;TABLISSEMENTS")?></h1>
<?php if ($this->msg) {?>
<div class="paragraph">
<div style="padding: 0 .7em;" class="ui-state-error ui-corner-all">
<p><span style="float: left; margin-right: .3em;" class="ui-icon ui-icon-alert"></span>
<strong>Alert:</strong> <?=$this->msg?></p>
</div>
</div>
<?php } else {?>
<div class="paragraph"> <div class="paragraph">
<table class="identite"> <table class="identite">
<tr> <tr>
@ -131,7 +141,7 @@
<?php }?> <?php }?>
<?php } ?> <?php } ?>
<?php }?>
<?php if ( empty($this->AutrePage) ) {?> <?php if ( empty($this->AutrePage) ) {?>
<?=$this->render('cgu.phtml', $this->cgu)?> <?=$this->render('cgu.phtml', $this->cgu)?>
<?php }?> <?php }?>

View File

@ -1,4 +1,5 @@
<style>.jstree-default a.jstree-search { color: red; }</style> <style>.jstree-default a.jstree-search { color: red; }</style>
<div>Tête de groupe <div>Tête de groupe
<select name="isin"> <select name="isin">
<option value="1" <?php if($this->isin==1) { echo ' selected'; }?>>coté, détention minimum à 50%</option> <option value="1" <?php if($this->isin==1) { echo ' selected'; }?>>coté, détention minimum à 50%</option>
@ -24,8 +25,9 @@ Filiales, détention minimum
<input id="search" type="button" value="Rechercher"> <input id="search" type="button" value="Rechercher">
<input id="clear_search" type="button" value="Initialiser"> <input id="clear_search" type="button" value="Initialiser">
</div> </div>
<div id="groups" class="jstree jstree-default" style="overflow:auto;"></div> <div id="groups" class="jstree jstree-default" style="overflow:auto;"></div>
<script src="/libs/jstree-3.3.3/jstree.min.js"></script> <script src="/libs/jstree/jstree.min.js"></script>
<script> <script>
$('#dialogarbo').dialog({ buttons: [ $('#dialogarbo').dialog({ buttons: [
{ text: "Imprimer", click: function() { { text: "Imprimer", click: function() {
@ -52,18 +54,16 @@ $('#filter').on('click', function(e){
}); });
$("#groups").jstree({ $("#groups").jstree({
"plugins" : ["search"], "core" : { "html_titles" : true },
'core' : { "plugins" : ["themes", "json_data", "search"],
'html_titles' : true , "json_data" : { "data" : [<?=$this->data?>] },
'data' : <?=$this->data?>, "search" : { "show_only_matches" : true },
'themes' : { "themes" : {
"theme" : "default", "theme" : "default",
"url" : "/libs/jstree-3.3.3/themes/default/style.min.css", "url" : "/libs/jstree/themes/default/style.css",
"dots" : true, "dots" : true,
"icons" : false "icons" : false
} }
},
'search' : { "show_only_matches" : true },
}); });
$('#clear_search').on('click', function() { $('#clear_search').on('click', function() {

View File

@ -1,5 +1,42 @@
<style> <style>
div#menu {display:none;} div#menu {display:none;}
.jstree-default li,
.jstree-default ins { background-image:url("/libs/jstree/themes/default/d.png"); background-repeat:no-repeat; background-color:transparent; }
.jstree-default li { background-position:-90px 0; background-repeat:repeat-y; }
.jstree-default li.jstree-last { background:transparent; }
.jstree-default .jstree-open > ins { background-position:-72px 0; }
.jstree-default .jstree-closed > ins { background-position:-54px 0; }
.jstree-default .jstree-leaf > ins { background-position:-36px 0; }
.jstree-default .jstree-hovered { background:#e7f4f9; border:1px solid #d8f0fa; padding:0 2px 0 1px; }
.jstree-default .jstree-clicked { background:#beebff; border:1px solid #99defd; padding:0 2px 0 1px; }
.jstree-default a .jstree-icon { background-position:-56px -19px; }
.jstree-default a.jstree-loading .jstree-icon { background:url("/libs/jstree/themes/default/throbber.gif") center center no-repeat !important; }
.jstree-default.jstree-focused { background:#ffffee; }
.jstree-default .jstree-no-dots li,
.jstree-default .jstree-no-dots .jstree-leaf > ins { background:transparent; }
.jstree-default .jstree-no-dots .jstree-open > ins { background-position:-18px 0; }
.jstree-default .jstree-no-dots .jstree-closed > ins { background-position:0 0; }
.jstree-default .jstree-no-icons a .jstree-icon { display:none; }
.jstree-default .jstree-search { font-style:italic; }
.jstree-default .jstree-no-icons .jstree-checkbox { display:inline-block; }
.jstree-default .jstree-no-checkboxes .jstree-checkbox { display:none !important; }
.jstree-default .jstree-checked > a > .jstree-checkbox { background-position:-38px -19px; }
.jstree-default .jstree-unchecked > a > .jstree-checkbox { background-position:-2px -19px; }
.jstree-default .jstree-undetermined > a > .jstree-checkbox { background-position:-20px -19px; }
.jstree-default .jstree-checked > a > .jstree-checkbox:hover { background-position:-38px -37px; }
.jstree-default .jstree-unchecked > a > .jstree-checkbox:hover { background-position:-2px -37px; }
.jstree-default .jstree-undetermined > a > .jstree-checkbox:hover { background-position:-20px -37px; }
#jstree-marker.jstree-default { background:url("/libs/jstree/themes/default/d.png") -41px -57px no-repeat !important; text-indent:-100px; }
.jstree-default a.jstree-search { color:aqua; }
.jstree-default .jstree-locked a { color:silver; cursor:default; }
</style> </style>
<div id="center"> <div id="center">
<div class="paragraph"> <div class="paragraph">
@ -16,21 +53,34 @@ div#menu {display:none;}
<?php if($this->pctMin==40) {?> 40%<?php }?> <?php if($this->pctMin==40) {?> 40%<?php }?>
<?php if($this->pctMin==50) {?> 50%<?php }?> <?php if($this->pctMin==50) {?> 50%<?php }?>
</div> </div>
</div> </div>
</div> </div>
<script src="/libs/jstree-3.3.3/jstree.min.js"></script>
<script src="/libs/jstree/jstree.min.js"></script>
<script src="/libs/html2canvas.js"></script>
<script> <script>
$("#groups").jstree({ $("#groups").jstree({
'core' : { "core" : { "html_titles" : true },
'data' : <?=$this->data?>, "plugins" : ["themes", "json_data", "search"],
'themes' : { "json_data" : { "data" : [<?=$this->data?>] },
"theme" : "default", "search" : { "show_only_matches" : true },
"url" : "/libs/jstree-3.3.3/themes/default/style.min.css", "themes" : {
"dots" : true, "theme" : "default",
"icons" : false "url" : "/libs/jstree/themes/default/style.css",
} "dots" : true,
}, "icons" : false
}).on('loaded.jstree',function(){ }
});
$(function(){
var target = $('#groups');
html2canvas(target, {
onrendered: function(canvas) {
target.html(canvas);
},
});
window.print(); window.close(); window.print(); window.close();
}); });
</script> </script>

View File

@ -0,0 +1 @@
<?=$this->RemplaceSiren(substr($this->annonce['Texte'],0,1000))?>

View File

@ -1,6 +1,3 @@
<?php if ($this->ajax) {?>
<?=$this->RemplaceSiren(substr($this->annonce['Texte'],0,1000))?>
<?php } else {?>
<div id="center"> <div id="center">
<h1 class="titre">ANNONCES L&Eacute;GALES</h1> <h1 class="titre">ANNONCES L&Eacute;GALES</h1>
<div class="paragraph"> <div class="paragraph">
@ -14,20 +11,25 @@
<td width="30">&nbsp;</td> <td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Dénomination Sociale</td> <td width="200" class="StyleInfoLib">Dénomination Sociale</td>
<td width="350" class="StyleInfoData"> <td width="350" class="StyleInfoData">
<?=$this->raisonSociale?> <?=$this->raisonSociale?>
<?php if($this->hasModeEdition) { ?> <?php if($this->hasModeEdition) : ?>
<a href="<?=$this->url(array('controller' => 'saisie', 'action' => 'fiche', <a href="<?=$this->url(array(
'siret' => $this->siret, 'id' => $this->id, 'controller' => 'saisie',
'action' => 'fiche',
'siret' => $this->siret,
'id' => $this->id,
), 'default', true)?>">(Edition)</a> ), 'default', true)?>">(Edition)</a>
<?php }?> <?php endif; ?>
</td> </td>
</tr> </tr>
<?php if ($this->surveillance) {?> <?php if ($this->surveillance) {?>
<tr> <tr>
<td width="30">&nbsp;</td> <td width="30">&nbsp;</td>
<td colspan="2" width="550" class="StyleInfoData"> <td colspan="2" width="550" class="StyleInfoData">
<?=$this->action('infos', 'surveillance', null, array('source' => 'annonces', <?=$this->action('infos','surveillance', null, array(
'siret' => $this->siret))?> 'source' => 'annonces',
'siret' => $this->siret
))?>
</td> </td>
</tr> </tr>
<?php }?> <?php }?>
@ -92,9 +94,12 @@ if ($this->hasModeEdition){
foreach ( $liensEdit as $lienId => $lienItem ){ foreach ( $liensEdit as $lienId => $lienItem ){
?> ?>
<a class="<?=$lienItem['class']?>" title="<?=$lienItem['title']?>" href="<?=$this->url(array( <a class="<?=$lienItem['class']?>" title="<?=$lienItem['title']?>" href="<?=$this->url(array(
'controller'=>'saisie', 'action'=>'annoncedialog', 'siret'=>$this->siret, 'op'=>$lienId, 'controller' => 'saisie',
'code'=>$this->annonce['Code'], 'idAnn'=>$this->idAnn,), 'default', true)?>"> 'action' => 'annoncedialog',
<?=$lienItem['img']?></a> 'siret' => $this->siret,
'op' => $lienId,
'code' => $this->annonce['Code'],
'idAnn' => $this->idAnn,), 'default', true)?>"><?=$lienItem['img']?></a>
<?php <?php
} }
} }
@ -105,15 +110,15 @@ if ($this->hasModeEdition){
<p><code><?=$this->RemplaceSiren($this->annonce['Texte'])?></code></p> <p><code><?=$this->RemplaceSiren($this->annonce['Texte'])?></code></p>
</div> </div>
<?php if ($this->bodaccLink) { ?>
<div class="paragraph" style="text-align:center;"> <div class="paragraph" style="text-align:center;">
<?php if ( $this->lienBodacc ) { ?>
<span id="bodacc" style="padding-bottom:10px;border-bottom:1px solid #cccccc;"> <span id="bodacc" style="padding-bottom:10px;border-bottom:1px solid #cccccc;">
<a href="<?=$this->bodaccLink?>"> <a href="<?=$this->lienBodacc?>">
<img src="/themes/default/images/interfaces/pdf.png" alt="Bodacc au format PDF"> <img src="/themes/default/images/interfaces/pdf.png" alt="Bodacc au format PDF">
<?=$this->bodaccLinkLabel?></a> Télécharger le bulletin officiel</a>
</span> </span>
</div>
<?php } ?> <?php } ?>
</div>
<div class="paragraph"> <div class="paragraph">
<?php if (count($this->annonce['Entites'])>0) {?> <?php if (count($this->annonce['Entites'])>0) {?>
@ -128,6 +133,7 @@ if ($this->hasModeEdition){
<a href="<?=$this->url(array('controller'=>'identite','action'=>'fiche','siret'=>$entite->siret), 'default', true)?>"> <a href="<?=$this->url(array('controller'=>'identite','action'=>'fiche','siret'=>$entite->siret), 'default', true)?>">
<?=$this->SiretTexte($entite->siret)?></a> <?=$this->SiretTexte($entite->siret)?></a>
<?php }?> <?php }?>
</td> </td>
</tr> </tr>
<?php }?> <?php }?>
@ -137,13 +143,19 @@ if ($this->hasModeEdition){
<div class="paragraph" style="text-align:center;"> <div class="paragraph" style="text-align:center;">
<?php if (intval($this->siret)!=0) {?> <?php if (intval($this->siret)!=0) {?>
<a href="<?=$this->url(array('controller'=>'juridique', 'action'=>'annonces', 'siret'=>$this->siret, <?php
'id'=>$this->id, 'vue'=>$this->vue, 'page'=>$this->page), 'default', true)?>"> $href = $this->url(array(
Revenir à la liste des annonces</a> 'controller' => 'juridique',
'action' => 'annonces',
'siret' => $this->siret,
'id' => $this->id,
'vue' => $this->vue,
'page' => $this->PageCurrent,
), 'default', true);
?>
<a href="<?=$href?>">Revenir à la liste des annonces</a>
<?php }?> <?php }?>
</div> </div>
<?=$this->render('cgu.phtml', $this->cgu)?> <?=$this->render('cgu.phtml', $this->cgu)?>
</div> </div>
<?php }?>

View File

@ -0,0 +1,3 @@
<div id="center">
<pre><?php print_r($this->infos); ?></pre>
</div>

View File

@ -0,0 +1,31 @@
<?php
$class = '';
if ($this->deleted!='') {
$class = ' class="deleted"';
}
?>
<tr<?=$class?>>
<td width="140" class="StyleInfoLib">
<span id="annoncesDate">Le <?=$this->date?></span>
</td>
<td>
<span id="annoncesImg">
<?php if (!empty($this->logo)) {?>
<img src="/themes/default/images/annonces/<?=$this->logo?>" title="<?=$this->title?>" />
<?php }?>
</span>
</td>
<td width="450" colspan="2" class="StyleInfoData">
<a class="tiptxt" href="<?=$this->partialLoop()->view->url(array(
'controller' => 'juridique',
'action' => 'annonces',
'siret' => $this->partialLoop()->view->siret,
'id' => $this->partialLoop()->view->id,
'idAnn' => $this->idAnn,
'vue' => $this->type,
))?>">
<?=$this->lib?>
</a>
<span style="display:none;"><?=$this->RemplaceSiren($this->texte)?></span>
</td>
</tr>

View File

@ -1,8 +1,8 @@
<?php if (empty($this->AutrePage)) {?> <?php if (empty($this->AutrePage)):?>
<div id="center"> <div id="center">
<?php }?> <?php endif;?>
<?php if (empty($this->AutrePage)) {?> <?php if (empty($this->AutrePage)):?>
<h1 class="titre">ANNONCES L&Eacute;GALES</h1> <h1 class="titre">ANNONCES L&Eacute;GALES</h1>
<div class="paragraph"> <div class="paragraph">
<table class="identite"> <table class="identite">
@ -15,30 +15,36 @@
<td width="30">&nbsp;</td> <td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Dénomination Sociale</td> <td width="200" class="StyleInfoLib">Dénomination Sociale</td>
<td width="350" class="StyleInfoData"><?=$this->raisonSociale?> <td width="350" class="StyleInfoData"><?=$this->raisonSociale?>
<?php if($this->hasModeEdition) {?> <?php if($this->hasModeEdition) : ?>
<a href="<?=$this->url(array('controller' => 'saisie', 'action' => 'fiche', <a href="<?=$this->url(array(
'siret' => $this->siret, 'id' => $this->id))?>">(Edition)</a> 'controller' => 'saisie',
<?php }?> 'action' => 'fiche',
'siret' => $this->siret,
'id' => $this->id,
))?>">(Edition)</a>
<?php endif ?>
</td> </td>
</tr> </tr>
<?php if ($this->surveillance) {?> <?php if ($this->surveillance) {?>
<tr> <tr>
<td width="30">&nbsp;</td> <td width="30">&nbsp;</td>
<td colspan="2" width="550" class="StyleInfoData"> <td colspan="2" width="550" class="StyleInfoData">
<?=$this->action('infos','surveillance', null, array('source' => 'annonces', <?=$this->action('infos','surveillance', null, array(
'siret' => $this->siret))?> 'source' => 'annonces',
'siret' => $this->siret
))?>
</td> </td>
</tr> </tr>
<?php }?> <?php }?>
</table> </table>
</div> </div>
<?php }?> <?php endif;?>
<?php if ($this->AutreSource){ ?> <?php if ($this->AutreSource){ ?>
<h2>EV&Eacute;NEMENTS L&Eacute;GAUX</h2> <h2>EV&Eacute;NEMENTS L&Eacute;GAUX</h2>
<div class="paragraph"> <div class="paragraph">
Aucune annonces disponible pour cette entité. Aucune annonces disponible pour cette entité.
</div> </div>
<?php } else {?> <?php } else {?>
<?php if (empty($this->AutrePage)) {?> <?php if (empty($this->AutrePage)) {?>
@ -104,105 +110,104 @@ a.lienType {
<div class="clearfix" style="margin:0 auto 5px auto;"> <div class="clearfix" style="margin:0 auto 5px auto;">
<div id="TypeBodacc" class="blockType<?php if ($this->vue=='bodacc') echo 'Active';?>"> <div id="TypeBodacc" class="blockType<?php if ($this->vue=='bodacc') echo 'Active';?>">
<a class="lienType" title="Annonces légales" href="<?=$this->url(array('controller'=>'juridique', <a class="lienType" title="Annonces légales" href="<?=$this->url(array('controller'=>'juridique', 'action'=>'annonces', 'vue'=>'bodacc', 'siret'=>$this->siret, 'id'=>$this->id))?>">Annonces Légales</a>
'action'=>'annonces', 'vue'=>'bodacc', 'siret'=>$this->siret,
'id'=>$this->id))?>">Annonces Légales</a>
</div> </div>
<div id="TypeBalo" class="blockType<?php if ($this->vue=='balo') echo 'Active';?>"> <div id="TypeBalo" class="blockType<?php if ($this->vue=='balo') echo 'Active';?>">
<a class="lienType" title="Bulletin des Annonces Légales Obligatoires" href="<?=$this->url(array( <a class="lienType" title="Bulletin des Annonces Légales Obligatoires" href="<?=$this->url(array('controller'=>'juridique', 'action'=>'annonces', 'vue'=>'balo', 'siret'=>$this->siret, 'id'=>$this->id))?>">B.A.L.O.</a>
'controller'=>'juridique', 'action'=>'annonces', 'vue'=>'balo', 'siret'=>$this->siret,
'id'=>$this->id))?>">B.A.L.O.</a>
</div> </div>
<div id="TypeBoamp" class="blockType<?php if ($this->vue=='bomp') echo 'Active';?>"> <div id="TypeBoamp" class="blockType<?php if ($this->vue=='bomp') echo 'Active';?>">
<a class="lienType" title="Bulletin officiel des annonces des marchés publics" href="<?=$this->url(array( <a class="lienType" title="Bulletin officiel des annonces des marchés publics" href="<?=$this->url(array('controller'=>'juridique', 'action'=>'annonces', 'vue'=>'bomp', 'siret'=>$this->siret, 'id'=>$this->id))?>">B.O.A.M.P.</a>
'controller'=>'juridique', 'action'=>'annonces', 'vue'=>'bomp', 'siret'=>$this->siret,
'id'=>$this->id))?>">B.O.A.M.P.</a>
</div> </div>
<div id="TypeAsso" class="blockType<?php if ($this->vue=='asso') echo 'Active';?>"> <div id="TypeAsso" class="blockType<?php if ($this->vue=='asso') echo 'Active';?>">
<a class="lienType" title="Journal Officiel des Associations" href="<?=$this->url(array( <a class="lienType" title="Journal Officiel des Associations" href="<?=$this->url(array('controller'=>'juridique', 'action'=>'annonces', 'vue'=>'asso', 'siret'=>$this->siret, 'id'=>$this->id))?>">J.O Associations</a>
'controller'=>'juridique', 'action'=>'annonces', 'vue'=>'asso', 'siret'=>$this->siret,
'id'=>$this->id))?>">J.O Associations</a>
</div> </div>
</div> </div>
</div> </div>
<?php }?> <?php }?>
<?php if ($this->vue == 'bomp') {?> <?php if ($this->vue=='bodacc'){ ?>
<h2>EV&Eacute;NEMENTS L&Eacute;GAUX</h2>
<div class="paragraph">
<?php if(count($this->annoncesBodacc)==0){ ?>
Néant
<?php } else {?>
<table class="data">
<?=$this->partialLoop('juridique/annonces-resume.phtml', $this->annoncesBodacc)?>
</table>
<?php }?>
</div>
<?php }?>
<?php if ($this->vue=='balo'){ ?>
<h2>BALO</h2>
<div class="paragraph">
<?php if(count($this->annoncesBalo)==0){ ?>
Néant
<?php } else {?>
<table class="data">
<?=$this->partialLoop('juridique/annonces-resume.phtml', $this->annoncesBalo)?>
</table>
<?php }?>
</div>
<?php }?>
<?php if ($this->vue=='bomp'){ ?>
<div class="paragraph" style="margin:0 0 0 40px;"> <div class="paragraph" style="margin:0 0 0 40px;">
<form name="filtreBoamp" method="post" action="<?=$this->url(array('controller'=>'juridique', <form name="filtreBoamp" method="post" action="<?=$this->url(array('controller'=>'juridique',
'action'=>'annonces', 'vue'=>'bomp', 'siret'=>$this->siret, 'id'=>$this->id), 'default', true)?>"> 'action'=>'annonces','vue'=>'bomp','siret'=>$this->siret,'id'=>$this->id),null,true)?>">
<label>Type d'annonce</label> <label>Type d'annonce</label>
<select name="filtre"> <select name="filtre">
<option value="">-</option>
<option value="A"<?=($this->filtre=='A')?' selected':'';?>>Avis d'attribution</option> <option value="A"<?=($this->filtre=='A')?' selected':'';?>>Avis d'attribution</option>
<option value="M"<?=($this->filtre=='M')?' selected':'';?>>Avis de marchés</option> <option value="M"<?=($this->filtre=='M')?' selected':'';?>>Avis de marchés</option>
</select> </select>
</form> </form>
<script> <script>
$('select[name=filtre]').on('change', function(e){ $('select[name=filtre]').on('change',function(){
e.preventDefault(); $(this).parent('form').submit();
$('form[name=filtreBoamp]').submit();
}); });
</script> </script>
</div> </div>
<?php }?>
<?php if ($this->vue=='bodacc') {?>
<h2>EV&Eacute;NEMENTS L&Eacute;GAUX</h2>
<?php } elseif ($this->vue=='balo') {?>
<h2>BALO</h2>
<?php } elseif ($this->vue == 'bomp') {?>
<h2>March&eacute;s publics</h2> <h2>March&eacute;s publics</h2>
<?php } elseif ($this->vue=='asso') { ?>
<h2>Associations</h2>
<?php }?>
<div class="paragraph"> <div class="paragraph">
<?php if (count($this->annonces) == 0) { ?> <?php if (count($this->annoncesBomp)==0) { ?>
Néant Néant
<?php } else {?> <?php } else {?>
<table class="data"> <table class="data">
<?php foreach ($this->annonces as $ann) {?> <?=$this->partialLoop('juridique/annonces-resume.phtml', $this->annoncesBomp)?>
<?php
$class = '';
if ($ann['deleted'] != '') {
$class = ' class="deleted"';
}
?>
<tr<?=$class?>>
<td width="140" class="StyleInfoLib"><span id="annoncesDate">Le <?=$ann['date']?></span></td>
<td>
<span id="annoncesImg">
<?php if (!empty($ann['logo'])) {?>
<img src="/themes/default/images/annonces/<?=$ann['logo']?>" title="<?=$ann['title']?>" />
<?php }?>
</span>
</td>
<td width="450" colspan="2" class="StyleInfoData">
<a class="tiptxt" href="<?=$this->url(array('controller'=>'juridique', 'action'=>'annonce',
'siret'=>$this->siret, 'id'=>$this->id, 'idAnn'=>$ann['idAnn'], 'vue'=>$ann['type'],
'page'=>$this->PageCurrent), 'default', true)?>"><?=$ann['lib']?>
</a>
<span style="display:none;"><?=$this->RemplaceSiren($ann['texte'])?></span>
</td>
</tr>
<?php }?>
</table> </table>
<?php }?> <?php }?>
</div> </div>
<?php }?>
<?php if ($this->vue=='asso') { ?>
<h2>Associations</h2>
<div class="paragraph">
<?php if (count($this->annoncesAsso)==0){ ?>
Néant
<?php } else {?>
<table class="data">
<?=$this->partialLoop('juridique/annonces-resume.phtml', $this->annoncesAsso)?>
</table>
<?php }?>
</div>
<?php }?>
<?php if (empty($this->AutrePage)) {?> <?php if (empty($this->AutrePage)) {?>
<?php if ($this->PageTotal>1) {?> <?php if ($this->PageTotal>1) {?>
<div class="paragraph"> <div class="paragraph">
<div class="pagination clearfix"> <div class="pagination clearfix">
<a class="first" href="<?=$this->url(array('filtre'=>$this->filtre, 'page'=>1))?>">&laquo;</a> <a class="first" href="<?=$this->url(array('page'=>1))?>">&laquo;</a>
<a class="previous" href="<?=$this->url(array('filtre'=>$this->filtre, 'page'=>$this->PagePrev))?>">&lsaquo;</a> <a class="previous" href="<?=$this->url(array('page'=>$this->PagePrev))?>">&lsaquo;</a>
<span>Page <?=$this->PageCurrent?>/<?=$this->PageTotal?></span> <span>Page <?=$this->PageCurrent?>/<?=$this->PageTotal?></span>
<a class="next" href="<?=$this->url(array('filtre'=>$this->filtre, 'page'=>$this->PageNext))?>">&rsaquo;</a> <a class="next" href="<?=$this->url(array('page'=>$this->PageNext))?>">&rsaquo;</a>
<a class="last" href="<?=$this->url(array('filtre'=>$this->filtre, 'page'=>$this->PageTotal))?>">&raquo;</a> <a class="last" href="<?=$this->url(array('page'=>$this->PageTotal))?>">&raquo;</a>
</div> </div>
</div> </div>
<?php }?> <?php }?>

View File

@ -5,7 +5,7 @@
<div class="paragraph"> <div class="paragraph">
<div style="padding: 0 .7em;" class="ui-state-error ui-corner-all"> <div style="padding: 0 .7em;" class="ui-state-error ui-corner-all">
<p><span style="float: left; margin-right: .3em;" class="ui-icon ui-icon-alert"></span> <p><span style="float: left; margin-right: .3em;" class="ui-icon ui-icon-alert"></span>
<strong>Alerte :</strong> <?=$this->msg?></p> <strong>Alert:</strong> <?=$this->msg?></p>
</div> </div>
</div> </div>
<?php } else {?> <?php } else {?>

View File

@ -5,7 +5,7 @@
<div class="paragraph"> <div class="paragraph">
<div style="padding: 0 .7em;" class="ui-state-error ui-corner-all"> <div style="padding: 0 .7em;" class="ui-state-error ui-corner-all">
<p><span style="float: left; margin-right: .3em;" class="ui-icon ui-icon-alert"></span> <p><span style="float: left; margin-right: .3em;" class="ui-icon ui-icon-alert"></span>
<strong>Alerte :</strong> <?=$this->msg?></p> <strong>Alert:</strong> <?=$this->msg?></p>
</div> </div>
</div> </div>
<?php } else {?> <?php } else {?>

View File

@ -1,7 +1,7 @@
<?php if ($this->msg) {?> <?php if ($this->msg) {?>
<div style="padding: 0 .7em;" class="ui-state-error ui-corner-all"> <div style="padding: 0 .7em;" class="ui-state-error ui-corner-all">
<p><span style="float: left; margin-right: .3em;" class="ui-icon ui-icon-alert"></span> <p><span style="float: left; margin-right: .3em;" class="ui-icon ui-icon-alert"></span>
<strong>Alerte :</strong> <?=$this->msg?></p> <strong>Alert:</strong> <?=$this->msg?></p>
</div> </div>
<?php } else if ($this->ref) {?> <?php } else if ($this->ref) {?>

View File

@ -80,8 +80,7 @@
} }
?> ?>
<?php if( $this->permSurvPriv ) { ?> <?php if( $this->permSurvPriv ) { ?>
<p><a class="dialogcmd" title="Mise en suivi des privilèges" <p><a href="<?=$this->url(array('controller'=>'surveillance', 'action'=>'ajouter', 'source'=>'privileges',
href="<?=$this->url(array('controller'=>'surveillance', 'action'=>'ajouter', 'source'=>'privileges',
'siret'=>$this->siret), 'default', true)?>">Commander la mise en suivi des privilèges</a> 'siret'=>$this->siret), 'default', true)?>">Commander la mise en suivi des privilèges</a>
(surveillance des privilèges auprès du greffe, retour sous 48 à 72h)</p> (surveillance des privilèges auprès du greffe, retour sous 48 à 72h)</p>
<?php } ?> <?php } ?>

View File

@ -2,7 +2,7 @@
<div style="padding: 0 .7em;" class="ui-state-error ui-corner-all"> <div style="padding: 0 .7em;" class="ui-state-error ui-corner-all">
<p><span style="float: left; margin-right: .3em;" class="ui-icon ui-icon-alert"></span> <p><span style="float: left; margin-right: .3em;" class="ui-icon ui-icon-alert"></span>
<strong>Alerte :</strong> <?=$this->msg?></p> <strong>Alert:</strong> <?=$this->msg?></p>
</div> </div>
<?php } else if ($this->ref) {?> <?php } else if ($this->ref) {?>

View File

@ -16,18 +16,8 @@
<?=$form->type?> <?=$form->type?>
<div class="row"> <div class="row">
<?php echo $form->siret?> <?php echo $form->siret?>
<span class="fa-stack fa-lg" title="Recherche par SIREN, SIRET, N° TVA intracommunautaire, N° RC, R.N.A., ISIN"> <img src="/themes/default/images/info.gif" title="Recherche par SIREN, SIRET, N° TVA intracommunautaire, N° RC, R.N.A., ISIN" />
<i class="fa fa-circle fa-circle-blue fa-stack-2x"></i> <img src="/themes/default/images/siretdirect.gif" title="Accès direct à la fiche identité (Racourci clavier : Maintenir CTRL puis ENTREE)" id="goidentite"/>
<i class="fa fa-info fa-stack-1x fa-inverse"></i>
</span>
<span id="goidentite" class="fa-stack fa-lg" title="Accès direct à la fiche identité (Racourci clavier : Maintenir CTRL puis ENTREE)">
<i class="fa fa-circle fa-circle-blue fa-stack-2x"></i>
<i class="fa fa-arrow-right fa-stack-1x fa-inverse"></i>
</span>
<span id="goindiscore" class="fa-stack fa-lg" title="Accès direct à l'IndiScore">
<i class="fa fa-circle fa-circle-blue fa-stack-2x"></i>
<i class="fa fa-thermometer-full fa-stack-1x fa-inverse"></i>
</span>
</div> </div>
<?php if ($this->SEARCHENT) {?> <?php if ($this->SEARCHENT) {?>
<div class="row"> <div class="row">

View File

@ -53,9 +53,9 @@ Attention à bien vérifier ce qui est fait !
<label>Type d'événement</label><br/> <label>Type d'événement</label><br/>
<select name="even[]" multiple="multiple" size="10" style="width:600px;"> <select name="even[]" multiple="multiple" size="10" style="width:600px;">
<option value="">-</option> <option value="">-</option>
<?php foreach ($this->evens as $code => $lib) {?> <?php foreach ($this->evens as $code => $lib):?>
<option value="<?=$code?>"><?=$lib?></option> <option value="<?=$code?>"><?=$lib?></option>
<?php }?> <?php endforeach;?>
</select> </select>
</form> </form>
<br/> <br/>
@ -87,14 +87,13 @@ $('select[name="even[]"]').change(function(){
<script type="text/javascript" src="/libs/form/jquery.form.min.js"></script> <script type="text/javascript" src="/libs/form/jquery.form.min.js"></script>
<script> <script>
$('form#saisie').submit(function(e){ $('form#saisie').bind('submit', function(){
e.preventDefault(); var options = {
var form = $(this); target: '#result',
$.post(form.attr('action'), form.serialize(), function(data){ beforeSubmit: function(data){},
$('#result').html(data); success: function(data){ $('#result').html(data); }
}).fail(function(data) { };
$('#result').html('Une erreur est survenue !'); $(this).ajaxSubmit(options);
}); return false;
return false;
}); });
</script> </script>

View File

@ -31,7 +31,7 @@ span.poste input { width:50px; }
<h2>Liasse</h2> <h2>Liasse</h2>
<div class="paragraph"> <div class="paragraph">
<?php if ($this->infos) { ?> <?php if ($this->infos) {?>
<div class="content"> <div class="content">
<?php <?php
$params = array( $params = array(

View File

@ -4,19 +4,13 @@ div#dialog fieldset {border:1px solid; padding:1px; }
div#dialog fieldset legend {padding:5px; font-weight:bold; } div#dialog fieldset legend {padding:5px; font-weight:bold; }
</style> </style>
<?php
$bq=new Scores_Finance_Banques();
$banques=$bq->getBDF_Etabs('php');
$list_bq=json_encode($banques);
$list_guichets=$bq->getBDF_Guichets();
$lbanque = (array)json_decode($this->banques);
//var_dump($lbanque);
?>
<form name="saveRiban" action="<?=$this->url(array('controller'=>'saisie', 'action'=>'ribansave'),null, true)?>" method="post"> <form name="saveRiban" action="<?=$this->url(array('controller'=>'saisie', 'action'=>'ribansave'),null, true)?>" method="post">
<?php if($this->mode == add || $this->mode == edit){?>
<input type="hidden" name="mode" value="<?=$this->mode?>" /> <input type="hidden" name="mode" value="<?=$this->mode?>" />
<input type="hidden" name="siren" value="<?=$this->siren?>" /> <input type="hidden" name="siren" value="<?=$this->siren?>" />
<?php if($this->mode == 'add' || $this->mode == 'edit'){?>
<div class="fieldgrp"> <div class="fieldgrp">
<label>Siren</label> <label>Siren</label>
<div class="field"> <div class="field">
@ -29,12 +23,10 @@ $lbanque = (array)json_decode($this->banques);
<label>Situation RIB</label> <label>Situation RIB</label>
<div class="field"> <div class="field">
<?php <?php
if ($this->actif==1 || (isset($lbanque['dateSuppr']) && $lbanque['dateSuppr']=='0000-00-00 00:00:00') ){ if ($this->actif==1){
$checkActive = 'checked'; $checkActive = 'checked';
$checkInactive = '';
} else { } else {
$checkInactive = 'checked'; $checkInactive = 'checked';
$checkActive = '';
} }
?> ?>
<div style="float:left;">Active<input type="radio" name="actif" value="1" <?=$checkActive;?>/></div> <div style="float:left;">Active<input type="radio" name="actif" value="1" <?=$checkActive;?>/></div>
@ -43,127 +35,79 @@ if ($this->actif==1 || (isset($lbanque['dateSuppr']) && $lbanque['dateSuppr']=='
</div> </div>
<div class="fieldgrp"> <div class="fieldgrp">
<fieldset> <fieldset>
<legend>Saisie RIB</legend> <legend>Saisie RIB</legend>
<div class="fieldgrp"> <div class="fieldgrp">
<label>Banque</label> <label>Banque</label>
<div class="field" > <div class="field" >
<select name="Banque" type="text" value="<?=$this->banqueMod?>" > <select name="Banque" style="width:160px;" >
<option value="<?=$this->banqueMod?>"><?=isset($banques[$this->banqueMod])?$banques[$this->banqueMod]:$this->banqueMod?></option>
<?php foreach($banques as $num => $name):?>
<option value="<?=$num?>"><?=substr($name,0,40)?></option>
<?php endforeach;?>
</select>
<span id="denombque"></span>
</div>
</div>
<div class="fieldgrp">
<label>Guichet</label>
<div class="field" >
<select name="Guichet" style="width:160px;" >
<option value=""><?=$this->banqueMod?></option> <option value=""><?=$this->banqueMod?></option>
<?php foreach( $this->banques as $val ) {?> <?php foreach( $this->banques as $val ) {?>
<option value="<?=$val->codeBanque?>"><?=$val->codeBanque?></option> <option value="<?=$val->codeBanque?>"><?=$val->codeBanque?></option>
<?php }?> <?php }?>
</select> </select>
<span id="denomgcht"></span> </div>
</div>
<div class="fieldgrp">
<label>Guichet</label>
<div class="field" >
<select name="Guichet" style="width:160px;" >
<option value=""><?=$this->guichetMod?></option>
<?php foreach( $this->banques as $val ) {?>
<option value="<?=$val->codeGuichet?>"><?=$val->codeGuichet?></option>
<?php }?>
</select>
</div> </div>
</div> </div>
<div class="fieldgrp"> <div class="fieldgrp">
<label>RIB</label> <label>RIB</label>
<div class="field"> <div class="field">
<input type="text" name="code_banque" size="4" value="<?=(isset($lbanque['codeBanque'])?$lbanque['codeBanque']:'') ?>"/> <input type="text" name="code_banque" size="4" value=""/>
<input type="text" name="code_guichet" size="4" value="<?=(isset($lbanque['codeGuichet'])?$lbanque['codeGuichet']:'') ?>"/> <input type="text" name="code_guichet" size="4" value=""/>
<input type="text" name="num_compte" size="32" value="<?=(isset($lbanque['numCompte'])?$lbanque['numCompte']:'') ?>"/> <input type="text" name="num_compte" size="32" value=""/>
</div> </div>
</div> </div>
</fieldset> </fieldset>
</div> </div>
<div class="fieldgrp"> <div class="fieldgrp">
<fieldset> <fieldset>
<legend>Saisie BIC/IBAN</legend> <legend>Saisie BIC/IBAN</legend>
<div class="fieldgrp"> <div class="fieldgrp">
<label>BIC/SWIFT</label> <label>BIC/SWIFT</label>
<div class="field"> <div class="field">
<input type="text" name="bic_swift" value="<?=(isset($lbanque['bic'])?$lbanque['bic']:'') ?>" size="20"/> <input type="text" name="bic_swift" value="" size="20"/>
</div> </div>
</div> </div>
<div class="fieldgrp"> <div class="fieldgrp">
<label>IBAN</label> <label>IBAN</label>
<div class="field"> <div class="field">
<input type="text" name="iban" value="<?=(isset($lbanque['iban'])?$lbanque['iban']:'') ?>" size="47"/> <input type="text" name="iban" value="" size="47"/>
</div> </div>
</div> </div>
</fieldset> </fieldset>
<?php }else {?> <?php }else {?>
<input type="hidden" name="code_banque" value="<?=(isset($lbanque['codeBanque'])?$lbanque['codeBanque']:'') ?>" />
<input type="hidden" name="code_guichet" value="<?=(isset($lbanque['codeGuichet'])?$lbanque['codeGuichet']:'') ?>" />
<input type="hidden" name="num_compte" value="<?=(isset($lbanque['numCompte'])?$lbanque['numCompte']:'') ?>" />
<input type="hidden" name="bic_swift" value="<?=(isset($lbanque['bic'])?$lbanque['bic']:'') ?>" />
<input type="hidden" name="iban" value="<?=(isset($lbanque['iban'])?$lbanque['iban']:'') ?>" />
<p>Voulez vous supprimer ce RIB ?</p> <p>Voulez vous supprimer ce RIB ?</p>
<?php }?> <?php }?>
</form> </form>
<script> <script>
var tab_bqu=<?=$list_bq?>;
var tab_guichet=<?=$list_guichets?>;
var selecthtml1='<option value="<?=$this->banqueMod?>"><?=$this->banqueMod?></option>';
$('select[name=Banque]').change(function(e){
var num=$('select[name=Banque]').val();
$('select[name=code_banque]').val(num);
var selecthtml2=selecthtml1;
for(var numg in tab_guichet[num]){
selecthtml2+='<option value="'+numg+'">'+numg+'</option>';
}
$('select[name=Guichet]').html(selecthtml2);
if($('input[name=code_banque]').val()==""){
$('input[name=code_banque]').val(num);
}
});
$('select[name=Guichet]').change(function(){
var num=$('select[name=Banque]').val();
var numg=$('select[name=Guichet]').val();
$('#denomgcht').html(tab_guichet[num][numg]);
if($('input[name=code_guichet]').val()==""){
$('input[name=code_guichet]').val(numg);
}
});
$('input[name=code_banque]').change(function(e){
var num=$('input[name=code_banque]').val();
$('select[name=Banque]').val(num);
$('select[name=Banque]').change();
});
$('input[name=iban]').change(function(e){
var regex = new RegExp(' ', "igm");
var iban=$('input[name=iban]').val().replace(regex,"");
$('input[name=iban]').val(iban);
var num=iban.substr(4,5);
$('select[name=Banque]').val(num);
$('select[name=Banque]').change();
var numg=iban.substr(9,5);
$('select[name=Guichet]').val(num);
$('select[name=Guichet]').change();
});
$('#dialog').dialog({ buttons: [ $('#dialog').dialog({ buttons: [
{ text: "Valider", click: function() { { text: "Valider", click: function() {
var form = $('form[name=saveRiban]'); var form = $('form[name=saveRiban]');
$.post(form.attr('action'), form.serialize(), function(data){ $.post(form.attr('action'), form.serialize(), function(data){
form.replaceWith(data); form.replaceWith(data);
}).done(function(data){ alert(data);
}).fail(function(){ alert('Unknow error'); }); }).fail(function(){ alert('Unknow error'); });
} }, } },
{ text: "Annuler", click: function() { $(this).dialog("close"); } } { text: "Annuler", click: function() { $(this).dialog("close"); } }

View File

@ -28,14 +28,9 @@ if ( empty($this->source) ){
?> ?>
</div> </div>
<h2>Traitements de masse</h2> <h2>Extraction des surveillances</h2>
<div class="paragraph">
<?=$this->action('surveillancecsv', 'surveillance')?> <?=$this->action('surveillancecsv', 'surveillance')?>
<p class="options">Demande de surveillance en série :
<a class="dialogsurv" href="/surveillance/surveillanceserie" title="Demande de surveillance en série ">
OK</a></p>
</div>
<h2>Options de recherche</h2> <h2>Options de recherche</h2>
<div class="paragraph"> <div class="paragraph">
@ -157,8 +152,7 @@ par
'siret' => $item['siren'].$item['nic'], 'siret' => $item['siren'].$item['nic'],
'ref' => urlencode($surveillance['ref']), 'ref' => urlencode($surveillance['ref']),
'email' => $surveillance['email'], 'email' => $surveillance['email'],
'source' => $surveillance['source'], 'source' => $surveillance['source']
'q' => $this->q,
))?>" title="Supprimer la surveillance <?=$surveillance['source']?>"> ))?>" title="Supprimer la surveillance <?=$surveillance['source']?>">
<img src="/themes/default/images/interfaces/supprimer.png"/> <img src="/themes/default/images/interfaces/supprimer.png"/>
</a> </a>
@ -301,3 +295,4 @@ $(function() {
?> ?>
}); });
</script> </script>

View File

@ -1,70 +0,0 @@
<div id="survForm">
<link href="<?=$this->pathStyle?>/bsmain.css" media="all" rel="stylesheet" type="text/css">
<?php if(intval($this->step==0)):?>
<?php
$cs=new Scores_Import_FileCsv();
$msg=$cs->standardhelptext;
?>
<div id="msgintro" class="alert-sm alert-success"><?=$msg?>
<br><br><center>
<button id="btnstart" class="btn btn-sm btn-info">Le fichier est pret</button>
</center><br><br>
</div>
<?php endif;?>
<?php if(intval($this->step==2)):?>
<div id="center">
<h1 class="titre">SURVEILLANCE</h1>
<div class="paragraph">
<div id="msgintro" class="alert-sm alert-warning"><?=$this->msg?>
<br><br>
<br><br><center>
<a href="<?=$this->url(array('controller' => 'surveillance', 'action' => 'liste'))?>" class="submit">Retour</a>
</center><br><br>
</div>
<?php endif;?>
<div id="msg" class="alert-sm alert-danger"></div>
<form enctype="multipart/form-data" id="fileform" action="<?=$this->url(array('controller' => 'surveillance', 'action' => 'surveillanceserie'))?>" method="POST">
<input class="required" type="file" name="fichier" size="50000" >
<div class="form-group">
<?php foreach($this->tabSource as $s) : ?>
<input type="checkbox" name="source[]" value="<?=$s['value']?>"<?=$s['select']?>/>&nbsp;<?=$s['name']?><br/>
<?php endforeach; ?>
</div>
<div class="form-group">
<label for="email">Adresse email du destinataire</label>
<input class="required" name="email" type="text" value="<?=$this->email?>"/>
</div>
<input class="btn btn-sm btn-info" name="loadfile" value="Charger le fichier" type="submit">
<input name="ref" type="hidden" value="<?=$this->ref?>"/></div>
</form>
</div>
<script>
$( "#fileform" ).hide();
$('#btnstart').click(function( event ) {
$( "#fileform" ).show();
$( "#msgintro" ).hide();
});
$( "#fileform" ).submit(function( event ) {
var ok=false;
if($('input[name="source[]"]:checked').length > 0){
ok=true;
}
if ( $( ".required" ).val().length === 0 ) {
ok=false;
}
if(!ok){
$('#msg').html('Merci de remplir tous les champs');
}
if ( $( "input[name=fichier]" ).val().substr(-4,4) != '.csv' ) {
$('#msg').html('Format de fichier incorrect');
ok=false;
}
if(!ok){
event.preventDefault();
}
});</script>

View File

@ -46,9 +46,11 @@
<?php }?> <?php }?>
</div> </div>
<div style="float:left;"> <div style="float:left;">
<button id="user-emails" data-href="<?=$this->url(array('controller'=>'user', 'action'=>'email', <button id="user-emails" data-href="<?=$this->url(array(
'q'=>$this->options->email))?>">Editer e-mail du compte</button> 'controller' => 'user', 'action' => 'email',
<button id="user-emailsecondary" data-href="<?=$this->url(array('controller'=>'user', 'action'=>'emailsecondary', 'q' => $this->options->email,
))?>">Editer e-mail du compte</button>
<button id="user-emailsecondary" data-href="<?=$this->url(array('controller' => 'user', 'action' => 'emailsecondary',
'idClient' => $this->options->idClient, 'login' => $this->loginVu,))?>"> 'idClient' => $this->options->idClient, 'login' => $this->loginVu,))?>">
Voir ou associer des e-mails secondaires</button> Voir ou associer des e-mails secondaires</button>
<script> <script>

View File

@ -43,7 +43,7 @@ class File_BodaccController extends Zend_Controller_Action
{ {
$filename = $this->getRequest()->getParam('q'); $filename = $this->getRequest()->getParam('q');
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
$file = $c->profil->path->shared.'/files/'.$filename; $file = $c->profil->path->shared.'/temp/files/'.$filename;
$content_type = 'application/pdf'; $content_type = 'application/pdf';
//Envoi du fichier sur la sortie standard //Envoi du fichier sur la sortie standard
if ( file_exists($file) ) { if ( file_exists($file) ) {

View File

@ -11,7 +11,7 @@ class File_GreffeController extends Zend_Controller_Action
{ {
$filename = $this->getRequest()->getParam('q'); $filename = $this->getRequest()->getParam('q');
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
$file = $c->profil->path->shared.'/files/'.$filename; $file = $c->profil->path->shared.'/temp/files/'.$filename;
$content_type = 'application/pdf'; $content_type = 'application/pdf';
//Envoi du fichier sur la sortie standard //Envoi du fichier sur la sortie standard
if ( file_exists($file) ) { if ( file_exists($file) ) {
@ -42,7 +42,7 @@ class File_GreffeController extends Zend_Controller_Action
{ {
$filename = $this->getRequest()->getParam('q'); $filename = $this->getRequest()->getParam('q');
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
$file = $c->profil->path->shared.'/files/'.$filename; $file = $c->profil->path->shared.'/temp/files/'.$filename;
$content_type = 'application/pdf'; $content_type = 'application/pdf';
//Envoi du fichier sur la sortie standard //Envoi du fichier sur la sortie standard
if ( file_exists($file) ) { if ( file_exists($file) ) {
@ -73,7 +73,7 @@ class File_GreffeController extends Zend_Controller_Action
{ {
$filename = $this->getRequest()->getParam('q'); $filename = $this->getRequest()->getParam('q');
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
$file = $c->profil->path->shared.'/files/'.$filename; $file = $c->profil->path->shared.'/temp/files/'.$filename;
$content_type = 'application/pdf'; $content_type = 'application/pdf';
//Envoi du fichier sur la sortie standard //Envoi du fichier sur la sortie standard
if ( file_exists($file) ) { if ( file_exists($file) ) {
@ -107,7 +107,7 @@ class File_GreffeController extends Zend_Controller_Action
{ {
$filename = $this->getRequest()->getParam('q'); $filename = $this->getRequest()->getParam('q');
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
$file = $c->profil->path->shared.'/files/'.$filename; $file = $c->profil->path->shared.'/temp/files/'.$filename;
$content_type = 'application/pdf'; $content_type = 'application/pdf';
//Envoi du fichier sur la sortie standard //Envoi du fichier sur la sortie standard
if ( file_exists($file) ) { if ( file_exists($file) ) {

View File

@ -54,7 +54,7 @@ class File_ImageController extends Zend_Controller_Action
{ {
$filename = $this->getRequest()->getParam('q'); $filename = $this->getRequest()->getParam('q');
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
$file = $c->profil->path->shared.'/pages/imgcache/'.$filename; $file = $c->profil->path->shared.'/temp/pages/imgcache/'.$filename;
$content_type = 'image/png'; $content_type = 'image/png';
//Envoi du fichier sur la sortie standard //Envoi du fichier sur la sortie standard
if ( file_exists($file) ) { if ( file_exists($file) ) {

View File

@ -50,7 +50,7 @@ class File_IndexController extends Zend_Controller_Action
{ {
$filename = $this->getRequest()->getParam('q'); $filename = $this->getRequest()->getParam('q');
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
$file = $c->profil->path->shared.'/files/'.$filename; $file = $c->profil->path->shared.'/temp/files/'.$filename;
$content_type = 'application/vnd.ms-excel'; $content_type = 'application/vnd.ms-excel';
//Envoi du fichier sur la sortie standard //Envoi du fichier sur la sortie standard
if ( file_exists($file) ) { if ( file_exists($file) ) {
@ -84,7 +84,7 @@ class File_IndexController extends Zend_Controller_Action
{ {
$filename = $this->getRequest()->getParam('q'); $filename = $this->getRequest()->getParam('q');
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
$file = $c->profil->path->shared.'/files/'.$filename; $file = $c->profil->path->shared.'/temp/files/'.$filename;
$content_type = 'application/csv-tab-delimited-table'; $content_type = 'application/csv-tab-delimited-table';
//Envoi du fichier sur la sortie standard //Envoi du fichier sur la sortie standard
if ( file_exists($file) ) { if ( file_exists($file) ) {
@ -118,7 +118,7 @@ class File_IndexController extends Zend_Controller_Action
{ {
$filename = $this->getRequest()->getParam('q'); $filename = $this->getRequest()->getParam('q');
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
$file = $c->profil->path->shared.'/files/'.$filename; $file = $c->profil->path->shared.'/temp/files/'.$filename;
$content_type = 'application/csv-tab-delimited-table'; $content_type = 'application/csv-tab-delimited-table';
//Envoi du fichier sur la sortie standard //Envoi du fichier sur la sortie standard
if ( file_exists($file) ) { if ( file_exists($file) ) {
@ -152,7 +152,7 @@ class File_IndexController extends Zend_Controller_Action
{ {
$filename = $this->getRequest()->getParam('q'); $filename = $this->getRequest()->getParam('q');
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
$file = $c->profil->path->shared.'/files/'.$filename; $file = $c->profil->path->shared.'/temp/files/'.$filename;
$content_type = 'application/csv-tab-delimited-table'; $content_type = 'application/csv-tab-delimited-table';
//Envoi du fichier sur la sortie standard //Envoi du fichier sur la sortie standard
if ( file_exists($file) ) { if ( file_exists($file) ) {
@ -224,7 +224,7 @@ class File_IndexController extends Zend_Controller_Action
{ {
$filename = $this->getRequest()->getParam('q'); $filename = $this->getRequest()->getParam('q');
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
$file = $c->profil->path->shared.'/pages/'.$filename; $file = $c->profil->path->shared.'/temp/pages/'.$filename;
$content_type = 'application/pdf'; $content_type = 'application/pdf';
//Envoi du fichier sur la sortie standard //Envoi du fichier sur la sortie standard
if ( file_exists($file) ) { if ( file_exists($file) ) {

View File

@ -3,12 +3,7 @@
"description": "Extranet", "description": "Extranet",
"require": { "require": {
"zendframework/zendframework1": "^1.12", "zendframework/zendframework1": "^1.12",
"phpoffice/phpexcel": "1.8.0", "phpoffice/phpexcel": "1.8.0"
"spipu/html2pdf": "^4.6",
"setasign/fpdi": "^1.6",
"cybermonde/odtphp": "^1.7",
"fabpot/goutte": "^3.2",
"monolog/monolog": "^1.22"
}, },
"require-dev": { "require-dev": {
"ccampbell/chromephp": "^4.1" "ccampbell/chromephp": "^4.1"

836
composer.lock generated
View File

@ -4,348 +4,9 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "6c57b3ee229a68f4d482e680536a8f55", "hash": "d097f8f75b1007326fd59ba9a41fac85",
"content-hash": "ba361b8c068963e491b92815d000388b",
"packages": [ "packages": [
{
"name": "cybermonde/odtphp",
"version": "v1.7",
"source": {
"type": "git",
"url": "https://github.com/cybermonde/odtphp.git",
"reference": "23aba70923ca3c07af15a5600f4072751c1b4a36"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/cybermonde/odtphp/zipball/23aba70923ca3c07af15a5600f4072751c1b4a36",
"reference": "23aba70923ca3c07af15a5600f4072751c1b4a36",
"shasum": ""
},
"require": {
"php": ">=5.2.4"
},
"type": "library",
"autoload": {
"classmap": [
"library"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"GPL"
],
"description": "ODT document generator",
"homepage": "https://github.com/cybermonde/odtphp",
"keywords": [
"odt",
"php"
],
"time": "2015-06-02T07:28:25+00:00"
},
{
"name": "fabpot/goutte",
"version": "v3.2.1",
"source": {
"type": "git",
"url": "https://github.com/FriendsOfPHP/Goutte.git",
"reference": "db5c28f4a010b4161d507d5304e28a7ebf211638"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/FriendsOfPHP/Goutte/zipball/db5c28f4a010b4161d507d5304e28a7ebf211638",
"reference": "db5c28f4a010b4161d507d5304e28a7ebf211638",
"shasum": ""
},
"require": {
"guzzlehttp/guzzle": "^6.0",
"php": ">=5.5.0",
"symfony/browser-kit": "~2.1|~3.0",
"symfony/css-selector": "~2.1|~3.0",
"symfony/dom-crawler": "~2.1|~3.0"
},
"type": "application",
"extra": {
"branch-alias": {
"dev-master": "3.2-dev"
}
},
"autoload": {
"psr-4": {
"Goutte\\": "Goutte"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
}
],
"description": "A simple PHP Web Scraper",
"homepage": "https://github.com/FriendsOfPHP/Goutte",
"keywords": [
"scraper"
],
"time": "2017-01-03T13:21:43+00:00"
},
{
"name": "guzzlehttp/guzzle",
"version": "6.2.3",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
"reference": "8d6c6cc55186db87b7dc5009827429ba4e9dc006"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/8d6c6cc55186db87b7dc5009827429ba4e9dc006",
"reference": "8d6c6cc55186db87b7dc5009827429ba4e9dc006",
"shasum": ""
},
"require": {
"guzzlehttp/promises": "^1.0",
"guzzlehttp/psr7": "^1.4",
"php": ">=5.5"
},
"require-dev": {
"ext-curl": "*",
"phpunit/phpunit": "^4.0",
"psr/log": "^1.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "6.2-dev"
}
},
"autoload": {
"files": [
"src/functions_include.php"
],
"psr-4": {
"GuzzleHttp\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Michael Dowling",
"email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling"
}
],
"description": "Guzzle is a PHP HTTP client library",
"homepage": "http://guzzlephp.org/",
"keywords": [
"client",
"curl",
"framework",
"http",
"http client",
"rest",
"web service"
],
"time": "2017-02-28T22:50:30+00:00"
},
{
"name": "guzzlehttp/promises",
"version": "v1.3.1",
"source": {
"type": "git",
"url": "https://github.com/guzzle/promises.git",
"reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646",
"reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646",
"shasum": ""
},
"require": {
"php": ">=5.5.0"
},
"require-dev": {
"phpunit/phpunit": "^4.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.4-dev"
}
},
"autoload": {
"psr-4": {
"GuzzleHttp\\Promise\\": "src/"
},
"files": [
"src/functions_include.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Michael Dowling",
"email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling"
}
],
"description": "Guzzle promises library",
"keywords": [
"promise"
],
"time": "2016-12-20T10:07:11+00:00"
},
{
"name": "guzzlehttp/psr7",
"version": "1.4.2",
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
"reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c",
"reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c",
"shasum": ""
},
"require": {
"php": ">=5.4.0",
"psr/http-message": "~1.0"
},
"provide": {
"psr/http-message-implementation": "1.0"
},
"require-dev": {
"phpunit/phpunit": "~4.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.4-dev"
}
},
"autoload": {
"psr-4": {
"GuzzleHttp\\Psr7\\": "src/"
},
"files": [
"src/functions_include.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Michael Dowling",
"email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling"
},
{
"name": "Tobias Schultze",
"homepage": "https://github.com/Tobion"
}
],
"description": "PSR-7 message implementation that also provides common utility methods",
"keywords": [
"http",
"message",
"request",
"response",
"stream",
"uri",
"url"
],
"time": "2017-03-20T17:10:46+00:00"
},
{
"name": "monolog/monolog",
"version": "1.22.1",
"source": {
"type": "git",
"url": "https://github.com/Seldaek/monolog.git",
"reference": "1e044bc4b34e91743943479f1be7a1d5eb93add0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/1e044bc4b34e91743943479f1be7a1d5eb93add0",
"reference": "1e044bc4b34e91743943479f1be7a1d5eb93add0",
"shasum": ""
},
"require": {
"php": ">=5.3.0",
"psr/log": "~1.0"
},
"provide": {
"psr/log-implementation": "1.0.0"
},
"require-dev": {
"aws/aws-sdk-php": "^2.4.9 || ^3.0",
"doctrine/couchdb": "~1.0@dev",
"graylog2/gelf-php": "~1.0",
"jakub-onderka/php-parallel-lint": "0.9",
"php-amqplib/php-amqplib": "~2.4",
"php-console/php-console": "^3.1.3",
"phpunit/phpunit": "~4.5",
"phpunit/phpunit-mock-objects": "2.3.0",
"ruflin/elastica": ">=0.90 <3.0",
"sentry/sentry": "^0.13",
"swiftmailer/swiftmailer": "~5.3"
},
"suggest": {
"aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB",
"doctrine/couchdb": "Allow sending log messages to a CouchDB server",
"ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)",
"ext-mongo": "Allow sending log messages to a MongoDB server",
"graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server",
"mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver",
"php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib",
"php-console/php-console": "Allow sending log messages to Google Chrome",
"rollbar/rollbar": "Allow sending log messages to Rollbar",
"ruflin/elastica": "Allow sending log messages to an Elastic Search server",
"sentry/sentry": "Allow sending log messages to a Sentry server"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Monolog\\": "src/Monolog"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "http://seld.be"
}
],
"description": "Sends your logs to files, sockets, inboxes, databases and various web services",
"homepage": "http://github.com/Seldaek/monolog",
"keywords": [
"log",
"logging",
"psr-3"
],
"time": "2017-03-13T07:08:03+00:00"
},
{ {
"name": "phpoffice/phpexcel", "name": "phpoffice/phpexcel",
"version": "1.8.0", "version": "1.8.0",
@ -401,494 +62,7 @@
"xls", "xls",
"xlsx" "xlsx"
], ],
"time": "2014-03-02T15:22:49+00:00" "time": "2014-03-02 15:22:49"
},
{
"name": "psr/http-message",
"version": "1.0.1",
"source": {
"type": "git",
"url": "https://github.com/php-fig/http-message.git",
"reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
"reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Http\\Message\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "Common interface for HTTP messages",
"homepage": "https://github.com/php-fig/http-message",
"keywords": [
"http",
"http-message",
"psr",
"psr-7",
"request",
"response"
],
"time": "2016-08-06T14:39:51+00:00"
},
{
"name": "psr/log",
"version": "1.0.2",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Log\\": "Psr/Log/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "Common interface for logging libraries",
"homepage": "https://github.com/php-fig/log",
"keywords": [
"log",
"psr",
"psr-3"
],
"time": "2016-10-10T12:19:37+00:00"
},
{
"name": "setasign/fpdi",
"version": "1.6.1",
"source": {
"type": "git",
"url": "https://github.com/Setasign/FPDI.git",
"reference": "5b899b2b41463bf261aa69840fd30b50950a500c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Setasign/FPDI/zipball/5b899b2b41463bf261aa69840fd30b50950a500c",
"reference": "5b899b2b41463bf261aa69840fd30b50950a500c",
"shasum": ""
},
"suggest": {
"setasign/fpdf": "FPDI will extend this class but as it is also possible to use \"tecnickcom/tcpdf\" as an alternative there's no fixed dependency configured.",
"setasign/fpdi-fpdf": "Use this package to automatically evaluate dependencies to FPDF.",
"setasign/fpdi-tcpdf": "Use this package to automatically evaluate dependencies to TCPDF."
},
"type": "library",
"autoload": {
"classmap": [
"filters/",
"fpdi.php",
"fpdf_tpl.php",
"fpdi_pdf_parser.php",
"pdf_context.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jan Slabon",
"email": "jan.slabon@setasign.com",
"homepage": "https://www.setasign.com"
}
],
"description": "FPDI is a collection of PHP classes facilitating developers to read pages from existing PDF documents and use them as templates in FPDF. Because it is also possible to use FPDI with TCPDF, there are no fixed dependencies defined. Please see suggestions for packages which evaluates the dependencies automatically.",
"homepage": "https://www.setasign.com/fpdi",
"keywords": [
"fpdf",
"fpdi",
"pdf"
],
"time": "2015-11-30T10:53:14+00:00"
},
{
"name": "spipu/html2pdf",
"version": "v4.6.1",
"source": {
"type": "git",
"url": "https://github.com/spipu/html2pdf.git",
"reference": "4898439e170ebf032513b8d3a83f0f5ffe85fece"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spipu/html2pdf/zipball/4898439e170ebf032513b8d3a83f0f5ffe85fece",
"reference": "4898439e170ebf032513b8d3a83f0f5ffe85fece",
"shasum": ""
},
"require": {
"php": ">=5.3.2",
"tecnickcom/tcpdf": "~6.2.0"
},
"suggest": {
"ext-gd": "Allows to embed images into the PDF",
"fagundes/zff-html2pdf": "zff-html2pdf module ~0.1.1, if you need to integrate HTML2PDF with Zend Framework 2 (zf2)"
},
"type": "library",
"autoload": {
"files": [
"html2pdf.class.php",
"_class/exception.class.php",
"_class/locale.class.php",
"_class/myPdf.class.php",
"_class/parsingHtml.class.php",
"_class/parsingCss.class.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"LGPL"
],
"authors": [
{
"name": "Spipu",
"homepage": "https://github.com/spipu",
"role": "Developer"
}
],
"description": "HTML2PDF is a HTML to PDF converter written in PHP5 (it uses TCPDF). OFFICIAL PACKAGE",
"homepage": "http://html2pdf.fr/",
"keywords": [
"html",
"html2pdf",
"pdf"
],
"time": "2016-04-05T12:25:17+00:00"
},
{
"name": "symfony/browser-kit",
"version": "v3.2.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/browser-kit.git",
"reference": "2fe0caa60c1a1dfeefd0425741182687a9b382b8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/browser-kit/zipball/2fe0caa60c1a1dfeefd0425741182687a9b382b8",
"reference": "2fe0caa60c1a1dfeefd0425741182687a9b382b8",
"shasum": ""
},
"require": {
"php": ">=5.5.9",
"symfony/dom-crawler": "~2.8|~3.0"
},
"require-dev": {
"symfony/css-selector": "~2.8|~3.0",
"symfony/process": "~2.8|~3.0"
},
"suggest": {
"symfony/process": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.2-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\BrowserKit\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony BrowserKit Component",
"homepage": "https://symfony.com",
"time": "2017-02-21T09:12:04+00:00"
},
{
"name": "symfony/css-selector",
"version": "v3.2.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/css-selector.git",
"reference": "a48f13dc83c168f1253a5d2a5a4fb46c36244c4c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/css-selector/zipball/a48f13dc83c168f1253a5d2a5a4fb46c36244c4c",
"reference": "a48f13dc83c168f1253a5d2a5a4fb46c36244c4c",
"shasum": ""
},
"require": {
"php": ">=5.5.9"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.2-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\CssSelector\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jean-François Simon",
"email": "jeanfrancois.simon@sensiolabs.com"
},
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony CssSelector Component",
"homepage": "https://symfony.com",
"time": "2017-02-21T09:12:04+00:00"
},
{
"name": "symfony/dom-crawler",
"version": "v3.2.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/dom-crawler.git",
"reference": "403944e294cf4ceb3b8447f54cbad88ea7b99cee"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/403944e294cf4ceb3b8447f54cbad88ea7b99cee",
"reference": "403944e294cf4ceb3b8447f54cbad88ea7b99cee",
"shasum": ""
},
"require": {
"php": ">=5.5.9",
"symfony/polyfill-mbstring": "~1.0"
},
"require-dev": {
"symfony/css-selector": "~2.8|~3.0"
},
"suggest": {
"symfony/css-selector": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.2-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\DomCrawler\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony DomCrawler Component",
"homepage": "https://symfony.com",
"time": "2017-02-21T09:12:04+00:00"
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.3.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "e79d363049d1c2128f133a2667e4f4190904f7f4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/e79d363049d1c2128f133a2667e4f4190904f7f4",
"reference": "e79d363049d1c2128f133a2667e4f4190904f7f4",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"suggest": {
"ext-mbstring": "For best performance"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.3-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Mbstring\\": ""
},
"files": [
"bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill for the Mbstring extension",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"mbstring",
"polyfill",
"portable",
"shim"
],
"time": "2016-11-14T01:06:16+00:00"
},
{
"name": "tecnickcom/tcpdf",
"version": "6.2.12",
"source": {
"type": "git",
"url": "https://github.com/tecnickcom/TCPDF.git",
"reference": "2f732eaa91b5665274689b1d40b285a7bacdc37f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/2f732eaa91b5665274689b1d40b285a7bacdc37f",
"reference": "2f732eaa91b5665274689b1d40b285a7bacdc37f",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"type": "library",
"autoload": {
"classmap": [
"fonts",
"config",
"include",
"tcpdf.php",
"tcpdf_parser.php",
"tcpdf_import.php",
"tcpdf_barcodes_1d.php",
"tcpdf_barcodes_2d.php",
"include/tcpdf_colors.php",
"include/tcpdf_filters.php",
"include/tcpdf_font_data.php",
"include/tcpdf_fonts.php",
"include/tcpdf_images.php",
"include/tcpdf_static.php",
"include/barcodes/datamatrix.php",
"include/barcodes/pdf417.php",
"include/barcodes/qrcode.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"LGPLv3"
],
"authors": [
{
"name": "Nicola Asuni",
"email": "info@tecnick.com",
"homepage": "http://nicolaasuni.tecnick.com"
}
],
"description": "TCPDF is a PHP class for generating PDF documents and barcodes.",
"homepage": "http://www.tcpdf.org/",
"keywords": [
"PDFD32000-2008",
"TCPDF",
"barcodes",
"datamatrix",
"pdf",
"pdf417",
"qrcode"
],
"time": "2015-09-12T10:08:34+00:00"
}, },
{ {
"name": "zendframework/zendframework1", "name": "zendframework/zendframework1",
@ -935,7 +109,7 @@
"ZF1", "ZF1",
"framework" "framework"
], ],
"time": "2016-09-08T14:50:34+00:00" "time": "2016-09-08 14:50:34"
} }
], ],
"packages-dev": [ "packages-dev": [
@ -980,7 +154,7 @@
"log", "log",
"logging" "logging"
], ],
"time": "2013-06-26T03:44:33+00:00" "time": "2013-06-26 03:44:33"
} }
], ],
"aliases": [], "aliases": [],

11
docs/CRONTAB Normal file
View File

@ -0,0 +1,11 @@
# AltiScore
00 4 * * 1-5 www-data php /home/vhosts/extranet/current/scripts/jobs/getAltiScore.php --cron >> /home/vhosts/data/log/altiscore.log
# Envoi commande bilan
0 * * * * root php /home/vhosts/extranet/current/scripts/jobs/bilaninput.php --send >> /home/vhosts/data/log/bilaninput.log 2>&1
# Suppression fichier
#0 10 01 * * root php /home/vhosts/extranet/current/scripts/jobs/bilaninput.php --delete >> /home/vhosts/data/log/bilaninput.log 2>&1
# Suppression fichier temporaire
01 15 06 * * root php /home/vhosts/extranet/current/scripts/jobs/removeTempFile.php --options all

View File

@ -13,7 +13,7 @@ Note : Project are define to be use on Linux Server, so take care about path and
PROJECT PROJECT
======= =======
This application is a frontend for the WebService and it's display information graphically. This application is a frontend for the WebService and it's display information graphically.
SYSTEM REQUIREMENTS SYSTEM REQUIREMENTS
@ -29,6 +29,15 @@ SYSTEM REQUIREMENTS
INSTALLATION INSTALLATION
============ ============
See the file scripts/build/configure.php
On server this script is automatically called with the install option.
configure.php --install
Each servers are reference with a directory, name as the hostname, in config dir and all configure
file is list here
Environment configuration Environment configuration
------------------------- -------------------------
@ -39,22 +48,7 @@ Environment configuration
SetEnv APPLICATION_ENV "production" => Production SetEnv APPLICATION_ENV "production" => Production
SetEnv APPLICATION_ENV "staging" => Recette SetEnv APPLICATION_ENV "staging" => Recette
SetEnv APPLICATION_ENV "development" => Developpement SetEnv APPLICATION_ENV "development" => Developpement
Set in apache vhost config file (mod_php) or in .user.ini (php-fpm)
. mod_php
Add in <VirtualHost/>
SetEnv APPLICATION_ENV "development"
. php-fpm
Add a file in document root path (public/) a file .user.ini
env[APPLICATION_ENV] = "development"
See the .user.ini file
- Persistent Storage - Persistent Storage
[profil.path.shared]/persit/ [profil.path.shared]/persit/
@ -75,7 +69,7 @@ Environment configuration
- Temporary storage - Temporary storage
[profil.path.shared]/ [profil.path.shared]/temp/
cache cache
files files
sessions sessions
@ -87,10 +81,10 @@ Environment configuration
- Printing symbolic links - Printing symbolic links
ln -vsf [profil.path.shared]/pages/imgcache [profil.path.shared]/pages/file/image/cache/q; ln -vsf [profil.path.shared]/temp/pages/imgcache [profil.path.shared]/temp/pages/file/image/cache/q;
ln -vsf [profil.path.shared]/persist/streetview [profil.path.shared]/pages/file/streetview/img/q; ln -vsf [profil.path.shared]/persist/streetview [profil.path.shared]/temp/pages/file/streetview/img/q;
ln -vsf [profil.path.shared]/persist/logos [profil.path.shared]/pages/file/image/logo/q; ln -vsf [profil.path.shared]/persist/logos [profil.path.shared]/temp/pages/file/image/logo/q;
ln -vsf [VHOST]/public/themes [profil.path.shared]/pages/themes; ln -vsf [VHOST]/publis/themes [profil.path.shared]/temp/pages/themes;
Apache configuration Apache configuration
@ -99,34 +93,33 @@ Apache configuration
=> Development example => Development example
<VirtualHost *:80> <VirtualHost *:80>
ServerName extranet.sd.dev ServerName extranet.sd.dev
SetEnv APPLICATION_ENV "development" AddDefaultCharset utf-8
AddDefaultCharset utf-8 DocumentRoot "WORKSPACE/extranet/public"
DirectoryIndex index.php SetEnv APPLICATION_ENV "development"
DocumentRoot /home/vhosts/extranet/public <Directory "WORKSPACE/extranet/public/">
<Directory /home/vhosts/extranet/public/> AllowOverride All
EnableSendfile Off Order allow,deny
AllowOverride none Allow from all
Require all granted <IfModule mod_rewrite.c>
<IfModule mod_rewrite.c> RewriteEngine On
RewriteEngine On RewriteCond %{REQUEST_URI} ^/favicon.ico$ [OR]
#RewriteCond %{REQUEST_URI} ^/favicon.ico$ [OR] RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ index.php [NC,L]
RewriteRule ^.*$ index.php [NC,L] </IfModule>
</IfModule> </Directory>
</Directory> # Possible values include: debug, info, notice, warn, error, crit, alert, emerg.
# Possible values include: debug, info, notice, warn, error, crit, alert, emerg. LogLevel debug
LogLevel debug ErrorLog "logs/extranet-error.log"
ErrorLog ${APACHE_LOG_DIR}/extranet-error.log CustomLog "logs/extranet-access.log" common
CustomLog ${APACHE_LOG_DIR}/extranet-access.log combined </VirtualHost>
</VirtualHost>
=> Production configuration => Production configuration
See in ansible project See VHOST file
PHP Configuration PHP Configuration
@ -278,3 +271,4 @@ Dans le vhosts d'apache :
php_flag apc.cache_by_default On php_flag apc.cache_by_default On

29
docs/VHOST Normal file
View File

@ -0,0 +1,29 @@
APACHE 2.4
==========
<VirtualHost *:80>
ServerName extranet.sd.dev
AddDefaultCharset utf-8
SetEnv APPLICATION_ENV "development"
DirectoryIndex index.php
DocumentRoot /home/vhosts/extranet/public
<Directory /home/vhosts/extranet/public/>
EnableSendfile Off
AllowOverride none
Require all granted
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteCond %{REQUEST_URI} ^/favicon.ico$ [OR]
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
</IfModule>
</Directory>
# Possible values include: debug, info, notice, warn, error, crit, alert, emerg.
LogLevel debug
ErrorLog /home/vhosts/apachelog/extranet-error.log
CustomLog /home/vhosts/apachelog/extranet-access.log combined
</VirtualHost>

View File

@ -2,11 +2,11 @@
phpSettings.date.timezone = "Europe/Paris" phpSettings.date.timezone = "Europe/Paris"
phpSettings.display_startup_errors = 0 phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0 phpSettings.display_errors = 0
phpSettings.soap.wsdl_cache_dir = "/home/vhosts/data/extranet/wsdl" phpSettings.soap.wsdl_cache_dir = "/home/vhosts/data/extranet/temp/wsdl"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php" bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap" bootstrap.class = "Bootstrap"
appnamespace = "Application" appnamespace = "Application"
resources.session.save_path = "/home/vhosts/data/extranet/sessions" resources.session.save_path = "/home/vhosts/data/extranet/temp/sessions"
resources.useragent.mobile.features.path = APPLICATION_PATH "/../library/Zend/Http/UserAgent/Features/Adapter/Browscap.php" resources.useragent.mobile.features.path = APPLICATION_PATH "/../library/Zend/Http/UserAgent/Features/Adapter/Browscap.php"
resources.useragent.mobile.features.classname = "Zend_Http_UserAgent_Features_Adapter_Browscap" resources.useragent.mobile.features.classname = "Zend_Http_UserAgent_Features_Adapter_Browscap"
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers" resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"

View File

@ -1,8 +0,0 @@
upload_max_filesize=513M
post_max_size=513M
memory_limit=512M
mbstring.func_overload=0
always_populate_raw_post_data=-1
default_charset='UTF-8'
date.timezone='Europe/Paris'
env[APPLICATION_ENV] = "development"

View File

@ -1,19 +1,9 @@
<?php <?php
class Application_Controller_Plugin_Auth extends Zend_Controller_Plugin_Abstract class Application_Controller_Plugin_Auth extends Zend_Controller_Plugin_Abstract
{ {
/** public function preDispatch(Zend_Controller_Request_Abstract $request)
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function preDispatch(Zend_Controller_Request_Abstract $request)
{ {
if (Zend_Registry::isRegistered('logger')) { Zend_Registry::get('firebug')->info('PLUGIN AUTH - START');
$logger = Zend_Registry::get('logger');
}
$logger->info('PLUGIN AUTH - START');
$module = $request->getModuleName(); $module = $request->getModuleName();
$controller = $request->getControllerName(); $controller = $request->getControllerName();
@ -59,7 +49,7 @@ class Application_Controller_Plugin_Auth extends Zend_Controller_Plugin_Abstract
// --- On vérifie le tout lors d'une connexion par url // --- On vérifie le tout lors d'une connexion par url
if ( !empty($login) && !empty($hach) ) { if ( !empty($login) && !empty($hach) ) {
$logger->info('AUTH : IPONLY'); Zend_Registry::get('firebug')->info('AUTH : IPONLY');
// --- Mode hach // --- Mode hach
if ($mode === null) { if ($mode === null) {
@ -179,6 +169,6 @@ class Application_Controller_Plugin_Auth extends Zend_Controller_Plugin_Abstract
} }
} }
$logger->info('PLUGIN AUTH - END'); Zend_Registry::get('firebug')->info('PLUGIN AUTH - END');
} }
} }

View File

@ -9,11 +9,7 @@ class Application_Controller_Plugin_Cgu extends Zend_Controller_Plugin_Abstract
*/ */
public function preDispatch(Zend_Controller_Request_Abstract $request) public function preDispatch(Zend_Controller_Request_Abstract $request)
{ {
if (Zend_Registry::isRegistered('logger')) { Zend_Registry::get('firebug')->info('PLUGIN CGU - START');
$logger = Zend_Registry::get('logger');
}
$logger->info('PLUGIN CGU - START');
$layout = Zend_Layout::getMVCInstance(); $layout = Zend_Layout::getMVCInstance();
if ($layout->isEnabled()) { if ($layout->isEnabled()) {
@ -61,6 +57,6 @@ class Application_Controller_Plugin_Cgu extends Zend_Controller_Plugin_Abstract
break; break;
} }
} }
$logger->info('PLUGIN CGU - END'); Zend_Registry::get('firebug')->info('PLUGIN CGU - END');
} }
} }

View File

@ -9,11 +9,7 @@ class Application_Controller_Plugin_Lang extends Zend_Controller_Plugin_Abstract
*/ */
public function preDispatch(Zend_Controller_Request_Abstract $request) public function preDispatch(Zend_Controller_Request_Abstract $request)
{ {
if (Zend_Registry::isRegistered('logger')) { Zend_Registry::get('firebug')->info('PLUGIN LANG - START');
$logger = Zend_Registry::get('logger');
}
$logger->info('PLUGIN LANG - START');
$auth = Zend_Auth::getInstance(); $auth = Zend_Auth::getInstance();
if ( $auth->hasIdentity() ) { if ( $auth->hasIdentity() ) {
@ -32,7 +28,6 @@ class Application_Controller_Plugin_Lang extends Zend_Controller_Plugin_Abstract
$locale = new Zend_Locale('fr'); $locale = new Zend_Locale('fr');
} }
// @todo : Remove for PHP7 Compatibility
$cache = Zend_Cache::factory( $cache = Zend_Cache::factory(
'Core', 'Core',
'Apc', 'Apc',
@ -60,6 +55,6 @@ class Application_Controller_Plugin_Lang extends Zend_Controller_Plugin_Abstract
$registry->set('Zend_Locale', $locale); $registry->set('Zend_Locale', $locale);
$registry->set('Zend_Translate', $translate); $registry->set('Zend_Translate', $translate);
$logger->info('PLUGIN LANG - END'); Zend_Registry::get('firebug')->info('PLUGIN LANG - END');
} }
} }

View File

@ -7,11 +7,7 @@ class Application_Controller_Plugin_Menu extends Zend_Controller_Plugin_Abstract
*/ */
public function preDispatch(Zend_Controller_Request_Abstract $request) public function preDispatch(Zend_Controller_Request_Abstract $request)
{ {
if (Zend_Registry::isRegistered('logger')) { Zend_Registry::get('firebug')->info('PLUGIN MENU - START');
$logger = Zend_Registry::get('logger');
}
$logger->info('PLUGIN MENU - START');
$layout = Zend_Layout::getMVCInstance(); $layout = Zend_Layout::getMVCInstance();
$user = new Scores_Utilisateur(); $user = new Scores_Utilisateur();
@ -84,6 +80,6 @@ class Application_Controller_Plugin_Menu extends Zend_Controller_Plugin_Abstract
//$view->aide = true; //$view->aide = true;
} }
$logger->info('PLUGIN MENU - END'); Zend_Registry::get('firebug')->info('PLUGIN MENU - END');
} }
} }

View File

@ -3,11 +3,7 @@ class Application_Controller_Plugin_Pdf extends Zend_Controller_Plugin_Abstract
{ {
public function dispatchLoopShutdown() public function dispatchLoopShutdown()
{ {
if (Zend_Registry::isRegistered('logger')) { Zend_Registry::get('firebug')->info('PLUGIN PDF - START');
$logger = Zend_Registry::get('logger');
}
$logger->info('PLUGIN PDF - START');
$layout = Zend_Layout::getMVCInstance(); $layout = Zend_Layout::getMVCInstance();
if ($layout->isEnabled()) { if ($layout->isEnabled()) {
@ -21,10 +17,10 @@ class Application_Controller_Plugin_Pdf extends Zend_Controller_Plugin_Abstract
$content = preg_replace('@<link href="/@si','<link href="./',$layout); $content = preg_replace('@<link href="/@si','<link href="./',$layout);
$content = preg_replace('@src="/@si','src="./',$content); $content = preg_replace('@src="/@si','src="./',$content);
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
file_put_contents($c->profil->path->shared.'/pages/'.$filename.'.html', $content); file_put_contents($c->profil->path->shared.'/temp/pages/'.$filename.'.html', $content);
} }
} }
$logger->info('PLUGIN PDF - END'); Zend_Registry::get('firebug')->info('PLUGIN PDF - END');
} }
} }

View File

@ -1,82 +1,78 @@
<?php <?php
class Application_Controller_Plugin_Theme extends Zend_Controller_Plugin_Abstract class Application_Controller_Plugin_Theme extends Zend_Controller_Plugin_Abstract
{ {
public function preDispatch(Zend_Controller_Request_Abstract $request) public function preDispatch(Zend_Controller_Request_Abstract $request)
{ {
if (Zend_Registry::isRegistered('logger')) { Zend_Registry::get('firebug')->info('PLUGIN THEME - START');
$logger = Zend_Registry::get('logger');
}
$logger->info('PLUGIN THEME - START'); $auth = Zend_Auth::getInstance();
$theme = 'default'; //$theme = 'mobile';
if ( $auth->hasIdentity() ) {
$theme = !empty($auth->getIdentity()->theme) ? $auth->getIdentity()->theme : 'default';
}
$auth = Zend_Auth::getInstance(); $module = $request->getModuleName();
$theme = 'default'; //$theme = 'mobile'; $controller = $request->getControllerName();
if ( $auth->hasIdentity() ) { $action = $request->getActionName();
$theme = !empty($auth->getIdentity()->theme) ? $auth->getIdentity()->theme : 'default';
}
$module = $request->getModuleName(); //Sauvegarde des paramètres du themes pour gérer les scripts et styles à utiliser
$controller = $request->getControllerName(); $paramsTheme = new stdClass();
$action = $request->getActionName(); $paramsTheme->name = $theme;
$paramsTheme->pathStyle = '/themes/'.$theme.'/styles';
$paramsTheme->pathScript = '/themes/'.$theme.'/scripts';
$paramsTheme->pathImg = '/themes/'.$theme.'/images';
Zend_Registry::set('theme', $paramsTheme);
//Sauvegarde des paramètres du themes pour gérer les scripts et styles à utiliser //Load bootstrap
$paramsTheme = new stdClass(); $bootstrap = Zend_Controller_Front::getInstance()->getParam('bootstrap');
$paramsTheme->name = $theme;
$paramsTheme->pathStyle = '/themes/'.$theme.'/styles';
$paramsTheme->pathScript = '/themes/'.$theme.'/scripts';
$paramsTheme->pathImg = '/themes/'.$theme.'/images';
Zend_Registry::set('theme', $paramsTheme);
//Load bootstrap //Get useragent and device informations
$bootstrap = Zend_Controller_Front::getInstance()->getParam('bootstrap'); $userAgent = $bootstrap->getResource('useragent');
$device = $userAgent->getDevice();
//Get useragent and device informations //Module default de l'application
$userAgent = $bootstrap->getResource('useragent'); $layoutPath = APPLICATION_PATH . '/layouts/' . $theme;
$device = $userAgent->getDevice(); $helperPath = APPLICATION_PATH . '/layouts/helpers';
$viewPath = APPLICATION_PATH . '/modules/'.$module.'/views/' . $theme;
//Module default de l'application //Override path for view and layout
$layoutPath = APPLICATION_PATH . '/layouts/' . $theme; $view = $bootstrap->bootstrap('View')->getResource('View');
$helperPath = APPLICATION_PATH . '/layouts/helpers'; $view->setBasePath($viewPath);
$viewPath = APPLICATION_PATH . '/modules/'.$module.'/views/' . $theme; $view->setHelperPath($helperPath);
$layout = $bootstrap->bootstrap('Layout')->getResource('Layout');
$layout->setLayout('layout');
$layout->setLayoutPath($layoutPath);
//Override path for view and layout // DNS Prefetch
$view = $bootstrap->bootstrap('View')->getResource('View'); $view->headLink(array('rel'=>'dns-prefetch', 'href'=> '//'.$request->getHttpHost()));
$view->setBasePath($viewPath);
$view->setHelperPath($helperPath);
$layout = $bootstrap->bootstrap('Layout')->getResource('Layout');
$layout->setLayout('layout');
$layout->setLayoutPath($layoutPath);
// DNS Prefetch //Load default style and javascript files for the selected theme
$view->headLink(array('rel'=>'dns-prefetch', 'href'=> '//'.$request->getHttpHost())); switch ( $theme ) {
case 'default':
//Load default style and javascript files for the selected theme
switch ( $theme ) {
case 'default':
default: default:
$view->doctype('HTML5'); $view->doctype('HTML5');
$view->headMeta() $view->headMeta()
->appendHttpEquiv('Content-Type', 'text/html; charset=UTF-8') ->appendHttpEquiv('Content-Type', 'text/html; charset=UTF-8')
->appendHttpEquiv('Content-Language', 'fr-FR'); ->appendHttpEquiv('Content-Language', 'fr-FR');
//Favicon - Touch icon for iOS 2.0+ and Android 2.1+ //Favicon - Touch icon for iOS 2.0+ and Android 2.1+
$view->headLink(array( $view->headLink(array(
'rel' => 'apple-touch-icon-precomposed', 'rel' => 'apple-touch-icon-precomposed',
'href' => '/favicon-152.png' 'href' => '/favicon-152.png'
)); ));
//Favicon - targeted to any additional png size //Favicon - targeted to any additional png size
$view->headLink(array( $view->headLink(array(
'rel' => 'icon', 'rel' => 'icon',
'type' => 'image/png', 'type' => 'image/png',
'href' => '/favicon-32.png' 'href' => '/favicon-32.png'
)); ));
$view->headLink(array( $view->headLink(array(
'rel' => 'shortcut icon', 'rel' => 'shortcut icon',
'type' => 'image/x-icon', 'type' => 'image/x-icon',
'href' => '/favicon.ico' 'href' => '/favicon.ico'
)); ));
$UserLogin = false; $UserLogin = false;
if ( $controller == 'user' && ( $action == 'login' || $action == 'logout' ) ) { if ( $controller == 'user' && ( $action == 'login' || $action == 'logout' ) ) {
@ -87,52 +83,52 @@ class Application_Controller_Plugin_Theme extends Zend_Controller_Plugin_Abstrac
$UserLogin = true; $UserLogin = true;
} }
/** /**
* ===> Standard Styles * ===> Standard Styles
*/ */
if ( $UserLogin ) { if ( $UserLogin ) {
$view->headLink() $view->headLink()
->appendStylesheet('/libs/bootstrap-3.3.7/css/bootstrap.min.css', 'all') ->appendStylesheet('/libs/bootstrap-3.3.7/css/bootstrap.min.css', 'all')
->appendStylesheet('/themes/default/styles/user-login.css', 'all'); ->appendStylesheet('/themes/default/styles/user-login.css', 'all');
} else { } else {
$view->headLink()->appendStylesheet($paramsTheme->pathStyle.'/main.css', 'all'); $view->headLink()->appendStylesheet($paramsTheme->pathStyle.'/main.css', 'all');
} }
$view->headLink() $view->headLink()
->appendStylesheet('/libs/ui-1.12.1/themes/smoothness/jquery-ui.min.css', 'all') ->appendStylesheet('/libs/ui-1.11.4/themes/smoothness/jquery-ui.min.css', 'all')
->appendStylesheet('/libs/qtip/jquery.qtip.min.css', 'all') ->appendStylesheet('/libs/qtip/jquery.qtip.min.css', 'all')
->appendStylesheet('/libs/font-awesome-4.7.0/css/font-awesome.min.css', 'all'); ->appendStylesheet('/libs/font-awesome-4.6.3/css/font-awesome.min.css', 'all');
/** /**
* ===> Standard Javascript * ===> Standard Javascript
*/ */
if ( $UserLogin ) { if ( $UserLogin ) {
$view->headScript() $view->headScript()
->appendFile('/libs/html5shiv.min.js', 'text/javascript', array('conditional' => 'lt IE 9')) ->appendFile('/libs/html5shiv.min.js', 'text/javascript', array('conditional' => 'lt IE 9'))
->appendFile('/libs/respond.min.js', 'text/javascript', array('conditional' => 'lt IE 9')) ->appendFile('/libs/respond.min.js', 'text/javascript', array('conditional' => 'lt IE 9'))
->appendFile('/libs/jquery-1.12.4.min.js', 'text/javascript') ->appendFile('/libs/jquery-1.12.4.min.js', 'text/javascript')
->appendFile('/libs/jquery.placeholder.min.js', 'text/javascript', array('conditional' => 'lt IE 9')) ->appendFile('/libs/jquery.placeholder.min.js', 'text/javascript', array('conditional' => 'lt IE 9'))
->appendFile('/libs/bootstrap-3.3.7/js/bootstrap.min.js', 'text/javascript'); ->appendFile('/libs/bootstrap-3.3.7/js/bootstrap.min.js', 'text/javascript');
} else { } else {
$view->headScript() $view->headScript()
->appendFile('/libs/jquery-1.12.4.min.js', 'text/javascript'); ->appendFile('/libs/jquery-1.12.4.min.js', 'text/javascript');
} }
$view->headScript() $view->headScript()
->appendFile('/libs/ui-1.12.1/jquery-ui.min.js', 'text/javascript') ->appendFile('/libs/ui-1.11.4/jquery-ui.min.js', 'text/javascript')
->appendFile('/libs/ui-1.12.1/datepicker-fr.js', 'text/javascript'); ->appendFile('/libs/ui-1.11.4/datepicker-fr.js', 'text/javascript');
if ( ! $UserLogin ) { if ( ! $UserLogin ) {
$view->headScript() $view->headScript()
->appendFile('/libs/qtip/jquery.qtip.min.js', 'text/javascript') ->appendFile('/libs/qtip/jquery.qtip.min.js', 'text/javascript')
->appendFile($paramsTheme->pathScript.'/script.js', 'text/javascript'); ->appendFile($paramsTheme->pathScript.'/script.js', 'text/javascript');
} }
break; break;
} }
$logger->info('PLUGIN THEME - STOP'); Zend_Registry::get('firebug')->info('PLUGIN THEME - STOP');
} }
} }

View File

@ -3,11 +3,7 @@ class Application_Controller_Plugin_Xml extends Zend_Controller_Plugin_Abstract
{ {
public function dispatchLoopShutdown() public function dispatchLoopShutdown()
{ {
if (Zend_Registry::isRegistered('logger')) { Zend_Registry::get('firebug')->info('PLUGIN XML - START');
$logger = Zend_Registry::get('logger');
}
$logger->info('PLUGIN XML - START');
$layout = Zend_Layout::getMVCInstance(); $layout = Zend_Layout::getMVCInstance();
if ($layout->isEnabled()) { if ($layout->isEnabled()) {
@ -24,6 +20,6 @@ class Application_Controller_Plugin_Xml extends Zend_Controller_Plugin_Abstract
} }
} }
$logger->info('PLUGIN XML - END'); Zend_Registry::get('firebug')->info('PLUGIN XML - END');
} }
} }

View File

@ -1,8 +0,0 @@
<?php
class Application_Model_CommandesSurveillance extends Zend_Db_Table_Abstract
{
protected $_name = 'commandes_surveillance';
}

View File

@ -164,6 +164,7 @@ class GenCourrier
'ZIP_PROXY' => 'PhpZipProxy', 'ZIP_PROXY' => 'PhpZipProxy',
); );
require_once 'Vendors/odtphp/library/odf.php';
$odf = new odf(realpath(dirname(__FILE__).'/modeleLettreGreffe.odt'), $config); $odf = new odf(realpath(dirname(__FILE__).'/modeleLettreGreffe.odt'), $config);
$this->setInfosCommande(); $this->setInfosCommande();

View File

@ -1,4 +1,8 @@
<?php <?php
require_once 'Vendors/tcpdf/tcpdf.php';
require_once 'Vendors/fpdi/fpdi.php';
class PDF extends FPDI { class PDF extends FPDI {
/** /**
* "Remembers" the template id of the imported page * "Remembers" the template id of the imported page

View File

@ -3,7 +3,7 @@
* To change this template, choose Tools | Templates * To change this template, choose Tools | Templates
* and open the template in the editor. * and open the template in the editor.
*/ */
require_once 'ChartDirector/phpchartdir.php'; require_once 'Vendors/ChartDirector/phpchartdir.php';
require_once ('Giant/WSgiant.php'); require_once ('Giant/WSgiant.php');
require_once ('Scores/WsScores.php'); require_once ('Scores/WsScores.php');
require_once ('Scores/Cache.php'); require_once ('Scores/Cache.php');
@ -19,7 +19,7 @@ Class GiantControllerLib
{ {
$this->configVal = new Zend_Config_Ini( realpath(dirname(__FILE__)).'/giant.ini' ); $this->configVal = new Zend_Config_Ini( realpath(dirname(__FILE__)).'/giant.ini' );
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
$this->pathImg = $c->profil->path->shared.'/pages/imgcache/'.$companyId; $this->pathImg = $c->profil->path->shared.'/temp/pages/imgcache/'.$companyId;
} }
public function getCache($pays){ public function getCache($pays){

View File

@ -547,7 +547,7 @@ class Infogreffe
$bilan['mode_diffusion'][] = $mode->getAttribute('type'); $bilan['mode_diffusion'][] = $mode->getAttribute('type');
} }
$this->logger->info('Bilan : '.$bilan['date_cloture'].' '.$bilan['type_comptes']); Zend_Registry::get('firebug')->info('Bilan : '.$bilan['date_cloture'].' '.$bilan['type_comptes']);
//Génération de l'index pour le tri //Génération de l'index pour le tri
$date = $bilan['date_cloture_iso']; $date = $bilan['date_cloture_iso'];
@ -628,17 +628,17 @@ class Infogreffe
->where('date=?', $date) ->where('date=?', $date)
->where('num=?', $acte['num_acte']) ->where('num=?', $acte['num_acte'])
->where('file LIKE "acte-'.$siren.'-%-'.$date.'-%-'.$depot['num_depot'].'-'.$acte['num_acte'].'.pdf"'); ->where('file LIKE "acte-'.$siren.'-%-'.$date.'-%-'.$depot['num_depot'].'-'.$acte['num_acte'].'.pdf"');
$this->logger->info('Detect fichier : '.$sql->__toString()); Zend_Registry::get('firebug')->info('Detect fichier : '.$sql->__toString());
$result = $actesM->fetchRow($sql); $result = $actesM->fetchRow($sql);
if ( null !== $result ) { if ( null !== $result ) {
$this->logger->info(print_r($result,1)); Zend_Registry::get('firebug')->info($result);
$fichier = $this->pathData.$this->actePath($ref).$result->file; $fichier = $this->pathData.$this->actePath($ref).$result->file;
$this->logger->info($fichier); Zend_Registry::get('firebug')->info($fichier);
if ( file_exists($fichier) ) if ( file_exists($fichier) )
{ {
$this->logger->info(print_r($acte,1)); Zend_Registry::get('firebug')->info($acte);
if ($result->type != $acte['type_acte'] && $result->type2 == '') { if ($result->type != $acte['type_acte'] && $result->type2 == '') {
$this->logger->info('Update Database'); Zend_Registry::get('firebug')->info('Update Database');
//Add to the database //Add to the database
try { try {
$actesM->update(array( $actesM->update(array(
@ -648,7 +648,7 @@ class Infogreffe
'date_depot' => $dateDepot->toString('yyyyMMdd') 'date_depot' => $dateDepot->toString('yyyyMMdd')
), 'id='.$result->id); ), 'id='.$result->id);
} catch (Zend_Exception $e) { } catch (Zend_Exception $e) {
$this->logger->info($e->getMessage()); Zend_Registry::get('firebug')->info($e->getMessage());
} }
} else { } else {
try { try {
@ -658,7 +658,7 @@ class Infogreffe
'date_depot' => $dateDepot->toString('yyyyMMdd') 'date_depot' => $dateDepot->toString('yyyyMMdd')
), 'id='.$result->id); ), 'id='.$result->id);
} catch (Zend_Exception $e) { } catch (Zend_Exception $e) {
$this->logger->info($e->getMessage()); Zend_Registry::get('firebug')->info($e->getMessage());
} }
} }
$ref = str_replace('.pdf', '',substr($result->file,15)); $ref = str_replace('.pdf', '',substr($result->file,15));
@ -770,7 +770,7 @@ class Infogreffe
//Cas de fichier correspondant à la référence //Cas de fichier correspondant à la référence
$fichier = $this->pathData.$this->bilanPath($ref).$this->bilanFilename($siren,$ref); $fichier = $this->pathData.$this->bilanPath($ref).$this->bilanFilename($siren,$ref);
$this->logger->info('Fichier : '.$fichier); Zend_Registry::get('firebug')->info('Fichier : '.$fichier);
if( file_exists($fichier) && filesize($fichier)>0 ) if( file_exists($fichier) && filesize($fichier)>0 )
{ {
$mode = 'fichier'; $mode = 'fichier';

View File

@ -39,12 +39,6 @@ class Scores_Auth_Adapter_Ws implements Zend_Auth_Adapter_Interface
'62.210.222.34', '62.210.222.34',
); );
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
/** /**
* Authentification par WS * Authentification par WS
* @param string $username * @param string $username
@ -68,10 +62,6 @@ class Scores_Auth_Adapter_Ws implements Zend_Auth_Adapter_Interface
$this->_password = 'iponly:'.$ip; $this->_password = 'iponly:'.$ip;
$this->_checkIp = true; $this->_checkIp = true;
} }
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
} }
/** /**
@ -81,7 +71,7 @@ class Scores_Auth_Adapter_Ws implements Zend_Auth_Adapter_Interface
public function authenticate() public function authenticate()
{ {
$ip = $_SERVER['REMOTE_ADDR']; $ip = $_SERVER['REMOTE_ADDR'];
if (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && in_array($ip, $this->listProxyIp)) { if ( isset($_SERVER['HTTP_X_FORWARDED_FOR']) && in_array($ip, $this->listProxyIp)) {
$ip = $_SERVER['HTTP_X_FORWARDED_FOR']; $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
} }
@ -95,27 +85,23 @@ class Scores_Auth_Adapter_Ws implements Zend_Auth_Adapter_Interface
$parameters->from = 'auth'; $parameters->from = 'auth';
$InfosLogin = $ws->getInfosLogin($parameters); $InfosLogin = $ws->getInfosLogin($parameters);
$this->logger->info(__CLASS__ . ' : '.__METHOD__); Zend_Registry::get('firebug')->info(__CLASS__ . ' : '.__METHOD__);
$this->logger->info(print_r($InfosLogin,1)); Zend_Registry::get('firebug')->info($InfosLogin);
// --- Renvoi
$identity = new stdClass(); if ( is_string($InfosLogin) || $InfosLogin->error->errnum != 0 ) {
// --- Erreur technique
if ($InfosLogin === false) {
return new Zend_Auth_Result(Zend_Auth_Result::FAILURE_UNCATEGORIZED, $identity, array("Identification impossible"));
}
// --- Renvoi
elseif (is_string($InfosLogin) || $InfosLogin->error->errnum != 0) {
$message = $InfosLogin; $message = $InfosLogin;
return new Zend_Auth_Result(Zend_Auth_Result::FAILURE_CREDENTIAL_INVALID, $identity, array($message)); return new Zend_Auth_Result(Zend_Auth_Result::FAILURE_CREDENTIAL_INVALID, $identity, array($message));
} }
// --- Assignation identity // --- Assignation identity
elseif ($InfosLogin->result->login == $this->_username) { elseif ( $InfosLogin !== false && !empty($InfosLogin->result->login)) {
$identity = new stdClass();
if ($this->_checkIp || $this->_checkHach) { if ($this->_checkIp || $this->_checkHach) {
Zend_Registry::get('firebug')->info("IN");
$identity->password = $this->_password; $identity->password = $this->_password;
} else { } else {
$identity->password = md5($InfosLogin->result->login.'|'.$this->_password); $identity->password = md5($InfosLogin->result->login.'|'.$this->_password);
} }
Zend_Registry::get('firebug')->info($identity->password);
$identity->username = $InfosLogin->result->login; $identity->username = $InfosLogin->result->login;
$identity->email = $InfosLogin->result->email; $identity->email = $InfosLogin->result->email;
$identity->profil = $InfosLogin->result->profil; $identity->profil = $InfosLogin->result->profil;
@ -142,12 +128,10 @@ class Scores_Auth_Adapter_Ws implements Zend_Auth_Adapter_Interface
$identity->version = $InfosLogin->result->version; $identity->version = $InfosLogin->result->version;
$identity->modeEdition = false; $identity->modeEdition = false;
$timeout = (!empty($InfosLogin->result->timeout)) ? $timeout = (!empty($InfosLogin->result->timeout)) ? $InfosLogin->result->timeout : $this->_timeout;
$InfosLogin->result->timeout : $this->_timeout;
$identity->timeout = $timeout; $identity->timeout = $timeout;
$identity->time = time() + $timeout; $identity->time = time() + $timeout;
$lang = in_array($InfosLogin->result->lang, array('fr','en')) ? $lang = in_array($InfosLogin->result->lang, array('fr','en')) ? $InfosLogin->result->lang : 'fr';
$InfosLogin->result->lang : 'fr';
$identity->lang = $lang; $identity->lang = $lang;
$identity->langtmp = $lang; $identity->langtmp = $lang;
@ -176,9 +160,8 @@ class Scores_Auth_Adapter_Ws implements Zend_Auth_Adapter_Interface
$this->_password = $identity->password; $this->_password = $identity->password;
return new Zend_Auth_Result(Zend_Auth_Result::SUCCESS, $identity); return new Zend_Auth_Result(Zend_Auth_Result::SUCCESS, $identity);
} }
// --- Fallback
else { else {
return new Zend_Auth_Result(Zend_Auth_Result::FAILURE_UNCATEGORIZED, $identity, array("Identification impossible")); return new Zend_Auth_Result(Zend_Auth_Result::FAILURE_UNCATEGORIZED, $identity, array("Identification impossible"));
} }
} }

View File

@ -672,7 +672,7 @@ class BDF
$filename = false; $filename = false;
} else { } else {
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
$filename = $c->profil->path->shared.'/cache/bdf_'.$service.'_'.$req.'_'.$module.'.html'; $filename = $c->profil->path->shared.'/temp/cache/bdf_'.$service.'_'.$req.'_'.$module.'.html';
} }
//@todo : Ajouter timeover //@todo : Ajouter timeover

View File

@ -14,7 +14,7 @@ class Cache
*/ */
public function __construct($name = null) public function __construct($name = null)
{ {
$this->filename = Zend_Registry::get('config')->profil->path->shared.'/cache/'.$name.$this->extension; $this->filename = Zend_Registry::get('config')->profil->path->shared.'/temp/cache/'.$name.$this->extension;
} }
/** /**

View File

@ -21,7 +21,6 @@ class Scores_Export_Print
'finance-bourse' => 'siret,id', 'finance-bourse' => 'siret,id',
'finance-banque' => 'siret,id', 'finance-banque' => 'siret,id',
'juridique-annonces' => 'siret,id,idAnn,vue,p', 'juridique-annonces' => 'siret,id,idAnn,vue,p',
'juridique-annonce' => 'siret,id,idAnn,vue',
'juridique-infosreg' => 'siret,id', 'juridique-infosreg' => 'siret,id',
'juridique-competences' => 'siret,id,type', 'juridique-competences' => 'siret,id,type',
'juridique-marques' => 'siret,id,idObject', 'juridique-marques' => 'siret,id,idObject',
@ -58,7 +57,6 @@ class Scores_Export_Print
'finance-bourse' => 'siret,id', 'finance-bourse' => 'siret,id',
'finance-banque' => 'siret,id', 'finance-banque' => 'siret,id',
'juridique-annonces' => 'siret,id,idAnn,vue,p', 'juridique-annonces' => 'siret,id,idAnn,vue,p',
'juridique-annonce' => 'siret,id,idAnn,vue',
'juridique-infosreg' => 'siret,id', 'juridique-infosreg' => 'siret,id',
'juridique-competences' => 'siret,id,type', 'juridique-competences' => 'siret,id,type',
'juridique-marques' => 'siret,id,idObject', 'juridique-marques' => 'siret,id,idObject',
@ -93,7 +91,6 @@ class Scores_Export_Print
'finance-bourse' => 'siret,id', 'finance-bourse' => 'siret,id',
'finance-banque' => 'siret,id', 'finance-banque' => 'siret,id',
'juridique-annonces' => 'siret,id,idAnn,vue,p', 'juridique-annonces' => 'siret,id,idAnn,vue,p',
'juridique-annonce' => 'siret,id,idAnn,vue',
'juridique-infosreg' => 'siret,id', 'juridique-infosreg' => 'siret,id',
'juridique-competences' => 'siret,id,type', 'juridique-competences' => 'siret,id,type',
'juridique-marques' => 'siret,id,idObject', 'juridique-marques' => 'siret,id,idObject',
@ -162,7 +159,7 @@ class Scores_Export_Print
$content = $serializer->serialize($object); $content = $serializer->serialize($object);
$filename = $this->filename('xml', $params); $filename = $this->filename('xml', $params);
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
$path = $c->profil->path->shared.'/files/'; $path = $c->profil->path->shared.'/temp/files/';
file_put_contents($path.$filename.'.xml', $content); file_put_contents($path.$filename.'.xml', $content);
} catch (Zend_Serializer_Exception $e) { } catch (Zend_Serializer_Exception $e) {
//Error //Error

File diff suppressed because one or more lines are too long

View File

@ -22,7 +22,7 @@ class Scores_Finance_Liasse_XLS
public function __construct($modele = '', $mode = 'Excel5') public function __construct($modele = '', $mode = 'Excel5')
{ {
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
$this->path = $c->profil->path->shared . '/files/'; $this->path = $c->profil->path->shared . '/temp/files/';
if (!is_dir($this->path)){ if (!is_dir($this->path)){
mkdir($this->path); mkdir($this->path);
} }

View File

@ -8,10 +8,10 @@ class Scores_Finance_Ratios_Graph
public function __construct($siret, $id = 0) public function __construct($siret, $id = 0)
{ {
require_once 'ChartDirector/phpchartdir.php'; require_once 'Vendors/ChartDirector/phpchartdir.php';
require_once 'Scores/Cache.php'; require_once 'Scores/Cache.php';
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
$this->path = $c->profil->path->shared . '/pages/imgcache/'; $this->path = $c->profil->path->shared . '/temp/pages/imgcache/';
$this->siret = $siret; $this->siret = $siret;
$this->id = $id; $this->id = $id;
} }

View File

@ -211,12 +211,12 @@ class Scores_Google_Streetview
$response = $client->request('GET'); $response = $client->request('GET');
if ( $response->isSuccessful() ) { if ( $response->isSuccessful() ) {
if (!copy($response->getStreamName(), $this->pathImg())) { if (!copy($response->getStreamName(), $this->pathImg())) {
$this->logger->info('Erreur copie image !'); Zend_Registry::get('firebug')->info('Erreur copie image !');
return false; return false;
} }
} }
} catch (Zend_Http_Client_Exception $e) { } catch (Zend_Http_Client_Exception $e) {
$this->logger->info('HTTP Exception : '.$e->getMessage()); Zend_Registry::get('firebug')->info('HTTP Exception : '.$e->getMessage());
return false; return false;
} }
} }

View File

@ -113,15 +113,11 @@ class IdentiteEntreprise
} }
public function getCapitalisationTexte() public function getCapitalisationTexte()
{ {
if (!isset($this->identite->Bourse)) { $capitalisation = $this->identite->Bourse->capitalisation;
return false; if ($this->identite->Isin == '' || intval($capitalisation) == 0)
}
if ($this->identite->Isin == '') {
return false; return false;
}
$date = new Zend_Date($this->identite->Bourse->derCoursDate, 'yyyy-MM-dd'); $date = new Zend_Date($this->identite->Bourse->derCoursDate, 'yyyy-MM-dd');
$capitalisation = $this->identite->Bourse->capitalisation;
return number_format($capitalisation, 0, '', ' ').' &euro; au '.$date->toString('dd/MM/yyyy'); return number_format($capitalisation, 0, '', ' ').' &euro; au '.$date->toString('dd/MM/yyyy');
} }
@ -1368,8 +1364,7 @@ class IdentiteEntreprise
if($i==2) break; if($i==2) break;
} }
switch($i){ switch($i){
case 0: $unite = ' '; break; case 1: $unite = ' K'; break;
case 1: $unite = ' K'; break;
case 2: $unite = ' M'; break; case 2: $unite = ' M'; break;
} }
return number_format($number, 0, '', ' ').$unite; return number_format($number, 0, '', ' ').$unite;

View File

@ -5,12 +5,6 @@ class IdentiteProcol
protected $annonces = array(); protected $annonces = array();
protected $procol; protected $procol;
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
/** /**
* Construit l'identite entreprise afin de retourner les éléments formatter * Construit l'identite entreprise afin de retourner les éléments formatter
* pour l'affichage * pour l'affichage
@ -19,11 +13,7 @@ class IdentiteProcol
*/ */
public function __construct($infos) public function __construct($infos)
{ {
if (Zend_Registry::isRegistered('logger')) { $this->identite = $infos->Identite;
$this->logger = Zend_Registry::get('logger');
}
$this->identite = $infos->Identite;
$this->procol = new stdClass(); $this->procol = new stdClass();
$this->procol->LibTypeEtab = $infos->LibTypeEtab; $this->procol->LibTypeEtab = $infos->LibTypeEtab;
$this->procol->StatutsConstDepot = $infos->StatutsConstDepot; $this->procol->StatutsConstDepot = $infos->StatutsConstDepot;
@ -49,7 +39,7 @@ class IdentiteProcol
} }
} }
} }
$this->logger->info(print_r($this->annonces,1)); Zend_Registry::get('firebug')->info($this->annonces);
$this->view = new Zend_View(); $this->view = new Zend_View();
} }

View File

@ -1,186 +0,0 @@
<?php
class Scores_Import_FileCsv
{
private $filepath='';
private $standardcolumns=array(
'siren','nic','ref'
);
private $standarddelimiter=',';
private $standardencoding='utf-8';
public $standardhelptext='Le fichier attendu est un csv standard : fichier texte extension .csv contenant 3 colonnes (siren nic ref) séparées par des virgules';
public function __construct()
{
$c = new Zend_Config_Ini(realpath(APPLICATION_PATH) . '/configs/application.ini');
$ct = $c->toArray();
$this->config=$ct[APPLICATION_ENV];
//home/vhosts/data/extranet
$this->filepath=$this->config['profil']['path']['shared'].'/persist/surveillance/';
if(!is_dir($this->filepath)){
mkdir($this->filepath);
}
}
public function verifandupload($file,$request){
$ref=$request->getParam('ref');
$user = new Scores_Utilisateur();
$this->login = $user->identity->username;
//var_dump($user->identity);die;
$this->email=$request->getParam('email');
$this->sources=$request->getParam('source');
$fileinname=$file["fichier"]["name"];
$fileType = pathinfo($fileinname,PATHINFO_EXTENSION);
if($fileType!='csv'){
return array('success' => false, 'message' => 'Extension incorrecte');
}
$fileoutname=$ref.'.csv';
$target=$this->filepath.$fileinname;
if (!move_uploaded_file($file["fichier"]["tmp_name"], $target)) {
return array('success' => false, 'message' => 'Le fichier '
. basename( $file["fichier"]["name"]). ' ne peut pas être chargé.');
}
$result=$this->verifyformat($fileinname,$fileoutname);
if($result['success']){
$row=$result['message'];
}else{
return $result;
}
$result=$this->sendtoftp($fileoutname);
if(!$result['success']){
return $result;
}
$cmd=new Application_Model_CommandesSurveillance();
foreach($sources as $source){
$data= array(
'ref' => $ref,
'login' =>$this->login,
'email' => $this->email,
'filename' => $fileinname,
'surv_source' => $source,
'date_created' => Date('Y-m-d')
);
$cmd->insert($data);
}
$mail = new Zend_Mail('UTF-8');
// --- Configuration du transport SMTP
if ( $this->config['profil']['mail']['method'] == 'smtp' ) {
$config = array();
if ( isset($this->config['profil']['mail']['username']) ) {
$config['username'] = $this->config['profil']['mail']['username'];
}
if ( isset($this->config['profil']['mail']['password']) ) {
$config['password'] = $this->config['profil']['mail']['password'];
}
if ( isset($this->config['profil']['mail']['port']) ) {
$config['port'] = $c->profil->mail->port;
}
$tr = new Zend_Mail_Transport_Smtp($this->config['profil']['mail']['host'], $config);
}
// --- Configuration transport Sendmail
if ( $this->config['profil']['mail']['method']== 'sendmail' ) {
$tr = new Zend_Mail_Transport_Sendmail();
}
$mail->setDefaultTransport($tr);
$mail->setBodyText(implode('###',$data));
$mail->setFrom('support@scores-decisions.com', 'Extranet');
$mail->addTo('supportdev@scores-decisions.com', 'Support');
$mail->setSubject('Commande de surveillance '.$ref);
try{
$mail->send(); // Ne fonctionne pas en dev....
}catch(Exception $e){
// Ne fonctionne pas en dev.... voir en prod
}
return array('success' => true, 'message' => $row);
}
private function verifyformat($fileinname,$fileoutname){
$handle=fopen($this->filepath.$fileinname,'r');
$h2=fopen($this->filepath.$fileoutname,'w');
if(!$handle){
return array('success' => false, 'message' => 'Fichier illisible.');
}
if(!$h2){
return array('success' => false, 'message' => 'Un probleme technique est survenu merci de nous contacter avec le code erreur '.__LINE__);
}
ini_set("auto_detect_line_endings", true);
$row=1;
while (($data = fgetcsv($handle)) !== FALSE) {
$num = count($data);
if($num!=3){
return array('success' => false, 'message' => 'Nombre de colonnes erronné à la ligne '.$row.'.');
}
if($data[0]=='siren' & $row==1){
continue;
}
$data[0]=trim($data[0]);
if(strlen($data[0])>9){
return array('success' => false, 'message' => 'Siren mal formaté à la ligne '.$row.'.');
}
if(!is_numeric($data[0])){
return array('success' => false, 'message' => 'Siren non numérique '.$data[0].' à la ligne '.$row.'.');
}
$siren=substr('000000000'.$data[0],-9,9);
if(!$this->estValide($siren)){
return array('success' => false, 'message' => 'Siren invalide '.$data[0].' à la ligne '.$row.'.');
}
$row++;
$data[3]='';
$data[4]=$this->login;
$data[5]=$this->email;
foreach($this->sources as $source){
$data[3]=$source;
fputcsv($h2,$data);
}
}
fclose($handle);
fclose($h2);
return array('success' => true, 'message' => $row);
}
private function sendtoftp($filename){
$connection = ftp_connect('ftp.scores-decisions.com',21);
$login = ftp_login($connection, 'internesd', 'internesd2017');
$dest='/send/'.$filename;
$source=$this->filepath.$filename;
if (!$connection || !$login) {
return array('success' => false, 'message' => 'Un probleme technique est survenu merci de nous contacter avec le code erreur '.__LINE__);
}
if(!ftp_pasv($connection, true)){
return array('success' => false, 'message' => 'Un probleme technique est survenu merci de nous contacter avec le code erreur '.__LINE__);
}
$upload = ftp_put($connection, $dest, $source, FTP_BINARY);
if (!$upload) {
return array('success' => false, 'message' => 'Un probleme technique est survenu merci de nous contacter avec le code erreur '.__LINE__);
}
ftp_close($connection);
return array('success' => true, 'message' => '');
}
private function estValide($siren){
// Donc le SIREN est un numérique à 9 chiffres
$somme = 0;
for ($cpt = 0; $cpt<strlen($siren); $cpt++) {
if (($cpt % 2) == 1) { // Les positions paires : 2ème, 4ème, 6ème et 8ème chiffre
$tmp = substr($siren,$cpt,1) * 2; // On le multiplie par 2
if ($tmp > 9)
$tmp -= 9; // Si le résultat est supérieur à 9, on lui soustrait 9
}
else
$tmp = substr($siren,$cpt,1);
$somme += (int)$tmp;
}
if (($somme % 10) == 0)
return true; // Si la somme est un multiple de 10 alors le SIREN est valide
else
return false;
}
}

View File

@ -13,7 +13,7 @@ class Scores_Insee_AvisSituation
$this->siret = $siret; $this->siret = $siret;
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
$this->pathPdf = $c->profil->path->shared.'/files'; $this->pathPdf = $c->profil->path->shared.'/temp/files';
$this->pathLog = $c->profil->path->shared.'/persist/log'; $this->pathLog = $c->profil->path->shared.'/persist/log';
$this->lock = $this->pathLog.'/aviserreur.lock'; $this->lock = $this->pathLog.'/aviserreur.lock';
} }
@ -96,7 +96,7 @@ class Scores_Insee_AvisSituation
$mail = new Scores_Mail_Method(); $mail = new Scores_Mail_Method();
$mail->setFromKey('contact'); $mail->setFromKey('contact');
$mail->addToKey('suivi'); $mail->addToKey('support');
$mail->setSubject($objet); $mail->setSubject($objet);
$mail->setBodyText($texte); $mail->setBodyText($texte);
$mail->execute(); $mail->execute();
@ -104,9 +104,7 @@ class Scores_Insee_AvisSituation
public function erreurmsg() public function erreurmsg()
{ {
return "<h3>Le site partenaire n'a pas répondu correctement ou est indisponible. return "<h3>Le site partenaire n'a pas répondu correctement ou est indisponible. Merci d'essayer à nouveau ultérieurement.</h3>";
Merci d'essayer à nouveau ultérieurement ou consulter le
<a target=\"_blank\" href=\"http://avis-situation-sirene.insee.fr/\">site officiel</a></h3>";
} }
/** /**

View File

@ -255,7 +255,6 @@ class Scores_Menu
'label' => 'ELEMENTS JURIDIQUES', 'label' => 'ELEMENTS JURIDIQUES',
'activateMenu' => array( 'activateMenu' => array(
array('controller'=>'juridique', 'action'=>'ctxdetail'), array('controller'=>'juridique', 'action'=>'ctxdetail'),
array('controller'=>'juridique', 'action'=>'annonce'),
), ),
'pages' => array( 'pages' => array(
array( array(

View File

@ -1,11 +1,15 @@
<?php <?php
require_once 'Vendors/tcpdf/tcpdf.php';
require_once 'Vendors/fpdi/fpdi.php';
class Scores_Pdf_Fpdi extends FPDI class Scores_Pdf_Fpdi extends FPDI
{ {
/** /**
* "Remembers" the template id of the imported page * "Remembers" the template id of the imported page
*/ */
var $_tplIdx; var $_tplIdx;
/** /**
* Draw an imported PDF logo on every page * Draw an imported PDF logo on every page
* @param string $template * @param string $template
@ -18,7 +22,7 @@ class Scores_Pdf_Fpdi extends FPDI
} }
$this->useTemplate($this->_tplIdx); $this->useTemplate($this->_tplIdx);
} }
function Footer() function Footer()
{ {
// emtpy method body // emtpy method body

View File

@ -1,13 +1,15 @@
<?php <?php
require_once 'Vendors/tcpdf/tcpdf.php';
class Scores_Pdf_Tcpdf extends TCPDF class Scores_Pdf_Tcpdf extends TCPDF
{ {
protected $bgimage = null; protected $bgimage = null;
public function SetBackgroundImage($file) public function SetBackgroundImage($file)
{ {
$this->bgimage = $file; $this->bgimage = $file;
} }
/** /**
* (non-PHPdoc) * (non-PHPdoc)
* @see TCPDF::Header() * @see TCPDF::Header()
@ -29,7 +31,7 @@ class Scores_Pdf_Tcpdf extends TCPDF
$this->setPageMark(); $this->setPageMark();
} }
} }
/** /**
* (non-PHPdoc) * (non-PHPdoc)
* @see TCPDF::Footer() * @see TCPDF::Footer()
@ -43,6 +45,6 @@ class Scores_Pdf_Tcpdf extends TCPDF
// Page number // Page number
$this->Cell(0, 10, 'Page '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M'); $this->Cell(0, 10, 'Page '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');
} }
} }

View File

@ -1,5 +1,5 @@
<?php <?php
require_once 'ChartDirector/phpchartdir.php'; require_once 'Vendors/ChartDirector/phpchartdir.php';
class RapportComment class RapportComment
{ {
@ -18,22 +18,12 @@ class RapportComment
protected $graphCouleurs = array(); protected $graphCouleurs = array();
protected $pathImage = ''; protected $pathImage = '';
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function __construct($siret, $id, $tabCommentaires = array(), $RatiosInfos = null, $BilansInfos = null, $RatiosSecteur = null, $tabProjection = array()) public function __construct($siret, $id, $tabCommentaires = array(), $RatiosInfos = null, $BilansInfos = null, $RatiosSecteur = null, $tabProjection = array())
{ {
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
//Assignation //Assignation
$this->commentaires = $tabCommentaires; $this->commentaires = $tabCommentaires;
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
$this->pathImage = $c->profil->path->shared.'/pages/imgcache/'; $this->pathImage = $c->profil->path->shared.'/temp/pages/imgcache/';
$this->idEntreprise = $id; $this->idEntreprise = $id;
$this->siret = $siret; $this->siret = $siret;
@ -317,12 +307,12 @@ class RapportComment
$pattern = '/COULEUR\((.*)\)/i'; $pattern = '/COULEUR\((.*)\)/i';
///Detection couleur ///Detection couleur
if ( preg_match($pattern, $content, $matches) ) { if ( preg_match($pattern, $content, $matches) ) {
$this->logger->info('DETECTION Couleurs'); Zend_Registry::get('firebug')->info('DETECTION Couleurs');
$listeCouleurs = $matches[1]; $listeCouleurs = $matches[1];
//Récupération des couleurs //Récupération des couleurs
$pattern = '/([a-z0-9]{3,4})/i'; $pattern = '/([a-z0-9]{3,4})/i';
if ( preg_match_all($pattern, $listeCouleurs, $matches) ) { if ( preg_match_all($pattern, $listeCouleurs, $matches) ) {
$this->logger->info(print_r($matches,1)); Zend_Registry::get('firebug')->info($matches);
$nbCouleurs = count($matches[1]); $nbCouleurs = count($matches[1]);
for($i=0;$i<$nbCouleurs;$i++){ for($i=0;$i<$nbCouleurs;$i++){
$this->graphCouleurs[] = $assocNomCouleurs[$matches[1][$i]]; $this->graphCouleurs[] = $assocNomCouleurs[$matches[1][$i]];
@ -337,7 +327,7 @@ class RapportComment
{ {
$pattern = '/\[GRAPHIQUE id=(.*?) titre=\'(.*?)\',(.*)\]/'; $pattern = '/\[GRAPHIQUE id=(.*?) titre=\'(.*?)\',(.*)\]/';
if( preg_match($pattern, $content, $matches) ){ if( preg_match($pattern, $content, $matches) ){
$this->logger->info($content); Zend_Registry::get('firebug')->info($content);
$image_id = $matches[1]; $image_id = $matches[1];
$titre = $matches[2]; $titre = $matches[2];
//Génération id/nom fichier graphique //Génération id/nom fichier graphique
@ -362,7 +352,7 @@ class RapportComment
} }
} }
$this->logger->info('Graphique : '.$type); Zend_Registry::get('firebug')->info('Graphique : '.$type);
switch($detectType){ switch($detectType){
case 'histo': case 'histo':
@ -504,10 +494,10 @@ class RapportComment
if( $this->cache_graph($this->pathImage.$file) ){ if( $this->cache_graph($this->pathImage.$file) ){
$output = $file; $output = $file;
} else { } else {
$this->logger->info('Histo - id : '.$id); Zend_Registry::get('firebug')->info('Histo - id : '.$id);
$this->logger->info('Histo - titre : '.$titre); Zend_Registry::get('firebug')->info('Histo - titre : '.$titre);
$this->logger->info('Histo - strRatios : '.$strRatios); Zend_Registry::get('firebug')->info('Histo - strRatios : '.$strRatios);
$this->logger->info(print_r($this->ratiosEntrep,1)); Zend_Registry::get('firebug')->info($this->ratiosEntrep);
// --- Gestion des couleurs // --- Gestion des couleurs
if(count($this->graphCouleurs)>0){ if(count($this->graphCouleurs)>0){
$couleurs = $this->graphCouleurs; $couleurs = $this->graphCouleurs;
@ -584,7 +574,7 @@ class RapportComment
} }
} }
if ( !isset($unite) ) { $unite = 'EUR'; } if ( !isset($unite) ) { $unite = 'EUR'; }
$this->logger->info($data); Zend_Registry::get('firebug')->info($data);
// --- Graphique // --- Graphique
if ( count($data)<=1 ){ if ( count($data)<=1 ){
$output = false; $output = false;

View File

@ -3,12 +3,6 @@ class Scores_Session_Entreprise
{ {
protected $index = 'entrep'; protected $index = 'entrep';
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
/** /**
* @param string $siret * @param string $siret
* @param int $id * @param int $id
@ -16,10 +10,6 @@ class Scores_Session_Entreprise
*/ */
public function __construct($siret, $id = 0, $set = false) public function __construct($siret, $id = 0, $set = false)
{ {
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
if ( !empty($siret) && !$set ) { if ( !empty($siret) && !$set ) {
if (!$this->checkSession($siret, $id) ){ if (!$this->checkSession($siret, $id) ){
$this->getInfoEntrep($siret, $id); $this->getInfoEntrep($siret, $id);
@ -123,7 +113,7 @@ class Scores_Session_Entreprise
protected function getInfoEntrep($siret, $id = 0) protected function getInfoEntrep($siret, $id = 0)
{ {
$this->logger->info('getInfoEntrep'); Zend_Registry::get('firebug')->info('getInfoEntrep');
require_once 'Scores/WsScores.php'; require_once 'Scores/WsScores.php';
$ws = new WsScores(); $ws = new WsScores();
$etab = $ws->getIdentiteLight($siret, $id); $etab = $ws->getIdentiteLight($siret, $id);

View File

@ -7,19 +7,9 @@ class Scores_Utilisateur
*/ */
public $identity = null; public $identity = null;
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function __construct() public function __construct()
{ {
if (Zend_Registry::isRegistered('logger')) { $auth = Zend_Auth::getInstance();
$this->logger = Zend_Registry::get('logger');
}
$auth = Zend_Auth::getInstance();
if ( $auth->hasIdentity() ) { if ( $auth->hasIdentity() ) {
$this->identity = $auth->getIdentity(); $this->identity = $auth->getIdentity();
} }
@ -343,7 +333,7 @@ class Scores_Utilisateur
); );
$clientstatM = new Application_Model_ClientStat(); $clientstatM = new Application_Model_ClientStat();
$id = $clientstatM->insert($data); $id = $clientstatM->insert($data);
$this->logger->info('Insertion : '.$id); Zend_Registry::get('firebug')->info('Insertion : '.$id);
} }
} }

View File

@ -59,12 +59,6 @@ class Scores_Ws_Client extends Zend_Soap_Client
*/ */
protected $cache; protected $cache;
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
/** /**
* Créer l'environnement nécessaire pour le chargement du webservice * Créer l'environnement nécessaire pour le chargement du webservice
* @param string $name * @param string $name
@ -76,10 +70,6 @@ class Scores_Ws_Client extends Zend_Soap_Client
*/ */
public function __construct($name, $version, $user = null) public function __construct($name, $version, $user = null)
{ {
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Configuration de l'application // --- Configuration de l'application
if (Zend_Registry::isRegistered('config')) { if (Zend_Registry::isRegistered('config')) {
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
@ -113,7 +103,7 @@ class Scores_Ws_Client extends Zend_Soap_Client
if (PHP_SAPI != 'cli' && $user === null) { if (PHP_SAPI != 'cli' && $user === null) {
$user = new Scores_Utilisateur(); $user = new Scores_Utilisateur();
$this->logger->info($user->getPassword()); Zend_Registry::get('firebug')->info($user->getPassword());
} }
if ($user !== null) { if ($user !== null) {
@ -132,7 +122,7 @@ class Scores_Ws_Client extends Zend_Soap_Client
// --- Create Cache // --- Create Cache
$frontend = array( 'lifetime' => 14400, 'automatic_seralization' => true ); $frontend = array( 'lifetime' => 14400, 'automatic_seralization' => true );
$backend = array( 'cache_dir' => $c->profil->path->shared . '/cache' ); $backend = array( 'cache_dir' => $c->profil->path->shared . '/temp/cache' );
$this->cache = Zend_Cache::factory('Core', 'File', $frontend, $backend); $this->cache = Zend_Cache::factory('Core', 'File', $frontend, $backend);
} }
@ -147,7 +137,7 @@ class Scores_Ws_Client extends Zend_Soap_Client
} }
$methodConfig = $this->config[$name]; $methodConfig = $this->config[$name];
$this->logger->info(print_r($methodConfig,1)); Zend_Registry::get('firebug')->info($methodConfig);
// --- Cache // --- Cache
$cacheEnable = false; $cacheEnable = false;
if ( array_key_exists('cache', $methodConfig) ) { if ( array_key_exists('cache', $methodConfig) ) {
@ -172,8 +162,8 @@ class Scores_Ws_Client extends Zend_Soap_Client
// --- Debug // --- Debug
if ( array_key_exists('debug', $methodConfig) ) { if ( array_key_exists('debug', $methodConfig) ) {
$this->logger->info(__CLASS__.'->'.$name); Zend_Registry::get('firebug')->info(__CLASS__.'->'.$name);
$this->logger->info(print_r($arguments,1)); Zend_Registry::get('firebug')->info($arguments);
} }
try { try {
@ -182,7 +172,7 @@ class Scores_Ws_Client extends Zend_Soap_Client
// --- Debug // --- Debug
if ( array_key_exists('debug', $methodConfig) ) { if ( array_key_exists('debug', $methodConfig) ) {
$this->logger->info(print_r($response,1)); Zend_Registry::get('firebug')->info($response);
} }
// --- Cache // --- Cache
@ -196,13 +186,13 @@ class Scores_Ws_Client extends Zend_Soap_Client
// --- Debug // --- Debug
if ( array_key_exists('debug', $methodConfig) ) { if ( array_key_exists('debug', $methodConfig) ) {
$this->logger->info($fault->faultcode.' - '.$fault->faultstring); Zend_Registry::get('firebug')->info($fault->faultcode.' - '.$fault->faultstring);
} }
// --- Gestion des SOAP fault // --- Gestion des SOAP fault
if ( array_key_exists('errorMsg', $methodConfig) ) { if ( array_key_exists('errorMsg', $methodConfig) ) {
if ( in_array($fault->faultcode, $methodConfig['errorMsg']) ) { if ( in_array($fault->faultcode, $methodConfig['errorMsg']) ) {
$this->logger->info("Exception as error message : ".$fault->faultcode); Zend_Registry::get('firebug')->info("Exception as error message : ".$fault->faultcode);
throw new Exception($fault->faultstring); throw new Exception($fault->faultstring);
} }
} }
@ -231,7 +221,7 @@ class Scores_Ws_Client extends Zend_Soap_Client
$mail = new Scores_Mail_Method(); $mail = new Scores_Mail_Method();
$mail->setSubject('[ERREUR SOAP] - '.$c->profil->server->name.' -'.date('Ymd')); $mail->setSubject('[ERREUR SOAP] - '.$c->profil->server->name.' -'.date('Ymd'));
$mail->setBodyTextC($message); $mail->setBodyTextC($message);
$mail->setFromKey('contact'); $mail->setFromKey('supportdev');
$mail->addToKey('supportdev'); $mail->addToKey('supportdev');
$mail->execute(); $mail->execute();
} }

View File

@ -51,10 +51,12 @@ return array(
), ),
'setUserSSO' => array( 'setUserSSO' => array(
'debug' => true, 'debug' => true,
'errorMsg' => array('SSO'),
'log' => 'mail', 'log' => 'mail',
), ),
'ssoAuthenticate' => array( 'ssoAuthenticate' => array(
'debug' => true, 'debug' => true,
'errorMsg' => array('SSO'),
'log' => 'mail', 'log' => 'mail',
), ),
), ),

View File

@ -1,12 +1,5 @@
<?php <?php
return array( return array(
'0.8' => array(
'getBilan' => array(
'errorMsg' => array('MSG'),
'debug' => true,
'log' => 'mail',
),
),
'0.9' => array( '0.9' => array(
'getGreffeAffaireList' => array( 'getGreffeAffaireList' => array(
'debug' => true, 'debug' => true,
@ -40,6 +33,12 @@ return array(
'debug' => true, 'debug' => true,
'errorMsg' => array('0902'), 'errorMsg' => array('0902'),
'log' => 'mail', 'log' => 'mail',
) ),
), ),
'0.8' => array(
'getListeEtablissements' => array(
'debug' => true,
'log' => 'mail',
),
),
); );

View File

@ -5,20 +5,5 @@ return array(
'debug' => true, 'debug' => true,
'log' => 'mail', 'log' => 'mail',
), ),
'dupliqueAnnonce' => array(
'debug' => true,
'errorMsg' => array('MSG'),
'log' => 'mail',
),
'setRib' => array(
'debug' => true,
'errorMsg' => array('MSG'),
'log' => 'mail',
),
'getRib' => array(
'debug' => true,
'errorMsg' => array('MSG'),
'log' => 'mail',
),
) )
); );

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