Compare commits

..

2 Commits

Author SHA1 Message Date
Michael RICOIS
15827c7c4b Bootstrap v2 2016-02-11 21:01:52 +00:00
Michael RICOIS
0f9e6568cb Prepare new design with modules 2015-11-18 13:37:05 +00:00
920 changed files with 1834247 additions and 49303 deletions

4
.gitignore vendored
View File

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

View File

@ -1,9 +1,4 @@
<?php
use Monolog\Logger;
use Monolog\Handler\StreamHandler;
use Monolog\Processor\IntrospectionProcessor;
use Monolog\Handler\ChromePHPHandler;
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
/**
@ -17,20 +12,21 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
}
/**
* 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',
));
* Init controller with modules
*/
protected function _initController()
{
$this->bootstrap('frontController');
$front = $this->getResource('frontController');
$front->setControllerDirectory(array(
'default' => __DIR__ . '/modules/default/controllers',
'account' => __DIR__ . '/modules/account/controllers',
'auth' => __DIR__ . '/modules/auth/controllers',
'monitoring' => __DIR__ . '/modules/monitoring/controllers',
));
return $front;
}
}
/**
* Initialisation global des paramètres de vue
@ -55,12 +51,21 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
$router = $front->getRouter();
$localauthRoute = new Zend_Controller_Router_Route('localauth/', array(
'module' => 'default',
'module' => 'auth',
'controller' => 'user',
'action' => 'login'
));
$router->addRoute('localauth', $localauthRoute);
$fichierRoute = new Zend_Controller_Router_Route('fichier/:action/:fichier', array(
'module' => 'default',
'controller' => 'fichier',
'fichier' => '',
));
$router->addRoute('fichier', $fichierRoute);
$printRoute = new Zend_Controller_Router_Route('editer/:action/:fichier', array(
'module' => 'default',
'controller' => 'print',
@ -68,6 +73,9 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
));
$router->addRoute('print', $printRoute);
$ssoRoute = new Zend_Controller_Router_Route('sso/:partner/', array(
'module' => 'default',
'controller' => 'auth',
@ -103,36 +111,6 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
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
*/
@ -171,7 +149,6 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
*/
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),

View File

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

View File

@ -0,0 +1,3 @@
<div class="row">
<p><small class="text-muted"><em><?=$this->cgu?></em></small></p>
</div>

View File

@ -1,7 +1,16 @@
<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>
<div class="container-fluid">
<div class="row">
<div class="col-sm-9 col-sm-offset-3 col-md-8 col-md-offset-3 col-lg-7 col-lg-offset-2">
<div class="center-block text-center">
<p class="text-muted credit">
&copy; 2006 - <?php echo date('Y')?> <a href="http://www.scores-decisions.com">Scores &amp; Décisions SAS</a>
- <?=$this->translate("Tous droits r&eacute;serv&eacute;s")?> -
<a href="http://www.scores-decisions.com/mentions-legales/" 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>
</div>
</div>
</div>
</div>

View File

@ -1,43 +1,102 @@
<?php if ($this->navigation()->menu()->hasPages()) { ?>
<div id="menu">
<div id="logo">
<img src="/themes/default/images/logos/logo_sd.gif" width="200" height="65" />
</div>
<?=$this->navigation()->menu();?>
<div class="icones">
<?php if ($this->print) {?>
<a target="_blank" title="Impression" href="/editer/ecran/<?=$this->print.'.html'?>">
<img alt="<?=$this->translate("Impression")?>" src="/themes/default/images/interfaces/printer.png">
</a>
<?php }?>
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="./">Scores & Decisions</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li class="visible-xs"><a href="#">Menu</a></li>
<?php if ($this->pdf) {?>
<a target="_blank" title="Impression PDF" href="/editer/pdf/<?=$this->pdf.'.pdf'?>">
<img alt="<?=$this->translate("Impression en PDF")?>" src="/themes/default/images/interfaces/pdf.png">
</a>
<?php }?>
<?php if ($this->MenuSaisie !== null) {?>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
Saisie <span class="caret"></span></a>
<ul class="dropdown-menu">
<?php if ($this->xml) {?>
<a target="_blank" title="Export XML" href="/editer/xml/<?=$this->xml.'.xml'?>">
<img alt="<?=$this->translate("Export en XML")?>" src="/themes/default/images/interfaces/xml.png">
</a>
<?php }?>
</ul>
</li>
<?php }?>
<?php if ($this->aide) {?>
<a id="aideLigne" title="Aide en ligne" href="#">
<img alt="<?=$this->translate("Activer l'aide en ligne")?>" src="/themes/default/images/interfaces/aideligne.png">
</a>
<?php }?>
<?php if ($this->print) {?>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
Impression <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a title="Impression" href="/editer/ecran/<?=$this->print.'.html'?>"
target="_blank"><span class="glyphicon glyphicon-print" aria-hidden="true"></span> Ecran</a></li>
<?php if ($this->pdf) {?>
<li><a title="Impression PDF" href="/editer/pdf/<?=$this->pdf.'.pdf'?>"
target="_blank"><span class="fa fa-file-pdf-o" aria-hidden="true"></span> PDF</a></li>
<?php }?>
</div>
</div>
<script>
$('div#menu ul.navigation').accordion({
header: '.header',
autoHeight: false,
collapsible: true,
heightStyle: "content",
active: <?=$this->menuId?>
});
</script>
<?php }?>
<?php if ($this->xml) {?>
<li><a title="Export XML" href="/editer/xml/<?=$this->xml.'.xml'?>" target="_blank">XML</a></li>
<?php }?>
</ul>
</li>
<?php }?>
<?php if ($this->MenuSuivi !== null) {?>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
Suivi <span class="badge"><?=count($this->Suivi)?></span> <span class="caret"></span></a>
<ul class="dropdown-menu">
<?php if (count($this->Suivi) == 0) {?>
<li><a href="#">Aucun suivi</a></li>
<?php } else {?>
<?php foreach ($this->Suivi as $item) {?>
<li><a href="#"><?=$item['label']?></a></li>
<?php }?>
<?php }?>
<li class="divider"></li>
<li><a href="#">Ajouter au portefeuille</a></li>
<li><a href="#">Voir le portefeuille</a></li>
</ul>
</li>
<?php }?>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
Tableau de bord <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#">Commandes</a></li>
<li><a href="#">Surveillances</a></li>
<li><a href="#">Portefeuille</a></li>
<li role="separator" class="divider"></li>
<li><a href="#">Nouveautés</a></li>
<li><a href="#">Paramètres</a></li>
<li role="separator" class="divider"></li>
<li><a href="#">Déconnexion : mricois</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
Métier <span class="caret"></span></a>
<ul class="dropdown-menu">
<li class="active"><a href="#">Informations légales</a></li>
<li><a href="#">Gestion du risque</a></li>
<li><a href="#">Gestion commercial</a></li>
<li><a href="http://odea.scores-decisions.com">Données et prospection</a></li>
</ul>
</li>
</ul>
<form class="navbar-form navbar-right hidden-sm">
<div class="form-group input-group">
<input type="text" class="form-control" placeholder="Identifiant">
<span class="input-group-btn">
<button class="btn btn-default" type="button">
<span class="glyphicon glyphicon-search" aria-hidden="true"></span>
</button>
</span>
</div>
</form>
</div>
</div>

View File

@ -1,21 +1,35 @@
<?php echo $this->doctype()?>
<html>
<head>
<?php echo $this->headMeta()?>
<?php echo $this->headTitle()?>
<?php echo $this->headLink()?>
<?php echo $this->headScript()?>
<?php echo $this->headMeta()?>
<?php echo $this->headTitle()?>
<?php echo $this->headLink()?>
<?php echo $this->headScript()?>
</head>
<body>
<div id="global">
<nav class="navbar navbar-default navbar-fixed-top">
<?php echo $this->render('header.phtml')?>
<div id="content">
<?php echo $this->layout()->content?>
<div id="footer">
<?php echo $this->render('footer.phtml')?>
</nav>
<div class="container-fluid">
<div class="row">
<div class="col-sm-3 col-md-3 col-lg-2 sidebar">
<?php echo $this->render('menu.phtml')?>
</div>
<div class="col-sm-9 col-sm-offset-3 col-md-8 col-md-offset-3 col-lg-7 col-lg-offset-2 main">
<?php echo $this->layout()->content?>
</div>
<div class="hidden-xs hidden-sm hidden-md col-lg-3 sidebar-right">
Panneau Droit
</div>
</div>
</div>
</div>
<?php echo $this->render('footer.phtml')?>
<?php echo $this->inlineScript()?>
</body>
</html>

View File

@ -0,0 +1,14 @@
<?php if ($this->navigation()->menu()->hasPages()) { ?>
<div id="menu" class="nav nav-sidebar">
<?=$this->navigation()->menu();?>
</div>
<script>
$('div#menu ul.navigation').accordion({
header: '.header',
autoHeight: false,
collapsible: true,
heightStyle: "content",
active: <?=$this->menuId?>
});
</script>
<?php }?>

View File

@ -0,0 +1,181 @@
<?php
class Auth_UserController extends Zend_Controller_Action
{
public function init()
{
// --- Theme
$this->theme = Zend_Registry::get('theme');
$this->_helper->layout()->disableLayout();
}
/**
* Gestion de l'authentification
*/
public function loginAction()
{
$this->view->headLink()->appendStylesheet($this->theme->pathStyle.'/signin.css', 'all');
$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!='/auth/user/login' && $url!='/auth/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/>";
}
}
}
}
}
/**
* 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 = $this->view->url(array('module'=>'auth', '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);
}
}
/**
* Sends email to the specific client, who requests for forgotten password
*/
public function forgetAction()
{
$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('support');
$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

@ -0,0 +1,184 @@
<style>
div#dlg input#frm {
border-radius:0;
font-size:95%;
margin:0;
padding:0em 0em 0em 0.2em;
background: none;
box-shadow: none;
width: 20em;
height:1.5em;
}
label#frm {
font-family: arial;
font-size:0.9em;
cursor: default;
clear: both;
float: left;
width: 20em;
margin-right: 1em;
text-align: right;
}
.brsr {
border-style:solid;
border-width:1px;
border-color:red;
}
.loading
{
background-color: silver;
height: 450px;
top: 0px;
left: 0px;
position: absolute;
width: 720px;
opacity: 0.3;
display:none;
z-index: 1;
}
.message {
font-size: 0.8em;
width: 96%;
background-color: #FFFFDD;
border: 1px solid #FCEFA1;
border-radius: 4px;
padding: 10px 15px 10px 15px;
}
.stl {
height:25px;
}
#htxt, #ftxt {
margin-top: 10px;
margin-bottom:20px;
font-size: 0.9em;
}
</style>
<?php if ($this->sendEmail) {?>
<div class='message'><p id='<?=$this->bt_fermer;?>'>
Votre demande a été envoyée. Nous vous contacterons prochainement.
</p></div>
<script>
$('#dlg').dialog({ buttons: [
{ text: "Fermer", click: function() { $(this).dialog('close'); }}
] });
</script>
<?php } else {?>
<?php if ($this->message!='') {?>
<div class='message'><p id='<?=$this->bt_fermer;?>'><?=$this->message; ?></p></div>
<?php }?>
<div id='htxt'>
Pour recevoir votre mot de passe et/ou votre identifiant oubliés, nous vous invitons à saisir les informations ci-dessous et cliquer sur valider.
A réception de ces données, nous vous informerons par e-mail.
<p>Tous les champs (*) sont obligatoires : en cas de données manquantes ou erronées, votre demande ne pourra pas être prise en compte par nos services. * = champ obligatoire.</p>
</div>
<div>
<form method="post" action="<?=$this->url(array(), 'default', true)?>">
<div class="stl">
<label id="frm">Votre Identifiant :</label>
<input id="frm" type="text" name="identifiant"/>
</div>
<div class="stl">
<label id="frm">Votre Adresse email* :</label>
<input id="frm" type="text" name="email" required/>
</div>
<div class="stl">
<label id="frm">Votre Numéro de téléphone* :</label>
<input id="frm" type="text" name="telephone" required/>
</div>
<div class="stl">
<label id="frm">Votre Nom* :</label>
<input id="frm" type="text" name="nom" required/>
</div>
<div class="stl">
<label id="frm">Votre Prénom* :</label>
<input id="frm" type="text" name="prenom" required/>
</div>
<div class="stl">
<label id="frm">Votre Fonction* :</label>
<input id="frm" type="text" name="fonction" required/>
</div>
<div class="stl">
<label id="frm">Votre Service* :</label>
<input id="frm" type="text" name="service" required/>
</div>
<div class="stl">
<label id="frm">Dénomination Sociale* :</label>
<input id="frm" type="text" name="rsociale" required/>
</div>
</form>
</div>
<div id="ftxt">
<p>Ces informations sont destinées exclusivement au traitement de votre demande et à l'émission d'une réponse personnalisée.</p>
</div>
<div class="loading"><center><img style="padding-top:25%" src="/themes/default/images/giant/19-1.gif" /></center></div>
<script>
function validate() {
var allvals = true;
$('div#dlg input[required]').each(function() {
if(!$(this).val()) {
allvals = false;
$(this).addClass('brsr');
}
else { $(this).removeClass('brsr'); }
});
return allvals;
}
function isEmail(email) {
var emailval = true;
var regex = /^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
if (!regex.test(email.val())) {
emailval = false;
$(email).addClass('brsr');
}
else {
$(email).removeClass('brsr');
}
return emailval;
}
$(document).ready(function(){
validate();
});
$('div#dlg input[required]').blur(function(){
if(!$(this).val()) { $(this).addClass('brsr'); }
else { $(this).removeClass('brsr'); }
});
$('#dlg').dialog({ buttons: [
{ text: "Valider", click: function() {
var values = $(this).find('form').serialize();
if (validate() && isEmail($('div#dlg input[name=email]'))) {
if ($('.loading').css('display')=='none') {
$('.loading').css('display', 'block');
$('.ui-dialog-content').css('overflow','hidden');
$(".ui-dialog-buttonpane button:contains('Valider')").button("disable");
} else {
$('.loading').css('display', 'none');
}
$.post($(this).find('form').attr('action'), values, function(data) {
$('#dlg').html(data);
$('#htxt').height(50);
$('input#frm').attr("disabled", "disabled");
$(".ui-dialog-buttonpane button:contains('Valider')").hide();
});
}
}},
{ text: "Annuler", click: function() { $(this).dialog('close'); }}
] });
</script>
<?php }?>

View File

