Compare commits

..

1 Commits

Author SHA1 Message Date
Michael RICOIS
f7049d832d Help branch to solve conflict 2014-03-05 15:35:54 +00:00
4640 changed files with 1319099 additions and 97249 deletions

4
.gitignore vendored
View File

@ -1,4 +0,0 @@
/.settings/
/.buildpath
/.project
/vendor/

View File

@ -1,9 +0,0 @@
table => actes_files
library\Application\Model\ActesFiles.php
table commandes
table commandes_erreur
table commandes_kbis
table commandes_pieces
table commandes_statut
table commandes_tarifs => Needed dans GenCourrier

View File

@ -1,14 +1,6 @@
<?php
use Monolog\Logger;
use Monolog\Handler\StreamHandler;
use Monolog\Processor\IntrospectionProcessor;
use Monolog\Handler\ChromePHPHandler;
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
/**
* Set config available in all apps
*/
protected function _initConfig()
{
$config = new Zend_Config($this->getOptions());
@ -16,25 +8,7 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
return $config;
}
/**
* Init controller with modules
*/
protected function _initController()
{
$this->bootstrap('frontController');
$front = $this->getResource('frontController');
$front->setControllerDirectory(array(
'default' => __DIR__ . '/modules/default/controllers',
'admin' => __DIR__ . '/modules/admin/controllers',
'file' => __DIR__ . '/modules/file/controllers',
));
return $front;
}
/**
* Initialisation global des paramètres de vue
*/
//Initialisation global des paramètres de vue
protected function _initViewSettings()
{
$this->bootstrap('view');
@ -44,37 +18,27 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
$view->headTitle('Extranet Scores & Décisions');
}
/**
* Some specific route
* @return unknown
*/
protected function _initRouter()
{
$this->bootstrap('frontController');
$front = $this->getResource('frontController');
$router = $front->getRouter();
$localauthRoute = new Zend_Controller_Router_Route('localauth/', array(
'module' => 'default',
'controller' => 'user',
'action' => 'login'
));
$router->addRoute('localauth', $localauthRoute);
$fichierRoute = new Zend_Controller_Router_Route('fichier/:action/:fichier', array(
'controller' => 'fichier',
'fichier' => '',
));
$printRoute = new Zend_Controller_Router_Route('editer/:action/:fichier', array(
'module' => 'default',
'controller' => 'print',
'fichier' => '',
));
$router->addRoute('localauth', $localauthRoute);
$router->addRoute('fichier', $fichierRoute);
$router->addRoute('print', $printRoute);
$ssoRoute = new Zend_Controller_Router_Route('sso/:partner/', array(
'module' => 'default',
'controller' => 'auth',
'action' => 'index',
));
$router->addRoute('sso', $ssoRoute);
return $router;
}
@ -88,6 +52,9 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
$logger = new Zend_Log($writer);
Zend_Registry::set('firebug', $logger);
//ChromePHP - a voir comment désactiver
require_once 'Vendors/ChromePHP/ChromePhp.php';
//Application Logger en Production
$AppLogger = new Zend_Log();
if (APPLICATION_ENV == 'production')
@ -100,42 +67,16 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
$AppMailWriter->addFilter(Zend_Log::ERR);
$AppLogger->addWriter($AppMailWriter);
}
/* Remove as it's not use
$c = Zend_Registry::get('config');
$path = $c->profil->path->data.'/log';
$AppFileWriter = new Zend_Log_Writer_Stream($path.'/application.log');
$AppFileWriter->addFilter(Zend_Log::ERR);
$AppLogger->addWriter($AppFileWriter);
*/
Zend_Registry::set('log', $AppLogger);
}
/**
* Logs and Debug
*/
protected function _initLogger()
{
$config = new Zend_Config($this->getOptions());
$logFile = $config->profil->path->shared.'/log/application.log';
$log = new Logger('APP');
// Console Handler
if (in_array(APPLICATION_ENV, array('development', 'staging'))) {
//$log->pushHandler(new BrowserConsoleHandler());
//$log->pushHandler(new ChromePHPHandler());
}
// File Handler
if (APPLICATION_ENV == 'development') {
$level = Logger::DEBUG;
} else {
$level = Logger::INFO;
}
$log->pushHandler(new StreamHandler($logFile), $level);
// Processor
$log->pushProcessor(new IntrospectionProcessor());
Zend_Registry::set('logger', $log);
}
/**
* Init database
*/
protected function _initDb()
{
$c = Zend_Registry::get('config');
@ -166,15 +107,13 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
}
}
/**
* Init cache
*/
protected function _initCache()
{
// @todo : Remove for PHP7 Compatibility
//MetadataCache pour la base de données
$cache = Zend_Cache::factory('Core', 'Apc',
array('lifetime' => 28800, 'automatic_serialization' => true),
$cache = Zend_Cache::factory(
'Core',
'Apc',
array('lifetime' => 28800,'automatic_serialization' => true),
array()
);
Zend_Db_Table_Abstract::setDefaultMetadataCache($cache);

View File

@ -1 +0,0 @@
/application.ini

View File

@ -1,23 +1,6 @@
<?php
class AideController extends Zend_Controller_Action
{
protected $theme;
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init()
{
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme
$this->theme = Zend_Registry::get('theme');
}
/**
* Afficher bulle pour les nouveautés
@ -41,6 +24,7 @@ class AideController extends Zend_Controller_Action
->where("date>='".$dateglissant."' AND date<='".$now."'")
->order('date DESC')
->limit($nbNewsMax);
//Zend_Registry::get('firebug')->info($sql->__toString());
$nouveautes = $nouveautesM->fetchAll($sql);
}
$this->view->assign('nouveautes', $nouveautes);
@ -65,10 +49,6 @@ class AideController extends Zend_Controller_Action
}
/**
* Affichage et validation de "cgu"
* Conditions daccès à l'extranet
*/
public function cguAction()
{
$this->_helper->layout()->disableLayout();
@ -80,7 +60,7 @@ class AideController extends Zend_Controller_Action
require_once 'Scores/WsScores.php';
$ws = new WsScores();
$accept = $ws->setCGU();
$this->logger->info($accept);
Zend_Registry::get('firebug')->info($accept);
if ($accept) {
//Put in session
$auth = Zend_Auth::getInstance();
@ -94,10 +74,6 @@ class AideController extends Zend_Controller_Action
}
/**
* Afficher des propriétés du navigateur
* Compatibilités et version
*/
public function navinfoAction()
{
$bootstrap = $this->getInvokeArg('bootstrap');

View File

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

View File

@ -1,8 +1,6 @@
<?php
class DashboardController extends Zend_Controller_Action
{
protected $theme;
protected $typeActes= array(
'a00' => 'MODIFICATION',
'a01' => 'MODIFICATION',
@ -101,12 +99,6 @@ class DashboardController extends Zend_Controller_Action
'aUA' => 'ATTESTATION DU CONJOINT COMMUN EN BIENS',
);
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
/**
* Return a ramdom password
* @param int $length
@ -134,13 +126,6 @@ class DashboardController extends Zend_Controller_Action
public function init()
{
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme
$this->theme = Zend_Registry::get('theme');
require_once 'Scores/WsScores.php';
}
@ -187,7 +172,7 @@ class DashboardController extends Zend_Controller_Action
*/
protected function statChart($data, $labels, $name)
{
require_once 'ChartDirector/phpchartdir.php';
require_once("Vendors/ChartDirector/phpchartdir.php");
$hChart = 210;
@ -253,7 +238,7 @@ class DashboardController extends Zend_Controller_Action
*/
public function commandesAction()
{
$this->view->headScript()->appendFile($this->theme->pathScript.'/dashboard.js', 'text/javascript');
$this->view->headScript()->appendFile('/themes/default/scripts/dashboard.js', 'text/javascript');
$request = $this->getRequest();
$type = $request->getParam('type', '');
@ -456,7 +441,7 @@ class DashboardController extends Zend_Controller_Action
}
$c = Zend_Registry::get('config');
$refFile = $c->profil->path->shared.'/pdf/acte-'.
$refFile = realpath($c->profil->path->data).'/pdf/acte-'.
$listCommandes[$i]->siren.'-'.
trim($listCommandes[$i]->refDocument).'.pdf';
@ -471,7 +456,7 @@ class DashboardController extends Zend_Controller_Action
'controller' => 'pieces',
'action' => 'actes',
'siret' => $listCommandes[$i]->siren,
), 'default', true);
), null, true);
} elseif (preg_match('/^([0-9]{4}).*?$/', $listCommandes[$i]->refDocument, $matches)){
@ -490,7 +475,7 @@ class DashboardController extends Zend_Controller_Action
'controller' => 'pieces',
'action' => 'bilans',
'siret' => $listCommandes[$i]->siren,
), 'default', true);
), null, true);
}
break;
@ -583,7 +568,8 @@ class DashboardController extends Zend_Controller_Action
$this->_forward('perms', 'error');
}
$this->view->headScript()->appendFile($this->theme->pathScript.'/dashboard.js', 'text/javascript');
$this->view->headScript()
->appendFile('/themes/default/scripts/dashboard.js', 'text/javascript');
$ws = new WsScores();
$reponse = $ws->getListeClients();
@ -646,16 +632,16 @@ class DashboardController extends Zend_Controller_Action
$request = $this->getRequest();
$infos = $request->getParams();
$ws = new WsScores();
$response = $ws->setClient($infos);
if (is_string($response) || $response === false) {
$this->forward('client', 'dashboard', 'default', array('idClient' => $infos['idClient']));
$reponse = $ws->setClient($infos);
if ($reponse->error->errnum==1) {
$this->_forward('client', 'dashboard', null, array('idClient' => $infos['idClient']));
}
$this->view->assign('infos', $request->getParams());
}
public function usersAction()
{
$this->view->headLink()->appendStylesheet($this->theme->pathStyle.'/user.css', 'all');
$this->view->headLink()->appendStylesheet('/themes/default/styles/user.css', 'all');
$user = new Scores_Utilisateur();
@ -672,9 +658,20 @@ class DashboardController extends Zend_Controller_Action
$ws = new WsScores();
$services = $ws->getServices($idClient);
if (is_array($services)) {
$this->view->assign('services', $services->item);
} else {
$this->view->assign('services', array());
}
if ( null === $service ) {
$infos = $ws->getListeUtilisateurs($user->getLogin(), $idClient);
$utilisateurs = $infos->result->item;
} else {
$infos = $ws->getServiceUsers($idClient, $service);
$utilisateurs = $infos->item;
$this->view->assign('service', $service);
}
$this->view->assign('utilisateurs', $utilisateurs);
$this->view->assign('idClient', $idClient);
@ -682,8 +679,10 @@ class DashboardController extends Zend_Controller_Action
public function userAction()
{
$this->view->headLink()->appendStylesheet($this->theme->pathStyle.'/user.css', 'all');
$this->view->headScript()->appendFile($this->theme->pathScript.'/user.js', 'text/javascript');
$this->view->headLink()
->appendStylesheet('/themes/default/styles/user.css', 'all')
->appendStylesheet('/themes/default/styles/form.css', 'all');
$this->view->headScript()->appendFile('/themes/default/scripts/user.js', 'text/javascript');
$request = $this->getRequest();
@ -792,7 +791,7 @@ class DashboardController extends Zend_Controller_Action
$user = $ws->getUser($login);
$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('prefs', explode(' ',$options['pref']));
@ -878,7 +877,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);
}
@ -901,7 +900,7 @@ class DashboardController extends Zend_Controller_Action
if ( isset($_FILES) && count($_FILES)==1 ) {
$c = Zend_Registry::get('config');
$path = $c->profil->path->shared.'/persist/nouveautes';
$path = realpath($c->profil->path->data).'/nouveautes';
if(!file_exists($path)) mkdir($path);
$tmp_name = $_FILES['fichier']['tmp_name'];
@ -993,7 +992,7 @@ class DashboardController extends Zend_Controller_Action
//Liste des periodes de facturation
$contrats = $ws->getClientTarifs($idClient);
$this->logger->info(print_r($contrats,1));
Zend_Registry::get('firebug')->info($contrats);
$this->view->assign('contrats', $contrats->item);
//Liste des services

View File

@ -1,25 +1,11 @@
<?php
class DirigeantController extends Zend_Controller_Action
{
protected $theme;
protected $siret;
protected $id;
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init()
{
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme
$this->theme = Zend_Registry::get('theme');
$request = $this->getRequest();
$this->siret = $request->getParam('siret');
$this->id = $request->getParam('id', 0);
@ -55,7 +41,7 @@ class DirigeantController extends Zend_Controller_Action
$session = new Scores_Session_Entreprise($this->siret, $this->id);
if ($user->checkPerm('dirigeantsop')){
$href = $this->view->url(array('controller'=>'dirigeant', 'action'=>'op', 'siret'=>$this->siret), 'default', true);
$href = $this->view->url(array('controller'=>'dirigeant', 'action'=>'op', 'siret'=>$this->siret));
$this->view->assign('dirigeantsop', $href);
}
@ -131,8 +117,6 @@ class DirigeantController extends Zend_Controller_Action
$this->view->assign('AutrePage', $this->getRequest()->getParam('apage'));
$user = new Scores_Utilisateur();
$this->view->assign('accessWorldCheck', $user->checkPerm('WORLDCHECK'));
$this->view->assign('surveillance', $user->checkPerm('survdirigeants'));
$this->view->assign('edition', $user->checkModeEdition());
}
}

View File

@ -1,23 +1,7 @@
<?php
class ErrorController extends Zend_Controller_Action
{
protected $theme;
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init()
{
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme
$this->theme = Zend_Registry::get('theme');
}
public function init(){}
public function errorAction()
{
@ -67,12 +51,12 @@ class ErrorController extends Zend_Controller_Action
$message.= "Referer : ".$_SERVER['HTTP_REFERER']."\n";
$c = Zend_Registry::get('config');
$mail = new Scores_Mail_Method();
$mail = new Scores_Mail();
$mail->setSubject('[ERREUR APPLICATIVE] - '.$c->profil->server->name.' -'.date('Ymd'));
$mail->setBodyText($message);
$mail->setFromKey('support');
$mail->setBodyTexte($message);
$mail->setFrom('supportdev');
$mail->addToKey('supportdev');
$mail->execute();
$mail->send();
}
// Log exception, if logger available
if ($log = $this->getLog()) {

View File

@ -0,0 +1,895 @@
<?php
class EvaluationController extends Zend_Controller_Action
{
protected $siret = null;
protected $id = 0;
public function init()
{
$request = $this->getRequest();
$this->siret = $request->getParam('siret');
$this->id = $request->getParam('id', 0);
require_once 'Scores/WsScores.php';
require_once 'Scores/IdentiteEntreprise.php';
}
public function indexAction()
{
$this->forward('entreprise', 'recherche');
}
/**
* Affichage d'une reglette représentant le score
*/
public function printscoresAction()
{
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$score = strtolower($request->getParam('score'));
if( $score == 'indiscore' ){
$user = new Scores_Utilisateur();
switch($user->getTypeScore()) {
case '20': $score.='20'; break;
case '100':
default: $score.='100'; break;
}
}
$note = $request->getParam('note');
$bornes = array(
'conanh' => array( 'min' => -4.5 , 'max' => 16 ),
'afdcc2' => array( 'min' => 0 , 'max' => 5 ),
'afdcc1' => array( 'min' => -10 , 'max' => 10 ),
'z' => array( 'min' => -3 , 'max' => 3 ),
'indiscore100' => array( 'min' => 0 , 'max' => 100 ),
'indiscore20' => array( 'min' => 0 , 'max' => 20 ),
);
$note = round(($note - $bornes[$score]['min'])*100/($bornes[$score]['max'] - $bornes[$score]['min']));
if($note < 0) $note = 0;
if($note > 100) $note = 100;
$this->view->assign('note', $note);
$this->view->assign('min', $bornes[$score]['min']);
$this->view->assign('max', $bornes[$score]['max']);
}
/**
* IndiScore
*/
public function indiscoreAction()
{
$user = new Scores_Utilisateur();
if(!$user->checkPerm('INDISCORE') && !$user->checkPerm('INDISCOREP'))
$this->forward('perms', 'error');
$this->view->assign('edition', $user->checkModeEdition());
$request = $this->getRequest();
$autrePage = $request->getParam('apage');
//Récupération des informations
if (empty($autrePage)) {
$this->view->headTitle()->prepend('IndiScore');
$this->view->headTitle()->prepend('Siret '.$this->siret);
$plus = false;
if ($user->checkPerm('indiscorep')){
$plus = true;
}
$ref = $request->getParam('ref', '');
$encours = $request->getParam('encours', 0);
$email = $request->getParam('email', '');
$ws = new WsScores();
$infos = $ws->getIndiScore(substr($this->siret, 0,9), 0, 1, $plus, $ref, $encours, $email);
if ($infos === false) $this->forward('soap', 'error');
} else {
$infos = $this->getRequest()->getParam('infos');
}
$this->view->assign('siret', $this->siret);
$this->view->assign('typeScore', $user->getTypeScore());
$this->view->assign('indiscore', $infos);
$this->view->assign('AutrePage', $autrePage);
$this->view->assign('exportObjet', $infos);
$this->view->assign('aviscredit', $user->checkPerm('aviscredit'));
$this->view->assign('surveillance', $user->checkPerm('survscore'));
}
/**
* Rapport de synthese
*/
public function indiscore2Action()
{
$this->view->headScript()->appendFile('/themes/default/scripts/finance.js', 'text/javascript');
$this->view->headTitle()->prepend("Rapport de synthèse");
$this->view->headTitle()->prepend("Siret ".$this->siret);
$user = new Scores_Utilisateur();
if(!$user->checkPerm('INDISCORE2') && !$user->checkPerm('INDISCORE2P'))
$this->forward('perms', 'error');
$siren = substr($this->siret,0,9);
$ws = new WsScores();
$entreprise = new Scores_Session_Entreprise($this->siret, $this->id);
$identite = $ws->getIdentite($siren);
$indiscore = $ws->getIndiScore($siren);
$infos = $ws->getRatios($siren, 'indiscore2'); // @todo : vérifier la page
$score = array();
$tabRatio = array(
'r5' => array('total'=>'r5', 'total_info'=>'% ca', 'op' => 1000, 'titre'=>'CHIFFRE D\'AFFAIRES'),
'r16' => array('total'=>'r5', 'total_info'=>'% ca', 'op' => 1000, 'titre'=>'RESULTAT D\'EXPLOITATION'),
'r7' => array('total'=>'r5', 'total_info'=>'% ca', 'op' => 1000, 'titre'=>'RESULTAT COURANT'),
'r10' => array('total'=>'r5', 'total_info'=>'% ca', 'op' => 1000, 'titre'=>'RESULTAT NET'),
'r18' => array('total'=>'r22', 'total_info'=>'% bilan', 'op' => 1000, 'titre'=>'FONDS PROPRES'),
'r231' => array('total'=>'r22', 'total_info'=>'% bilan', 'op' => 1000, 'titre'=>'FONDS DE ROULEMENT'),
'r232' => array('total'=>'r22', 'total_info'=>'% bilan', 'op' => 1000, 'titre'=>'BESOIN EN FONDS DE ROULEMENT'),
'r249' => array('total'=>'', 'total_info'=>'', 'op' => 1000, 'titre'=>'TRESORERIE NETTE'),
'r20' => array('total'=>'r5', 'total_info'=>'% ca', 'op' => 1000, 'titre'=>'FRAIS FINANCIER'),
);
//Formattage des données
$typeBilan = 'N';
$ratiosData = new Scores_Finance_Ratios_Data($infos);
$nbBilanN = $ratiosData->getNbBilan('N');
$nbBilanC = $ratiosData->getNbBilan('C');
if ($nbBilanN!=0)
{
foreach($tabRatio as $idRatio => $valRatio){
$tabRatio[$idRatio]['comment'] = $ratiosData->wrapComment($idRatio);
}
$this->view->assign('tabRatio', $tabRatio);
$infosAnnee = $ratiosData->getBilansInfo($typeBilan);
$annees = array_keys($infosAnnee);
//On prend les 3 derniers bilans pour l'affichage
$nbMaxBilan = 3;
rsort($annees);
$annees = array_slice($annees, 0, $nbMaxBilan);
sort($annees);
$tabResult = array();
foreach($annees as $annee){
$data = array();
$dataEvol = array();
//Formatter les données
foreach($tabRatio as $idRatio => $valRatio){
$data[$idRatio] = $ratiosData->dRatio($typeBilan, $annee, $idRatio);
$dataTotal[$idRatio] = $ratiosData->dTotal($typeBilan, $annee, $idRatio, $valRatio['total']);
$dInfo[$idRatio] = $valRatio['total_info'];
}
$date = new Zend_Date($annee, 'yyyyMMdd');
$tabResult[] = array(
'dateCloture' => $date->toString('dd/MM/yyyy'),
'duree' => $infosAnnee[$annee]->duree.' Mois',
'ratio' => $data,
'total' => $dataTotal,
'info' => $dInfo,
);
}
$this->view->assign('tabResult', $tabResult);
}
$this->view->assign('tabRatio', $tabRatio);
/*
Correction pour indiscore seule
$indiscore->Siege;
$indiscore->SiretSiege;
$indiscore->NumRC;
*/
$indiscore->SiretSiege = $identite->SiretSiege;
$identite = new IdentiteEntreprise($identite);
//Définition des blocks
$blocks = array(
'Siret',
'SiretSiege',
'NumRC',
'Actif',
'RaisonSociale',
'FormeJuridique',
'DateImmat',
'DateCreaEt',
'Adresse',
'ActiviteEn',
'Naf4',
'OrigineFond',
'TypeExploitation',
'Saisonnalite',
'Capital',
'ChiffreAffaire',
);
$dBlock = array();
foreach ($blocks as $item) {
$display = array(
'label' => method_exists($identite, 'get'.$item.'Label') ? $identite->{'get'.$item.'Label'}() : '',
'texte' => method_exists($identite, 'get'.$item.'Texte') ? $identite->{'get'.$item.'Texte'}() : '',
'titre' => method_exists($identite, 'get'.$item.'Titre') ? $identite->{'get'.$item.'Titre'}() : '',
);
$dBlock[$item] = $display;
}
$this->view->assign('dBlock', $dBlock);
$dateRadiation = '';
if(isset($indiscore->DateRadiation) && $indiscore->DateRadiation!='' && $indiscore->DateRadiation!='0000-00-00') {
$date = new Zend_Date(str_replace('-','',$indiscore->DateRadiation), 'yyyyMMdd');
$this->view->assign('dateRadiation', $date->toString('dd/MM/yyyy'));
}
foreach($indiscore->scores as $name => $sc){
if($name == 'ConanH')
$score[$name] = array($sc, 'Score Conan Holder');
if($name == 'Afdcc2')
$score[$name] = array($sc, 'Score Afdcc 2');
if($name == 'Z')
$score[$name] = array($sc, 'Score Z');
}
$typeScore = $user->getTypeScore();
switch($typeScore) {
case '20':
$maxIndiscore = $typeScore;
$score['Indiscore'] = array($indiscore->Indiscore20, 'IndiScore');
break;
case '100':
default:
$maxIndiscore = empty($typeScore)? '100' : $typeScore;
$score['Indiscore'] = array($indiscore->Indiscore, 'IndiScore');
break;
}
$this->view->assign('siret', $this->siret);
$this->view->assign('id', $this->id);
$this->view->assign('siren', $siren);
$this->view->assign('encours', $indiscore->encours);
$this->view->assign('TendanceIndiscore', $indiscore->TendanceIndiscore);
$this->view->assign('SituationJuridique', $indiscore->SituationJuridique);
$this->view->assign('paiement', $indiscore->infoPaiement);
$this->view->assign('scores', $score);
$this->view->assign('bilanReference', $bilanReference);
}
/**
* Rapport complet
*/
public function indiscore3Action()
{
$this->view->headScript()->appendFile('/themes/default/scripts/evaluation.js', 'text/javascript');
$this->view->headTitle()->prepend("Rapport complet");
$this->view->headTitle()->prepend("Siret ".$this->siret);
$user = new Scores_Utilisateur();
if(!$user->checkPerm('INDISCORE3') && !$user->checkPerm('INDISCORE3P'))
$this->forward('perms', 'error');
// Lien pour le rapport personnalisé
if ($user->getIdClient() == '110' || $user->checkModeEdition()) {
$this->view->assign('customRapport', $this->view->url(array(
'controller'=>'evaluation',
'action'=>'customindiscore3',
'siret'=>$this->siret,
'id'=>$this->id)
));
}
$sessionEntreprise = new Scores_Session_Entreprise($this->siret, $this->id);
$ws = new WsScores();
$siren = substr($this->siret,0,9);
$plus = false;
if ($user->checkPerm('indiscore3p')){
$plus = true;
}
$request = $this->getRequest();
$ref = $request->getParam('ref', '');
$encours = $request->getParam('encours', 0);
$email = $request->getParam('email', '');
$infos = $ws->getRapport($siren, 3, 0, $plus, $ref, $encours, $email);
Zend_Registry::get('firebug')->info($infos);
if ($infos === false) {
$this->forward('soap', 'error');
}
$this->view->assign('Identite', $infos->Identite);
$this->view->assign('Dirigeants', $infos->Dirigeants);
$this->view->assign('Liens', $infos->Liens);
$this->view->assign('Annonces', $infos->Annonces);
$this->view->assign('Ratios', $infos->Ratios);
$this->view->assign('Indiscore', $infos->Indiscore);
require_once 'Scores/RapportComment.php';
$rapportComment = new RapportComment($siren, $this->id,
$infos->Indiscore->tabCommentaires->item,
$infos->Ratios->RatiosInfos,
$infos->Ratios->BilansInfos,
$infos->Ratios->RatiosSecteur,
$infos->Indiscore->tabVariables
);
$this->view->assign('comment',$rapportComment->out());
$this->view->assign('siret', $this->siret);
$this->view->assign('id', $this->id);
$this->view->assign('siren', $siren);
$this->view->assign('raisonSociale', $sessionEntreprise->getRaisonSociale());
$this->view->assign('exportObjet', $infos);
}
/**
* Génération de rapport personnalisé
* @todo : à améliorer
*/
public function customindiscore3Action()
{
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$upload = $request->getParam('upload', null);
$siren = substr($this->siret, 0, 9);
$user = new Scores_Utilisateur();
if (empty($upload)){
$adresse = array();
if ($user->checkModeEdition() || $user->getIdClient()==110) {
$adresse[] = 'Order to Cash';
$adresse[] = '6, rue Euryale Dehaynin ';
$adresse[] = '75019 PARIS';
$color1 = '#DFDB00';
$color2 = '#EFED9A';
$background = "background-image:url('/themes/default/images/customrapport/logo_ordertocash.jpg');background-repeat:no-repeat;background-position:center";
} else {
$adresse[] = 'Financement Entreprise';
$adresse[] = '16 RUE SENAC DE MEILHAN';
$adresse[] = '17000 LA ROCHELLE';
$color1 = '#6699FF';
$color2 = '##66CCFF';
$background = null;
}
$this->view->assign('adresse', $adresse);
$this->view->assign('color1', $color1);
$this->view->assign('color2', $color2);
$this->view->assign('background', $background);
$this->view->assign('siret', $this->siret);
$this->view->assign('id', $this->id);
$sessionEntreprise = new Scores_Session_Entreprise($this->siret, $this->id);
$this->view->assign('rs', $sessionEntreprise->getRaisonSociale());
} else {
$this->_helper->viewRenderer->setNoRender(true);
$couleurh1 = $request->getParam('couleurh1', null);
$couleurh2 = $request->getParam('couleurh2', null);
$texth1 = $request->getParam('texth1', null);
$texth2 = $request->getParam('texth2', null);
$societe_name = $request->getParam('societe_name', null);
$adresse = $request->getParam('adresse', null);
$logo_background = $request->getParam('logo_background', null);
$siren = substr($this->siret, 0, 9);
if ($this->id!=0){
$file = 'evaluation-indiscore3-'.$this->siret.'-'.$this->id.'.html';
} else {
$file = 'evaluation-indiscore3-'.$this->siret.'.html';
}
$c = Zend_Registry::get('config');
$path = $c->profil->path->pages;
if (file_exists($path.'/'.$file))
{
$doc = new DOMDocument();
$doc->preserveWhiteSpace = true;
@$doc->loadHTMLFile($path.'/'.$file);
//Générer style particulier pour le rapport
$style.= 'body {background-color:#ffffff;} ';
$style.= '#footer {display:none;} ';
$style.= '#customRapport {display:none;} ';
$style.= '.notvisible{display:none;} ';
$style.= '#center h1 {background-color:'.$couleurh1.';color:'.$texth1.';border:1px solid;} ';
if($logo_background) {
$style.= '#center {background-image:url(./themes/default/images/customrapport/logo_ordertocash_background.jpg);background-repeat:no-repeat;background-position:center;} ';
}
$style.= '#center h2 {background-color:'.$couleurh2.';color:'.$texth2.'} ';
$style.= 'p#rsynthese {font-size:14px;font-weight:bold;} ';
$styleDom = $doc->createElement('style', $style);
//Ajout information
$contentDom = $doc->createElement('div');
if(!$user->checkModeEdition()) {
$element = $doc->createElement('img');
$element->setAttribute('src', './themes/default/images/customrapport/logo_ordertocash.jpg');
$element->setAttribute('width', '12%');
} else {
$element = $doc->createElement('img');
$element->setAttribute('src', './themes/default/images/customrapport/logo_ordertocash.jpg');
$element->setAttribute('width', '12%');
}
$div = $doc->createElement('div');
$div->setAttribute('style', "clear:both;");
$div->appendChild($element);
$contentDom->appendChild($div);
$i = 0;
foreach($adresse as $item){
$element = $doc->createElement('span', $item);
$contentDom->appendChild($element);
$element = $doc->createElement('br');
$contentDom->appendChild($element);
$i++;
}
$element = $doc->createElement('center', $societe_name.' Enquête Financière');
$element->setAttribute('style', 'font-size:17px');
$contentDom->appendChild($element);
if ($user->checkModeEdition() || $user->getIdClient()==110) {
$element = $doc->createElement('span', "Les équipes d'Order To Cash se tiennent à votre disposition pour vous assister dans l'interprétation de ces données au 01 84 16 50 00 ou par mail à l'adresse suivante : contact@ordertocash.fr");
$element->setAttribute('style', 'text-align:left;');
$contentDom->appendChild($element);
}
$ajout = $doc->createElement('div');
$ajout->appendChild($styleDom);
$ajout->appendChild($contentDom);
//Après <div id="center"> on insére le contenu
$body = $doc->getElementsByTagName('body')->item(0);
$div = $body->getElementsByTagName('div');
foreach($div as $item){
if ($item->hasAttribute('id') && $item->getAttribute('id') == 'center'){
break;
}
}
$item->parentNode->insertBefore($ajout, $item);
$xml = $doc->saveXML();
$c = Zend_Registry::get('config');
$outfile = $c->profil->path->pages.'/p'.$user->getIdClient().'-'.$file;
file_put_contents($outfile, $xml);
//Génération du pdf
$wkhtmltopdf = new Scores_Wkhtml_Pdf();
$wkhtmltopdf->setOptions('footer-right', 'Page [page] sur [toPage]');
$wkhtmltopdf->setOptions('header-right', date('d/m/Y H:i:s'));
$wkhtmltopdf->setOptions('disable-external-links');
$wkhtmltopdf->setOptions('disable-internal-links');
$pdfFile = $wkhtmltopdf->exec($outfile);
if (file_exists($pdfFile)){
echo '<center>Votre fichier est prêt pour être téléchargé !<br />' .
'<a target="_blank" href="'.$this->view->url(
array('controller'=>'fichier',
'action'=>'customrapport',
'fichier'=>basename($pdfFile)), null, true).'">Télécharger</a></center>';
} else {
echo "Erreur lors de la génération du PDF.";
}
} else {
echo "Erreur fichier non présent !";
}
}
}
/**
* Enquete commerciale
* @todo : Vérifier l'enregistrement
*/
public function enquetecAction()
{
$this->view->headScript()->appendFile('/themes/default/scripts/enquetec.js', 'text/javascript');
$this->view->headTitle()->prepend("Enquete commerciale");
$this->view->headTitle()->prepend("Siret ".$this->siret);
//isset($_REQUEST['pays']) ? $pays=$_REQUEST['pays'] : $pays='' ;
$commandeEnquete = false;
$request = $this->getRequest();
if ($request->isPost()){
$InfoUser = $request->getParam('InfoUser');
$InfoEnq = $request->getParam('InfoEnq');
//Affichage de la demande
//Vérification des informations
$formError = false;
$fields = array();
//Info utilisateur obligatoire :
if($InfoUser['Identite']==''){ $fields[] ='Votre Identite'; $formError=true;}
if($InfoUser['Tel']==''){ $fields[] ='Votre Téléphone'; $formError=true;}
if($InfoUser['Email']==''){ $fields[] ='Votre Email'; $formError=true;}
//Info entreprise obligatoire :
if( isset($InfoEnq['Type']) && $InfoEnq['Type']==''){ $fields[] ='Choix du type d\'enquête'; $formError=true;}
if($InfoEnq['PrecisionsChoix']=='1'){
if($InfoEnq['Precisions']['Motif']==''){ $fields[] ='Mofif de la demande'; $formError=true;}
}elseif($InfoEnq['PrecisionsChoix']=='3' || $InfoEnq['PrecisionsChoix']=='4'){
if($InfoEnq['Precisions']['MontantCA']==''){ $fields[] ='Précisions de la demande'; $formError=true;}
}elseif($InfoEnq['PrecisionsChoix']=='5'){
if($InfoEnq['Precisions']['Autre']==''){ $fields[] ='Précisions de la demande'; $formError=true;}
}
if(isset($InfoEnq['ImpayeesChoix']) && $InfoEnq['ImpayeesChoix']=='oui' ){
if($InfoEnq['Impayees']['Montant']=='' || $InfoEnq['Impayees']['Nombre']=='' || $InfoEnq['Impayees']['Date']==''){ $fields[] ='Précisions sur les impayées'; $formError=true;}
}
if(isset($InfoEnq['RetardPaiementChoix']) && $InfoEnq['RetardPaiementChoix']=='oui' ){
if($InfoEnq['RetardPaiement']['Montant']=='' || $InfoEnq['Nombre']=='' || $InfoEnq['RetardPaiement']['Date']==''){ $fields[] ='Précisions sur le retarde de paiement'; $formError=true;}
}
if(isset($_REQUEST['InfoEnq']['LitigeChoix']) && $_REQUEST['InfoEnq']['LitigeChoix']=='oui' ){
if($_REQUEST['InfoEnq']['Litige']['Precisions']=='' || $_REQUEST['InfoEnq']['Litige']['Precisions']==''){ $fields[] ='Précisions sur le litige'; $formError=TRUE;}
}
if ($formError==true){
$message = '<font color="red">';
$message.= 'Veuillez remplir les champs suivants : ';
$message.= join(', ', $fields);
$message.= '</font>';
}else{
$InfoDemande = $InfoUser;
$siren = $InfoEnq['Siren'];
unset($InfoEnq['Siren']);
//Suppression et assigation des valeurs pour le webservice
if($InfoEnq['PrecisionsChoix'] = 1){
$InfoEnq['Precisions']['Type'] = "Enquête sur un client (contrôle crédit)";
unset($InfoEnq['PrecisionsChoix']);
}elseif($InfoEnq['PrecisionsChoix']==2){
$InfoEnq['Precisions']['Type'] = "Enquête sur un prospect (ouverture de compte)";
unset($InfoEnq['PrecisionsChoix']);
}elseif($InfoEnq['PrecisionsChoix']==3){
$InfoEnq['Precisions']['Type'] = "Enquête sur un fournisseur stratégique";
unset($InfoEnq['PrecisionsChoix']);
}elseif($InfoEnq['PrecisionsChoix']==4){
$InfoEnq['Precisions']['Type'] = "Enquête sur un fournisseur non stratégique";
unset($InfoEnq['PrecisionsChoix']);
}elseif($InfoEnq['PrecisionsChoix']==5){
$InfoEnq['Precisions']['Type'] = "Autre type d'enquête (Précisez...)";
unset($InfoEnq['PrecisionsChoix']);
}
$ws = new WsScore();
$result = $ws->commandeEnquete($siren, $InfoEnq, $InfoDemande);
if ($result === false) {
$this->_forward('soap', 'error');
} else {
$this->view->assign('annee', substr($result->dateCommande,0,4));
$this->view->assign('mois', substr($result->dateCommande,4,2));
$this->view->assign('jour', substr($result->dateCommande,6,2));
$this->view->assign('heure', substr($result->dateCommande,8,2));
$this->view->assign('minutes', substr($result->dateCommande,10,2));
$this->view->assign('ref', substr($result->refCmde,1));
$this->view->assign('siren', $result->siren);
$commandeEnquete = true;
}
$this->view->assign('commandeEnquete', $commandeEnquete);
}
$this->view->assign('formError', $formError);
$this->view->assign('message', $message);
$this->view->assign('InfoUser', $InfoUser);
$this->view->assign('InfoEnq', $InfoEnq);
}
if ($commandeEnquete == false) {
$ws = new WsScores();
$infosEntrep = $ws->getIdentite($this->siret, $this->id);
$this->view->assign('Etab', $infosEntrep);
$user = new Scores_Utilisateur();
$this->view->assign('user', $user);
}
$this->view->assign('commandeEnquete', $commandeEnquete);
}
/**
* Demande d'avis de credit
*/
public function aviscreditAction()
{
$this->view->headTitle()->prepend("Avis de crédit");
$this->view->headTitle()->prepend("Siret ".$this->siret);
$commande = false;
$request = $this->getRequest();
//Reception des données du formulaire
if ($request->isPost())
{
$InfoUser = $request->getParam('InfoUser');
$InfoEnq = $request->getParam('InfoEnq');
$formError = false;
$fields = array();
//Info utilisateur obligatoire :
if($InfoUser['Identite']==''){
$fields[] ='Votre Identite'; $formError=true;
}
if($InfoUser['Tel']==''){
$fields[] ='Votre Téléphone'; $formError=true;
}
if($InfoUser['Email']==''){
$fields[] ='Votre Email'; $formError=true;
}
//Info entreprise obligatoire :
if( isset($InfoEnq['Type']) && $InfoEnq['Type']==''){
$fields[] ='Choix du type d\'enquête'; $formError=true;
}
if(isset($InfoEnq['ImpayeesChoix']) && $InfoEnq['ImpayeesChoix']=='oui' ){
if($InfoEnq['Impayees']['Montant']=='' || $InfoEnq['Impayees']['Nombre']=='' || $InfoEnq['Impayees']['Date']==''){
$fields[] ='Précisions sur les impayées'; $formError=true;
}
}
if(isset($InfoEnq['RetardPaiementChoix']) && $InfoEnq['RetardPaiementChoix']=='oui' ){
if($InfoEnq['RetardPaiement']['Montant']=='' || $InfoEnq['Nombre']=='' || $InfoEnq['RetardPaiement']['Date']==''){
$fields[] ='Précisions sur le retard de paiement'; $formError=true;
}
}
if(isset($_REQUEST['InfoEnq']['LitigeChoix']) && $_REQUEST['InfoEnq']['LitigeChoix']=='oui' ){
if($_REQUEST['InfoEnq']['Litige']['Precisions']=='' || $_REQUEST['InfoEnq']['Litige']['Precisions']==''){
$fields[] ='Précisions sur le litige'; $formError=TRUE;
}
}
//Envoi du mail formatté
if ( $formError==true )
{
$message = '<font color="red">';
$message.= 'Veuillez remplir les champs suivants : ';
$message.= join(', ', $fields);
$message.= '</font>';
$this->view->assign('message', $message);
}
else
{
$sujet = "Demande d'avis personnalisé";
$texte = "<pre>".print_r($InfoUser, 1)."</pre>".
"<pre>".print_r($InfoEnq, 1)."</pre>";
$mail = new Scores_Mail();
$mail->setFrom('production');
$mail->addToKey('support');
$mail->setSubject($sujet);
$mail->setBodyHtml($texte);
if ($mail->send()) {
$commande = true;
}
}
$this->view->assign('commande', $commande);
$this->view->assign('formError', $formError);
$this->view->assign('message', $message);
$this->view->assign('InfoUser', $InfoUser);
$this->view->assign('InfoEnq', $InfoEnq);
$this->view->assign('siren', substr($this->siret, 0,9));
}
//Affichage du formulaire
if ($commande == false) {
$ws = new WsScores();
$infosEntrep = $ws->getIdentite($this->siret, $this->id);
$this->view->assign('Etab', $infosEntrep);
$user = new Scores_Utilisateur();
$this->view->assign('user', $user);
}
}
/**
* Affichage des informations de scoring creditsafe
*/
public function scoringAction()
{
$this->view->headTitle()->prepend("Scoring Credit Safe");
$this->view->headTitle()->prepend("Siret ".$this->siret);
$user = new Scores_Utilisateur();
if(!$user->checkModeEdition() or !$user->checkPerm('SCORECSF'))
$this->render('error/perms', null, 'error');
define('CREDITSAFE_WS_URL', 'https://www.creditsafe.fr/getdata/service/CSFRServices.asmx');
define('CREDITSAFE_WS_URI', 'https://www.creditsafe.fr/getdata/service/');
define('CREDITSAFE_WS_USER', 'scores_decisions');
define('CREDITSAFE_WS_PASS', 'yoann1306');
define('CREDITSAFE_WS_REF', 'ref');
/**
* L'Url du WSDL est bonne simplament le formatage des données a changés, il faut respecter les données !
* comparer les exemples donnés.
*
*/
$req='<xmlrequest>'.
'<header>'.
'<username>'.CREDITSAFE_WS_USER.'</username>'.
'<password>'.CREDITSAFE_WS_PASS.'</password>'.
//'<operation>getcompanyinformation</operation>'.
'<operation>getratinglimit</operation>'.
'<country>FR</country>'.
'<language>FR</language>'.
'<chargereference>'.CREDITSAFE_WS_REF.'</chargereference>'.
'</header>'.
'<body>'.
//'<package>standard</package>'.
'<package>ratinglimit</package>'.
"<companynumber>".$this->siret."</companynumber>".
'</body>'.
'</xmlrequest>';
$date = date('Ymd');
$url = 'https://www.creditsafe.fr/getdata/service/CSFRServices.asmx/GetData?RequestXmlStr='.$req;
$file = APPLICATION_PATH.'/../../data/creditsafe/'.$this->siret.'.xml';
try {
$client = new Zend_Http_Client($url);
$client->setStream();
$response = $client->request('GET');
if ( $response->isSuccessful() ) {
$xml = html_entity_decode($response->getBody(), ENT_QUOTES, 'UTF-8');
$dom_object = new DOMDocument();
$ws = new WsScores();
if(!file_exists($file)) {
file_put_contents($file, $xml); // Ne pas oublier de metre les bons droits sur le dossier.
$ws->setLog('scorecsf', $this->siret);
} else {
$ws->setLog('scorecsf', $this->siret, 0, 'local');
}
$dom_object->load($file);
$companyname = $dom_object->getElementsByTagName('companyname')->item(0)->nodeValue;
$rating = $dom_object->getElementsByTagName('rating')->item(0)->nodeValue;
$ratingdesc1 = str_replace('?',"'",$dom_object->getElementsByTagName('ratingdesc1')->item(0)->nodeValue);
$ratingdesc2 = str_replace('?',"'",$dom_object->getElementsByTagName('ratingdesc2')->item(0)->nodeValue);
$creditlimit = $dom_object->getElementsByTagName('creditlimit')->item(0)->nodeValue;
$libelle = '';
if (strtoupper($creditlimit)<>strtolower($creditlimit) || $creditlimit=='')
$strCreditlimit = $creditlimit;
else
$strCreditlimit = number_format($creditlimit,null,null,' '). ' &euro;';
if ($rating >= 40){
$fontColor = 'green';
$imgFeux = '<img src="/themes/default/images/scoring/feux_vert.png"/>';
if ($rating>=71) $libelle='Très bonne cote de crédit/solvabilité';
elseif ($rating>=51) $libelle='Bonne cote de crédit/solvabilité';
else $libelle = 'Solvable';
} elseif ($rating >= 20) {
$fontColor = 'yellow';//#f2be2c';
$imgFeux = '<img src="/themes/default/images/scoring/feux_orange.png"/>';
$libelle = 'Précautions recommandées';
} elseif (strtoupper($rating) <> strtolower($rating)) {
$fontColor = 'black';
$imgFeux='&nbsp;';
}
elseif ($rating == '') {
$fontColor = 'black';
$imgFeux = '&nbsp;';
}
else {
$fontColor = 'red';
$imgFeux = '<img src="/themes/default/images/scoring/feux_rouge.png"/>';
if ($rating == 0) $libelle='Entreprise en situation de défaillance et ayant un très fort risque de radiation';
else $libelle = 'Avertissement - Crédit à votre discrétion';
}
/** Assigne les valeur a la vue **/
if (!empty($companyname)) {
$this->view->raisonSociale = $companyname;
} else {
$session = new Scores_Session_Entreprise($this->siret, $this->id);
$this->view->raisonSociale = $session->getRaisonSociale();
}
$this->view->emailCommande = $user->getEmail();
$this->view->id = $this->id;
$this->view->siren = substr($this->siret, 0,9);
$this->view->imgFeux = $imgFeux;
$this->view->fontColor = $fontColor;
$this->view->rating = $rating;
$this->view->libelle = $libelle;
$this->view->strCreditlimit = $strCreditlimit;
}
} catch (Zend_Http_Client_Exception $e) {}
}
/**
* Commande de scoring partenaire creditsafe
*/
public function scoringcommandeAction()
{
if ($this->getRequest()->isPost()){
$request = $this->getRequest();
$email = $request->getParam('email', '');
$siren = $request->getParam('siren', '');
if (preg_match('#^[\w.-]+@[\w.-]+\.[a-zA-Z]{2,5}$#',$email)) {
$message = 'Entreprise mise sous surveillance scoring partenaire !';
$mail = new Scores_Mail();
$mail->setSubject("Demande de surveillance score CreditSafe pour $siren à ".$email);
$user = new Scores_Utilisateur();
$login = $user->getLogin();
$texte = 'REQUEST='.EOL.print_r($request->getParams(),true).EOL.
'Utilisateur='.$login;
$mail->setBodyTexte($texte);
$mail->setFrom('contact');
$mail->addToKey('contact');
$mail->send();
$c = Zend_Registry::get('config');
$path = $c->profil->path->data.'/log';
$fp=fopen($path.'/surveillance_scf.csv', 'a');
fwrite($fp, date('Y/m/d H:i:s').";$siren;".$email.';'.$login.';'.$user->getEmail().';'.$user->getIpAddress()."\n");
fclose($fp);
} else {
$message = "ERREUR : Veuillez saisir une adresse email valide pour la mise sous surveillance";
}
$this->view->assign('message', $message);
}
}
public function valorisationAction()
{
$this->view->headTitle()->prepend("Valorisation");
$this->view->headTitle()->prepend("Siret ".$this->siret);
$user = new Scores_Utilisateur();
if(!$user->checkPerm('INDISCORE3') && !$user->checkPerm('INDISCORE3P'))
$this->_forward('perms', 'error');
$sessionEntreprise = new Scores_Session_Entreprise($this->siret, $this->id);
$ws = new WsScores();
$siren = substr($this->siret,0,9);
$request = $this->getRequest();
$ref = $request->getParam('ref', '');
$encours = $request->getParam('encours', 0);
$email = $request->getParam('email', '');
$infos = $ws->getEntrepriseValo($siren);
require_once 'Scores/RapportComment.php';
$rapportComment = new RapportComment($siren, $this->id,
$infos->Indiscore->tabCommentaires->item,
$infos->RatiosInfos,
$infos->RatiosBilansInfos,
$infos->RatiosSecteur,
$infos->Indiscore->tabVariables
);
$this->view->assign('comment',$rapportComment->out());
$this->view->assign('siret', $this->siret);
$this->view->assign('id', $this->id);
$this->view->assign('siren', $siren);
$this->view->assign('raisonSociale', $sessionEntreprise->getRaisonSociale());
$this->view->assign('exportObjet', $infos);
}
}

View File

@ -0,0 +1,488 @@
<?php
class FichierController extends Zend_Controller_Action
{
public function init()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
}
public function indexAction(){}
/**
* Gestion du chargement des logos
*/
public function logoAction()
{
$file = $this->getRequest()->getParam('fichier');
$explode = explode('.', $file);
switch ($explode[1]) {
case 'png' : $content_type = 'image/png'; break;
case 'gif' : $content_type = 'image/gif'; break;
case 'jpeg':
case 'jpg' : $content_type = 'image/jpeg'; break;
}
$c = Zend_Registry::get('config');
$path = realpath($c->profil->path->data).'/logos/';
if ( file_exists($path.$file) ) {
header('Content-Transfer-Encoding: none');
header('Content-type: ' . $content_type.'');
header('Content-Length: ' . filesize($path.$file));
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
header('Content-Disposition: filename="' . basename($path.$file) . '"');
header('Cache-Control: private, max-age=0, must-revalidate');
header('Pragma: public');
ini_set('zlib.output_compression', '0');
echo file_get_contents($path.$file);
} else {
echo 'Impossible de charger le logo.';
}
}
/**
* Gestion du chargement des images du cache
*/
public function imgcacheAction()
{
$content_type = 'image/png';
$c = Zend_Registry::get('config');
$path = $c->profil->path->pages.'/imgcache/';
$file = $this->getRequest()->getParam('fichier');
if ( file_exists($path.$file) ) {
header('Content-Transfer-Encoding: none');
header('Content-type: ' . $content_type.'');
header('Content-Length: ' . filesize($path.$file));
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
header('Content-Disposition: filename="' . basename($path.$file) . '"');
header('Cache-Control: private, max-age=0, must-revalidate');
header('Pragma: public');
ini_set('zlib.output_compression', '0');
echo file_get_contents($path.$file);
} else {
echo 'Impossible de charger le fichier.';
}
}
/**
* Gestion du chargement des fichiers des marques
*/
public function marqueAction()
{
$content_type = 'application/pdf';
$c = Zend_Registry::get('config');
$path = realpath($c->profil->path->data).'/marques/';
$file = $this->getRequest()->getParam('fichier');
if(file_exists($path.$file) && filesize($path.$file)>0) {
header('Content-Transfer-Encoding: none');
header('Content-type: ' . $content_type.'');
header('Content-Length: ' . filesize($path.$file));
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
header('Content-Disposition: filename="' . basename($path.$file) . '"');
header('Cache-Control: private, max-age=0, must-revalidate');
header('Pragma: public');
ini_set('zlib.output_compression', '0');
echo file_get_contents($path.$file);
} else {
echo "Erreur lors de l'affichage du fichier.";
}
}
/**
* Gestion des fichiers Actes et Bilans
*/
public function pdfAction()
{
$file = $this->getRequest()->getParam('fichier');
$content_type = 'application/pdf';
$c = Zend_Registry::get('config');
//bilan
if (preg_match('/^bilan-[0-9]{9}-(consolides|sociaux)-([0-9]{8})/', $file, $matches)) {
$path = realpath($c->profil->path->data).
'/greffes/bilans/'.$matches[1].'/'.substr($matches[2],0,4).'/';
}
//acte
else if (preg_match('/^acte-[0-9]{9}-(.*)-([0-9]{8})-.*-.*-.*-.*-.*-.*$/', $file, $matches)) {
$type = $matches[1];
$date = $matches[2];
$annee = substr($date,0,4);
$mois = substr($date,4,2);
$path = realpath($c->profil->path->data).'/greffes/actes/'.$annee.'/'.$mois.'/';
}
Zend_Registry::get('firebug')->info($path);
if(file_exists($path.$file) && filesize($path.$file)>0) {
header('Content-Transfer-Encoding: none');
header('Content-type: ' . $content_type.'');
header('Content-Length: ' . filesize($path.$file));
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
header('Content-Disposition: filename="' . basename($path.$file) . '"');
header('Cache-Control: private, max-age=0, must-revalidate');
header('Pragma: public');
ini_set('zlib.output_compression', '0');
echo file_get_contents($path.$file);
} else {
echo "Erreur lors de l'affichage du fichier.";
}
}
/**
* Gestion des fichiers Actes et Bilans
*/
public function pdfassociationAction()
{
$content_type = 'application/pdf';
$c = Zend_Registry::get('config');
$path = realpath($c->profil->path->data).'/association/';
$file = $this->getRequest()->getParam('fichier');
$type = $this->getRequest()->getParam('type');
$file = $type.'/'.$file;
if(file_exists($path.$file) && filesize($path.$file)>0) {
header('Content-Transfer-Encoding: none');
header('Content-type: ' . $content_type.'');
header('Content-Length: ' . filesize($path.$file));
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
header('Content-Disposition: filename="' . basename($path.$file) . '"');
header('Cache-Control: private, max-age=0, must-revalidate');
header('Pragma: public');
ini_set('zlib.output_compression', '0');
echo file_get_contents($path.$file);
} else {
echo "Erreur lors de l'affichage du fichier.";
}
}
/**
* Gestion des liasses au formats excel
*/
public function liasseAction()
{
$content_type = 'application/vnd.ms-excel';
$c = Zend_Registry::get('config');
$path = realpath($c->profil->path->files).'/';
$file = $this->getRequest()->getParam('fichier');
//Envoi du fichier sur la sortie standard
if ( file_exists($path.$file) ) {
header('Content-Transfer-Encoding: none');
header('Content-type: ' . $content_type.'');
header('Content-Length: ' . filesize($path.$file));
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
header('Content-Disposition: filename="' . basename($path.$file) . '"');
header('Cache-Control: private, max-age=0, must-revalidate');
header('Pragma: public');
ini_set('zlib.output_compression', '0');
echo file_get_contents($path.$file);
} else {
echo 'Impossible de charger le fichier.';
}
}
/**
* Gestion des log de consommation
*/
public function consommationAction()
{
$file = $this->getRequest()->getParam('fichier');
$content_type = 'application/csv-tab-delimited-table';
$c = Zend_Registry::get('config');
$path = realpath($c->profil->path->files).'/';
//Envoi du fichier sur la sortie standard
if ( file_exists($path.$file) ) {
header('Content-Transfer-Encoding: none');
header('Content-type: ' . $content_type.'');
header('Content-Length: ' . filesize($path.$file));
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
header('Content-Disposition: filename="' . basename($path.$file) . '"');
header('Cache-Control: private, max-age=0, must-revalidate');
header('Pragma: public');
ini_set('zlib.output_compression', '0');
echo file_get_contents($path.$file);
} else {
echo 'Impossible de charger le fichier.';
}
}
/**
* Export du portefeuille au format CSV
*/
public function portefeuilleAction()
{
$file = $this->getRequest()->getParam('fichier');
$content_type = 'application/csv-tab-delimited-table';
$c = Zend_Registry::get('config');
$path = realpath($c->profil->path->files).'/';
//Envoi du fichier sur la sortie standard
if ( file_exists($path.$file) ) {
header('Content-Transfer-Encoding: none');
header('Content-type: ' . $content_type.'');
header('Content-Length: ' . filesize($path.$file));
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
header('Content-Disposition: filename="' . basename($path.$file) . '"');
header('Cache-Control: private, max-age=0, must-revalidate');
header('Pragma: public');
ini_set('zlib.output_compression', '0');
echo file_get_contents($path.$file);
} else {
echo 'Impossible de charger le fichier.';
}
}
/**
* Export de la liste des surveillances au format CSV
*/
public function surveillanceAction()
{
$file = $this->getRequest()->getParam('fichier');
$content_type = 'application/csv-tab-delimited-table';
$c = Zend_Registry::get('config');
$path = realpath($c->profil->path->files).'/';
//Envoi du fichier sur la sortie standard
if ( file_exists($path.$file) ) {
header('Content-Transfer-Encoding: none');
header('Content-type: ' . $content_type.'');
header('Content-Length: ' . filesize($path.$file));
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
header('Content-Disposition: filename="' . basename($path.$file) . '"');
header('Cache-Control: private, max-age=0, must-revalidate');
header('Pragma: public');
ini_set('zlib.output_compression', '0');
echo file_get_contents($path.$file);
} else {
echo 'Impossible de charger le fichier.';
}
}
/**
* Gestion des fichiers bilan saisie par les clients
*/
public function bilanclientAction()
{
$c = Zend_Registry::get('config');
$path = realpath($c->profil->path->data).'/bilanclient/';
$file = $this->getRequest()->getParam('fichier');
$explode = explode('.', $file);
switch ($explode[1]) {
case 'pdf' : $content_type = 'application/pdf'; break;
case 'tiff' : $content_type = 'image/tiff'; break;
}
if ( file_exists($path.$file) && filesize($path.$file)>0 ) {
header('Content-Transfer-Encoding: none');
header('Content-type: ' . $content_type.'');
header('Content-Length: ' . filesize($path.$file));
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
header('Content-Disposition: filename="' . basename($path.$file) . '"');
header('Cache-Control: private, max-age=0, must-revalidate');
header('Pragma: public');
ini_set('zlib.output_compression', '0');
echo file_get_contents($path.$file);
} else {
echo "Erreur lors de l'affichage du fichier.";
}
}
/**
* Gestion des kbis
*/
public function kbisAction()
{
$content_type = 'application/pdf';
$file = $this->getRequest()->getParam('fichier');
$c = Zend_Registry::get('config');
$path = realpath($c->profil->path->files).'/';
if ( file_exists($path.$file) && filesize($path.$file)>0 ) {
header('Content-Transfer-Encoding: none');
header('Content-type: ' . $content_type.'');
header('Content-Length: ' . filesize($path.$file));
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
header('Content-Disposition: filename="' . basename($path.$file) . '"');
header('Cache-Control: private, max-age=0, must-revalidate');
header('Pragma: public');
ini_set('zlib.output_compression', '0');
echo file_get_contents($path.$file);
} else {
echo "Erreur lors de l'affichage du fichier.";
}
}
/**
* Gestion des rapports personnalisés
*/
public function customrapportAction()
{
$content_type = 'application/pdf';
$c = Zend_Registry::get('config');
$path = realpath($c->profil->path->pages).'/';
$file = $this->getRequest()->getParam('fichier');
$output_file = $directory.'/'.$file;
if ( file_exists($path.$file) && filesize($path.$file)>0 ) {
header('Content-Transfer-Encoding: none');
header('Content-type: ' . $content_type.'');
header('Content-Length: ' . filesize($path.$file));
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
header('Content-Disposition: filename="' . basename($path.$file) . '"');
header('Cache-Control: private, max-age=0, must-revalidate');
header('Pragma: public');
ini_set('zlib.output_compression', '0');
echo file_get_contents($path.$file);
} else {
echo "Impossible de charger le fichier.";
}
}
/**
* Gestion bodacc au format PDF
*/
public function bodaccAction()
{
$content_type = 'application/pdf';
$c = Zend_Registry::get('config');
$path = realpath($c->profil->path->data).'/bodacc/';
$file = $this->getRequest()->getParam('fichier');
//Construire le chemin du dossier
preg_match('/BODACC_(A|B|C)_([0-9]{4})_(.*)\.pdf/', $file, $matches);
$path.= $matches[1].'/'.$matches[2].'/';
if ( file_exists($path.$file) && filesize($path.$file)>0 ) {
header('Content-Transfer-Encoding: none');
header('Content-type: ' . $content_type.'');
header('Content-Length: ' . filesize($path.$file));
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
header('Content-Disposition: filename="' . basename($path.$file) . '"');
header('Cache-Control: private, max-age=0, must-revalidate');
header('Pragma: public');
ini_set('zlib.output_compression', '0');
echo file_get_contents($path.$file);
} else {
echo "Impossible de charger le fichier.";
}
}
/**
* Gestion des fichiers PDF des nouveautés
*/
public function newAction()
{
$content_type = 'application/pdf';
$c = Zend_Registry::get('config');
$path = realpath($c->profil->path->data).'/nouveautes/';
$file = $this->getRequest()->getParam('fichier');
if ( file_exists($path.$file) && filesize($path.$file)>0 ) {
header('Content-Transfer-Encoding: none');
header('Content-type: ' . $content_type.'');
header('Content-Length: ' . filesize($path.$file));
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
header('Content-Disposition: filename="' . basename($path.$file) . '"');
header('Cache-Control: private, max-age=0, must-revalidate');
header('Pragma: public');
ini_set('zlib.output_compression', '0');
echo file_get_contents($path.$file);
} else {
echo "Impossible de charger le fichier.";
}
}
/**
* Bodacc history file
*/
public function histopdfAction()
{
$content_type = 'application/pdf';
$file = $this->getRequest()->getParam('fichier');
$c = Zend_Registry::get('config');
$path = realpath($c->profil->path->files).'/';
if ( file_exists($path.$file) && filesize($path.$file)>0 ) {
header('Content-Transfer-Encoding: none');
header('Content-type: ' . $content_type.'');
header('Content-Length: ' . filesize($path.$file));
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
header('Content-Disposition: filename="' . basename($path.$file) . '"');
header('Cache-Control: private, max-age=0, must-revalidate');
header('Pragma: public');
ini_set('zlib.output_compression', '0');
echo file_get_contents($path.$file);
} else {
echo "Impossible de charger le fichier.";
}
}
/**
* Internal files for groupes
*/
public function groupesAction()
{
$content_type = 'application/pdf';
$file = $this->getRequest()->getParam('fichier');
$c = Zend_Registry::get('config');
$path = realpath($c->profil->path->data).'/groupes/';
if ( file_exists($path.$file) && filesize($path.$file)>0 ) {
header('Content-Transfer-Encoding: none');
header('Content-type: ' . $content_type.'');
header('Content-Length: ' . filesize($path.$file));
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
header('Content-Disposition: filename="' . basename($path.$file) . '"');
header('Cache-Control: private, max-age=0, must-revalidate');
header('Pragma: public');
ini_set('zlib.output_compression', '0');
echo file_get_contents($path.$file);
} else {
echo "Impossible de charger le fichier.";
}
}
/**
* Bilan : Association
*/
public function greffeAction()
{
$content_type = 'application/pdf';
$file = $this->getRequest()->getParam('fichier');
$c = Zend_Registry::get('config');
$path = $c->profil->path->files.'/';
Zend_Registry::get('firebug')->info($path.$file);
if ( file_exists($path.$file) && filesize($path.$file)>0 ) {
header('Content-Transfer-Encoding: none');
header('Content-type: ' . $content_type.'');
header('Content-Length: ' . filesize($path.$file));
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
header('Content-Disposition: filename="' . basename($path.$file) . '"');
header('Cache-Control: private, max-age=0, must-revalidate');
header('Pragma: public');
ini_set('zlib.output_compression', '0');
echo file_get_contents($path.$file);
} else {
echo "Impossible de charger le fichier.";
}
}
/**
* Façade d'immeuble
*/
public function streetviewAction()
{
$file = $this->getRequest()->getParam('fichier');
$explode = explode('.', $file);
switch ($explode[1]) {
case 'png' : $content_type = 'image/png'; break;
case 'gif' : $content_type = 'image/gif'; break;
case 'jpeg':
case 'jpg' : $content_type = 'image/jpeg'; break;
}
$c = Zend_Registry::get('config');
$path = realpath($c->profil->path->data).'/google/streetview/';
if ( file_exists($path.$file) ) {
header('Content-Transfer-Encoding: none');
header('Content-type: ' . $content_type.'');
header('Content-Length: ' . filesize($path.$file));
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
header('Content-Disposition: filename="' . basename($path.$file) . '"');
header('Cache-Control: private, max-age=0, must-revalidate');
header('Pragma: public');
ini_set('zlib.output_compression', '0');
echo file_get_contents($path.$file);
} else {
echo file_get_contents(APPLICATION_PATH.'/../public/themes/default/images/1x1.png');
}
}
}

View File

@ -1,32 +1,18 @@
<?php
class FinanceController extends Zend_Controller_Action
{
protected $theme;
protected $siret = null;
protected $id = 0;
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init()
{
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme
$this->theme = Zend_Registry::get('theme');
require_once 'Scores/WsScores.php';
$request = $this->getRequest();
$this->siret = $request->getParam('siret');
$this->id = $request->getParam('id', 0);
$this->view->headScript()->appendFile($this->theme->pathScript.'/finance.js', 'text/javascript');
$this->view->headScript()->appendFile('/themes/default/scripts/finance.js', 'text/javascript');
}
public function indexAction()
@ -182,10 +168,10 @@ class FinanceController extends Zend_Controller_Action
$request = $this->getRequest();
$ratio = $request->getParam('ratio');
$c = Zend_Registry::get('config');
$path = $c->profil->path->shared . '/pages/imgcache/';
$path = $c->profil->path->pages . '/imgcache/';
$file = 'syntheseEvol-'.$this->siret.'-'.$this->id.'-'.$ratio.'.png';
if (file_exists($path.$file)) {
echo '<img src="/file/image/cache/q/'.$file.'" />';
echo '<img src="/fichier/imgcache/'.$file.'" />';
} else {
echo "Erreur de génération du graphique";
}
@ -201,10 +187,10 @@ class FinanceController extends Zend_Controller_Action
$request = $this->getRequest();
$typeBilan = $request->getParam('typeBilan');
$c = Zend_Registry::get('config');
$path = $c->profil->path->shared . '/pages/imgcache/';
$path = $c->profil->path->pages . '/imgcache/';
$file = 'synthese-linecompare-'.$this->siret.'-'.$this->id.'-'.$typeBilan.'.png';
if (file_exists($path.$file)) {
echo '<img src="/file/image/cache/q/'.$file.'" />';
echo '<img src="/fichier/imgcache/'.$file.'" />';
} else {
echo "Erreur de génération du graphique";
}
@ -443,8 +429,10 @@ class FinanceController extends Zend_Controller_Action
$typeBilan = $request->getParam('typeBilan');
$dateCloture = $request->getParam('dateCloture');
Zend_Registry::get('firebug')->info($request->getParams());
$c = Zend_Registry::get('config');
$path = $c->profil->path->shared . '/pages/imgcache/';
$path = $c->profil->path->pages . '/imgcache/';
switch($type){
case 'actif':
$file = 'bilansgraphactif-'.$this->siret.'-'.$this->id.'-'.$typeBilan.$dateCloture.'.png';
@ -457,7 +445,7 @@ class FinanceController extends Zend_Controller_Action
break;
}
if (file_exists($path.$file)) {
echo '<img src="/file/image/cache/q/'.$file.'" />';
echo '<img src="/fichier/imgcache/'.$file.'" />';
} else {
echo "Erreur de génération du graphique";
}
@ -640,10 +628,10 @@ class FinanceController extends Zend_Controller_Action
$request = $this->getRequest();
$ratio = $request->getParam('ratio');
$c = Zend_Registry::get('config');
$path = $c->profil->path->shared . '/pages/imgcache/';
$path = $c->profil->path->pages . '/imgcache/';
$file = 'ratiosgraph-'.$this->siret.'-'.$this->id.'-'.$ratio.'.png';
if (file_exists($path.$file)) {
echo '<img src="/file/image/cache/q/'.$file.'" />';
echo '<img src="/fichier/imgcache/'.$file.'" />';
} else {
echo "Erreur de génération du graphique";
}
@ -687,7 +675,7 @@ class FinanceController extends Zend_Controller_Action
$data[$element->id] = $element->val;
$c = Zend_Registry::get('config');
$path = $c->profil->path->shared . '/files/';
$path = $c->profil->path->files . '/';
$file = 'liasse-'.substr($this->siret, 0, 9).'-'.$this->id.'-'.$type.$date.'.xls';
$liasse = new Scores_Finance_Liasse_XLS($model);
@ -702,8 +690,11 @@ class FinanceController extends Zend_Controller_Action
}
/**
* Commande de la saisie de bilan
* Enregistrement des caractéristiques, obtention référence commande puis upload fichier
* Envoi de bilan pour saisie
* L'envoi se déroule en plusieurs étapes
* 1 - Saisie des informations
* 2 - Validation du formulaire
* 3 -
*/
public function saisiebilanAction()
{
@ -713,76 +704,26 @@ class FinanceController extends Zend_Controller_Action
$user = new Scores_Utilisateur();
$params = $request->getParams();
$bilanSaisie = new Application_Model_BilanSaisie();
$this->view->assign('email', $user->getEmail());
$this->view->assign('siren', $params['siren']);
Zend_Registry::get('firebug')->info($params);
if ($request->isPost())
{
//Validation du formulaire
$valideField = true;
if ( empty($params['siren']))
{
$valideField = false;
}
if ( empty($params['dateCloture'])
&& !preg_match('/^[0-9]{2}\/[0-9]{2}\/[0-9]{4}/', $params['dateCloture'])
&& !checkdate(substr($params['dateCloture'],3,2),substr($params['dateCloture'],0,2),substr($params['dateCloture'],6,2)))
{
$valideField = false;
}
if ( empty($params['dureeExercice']))
{
$valideField = false;
}
if ($valideField === true)
{
$ws = new Scores_Ws_Client('order', '0.1');
$parameters = new stdClass();
$parameters->siren = $params['siren'];
$parameters->date = substr($params['dateCloture'],6,4).'-'.substr($params['dateCloture'],3,2).'-'.substr($params['dateCloture'],0,2);
$parameters->type = $params['format'];
$parameters->source = 'extranet';
$parameters->private = $params['confidentiel'];
$result = $ws->setBilanInput($parameters);
if ($result === false) {
$this->view->msg = "Erreur lors de l'enregistrement des informations";
} else {
$this->logger->info(print_r($result,1));
$this->view->ref = strtoupper($result);
$this->view->fileref = $params['siren'] . '_' . $params['format'] . '_' .
substr($params['dateCloture'],6,4) . substr($params['dateCloture'],3,2) .
substr($params['dateCloture'],0,2) . '_' . strtoupper($result);
$session = new Scores_Session_Entreprise($params['siren']);
$this->view->raisonSociale = $session->getRaisonSociale();
$this->view->bilanCloture = $params['dateCloture'];
$this->view->bilanDuree = $params['dureeExercice'];
switch($params['format']){
case 'C':
$this->view->type = 'consolidé';
break;
case 'N':
$this->view->type = 'réel normal (liasse 2050)';
break;
case 'S':
$this->view->type = 'simplifié (liasse 2033)';
break;
}
}
} else {
$this->view->msg = "Formulaire invalide.";
}
}
}
$ref = $params['ref'];
public function saisiebilanupAction()
//Annulation de la saisie
if ($params['annule'])
{
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$ref = $request->getParam('ref');
$fileref = $request->getParam('fileref');
if ($request->isPost()) {
if (count($_FILES)==1 ) {
$data = array( 'fichier' => '' );
$bilanSaisie->update($data, "ref='$ref'");
echo 'Saisie bilan annulé';
exit;
}
//Envoi du fichier @todo ça passe pas
elseif ($params['upload'])
{
if ( count($_FILES)==1 ){
$n = $_FILES['fichier']['name'];
$s = $_FILES['fichier']['size'];
$tmp_name = $_FILES['fichier']['tmp_name'];
@ -790,18 +731,29 @@ class FinanceController extends Zend_Controller_Action
$extValide = array('pdf', 'tiff');
$extension = strrchr($n,'.');
$extension = strtolower(substr($extension,1));
if ( in_array($extension, $extValide) ) {
$name = $fileref.'.'.$extension;
if ( in_array($extension, $extValide) ){
//Lecture dans la bdd des informations
$infos = $bilanSaisie->getInfosBilan($ref);
$name = $infos['ref'].'-'.$infos['siren'].'.'.$extension;
$c = Zend_Registry::get('config');
$file = $c->profil->path->shared.'/persist/bilanclient/'.$name;
if ( move_uploaded_file($tmp_name, $file) ) {
$ws = new Scores_Ws_Client('order', '0.1');
$parameters = new stdClass();
$parameters->ref = $ref;
$parameters->filename = $name;
$result = $ws->setBilanInputFile($parameters);
$file = realpath($c->profil->path->data).'/bilanclient/'.$name;
if ( move_uploaded_file($tmp_name, $file) ){
$bilanSaisie->setFilename($ref, $name);
switch($infos['format']){
case 'C':
$type = 'consolidé';
break;
case 'N':
$type = 'réel normal ou simplifié';
break;
}
$session = new Scores_Session_Entreprise($params['siren']);
$this->view->assign('raisonSociale', $session->getRaisonSociale());
$this->view->assign('size', filesize($file));
$this->view->assign('name', $name);
$this->view->assign('infos', $infos);
$this->view->assign('ref', $ref);
$this->view->assign('upload', true);
$this->view->file = $name;
} else {
$this->view->assign('upload', false);
$this->view->assign('errMsg', "<br/>Erreur lors de l'envoi du fichier!");
@ -814,59 +766,50 @@ class FinanceController extends Zend_Controller_Action
$this->view->assign('upload', false);
$this->view->assign('errMsg', "<br/>Erreur.");
}
$this->renderScript('finance/saisiebilan-upload.phtml');
}
}
/**
* Liste des liasses
*/
public function liasselistAction()
//Validation du formulaire
elseif (isset($params['method']))
{
$request = $this->getRequest();
$this->view->headTitle()->prepend("Liasse fiscale");
$this->view->headTitle()->prepend("Siret ".$this->siret);
//Paramètres utilisateur
$user = new Scores_Utilisateur();
$this->view->assign('edition', $user->checkModeEdition());
if ( $user->checkPerm('UPLOADBILAN') ) {
$this->view->assign('saisiebilan', true);
$valideField = true;
if ( empty($params['email'])) {
$valideField = false;
}
$this->view->assign('surveillance', $user->checkPerm('survbilan'));
$ws = new WsScores();
$bilanList = $ws->getListeBilans(substr($this->siret, 0, 9));
if ($bilanList === false) $this->forward('soap', 'error');
/** La liste des types de bilan existant **/
$liste = array (
'N' => array(),
'S' => array(),
'C' => array(),
'B' => array(),
'A' => array(),
if ( empty($params['method'])) {
$valideField = false;
}
if ( empty($params['siren'])) {
$valideField = false;
}
if ( empty($params['dateCloture'])
&& !preg_match('/^[0-9]{2}\/[0-9]{2}\/[0-9]{4}/', $params['dateCloture'])
&& checkdate(substr($params['dateCloture'],3,2),substr($params['dateCloture'],0,2),substr($params['dateCloture'],6,2))){
$valideField = false;
}
if ( empty($params['dureeExercice'])) {
$valideField = false;
}
if ($valideField){
$ref = $bilanSaisie->setInformations(
$user->getIdClient(),
$user->getId(),
$user->getLogin(),
$params['email'],
$params['method'],
$params['confidentiel'],
$params['siren'],
$params['dateCloture'],
$params['format'],
$params['dureeExercice']
);
$entreprise = new Scores_Session_Entreprise($this->siret, $this->id);
$this->view->assign('raisonSociale', $entreprise->getRaisonSociale());
$this->view->assign('siren', substr($this->siret, 0, 9));
$this->view->assign('siret', $this->siret);
$this->view->assign('idClient', $user->identity->idClient);
$this->view->haveLiasse = ($bilanList->nbReponses > 0) ? true : false;
if( $bilanList->nbReponses > 0 ) {
// Tri des bilans par type
foreach ( array_keys($liste) as $t) {
foreach ( $bilanList->result->item as $item ) {
if ( $t == $item->typeBilan ) {
$liste[$item->typeBilan][] = $item;
$this->view->assign('ref', $ref);
if ($params['method']=='courrier'){
$this->renderScript('finance/saisiebilan-courrier.phtml');
} elseif ($params['method']=='fichier') {
$this->renderScript('finance/saisiebilan-upload.phtml');
}
}
}
$this->view->BilanList = $liste;
}
}
/**
@ -884,11 +827,6 @@ class FinanceController extends Zend_Controller_Action
$user = new Scores_Utilisateur();
$this->view->assign('edition', $user->checkModeEdition());
//Gestion saisie bilan
if ( $user->checkPerm('UPLOADBILAN') ) {
$this->view->assign('saisiebilan', true);
}
$this->view->assign('surveillance', $user->checkPerm('survbilan'));
/** Les ancres pour les liens **/
$ancres = array(
@ -932,6 +870,23 @@ class FinanceController extends Zend_Controller_Action
),
);
/** La liste des types de bilan existant **/
$liste = array (
'N' => array(),
'S' => array(),
'C' => array(),
'B' => array(),
'A' => array());
/** Le nom des types pour le select */
$type = array (
'A' => 'Assurance',
'B' => 'Banque',
'C' => 'Consolidé',
'S' => 'Simplifié',
'N' => ''
);
/** Liste des unités que l'ont proposent **/
$unit = array (
'E' => '€',
@ -941,32 +896,28 @@ class FinanceController extends Zend_Controller_Action
$liasse = array ();
$request = $this->getRequest();
$unite = $request->getParam('unit','K');
$ws = new WsScores();
$listBilan = $ws->getListeBilans(substr($this->siret, 0, 9));
if ($listBilan === false) $this->_forward('soap', 'error');
$entreprise = new Scores_Session_Entreprise($this->siret, $this->id);
// Récupération de la date
$dateAndType = $request->getParam('date', $defaultTypeBilan.$defaultDateExercice);
if( $listBilan->nbReponses > 0 )
{
$date = $request->getParam('date',$listBilan->result->item[0]->dateExercice.':'.$listBilan->result->item[0]->typeBilan);
if ( !empty($dateAndType) ) {
foreach ($listBilan->result->item as $item)
$liste[$item->typeBilan][] = $item->dateExercice;
$type = substr($dateAndType, 0, 1);
$date = substr($dateAndType, 1);
if (!empty($date))
{
$dateAndType = explode(':', $date);
// Récupération des postes du bilan
try {
$ws = new Scores_Ws_Client('entreprise', '0.8');
$params = new stdClass();
$params->siren = substr($this->siret, 0, 9);
$params->millesime = $date;
$params->typeBilan = $type;
$params->ref = '';
$infos = $ws->getBilan($params);
$infos = $ws->getBilan(substr($this->siret, 0, 9), $dateAndType[0], $dateAndType[1], true);
// Error
if ($infos === false) {
$this->forward('soap', 'error');
}
if ($infos === false) $this->_forward('soap', 'error');
// Formatage de la liasse
$infoLiasse = new Scores_Finance_Liasse($infos, $unite);
$this->view->assign('dateCloture', $infoLiasse->getInfo('dateCloture'));
$this->view->assign('dateCloturePre', $infoLiasse->getInfo('dateCloturePre'));
@ -974,8 +925,9 @@ class FinanceController extends Zend_Controller_Action
$date = new Zend_Date($infoLiasse->getInfo('dateCloture'), 'yyyyMMdd');
$this->view->assign('dateClotureD', $date->toString('dd/MM/yyyy'));
Zend_Registry::get('firebug')->info('test:'.$infoLiasse->getInfo('dateCloturePre'));
$dateCloturePre = $infoLiasse->getInfo('dateCloturePre');
if ($dateCloturePre == '') {
if ( $dateCloturePre == '' ) {
$this->view->assign('dateCloturePreD', '-');
} else {
$date = new Zend_Date($dateCloturePre, 'yyyyMMdd');
@ -985,24 +937,33 @@ class FinanceController extends Zend_Controller_Action
$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('date', $dateAndType[0]);
$this->view->assign('champType', $dateAndType[1]);
$this->view->assign('liasse', $infoLiasse->getPostes());
$this->view->assign('ancres', $ancres[$type]);
} catch (Exception $e) {
$this->view->msg = $e->getMessage();
}
$this->view->assign('ancres', $ancres[$dateAndType[1]]);
//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($dateAndType[1],array('C', 'N', 'S')) ) {
$this->view->assign('exportxls', true);
}
}
$this->view->assign('liste', $liste);
$this->view->assign('id', $id);
$this->view->assign('type', $type);
$this->view->assign('unite', $unite);
$this->view->assign('unit', $unit);
}
//Gestion saisie bilan
if ( $user->checkPerm('UPLOADBILAN') ) {
$this->view->assign('saisiebilan', true);
}
$this->view->assign('surveillance', $user->checkPerm('survbilan'));
/** Partie vue **/
$this->view->haveLiasse = ($listBilan->nbReponses > 0) ? true : false;
$this->view->assign('raisonSociale', $entreprise->getRaisonSociale());
$this->view->assign('siren', substr($this->siret, 0, 9));
$this->view->assign('siret', $this->siret);
@ -1037,7 +998,7 @@ class FinanceController extends Zend_Controller_Action
'controller'=>'saisie',
'action'=>'bourse',
'siren' => $siren
), 'default', true));
), null, true));
}
$this->view->assign('id', $this->id);
@ -1065,16 +1026,11 @@ class FinanceController extends Zend_Controller_Action
$infos = $this->getRequest()->getParam('infos');
}
$user = new Scores_Utilisateur();
$this->view->assign('edition', $user->checkModeEdition());
$entreprise = new Scores_Session_Entreprise($this->siret, $this->id);
$this->view->assign('banques', isset($infos->result->item)?$infos->result->item:array());
$this->view->assign('banques', $infos->result->item);
$this->view->assign('raisonSociale', $entreprise->getRaisonSociale());
$this->view->assign('siren', substr($this->siret, 0, 9));
$this->view->assign('exportObjet', $infos);
$this->view->assign('siret', $this->siret);
}
/**
@ -1111,6 +1067,8 @@ class FinanceController extends Zend_Controller_Action
foreach ($bilansInfos as $infos) {
$dateCloture[] = $infos->dateCloture;
}
sort($dateCloture);
$this->view->assign('dateCloture', $dateCloture);
$this->view->assign('bilansInfos', $bilansInfos);
$ratiosInfos = $ratiosData->getTableRatiosInfos();
@ -1285,30 +1243,18 @@ class FinanceController extends Zend_Controller_Action
),
);
//Valeur pour le tableau
rsort($dateCloture);
$dateClotureTable = array();
foreach ($dateCloture as $k => $date) {
if ($k > 5) break;
$dateClotureTable[] = $date;
}
sort($dateClotureTable);
$this->view->assign('dateCloture', $dateClotureTable);
for ( $i=0 ; $i<count($dataTable) ; $i++ ) {
$values = array();
if ( !empty($dataTable[$i]['r']) ) {
foreach ($dateClotureTable as $k => $date) {
foreach ($dateCloture as $k=>$date) {
$values[$date] = $ratiosData->dRatio($typeBilan, $date, 'r'.$dataTable[$i]['r']);
}
}
$dataTable[$i]['values'] = $values;
}
$this->view->assign('dataTable',$dataTable);
//Valeur pour le graphique
//Calcul du graph
$labels = array();
$data = array();
$graphRatio = array(28, 21, 13);
@ -1319,12 +1265,10 @@ class FinanceController extends Zend_Controller_Action
$data[$iRatio]['values'][] = $ratiosEntrep[$date]['r'.$dataTable[$ratio]['r']];
}
}
sort($dateCloture);
foreach ($dateCloture as $k => $date) {
foreach ($dateCloture as $k=>$date) {
$labels[] = substr($date, 0, 4);
}
//Création du graphique
$graph = new Scores_Finance_Ratios_Graph($this->siret, $this->id);
$image = $graph->flux($labels, $data, $typeBilan);
if ( $image != false ){
@ -1428,34 +1372,4 @@ class FinanceController extends Zend_Controller_Action
}
}
/**
* Affichage en ajax des informations dernière date de cloture du bilan et etat de saisie
*/
public function liasseinfosAction()
{
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$siren = $request->getParam('siren');
$ws = new WsScores();
$response = $ws->getEntrepriseLiasseInfos($siren);
if ( $response === null ) {
$this->view->assign('msg','Aucun bilan déposé.');
} else {
$date = new Zend_Date($response->BilanDateCloture, 'yyyy-MM-dd');
$this->view->assign('BilanDateCloture', $date->toString('dd/MM/yyyy'));
$this->view->assign('BilanDateClotureIso', $response->BilanDateCloture);
$this->view->assign('BilanType', $response->BilanType);
$this->view->assign('SaisieCode', $response->SaisieCode);
$this->view->assign('SaisieLabel', $response->SaisieLabel);
if ( $response->SaisieDate!='' || $response->SaisieDate!='0000-00-00' ) {
$this->view->assign('SaisieDateIso', $response->SaisieDate);
$date = new Zend_Date($response->SaisieDate, 'yyyy-MM-dd');
$this->view->assign('SaisieDate', $date->toString('dd/MM/yyyy'));
}
}
}
}

View File

@ -6,7 +6,6 @@ require_once 'Giant/Functions.lib.php';
class GiantController extends Zend_Controller_Action
{
protected $theme;
protected $TestIndication = false;
protected $config = array();
@ -40,23 +39,12 @@ class GiantController extends Zend_Controller_Action
'NL' => 'The Netherlands',
);
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init()
{
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme
$this->theme = Zend_Registry::get('theme');
$this->view->headLink()->appendStylesheet($this->theme->pathStyle.'/giant.css', 'all');
$this->view->headScript()->appendFile($this->theme->pathScript.'/giant.js', 'text/javascript');
$this->view->headLink()->appendStylesheet('/themes/default/styles/giant.css', 'all');
$this->view->headScript()->appendFile('/themes/default/scripts/giant.js', 'text/javascript');
$this->view->debug = false;
$this->config = new Zend_Config_Ini( APPLICATION_PATH.'/../library/Giant/giant.ini' );
$this->TestIndication = $this->config->test->TestIndication;
@ -269,8 +257,8 @@ class GiantController extends Zend_Controller_Action
public function startmonitoringAction()
{
$this->_helper->layout()->disableLayout();
$this->view->headLink()->appendStylesheet($this->theme->pathStyle.'/giant.css', 'all');
$this->view->headScript()->appendFile($this->theme->pathScript.'/giant.js', 'text/javascript');
$this->view->headLink()->appendStylesheet('/themes/default/styles/giant.css', 'all');
$this->view->headScript()->appendFile('/themes/default/scripts/giant.js', 'text/javascript');
$this->view->lang = $this->getRequest()->getParam('lang');
$this->view->CompanyId = $this->getRequest()->getParam('CompanyId');
$this->view->Pays = $this->getRequest()->getParam('Pays');
@ -304,7 +292,7 @@ class GiantController extends Zend_Controller_Action
public function stopmonitoringAction()
{
$this->_helper->layout()->disableLayout();
$this->view->headLink()->appendStylesheet($this->theme->pathStyle.'/giant.css', 'all');
$this->view->headLink()->appendStylesheet('/themes/default/styles/giant.css', 'all');
$this->view->CompanyId = $this->getRequest()->getParam('CompanyId');
$this->view->InternalOrderId = $this->getRequest()->getParam('InternalOrderId');
$this->view->Pays = $this->getRequest()->getParam('Pays');
@ -327,7 +315,7 @@ class GiantController extends Zend_Controller_Action
public function updatemonitoringAction()
{
$this->_helper->layout()->disableLayout();
$this->view->headLink()->appendStylesheet($this->theme->pathStyle.'/giant.css', 'all');
$this->view->headLink()->appendStylesheet('/themes/default/styles/giant.css', 'all');
$this->view->lang = $this->getRequest()->getParam('lang');
$this->view->CompanyId = $this->getRequest()->getParam('CompanyId');
$this->view->InternalOrderId = $this->getRequest()->getParam('InternalOrderId');
@ -354,7 +342,7 @@ class GiantController extends Zend_Controller_Action
}
public function retriveAction()
{
$this->view->headScript()->appendFile($this->theme->pathScript.'/giant_monitoring.js', 'text/javascript');
$this->view->headScript()->appendFile('/themes/default/scripts/giant_monitoring.js', 'text/javascript');
$giantController = new GiantControllerLib();
$auth = Zend_Auth::getInstance();
if ( $auth->hasIdentity() ) {
@ -417,8 +405,8 @@ class GiantController extends Zend_Controller_Action
public function reteventsAction()
{
$this->_helper->layout()->disableLayout();
$this->view->headScript()->appendFile($this->theme->pathScript.'/giant_monitoring.js', 'text/javascript');
$this->view->headScript()->appendFile($this->theme->pathScript.'/giant.js', 'text/javascript');
$this->view->headScript()->appendFile('/themes/default/scripts/giant_monitoring.js', 'text/javascript');
$this->view->headScript()->appendFile('/themes/default/scripts/giant.js', 'text/javascript');
$auth = Zend_Auth::getInstance();
$identity = $auth->getIdentity();
$result = $auth->getStorage()->read($identity);

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,97 @@
<?php
class IndexController extends Zend_Controller_Action
{
public function indexAction()
{
$request = $this->getRequest();
$page = $request->getParam('page');
if ($page == 'annonces')
{
$siret = $request->getParam('siret');
$source = $request->getParam('source');
$idAnn = $request->getParam('idAnn');
$lien = '/juridique/annonces/siret/'.$siret;
if (!empty($source)) $lien.= '/source/'.$source;
if (!empty($idAnn)) $lien.= '/idAnn/'.$idAnn;
$this->_redirect($lien);
}
elseif ( Zend_Registry::get('theme')->name=='mobile' )
{
//Afficher le menu pour la version mobile
}
else
{
$this->_forward('entreprise', 'recherche');
}
}
/**
* Retourne l'url pour le csv d'export du portefeuille
*/
public function portefeuillecsvAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
//'login' and 'hach' detecte from AuthAdapter
$request = $this->getRequest();
$version = $request->getParam('v', 1);
if (intval($version) == 2) {
$log = Zend_Registry::get('config')->profil->path->data.'/log/altisys.log';
$user = new Scores_Utilisateur();
$login = $user->getLogin();
$idClient = $user->getIdClient();
$file = 'listesurv-score-'.$login.'-'.$idClient.'.csv';
$content_type = 'application/csv-tab-delimited-table';
$c = Zend_Registry::get('config');
$path = realpath($c->profil->path->files).'/';
//Envoi du fichier sur la sortie standard
if ( file_exists($path.$file) ) {
header('Content-Transfer-Encoding: none');
header('Content-type: ' . $content_type.'');
header('Content-Length: ' . filesize($path.$file));
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
header('Content-Disposition: filename="' . basename($path.$file) . '"');
header('Cache-Control: private, max-age=0, must-revalidate');
header('Pragma: public');
ini_set('zlib.output_compression', '0');
echo file_get_contents($path.$file);
file_put_contents($log, date('Y-m-d H:i:s')." APPEL ALTISYS - OK $file\n", FILE_APPEND);
} else {
echo 'Impossible de charger le fichier.';
file_put_contents($log, date('Y-m-d H:i:s')." APPEL ALTISYS - ERREUR $file\n", FILE_APPEND);
}
} else {
require_once 'Scores/WsScores.php';
$user = new Scores_Utilisateur();
$login = $user->getLogin();
$idClient = $user->getIdClient();
$ws = new WsScores();
$reponse = $ws->getPortefeuilleCsv($login, $idClient);
$log = Zend_Registry::get('config')->profil->path->data.'/log/altisys.log';
if ($reponse === false){
file_put_contents($log, date('Y-m-d H:i:s')." - URL = ERREUR\n", FILE_APPEND);
echo "Erreur";
} elseif (!empty($reponse->result->Url)) {
file_put_contents($log, date('Y-m-d H:i:s')." - URL = ".$reponse->result->Url."\n", FILE_APPEND);
echo $reponse->result->Url;
}
}
}
}

View File

@ -0,0 +1,458 @@
<?php
class JuridiqueController extends Zend_Controller_Action
{
protected $siret = null;
protected $id = 0;
public function init()
{
$request = $this->getRequest();
$this->siret = $request->getParam('siret');
$this->id = $request->getParam('id', 0);
require_once 'Scores/WsScores.php';
}
/**
* Affichage de la liste des annonces ou d'une annonce
*/
public function annoncesAction()
{
$request = $this->getRequest();
$vue = $request->getParam('vue', 'bodacc');
$idAnn = $request->getParam('idAnn', null);
$siren = substr($this->siret, 0,9);
$source = $request->getParam('source');
if (!empty($source)) {
switch ($source){
case 1: $vue='bodacc'; break;
case 2: $vue='balo'; break;
case 3: $vue='asso'; break;
}
}
$session = new Scores_Session_Entreprise($this->siret, $this->id);
$fj = $session->getFormeJuridique();
if ( $fj>9000 && $fj<9999 && intval($siren)==0 ) {
$vue = 'asso';
}
$this->view->assign('id', $session->getId());
$this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale());
$this->view->assign('AutrePage', $request->getParam('apage'));
if ($session->getSource()=='006' || $session->getSourceId()=='007') {
$this->view->assign('AutreSource', true);
} else {
$this->view->assign('vue', $vue);
//Pagination
$page = $request->getParam('page', 1);
if ( $page <= 0 ) $page = 1;
$nbAffichage = 20;
$position = ($page - 1 ) * $nbAffichage;
$ws = new WsScores();
switch ( $vue ) {
case 'bodacc':
case 'abod':
default:
if(intval($siren)==0) {
$idAnn = $session->getSourceId();
}
$infos = $ws->getAnnoncesLegales($siren, $idAnn, null, $position, $nbAffichage);
break;
case 'balo':
$infos = $ws->getAnnoncesBalo($siren, $idAnn, null, $position, $nbAffichage);
break;
case 'asso':
if ( intval($siren)==0 && substr($session->getAutreId(),0,1)=='W' ) {
$infos = $ws->getAnnoncesAsso($session->getAutreId(), $idAnn, null, $position, $nbAffichage);
} elseif (intval($siren)!=0) {
$infos = $ws->getAnnoncesAsso($siren, $idAnn, null, $position, $nbAffichage);
} else {
$idAnn = $session->getSourceId();
$infos = $ws->getAnnoncesAsso($siren, $idAnn, null, $position, $nbAffichage);
}
break;
case 'bomp':
$filtre = $request->getParam('filtre', null);
$this->view->assign('filtre', $filtre);
$infos = $ws->getAnnoncesBoamp($siren, $idAnn, $filtre, $position, $nbAffichage);
break;
}
if ($infos === false) $this->_forward('soap', 'error');
Zend_Registry::get('firebug')->info($infos);
require_once 'Scores/Annonces.php';
$objAnnonces = new Annonces($infos->result->item);
$typeAnnonces = array(
'Bodacc',
'Balo',
'Bomp',
'Asso',
);
$user = new Scores_Utilisateur();
$this->view->assign('hasModeEdition', $user->checkModeEdition());
$this->view->assign('exportObjet', $infos);
$this->view->assign('surveillance', $user->checkPerm('survannonce'));
//Affichage pour une annonce
if (!empty($idAnn) && in_array($vue, array('bodacc', 'abod', 'balo', 'asso', 'bomp')) ) {
if ( $user->checkModeEdition() ){
$this->view->headScript()->appendFile('/themes/default/scripts/saisieannonces.js', 'text/javascript');
}
$classType = 'annonces'.ucfirst($vue);
foreach($objAnnonces->$classType as $ann) {
if($ann->id==$idAnn) break;
}
Zend_Registry::get('firebug')->info($ann);
$annonce = array(
'Desc' => $objAnnonces->getAnnonceDesc($ann),
'Entree' => $objAnnonces->getAnnonceEntree($ann),
'EntreeSD' => $objAnnonces->getAnnonceEntreeSD($ann),
'Even' => $objAnnonces->getAnnonceEven($ann),
'Texte' => $objAnnonces->getAnnonceTexte($ann),
'Type' => $objAnnonces->getType($ann),
'Code' => $objAnnonces->getCode($ann),
'Annee' => $objAnnonces->getAnnee($ann),
'Num' => $objAnnonces->getNum($ann),
'Deleted' => $objAnnonces->isDeleted($ann),
'Entites' => $objAnnonces->getAnnonceEntite($ann)
);
$this->view->assign('source', $session->getSource());
if ( intval($this->siret)==0 ){
$this->view->assign('sourceId', $session->getSourceId());
} else {
$this->view->assign('sourceId', null);
}
$this->view->assign('idAnn', $idAnn);
$this->view->assign('annonce', $annonce);
if ($request->getParam('q')=='ajax')
{
$this->_helper->layout()->disableLayout();
//$this->_helper->viewRenderer->setNoRender(true);
$this->renderScript('juridique/annonce-ajax.phtml');
} else {
$this->view->assign('PageCurrent', $page);
//Définir url pour téléchargement pdf
if ( in_array($annonce['Code'], array('BODA', 'BODB', 'BODC')) && intval($annonce['Annee'])>=2008) {
$lienBodacc = $this->view->url(array(
'controller' => 'juridique',
'action' => 'bodaccpdf',
'type' => substr($annonce['Code'],3,1),
'annee' => $annonce['Annee'],
'num' => $annonce['Num'],
), null, true);
$this->view->assign('lienBodacc', $lienBodacc);
}
$this->renderScript('juridique/annonce.phtml');
}
//Affichage pour la liste des annonces
} else {
//Calcul pagination
$nbReponses = count($infos->result->item);
$nbReponsesTotal = $infos->nbReponses;
if ($nbReponses < $nbReponsesTotal) {
$pageTotal = ceil( $nbReponsesTotal / $nbAffichage );
$pageCurrent = $page;
$pagePrev = $page - 1;
if ($pagePrev < 1) {
$pagePrev = 1;
}
$pageNext = $page + 1;
if( $pageNext > $pageTotal ) {
$pageNext = $pageTotal;
}
} else {
$pageTotal = $pageCurrent = 1;
}
$this->view->assign('PageTotal', $pageTotal);
$this->view->assign('PagePrev', $pagePrev);
$this->view->assign('PageNext', $pageNext);
$this->view->assign('PageCurrent', $pageCurrent);
$this->view->assign('nbReponses', empty($nbReponses) ? 0 : $nbReponses);
$this->view->assign('nbReponsesTotal', empty($nbReponsesTotal) ? 0 : $nbReponsesTotal);
foreach ( $typeAnnonces as $type ) {
$classType = 'annonces'.$type;
$annonces = array();
if ( count( $objAnnonces->$classType ) > 0 ) {
foreach( $objAnnonces->$classType as $ann ) {
$annonces[] = $objAnnonces->getAnnonceResume($ann);
}
$this->view->assign($classType, $annonces);
}
}
$this->view->headScript()->appendFile('/themes/default/scripts/annonces.js', 'text/javascript');
}
}
}
/**
* Affichage infos réglementées
*/
public function infosregAction()
{
$this->view->headTitle()->prepend("Informations Réglementées");
$this->view->headTitle()->prepend("Siret ".$this->siret);
$request = $this->getRequest();
$idAnn = $request->getParam('idann', false);
$siren = substr($this->siret, 0,9);
$session = new Scores_Session_Entreprise($this->siret, $this->id);
$ws = new WsScores();
if ($idAnn!=false) {
$this->view->assign('idAnn', $idAnn);
$infos = $ws->getInfosReg($siren,$idAnn);
} else {
$infos = $ws->getInfosReg($siren);
}
if ($infos === false) $this->forward('soap', 'error');
if (is_string($infos)){
$this->view->assign('message', $infos);
}
$objAnnonces = $infos->result->item;
$annonces = array();
if (count($objAnnonces)>0) {
foreach ( $objAnnonces as $item ) {
$dateParution = new Zend_Date($item->DateParution, 'yyyy-MM-dd');
$dateInsertion = new Zend_Date($item->dateInsertionSD, 'yyyy-MM-dd');
$annonces[] = array(
'id' => $item->id,
'titre' => $item->titre,
'communique' => $item->communique,
'source' => $item->source,
'DateParution' => $dateParution->toString('dd/MM/yyyy'),
'dateInsertionSD' => $dateInsertion->toString('dd/MM/yyyy'),
);
}
}
$this->view->assign('annonces', $annonces);
$this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale());
$this->view->assign('exportObjet', $infos);
}
/**
* Affichage listes des compétences
*/
public function competencesAction()
{
$this->view->headTitle()->prepend("Compétences Territoriales");
$this->view->headTitle()->prepend("Siret ".$this->siret);
$request = $this->getRequest();
$type = $request->getParam('type', '');
$siren = substr($this->siret,0,9);
$session = new Scores_Session_Entreprise($this->siret, $this->id);
$abbrev = array(
' TGI ' => 'TRIBUNAL DE GRANDE INSTANCE DE ',
' TI ' => 'TRIBUNAL D\'INSTANCE DE ',
' TC ' => 'TRIBUNAL DE COMMERCE DE ',
' TGICC ' => 'TRIBUNAL DE GRANDE INSTANCE A COMPETENCE COMMERCIALE ',
' TICC ' => 'TRIBUNAL D\'INSTANCE A COMPETENCE COMMERCIALE '
);
if (!empty($type)){
$ws = new WsScores();
$infos = $ws->getListeCompetences($siret, $type, $session->getCodeCommune());
if ($infos === false) $this->_forward('soap', 'error');
$competences = $infos->result->item;
Zend_Registry::get('firebug')->info($infos);
if( $type=='tri' || $type=='cfe' ) {
$i=0;
foreach($competences as $comp){
$competences[$i]->Nom = strtr(' '.strtoupper($comp->Nom), $abbrev);
$i++;
}
}
$this->view->assign('competences', $competences);
$this->view->assign('type', $type);
$this->view->assign('exportObjet', $infos);
}
$this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale());
}
/**
* Affichage des la listes des conventions collectives
* Enter description here ...
*/
public function conventionsAction()
{
$this->view->headTitle()->prepend("Conventions Collectives");
$this->view->headTitle()->prepend("Siret ".$this->siret);
$siren = substr($this->siret, 0,9);
$session = new Scores_Session_Entreprise($this->siret, $this->id);
$this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale());
$ws = new WsScores();
$infos = $ws->getListeConventions($siren);
$conventions = $infos->result->item;
Zend_Registry::get('firebug')->info($conventions);
$this->view->assign('conventions', $conventions);
$this->view->assign('exportObjet', $infos);
}
/**
* Affichage des marques déposées
*/
public function marquesAction()
{
$this->view->headTitle()->prepend("Marques Déposées");
$this->view->headTitle()->prepend("Siret ".$this->siret);
$this->view->headScript()->appendFile('/themes/default/scripts/marques.js', 'text/javascript');
$request = $this->getRequest();
$idObject = $request->getParam('idObject', 0);
$siren = substr($this->siret, 0,9);
$session = new Scores_Session_Entreprise($this->siret, $this->id);
$this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale());
$ws = new WsScores();
$infos = $ws->getMarques($siren, $idObject);
if ($infos === false) $this->_forward('soap', 'error');
$marques = $infos->result->item;
$this->view->assign('marques', $marques);
$this->view->assign('idObject', $idObject);
$this->view->assign('exportObjet', $marques);
Zend_Registry::get('firebug')->info($infos);
}
/**
* Affiche le lien pour télécharger le fichier concernant le dépot
*/
public function getmarqueAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$request = $this->getRequest();
$numdepot = $request->getParam('numdepot', '');
if (empty($numdepot)){
echo 'Paramètres incorrects';
exit;
}
$c = Zend_Registry::get('config');
$directory = realpath($c->profil->path->data).'/marques';
$file = $numdepot.'.pdf';
//Le fichier n'existe pas alors on le télécharger
if(!file_exists($directory.'/'.$file)
|| filesize($directory.'/'.$file)==0 ) {
$cmd = 'php ' . APPLICATION_PATH . '/../scripts/jobs/getMarque.php ' . $numdepot;
Zend_Registry::get('firebug')->info($cmd);
$result = exec($cmd);
Zend_Registry::get('firebug')->info($result);
}
//On vérfie que le fichier existe après le téléchargement
if(file_exists($directory.'/'.$file) && filesize($directory.'/'.$file)>0) {
$href = $this->view->baseUrl().'/fichier/marque/'.$file;
echo '<a href="'.$href.'" target="_blank">Télécharger le PDF de l\'insciption au BOPI.</a>';
} else {
echo 'Document introuvable.';
}
}
public function bodaccpdfAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$request = $this->getRequest();
$type = $request->getParam('type');
$annee = $request->getParam('annee');
$num = $request->getParam('num');
//$num doit être retraité pour être sur 4 position
$c = strlen($num);
for($i=0;$i<4-$c;$i++){
$num = '0'.$num;
}
$c = Zend_Registry::get('config');
$file = realpath($c->profil->path->data)
.'/bodacc/'.$type.'/'.$annee.'/'.
'BODACC_'.$type.'_'.$annee.'_'.$num.'.pdf';
if ( !file_exists($file) ) {
exec('php ' . APPLICATION_PATH . "/../scripts/jobs/getBodaccPdf.php $type $annee $num >> getBodaccPdf.log");
}
if (file_exists($file)) {
$href = $this->view->url(array(
'controller' => 'fichier',
'action' => 'bodacc',
'fichier' => basename($file),
), null, true);
echo "<a target=\"_blank\" href=\"".$href."\">Cliquer ici pour télécharger le fichier.</a>";
} else {
echo "Erreur lors du chargement du fichier.";
}
}
public function annoncenumAction()
{
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$siren = $request->getParam('siren');
$ws = new WsScores();
$result = $ws->getAnnoncesNum($siren);
Zend_Registry::get('firebug')->info($result);
$numWS = array();
if (count($result->item)>0) {
foreach ($result->item as $item) {
$numWS[$item->type] = $item->num;
}
}
$types = array('bodacc', 'balo', 'boamp', 'asso');
$num = array();
foreach($types as $type) {
if ( array_key_exists($type, $numWS) ) {
$num['Type'.ucfirst($type)] = $numWS[$type];
}
}
$this->view->assign('num', $num);
}
}

View File

@ -1,26 +1,12 @@
<?php
class LogoController extends Zend_Controller_Action
{
protected $theme;
protected $pathLogo = '';
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init()
{
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme
$this->theme = Zend_Registry::get('theme');
$c = Zend_Registry::get('config');
$this->pathLogo = $c->profil->path->shared.'/persist/logos';
$this->pathLogo = $c->profil->path->data.'/logos';
}
public function indexAction()

View File

@ -1,20 +1,6 @@
<?php
/**
*
* @todo vérifier contenu de la table des cours d'appel en dur
* au 20150305:
* 98713 PAPEETE CEDEX
* 97262 FORT DE FRANCE CEDEX
* Chambre Détachée de la Cour d'Appel de Fort de France à Cayenne", "triCP"=>"97300
* qui devrait être "cours d'appel de Cayenne"
* 97600 MAMOUDZOU
* 97500 ST PIERRE ET MIQUELON
*
*/
class MandataireController extends Zend_Controller_Action
{
protected $theme;
protected $coursAppel = array(
array( "triId"=>"1756", "triCode"=>"AIXPRL", "triNom"=>"Cour d'Appel d'Aix-en-Provence", "triCP"=>"13616" ),
array( "triId"=>"1757", "triCode"=>"AMIENL", "triNom"=>"Cour d'Appel d'Amiens", "triCP"=>"80027" ),
@ -54,21 +40,8 @@ class MandataireController extends Zend_Controller_Action
array( "triId"=>"1798", "triCode"=>"AGENL", "triNom"=>"Cour d'Appel d'Agen", "triCP"=>"47916" ),
);
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init()
{
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme
$this->theme = Zend_Registry::get('theme');
require_once 'Scores/WsScores.php';
}
@ -86,13 +59,13 @@ class MandataireController extends Zend_Controller_Action
$ws = new WsScores();
$this->logger->info('idMandataire : '.$idMandataire);
Zend_Registry::get('firebug')->info('idMandataire : '.$idMandataire);
//Mode edition
if ($idMandataire != '') {
$idMandataire = (int)substr($idMandataire,1);
$reponse = $ws->getMandataire($idMandataire);
$this->logger->info(print_r($reponse,1));
Zend_Registry::get('firebug')->info($reponse);
if ($reponse!==false) {
$tabMandataires = json_decode($reponse, true);
} else {
@ -286,14 +259,12 @@ class MandataireController extends Zend_Controller_Action
$message.= 'Veuillez remplir les champs suivants : ';
$message.= join(', ', $fields);
$message.= '</font>';
} else {
}else{
$message='';
$ws = new WsScores();
$reponse = $ws->setMandataire($tabMandataires);
if ( $reponse===false ){
$message = "Une erreur s'est produite durant l'enregistrement";
} elseif ( is_string($reponse) ) {
$message = $reponse;
if ($reponse===false || $reponse->result==false){
$message = 'Une erreur s\'est produite durant l\'enregistrement';
}
}
echo $message;

File diff suppressed because it is too large Load Diff

View File

@ -1,23 +1,8 @@
<?php
class PrintController extends Zend_Controller_Action
{
protected $theme;
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init()
{
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme
$this->theme = Zend_Registry::get('theme');
}
public function init(){}
/**
* Renvoie les paramètres pour l'impression
@ -45,7 +30,8 @@ class PrintController extends Zend_Controller_Action
$params['mil'] = $elements[5];
break;
case 'liasse':
$params['date'] = $elements[3];
$params['unit'] = $elements[4];
$params['date'] = $elements[5];
break;
}
$params['siret'] = $elements[2];
@ -83,11 +69,6 @@ class PrintController extends Zend_Controller_Action
case 'evaluation':
$params['siret'] = $elements[2];
$params['id'] = $elements[3];
switch($action){
case 'scoreshisto':
$params['type'] = $elements[4];
break;
}
break;
case 'giant':
$params['Pays'] = $elements[2];
@ -140,7 +121,7 @@ class PrintController extends Zend_Controller_Action
$fichier = str_replace('.pdf', '', $fichier);
$c = Zend_Registry::get('config');
$file = $c->profil->path->shared.'/pages/'.$fichier.'.html';
$file = $c->profil->path->pages.'/'.$fichier.'.html';
if (!file_exists($file))
{
echo 'Fichier introuvable';
@ -219,7 +200,6 @@ class PrintController extends Zend_Controller_Action
}
$this->view->assign('controller', $elements['controller']);
$this->view->assign('action', $elements['action']);
$this->logger->info(print_r($elements['params'],1));
$this->view->assign('params', $elements['params']);
}
@ -239,7 +219,7 @@ class PrintController extends Zend_Controller_Action
}
$c = Zend_Registry::get('config');
$file = $c->profil->path->shared.'/files/'.$fichier;
$file = $c->profil->path->files.'/'.$fichier;
if (!file_exists($file)){
echo "Erreur lors de la génération du fichier.";
exit;

View File

@ -3,21 +3,8 @@ class RechercheController extends Zend_Controller_Action
{
protected $theme;
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init()
{
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme
$this->theme = Zend_Registry::get('theme');
/** Pour Giant **/
if(isset($_SESSION['recherche']['giant']))
unset($_SESSION['recherche']['giant']);
@ -183,8 +170,9 @@ class RechercheController extends Zend_Controller_Action
} else {
require_once 'i18n/cleanchar.php';
//Suppression des caractères accentués
$txt = Scores_Locale_String::cleanstring($params['formA']['txt']);
$txt = cleanstring($params['formA']['txt']);
//Remplacement du caractère § par ~
$txt = str_replace('$', '~', $txt);
// Recherche siren tenant compte des anomalies d'OCR
@ -223,8 +211,11 @@ class RechercheController extends Zend_Controller_Action
'annee' => $annonce->Annee,
'code' => $code,
'text' => $texte,
'file' => $this->view->url(array('controller'=>'telechargement', 'action'=>'histopdf',
'q' => $fichier, 'host' => base64_encode($host)), 'default', true
'file' => $this->view->url(array(
'controller'=>'telechargement',
'action'=>'histopdf',
'q' => $fichier,
'host' => base64_encode($host))
),
);
}
@ -296,10 +287,10 @@ class RechercheController extends Zend_Controller_Action
$request = $this->getRequest();
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');
$path = $c->profil->path->shared.'/persist/log';
$path = realpath($c->profil->path->data).'/log';
$fp = fopen($path.'/enquetes.csv', 'a');
fwrite($fp, date('Y/m/d H:i:s').' - '.print_r($form->getValues(),true)."\n");
fclose($fp);
@ -315,12 +306,12 @@ class RechercheController extends Zend_Controller_Action
$message.= "Prénom : ".$user->getPrenom()."<br/>";
$objet = "Demande d'investigation";
$mail = new Scores_Mail_Method();
$mail->setFromKey('contact');
$mail = new Scores_Mail();
$mail->setFrom('contact');
$mail->addToKey('support');
$mail->setSubject($objet);
$mail->setBodyHtml($message);
$mail->execute();
$mail->send();
} else {
//Affichage formulaire
@ -389,7 +380,7 @@ class RechercheController extends Zend_Controller_Action
$required = array('dirNom', 'dirType');
foreach($required as $item){
if(empty($params[$item])){
$this->redirect('/recherche/worldcheck');
$this->_redirect('/recherche/worldcheck');
break;
}
}
@ -397,7 +388,7 @@ class RechercheController extends Zend_Controller_Action
//Redirection
$token = $rechercheParams->save($type, $params);
$this->redirect('recherche/liste/token/'.$token);
$this->_redirect('recherche/liste/token/'.$token);
}
//On selectionne en session
@ -409,7 +400,7 @@ class RechercheController extends Zend_Controller_Action
//Giant
if( !empty($params['pays']) && $type == 'ent' ){
$this->logger->info('RECHERCHE GIANT');
Zend_Registry::get('firebug')->info('RECHERCHE GIANT');
$this->_forward('search', 'giant', null, $params);
//Worldcheck
} elseif ($type == 'wcheck' ) {
@ -432,12 +423,14 @@ class RechercheController extends Zend_Controller_Action
//Criteres recherche entreprise
if ( $type=='ent' ) {
require_once 'i18n/cleanchar.php';
// Type de recherche = entreprises
$telFax = trim(preg_replace('/[^0-9]/', '', $params['telFax']));
$naf = trim(preg_replace('/[^0-9A-Z]/i', '', $params['naf']));
// Traitement des données formulaire
$raisonSociale = Scores_Locale_String::cleanutf8($params['raisonSociale']);
$raisonSociale = cleanutf8($params['raisonSociale']);
$raisonSociale = str_replace(array('(',')', '/'), array('', '', ' '), $raisonSociale);
$numVoie = preg_replace('/[^0-9]/', '', $params['numero']);
@ -445,10 +438,10 @@ class RechercheController extends Zend_Controller_Action
$numVoie = '';
}
$libVoie = Scores_Locale_String::cleanutf8($params['voie']);
$libVoie = cleanutf8($params['voie']);
$libVoie = str_replace(array('(',')', '/'), array('', '', ' '), $libVoie);
$cpVille = Scores_Locale_String::cleanutf8($params['cpVille']);
$cpVille = cleanutf8($params['cpVille']);
$cpVille = str_replace(array('(',')', '/'), array('', '', ' '), $cpVille);
@ -502,7 +495,7 @@ class RechercheController extends Zend_Controller_Action
$this->view->assign('rechCsv', $user->checkPerm('rechcsv'));
//Criteres recherche dirigeants
} else if ( $type == 'dir' ) {
} else if ( $type=='dir' ) {
// Type de recherche = dirigeants
//$dirNom = preg_replace('/[^0-9A-Z]/', ' ', strtoupper($params['dirNom']));
@ -591,7 +584,7 @@ class RechercheController extends Zend_Controller_Action
$params[$key] = str_replace('/', ' ', $params[$key]);
}
$criteresLien = $this->view->url($params, 'default', true);
$criteresLien = $this->view->url($params, null, true);
$liste = array();
if (count($etabs)>0) {
@ -649,7 +642,7 @@ class RechercheController extends Zend_Controller_Action
'action'=>'fiche',
'id' => $etab->id,
'siret' => $etab->Siren,
), 'default', true);
), null, true);
if ( $user->checkPerm('IDENTITE') ) {
$infoEtab.= ' <a title="Voir la fiche d\'identité du siège de cette entreprise"'.
@ -697,19 +690,19 @@ class RechercheController extends Zend_Controller_Action
}
$item['InfoActivite'] = $activite;
if ( $type == 'dir' ) {
if ($type=='dir') {
$item['InfoDirigeant'] = '<u>Dirigeant recherch&eacute; :</u> ';
if ($etab->DirRs!='') {
$item['InfoDirigeant'].= '<b>'.$etab->DirRs.'</b>, repr&eacute;sent&eacute; par ';
}
$item['InfoDirigeant'].= $etab->DirNom .' '. $etab->DirPrenom;
if ( $etab->DirNomUsage != '' && $etab->DirNomUsage != $etab->DirNom) {
if ($etab->DirNomUsage<>'' && $etab->DirNomUsage<>$etab->DirNom) {
$item['InfoDirigeant'].= ' ('. $etab->DirNomUsage . ')';
}
$item['InfoDirigeant'].= '<i>, '.$etab->DirFonction.'</i><br/>';
} elseif ( $type == 'act' ) {
} elseif ($type=='act'){
$item['InfoActionnaire'] = '<u>Actionnaire recherch&eacute; :</u> ';
if ($etab->ActNomRs<>'') {
@ -736,11 +729,6 @@ class RechercheController extends Zend_Controller_Action
//Affichage accès direct aux pages
$liens = array();
/**
* test en dur clients pour bilans
* @todo client = 34
* @todo client = 60
*/
if ($user->getIdClient()==34 || $user->getIdClient()==60) {
$liens[] = array(
'title' => 'Comptes annuels',
@ -748,26 +736,22 @@ class RechercheController extends Zend_Controller_Action
'controller'=>'pieces',
'action'=>'bilans',
'siret'=>$etab->Siren.$etab->Nic,
'id'=>$etab->id), 'default', true),
'id'=>$etab->id), null, true),
);
$liens[] = array(
'title' => 'Actes et status',
'href' => $this->view->url(array(
'controller'=>'pieces', 'action'=>'actes',
'siret'=>$etab->Siren.$etab->Nic, 'id'=>$etab->id), 'default', true),
'siret'=>$etab->Siren.$etab->Nic, 'id'=>$etab->id), null, true),
);
}
/**
* test en dur clients pour fiche
* @todo client = 60
*/
if ($user->getIdClient()==60) {
$liens[] = array(
'title' => 'Fiche AGS',
'href' => $this->view->url(array(
'controller'=>'identite', 'action'=>'fichepc',
'siret'=>$etab->Siren.$etab->Nic, 'id'=>$etab->id), 'default', true),
'siret'=>$etab->Siren.$etab->Nic, 'id'=>$etab->id), null, true),
);
}
if (count($liens)>0) {
@ -796,7 +780,7 @@ class RechercheController extends Zend_Controller_Action
'action' => 'liste',
'type' => 'ent',
'raisonSociale' => trim($criteres['dirNom'].' '.$criteres['dirPrenom'])
), 'default', true));
), null, true));
} else {
$this->view->assign('blockDirToEntreprise', false);
}
@ -806,8 +790,6 @@ class RechercheController extends Zend_Controller_Action
//Calcul pagination
$nbReponses = $reponse->nbReponses;
$nbReponsesTotal = $reponse->nbReponsesTotal;
$pagePrev=1;
$pageNext=1;
if ($nbReponses < $nbReponsesTotal) {
$pageTotal = ceil( $nbReponsesTotal / $nbAffichage );
$pageCurrent = $page;
@ -929,7 +911,7 @@ class RechercheController extends Zend_Controller_Action
$sql->where("LOWER(libelle) ".$where);
}
}
$this->logger->info($where);
Zend_Registry::get('firebug')->info($where);
$rows = $table->fetchAll($sql);
if ( count($rows)>0 ) {
@ -1036,7 +1018,7 @@ class RechercheController extends Zend_Controller_Action
'action'=>'fiche',
'id' => $etab->id,
'siret' => $etab->Siren,
), 'default', true);
));
$infoEtab.= ' <a title="Voir la fiche d\'identité du siège de cette entreprise"'.
' href="'.$url.'">(Accès siège)</a>';
}
@ -1117,6 +1099,8 @@ class RechercheController extends Zend_Controller_Action
//Criteres recherche entreprise
if ($type=='ent'){
require_once 'i18n/cleanchar.php';
// Type de recherche = entreprises
$telFax = trim(preg_replace('/[^0-9]/', '', $params['telFax']));
$naf = trim(preg_replace('/[^0-9A-Z]/i', '', $params['naf']));
@ -1130,8 +1114,8 @@ class RechercheController extends Zend_Controller_Action
die('Numéro de voie incorrecte !');
}
$libVoie = Scores_Locale_String::cleanutf8($params['voie']);
$cpVille = Scores_Locale_String::cleanutf8($params['cpVille']);
$libVoie = cleanutf8($params['voie']);
$cpVille = cleanutf8($params['cpVille']);
if (preg_match("/^([0-9]{2,5})([\D]*)/i", $cpVille, $matches)) {
$cp = trim($matches[1]);
@ -1208,7 +1192,7 @@ class RechercheController extends Zend_Controller_Action
//echo "<pre>"; print_r($etabs); echo "</pre>"; exit;
$c = Zend_Registry::get('config');
$file = $c->profil->path->shared . '/files/'.$user->getIdClient().'-'.$user->getLogin().'-'.date('YmdHis').'.csv';
$file = $c->profil->path->files . '/'.$user->getIdClient().'-'.$user->getLogin().'-'.date('YmdHis').'.csv';
$export = new Scores_Export_ArrayCsv($etabs, 'rechercheEntreprise');
$export->writeFile($file);

View File

@ -1,8 +1,6 @@
<?php
class SurveillanceController extends Zend_Controller_Action
{
protected $theme;
/**
* Association source => texte
* @var array
@ -35,21 +33,8 @@ class SurveillanceController extends Zend_Controller_Action
'liens' => 'survliens',
);
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init()
{
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme
$this->theme = Zend_Registry::get('theme');
require_once 'Scores/WsScores.php';
}
@ -67,13 +52,12 @@ class SurveillanceController extends Zend_Controller_Action
$this->_helper->layout->disableLayout();
$request = $this->getRequest();
$siret = $request->getParam('siret', '');
$email = $request->getParam('email', '');
$ref = $request->getParam('ref', '');
$source = $request->getParam('source', '');
$encours = $request->getParam('encours', 0);
$user = new Scores_Utilisateur();
// Main email
$email = $user->getEmail();
if( empty($source) ) {
@ -118,7 +102,6 @@ class SurveillanceController extends Zend_Controller_Action
$page = $request->getParam('page');
$from = $request->getParam('from');
$q = $request->getParam('q');
$siret = $request->getParam('siret', '');
$email = $request->getParam('email', '');
@ -136,11 +119,9 @@ class SurveillanceController extends Zend_Controller_Action
echo "Erreur lors de la suppression";
}
} elseif (isset($page)) {
$this->redirect('surveillance/liste/page/'.$page);
} elseif (isset($q)) {
$this->redirect('surveillance/liste/q/'.$q);
$this->_redirect('surveillance/liste/page/'.$page);
} else {
$this->redirect('surveillance/liste');
$this->_redirect('surveillance/liste');
}
}
@ -159,32 +140,12 @@ class SurveillanceController extends Zend_Controller_Action
$delete = $request->getParam('delete', false);
$encours = $request->getParam('encours', 0);
$validateur = new Zend_Validate_EmailAddress();
// --- Vérification siret
if ( empty($siret) ){
$msg = 'Erreur SIRET non définie !';
//Vérification siret / email / ref
if (empty($siret) || empty($email) | empty($ref)){
$msg = 'Erreur email ou reférence non définie !';
}
// --- Vérification email
elseif ( empty($email) ){
$msg = 'Erreur email non définie !';
}
// --- Vérification ref
elseif ( empty($ref) ){
$msg = 'Erreur reférence non définie !';
} else {
// --- Vérification des emails
$emails = explode(';', $email);
$emailsValid = true;
foreach ( $emails as $e ) {
if ( !$validateur->isValid($e) ) {
$emailsValid = false;
break;
}
}
if ( $emailsValid ) {
//Vérification de l'encours (chiffres)
if (!preg_match('/([0-9]+)/', $encours)){
elseif (!preg_match('/([0-9]+)/', $encours)){
$msg = 'Encours incorrect';
} else {
if (!empty($delete)){
@ -200,12 +161,6 @@ class SurveillanceController extends Zend_Controller_Action
else { $msg = "Erreur lors de la mise sous surveillance $source"; }
}
}
} else {
$msg = "Email invalide.";
}
}
$this->view->assign('msg', $msg);
}
@ -252,7 +207,7 @@ class SurveillanceController extends Zend_Controller_Action
$filtre->detail = false;
$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) {
$titre = 'Ajouter une surveillance';
@ -310,7 +265,7 @@ class SurveillanceController extends Zend_Controller_Action
$this->view->headScript()
->appendFile('/libs/tablesorter/jquery.tablesorter.js', 'text/javascript')
->appendFile($this->theme->pathScript.'/surveillance.js', 'text/javascript');
->appendFile('/themes/default/scripts/surveillance.js', 'text/javascript');
$request = $this->getRequest();
@ -383,7 +338,7 @@ class SurveillanceController extends Zend_Controller_Action
$ws = new WsScores();
$infos = $ws->getSurveillances($filtre, $position, $nbAffichage);
$surveillances = isset($infos->result->item)?$infos->result->item:null;
$surveillances = $infos->result->item;
$listTrier = array();
if ( count($surveillances)>0 ) {
@ -425,12 +380,10 @@ class SurveillanceController extends Zend_Controller_Action
}
} else {
$pageTotal = $pageCurrent = 1;
$pagePrev = 1;
$pageNext = 1;
}
$this->view->assign('PageTotal', $pageTotal);
$this->view->assign('PagePrev', isset($pagePrev)?$pagePrev:1);
$this->view->assign('PageNext', isset($pageNext)?$pageNext:1);
$this->view->assign('PagePrev', $pagePrev);
$this->view->assign('PageNext', $pageNext);
$this->view->assign('PageCurrent', $pageCurrent);
$this->view->assign('nbReponses', empty($nbReponses) ? 0 : $nbReponses);
@ -453,12 +406,9 @@ class SurveillanceController extends Zend_Controller_Action
$this->_forward('perms', 'error');
}
$this->view->headLink()
->appendStylesheet('/libs/tablesorter/themes/blue/style.css', 'all');
$this->view->headScript()
->appendFile('/libs/tablesorter/jquery.tablesorter.js', 'text/javascript')
->appendFile($this->theme->pathScript.'/surveillance.js', 'text/javascript');
->appendFile('/themes/default/scripts/surveillance.js', 'text/javascript');
$request = $this->getRequest();
@ -509,15 +459,15 @@ class SurveillanceController extends Zend_Controller_Action
);
$couleurRisque100 = array(
'rouge' => array('min' => 0, 'max' => 40),
'orange' => array('min' => 41, 'max' => 50),
'vert' => array('min' => 51, 'max' => 100),
'rouge' => array('min'=>0, 'max'=>40),
'orange' => array('min'=>41, 'max'=>50),
'vert' => array('min'=>51, 'max'=>100),
);
$couleurRisque20 = array(
'rouge' => array('min' => 0, 'max' => 6),
'orange' => array('min' => 7, 'max' => 10),
'vert' => array('min' => 11, 'max' => 20),
'rouge' => array('min'=>0, 'max'=>6),
'orange' => array('min'=>7, 'max'=>10),
'vert' => array('min'=>11, 'max'=>20),
);
$ws = new WsScores();
@ -646,8 +596,6 @@ class SurveillanceController extends Zend_Controller_Action
}
} else {
$pageTotal = $pageCurrent = 1;
$pagePrev = 1;
$pageNext = 1;
}
$this->view->assign('PageTotal', $pageTotal);
$this->view->assign('PagePrev', $pagePrev);
@ -665,7 +613,7 @@ class SurveillanceController extends Zend_Controller_Action
*/
public function portefeuillecsvAction()
{
$this->view->headScript()->appendFile($this->theme->pathScript.'/portefeuillecsv.js', 'text/javascript');
$this->view->headScript()->appendFile('/themes/default/scripts/portefeuillecsv.js', 'text/javascript');
}
/**
@ -673,7 +621,7 @@ class SurveillanceController extends Zend_Controller_Action
*/
public function surveillancecsvAction()
{
$this->view->headScript()->appendFile($this->theme->pathScript.'/surveillancecsv.js', 'text/javascript');
$this->view->headScript()->appendFile('/themes/default/scripts/surveillancecsv.js', 'text/javascript');
$user = new Scores_Utilisateur();
@ -701,8 +649,6 @@ class SurveillanceController extends Zend_Controller_Action
*/
public function fichierAction()
{
ini_set('max_execution_time', 120);
$request = $this->getRequest();
$user = new Scores_Utilisateur();
@ -710,16 +656,23 @@ class SurveillanceController extends Zend_Controller_Action
$this->view->assign('login', $user->getLogin());
$this->view->assign('nom', $user->getNom());
$client = new Scores_Ws_Client('interne', '0.6');
$client = new SoapClient(null, array(
'trace' => 1,
'soap_version' => SOAP_1_1,
'location' => 'http://78.31.45.206/ws2/',
'uri' => 'http://78.31.45.206/',
'login' => $user->getLogin(),
'password' => $user->getPassword()
));
$nomFic = $request->getParam('nomFic', '');
$getCSV = $request->getParam('get', '');
$c = Zend_Registry::get('config');
$path = $c->profil->path->shared.'/files';
$path = $c->profil->path->files;
// --- Lister les fichiers
if (empty($nomFic)) {
//Lister les fichiers
if (empty($nomFic)){
$ref = $user->getPrenom();
if ( strtolower($user->getLogin())=='cnasea95'
|| strtolower($user->getLogin())=='cnasea96'
@ -734,25 +687,21 @@ class SurveillanceController extends Zend_Controller_Action
$ref='*';
}
try {
$params = new stdClass();
$params->login = $user->getLogin();
$params->ref = $ref;
$params->nomFic = '';
$response = $client->getListeFichierSurv($params);
$tabFichier = $response->result->item;
$O = $client->getListeFichierSurv($user->getLogin(), $ref, $nomFic);
$tabFichier = $O['results'];
} catch (SoapFault $fault) {}
$listeFichier = array();
foreach($tabFichier as $fichier){
$tabTmp = explode('_', $fichier->UrlFichier);
$tabTmp = explode('_', $fichier);
$date = new Zend_Date(substr($tabTmp[2],0,8),'yyyyMMdd');
$localfile = $path.'/'.basename($fichier->UrlFichier);
$localfile = $path.'/'.$fichier;
$dejaLu = false;
if (!file_exists($localfile)) {
$dejaLu = true;
}
$result = array(
'fichier' => basename($fichier->UrlFichier),
'fichier' => $fichier,
'date' => $date->toString('dd/MM/yyyy'),
'dejaLu' => $dejaLu,
);
@ -760,9 +709,9 @@ class SurveillanceController extends Zend_Controller_Action
}
$this->view->assign('listeFichier', $listeFichier);
}
// --- Lister les annonces
elseif (empty($getCSV)) {
//Lister les annonces
elseif (empty($getCSV))
{
$selectFiltre = array(
'procol' => array('lib'=> 'Procédures collectives', 'select'=>''),
'radiations' => array('lib'=> 'Radiations', 'select'=>''),
@ -807,21 +756,16 @@ class SurveillanceController extends Zend_Controller_Action
if (!file_exists($file) || filesize($file)==0 ) {
//Génération du fichier
try {
$params = new stdClass();
$params->login = $user->getLogin();
$params->ref = $ref;
$params->nomFic = $nomFic;
$response = $client->getListeFichierSurv($params);
$fileUrl = $response->result->item[0]->UrlFichier.'.bz2';
$O = $client->getListeFichierSurv($user->getLogin(), $user->getPrenom(), $nomFic);
} catch (SoapFault $fault) {}
try {
$client = new Zend_Http_Client($fileUrl);
$client = new Zend_Http_Client('http://78.31.45.206/csv/'.$nomFic.'.bz2');
$client->setStream();
$response = $client->request('GET');
if ( copy($response->getStreamName(), $file.'.bz2') ) {
$bz = bzopen($file.'.bz2', "r");
$fp = fopen($file, 'w');
$bz = bzopen($file.'.bz2', "r") or die("Impossible d'ouvrir le fichier $file");
$fp=fopen($file, 'w');
while (!feof($bz)) {
fwrite($fp, bzread($bz, 4096));
}
@ -898,10 +842,7 @@ class SurveillanceController extends Zend_Controller_Action
$this->view->assign('annonces', $tab);
$this->view->assign('nomFic', $nomFic);
$this->renderScript('surveillance/fichier-ann.phtml');
}
// --- Livraison du fichier
else {
} else {
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
@ -911,21 +852,16 @@ class SurveillanceController extends Zend_Controller_Action
if (!file_exists($file) || filesize($file)==0 ) {
//Génération du fichier
try {
$params = new stdClass();
$params->login = $user->getLogin();
$params->ref = $ref;
$params->nomFic = $nomFic;
$response = $client->getListeFichierSurv($params);
$fileUrl = $response->result->item[0]->UrlFichier.'.bz2';
$O = $client->getListeFichierSurv($user->getLogin(), $user->getPrenom(), $nomFic);
} catch (SoapFault $fault) {}
try {
$client = new Zend_Http_Client($fileUrl);
$client = new Zend_Http_Client('http://78.31.45.206/csv/'.$nomFic.'.bz2');
$client->setStream();
$response = $client->request('GET');
if ( copy($response->getStreamName(), $file.'.bz2') ) {
$bz = bzopen($file.'.bz2', "r");
$fp = fopen($file, 'w');
$bz = bzopen($file.'.bz2', "r") or die("Impossible d'ouvrir le fichier $file");
$fp=fopen($file, 'w');
while (!feof($bz)) {
fwrite($fp, bzread($bz, 4096));
}
@ -965,7 +901,14 @@ class SurveillanceController extends Zend_Controller_Action
$user = new Scores_Utilisateur();
$client = new Scores_Ws_Client('interne', '0.6');
$client = new SoapClient(null, array(
'trace' => 1,
'soap_version' => SOAP_1_1,
'location' => 'http://78.31.45.206/ws2/',
'uri' => 'http://78.31.45.206/',
'login' => $user->getLogin(),
'password' => $user->getPassword()
));
$nomFic = $request->getParam('q', '');
@ -988,23 +931,18 @@ class SurveillanceController extends Zend_Controller_Action
}
}
$c = Zend_Registry::get('config');
$path = $c->profil->path->shared.'/files';
$path = $c->profil->path->files;
//Récupération du fichier
$file = $path.'/'.$nomFic;
if (!file_exists($file) || filesize($file)==0 ) {
//Génération du fichier
try {
$params = new stdClass();
$params->login = $user->getLogin();
$params->ref = $ref;
$params->nomFic = $nomFic;
$response = $client->getListeFichierSurv($params);
$fileUrl = $response->item[0]->UrlFichier;
$O = $client->getListeFichierSurv($user->getLogin(), $user->getPrenom(), $nomFic);
} catch (SoapFault $fault) {}
try {
$client = new Zend_Http_Client($fileUrl);
$client = new Zend_Http_Client('http://78.31.45.206/csv/'.$nomFic.'.bz2');
$client->setStream();
$response = $client->request('GET');
if ( copy($response->getStreamName(), $file.'.bz2') ) {
@ -1147,7 +1085,7 @@ class SurveillanceController extends Zend_Controller_Action
}
$count++;
}
} else {
}else{
/*
* Fermeture de la balise page lorsqu'il n'y a aucune annonce
* afin de générer un fichier pdf vide et non pas une erreur
@ -1155,60 +1093,9 @@ class SurveillanceController extends Zend_Controller_Action
$output = '</page>';
}
// conversion HTML => PDF
require_once 'Vendors/html2pdf/html2pdf.class.php';
$html2pdf = new HTML2PDF('P','A4','fr');
$html2pdf->WriteHTML(utf8_decode($output));
$html2pdf->Output(str_replace('.csv', '.pdf', $nomFic), 'D');
}
/**
* Import surveillance en fichier csv
*/
public function surveillanceserieAction(){
//echo 'coucou';die;
$request = $this->getRequest();
if($request->getParam('ref')>""){
$cs=new Scores_Import_FileCsv();
$verif=$cs->verifandupload($_FILES,$request);
if($verif['success']){
$this->view->assign('msg', 'Nous avons enregistré votre fichier de '.$verif['message'].' lignes.<br><br>Les surveillances seront enregistrées durant la nuit.');
$this->view->assign('step', 2);
}else{
$this->view->assign('msg', $verif['message']);
$this->view->assign('step', 2);
}
return;
}
//Affichage formulaire demande ref et email
$this->_helper->layout->disableLayout();
$source = $request->getParam('source', '');
$encours = $request->getParam('encours', 0);
$this->view->pathScript=$this->theme->pathScript;
$this->view->pathStyle=$this->theme->pathStyle;
$user = new Scores_Utilisateur();
$request = $this->getRequest();
$source = $request->getParam('source');
$tabSource = array();
$user = new Scores_Utilisateur();
// Main email
$email = $user->getEmail();
$ref=$user->identity->id . 'surv'.Date('YmdHis');
foreach ($this->sourceDroit as $s => $perm) {
if ($user->checkPerm($perm)) {
$tabSource[] = array(
'value' => $s,
'name' => $this->sourceTxt[$s],
'select' => (!empty($source) && $source==$s) ? ' selected' : '',
);
}
}
$this->view->assign('tabSource', $tabSource);
$this->view->assign('email', $email);
$this->view->assign('ref', $ref);
$this->view->assign('encours', $encours);
$this->view->msg="Sélectionnez votre fichier";
}
}

View File

@ -0,0 +1,292 @@
<?php
class TelechargementController extends Zend_Controller_Action
{
/**
* Temps de mis en cache en heure
* @var interger
*/
protected $filetime = 8;
/**
* Répertoire de stockage pour le fichier
* @var string
*/
protected $path = '';
/**
* Vérifie ou télécharge le fichier sur une url
* @param string $url
* URL of file to download
* @param mixed $filename
* Override filename
*/
protected function getFile($url, $filename=null)
{
if (!is_dir($this->path)) mkdir($this->path);
// Recuperation du nom du fichier
if ($filename===null) {
$tableau = explode('/', $url);
$file = $tableau[sizeof($tableau) - 1];
} else {
$file = $filename;
}
// Suppression du fichier si le temps de cache est depasse
if (file_exists($this->path.'/'.$file)){
$dateFile = filemtime($this->path.'/'.$file);
$now = mktime(date('G'), date('i'), date('s'),
date('m') , date('d'), date('Y'));
$maxTime = mktime(date('G',$dateFile)+$this->filetime, date('i',$dateFile),
date('s',$dateFile), date('m',$dateFile),
date('d',$dateFile), date('Y',$dateFile));
if ($maxTime-$now<0) {
unlink($this->path.'/'.$file);
}
}
// Recuperation du fichier sur le serveur
if (file_exists($this->path.'/'.$file)) {
return $file;
} else {
// On check si le fichier est present sur l'url
try {
$client = new Zend_Http_Client($url);
$client->setStream();
$response = $client->request('GET');
if ( $response->isSuccessful() && copy($response->getStreamName(), $this->path.'/'.$file) ) {
return $file;
} else {
return false;
}
} catch (Zend_Http_Client_Exception $e) {
return false;
}
}
}
public function init()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$c = Zend_Registry::get('config');
$this->path = $c->profil->path->files;
require_once 'Scores/WsScores.php';
}
/**
* Télécharge la consommation client sous forme de fichier csv et affiche le lien
*/
public function consommationAction()
{
$this->filetime = 1;
$request = $this->getRequest();
$start = $request->getParam('start', false);
//On souhaite récupérer l'url du fichier
if ($start==1) {
$mois = $request->getParam('mois');
$detail = $request->getParam('detail', 0);
$idClient = $request->getParam('idClient', 0);
$login = $request->getParam('login', '');
$all = $request->getParam('all', 0);
$date = substr($mois, 3, 4).substr($mois, 0, 2);
$user = new Scores_Utilisateur();
if (empty($login) && (!$user->isAdmin() && !$user->isSuperAdmin()) ) {
$login = $user->getLogin();
}
$ws = new WsScores();
$reponse = $ws->getLogsClients($date, $detail, $idClient, $login, $all);
if (!empty($reponse->result->Url)) {
echo $reponse->result->Url;
} else {
echo 'FALSE';
}
} else {
$url = $request->getParam('url', '');
$file = $this->getFile($url);
// Le fichier existe sur l'extranet
if ($file && file_exists($this->path.'/'.$file)) {
if (filesize($this->path.'/'.$file) > 0) {
echo '<u><a title="T&eacute;l&eacute;charger le fichier"'.
' target="_blank" href="/fichier/consommation/'.$file.
'">Cliquez-ici pour t&eacute;l&eacute;charger'.
' le fichier.</a></u>';
} else {
echo 'Aucune consommmation enregistr&eacute;e.';
}
}
}
}
/**
* Télécharge les surveillances sous forme de fichier csv et affiche le lien
*/
public function surveillanceAction()
{
$this->filetime = 4;
$request = $this->getRequest();
$start = $request->getParam('start', false);
if ($start==1) {
$source = $request->getParam('source', '');
$user = new Scores_Utilisateur();
$login = $user->getLogin();
$idClient = $user->getIdClient();
$ws = new WsScores();
$reponse = $ws->getListeSurveillancesCsv($source, $login, $idClient);
if (!empty($reponse->result->Url)) {
echo $reponse->result->Url;
exit;
}
echo 'FALSE';
exit;
} else {
$url = $request->getParam('url', '');
$file = $this->getFile($url);
// Le fichier existe sur l'extranet
if ($file && file_exists($this->path.'/'.$file)) {
if (filesize($this->path.'/'.$file) > 0) {
echo '<u><a title="T&eacute;l&eacute;charger le fichier"'.
' target="_blank" href="/fichier/surveillance/'.$file.
'">Cliquez-ici pour t&eacute;l&eacute;charger'.
' le fichier.</a></u>';
} else {
echo 'Aucune surveillance enregistr&eacute;e.';
}
}
exit;
}
}
/**
* Télécharge le portefeuille sous forme de fichier csv et affiche le lien
* Enter description here ...
*/
public function portefeuilleAction()
{
$this->filetime = 4;
$request = $this->getRequest();
$start = $request->getParam('start', false);
if ($start==1) {
$user = new Scores_Utilisateur();
$login = $user->getLogin();
$idClient = $user->getIdClient();
$ws = new WsScores();
$reponse = $ws->getPortefeuilleCsv($login, $idClient);
if (!empty($reponse->result->Url)) {
echo $reponse->result->Url;
exit;
}
echo 'FALSE';
exit;
} else {
$url = $request->getParam('url', '');
$file = $this->getFile($url);
// Le fichier existe sur l'extranet
if ($file && file_exists($this->path.'/'.$file)) {
if (filesize($this->path.'/'.$file) > 0) {
echo '<u><a title="T&eacute;l&eacute;charger le fichier"'.
' target="_blank" href="/fichier/portefeuille/'.$file.
'">Cliquez-ici pour t&eacute;l&eacute;charger'.
' le fichier.</a></u>';
} else {
echo 'Aucune surveillance enregistr&eacute;e.';
}
}
exit;
}
}
/**
* Download pdf of bodacc history
*/
public function histopdfAction()
{
$request = $this->getRequest();
$q = $request->getParam('q', '');
$host = base64_decode($request->getParam('host', ''));
//Authenticate info
$auth = Zend_Auth::getInstance();
$identity = $auth->getIdentity();
$authinfo = '/login/'.$identity->username.'/hach/'.$identity->password;
$url = $host.$authinfo.'/q/'.$q;
Zend_Registry::get('firebug')->info($url);
$file = $this->getFile($url, uniqid('histo-').'.pdf');
// Le fichier existe sur l'extranet
if ($file && file_exists($this->path.'/'.$file)) {
if (filesize($this->path.'/'.$file) > 0) {
echo '<u><a title="T&eacute;l&eacute;charger le fichier"'.
' target="_blank" href="/fichier/histopdf/'.$file.
'">Cliquez-ici pour t&eacute;l&eacute;charger'.
' le fichier.</a></u>';
} else {
echo "Erreur lors du téléchargement du fichier.";
}
}
}
/**
* Download bilan pdf file
*/
public function bilanAction()
{
$this->filetime = 40;
$request = $this->getRequest();
$siren = $request->getParam('siren');
$dateCloture = $request->getParam('dateCloture');
$reference = $request->getParam('reference');
//Récupération du l'URL
require_once 'Scores/WsScores.php';
$ws = new WsScores();
$url = $ws->getPiecesBilan($siren, 'T', $dateCloture, $reference);
//Téléchargement
if( $url !== false) {
Zend_Registry::get('firebug')->info($url);
$file = $this->getFile($url);
Zend_Registry::get('firebug')->info('File:'.$this->path.'/'.$file);
// Le fichier existe sur l'extranet
if ($file && file_exists($this->path.'/'.$file)) {
if (filesize($this->path.'/'.$file) > 0) {
echo '<br/><u><a title="T&eacute;l&eacute;charger le fichier"'.
' target="_blank" href="/fichier/bilan/'.$file.
'">Cliquez-ici pour t&eacute;l&eacute;charger'.
' le fichier.</a></u>';
} else {
echo "<br/>Erreur lors du téléchargement du fichier.";
}
}
} else {
echo "<br/>Erreur.";
}
}
}

View File

@ -0,0 +1,642 @@
<?php
class UserController extends Zend_Controller_Action
{
public function init()
{
require_once 'Scores/WsScores.php';
$this->view->headLink()->appendStylesheet('/themes/default/styles/user.css', 'all');
}
/**
* Affiche le fomulaire d'edition des paramètres utilisateur
*/
public function indexAction()
{
$user = new Scores_Utilisateur();
if (!$user->checkPerm('MONPROFIL')){
$this->_forward('perms', 'error');
}
$this->view->assign('device_type', $user->getBrowserInfo()->mobile);
$this->view->assign('browser_info', $user->getBrowserInfo()->name.' '.$user->getBrowserInfo()->version);
$this->view->headLink()->appendStylesheet('/themes/default/styles/form.css', 'all');
$this->view->headScript()->appendFile('/themes/default/scripts/user.js', 'text/javascript');
$request = $this->getRequest();
$messages = '';
$isProfilUpdated = false;
$isPasswordUpdated = false;
$updateResult = false;
$ws = new WsScores();
$login = $request->getParam('login', '');
$op = $request->getParam('op');
//Récupération des informations de l'identité
$auth = Zend_Auth::getInstance();
$identity = $auth->getIdentity();
//Save data
if ( $request->isPost() ) {
$options = $request->getParam('frmOptions', '');
$action = $options['action'];
if ($login=='') $login = $options['login'];
//Enregistrement des données new & update
if (in_array($action, array('new','update'))) {
if ($options['changepwd']!=1) {
$options['password'] = '';
}
if ( in_array($options['profil'], array('Administrateur', 'SuperAdministrateur'))
&& !in_array('monprofil', $options['droits']) ) {
$options['droits'][] = 'monprofil';
}
if( !isset($options['profil']) ) {
$options['profil'] = 'Utilisateur';
}
$reponse = $ws->setInfosLogin($login, $action, $options);
$isProfilUpdated = true;
$message = 'Erreur lors de la mise à jour du compte !';
if (is_string($reponse)) {
$message = $reponse;
} elseif ($reponse){
$updateResult = true;
$message = 'Compte mis à jour.';
}
}
//Write change in session
if ($identity->idClient == $options['idClient'] && $identity->username == $login) {
//Modification lors du changement de mot de passe
if ($options['changepwd']==1 && $updateResult) {
$identity->password = md5($login.'|'.$options['password']);
$auth->getStorage()->write($identity);
}
//Mise à jour du profil
if ($isProfilUpdated && $updateResult) {
$InfosLogin = $ws->getInfosLogin($identity->username, $_SERVER['REMOTE_ADDR']);
$identity = $user->updateProfil($InfosLogin);
$auth->getStorage()->write($identity);
}
//Gestion mode edition en SESSION
if ($action=='update') {
$modeEdition = $request->getParam('modeEdition', false);
if ( $modeEdition ) {
$identity->modeEdition = true;
$auth->getStorage()->write($identity);
}
}
}
}
if ( $isProfilUpdated || $isPasswordUpdated ) {
$this->view->assign('message', $message);
}
$isAdmin = false;
if ( $identity->profil == 'Administrateur'
|| $identity->profil == 'SuperAdministrateur' ) {
$isAdmin = true;
}
$this->view->assign('isAdmin', $isAdmin);
$isSuperAdmin = false;
if ($identity->profil == 'SuperAdministrateur') {
$isSuperAdmin = true;
}
$this->view->assign('isSuperAdmin', $isSuperAdmin);
if ($op=='new')
{
$idClient = $request->getParam('idClient', '');
if ($idClient == '') {
$idClient = $identity->idClient;
}
$reponse = $ws->getNextLogin($idClient);
$options->idClient = $idClient;
if ($identity->idClient!=1 && $identity->profil!='SuperAdministrateur') {
$options->profil = 'Utilisateur';
}
$this->view->assign('options', $options);
$this->view->assign('loginNew', $reponse->result->racine);
$this->view->assign('droitsClients', explode(' ', strtolower($reponse->result->droitsClients)));
$this->view->assign('action', 'new');
$this->view->assign('pref', array());
}
elseif (!empty($op) || $op!='new')
{
if ( !empty($login) && $identity->username != $login ) {
Zend_Registry::get('firebug')->info('getInfosLogin');
$reponse = $ws->getInfosLogin($login, $_SERVER['REMOTE_ADDR']);
$this->view->assign('options', $reponse->result);
$this->view->assign('loginVu', $reponse->result->login);
$this->view->assign('droits', explode(' ', strtolower($reponse->result->droits)));
$this->view->assign('droitsClients', explode(' ', strtolower($reponse->result->droitsClients)));
} else {
$this->view->assign('options', $identity);
$this->view->assign('loginVu', $identity->username);
$this->view->assign('droits', explode(' ', strtolower($identity->droits)));
$this->view->assign('droitsClients', explode(' ', strtolower($identity->droitsClients)));
}
$this->view->assign('loginNew', '');
$this->view->assign('action', 'update');
$this->view->assign('pref', explode(' ',$identity->pref));
}
//Liste des catégories des accès
$reponse = $ws->getCategory();
$wscategory = $reponse->item;
$this->view->assign('wscategory', $wscategory);
//Liste de tous les droits
$listeDroits = $ws->getListeDroits();
$droitsLib = array();
foreach($listeDroits->item as $droit) {
$droitsLib[strtoupper($droit->code)] = $droit->desc;
}
$this->view->assign('droitsLib', $droitsLib);
//Liste de toutes les préférences
$listePrefs = $ws->getListePrefs();
$prefsLib = array();
foreach($listePrefs->item as $pref) {
$prefsLib[strtoupper($pref->code)] = $pref->desc;
}
$this->view->assign('prefsLib', $prefsLib);
}
/**
* Display box to enter emails
* One main email and two secondary
* Email length 80 * 3 = 240
* 255 chars is the length to store emails (email1;email2;email3)
*/
public function emailsAction()
{
$this->_helper->layout()->disableLayout();
$nbEmails = 3;
$request = $this->getRequest();
$emails = $request->getParam('q');
if (null !== $emails) {
$emailList = explode(';', $emails);
if ( count($emailList)>0 ) {
$i = 1;
foreach ( $emailList as $email ) {
$this->view->assign('email'.$i, $email);
$i++;
}
}
}
}
/**
* Validate email
*/
public function emailvalidAction()
{
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$email = $request->getParam('q');
$valid = false;
if (null !== $email) {
$validateur = new Zend_Validate_EmailAddress();
$valid = $validateur->isValid($email);
}
$result = array(
'valid' => $valid,
);
$this->view->assign('result', $result);
}
/**
* Téléchargement de la consommation au format CSV
*/
public function consoAction()
{
$this->view->headScript()->appendFile('/themes/default/scripts/conso.js', 'text/javascript');
$user = new Scores_Utilisateur();
$request = $this->getRequest();
$idClient = $request->getParam('idClient', $user->getIdClient());
$login = $request->getParam('login', '');
$this->view->assign('idClient', $idClient);
$this->view->assign('login', $login);
$this->view->assign('profil', $user->getProfil());
}
/**
* Renvoi vers le formulaire utilisateur avec les paramètres de la requete
*/
public function editAction()
{
$params = $this->getRequest()->getParams();
$this->_forward('index', 'user', null, $params);
}
/**
* Suppression d'un utilisateur
*/
public function deleteAction()
{
$request = $this->getRequest();
$login = $request->getParam('login');
$action = 'delete';
$ws = new WsScores();
$ws->setInfosLogin($login, $action);
//Redirect
$this->_forward('liste');
}
/**
* Activation d'un utilisateur
*/
public function enableAction()
{
$request = $this->getRequest();
$login = $request->getParam('login');
$action = 'enable';
$ws = new WsScores();
$ws->setInfosLogin($login, $action);
//Redirect
$this->_forward('liste');
}
/**
* Désactivation d'un utilisateur
*/
public function disableAction()
{
$request = $this->getRequest();
$login = $request->getParam('login');
$action = 'disable';
$ws = new WsScores();
$ws->setInfosLogin($login, $action);
//Redirect
$this->_forward('liste');
}
/**
* Méthode AJAX pour modifier le password d'un utilisateur
*/
public function changepwdAction()
{
//Redirect
}
/**
* Affiche la liste des utiliateurs
*/
public function listeAction()
{
$user = new Scores_Utilisateur();
$request = $this->getRequest();
$idClient = $request->getParam('idClient', $user->getIdClient());
if (!$user->isSuperAdmin() && !$user->isAdmin()) {
$this->renderScript('error/perms.phtml');
}
if ($user->isAdmin()){
$idClient = $user->getIdClient();
}
$ws = new WsScores();
$infos = $ws->getListeUtilisateurs($user->getLogin(), $idClient);
$utilisateurs = $infos->result->item;
$this->view->assign('utilisateurs', $utilisateurs);
$this->view->assign('idClient', $idClient);
}
/**
* Gestion de l'authentification
*/
public function loginAction()
{
$this->view->headScript()
->appendFile('/libs/jquery/jquery.infieldlabel.min.js');
//@todo : gestion des affichages particuliers pour les clients
$this->view->headTitle()->append('Connexion');
$form = new Application_Form_Login();
$this->view->form = $form;
$request = $this->getRequest();
if ( $request->isPost() ) {
$formData = $request->getPost();
if ($form->isValid($formData)) {
$login = $form->getValue('login');
$pass = $form->getValue('pass');
$auth = Zend_Auth::getInstance();
$authAdapter = new Scores_Auth_Adapter_Ws($login, md5($login.'|'.$pass));
$result = $auth->authenticate($authAdapter);
//Auth is valid
if ( $result->isValid() ) {
//Save browser information
$screenSize = $request->getParam('screenSize', 'unknow');
$user = new Scores_Utilisateur();
$info = get_browser();
$isMobile = ($info->ismobiledevice==1) ? 1 : 0;
$user->setBrowserInfo($info->platform, $info->browser, $info->version, $isMobile, $screenSize);
//Get previous url if user has been disconnected
$url = '';
if (Zend_Session::namespaceIsset('login')){
$session = new Zend_Session_Namespace('login');
if (isset($session->url)) {
$url = $session->url;
}
}
if (!empty($url) && $url!='/user/login' && $url!='/user/logout' && $url!='/localauth'){
$this->_redirect($url);
}
$this->_redirect('/');
}
//Auth error
else {
$this->view->message = '';
Zend_Registry::get('firebug')->info($result);
foreach ($result->getMessages() as $message) {
$this->view->message.= $message."<br/>";
}
}
}
}
$this->_helper->layout()->disableLayout();
}
/**
* Gestion de la déconnexion
*/
public function logoutAction()
{
Zend_Auth::getInstance()->clearIdentity();
$session = new Zend_Session_Namespace('wcheck');
$session->unsetAll();
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$message = $request->getParam('message');
$this->view->assign('message', $message);
$ajax = $request->getParam('ajax', 0);
$this->view->assign('ajax', $ajax);
$refresh = 5;
$url = 'http://'.$_SERVER['SERVER_NAME'].$this->view->url(array(
'controller' => 'user',
'action' => 'login',
), null, true);
$this->view->assign('url', $url);
if (!$ajax) {
$this->view->assign('refresh', $refresh);
$this->view->headMeta()->appendHttpEquiv('refresh', $refresh.'; url='.$url);
}
}
/**
* Mettre à jour le mode edition en session sans refresh de la page
*/
public function editionsessionAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$request = $this->getRequest();
$mode = $request->getParam('mode', 'false');
$auth = Zend_Auth::getInstance();
$identity = $auth->getIdentity();
if ($identity->idClient == 1) {
if ($mode == 'false') {
$identity->modeEdition = false;
echo 0;
} else {
$identity->modeEdition = true;
echo 1;
}
$auth->getStorage()->write($identity);
} else {
echo 0;
}
}
/**
* Override email in surveillance portfolio
*/
public function emailsurveillanceAction()
{
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$user = new Scores_Utilisateur();
//Execute webservice operation
if ( $request->isPost() ) {
$email = trim($request->getParam('email'));
if ($user->isAdmin() || $user->isSuperAdmin()) {
$login = $request->getParam('login');
}
if (empty($email)) {
$result = "Aucun email défini!";
} else if (empty($login)) {
$result = "Aucun utilisateur défini!";
} else {
$ws = new WsScores();
$result = $ws->setSurveillancesMail($login, $email);
}
$this->view->assign('result', $result);
}
//Display form in dialog
else {
if ($user->isAdmin() || $user->isSuperAdmin()) {
$login = $request->getParam('login');
} else {
$login = $user->getLogin();
}
$this->view->assign('login', $login);
$this->view->assign('dialog',true);
}
}
/**
* Changer la langue de l'utilisateur
*/
public function langAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$lang = $this->getRequest()->getParam('lang', null);
$auth = Zend_Auth::getInstance();
$identity = $auth->getIdentity();
$identity->langtmp = $lang;
$auth->getStorage()->write($identity);
}
/**
* Changer le theme de l'utilisateur
*/
public function changethemeAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$request = $this->getRequest();
$nom = $request->getParam('nom', 'default');
$auth = Zend_Auth::getInstance();
$identity = $auth->getIdentity();
$identity->theme = $nom;
$auth->getStorage()->write($identity);
//Rediriger vers l'écran de recherche
$this->_redirect('/');
}
/**
* Display browser informations on a simple page
*/
public function browserAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
//Load bootstrap
$bootstrap = Zend_Controller_Front::getInstance()->getParam('bootstrap');
//Get useragent and device informations
$userAgent = $bootstrap->getResource('useragent');
$device = $userAgent->getDevice();
//Display
echo "<pre>";
print_r(get_browser());
print_r($device->getAllFeatures());
echo "</pre>";
}
/**
* Sends email to the specific client, who requests for forgotten password
*/
public function motpasseAction()
{
$request = $this->getRequest();
$name = 'Identifiants oubliés ?';
$params = array(
'identifiant' => '',
'telephone' => '',
'email' => '',
'nom' => '',
'prenom' => '',
'fonction' => '',
'service' => '',
'rsociale' => '',
);
$this->_helper->layout()->disableLayout();
if ( $request->isPost() ) {
$params = $request->getParams();
$message = '';
$paramlist = array(
'telephone' => 'Numéro de téléphone direct',
'email' => 'Adresse email',
'nom' => 'Nom',
'prenom' => 'Prénom',
'fonction' => 'Fonction',
'service' => 'Service',
'rsociale' => 'Sociale',
);
foreach ($paramlist as $item => $val) {
if (!isset($params[$item])) {
$message .= "Champs $val vide !<br/>";
}
}
$validator = new Zend_Validate_EmailAddress();
if (isset($params['email'])){
if (!$validator->isValid($params['email'])) {
$message .="Adresse email invalide ! <br/>";
}
}
if ($message == '') {
$mailbody = '<style type="text/css">table {font-family:Arial, Helvetica, sans-serif; font-size: 12px; width: 550px; border: none;}table td{padding: 4px 8px;}</style>';
$mailbody .= "Demande d'envoi des identifiants.<br /><br />";
$mailbody .= "L'un de nos clients a égaré son(ses) identifiant(s).<br />";
$mailbody .= "Via notre lien -identifiants oubliés- il a effectué une demande de transmission de ces codes.<br />";
$mailbody .= "<p>A l'aide des informations ci-dessous, merci de retrouver ces codes et les lui envoyer par email.</p>";
$mailbody .= "<table><tr bgcolor='#eeeeee'><td width='200px'><strong>Identifiant :</strong></td><td>".$params['identifiant']."</td></tr>";
$mailbody .= "<tr><td><strong>Adresse email:</strong></td><td>".$params['email']."</td></tr>";
$mailbody .= "<tr bgcolor='#eeeeee'><td><strong>Numéro de téléphone direct:</strong></td><td>".$params['telephone']."</td></tr>";
$mailbody .= "<tr><td><strong>Nom:</strong></td><td>".$params['nom']."</td></tr>";
$mailbody .= "<tr bgcolor='#eeeeee'><td><strong>Prénom:</strong></td><td>".$params['prenom']."</td></tr>";
$mailbody .= "<tr><td><strong>Fonction:</strong></td><td>".$params['fonction']."</td></tr>";
$mailbody .= "<tr bgcolor='#eeeeee'><td><strong>Service:</strong></td><td>".$params['service']."</td></tr>";
$mailbody .= "<tr><td><strong>Dénomination Sociale:</strong></td><td>".$params['rsociale']."</td></tr></table>";
$mailbody .= "<p>Si les informations fournies ne permettent pas d'identifier correctement l'utilisateur, ";
$mailbody .= "merci d'émettre un message sur le mail communiquer en précisant que \"Les éléments confiés ne permettent pas d'identifier l'utilisateur ";
$mailbody .= "et par conséquence de vous délivrer les codes d'accès demandés\".<br />";
$mailbody .= "Aussi nous vous invitons à vous rapprocher de votre interlocuteur commercial habituel ";
$mailbody .= "ou de votre responsable suivi relations Scores & Décisions au sein de votre société.</p>";
$mail = new Scores_Mail();
$mail->setSubject("Demande d'envoi des identifiants");
$mail->setBodyHTML($mailbody);
$mail->setFrom('support');
$mail->addToKey('support');
$mail->setReplyTo($params['email']);
try {
$mail->send();
$this->view->assign('sendEmail' , true);
}
catch ( Zend_Mail_Transport_Exception $e ){
$message = $e->getMessage();
}
}
$this->view->assign('message', $message);
}
}
}

View File

@ -1,24 +1,10 @@
<?php
class WorldcheckController extends Zend_Controller_Action
{
protected $theme;
protected $wcConfig;
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init()
{
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme
$this->theme = Zend_Registry::get('theme');
require_once 'WorldCheck/WsWorldCheck.php';
require_once 'Scores/Cache.php';

Binary file not shown.

View File

@ -1,8 +1,8 @@
msgid ""
msgstr ""
"Project-Id-Version: Extranet2.4\n"
"POT-Creation-Date: 2014-04-24 09:31+0100\n"
"PO-Revision-Date: 2014-04-24 09:32+0100\n"
"POT-Creation-Date: 2013-12-26 11:07+0100\n"
"PO-Revision-Date: 2013-12-26 11:18+0100\n"
"Last-Translator: Michael RICOIS <mricois@scores-decisions.com>\n"
"Language-Team: SND-A\n"
"Language: en\n"
@ -31,87 +31,80 @@ msgstr "News"
msgid "Banque de France - "
msgstr "BANK OF FRANCE"
#: application/controllers/DirigeantController.php:27
#: application/controllers/DirigeantController.php:23
#: application/languages/totranslate.php:20
msgid "Liste des dirigeants"
msgstr "List of managers"
#: application/controllers/DirigeantController.php:28
#: application/controllers/DirigeantController.php:69
#: application/controllers/DirigeantController.php:98
#: application/controllers/EvaluationController.php:70
#: application/controllers/EvaluationController.php:164
#: application/controllers/EvaluationController.php:196
#: application/controllers/EvaluationController.php:355
#: application/controllers/EvaluationController.php:584
#: application/controllers/EvaluationController.php:694
#: application/controllers/EvaluationController.php:799
#: application/controllers/EvaluationController.php:950
#: application/controllers/DirigeantController.php:24
#: application/controllers/DirigeantController.php:64
#: application/controllers/DirigeantController.php:93
#: application/controllers/EvaluationController.php:76
#: application/controllers/EvaluationController.php:108
#: application/controllers/EvaluationController.php:267
#: application/controllers/EvaluationController.php:496
#: application/controllers/EvaluationController.php:606
#: application/controllers/EvaluationController.php:711
#: application/controllers/EvaluationController.php:862
#: application/controllers/FinanceController.php:39
#: application/controllers/FinanceController.php:215
#: application/controllers/FinanceController.php:465
#: application/controllers/FinanceController.php:826
#: application/controllers/FinanceController.php:979
#: application/controllers/FinanceController.php:1021
#: application/controllers/FinanceController.php:1042
#: application/controllers/FinanceController.php:1286
#: application/controllers/FinanceController.php:1311
#: application/controllers/IdentiteController.php:1476
#: application/controllers/IdentiteController.php:1493
#: application/controllers/JuridiqueController.php:226
#: application/controllers/JuridiqueController.php:276
#: application/controllers/JuridiqueController.php:322
#: application/controllers/JuridiqueController.php:343
#: application/controllers/FinanceController.php:972
#: application/controllers/FinanceController.php:1014
#: application/controllers/FinanceController.php:1035
#: application/controllers/FinanceController.php:1279
#: application/controllers/FinanceController.php:1304
#: application/controllers/IdentiteController.php:1398
#: application/controllers/IdentiteController.php:1415
#: application/controllers/JuridiqueController.php:224
#: application/controllers/JuridiqueController.php:274
#: application/controllers/JuridiqueController.php:320
#: application/controllers/JuridiqueController.php:341
msgid "Siret "
msgstr "Siret"
#: application/controllers/DirigeantController.php:68
#: application/controllers/DirigeantController.php:63
#: application/languages/totranslate.php:21
#: application/views/default/scripts/dirigeant/histo.phtml:29
msgid "Historique des dirigeants"
msgstr "History of Managers"
#: application/controllers/DirigeantController.php:97
#: application/controllers/DirigeantController.php:92
msgid "Liste des dirigeants opérationnels"
msgstr "List of operational managers"
#: application/controllers/EvaluationController.php:69
#, fuzzy
msgid "Historique indiScore"
msgstr "INDISCORE"
#: application/controllers/EvaluationController.php:163
#: application/controllers/EvaluationController.php:75
#: application/languages/totranslate.php:44
#: application/views/default/scripts/evaluation/indiscorehisto.phtml:28
msgid "IndiScore"
msgstr "IndiScore"
#: application/controllers/EvaluationController.php:195
#: application/controllers/EvaluationController.php:107
#: application/languages/totranslate.php:45
msgid "Rapport de synthèse"
msgstr "Synthesis Report"
#: application/controllers/EvaluationController.php:354
#: application/controllers/EvaluationController.php:266
#: application/languages/totranslate.php:46
msgid "Rapport complet"
msgstr "Full report"
#: application/controllers/EvaluationController.php:583
#: application/controllers/EvaluationController.php:495
#, fuzzy
msgid "Enquete commerciale"
msgstr "Commercial survey"
#: application/controllers/EvaluationController.php:693
#: application/controllers/EvaluationController.php:605
#, fuzzy
msgid "Avis de crédit"
msgstr "Reviews custom credit"
#: application/controllers/EvaluationController.php:798
#: application/controllers/EvaluationController.php:710
#: application/languages/totranslate.php:48
msgid "Scoring Credit Safe"
msgstr "Scoring Credit Safe"
#: application/controllers/EvaluationController.php:949
#: application/controllers/EvaluationController.php:861
#: application/languages/totranslate.php:47
msgid "Valorisation"
msgstr "Valuation"
@ -124,7 +117,7 @@ msgstr "Financial situation"
#: application/controllers/FinanceController.php:214
#, fuzzy
msgid "Bilan, Compte de résultat"
msgstr "Income Statement"
msgstr "Balances, Income statement"
#: application/controllers/FinanceController.php:464
#: application/languages/totranslate.php:25
@ -136,38 +129,37 @@ msgstr "Ratios"
msgid "Liasse fiscale"
msgstr "Tax return"
#: application/controllers/FinanceController.php:978
#: application/controllers/FinanceController.php:971
#: application/languages/totranslate.php:28
msgid "Bourse & Cotations"
msgstr "Purse & Quotes"
#: application/controllers/FinanceController.php:1020
#: application/controllers/FinanceController.php:1013
msgid "Relations Banquaires"
msgstr "Bank Account"
#: application/controllers/FinanceController.php:1041
#: application/controllers/FinanceController.php:1034
#: application/languages/totranslate.php:26
msgid "Flux de trésorerie"
msgstr "Cash flow"
#: application/controllers/FinanceController.php:1285
#: application/controllers/FinanceController.php:1278
msgid "Subventions"
msgstr ""
#: application/controllers/FinanceController.php:1310
#: application/controllers/FinanceController.php:1303
msgid "Subvention"
msgstr ""
#: application/controllers/IdentiteController.php:58
#, fuzzy
msgid "Fiche Identité - "
msgstr "See identity card"
#: application/controllers/IdentiteController.php:52
msgid "Identité - "
msgstr "Identity -"
#: application/controllers/IdentiteController.php:202
#: application/controllers/IdentiteController.php:203
msgid "Fiche procédure collective - "
msgstr "Legal review -"
#: application/controllers/IdentiteController.php:313
#: application/controllers/IdentiteController.php:314
msgid "Liste des établissements - Siren "
msgstr "Branch List - Siren "
@ -175,63 +167,41 @@ msgstr "Branch List - Siren "
msgid "Liens inter-entreprises - Id "
msgstr "Associated Links - Id "
#: application/controllers/IdentiteController.php:607
#: application/controllers/IdentiteController.php:599
msgid "Liens inter-entreprises - Siren "
msgstr "Associated Links - Siren "
#: application/controllers/IdentiteController.php:1006
#: application/controllers/IdentiteController.php:976
msgid "Evènements - Siren "
msgstr "INSEE events - Siren"
#: application/controllers/IdentiteController.php:1475
#: application/controllers/IdentiteController.php:1397
msgid "Groupe"
msgstr "Parent Company"
#: application/controllers/IdentiteController.php:1492
#: application/controllers/IdentiteController.php:1414
msgid "Contacts"
msgstr "Contacts"
#: application/controllers/JuridiqueController.php:178
#, fuzzy
msgid "Annonces Légales - "
msgstr "Legal Notices"
#: application/controllers/JuridiqueController.php:225
#: application/controllers/JuridiqueController.php:223
#, fuzzy
msgid "Informations Réglementées"
msgstr "Informations"
#: application/controllers/JuridiqueController.php:275
#: application/controllers/JuridiqueController.php:273
#: application/languages/totranslate.php:33
msgid "Compétences Territoriales"
msgstr "Territorial competences"
#: application/controllers/JuridiqueController.php:321
#: application/controllers/JuridiqueController.php:319
#, fuzzy
msgid "Conventions Collectives"
msgstr "Collective agreements"
#: application/controllers/JuridiqueController.php:342
#: application/controllers/JuridiqueController.php:340
msgid "Marques Déposées"
msgstr "Trademarks"
#: application/controllers/PiecesController.php:682
#, fuzzy
msgid "Votre demande de reception de Kbis par email a été prise en compte"
msgstr "Receive kbis by email"
#: application/controllers/PiecesController.php:736
#, fuzzy
msgid ""
"Votre commande à été prise en compte, vous recevrez ce document sous 3/5 "
"jours"
msgstr "You have been disconnected"
#: application/controllers/PiecesController.php:743
#, fuzzy
msgid "Erreur : Tous les champs doivent être renseigner."
msgstr "All users"
#: application/controllers/RechercheController.php:29
msgid "Recherche Entreprise"
msgstr "Search Company"
@ -262,36 +232,12 @@ msgstr "List of recent searches"
msgid "Enquête"
msgstr "Investigation"
#: application/controllers/SaisieController.php:333
#: application/controllers/SaisieController.php:2162
#: application/controllers/SaisieController.php:134
#: application/controllers/SaisieController.php:1961
msgid "Saisie - "
msgstr "Edit - "
#: application/controllers/SaisieController.php:2648
#, fuzzy
msgid "Ajout"
msgstr "Add the"
#: application/controllers/SaisieController.php:2650
msgid "Edition"
msgstr "Edit"
#: application/controllers/SaisieController.php:2652
#, fuzzy
msgid "Suppression"
msgstr "Print"
#: application/controllers/SaisieController.php:2658
#, fuzzy
msgid "a été réussi!"
msgstr "You have been disconnected"
#: application/controllers/SaisieController.php:2660
#, fuzzy
msgid "n'a pas été réussi!"
msgstr "You have been disconnected"
#: application/controllers/UserController.php:395
#: application/controllers/UserController.php:346
msgid "Connexion"
msgstr "Connextion"
@ -547,13 +493,13 @@ msgstr "Siren identification number"
msgid "Dénomination Sociale"
msgstr "Company Name"
#: application/views/default/scripts/dirigeant/histo.phtml:41
#: application/views/default/scripts/dirigeant/histo.phtml:40
msgid "Modification le"
msgstr "Change done the"
#: application/views/default/scripts/dirigeant/histo.phtml:51
#: application/views/default/scripts/dirigeant/histo.phtml:58
#: application/views/default/scripts/dirigeant/liste.phtml:119
#: application/views/default/scripts/dirigeant/op.phtml:130
#: application/views/default/scripts/dirigeant/op.phtml:86
msgid "Aucune donn&eacute;e n'est pr&eacute;sente dans notre base"
msgstr "No data is present in our database"
@ -571,7 +517,7 @@ msgid "Recherche à partir de la dénomination sociale"
msgstr "Search from the company name"
#: application/views/default/scripts/dirigeant/liste.phtml:70
#: application/views/default/scripts/dirigeant/op.phtml:65
#: application/views/default/scripts/dirigeant/op.phtml:62
msgid "Recherche à partir du nom du dirigeant"
msgstr "Search from the name of manager"
@ -587,86 +533,18 @@ msgstr "Add a shareholder"
msgid "DIRIGEANTS OP&Eacute;RATIONNELS"
msgstr "OPERATIONAL MANAGERS"
#: application/views/default/scripts/dirigeant/op.phtml:38
#, fuzzy
msgid "Ajouter un dirigeant"
msgstr "Add a shareholder"
#: application/views/default/scripts/dirigeant/op.phtml:53
#: application/views/default/scripts/dirigeant/op.phtml:50
msgid "Recherche à partir de la Dénomination sociale"
msgstr "Search from the Companyname"
#: application/views/default/scripts/dirigeant/op.phtml:75
#: application/views/default/scripts/identite/lienfiche.phtml:21
#, fuzzy
msgid "le"
msgstr "Add the"
#: application/views/default/scripts/dirigeant/op.phtml:79
#: application/views/default/scripts/identite/lienfiche.phtml:25
#, fuzzy
msgid "à"
msgstr "Born in"
#: application/views/default/scripts/dirigeant/op.phtml:84
#, fuzzy
msgid "né(e)"
msgstr "Born in"
#: application/views/default/scripts/dirigeant/op.phtml:86
#, fuzzy
msgid "né"
msgstr "Born in"
#: application/views/default/scripts/dirigeant/op.phtml:88
#, fuzzy
msgid "née"
#: application/views/default/scripts/dirigeant/op.phtml:69
#: application/views/default/scripts/dirigeant/op.phtml:74
msgid "né(e) le"
msgstr "born the"
#: application/views/default/scripts/evaluation/indiscore.phtml:41
#, fuzzy
msgid "Consulter l'historique des IndiScore"
msgstr "Check the list of operational managers"
#: application/views/default/scripts/evaluation/indiscorehisto.phtml:3
#, fuzzy
msgid "HISTORIQUE INDISCORE"
msgstr "INDISCORE"
#: application/views/default/scripts/evaluation/indiscorehisto.phtml:8
#, fuzzy
msgid "Numéro identifiant Siren"
msgstr "Siret identification number"
#: application/views/default/scripts/evaluation/indiscorehisto.phtml:13
#, fuzzy
msgid "Dénomination sociale"
msgstr "Company Name"
#: application/views/default/scripts/evaluation/indiscorehisto.phtml:19
#, fuzzy
msgid "Historique des scores"
msgstr "History of bodacc announces"
#: application/views/default/scripts/evaluation/indiscorehisto.phtml:27
#, fuzzy
msgid "Date"
msgstr "Registration date"
#: application/views/default/scripts/evaluation/indiscorehisto.phtml:29
#, fuzzy
msgid "Motif du changement"
msgstr "Search from the name of manager"
#: application/views/default/scripts/evaluation/indiscorehisto.phtml:51
#, fuzzy
msgid "Impossible de générer le graphique"
msgstr "Modify password"
#: application/views/default/scripts/evaluation/indiscorehisto.phtml:58
#, fuzzy
msgid "Aucune information sur l'historique disponible."
msgstr "No IP"
#: application/views/default/scripts/dirigeant/op.phtml:76
msgid "né(e) à"
msgstr "born in"
#: application/views/default/scripts/identite/etablissements.phtml:2
msgid "LISTE DES &Eacute;TABLISSEMNTS"
@ -700,7 +578,7 @@ msgstr "Inactive"
msgid "Tous"
msgstr "All"
#: application/views/default/scripts/identite/etablissements.phtml:69
#: application/views/default/scripts/identite/etablissements.phtml:75
msgid "Voir la fiche d'identité"
msgstr "See the copany identity"
@ -720,134 +598,6 @@ msgstr "Company name &amp; Contacts"
msgid "Activité(s) &amp; Chiffre d'affaires"
msgstr "Activities &amp; Turnover"
#: application/views/default/scripts/identite/lienfiche.phtml:30
#, fuzzy
msgid "Né(e)"
msgstr "Born in"
#: application/views/default/scripts/identite/lienfiche.phtml:32
#, fuzzy
msgid "Né"
msgstr "Born in"
#: application/views/default/scripts/identite/lienfiche.phtml:34
#, fuzzy
msgid "Née"
msgstr "None"
#: application/views/default/scripts/pieces/commande.phtml:39
#, fuzzy
msgid "K-Bis inexistant pour cette forme juridique"
msgstr "Legal form"
#: application/views/default/scripts/pieces/commande.phtml:46
#, fuzzy
msgid "Visualiser/Télécharger le kbis"
msgstr "Receive kbis by email"
#: application/views/default/scripts/pieces/commande.phtml:59
msgid "Recevoir le kbis par email"
msgstr "Receive kbis by email"
#: application/views/default/scripts/pieces/commande.phtml:60
msgid "Recevoir le kbis original par courrier"
msgstr "Receive the original kbis by mail"
#: application/views/default/scripts/pieces/commande.phtml:62
#, fuzzy
msgid ""
"Les pièces demandées seront commandées par courrier auprès du greffe. "
"Prévoir un délai de 2 à 3 semaines."
msgstr "Receive the original kbis by mail"
#: application/views/default/scripts/pieces/commande.phtml:72
#: application/views/default/scripts/pieces/commande.phtml:104
#, fuzzy
msgid "Commande de KBIS demandé pour la société"
msgstr "SOCIETY"
#: application/views/default/scripts/pieces/commande.phtml:73
#, fuzzy
msgid ""
"Vous recevrez un email (sous 3/5 jours ouvrés) lorsque le document sera "
"disponible."
msgstr "Link a document"
#: application/views/default/scripts/pieces/commande.phtml:77
#: application/views/default/scripts/pieces/commande.phtml:108
#, fuzzy
msgid "Votre email"
msgstr "Receive kbis by email"
#: application/views/default/scripts/pieces/commande.phtml:84
#: application/views/default/scripts/pieces/commande.phtml:114
#, fuzzy
msgid "Votre référence"
msgstr "Your Reference"
#: application/views/default/scripts/pieces/commande.phtml:87
#: application/views/default/scripts/pieces/commande.phtml:116
msgid "(facultatif)"
msgstr ""
#: application/views/default/scripts/pieces/commande.phtml:92
#: application/views/default/scripts/pieces/commande.phtml:144
msgid "Valider"
msgstr "Validate"
#: application/views/default/scripts/pieces/commande.phtml:96
#, fuzzy
msgid "Commande impossible. L'email de votre compte est invalide."
msgstr "Exporting your portfolio"
#: application/views/default/scripts/pieces/commande.phtml:105
#, fuzzy
msgid ""
"Vous recevrez un email (sous 2 à 3 semaines) lorsque le document sera "
"disponible."
msgstr "Link a document"
#: application/views/default/scripts/pieces/commande.phtml:119
#, fuzzy
msgid "Votre Societe"
msgstr "Your profile"
#: application/views/default/scripts/pieces/commande.phtml:123
#, fuzzy
msgid "Votre Nom"
msgstr "Last name"
#: application/views/default/scripts/pieces/commande.phtml:127
#, fuzzy
msgid "Votre Prenom"
msgstr "Your profile"
#: application/views/default/scripts/pieces/commande.phtml:131
#, fuzzy
msgid "Votre Adresse"
msgstr "Address"
#: application/views/default/scripts/pieces/commande.phtml:135
#, fuzzy
msgid "Votre Code Postal"
msgstr "Code :"
#: application/views/default/scripts/pieces/commande.phtml:139
#, fuzzy
msgid "Votre Ville"
msgstr "City"
#: application/views/default/scripts/pieces/commande.phtml:148
#, fuzzy
msgid "Commande impossible. L'email de votre compte est invalide"
msgstr "Exporting your portfolio"
#: application/views/default/scripts/pieces/commande.phtml:157
#: application/views/default/scripts/pieces/commande.phtml:226
#, fuzzy
msgid "Vous n'avez pas les droits d'accès pour cette fonctionalité."
msgstr "Permissions"
#: application/views/default/scripts/recherche/actionnaire.phtml:6
msgid "RECHERCHE PAR ACTIONNAIRE"
msgstr "SEARCH BY SHAREHOLDER"
@ -867,82 +617,20 @@ msgstr "SEARCH A COMPANY"
#: application/views/default/scripts/recherche/refclient.phtml:1
#, fuzzy
msgid "RECHERCHE SURVEILLANCE"
msgstr "Monitoring"
msgstr "Search"
#: application/views/default/scripts/recherche/worldcheck.phtml:4
#, fuzzy
msgid "RECHERCHE WORLDCHECK"
msgstr "Search in WorldCheck"
#: application/views/default/scripts/saisie/diropcontrol-form.phtml:10
#, fuzzy
msgid "Civilité"
msgstr "Solvency :"
#: application/views/default/scripts/saisie/diropcontrol-form.phtml:23
msgid "Nom"
msgstr "Last name"
#: application/views/default/scripts/saisie/diropcontrol-form.phtml:30
msgid "Prenom"
msgstr ""
#: application/views/default/scripts/saisie/diropcontrol-form.phtml:37
#, fuzzy
msgid "Nom d'usage"
msgstr "Last name"
#: application/views/default/scripts/saisie/diropcontrol-form.phtml:44
#, fuzzy
msgid "Fonction"
msgstr "Constructions"
#: application/views/default/scripts/saisie/diropcontrol-form.phtml:56
#, fuzzy
msgid "Date de naissance"
msgstr "Closing date"
#: application/views/default/scripts/saisie/diropcontrol-form.phtml:69
#, fuzzy
msgid "Lieu de naissance"
msgstr "Intracom VAT number."
#: application/views/default/scripts/saisie/diropcontrol-form.phtml:76
msgid "Téléphone"
msgstr "Telephone"
#: application/views/default/scripts/saisie/diropcontrol-form.phtml:83
#, fuzzy
msgid "Télécopie"
msgstr "Telephone"
#: application/views/default/scripts/saisie/diropcontrol-form.phtml:90
#, fuzzy
msgid "Email"
msgstr "Receive kbis by email"
#: application/views/default/scripts/saisie/diropcontrol.phtml:9
#, fuzzy
msgid "Ajouter un dirigeant opérationnel"
msgstr "Add a shareholder"
#: application/views/default/scripts/saisie/diropcontrol.phtml:12
#, fuzzy
msgid "Modifier le dirigeant opérationnel"
msgstr "Modify password"
#: application/views/default/scripts/saisie/diropcontrol.phtml:15
#, fuzzy
msgid "Supprimer le dirigeant opérationnel"
msgstr "Search a Manager"
#: application/views/default/scripts/user/login.phtml:30
#: application/views/default/scripts/user/login.phtml:31
#: application/views/default/scripts/user/login.phtml:613
#: application/views/default/scripts/user/login.phtml:614
msgid "Identifiants oubliés ?"
msgstr "Forgotten you login ?"
#: application/views/default/scripts/user/logout.phtml:3
#: application/views/default/scripts/user/logout.phtml:21
#: application/views/default/scripts/user/logout.phtml:16
msgid "Vous avez été déconnecté."
msgstr "You have been disconnected"
@ -951,21 +639,16 @@ msgid "Veuillez cliquer"
msgstr "Click"
#: application/views/default/scripts/user/logout.phtml:4
#: application/views/default/scripts/user/logout.phtml:25
#: application/views/default/scripts/user/logout.phtml:20
msgid "ici"
msgstr "here"
#: application/views/default/scripts/user/logout.phtml:24
#, fuzzy, php-format
msgid "Si cette page ne disparait pas au bout de %1$s seconde(s)"
msgstr "If this page does not disappear after 5 second(s), please click"
#: application/views/default/scripts/user/logout.phtml:25
#: application/views/default/scripts/user/logout.phtml:20
msgid "veuillez cliquer "
msgstr "click"
#~ msgid "né(e) à"
#~ msgstr "born in"
#~ msgid "Numéro identifiant Siret"
#~ msgstr "Siret identification number"
#~ msgid "Numéro de TVA Intracom."
#~ msgstr "Intracom VAT number."
@ -998,6 +681,12 @@ msgstr "click"
#~ msgid "Création de l'établissement"
#~ msgstr "Creation of the establishment"
#~ msgid "Adresse"
#~ msgstr "Address"
#~ msgid "Téléphone"
#~ msgstr "Telephone"
#~ msgid "Fax"
#~ msgstr "FAX"
@ -1227,6 +916,9 @@ msgstr "click"
#~ msgid "ISIN"
#~ msgstr "ISIN"
#~ msgid "Nom du groupe"
#~ msgstr "Group name"
#~ msgid "Sigle"
#~ msgstr "Acronym"
@ -1491,6 +1183,9 @@ msgstr "click"
#~ msgid "Avances et acomptes sur immo. incorp."
#~ msgstr "Scores and outstandings"
#~ msgid "Constructions"
#~ msgstr "Constructions"
#, fuzzy
#~ msgid "Instal. techniques, ..."
#~ msgstr "Technical or commercial disputes"
@ -1699,6 +1394,9 @@ msgstr "click"
#~ msgid "Dépôt"
#~ msgstr "Deposit"
#~ msgid "INDISCORE"
#~ msgstr "INDISCORE"
#~ msgid "Définir un Cut-off"
#~ msgstr "Define a Cut-off"
@ -1731,6 +1429,9 @@ msgstr "click"
#~ msgid "L'étude de la dirigeance ne relève aucun problème."
#~ msgstr "Managers :"
#~ msgid "Solvabilité :"
#~ msgstr "Solvency :"
#~ msgid "L'analyse de la solvabilité est Bonne"
#~ msgstr "The solvency analysis is Good"
@ -1874,6 +1575,9 @@ msgstr "click"
#~ msgid "Autre téléphone"
#~ msgstr "Other telephone"
#~ msgid "E-mail"
#~ msgstr "E-mail"
#~ msgid "Autre e-mail"
#~ msgstr "Other e-mail"
@ -1897,6 +1601,9 @@ msgstr "click"
#~ msgid "Demandeur"
#~ msgstr "Applicant"
#~ msgid "Votre profil"
#~ msgstr "Your profile"
#, fuzzy
#~ msgid "Votre Identité"
#~ msgstr "Identity -"
@ -1907,6 +1614,12 @@ msgstr "click"
#~ msgid "Votre Fax"
#~ msgstr "Your fax"
#~ msgid "Votre E-mail"
#~ msgstr "Your E-mail"
#~ msgid "Votre Référence"
#~ msgstr "Your Reference"
#~ msgid "Service Achats"
#~ msgstr "Purchasing Service"
@ -1995,6 +1708,16 @@ msgstr "click"
#~ msgid "EXTRAIT KBIS"
#~ msgstr "Monitoring of kbis commands"
#, fuzzy
#~ msgid "Visualiser/Télécharger le kbis"
#~ msgstr "Receive kbis by email"
#~ msgid "Recevoir le kbis par email"
#~ msgstr "Receive kbis by email"
#~ msgid "Recevoir le kbis original par courrier"
#~ msgstr "Receive the original kbis by mail"
#~ msgid "PRIVILÉGES & NANTISSEMENTS"
#~ msgstr "PRIVILEGES AND PLEDGES"
@ -2153,6 +1876,9 @@ msgstr "click"
#~ msgid "Navigateur actuel"
#~ msgstr "Actual browser"
#~ msgid "Poste de travail"
#~ msgstr "Workplace"
#~ msgid "Moteur de recherche"
#~ msgstr "Search engine"
@ -2271,6 +1997,12 @@ msgstr "click"
#~ msgid "Date d'envoi"
#~ msgstr "Sending date"
#~ msgid "Liste des surveillances"
#~ msgstr "List of monitorings"
#~ msgid "Ajout le"
#~ msgstr "Add the"
#~ msgid "Envoyé le"
#~ msgstr "Sent at"
@ -2319,6 +2051,10 @@ msgstr "click"
#~ msgid "Mode Edition"
#~ msgstr "Edit mode"
#~ msgid ""
#~ "Si cette page ne disparait pas au bout de 5 seconde(s), veuillez cliquer"
#~ msgstr "If this page does not disappear after 5 second(s), please click"
#~ msgid "Gestion Système"
#~ msgstr "Management System"
@ -2436,6 +2172,9 @@ msgstr "click"
#~ msgid "Liste des clients"
#~ msgstr "List of customers"
#~ msgid "Nom"
#~ msgstr "Last name"
#~ msgid "Editer"
#~ msgstr "Edit"
@ -2472,6 +2211,9 @@ msgstr "click"
#~ msgid "Racine des identifiants"
#~ msgstr "Root of your login"
#~ msgid "Date de signature"
#~ msgstr "Signature date"
#~ msgid "(AAAA-MM-YY)"
#~ msgstr "(YYYY-MM-DD)"
@ -2805,9 +2547,15 @@ msgstr "click"
#~ msgid "Non"
#~ msgstr "No"
#~ msgid "Edition"
#~ msgstr "Edit"
#~ msgid "Mettre sous surveillance"
#~ msgstr "Put under surveillance"
#~ msgid "Néant"
#~ msgstr "None"
#~ msgid "Aucune information"
#~ msgstr "No information"
@ -2823,6 +2571,9 @@ msgstr "click"
#~ msgid "Modifier le client"
#~ msgstr "Modify a customer"
#~ msgid "Valider"
#~ msgstr "Validate"
#~ msgid "Scores & Decisions SAS - Tous droits réservés - "
#~ msgstr "Scores & Decisions SAS - All rights reserved - "

View File

@ -1,7 +0,0 @@
<p>&copy; 2006-<?php echo date('Y')?> Scores &amp; D&eacute;cisions SAS -
<?=$this->translate("Tous droits r&eacute;serv&eacute;s")?> -
<a href="http://www.scores-decisions.com/mentions.php" target="_blank">
<?=$this->translate("Mentions l&eacute;gales")?></a> -
<img class='flag' id="fr" src="/themes/default/images/drapeaux/fr.png"/>
<img class='flag' id="en" src="/themes/default/images/drapeaux/en.png"/>
</p>

View File

@ -0,0 +1,18 @@
<?php
class Application_Model_Aide extends Zend_Db_Table_Abstract
{
protected $_name = 'aide';
/**
* Enter description here ...
* @param array $keys
*/
public function texte($methode, $keys)
{
$sql = $this->select()
->where('methode = ?', $methode)
->where('champ IN ?', $keys);
return $this->fetchAll($sql);
}
}

View File

@ -0,0 +1,74 @@
<?php
class Application_Model_BilanSaisie extends Zend_Db_Table_Abstract
{
protected $_name = 'bilansaisie';
/**
* Enregistre les informations nécessaire pour la saisie
* @param unknown_type $email
* @param unknown_type $method
* @param unknown_type $confidentiel
* @param unknown_type $siren
* @param unknown_type $bilanCloture
* @param unknown_type $format
* @param unknown_type $bilanDuree
*/
public function setInformations($cliendId, $utilisateurId, $utilisateurLogin, $email, $method, $confidentiel, $siren, $bilanCloture, $format, $bilanDuree)
{
$env = 'PRD';
$data = array(
'clientId' => $cliendId,
'utilisateurId' => $utilisateurId,
'utilisateurLogin' => $utilisateurLogin,
'utilisateurEmail' => $email,
'method' => $method,
'confidentiel' => $confidentiel,
'siren' => $siren,
'env' => $env,
'fichier' => '',
'bilanCloture' => $bilanCloture,
'format' => $format,
'bilanDuree' => $bilanDuree,
'dateInsert' => date('Y-m-d H:i:s'),
);
return $this->insert($data);
}
/**
* Retourne les informations
* @param string $ref
*/
public function getInfosBilan($ref)
{
$sql = $this->select()->where(" ref='$ref'");
$result = $this->fetchAll($sql)->toArray();
return $result[0];
}
/**
* Enregistre le nom du fichier
* @param string $ref
* @param string $name
*/
public function setFilename($ref, $name)
{
$data = array( 'fichier' => $name );
$this->update($data, "ref='$ref'");
}
public function listBilans()
{
$sql = $this->select()
->from($this, array('ref','utilisateurId','confidentiel','siren','bilanCloture','bilanDuree','fichier','env'))
->where("dateEnvoi='0000-00-00 00:00:00' AND fichier!=''");
$result = $this->fetchAll($sql)->toArray();
return $result;
}
public function setDateEnvoi($ref)
{
$data = array( 'dateEnvoi' => date('Y-m-d H:m:s') );
return $this->update($data, "ref='$ref'");
}
}

View File

@ -1,276 +0,0 @@
<?php
class AuthController extends Zend_Controller_Action
{
protected $theme;
protected $partnerConfig = array(
'inextenso' => array(
'logo' => 'logo-in-extenso.gif',
'clientId' => 195,
'serviceCode' => 'SSO',
'authType' => 'userSSO',
'login' => 'mail',
'token' => 'token',
)
);
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init()
{
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme
$this->theme = Zend_Registry::get('theme');
}
/**
* Point d'entrée pour les connexions partenaires.
* L'utilisateur s'identifie sur son portail habituel.
*/
public function indexAction()
{
// --- Désactiver le layout
$this->_helper->layout()->disableLayout();
$this->view->headLink()
->appendStylesheet($this->theme->pathStyle.'/inexweb.css', 'all')
->appendStylesheet($this->theme->pathStyle.'/user.css', 'all');
$request = $this->getRequest();
/**
* Get partner name - see route in bootstrap
*/
$partner = $request->getParam('partner');
if ( array_key_exists($partner, $this->partnerConfig) ) {
$config = $this->partnerConfig[$partner];
$this->view->logo = $config['logo'];
$params = $request->getParams();
$objectParams = array();
foreach ($params as $label => $value) {
if (in_array($label, array('controller', 'action'))) continue;
$object = new stdClass();
$object->label = $label;
$object->value = $value;
$objectParams[] = $object;
}
$this->view->Params = $objectParams;
$login = $params[$config['login']];
$part = strstr($login, '@', true);
if ($part !== false) {
$login = $part;
}
$token = $params[$config['token']];
try {
$parameters = new stdClass();
$parameters->client = $config['clientId'];
$parameters->login = $login;
$parameters->token = $token;
$parameters->params = $objectParams;
$ws = new Scores_Ws_Client('account', '0.1');
$hash = $ws->ssoAuthenticate($parameters);
// --- Utilisateur inexistant
if ( $hash === 'false' || $hash === false ) {
$this->view->NoUser = true;
$urlParams = array('controller'=>'auth', 'action'=>'userssoform');
$urlParams = array_merge($params, $urlParams);
$this->view->FormUrlParams = $urlParams;
}
// --- Redirection
else {
$auth = Zend_Auth::getInstance();
// --- Set partial identity
$identity = new stdClass();
$identity->username = $login;
$identity->password = $hash;
$auth->getStorage()->write($identity);
// --- End Set partial identity
// --- Get InfosLogin
$adressIp = $_SERVER['REMOTE_ADDR'];
$parameters = new stdClass();
$parameters->login = $login;
$parameters->ipUtilisateur = $adressIp;
$parameters->from = 'auth';
try {
$ws = new Scores_Ws_Client('gestion', '0.3');
$InfosLogin = $ws->getInfosLogin($parameters);
$this->logger->info(print_r($InfosLogin,1));
if ( is_string($InfosLogin) || $InfosLogin->error->errnum != 0 ) {
$this->view->Error = true;
} else {
$user = new Scores_Utilisateur();
$identity = $user->updateProfil($InfosLogin);
$auth->getStorage()->write($identity);
// --- Redirect
$this->redirect('/');
}
} catch ( Exception $e ) {
switch ( $e->getCode() ) {
case 'MSG':
$this->view->Message = $e->getMessage();
break;
default:
$this->view->Error = true;
break;
}
}
// --- End Get InfosLogin
}
} catch ( Exception $e ) {
switch ( $e->getCode() ) {
case 'MSG':
$this->view->Message = $e->getMessage();
break;
default:
$this->view->Error = true;
break;
}
}
} else {
$this->view->Message = "Erreur dans les paramètres.";
}
}
/**
* Affichage du formulaire pour l'inscription des utilisateurs
*/
public function userssoformAction()
{
// --- Désactiver le layout
$this->_helper->layout()->disableLayout();
$this->view->headLink()->appendStylesheet($this->theme->pathStyle.'/user.css', 'all');
$request = $this->getRequest();
/**
* Get partner name - see route in bootstrap
*/
$partner = $request->getParam('partner');
if ( array_key_exists($partner, $this->partnerConfig) ) {
$config = $this->partnerConfig[$partner];
$this->view->logo = $config['logo'];
$params = $request->getParams();
$objectParams = array();
foreach ($params as $label => $value) {
if (in_array($label, array('controller', 'action'))) continue;
$object = new stdClass();
$object->label = $label;
$object->value = $value;
$objectParams[] = $object;
}
$this->view->Params = $objectParams;
$login = $params[$config['login']];
$part = strstr($login, '@', true);
if ($part !== false) {
$login = $part;
}
$token = $params[$config['token']];
$this->view->NoUser = true;
// --- Set form value
$this->view->FormPartner = $partner;
$this->view->FormIdentifiant = $login;
$this->view->FormCourriel = $request->getParam('mail');
$this->view->FormSiret = $request->getParam('siret');
$this->view->FormNom = $request->getParam('lastname');
$this->view->FormPrenom = $request->getParam('name');
}
else {
$this->view->Message = "Erreur dans les paramètres.";
}
}
/**
* Creation d'un utilisateur en SSO
*/
public function userssocreateAction()
{
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$partner = $request->getParam('partner');
if ( array_key_exists($partner, $this->partnerConfig) ) {
$config = $this->partnerConfig[$partner];
$this->view->logo = $config['logo'];
$data = array(
'idClient' => $config['clientId'],
'login' => $request->getParam('login'),
'email' => $request->getParam('email', ''),
'actif' => 1,
'nom' => $request->getParam('nom', ''),
'prenom' => $request->getParam('prenom', ''),
'siret' => str_replace(' ', '', $request->getParam('siret', '')),
'tel' => str_replace(array(' ','.'), array('',''), $request->getParam('tel', '')),
'Service' => $config['serviceCode'],
);
try {
$ws = new Scores_Ws_Client('account', '0.1');
$parameters = new stdClass();
$parameters->data = json_encode($data);
$created = $ws->setUserSSO($parameters);
if ($created === false ) {
$this->view->Message = "Erreur lors de la création de votre compte.";
} else {
$this->view->UserCreated = true;
// --- Data to go back
$params = $request->getParams();
$urlArgs = array();
foreach ($params as $label => $value) {
if (in_array($label, array('controller', 'action'))) continue;
if (substr($label, 0, 2) == 'P-') {
$urlArgs[substr($label, 2)] = $value;
}
}
$urlArgs['partner'] = 'inextenso';
$this->view->UrlArgs = $urlArgs;
}
} catch ( Exception $e ) {
switch ( $e->getCode() ) {
case 'MSG':
$this->view->Message = $e->getMessage();
break;
default:
$this->view->Error = true;
break;
}
}
} else {
$this->view->Message = "Erreur dans les paramètres.";
}
}
/**
* Lien de validation depuis email
* Paramètres
* - login ou email
* - key
* L'action renvoi sur un affichage spécifique suivant le type de client
*/
public function validateAction()
{
$request = $this->getRequest();
//Validation en erreur
//Validation invalide
//Validation Ok => Comment afficher les particularités
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,131 +0,0 @@
<?php
class IndexController extends Zend_Controller_Action
{
protected $theme;
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init()
{
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
}
/**
* Page d'accueil et de redirection
*/
public function indexAction()
{
$request = $this->getRequest();
$page = $request->getParam('page');
if ($page == 'annonces')
{
$siret = $request->getParam('siret');
$source = $request->getParam('source');
$idAnn = $request->getParam('idAnn');
$lien = '/juridique/annonces/siret/'.$siret;
if (!empty($source)) $lien.= '/source/'.$source;
if (!empty($idAnn)) $lien.= '/idAnn/'.$idAnn;
$this->_redirect($lien);
}
elseif ( Zend_Registry::get('theme')->name=='mobile' )
{
//Afficher le menu pour la version mobile
}
else
{
$this->_forward('entreprise', 'recherche');
}
}
/**
* Retourne l'url pour le csv d'export du portefeuille
*/
public function portefeuillecsvAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
//'login' and 'hach' detecte from AuthAdapter
$request = $this->getRequest();
$version = $request->getParam('v', 1);
if (intval($version) == 2) {
$log = Zend_Registry::get('config')->profil->path->shared.'/log/altisys.log';
$user = new Scores_Utilisateur();
$login = $user->getLogin();
$idClient = $user->getIdClient();
$file = 'listesurv-score-'.$login.'-'.$idClient.'.csv';
$content_type = 'application/csv-tab-delimited-table';
$c = Zend_Registry::get('config');
$path = $c->profil->path->shared.'/files/';
//Envoi du fichier sur la sortie standard
if ( file_exists($path.$file) ) {
header('Content-Transfer-Encoding: none');
header('Content-type: ' . $content_type.'');
header('Content-Length: ' . filesize($path.$file));
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
header('Content-Disposition: filename="' . basename($path.$file) . '"');
header('Cache-Control: private, max-age=0, must-revalidate');
header('Pragma: public');
ini_set('zlib.output_compression', '0');
echo file_get_contents($path.$file);
file_put_contents($log, date('Y-m-d H:i:s')." APPEL ALTISYS - OK $file\n", FILE_APPEND);
} else {
echo 'Impossible de charger le fichier.';
file_put_contents($log, date('Y-m-d H:i:s')." APPEL ALTISYS - ERREUR $file\n", FILE_APPEND);
}
} else {
require_once 'Scores/WsScores.php';
$user = new Scores_Utilisateur();
$login = $user->getLogin();
$idClient = $user->getIdClient();
$ws = new WsScores();
$reponse = $ws->getPortefeuilleCsv($login, $idClient);
$log = Zend_Registry::get('config')->profil->path->shared.'/log/altisys.log';
if ($reponse === false){
file_put_contents($log, date('Y-m-d H:i:s')." - URL = ERREUR\n", FILE_APPEND);
echo "Erreur";
} elseif (!empty($reponse->result->Url)) {
file_put_contents($log, date('Y-m-d H:i:s')." - URL = ".$reponse->result->Url."\n", FILE_APPEND);
echo $reponse->result->Url;
}
}
}
public function odeaAction()
{
$this->redirect('http://odea.scores-decisions.com');
}
/**
* Display browser agent
*/
public function browserAction()
{
$info = get_browser();
echo $_SERVER['HTTP_USER_AGENT'];
echo "<pre>";
print_r($info);
echo "</pre>";
exit;
}
}

View File

@ -1,701 +0,0 @@
<?php
class JuridiqueController extends Zend_Controller_Action
{
protected $theme;
protected $siret = null;
protected $id = 0;
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init()
{
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme
$this->theme = Zend_Registry::get('theme');
$request = $this->getRequest();
$this->siret = $request->getParam('siret');
$this->id = $request->getParam('id', 0);
require_once 'Scores/WsScores.php';
}
/**
* Affichage de la liste des annonces ou d'une annonce
*/
public function annoncesAction()
{
$request = $this->getRequest();
$autrePage = $request->getParam('apage');
$idAnn = $request->getParam('idAnn', null);
$siren = substr($this->siret, 0,9);
$vue = $request->getParam('vue', 'bodacc');
$source = $request->getParam('source');
if (!empty($source)) {
switch ($source){
case 1: $vue = 'bodacc'; break;
case 2: $vue = 'balo'; break;
case 3: $vue = 'asso'; break;
}
}
$session = new Scores_Session_Entreprise($this->siret, $this->id);
$fj = $session->getFormeJuridique();
if ($fj > 9000 && $fj < 9999 && intval($siren) == 0) {
$vue = 'asso';
}
$this->view->assign('id', $session->getId());
$this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale());
$this->view->assign('AutrePage', $autrePage);
if ($session->getSource() == '006' || $session->getSourceId() == '007') {
$this->view->assign('AutreSource', true);
} else {
$this->view->assign('vue', $vue);
// Pagination
$page = $request->getParam('page', 1);
if ($page <= 0) {
$page = 1;
}
$nbAffichage = 20;
$position = ($page - 1) * $nbAffichage;
$ws = new WsScores();
switch ($vue) {
case 'balo':
$infos = $ws->getAnnoncesBalo($siren, $idAnn, null, $position, $nbAffichage);
break;
case 'asso':
if (intval($siren) == 0 && substr($session->getAutreId(),0,1) == 'W') {
$infos = $ws->getAnnoncesAsso($session->getAutreId(), $idAnn, null, $position, $nbAffichage);
} elseif (intval($siren) != 0) {
$infos = $ws->getAnnoncesAsso($siren, $idAnn, null, $position, $nbAffichage);
} else {
$idAnn = $session->getSourceId();
$this->redirect($this->view->url(array('controller'=>'juridique',
'action'=>'annonce', 'siret'=>$this->siret, 'id'=>$this->id,
'idAnn'=>$idAnn, 'vue'=>$vue), 'default', true));
}
break;
case 'bomp':
$filtre = $request->getParam('filtre', 'A');
$this->view->assign('filtre', $filtre);
$this->logger->info("getAnnoncesBoamp");
$infos = $ws->getAnnoncesBoamp($siren, $idAnn, $filtre, $position, $nbAffichage);
break;
case 'bodacc':
case 'abod':
default:
if(intval($siren) == 0) {
$idAnn = $session->getSourceId();
$this->redirect($this->view->url(array('controller'=>'juridique',
'action'=>'annonce', 'siret'=>$this->siret, 'id'=>$this->id,
'idAnn'=>$idAnn, 'vue'=>$vue), 'default', true));
}
$infos = $ws->getAnnoncesLegales($siren, $idAnn, null, $position, $nbAffichage);
break;
}
$this->logger->info(print_r($infos,1));
if ($infos === false) {
$this->forward('soap', 'error');
}
require_once 'Scores/Annonces.php';
$objAnnonces = new Annonces($infos->result->item);
$typeAnnonces = array(
'Bodacc',
'Balo',
'Bomp',
'Asso',
);
$user = new Scores_Utilisateur();
$this->view->assign('hasModeEdition', $user->checkModeEdition());
$this->view->assign('exportObjet', $infos);
$this->view->assign('surveillance', $user->checkPerm('survannonce'));
// --- Titre de la page
if ( empty($autrePage) ) {
if( empty($siren) ){
$titre = 'Identifiant '.$this->id;
} else {
$titre = 'Siret '.$siren;
}
$this->view->headTitle()->prepend('Annonces Légales - '.$titre);
}
// ---- Calcul pagination
$nbReponses = count($infos->result->item);
$nbReponsesTotal = $infos->nbReponses;
if ($nbReponses < $nbReponsesTotal) {
$pageTotal = ceil( $nbReponsesTotal / $nbAffichage );
$pageCurrent = $page;
$pagePrev = $page - 1;
if ($pagePrev < 1) {
$pagePrev = 1;
}
$pageNext = $page + 1;
if( $pageNext > $pageTotal ) {
$pageNext = $pageTotal;
}
} else {
$pageTotal = $pageCurrent = 1;
$pagePrev = 1;
$pageNext = 1;
}
$this->view->assign('PageTotal', $pageTotal);
$this->view->assign('PagePrev', $pagePrev);
$this->view->assign('PageNext', $pageNext);
$this->view->assign('PageCurrent', $pageCurrent);
$this->view->assign('nbReponses', empty($nbReponses) ? 0 : $nbReponses);
$this->view->assign('nbReponsesTotal', empty($nbReponsesTotal) ? 0 : $nbReponsesTotal);
$classType = 'annonces'.ucfirst($vue);;
$annonces = array();
if (count($objAnnonces->$classType) > 0) {
foreach($objAnnonces->$classType as $ann) {
$annonces[] = $objAnnonces->getAnnonceResume($ann);
}
$this->logger->info(print_r($annonces,1));
$this->view->assign('annonces', $annonces);
}
$this->view->headScript()->appendFile($this->theme->pathScript.'/annonces.js', 'text/javascript');
}
}
/**
* Affichage d'une annonce
*/
public function annonceAction()
{
$request = $this->getRequest();
$autrePage = $request->getParam('apage');
$idAnn = $request->getParam('idAnn', null);
$siren = substr($this->siret, 0,9);
$vue = $request->getParam('vue', 'bodacc');
$source = $request->getParam('source');
if (!empty($source)) {
switch ($source){
case 1: $vue = 'bodacc'; break;
case 2: $vue = 'balo'; break;
case 3: $vue = 'asso'; break;
}
}
$session = new Scores_Session_Entreprise($this->siret, $this->id);
$fj = $session->getFormeJuridique();
if ($fj > 9000 && $fj < 9999 && intval($siren) == 0) {
$vue = 'asso';
}
$page = $request->getParam('page');
$this->view->assign('page', $page);
$this->view->assign('id', $session->getId());
$this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale());
$this->view->assign('AutrePage', $autrePage);
if ($session->getSource() == '006' || $session->getSourceId() == '007') {
$this->view->assign('AutreSource', true);
} else {
$this->view->assign('vue', $vue);
$ws = new WsScores();
switch ($vue) {
case 'balo':
$infos = $ws->getAnnoncesBalo($siren, $idAnn, null, $position, $nbAffichage);
break;
case 'asso':
if ( intval($siren)==0 && substr($session->getAutreId(),0,1)=='W' ) {
$infos = $ws->getAnnoncesAsso($session->getAutreId(), $idAnn, null, $position, $nbAffichage);
} elseif (intval($siren)!=0) {
$infos = $ws->getAnnoncesAsso($siren, $idAnn, null, $position, $nbAffichage);
} else {
$idAnn = $session->getSourceId();
$infos = $ws->getAnnoncesAsso($siren, $idAnn, null, $position, $nbAffichage);
}
break;
case 'bomp':
$filtre = $request->getParam('filtre', 'A');
$this->view->assign('filtre', $filtre);
$infos = $ws->getAnnoncesBoamp($siren, $idAnn, $filtre, $position, $nbAffichage);
break;
case 'bodacc':
case 'abod':
default:
if(intval($siren)==0) {
$idAnn = $session->getSourceId();
}
$infos = $ws->getAnnoncesLegales($siren, $idAnn, null, $position, $nbAffichage);
break;
}
$this->logger->info(print_r($infos,1));
if ($infos === false) {
$this->forward('soap', 'error');
}
require_once 'Scores/Annonces.php';
$objAnnonces = new Annonces($infos->result->item);
$typeAnnonces = array(
'Bodacc',
'Balo',
'Bomp',
'Asso',
);
$user = new Scores_Utilisateur();
$this->view->assign('hasModeEdition', $user->checkModeEdition());
$this->view->assign('exportObjet', $infos);
$this->view->assign('surveillance', $user->checkPerm('survannonce'));
if ( $user->checkModeEdition() ){
$this->view->headScript()
->appendFile($this->theme->pathScript.'/saisieannonces.js', 'text/javascript');
}
$classType = 'annonces'.ucfirst($vue);
foreach($objAnnonces->$classType as $ann) {
if($ann->id==$idAnn) break;
}
$this->logger->info(print_r($ann,1));
$annonce = array(
'Desc' => $objAnnonces->getAnnonceDesc($ann),
'Entree' => $objAnnonces->getAnnonceEntree($ann),
'EntreeSD' => $objAnnonces->getAnnonceEntreeSD($ann),
'Even' => $objAnnonces->getAnnonceEven($ann),
'Texte' => $objAnnonces->getAnnonceTexte($ann),
'Type' => $objAnnonces->getType($ann),
'Code' => $objAnnonces->getCode($ann),
'Annee' => $objAnnonces->getAnnee($ann),
'Num' => $objAnnonces->getNum($ann),
'Deleted' => $objAnnonces->isDeleted($ann),
'Entites' => $objAnnonces->getAnnonceEntite($ann)
);
$this->view->assign('source', $session->getSource());
if (intval($this->siret) == 0){
$this->view->assign('sourceId', $session->getSourceId());
} else {
$this->view->assign('sourceId', null);
}
$this->view->assign('idAnn', $idAnn);
$this->view->assign('annonce', $annonce);
if ($request->getParam('q') == 'ajax') {
$this->_helper->layout()->disableLayout();
$this->view->assign('ajax', 1);
} else {
// Définir url pour téléchargement pdf
if (in_array($annonce['Code'], array('BODA', 'BODB', 'BODC'))) {
$datePublication = DateTime::createFromFormat('Y-m-d', $ann->DateParution);
$dateBodacc = DateTime::createFromFormat('Ymd', '20080101');
$dateTemoinA = DateTime::createFromFormat('Ymd', '20161115');
$dateTemoinB = DateTime::createFromFormat('Ymd', '20161011');
$dateTemoinC = DateTime::createFromFormat('Ymd', '20160223');
$params = null;
if ($annonce['Code'] == 'BODA' && $datePublication >= $dateTemoinA) {
$params = array('unit'=>1);
$this->view->assign('bodaccLinkLabel', 'Télécharger le témoin de publication');
} elseif ($annonce['Code'] == 'BODB' && $datePublication >= $dateTemoinB) {
$params = array('unit'=>1);
$this->view->assign('bodaccLinkLabel', 'Télécharger le témoin de publication');
} elseif ($annonce['Code'] == 'BODC' && $datePublication >= $dateTemoinC) {
$params = array('unit'=>1);
$this->view->assign('bodaccLinkLabel', 'Télécharger le témoin de publication');
} elseif ($datePublication >= $dateBodacc) {
$params = array();
$this->view->assign('bodaccLinkLabel', 'Télécharger le bulletin officiel');
}
if ($params !== null) {
$params = array_merge($params, array('controller'=>'juridique',
'action'=>'bodaccpdf', 'siren'=>$siren, 'type'=>substr($annonce['Code'],3,1),
'parution'=>$annonce['Annee'].str_pad($ann->BodaccNum, 4, '0', STR_PAD_LEFT),
'annonce'=>$ann->NumAnnonce
));
$lienBodacc = $this->view->url($params, 'default', true);
$this->view->assign('bodaccLink', $lienBodacc);
}
}
}
}
}
/**
* Liste des contentieux
*/
public function ctxAction()
{
$request = $this->getRequest();
$session = new Scores_Session_Entreprise($this->siret, $this->id);
$this->view->headTitle()->prepend("Contentieux");
$this->view->headTitle()->prepend("Siret ".$this->siret);
$siren = substr($this->siret, 0,9);
$type = $request->getParam('type', 'DF');
$this->view->Type = $type;
$typeList = array(
'DE' => 'demandeur',
'DF' => 'défendeur',
);
$this->view->TypeLabel = '';
if (array_key_exists($type, $typeList)) {
$this->view->TypeLabel = $typeList[$type];
}
$this->view->TypeList = $typeList;
$nbReponses = 20;
$page = $request->getParam('page', 1);
if ( $page <= 0 ) $page = 1;
$position = ($page - 1 ) * $nbReponses;
$params = new stdClass();
$params->companyId = $siren;
$params->tiers = $type;
$params->p = $position;
$params->limit = $nbReponses;
try {
$ws = new Scores_Ws_Client('entreprise', '0.9');
$response = $ws->getGreffeAffaireList($params);
if ($response === false) {
$this->view->msg = "Erreur";
} else {
$this->view->List = isset($response->List->item)?$response->List->item:null;
// --- Pagination
$nbReponsesTotal = $response->Nb;
if ($nbReponses < $nbReponsesTotal) {
$pageTotal = ceil( $nbReponsesTotal / $nbReponses );
$pageCurrent = $page;
$pagePrev = $page - 1;
if ($pagePrev < 1) {
$pagePrev = 1;
}
$pageNext = $page + 1;
if( $pageNext > $pageTotal ) {
$pageNext = $pageTotal;
}
} else {
$pageTotal = $pageCurrent = 1;
$pagePrev = 1;
$pageNext = 1;
}
$this->view->assign('PageTotal', $pageTotal);
$this->view->assign('PagePrev', $pagePrev);
$this->view->assign('PageNext', $pageNext);
$this->view->assign('PageCurrent', $pageCurrent);
$this->view->assign('nbReponses', empty($nbReponses) ? 0 : $nbReponses);
$this->view->assign('nbReponsesTotal', empty($nbReponsesTotal) ? 0 : $nbReponsesTotal);
$this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale());
}
} catch (Exception $e) {
$this->view->msg = $e->getMessage();
}
}
public function ctxdetailAction()
{
$request = $this->getRequest();
$session = new Scores_Session_Entreprise($this->siret, $this->id);
$siren = substr($this->siret, 0,9);
$this->view->headTitle()->prepend("Contentieux");
$this->view->headTitle()->prepend("Siret ".$this->siret);
$this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale());
$id = $request->getParam('affaireId');
$params = new stdClass();
$params->id = $id;
try {
$ws = new Scores_Ws_Client('entreprise', '0.9');
$response = $ws->getGreffeAffaireDetail($params);
if ($response === false) {
$this->view->msg = "Erreur";
} else {
$this->view->Affaire = $response;
}
} catch (Exception $e) {
$this->view->msg = $e->getMessage();
}
}
/**
* Affichage infos réglementées
*/
public function infosregAction()
{
$this->view->headTitle()->prepend("Informations Réglementées");
$this->view->headTitle()->prepend("Siret ".$this->siret);
$request = $this->getRequest();
$idAnn = $request->getParam('idann', false);
$siren = substr($this->siret, 0,9);
$session = new Scores_Session_Entreprise($this->siret, $this->id);
$ws = new WsScores();
if ($idAnn!=false) {
$this->view->assign('idAnn', $idAnn);
$infos = $ws->getInfosReg($siren,$idAnn);
} else {
$infos = $ws->getInfosReg($siren);
}
if ($infos === false) $this->forward('soap', 'error');
if (is_string($infos)){
$this->view->assign('message', $infos);
}
$objAnnonces = $infos->result->item;
$annonces = array();
if (count($objAnnonces)>0) {
foreach ( $objAnnonces as $item ) {
$dateParution = new Zend_Date($item->DateParution, 'yyyy-MM-dd');
$dateInsertion = new Zend_Date($item->dateInsertionSD, 'yyyy-MM-dd');
$annonces[] = array(
'id' => $item->id,
'titre' => $item->titre,
'communique' => $item->communique,
'source' => $item->source,
'DateParution' => $dateParution->toString('dd/MM/yyyy'),
'dateInsertionSD' => $dateInsertion->toString('dd/MM/yyyy'),
);
}
}
$this->view->assign('annonces', $annonces);
$this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale());
$this->view->assign('exportObjet', $infos);
}
/**
* Affichage listes des compétences
*/
public function competencesAction()
{
$this->view->headTitle()->prepend("Compétences Territoriales");
$this->view->headTitle()->prepend("Siret ".$this->siret);
$request = $this->getRequest();
$type = $request->getParam('type', '');
$siren = substr($this->siret,0,9);
$session = new Scores_Session_Entreprise($this->siret, $this->id);
$abbrev = array(
' TGI ' => 'TRIBUNAL DE GRANDE INSTANCE DE ',
' TI ' => 'TRIBUNAL D\'INSTANCE DE ',
' TC ' => 'TRIBUNAL DE COMMERCE DE ',
' TGICC ' => 'TRIBUNAL DE GRANDE INSTANCE A COMPETENCE COMMERCIALE ',
' TICC ' => 'TRIBUNAL D\'INSTANCE A COMPETENCE COMMERCIALE '
);
if (!empty($type)){
$ws = new WsScores();
$infos = $ws->getListeCompetences($this->siret, $type, $session->getCodeCommune());
if ($infos === false) $this->_forward('soap', 'error');
$competences = $infos->result->item;
$this->logger->info(print_r($infos,1));
if( $type=='tri' || $type=='cfe' ) {
$i=0;
foreach($competences as $comp){
$competences[$i]->Nom = strtr(' '.strtoupper($comp->Nom), $abbrev);
$i++;
}
}
$this->view->assign('competences', $competences);
$this->view->assign('type', $type);
$this->view->assign('exportObjet', $infos);
}
$this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale());
}
/**
* Affichage des la listes des conventions collectives
* Enter description here ...
*/
public function conventionsAction()
{
$this->view->headTitle()->prepend("Conventions Collectives");
$this->view->headTitle()->prepend("Siret ".$this->siret);
$siren = substr($this->siret, 0,9);
$session = new Scores_Session_Entreprise($this->siret, $this->id);
$this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale());
$ws = new WsScores();
$infos = $ws->getListeConventions($siren);
$conventions = $infos->result->item;
$this->logger->info(print_r($conventions,1));
$this->view->assign('conventions', $conventions);
$this->view->assign('exportObjet', $infos);
}
/**
* Affichage des marques déposées
*/
public function marquesAction()
{
$this->view->headTitle()->prepend("Marques Déposées");
$this->view->headTitle()->prepend("Siret ".$this->siret);
$this->view->headScript()->appendFile($this->theme->pathScript.'/marques.js', 'text/javascript');
$request = $this->getRequest();
$idObject = $request->getParam('idObject', 0);
$siren = substr($this->siret, 0,9);
$session = new Scores_Session_Entreprise($this->siret, $this->id);
$this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale());
$ws = new WsScores();
$infos = $ws->getMarques($siren, $idObject);
if ($infos === false) $this->_forward('soap', 'error');
$marques = $infos->result->item;
$this->view->assign('marques', $marques);
$this->view->assign('idObject', $idObject);
$this->view->assign('exportObjet', $marques);
$this->logger->info(print_r($infos,1));
}
/**
* Affiche le lien pour télécharger le fichier concernant le dépot
*/
public function getmarqueAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$request = $this->getRequest();
$numdepot = $request->getParam('numdepot', '');
if (empty($numdepot)){
echo 'Paramètres incorrects';
exit;
}
$c = Zend_Registry::get('config');
$directory = $c->profil->path->shared.'/persist/marques';
$file = $numdepot.'.pdf';
//Le fichier n'existe pas alors on le télécharger
if(!file_exists($directory.'/'.$file)
|| filesize($directory.'/'.$file)==0 ) {
$cmd = 'php ' . APPLICATION_PATH . '/../scripts/jobs/getMarque.php ' . $numdepot;
$this->logger->info($cmd);
$result = exec($cmd);
$this->logger->info($result);
}
//On vérfie que le fichier existe après le téléchargement
if(file_exists($directory.'/'.$file) && filesize($directory.'/'.$file)>0) {
$href = $this->view->url(array('module'=>'file', 'controller'=>'index', 'action'=>'marque', 'q'=>$file), 'default', true);
echo '<a href="'.$href.'" target="_blank">Télécharger le PDF de l\'insciption au BOPI.</a>';
} else {
echo 'Document introuvable.';
}
}
/**
* Gestion téléchargement du Bodacc au format pdf
*/
public function bodaccpdfAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$request = $this->getRequest();
$siren = $request->getParam('siren');
$type = $request->getParam('type');
$parution = $request->getParam('parution');
$annonce = $request->getParam('annonce');
$unit = $request->getParam('unit');
$annee = substr($parution,0,4);
$c = Zend_Registry::get('config');
$path = $c->profil->path->shared.'/persist/bodacc/'.$type.'/'.$annee;
if ($unit == 1) {
$file = $path."/BODACC_".$type."_".$annee."_".substr($parution,4)."_".$annonce.".pdf";
} else {
$file = $path."/BODACC_".$type."_".$annee."_".substr($parution,4).".pdf";
}
if (!file_exists($file)) {
$cli = "/../scripts/jobs/getBodaccPdf.php";
$params = "--siren ".$siren."--type ".$type." --parution ".$parution." --annonce ".$annonce;
exec('php ' . APPLICATION_PATH . "$cli $params >> getBodaccPdf.log");
}
if (file_exists($file)) {
$href = $this->view->url(array('module'=>'file', 'controller'=>'bodacc',
'action'=>'actual', 'q' => basename($file)), 'default', true);
echo "<a target=\"_blank\" href=\"".$href."\">Cliquer ici pour télécharger le fichier.</a>";
} else {
echo "Erreur lors du chargement du fichier.";
}
}
public function annoncenumAction()
{
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$siren = $request->getParam('siren');
$ws = new WsScores();
$result = $ws->getAnnoncesNum($siren);
$this->logger->info(print_r($result,1));
$numWS = array();
if (count($result->item)>0) {
foreach ($result->item as $item) {
$numWS[$item->type] = $item->num;
}
}
$types = array('bodacc', 'balo', 'boamp', 'asso');
$num = array();
foreach($types as $type) {
if ( array_key_exists($type, $numWS) ) {
$num['Type'.ucfirst($type)] = $numWS[$type];
}
}
$this->view->assign('num', $num);
}
}

View File

@ -1,235 +0,0 @@
<?php
class OrderController extends Zend_Controller_Action
{
protected $theme;
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init()
{
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme
$this->theme = Zend_Registry::get('theme');
}
public function indexAction(){}
public function kbisAction()
{
$request = $this->getRequest();
// --- Année de départ
$user = new Scores_Utilisateur();
$startYear = substr($user->identity->dateDebutCompte,0,4);
if (empty($startYear)) {
$startYear = 2006;
}
// --- Date
$date = new Zend_Date();
$year = $date->toString('yyyy'); //Année en cours
$month = $date->toString('MM'); //Mois en cours
$nbYear = $year - $startYear + 1;
$selectYear = array();
for( $i=0; $i<$nbYear; $i++ ) {
$selectYear[] = $startYear + $i;
}
$this->view->Years = $selectYear;
$selectMonth = array('01','02','03','04','05','06','07','08','09','10','11','12');
$this->view->Months = $selectMonth;
$selectedYear = $request->getParam('y', date('Y'));
$this->view->year = $selectedYear;
$selectedMonth = $request->getParam('m', date('m'));
$this->view->month = $selectedMonth;
// --- Fin Date
$ws = new Scores_Ws_Client('order', '0.1');
$params = new stdClass();
$params->month = $selectedYear.'-'.$selectedMonth;
$response = $ws->getKbisList($params);
if ($response === false) {
$this->view->Error = true;
} else {
$this->view->Cmd = $response->item;
}
}
public function bilaninputAction()
{
$request = $this->getRequest();
// --- Année de départ
$user = new Scores_Utilisateur();
$startYear = substr($user->identity->dateDebutCompte,0,4);
if (empty($startYear)) {
$startYear = 2006;
}
// --- Date
$date = new Zend_Date();
$year = $date->toString('yyyy'); //Année en cours
$month = $date->toString('MM'); //Mois en cours
$nbYear = $year - $startYear + 1;
$selectYear = array();
for( $i=0; $i<$nbYear; $i++ ) {
$selectYear[] = $startYear + $i;
}
$this->view->Years = $selectYear;
$selectMonth = array('01','02','03','04','05','06','07','08','09','10','11','12');
$this->view->Months = $selectMonth;
$selectedYear = $request->getParam('y', date('Y'));
$this->view->year = $selectedYear;
$selectedMonth = $request->getParam('m', date('m'));
$this->view->month = $selectedMonth;
// --- Fin Date
$ws = new Scores_Ws_Client('order', '0.1');
$params = new stdClass();
$params->month = $selectedYear.'-'.$selectedMonth;
$response = $ws->getBilanInputList($params);
if ($response === false) {
$this->view->Error = true;
} else {
$this->view->Cmd = $response->item;;
}
}
public function greffebilanAction()
{
$request = $this->getRequest();
// --- Année de départ
$user = new Scores_Utilisateur();
$startYear = substr($user->identity->dateDebutCompte,0,4);
if (empty($startYear)) {
$startYear = 2006;
}
// --- Date
$date = new Zend_Date();
$year = $date->toString('yyyy'); //Année en cours
$month = $date->toString('MM'); //Mois en cours
$nbYear = $year - $startYear + 1;
$selectYear = array();
for( $i=0; $i<$nbYear; $i++ ) {
$selectYear[] = $startYear + $i;
}
$this->view->Years = $selectYear;
$selectMonth = array('01','02','03','04','05','06','07','08','09','10','11','12');
$this->view->Months = $selectMonth;
$selectedYear = $request->getParam('y', date('Y'));
$this->view->year = $selectedYear;
$selectedMonth = $request->getParam('m', date('m'));
$this->view->month = $selectedMonth;
// --- Fin Date
$ws = new Scores_Ws_Client('order', '0.1');
$params = new stdClass();
$params->month = $selectedYear.'-'.$selectedMonth;
$response = $ws->getBilanList($params);
if ($response === false) {
$this->view->Error = true;
} else {
$this->view->Cmd = $response->item;;
}
}
public function greffeacteAction()
{
$request = $this->getRequest();
// --- Année de départ
$user = new Scores_Utilisateur();
$startYear = substr($user->identity->dateDebutCompte,0,4);
if (empty($startYear)) {
$startYear = 2006;
}
// --- Date
$date = new Zend_Date();
$year = $date->toString('yyyy'); //Année en cours
$month = $date->toString('MM'); //Mois en cours
$nbYear = $year - $startYear + 1;
$selectYear = array();
for( $i=0; $i<$nbYear; $i++ ) {
$selectYear[] = $startYear + $i;
}
$this->view->Years = $selectYear;
$selectMonth = array('01','02','03','04','05','06','07','08','09','10','11','12');
$this->view->Months = $selectMonth;
$selectedYear = $request->getParam('y', date('Y'));
$this->view->year = $selectedYear;
$selectedMonth = $request->getParam('m', date('m'));
$this->view->month = $selectedMonth;
// --- Fin Date
$ws = new Scores_Ws_Client('order', '0.1');
$params = new stdClass();
$params->month = $selectedYear.'-'.$selectedMonth;
$response = $ws->getActeList($params);
if ($response === false) {
$this->view->Error = true;
} else {
$this->view->Cmd = $response->item;;
}
}
public function assostatutAction()
{
$request = $this->getRequest();
// --- Année de départ
$user = new Scores_Utilisateur();
$startYear = substr($user->identity->dateDebutCompte,0,4);
if (empty($startYear)) {
$startYear = 2006;
}
// --- Date
$date = new Zend_Date();
$year = $date->toString('yyyy'); //Année en cours
$month = $date->toString('MM'); //Mois en cours
$nbYear = $year - $startYear + 1;
$selectYear = array();
for( $i=0; $i<$nbYear; $i++ ) {
$selectYear[] = $startYear + $i;
}
$this->view->Years = $selectYear;
$selectMonth = array('01','02','03','04','05','06','07','08','09','10','11','12');
$this->view->Months = $selectMonth;
$selectedYear = $request->getParam('y', date('Y'));
$this->view->year = $selectedYear;
$selectedMonth = $request->getParam('m', date('m'));
$this->view->month = $selectedMonth;
// --- Fin Date
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,340 +0,0 @@
<?php
class TelechargementController extends Zend_Controller_Action
{
/**
* Temps de mis en cache en heure
* @var interger
*/
protected $filetime = 8;
/**
* Répertoire de stockage pour le fichier
* @var string
*/
protected $path = '';
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init()
{
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$c = Zend_Registry::get('config');
$this->path = $c->profil->path->shared.'/files';
require_once 'Scores/WsScores.php';
}
/**
* Vérifie ou télécharge le fichier sur une url
* @param string $url
* URL of file to download
* @param mixed $filename
* Override filename
*/
protected function getFile($url, $filename=null)
{
if (!is_dir($this->path)) mkdir($this->path);
// --- Recuperation du nom du fichier
if ( $filename === null ) {
$tableau = explode('/', $url);
$file = $tableau[sizeof($tableau) - 1];
} else {
$file = $filename;
}
// --- Suppression du fichier si le temps de cache est depasse
if ( $this->filetime == 0 && file_exists($this->path.'/'.$file) ){
unlink($this->path.'/'.$file);
} elseif ( file_exists($this->path.'/'.$file) ) {
$dateFile = filemtime($this->path.'/'.$file);
$now = mktime(date('G'), date('i'), date('s'),
date('m') , date('d'), date('Y'));
$maxTime = mktime(date('G',$dateFile)+$this->filetime, date('i',$dateFile),
date('s',$dateFile), date('m',$dateFile),
date('d',$dateFile), date('Y',$dateFile));
if ( $maxTime - $now < 0 ) {
unlink($this->path.'/'.$file);
}
}
// --- Lock file exist
if ( file_exists($this->path.'/'.$file.'.lock') ) {
return null;
}
// --- Recuperation du fichier sur le serveur
if ( file_exists($this->path.'/'.$file) ) {
return $file;
} else {
// --- On check si le fichier est present sur l'url
try {
$client = new Zend_Http_Client($url);
$client->setStream();
$response = $client->request('GET');
if ( $response->isSuccessful() ) {
// --- Add a lock
file_put_contents($this->path.'/'.$file.'.lock', '');
if ( copy($response->getStreamName(), $this->path.'/'.$file) ) {
// --- Remove lock
unlink($this->path.'/'.$file.'.lock');
return $file;
}
// --- Remove lock
unlink($this->path.'/'.$file.'.lock');
}
return null;
} catch (Zend_Http_Client_Exception $e) {
return false;
}
}
}
/**
* Télécharge la consommation client sous forme de fichier csv et affiche le lien
*/
public function consommationAction()
{
$this->filetime = 0;
$request = $this->getRequest();
$start = $request->getParam('start', false);
//On souhaite récupérer l'url du fichier
if ( $start == 1 ) {
$mois = $request->getParam('mois');
$detail = $request->getParam('detail', 0);
$idClient = $request->getParam('idClient', 0);
$login = $request->getParam('login', '');
$all = $request->getParam('all', 0);
$date = substr($mois, 3, 4).substr($mois, 0, 2);
$user = new Scores_Utilisateur();
if (empty($login) && (!$user->isAdmin() && !$user->isSuperAdmin()) ) {
$login = $user->getLogin();
}
$ws = new WsScores();
$reponse = $ws->getLogsClients($date, $detail, $idClient, $login, $all);
if ( !empty($reponse->result->Url) ) {
echo $reponse->result->Url;
} else {
echo 'FALSE';
}
} else {
$url = $request->getParam('url', '');
$file = $this->getFile($url);
// --- En attente
if ( $file === null ) {
echo '';
}
// --- Fichier en erreur
elseif ( $file === false ) {
echo 'Erreur lors du chargement du fichier.';
}
// --- Fichier disponible
elseif ( file_exists($this->path.'/'.$file) ) {
echo '<u><a title="Télécharger le fichier"'.
' target="_blank" href="'.$this->view->url(array('module'=>'file', 'controller'=>'index',
'action'=>'consommation', 'q'=>$file), 'default', true).
'">Cliquez-ici pour télécharger le fichier.</a></u>';
}
}
}
/**
* Télécharge les surveillances sous forme de fichier csv et affiche le lien
*/
public function surveillanceAction()
{
$this->filetime = 4;
$request = $this->getRequest();
$start = $request->getParam('start', false);
// --- Get File Url
if ( $start == 1) {
$source = $request->getParam('source', '');
$user = new Scores_Utilisateur();
$login = $user->getLogin();
$idClient = $user->getIdClient();
$ws = new WsScores();
$reponse = $ws->getListeSurveillancesCsv($source, $login, $idClient);
if ( !empty($reponse->result->Url) ) {
echo $reponse->result->Url;
} else {
echo 'FALSE';
}
}
// --- Get File
else {
$url = $request->getParam('url', '');
$file = $this->getFile($url);
// --- En attente
if ( $file === null ) {
echo '';
}
// --- Fichier en erreur
elseif ( $file === false ) {
echo 'Erreur lors du chargement du fichier.';
}
// --- Fichier disponible
elseif ( file_exists($this->path.'/'.$file) ) {
echo '<u><a title="Télécharger le fichier"'.
' target="_blank" href="'.$this->view->url(array('module'=>'file', 'controller'=>'index',
'action'=>'surveillance', 'q'=>$file), 'default', true).
'">Cliquez-ici pour télécharger le fichier.</a></u>';
}
}
}
/**
* Télécharge le portefeuille sous forme de fichier csv et affiche le lien
* Enter description here ...
*/
public function portefeuilleAction()
{
$this->filetime = 4;
$request = $this->getRequest();
$start = $request->getParam('start', false);
if ($start==1) {
$user = new Scores_Utilisateur();
$login = $user->getLogin();
$idClient = $user->getIdClient();
$ws = new WsScores();
$reponse = $ws->getPortefeuilleCsv($login, $idClient);
if ( !empty($reponse->result->Url) ) {
echo $reponse->result->Url;
} else {
echo 'FALSE';
}
} else {
$url = $request->getParam('url', '');
$file = $this->getFile($url);
// --- En attente
if ( $file === null ) {
echo '';
}
// --- Fichier en erreur
elseif ( $file === false ) {
echo 'Erreur lors du chargement du fichier.';
}
// --- Fichier disponible
elseif ( file_exists($this->path.'/'.$file) ) {
echo '<u><a title="Télécharger le fichier"'.
' target="_blank" href="'.$this->view->url(array('module'=>'file', 'controller'=>'index',
'action'=>'portefeuille', 'q'=>$file), 'default', true).
'">Cliquez-ici pour télécharger le fichier.</a></u>';
}
}
}
/**
* Download pdf of bodacc history
*/
public function histopdfAction()
{
$request = $this->getRequest();
$q = $request->getParam('q', '');
$host = base64_decode($request->getParam('host', ''));
//Authenticate info
$auth = Zend_Auth::getInstance();
$identity = $auth->getIdentity();
$authinfo = '/login/'.$identity->username.'/hach/'.$identity->password;
$url = $host.$authinfo.'/q/'.$q;
$this->logger->info($url);
$file = $this->getFile($url, uniqid('histo-').'.pdf');
// --- En attente
if ( $file === null ) {
echo '';
}
// --- Fichier en erreur
elseif ( $file === false ) {
echo 'Erreur lors du chargement du fichier.';
}
// --- Fichier disponible
elseif ( file_exists($this->path.'/'.$file) ) {
if (filesize($this->path.'/'.$file) > 0) {
echo '<u><a title="Télécharger le fichier" target="_blank" href="'.$this->view->url(array('module'=>'file',
'controller'=>'bodacc', 'action'=>'histo', 'q'=>$file), 'default', true).
'">Cliquez-ici pour télécharger le fichier.</a></u>';
} else {
echo "Erreur lors du téléchargement du fichier.";
}
}
}
/**
* Download bilan pdf file
*/
public function bilanAction()
{
$this->filetime = 40;
$request = $this->getRequest();
$siren = $request->getParam('siren');
$dateCloture = $request->getParam('dateCloture');
$reference = $request->getParam('reference');
//Récupération du l'URL
require_once 'Scores/WsScores.php';
$ws = new WsScores();
$url = $ws->getPiecesBilan($siren, 'T', $dateCloture, $reference);
//Téléchargement
if( $url !== false) {
$this->logger->info($url);
$file = $this->getFile($url);
$this->logger->info('File:'.$this->path.'/'.$file);
// --- En attente
if ( $file === null ) {
echo '';
}
// --- Fichier en erreur
elseif ( $file === false ) {
echo 'Erreur lors du chargement du fichier.';
}
// --- Fichier disponible
elseif ( file_exists($this->path.'/'.$file) ) {
if (filesize($this->path.'/'.$file) > 0) {
echo '<br/><u><a title="Télécharger le fichier" target="_blank" href="'.$this->view->url(array(
'module'=>'file', 'controller'=>'greffe', 'action'=>'bilan', 'q'=>$file), 'default', true).
'">Cliquez-ici pour télécharger le fichier.</a></u>';
} else {
echo "<br/>Erreur lors du téléchargement du fichier.";
}
}
} else {
echo "<br/>Erreur.";
}
}
}

View File

@ -1,759 +0,0 @@
<?php
class UserController extends Zend_Controller_Action
{
protected $theme;
/**
* Return a ramdom password
* @param int $length
* Length of the string
* @param int $strength
* $strength = 1:- 0-9
* $strength = 2:- A-Z0-9
* $strength = 3:- A-Za-z0-9
* $strength = 4:- A-Za-z0-9 and # $ % &
* $strength = 5:- A-Za-z0-9 and # $ % & = > ? @
* @return string
*/
protected function randomPassword($length,$strength)
{
$char_sets=array('48-57','65-90','97-122','35-38','61-64');
$new_password='';
srand(microtime()*10000000);
for($i=0;$i<$length;$i++){
$random=rand(0,$strength-1);
list($start,$end)=explode('-',$char_sets[$random]);
$new_password.=chr(rand($start,$end));
}
return $new_password;
}
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function init()
{
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Theme
$this->theme = Zend_Registry::get('theme');
require_once 'Scores/WsScores.php';
}
/**
* Affiche le fomulaire d'edition des paramètres utilisateur
*/
public function indexAction()
{
$this->view->headLink()->appendStylesheet($this->theme->pathStyle.'/user.css', 'all');
$user = new Scores_Utilisateur();
if (!$user->checkPerm('MONPROFIL')){
$this->forward('perms', 'error');
}
$this->view->assign('device_type', $user->getBrowserInfo()->mobile);
$this->view->assign('browser_info', $user->getBrowserInfo()->name.' '.$user->getBrowserInfo()->version);
$this->view->headScript()->appendFile($this->theme->pathScript.'/user.js', 'text/javascript');
$request = $this->getRequest();
$messages = '';
$isProfilUpdated = false;
$isPasswordUpdated = false;
$updateResult = false;
$login = $request->getParam('login', '');
$op = $request->getParam('op');
//Récupération des informations de l'identité
$auth = Zend_Auth::getInstance();
$identity = $auth->getIdentity();
//Save data
if ( $request->isPost() ) {
$options = $request->getParam('frmOptions', '');
$action = $options['action'];
if ($login=='') $login = $options['login'];
//Enregistrement des données new & update
if (in_array($action, array('new','update'))) {
if ( $options['changepwd'] != 1 ) {
$options['password'] = '';
}
if ( in_array($options['profil'], array('Administrateur', 'SuperAdministrateur'))
&& !in_array('monprofil', $options['droits']) ) {
$options['droits'][] = 'monprofil';
}
if( !isset($options['profil']) ) {
$options['profil'] = 'Utilisateur';
}
$ws = new WsScores();
$this->logger->info('setInfosLogin');
$this->logger->info(print_r($options,1));
$reponse = $ws->setInfosLogin($login, $action, $options);
$this->logger->info(print_r($response,1));
$isProfilUpdated = true;
$message = 'Erreur lors de la mise à jour du compte !';
if (is_string($reponse)) {
$message = $reponse;
} elseif ($reponse){
$updateResult = true;
$message = 'Compte mis à jour.';
}
}
// --- Write change in session
if ($identity->idClient == $options['idClient'] && $identity->username == $login) {
// --- Modification lors du changement de mot de passe
if ($options['changepwd']==1 && $updateResult) {
$identity->password = md5($login.'|'.$options['password']);
$auth->getStorage()->write($identity);
}
// --- Mise à jour du profil
if ($isProfilUpdated && $updateResult) {
$ws = new Scores_Ws_Client('gestion', '0.3');
$adressIp = $_SERVER['REMOTE_ADDR'];
$parameters = new stdClass();
$parameters->login = $identity->username;
$parameters->ipUtilisateur = $adressIp;
$parameters->from = null;
$InfosLogin = $ws->getInfosLogin($parameters);
$identity = $user->updateProfil($InfosLogin);
$auth->getStorage()->write($identity);
}
// --- Gestion mode edition en SESSION
if ($action=='update') {
$modeEdition = $request->getParam('modeEdition', false);
if ( $modeEdition ) {
$identity->modeEdition = true;
$auth->getStorage()->write($identity);
}
}
}
}
if ( $isProfilUpdated || $isPasswordUpdated ) {
$this->view->assign('message', $message);
}
$isAdmin = false;
if ( $identity->profil == 'Administrateur'
|| $identity->profil == 'SuperAdministrateur' ) {
$isAdmin = true;
}
$this->view->assign('isAdmin', $isAdmin);
$isSuperAdmin = false;
if ($identity->profil == 'SuperAdministrateur') {
$isSuperAdmin = true;
}
$this->view->assign('isSuperAdmin', $isSuperAdmin);
if ($op=='new')
{
$idClient = $request->getParam('idClient', '');
if ($idClient == '') {
$idClient = $identity->idClient;
}
$ws = new WsScores();
$reponse = $ws->getNextLogin($idClient);
$options->idClient = $idClient;
if ($identity->idClient!=1 && $identity->profil!='SuperAdministrateur') {
$options->profil = 'Utilisateur';
}
$this->view->assign('options', $options);
$this->view->assign('password', $this->randomPassword(10, 3));
$this->view->assign('loginNew', $reponse->result->racine);
$this->view->assign('droitsClients', explode(' ', strtolower($reponse->result->droitsClients)));
$this->view->assign('action', 'new');
$this->view->assign('pref', array());
}
elseif (!empty($op) || $op!='new')
{
if ( !empty($login) && $identity->username != $login ) {
$ws = new Scores_Ws_Client('gestion', '0.3');
$adressIp = $_SERVER['REMOTE_ADDR'];
$parameters = new stdClass();
$parameters->login = $login;
$parameters->ipUtilisateur = $adressIp;
$parameters->from = null;
try {
$reponse = $ws->getInfosLogin($parameters);
if ($reponse === false) {
$this->view->message = "Impossible d'afficher l'utilisateur.";
} else {
$this->view->assign('options', $reponse->result);
$this->view->assign('loginVu', $reponse->result->login);
$this->view->assign('droits', explode(' ', strtolower($reponse->result->droits)));
$this->view->assign('droitsClients', explode(' ', strtolower($reponse->result->droitsClients)));
}
} catch (Exception $e) {
$this->view->message = $e->getMessage();
}
} else {
$this->view->assign('options', $identity);
$this->view->assign('loginVu', $identity->username);
$this->view->assign('droits', explode(' ', strtolower($identity->droits)));
$this->view->assign('droitsClients', explode(' ', strtolower($identity->droitsClients)));
}
$this->view->assign('loginNew', '');
$this->view->assign('action', 'update');
$this->view->assign('pref', explode(' ',$identity->pref));
}
$ws = new WsScores();
//Liste des catégories des accès
$reponse = $ws->getCategory();
$wscategory = $reponse->item;
$this->view->assign('wscategory', $wscategory);
//Liste de tous les droits
$listeDroits = $ws->getListeDroits();
$droitsLib = array();
foreach($listeDroits->item as $droit) {
$droitsLib[strtoupper($droit->code)] = $droit->desc;
}
$this->view->assign('droitsLib', $droitsLib);
//Liste de toutes les préférences
$listePrefs = $ws->getListePrefs();
$prefsLib = array();
foreach($listePrefs->item as $pref) {
$prefsLib[strtoupper($pref->code)] = $pref->desc;
}
$this->view->assign('prefsLib', $prefsLib);
}
/**
* Display box to enter emails
* One main email and two secondary
* Email length 80 * 3 = 240
* 255 chars is the length to store emails (email1;email2;email3)
*/
public function emailAction()
{
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$check = $request->getParam('check');
$email = $request->getParam('q');
if ( $check == 1) {
$this->view->assign('checkemail', true);
$valid = false;
$this->view->assign('msg', 'Email invalide !');
if (null !== $email) {
$validateur = new Zend_Validate_EmailAddress();
$valid = $validateur->isValid($email);
if ( $valid ) {
$this->view->assign('msg', 'Modification effectué.');
$this->view->assign('email', $email);
}
}
} else {
$this->view->assign('email', $email);
}
}
public function emailsecondaryAction()
{
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$user = new Scores_Utilisateur();
$mode = $request->getParam('mode');
$this->view->assign('mode', $mode);
$email = $request->getParam('email');
$login = $request->getParam('login', $user->getLogin());
$this->view->assign('login', $login);
$idClient = $request->getParam('client', $user->getIdClient());
if ( $mode === null ) {
$ws = new WsScores();
$result = $ws->getGestionEmail($login);
$emails = array();
if (count($result->item)>0) {
$emails = $result->item;
}
$this->view->assign('emails', $emails);
} elseif ( $mode == 'set' ) {
$this->view->assign('msg', 'Email invalide !');
if (null !== $email) {
$validateur = new Zend_Validate_EmailAddress();
$valid = $validateur->isValid($email);
if ( $valid ) {
$ws = new WsScores();
$result = $ws->setGestionEmail($email, $login);
if ( $result ) {
$this->view->assign('msg', 'Modification effectué.');
$this->view->assign('email', $email);
}
}
}
} elseif ( $mode == 'del' ) {
$this->view->assign('msg', 'Erreur lors de la suppression !');
$id = $request->getParam('id');
$ws = new WsScores();
$result = $ws->setGestionEmail($email, $login, $id, $mode);
if ( $result ) {
$this->view->assign('msg', 'Adresse email supprimé.');
}
}
}
/**
* Téléchargement de la consommation au format CSV
*/
public function consoAction()
{
$this->view->headScript()->appendFile($this->theme->pathScript.'/conso.js', 'text/javascript');
$user = new Scores_Utilisateur();
$request = $this->getRequest();
$idClient = $request->getParam('idClient', $user->getIdClient());
$login = $request->getParam('login', '');
$this->view->assign('idClient', $idClient);
$this->view->assign('login', $login);
$this->view->assign('profil', $user->getProfil());
}
/**
* Renvoi vers le formulaire utilisateur avec les paramètres de la requete
*/
public function editAction()
{
$params = $this->getRequest()->getParams();
$this->_forward('index', 'user', null, $params);
}
/**
* Suppression d'un utilisateur
*/
public function deleteAction()
{
$request = $this->getRequest();
$login = $request->getParam('login');
$action = 'delete';
$ws = new WsScores();
$ws->setInfosLogin($login, $action);
//Redirect
$this->_forward('liste');
}
/**
* Activation d'un utilisateur
*/
public function enableAction()
{
$request = $this->getRequest();
$login = $request->getParam('login');
$action = 'enable';
$ws = new WsScores();
$ws->setInfosLogin($login, $action);
//Redirect
$this->_forward('liste');
}
/**
* Désactivation d'un utilisateur
*/
public function disableAction()
{
$request = $this->getRequest();
$login = $request->getParam('login');
$action = 'disable';
$ws = new WsScores();
$ws->setInfosLogin($login, $action);
//Redirect
$this->_forward('liste');
}
/**
* Méthode AJAX pour modifier le password d'un utilisateur
*/
public function changepwdAction()
{
//Redirect
}
/**
* Affiche la liste des utiliateurs
*/
public function listeAction()
{
$user = new Scores_Utilisateur();
$request = $this->getRequest();
$idClient = $request->getParam('idClient', $user->getIdClient());
if (!$user->isSuperAdmin() && !$user->isAdmin()) {
$this->renderScript('error/perms.phtml');
}
if ($user->isAdmin()){
$idClient = $user->getIdClient();
}
$ws = new WsScores();
$infos = $ws->getListeUtilisateurs($user->getLogin(), $idClient);
$utilisateurs = $infos->result->item;
$this->view->assign('utilisateurs', $utilisateurs);
$this->view->assign('idClient', $idClient);
}
/**
* Gestion de l'authentification
*/
public function loginAction()
{
$this->_helper->layout()->disableLayout();
$this->view->headTitle()->append('Connexion');
$form = new Application_Form_Login();
$this->view->form = $form;
$request = $this->getRequest();
if ( $request->isPost() ) {
$formData = $request->getPost();
if ($form->isValid($formData)) {
$login = $form->getValue('login');
$pass = $form->getValue('pass');
$auth = Zend_Auth::getInstance();
$authAdapter = new Scores_Auth_Adapter_Ws($login, $pass);
$result = $auth->authenticate($authAdapter);
//Auth is valid
if ( $result->isValid() ) {
//Save browser information
$screenSize = $request->getParam('screenSize', 'unknow');
$user = new Scores_Utilisateur();
$info = get_browser();
$isMobile = ($info->ismobiledevice==1) ? 1 : 0;
$user->setBrowserInfo($info->platform, $info->browser, $info->version, $isMobile, $screenSize);
//Get previous url if user has been disconnected
$url = '';
if (Zend_Session::namespaceIsset('login')){
$session = new Zend_Session_Namespace('login');
if (isset($session->url)) {
$url = $session->url;
}
}
if (!empty($url) && $url!='/user/login' && $url!='/user/logout' && $url!='/localauth'){
$this->redirect($url);
}
$this->redirect('/');
}
//Auth error
else {
$this->view->message = '';
$this->logger->info(print_r($result));
foreach ($result->getMessages() as $message) {
$this->view->message.= $message."<br/>";
}
}
}
}
// Pas de validation du formulaire
else {
$this->logger->info('DISPLAY');
}
}
/**
* Gestion de la déconnexion
*/
public function logoutAction()
{
Zend_Auth::getInstance()->clearIdentity();
$session = new Zend_Session_Namespace('wcheck');
$session->unsetAll();
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$message = $request->getParam('message');
$this->view->assign('message', $message);
$ajax = $request->getParam('ajax', 0);
$this->view->assign('ajax', $ajax);
$refresh = 5;
$url = 'http://'.$_SERVER['SERVER_NAME'].$this->view->url(array(
'controller' => 'user',
'action' => 'login',
), 'default', true);
$this->view->assign('url', $url);
if ( $ajax == 0 ) {
$this->view->assign('refresh', $refresh);
$this->view->headMeta()->appendHttpEquiv('refresh', $refresh.'; url='.$url);
}
}
/**
* Erreur pour les connexions en ipOnly
*/
public function iponlyAction()
{
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$message = $request->getParam('message');
$this->view->assign('message', $message);
}
/**
* Mettre à jour le mode edition en session sans refresh de la page
*/
public function editionsessionAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$request = $this->getRequest();
$mode = $request->getParam('mode', 'false');
$auth = Zend_Auth::getInstance();
$identity = $auth->getIdentity();
if ($identity->idClient == 1) {
if ($mode == 'false') {
$identity->modeEdition = false;
echo 0;
} else {
$identity->modeEdition = true;
echo 1;
}
$auth->getStorage()->write($identity);
} else {
echo 0;
}
}
/**
* Override email in surveillance portfolio
*/
public function emailsurveillanceAction()
{
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$user = new Scores_Utilisateur();
//Execute webservice operation
if ( $request->isPost() ) {
$email = trim($request->getParam('email'));
if ($user->isAdmin() || $user->isSuperAdmin()) {
$login = $request->getParam('login');
}
if (empty($email)) {
$result = "Aucun email défini!";
} else if (empty($login)) {
$result = "Aucun utilisateur défini!";
} else {
$ws = new WsScores();
$result = $ws->setSurveillancesMail($login, $email);
}
$this->view->assign('result', $result);
}
//Display form in dialog
else {
if ($user->isAdmin() || $user->isSuperAdmin()) {
$login = $request->getParam('login');
} else {
$login = $user->getLogin();
}
$this->view->assign('login', $login);
$this->view->assign('dialog',true);
}
}
/**
* Changer la langue de l'utilisateur
*/
public function langAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$lang = $this->getRequest()->getParam('lang', null);
$auth = Zend_Auth::getInstance();
$identity = $auth->getIdentity();
$identity->langtmp = $lang;
$auth->getStorage()->write($identity);
}
/**
* Changer le theme de l'utilisateur
*/
public function changethemeAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$request = $this->getRequest();
$nom = $request->getParam('nom', 'default');
$auth = Zend_Auth::getInstance();
$identity = $auth->getIdentity();
$identity->theme = $nom;
$auth->getStorage()->write($identity);
//Rediriger vers l'écran de recherche
$this->_redirect('/');
}
/**
* Display browser informations on a simple page
*/
public function browserAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
//Load bootstrap
$bootstrap = Zend_Controller_Front::getInstance()->getParam('bootstrap');
//Get useragent and device informations
$userAgent = $bootstrap->getResource('useragent');
$device = $userAgent->getDevice();
//Display
echo "<pre>";
print_r(get_browser());
print_r($device->getAllFeatures());
echo "</pre>";
}
/**
* Sends email to the specific client, who requests for forgotten password
*/
public function motpasseAction()
{
$request = $this->getRequest();
$name = 'Identifiants oubliés ?';
$params = array(
'identifiant' => '',
'telephone' => '',
'email' => '',
'nom' => '',
'prenom' => '',
'fonction' => '',
'service' => '',
'rsociale' => '',
);
$this->_helper->layout()->disableLayout();
if ( $request->isPost() ) {
$params = $request->getParams();
$message = '';
$paramlist = array(
'telephone' => 'Numéro de téléphone direct',
'email' => 'Adresse email',
'nom' => 'Nom',
'prenom' => 'Prénom',
'fonction' => 'Fonction',
'service' => 'Service',
'rsociale' => 'Sociale',
);
foreach ($paramlist as $item => $val) {
if (!isset($params[$item])) {
$message .= "Champs $val vide !<br/>";
}
}
$validator = new Zend_Validate_EmailAddress();
if (isset($params['email'])){
if (!$validator->isValid($params['email'])) {
$message .="Adresse email invalide ! <br/>";
}
}
if ($message == '') {
$mailbody = '<style type="text/css">table {font-family:Arial, Helvetica, sans-serif; font-size: 12px; width: 550px; border: none;}table td{padding: 4px 8px;}</style>';
$mailbody .= "Demande d'envoi des identifiants.<br /><br />";
$mailbody .= "L'un de nos clients a égaré son(ses) identifiant(s).<br />";
$mailbody .= "Via notre lien -identifiants oubliés- il a effectué une demande de transmission de ces codes.<br />";
$mailbody .= "<p>A l'aide des informations ci-dessous, merci de retrouver ces codes et les lui envoyer par email.</p>";
$mailbody .= "<table><tr bgcolor='#eeeeee'><td width='200px'><strong>Identifiant :</strong></td><td>".$params['identifiant']."</td></tr>";
$mailbody .= "<tr><td><strong>Adresse email:</strong></td><td>".$params['email']."</td></tr>";
$mailbody .= "<tr bgcolor='#eeeeee'><td><strong>Numéro de téléphone direct:</strong></td><td>".$params['telephone']."</td></tr>";
$mailbody .= "<tr><td><strong>Nom:</strong></td><td>".$params['nom']."</td></tr>";
$mailbody .= "<tr bgcolor='#eeeeee'><td><strong>Prénom:</strong></td><td>".$params['prenom']."</td></tr>";
$mailbody .= "<tr><td><strong>Fonction:</strong></td><td>".$params['fonction']."</td></tr>";
$mailbody .= "<tr bgcolor='#eeeeee'><td><strong>Service:</strong></td><td>".$params['service']."</td></tr>";
$mailbody .= "<tr><td><strong>Dénomination Sociale:</strong></td><td>".$params['rsociale']."</td></tr></table>";
$mailbody .= "<p>Si les informations fournies ne permettent pas d'identifier correctement l'utilisateur, ";
$mailbody .= "merci d'émettre un message sur le mail communiquer en précisant que \"Les éléments confiés ne permettent pas d'identifier l'utilisateur ";
$mailbody .= "et par conséquence de vous délivrer les codes d'accès demandés\".<br />";
$mailbody .= "Aussi nous vous invitons à vous rapprocher de votre interlocuteur commercial habituel ";
$mailbody .= "ou de votre responsable suivi relations Scores & Décisions au sein de votre société.</p>";
$mail = new Scores_Mail_Method();
$mail->setSubject("Demande d'envoi des identifiants");
$mail->setBodyHtmlC($mailbody);
$mail->setFromKey('supportdev');
$mail->addToKey('support');
$mail->setReplyTo($params['email']);
try {
$mail->execute();
$this->view->assign('sendEmail' , true);
}
catch ( Zend_Mail_Transport_Exception $e ){
$message = $e->getMessage();
}
}
$this->view->assign('message', $message);
}
}
}

View File

@ -1,42 +0,0 @@
<style>
table { width:100%; }
table th { border:1px solid; font-weight:bold; padding:5px; }
table tr { }
table td { border:1px solid; padding:5px; }
</style>
<div id="center">
<h1>Nouveautés</h1>
<div class="paragraph">
<!-- Tri par date - Tri par catégorie -->
</div>
<h2>Liste par date</h2>
<div class="paragraph">
<table>
<thead>
<tr>
<th>Date</th>
<th>Intitulé</th>
<th>Catégorie</th>
</tr>
</thead>
<tbody>
<?php if ( count($this->nouveautes)>0 ){?>
<?php foreach ( $this->nouveautes as $nouveau) {?>
<tr>
<td><?=substr($nouveau->date,8,2).'/'.substr($nouveau->date,5,2).'/'.substr($nouveau->date,0,4)?></td>
<td>
<a href="<?=$this->url(array('module'=>'file', 'controller'=>'index', 'action'=>'new',
'q'=>$nouveau->fichier))?>" target="_blank">
<?=$nouveau->intitule?></a>
</td>
<td><?=$nouveau->categorie?></td>
</tr>
<?php }?>
<?php }?>
</tbody>
</table>
</div>
</div>

View File

@ -1,96 +0,0 @@
<?php echo $this->doctype(); ?>
<html>
<head>
<?php echo $this->headMeta(); ?>
<?php echo $this->headTitle(); ?>
<?php echo $this->headStyle(); ?>
<?php echo $this->headLink(); ?>
<?php echo $this->headScript(); ?>
</head>
<body>
<div id="wrap">
<div class="container">
<div class="row">
<div class="col-md-6">
<h1 class="text-center">Scores & Decisions</h1>
<br/>
<p>
Scores & Decisions est l'éditeur d'une base de données de référence sur toutes les entreprises de France.
Scores & Decisions est licencié officiel depuis 2008 pour la rediffusion du répertoire Sirène (INSEE), du RNCS
Registre National du Commerce et des Sociétés (INPI) et des Journaux Officiels (DILA). Scores & Decisions est
un service privé distinct des services publics cités.
</p>
<br/>
<div class="panel panel-default">
<div class="panel-body">
<p class="text-primary">Spécialiste de l'information légales et financières sur les entreprises, Scores & Décisions vous permet par
confirmation des éléments ci-contre d'accéder à toute sa base de données.</p>
<ul class="list-group">
<li class="list-group-item">
Télécharger nos Conditions Générales de Services
<a href="<?=$this->baseUrl()?>/documents/inextenso_cgs.pdf" target="_blank">
<span class="glyphicon glyphicon-file pull-right" aria-hidden="true"></span></a>
</li>
<li class="list-group-item">
Télécharger nos Conditions Tarifaires
<a href="#" target="_blank">
<span class="glyphicon glyphicon-file pull-right" aria-hidden="true"></span></a>
</li>
<li class="list-group-item">
Télécharger les coordonnées de vos contacts
<a href="<?=$this->baseUrl()?>/documents/inextenso_contacts.pdf" target="_blank">
<span class="glyphicon glyphicon-file pull-right" aria-hidden="true"></span></a>
</li>
</ul>
</div>
</div>
</div>
<div class="col-md-6">
<h2>Trouvez les réponses à vos questions !</h2>
<ul class="arguments">
<li><strong>Disposez de certitudes sur l'identité de vos interlocuteurs, les liens financiers et les liens
dirigeants... ></strong> Mon client a t il une existence légale ? Quels sont les derniers événements qui ont touché l'entreprise ?</li>
<li><strong>Évitez les mauvais payeurs ></strong>
Ce prospect paye t'il rapidement, est-il en procédure collective ? Quel est sa rentabilité, son niveau de
trésorerie ?</li>
<li><strong>Surveillez la solvabilité de vos partenaires, clients et fournisseurs ou concurrents ></strong>
Mes clients sont ils viables dans la durée, puis je continuer et développer les ventes ?</li>
<li><strong>Découvrez la valeur de votre entreprises ou celles de vos concurrents ></strong> Mon entreprise a t elle de la
valeur ? combien me coûterait le rachat d'un concurrent ?</li>
<li><strong>Trouvez vos futurs clients ></strong> Où sont et qui sont mes prospects ?</li>
</ul>
<p>Les données agrégées sont officielles, exhaustives, fraîches et opposables aux tiers. Elles sont utilisées
par des grands groupes et institutionnels dans des cadres contentieux, de conformité, de fraude...</p>
<?php if ($this->FormUrlParams) {?>
<a type="button" class="btn btn-success btn-lg" href="<?=$this->url($this->FormUrlParams, 'default', true)?>">Accédez au site</a>
<?php }?>
</div>
</div>
</div>
</div>
<?php echo $this->inlineScript(); ?>
</body>
</html>

View File

@ -1,58 +0,0 @@
<?php echo $this->doctype(); ?>
<html>
<head>
<?php echo $this->headMeta(); ?>
<?php echo $this->headTitle(); ?>
<?php echo $this->headStyle(); ?>
<?php echo $this->headLink(); ?>
<?php echo $this->headScript(); ?>
</head>
<body>
<div id="wrap">
<div class="container">
<div class="row">
<div class="col-md-6"><img src="/themes/default/images/partner/<?=$this->logo?>"/></div>
<div class="col-md-6">
<h2 class="form-signin-heading">Extranet <small>Scores & Décisions</small></h2>
<?php
//Error
if ($this->Error) {?>
<div style="text-align:center;"><p class="text-danger"><span>Une erreur est survenue</span></p></div>
<?php
}
//Message
else if ($this->Message) {?>
<div style="text-align:center;"><p class="text-danger"><span><?=$this->Message?></span></p></div>
<?php
}
//OK
else if ($this->UserCreated) {?>
<div>
<p class="text-success">
<span>Votre compte a été crée avec succès.</span>
<a href="<?=$this->url(array_merge(array('controller'=> 'auth', 'action' => 'index'), $this->UrlArgs))?>">
Cliquez ici pour être redirigé vers la page d'accueil.</a>
</p>
</div>
<?php }?>
</div>
</div>
</div>
</div>
<div id="footer">
<div class="container">
<p class="text-muted credit"> &copy; <?=date('Y')?> <a href="http://www.scores-decisions.com">Scores & Décisions SAS</a>.</p>
</div>
</div>
<?php echo $this->inlineScript(); ?>
</body>
</html>

View File

@ -1,126 +0,0 @@
<?php echo $this->doctype(); ?>
<html>
<head>
<?php echo $this->headMeta(); ?>
<?php echo $this->headTitle(); ?>
<?php echo $this->headStyle(); ?>
<?php echo $this->headLink(); ?>
<?php echo $this->headScript(); ?>
</head>
<body>
<div id="wrap">
<div class="container">
<div class="row">
<div class="col-md-6">
<p><img src="/themes/default/images/partner/<?=$this->logo?>"/></p>
<div class="panel panel-default">
<div class="panel-body">
<p class="text-primary">Spécialiste de l'information légales et financières sur les entreprises, Scores & Décisions vous permet par
confirmation des éléments ci-contre d'accéder à toute sa base de données.</p>
<ul class="list-group">
<li class="list-group-item">
Télécharger nos Conditions Générales de Services
<a href="<?=$this->baseUrl()?>/documents/inextenso_cgs.pdf" target="_blank">
<span class="glyphicon glyphicon-file pull-right" aria-hidden="true"></span></a>
</li>
<li class="list-group-item">
Télécharger nos Conditions Tarifaires
<a href="#" target="_blank">
<span class="glyphicon glyphicon-file pull-right" aria-hidden="true"></span></a>
</li>
<li class="list-group-item">
Télécharger les coordonnées de vos contacts
<a href="<?=$this->baseUrl()?>/documents/inextenso_contacts.pdf" target="_blank">
<span class="glyphicon glyphicon-file pull-right" aria-hidden="true"></span></a>
</li>
</ul>
</div>
</div>
</div>
<div class="col-md-6">
<form method="post" action="<?=$this->url(array('controller'=>'auth', 'action'=>'userssocreate'), 'default', true)?>">
<h2 class="form-signin-heading">Extranet <small>Scores &amp; Décisions</small></h2>
<?php
//Error
if ($this->Error) {?>
<div style="text-align:center;"><p class="text-danger"><span>Une erreur est survenue</span></p></div>
<?php
}
//Message
else if ($this->Message) {?>
<div style="text-align:center;"><p class="text-danger"><span><?=$this->Message?></span></p></div>
<?php
}
//NoUser
else if ($this->NoUser) {?>
<div><p class="text-warning"><span>
Votre compte n'existe pas encore. Compléter le formulaire puis valider pour créer votre compte.
</span></p>
</div>
<?php foreach ($this->Params as $item) {?>
<input type="hidden" name="P-<?=$item->label?>" value="<?=$item->value?>"/>
<?php }?>
<input type="hidden" name="partner" value="<?=$this->FormPartner?>"/>
<div class="form-group">
<label for="identifiant">Identifiant</label>
<input type="text" id="identifiant" value="<?=$this->FormIdentifiant?>" class="form-control" disabled>
<input type="hidden" name="login" value="<?=$this->FormIdentifiant?>">
</div>
<div class="form-group">
<label for="email">Email</label>
<input type="text" class="form-control" value="<?=$this->FormCourriel?>" disabled>
<input type="hidden" name="email" value="<?=$this->FormCourriel?>">
</div>
<div class="form-group">
<label for="siret">SIRET</label>
<input type="text" class="form-control" name="siret" value="<?=$this->FormSiret?>">
</div>
<div class="form-group">
<label for="nom">Nom</label>
<input type="text" class="form-control" name="nom" value="<?=$this->FormNom?>">
</div>
<div class="form-group">
<label for="prenom">Prénom</label>
<input type="text" class="form-control" name="prenom" value="<?=$this->FormPrenom?>">
</div>
<div class="form-group">
<label for="tel">Téléphone</label>
<input type="text" class="form-control" name="tel" value="<?=$this->FormTel?>">
</div>
<button class="btn btn-lg btn-primary btn-block clearfix" type="submit">Valider</button>
<?php }?>
</form>
</div>
</div>
</div>
</div>
<div id="footer">
<div class="container">
<p class="text-muted credit"> &copy; <?=date('Y')?> <a href="http://www.scores-decisions.com">Scores & Décisions SAS</a>.</p>
</div>
</div>
<?php echo $this->inlineScript(); ?>
</body>
</html>

View File

@ -1,190 +0,0 @@
<style>
#identifiant {
float:left;
width:40%;
}
#modules {
float:left;
width:40%;
}
#listeModules {
position:absolute;
width:500px;
display:none;
background-color:#FBF7AA;
border:1px solid #000000;
z-index:3;
}
#closelisteModules {
float:right;
padding:0.4em 1em;
}
#listeModules ul {
width:100%;
margin-left:-10px;
list-style-type:none;
}
#listeModules ul li {
display:inline;
float:left;
width:50%;
}
</style>
<div id="center">
<h1>Banque de France - Modules</h1>
<h2>Recherche FIBEN / FCC identifiant unique</h2>
<div class="paragraph">
<form name="rFibenU" method="post" action="<?=$this->url(array('controller'=>'bdf', 'action'=>'module'))?>">
<input type="hidden" name="type" value="u"/>
<input type="hidden" name="siret" value="<?=$this->siret?>"/>
<div id="identifiant">
<label>Identifiant</label> <input type="text" name="req" value="<?=$this->req?>"/>
<br/><span>SIREN ou clé BDF</span>
</div>
<div id="modules" class="clearfix">
<a href='#' id="listeModulesD">Liste des modules</a>
<span id="selected">
<?php if ($this->module && is_array($this->module)){ ?>
<?php
foreach ($this->listModulesFiben as $id => $module) {
if (isset($module['liste']) == false || $module['liste'] !== false) {
if (in_array($id, $this->module))
{
echo '<br/>'.$module['titre'];
}
}
}
foreach ($this->listModulesFcc as $id => $module) {
if (isset($module['liste']) == false || $module['liste'] !== false) {
if (in_array($id, $this->module))
{
echo '<br/>'.$module['titre'];
}
}
}
?>
<?php } ?>
</span>
</div>
<div id="listeModules">
<a href="#" id="closelisteModules">Fermer</a>
<ul>
<?php
foreach ($this->listModulesFiben as $id => $module) {
if (isset($module['liste']) == false || $module['liste'] !== false) {
$checked = '';
if (isset($this->module) && is_array($this->module) && in_array($id, $this->module))
{
$checked = 'checked';
}
?>
<li>
<input type="checkbox" name="bdfmodule[]" value="<?=$id?>" <?=$checked?>/>
<?=$module['titre']?>
</li>
<?php
}
}
foreach ($this->listModulesFcc as $id => $module) {
if (isset($module['liste']) == false || $module['liste'] !== false) {
$checked = '';
if (isset($this->module) && is_array($this->module) && in_array($id, $this->module))
{
$checked = 'checked';
}
?>
<li>
<input type="checkbox" name="module[]" value="<?=$id?>" <?=$checked?>/>
<?=$module['titre']?>
</li>
<?php
}
}
?>
</ul>
<br/>
</div>
<input class="button" type="submit" name="rFiben" value="Afficher"/>
</form>
</div>
<br/>
<h2>Recherche FIBEN / FCC identifiants multiples</h2>
<div class="paragraph">
<form name="rFibenM" method="post" action="<?=$this->url(array('controller'=>'bdf', 'action'=>'module'))?>">
<input type="hidden" name="type" value="m"/>
<input type="hidden" name="siret" value="<?=$siret?>"/>
<div id="identifiant">
<label>Identifiant</label>
<input type="text" name="identifiant[]" value="<?=$req?>" />
<a href="#" id="addIdentifiant">Ajouter</a>
</div>
<div id="modules" class="clearfix">
<label>Module</label>
<select name="bdfmodule">
<?php
foreach ($this->listModulesFiben as $id => $module) {
if (isset($module['liste']) == false || $module['liste'] !== false) {
echo '<option value="'.$id.'">'.$module['titre'].'</option>';
}
}
foreach ($this->listModulesFcc as $id => $module) {
if (isset($module['liste']) == false || $module['liste'] !== false) {
echo '<option value="'.$id.'">'.$module['titre'].'</option>';
}
}
?>
</select>
</div>
<input class="button" type="submit" name="rFiben" value="Afficher"/>
</form>
</div>
<br/>
<h2>Recherche FICP</h2>
<div class="paragraph">
<form name="rFicp" method="post" action="<?=$this->url(array('controller'=>'bdf', 'action'=>'module'))?>">
<input type="hidden" name="bdfmodule" value="G"/>
<input type="hidden" name="service" value="ficp"/>
<label>Clé BDF</label>
<input type="text" name="req"/>
<input class="button" type="submit" name="rFicp" value="Ok"/>
</form>
</div>
</div>
<script>
$(function(){
$('#listeModulesD').click(function(){
var position = $(this).position();
$('#listeModules').css('top', position.top);
$('#listeModules').css('left', position.left-200);
var display = $('#listeModules').css('display');
if(display=='none') $('#listeModules').css('display', 'block');
else $('#listeModules').css('display', 'none');
});
$('#closelisteModules').click(function(){
$('#listeModules').css('display', 'none');
$('#modules > #selected').html('');
$('input[name="module[]"]').each(function(){
if ($(this).prop('checked')){
$('#modules > #selected').append('<br/>'+$(this).parent().text());
}
});
});
$('#addIdentifiant').click(function(){
$('form[name=rFibenM] > #identifiant').append('<br/><label>Identifiant</label> <input type="text" name="identifiant[]" />');
});
});
</script>

View File

@ -1,177 +0,0 @@
<?php if (empty($this->AutrePage)) {?>
<div id="center">
<?php }?>
<?php if (empty($this->AutrePage)){?>
<h1><?=$this->translate("DIRIGEANTS")?></h1>
<div class="paragraph">
<table class="identite">
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib"><?=$this->translate("Num&eacute;ro identifiant Siren")?></td>
<td width="350" class="StyleInfoData"><?=$this->SirenTexte($this->siren)?></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib"><?=$this->translate("Dénomination Sociale")?></td>
<td width="350" class="StyleInfoData"><?=$this->raisonSociale?></td>
</tr>
<?php if ($this->surveillance) {?>
<tr>
<td width="30">&nbsp;</td>
<td colspan="2" width="550" class="StyleInfoData">
<?=$this->action('infos','surveillance', null, array(
'source' => 'dirigeants',
'siret' => $this->siret
))?>
</td>
</tr>
<?php }?>
<?php if( $this->dirigeantsop ){ ?>
<tr>
<td width="30">&nbsp;</td>
<td colspan="2" width="550" class="StyleInfoData">
<a href="<?=$this->dirigeantsop?>"><?=$this->translate("Consulter la liste des dirigeants opérationnels")?></a>
</td>
</tr>
<?php } ?>
</table>
</div>
<?php }?>
<h2><?=$this->translate("Liste des dirigeants actifs")?></h2>
<div class="paragraph">
<?php if ( count($this->dirigeants)>0 ) { ?>
<table class="data">
<?php foreach ($this->dirigeants as $dir) {?>
<tr>
<td class="StyleInfoData" width="200"><?=$dir->Titre?></td>
<td class="StyleInfoData" width="320">
<?php if ($dir->Societe != '') { ?>
<a href="<?=$this->url(array('controller' => 'recherche', 'action' => 'liste', 'type' => 'ent','raisonSociale' => $dir->Societe), 'default', true)?>"
title="<?=$this->translate("Recherche à partir de la dénomination sociale")?>">
<?=$dir->Societe?>
</a>
<br/>
<?php }?>
<?php if ($dir->Nom != '') { ?>
<a href="<?=$this->url(array(
'controller' => 'recherche',
'action' => 'liste',
'type' => 'dir',
'dirNom' => $dir->Nom,
'dirPrenom' => $dir->Prenom,
'dirDateNaissJJ' => substr($dir->NaissDate,0,2),
'dirDateNaissMM' => substr($dir->NaissDate,3,2),
'dirDateNaissAAAA' => substr($dir->NaissDate,6,4),
'dirCpVille' => $dir->NaissVille,
), 'default', true)?>" title="<?=$this->translate("Recherche à partir du nom du dirigeant")?>">
<?=$dir->Nom.' '.$dir->Prenom?>
</a>
<?php
if (trim($dir->NaissDate) != '' && trim($dir->NaissVille.' '.$dir->NaissDepPays) != '') { ?>
<br/>né(e) le <?=$dir->NaissDate?> à <?=$dir->NaissVille?>
<?php if (trim($dir->NaissDepPays) != '') { ?>&nbsp;(<?=$dir->NaissDepPays?>)<?php }?>
<?php } else if (trim($dir->NaissDate) != '') { ?>
né(e) le <?=$dir->NaissDate?>
<?php } else if (trim($dir->NaissVille.' '.$dir->NaissDepPays) != '') { ?>
né(e) à <?=$dir->NaissVille?> &nbsp;(<?=$dir->NaissDepPays?>)
<?php } ?>
<?php } ?>
</td>
<td class="StyleInfoData" width="100" valign="top">
<?php if ($dir->Siren!='') {?>
<a title="<?=$this->translate("Consulter la fiche identité")?>" href="<?=$this->url(array('controller'=>'identite', 'action'=>'fiche', 'siret'=>$dir->Siren), 'default', true)?>">
<?=$this->SirenTexte($dir->Siren)?></a>
<?php if (empty($this->AutrePage) && $this->edition) {?>
<div style="line-height:16px;">
<a class="dialog" title="<?=$this->translate("Ajouter un actionnaire")?>" href="<?=$this->url(array('controller'=>'saisie','action'=>'lien','type'=>'actionnaire','mode'=>'add','siren'=>$this->siren,'createfiche'=>$dir->Siren),null,true)?>">
<img style="vertical-align:middle;" src="/themes/default/images/interfaces/ajouter.png" /></a>
</div>
<?php }?>
<?php }?>
</td>
<?php if (empty($this->AutrePage) && $this->accessWorldCheck) {?>
<td>
<?php if ($dir->Societe != '') { ?>
<img style="cursor:pointer;" class="wcheck" data-url="<?=$this->url(array(
'controller'=>'worldcheck','action'=>'occurence','siren'=>substr($this->siret,0,9),
'dirType'=>'ORGANISATION','dirSociete'=>$dir->Societe),'default',true);?>" src="/themes/default/images/worldcheck/wc.png"/>
<?php }?>
<?php if ($dir->Nom != '') { ?>
<img style="cursor:pointer;" class="wcheck" data-url="<?=$this->url(array(
'controller'=>'worldcheck','action'=>'occurence','siren'=>substr($this->siret,0,9),
'dirType'=>'INDIVIDUAL','dirNom'=>$dir->Nom,'dirPrenom'=>$dir->Prenom),'default',true);?>" src="/themes/default/images/worldcheck/wc.png"/>
<?php } ?>
</td>
<?php }?>
</tr>
<?php } ?>
</table>
<?php } else { ?>
<table>
<tr>
<td class="StyleInfoData" width="550">
<?=$this->translate("Aucune donn&eacute;e n'est pr&eacute;sente dans notre base")?>
</td>
</tr>
</table>
<?php } ?>
</div>
<?php if (empty($this->AutrePage)) {?>
<?=$this->render('cgu.phtml', $this->cgu)?>
<?php }?>
<?php if (empty($this->AutrePage)) {?>
</div>
<?php }?>
<?php if (empty($this->AutrePage) && $this->edition) {?>
<script>
$('a.dialog').on('click', function(){
var href = $(this).attr('href');
if (href!='#') {
var title = $(this).attr('title');
var dialogOpts = {
bgiframe: true,
title: title,
width: 650,
height: 600,
modal: true,
open: function(event, ui) {
$(this).html('Chargement...');
$(this).load(href);
},
buttons: {
Quitter: function() { $(this).dialog('close'); }
},
close: function() { $('#dialog').remove(); }
};
$('<div id="dialog"></div>').dialog(dialogOpts);
return false;
}
});
</script>
<?php }?>
<?php if (empty($this->AutrePage) && $this->accessWorldCheck) {?>
<script>
$('img.wcheck').each(function(){
$(this).qtip({
hide: { event: 'unfocus' },
show: { solo: true, delay: 500 },
content: {
button: true,
title: 'WorlCheck',
text: "Chargement...",
ajax: { url: $(this).data('url') } },
position: { my: 'right center', at: 'left center' }
});
});
</script>
<?php }?>

View File

@ -1,178 +0,0 @@
<?php if (empty($this->AutrePage)){?>
<div id="center">
<?php }?>
<?php if (empty($this->AutrePage)){?>
<h1><?=$this->translate("DIRIGEANTS OP&Eacute;RATIONNELS")?></h1>
<div class="paragraph">
<table class="identite">
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib"><?=$this->translate("Num&eacute;ro identifiant Siren")?></td>
<td width="350" class="StyleInfoData"><?=$this->SirenTexte($this->siren)?></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib"><?=$this->translate("Dénomination Sociale")?></td>
<td width="350" class="StyleInfoData"><?=$this->raisonSociale?></td>
</tr>
<?php if ($this->surveillance) {?>
<tr>
<td width="30">&nbsp;</td>
<td colspan="2" width="550" class="StyleInfoData">
<?=$this->action('infos','surveillance', null, array(
'source' => 'dirigeants',
'siret' => $this->siret
))?>
</td>
</tr>
<?php }?>
</table>
</div>
<?php }?>
<h2><?=$this->translate("Liste des dirigeants actifs")?></h2>
<div class="paragraph">
<?php if ($this->edition) {?>
<a class="dialog" title="Ajouter un dirigeant" href="<?=$this->url(array('controller'=>'saisie','action'=>'diropcontrol','mode'=>'add','siret'=>$this->siret), 'default', true)?>">
<img style="vertical-align:middle;" src="/themes/default/images/interfaces/ajouter.png" /><?=$this->translate("Ajouter un dirigeant")?></a>
<?php }?>
<?php if ( count($this->dirigeants)>0 ) {?>
<table class="data">
<?php foreach ($this->dirigeants as $dir) {?>
<tr>
<td class="StyleInfoData" width="140"><?=$dir->Titre?></td>
<td class="StyleInfoData" id="<?=$dir->Id?>" width="200">
<?php if ($dir->Societe != '') { ?>
<a href="<?=$this->url(array(
'controller' => 'recherche',
'action' => 'liste',
'type' => 'ent',
'raisonSociale' => $dir->Societe
), 'default', true)?>"
title="<?=$this->translate("Recherche à partir de la Dénomination sociale")?>">
<?=$dir->Societe?>
</a>
&nbsp;
<?php }?>
<?php if ($dir->Nom != '') { ?>
<a href="<?=$this->url(array(
'controller' => 'recherche',
'action' => 'liste',
'type' => 'dir',
'dirNom' => $dir->Nom,
'dirPrenom' => $dir->Prenom,
), 'default', true)?>" title="<?=$this->translate("Recherche à partir du nom du dirigeant")?>">
<?=$dir->Civilite.' '.$dir->Nom.' '.$dir->Prenom?>
</a>
<?php } ?>
</td>
<td class="StyleInfoData" width="200">
<?php
$message = '';
if (trim($dir->NaissDate) != '' && trim($dir->NaissDate)!='0000-00-00') {
$date = new Zend_Date($dir->NaissDate, 'yyyy-MM-dd');
$message = $message.' '.$this->translate("le").' '.$date->toString('dd/MM/yyyy');
}
if (trim($dir->NaissVille.' '.$dir->NaissDepPays) != '') {
$message = $message.' '.$this->translate("à").' '.$dir->NaissVille;
}
if ($message!='') {
if ($dir->Civilite=='' || $dir->Civilite==null) {
$message = $this->translate("né(e)").' '.$message;
} else if ($dir->Civilite=='M') {
$message = $this->translate("né").' '.$message;
} else {
$message = $this->translate("née").' '.$message;
}
echo $message;
}
?>
</td>
<?php if ($this->edition) {?>
<td>
<a class="dialog" title="Modifier le dirigeant" href="<?=$this->url(array('controller'=>'saisie','action'=>'diropcontrol','mode'=>'edit','siret'=>$this->siret,'id'=>$dir->Id), 'default', true)?>">
<img src="/themes/default/images/interfaces/editer.png" /></a>
<a class="dialog" title="Supprimer le dirigeant" href="<?=$this->url(array('controller'=>'saisie','action'=>'diropcontrol','mode'=>'del','siret'=>$this->siret,'id'=>$dir->Id), 'default', true)?>">
<img src="/themes/default/images/interfaces/supprimer.png" /></a>
</td>
<?php if (empty($this->AutrePage) && $this->accessWorldCheck) {?>
<td>
<?php if ($dir->Societe != '') { ?>
<img style="cursor:pointer;" class="wcheck" data-url="<?=$this->url(array(
'controller'=>'worldcheck','action'=>'occurence','siren'=>$this->siren,
'dirType'=>'ORGANISATION','dirSociete'=>$dir->Societe),'default',true);?>" src="/themes/default/images/worldcheck/wc.png"/>
<?php }?>
<?php if ($dir->Nom != '') {
$param = array(
'controller'=>'worldcheck',
'action'=>'occurence',
'siren'=>$this->siren,
'dirType'=>'INDIVIDUAL',
'dirNom'=>$dir->Nom,
'dirPrenom'=>$dir->Prenom,
);
?>
<img style="cursor:pointer;" class="wcheck" data-url="<?=$this->url($param,'default',true);?>" src="/themes/default/images/worldcheck/wc.png"/>
<?php } ?>
</td>
<?php }?>
<?php }?>
</tr>
<?php } ?>
</table>
<?php } else { ?>
<table>
<tr>
<td class="StyleInfoData" width="550">
<?=$this->translate("Aucune donn&eacute;e n'est pr&eacute;sente dans notre base")?>
</td>
</tr>
</table>
<?php } ?>
</div>
<?php if (empty($this->AutrePage)){?>
<?=$this->render('cgu.phtml', $this->cgu)?>
</div>
<?php }?>
<script>
$('img.wcheck').each(function(){
$(this).qtip({
hide: { event: 'unfocus' },
show: { solo: true, delay: 1000 },
content: {
button: true,
title: 'WorlCheck',
text: "Chargement...",
ajax: { url: $(this).data('url') } },
position: { my: 'right center', at: 'left center' }
});
});
$('a.dialog').on('click', function(){
var href = $(this).attr('href');
if (href!='#') {
var title = $(this).attr('title');
var dialogOpts = {
bgiframe: true,
title: title,
width: 600,
height: 550,
modal: true,
open: function(event, ui) {
$(this).html('Chargement...');
$(this).load(href);
},
buttons: {
Quitter: function() { $(this).dialog('close'); }
},
close: function() { $('#dialog').remove(); }
};
$('<div id="dialog"></div>').dialog(dialogOpts);
return false;
}
});
</script>

View File

@ -1,146 +0,0 @@
<div id="center">
<h1>PATRIMOINE FONCIER</h1>
<div class="paragraph">
<table class="identite">
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Num&eacute;ro identifiant Siren</td>
<td width="350" class="StyleInfoData"><?=$this->SirenTexte($this->siren)?></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Dénomination Sociale</td>
<td width="350" class="StyleInfoData"><?=$this->raisonSociale?></td>
</tr>
</table>
</div>
<?php if ($this->MsgTxt) {?>
<div class="paragraph"><?=$this->MsgTxt?></div>
<?php } else {?>
<?php if (count($this->List) > 0) {?>
<h2>Propriétés baties</h2>
<div class="paragraph">
<table class="data">
<thead>
<tr>
<th>Rôle</th>
<th>Dépt.</th>
<th>Commune</th>
<th>Section</th>
<th>N° Plan</th>
<th>Fantoir</th>
<th>Adresse</th>
<th>Bât.</th>
<th>Ent.</th>
<th>Niv.</th>
<th>Surface</th>
<th>Nature</th>
</tr>
</thead>
<tbody>
<?php if (count($this->List) > 0) {?>
<?php foreach($this->List as $p) {?>
<?php if ($p->Type == 'local') {?>
<tr>
<td title="<?=$p->RoleLib?>"><?=$p->Role?></td>
<td><?=$p->Departement?></td>
<td><?=$p->CommuneLib?></td>
<td><?=$p->Section?></td>
<td><?=$p->PlanNum?></td>
<td><?=$p->Fantoir?></td>
<td>
<?=empty($p->AdresseNum) ? '' : $p->AdresseNum.' ' ; ?>
<?=empty($p->AdresseInd) ? '' : $p->AdresseInd.' ' ; ?>
<?=empty($p->AdresseType) ? '' : $p->AdresseType.' ' ; ?>
<?=empty($p->AdresseLib) ? '' : $p->AdresseLib.' ' ; ?>
</td>
<td><?=$p->Batiment?></td>
<td><?=$p->Ent?></td>
<td><?=$p->Niveau?></td>
<td><?=number_format($p->SurfaceTotal, 0, ",", " ")?></td>
<td></td>
</tr>
<?php if (count($p->SurfaceDetail->item) > 0) {?>
<?php foreach($p->SurfaceDetail->item as $s) {?>
<tr>
<td colspan="10" align="right"><i>Detail</i></td>
<td><?=number_format($s->Surface, 0, ",", " ")?></td>
<td><?=$s->Label?></td>
</tr>
<?php }?>
<?php }?>
<?php }?>
<?php }?>
<?php }?>
</tbody>
</table>
</div>
<h2>Propriétés non baties</h2>
<div class="paragraph">
<table class="data">
<thead>
<tr>
<th>Rôle</th>
<th>Dépt.</th>
<th>Commune</th>
<th>Section</th>
<th>N° Plan</th>
<th>Fantoir</th>
<th>Adresse</th>
<th>Surface</th>
<th>Nature</th>
</tr>
</thead>
<tbody>
<?php if (count($this->List) > 0) {?>
<?php foreach($this->List as $p) {?>
<?php if ($p->Type == 'parcelle') {?>
<tr>
<td title="<?=$p->RoleLib?>"><?=$p->Role?></td>
<td><?=$p->Departement?></td>
<td><?=$p->CommuneLib?></td>
<td><?=$p->Section?></td>
<td><?=$p->PlanNum?></td>
<td><?=$p->Fantoir?></td>
<td>
<?=empty($p->AdresseNum) ? '' : $p->AdresseNum.' ' ; ?>
<?=empty($p->AdresseInd) ? '' : $p->AdresseInd.' ' ; ?>
<?=empty($p->AdresseType) ? '' : $p->AdresseType.' ' ; ?>
<?=empty($p->AdresseLib) ? '' : $p->AdresseLib.' ' ; ?>
</td>
<td><?=number_format($p->SurfaceTotal, 0, ",", " ")?></td>
<td></td>
</tr>
<?php if (count($p->SurfaceDetail->item) > 0) {?>
<?php foreach($p->SurfaceDetail->item as $s) {?>
<tr>
<td colspan="7" align="right"><i>Detail</i></td>
<td><?=number_format($s->Surface, 0, ",", " ")?></td>
<td><?=$s->Label?></td>
</tr>
<?php }?>
<?php }?>
<?php }?>
<?php }?>
<?php }?>
</tbody>
</table>
</div>
<?php } else {?>
Aucune information sur le patrimoine.
<?php }?>
<?php }?>
</div>

View File

@ -1,299 +0,0 @@
<?php if ( empty($this->AutrePage) ) {?>
<div id="center">
<?php }?>
<?php if ( empty($this->AutrePage) ) {?>
<h1>INDISCORE©</h1>
<div class="paragraph">
<table>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Num&eacute;ro identifiant Siren</td>
<td width="350" class="StyleInfoData"><?=$this->SirenTexte($this->indiscore->Siren)?></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Num&eacute;ro identifiant Siret du si&egrave;ge</td>
<td width="350" class="StyleInfoData"><?=$this->SiretTexte($this->indiscore->Siret)?></td>
</tr>
<?php if (isset($this->indiscore->NumRC) && $this->indiscore->NumRC*1!=0) { ?>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Num&eacute;ro R.C.</td>
<td width="350" class="StyleInfoData"><?=$this->indiscore->NumRC?></td>
</tr>
<?php } ?>
<tr><td colspan="3">&nbsp;</td></tr>
<?php if ( $this->edition && empty($this->AutrePage) ) {?>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib"></td>
<td width="350" class="StyleInfoData">
<?=$this->action('scorecutoff','saisie',null, array('siren'=>$this->indiscore->Siren)); ?>
</td>
</tr>
<?php }?>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">&nbsp;</td>
<td width="350" class="StyleInfoData">
<a href=<?=$this->url(array('controller'=>'evaluation', 'action'=>'scoreshisto', 'siret' => $this->siret)); ?>>
<?=$this->translate("Consulter l'historique des IndiScore");?></a>
</td>
</tr>
</table>
</div>
<?php }?>
<h2>Dénomination sociale & coordonnées</h2>
<div class="paragraph">
<table>
<tr>
<td width="30"></td>
<td width="200" class="StyleInfoLib">Dénomination Sociale</td>
<td width="350" class="StyleInfoData">
<?php
echo $this->indiscore->Nom;
if (!empty($this->indiscore->Nom2)) {
echo '<br/>'.$this->indiscore->Nom2;
}
?>
</tr>
<?php
$titre='';
if ($this->indiscore->Enseigne!='' && $this->indiscore->Sigle!='') {
$titre = 'Enseigne / Sigle'; $lib = $this->indiscore->Enseigne.' / '.$this->indiscore->Sigle;
} elseif ($this->indiscore->Enseigne!='' && $this->indiscore->Sigle=='') {
$titre = 'Enseigne'; $lib = $this->indiscore->Enseigne;
} elseif ($this->indiscore->Enseigne=='' && $this->indiscore->Sigle!='') {
$titre = 'Sigle'; $lib = $this->indiscore->Sigle;
}?>
<?php if ( !empty($titre) ) {?>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib"><?=$titre?></td>
<td width="350" class="StyleInfoData"><?=$lib?></td>
</tr>
<?php } ?>
<tr>
<td width="30"></td>
<td width="200" class="StyleInfoLib">Forme juridique</td>
<td width="350" class="StyleInfoData">
<?=$this->indiscore->FJ_lib?>
</td>
</tr>
<tr>
<td width="30"></td>
<td width="200" class="StyleInfoLib">Date de création de l'entreprise</td>
<td width="350" class="StyleInfoData">
<?php $date = new Zend_Date($this->indiscore->DateCreaEn, 'yyyyMMdd');?>
<?=$date->toString('dd/MM/yyyy')?>
</td>
</tr>
<tr>
<td width="30"></td>
<td width="200" class="StyleInfoLib">Adresse</td>
<td width="350" class="StyleInfoData">
<?=$this->indiscore->Adresse?><br/>
<?php if ($this->indiscore->Adresse2<>'') echo $this->indiscore->Adresse2.'<br/>';?>
<?=$this->indiscore->CP?>&nbsp;<?=$this->indiscore->Ville?>
</td>
</tr>
<tr>
<td width="30"></td>
<td width="200" class="StyleInfoLib">Téléphone</td>
<td width="350" class="StyleInfoData">
<?=$this->indiscore->Tel?>
</td>
</tr>
<?php if ( $this->surveillance && empty($this->AutrePage) ) {?>
<tr>
<td width="30"></td>
<td colspan="2">
<?=$this->action('infos','surveillance', null, array(
'source' => 'score',
'siret' => $this->siret
));?>
</td>
</tr>
<?php }?>
<?php if ( $this->aviscredit && empty($this->AutrePage) ) {?>
<tr>
<td width="30"></td>
<td colspan="2">
<a href="<?=$this->url(array('controller'=>'evaluation', 'action'=>'aviscredit', 'siret' => $this->siret))?>">
Saisir votre demande d'avis credit personnalisé</a>
</td>
</tr>
<?php }?>
</table>
</div>
<h2>Évaluation</h2>
<div class="paragraph">
<table>
<tr>
<td width="30">&nbsp;</td>
<td width="550" colspan="2" class="StyleInfoData">
L'&eacute;valuation indiScore&copy; est en partie basée sur les points notables suivants :<br/>
<h3><u>Conformit&eacute; l&eacute;gale :</u></h3>
<div class="stats gradiant_pic">
<ul>
<li>
<i><?=$this->indiscore->AnalyseConfor; ?></i>
<div class="blocdegrade clearfix">
<span class="textdegrade">Conformit&eacute;&nbsp;<? if ($this->edition) { echo '('.$this->indiscore->ScoreConfor.')';}?></span>
<div class="imgdegrade"><img class="borderimg" src="/themes/default/images/indiscore/imgscores-<?=$this->FormatPct($this->indiscore->ScoreConfor)?>.png"/></div>
<div class="regle"><img src="/themes/default/images/indiscore/sgradiant2.png" /></div>
</div>
</li>
</ul>
</div>
<h3><u>Dirigeance :</u></h3>
<div class="stats gradiant_pic">
<ul>
<li>
<i><?=$this->indiscore->AnalyseDirigeance?></i>
<div class="blocdegrade clearfix">
<span class="textdegrade">Dirigeance&nbsp;<? if ($this->edition) { echo '('.$this->indiscore->ScoreDirigeance.')';}?></span>
<div class="imgdegrade"><img class="borderimg" src="/themes/default/images/indiscore/imgscores-<?=$this->FormatPct($this->indiscore->ScoreDirigeance)?>.png"/></div>
<div class="regle"><img src="/themes/default/images/indiscore/sgradiant2.png" /></div>
</div>
</li>
</ul>
</div>
<h3><u>Solvabilit&eacute; :</u></h3>
<div class="stats gradiant_pic">
<ul>
<li>
<i>L'analyse de la solvabilit&eacute; est <?=$this->indiscore->AnalyseSolvabilite?></i>
<div class="blocdegrade clearfix">
<span class="textdegrade">Solvabilit&eacute;&nbsp;<? if ($this->edition) { echo '('.$this->indiscore->Indiscore.')';}?></span>
<div class="imgdegrade"><img class="borderimg" src="/themes/default/images/indiscore/imgscores-<?php echo $this->FormatPct($this->indiscore->Indiscore);?>.png"/></div>
<div class="regle"><img src="/themes/default/images/indiscore/sgradiant2.png" /></div>
</div>
</li>
</ul>
</div>
</td>
</tr>
<?php $millesimeMax = date('Ymd', mktime(0, 0, 0, date('m'), date('d'), date('Y')-2));?>
<?php if($this->indiscore->NbBilansScore > 0 && $this->indiscore->Bilans->item[0]->Millesime >= $millesimeMax) {?>
<tr>
<td width="30">&nbsp;</td>
<td width="550" colspan="2" class="StyleInfoData">
A la lecture du dernier bilan, cloturé le <?=substr($this->indiscore->Bilans->item[0]->Millesime,6,2).'/'.substr($this->indiscore->Bilans->item[0]->Millesime,4,2).'/'.substr($this->indiscore->Bilans->item[0]->Millesime,0,4)?>, la situation financi&egrave;re de l'entreprise <?php echo $this->Nom;?> est <b><?php echo $this->indiscore->tabInfosNotations->SituationFinanciere;?></b>.<br/>
<?php
if (html_entity_decode($this->indiscore->tabInfosNotations->ProbabiliteDefaut) <> 'En défaut')
echo 'La probabilit&eacute; de d&eacute;faillance associ&eacute;e &agrave; cette note avoisine les '. number_format($this->indiscore->tabInfosNotations->ProbabiliteDefaut,3,',',' ') .' %';
else
echo 'Cette entreprise est d&eacute;faillante ou sur le point de le devenir.';
//[EquivalenceBDF]
?>
</td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<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>,
Afdcc1 = <b><?php echo $this->indiscore->scores->Afdcc1;?></b>, Afdcc2 = <b><?php echo $this->indiscore->scores->Afdcc2;?></b>
et Score Z = <b><?php echo $this->indiscore->scores->Z;?></b>.</i>
</td>
</tr>
<?php } else {?>
<tr>
<td width="30">&nbsp;</td>
<td width="550" colspan="2" class="StyleInfoData">
La situation financi&egrave;re de l'entreprise ne peut être évaluée en détail car
<?php
if($this->indiscore->Bilans->item[0]->Millesime < $millesimeMax && count($this->indiscore->Bilans->item) > 0 ) {
echo 'le dernier bilan disponible date de '.substr($this->indiscore->Bilans->item[0]->Millesime,0,4).'.';
} else {
echo 'aucun bilan n\'est disponible.';
} ?>
</td>
</tr>
<?php }?>
</table>
</div>
<h2>Paiements</h2>
<div class="paragraph">
<table>
<tr>
<td width="30">&nbsp;</td>
<td width="550" colspan="2" class="StyleInfoData">
<?php if(!empty($this->indiscore->infoPaiement)):?>
<?php echo html_entity_decode($this->indiscore->infoPaiement);?>
<?php else :?>
Aucune information sur les paiements disponible.
<?php endif;?>
</td>
</tr>
</table>
</div>
<h2>Conclusion</h2>
<div class="paragraph">
<table>
<tr>
<td width="30">&nbsp;</td>
<td width="550" colspan="2" class="StyleInfoData">
<span class="notvisible">
Compte tenu des informations disponibles aupr&egrave;s des sources officielles
Scores et D&eacute;cisions pr&eacute;sente la conclusion suivante :</span><br/>
<?php
$color = '';
if ($this->indiscore->Indiscore20 < $this->bornes['indiScore']['rouge']) {
$color = ' indiscore-red';
} elseif ($this->indiscore->Indiscore20 < $this->bornes['indiScore']['orange']) {
$color = ' indiscore-orange';
} else {
$color = ' indiscore-green';
}
switch($this->typeScore) {
case '20':
$maxIndiscore = $this->typeScore;
$indiscore = $this->indiscore->Indiscore20;
break;
case '100':
default:
$maxIndiscore = empty($this->typeScore)? '100' : $this->typeScore;
$indiscore = $this->indiscore->Indiscore;
break;
}
?>
<h3 class="indiscore<?=$color?>">LE SCORE EST DE <?=$indiscore?> SUR <?=$maxIndiscore?> POINTS</h3>
<?php
if ($this->indiscore->infoEncours != '' && !is_numeric($this->indiscore->encours) && $this->indiscore->encours == 'N/A'){ ?>
<h3><?=$this->indiscore->infoEncours?></h3>
<?php } else{ ?>
<?php if ($indiscore != 0) {?>
<i>La tendance de la note est <?=$this->indiscore->TendanceIndiscore?></i>
<h3 class="indiscore">L'ENCOURS MAXIMUM CONSEILL&Eacute; EST DE <?=round($this->indiscore->encours / 1000)?> K&euro;</h3>
<?php }?>
<h3><?=$this->indiscore->infoEncours?></h3>
<?php }?>
</td>
</tr>
<tr><td colspan="3" align="center"><img class="notvisible" src="/themes/default/images/indiscore/logo_indiscore.png"/></td></tr>
</table>
</div>
<?php if ( empty($this->AutrePage) ) {?>
<?=$this->render('cgu.phtml', $this->cgu);?>
</div>
<?php }?>

View File

@ -1,151 +0,0 @@
<div id="center">
<h1><?=$this->translate("HISTORIQUE").' '.strtoupper($this->types[$this->type]);?></h1>
<div class="paragraph">
<table>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib"><?=$this->translate("Numéro identifiant Siren")?></td>
<td width="350" class="StyleInfoData"><?=$this->SirenTexte($this->siren)?></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib"><?=$this->translate("Dénomination sociale")?></td>
<td width="350" class="StyleInfoData"><?=$this->raisonSociale?></td>
</tr>
</table>
</div>
<h2><?=$this->translate("Historique des scores")?></h2>
<div class="paragraph" style="text-align:right;">
<select name="type">
<?php foreach($this->types as $key=>$val) {?>
<?php $selected = ($key == $this->type)?'selected':'';?>
<option value="<?=$this->url(array('siret'=>$this->siret, 'id'=>$this->id, 'type'=>$key))?>" <?=$selected;?>><?=$val?></option>
<?php }?>
</select>
<script>
$('select[name=type]').change(function(e){
window.location = $(this).val();
});
</script>
</div>
<div class="paragraph">
<p>
<?php if ($this->typeTxt == 'indiScore20') {?>
L'indiscore évalue le risque de faillite d'entreprise à 12 mois à partir de trois axes: le respect,
l'analyse historique des représentants légaux et l'analyse du bilan. Les informations sur lenvironnement économique
des entreprises (secteurs d'activité, groupe, paiements) complètent l'analyse de l'indiscore. Un indiscore entre 0 et
6/20 indiquera un risque élevé, entre 7 et 10/20 un risque moyen et un indiscore compris entre 11 et 20/20
un risque faible. Un avis de crédit fournisseur/client est donné, jusqu'à concurrence de 500 K€.
<?php } ?>
<?php if ($this->typeTxt == 'indiScore') {?>
L'indiscore évalue le risque de faillite d'entreprise à 12 mois à partir de trois axes: le respect,
l'analyse historique des représentants légaux et l'analyse du bilan. Les informations sur lenvironnement économique
des entreprises (secteurs d'activité, groupe, paiements) complètent l'analyse de l'indiscore. Un indiscore entre 0 et
40/100 indiquera un risque élevé, entre 41 et 50/100 un risque moyen et un indiscore compris entre 51 et 100/100
un risque faible. Un avis de crédit fournisseur/client est donné, jusqu'à concurrence de 500 K€.
<?php } ?>
<?php if ($this->typeTxt == 'scoreDir') {?>
Évaluation de l'équipe dirigeante en place. Système S&D
<?php } ?>
<?php if ($this->typeTxt == 'scoreConf') {?>
Évaluation de l'adéquation entre les déclarations et l'information disponible auprès des sources officielles françaises. Système S&D
<?php } ?>
<?php if ($this->typeTxt == 'scoreZ') {?>
Le score Z de la Banque de France permet de déceler les défaillances 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.
<?php } ?>
<?php if ($this->typeTxt == 'scoreCH') {?>
Le score CONAN et HOLDER (1979) est une méthode conseillée pour les entreprises industrielles réalisant un chiffre
d'affaires de 1,5 à 75 millions 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).
<?php } ?>
<?php if ($this->typeTxt == 'scoreAfdcc1') {?>
1er indicateur synthétique de vulnérabilité établi par l'Association Françaises des Crédits managers et Conseils.
<?php } ?>
<?php if ($this->typeTxt == 'scoreAfdcc2') {?>
Le score sectoriel AFDCC2 (1999) 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
spécialement au Credit Manager, étant axé sur la solvabilité de l'entreprise à court terme.
<?php } ?>
<?php if ($this->typeTxt == 'scoreAltman') {?>
Évaluation synthétique permettant la prévision de défaillance d'une entreprise à partir de ratios, liquidité,
solvablilité, rentabilité, activité, croissance. Appelé aussi Z Score d'Altman.
<?php } ?>
<?php if ($this->typeTxt == 'scoreCCF') {?>
Évaluation à 3 ans de la probabilité de défaillance d'une entreprise.
<?php } ?>
</p>
</div>
<?php if ( count($this->scores)> 0 ) {?>
<div class="paragraph">
<table class="tablesorter" id="synthese">
<thead>
<tr>
<th align="center"><?=$this->translate("Date")?></th>
<th align="center"><?=$this->types[$this->type]?></th>
<th align="center"><?=$this->translate("Encours")?> (K&euro;)</th>
<th><?=$this->translate("Motif du changement")?></th>
</tr>
</thead>
<tbody>
<?php foreach($this->scores as $score) {?>
<tr>
<td align="center">
<?php $date = new Zend_Date($score->date, 'yyyy-MM-dd');?>
<?=$date->toString('dd/MM/yyyy')?>
</td>
<?php
$style = '';
//Color value - @todo redraw the table and add it before view
if ( $score->value < $this->bornes[$this->type]['rouge'] ) {
$style = ' style="color:red;"';
} elseif ( $score->value < $this->bornes[$this->type]['orange'] ) {
$style = ' style="color:orange;"';
} else {
$style = ' style="color:green;"';
}
?>
<td align="center"<?=$style?>><?=$score->value?></td>
<td align="center"><?=number_format($score->encours,2)?></td>
<td><?=$score->label?></td>
</tr>
<?php }?>
</tbody>
</table>
</div>
<script>
$(function(){
$('#synthese').tablesorter({
dateFormat: 'uk',
headers: {
0: {sorter: 'shortDate'},
3: {sorter: false},
}
});
});
</script>
<div class="paragraph">
<?php if ( $this->graph ) {?>
<img src="/file/image/cache/q/<?=$this->graph?>" usemap="#graphMap">
<map name="graphMap">
<?=$this->graphMap;?>
</map>
<?php } else {?>
<b><?=$this->translate("Impossible de générer le graphique")?></b>
<?php }?>
</div>
<?php } else {?>
<div class="paragraph">
<?=$this->translate("Aucune information sur l'historique disponible.")?>
</div>
<?php }?>
<?=$this->render('cgu.phtml', $this->cgu)?>
</div>

View File

@ -1,96 +0,0 @@
<div id="center">
<h1 class="titre">RELATIONS BANCAIRES</h1>
<div class="paragraph">
<table class="identite">
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Num&eacute;ro identifiant Siren</td>
<td width="350" class="StyleInfoData"><?=$this->SirenTexte($this->siren)?></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Dénomination Sociale</td>
<td width="350" class="StyleInfoData"><?=$this->raisonSociale?></td>
</tr>
</table>
</div>
<h2>Liste des relations bancaires</h2>
<div class="paragraph">
<?php if (empty($this->AutrePage) && $this->edition) {?>
<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)?>">
<img style="vertical-align:middle;" src="/themes/default/images/interfaces/ajouter.png" /> Ajouter une autre relation bancaire</a>
</div>
<?php }?>
<?php if(count($this->banques)>0) { ?>
<table class="data">
<thead>
<tr>
<th>Nom de la Banque</th>
<th>Adresse</th>
<th>Code Banque</th>
<th>Code Guichet</th>
</tr>
</thead>
<tbody>
<?php foreach($this->banques as $relation) { ?>
<tr>
<td valign="top" ><p style="text-decoration:underline;"><?=$relation->libBanque?></p>
<?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="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>
<?php }?>
</td>
<td>
<?php if($relation->adresse1!='') {?>
<?=$relation->adresse1?><br />
<?php } ?>
<?php if($relation->adresse2!='') {?>
<?=$relation->adresse2?><br />
<?php } ?> <?=$relation->cp?> <?=$relation->ville?>
</td>
<td align="center"><?php if( $relation->codeBanque*1!=0 ){ echo $relation->codeBanque; } ?></td>
<td align="center"><?php if( $relation->codeGuichet*1!=0 ){ echo $relation->codeGuichet; }?></td>
</tr>
<?php } ?>
</tbody>
</table>
<?php } else { ?>
<p>Aucune information.</p>
<?php } ?>
</div>
<?php echo $this->render('cgu.phtml', $this->cgu);?>
</div>
<script>
$('a.dialog').on('click', function(){
var href = $(this).attr('href');
if (href!='#') {
var title = $(this).attr('title');
var dialogOpts = {
bgiframe: true,
title: title,
width: 650,
height: 600,
modal: true,
open: function(event, ui) {
$(this).html('Chargement...');
$(this).load(href);
},
buttons: {
Quitter: function() { $(this).dialog('close'); }
},
close: function() { $('#dialog').remove(); }
};
$('<div id="dialog"></div>').dialog(dialogOpts);
return false;
}
});
</script>

View File

@ -1,214 +0,0 @@
<?php if (empty($this->AutrePage)) {?>
<div id="center">
<?php }?>
<?php if (empty($this->AutrePage)) {?>
<h1>ÉLÉMENTS FINANCIERS - BILANS</h1>
<div class="paragraph">
<table class="identite">
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">
Num&eacute;ro identifiant Siren
</td>
<td width="350" class="StyleInfoData">
<?php echo $this->SirenTexte($this->siren);?>
</td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Dénomination Sociale</td>
<td width="350" class="StyleInfoData"><?php echo $this->raisonSociale;?></td>
</tr>
<?php if (isset($this->tabResultActif) && isset($this->tabResultPassif) && isset($this->tabResultSig)){?>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Type de bilans</td>
<td width="350" class="StyleInfoData">
<?php if ($this->nbBilanC==0){?>
Réel normal ou Simplifié
<?php } elseif ($this->nbBilanN==0){?>
Consolidé
<?php } else {?>
<form>
<select name="typeBilan">
<option value="N"<?=($this->typeBilan=='N')? ' selected' : '';?>>Réel normal ou Simplifié</option>
<option value="C"<?=($this->typeBilan=='C')? ' selected' : '';?>>Consolidé</option>
</select>
</form>
<?php }?>
</td>
</tr>
<?php }?>
</table>
<?php if ( empty($this->AutrePage) ) {?>
<div id="liasse-check-result" class="ui-state-highlight ui-corner-all" style="margin-top: 5px;">
<p><span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
<a title="Cliquez ici pour vérifier l'intégration des éléments financiers"
href="<?=$this->url(array('controller'=>'finance','action'=>'liasseinfos','siren'=>$this->siren), 'default', true)?>"
id="liasse-check">Vérifier la disponibilité des derniers états financiers au Greffe.</a></p>
</div>
<?php }?>
</div>
<?php }?>
<?php if($this->typeBilan == 'B' || $this->typeBilan == 'A') {?>
<div class="paragraph">
<table>
<tr>
<td width="30">&nbsp;</td>
<td colspan="2" class="StyleInfoLib" width="200">Bilan de banque/assurance non gérés</td>
</tr>
</table>
</div>
<?php } else { ?>
<?php if ($this->nbBilanN==0 && $this->nbBilanC==0) {?>
<div class="paragraph">
<table>
<tr>
<td width="30">&nbsp;</td>
<td colspan="2" class="StyleInfoLib" width="200">Aucun bilan disponible.</td>
</tr>
</table>
</div>
<?php } else {?>
<h2>Bilan actif - passif</h2>
<div class="paragraph">
<table class="bilans">
<thead>
<tr>
<th>Actif</th>
<?php foreach($this->tabResultActif as $info) { ?>
<th class="date" >
<?=$info['dateCloture']?><br/><?=$info['duree']?>
</th>
<?php }?>
<?php $lastDateCloture = $info['dateCloture']; ?>
<th>% T.B.</th>
</tr>
</thead>
<tbody>
<?php foreach($this->tabRatioActif as $idRatio => $info) { ?>
<tr<?php if (!empty($info['class'])) echo ' class="'.$info['class'].'"'?>>
<td>
<?=$info['titre']?></td>
<?php foreach($this->tabResultActif as $value) { ?>
<td class="left"><?=$value['entrep'][$idRatio]?></td>
<?php }?>
<td><?=$value['total'][$idRatio]?></td>
<?php }?>
</tr>
</tbody>
</table>
</div>
<div class="paragraph">
<?=$this->action('bilangraph', 'finance', null, array(
'type' => 'actif',
'typeBilan' => $this->typeBilan,
'dateCloture' => $this->lastDateCloture,
'siret' => $this->siret,
'id' => $this->id,
))?>
</div>
<div class="paragraph">
<table class="bilans">
<thead>
<tr>
<th>Passif</th>
<?php foreach($this->tabResultPassif as $info) { ?>
<th class="date" >
<?=$info['dateCloture']?><br/><?=$info['duree']?>
</th>
<?php }?>
<th>% T.B.</th>
</tr>
</thead>
<tbody>
<?php foreach($this->tabRatioPassif as $idRatio => $info) { ?>
<tr<?php if (!empty($info['class'])) echo ' class="'.$info['class'].'"'?>>
<td>
<?=$info['titre']?></td>
<?php foreach($this->tabResultPassif as $value) { ?>
<td class="left"><?=$value['entrep'][$idRatio]?></td>
<?php }?>
<td><?=$value['total'][$idRatio]?></td>
<?php }?>
</tr>
</tbody>
</table>
</div>
<div class="paragraph">
<?=$this->action('bilangraph', 'finance', null, array(
'type' => 'passif',
'typeBilan' => $this->typeBilan,
'dateCloture' => $this->lastDateCloture,
'siret' => $this->siret,
'id' => $this->id,
))?>
</div>
<h2>Soldes Intermédiaires de Gestion</h2>
<div class="paragraph">
<table class="bilans">
<thead>
<tr>
<th colspan="2">SOLDES INTERMEDIAIRES DE GESTION</th>
<?php foreach($this->tabResultSig as $info) { ?>
<th class="date" >
<?=$info['dateCloture']?><br/><?=$info['duree']?>
</th>
<?php }?>
<th>% C.A.</th>
</tr>
</thead>
<tbody>
<?php foreach($this->tabRatioSig as $idRatio => $info) { ?>
<tr<?php if (!empty($info['class'])) echo ' class="'.$info['class'].'"'?>>
<?php if(empty($info['op'])){?>
<td colspan="2"><?=$info['titre']?></td>
<?php } else {?>
<td><?=$info['op']?></td><td><?=$info['titre']?></td>
<?php }?>
<?php foreach($this->tabResultSig as $value) { ?>
<td class="left"><?=$value['entrep'][$idRatio]?></td>
<?php }?>
<td><?=$value['total'][$idRatio]?></td>
<?php }?>
</tr>
</tbody>
</table>
</div>
<div class="paragraph">
<?=$this->action('bilangraph', 'finance', null, array(
'type' => 'sig',
'typeBilan' => $this->typeBilan,
'dateCloture' => $this->lastDateCloture,
'siret' => $this->siret,
'id' => $this->id,
))?>
</div>
<?php }?>
<?php }?>
<?php if ( empty($this->AutrePage) ) {?>
<?=$this->render('cgu.phtml', $this->cgu)?>
<?php }?>
<?php if ( empty($this->AutrePage) ) {?>
</div>
<?php }?>

View File

@ -1,160 +0,0 @@
<div id="center">
<h1>ELEMENTS FINANCIERS - BILANS</h1>
<div class="paragraph">
<table class="identite">
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Num&eacute;ro identifiant Siren</td>
<td width="350" class="StyleInfoData"><?=$this->SirenTexte($this->siren)?></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Dénomination Sociale</td>
<td width="350" class="StyleInfoData"><?=$this->raisonSociale?></td>
</tr>
<?php if ($this->edition) {?>
<tr>
<td width="30">&nbsp;</td>
<td colspan="2">
<?php if(!empty($this->dateCloture)) {?>
<a href="<?=$this->url(array('controller'=>'saisie', 'action'=>'liasse', 'siret'=>$this->siren,
'selection'=>$this->dateCloture.':'.$this->champType), 'default', true)?>">
Corriger le bilan</a><br/><?php }?>
</td>
</tr>
<?php }?>
<?php if ($this->exportxls) {?>
<tr>
<td width="30">&nbsp;</td>
<td colspan="2">
<a href="<?=$this->url(array(
'controller' => 'finance',
'action' => 'liassexls',
'siret' => $this->siret,
'unite' => $this->unite,
'type' => $this->champType,
'date' => $this->dateCloture,
))?>" id="xls">Exporter en fichier Excel.</a>
</td>
</tr>
<?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' ) {?>
<tr>
<td colspan="3">
Ce bilan a été déposé au format réel simplifié mais vous est livré au format réel normal pour des raisons de
standardisation.
</td>
</tr>
<?php }?>
</table>
</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
switch ($this->champType) {
case 'N' : $name = 'Réel Normal'; break;
case 'S' : $name = 'Simplifié'; break;
case 'C' : $name = 'Consolidé'; break;
case 'A' : $name = 'Assurance'; break;
case 'B' : $name = 'Banque'; break;
}
?>
<h2>Liasse <?=$name?> - Millésime <?=substr($this->dateCloture,0,4)?> </h2>
<div class="paragraph">
<form method="post" action="<?=$this->url(array('controller'=>'finance','action'=>'liasse','siret'=>$this->siret,'id'=>$this->id))?>">
Valeurs exprimées en
<select name="unit">
<?php foreach ($this->unit as $id => $titre):?>
<option value="<?=$id?>"<?=($id==$this->unite)? ' selected': '';?>><?=$titre?></option>
<?php endforeach;?>
</select>
<input type="submit" value="OK" />
</form>
</div>
<div class="paragraph">
<?php if(empty($this->dateCloture)) {?>
<table>
<tr>
<td width="30">&nbsp;</td>
<td colspan="2" class="StyleInfoLib" width="200">Impossible d'afficher le bilan.</td>
</tr>
</table>
<?php } else {?>
<div class="tabbed_area">
<ul class="tabs">
<?php foreach ($this->ancres as $id => $name) {?>
<li><a href="#<?=$id?>" title="<?=$name?>" class="tab"><?=$name?></a></li>
<?php }?>
</ul>
</div>
<div class="content">
<?php if( in_array($this->champType, array('S', 'N', 'C')) ) {?>
<?php echo $this->partial('finance/liasse/2050.phtml', array(
'liasse' => $this->liasse,
'dateCloture' => $this->dateClotureD,
'dateCloturePre' => $this->dateCloturePreD,
'dureesMois' => $this->dureesMois,
'dureesMoisPre'=> $this->dureesMoisPre,
'unite'=> $this->unite,
));?>
<?php } elseif ($this->champType == 'B') {?>
<?php echo $this->partial('finance/liasse/banque.phtml', array(
'liasse' => $this->liasse,
'dateCloture' => $this->dateClotureD,
'dateCloturePre' => $this->dateCloturePreD,
'dureesMois' => $this->dureesMois,
'dureesMoisPre'=> $this->dureesMoisPre,
'unite'=> $this->unite,
));?>
<?php } elseif ($this->champType == 'A') {?>
<?php echo $this->partial('finance/liasse/assurance.phtml', array(
'liasse' => $this->liasse,
'dateCloture' => $this->dateClotureD,
'dateCloturePre' => $this->dateCloturePreD,
'dureesMois' => $this->dureesMois,
'dureesMoisPre'=> $this->dureesMoisPre,
'unite'=> $this->unite,
));?>
<?php }?>
</div>
<?php }?>
</div>
<?php }?>
<?php echo $this->render('cgu.phtml', $this->cgu);?>
</div>

View File

@ -1,18 +0,0 @@
<p><span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
<?php if ( $this->BilanDateClotureIso ) { ?>
Le dernier millésime déposé au greffe est le <?=$this->BilanDateCloture?>.
<?php if ( $this->SaisieDateIso != '' && $this->SaisieCode == '00' ) {?>
Le bilan a été saisie le <?=$this->SaisieDate?>.
<?php } else {?>
Le bilan n'a pas été saisi par la source officielle<?php if ($this->SaisieLabel!='') {?> (<i><?=$this->SaisieLabel?>)</i><?php }?>.
<br/>Contactez le support (support@scores-decisions.com) pour une demande de mise à jour.
(Soumis à facturation selon vos accords contractuels)
<?php }?>
<?php } else {?>
<?=$this->msg?>
<?php }?>
</p>

View File

@ -1,188 +0,0 @@
<div id="center">
<h1>ELEMENTS FINANCIERS - LISTE DES BILANS</h1>
<div class="paragraph">
<table class="identite">
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Num&eacute;ro identifiant Siren</td>
<td width="350" class="StyleInfoData"><?=$this->SirenTexte($this->siren)?></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Dénomination Sociale</td>
<td width="350" class="StyleInfoData"><?=$this->raisonSociale?></td>
</tr>
<?php if ($this->surveillance) {?>
<tr>
<td width="30">&nbsp;</td>
<td colspan="2" width="550">
<?=$this->action('infos','surveillance', null, array('source' => 'bilans', 'siret' => $this->siret))?>
</td>
</tr>
<?php }?>
</table>
</div>
<h2>Dernier(s) bilan(s) disponible(s)</h2>
<?php if ($this->edition) {?>
<div class="paragraph">
Saisir une nouvelle liasse au format
<a href="<?=$this->url(array('controller'=>'saisie', 'action'=>'liasse', 'siret'=>$this->siren, 'selection'=>'NEW:N'))?>">Normal (2050)</a>,
<a href="<?=$this->url(array('controller'=>'saisie', 'action'=>'liasse', 'siret'=>$this->siren, 'selection'=>'NEW:C'))?>">Consolidé (2050)</a>,
<a href="<?=$this->url(array('controller'=>'saisie', 'action'=>'liasse', 'siret'=>$this->siren, 'selection'=>'NEW:S'))?>">Simplifié (2033)</a>
</div>
<?php }?>
<?php if ( empty($this->AutrePage) && $this->haveLiasse) {?>
<div class="paragraph">
<div id="liasse-check-result" class="ui-state-highlight ui-corner-all" style="margin-top:5px;">
<p><span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
<a title="Cliquez ici pour vérifier l'intégration des éléments financiers"
href="<?=$this->url(array('controller'=>'finance','action'=>'liasseinfos','siren'=>$this->siren), 'default', true)?>"
id="liasse-check">Vérifier la disponibilité des derniers états financiers au Greffe.</a></p>
</div>
</div>
<?php }?>
<?php if ($this->saisiebilan) {?>
<div class="paragraph">
<a id="bilanClient" href="<?=$this->url(array('controller'=>'finance', 'action'=>'saisiebilan',
'siren'=>$this->siren), 'default', true)?>" title="Envoi d'un bilan en saisi">
Vous possédez un bilan plus récent</a>
</div>
<?php }?>
<?php if ( $this->haveLiasse ) {?>
<div class="paragraph">
<table class="liasse">
<thead>
<tr>
<th>Millésime</th>
<th>Date de cloture</th>
<th>Date de cloture N-1</th>
<th></th>
</tr>
</thead>
<tbody>
<?php foreach ($this->BilanList as $type => $liste) {?>
<?php if (count($liste) > 0) {?>
<?php foreach ($liste as $element) {?>
<?php
switch ($type) {
case 'N' : $name = 'Réel Normal'; break;
case 'S' : $name = 'Simplifié'; break;
case 'C' : $name = 'Consolidé'; break;
case 'A' : $name = 'Assurance'; break;
case 'B' : $name = 'Banque'; break;
}
?>
<tr><td style="font-weight:bold;padding-left:20px;" colspan="4"><?=$name?></td></tr>
<tr>
<td align="center" style="font-weight:bold;">
<a href="<?=$this->url(array('controller'=>'finance','action'=>'liasse',
'siret'=>$this->siret,'id'=>$this->id, 'date'=> $type.$element->dateExercice), 'default', true)?>">
<?=$element->millesime?></a>
</td>
<td align="center">
<?php $date = new Zend_Date($element->dateExercice, 'yyyyMMdd'); ?> <?=$date->toString('dd/MM/yyyy')?>
- <?=$element->dureeExercice?> Mois</td>
<td align="center">
<?php
if ( Zend_Date::isDate($element->dateExercicePre, 'yyyyMMdd') ) {
$date = new Zend_Date($element->dateExercicePre, 'yyyyMMdd');
echo $date->toString('dd/MM/yyyy');
} ?> - <?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)) : ?>
<a href="<?=$this->url(array('controller'=>'finance', 'action'=>'liasse',
'siret'=>$this->siret, 'id'=>$this->id, 'date'=> $type.$element->dateExercice), 'default', true)?>">
Visualiser
</a>
<?php else :?>
Confidentiel
<?php endif; ?>
</td>
</tr>
<?php break;?>
<?php }?>
<?php }?>
<?php }?>
</tbody>
</table>
<br/><br/>
</div>
<?php foreach ($this->BilanList as $type => $liste) {?>
<?php if (count($liste) > 0) {?>
<?php
switch ($type) {
case 'N' : $name = 'Réel Normal - Liasse 2050'; break;
case 'S' : $name = 'Simplifié - Liasse 2033'; break;
case 'C' : $name = 'Consolidé - Regroupement des états financier du groupe'; break;
case 'A' : $name = 'Assurance'; break;
case 'B' : $name = 'Banque'; break;
}
?>
<h2>Millésime(s) <?=$name?></h2>
<div class="paragraph">
<table class="liasse">
<thead>
<tr>
<th>Millésime</th>
<th>Date de cloture</th>
<th>Date de cloture N-1</th>
<th></th>
</tr>
</thead>
<tbody>
<?php foreach ($liste as $element) {?>
<tr>
<td align="center" style="font-weight:bold;">
<a href="<?=$this->url(array('controller'=>'finance','action'=>'liasse',
'siret'=>$this->siret,'id'=>$this->id, 'date'=> $type.$element->dateExercice), 'default', true)?>">
<?=$element->millesime?></a>
</td>
<td align="center">
<a href="<?=$this->url(array('controller'=>'finance','action'=>'liasse',
'siret'=>$this->siret,'id'=>$this->id, 'date'=> $type.$element->dateExercice), 'default', true)?>">
<?php $date = new Zend_Date($element->dateExercice, 'yyyyMMdd'); ?> <?=$date->toString('dd/MM/yyyy')?></a>
- <?=$element->dureeExercice?> Mois</td>
<td align="center">
<?php
if ( Zend_Date::isDate($element->dateExercicePre, 'yyyyMMdd') ) {
$date = new Zend_Date($element->dateExercicePre, 'yyyyMMdd');
echo $date->toString('dd/MM/yyyy');
}
?>
- <?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)) : ?>
<a href="<?=$this->url(array('controller'=>'finance', 'action'=>'liasse', 'siret'=>$this->siret,
'id'=>$this->id, 'date'=> $type.$element->dateExercice), 'default', true)?>">
Visualiser</a>
<?php else :?>
Confidentiel
<?php endif; ?>
</td>
</tr>
<?php }?>
</tbody>
</table>
</div>
<?php }?>
<?php }?>
<?php } else {?>
<div class="paragraph">
<table>
<tr>
<td width="30">&nbsp;</td>
<td colspan="2" class="StyleInfoLib" width="200">Aucun bilan disponible.</td>
</tr>
</table>
</div>
<?php }?>
<?php echo $this->render('cgu.phtml', $this->cgu);?>
</div>

View File

@ -1,6 +0,0 @@
<?php if (!empty($this->file)) { ?>
<a href="<?=$this->url(array('module'=>'file', 'controller'=>'index', 'action'=>'liasse', 'q'=>$this->file),
'default', true)?>" target="_blank">Télécharger le fichier excel.</a>
<?php } else { ?>
Erreur lors de la construction du fichier.
<?php }?>

View File

@ -1,96 +0,0 @@
<?php if ($this->msg) {?>
<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>Alerte :</strong> <?=$this->msg?></p>
</div>
<?php }?>
<?php if ($this->ref) {?>
Votre référence : BS-<?=strtoupper($this->ref)?>
<br/><br/>
Saisie du bilan de la Société <?=$this->raisonSociale?> clôturé le <?=$this->bilanCloture?> au format <?=$this->type?>
<br/><br/>
<form id="uploadForm" name="uploadForm" action="<?=$this->url(array('controller'=>'finance', 'action'=>'saisiebilanup'))?>" method="post" enctype="multipart/form-data">
<input type="hidden" name="ref" value="<?=$this->ref?>" />
<input type="hidden" name="fileref" value="<?=$this->fileref?>" />
<input type="hidden" name="MAX_FILE_SIZE" value="50000000" />
Votre fichier : <input type="file" name="fichier" />
<input type="submit" name="upload" value="Envoyer" />
</form>
<div id="uploadOutput"></div>
<script type="text/javascript" src="/libs/form/jquery.form.min.js"/>
<script>
$('#uploadForm').ajaxForm({
beforeSubmit: function() {
$('#uploadOutput').html('Envoi en cours...');
},
success: function(data) {
$('#uploadOutput').html(data);
}
});
$('#dialogbilanclient').dialog({ buttons: [ {
text: "Quitter",
click: function() { $(this).dialog("close"); }
} ] });
</script>
<?php } else {?>
<form id="formEnvoiBilan" name="formEnvoiBilan" method="post" action="<?=$this->url(array('controller'=>'finance',
'action'=>'saisiebilan'), 'default', true)?>">
<input type="hidden" name="mode" value="order" />
<input type="hidden" name="siren" value="<?=$this->siren?>" />
<label>Format : </label><br/>
<input type="radio" name="format" value="N" checked> Réel normal (Liasse 2050)<br/>
<input type="radio" name="format" value="S"> Simplifé (Liasse 2033)<br/>
<input type="radio" name="format" value="C"> Consolidé <span style="color:gray;">
(Ne peut être utilisé dans l'évaluation des enrtreprises.)</span><br/>
<br/>
<label>Date de clôture du bilan : </label>
<input type="text" name="dateCloture" value="" size="10" maxlength="10" id="datepicker">
(JJ/MM/AAAA)
<br/><br/>
<label>Durée de l'exercice (en mois) : </label>
<select name="dureeExercice">
<?php for ($i=1; $i<24; $i++) { $select = ''; if ($i == 12) { $select = 'selected'; } ?>
<option value="<?=$i?>" <?=$select?>><?=$i?></option>
<?php } ?>
</select>
<br/><br/>
<label>Confidentialité : </label><br/>
<input type="radio" name="confidentiel" value="0" checked>
Ce bilan n'est pas confidentiel (saisie gratuite)
<br/>
<input type="radio" name="confidentiel" value="1">
Ce bilan est confidentiel et ne doit être utilisé que pour les utilisateurs
de votre société (+7€ HT par bilan saisi)
<br/><br/>
<span><i>
Vous obtiendrez une référence à l'étape suivante avec la possibilité
de nous transmettre directement par Internet votre bilan au format numérique (PDF, TIFF)
</i></span>
<br/><br/>
<span><i>
Si le bilan communiqué n'est pas conforme aux formulaires CERFA de la DGI des
frais de traitement de 10€ vous seront facturés en sus.
</i></span>
</form>
<script type="text/javascript" src="/libs/form/jquery.form.min.js"/>
<script type="text/javascript">
$('#dialogbilanclient').dialog({ buttons: {
'Valider': function() {
var url = $('#dialogbilanclient form#formEnvoiBilan').attr('action');
$.post(url, $('#dialogbilanclient form#formEnvoiBilan').serialize(), function(data){
$('div#dialogbilanclient.ui-dialog-content').html(data);
});
},
'Annuler': function() { $(this).dialog('close'); }
}, });
$('#datepicker').datepicker( $.datepicker.regional['fr'] );
$('#datepicker').datepicker( "option", "dateFormat", 'dd/mm/yy' );
$('#datepicker').datepicker( "option", "defaultDate", '31/12/<?=date('Y')-1?>' );
</script>
<?php }?>

View File

@ -1,19 +0,0 @@
<?php if (isset($this->upload) && $this->upload == true){?>
<strong>Fichier envoyé <a href="<?=$this->url(array('module'=>'file', 'controller'=>'index', 'action'=>'bilanclient',
'q'=>$this->file), 'default', true)?>"></a></strong>
<script>
$('#dialogbilanclient').dialog({ buttons: [ {
text: "Quitter",
click: function() { $(this).dialog("close"); }
} ] });
</script>
<?php } elseif (isset($this->upload) && $this->upload == false) {?>
<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>Alerte :</strong> <?=$this->errMsg?></p>
</div>
<?php } ?>

View File

@ -1,7 +0,0 @@
<p>&copy; 2006-<?php echo date('Y')?> Scores &amp; D&eacute;cisions SAS -
<?=$this->translate("Tous droits r&eacute;serv&eacute;s")?> -
<a href="http://www.scores-decisions.com/mentions.php" target="_blank">
<?=$this->translate("Mentions l&eacute;gales")?></a> -
<img class='flag' id="fr" src="/themes/default/images/drapeaux/fr.png"/>
<img class='flag' id="en" src="/themes/default/images/drapeaux/en.png"/>
</p>

View File

@ -1,155 +0,0 @@
<?php if (empty($this->AutrePage)) {?>
<div id="center">
<?php }?>
<?php if ( $this->error ) {?>
<div class="paragraph">
Erreur
</div>
<?php } elseif ( $this->message ) {?>
<?=$this->message?>
<?php } else {?>
<style>
div.avisrncs-title { text-align:center; }
div.avisrncs-title h1 { background:none !important; color:#000000 !important; }
div.avisrncs-content h3 { border-bottom:1px solid; }
div.avisrncs-header p { margin:0; padding:0; }
div.avisrncs-footer p { margin:0; padding:0; }
</style>
<div class="paragraph">
<div class="avisrncs-header">
<p>Avis de situtation RNCS édité le <?=$this->AvisDateTxt?></p>
</div>
</div>
<div class="avisrncs-title">
<h2><?=$this->translate("AVIS DE SITUATION RNCS")?></h2>
<p><?=$this->translate("REGISTRE NATIONAL DU COMMERCES ET DES SOCIETES")?></p>
<p><?=$this->translate("Avis en date du ")?><?=$this->AvisDateTxt?></p>
</div>
<div class="paragraph">
<div class="avisrncs-content">
<h3><?=$this->translate("IDENTIFICATION")?></h3>
<?php if ($this->RadiationDate) {?>
<p style="font:weight;">Cette entreprise est radiée au RNCS.</p>
<?php }?>
<p>Dénomination sociale : <?=$this->Nom?></p>
<p>Sigle : <?=$this->Sigle?></p>
<p>Enseigne : <?=$this->Enseigne?></p>
<p>Nom Commercial : <?=$this->NomComercial?></p>
<p>Numéro d'identification : <?=$this->SirenTexte($this->Siren)?> RCS <?=$this->Tribunal?></p>
<p>Numéro de gestion : <?=$this->NumGest?></p>
<p>Date d'immatriculation : <?=$this->ImmatDate?></p>
<?php if ($this->RadiationDate) {?>
<p>Date de radiation : <?=$this->RadiationDate?></p>
<?php } else {?>
<h3><?=$this->translate("RENSEIGNEMENT RELATIF A L'IDENTITE")?></h3>
<p>Forme Juridique : <?=$this->FormeJuridique?></p>
<p>Au capital de : <?=$this->Capital?></p>
<p>Adresse du siège : <?=$this->SiegeAdresse?></p>
<p>Date darrêté des comptes : <?=$this->CompteArretDate?> </p>
<p>Constitution : <?=$this->ConstitutionActeDate?></p>
<p>Dépôt de l'acte constitutif: <?=$this->ConstitutionDepotDate?></p>
<h3><?=$this->translate("ADMINISTRATION")?></h3>
<?php foreach ( $this->Administration as $item ) {?>
<p><?=$item['Fct']?> : <?=$item['Txt']?></p>
<?php }?>
<h3><?=$this->translate("RENSEIGNEMENT RELATIF A L'ACTIVITE")?></h3>
<p>Origine de la société : <?=$this->Origine?></p>
<p>Activité : <?=$this->Activite?></p>
<p>Activité déclarée au BODACC : <?=$this->BodaccActivite?></p>
<p>Commencement de l'activité : <?=$this->ActiviteDate?></p>
<p>Mode d'exploitation : <?=$this->Exploitation?></p>
<h3><?=$this->translate("JUGEMENTS RNCS")?></h3>
<p>&Eacute;vénements : </p>
<div style="margin-left:100px;">
<?php if (count($this->Evenements)>0) {?>
<table>
<?php foreach ( $this->Evenements as $item ) {?>
<tr><td><?=$item?></td></tr>
<?php }?>
</table>
<?php } else {?>
N&Eacute;ANT.
<?php }?>
</div>
<h3><?=$this->translate("DEPOT LEGAL")?></h3>
<p>Décisions :</p>
<div style="margin-left:100px;">
<?php if ( count($this->Depots)>0 ) {?>
<?php foreach ( $this->Depots as $item ) {?>
<table style="margin:10px 0;">
<tr>
<td>Acte n°<?=$item->ActeNum?> <?php if($item->ActeDate!='0000-00-00') {?>du <?=substr($item->ActeDate,8,2).'/'.substr($item->ActeDate,5,2).'/'.substr($item->ActeDate,0,4)?> <?php }?>
- Depot n°<?=$item->DepotNum?> du <?=substr($item->DepotDate,8,2).'/'.substr($item->DepotDate,5,2).'/'.substr($item->DepotDate,0,4)?></td>
</tr>
<tr>
<td><?=$item->ActeTypeLabel?></td>
</tr>
<?php foreach ($item->infos->item as $detail) {?>
<tr>
<td><?=$detail?></td>
</tr>
<?php }?>
</table>
<p>Liste non exhaustive.</p>
<?php }?>
<?php } else {?>
N&Eacute;ANT.
<?php }?>
</div>
<h3><?=$this->translate("AUTRES ETABLISSEMENTS")?></h3>
<p>Liste des établissements actifs :</p>
<div style="margin-left:100px;">
<table>
<?php foreach ( $this->Etablissements as $etab ) {?>
<tr><td><?=$etab?></td></tr>
<?php }?>
</table>
</div>
<?php }?>
</div>
</div>
<div class="paragraph">
<div class="avisrncs-footer">
<p>Fin de l'avis de situation</p>
<p>Avis de situation RNCS édité le <?=$this->AvisDateTxt?></p>
</div>
</div>
<?php if (empty($this->AutrePage)) {?>
<?=$this->render('cgu.phtml', $this->cgu)?>
<?php }?>
<?php }?>
<?php if (empty($this->AutrePage)) {?>
</div>
<?php }?>

View File

@ -1,23 +0,0 @@
<?php if (empty($this->AutrePage)) {?>
<div id="center">
<?php }?>
<?php if ( $this->error ) {?>
<div class="paragraph">
Erreur
</div>
<?php } elseif ( $this->message ) {?>
<?=$this->message?>
<?php } else {?>
Erreur inconnu.
<?php }?>
<?php if (empty($this->AutrePage)) {?>
</div>
<?php }?>

View File

@ -1,231 +0,0 @@
<div id="map" class="map"><div id="popup"></div></div>
<?php if ($this->source == 'google') {?>
<script type="text/javascript">
<?php echo 'var marks = '.$this->marks.';'?>
var timer;
var timerSecondInterval = 5;
var timerSecondMax = 300;
var timeCount = 0;
var marksNb = marks.length;
var markDone = 1;
var map;
var zoneMarker;
var geocoder = new google.maps.Geocoder();
// --- Wait GeoCoding to launch Google Map
function waitGeoCode() {
timeCount = timeCount + timerSecondInterval;
if (timeCount >= timerSecondMax || markDone == marksNb) {
clearInterval(timer);
loadGoogleMap();
}
}
//--- Create Marker
function createMarker(m) {
// --- Marker options
var marker = new google.maps.Marker({
map: map,
position: m.location,
title: m.title,
icon: '/themes/default/images/maps/' + m.icon,
});
// --- Info Window
var infowindow = new google.maps.InfoWindow({
content: m.text
});
// --- Create event marker
google.maps.event.addListener(marker, 'click', function() {
infowindow.open(map, marker);
});
// --- Extend map by adding marker
zoneMarker.extend(marker.getPosition());
}
// --- Load Google Map
function loadGoogleMap() {
var mapOptions = {
zoom: 8,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
map = new google.maps.Map(document.getElementById('map'), mapOptions);
zoneMarker = new google.maps.LatLngBounds();
$.each(marks, function (i, item){
if (item.location) {
createMarker(item);
}
});
if (zoneMarker.isEmpty()) {
//console.log('ZoneMarker is empty');
} else {
map.fitBounds(zoneMarker);
}
}
// --- Wait the document is ready
$(function(){
// --- Start timer
timer = setInterval(waitGeoCode, timerSecondInterval);
// --- Get location and geocode address if needed
$.each(marks, function (i, item){
if (item.gps.lat && item.gps.lon) {
marks[i].location = new google.maps.LatLng(item.gps.lat, item.gps.lon);
markDone++;
} else {
<?php if ($this->AuthorizeGeocode) {?>
geocoder.geocode({ address:item.address, region:'FR' }, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
if (results[0]) {
// --- Set location to the marker
marks[i].location = results[0].geometry.location;
marks[i].locationLat = results[0].geometry.location.lat();
marks[i].locationLng = results[0].geometry.location.lng();
marks[i].locationType = results[0].geometry.location_type;
marks[i].locationAddress = results[0].formatted_address
// --- Altitude
var alt = 0;
var locations = [];
locations.push(marks[i].location);
// --- Create an ElevationService
var elevator = new google.maps.ElevationService();
// Create a LocationElevationRequest object using the array's one value
var positionalRequest = {
'locations': locations
}
// Initiate the location request
elevator.getElevationForLocations(positionalRequest, function(results, status) {
if (status == google.maps.ElevationStatus.OK) {
if (results[0]) {
var alt = results[0].elevation;
if (results[0].elevation<-500) {
alt = 0;
}
if (results[0].resolution>500) {
alt = 0;
}
}
}
});
// --- Send to webservice
$.post('/saisie/geocode', {
siret: marks[i].siret,
lat: marks[i].locationLat,
lng: marks[i].locationLng,
alt: alt,
address: marks[i].locationAddress,
precis: marks[i].locationType
});
}
}
markDone++;
//console.log("GeoCode: " + status + ' - index: ' + i);
});
<?php }?>
}
});
});
</script>
<?php }?>
<?php if ($this->source == 'openstreetmap') {?>
<script type="text/javascript">
<?php echo 'var marks = '.$this->marks.';'?>
var zoom = 6;
var FCenterLng = 1.87528;
var FCenterLat = 46.60611;
//--- Wait the document is ready
$(function(){
// --- Create Markers
var listSource = {};
$.each(marks, function (i, item) {
if (item.gps.lat && item.gps.lon) {
var iconFeature = new ol.Feature({
geometry: new ol.geom.Point(ol.proj.transform([item.gps.lon, item.gps.lat], 'EPSG:4326', 'EPSG:3857')),
name: item.siret,
text: item.text,
});
console.log(item.icon);
if (typeof listSource[item.icon] === 'undefined') {
listSource[item.icon] = new ol.source.Vector({});
}
var vectorSource = listSource[item.icon];
vectorSource.addFeature(iconFeature);
listSource[item.icon] = vectorSource;
}
});
// --- Create Layers
var rasterLayer = new ol.layer.Tile({ source: new ol.source.OSM() });
var listLayers = [rasterLayer];
console.log(listSource);
$.each(listSource, function (type, item) {
// --- Create Style
var iconStyle = new ol.style.Style({
image: new ol.style.Icon(/** @type {olx.style.IconOptions} */ ({
anchor: [0.5, 46],
anchorXUnits: 'fraction',
anchorYUnits: 'pixels',
opacity: 0.75,
src: '/themes/default/images/maps/' + type
}))
});
var vectorLayer = new ol.layer.Vector({ source: item, style: iconStyle });
listLayers.push(vectorLayer);
});
// --- Load Map
var map = new ol.Map({
target: 'map',
layers: listLayers,
view: new ol.View({
center: ol.proj.transform([FCenterLng, FCenterLat], 'EPSG:4326', 'EPSG:3857'),
zoom: zoom
})
});
// Popup
var element = document.getElementById('popup');
var popup = new ol.Overlay({
element: element,
positioning: 'bottom-center',
stopEvent: false
});
map.addOverlay(popup);
// display popup on click
map.on('click', function(evt) {
var feature = map.forEachFeatureAtPixel(evt.pixel,
function(feature, layer) {
return feature;
});
if (feature) {
var geometry = feature.getGeometry();
var coord = geometry.getCoordinates();
popup.setPosition(coord);
$(element).qtip({
content: {
title: feature.get('name'),
text: feature.get('text'),
},
position: { my: 'bottom center', at: 'top center', adjust: { y: -40 } },
style: { classes: 'qtip-light' }
})
$(element).qtip('api').show();
/*$(element).popover({
'placement': 'top',
'html': true,
'content': feature.get('name')
});
$(element).popover('show');*/
} else {
$(element).qtip('api').destroy();
/*$(element).popover('destroy');*/
}
});
});
</script>
<?php }?>

View File

@ -1,11 +0,0 @@
<?php if ( isset($this->page) ) {?>
<?=$this->page?>
<?php } else {?>
<div id="center" style="padding:0;">
<iframe src="<?=$this->corporamaUrl?>" width="100%" height="1000px" style="border:0;overflow-x:hidden;"></iframe>
</div>
<?php }?>

View File

@ -1,139 +0,0 @@
<div id="center">
<h1><?=$this->translate("LISTE DES &Eacute;TABLISSEMENTS")?></h1>
<div class="paragraph">
<table class="identite">
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib"><?=$this->translate("Num&eacute;ro identifiant Siren")?></td>
<td width="350" class="StyleInfoData"><?=$this->SirenTexte($this->siren)?></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib"><?=$this->translate("Dénomination Sociale")?></td>
<td width="350" class="StyleInfoData"><?=$this->raisonSociale?></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td colspan="2" class="StyleInfoData">
<?=$this->translate($this->translate()->getTranslator()->plural("L'entreprise a %1\$s établissement", "L'entreprise a %1\$s établissements", $this->nbEtabTotal), $this->nbEtabTotal);?>
</td>
</tr>
<?php if ($this->actif == -1 && is_array($this->etabs) && count($this->etabs)>0){ ?>
<tr>
<td width="30">&nbsp;</td>
<td colspan="2" class="StyleInfoData">
<?=$this->translate($this->translate()->getTranslator()->plural("Affichage de %1\$s établissement actif", "Affichage de %1\$s établissements actifs", $this->nbEtabActif), $this->nbEtabActif);?>
<?=$this->translate($this->translate()->getTranslator()->plural("et %1\$s établissement radié", "et %1\$s établissements radiés", $this->nbEtabRadie), $this->nbEtabRadie);?>
</td>
</tr>
<?php }?>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib"><?=$this->translate("Actif")?> / <?=$this->translate("Inactif")?></td>
<td width="350" class="StyleInfoData">
<form name="options" method="post" action="<?=$this->url(array(
'controller' => 'identite',
'action' => 'etablissements',
'siret' => $this->siret,
'id' => $this->id,
), 'default', true);?>">
<select name="actif">
<option value="-1"<?=($this->actif==-1)? ' selected' : '';?>><?=$this->translate("Tous")?></option>
<option value="1"<?=($this->actif==1)? ' selected' : '';?>><?=$this->translate("Actif")?></option>
<option value="0"<?=($this->actif==0)? ' selected' : '';?>><?=$this->translate("Inactif")?></option>
</select>
<input type="submit" name="selection" value="Ok">
</form>
</td>
</tr>
</table>
</div>
<h2>&Eacute;tablissements</h2>
<?php if (count($this->etabs)>0) { ?>
<div class="paragraph">
<table class="data">
<?php foreach ($this->etabs as $etab) { ?>
<?php
if ($etab->Siege==1) $type = 'siège ';
else $type = 'établ. ';
if ($etab->Actif==1) $type.= 'actif';
else $type.= 'inactif';
if(intval($etab->Nic)==0 || intval($etab->Nic)>=99990) $type.=' provisoire';
$href = $this->url(array(
'controller' => 'identite',
'action' => 'fiche',
'siret' => $this->siren.$etab->Nic,
'id' => $this->id,
), 'default', true);
?>
<tr>
<td class="StyleInfoData" width="50" valign="top">
<b><a title="<?=$this->translate("Voir la fiche d'identité")?>" href="<?=$href?>"><?=$etab->Nic?></a></b>
</td>
<td class="StyleInfoData" width="70" valign="top"><?=$type?></td>
<td class="StyleInfoData" width="250">
<?php
if ($etab->Enseigne!='') {
?>
<b><?=$etab->Enseigne?></b><br/>
<?php
}
?>
<?=$etab->Adresse?><br/>
<?php
if ($etab->Adresse2!='') {?>
<?=$etab->Adresse2?><br/>
<?php
}
?>
<b><?=$etab->CP?> <?=$etab->Ville?></b>
<?php
if ($etab->Tel!='') echo '<br/><i>T&eacute;l : '.$etab->Tel.'</i>&nbsp;&nbsp;&nbsp;';
if ($etab->Fax!='') echo '<br/><i>Fax : '.$etab->Fax.'</i>';
?>
</td>
<td class="StyleInfoData" valign="top">
<?=$etab->NafEtab.' : '.$etab->NafEtabLib?>
<?php
if ($etab->Actif==1 && !empty($etab->EffEtTrLib) && !empty($etab->EffEtTr) && !in_array($etab->EffEtTr, array('N/C', 'NN', 0)) ){
?>
<br/><i><?=$etab->EffEtTrLib?></i>
<?php
}
?>
</td>
</tr>
<?php } ?>
</table>
</div>
<?php if ($this->PageTotal>1) {?>
<div class="paragraph">
<div class="pagination clearfix">
<a class="first" href="<?=$this->url(array('page'=>1))?>">&laquo;</a>
<a class="previous" href="<?=$this->url(array('page'=>$this->PagePrev))?>">&lsaquo;</a>
<span>Page <?=$this->PageCurrent?>/<?=$this->PageTotal?></span>
<a class="next" href="<?=$this->url(array('page'=>$this->PageNext))?>">&rsaquo;</a>
<a class="last" href="<?=$this->url(array('page'=>$this->PageTotal))?>">&raquo;</a>
</div>
</div>
<?php }?>
<?php if($this->hasPrefCarte){?>
<div class="paragraph">
<?=$this->action('carte', 'identite', null, array(
'siret'=>$this->siret, 'id'=>$this->id,
'actif'=>$this->actif, 'page'=>$this->PageCurrent) )?>
</div>
<?php }?>
<?php } ?>
<?php if ( empty($this->AutrePage) ) {?>
<?=$this->render('cgu.phtml', $this->cgu)?>
<?php }?>
</div>

View File

@ -1,46 +0,0 @@
<div id="center">
<h1>LISTE DES &Eacute;V&Eacute;NEMENTS RNCS</h1>
<div class="paragraph">
<table class="identite">
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Num&eacute;ro identifiant Siren</td>
<td width="350" class="StyleInfoData"><?=$this->SirenTexte($this->siren)?></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Dénomination Sociale</td>
<td width="350" class="StyleInfoData"><?=$this->raisonSociale?></td>
</tr>
</table>
</div>
<h2>&Eacute;v&eacute;nements RNCS</h2>
<?php if ( count($this->Even)==0 ) { ?>
<div class="paragraph">Aucun &eacute;v&egrave;nement n'est pr&eacute;sent dans notre base</div>
<?php } else { ?>
<div class="paragraph">
<table class="data">
<thead>
<tr>
<th>Date</th>
<th>Label</th>
</tr>
</thead>
<tbody>
<?php foreach ($this->Even as $item) {?>
<tr>
<td><?=$item->Date?></td>
<td><?=$item->Label?></td>
</tr>
<?php }?>
</tbody>
</table>
</div>
<?php }?>
<?=$this->render('cgu.phtml', $this->cgu)?>
</div>

View File

@ -1,170 +0,0 @@
<?php if ( empty($this->AutrePage) ) {?>
<div id="center">
<?php }?>
<?php if ( $this->message ) {?>
<h2>Informations</h2>
<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>
<strong><?=$this->message?></strong></p>
</div>
</div>
<?php } else {?>
<?php if ( empty($this->AutrePage) ) {?>
<div class="paragraph" style="text-align:right;">
<?php if (!empty($this->dateDerMaj)) { ?>
<a class="datemaj" href="#">
<?=$this->translate("Dernière mise à jour le")?> <?=$this->dateDerMaj?>
<span><?=$this->datemajTexte?></span>
</a>
<?php }?>
</div>
<?php if ( !empty($this->surveillance) ) {?>
<div class="paragraph" style="clear:both;">
<?php echo $surveillances = $this->action('infos','surveillance', null, array('siret' => $this->siret))?>
</div>
<?php }?>
<?php }?>
<?php if ( empty($this->AutrePage) ) {?>
<h1 class="titre"><?=$this->translate("FICHE D'IDENTIT&Eacute;");?></h1>
<?php }?>
<div class="paragraph">
<table>
<?php
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Siret']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['SiretSiege']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['TvaNumero']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Isin']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Capitalisation']);
echo $this->partial('identite/fiche-item.phtml', $this->logo);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['NumRC']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['NumRM']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Groupe']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['AutreId']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Actif']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['SituationJuridique']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Situation']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['AutreSiren']);
?>
</table>
</div>
<h2><?=$this->translate("Dénomination sociale &amp; Coordonnées")?></h2>
<div class="paragraph">
<?php if ( empty($this->AutrePage) && $this->accessWorldCheck) { ?>
<div style="float:right;">
<img style="cursor:pointer;" class="wcheck" data-url="<?=$this->url(array(
'controller'=>'worldcheck',
'action'=>'occurence',
'dirSociete'=>$this->infos->Nom,
'dirSocNom2'=>$this->infos->Nom2,
'dirSocNomLong'=>$this->infos->NomLong,
'dirSocCommercial'=>$this->infos->NomCommercial,
'dirSocSigle'=>$this->infos->Sigle,
'dirSocSigleLong'=>$this->infos->SigleLong,
'dirSocEnseigne'=>$this->infos->Enseigne,
'dirSocEnseigneLong'=>$this->infos->EnseigneLong,
'dirType' =>'ORGANISATION',
'siren'=>substr($this->siret, 0, 9)
), 'default', true)?>" src="/themes/default/images/worldcheck/wc.png"/>
</div>
<script>
$('img.wcheck').each(function(){
$(this).qtip({
hide: { event: 'unfocus' },
show: { solo: true, delay: 500 },
content: {
button: true,
title: 'WorlCheck',
text: "Chargement...",
ajax: { url: $(this).data('url') } },
position: { my: 'right center', at: 'left center' }
});
});
</script>
<?php }?>
<table>
<?php
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['RaisonSociale']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Nom2']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['NomCommercial']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['EnseigneSigle']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['FormeJuridique']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['DateImmat']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['DateCreaEn']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['DateCreaEt']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Adresse']);
if ( empty($this->AutrePage) ) {
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['RNVP']);
}
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Zones']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Tel']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Fax']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Web']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Mail']);
?>
</table>
</div>
<h2><?=$this->translate("Activité(s) &amp; Chiffre d'affaires")?></h2>
<div class="paragraph">
<table>
<?php
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['ActiviteEn']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['ActiviteEt']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['ActiviteArtisanale']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Naf4']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Nace']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['NatureActivite']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['SurfaceMagasin']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['OrigineFond']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['TypeExploitation']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Saisonnalite']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['NbEtabActif']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Capital']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['ChiffreAffaire']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Dirigeants']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Effectif']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['EffectifEtab']);
?>
</table>
</div>
<?php if ( empty($this->AutrePage) ) {?>
<?=$this->action('geo', 'identite', null, array('infos' => $this->infos));?>
<?=$this->action('news', 'identite');?>
<div class="paragraph" style="clear:both;">
<a href="<?=$this->url(array('controller'=>'identite','action'=>'corporama', 'siret'=>$this->siret), 'default', true)?>" title="Toute la puissance des réseaux sociaux professionnels pour identifier rapidement un interlocuteur et accéder à ses coordonnées">
Actualités de la société <?=$this->raisonSociale?> sur le Web</a>
</div>
<?php if ( !empty($this->surveillance) ) {?>
<div class="paragraph" style="clear:both;">
<?=$surveillances?>
</div>
<?php }?>
<?php }?>
<?php if ( empty($this->AutrePage) ) {?>
<?=$this->render('cgu.phtml', $this->cgu)?>
<?php }?>
<?php }?>
<?php if ( empty($this->AutrePage) ) {?>
</div>
<?php }?>

View File

@ -1,69 +0,0 @@
<h2>Localisation géographique</h2>
<div class="paragraph">
<div id="infogeo" class="clearfix">
<div id="infogeo_txt">
<?php if ( $this->infos->GeoLat && $this->infos->GeoLon ) {?>
<span id=geolocalisation>
<b>Information géographique :</b><br/>
Latitude : <?=$this->decLat?> (<?=$this->infos->GeoLat?>)<br />
Longitude : <?=$this->decLon?> (<?=$this->infos->GeoLon?>)<br />
</span>
<a id="lien-google" href="<?=$this->mapsHref?>" target="_blank">
Afficher l'adresse sur Google Map &copy;</a><br/>
<br/>
<?php }?>
<b>Code commune / Rivoli :</b><br/>
<?=$this->infos->Dept.' '.$this->infos->codeCommune.' / '.$this->infos->Rivoli; ?>
<?php
if (count($this->infos->InfosIris)>0){
$InfosIris = $this->infos->InfosIris;
$codComIris = str_replace($InfosIris->codIris, '', $InfosIris->codComIris);
?>
<br/><br/><b>Iris :</b>
<?php if (intval($InfosIris->codIris) == 0){ ?>
<br/>Commune non découpée en Iris
<?php } else {?>
<br/>Code : <?=$codComIris?> <?=$InfosIris->codIris?>
<br/>Libellé : <a title="Consulter le plan d'assemblage de la commune" href="<?=$this->url(array('controller'=>'identite', 'action'=>'iris', 'code'=>$codComIris), 'default', true)?>" target="_blank"><?=$InfosIris->libIris?></a>
<img title="<?=$InfosIris->typIris?>" style="vertical-align:middle;" src="/themes/default/images/info.gif">
<?php }?>
<?php }?>
</div>
<?php if ($this->facade) {?>
<?php if ($this->source == 'google') {?>
<div id="infogeo_photo">
<?=$this->action('streetview', 'identite', null, array('infos' => $this->infos,));?>
</div>
<?php } elseif ($this->source == 'mappy') {?>
<div><img id="streetview" width="300px" /></div>
<script src="<?=$this->lienJs?>"></script>
<script type="text/javascript">
$(function() {
var serviceHandler = function(result) {
if (result instanceof Mappy.api.visiocity.Frontage) {
var current = result.getCurrent();
var img = $('<img src="' + current.getURL(320, null) +
'" alt="' + current.getDescription() +
'" width="300px" />');
$('#streetview').replaceWith(img);
}
};
var address = "<?=$this->adresse?>";
var geo = new Mappy.api.geolocation.Geocoder();
var photoService = new Mappy.api.visiocity.PhotoService();
geo.geocode(address, function(result) {
photoService.search(result[0], 'f', serviceHandler);
}, function(error) {});
});
</script>
<?php }?>
<?php }?>
</div>
</div>

View File

@ -1 +0,0 @@
<img src="/file/image/cache/q/<?php echo $this->name;?>" />

View File

@ -1,37 +0,0 @@
<style>
div#menu {display:none;}
</style>
<div id="center">
<div class="paragraph">
<div id="groups" class="jstree jstree-default"></div>
<div>Tête de groupe
<?php if($this->isin==1) { ?> coté, détention minimum à 50%.<?php }?>
<?php if($this->isin==0) { ?> détention minimum à 50%.<?php }?>
</div>
<div>Filiales, détention minimum à
<?php if($this->pctMin==0) {?> Tout<?php }?>
<?php if($this->pctMin==33) {?> 33%<?php }?>
<?php if($this->pctMin==40) {?> 40%<?php }?>
<?php if($this->pctMin==50) {?> 50%<?php }?>
</div>
</div>
</div>
<script src="/libs/jstree-3.3.3/jstree.min.js"></script>
<script>
$("#groups").jstree({
'core' : {
'data' : <?=$this->data?>,
'themes' : {
"theme" : "default",
"url" : "/libs/jstree-3.3.3/themes/default/style.min.css",
"dots" : true,
"icons" : false
}
},
}).on('loaded.jstree',function(){
window.print(); window.close();
});
</script>

View File

@ -1,51 +0,0 @@
<div id="center">
<h1>LISTE DES JUGEMENTS RNCS</h1>
<div class="paragraph">
<table class="identite">
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Num&eacute;ro identifiant Siren</td>
<td width="350" class="StyleInfoData"><?=$this->SirenTexte($this->siren)?></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Dénomination Sociale</td>
<td width="350" class="StyleInfoData"><?=$this->raisonSociale?></td>
</tr>
</table>
</div>
<h2>Jugements RNCS</h2>
<?php if ( count($this->Even)==0 ) { ?>
<div class="paragraph">Aucun &eacute;v&egrave;nement n'est pr&eacute;sent dans notre base</div>
<?php } else { ?>
<div class="paragraph">
<table class="data">
<thead>
<tr>
<th>Date</th>
<th>Type</th>
<th>Label</th>
</tr>
</thead>
<tbody>
<?php foreach ($this->Even as $item) {?>
<tr>
<td><?=$item->Date?></td>
<td>
<?php if ($item->Type == 'E') {?>Date du jugement<?php } ?>
<?php if ($item->Type == 'M') {?>Mention au KBIS<?php } ?>
</td>
<td><?=$item->Label?></td>
</tr>
<?php }?>
</tbody>
</table>
</div>
<?php }?>
<?=$this->render('cgu.phtml', $this->cgu)?>
</div>

View File

@ -1,42 +0,0 @@
<?php if (count($this->docs)==0) {?>
Aucun document.
<?php } else {
$limit = 3;
foreach ( $this->docs as $key=>$doc ) {
$class = ($key<$limit)?'first':'all';?>
<div class="<?=$class?>" id="<?=$key ?>">
<a target="_blank" href="<?=$this->url(array('module'=>'file', 'controller'=>'lien', 'action'=>'groupe',
'q'=>$doc->url), 'default', true)?>" id="<?=$doc->date?>" class="lienDocDate"><?=$doc->label?></a>
<?php if ($this->edition) {?>
<a class="dialog" title="Supprimer le document" href="<?=$this->url(array('controller'=>'saisie', 'action'=>'liendoc',
'mode'=>'delete', 'id'=>$doc->id), 'default', true)?>">
<img style="vertical-align:middle;" src="/themes/default/images/interfaces/supprimer.png" />
</a>
<?php }?>
<br/>
</div>
<?php }?>
<div class="affiche" id="show" style="cursor:pointer;">Afficher tous les documents</div><br/>
<script>
$(function(){
if (<?=$key?> >2) {
$("div.affiche").show();
} else {
$("div.affiche").hide();
}
$("div.all").hide();
});
$("div.affiche").on("click", function(){
if ($(this).attr("id")=="show") {
$(this).attr("id", "hide");
$(this).text("Afficher les <?=$limit?> derniers documents");
$("div.all").show();
} else {
$(this).attr("id", "show");
$(this).text("Afficher tous les documents");
$("div.all").hide();
}
});
</script>
<?php }?>

View File

@ -1,122 +0,0 @@
<div>
<?php if ($this->result->PpPm == 'PP') {?>
<strong>
<?php if (!empty($this->result->civilite)) {?>
<?=$this->result->civilite?>&nbsp;
<?php }?>
<?php if (!empty($this->result->nom)) {?>
<?=$this->result->nom?>&nbsp;
<?php }?>
<?php if (!empty($this->result->prenom)) {?>
<?=$this->result->prenom?>&nbsp;
<?php }?>
<?php if (!empty($this->result->nomUsage)) {?>
(<?=$this->result->nomUsage?>)&nbsp;
<?php }?>
</strong><br/>
<?php
$message = '';
if (!empty($this->result->naissanceDate) && $this->result->naissanceDate!='0000-00-00') {
$date = new Zend_Date($this->result->naissanceDate, 'yyyy-MM-dd');
$message = $message.' '.$this->translate("le").' '.$date->toString('dd/MM/yyyy');
}
if (!empty($this->result->naissanceLieu) || !empty($this->result->naissanceDeptPays)) {
$message = $message.' '.$this->translate("à").' '.$this->result->naissanceLieu.' '.$this->result->naissanceDeptPays;
}
if ($message!='') {
if ($this->result->civilite=='' || $this->result->civilite==null) {
$message = $this->translate("Né(e)").' '.$message;
} else if ($this->result->civilite=='M') {
$message = $this->translate("Né").' '.$message;
} else {
$message = $this->translate("Née").' '.$message;
}?>
<?=$message;?>
<?php } ?>
<?php } else {?>
<?=$this->result->raisonSociale?>
<?php if (intval($this->result->siren)!=0) {?> (<?=$this->result->siren?>)<?php }?>
<?php if ($this->result->actif==0) {?> (inactif)<?php }?>
<?php }?>
</div>
<?php if($this->edition) { ?>
<br/>
<a class="dialogFiche" title="Edition fiche" href="<?=$this->url(array('controller'=>'saisie', 'action'=>'lienfiche',
'idFiche'=>$this->idFiche),'default',true)?>">Editer la fiche</a>
<script>
$('a.dialogFiche').on('click', function(e){
e.preventDefault();
$('div.qtip').hide();
$('#dialog').remove();
var href = $(this).attr('href');
if (href!='#') {
var title = $(this).attr('title');
var dialogOpts = {
bgiframe: true,
title: title,
width: 650,
height: 600,
modal: true,
open: function(event, ui) {
$(this).html('Chargement...');
$(this).load(href);
},
close: function() { $('#dialog').remove(); }
};
$('<div id="dialog"></div>').dialog(dialogOpts);
return false;
}
});
</script>
<?php }?>
<?php if ( $this->idFiche>=1000 ) {?>
<div><b>Coordonnées : </b></div>
<div><?=($this->result->adresseNum==0) ? '' : $this->result->adresseNum . ' ' .
$this->result->adresseBtq. ' ' . $this->result->adresseCodeVoie. ' ' .
$this->result->adresseLibVoie?></div>
<div><?=$this->result->adressComp?></div>
<div><?=$this->result->adresseCp . ' ' . $this->result->adresseVille?></div>
<div>
<?php
if ( array_key_exists($this->result->adressePays, $this->countries))
echo $this->countries[$this->result->adressePays];
else
echo $this->result->adressePays;
?>
</div>
<?php if ($this->result->isin ) {?>
<div><b>Isin:</b>
<?=$this->result->isin;?>
</div>
<?php }?>
<?php if (count($this->result->identification->item)>0) {?>
<div><b>Identifiants nationaux</b></div>
<?php foreach ($this->result->identification->item as $id) {?>
<div><?=$id->label?> - <?=$id->num?></div>
<?php }?>
<?php }?>
<?php if ($this->result->PpPm == 'PP') {
$param = array(
'controller'=>'recherche',
'action'=>'dirigeant',
'dirNom'=>$this->result->nom,
'dirPrenom'=>$this->result->prenom,
'dirDateNaissJJ'=>$date?$date->get('dd'):'',
'dirDateNaissMM'=>$date?$date->get('MM'):'',
'dirDateNaissAAAA'=>$date?$date->get('YYYY'):''
);
?>
<br/><a href="<?=$this->url($param,'default',true);?>">Lancer une recherche dirigeant</a>
<?php } ?>
<?php }?>

View File

@ -1,115 +0,0 @@
<?php if ($this->tooltip) {?>
<?php if ($this->hasRight){ ?>
<div style="padding-left:20px;">
<?php if (!empty($this->RNVP->L1)) {?><?=$this->RNVP->L1?></br><?php }?>
<?php if (!empty($this->RNVP->L2)) {?><?=$this->RNVP->L2?></br><?php }?>
<?php if (!empty($this->RNVP->L3)) {?><?=$this->RNVP->L3?></br><?php }?>
<?php if (!empty($this->RNVP->L4)) {?><?=$this->RNVP->L4?></br><?php }?>
<?php if (!empty($this->RNVP->L5)) {?><?=$this->RNVP->L5?></br><?php }?>
<?php if (!empty($this->RNVP->L6)) {?><?=$this->RNVP->L6?></br><?php }?>
<?php if (!empty($this->RNVP->L7)) {?><?=$this->RNVP->L7?></br><?php }?>
</div>
<p><a href="<?=$this->url(array('controller'=>'identite', 'action'=>'rnvp', 'id'=>$this->id, 'siret'=>$this->siret),
'default', true)?>">Détails techniques</a></p>
<?php } else {?>
<p>Vous n'avez pas les droits nécessaires pour afficher cette information.</p>
<?php }?>
<?php } else {?>
<div id="center">
<h1>Restructuration, Normalisation et Validation Postale</h1>
<div class="paragraph">
<table class="identite">
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Num&eacute;ro identifiant SIRET</td>
<td width="350" class="StyleInfoData"><?=$this->SiretTexte($this->siret)?></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Dénomination Sociale</td>
<td width="350" class="StyleInfoData"><?=$this->raisonSociale?></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Adresse source officielle</td>
<td width="350" class="StyleInfoData"><?=$this->adresse?></td>
</tr>
</table>
</div>
<h2>Adresse normalisée</h2>
<?php if ($this->hasRight){ ?>
<div class="paragraph">
<table class="data">
<tbody>
<tr><td>L1</td><td><?=$this->RNVP->L1?></td></tr>
<tr><td>L2</td><td><?=$this->RNVP->L2?></td></tr>
<tr><td>L3</td><td><?=$this->RNVP->L3?></td></tr>
<tr><td>L4</td><td><?=$this->RNVP->L4?></td></tr>
<tr><td>L5</td><td><?=$this->RNVP->L5?></td></tr>
<tr><td>L6</td><td><?=$this->RNVP->L6?></td></tr>
<tr><td>L7</td><td><?=$this->RNVP->L7?></td></tr>
</tbody>
</table>
</div>
<h2>Informations sur le traitement</h2>
<div class="paragraph">
<table class="data">
<tbody>
<tr><td>Date de traitement</td><td><?=$this->RNVP->ProcessDate?></td></tr>
<tr>
<td>Code de traitement</td>
<td>
<?=$this->RNVP->ProcessCode?>
<?php if ($this->RNVP->ProcessCode == 'ND') {?> - Adresse non définie<?php }?>
<?php if ($this->RNVP->ProcessCode == 'KO') {?> - Adresse rejetée<?php }?>
<?php if ($this->RNVP->ProcessCode == 'OK') {?> - Adresse normalisée<?php }?>
</td>
</tr>
<tr><td>Libellé de traitement</td><td><?=$this->RNVP->ProcessLabel?></td></tr>
<tr><td>Code Qualité</td><td><?=$this->RNVP->QualityCode?></td></tr>
<tr><td>Libellé Qualité</td><td><?=$this->RNVP->QualityLabel?></td></tr>
<tr><td>Hexavia</td><td><?=$this->RNVP->GeoHexavia?></td></tr>
<tr><td>Hexapost</td><td><?=$this->RNVP->GeoHexapost?></td></tr>
<tr><td>Hexacle</td><td><?=$this->RNVP->GeoHexacle?></td></tr>
<tr><td>Cedexa</td><td><?=$this->RNVP->CedexaMatricule?></td></tr>
<tr><td>Date de mise à jour</td><td><?=$this->RNVP->DateUpdate?></td></tr>
</tbody>
</table>
</div>
<h2>Informations des référentiels géographiques</h2>
<div class="paragraph">
<table class="data">
<tbody>
<tr><td>Code Commune Insee</td><td><?=$this->RNVP->GeoInseeCommune?></td></tr>
<tr><td>Departement</td><td><?=$this->RNVP->GeoDepartement?></td></tr>
<tr><td>Code Rivoli</td><td><?=$this->RNVP->GeoRivoliCode?></td></tr>
<tr><td>Ilot</td><td><?=$this->RNVP->GeoIlot?></td></tr>
<tr><td>Iris</td><td><?=$this->RNVP->GeoIris?></td></tr>
<tr><td>Canton</td><td><?=$this->RNVP->GeoCanton?></td></tr>
<tr><td>L5 Géographique</td><td><?=$this->RNVP->CedexaGeoL5?></td></tr>
<tr><td>Code postal et commune géographique</td><td><?=$this->RNVP->CedexaGeoL6?></td></tr>
</tbody>
</table>
</div>
<?php } else {?>
<div class="paragraph">
<p>Vous n'avez pas les droits nécessaires pour afficher cette information.</p>
</div>
<?php }?>
<?=$this->render('cgu.phtml', $this->cgu)?>
</div>
<?php }?>

View File

@ -1,46 +0,0 @@
<?php if ($this->url) {?>
<div id="legende-photo">Cliché à l'approche de l'adresse postale.</div>
<img id="streetview" data-cache="<?=$this->cache?>" data-saveas="<?=$this->saveas?>" src="<?=$this->url?>"
width="320" height="320" />
<script>
$('img#streetview').on('load', function() {
var cache = $(this).data('cache');
var saveas = $(this).data('saveas');
if (cache == 0) {
var img = document.getElementById("streetview");
img.crossOrigin = "Anonymous";
var canvas = document.createElement("canvas");
canvas.width = img.width; canvas.height = img.height;
ctx = canvas.getContext("2d");
ctx.drawImage(img, 0, 0, img.width, img.height);
var dataURL = canvas.toDataURL('image/jpeg');
$.post('<?=$this->url(array('module'=>'file', 'controller'=>'streetview', 'action'=>'save'),'default', true)?>',
{ name: saveas, base64: dataURL });
}
});
</script>
<?php if ($this->AuthorizeUpdate) {?>
<div>
<a class="street-heading" href="<?=$this->url(array('controller'=>'identite','action'=>'streetview',
'siret'=> $this->siret, 'lat'=>$this->lat, 'lon'=>$this->lon, 'heading'=>$this->pagePrec),
'default', true)?>">&lt;</a> - <a class="street-heading" href="<?=$this->url(array('controller'=>'identite',
'action'=>'streetview', 'siret'=> $this->siret, 'lat'=>$this->lat, 'lon'=>$this->lon,
'heading'=>$this->pageSuiv), 'default', true)?>">&gt;</a>
</div>
<script>
$('a.street-heading').click(function(e){
e.preventDefault();
$('#infogeo_photo').load($(this).attr('href'));
});
</script>
<?php }?>
<?php if ($this->AuthorizeUpdate) {?>
<div>
<a class="street-original" href="#">Original</a> - <a class="street-upload" href="#">Upload</a>
</div>
<?php }?>
<?php }?>

View File

@ -1,149 +0,0 @@
<?php if ($this->ajax) {?>
<?=$this->RemplaceSiren(substr($this->annonce['Texte'],0,1000))?>
<?php } else {?>
<div id="center">
<h1 class="titre">ANNONCES L&Eacute;GALES</h1>
<div class="paragraph">
<table class="identite">
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Num&eacute;ro identifiant Siren</td>
<td width="350" class="StyleInfoData"><?=$this->SirenTexte($this->siren)?></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Dénomination Sociale</td>
<td width="350" class="StyleInfoData">
<?=$this->raisonSociale?>
<?php if($this->hasModeEdition) { ?>
<a href="<?=$this->url(array('controller' => 'saisie', 'action' => 'fiche',
'siret' => $this->siret, 'id' => $this->id,
), 'default', true)?>">(Edition)</a>
<?php }?>
</td>
</tr>
<?php if ($this->surveillance) {?>
<tr>
<td width="30">&nbsp;</td>
<td colspan="2" width="550" class="StyleInfoData">
<?=$this->action('infos', 'surveillance', null, array('source' => 'annonces',
'siret' => $this->siret))?>
</td>
</tr>
<?php }?>
</table>
</div>
<?php
switch ($this->annonce['Type']) {
case 'balo':
?><h2>BALO</h2><?php
break;
case 'bodacc':
case 'abod':
?><h2>&Eacute;V&Eacute;NEMENTS L&Eacute;GAUX</h2><?php
break;
case 'asso':
?><h2>Associations</h2><?php
break;
case 'bomp'
?><h2>Marchés publics</h2><?php
break;
}
?>
<div class="paragraph">
<?php if (!empty($this->annonce['Deleted'])) {?>
<div class="ui-widget">
<div class="ui-state-error ui-corner-all" style="padding: 0 .7em;">
<p><span class="ui-icon ui-icon-alert" style="float: left; margin-right: .3em;"></span>
Cette parution a fait l'objet d'une annonce corrective, le <?=$this->annonce['Deleted']?></p>
</div>
</div>
<?php }?>
<p class="StyleInfoData">
<?=$this->annonce['Desc'].' '.$this->annonce['Entree'].' '.$this->annonce['EntreeSD'];?>
<?php
if ($this->hasModeEdition){
$liensEdit = array(
'edit' => array(
'class' => 'annonceSaisie',
'title' => 'Edition annonce',
'img' => '<img src="/themes/default/images/interfaces/editer.png"/>',
),
'delete' => array(
'class' => 'annonceSaisie',
'title' => 'Suppression annonce',
'img' => '<img src="/themes/default/images/interfaces/supprimer.png"/>',
),
'copy' => array(
'class' => 'annonceSaisie',
'title' => 'Dupliquer sur autre Siren',
'img' => '<img src="/themes/default/images/interfaces/save_copy.png"/>',
),
'even' => array(
'class' => 'annonceSaisie',
'title' => "Modifier le type d'événement",
'img' => '<img src="/themes/default/images/interfaces/even.png"/>',
),
);
foreach ( $liensEdit as $lienId => $lienItem ){
?>
<a class="<?=$lienItem['class']?>" title="<?=$lienItem['title']?>" href="<?=$this->url(array(
'controller'=>'saisie', 'action'=>'annoncedialog', 'siret'=>$this->siret, 'op'=>$lienId,
'code'=>$this->annonce['Code'], 'idAnn'=>$this->idAnn,), 'default', true)?>">
<?=$lienItem['img']?></a>
<?php
}
}
?>
</p>
<p class="StyleInfoLib"><b><?=$this->annonce['Even']?></b></p>
<p><code><?=$this->RemplaceSiren($this->annonce['Texte'])?></code></p>
</div>
<?php if ($this->bodaccLink) { ?>
<div class="paragraph" style="text-align:center;">
<span id="bodacc" style="padding-bottom:10px;border-bottom:1px solid #cccccc;">
<a href="<?=$this->bodaccLink?>">
<img src="/themes/default/images/interfaces/pdf.png" alt="Bodacc au format PDF">
<?=$this->bodaccLinkLabel?></a>
</span>
</div>
<?php } ?>
<div class="paragraph">
<?php if (count($this->annonce['Entites'])>0) {?>
<p>Entités concernées par l'annonce :</p>
<table width="100%">
<?php foreach ($this->annonce['Entites'] as $entite) {?>
<tr>
<td style="border:1px solid #cccccc;padding:5px;" width="180"><?=$entite->event->LibEven?></td>
<td style="border:1px solid #cccccc;padding:5px;"><?=$entite->raisonSociale?></td>
<td style="border:1px solid #cccccc;padding:5px;" width="120">
<?php if (intval($entite->siret)>1000) {?>
<a href="<?=$this->url(array('controller'=>'identite','action'=>'fiche','siret'=>$entite->siret), 'default', true)?>">
<?=$this->SiretTexte($entite->siret)?></a>
<?php }?>
</td>
</tr>
<?php }?>
</table>
<?php }?>
</div>
<div class="paragraph" style="text-align:center;">
<?php if (intval($this->siret)!=0) {?>
<a href="<?=$this->url(array('controller'=>'juridique', 'action'=>'annonces', 'siret'=>$this->siret,
'id'=>$this->id, 'vue'=>$this->vue, 'page'=>$this->page), 'default', true)?>">
Revenir à la liste des annonces</a>
<?php }?>
</div>
<?=$this->render('cgu.phtml', $this->cgu)?>
</div>
<?php }?>

View File

@ -1,230 +0,0 @@
<?php if (empty($this->AutrePage)) {?>
<div id="center">
<?php }?>
<?php if (empty($this->AutrePage)) {?>
<h1 class="titre">ANNONCES L&Eacute;GALES</h1>
<div class="paragraph">
<table class="identite">
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Num&eacute;ro identifiant Siren</td>
<td width="350" class="StyleInfoData"><?=$this->SirenTexte($this->siren)?></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Dénomination Sociale</td>
<td width="350" class="StyleInfoData"><?=$this->raisonSociale?>
<?php if($this->hasModeEdition) {?>
<a href="<?=$this->url(array('controller' => 'saisie', 'action' => 'fiche',
'siret' => $this->siret, 'id' => $this->id))?>">(Edition)</a>
<?php }?>
</td>
</tr>
<?php if ($this->surveillance) {?>
<tr>
<td width="30">&nbsp;</td>
<td colspan="2" width="550" class="StyleInfoData">
<?=$this->action('infos','surveillance', null, array('source' => 'annonces',
'siret' => $this->siret))?>
</td>
</tr>
<?php }?>
</table>
</div>
<?php }?>
<?php if ($this->AutreSource){ ?>
<h2>EV&Eacute;NEMENTS L&Eacute;GAUX</h2>
<div class="paragraph">
Aucune annonces disponible pour cette entité.
</div>
<?php } else {?>
<?php if (empty($this->AutrePage)) {?>
<style>
div.blockType {
width:140px;
height:25px;
line-height:20px;
padding:2px;
margin:5px;
text-align:center;
float:left;
display:block;
border-radius: 10px;
background-color: #606060;
}
div.blockTypeActive {
width:140px;
height:25px;
line-height:20px;
padding:2px;
margin:5px;
text-align:center;
float:left;
display:block;
border-radius: 10px;
background-color:#2f343a;
border-color:#2f343a;
}
div.blockType:hover {
background-color:#2f343a;
border-color:#2f343a;
}
div.blockTypeActive span.nb {
background-color: #00008C;
font-weight: bold;
padding: 2px 4px;
font-size: 10px;
color: #FFFFFF;
}
div.blockType span.nb {
background-color: #A0A0A0;
font-weight: bold;
padding: 2px 4px;
font-size: 10px;
}
a.lienType {
width:140px;
vertical-align:middle;
display:inline-block;
line-height:1.2;
color: #FFFFFF;
font-weight:bold;
}
</style>
<div class="paragraph">
<div class="clearfix" style="margin:0 auto 5px auto;">
<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',
'action'=>'annonces', 'vue'=>'bodacc', 'siret'=>$this->siret,
'id'=>$this->id))?>">Annonces Légales</a>
</div>
<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(
'controller'=>'juridique', 'action'=>'annonces', 'vue'=>'balo', 'siret'=>$this->siret,
'id'=>$this->id))?>">B.A.L.O.</a>
</div>
<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(
'controller'=>'juridique', 'action'=>'annonces', 'vue'=>'bomp', 'siret'=>$this->siret,
'id'=>$this->id))?>">B.O.A.M.P.</a>
</div>
<div id="TypeAsso" class="blockType<?php if ($this->vue=='asso') echo 'Active';?>">
<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>
</div>
</div>
</div>
<?php }?>
<?php if ($this->vue == 'bomp') {?>
<div class="paragraph" style="margin:0 0 0 40px;">
<form name="filtreBoamp" method="post" action="<?=$this->url(array('controller'=>'juridique',
'action'=>'annonces', 'vue'=>'bomp', 'siret'=>$this->siret, 'id'=>$this->id), 'default', true)?>">
<label>Type d'annonce</label>
<select name="filtre">
<option value="A"<?=($this->filtre=='A')?' selected':'';?>>Avis d'attribution</option>
<option value="M"<?=($this->filtre=='M')?' selected':'';?>>Avis de marchés</option>
</select>
</form>
<script>
$('select[name=filtre]').on('change', function(e){
e.preventDefault();
$('form[name=filtreBoamp]').submit();
});
</script>
</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>
<?php } elseif ($this->vue=='asso') { ?>
<h2>Associations</h2>
<?php }?>
<div class="paragraph">
<?php if (count($this->annonces) == 0) { ?>
Néant
<?php } else {?>
<table class="data">
<?php foreach ($this->annonces as $ann) {?>
<?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>
<?php }?>
</div>
<?php if (empty($this->AutrePage)) {?>
<?php if ($this->PageTotal>1) {?>
<div class="paragraph">
<div class="pagination clearfix">
<a class="first" href="<?=$this->url(array('filtre'=>$this->filtre, 'page'=>1))?>">&laquo;</a>
<a class="previous" href="<?=$this->url(array('filtre'=>$this->filtre, 'page'=>$this->PagePrev))?>">&lsaquo;</a>
<span>Page <?=$this->PageCurrent?>/<?=$this->PageTotal?></span>
<a class="next" href="<?=$this->url(array('filtre'=>$this->filtre, 'page'=>$this->PageNext))?>">&rsaquo;</a>
<a class="last" href="<?=$this->url(array('filtre'=>$this->filtre, 'page'=>$this->PageTotal))?>">&raquo;</a>
</div>
</div>
<?php }?>
<?php }?>
<?php if (empty($this->AutrePage)) {?>
<?=$this->render('cgu.phtml', $this->cgu)?>
<?php }?>
<?php if (empty($this->AutrePage)) {?>
<script>
$.get('/juridique/annoncenum/siren/<?=$this->siren?>', function(data){
for (var type in data) {
$('div#'+type).append('<span class="nb">'+data[type]+'</span>');
}
}, 'json');
</script>
<?php }?>
<?php }?>
<?php if (empty($this->AutrePage)) {?>
</div>
<?php }?>

View File

@ -1,98 +0,0 @@
<div id="center">
<h1 class="titre">Contentieux Judiciaires</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>Alerte :</strong> <?=$this->msg?></p>
</div>
</div>
<?php } else {?>
<div class="paragraph">
<table class="identite">
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Num&eacute;ro identifiant Siren</td>
<td width="350" class="StyleInfoData"><?=$this->SirenTexte($this->siren)?></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Dénomination Sociale</td>
<td width="350" class="StyleInfoData"><?=$this->raisonSociale?></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Affaire(s) en tant que</td>
<td width="350" class="StyleInfoData">
<form action="<?=$this->url(array('module'=>'default','controller'=>'juridique',
'action'=>'ctx', 'siret'=>$this->siret, 'id'=>$this->id), 'default', true)?>" method="post">
<select name="type">
<?php foreach($this->TypeList as $k => $v) {?>
<option value="<?=$k?>" <?php if ($k==$this->Type){?> selected<?php }?>><?=$v?></option>
<?php }?>
</select>
<input type="submit" name="submit" value="OK">
</form>
</td>
</tr>
</table>
</div>
<h2>Liste des affaires en tant que <?=$this->TypeLabel?></h2>
<div class="paragraph">
<?php if (count($this->List) > 0) {?>
<table class="data">
<thead>
<tr>
<th>Date</th>
<th>Catégorie</th>
<th>Libellé</th>
<th>Tiers demandeur</th>
<th>Etat</th>
</tr>
</thead>
<tbody>
<?php foreach ($this->List as $k => $item) {?>
<tr>
<td>
<?php
$dateString = '-';
try {
$date = new Zend_Date($item->Date, 'y-MM-dd');
$dateString = $date->toString('dd/MM/y');
} catch(Zend_Date_Exception $e){}
?><a href="<?=$this->url(array('action'=>'ctxdetail', 'affaireId'=>$item->Id))?>"><?=$dateString?></a></td>
<td><?=$item->CategoryLabel?></td>
<td><?=$item->Label?></td>
<td>
<?php foreach($item->TierName->item as $t) {?>
<?=$t?>
<?php }?>
</td>
<td><?=$item->StatusLabel?></td>
</tr>
<?php }?>
</tbody>
</table>
<?php if ($this->PageTotal>1) {?>
<div class="paragraph">
<div class="pagination clearfix">
<a class="first" href="<?=$this->url(array('page'=>1, 'type'=>$this->Type))?>">&laquo;</a>
<a class="previous" href="<?=$this->url(array('page'=>$this->PagePrev, 'type'=>$this->Type))?>">&lsaquo;</a>
<span>Page <?=$this->PageCurrent?>/<?=$this->PageTotal?></span>
<a class="next" href="<?=$this->url(array('page'=>$this->PageNext, 'type'=>$this->Type))?>">&rsaquo;</a>
<a class="last" href="<?=$this->url(array('page'=>$this->PageTotal, 'type'=>$this->Type))?>">&raquo;</a>
</div>
</div>
<?php }?>
<?php }?>
</div>
<?php }?>
<?=$this->render('cgu.phtml', $this->cgu)?>
</div>

View File

@ -1,112 +0,0 @@
<div id="center">
<h1 class="titre">Contentieux Judiciaires</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>Alerte :</strong> <?=$this->msg?></p>
</div>
</div>
<?php } else {?>
<div class="paragraph">
<table class="identite">
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Num&eacute;ro identifiant Siren</td>
<td width="350" class="StyleInfoData"><?=$this->SirenTexte($this->siren)?></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Dénomination Sociale</td>
<td width="350" class="StyleInfoData"><?=$this->raisonSociale?></td>
</tr>
</table>
</div>
<h2>Détail de l'affaire</h2>
<div class="paragraph">
<table class="data">
<tbody>
<tr><td>Tribunal</td><td><?=$this->Affaire->GreffeLabel?></td></tr>
<tr>
<td>Date de l'affaire</td>
<td>
<?php
$dateString = '-';
try {
$date = new Zend_Date($this->Affaire->Date, 'y-MM-dd');
$dateString = $date->toString('dd/MM/y');
} catch(Zend_Date_Exception $e){}
?>
<?=$dateString?></td>
</tr>
<tr><td>Etat de l'affaire</td><td><?=$this->Affaire->StatusLabel?></td></tr>
<tr><td>Type de contentieux</td><td><?=$this->Affaire->CategoryLabel?></td></tr>
<tr><td>Nature de l'affaire</td><td><?=$this->Affaire->Label?></td></tr>
<tr>
<td>Demandeurs</td>
<td>
<?php if (count($this->Affaire->Tiers->item) > 0) {?>
<?php foreach ($this->Affaire->Tiers->item as $t) {?>
<?php if ($t->TypeCode == 'DE') {?>
<div>
<strong><?=$t->companyNom?></strong><?php if (!empty($t->companyId)) {?> (<?=$this->SirenTexte($t->companyId)?>) <?php }?>
<?php if (!empty($t->Acteur)) {?>
<?php foreach($t->Acteur->item as $acteur) {?>
<br/> - <?=$acteur->Nom?>
<?php }?>
<?php }?>
</div>
<?php }?>
<?php }?>
<?php }?>
</td>
</tr>
<tr>
<td>Défendeurs</td>
<td>
<?php if (count($this->Affaire->Tiers->item) > 0) {?>
<?php foreach ($this->Affaire->Tiers->item as $t) {?>
<?php if ($t->TypeCode == 'DF') {?>
<div>
<strong><?=$t->companyNom?></strong><?php if (!empty($t->companyId)) {?> (<?=$this->SirenTexte($t->companyId)?>) <?php }?>
<?php if (!empty($t->Acteur)) {?>
<?php foreach($t->Acteur->item as $acteur) {?>
<br/> - <?=$acteur->Nom?>
<?php }?>
<?php }?>
</div>
<?php }?>
<?php }?>
<?php }?>
</td>
</tr>
<tr><td colspan="2">Historique</td></tr>
<?php if (property_exists($this->Affaire->Histo, 'item') && count($this->Affaire->Histo->item) > 0) {?>
<?php foreach ($this->Affaire->Histo->item as $h){?>
<tr>
<td>
<?php
$dateString = '-';
try {
$date = new Zend_Date($h->Date, 'y-MM-dd');
$dateString = $date->toString('dd/MM/y');
} catch(Zend_Date_Exception $e){}
?>
<?=$dateString?>
</td>
<td><?=$h->Label?></td>
</tr>
<?php }?>
<?php } else {?>
<tr><td colspan="2">- Aucune information -</td></tr>
<?php }?>
</tbody>
</table>
</div>
<?php }?>
</div>

View File

@ -1,23 +0,0 @@
<?php if ( !empty($this->logo) ){?>
<div style="text-align:center;">
<img src="/file/image/logo/q/<?=$this->logo?>"/>
<br/>
<a id="logo_crop" href="<?=$this->url(array('controller'=>'logo', 'action'=>'crop', 'logo'=>$this->logo), null, true)?>">
Editer l'image</a>
<br/>
<a id="logo_delete" href="<?=$this->url(array('controller'=>'logo', 'action'=>'delete', 'image'=>$this->logo), null, true)?>">
Supprimer le logo existant</a>
</div>
<?php } else { ?>
<div style="text-align:center;">
<a id="logo_upload" href="<?=$this->url(array('controller'=>'logo', 'action'=>'upload', 'siren'=>$this->siren), null, true)?>" title="Envoi d'image">
Envoyer une image</a>
<br/>
<a id="logo_url" href="<?=$this->url(array('controller'=>'logo', 'action'=>'url', 'siren'=>$this->siren), null, true)?>">
Saisir URL</a>
</div>
<?php } ?>

View File

@ -1,46 +0,0 @@
<div id="center">
<h1>Commandes de Statuts Association</h1>
<div class="paragraph">
<form action="<?=$this->url(array('controller'=>'order', 'action'=>'assostatut'), null, true)?>">
<select name="y" >
<?php foreach($this->Years as $year) { ?>
<option value="<?=$year?>" <?php if($year==$this->year) echo 'selected';?>><?=$year?></option>
<?php } ?>
</select>
<select name="m">
<?php foreach($this->Months as $month) { ?>
<option value="<?=$month?>" <?php if($month==$this->month) echo 'selected';?>><?=$month?></option>
<?php } ?>
</select>
<input type="submit" value="OK" />
</form>
</div>
<h2>Liste des commandes</h2>
<div class="paragraph">
<?php if (count($this->Cmd) > 0) {?>
<table class="data">
<thead>
<tr>
<th>Reference</th>
<th>Société</th>
<th>Date</th>
<th>Detail</th>
</tr>
</thead>
<tbody>
<?php foreach($this->Cmd as $item) {?>
<tr>
<td><?=$item->Reference?></td>
<td><?=$item->CompanyName?> <?php if (!empty($item->CompanySiren)) {?>(<?=$item->CompanySiren?>)<?php }?></td>
<td style="white-space: nowrap;"><?=$item->DateInsert?></td>
<td></td>
</tr>
<?php }?>
</tbody>
</table>
<?php }?>
</div>
</div>

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