@ -0,0 +1,70 @@
<?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">
<form class="form-signin" method="post" action="<?=$this->url(array('module'=>'auth', 'controller'=>'user',
'action'=>'login'), 'default', true)?>">
<h2 class="form-signin-heading">Extranet <small>Scores & Décisions</small></h2>
<div style="text-align:center;"><p class="text-danger"><span><?=$this->message?></span></p></div>
<input name="login" value="" type="text" class="form-control" placeholder="Identifiant" autofocus autocomplete="off" required />
<input name="pass" value="" type="password" class="form-control" placeholder="Mot de passe" required/>
<script>document.write('<input name="screenSize" type="hidden" value="'+ screen.width +'x'+screen.height + '">');</script>
<button class="btn btn-lg btn-primary btn-block clearfix"" type="submit">Connexion</button>
</form>
<div class="form-signin">
<a class="dlg pull-right" title="<?=$this->translate("Identifiants oubliés ?")?>" href="<?=$this->url(array('module'=>'auth',
'controller'=>'user', 'action'=>'forget'))?>">
<?=$this->translate("Identifiants oubliés ?")?></a>
<script>
$('a.dlg').on('click', function(e){
e.preventDefault();
var title = $(this).attr('title');
var href = $(this).attr('href');
var dlgOpts = {
bgiframe: true,
title: title,
width: 710,
height: 530,
modal: true,
resizable: false,
open: function(event, ui) {
$(this).html('Chargement...');
$(this).load(href);
},
buttons: {'Fermer': function() { $(this).dialog('close'); }},
close: function() { $('#dlg').remove(); }};
$('<div id="dlg"></div>').dialog(dlgOpts);
return false;
});
</script>
</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

@ -0,0 +1,40 @@
<?php if ($this->ajax) {?>
<h4 class="logout"><?=$this->translate("Vous avez été déconnecté.")?></h4>
<h5 class="logout"><?=$this->translate("Veuillez cliquer")?> <a href="<?=$this->url?>"><?=$this->translate("ici")?></a>
</h5>
<?php } else {?>
<?php echo $this->doctype(); ?>
<html>
<head>
<?php echo $this->headMeta(); ?>
<?php echo $this->headTitle(); ?>
<?php echo $this->headStyle(); ?>
<?php echo $this->headLink(); ?>
</head>
<body>
<div id="wrap">
<div class="container">
<h4><?=$this->translate("Vous avez été déconnecté.")?></h4>
<p><?=$this->message?></p>
<h5 class="logout">
<?=$this->translate("Si cette page ne disparait pas au bout de %1\$s seconde(s)", $this->refresh)?>,
<?=$this->translate("veuillez cliquer ")?><a href="<?=$this->url?>"><?=$this->translate("ici")?></a>
</h5>
</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>
</body>
</html>
<?php }?>

View File

@ -3,18 +3,8 @@ 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');
}
@ -80,7 +70,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();

View File

@ -14,18 +14,8 @@ class AuthController extends Zend_Controller_Action
)
);
/**
* 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');
}
@ -71,12 +61,12 @@ class AuthController extends Zend_Controller_Action
$token = $params[$config['token']];
try {
$ws = new Scores_Ws_Client('gestion', '0.4');
$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 ) {
@ -106,7 +96,7 @@ class AuthController extends Zend_Controller_Action
try {
$ws = new Scores_Ws_Client('gestion', '0.3');
$InfosLogin = $ws->getInfosLogin($parameters);
$this->logger->info(print_r($InfosLogin,1));
Zend_Registry::get('firebug')->info($InfosLogin);
if ( is_string($InfosLogin) || $InfosLogin->error->errnum != 0 ) {
$this->view->Error = true;
} else {
@ -218,7 +208,7 @@ class AuthController extends Zend_Controller_Action
);
try {
$ws = new Scores_Ws_Client('account', '0.1');
$ws = new Scores_Ws_Client('gestion', '0.4');
$parameters = new stdClass();
$parameters->data = json_encode($data);
$created = $ws->setUserSSO($parameters);

View File

@ -3,18 +3,8 @@ 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');
}
@ -93,7 +83,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

@ -101,12 +101,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,10 +128,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');
@ -187,7 +177,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;
@ -456,7 +446,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';
@ -792,7 +782,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 +868,7 @@ class DashboardController extends Zend_Controller_Action
}
}
$this->logger->info(print_r($output,1));
Zend_Registry::get('firebug')->info($output);
$this->view->assign('output', $output);
}
@ -901,7 +891,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 +983,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

@ -5,18 +5,8 @@ class DirigeantController extends Zend_Controller_Action
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');

View File

@ -3,18 +3,8 @@ 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');
}
@ -70,7 +60,7 @@ class ErrorController extends Zend_Controller_Action
$mail = new Scores_Mail_Method();
$mail->setSubject('[ERREUR APPLICATIVE] - '.$c->profil->server->name.' -'.date('Ymd'));
$mail->setBodyText($message);
$mail->setFromKey('support');
$mail->setFromKey('supportdev');
$mail->addToKey('supportdev');
$mail->execute();
}

View File

@ -5,18 +5,8 @@ class EvaluationController extends Zend_Controller_Action
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');
@ -129,10 +119,10 @@ class EvaluationController extends Zend_Controller_Action
}
//Make the graph - Ready to create a class for this char
require_once 'ChartDirector/phpchartdir.php';
require_once 'Vendors/ChartDirector/phpchartdir.php';
require_once 'Scores/Cache.php';
$c = Zend_Registry::get('config');
$path = $c->profil->path->shared . '/pages/imgcache/';
$path = $c->profil->path->pages . '/imgcache/';
$file = 'indiscorehisto-'.$this->siret.'-'.$this->id.'-'.$type.'.png';
$cache = new Cache();
$return = null;
@ -211,19 +201,6 @@ class EvaluationController extends Zend_Controller_Action
*/
public function indiscoreAction()
{
$bornes = array(
'indiScore' => array('min' => 0, 'max' => 20, 'rouge' => 7, 'orange' => 10),
'scoreDir' => array('min' => 0, 'max' => 100, 'rouge' => 45, 'orange' => 56),
'scoreConf' => array('min' => 0, 'max' => 100, 'rouge' => 45, 'orange' => 56),
'scoreZ' => array('min' => -3, 'max' => 3, 'rouge' => -0.25, 'orange' => 0.125),
'scoreCH' => array('min' => -4.5, 'max' => 16, 'rouge' => 3.75, 'orange' => 10),
'scoreAfdcc1' => array('min' => -7, 'max' => 7, 'rouge' => 0, 'orange' => 1),
'scoreAfdcc2' => array('min' => -3, 'max' => 2, 'rouge' => -1, 'orange' => 0.5),
'scoreAltman' => array('min' => -2, 'max' => 8, 'rouge' => 0, 'orange' => 2.7),
'scoreCCF' => array('min' => 500, 'max' => 5000, 'rouge' => 2160, 'orange' => 3450 ),
);
$this->view->assign('bornes', $bornes);
$user = new Scores_Utilisateur();
if(!$user->checkPerm('INDISCORE') && !$user->checkPerm('INDISCOREP'))
$this->forward('perms', 'error');
@ -271,19 +248,16 @@ class EvaluationController extends Zend_Controller_Action
$this->view->headTitle()->prepend("Siret ".$this->siret);
$user = new Scores_Utilisateur();
if(!$user->checkPerm('INDISCORE2') && !$user->checkPerm('INDISCORE2P')) {
if(!$user->checkPerm('INDISCORE2') && !$user->checkPerm('INDISCORE2P'))
$this->forward('perms', 'error');
}
$siren = substr($this->siret,0,9);
$entreprise = new Scores_Session_Entreprise($this->siret, $this->id);
//@todo : transformer le webservice pour ne faire qu'une seule requete
$ws = new WsScores();
$indiscore = $ws->getIndiScore($siren, 0, 1);
if ($indiscore === false) {
$this->forward('soap', 'error');
}
$identite = $ws->getIdentite($siren);
$entreprise = new Scores_Session_Entreprise($this->siret, $this->id);
$identite = $ws->getIdentite($siren);
$indiscore = $ws->getIndiScore($siren);
$infos = $ws->getRatios($siren, 'indiscore2');
$score = array();
@ -323,11 +297,13 @@ class EvaluationController extends Zend_Controller_Action
$annees = array_slice($annees, 0, $nbMaxBilan);
sort($annees);
$tabResult = array();
foreach($annees as $annee) {
foreach($annees as $annee)
{
$data = array();
$dataEvol = array();
//Formatter les données
foreach($tabRatio as $idRatio => $valRatio) {
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'];
@ -465,7 +441,7 @@ class EvaluationController extends Zend_Controller_Action
$email = $request->getParam('email', '');
$infos = $ws->getRapport($siren, 3, 0, $plus, $ref, $encours, $email);
$this->logger->info(print_r($infos,1));
Zend_Registry::get('firebug')->info($infos);
if ($infos === false) {
$this->forward('soap', 'error');
}
@ -557,7 +533,7 @@ class EvaluationController extends Zend_Controller_Action
$file = 'evaluation-indiscore3-'.$this->siret.'.html';
}
$c = Zend_Registry::get('config');
$path = $c->profil->path->shared.'/pages';
$path = $c->profil->path->pages;
if (file_exists($path.'/'.$file))
{
$doc = new DOMDocument();
@ -630,7 +606,7 @@ class EvaluationController extends Zend_Controller_Action
$xml = $doc->saveXML();
$c = Zend_Registry::get('config');
$outfile = $c->profil->path->shared.'/pages/p'.$user->getIdClient().'-'.$file;
$outfile = $c->profil->path->pages.'/p'.$user->getIdClient().'-'.$file;
file_put_contents($outfile, $xml);
//Génération du pdf
@ -643,8 +619,10 @@ class EvaluationController extends Zend_Controller_Action
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('module'=>'file', 'controller'=>'index',
'action'=>'customrapport', 'q'=>basename($pdfFile)), 'default', true).'">Télécharger</a></center>';
'<a target="_blank" href="'.$this->view->url(
array('controller'=>'fichier',
'action'=>'customrapport',
'fichier'=>basename($pdfFile)), 'default', true).'">Télécharger</a></center>';
} else {
echo "Erreur lors de la génération du PDF.";
}
@ -839,7 +817,7 @@ class EvaluationController extends Zend_Controller_Action
"<pre>".print_r($InfoEnq, 1)."</pre>";
$mail = new Scores_Mail_Method();
$mail->setFromKey('supportdev');
$mail->setFromKey('production');
$mail->addToKey('support');
$mail->setSubject($sujet);
$mail->setBodyHtml($texte);
@ -910,10 +888,9 @@ class EvaluationController extends Zend_Controller_Action
'</body>'.
'</xmlrequest>';
$date = date('Ymd');
$url = 'https://www.creditsafe.fr/getdata/service/CSFRServices.asmx/GetData?RequestXmlStr='.$req;
$c = Zend_Registry::get('config');
$file = $c->profil->path->shared.'/creditsafe/'.$this->siret.'.xml';
$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);
@ -1008,12 +985,12 @@ class EvaluationController extends Zend_Controller_Action
'Utilisateur='.$login;
$mail->setBodyText($texte);
$mail->setFromKey('supportdev');
$mail->setFromKey('contact');
$mail->addToKey('contact');
$mail->execute();
$c = Zend_Registry::get('config');
$path = $c->profil->path->shared.'/persist/log';
$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");
@ -1048,11 +1025,11 @@ class EvaluationController extends Zend_Controller_Action
require_once 'Scores/RapportComment.php';
$rapportComment = new RapportComment($siren, $this->id,
$infos->Indiscore->tabCommentaires->item,
$infos->RatiosInfos,
$infos->RatiosBilansInfos,
$infos->RatiosSecteur,
$infos->Indiscore->tabVariables
$infos->Indiscore->tabCommentaires->item,
$infos->RatiosInfos,
$infos->RatiosBilansInfos,
$infos->RatiosSecteur,
$infos->Indiscore->tabVariables
);
$this->view->assign('comment',$rapportComment->out());
@ -1062,35 +1039,4 @@ class EvaluationController extends Zend_Controller_Action
$this->view->assign('raisonSociale', $sessionEntreprise->getRaisonSociale());
$this->view->assign('exportObjet', $infos);
}
public function cadastreAction()
{
$this->view->headTitle()->prepend("Cadastre");
$this->view->headTitle()->prepend("Siret ".$this->siret);
$request = $this->getRequest();
$sessionEntreprise = new Scores_Session_Entreprise($this->siret, $this->id);
$siren = substr($this->siret,0,9);
$ws = new Scores_Ws_Client('entreprise', '0.9');
$params = new stdClass();
$params->companyId = $siren;
try {
$response = $ws->getCadastrePatrimoine($params);
if ($response === false) {
$this->forward('soap', 'error');
}
$this->view->List = $response->item;
} catch (Exception $e) {
$this->view->MsgTxt = $e->getMessage();
}
$this->view->assign('siret', $this->siret);
$this->view->assign('id', $this->id);
$this->view->assign('siren', $siren);
$this->view->assign('raisonSociale', $sessionEntreprise->getRaisonSociale());
}
}

View File

@ -0,0 +1,487 @@
<?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 format 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

@ -5,18 +5,8 @@ class FinanceController extends Zend_Controller_Action
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');
@ -182,10 +172,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 +191,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";
}
@ -444,7 +434,7 @@ class FinanceController extends Zend_Controller_Action
$dateCloture = $request->getParam('dateCloture');
$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 +447,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 +630,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 +677,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);
@ -746,7 +736,7 @@ class FinanceController extends Zend_Controller_Action
if ($result === false) {
$this->view->msg = "Erreur lors de l'enregistrement des informations";
} else {
$this->logger->info(print_r($result,1));
Zend_Registry::get('firebug')->info($result);
$this->view->ref = strtoupper($result);
$this->view->fileref = $params['siren'] . '_' . $params['format'] . '_' .
substr($params['dateCloture'],6,4) . substr($params['dateCloture'],3,2) .
@ -793,7 +783,7 @@ class FinanceController extends Zend_Controller_Action
if ( in_array($extension, $extValide) ) {
$name = $fileref.'.'.$extension;
$c = Zend_Registry::get('config');
$file = $c->profil->path->shared.'/persist/bilanclient/'.$name;
$file = realpath($c->profil->path->data).'/bilanclient/'.$name;
if ( move_uploaded_file($tmp_name, $file) ) {
$ws = new Scores_Ws_Client('order', '0.1');
$parameters = new stdClass();
@ -850,9 +840,8 @@ class FinanceController extends Zend_Controller_Action
$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('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;
@ -942,6 +931,8 @@ class FinanceController extends Zend_Controller_Action
$request = $this->getRequest();
$unite = $request->getParam('unit','K');
$entreprise = new Scores_Session_Entreprise($this->siret, $this->id);
$ws = new WsScores();
// Récupération de la date
$dateAndType = $request->getParam('date', $defaultTypeBilan.$defaultDateExercice);
@ -952,51 +943,38 @@ class FinanceController extends Zend_Controller_Action
$date = substr($dateAndType, 1);
// 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), $date, $type, true);
if ($infos === false) $this->forward('soap', 'error');
// Error
if ($infos === false) {
$this->forward('soap', 'error');
}
// Formatage de la liasse
$infoLiasse = new Scores_Finance_Liasse($infos, $unite);
$this->view->assign('dateCloture', $infoLiasse->getInfo('dateCloture'));
$this->view->assign('dateCloturePre', $infoLiasse->getInfo('dateCloturePre'));
// 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'));
$date = new Zend_Date($infoLiasse->getInfo('dateCloture'), 'yyyyMMdd');
$this->view->assign('dateClotureD', $date->toString('dd/MM/yyyy'));
$date = new Zend_Date($infoLiasse->getInfo('dateCloture'), 'yyyyMMdd');
$this->view->assign('dateClotureD', $date->toString('dd/MM/yyyy'));
$dateCloturePre = $infoLiasse->getInfo('dateCloturePre');
if ($dateCloturePre == '') {
$this->view->assign('dateCloturePreD', '-');
} else {
$date = new Zend_Date($dateCloturePre, 'yyyyMMdd');
$this->view->assign('dateCloturePreD', $date->toString('dd/MM/yyyy'));
}
$this->view->assign('dureesMois', $infoLiasse->getInfo('dureeMois'));
$this->view->assign('dureesMoisPre', $infoLiasse->getInfo('dureeMoisPre'));
$this->view->assign('date', $date);
$this->view->assign('champType', $type);
$this->view->assign('liasse', $infoLiasse->getPostes());
$this->view->assign('ancres', $ancres[$type]);
} catch (Exception $e) {
$this->view->msg = $e->getMessage();
$dateCloturePre = $infoLiasse->getInfo('dateCloturePre');
if ( $dateCloturePre == '' ) {
$this->view->assign('dateCloturePreD', '-');
} else {
$date = new Zend_Date($dateCloturePre, 'yyyyMMdd');
$this->view->assign('dateCloturePreD', $date->toString('dd/MM/yyyy'));
}
$this->view->assign('dureesMois', $infoLiasse->getInfo('dureeMois'));
$this->view->assign('dureesMoisPre', $infoLiasse->getInfo('dureeMoisPre'));
$this->view->assign('date', $date);
$this->view->assign('champType', $type);
$this->view->assign('liasse', $infoLiasse->getPostes());
$this->view->assign('ancres', $ancres[$type]);
//Gestion export de la liasse au format XLS
if ( $user->checkPerm('liassexls') && in_array($type,array('C', 'N', 'S')) ) {
if ( $user->checkPerm('liassexls') & in_array($type,array('C', 'N', 'S')) ) {
$this->view->assign('exportxls', true);
}
}
$this->view->assign('id', $id);
@ -1065,16 +1043,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);
}
/**

View File

@ -40,18 +40,9 @@ 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');
@ -418,7 +409,7 @@ class GiantController extends Zend_Controller_Action
{
$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$this->theme->pathScript.'/giant.js', 'text/javascript');
$auth = Zend_Auth::getInstance();
$identity = $auth->getIdentity();
$result = $auth->getStorage()->read($identity);

View File

@ -5,18 +5,8 @@ class IdentiteController extends Zend_Controller_Action
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');
@ -157,7 +147,6 @@ class IdentiteController extends Zend_Controller_Action
'Isin',
'Capitalisation',
'NumRC',
'NumRM',
'AutreId',
'Actif',
'SituationJuridique',
@ -181,7 +170,6 @@ class IdentiteController extends Zend_Controller_Action
'Groupe',
'ActiviteEn',
'ActiviteEt',
'ActiviteArtisanale',
'Naf4',
'Nace',
'NatureActivite',
@ -407,8 +395,6 @@ class IdentiteController extends Zend_Controller_Action
}
} else {
$pageTotal = $pageCurrent = 1;
$pagePrev = 1;
$pageNext = 1;
}
$this->view->assign('PageTotal', $pageTotal);
$this->view->assign('PagePrev', $pagePrev);
@ -443,7 +429,7 @@ class IdentiteController extends Zend_Controller_Action
$this->view->AuthorizeGeocode = $userAccessEdition;
// --- Gestion source
$mapSource = 'openstreetmap';
$mapSource = 'google';
if ($mapSource == 'google') {
$this->view->headScript()->appendFile('http://maps.google.com/maps/api/js?sensor=false', 'text/javascript');
}
@ -467,7 +453,7 @@ class IdentiteController extends Zend_Controller_Action
$ws = new WsScores();
$infos = $ws->getEtablissementsGeo($siren, $actif, $position, $nbAffichage);
$this->logger->info(print_r($infos,1));
Zend_Registry::get('firebug')->info($infos);
if ($infos === false) $this->forward('soap', 'error');
$etabs = $infos->result->item;
@ -511,20 +497,20 @@ class IdentiteController extends Zend_Controller_Action
$iconeMarqueur = $this->iconeDuMarqueur($etab->NafEtab, $etab->Siege, $etab->Actif);
$icone = 'etab1.png';
$icone = '';
if ( !empty($iconeMarqueur) ) {
$icone = $iconeMarqueur;
$icone = 'http://'.$_SERVER['SERVER_NAME'].'/themes/default/images/maps/'.$iconeMarqueur;
}
$gps = array();
if ( floatval($etab->GeoLatitude) != 0 && floatval($etab->GeoLongitude) != 0 ) {
$gps = array(
'lat' => $etab->GeoLatitude*1,
'lon' => $etab->GeoLongitude*1,
'lat' => $etab->GeoLatitude,
'lon' => $etab->GeoLongitude,
);
}
$marks[] = array(
'siret' => $siren.' '.$etab->Nic,
'siret' => $siren.$etab->Nic,
'address' => $adresse,
'title' => $titre,
'text' => $texte,
@ -533,7 +519,7 @@ class IdentiteController extends Zend_Controller_Action
'gps' => $gps,
);
}
$this->logger->info(print_r($marks,1));
Zend_Registry::get('firebug')->info($marks);
}
$this->view->assign('marks', json_encode($marks));
}
@ -1083,7 +1069,7 @@ class IdentiteController extends Zend_Controller_Action
$ws = new WsScores();
$result = $ws->getLienRef($id);
$this->logger->info(print_r($result,1));
Zend_Registry::get('firebug')->info($result);
$this->view->assign('result', $result);
$this->view->assign('idFiche', $id);
@ -1173,8 +1159,6 @@ class IdentiteController extends Zend_Controller_Action
}
} else {
$pageTotal = $pageCurrent = 1;
$pagePrev = 1;
$pageNext = 1;
}
$this->view->assign('PageTotal', $pageTotal);
$this->view->assign('PagePrev', $pagePrev);
@ -1236,55 +1220,34 @@ class IdentiteController extends Zend_Controller_Action
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
// ==> Start
$avis = new Scores_Insee_AvisSituation($this->siret);
// --- En environement de preprod, on envoi sur le site
if (APPLICATION_ENV == 'staging') {
$this->redirect('http://avis-situation-sirene.insee.fr/');
}
// --- Téléchargement du fichier et distribution
else {
$avis = new Scores_Insee_AvisSituation($this->siret);
if ( !$avis->erreur() ) {
$avis->erreurcpt('raz');
$file = $avis->get();
if ($file === false) {
$avis->erreurcpt('plus');
echo $avis->erreurmsg();
} else {
// --- Envoi du fichier sur la sortie standard
$content_type = 'application/pdf';
if ( file_exists($file) ) {
$ws = new WsScores();
$ws->setLog('avis_situation', $this->siret, 0, '');
$modules = array(); //apache_get_modules();
if (in_array('mod_xsendfile', $modules)) {
header ('X-Sendfile: ' . $file);
header ('Content-Type: ' . $content_type);
header ('Content-Disposition: attachment; filename="' . $content_type . '"');
exit;
} else {
ini_set('zlib.output_compression', '0');
header('Content-Transfer-Encoding: none');
header('Content-Type: ' . $content_type.'');
header('Content-Length: ' . filesize($file));
header('Content-MD5: ' . base64_encode(md5_file($file)));
header('Content-Disposition: attachment; filename="' . basename($file) . '"');
header('Cache-Control: private, max-age=0, must-revalidate');
header('Pragma: public');
readfile($file);
exit;
}
} else {
echo "Impossible de charger le fichier";
}
}
} else {
if ($avis->nberreur()==5){
$avis->mailerreur();
}
$avis->erreurcpt('plus');
echo $avis->erreurmsg();
}
if (!$avis->erreur()){
$avis->erreurcpt('raz');
$body = $avis->get('pdf', 1);
if($body !== false) {
header("Pragma: public");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: must-revalidate");
header("Content-type: application/pdf");
header("Content-Length: ".strlen($body));
header('Content-disposition: inline; filename="avis-'.$this->siret.'.pdf"');
header("Accept-Ranges: ".strlen($body));
echo $body;
$ws = new WsScores();
$ws->setLog('avis_situation', $this->siret, 0, '');
} else {
$avis->erreurcpt('plus');
echo $avis->erreurmsg();
}
} else {
if ($avis->nberreur()==5){
$avis->mailerreur();
}
$avis->erreurcpt('plus');
echo $avis->erreurmsg();
}
}
@ -1352,9 +1315,9 @@ class IdentiteController extends Zend_Controller_Action
//Corriger la voie pour Mappy
$adresse.= ' '.strtr($infos->AdresseVoie, array(
'R' => 'RUE',
'AV' => 'AVENUE',
'RLE' => 'RUELLE',
'R' => 'RUE',
'AV' => 'AVENUE',
'RLE' => 'RUELLE',
));
$adresse.= ' '.$infos->AdresseRue;
@ -1382,10 +1345,8 @@ class IdentiteController extends Zend_Controller_Action
public function streetviewAction()
{
$request = $this->getRequest();
$num = $request->getParam('heading', 0);
// --- Prepare information
if ($request->isXmlHttpRequest()) {
if ( $request->isXmlHttpRequest() ) {
$this->_helper->layout()->disableLayout();
$siret = $request->getParam('siret');
$lat = $request->getParam('lat', '');
@ -1404,9 +1365,9 @@ class IdentiteController extends Zend_Controller_Action
//Corriger la voie
$adresse.= strtr($infos->AdresseVoie, array(
'R' => 'RUE',
'AV' => 'AVENUE',
'RLE' => 'RUELLE',
'R' => 'RUE',
'AV' => 'AVENUE',
'RLE' => 'RUELLE',
));
$adresse.= ' '.$infos->AdresseRue;
@ -1420,57 +1381,48 @@ class IdentiteController extends Zend_Controller_Action
}
}
$user = new Scores_Utilisateur();
$this->view->AuthorizeUpdate = $user->checkModeEdition();
$num = $request->getParam('heading', 0);
$this->view->assign('siret', $siret);
$this->view->assign('lat', $lat);
$this->view->assign('lon', $lon);
$file = false;
$mode = 'address';
$this->view->assign('streetviewMode', $mode);
if (intval($siret) < 1000) {
$this->view->assign('url', false);
} else {
$streetview = new Scores_Google_Streetview($siret);
if ( $mode == 'address' && $adresse !== null ) {
$streetview = new Scores_Google_Streetview($siret);
$streetview->setLocationTxt($adresse);
$url = $streetview->serveUrl();
$this->view->assign('url', $url);
}
// --- Affichage GPS
if ($lat != '' && $lon != '') {
$this->view->assign('streetviewMode', 'GPS');
$deg = $streetview->getNumDeg();
$nbImg = count($deg);
$pagePrec = $num-1;
if ($pagePrec<=0) {
$pagePrec = $nbImg-1;
}
$pageSuiv = $num+1;
if($pageSuiv>=$nbImg) {
$pageSuiv = 0;
}
$this->view->assign('pagePrec', $pagePrec);
$this->view->assign('pageSuiv', $pageSuiv);
if ( $mode == 'GPS' && intval($siret)>100 && $lat != '' && $lon != '' ) {
$streetview = new Scores_Google_Streetview($siret);
$deg = $streetview->getNumDeg();
$nbImg = count($deg);
$pagePrec = $num-1;
if ($pagePrec<=0) {
$pagePrec = $nbImg-1;
}
$pageSuiv = $num+1;
if($pageSuiv>=$nbImg) {
$pageSuiv = 0;
}
$this->view->assign('pagePrec', $pagePrec);
$this->view->assign('pageSuiv', $pageSuiv);
$streetview->setLocationGeo($lat, $lon);
$heading = $deg[$num];
$streetview->setHeading($heading);
}
// --- Fallback adresse
elseif (!empty($adresse)) {
$this->view->assign('streetviewMode', 'ADDRESS');
$streetview->setLocationTxt($adresse);
}
$streetview->setLocationGeo( $lat, $lon );
$heading = $deg[$num];
$streetview->setHeading($heading);
$img = $streetview->serveImg();
if ( $img!==false ) {
$url = '/fichier/streetview/'.$img;
$this->view->assign('url', $url);
}
}
$file = $streetview->pathImg();
if ($file !== false) {
$this->view->assign('url', '/file/streetview/img/q/'.$streetview->fileImg());
$this->view->assign('cache', 1);
$this->view->assign('saveas', '');
} else {
$this->view->assign('url', $streetview->urlImg());
$this->view->assign('cache', 0);
$this->view->assign('saveas', $streetview->fileImg());
}
}
}
/**
@ -1499,9 +1451,10 @@ class IdentiteController extends Zend_Controller_Action
$ws = new WsScores();
$result = $ws->getGroupesArbo($siren, $pctMin, 10, $stopAtIsin);
if ( $result!==false ) {
$infos = json_decode($result, true);
$this->logger->info(print_r($infos,1));
Zend_Registry::get('firebug')->info($infos);
if (count($infos)>0) {
$name = $infos['name'];
@ -1511,8 +1464,8 @@ class IdentiteController extends Zend_Controller_Action
$structure = array();
$structure[] = array(
'text' => $name,
'state' => array('opened'=>true),
'data' => $name,
'state' => 'open',
'children' => $this->groupesArboChildren($infos['children'], $siren),
);
$this->view->assign('data', json_encode($structure));
@ -1549,7 +1502,7 @@ class IdentiteController extends Zend_Controller_Action
if ( $result!==false ) {
$infos = json_decode($result, true);
$this->logger->info(print_r($infos,1));
Zend_Registry::get('firebug')->info($infos);
if (count($infos)>0) {
$sirenTxt = substr($infos['siren'],0,3).' '.substr($infos['siren'],3,3).' '.substr($infos['siren'],6,3);
@ -1563,8 +1516,8 @@ class IdentiteController extends Zend_Controller_Action
$structure = array();
$structure[] = array(
'text' => $name,
'state' => array('opened'=>true),
'data' => $name,
'state' => 'open',
'children' => $this->groupesArboChildren($infos['children'], $siren),
);
$this->view->assign('data', json_encode($structure));
@ -1598,8 +1551,8 @@ class IdentiteController extends Zend_Controller_Action
$name.= ' - '.$item['pmin'].'%';
$structure = array(
'text' => $name,
'state' => array('opened'=>true),
'data' => $name,
'state' => 'open',
);
if ($item['siren']==$detectSiren) {
@ -1666,7 +1619,7 @@ class IdentiteController extends Zend_Controller_Action
$ws = new WsScores();
$result = $ws->getContactEt($companyId, $filter);
$this->logger->info(print_r($result,1));
Zend_Registry::get('firebug')->info($result);
if ($result->nbReponses>0) {
$this->view->assign('contacts', $result->result->item);
@ -1730,7 +1683,7 @@ class IdentiteController extends Zend_Controller_Action
$ws = new WsScores();
$result = $ws->getEntrepriseAvisRncs($siren);
$this->logger->info(print_r($result,1));
Zend_Registry::get('firebug')->info($result);
if ( $result === false ) {
$this->view->assign('error', true);
@ -1909,7 +1862,7 @@ class IdentiteController extends Zend_Controller_Action
$ws = new WsScores();
$result = $ws->getEntrepriseAvisRncs($siren);
$this->logger->info(print_r($result,1));
Zend_Registry::get('firebug')->info($result);
if ( $result === false ) {
$this->view->assign('error', true);
@ -2068,7 +2021,7 @@ class IdentiteController extends Zend_Controller_Action
// --- Création du PDF
$c = Zend_Registry::get('config');
$filepdf = $c->profil->path->shared.'/files/avisrncs-'.$siren.'.pdf';
$filepdf = $c->profil->path->files.'/avisrncs-'.$siren.'.pdf';
try {
$pdf = new Scores_Pdf_Tcpdf();
$pdf->SetBackgroundImage('libs/modeles/avisrncs.jpg');
@ -2326,11 +2279,10 @@ class IdentiteController extends Zend_Controller_Action
$this->view->assign('adresse', $session->getAdresse());
if ($this->view->hasRight) {
$source = str_pad($session->getSource(), 3, '0', STR_PAD_LEFT);
$sourceId = str_pad($session->getSourceId(), 17, '0', STR_PAD_LEFT);
$ws = new Scores_Ws_Client('entreprise', '0.9');
$ws = new Scores_Ws_Client('entreprise', '0.9');
$params = new stdClass();
$params->companyId = $source . $sourceId;
$params->companyId = $this->siret;
$params->type = 'siren';
$response = $ws->getRNVP($params);
if ($response === false) {
$this->view->Error = true;

View File

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

View File

@ -5,18 +5,8 @@ class JuridiqueController extends Zend_Controller_Action
protected $siret = null;
protected $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');
@ -35,22 +25,23 @@ class JuridiqueController extends Zend_Controller_Action
$request = $this->getRequest();
$autrePage = $request->getParam('apage');
$vue = $request->getParam('vue', 'bodacc');
$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;
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) {
if ( $fj>9000 && $fj<9999 && intval($siren)==0 ) {
$vue = 'asso';
}
@ -60,59 +51,51 @@ class JuridiqueController extends Zend_Controller_Action
$this->view->assign('raisonSociale', $session->getRaisonSociale());
$this->view->assign('AutrePage', $autrePage);
if ($session->getSource() == '006' || $session->getSourceId() == '007') {
if ($session->getSource()=='006' || $session->getSourceId()=='007') {
$this->view->assign('AutreSource', true);
} else {
$this->view->assign('vue', $vue);
// Pagination
//Pagination
$page = $request->getParam('page', 1);
if ($page <= 0) {
$page = 1;
}
if ( $page <= 0 ) $page = 1;
$nbAffichage = 20;
$position = ($page - 1) * $nbAffichage;
$position = ($page - 1 ) * $nbAffichage;
$ws = new WsScores();
switch ($vue) {
switch ( $vue ) {
case 'bodacc':
case 'abod':
default:
if(intval($siren)==0) {
$idAnn = $session->getSourceId();
}
$infos = $ws->getAnnoncesLegales($siren, $idAnn, null, $position, $nbAffichage);
break;
case 'balo':
$infos = $ws->getAnnoncesBalo($siren, $idAnn, null, $position, $nbAffichage);
break;
case 'asso':
if (intval($siren) == 0 && substr($session->getAutreId(),0,1) == 'W') {
if ( intval($siren)==0 && substr($session->getAutreId(),0,1)=='W' ) {
$infos = $ws->getAnnoncesAsso($session->getAutreId(), $idAnn, null, $position, $nbAffichage);
} elseif (intval($siren) != 0) {
} 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));
$infos = $ws->getAnnoncesAsso($siren, $idAnn, null, $position, $nbAffichage);
}
break;
case 'bomp':
$filtre = $request->getParam('filtre', 'A');
$filtre = $request->getParam('filtre', null);
$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');
}
if ($infos === false) $this->_forward('soap', 'error');
Zend_Registry::get('firebug')->info($infos);
require_once 'Scores/Annonces.php';
$objAnnonces = new Annonces($infos->result->item);
@ -125,330 +108,120 @@ class JuridiqueController extends Zend_Controller_Action
$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;
//Affichage pour une annonce
if (!empty($idAnn) && in_array($vue, array('bodacc', 'abod', 'balo', 'asso', 'bomp')) ) {
if ( $user->checkModeEdition() ){
$this->view->headScript()->appendFile($this->theme->pathScript.'/saisieannonces.js', 'text/javascript');
}
$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);
$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('nbReponses', empty($nbReponses) ? 0 : $nbReponses);
$this->view->assign('nbReponsesTotal', empty($nbReponsesTotal) ? 0 : $nbReponsesTotal);
$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);
$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');
}
}
if ($request->getParam('q')=='ajax')
{
$this->_helper->layout()->disableLayout();
//$this->_helper->viewRenderer->setNoRender(true);
$this->renderScript('juridique/annonce-ajax.phtml');
} else {
/**
* Affichage d'une annonce
*/
public function annonceAction()
{
$request = $this->getRequest();
$this->view->assign('PageCurrent', $page);
$autrePage = $request->getParam('apage');
//Définir url pour téléchargement pdf
if ( in_array($annonce['Code'], array('BODA', 'BODB', 'BODC')) && intval($annonce['Annee'])>=2008) {
$lienBodacc = $this->view->url(array(
'controller' => 'juridique',
'action' => 'bodaccpdf',
'type' => substr($annonce['Code'],3,1),
'annee' => $annonce['Annee'],
'num' => $annonce['Num'],
), 'default', true);
$this->view->assign('lienBodacc', $lienBodacc);
}
$idAnn = $request->getParam('idAnn', null);
$siren = substr($this->siret, 0,9);
$this->renderScript('juridique/annonce.phtml');
}
$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';
}
// --- Affichage pour la liste des annonces
} else {
$page = $request->getParam('page');
$this->view->assign('page', $page);
// --- 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);
}
$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);
// ---- 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);
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');
}
$this->view->assign('nbReponses', empty($nbReponses) ? 0 : $nbReponses);
$this->view->assign('nbReponsesTotal', empty($nbReponsesTotal) ? 0 : $nbReponsesTotal);
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();
}
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($this->theme->pathScript.'/annonces.js', 'text/javascript');
}
}
}
/**
@ -528,7 +301,7 @@ class JuridiqueController extends Zend_Controller_Action
if ($infos === false) $this->_forward('soap', 'error');
$competences = $infos->result->item;
$this->logger->info(print_r($infos,1));
Zend_Registry::get('firebug')->info($infos);
if( $type=='tri' || $type=='cfe' ) {
$i=0;
foreach($competences as $comp){
@ -563,7 +336,7 @@ class JuridiqueController extends Zend_Controller_Action
$ws = new WsScores();
$infos = $ws->getListeConventions($siren);
$conventions = $infos->result->item;
$this->logger->info(print_r($conventions,1));
Zend_Registry::get('firebug')->info($conventions);
$this->view->assign('conventions', $conventions);
$this->view->assign('exportObjet', $infos);
}
@ -593,7 +366,7 @@ class JuridiqueController extends Zend_Controller_Action
$this->view->assign('marques', $marques);
$this->view->assign('idObject', $idObject);
$this->view->assign('exportObjet', $marques);
$this->logger->info(print_r($infos,1));
Zend_Registry::get('firebug')->info($infos);
}
/**
@ -610,20 +383,20 @@ class JuridiqueController extends Zend_Controller_Action
exit;
}
$c = Zend_Registry::get('config');
$directory = $c->profil->path->shared.'/persist/marques';
$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;
$this->logger->info($cmd);
Zend_Registry::get('firebug')->info($cmd);
$result = exec($cmd);
$this->logger->info($result);
Zend_Registry::get('firebug')->info($result);
}
//On vérfie que le fichier existe après le téléchargement
if(file_exists($directory.'/'.$file) && filesize($directory.'/'.$file)>0) {
$href = $this->view->url(array('module'=>'file', 'controller'=>'index', 'action'=>'marque', 'q'=>$file), 'default', true);
$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.';
@ -631,45 +404,44 @@ class JuridiqueController extends Zend_Controller_Action
}
/**
* 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);
$annee = $request->getParam('annee');
$num = $request->getParam('num');
$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";
//$num doit être retraité pour être sur 4 position
$c = strlen($num);
for($i=0;$i<4-$c;$i++){
$num = '0'.$num;
}
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");
$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('module'=>'file', 'controller'=>'bodacc',
'action'=>'actual', 'q' => basename($file)), 'default', true);
$href = $this->view->url(array(
'controller' => 'fichier',
'action' => 'bodacc',
'fichier' => 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();
@ -679,7 +451,7 @@ class JuridiqueController extends Zend_Controller_Action
$ws = new WsScores();
$result = $ws->getAnnoncesNum($siren);
$this->logger->info(print_r($result,1));
Zend_Registry::get('firebug')->info($result);
$numWS = array();
if (count($result->item)>0) {
foreach ($result->item as $item) {

View File

@ -4,23 +4,13 @@ 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

@ -54,18 +54,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');
@ -86,13 +76,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 {

View File

@ -3,18 +3,8 @@ 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');
}

View File

@ -18,18 +18,8 @@ class PiecesController extends Zend_Controller_Action
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');
@ -100,7 +90,7 @@ class PiecesController extends Zend_Controller_Action
} else {
$this->view->ref = strtoupper($result);
}
} catch (Exception $e) {
} catch (Zend_Db_Exception $e) {
$this->view->msg = $e->getMessage();
}
@ -141,7 +131,7 @@ class PiecesController extends Zend_Controller_Action
//Affichage des actes disponible
$ws = new WsScores();
$responses = $ws->getPiecesActes($siren);
$this->logger->info(print_r($responses,1));
Zend_Registry::get('firebug')->info($responses);
/*
* Construire la réponse pour affichage
@ -290,7 +280,7 @@ class PiecesController extends Zend_Controller_Action
//Catégorie Juridique
$cj = $session->getFormeJuridique();
if( in_array($cj, $this->association_cj) ) {
$this->forward('associationbilans');
$this->_forward('associationbilans');
} else {
$request = $this->getRequest();
$siren = substr($this->siret,0,9);
@ -499,9 +489,11 @@ class PiecesController extends Zend_Controller_Action
if ( $stream->isSuccessful() && substr($stream->getBody(),0,4)=='%PDF' ) {
$c = Zend_Registry::get('config');
$file = 'bilan-'.$siren.'-'.$type.'-'.$dateCloture.'.pdf';
if (copy($stream->getStreamName(), $c->profil->path->shared . '/files/' . $file)) {
$this->view->assign('url', $this->view->url(array('module'=>'file',
'controller'=>'greffe', 'action'=>'bilan', 'q'=>$file), 'default', true));
if (copy($stream->getStreamName(), $c->profil->path->files . '/' . $file)) {
$this->view->assign('url', $this->view->url(array(
'controller' => 'fichier',
'action' => 'greffe',
), 'default', true).'/'.$file);
} else {
$this->view->assign('msg', "Impossible de distribuer le fichier.");
}
@ -509,7 +501,7 @@ class PiecesController extends Zend_Controller_Action
$this->view->assign('msg', "Erreur lors du téléchargement du fichier.");
}
} catch (Zend_Http_Client_Exception $e) {
$this->logger->info('HTTP Exception : '.$e->getMessage());
Zend_Registry::get('firebug')->info('HTTP Exception : '.$e->getMessage());
$this->view->assign('msg', "Erreur lors du téléchargement du fichier.");
}
}
@ -627,9 +619,11 @@ class PiecesController extends Zend_Controller_Action
if ( $stream->isSuccessful() && substr($stream->getBody(),0,4)=='%PDF' ) {
$c = Zend_Registry::get('config');
$file = 'acte-'.$siren.'-'.$depotNum.'-'.$acteNum.'.pdf';
if (copy($stream->getStreamName(), $c->profil->path->shared . '/files/' . $file)) {
$this->view->assign('url', $this->view->url(array('module'=>'file',
'controller'=>'greffe', 'action'=>'acte', 'q'=>$file), 'default', true));
if (copy($stream->getStreamName(), $c->profil->path->files . '/' . $file)) {
$this->view->assign('url', $this->view->url(array(
'controller' => 'fichier',
'action' => 'greffe',
), 'default', true).'/'.$file);
} else {
$this->view->assign('msg', "Impossible de distribuer le fichier.");
}
@ -637,7 +631,7 @@ class PiecesController extends Zend_Controller_Action
$this->view->assign('msg', "Erreur lors du téléchargement du fichier.");
}
} catch (Zend_Http_Client_Exception $e) {
$this->logger->info('HTTP Exception : '.$e->getMessage());
Zend_Registry::get('firebug')->info('HTTP Exception : '.$e->getMessage());
$this->view->assign('msg', "Erreur lors du téléchargement du fichier.");
}
}
@ -836,10 +830,10 @@ class PiecesController extends Zend_Controller_Action
$params->companyId = $siren;
$result = $ws->getAssoActes($params);
$actes = array();
$this->logger->info(print_r($result,1));
Zend_Registry::get('firebug')->info($result);
if (count($result->item) > 0) {
foreach ($result->item as $item) {
$this->logger->info(print_r($item,1));
Zend_Registry::get('firebug')->info($item);
if ( $user->checkPerm('actes') ) {
$href = $this->view->url(array('controller'=>'pieces', 'action'=>'associationacte',
'siren'=>$siren, 'date'=> $item->Date), 'default', true);
@ -860,6 +854,7 @@ class PiecesController extends Zend_Controller_Action
}
$this->view->assign('actes', $actes);
$this->view->assign('ModeEdition', $user->checkModeEdition());
$this->view->assign('email', $user->getEmail());
$this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret);
@ -898,9 +893,9 @@ class PiecesController extends Zend_Controller_Action
if ( $stream->isSuccessful() && substr($stream->getBody(),0,4)=='%PDF' ) {
$c = Zend_Registry::get('config');
$file = 'ST-'.$siren.'-'.$date.'.pdf';
if (copy($stream->getStreamName(), $c->profil->path->shared . '/files/' . $file)) {
$this->view->assign('url', $this->view->url(array('module'=>'file', 'controller'=>'greffe',
'action'=>'association', 'q'=>$file), 'default', true));
if (copy($stream->getStreamName(), $c->profil->path->files . '/' . $file)) {
$this->view->assign('url', $this->view->url(array('controller' => 'fichier',
'action' => 'greffe'), 'default', true).'/'.$file);
} else {
$this->view->assign('msg', "Impossible de distribuer le fichier.");
}
@ -908,7 +903,7 @@ class PiecesController extends Zend_Controller_Action
$this->view->assign('msg', "Erreur lors du téléchargement du fichier.");
}
} catch (Zend_Http_Client_Exception $e) {
$this->logger->info('HTTP Exception : '.$e->getMessage());
Zend_Registry::get('firebug')->info('HTTP Exception : '.$e->getMessage());
$this->view->assign('msg', "Erreur lors du téléchargement du fichier.");
}
@ -936,7 +931,7 @@ class PiecesController extends Zend_Controller_Action
$ws = new WsScores();
$reponse = $ws->getPiecesBilans($siren);
$listBilans = $reponse->result->item;
$this->logger->info(print_r($listBilans,1));
Zend_Registry::get('firebug')->info($listBilans);
$decision = '';
foreach ( $listBilans as $item) {
@ -1007,9 +1002,11 @@ class PiecesController extends Zend_Controller_Action
if ( $stream->isSuccessful() && substr($stream->getBody(),0,4)=='%PDF' ) {
$c = Zend_Registry::get('config');
$file = 'bilan-'.$siren.'-'.$type.'-'.$dateCloture.'.pdf';
if (copy($stream->getStreamName(), $c->profil->path->shared . '/files/' . $file)) {
$this->view->assign('url', $this->view->url(array('module'=>'file', 'controller'=>'greffe',
'action' => 'association', 'q'=>$file), 'default', true));
if (copy($stream->getStreamName(), $c->profil->path->files . '/' . $file)) {
$this->view->assign('url', $this->view->url(array(
'controller' => 'fichier',
'action' => 'greffe',
), 'default', true).'/'.$file);
} else {
$this->view->assign('msg', "Impossible de distribuer le fichier.");
}
@ -1017,7 +1014,7 @@ class PiecesController extends Zend_Controller_Action
$this->view->assign('msg', "Erreur lors du téléchargement du fichier.");
}
} catch (Zend_Http_Client_Exception $e) {
$this->logger->info('HTTP Exception : '.$e->getMessage());
Zend_Registry::get('firebug')->info('HTTP Exception : '.$e->getMessage());
$this->view->assign('msg', "Erreur lors du téléchargement du fichier.");
}
@ -1054,13 +1051,13 @@ class PiecesController extends Zend_Controller_Action
case 'T':
$c = Zend_Registry::get('config');
$path = $c->profil->path->shared. '/files/';
$path = $c->profil->path->files. '/';
//Le fichier est déjà présent sur le serveur
if ( file_exists($path.'kbis-'.$siren.'.pdf')
&& date('Ymd', filemtime($path.'kbis-'.$siren.'.pdf'))==date('Ymd')
&& filesize($path.'kbis-'.$siren.'.pdf')>2000 ) {
$msg = '<u><a title="Cliquez ici pour visualiser le kbis" target="_blank" href="/file/greffe/kbis/q/kbis-'.$siren.'.pdf">Visualiser le Kbis <img src="/themes/default/images/interfaces/icone_pdf.gif"></a></u>';
$msg = '<u><a title="Cliquez ici pour visualiser le kbis" target="_blank" href="/fichier/kbis/kbis-'.$siren.'.pdf">Visualiser le Kbis <img src="/themes/default/images/interfaces/icone_pdf.gif"></a></u>';
$this->view->assign('message', $msg);
$this->view->assign('mode', $mode);
$ws->setLog('kbis', $siren, 0, 'direct');
@ -1081,7 +1078,7 @@ class PiecesController extends Zend_Controller_Action
$response = $client->request('GET');
//Ecriture du fichier sur le serveur en local
if ( $response->isSuccessful() && copy($response->getStreamName(), $path.'kbis-'.$siren.'.pdf') ) {
$msg = '<u><a title="Cliquez ici pour visualiser le kbis" target="_blank" href="/file/greffe/kbis/q/kbis-'.$siren.'.pdf">Visualiser le Kbis <img src="/themes/default/images/interfaces/icone_pdf.gif"></a></u>';
$msg = '<u><a title="Cliquez ici pour visualiser le kbis" target="_blank" href="/fichier/kbis/kbis-'.$siren.'.pdf">Visualiser le Kbis <img src="/themes/default/images/interfaces/icone_pdf.gif"></a></u>';
$this->view->assign('message', $msg);
$this->view->assign('mode', $mode);
}
@ -1214,53 +1211,32 @@ class PiecesController extends Zend_Controller_Action
}
/**
* Affiche les privilèges
* Affiche les privilèges en surveillance
*/
public function privilegesAction()
{
$request = $this->getRequest();
$type = $request->getParam('type', null);
$siren = substr($this->siret, 0, 9);
$detail = false;
if (!empty($type)){
$detail = true;
}
$session = new Scores_Session_Entreprise($this->siret, $this->id);
$ws = new WsScores();
if ($detail){
$infos = $ws->getPrivilegesDetail($siren, array($type));
$this->view->assign('detail', $detail);
} else {
$infos = $ws->getPrivilegesCumul($siren);
}
Zend_Registry::get('firebug')->info($infos);
$this->view->assign('privileges', $infos->result->item);
$this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale());
$ws = new Scores_Ws_Client('entreprise', '0.9');
$parameters = new stdClass();
$parameters->companyId = $siren;
$result = $ws->getPrivilegeList($parameters);
$this->view->assign('PrivilegesNb', $result->NbTotal);
$this->view->assign('PrivilegesMt', $result->MtTotal);
$this->view->assign('PrivilegesCumul', $result->Cumul->item);
$this->view->assign('Privileges', $result->List->item);
$user = new Scores_Utilisateur();
$this->view->assign('surveillance', $user->checkPerm('survpriv'));
}
/**
* Détail d'un privilege
*/
public function privilegedetailAction()
{
$request = $this->getRequest();
$id = $request->getParam('viewId');
$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 Scores_Ws_Client('entreprise', '0.9');
$parameters = new stdClass();
$parameters->companyId = $siren;
$parameters->id = $id;
$result = $ws->getPrivilegeDetail($parameters);
$this->view->assign('Privilege', $result);
}
}

View File

@ -3,18 +3,8 @@ 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');
}
@ -140,7 +130,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 +209,7 @@ class PrintController extends Zend_Controller_Action
}
$this->view->assign('controller', $elements['controller']);
$this->view->assign('action', $elements['action']);
$this->logger->info(print_r($elements['params'],1));
Zend_Registry::get('firebug')->info($elements['params']);
$this->view->assign('params', $elements['params']);
}
@ -239,7 +229,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,18 +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');
@ -223,8 +213,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)), 'default', true
),
);
}
@ -296,10 +289,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);
@ -409,7 +402,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' ) {
@ -806,8 +799,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 +920,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 ) {
@ -1208,7 +1199,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);

File diff suppressed because it is too large Load Diff

View File

@ -35,18 +35,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');
@ -118,7 +108,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', '');
@ -137,8 +126,6 @@ class SurveillanceController extends Zend_Controller_Action
}
} elseif (isset($page)) {
$this->redirect('surveillance/liste/page/'.$page);
} elseif (isset($q)) {
$this->redirect('surveillance/liste/q/'.$q);
} else {
$this->redirect('surveillance/liste');
}
@ -176,8 +163,8 @@ class SurveillanceController extends Zend_Controller_Action
// --- Vérification des emails
$emails = explode(';', $email);
$emailsValid = true;
foreach ( $emails as $e ) {
if ( !$validateur->isValid($e) ) {
foreach ( $emails as $email ) {
if ( !$validateur->isValid($email) ) {
$emailsValid = false;
break;
}
@ -252,7 +239,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';
@ -383,7 +370,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 +412,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);
@ -646,8 +631,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);
@ -716,7 +699,7 @@ class SurveillanceController extends Zend_Controller_Action
$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)) {
@ -988,7 +971,7 @@ 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;
@ -1155,60 +1138,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

@ -13,27 +13,17 @@ class TelechargementController extends Zend_Controller_Action
*/
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->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$c = Zend_Registry::get('config');
$this->path = $c->profil->path->shared.'/files';
$this->path = $c->profil->path->files;
require_once 'Scores/WsScores.php';
}
/**
* Vérifie ou télécharge le fichier sur une url
* @param string $url
@ -67,12 +57,12 @@ class TelechargementController extends Zend_Controller_Action
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;
@ -147,10 +137,9 @@ class TelechargementController extends Zend_Controller_Action
}
// --- 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>';
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>';
}
}
}
@ -168,11 +157,11 @@ class TelechargementController extends Zend_Controller_Action
// --- 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) ) {
@ -185,7 +174,7 @@ class TelechargementController extends Zend_Controller_Action
else {
$url = $request->getParam('url', '');
$file = $this->getFile($url);
// --- En attente
if ( $file === null ) {
echo '';
@ -196,12 +185,11 @@ class TelechargementController extends Zend_Controller_Action
}
// --- 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>';
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>';
}
}
}
@ -223,7 +211,7 @@ class TelechargementController extends Zend_Controller_Action
$ws = new WsScores();
$reponse = $ws->getPortefeuilleCsv($login, $idClient);
if ( !empty($reponse->result->Url) ) {
echo $reponse->result->Url;
} else {
@ -233,7 +221,7 @@ class TelechargementController extends Zend_Controller_Action
} else {
$url = $request->getParam('url', '');
$file = $this->getFile($url);
// --- En attente
if ( $file === null ) {
echo '';
@ -244,10 +232,9 @@ class TelechargementController extends Zend_Controller_Action
}
// --- 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>';
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>';
}
}
}
@ -268,7 +255,7 @@ class TelechargementController extends Zend_Controller_Action
$authinfo = '/login/'.$identity->username.'/hach/'.$identity->password;
$url = $host.$authinfo.'/q/'.$q;
$this->logger->info($url);
Zend_Registry::get('firebug')->info($url);
$file = $this->getFile($url, uniqid('histo-').'.pdf');
@ -283,9 +270,9 @@ class TelechargementController extends Zend_Controller_Action
// --- 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>';
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.";
}
@ -311,9 +298,9 @@ class TelechargementController extends Zend_Controller_Action
//Téléchargement
if( $url !== false) {
$this->logger->info($url);
Zend_Registry::get('firebug')->info($url);
$file = $this->getFile($url);
$this->logger->info('File:'.$this->path.'/'.$file);
Zend_Registry::get('firebug')->info('File:'.$this->path.'/'.$file);
// --- En attente
if ( $file === null ) {
echo '';
@ -325,9 +312,9 @@ class TelechargementController extends Zend_Controller_Action
// --- 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>';
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.";
}

View File

@ -28,18 +28,8 @@ class UserController extends Zend_Controller_Action
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');
@ -56,7 +46,7 @@ class UserController extends Zend_Controller_Action
$user = new Scores_Utilisateur();
if (!$user->checkPerm('MONPROFIL')){
$this->forward('perms', 'error');
$this->_forward('perms', 'error');
}
$this->view->assign('device_type', $user->getBrowserInfo()->mobile);
@ -101,10 +91,7 @@ class UserController extends Zend_Controller_Action
$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 !';
@ -192,19 +179,11 @@ class UserController extends Zend_Controller_Action
$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();
}
$reponse = $ws->getInfosLogin($parameters);
$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);
@ -480,24 +459,20 @@ class UserController extends Zend_Controller_Action
}
}
if (!empty($url) && $url!='/user/login' && $url!='/user/logout' && $url!='/localauth'){
$this->redirect($url);
$this->_redirect($url);
}
$this->redirect('/');
$this->_redirect('/');
}
//Auth error
else {
$this->view->message = '';
$this->logger->info(print_r($result));
Zend_Registry::get('firebug')->info($result);
foreach ($result->getMessages() as $message) {
$this->view->message.= $message."<br/>";
}
}
}
}
// Pas de validation du formulaire
else {
$this->logger->info('DISPLAY');
}
}
/**
@ -532,17 +507,6 @@ class UserController extends Zend_Controller_Action
}
}
/**
* 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
*/
@ -741,7 +705,7 @@ class UserController extends Zend_Controller_Action
$mail = new Scores_Mail_Method();
$mail->setSubject("Demande d'envoi des identifiants");
$mail->setBodyHtmlC($mailbody);
$mail->setFromKey('supportdev');
$mail->setFromKey('support');
$mail->addToKey('support');
$mail->setReplyTo($params['email']);
try {

View File

@ -4,18 +4,8 @@ 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');

View File

@ -11,7 +11,7 @@ p { margin:10px 0;}
div#content { float:none; width:auto;}
</style>
<script>
$(function(){
$(document).ready(function(){
$('input[type=checkbox][name=accept]').click(function(e){
$('form[name=cgu]').css('display', 'none');
$('#msgsave').css('display', 'block');

View File

@ -2,17 +2,16 @@
<div style="position:absolute;width:680px;top:5px;" class="ui-state-highlight ui-corner-all">
<p>
<span style="float:left;margin-right:0.3em;" class="ui-icon ui-icon-info"></span>
<strong>Nouveau !</strong>
<strong>Nouveau !</strong>
<?php $cpt = 0;?>
<?php foreach ( $this->nouveautes as $nouveaute) {?>
<a href="<?=$this->url(array('module'=>'file','controller'=>'index', 'action'=>'new',
'q'=>$nouveaute->fichier))?>" target="_blank">
<a href="<?=$this->url(array('controller'=>'fichier', 'action'=>'new', 'fichier'=>$nouveaute->fichier))?>" target="_blank">
<?=$nouveaute->intitule?></a>
<?php $cpt++;?>
<?php if ( $cpt < count($this->nouveautes) ) {?>,<?php }?>
<?php }?>
<br/>
<span style="font-size:10px;">Cliquez sur les intitulés pour consulter le document,
<span style="font-size:10px;">Cliquez sur les intitulés pour consulter le document,
ou <a href="<?=$this->url(array('controller'=>'aide', 'action'=>'newliste'))?>">ici</a> pour retrouver la liste des modifications</span>
</p>
</div>

View File

@ -17,8 +17,8 @@ table td { border:1px solid; padding:5px; }
<thead>
<tr>
<th>Date</th>
<th>Intitulé</th>
<th>Catégorie</th>
<th>Intitulé</th>
<th>Catégorie</th>
</tr>
</thead>
<tbody>
@ -27,11 +27,11 @@ table td { border:1px solid; padding:5px; }
<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">
<a href="<?=$this->url(array('controller'=>'fichier',
'action'=>'new', 'fichier'=>$nouveau->fichier))?>" target="_blank">
<?=$nouveau->intitule?></a>
</td>
<td><?=$nouveau->categorie?></td>
</td>
<td><?=$nouveau->categorie?></td>
</tr>
<?php }?>
<?php }?>

View File

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

View File

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

View File

@ -163,7 +163,7 @@ foreach ($this->listModulesFcc as $id => $module) {
</div>
<script>
$(function(){
$(document).ready(function(){
$('#listeModulesD').click(function(){
var position = $(this).position();
$('#listeModules').css('top', position.top);

View File

@ -7,7 +7,7 @@ fieldset legend { font-weight:bold; font-size: 108%; padding:0; }
div.submit { clear: both; text-align: center; }
</style>
<script type="text/javascript">
$(function(){
$(document).ready(function(){
$('.menu-close').click(function(){
$('div.blockh2').css('display','none');

View File

@ -27,7 +27,7 @@ function checkProgress() {
});
}
$(function() {
$(document).ready(function() {
$('#uploadForm').ajaxForm({
beforeSubmit: function() {
$('#uploadOutput').html('Envoi en cours...');

View File

@ -1,5 +1,5 @@
<script>
$(function(){
$(document).ready(function(){
$('a.user-service').click(function(e){
e.preventDefault();

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

@ -202,8 +202,8 @@ if ($this->indiscore->Enseigne!='' && $this->indiscore->Sigle!='') {
<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>
<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>
@ -253,15 +253,8 @@ if ($this->indiscore->Enseigne!='' && $this->indiscore->Sigle!='') {
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) {
switch($this->typeScore)
{
case '20':
$maxIndiscore = $this->typeScore;
$indiscore = $this->indiscore->Indiscore20;
@ -273,21 +266,23 @@ if ($this->indiscore->Enseigne!='' && $this->indiscore->Sigle!='') {
break;
}
?>
<h3 class="indiscore<?=$color?>">LE SCORE EST DE <?=$indiscore?> SUR <?=$maxIndiscore?> POINTS</h3>
<h3 style="font-size:13px"><b>LE SCORE EST DE <?php echo $indiscore;?> SUR <?php echo $maxIndiscore;?> POINTS</b></h3>
<?php
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 }?>
if($this->indiscore->infoEncours != '' && !is_numeric($this->indiscore->encours) && $this->indiscore->encours == 'N/A'){ ?>
<h3><?php echo $this->indiscore->infoEncours;?></h3>
<?php
}else{ ?>
<?php
if ($indiscore!=0) { ?>
<i>La tendance de la note est <?php echo $this->indiscore->TendanceIndiscore;?></i>
<h3 style="font-size:13px"><b>L'ENCOURS MAXIMUM CONSEILL&Eacute; EST DE <?php echo round($this->indiscore->encours / 1000);?> K&euro;</b></h3>
<?php } ?>
<h3><?php echo $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>

View File

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

View File

@ -33,50 +33,52 @@ $('select[name=type]').change(function(e){
<div class="paragraph">
<p>
<?php if ($this->typeTxt == 'indiScore20') {?>
<?php switch ( $this->typeTxt ) {?>
<?php case 'indiScore20':?>
L'indiscore évalue le risque de faillite d'entreprise à 12 mois à partir de trois axes: le respect,
l'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') {?>
<?php break; ?>
<?php case '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') {?>
<?php break; ?>
<?php case 'scoreDir':?>
Évaluation de l'équipe dirigeante en place. Système S&D
<?php } ?>
<?php if ($this->typeTxt == 'scoreConf') {?>
<?php break; ?>
<?php case 'scoreConf':?>
Évaluation de l'adéquation entre les déclarations et l'information disponible auprès des sources officielles françaises. Système S&D
<?php } ?>
<?php if ($this->typeTxt == 'scoreZ') {?>
<?php break; ?>
<?php case 'scoreZ':?>
Le score Z de la Banque de France permet de déceler les défaillances dentreprises. Ces dernières sont caractérisées
par 19 ratios retraçant quatre aspects de leur comportement : structure financière, dynamisme, rentabilité, gestion courante.
<?php } ?>
<?php if ($this->typeTxt == 'scoreCH') {?>
<?php break; ?>
<?php case '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') {?>
<?php break; ?>
<?php case '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') {?>
<?php break; ?>
<?php case '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') {?>
<?php break; ?>
<?php case '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') {?>
<?php break; ?>
<?php case 'scoreCCF':?>
Évaluation à 3 ans de la probabilité de défaillance d'une entreprise.
<?php } ?>
<?php break; ?>
<?php }?>
</p>
</div>
@ -118,7 +120,7 @@ $('select[name=type]').change(function(e){
</table>
</div>
<script>
$(function(){
$(document).ready(function(){
$('#synthese').tablesorter({
dateFormat: 'uk',
headers: {
@ -130,7 +132,7 @@ $(function(){
</script>
<div class="paragraph">
<?php if ( $this->graph ) {?>
<img src="/file/image/cache/q/<?=$this->graph?>" usemap="#graphMap">
<img src="/fichier/imgcache/<?=$this->graph?>" usemap="#graphMap">
<map name="graphMap">
<?=$this->graphMap;?>
</map>

View File

@ -17,15 +17,6 @@
<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>
@ -39,12 +30,7 @@
<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 valign="top" style="text-decoration:underline;"><?=$relation->libBanque?></td>
<td>
<?php if($relation->adresse1!='') {?>
<?=$relation->adresse1?><br />
@ -64,33 +50,4 @@
<?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>
</div>

View File

@ -159,12 +159,12 @@
))?>
</div>
<h2>Soldes Intermédiaires de Gestion</h2>
<h2>Soldes Intermédiaire de Gestion</h2>
<div class="paragraph">
<table class="bilans">
<thead>
<tr>
<th colspan="2">SOLDES INTERMEDIAIRES DE GESTION</th>
<th colspan="2">SOLDES INTERMEDIAIRE DE GESTION</th>
<?php foreach($this->tabResultSig as $info) { ?>
<th class="date" >
<?=$info['dateCloture']?><br/><?=$info['duree']?>

View File

@ -75,7 +75,7 @@ foreach ($this->dataTable as $ratio) {
<?php if ($this->graph) {?>
<div class="paragraph">
<img src="/file/image/cache/q/<?=$this->graph?>" />
<img src="/fichier/imgcache/<?=$this->graph?>" />
</div>
<?php }?>
@ -83,7 +83,7 @@ foreach ($this->dataTable as $ratio) {
</div>
<script>
$(function(){
$(document).ready(function(){
$('input[name=typeBilan]').click(function(e){
window.location.href = $(this).val();
});

View File

@ -40,15 +40,6 @@
</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">
@ -60,19 +51,6 @@
</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;
@ -86,12 +64,12 @@ switch ($this->champType) {
<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" />
<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>
@ -154,7 +132,5 @@ Valeurs exprimées en
<?php }?>
</div>
<?php }?>
<?php echo $this->render('cgu.phtml', $this->cgu);?>
</div>

View File

@ -92,14 +92,9 @@ switch ($type) {
$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><a href="<?=$this->url(array('controller'=>'finance','action'=>'liasse',
'siret'=>$this->siret,'id'=>$this->id, 'date'=> $type.$element->dateExercice), 'default', true)?>">
Visualiser</a>
</td>
</tr>
<?php break;?>
@ -155,13 +150,9 @@ switch ($type) {
?>
- <?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><a href="<?=$this->url(array('controller'=>'finance', 'action'=>'liasse', 'siret'=>$this->siret,
'id'=>$this->id, 'date'=> $type.$element->dateExercice), 'default', true)?>">
Visualiser</a>
</td>
</tr>
<?php }?>

View File

@ -1,6 +1,5 @@
<?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>
<a href="/fichier/liasse/<?=$this->file?>" target="_blank">Télécharger le fichier excel.</a>
<?php } else { ?>
Erreur lors de la construction du fichier.
<?php }?>

View File

@ -1,7 +1,7 @@
<?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>
<strong>Alert:</strong> <?=$this->msg?></p>
</div>
<?php }?>

View File

@ -1,7 +1,7 @@
<?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>
<strong>Fichier envoyé <a href="<?=$this->url(array('controller'=>'fichier', 'action'=>'bilanclient',
'fichier'=>$this->file),'default',true)?>"></a></strong>
<script>
$('#dialogbilanclient').dialog({ buttons: [ {
text: "Quitter",
@ -13,7 +13,7 @@ $('#dialogbilanclient').dialog({ buttons: [ {
<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>
<strong>Alert:</strong> <?=$this->errMsg?></p>
</div>
<?php } ?>

View File

@ -1,3 +1,14 @@
<!--[if lte IE 6]>
<div class="ui-state-highlight ui-corner-all">
<p><span style="float:left;margin-right:0.3em;" class="ui-icon ui-icon-info"></span>
<strong>Savez-vous que votre version d'Internet Explorer (version 6) est périmée ?</strong>
<br/><span><a style="text-decoration:none;" href="/libs/ie6/index.html" target="_blank">
Pour obtenir la meilleure expérience de navigation possible sur notre site web,
nous vous recommandons de mettre à jour votre navigateur ou d'en choisir un autre,
pour en savoir plus cliquez-ici</a></span>
</p>
</div>
<![endif]-->
<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">

View File

@ -27,7 +27,7 @@
<td colspan="2"><hr style="border:1px dotted silver" /></td>
</tr>
<tr>
<td colspan="2"><img src="/file/image/cache/q/<?php echo $this->report->CompanyId.'-'.$this->Type.'-'.str_replace(' ', '_', $credit->RiskClasses->CommonRiskClass->RatingName->_);?>.png" /></td>
<td colspan="2"><img src="/fichier/imgcache/<?php echo $this->report->CompanyId.'-'.$this->Type.'-'.str_replace(' ', '_', $credit->RiskClasses->CommonRiskClass->RatingName->_);?>.png" /></td>
</tr>
<tr>
<td colspan="2">
@ -46,7 +46,7 @@
<td class="float"><?php echo (empty($ProviderRiskClass->RatingValue))?'NC':$ProviderRiskClass->RatingValue; ?></td>
</tr>
<tr>
<td colspan="2"><img src="/file/image/cache/q/<?php echo $this->report->CompanyId.'-'.$this->Type.'-'.str_replace(' ', '_', $ProviderRiskClass->RatingName->_);?>.png" /></td>
<td colspan="2"><img src="/fichier/imgcache/<?php echo $this->report->CompanyId.'-'.$this->Type.'-'.str_replace(' ', '_', $ProviderRiskClass->RatingName->_);?>.png" /></td>
</tr>
<tr>
<td colspan="2"><i><?php echo (empty($ProviderRiskClass->Description[0]->_))?'NC':$ProviderRiskClass->Description[0]->_; ?></i></td>

View File

@ -33,7 +33,7 @@
<td class="right"><?php echo round($ComparaisonValeurs['current']); ?></td>
<td class="right"><?php echo round($ComparaisonValeurs['entreprise']); ?></td>
<td class="right"><?php echo $val; ?> %</td>
<td align="center"><img class="tooltip" title="<center><b>Evolution années précédentes</b></center><br /><img src='/file/image/cache/q/<?php echo $this->report->CompanyId.'-'.$this->Type.'-'.$name;?>.png' />" alt="icone" src="/themes/default/images/giant/<?php echo ($val > 0)? 'up': 'down';?>.png" /></td>
<td align="center"><img class="tooltip" title="<center><b>Evolution années précédentes</b></center><br /><img src='/fichier/imgcache/<?php echo $this->report->CompanyId.'-'.$this->Type.'-'.$name;?>.png' />" alt="icone" src="/themes/default/images/giant/<?php echo ($val > 0)? 'up': 'down';?>.png" /></td>
<?php if(!empty($ComparaisonValeurs['old'])):?>
<?php $i=0;foreach($ComparaisonValeurs['old'] as $valeur):$i++?>
<?php if($i == 4) break;?>

View File

@ -33,7 +33,7 @@
<br />
<center>
<span class="title">Graphique Analyse par année</span><br /><br />
<img src="/file/image/cache/q/<?php echo $this->report->CompanyId.'-'.$this->Type.'-';?>ComportementPaiement.png" />
<img src="/fichier/imgcache/<?php echo $this->report->CompanyId.'-'.$this->Type.'-';?>ComportementPaiement.png" />
</center>
<br />
<?php endif;?>
@ -99,7 +99,7 @@
<center>
<a name="15"></a>
<span class="title">Graphique Analyse par année</span><br />
<img src="/file/image/cache/q/<?php echo $this->report->CompanyId.'-'.$this->Type.'-';?>ComportementPaiementByAmount.png" />
<img src="/fichier/imgcache/<?php echo $this->report->CompanyId.'-'.$this->Type.'-';?>ComportementPaiementByAmount.png" />
</center>
<?php else: ?>
<div style="padding:0.7em;" class="ui-state-error ui-corner-all">

View File

@ -61,9 +61,9 @@
<?php endforeach; ?>
<td align="center">
<?php if($end > $firstAsset):?>
<img class="tooltip IMGprint" title="<center><b><?php echo $name;?></b></center><br /><img src='/file/image/cache/q/<?php echo $this->report->CompanyId.'-'.$this->Type.'-'.$name;?>-line.png' />" src="/themes/default/images/giant/down.png" />
<img class="tooltip IMGprint" title="<center><b><?php echo $name;?></b></center><br /><img src='/fichier/imgcache/<?php echo $this->report->CompanyId.'-'.$this->Type.'-'.$name;?>-line.png' />" src="/themes/default/images/giant/down.png" />
<?php else: ?>
<img class="tooltip IMGprint" title="<center><b><?php echo $name;?></b></center><br /><img src='/file/image/cache/q/<?php echo $this->report->CompanyId.'-'.$this->Type.'-'.$name;?>-line.png' />" src="/themes/default/images/giant/up.png" />
<img class="tooltip IMGprint" title="<center><b><?php echo $name;?></b></center><br /><img src='/fichier/imgcache/<?php echo $this->report->CompanyId.'-'.$this->Type.'-'.$name;?>-line.png' />" src="/themes/default/images/giant/up.png" />
<?php endif;unset($firstAsset);?>
</td>
</tr>
@ -73,7 +73,7 @@
<br />
<div class="center">
<span class="title">Graphique des actifs</span>
<img src="/file/image/cache/q/<?php echo $this->report->CompanyId.'-'.$this->Type.'-';?>actifs.png" />
<img src="/fichier/imgcache/<?php echo $this->report->CompanyId.'-'.$this->Type.'-';?>actifs.png" />
</div>
<br />
<a name="8"></a>
@ -107,9 +107,9 @@
<?php endforeach; ?>
<td align="center">
<?php if($end > $firstLiabilities):?>
<img class="tooltip IMGprint" title="<center><b><?php echo $name;?></b></center><br /><img src='/file/image/cache/q/<?php echo $this->report->CompanyId.'-'.$this->Type.'-'.$name;?>-line.png' />" src="/themes/default/images/giant/down.png" />
<img class="tooltip IMGprint" title="<center><b><?php echo $name;?></b></center><br /><img src='/fichier/imgcache/<?php echo $this->report->CompanyId.'-'.$this->Type.'-'.$name;?>-line.png' />" src="/themes/default/images/giant/down.png" />
<?php else: ?>
<img class="tooltip IMGprint" title="<center><b><?php echo $name;?></b></center><br /><img src='/file/image/cache/q/<?php echo $this->report->CompanyId.'-'.$this->Type.'-'.$name;?>-line.png' />" src="/themes/default/images/giant/up.png" />
<img class="tooltip IMGprint" title="<center><b><?php echo $name;?></b></center><br /><img src='/fichier/imgcache/<?php echo $this->report->CompanyId.'-'.$this->Type.'-'.$name;?>-line.png' />" src="/themes/default/images/giant/up.png" />
<?php endif;unset($firstLiabilities);?>
</td>
</tr>
@ -119,7 +119,7 @@
<br />
<div class="center">
<span class="title">Graphique des passifs</span>
<img src="/file/image/cache/q/<?php echo $this->report->CompanyId.'-'.$this->Type.'-';?>passifs.png" />
<img src="/fichier/imgcache/<?php echo $this->report->CompanyId.'-'.$this->Type.'-';?>passifs.png" />
</div>
<br />
<a name="9"></a>
@ -153,9 +153,9 @@
<?php endforeach; ?>
<td align="center">
<?php if($end > $firstProfitAndLoss):?>
<img class="tooltip IMGprint" title="<center><b><?php echo $name;?></b></center><br /><img src='/file/image/cache/q/<?php echo $this->report->CompanyId.'-'.$this->Type.'-'.$name;?>-line.png' />" src="/themes/default/images/giant/down.png" />
<img class="tooltip IMGprint" title="<center><b><?php echo $name;?></b></center><br /><img src='/fichier/imgcache/<?php echo $this->report->CompanyId.'-'.$this->Type.'-'.$name;?>-line.png' />" src="/themes/default/images/giant/down.png" />
<?php else: ?>
<img class="tooltip IMGprint" title="<center><b><?php echo $name;?></b></center><br /><img src='/file/image/cache/q/<?php echo $this->report->CompanyId.'-'.$this->Type.'-'.$name;?>-line.png' />" src="/themes/default/images/giant/up.png" />
<img class="tooltip IMGprint" title="<center><b><?php echo $name;?></b></center><br /><img src='/fichier/imgcache/<?php echo $this->report->CompanyId.'-'.$this->Type.'-'.$name;?>-line.png' />" src="/themes/default/images/giant/up.png" />
<?php endif;unset($firstProfitAndLoss);?>
</td>
</tr>
@ -165,7 +165,7 @@
<br />
<div class="center">
<span class="title">Compte de resultats</span>
<img src="/file/image/cache/q/<?php echo $this->report->CompanyId.'-'.$this->Type.'-';?>profitandloss.png" />
<img src="/fichier/imgcache/<?php echo $this->report->CompanyId.'-'.$this->Type.'-';?>profitandloss.png" />
</div>
<br />
<br />
@ -200,9 +200,9 @@
<?php endforeach; ?>
<td align="center">
<?php if($end > $firstKeyCreditRatios):?>
<img class="tooltip IMGprint" title="<center><b><?php echo $name;?></b></center><br /><img src='/file/image/cache/q/<?php echo $this->report->CompanyId.'-'.$this->Type.'-'.$name;?>-line.png' />" src="/themes/default/images/giant/down.png" />
<img class="tooltip IMGprint" title="<center><b><?php echo $name;?></b></center><br /><img src='/fichier/imgcache/<?php echo $this->report->CompanyId.'-'.$this->Type.'-'.$name;?>-line.png' />" src="/themes/default/images/giant/down.png" />
<?php else: ?>
<img class="tooltip IMGprint" title="<center><b><?php echo $name;?></b></center><br /><img src='/file/image/cache/q/<?php echo $this->report->CompanyId.'-'.$this->Type.'-'.$name;?>-line.png' />" src="/themes/default/images/giant/up.png" />
<img class="tooltip IMGprint" title="<center><b><?php echo $name;?></b></center><br /><img src='/fichier/imgcache/<?php echo $this->report->CompanyId.'-'.$this->Type.'-'.$name;?>-line.png' />" src="/themes/default/images/giant/up.png" />
<?php endif;unset($firstKeyCreditRatios);?>
</td>
</tr>

View File

@ -39,7 +39,7 @@
<center>
<a name="12"></a>
<span class="title">Evolution du capital</span><br /><br />
<img src="/file/image/cache/q/<?php echo $this->report->CompanyId.'-'.$this->Type.'-';?>positionFinanciere.png" />
<img src="/fichier/imgcache/<?php echo $this->report->CompanyId.'-'.$this->Type.'-';?>positionFinanciere.png" />
</center>
<span class="title">Relation banquaires</span><br /><br />
<?php if(isset($this->report->Bank)):?>

View File

@ -30,7 +30,7 @@ if ( empty($this->source) ){
<h2>Liste des surveillances</h2>
@ -49,7 +49,7 @@ if ( empty($this->source) ){
<th width="75">Count</th>
<th width="150">Event Type</th>
<th width="110">Last Change</th>
</tr>
</thead>
<tbody><pre><? //print_r($this->val_siren);?></pre>
@ -66,7 +66,7 @@ if ( empty($this->source) ){
}
endforeach;
?>
<? foreach ($merged as $MonitoringEv):
//STORE BY type
$merged_type = Array();
@ -80,7 +80,7 @@ if ( empty($this->source) ){
?>
<?$resultDB=unserialize($this->action('ret', 'giant',null,array('date_st'=>current($merged_type)[0]->ProviderOrderId)));?>
<? $frontendOptions = array('lifetime' => $this->configVal->cache->lifetime,'automatic_serialization' => true);
$backendOptions = array('cache_dir' => $c->profil->path->shared . '/giant/');
$backendOptions = array('cache_dir' => '../data/cache/giant/');
$cache = Zend_Cache::factory('Output','File',$frontendOptions,$backendOptions);
if(($lang = $cache->load('Pays_'.$resultDB['Pays'])) === false) {
$lang = 'en';
@ -112,10 +112,10 @@ if ( empty($this->source) ){
</td>
<td>
<?php
foreach ($merged_type as $monitor_type) {
echo "<p>".count($monitor_type).'</p>';
}
}
?>
</td>
<td style='text-align: left'>
@ -125,7 +125,7 @@ if ( empty($this->source) ){
echo "<a class='ev_code' title='".$monitor_type[0]->Company->Event[0]->EventCode."' href='/giant/retevents/Type/".$monitor_type[0]->Company->Event[0]->EventCode."/Id/".$monitor_type[0]->ProviderOrderId."'><p>".$name[1]."</p></a>";
} //Fin foreach?>
</td>
<td>
<?php
foreach ($merged_type as $monitor_type) {

View File

@ -1,4 +1,4 @@
<div id="map" class="map"><div id="popup"></div></div>
<div id="map" class="map">Préparation de la carte ...</div>
<?php if ($this->source == 'google') {?>
<script type="text/javascript">
@ -29,7 +29,7 @@ function createMarker(m) {
map: map,
position: m.location,
title: m.title,
icon: '/themes/default/images/maps/' + m.icon,
icon: m.icon,
});
// --- Info Window
var infowindow = new google.maps.InfoWindow({
@ -64,7 +64,7 @@ function loadGoogleMap() {
}
// --- Wait the document is ready
$(function(){
$(document).ready(function(){
// --- Start timer
timer = setInterval(waitGeoCode, timerSecondInterval);
// --- Get location and geocode address if needed
@ -133,99 +133,57 @@ $(function(){
<?php if ($this->source == 'openstreetmap') {?>
<script type="text/javascript">
<?php echo 'var marks = '.$this->marks.';'?>
var zoneMarker;
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);
});
$(document).ready(function(){
// --- Load Map
var map = new ol.Map({
target: 'map',
layers: listLayers,
layers: [
new ol.layer.Tile({
source: new ol.source.OSM()
})
],
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);
// --- Zone des markers
// --- Create Markers
$.each(marks, function (i, item){
if (item.gps.lat && item.gps.lon) {
// 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');*/
}
});
});
function createMarker(m){
// --- Info Window, Create event marker
var icon = $('<img src="' + m.icon + '">');
//.tooltip({title: 'Hello, world!', trigger: 'click'})
// --- Marker options
var marker = new ol.Overlay({
position: ol.proj.transform([2, 46], 'EPSG:4326', 'EPSG:3857'),
element: icon
});
map.addOverlay(marker);
// --- Extend map by adding marker
//ol.control.ZoomToExtent ol.extent.boundingExtent
}
</script>
<?php }?>

View File

@ -47,9 +47,9 @@ 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['NumRM']);
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']);
@ -123,7 +123,6 @@ echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Mail']);
<?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']);

View File

@ -2,55 +2,55 @@
<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 }?>
<?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/>
<?endif;?>
<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,));?>
<?=$this->action('streetview', 'identite', null, array(
'infos' => $this->infos,
));?>
</div>
<?php } elseif ($this->source == 'mappy') {?>
<div><img id="streetview" width="300px" /></div>
<div><img id="pp-cb-thumb" width="300px" /></div>
<script src="<?=$this->lienJs?>"></script>
<script type="text/javascript">
$(function() {
$(document).ready(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);
$('#pp-cb-thumb').replaceWith(img);
}
};
var address = "<?=$this->adresse?>";
@ -63,7 +63,6 @@
</script>
<?php }?>
<?php }?>
</div>
</div>

View File

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

View File

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

View File

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

View File

@ -5,11 +5,9 @@ Aucun document.
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>
<a target="_blank" href="/fichier/groupes/<?=$doc->url?>" 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)?>">
<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 }?>
@ -18,7 +16,7 @@ $class = ($key<$limit)?'first':'all';?>
<?php }?>
<div class="affiche" id="show" style="cursor:pointer;">Afficher tous les documents</div><br/>
<script>
$(function(){
$(document).ready(function(){
if (<?=$key?> >2) {
$("div.affiche").show();
} else {

View File

@ -1,33 +1,17 @@
<?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>
<img id="pp-cb-thumb" src="<?=$this->url?>" width="320" height="320" />
<?php if ($this->AuthorizeUpdate) {?>
<?php if ($this->streetviewMode == 'gps') {?>
<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>
<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){
@ -37,10 +21,4 @@ $('a.street-heading').click(function(e){
</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

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

View File

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

View File

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

View File

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

View File

@ -1,8 +1,8 @@
<?php if (empty($this->AutrePage)) {?>
<?php if (empty($this->AutrePage)):?>
<div id="center">
<?php }?>
<?php endif;?>
<?php if (empty($this->AutrePage)) {?>
<?php if (empty($this->AutrePage)):?>
<h1 class="titre">ANNONCES L&Eacute;GALES</h1>
<div class="paragraph">
<table class="identite">
@ -15,30 +15,36 @@
<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 }?>
<?php if($this->hasModeEdition) : ?>
<a href="<?=$this->url(array(
'controller' => 'saisie',
'action' => 'fiche',
'siret' => $this->siret,
'id' => $this->id,
))?>">(Edition)</a>
<?php endif ?>
</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))?>
<?=$this->action('infos','surveillance', null, array(
'source' => 'annonces',
'siret' => $this->siret
))?>
</td>
</tr>
<?php }?>
</table>
</div>
<?php }?>
<?php endif;?>
<?php if ($this->AutreSource){ ?>
<h2>EV&Eacute;NEMENTS L&Eacute;GAUX</h2>
<div class="paragraph">
Aucune annonces disponible pour cette entité.
</div>
<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)) {?>
@ -104,105 +110,104 @@ a.lienType {
<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>
<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>
<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>
<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>
<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') {?>
<?php if ($this->vue=='bodacc'){ ?>
<h2>EV&Eacute;NEMENTS L&Eacute;GAUX</h2>
<div class="paragraph">
<?php if(count($this->annoncesBodacc)==0){ ?>
Néant
<?php } else {?>
<table class="data">
<?=$this->partialLoop('juridique/annonces-resume.phtml', $this->annoncesBodacc)?>
</table>
<?php }?>
</div>
<?php }?>
<?php if ($this->vue=='balo'){ ?>
<h2>BALO</h2>
<div class="paragraph">
<?php if(count($this->annoncesBalo)==0){ ?>
Néant
<?php } else {?>
<table class="data">
<?=$this->partialLoop('juridique/annonces-resume.phtml', $this->annoncesBalo)?>
</table>
<?php }?>
</div>
<?php }?>
<?php if ($this->vue=='bomp'){ ?>
<div class="paragraph" style="margin:0 0 0 40px;">
<form name="filtreBoamp" method="post" action="<?=$this->url(array('controller'=>'juridique',
'action'=>'annonces', 'vue'=>'bomp', 'siret'=>$this->siret, 'id'=>$this->id), 'default', true)?>">
'action'=>'annonces','vue'=>'bomp','siret'=>$this->siret,'id'=>$this->id),null,true)?>">
<label>Type d'annonce</label>
<select name="filtre">
<option value="">-</option>
<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();
$('select[name=filtre]').on('change',function(){
$(this).parent('form').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 if (count($this->annoncesBomp)==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 }?>
<?=$this->partialLoop('juridique/annonces-resume.phtml', $this->annoncesBomp)?>
</table>
<?php }?>
</div>
<?php }?>
<?php if ($this->vue=='asso') { ?>
<h2>Associations</h2>
<div class="paragraph">
<?php if (count($this->annoncesAsso)==0){ ?>
Néant
<?php } else {?>
<table class="data">
<?=$this->partialLoop('juridique/annonces-resume.phtml', $this->annoncesAsso)?>
</table>
<?php }?>
</div>
<?php }?>
<?php if (empty($this->AutrePage)) {?>
<?php if ($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>
<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('filtre'=>$this->filtre, 'page'=>$this->PageNext))?>">&rsaquo;</a>
<a class="last" href="<?=$this->url(array('filtre'=>$this->filtre, 'page'=>$this->PageTotal))?>">&raquo;</a>
<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 }?>

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,7 +1,7 @@
<?php if ($this->isPost) :?>
<div style="text-align:center;">
<img src="/file/image/logo/q/<?=$this->image?>"/>
<img src="/fichier/logo/<?=$this->image?>"/>
<br/>
<a href="<?=$this->url(array('controller'=>'logo','action'=>'delete','image'=>$this->image))?>" id="logo_delete">
Supprimer le logo existant</a>
@ -46,7 +46,7 @@ var options = {
$('#crop').ajaxForm(options);
</script>
<img src="/file/image/logo/q/<?=$this->image?>" id="cropbox" />
<img src="/fichier/logo/<?=$this->image?>" id="cropbox" />
<br/>
<form id="crop" name="crop"
action="<?=$this->url(array('controller'=>'logo', 'action'=>'crop'),null, true);?>" method="post">

View File

@ -1,7 +1,7 @@
<?php if ( !empty($this->logo) ){?>
<div style="text-align:center;">
<img src="/file/image/logo/q/<?=$this->logo?>"/>
<img src="/fichier/logo/<?=$this->logo?>"/>
<br/>
<a id="logo_crop" href="<?=$this->url(array('controller'=>'logo', 'action'=>'crop', 'logo'=>$this->logo), null, true)?>">
Editer l'image</a>
@ -19,5 +19,5 @@ Envoyer une image</a>
<a id="logo_url" href="<?=$this->url(array('controller'=>'logo', 'action'=>'url', 'siren'=>$this->siren), null, true)?>">
Saisir URL</a>
</div>
<?php } ?>

View File

@ -2,7 +2,7 @@
<div style="text-align:center;">
<?php if ($this->image):?>
<img src="/file/image/logo/q/<?=$this->image?>"/>
<img src="/fichier/logo/<?=$this->image?>"/>
<br/>
<a id="logo_crop" href="<?=$this->url(array('controller'=>'logo', 'action'=>'crop', 'image'=>$this->image), null, true)?>">
Editer l'image</a>

View File

@ -2,7 +2,7 @@
<?php if ($this->image): ?>
<div style="text-align:center;">
<img src="/file/image/logo/q/<?=$this->image?>" />
<img src="/fichier/logo/<?=$this->image?>" />
<br/>
<a id="logo_crop" href="<?=$this->url(array('controller'=>'logo', 'action'=>'crop', 'image'=>$this->image), null, true)?>">
Editer l'image</a>

View File

@ -80,6 +80,40 @@
</tbody>
</table>
<?php }?>
<?php
//Lien pour upload acte association
if ($this->ModeEdition) {
?>
<a id="acteUpload" href="<?=$this->url(array('controller'=>'saisie', 'action'=>'association', 'type'=>'acte', 'siren'=>$this->siren))?>" title="Envoi Acte/Statut Association">
<b>Envoyer un acte</b>
</a>
<script>
$('#acteUpload').on('click', function(e){
e.preventDefault();
var url = $(this).attr('href');
var title = $(this).attr('title');
var dialogOpts = {
bgiframe: true,
title: title,
width: 500,
height: 400,
modal: true,
open: function(event, ui) {
$(this).html('Chargement...');
$(this).load(url);
},
buttons: {
Fermer: function() { $(this).dialog('close'); }
},
close: function() { $('#dialogacteupload').remove(); }
};
$('<div id="dialogacteupload"></div>').dialog(dialogOpts);
return false;
});
</script>
<?php }?>
</div>
</div>

View File

@ -31,7 +31,7 @@ Les éléments disponibles ci-dessous en téléchargement ou commande peuvent fa
</div>
<h2>Comptes annuels</h2>
<h2>Compte annuels</h2>
<div class="paragraph">
<?php if ($this->ErreurMessage) {?>
<?=$this->ErreurMessage?>

View File

@ -1,7 +1,7 @@
<?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>
<strong>Alert:</strong> <?=$this->msg?></p>
</div>
<?php } else if ($this->ref) {?>

View File

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

View File

@ -2,9 +2,9 @@
<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>
<strong>Alert:</strong> <?=$this->msg?></p>
</div>
<?php } else if ($this->ref) {?>
Votre référence : <?=strtoupper($this->ref)?>

View File

@ -1,106 +0,0 @@
<div id="center">
<?php if ($this->Privilege->Type == '03') { ?>
<h1>Privilège de la sécurité sociale et des régimes complémentaires</h1>
<?php }elseif ($this->Privilege->Type == '04') { ?>
<h1>Privilège du trésor public</h1>
<?php } ?>
<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</h2>
<div class="paragraph">
<table class="identite">
<tr>
<?php $date = new Zend_Date($this->Privilege->Date,'yyyy-MM-dd');?>
<td colspan="2"><i>Inscription n° <?=$this->Privilege->Num?> du <?=$date->toString('dd/MM/yyyy')?>, au <?=$this->Privilege->GreffeLabel?></i></td>
</tr>
<tr>
<td class="StyleInfoLib">Montant de la créance</td>
<td><?=number_format($this->Privilege->Mt, 2, ',', ' ')?> <?=$this->Privilege->Devise?></td>
</tr>
<tr>
<td class="StyleInfoLib">Organisme créancier</td>
<td>
<?=$this->Privilege->CreancierNom?><br/>
<?=$this->Privilege->CreancierAdresse1?>&nbsp;
<?=$this->Privilege->CreancierAdresse2?>&nbsp;
<?=$this->Privilege->CreancierAdresse3?>&nbsp;
<?=$this->Privilege->CreancierCP?>&nbsp;
<?=$this->Privilege->CreancierVille?><br/>
<?=$this->Privilege->CreancierPays?>
<?=$this->Privilege->CreancierAutres?>
</td>
</tr>
<tr>
<td class="StyleInfoLib">Date de fraicheur</td>
<?php $date = new Zend_Date($this->Privilege->DateFresh, 'yyyy-MM-dd')?>
<td><?=$date->toString('dd/MM/yyyy')?></td>
</tr>
<?php if ($this->Privilege->RadiationDate == '0000-00-00' && empty($this->Privilege->RadiationPartiel)) {?>
<tr>
<td class="StyleInfoLib">Date de fin</td>
<td>
<?php $date = new Zend_Date($this->Privilege->Date, 'yyyy-MM-dd'); ?>
<?php
switch ($this->Privilege->Type) {
case '03':
echo $date->addDay(900)->toString('dd/MM/yyyy');
break;
case '04':
echo $date->addDay(1460)->toString('dd/MM/yyyy');
break;
}
?>
</td>
</tr>
<?php }?>
<tr>
<td class="StyleInfoLib" style="vertical-align:top;">Compléments</td>
<?php if (!empty($this->Privilege->RadiationDate) && $this->Privilege->RadiationDate!='0000-00-00'
|| !empty($this->Privilege->RadiationPartiel)) { ?>
<td>
<?php
if (!empty($this->Privilege->RadiationDate) && $this->Privilege->RadiationDate!='0000-00-00') {
$date = new Zend_Date($this->Privilege->RadiationDate,'yyyy-MM-dd');
echo 'Radié le '.$date->toString('dd/MM/yyyy');
} elseif (!empty($this->Privilege->RadiationPartiel)) {
if ($this->Privilege->RadiationMention!='0000-00-00'){
$date = new Zend_Date($this->Privilege->RadiationMention,'yyyy-MM-dd');
echo 'Partiellement radié le '.$date->toString('dd/MM/yyyy');
}
if (!empty($this->Privilege->RadiationMt)){
echo ' pour un montant de '.
number_format($priv->RadiationMt, 2, ',', ' ') .
' ' . $this->Privilege->RadiationDevise;
}
?>
<br/>
<?=$this->Privilege->RadiationPartiel?>
<?php } ?>
</td>
<?php } else { ?>
<td>-</td>
<?php }?>
</tr>
<tr>
<td class="StyleInfoLib">Date Insertion</td>
<?php $date = new Zend_Date($this->Privilege->DateInsert,'yyyy-MM-dd')?>
<td><?=$date->toString('dd/MM/yyyy')?></td>
</tr>
</table>
</div>
</div>

View File

@ -0,0 +1,51 @@
<h2>Privilèges de la sécurité sociale et des régimes complémentaires</h2>
<div class="blockh2">
<?php foreach($this->privileges as $priv) {?>
<div style="margin:20px;">
<?php if ($priv->insType = '03'){ ?>
<?php $date = new Zend_Date($priv->dateFraiche, 'yyyy-MM-dd');?>
Greffe du <?=$priv->greffeLib?> en date du <?=$date->toString('dd/MM/yyyy')?><br/>
<br/>
<?=$priv->nb?> inscription(s) pour un montant conservé de <?=number_format($priv->insCumul, 2, ',', ' ')?> &euro;<br/>
<?php $date = new Zend_Date($priv->dateDerInsc, 'yyyy-MM-dd');?>
Dernière inscription par <?=$priv->nomDerCre?> faîtes le <?=$date->toString('dd/MM/yyyy')?><br/>
<br/>
<a href="<?=$this->url(array(
'controller' => 'pieces',
'action' => 'privileges',
'siret' => $this->siret,
'type' => '03',
))?>">Voir le détail des inscriptions</a>
<?php } else { ?>
Néant.
<?php } ?>
</div>
<?php } ?>
</div>
<h2>Privilèges du trésor public</h2>
<div class="blockh2">
<?php foreach($this->privileges as $priv) {?>
<div style="margin:20px;">
<?php if ($priv->insType = '04'){ ?>
<?php $date = new Zend_Date($priv->dateFraiche, 'yyyy-MM-dd');?>
Greffe du <?=$priv->greffeLib?> en date du <?=$date->toString('dd/MM/yyyy')?><br/>
<br/>
<?=$priv->nb?> inscription(s) pour un montant conservé de <?=number_format($priv->insCumul, 2, ',', ' ')?> &euro;<br/>
<?php $date = new Zend_Date($priv->dateDerInsc, 'yyyy-MM-dd');?>
Dernière inscription par <?=$priv->nomDerCre?> faîtes le <?=$date->toString('dd/MM/yyyy')?><br/>
<br/>
<a href="<?=$this->url(array(
'controller' => 'pieces',
'action' => 'privileges',
'siret' => $this->siret,
'type' => '04',
))?>">Voir le détail des inscriptions</a>
<?php
} else {
?>
Néant.
<?php } ?>
</div>
<?php } ?>
</div>

View File

@ -0,0 +1,61 @@
<?php if ($this->type == '03') { ?>
<h2>Privilèges de la sécurité sociale et des régimes complémentaires</h2>
<?php }elseif ($this->type == '04') { ?>
<h2>Privilèges du trésor public</h2>
<?php } ?>
<div class="paragraph">
<?php foreach($this->privileges as $priv) { ?>
<table style="border:1px solid;width:100%;margin:5px 0;">
<tr>
<?php $date = new Zend_Date($priv->insDate,'yyyy-MM-dd')?>
<td style="width:30%;"><i>Inscription du <?=$date->toString('dd/MM/yyyy')?></i></td>
<td style="width:70%;"><i>Numéro <?=$priv->insNum?></i></td>
</tr>
<tr>
<td class="StyleInfoLib">Montant de la créance</td>
<td><?=number_format($priv->insMontant, 2, ',', ' ')?> <?=$priv->insDev?></td>
</tr>
<tr>
<td class="StyleInfoLib" style="vertical-align:top;">Organisme créancier</td>
<td>
<?=$priv->creNom?><br/>
<?=$priv->creAdresse1?>&nbsp;
<?=$priv->creAdresse2?>&nbsp;
<?=$priv->creAdresse3?>&nbsp;
<?=$priv->creCP?>&nbsp;
<?=$priv->creVille?><br/>
<?=$priv->crePays?>
<?=$priv->creAutres?>
</td>
</tr>
<?php if (!empty($priv->radDate) && $priv->radDate!='0000-00-00' || !empty($priv->radPartiel)) { ?>
<tr>
<td class="StyleInfoLib" style="vertical-align:top;">Compléments</td>
<td>
<?php
if (!empty($priv->radDate) && $priv->radDate!='0000-00-00'){
$date = new Zend_Date($priv->radDate,'yyyy-MM-dd');
echo 'Radié le '.$date->toString('dd/MM/yyyy');
} elseif (!empty($priv->radPartiel)){
if ($priv->radMention!='0000-00-00'){
$date = new Zend_Date($priv->radMention,'yyyy-MM-dd');
echo 'Partiellement radié le '.$date->toString('dd/MM/yyyy');
}
if (!empty($priv->radPartMt)){
echo ' pour un montant de '.
number_format($priv->radPartMt, 2, ',', ' ') .
' ' . $priv->radDev;
}
?>
<br/>
<?=$priv->radPartiel?>
<?php
}
?>
</td>
</tr>
<?php } ?>
</table>
<?php }?>
</div>

View File

@ -1,11 +1,14 @@
<div id="center">
<?php if ($this->detail) { ?>
<h1>Détails des inscriptions d'endettement</h1>
<?php } else { ?>
<h1>Synthèse des inscriptions d'endettement</h1>
<?php } ?>
<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="200" class="StyleInfoLib"> Num&eacute;ro identifiant Siren</td>
<td width="350" class="StyleInfoData"><?=$this->SirenTexte($this->siren)?></td>
</tr>
<tr>
@ -14,71 +17,29 @@
<td width="350" class="StyleInfoData"><?=$this->raisonSociale?></td>
</tr>
</table>
<?php if ($this->detail) { ?>
<a href="<?=$this->url(array('controller'=>'pieces','action'=>'privileges','siret'=>$this->siret), 'default', true)?>">
Retour à la Synthese des inscriptions</a><br/>
<?php } ?>
</div>
<h2>Synthèse</h2>
<?php if ($this->surveillance) {?>
<div class="paragraph">
<table>
<tbody>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Nombre total d'inscription(s)</td>
<td width="350" class="StyleInfoData"><?=$this->PrivilegesNb?></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Montant total des inscriptions</td>
<td width="350" class="StyleInfoData"><?=number_format($this->PrivilegesMt, 2, ',', ' ')?></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Cumul par type d'inscription</td>
<td width="350" class="StyleInfoData">
<?php if (count($this->PrivilegesCumul) > 0) {?>
<?php foreach ($this->PrivilegesCumul as $c) {?>
<?php if ($c->Type == '04') {?>
<?=$c->Nb?> privilège<?php if ($c->Nb>1) {?>s<?php }?> du trésor public,
pour un montant de <?=number_format($c->Mt, 2, ',', ' ')?><br/>
<?php } elseif ($c->Type == '03') {?>
<?=$c->Nb?> privilège<?php if ($c->Nb>1) {?>s<?php }?> de la sécurité sociale et des régimes complémentaires,
pour un montant de <?=number_format($c->Mt, 2, ',', ' ')?><br/>
<?php }?>
<?php }?>
<?php }?>
</td>
</tr>
</tbody>
</table>
<?=$this->action('infos','surveillance', null, array('siret' => $this->siret, 'source'=>'privileges'), null, true)?>
</div>
<h2>Liste des privilèges</h2>
<div class="paragraph">
<?php if (count($this->Privileges) > 0) {?>
<table class="greffe">
<thead>
<tr>
<th>Date</th>
<th>Type</th>
<th>Créancier</th>
<th>Montant</th>
</tr>
</thead>
<tbody>
<?php foreach ($this->Privileges as $p) {?>
<tr>
<td><?=substr($p->Date,8,2).'/'.substr($p->Date,5,2).'/'.substr($p->Date,0,4)?></td>
<td><?=$p->TypeLabel?></td>
<td><?=$p->CreancierNom?></td>
<td nowrap>
<a href="<?=$this->url(array('controller'=>'pieces', 'action'=>'privilegedetail', 'siret'=>$this->siret,
'viewId'=>$p->Id), 'default', true)?>"><?=number_format($p->Mt, 2, ',', ' ')?></a>
</td>
</tr>
<?php }?>
</tbody>
</table>
<?php }?>
</div>
<?php
if ($this->detail) {
echo $this->partial('pieces/privileges-details.phtml', array(
'type' => $this->type,
'privileges' => $this->privileges,
'detail' => $this->detail));
} else {
echo $this->partial('pieces/privileges-cumul.phtml', array(
'siret' => $this->siret,
'privileges' => $this->privileges));
}
?>
</div>

View File

@ -22,7 +22,7 @@ function formSource(source)
}
}
$(function()
$(document).ready(function()
{
//Init
formSource($('#sourceSelect').val());

View File

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

View File

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

View File

@ -0,0 +1,25 @@
<form action="<?=$this->url(array('controller'=>'saisie', 'action'=>'association'))?>" method="post" name="sendfile">
<input type="hidden" name="siren" value="<?=$this->siren?>" />
<input type="hidden" name="type" value="<?=$this->type?>" />
<?php if ( $this->type=='bilan' ) {?>
Date Cloture : <input type="text" name="dateCloture" /> (JJMMAAAA)<br/><br/>
Bilan : <input type="file" name="fichier" />
<?php } elseif ($this->type=='acte') {?>
Date : <input type="text" name="date" /> (AAAAMMJJ)<br/><br/>
Status : <input type="file" name="fichier" />
<?php } ?>
<input type="submit" name="Envoyer" />
</form>
<i>Uniquement fichier pdf</i>
<div id="output"></div>
<?=$this->inlineScript()?>
<script>
$('form[name=sendfile]').ajaxForm({
beforeSubmit: function() {
$('#output').html('Envoi en cours...');
},
success: function(data) {
$('#output').html('<strong>' + data + '</strong>');
}
});
</script>

View File

@ -301,7 +301,7 @@
</form>
</div>
<script>
$(function(){
$(document).ready(function(){
$.datepicker.setDefaults( $.datepicker.regional['fr']);
$( ".dateArea" ).datepicker({changeYear: true});

View File

@ -22,6 +22,17 @@ $select = '';
if ( $this->saisie['source']=='JT' ){ $select = 'selected'; }
?>
<option value="JT" <?=$select?>>TESSI</option>
<?php
if (count($this->ListeJalCollecte)>0) {
foreach ($this->ListeJalCollecte as $jal) {
echo "<option value=\"JS$jal->id\" ";
if ( $this->saisie['source']=="JS$jal->id" ) {
echo 'selected';
}
echo ">$jal->nom</option>";
}
}
?>
</select>
<div id="dateParution">

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