Start from trunk
This commit is contained in:
parent
f928e74573
commit
0f0410b1e9
@ -1,124 +0,0 @@
|
||||
<?php
|
||||
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||
{
|
||||
protected function _initConfig()
|
||||
{
|
||||
$config = new Zend_Config($this->getOptions());
|
||||
Zend_Registry::set('config', $config);
|
||||
return $config;
|
||||
}
|
||||
|
||||
//Initialisation global des paramètres de vue
|
||||
protected function _initViewSettings()
|
||||
{
|
||||
$this->bootstrap('view');
|
||||
$view = $this->getResource('view');
|
||||
$view->setEncoding('UTF-8');
|
||||
$view->headTitle()->setSeparator(' - ');
|
||||
$view->headTitle('Extranet Scores & Décisions');
|
||||
}
|
||||
|
||||
protected function _initRouter()
|
||||
{
|
||||
$this->bootstrap('frontController');
|
||||
$front = $this->getResource('frontController');
|
||||
$router = $front->getRouter();
|
||||
$localauthRoute = new Zend_Controller_Router_Route('localauth/', array(
|
||||
'controller' => 'user',
|
||||
'action' => 'login'
|
||||
));
|
||||
$fichierRoute = new Zend_Controller_Router_Route('fichier/:action/:fichier', array(
|
||||
'controller' => 'fichier',
|
||||
'fichier' => '',
|
||||
));
|
||||
$printRoute = new Zend_Controller_Router_Route('editer/:action/:fichier', array(
|
||||
'controller' => 'print',
|
||||
'fichier' => '',
|
||||
));
|
||||
|
||||
$router->addRoute('localauth', $localauthRoute);
|
||||
$router->addRoute('fichier', $fichierRoute);
|
||||
$router->addRoute('print', $printRoute);
|
||||
return $router;
|
||||
}
|
||||
|
||||
protected function _initLogging()
|
||||
{
|
||||
//Firebug
|
||||
$writer = new Zend_Log_Writer_Firebug();
|
||||
if(APPLICATION_ENV=='production') {
|
||||
$writer->setEnabled(false);
|
||||
}
|
||||
$logger = new Zend_Log($writer);
|
||||
Zend_Registry::set('firebug', $logger);
|
||||
|
||||
//ChromePHP - a voir comment désactiver
|
||||
require_once 'Vendors/ChromePHP/ChromePhp.php';
|
||||
|
||||
//Application Logger en Production
|
||||
$AppLogger = new Zend_Log();
|
||||
if (APPLICATION_ENV == 'production')
|
||||
{
|
||||
$Mail = new Zend_Mail();
|
||||
$Mail->setFrom('production@scores-decisions.com')
|
||||
->addTo('supportdev@scores-decisions.com');
|
||||
$AppMailWriter = new Zend_Log_Writer_Mail($Mail);
|
||||
$AppMailWriter->setSubjectPrependText('ERREUR');
|
||||
$AppMailWriter->addFilter(Zend_Log::ERR);
|
||||
$AppLogger->addWriter($AppMailWriter);
|
||||
}
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = $c->profil->path->data.'/log';
|
||||
$AppFileWriter = new Zend_Log_Writer_Stream($path.'/application.log');
|
||||
$AppFileWriter->addFilter(Zend_Log::ERR);
|
||||
$AppLogger->addWriter($AppFileWriter);
|
||||
Zend_Registry::set('log', $AppLogger);
|
||||
}
|
||||
|
||||
protected function _initDb()
|
||||
{
|
||||
$c = Zend_Registry::get('config');
|
||||
try {
|
||||
$db = Zend_Db::factory($c->profil->db->sdv1);
|
||||
$db->getConnection();
|
||||
} catch ( Exception $e ) {
|
||||
if (APPLICATION_ENV == 'development') {
|
||||
echo '<pre>'; print_r($e); echo '</pre>';
|
||||
} else {
|
||||
echo "Le service rencontre actuellement un problème technique.";
|
||||
}
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the default adapter to use with all model
|
||||
*/
|
||||
Zend_Db_Table::setDefaultAdapter($db);
|
||||
|
||||
/**
|
||||
* Set Firebug Database profiler
|
||||
*/
|
||||
if (APPLICATION_ENV == 'development') {
|
||||
$profiler = new Zend_Db_Profiler_Firebug('All DB Queries');
|
||||
$profiler->setEnabled(true);
|
||||
$db->setProfiler($profiler);
|
||||
}
|
||||
}
|
||||
|
||||
protected function _initCache()
|
||||
{
|
||||
//MetadataCache pour la base de données
|
||||
$frontendOptions = array(
|
||||
'lifetime' => 28800,
|
||||
'automatic_serialization' => true
|
||||
);
|
||||
$backendOptions = array();
|
||||
$cache = Zend_Cache::factory('Core','Apc', $frontendOptions, $backendOptions);
|
||||
Zend_Db_Table_Abstract::setDefaultMetadataCache($cache);
|
||||
|
||||
//Cache pour les données de la base à stocker
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,92 +0,0 @@
|
||||
<?php
|
||||
class AideController extends Zend_Controller_Action
|
||||
{
|
||||
|
||||
/**
|
||||
* Afficher bulle pour les nouveautés
|
||||
*/
|
||||
public function newAction()
|
||||
{
|
||||
$nbNewsMax = 5;
|
||||
$nbJourGlisssant = 5;
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
$date = $user->getDateDerniereConnexion();
|
||||
$nouveautes = array();
|
||||
if ( $date!=null || $date!='0000-00-00 00:00:00' )
|
||||
{
|
||||
$time = mktime(0, 0, 0, date('m'), date('d')-$nbJourGlisssant, date('Y'));
|
||||
$dateglissant = date('Y-m-d', $time);
|
||||
$now = date('Y-m-d');
|
||||
|
||||
$nouveautesM = new Application_Model_Nouveautes();
|
||||
$sql = $nouveautesM->select()
|
||||
->where("date>='".$dateglissant."' AND date<='".$now."'")
|
||||
->order('date DESC')
|
||||
->limit($nbNewsMax);
|
||||
//Zend_Registry::get('firebug')->info($sql->__toString());
|
||||
$nouveautes = $nouveautesM->fetchAll($sql);
|
||||
}
|
||||
$this->view->assign('nouveautes', $nouveautes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Afficher la liste des nouveautés
|
||||
*/
|
||||
public function newlisteAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
|
||||
//Selection
|
||||
$nouveautesM = new Application_Model_Nouveautes();
|
||||
$sql = $nouveautesM->select()
|
||||
->from('nouveautes', array('categorie', 'intitule', "date", 'fichier'))
|
||||
->order('date DESC');
|
||||
$nouveautes = $nouveautesM->fetchAll($sql);
|
||||
$this->view->assign('nouveautes', $nouveautes);
|
||||
|
||||
}
|
||||
|
||||
public function cguAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$request = $this->getRequest();
|
||||
|
||||
$accept = $request->getParam('accept', 0);
|
||||
|
||||
if ( $accept == 1 ) {
|
||||
require_once 'Scores/WsScores.php';
|
||||
$ws = new WsScores();
|
||||
$accept = $ws->setCGU();
|
||||
Zend_Registry::get('firebug')->info($accept);
|
||||
if ($accept) {
|
||||
//Put in session
|
||||
$auth = Zend_Auth::getInstance();
|
||||
$identity = $auth->getIdentity();
|
||||
$identity->acceptationCGU = date('Y-m-d H:i:s');
|
||||
$auth->getStorage()->write($identity);
|
||||
//Redirect
|
||||
$this->_redirect('/');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function navinfoAction()
|
||||
{
|
||||
$bootstrap = $this->getInvokeArg('bootstrap');
|
||||
$userAgent = $bootstrap->getResource('useragent');
|
||||
|
||||
$device = $userAgent->getDevice();
|
||||
|
||||
echo $device->getFeature('browser_compatibility').'<br/>';
|
||||
echo $device->getFeature('browser_version').'<br/>';
|
||||
|
||||
echo "<pre>";
|
||||
print_r($device);
|
||||
echo "</pre>";
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,181 +0,0 @@
|
||||
<?php
|
||||
class BdfController extends Zend_Controller_Action
|
||||
{
|
||||
|
||||
public function indexAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
|
||||
//Type de module
|
||||
$module = $request->getParam('module', '');
|
||||
$siret = $request->getParam('siret', '');
|
||||
$req = $request->getParam('req', '');
|
||||
$denom = $request->getParam('denom', '');
|
||||
$type = $request->getParam('type', '');
|
||||
$code = $request->getParam('code', '');
|
||||
$rechet = $request->getParam('rechet', '');
|
||||
$ape = $request->getParam('ape', '');
|
||||
$service = $request->getParam('service', '');
|
||||
|
||||
if ($siret != '' && $req != '' && substr($siret, 0, 9) != $req) {
|
||||
$siret = '';
|
||||
} else if (substr($siret, 0, 9) == $req || empty($req)) {
|
||||
$req = substr($siret, 0, 9);
|
||||
}
|
||||
|
||||
if (is_array($module)){
|
||||
$session = new Zend_Session_Namespace('BDF');
|
||||
$session->module = $module;
|
||||
}
|
||||
|
||||
//Titre
|
||||
$title = 'Banque De France - '.strtoupper($service);
|
||||
if ($siret == '') {
|
||||
$title .= ' - '.$req;
|
||||
} else {
|
||||
$title .= substr($siren,0,9);
|
||||
}
|
||||
$this->view->headTitle()->append('Banque de France - '.$titre);
|
||||
|
||||
|
||||
require_once 'Scores/Bdf.php';
|
||||
$bdf = new BDF();
|
||||
|
||||
$this->view->assign('siret', $siret);
|
||||
$this->view->assign('req', $req);
|
||||
$this->view->assign('module', $session->module);
|
||||
|
||||
//Liste module FIBEN
|
||||
$listModulesFiben = $bdf->bdf_modules_fiben();
|
||||
$this->view->assign('listModulesFiben', $listModulesFiben);
|
||||
|
||||
//Liste module FCC
|
||||
$listModulesFcc = $bdf->bdf_modules_fcc();
|
||||
$this->view->assign('listModulesFcc', $listModulesFcc);
|
||||
|
||||
}
|
||||
|
||||
public function moduleAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
|
||||
//Type de module
|
||||
$module = $request->getParam('bdfmodule', '');
|
||||
$siret = $request->getParam('siret', '');
|
||||
$req = $request->getParam('req', '');
|
||||
$denom = $request->getParam('denom', '');
|
||||
$type = $request->getParam('type', 'u');
|
||||
$code = $request->getParam('code', '');
|
||||
$rechet = $request->getParam('rechet', '');
|
||||
$ape = $request->getParam('ape', '');
|
||||
$service = $request->getParam('service', '');
|
||||
|
||||
if ($siret != '' && $req != '' && substr($siret, 0, 9) != $req) {
|
||||
$siret = '';
|
||||
} else if (substr($siret, 0, 9) == $req || empty($req)) {
|
||||
$req = substr($siret, 0, 9);
|
||||
}
|
||||
|
||||
Zend_Registry::get('firebug')->info($module);
|
||||
|
||||
$content = array();
|
||||
|
||||
require_once 'Scores/Bdf.php';
|
||||
$bdf = new BDF();
|
||||
|
||||
//Mode multi module
|
||||
if ($type=='u') {
|
||||
if (is_array($module)) {
|
||||
foreach($module as $m) {
|
||||
if (array_key_exists($m, $bdf->bdf_modules_fiben())){
|
||||
$service = 'fiben';
|
||||
} elseif ($service=='ficp' && array_key_exists($m, $bdf->bdf_modules_ficp())){
|
||||
$service = 'ficp';
|
||||
} elseif (array_key_exists($m, $bdf->bdf_modules_fcc())){
|
||||
$service = 'fcc';
|
||||
}
|
||||
$func_module = 'bdf_modules_'.$service;
|
||||
$listModules = $bdf->{$func_module}();
|
||||
$retour['html'] = $bdf->displayModule($req, $m, $service, $listModules);
|
||||
$retour['titre'] = $req.' - Module '.$listModules[$m]['titre'];
|
||||
$content[] = $retour;
|
||||
}
|
||||
} else {
|
||||
if (array_key_exists($module, $bdf->bdf_modules_fiben())){
|
||||
$service = 'fiben';
|
||||
} elseif ($service=='ficp' && array_key_exists($module, $bdf->bdf_modules_ficp())){
|
||||
$service = 'ficp';
|
||||
} elseif (array_key_exists($module, $bdf->bdf_modules_fcc())){
|
||||
$service = 'fcc';
|
||||
}
|
||||
$func_module = 'bdf_modules_'.$service;
|
||||
$listModules = $bdf->{$func_module}();
|
||||
$content[]['html'] = $bdf->displayModule($req, $module, $service, $listModules);
|
||||
$content[]['titre'] = $req.' - Module '.$listModules[$module]['titre'];
|
||||
}
|
||||
}
|
||||
//Mode multi-identifiant
|
||||
elseif ($type=='m') {
|
||||
if (is_array($module))
|
||||
{
|
||||
foreach($module as $m)
|
||||
{
|
||||
if (array_key_exists($module, $bdf->bdf_modules_fiben())){
|
||||
$service = 'fiben';
|
||||
} elseif ($service=='ficp' && array_key_exists($module, $bdf->bdf_modules_ficp())){
|
||||
$service = 'ficp';
|
||||
} elseif (array_key_exists($module, $bdf->bdf_modules_fcc())){
|
||||
$service = 'fcc';
|
||||
}
|
||||
$func_module = 'bdf_modules_'.$service;
|
||||
$listModules = $bdf->{$func_module}();
|
||||
$content[]['html'] = $bdf->displayModule($req, $module, $service, $listModules);
|
||||
$content[]['titre'] = 'Module '.$listModules[$module]['titre'];
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->view->assign('content', $content);
|
||||
}
|
||||
|
||||
public function module27Action()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$params['siret'] = $request->getParam('siret');
|
||||
$params['bdfmodule'] = array(27);
|
||||
$this->_forward('module', null, null, $params);
|
||||
}
|
||||
|
||||
public function module28Action()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$params['siret'] = $request->getParam('siret');
|
||||
$params['bdfmodule'] = array(28);
|
||||
$this->_forward('module', null, null, $params);
|
||||
}
|
||||
|
||||
public function module29Action()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$params['siret'] = $request->getParam('siret');
|
||||
$params['bdfmodule'] = array(29);
|
||||
$this->_forward('module', null, null, $params);
|
||||
}
|
||||
|
||||
public function module40Action()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$params['siret'] = $request->getParam('siret');
|
||||
$params['bdfmodule'] = array(40);
|
||||
$this->_forward('module', null, null, $params);
|
||||
}
|
||||
|
||||
public function module51Action()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$params['siret'] = $request->getParam('siret');
|
||||
$params['bdfmodule'] = array(51);
|
||||
$this->_forward('module', null, null, $params);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,983 +0,0 @@
|
||||
<?php
|
||||
class DashboardController extends Zend_Controller_Action
|
||||
{
|
||||
protected $typeActes= array(
|
||||
'a00' => 'MODIFICATION',
|
||||
'a01' => 'MODIFICATION',
|
||||
'a02' => 'DISSOLUTION',
|
||||
'a03' => 'CONSTITUTION',
|
||||
'a04' => 'STATUTS CONSTITUTIFS',
|
||||
'a06' => 'STATUTS A JOUR',
|
||||
'a07' => 'STATUTS A JOUR',
|
||||
'a08' => 'STATUTS A JOUR ET DECLARATION DE CONFORMITE',
|
||||
'a09' => 'STATUTS APRES TRANSFERT DE SIEGE',
|
||||
'a1D' => 'AUGMENTATION ET REDUCTION CAPITAL',
|
||||
'a25' => 'AUGMENTATION DE CAPITAL',
|
||||
'a26' => 'REDUCTION DE CAPITAL',
|
||||
'a31' => 'TRANSFERT SIEGE SOCIAL HORS RESSORT',
|
||||
'a33' => 'CHANGEMENT DE GERANT',
|
||||
'a39' => 'CHANGEMENT DE COMMISSAIRE AUX COMPTES',
|
||||
'a77' => 'CONTINUATION MALGRE LA PERTE DE LA MOITIE DU CAPITAL',
|
||||
'aA1' => 'STATUTS',
|
||||
'aAA' => 'ACTE',
|
||||
'aAB' => 'ACTE MODIFICATIF',
|
||||
'aAC' => 'ACTE RECTIFICATIF',
|
||||
'aAD' => 'ACTE SOUS SEING PRIVE',
|
||||
'aAE' => 'AMPLIATION',
|
||||
'aAG' => 'AVENANT',
|
||||
'aAH' => 'AVENANT AUX STATUTS',
|
||||
'aAI' => 'ATTESTATION',
|
||||
'aAJ' => 'ANNEXES',
|
||||
'aAK' => 'ATTESTATION BANCAIRE',
|
||||
'aAP' => 'PROJET APPORT PARTIEL D",ACTIF',
|
||||
'aAT' => 'DELIVRANCE DE L",INFORMATION FAITE AU CONJOINT SUR LES CONSEQUENCES DES DETTES',
|
||||
'aCA' => 'CERTIFICAT',
|
||||
'aCB' => 'COMPTES DE CLOTURE DE LIQUIDATION',
|
||||
'aCD' => 'CONTRAT',
|
||||
'aCE' => 'CONVENTION',
|
||||
'aCF' => 'CERTIFICAT DE SOUSCRIPTION D",ACTIONS',
|
||||
'aDA' => 'DECISION DE GERANCE',
|
||||
'aDB' => 'DECISION DE L",ASSOCIE UNIQUE',
|
||||
'aDC' => 'DECISION DES ASSOCIES',
|
||||
'aDE' => 'DECLARATION DE CONFORMITE',
|
||||
'aDF' => 'DECLARATION DE SOUSCRIPTION ET DE VERSEMENT',
|
||||
'aDH' => 'DECLARATION DE CONFORMITE (ART.374 L24/07/1966)',
|
||||
'aDI' => 'DECISION DE L",ACTIONNAIRE UNIQUE',
|
||||
'aDP' => 'DECISION DU PRESIDENT',
|
||||
'aEA' => 'EXPEDITION',
|
||||
'aEB' => 'EXPEDITION NOTARIEE',
|
||||
'aEC' => 'EXTRAIT DU PROCES-VERBAL',
|
||||
'aFU' => 'PROJET DE FUSION',
|
||||
'aIF' => 'PROJET APPORT PARTIEL D",ACTIF',
|
||||
'aJA' => 'JUGEMENT',
|
||||
'aLA' => 'LETTRE',
|
||||
'aLB' => 'LISTE DES SIEGES SOCIAUX ANTERIEURS',
|
||||
'aLC' => 'LETTRE DE DEMISSION',
|
||||
'aLD' => 'LETTRE DE NOMINATION',
|
||||
'aLF' => 'LISTE DES SOUSCRIPTEURS',
|
||||
'aLS' => 'CERTIFICAT DE DEPOT DES FONDS AVEC LISTE DES SOUSCRIPTEURS',
|
||||
'aNA' => 'NOMINATION DE REPRESENTANT',
|
||||
'aO9' => 'NOMINATION DE GERANT(S)',
|
||||
'aOA' => 'ORDONNANCE',
|
||||
'aOB' => 'ORDONNANCE DE REFERE',
|
||||
'aOC' => 'ORDONNANCE DU PRESIDENT',
|
||||
'aOD' => 'ORDONNANCE SUR REQUETE',
|
||||
'aOE' => 'ORDONNANCE',
|
||||
'aPA' => 'PROCES VERBAL',
|
||||
'aPC' => 'PROCES VERBAL D",ASSEMBLEE CONSTITUTIVE',
|
||||
'aPD' => 'PROCES VERBAL D",ASSEMBLEE DU DIRECTOIRE',
|
||||
'aPE' => 'PROCES VERBAL D",ASSEMBLEE GENERALE',
|
||||
'aPF' => 'PROCES VERBAL D",ASSEMBLEE GENERALE EXTRAORDINAIRE',
|
||||
'aPG' => 'PROCES VERBAL D",ASSEMBLEE GENERALE ORDINAIRE',
|
||||
'aPH' => 'PROCES VERBAL D",ASSEMBLEE MIXTE',
|
||||
'aPI' => 'PROCES VERBAL D",ASSEMBLEES ORDINAIRE ET EXTRAORDINAIRE',
|
||||
'aPL' => 'PROCES VERBAL DIRIGEANT SOCIAL',
|
||||
'aPM' => 'PROCES VERBAL DU CONSEIL D",ADMINISTRATION',
|
||||
'aPN' => 'PROCES VERBAL DU CONSEIL DE SURVEILLANCE',
|
||||
'aPO' => 'PROCES VERBAL DE LA GERANCE',
|
||||
'aPT' => 'PROJET DE TRAITE D",APPORT',
|
||||
'aPU' => 'PROJET DE FUSION',
|
||||
'aPV' => 'PV D",ASSEMBLEE',
|
||||
'aQ2' => 'CONSTITUTION DE LA SOCIETE',
|
||||
'aR1' => 'CESSION DE PARTS (OU DONATION)',
|
||||
'aR4' => 'TRAITE DE FUSION',
|
||||
'aRA' => 'RAPPORT',
|
||||
'aRB' => 'RAPPORT COMMISSAIRE AUX COMPTES',
|
||||
'aRC' => 'RAPPORT COMMISSAIRE FUSION',
|
||||
'aRE' => 'RAPPORT CR/CPTES TRANSFORM. STE',
|
||||
'aRG' => 'RAPPORT DU COMMISSAIRE A LA FUSION',
|
||||
'aRH' => 'RAPPORT DU COMMISSAIRE A LA SCISSION',
|
||||
'aRI' => 'RAPPORT DU COMMISSAIRE A LA TRANSFORMATION',
|
||||
'aRK' => 'RAPPORT DU COMMISSAIRE AUX APPORTS',
|
||||
'aRL' => 'RAPPORT DU COMMISSAIRE AUX APPORTS ET A LA FUSION',
|
||||
'aRQ' => 'RAPPORT GERANCE',
|
||||
'aRS' => 'RAPPORT SPECIAL DU CONSEIL D",ADMINISTRATION',
|
||||
'aRU' => 'PROJET',
|
||||
'aTA' => 'TRAITE',
|
||||
'aTB' => 'TRAITE D",APPORT-FUSION',
|
||||
'aTC' => 'TRAITE DE FUSION',
|
||||
'aUA' => 'ATTESTATION DU CONJOINT COMMUN EN BIENS',
|
||||
);
|
||||
|
||||
/**
|
||||
* Return a ramdom password
|
||||
* @param int $length
|
||||
* Length of the string
|
||||
* @param int $strength
|
||||
* $strength = 1:- 0-9
|
||||
* $strength = 2:- A-Z0-9
|
||||
* $strength = 3:- A-Za-z0-9
|
||||
* $strength = 4:- A-Za-z0-9 and # $ % &
|
||||
* $strength = 5:- A-Za-z0-9 and # $ % & = > ? @
|
||||
* @return string
|
||||
*/
|
||||
protected function randomPassword($length,$strength)
|
||||
{
|
||||
$char_sets=array('48-57','65-90','97-122','35-38','61-64');
|
||||
$new_password='';
|
||||
srand(microtime()*10000000);
|
||||
for($i=0;$i<$length;$i++){
|
||||
$random=rand(0,$strength-1);
|
||||
list($start,$end)=explode('-',$char_sets[$random]);
|
||||
$new_password.=chr(rand($start,$end));
|
||||
}
|
||||
return $new_password;
|
||||
}
|
||||
|
||||
public function init()
|
||||
{
|
||||
require_once 'Scores/WsScores.php';
|
||||
require_once 'common/dates.php';
|
||||
}
|
||||
|
||||
public function preDispatch()
|
||||
{
|
||||
$user = new Scores_Utilisateur();
|
||||
if (!$user->checkModeEdition() && $user->getIdClient()!=1 ){
|
||||
$this->_forward('perms', 'error');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Affichage des différents liens d'administration
|
||||
*/
|
||||
public function indexAction()
|
||||
{
|
||||
$liens = array(
|
||||
0 => array(
|
||||
'libelle' => 'Gestion des clients',
|
||||
'url' => $this->view->url(array('action'=>'clients')),
|
||||
),
|
||||
1 => array(
|
||||
'libelle' => 'Gestion des commandes',
|
||||
'url' => $this->view->url(array('action'=>'commandes')),
|
||||
),
|
||||
2 => array(
|
||||
'libelle' => 'Gestion des fichiers nouveautés',
|
||||
'url' => $this->view->url(array('action'=>'newform')),
|
||||
),
|
||||
);
|
||||
|
||||
$this->view->assign('Liens', $liens);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion des commandes de l'extranet
|
||||
* Type : greffes | kbis | graydon | giant
|
||||
*/
|
||||
public function commandesAction()
|
||||
{
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/dashboard.js', 'text/javascript');
|
||||
|
||||
$request = $this->getRequest();
|
||||
$type = $request->getParam('type', '');
|
||||
$date = $request->getParam('date', mktime(0, 0, 0, date('n'), 1, date('Y')));
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
|
||||
$typesCommande = array('kbis', 'greffes');
|
||||
|
||||
if (in_array($type, $typesCommande))
|
||||
{
|
||||
require_once 'Scores/GestionCommandes.php';
|
||||
|
||||
//Valeur pour la sélection des dates
|
||||
$dateSelect = array();
|
||||
$dateToday = date('m');
|
||||
$dateIntervalle = 12;
|
||||
if ($user->checkModeEdition()){
|
||||
$dateIntervalle = 24;
|
||||
}
|
||||
for($i=$dateToday-$dateIntervalle; $i<=$dateToday; $i++)
|
||||
{
|
||||
$dateTime = mktime(0, 0, 0, $i, 1, date('Y'));
|
||||
$selected = '';
|
||||
if ($dateTime==$date){
|
||||
$selected = 'selected';
|
||||
}
|
||||
$dateSelect[] = array(
|
||||
'value' => $dateTime,
|
||||
'select' => $selected,
|
||||
'affichage' => date('m/Y', $dateTime)
|
||||
);
|
||||
}
|
||||
$this->view->assign('dateSelect', $dateSelect);
|
||||
|
||||
switch($type)
|
||||
{
|
||||
case 'kbis':
|
||||
$num = $request->getParam('num');
|
||||
$num = str_replace(' ', '', strtoupper($num));
|
||||
$etat = $request->getParam('etat');
|
||||
$mode = $request->getParam('mode', 'M');
|
||||
|
||||
$modeSelect = array(
|
||||
'C' => array('value' => 'C', 'select' => '', 'affichage' => 'courrier S&D'),
|
||||
'M' => array('value' => 'M', 'select' => '', 'affichage' => 'e-mail'),
|
||||
);
|
||||
$modeSelect[$mode]['select'] = ' selected';
|
||||
$gestionCommande = new GestionCommande();
|
||||
$status = $gestionCommande->listStatus($mode);
|
||||
$etatSelect = array();
|
||||
$etatSelect[] = array('value'=>0, 'select'=>'', 'affichage'=>'');
|
||||
foreach($status as $item){
|
||||
$select = '';
|
||||
if ($item['id']==$etat){
|
||||
$select = ' selected';
|
||||
}
|
||||
$etatSelect[] = array('value'=>$item['id'], 'select'=>$select, 'affichage'=>$item['libStatut']);
|
||||
}
|
||||
|
||||
${'status'.$mode} = $gestionCommande->listStatus($mode);
|
||||
|
||||
$this->view->assign('etatSelect', $etatSelect);
|
||||
$this->view->assign('modeSelect', $modeSelect);
|
||||
$this->view->assign('num', $num);
|
||||
|
||||
if (!empty($num)){
|
||||
if (preg_match('/[0-9]{9}/', $num)){
|
||||
$listCommandes = $gestionCommande->listCommandesKbisBySiren($num);
|
||||
} elseif(substr($num,0,1)=='K'){
|
||||
$listCommandes = $gestionCommande->listCommandesKbisByNum($num);
|
||||
}
|
||||
} elseif (!empty($date)) {
|
||||
$listCommandes = $gestionCommande->listCommandesKbis($date, $etat, $mode);
|
||||
}
|
||||
|
||||
//Parcours de la liste des commandes et vérification document existe
|
||||
if (count($listCommandes)>0) {
|
||||
for($i=0;$i<count($listCommandes);$i++)
|
||||
{
|
||||
//Etat de la commande
|
||||
$cmdEtatSelect = array();
|
||||
$cmdEtatSelect[] = array('value'=>0, 'select'=>'', 'affichage'=>'');
|
||||
$typeCommande = $listCommandes[$i]->type;
|
||||
if (isset(${'status'.$typeCommande})){
|
||||
foreach(${'status'.$typeCommande} as $item){
|
||||
$select = '';
|
||||
if ($item['id']==$listCommandes[$i]->statutCommande){
|
||||
$select = ' selected';
|
||||
}
|
||||
$cmdEtatSelect[] = array(
|
||||
'value' => $item['id'],
|
||||
'affichage' => $item['libStatut'],
|
||||
'select' => $select,
|
||||
);
|
||||
}
|
||||
}
|
||||
$listCommandes[$i]->cmdEtatSelect = $cmdEtatSelect;
|
||||
}
|
||||
}
|
||||
|
||||
break; //Fin Gestion Kbis
|
||||
|
||||
case 'greffes':
|
||||
|
||||
$num = $request->getParam('num');
|
||||
$num = str_replace(' ', '', strtoupper($num));
|
||||
$etat = $request->getParam('etat');
|
||||
$mode = $request->getParam('mode', 'G');
|
||||
$login = $request->getParam('login');
|
||||
|
||||
if (empty($mode) && !empty($num)) $mode = substr($num,0,1);
|
||||
|
||||
$modeSelect = array(
|
||||
'G' => array('value' => 'G', 'select' => '', 'affichage' => 'courrier infogreffe'),
|
||||
'C' => array('value' => 'C', 'select' => '', 'affichage' => 'courrier S&D'),
|
||||
'M' => array('value' => 'M', 'select' => '', 'affichage' => 'e-mail'),
|
||||
);
|
||||
$modeSelect[$mode]['select'] = ' selected';
|
||||
|
||||
$gestionCommande = new GestionCommande();
|
||||
|
||||
//Liste des états possible pour les commandes
|
||||
$status = $gestionCommande->listStatus($mode);
|
||||
$etatSelect = array();
|
||||
$etatSelect[] = array('value'=>0, 'select'=>'', 'affichage'=>'');
|
||||
foreach($status as $item){
|
||||
$select = '';
|
||||
if ($item['id']==$etat){
|
||||
$select = ' selected';
|
||||
}
|
||||
$etatSelect[] = array(
|
||||
'value' => $item['id'],
|
||||
'select' => $select,
|
||||
'affichage' => $item['libStatut']
|
||||
);
|
||||
}
|
||||
|
||||
$this->view->assign('etatSelect', $etatSelect);
|
||||
$this->view->assign('modeSelect', $modeSelect);
|
||||
$this->view->assign('num', $num);
|
||||
$this->view->assign('login', $login);
|
||||
|
||||
if (!empty($num)){
|
||||
if (preg_match('/[0-9]{9}/', $num)){
|
||||
$listCommandes = $gestionCommande->listCommandesGreffeBySiren($num);
|
||||
} elseif(substr($num,0,1)=='G' || substr($num,0,1)=='C'){
|
||||
$listCommandes = $gestionCommande->listCommandesGreffeByNum($num);
|
||||
}
|
||||
} elseif (!empty($login)) {
|
||||
$listCommandes = $gestionCommande->listCommandesGreffeByLogin($login, $date);
|
||||
} elseif (!empty($date)) {
|
||||
$listCommandes = $gestionCommande->listCommandesGreffe($date, $etat, $mode);
|
||||
}
|
||||
|
||||
//Liste des différents états pour les commandes
|
||||
${'status'.$mode} = $gestionCommande->listStatus($mode);
|
||||
|
||||
//Parcours de la liste des commandes et vérification document existe
|
||||
if (count($listCommandes)>0)
|
||||
{
|
||||
for($i=0;$i<count($listCommandes);$i++)
|
||||
{
|
||||
//Etat de la commande
|
||||
$cmdEtatSelect = array();
|
||||
$cmdEtatSelect[] = array('value'=>0, 'select'=>'', 'affichage'=>'');
|
||||
$typeCommande = $listCommandes[$i]->typeCommande;
|
||||
if (isset(${'status'.$typeCommande})){
|
||||
foreach(${'status'.$typeCommande} as $item){
|
||||
$select = '';
|
||||
if ($item['id']==$listCommandes[$i]->statutCommande){
|
||||
$select = ' selected';
|
||||
}
|
||||
$cmdEtatSelect[] = array(
|
||||
'value' => $item['id'],
|
||||
'affichage' => $item['libStatut'],
|
||||
'select' => $select,
|
||||
);
|
||||
}
|
||||
}
|
||||
$listCommandes[$i]->cmdEtatSelect = $cmdEtatSelect;
|
||||
|
||||
//Lien vers le fichier
|
||||
$documentLien = '';
|
||||
$document = '';
|
||||
$sirenLien = '';
|
||||
switch($type)
|
||||
{
|
||||
case 'greffes':
|
||||
if (preg_match('/^([0-9a-zA-Z]{2,}-).*?$/', $listCommandes[$i]->refDocument, $matches)){
|
||||
|
||||
if (substr($listCommandes[$i]->refDocument,0,3)=='ST-'){
|
||||
$document = 'DERNIER STATUS À JOUR';
|
||||
} else {
|
||||
$explodedRef = explode('-', $listCommandes[$i]->refDocument);
|
||||
$dateref = WDate::dateT('Ymd','d/m/Y',$explodedRef[1]);
|
||||
$depot = ', Dépôt n°'.$explodedRef[6].' au '.$dateref;
|
||||
$document = $this->typeActes['a'.substr($listCommandes[$i]->refDocument,0,2)].$depot;
|
||||
}
|
||||
|
||||
$c = Zend_Registry::get('config');
|
||||
$refFile = realpath($c->profil->path->data).'/pdf/acte-'.
|
||||
$listCommandes[$i]->siren.'-'.
|
||||
trim($listCommandes[$i]->refDocument).'.pdf';
|
||||
|
||||
if (file_exists($refFile)) {
|
||||
$document = '<a href="/fichier/pdf/acte-'.
|
||||
$listCommandes[$i]->siren.'-'.
|
||||
trim($listCommandes[$i]->refDocument).'.pdf'.
|
||||
'" target="_blank">'.$document.'</a>';
|
||||
}
|
||||
|
||||
$sirenLien = $this->view->url(array(
|
||||
'controller' => 'pieces',
|
||||
'action' => 'actes',
|
||||
'siret' => $listCommandes[$i]->siren,
|
||||
), null, true);
|
||||
|
||||
} elseif (preg_match('/^([0-9]{4}).*?$/', $listCommandes[$i]->refDocument, $matches)){
|
||||
|
||||
$document = 'Bilan de '.$matches[1];
|
||||
|
||||
require_once 'Infogreffe/Infogreffe.php';
|
||||
$infogreffe = new Infogreffe();
|
||||
$path = $infogreffe->bilanPath($listCommandes[$i]->refDocument);
|
||||
$fichier = $infogreffe->bilanFilename($listCommandes[$i]->siren, $listCommandes[$i]->refDocument);
|
||||
|
||||
if(file_exists($refFile)){
|
||||
$document = '<a href="/fichier/pdf/'.$fichier.'" target="_blank">'.$document.'</a>';
|
||||
}
|
||||
|
||||
$sirenLien = $this->view->url(array(
|
||||
'controller' => 'pieces',
|
||||
'action' => 'bilans',
|
||||
'siret' => $listCommandes[$i]->siren,
|
||||
), null, true);
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
$listCommandes[$i]->document = $document;
|
||||
$listCommandes[$i]->documentLien = $documentLien;
|
||||
$listCommandes[$i]->sirenLien = $sirenLien;
|
||||
}
|
||||
}
|
||||
|
||||
break; //Fin Gestion Greffes
|
||||
}
|
||||
$this->view->assign('commandes', $listCommandes);
|
||||
$this->renderScript('dashboard/commandes-'.$type.'.phtml');
|
||||
}
|
||||
|
||||
//Affichage des liens vers les différents types de commande
|
||||
$this->view->assign('typesCommande', $typesCommande);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Modification de l'état d'une commande infogreffe
|
||||
*/
|
||||
public function commandesetatchangeAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
||||
$request = $this->getRequest();
|
||||
$etat = $request->getParam('etat');
|
||||
$idCommande = $request->getParam('idCommande');
|
||||
$mode = $request->getParam('mode', 'C');
|
||||
$type = $request->getParam('type');
|
||||
|
||||
require_once 'Scores/GestionCommandes.php';
|
||||
$commande = new GestionCommande();
|
||||
if ($type == 'kbis'){
|
||||
echo $commande->changeEtatKbis($idCommande, $etat, $mode);
|
||||
} elseif ($type == 'greffe') {
|
||||
echo $commande->changeEtatGreffe($idCommande, $etat, $mode);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Affichage de la raison sociale à partir du siren
|
||||
*/
|
||||
public function rsAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
||||
$request = $this->getRequest();
|
||||
$siren = $request->getParam('siren');
|
||||
|
||||
$ws = new WsScores();
|
||||
$infos = $ws->getIdentite($siren);
|
||||
if ($infos==false) {
|
||||
echo 'Erreur';
|
||||
} else {
|
||||
echo $infos->Nom;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Génération automatique du courrier PDF / ODT
|
||||
*/
|
||||
public function courrierAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
||||
$request = $this->getRequest();
|
||||
$numCommande = $request->getParam('commande');
|
||||
|
||||
require_once 'GenCourrier/GenCourrier.php';
|
||||
$courrier = new GenCourrier($numCommande);
|
||||
|
||||
|
||||
$courrier->computeOdt();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Liste les clients
|
||||
*/
|
||||
public function clientsAction()
|
||||
{
|
||||
$user = new Scores_Utilisateur();
|
||||
if ( !$user->isSuperAdmin() ){
|
||||
$this->_forward('perms', 'error');
|
||||
}
|
||||
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/dashboard.js', 'text/javascript');
|
||||
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getListeClients();
|
||||
$listeClients = $reponse->result->item;
|
||||
|
||||
$reponse = $ws->getListeDroits();
|
||||
$wsdroits = $reponse->item;
|
||||
|
||||
$this->view->assign('ListeClients', $listeClients);
|
||||
$this->view->assign('wsdroits', $wsdroits);
|
||||
}
|
||||
|
||||
/**
|
||||
* Edition ou création d'un nouveau client
|
||||
*/
|
||||
public function clientAction()
|
||||
{
|
||||
$user = new Scores_Utilisateur();
|
||||
if ( !$user->isSuperAdmin() ) {
|
||||
$this->_forward('perms', 'error');
|
||||
}
|
||||
|
||||
$this->view->headScript()->appendFile('/libs/checkbox/jquery.checkbox.js', 'text/javascript');
|
||||
$this->view->headLink()->appendStylesheet('/libs/checkbox/jquery.checkbox.css', 'all');
|
||||
|
||||
$request = $this->getRequest();
|
||||
$idClient = $request->getParam('idClient', false);
|
||||
$titre = 'CREATION NOUVEAU CLIENT';
|
||||
$submitValue = 'Créer le client';
|
||||
$ws = new WsScores();
|
||||
if ($idClient!==false){
|
||||
$reponse = $ws->getListeClients($idClient);
|
||||
$InfosClient = $reponse->result->item[0];
|
||||
$titre = 'EDITION CLIENT';
|
||||
$submitValue = 'Modifier le client';
|
||||
}
|
||||
$reponse = $ws->getListeDroits();
|
||||
$wsdroits = array();
|
||||
foreach ($reponse->item as $tmp) {
|
||||
$wsdroits[$tmp->code] = $tmp->desc;
|
||||
}
|
||||
$this->view->assign('wsdroits', $wsdroits);
|
||||
|
||||
$reponse = $ws->getCategory();
|
||||
$wscategory = $reponse->item;
|
||||
$this->view->assign('wscategory', $wscategory);
|
||||
|
||||
$this->view->assign('idClient', $idClient);
|
||||
$this->view->assign('InfosClient', $InfosClient);
|
||||
$this->view->assign('titre', $titre);
|
||||
$this->view->assign('submitValue', $submitValue);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Enregistre les informations sur le client
|
||||
*/
|
||||
public function clientsaveAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$infos = $request->getParams();
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->setClient($infos);
|
||||
if ($reponse->error->errnum==1) {
|
||||
$this->_forward('client', 'dashboard', null, array('idClient' => $infos['idClient']));
|
||||
}
|
||||
$this->view->assign('infos', $request->getParams());
|
||||
}
|
||||
|
||||
public function usersAction()
|
||||
{
|
||||
$this->view->headLink()->appendStylesheet('/themes/default/styles/user.css', 'all');
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
|
||||
$request = $this->getRequest();
|
||||
$idClient = $request->getParam('idClient', $user->getIdClient());
|
||||
$service = $request->getParam('service', null);
|
||||
|
||||
if (!$user->isSuperAdmin() && !$user->isAdmin()) {
|
||||
$this->renderScript('error/perms.phtml');
|
||||
}
|
||||
if ($user->isAdmin()){
|
||||
$idClient = $user->getIdClient();
|
||||
}
|
||||
|
||||
$ws = new WsScores();
|
||||
|
||||
$services = $ws->getServices($idClient);
|
||||
$this->view->assign('services', $services->item);
|
||||
|
||||
if ( null === $service ) {
|
||||
$infos = $ws->getListeUtilisateurs($user->getLogin(), $idClient);
|
||||
$utilisateurs = $infos->result->item;
|
||||
} else {
|
||||
$infos = $ws->getServiceUsers($idClient, $service);
|
||||
$utilisateurs = $infos->item;
|
||||
$this->view->assign('service', $service);
|
||||
}
|
||||
|
||||
$this->view->assign('utilisateurs', $utilisateurs);
|
||||
$this->view->assign('idClient', $idClient);
|
||||
}
|
||||
|
||||
public function userAction()
|
||||
{
|
||||
$this->view->headLink()
|
||||
->appendStylesheet('/themes/default/styles/user.css', 'all')
|
||||
->appendStylesheet('/themes/default/styles/form.css', 'all');
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/user.js', 'text/javascript');
|
||||
|
||||
$request = $this->getRequest();
|
||||
|
||||
$op = $request->getParam('op');
|
||||
$idClient = $request->getParam('idClient');
|
||||
$login = $request->getParam('login');
|
||||
|
||||
if ($op=='save') {
|
||||
|
||||
$options = $request->getParam('frmOptions', '');
|
||||
$action = $options['action'];
|
||||
$idClient = $options['idClient'];
|
||||
$login = $options['login'];
|
||||
require_once 'Scores/WsScores.php';
|
||||
$ws = new WsScores();
|
||||
$result = $ws->setInfosLogin($login, $action, $options);
|
||||
if (is_string($result)) {
|
||||
$this->view->assign('message',$result);
|
||||
switch($action) {
|
||||
case 'new': $op = 'new'; break;
|
||||
case 'update': $op = 'edit'; break;
|
||||
}
|
||||
} else {
|
||||
$this->_redirect('/dashboard/users/idClient/'.$idClient);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
switch($op) {
|
||||
|
||||
case 'new':
|
||||
require_once 'Scores/WsScores.php';
|
||||
$ws = new WsScores();
|
||||
|
||||
//Liste des catégories d'accès
|
||||
$reponse = $ws->getCategory();
|
||||
$wscategory = $reponse->item;
|
||||
$this->view->assign('wscategory', $wscategory);
|
||||
|
||||
//Liste de tous les droits
|
||||
$listeDroits = $ws->getListeDroits();
|
||||
$droitsLib = array();
|
||||
foreach($listeDroits->item as $droit) {
|
||||
$droitsLib[strtoupper($droit->code)] = $droit->desc;
|
||||
}
|
||||
$this->view->assign('droitsLib', $droitsLib);
|
||||
|
||||
//Liste de toutes les préférences
|
||||
$listePrefs = $ws->getListePrefs();
|
||||
$prefsLib = array();
|
||||
foreach($listePrefs->item as $pref) {
|
||||
$prefsLib[strtoupper($pref->code)] = $pref->desc;
|
||||
}
|
||||
$this->view->assign('prefsLib', $prefsLib);
|
||||
|
||||
$options['idClient'] = $idClient;
|
||||
$this->view->assign('options', $options);
|
||||
|
||||
//Customer informations
|
||||
$reponse = $ws->getNextLogin($idClient);
|
||||
$this->view->assign('loginNew', $reponse->result->racine);
|
||||
$this->view->assign('droitsClients', explode(' ', strtolower($reponse->result->droitsClients)));
|
||||
|
||||
$this->view->assign('password', $this->randomPassword(10, 3));
|
||||
|
||||
$this->view->assign('action', 'new');
|
||||
|
||||
break;
|
||||
|
||||
case 'edit':
|
||||
|
||||
require_once 'Scores/WsScores.php';
|
||||
$ws = new WsScores();
|
||||
|
||||
//Liste des catégories d'accès
|
||||
$reponse = $ws->getCategory();
|
||||
$wscategory = $reponse->item;
|
||||
$this->view->assign('wscategory', $wscategory);
|
||||
|
||||
//Liste de tous les droits
|
||||
$listeDroits = $ws->getListeDroits();
|
||||
$droitsLib = array();
|
||||
foreach($listeDroits->item as $droit) {
|
||||
$droitsLib[strtoupper($droit->code)] = $droit->desc;
|
||||
}
|
||||
$this->view->assign('droitsLib', $droitsLib);
|
||||
|
||||
//Liste de toutes les préférences
|
||||
$listePrefs = $ws->getListePrefs();
|
||||
$prefsLib = array();
|
||||
foreach($listePrefs->item as $pref) {
|
||||
$prefsLib[strtoupper($pref->code)] = $pref->desc;
|
||||
}
|
||||
$this->view->assign('prefsLib', $prefsLib);
|
||||
|
||||
$options->idClient = $idClient;
|
||||
$this->view->assign('options', $options);
|
||||
|
||||
//Customer informations
|
||||
$reponse = $ws->getListeClients($idClient);
|
||||
$InfosClient = $reponse->result->item[0];
|
||||
$this->view->assign('loginNew', $InfosClient->racineLogin);
|
||||
$this->view->assign('droitsClients', explode(' ', strtolower($InfosClient->droits)));
|
||||
|
||||
//User informations
|
||||
$user = $ws->getUser($login);
|
||||
$options = json_decode($user, true);
|
||||
|
||||
Zend_Registry::get('firebug')->info($user);
|
||||
|
||||
$this->view->assign('droits', explode(' ',$options['droits']));
|
||||
$this->view->assign('prefs', explode(' ',$options['pref']));
|
||||
$this->view->assign('options', $options);
|
||||
|
||||
$this->view->assign('action', 'update');
|
||||
|
||||
break;
|
||||
|
||||
case 'delete':
|
||||
$action = 'delete';
|
||||
require_once 'Scores/WsScores.php';
|
||||
$ws = new WsScores();
|
||||
$ws->setInfosLogin($login, $action);
|
||||
//Redirect
|
||||
$this->_redirect('/dashboard/users/idClient/'.$idClient);
|
||||
break;
|
||||
|
||||
case 'enable':
|
||||
$action = 'enable';
|
||||
require_once 'Scores/WsScores.php';
|
||||
$ws = new WsScores();
|
||||
$ws->setInfosLogin($login, $action);
|
||||
//Redirect
|
||||
$this->_redirect('/dashboard/users/idClient/'.$idClient);
|
||||
break;
|
||||
|
||||
case 'disable':
|
||||
$action = 'disable';
|
||||
require_once 'Scores/WsScores.php';
|
||||
$ws = new WsScores();
|
||||
$ws->setInfosLogin($login, $action);
|
||||
//Redirect
|
||||
$this->_redirect('/dashboard/users/idClient/'.$idClient);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public function usersearchAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
|
||||
$request = $this->getRequest();
|
||||
$idClient = $request->getParam('idClient');
|
||||
$query = $request->getParam('q');
|
||||
|
||||
$ws = new WsScores();
|
||||
$result = $ws->searchLogin($idClient, $query);
|
||||
|
||||
$items = json_decode($result);
|
||||
|
||||
$output = array();
|
||||
if (count($items)>0){
|
||||
$separator = ", ";
|
||||
foreach ($items as $item) {
|
||||
$output[] = array(
|
||||
'label' => $item->login,
|
||||
'value' => $item->login,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Zend_Registry::get('firebug')->info($output);
|
||||
|
||||
$this->view->assign('output', $output);
|
||||
}
|
||||
|
||||
/**
|
||||
* Affichage du formulaire pour l'envoi des fichiers concernant les nouveautées
|
||||
*/
|
||||
public function newformAction()
|
||||
{
|
||||
//Only the view
|
||||
}
|
||||
|
||||
/**
|
||||
* Réception du fichier des nouveautés et enregistrement des informations
|
||||
*/
|
||||
public function newuploadAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
||||
if ( isset($_FILES) && count($_FILES)==1 ) {
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->data).'/nouveautes';
|
||||
if(!file_exists($path)) mkdir($path);
|
||||
|
||||
$tmp_name = $_FILES['fichier']['tmp_name'];
|
||||
$n = $_FILES['fichier']['name'];
|
||||
|
||||
$name = uniqid('new');
|
||||
|
||||
$extValide = array('pdf');
|
||||
$extension = strrchr($n,'.');
|
||||
$extension = substr($extension,1);
|
||||
//Vérifier l'extension du fichier
|
||||
if(!in_array($extension, $extValide)){
|
||||
echo "Extension de fichier incorrect !";
|
||||
} elseif (move_uploaded_file($tmp_name, $path.'/'.$name.'.'.$extension)){
|
||||
|
||||
$request = $this->getRequest();
|
||||
|
||||
//Enregistrement des informations
|
||||
$data = array(
|
||||
'categorie' => $request->getParam('categorie'),
|
||||
'intitule' => $request->getParam('intitule'),
|
||||
'date' => $request->getParam('date'),
|
||||
'fichier' => $name.'.'.$extension,
|
||||
);
|
||||
$new = new Application_Model_Nouveautes();
|
||||
try {
|
||||
$new->insert($data);
|
||||
echo "Fichier enregistré";
|
||||
} catch(Exception $e) {
|
||||
echo "Erreur lors de l'enregistrement";
|
||||
if ( file_exists($path.'/'.$name.'.'.$extension) ) unlink($path.'/'.$name.'.'.$extension);
|
||||
}
|
||||
|
||||
} else {
|
||||
echo "Erreur";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function newprogressAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
||||
$request = $this->getRequest();
|
||||
$key = $request->getParam('key', '');
|
||||
if (!empty($key)) {
|
||||
//$rep sera égal à false si la clef n'existe pas dans le cache apc
|
||||
$rep = apc_fetch('upload_'.$key);
|
||||
echo json_encode($rep);
|
||||
}
|
||||
}
|
||||
|
||||
public function prestationsAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$idClient = $request->getParam('idClient');
|
||||
$this->view->assign('idClient', $idClient);
|
||||
|
||||
}
|
||||
|
||||
public function prestationAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$idClient = $request->getParam('idClient');
|
||||
$this->view->assign('idClient', $idClient);
|
||||
|
||||
$submitValue = "Créer";
|
||||
|
||||
$id = $request->getParam('id');
|
||||
if ($id!=null) {
|
||||
//Recup param prestation
|
||||
|
||||
$submitValue = "Modifier";
|
||||
}
|
||||
|
||||
$this->view->assign('submitValue', $submitValue);
|
||||
}
|
||||
|
||||
public function prestationsaveAction(){}
|
||||
|
||||
public function tarifsAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$idClient = $request->getParam('idClient');
|
||||
|
||||
$ws = new WsScores();
|
||||
$tarifs = $ws->getClientTarifs($idClient);
|
||||
$this->view->assign('tarifs', $tarifs);
|
||||
|
||||
$this->view->assign('idClient', $idClient);
|
||||
}
|
||||
|
||||
public function tarifAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$idClient = $request->getParam('idClient');
|
||||
|
||||
if ($request->isPost()){
|
||||
$log = $request->getParam('log');
|
||||
$service = $request->getParam('service');
|
||||
$type = $request->getParam('type');
|
||||
$priceUnit = $request->getParam('priceUnit');
|
||||
$date = $request->getParam('date');
|
||||
$duree = $request->getParam('duree');
|
||||
$doublon = $request->getParam('doublon');
|
||||
$ws = new WsScores();
|
||||
$result = $ws->setClientTarif($idClient, $log, $service, $type, $priceUnit, $date, $duree, $doublon);
|
||||
if(is_int($result)) {
|
||||
$url = $this->view->url(array('controller'=>'dashboard','action'=>'tarifs','idClient'=>$idClient));
|
||||
$this->redirect($url);
|
||||
} else {
|
||||
$this->view->assign('log', $log);
|
||||
$this->view->assign('service', $service);
|
||||
$this->view->assign('type', $type);
|
||||
$this->view->assign('priceUnit', $priceUnit);
|
||||
$this->view->assign('date', $date);
|
||||
$this->view->assign('duree', $duree);
|
||||
$this->view->assign('doublon', $doublon);
|
||||
$this->view->assign('error', $result);
|
||||
}
|
||||
}
|
||||
$this->view->assign('idClient', $idClient);
|
||||
}
|
||||
|
||||
public function serviceAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$idClient = $request->getParam('idClient');
|
||||
|
||||
$ws = new WsScores();
|
||||
|
||||
if ( $request->isPost() ) {
|
||||
|
||||
$code = $request->getParam('code');
|
||||
$label = $request->getParam('label');
|
||||
$droitsP = $request->getParam('droits');
|
||||
$droits = join(' ', $droitsP);
|
||||
$infos = array(
|
||||
'code' => $code,
|
||||
'label' => $label,
|
||||
'droits' => $droits,
|
||||
);
|
||||
$result = $ws->setService($idClient, json_encode($infos));
|
||||
if(is_int($result)) {
|
||||
$this->view->assign('message', 'Service crée.');
|
||||
} else {
|
||||
$this->view->assign('message', $result);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
//Droits du client
|
||||
|
||||
//Liste des catégories d'accès
|
||||
$reponse = $ws->getCategory();
|
||||
$wscategory = $reponse->item;
|
||||
$this->view->assign('wscategory', $wscategory);
|
||||
|
||||
//Liste de tous les droits
|
||||
$listeDroits = $ws->getListeDroits();
|
||||
$droitsLib = array();
|
||||
foreach($listeDroits->item as $droit) {
|
||||
$droitsLib[strtoupper($droit->code)] = $droit->desc;
|
||||
}
|
||||
$this->view->assign('droitsLib', $droitsLib);
|
||||
|
||||
//Customer informations
|
||||
$reponse = $ws->getNextLogin($idClient);
|
||||
$this->view->assign('droitsClients', explode(' ', strtolower($reponse->result->droitsClients)));
|
||||
|
||||
}
|
||||
|
||||
$this->view->assign('idClient', $idClient);
|
||||
}
|
||||
|
||||
}
|
@ -1,124 +0,0 @@
|
||||
<?php
|
||||
class DirigeantController extends Zend_Controller_Action
|
||||
{
|
||||
protected $siret;
|
||||
protected $id;
|
||||
|
||||
public function init()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$this->siret = $request->getParam('siret');
|
||||
$this->id = $request->getParam('id', 0);
|
||||
|
||||
require_once 'Scores/WsScores.php';
|
||||
require_once 'Scores/SessionEntreprise.php';
|
||||
require_once 'common/dates.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* Forward
|
||||
*/
|
||||
public function indexAction()
|
||||
{
|
||||
$this->_forward('index', 'index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Affichage de la liste des dirigeants
|
||||
*/
|
||||
public function listeAction()
|
||||
{
|
||||
$siren = substr($this->siret, 0, 9);
|
||||
|
||||
$this->view->headTitle()->append('Liste des dirigeants');
|
||||
$this->view->headTitle()->append('Siret '.$this->siret);
|
||||
|
||||
$ws = new WsScores();
|
||||
$infos = $ws->getDirigeants($siren);
|
||||
|
||||
if ($infos === false){
|
||||
$this->_forward('soap', 'error');
|
||||
}
|
||||
|
||||
$dirigeants = $infos->result->item;
|
||||
|
||||
$session = new SessionEntreprise($this->siret, $this->id);
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
if ($user->checkPerm('dirigeantsop')){
|
||||
$href = $this->view->url(array('controller'=>'dirigeant', 'action'=>'op', 'siret'=>$this->siret));
|
||||
$this->view->assign('dirigeantsop', $href);
|
||||
}
|
||||
|
||||
$this->view->assign('siren', $siren);
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('raisonSociale', $session->getRaisonSociale());
|
||||
$this->view->assign('dirigeants', $dirigeants);
|
||||
$this->view->assign('exportObjet', $dirigeants);
|
||||
|
||||
$this->view->assign('AutrePage', $this->getRequest()->getParam('apage'));
|
||||
$this->view->assign('surveillance', $user->checkPerm('survdirigeants'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Affichage de l'historiques des dirigeants
|
||||
*/
|
||||
public function histoAction()
|
||||
{
|
||||
$siren = substr($this->siret, 0, 9);
|
||||
|
||||
$this->view->headTitle()->append('Historique des dirigeants');
|
||||
$this->view->headTitle()->append('Siret '.$this->siret);
|
||||
|
||||
$ws = new WsScores();
|
||||
$infos = $ws->getDirigeants($siren, true);
|
||||
|
||||
if ($infos === false){
|
||||
$this->_forward('soap', 'error');
|
||||
}
|
||||
|
||||
$dirigeants = $infos->result->item;
|
||||
|
||||
$session = new SessionEntreprise($this->siret, $this->id);
|
||||
|
||||
$this->view->assign('dirigeants', $dirigeants);
|
||||
$this->view->assign('exportObjet', $dirigeants);
|
||||
$this->view->assign('siren', $siren);
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('raisonSociale', $session->getRaisonSociale());
|
||||
$this->view->assign('infos', $infos);
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
$this->view->assign('surveillance', $user->checkPerm('survdirigeants'));
|
||||
}
|
||||
|
||||
public function opAction()
|
||||
{
|
||||
$siren = substr($this->siret, 0, 9);
|
||||
|
||||
$this->view->headTitle()->append('Liste des dirigeants opérationnels');
|
||||
$this->view->headTitle()->append('Siret '.$this->siret);
|
||||
|
||||
$ws = new WsScores();
|
||||
$infos = $ws->getDirigeantsOp($siren);
|
||||
|
||||
if ($infos === false){
|
||||
$this->_forward('soap', 'error');
|
||||
}
|
||||
|
||||
$dirigeants = $infos->item;
|
||||
|
||||
$session = new SessionEntreprise($this->siret, $this->id);
|
||||
|
||||
$this->view->assign('siren', $siren);
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('raisonSociale', $session->getRaisonSociale());
|
||||
$this->view->assign('dirigeants', $dirigeants);
|
||||
$this->view->assign('exportObjet', $dirigeants);
|
||||
|
||||
$this->view->assign('AutrePage', $this->getRequest()->getParam('apage'));
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
$this->view->assign('surveillance', $user->checkPerm('survdirigeants'));
|
||||
}
|
||||
}
|
@ -1,92 +0,0 @@
|
||||
<?php
|
||||
class ErrorController extends Zend_Controller_Action
|
||||
{
|
||||
public function init(){}
|
||||
|
||||
public function errorAction()
|
||||
{
|
||||
$params = $this->getRequest()->getParams();
|
||||
$unknow = array('MSOffice', '_vti_bin', 'crossdomain.xml');
|
||||
if (in_array($params['controller'], $unknow)){
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
echo '';
|
||||
} else {
|
||||
|
||||
$errors = $this->_getParam('error_handler');
|
||||
switch ($errors->type) {
|
||||
case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ROUTE:
|
||||
case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:
|
||||
case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:
|
||||
|
||||
// 404 error -- controller or action not found
|
||||
$this->getResponse()->setHttpResponseCode(404);
|
||||
$this->view->message = 'Page not found';
|
||||
break;
|
||||
|
||||
default:
|
||||
// application error
|
||||
$this->getResponse()->setHttpResponseCode(500);
|
||||
$this->view->message = 'Application error';
|
||||
break;
|
||||
}
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
|
||||
//Envoyer les erreurs par mail
|
||||
if (APPLICATION_ENV != 'development') {
|
||||
$message = '';
|
||||
$message.= 'Erreur Applicative : ';
|
||||
$message.= "\n";
|
||||
$message.= 'Message : '.$errors->exception->getMessage();
|
||||
$message.= "\n";
|
||||
$message.= 'Utilisateur : '.$user->getLogin();
|
||||
$message.= "\n";
|
||||
$message.= "File :".$errors->exception->getFile().", Ligne : ".$errors->exception->getLine();
|
||||
$message.= "\n";
|
||||
$message.= "Detail :\n".$errors->exception->getTraceAsString();
|
||||
$message.= "\n\n";
|
||||
$message.= "Request Parameters :\n ".print_r($this->getRequest()->getParams(), true)."\n";
|
||||
|
||||
$message.= "Referer : ".$_SERVER['HTTP_REFERER']."\n";
|
||||
|
||||
$c = Zend_Registry::get('config');
|
||||
require_once 'Scores/Mail.php';
|
||||
$mail = new Mail();
|
||||
$mail->setSubject('[ERREUR APPLICATIVE] - '.$c->profil->server->name.' -'.date('Ymd'));
|
||||
$mail->setBodyTexte($message);
|
||||
$mail->setFrom('supportdev');
|
||||
$mail->addToKey('supportdev');
|
||||
$mail->send();
|
||||
}
|
||||
// Log exception, if logger available
|
||||
if ($log = $this->getLog()) {
|
||||
$log->crit($this->view->message, $errors->exception);
|
||||
}
|
||||
|
||||
// conditionally display exceptions
|
||||
if ($this->getInvokeArg('displayExceptions') == true) {
|
||||
$this->view->exception = $errors->exception;
|
||||
}
|
||||
|
||||
$this->view->request = $errors->request;
|
||||
}
|
||||
}
|
||||
|
||||
public function soapAction(){}
|
||||
|
||||
public function permsAction(){}
|
||||
|
||||
public function paramsAction(){}
|
||||
|
||||
public function getLog()
|
||||
{
|
||||
$bootstrap = $this->getInvokeArg('bootstrap');
|
||||
if (!$bootstrap->hasPluginResource('Log')) {
|
||||
return false;
|
||||
}
|
||||
$log = $bootstrap->getResource('Log');
|
||||
return $log;
|
||||
}
|
||||
}
|
||||
|
@ -1,826 +0,0 @@
|
||||
<?php
|
||||
class EvaluationController extends Zend_Controller_Action
|
||||
{
|
||||
protected $siret = null;
|
||||
protected $id = 0;
|
||||
|
||||
public function init()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$this->siret = $request->getParam('siret');
|
||||
$this->id = $request->getParam('id', 0);
|
||||
|
||||
require_once 'common/dates.php';
|
||||
require_once 'Scores/WsScores.php';
|
||||
require_once 'Scores/SessionEntreprise.php';
|
||||
require_once 'Scores/IdentiteEntreprise.php';
|
||||
require_once 'Finance/RatiosData.php';
|
||||
}
|
||||
|
||||
public function indexAction()
|
||||
{
|
||||
$this->_forward('entreprise', 'recherche');
|
||||
}
|
||||
|
||||
/**
|
||||
* Affichage d'une reglette représentant le score
|
||||
*/
|
||||
public function printscoresAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$request = $this->getRequest();
|
||||
$score = strtolower($request->getParam('score'));
|
||||
|
||||
if( $score == 'indiscore' ){
|
||||
$user = new Scores_Utilisateur();
|
||||
switch($user->getTypeScore()) {
|
||||
case '20': $score.='20'; break;
|
||||
case '100':
|
||||
default: $score.='100'; break;
|
||||
}
|
||||
}
|
||||
|
||||
$note = $request->getParam('note');
|
||||
$bornes = array(
|
||||
'conanh' => array( 'min' => -4.5 , 'max' => 16 ),
|
||||
'afdcc2' => array( 'min' => 0 , 'max' => 5 ),
|
||||
'afdcc1' => array( 'min' => -10 , 'max' => 10 ),
|
||||
'z' => array( 'min' => -3 , 'max' => 3 ),
|
||||
'indiscore100' => array( 'min' => 0 , 'max' => 100 ),
|
||||
'indiscore20' => array( 'min' => 0 , 'max' => 20 ),
|
||||
);
|
||||
$note = round(($note - $bornes[$score]['min'])*100/($bornes[$score]['max'] - $bornes[$score]['min']));
|
||||
|
||||
if($note < 0) $note = 0;
|
||||
if($note > 100) $note = 100;
|
||||
|
||||
$this->view->assign('note', $note);
|
||||
$this->view->assign('min', $bornes[$score]['min']);
|
||||
$this->view->assign('max', $bornes[$score]['max']);
|
||||
}
|
||||
|
||||
/**
|
||||
* IndiScore
|
||||
*/
|
||||
public function indiscoreAction()
|
||||
{
|
||||
$user = new Scores_Utilisateur();
|
||||
|
||||
if(!$user->checkPerm('INDISCORE') && !$user->checkPerm('INDISCOREP'))
|
||||
$this->_forward('perms', 'error');
|
||||
|
||||
$this->view->assign('edition', $user->checkModeEdition());
|
||||
|
||||
$request = $this->getRequest();
|
||||
$autrePage = $request->getParam('apage');
|
||||
|
||||
//Récupération des informations
|
||||
if (empty($autrePage)) {
|
||||
$plus = false;
|
||||
if ($user->checkPerm('indiscorep')){
|
||||
$plus = true;
|
||||
}
|
||||
$ref = $request->getParam('ref', '');
|
||||
$encours = $request->getParam('encours', 0);
|
||||
$email = $request->getParam('email', '');
|
||||
|
||||
$ws = new WsScores();
|
||||
$infos = $ws->getIndiScore(substr($this->siret, 0,9), 0, 1, $plus, $ref, $encours, $email);
|
||||
if ($infos === false) $this->_forward('soap', 'error');
|
||||
} else {
|
||||
$infos = $this->getRequest()->getParam('infos');
|
||||
}
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('typeScore', $user->getTypeScore());
|
||||
$this->view->assign('indiscore', $infos);
|
||||
$this->view->assign('AutrePage', $autrePage);
|
||||
$this->view->assign('exportObjet', $infos);
|
||||
|
||||
$this->view->assign('aviscredit', $user->checkPerm('aviscredit'));
|
||||
$this->view->assign('surveillance', $user->checkPerm('survscore'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Rapport de synthese
|
||||
*/
|
||||
public function indiscore2Action()
|
||||
{
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/finance.js', 'text/javascript');
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
|
||||
if(!$user->checkPerm('INDISCORE2') && !$user->checkPerm('INDISCORE2P'))
|
||||
$this->_forward('perms', 'error');
|
||||
|
||||
$siren = substr($this->siret,0,9);
|
||||
|
||||
$ws = new WsScores();
|
||||
$entreprise = new SessionEntreprise($this->siret, $this->id);
|
||||
$identite = $ws->getIdentite($siren);
|
||||
$indiscore = $ws->getIndiScore($siren);
|
||||
$infos = $ws->getRatios($siren, 'indiscore2'); // @todo : vérifier la page
|
||||
|
||||
$score = array();
|
||||
$tabRatio = array(
|
||||
'r5' => array('total'=>'r5', 'total_info'=>'% ca', 'op' => 1000, 'titre'=>'CHIFFRE D\'AFFAIRES'),
|
||||
'r16' => array('total'=>'r5', 'total_info'=>'% ca', 'op' => 1000, 'titre'=>'RESULTAT D\'EXPLOITATION'),
|
||||
'r7' => array('total'=>'r5', 'total_info'=>'% ca', 'op' => 1000, 'titre'=>'RESULTAT COURANT'),
|
||||
'r10' => array('total'=>'r5', 'total_info'=>'% ca', 'op' => 1000, 'titre'=>'RESULTAT NET'),
|
||||
'r18' => array('total'=>'r22', 'total_info'=>'% bilan', 'op' => 1000, 'titre'=>'FONDS PROPRES'),
|
||||
'r231' => array('total'=>'r22', 'total_info'=>'% bilan', 'op' => 1000, 'titre'=>'FONDS DE ROULEMENT'),
|
||||
'r232' => array('total'=>'r22', 'total_info'=>'% bilan', 'op' => 1000, 'titre'=>'BESOIN EN FONDS DE ROULEMENT'),
|
||||
'r249' => array('total'=>'', 'total_info'=>'', 'op' => 1000, 'titre'=>'TRESORERIE NETTE'),
|
||||
'r20' => array('total'=>'r5', 'total_info'=>'% ca', 'op' => 1000, 'titre'=>'FRAIS FINANCIER'),
|
||||
);
|
||||
|
||||
//Formattage des données
|
||||
$typeBilan = 'N';
|
||||
$ratiosData = new RatiosData($infos);
|
||||
|
||||
$nbBilanN = $ratiosData->getNbBilan('N');
|
||||
$nbBilanC = $ratiosData->getNbBilan('C');
|
||||
|
||||
if ($nbBilanN!=0)
|
||||
{
|
||||
foreach($tabRatio as $idRatio => $valRatio){
|
||||
$tabRatio[$idRatio]['comment'] = $ratiosData->wrapComment($idRatio);
|
||||
}
|
||||
$this->view->assign('tabRatio', $tabRatio);
|
||||
|
||||
$infosAnnee = $ratiosData->getBilansInfo($typeBilan);
|
||||
$annees = array_keys($infosAnnee);
|
||||
|
||||
//On prend les 3 derniers bilans pour l'affichage
|
||||
$nbMaxBilan = 3;
|
||||
rsort($annees);
|
||||
$annees = array_slice($annees, 0, $nbMaxBilan);
|
||||
sort($annees);
|
||||
$tabResult = array();
|
||||
foreach($annees as $annee){
|
||||
$data = array();
|
||||
$dataEvol = array();
|
||||
//Formatter les données
|
||||
foreach($tabRatio as $idRatio => $valRatio){
|
||||
$data[$idRatio] = $ratiosData->dRatio($typeBilan, $annee, $idRatio);
|
||||
$dataTotal[$idRatio] = $ratiosData->dTotal($typeBilan, $annee, $idRatio, $valRatio['total']);
|
||||
$dInfo[$idRatio] = $valRatio['total_info'];
|
||||
}
|
||||
$tabResult[] = array(
|
||||
'dateCloture' => WDate::dateT('Ymd','d/m/Y',$annee),
|
||||
'duree' => $infosAnnee[$annee]->duree.' Mois',
|
||||
'ratio' => $data,
|
||||
'total' => $dataTotal,
|
||||
'info' => $dInfo,
|
||||
);
|
||||
}
|
||||
$this->view->assign('tabResult', $tabResult);
|
||||
}
|
||||
|
||||
$this->view->assign('tabRatio', $tabRatio);
|
||||
/*
|
||||
Correction pour indiscore seule
|
||||
$indiscore->Siege;
|
||||
$indiscore->SiretSiege;
|
||||
$indiscore->NumRC;
|
||||
*/
|
||||
$indiscore->SiretSiege = $identite->SiretSiege;
|
||||
|
||||
$identite = new IdentiteEntreprise($identite);
|
||||
//Définition des blocks
|
||||
$blocks = array(
|
||||
'Siret',
|
||||
'SiretSiege',
|
||||
'NumRC',
|
||||
'Actif',
|
||||
'RaisonSociale',
|
||||
'FormeJuridique',
|
||||
'DateImmat',
|
||||
'DateCreaEt',
|
||||
'Adresse',
|
||||
'ActiviteEn',
|
||||
'Naf4',
|
||||
'OrigineFond',
|
||||
'TypeExploitation',
|
||||
'Saisonnalite',
|
||||
'Capital',
|
||||
'ChiffreAffaire',
|
||||
);
|
||||
$dBlock = array();
|
||||
foreach ($blocks as $item) {
|
||||
$display = array(
|
||||
'label' => method_exists($identite, 'get'.$item.'Label') ? $identite->{'get'.$item.'Label'}() : '',
|
||||
'texte' => method_exists($identite, 'get'.$item.'Texte') ? $identite->{'get'.$item.'Texte'}() : '',
|
||||
'titre' => method_exists($identite, 'get'.$item.'Titre') ? $identite->{'get'.$item.'Titre'}() : '',
|
||||
);
|
||||
$dBlock[$item] = $display;
|
||||
}
|
||||
$this->view->assign('dBlock', $dBlock);
|
||||
|
||||
$dateRadiation = '';
|
||||
if(isset($indiscore->DateRadiation) && $indiscore->DateRadiation!='' && $indiscore->DateRadiation!='0000-00-00')
|
||||
$this->view->assign('dateRadiation', WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$indiscore->DateRadiation)));
|
||||
|
||||
foreach($indiscore->scores as $name => $sc){
|
||||
if($name == 'ConanH')
|
||||
$score[$name] = array($sc, 'Score Conan Holder');
|
||||
if($name == 'Afdcc2')
|
||||
$score[$name] = array($sc, 'Score Afdcc 2');
|
||||
if($name == 'Z')
|
||||
$score[$name] = array($sc, 'Score Z');
|
||||
}
|
||||
|
||||
$typeScore = $user->getTypeScore();
|
||||
switch($typeScore) {
|
||||
case '20':
|
||||
$maxIndiscore = $typeScore;
|
||||
$score['Indiscore'] = array($indiscore->Indiscore20, 'IndiScore');
|
||||
break;
|
||||
case '100':
|
||||
default:
|
||||
$maxIndiscore = empty($typeScore)? '100' : $typeScore;
|
||||
$score['Indiscore'] = array($indiscore->Indiscore, 'IndiScore');
|
||||
break;
|
||||
}
|
||||
|
||||
$score['Indiscore'] = array($indiscore->Indiscore20, 'IndiScore');
|
||||
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('id', $this->id);
|
||||
$this->view->assign('siren', $siren);
|
||||
|
||||
$this->view->assign('encours', $indiscore->encours);
|
||||
$this->view->assign('TendanceIndiscore', $indiscore->TendanceIndiscore);
|
||||
$this->view->assign('SituationJuridique', $indiscore->SituationJuridique);
|
||||
$this->view->assign('paiement', $indiscore->infoPaiement);
|
||||
|
||||
$this->view->assign('scores', $score);
|
||||
|
||||
$this->view->assign('bilanReference', $bilanReference);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rapport complet
|
||||
*/
|
||||
public function indiscore3Action()
|
||||
{
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/evaluation.js', 'text/javascript');
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
if(!$user->checkPerm('INDISCORE3') && !$user->checkPerm('INDISCORE3P'))
|
||||
$this->_forward('perms', 'error');
|
||||
|
||||
// Lien pour le rapport personnalisé
|
||||
if ($user->getIdClient() == '110' || $user->checkModeEdition()) {
|
||||
$this->view->assign('customRapport', $this->view->url(array(
|
||||
'controller'=>'evaluation',
|
||||
'action'=>'customindiscore3',
|
||||
'siret'=>$this->siret,
|
||||
'id'=>$this->id)
|
||||
));
|
||||
}
|
||||
|
||||
$sessionEntreprise = new SessionEntreprise($this->siret, $this->id);
|
||||
$ws = new WsScores();
|
||||
$siren = substr($this->siret,0,9);
|
||||
|
||||
$plus = false;
|
||||
if ($user->checkPerm('indiscore3p')){
|
||||
$plus = true;
|
||||
}
|
||||
$request = $this->getRequest();
|
||||
$ref = $request->getParam('ref', '');
|
||||
$encours = $request->getParam('encours', 0);
|
||||
$email = $request->getParam('email', '');
|
||||
|
||||
$infos = $ws->getRapport($siren, 3, 0, $plus, $ref, $encours, $email);
|
||||
|
||||
$this->view->assign('Identite', $infos->Identite);
|
||||
$this->view->assign('Dirigeants', $infos->Dirigeants);
|
||||
$this->view->assign('Liens', $infos->Liens);
|
||||
$this->view->assign('Annonces', $infos->Annonces);
|
||||
$this->view->assign('Ratios', $infos->Ratios);
|
||||
$this->view->assign('Indiscore', $infos->Indiscore);
|
||||
|
||||
require_once 'Scores/RapportComment.php';
|
||||
$rapportComment = new RapportComment($siren, $this->id, $infos->Indiscore->tabCommentaires->item, $infos->Ratios, $infos->Indiscore->tabVariables);
|
||||
$this->view->assign('comment',$rapportComment->out());
|
||||
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('id', $this->id);
|
||||
$this->view->assign('siren', $siren);
|
||||
$this->view->assign('raisonSociale', $sessionEntreprise->getRaisonSociale());
|
||||
$this->view->assign('exportObjet', $infos);
|
||||
}
|
||||
|
||||
/**
|
||||
* Génération de rapport personnalisé
|
||||
* @todo : à améliorer
|
||||
*/
|
||||
public function customindiscore3Action()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
|
||||
$request = $this->getRequest();
|
||||
$upload = $request->getParam('upload', null);
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
|
||||
if (empty($upload)){
|
||||
$adresse = array();
|
||||
if ($user->checkModeEdition()){
|
||||
$adresse[] = 'Order to Cash';
|
||||
$adresse[] = '70 AVENUE DE LA MARNE ';
|
||||
$adresse[] = '92600 ASNIERES SUR SEINE';
|
||||
$color1 = '#DFDB00';
|
||||
$color2 = '#EFED9A';
|
||||
$background = "background-image:url('/themes/default/images/customrapport/logo_ordertocash.jpg');background-repeat:no-repeat;background-position:center";
|
||||
} else {
|
||||
$adresse[] = 'Financement Entreprise';
|
||||
$adresse[] = '16 RUE SENAC DE MEILHAN';
|
||||
$adresse[] = '17000 LA ROCHELLE';
|
||||
$color1 = '#6699FF';
|
||||
$color2 = '##66CCFF';
|
||||
$background = null;
|
||||
}
|
||||
|
||||
$this->view->assign('adresse', $adresse);
|
||||
$this->view->assign('color1', $color1);
|
||||
$this->view->assign('color2', $color2);
|
||||
$this->view->assign('background', $background);
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('id', $this->id);
|
||||
|
||||
} else {
|
||||
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
||||
$couleurh1 = $request->getParam('couleurh1', null);
|
||||
$couleurh2 = $request->getParam('couleurh2', null);
|
||||
$texth1 = $request->getParam('texth1', null);
|
||||
$texth2 = $request->getParam('texth2', null);
|
||||
$societe_name = $request->getParam('societe_name', null);
|
||||
$adresse = $request->getParam('adresse', null);
|
||||
$logo_background = $request->getParam('logo_background', null);
|
||||
|
||||
$siren = substr($this->siret, 0, 9);
|
||||
|
||||
if ($this->id!=0){
|
||||
$file = 'evaluation-indiscore3-'.$this->siret.'-'.$this->id.'.html';
|
||||
} else {
|
||||
$file = 'evaluation-indiscore3-'.$this->siret.'.html';
|
||||
}
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = $c->profil->path->pages;
|
||||
if (file_exists($path.'/'.$file))
|
||||
{
|
||||
$doc = new DOMDocument();
|
||||
$doc->preserveWhiteSpace = true;
|
||||
@$doc->loadHTMLFile($path.'/'.$file);
|
||||
|
||||
//Générer style particulier pour le rapport
|
||||
$style.= 'body { background-color:#ffffff; }';
|
||||
$style.= '#customRapport { display:none; }';
|
||||
$style.= '#center h1 {background-color:'.$couleurh1.';color:'.$texth1.'}';
|
||||
if($logo_background) {
|
||||
$style.= '#center {background-image:url(./themes/default/images/customrapport/logo_ordertocash.jpg);background-repeat:repeat-y}';
|
||||
}
|
||||
$style.= '#center h2 {background-color:'.$couleurh2.';color:'.$texth2.'}';
|
||||
|
||||
$styleDom = $doc->createElement('style', $style);
|
||||
|
||||
//Ajout information
|
||||
$contentDom = $doc->createElement('div');
|
||||
if(!$user->checkModeEdition()) {
|
||||
$element = $doc->createElement('img');
|
||||
$element->setAttribute('src', './themes/default/images/customrapport/logo_ordertocash.jpg');
|
||||
$element->setAttribute('width', '12%');
|
||||
} else {
|
||||
$element = $doc->createElement('img');
|
||||
$element->setAttribute('src', './themes/default/images/customrapport/logo_ordertocash.jpg');
|
||||
$element->setAttribute('width', '12%');
|
||||
}
|
||||
$div = $doc->createElement('div');
|
||||
$div->setAttribute('style', "clear:both;");
|
||||
$div->appendChild($element);
|
||||
$contentDom->appendChild($div);
|
||||
|
||||
$i = 0;
|
||||
foreach($adresse as $item){
|
||||
$element = $doc->createElement('span', $item);
|
||||
$contentDom->appendChild($element);
|
||||
$element = $doc->createElement('br');
|
||||
$contentDom->appendChild($element);
|
||||
$i++;
|
||||
}
|
||||
|
||||
$element = $doc->createElement('center', $societe_name.' Enquête Financière');
|
||||
$element->setAttribute('style', 'font-size:17px');
|
||||
$contentDom->appendChild($element);
|
||||
|
||||
if(!$user->checkModeEdition()){
|
||||
$element = $doc->createElement('span', "Les équipes d'Order To Cash se tiennent à votre disposition pour vous assister dans l'interprétation de ces données au 01 47 90 94 31 ou par mail à l'adresse suivante : contact@ordertocash.fr");
|
||||
$contentDom->appendChild($element);
|
||||
}
|
||||
|
||||
$ajout = $doc->createElement('div');
|
||||
$ajout->appendChild($styleDom);
|
||||
$ajout->appendChild($contentDom);
|
||||
|
||||
//Après <div id="center"> on insére le contenu
|
||||
$body = $doc->getElementsByTagName('body')->item(0);
|
||||
$div = $body->getElementsByTagName('div');
|
||||
foreach($div as $item){
|
||||
if ($item->hasAttribute('id') && $item->getAttribute('id') == 'center'){
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$item->parentNode->insertBefore($ajout, $item);
|
||||
$xml = $doc->saveXML();
|
||||
|
||||
$c = Zend_Registry::get('config');
|
||||
$outfile = $c->profil->path->pages.'/p'.$user->getIdClient().'-'.$file;
|
||||
file_put_contents($outfile, $xml);
|
||||
|
||||
//Génération du pdf
|
||||
require_once 'wkhtmltopdf/wkhtmltopdf.php';
|
||||
$wkhtmltopdf = new wkhtmltopdf();
|
||||
$wkhtmltopdf->setOptions('footer-right', 'Page [page] sur [toPage]');
|
||||
$wkhtmltopdf->setOptions('header-right', date('d/m/Y H:i:s'));
|
||||
$pdfFile = $wkhtmltopdf->exec($outfile);
|
||||
|
||||
if (file_exists($pdfFile)){
|
||||
echo '<center>Votre fichier est prêt pour être téléchargé !<br />' .
|
||||
'<a target="_blank" href="'.$this->view->url(
|
||||
array('controller'=>'fichier',
|
||||
'action'=>'customrapport',
|
||||
'fichier'=>basename($pdfFile)), null, true).'">Télécharger</a></center>';
|
||||
} else {
|
||||
echo "Erreur lors de la génération du PDF.";
|
||||
}
|
||||
} else {
|
||||
echo "Erreur fichier non présent !";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Enquete commerciale
|
||||
* @todo : Vérifier l'enregistrement
|
||||
*/
|
||||
public function enquetecAction()
|
||||
{
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/enquetec.js', 'text/javascript');
|
||||
|
||||
//isset($_REQUEST['pays']) ? $pays=$_REQUEST['pays'] : $pays='' ;
|
||||
|
||||
$commandeEnquete = false;
|
||||
$request = $this->getRequest();
|
||||
|
||||
if ($request->isPost()){
|
||||
|
||||
$InfoUser = $request->getParam('InfoUser');
|
||||
$InfoEnq = $request->getParam('InfoEnq');
|
||||
|
||||
//Affichage de la demande
|
||||
//Vérification des informations
|
||||
$formError = false;
|
||||
$fields = array();
|
||||
|
||||
//Info utilisateur obligatoire :
|
||||
if($InfoUser['Identite']==''){ $fields[] ='Votre Identite'; $formError=true;}
|
||||
if($InfoUser['Tel']==''){ $fields[] ='Votre Téléphone'; $formError=true;}
|
||||
if($InfoUser['Email']==''){ $fields[] ='Votre Email'; $formError=true;}
|
||||
|
||||
//Info entreprise obligatoire :
|
||||
if( isset($InfoEnq['Type']) && $InfoEnq['Type']==''){ $fields[] ='Choix du type d\'enquête'; $formError=true;}
|
||||
if($InfoEnq['PrecisionsChoix']=='1'){
|
||||
if($InfoEnq['Precisions']['Motif']==''){ $fields[] ='Mofif de la demande'; $formError=true;}
|
||||
}elseif($InfoEnq['PrecisionsChoix']=='3' || $InfoEnq['PrecisionsChoix']=='4'){
|
||||
if($InfoEnq['Precisions']['MontantCA']==''){ $fields[] ='Précisions de la demande'; $formError=true;}
|
||||
}elseif($InfoEnq['PrecisionsChoix']=='5'){
|
||||
if($InfoEnq['Precisions']['Autre']==''){ $fields[] ='Précisions de la demande'; $formError=true;}
|
||||
}
|
||||
|
||||
if(isset($InfoEnq['ImpayeesChoix']) && $InfoEnq['ImpayeesChoix']=='oui' ){
|
||||
if($InfoEnq['Impayees']['Montant']=='' || $InfoEnq['Impayees']['Nombre']=='' || $InfoEnq['Impayees']['Date']==''){ $fields[] ='Précisions sur les impayées'; $formError=true;}
|
||||
}
|
||||
if(isset($InfoEnq['RetardPaiementChoix']) && $InfoEnq['RetardPaiementChoix']=='oui' ){
|
||||
if($InfoEnq['RetardPaiement']['Montant']=='' || $InfoEnq['Nombre']=='' || $InfoEnq['RetardPaiement']['Date']==''){ $fields[] ='Précisions sur le retarde de paiement'; $formError=true;}
|
||||
}
|
||||
if(isset($_REQUEST['InfoEnq']['LitigeChoix']) && $_REQUEST['InfoEnq']['LitigeChoix']=='oui' ){
|
||||
if($_REQUEST['InfoEnq']['Litige']['Precisions']=='' || $_REQUEST['InfoEnq']['Litige']['Precisions']==''){ $fields[] ='Précisions sur le litige'; $formError=TRUE;}
|
||||
}
|
||||
|
||||
if ($formError==true){
|
||||
$message = '<font color="red">';
|
||||
$message.= 'Veuillez remplir les champs suivants : ';
|
||||
$message.= join(', ', $fields);
|
||||
$message.= '</font>';
|
||||
}else{
|
||||
$InfoDemande = $InfoUser;
|
||||
$siren = $InfoEnq['Siren'];
|
||||
unset($InfoEnq['Siren']);
|
||||
//Suppression et assigation des valeurs pour le webservice
|
||||
if($InfoEnq['PrecisionsChoix'] = 1){
|
||||
$InfoEnq['Precisions']['Type'] = "Enquête sur un client (contrôle crédit)";
|
||||
unset($InfoEnq['PrecisionsChoix']);
|
||||
}elseif($InfoEnq['PrecisionsChoix']==2){
|
||||
$InfoEnq['Precisions']['Type'] = "Enquête sur un prospect (ouverture de compte)";
|
||||
unset($InfoEnq['PrecisionsChoix']);
|
||||
}elseif($InfoEnq['PrecisionsChoix']==3){
|
||||
$InfoEnq['Precisions']['Type'] = "Enquête sur un fournisseur stratégique";
|
||||
unset($InfoEnq['PrecisionsChoix']);
|
||||
}elseif($InfoEnq['PrecisionsChoix']==4){
|
||||
$InfoEnq['Precisions']['Type'] = "Enquête sur un fournisseur non stratégique";
|
||||
unset($InfoEnq['PrecisionsChoix']);
|
||||
}elseif($InfoEnq['PrecisionsChoix']==5){
|
||||
$InfoEnq['Precisions']['Type'] = "Autre type d'enquête (Précisez...)";
|
||||
unset($InfoEnq['PrecisionsChoix']);
|
||||
}
|
||||
|
||||
$ws = new WsScore();
|
||||
$result = $ws->commandeEnquete($siren, $InfoEnq, $InfoDemande);
|
||||
if ($result === false) {
|
||||
$this->_forward('soap', 'error');
|
||||
} else {
|
||||
$this->view->assign('annee', substr($result->dateCommande,0,4));
|
||||
$this->view->assign('mois', substr($result->dateCommande,4,2));
|
||||
$this->view->assign('jour', substr($result->dateCommande,6,2));
|
||||
$this->view->assign('heure', substr($result->dateCommande,8,2));
|
||||
$this->view->assign('minutes', substr($result->dateCommande,10,2));
|
||||
$this->view->assign('ref', substr($result->refCmde,1));
|
||||
$this->view->assign('siren', $result->siren);
|
||||
$commandeEnquete = true;
|
||||
}
|
||||
$this->view->assign('commandeEnquete', $commandeEnquete);
|
||||
}
|
||||
$this->view->assign('formError', $formError);
|
||||
$this->view->assign('message', $message);
|
||||
$this->view->assign('InfoUser', $InfoUser);
|
||||
$this->view->assign('InfoEnq', $InfoEnq);
|
||||
}
|
||||
|
||||
if ($commandeEnquete == false) {
|
||||
$ws = new WsScores();
|
||||
$infosEntrep = $ws->getIdentite($this->siret, $this->id);
|
||||
$this->view->assign('Etab', $infosEntrep);
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
$this->view->assign('user', $user);
|
||||
}
|
||||
|
||||
|
||||
$this->view->assign('commandeEnquete', $commandeEnquete);
|
||||
}
|
||||
|
||||
public function aviscreditAction()
|
||||
{
|
||||
$commande = false;
|
||||
|
||||
$request = $this->getRequest();
|
||||
|
||||
//Reception des données du formulaire
|
||||
if ($request->isPost())
|
||||
{
|
||||
$InfoUser = $request->getParam('InfoUser');
|
||||
$InfoEnq = $request->getParam('InfoEnq');
|
||||
|
||||
$formError = false;
|
||||
$fields = array();
|
||||
|
||||
//Info utilisateur obligatoire :
|
||||
if($InfoUser['Identite']==''){
|
||||
$fields[] ='Votre Identite'; $formError=true;
|
||||
}
|
||||
if($InfoUser['Tel']==''){
|
||||
$fields[] ='Votre Téléphone'; $formError=true;
|
||||
}
|
||||
if($InfoUser['Email']==''){
|
||||
$fields[] ='Votre Email'; $formError=true;
|
||||
}
|
||||
|
||||
//Info entreprise obligatoire :
|
||||
if( isset($InfoEnq['Type']) && $InfoEnq['Type']==''){
|
||||
$fields[] ='Choix du type d\'enquête'; $formError=true;
|
||||
}
|
||||
|
||||
if(isset($InfoEnq['ImpayeesChoix']) && $InfoEnq['ImpayeesChoix']=='oui' ){
|
||||
if($InfoEnq['Impayees']['Montant']=='' || $InfoEnq['Impayees']['Nombre']=='' || $InfoEnq['Impayees']['Date']==''){
|
||||
$fields[] ='Précisions sur les impayées'; $formError=true;
|
||||
}
|
||||
}
|
||||
if(isset($InfoEnq['RetardPaiementChoix']) && $InfoEnq['RetardPaiementChoix']=='oui' ){
|
||||
if($InfoEnq['RetardPaiement']['Montant']=='' || $InfoEnq['Nombre']=='' || $InfoEnq['RetardPaiement']['Date']==''){
|
||||
$fields[] ='Précisions sur le retard de paiement'; $formError=true;
|
||||
}
|
||||
}
|
||||
if(isset($_REQUEST['InfoEnq']['LitigeChoix']) && $_REQUEST['InfoEnq']['LitigeChoix']=='oui' ){
|
||||
if($_REQUEST['InfoEnq']['Litige']['Precisions']=='' || $_REQUEST['InfoEnq']['Litige']['Precisions']==''){
|
||||
$fields[] ='Précisions sur le litige'; $formError=TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Envoi du mail formatté
|
||||
|
||||
if ( $formError==true )
|
||||
{
|
||||
$message = '<font color="red">';
|
||||
$message.= 'Veuillez remplir les champs suivants : ';
|
||||
$message.= join(', ', $fields);
|
||||
$message.= '</font>';
|
||||
|
||||
$this->view->assign('message', $message);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
$sujet = "Demande d'avis personnalisé";
|
||||
$texte = "<pre>".print_r($InfoUser, 1)."</pre>".
|
||||
"<pre>".print_r($InfoEnq, 1)."</pre>";
|
||||
|
||||
require_once 'Scores/Mail.php';
|
||||
$mail = new Mail();
|
||||
$mail->setFrom('production');
|
||||
$mail->addToKey('support');
|
||||
$mail->setSubject($sujet);
|
||||
$mail->setBodyHtml($texte);
|
||||
|
||||
if ($mail->send()) {
|
||||
$commande = true;
|
||||
}
|
||||
}
|
||||
|
||||
$this->view->assign('commande', $commande);
|
||||
|
||||
$this->view->assign('formError', $formError);
|
||||
$this->view->assign('message', $message);
|
||||
$this->view->assign('InfoUser', $InfoUser);
|
||||
$this->view->assign('InfoEnq', $InfoEnq);
|
||||
|
||||
$this->view->assign('siren', substr($this->siret, 0,9));
|
||||
|
||||
}
|
||||
|
||||
//Affichage du formulaire
|
||||
if ($commande == false) {
|
||||
$ws = new WsScores();
|
||||
$infosEntrep = $ws->getIdentite($this->siret, $this->id);
|
||||
$this->view->assign('Etab', $infosEntrep);
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
$this->view->assign('user', $user);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Affichage des informations de scoring creditsafe
|
||||
*/
|
||||
public function scoringAction()
|
||||
{
|
||||
$user = new Scores_Utilisateur();
|
||||
if(!$user->checkModeEdition() or !$user->checkPerm('SCORECSF'))
|
||||
$this->render('error/perms', null, 'error');
|
||||
|
||||
require_once 'Evaluation/DomDocument2.lib.php';
|
||||
require_once 'common/curl.php';
|
||||
|
||||
define('CREDITSAFE_WS_URL', 'https://www.creditsafe.fr/getdata/service/CSFRServices.asmx');
|
||||
define('CREDITSAFE_WS_URI', 'https://www.creditsafe.fr/getdata/service/');
|
||||
define('CREDITSAFE_WS_USER', 'scores_decisions');
|
||||
define('CREDITSAFE_WS_PASS', 'yoann1306');
|
||||
define('CREDITSAFE_WS_REF', 'ref');
|
||||
/**
|
||||
* L'Url du WSDL est bonne simplament le formatage des données a changés, il faut respecter les données !
|
||||
* comparer les exemples donnés.
|
||||
*
|
||||
*/
|
||||
$req='<xmlrequest>'.
|
||||
'<header>'.
|
||||
'<username>'.CREDITSAFE_WS_USER.'</username>'.
|
||||
'<password>'.CREDITSAFE_WS_PASS.'</password>'.
|
||||
//'<operation>getcompanyinformation</operation>'.
|
||||
'<operation>getratinglimit</operation>'.
|
||||
'<country>FR</country>'.
|
||||
'<language>FR</language>'.
|
||||
'<chargereference>'.CREDITSAFE_WS_REF.'</chargereference>'.
|
||||
'</header>'.
|
||||
'<body>'.
|
||||
//'<package>standard</package>'.
|
||||
'<package>ratinglimit</package>'.
|
||||
"<companynumber>".$this->siret."</companynumber>".
|
||||
'</body>'.
|
||||
'</xmlrequest>';
|
||||
|
||||
$success = true;
|
||||
$date = date('Ymd');
|
||||
$url = 'https://www.creditsafe.fr/getdata/service/CSFRServices.asmx/GetData?RequestXmlStr='.$req;
|
||||
$referer = $cookie = '';
|
||||
$page = getUrl($url, $cookie, '', $referer, false, '', '');
|
||||
$referer = $url;
|
||||
$file = APPLICATION_PATH.'/../../data/creditsafe/'.$this->siret.'.xml';
|
||||
$xml = html_entity_decode($page['body'], ENT_QUOTES, 'UTF-8');
|
||||
$dom_object = new DomDocument2();
|
||||
$ws = new WsScores();
|
||||
if(!file_exists($file)) {
|
||||
file_put_contents($file, $xml); // Ne pas oublier de metre les bons droits sur le dossier.
|
||||
$ws->setLog('scorecsf', $this->siret);
|
||||
} else {
|
||||
$ws->setLog('scorecsf', $this->siret, 0, 'local');
|
||||
}
|
||||
$dom_object->load($file);
|
||||
$companyname = $dom_object->getValueFromTag('companyname');
|
||||
$rating = $dom_object->getValueFromTag('rating');
|
||||
$ratingdesc1 = str_replace('?',"'",$dom_object->getValueFromTag('ratingdesc1'));
|
||||
$ratingdesc2 = str_replace('?',"'",$dom_object->getValueFromTag('ratingdesc2'));
|
||||
$creditlimit = $dom_object->getValueFromTag('creditlimit');
|
||||
$libelle = '';
|
||||
if (strtoupper($creditlimit)<>strtolower($creditlimit) || $creditlimit=='')
|
||||
$strCreditlimit = $creditlimit;
|
||||
else
|
||||
$strCreditlimit = number_format($creditlimit,null,null,' '). ' €';
|
||||
|
||||
if ($rating >= 40){
|
||||
$fontColor = 'green';
|
||||
$imgFeux = '<img src="/themes/default/images/scoring/feux_vert.png"/>';
|
||||
if ($rating>=71) $libelle='Très bonne cote de crédit/solvabilité';
|
||||
elseif ($rating>=51) $libelle='Bonne cote de crédit/solvabilité';
|
||||
else $libelle = 'Solvable';
|
||||
} elseif ($rating >= 20) {
|
||||
$fontColor = 'yellow';//#f2be2c';
|
||||
$imgFeux = '<img src="/themes/default/images/scoring/feux_orange.png"/>';
|
||||
$libelle = 'Précautions recommandées';
|
||||
} elseif (strtoupper($rating) <> strtolower($rating)) {
|
||||
$fontColor = 'black';
|
||||
$imgFeux=' ';
|
||||
}
|
||||
elseif ($rating == '') {
|
||||
$fontColor = 'black';
|
||||
$imgFeux = ' ';
|
||||
}
|
||||
else {
|
||||
$fontColor = 'red';
|
||||
$imgFeux = '<img src="/themes/default/images/scoring/feux_rouge.png"/>';
|
||||
if ($rating == 0) $libelle='Entreprise en situation de défaillance et ayant un très fort risque de radiation';
|
||||
else $libelle = 'Avertissement - Crédit à votre discrétion';
|
||||
}
|
||||
|
||||
/** Assigne les valeur a la vue **/
|
||||
if (!empty($companyname)) {
|
||||
$this->view->raisonSociale = $companyname;
|
||||
} else {
|
||||
$session = new SessionEntreprise($this->siret, $this->id);
|
||||
$this->view->raisonSociale = $session->getRaisonSociale();
|
||||
}
|
||||
$this->view->emailCommande = $user->getEmail();
|
||||
$this->view->id = $this->id;
|
||||
$this->view->siren = substr($this->siret, 0,9);
|
||||
$this->view->imgFeux = $imgFeux;
|
||||
$this->view->fontColor = $fontColor;
|
||||
$this->view->rating = $rating;
|
||||
$this->view->libelle = $libelle;
|
||||
$this->view->strCreditlimit = $strCreditlimit;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Commande de scoring partenaire creditsafe
|
||||
*/
|
||||
public function scoringcommandeAction()
|
||||
{
|
||||
if ($this->getRequest()->isPost()){
|
||||
$request = $this->getRequest();
|
||||
$email = $request->getParam('email', '');
|
||||
$siren = $request->getParam('siren', '');
|
||||
|
||||
if (preg_match('#^[\w.-]+@[\w.-]+\.[a-zA-Z]{2,5}$#',$email)) {
|
||||
$message = 'Entreprise mise sous surveillance scoring partenaire !';
|
||||
require_once 'Scores/Mail.php';
|
||||
$mail = new Mail();
|
||||
$mail->setSubject("Demande de surveillance score CreditSafe pour $siren à ".$email);
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
$login = $user->getLogin();
|
||||
$texte = 'REQUEST='.EOL.print_r($request->getParams(),true).EOL.
|
||||
'Utilisateur='.$login;
|
||||
|
||||
$mail->setBodyTexte($texte);
|
||||
$mail->setFrom('contact');
|
||||
$mail->addToKey('contact');
|
||||
$mail->send();
|
||||
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = $c->profil->path->data.'/log';
|
||||
|
||||
$fp=fopen($path.'/surveillance_scf.csv', 'a');
|
||||
fwrite($fp, date('Y/m/d H:i:s').";$siren;".$email.';'.$login.';'.$user->getEmail().';'.$user->getIpAddress()."\n");
|
||||
fclose($fp);
|
||||
|
||||
} else {
|
||||
$message = "ERREUR : Veuillez saisir une adresse email valide pour la mise sous surveillance";
|
||||
}
|
||||
$this->view->assign('message', $message);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,452 +0,0 @@
|
||||
<?php
|
||||
class FichierController extends Zend_Controller_Action
|
||||
{
|
||||
|
||||
public function init()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
}
|
||||
|
||||
public function indexAction(){}
|
||||
|
||||
/**
|
||||
* Gestion du chargement des logos
|
||||
*/
|
||||
public function logoAction()
|
||||
{
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$explode = explode('.', $file);
|
||||
switch ($explode[1]) {
|
||||
case 'png' : $content_type = 'image/png'; break;
|
||||
case 'gif' : $content_type = 'image/gif'; break;
|
||||
case 'jpeg':
|
||||
case 'jpg' : $content_type = 'image/jpeg'; break;
|
||||
}
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->data).'/logos/';
|
||||
if ( file_exists($path.$file) ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo 'Impossible de charger le logo.';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion du chargement des images du cache
|
||||
*/
|
||||
public function imgcacheAction()
|
||||
{
|
||||
$content_type = 'image/png';
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = $c->profil->path->pages.'/imgcache/';
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
if ( file_exists($path.$file) ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo 'Impossible de charger le fichier.';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion du chargement des fichiers des marques
|
||||
*/
|
||||
public function marqueAction()
|
||||
{
|
||||
$content_type = 'application/pdf';
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->data).'/marques/';
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
if(file_exists($path.$file) && filesize($path.$file)>0) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo "Erreur lors de l'affichage du fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion des fichiers Actes et Bilans
|
||||
*/
|
||||
public function pdfAction()
|
||||
{
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$content_type = 'application/pdf';
|
||||
$c = Zend_Registry::get('config');
|
||||
//bilan
|
||||
if (preg_match('/^bilan-[0-9]{9}-(consolides|sociaux)-([0-9]{8})/', $file, $matches)) {
|
||||
$path = realpath($c->profil->path->data).
|
||||
'/greffes/bilans/'.$matches[1].'/'.substr($matches[2],0,4).'/';
|
||||
}
|
||||
//acte
|
||||
else {
|
||||
$path = realpath($c->profil->path->data).'/pdf/';
|
||||
}
|
||||
|
||||
if(file_exists($path.$file) && filesize($path.$file)>0) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo "Erreur lors de l'affichage du fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion des fichiers Actes et Bilans
|
||||
*/
|
||||
public function pdfassociationAction()
|
||||
{
|
||||
$content_type = 'application/pdf';
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->data).'/association/';
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$type = $this->getRequest()->getParam('type');
|
||||
$file = $type.'/'.$file;
|
||||
if(file_exists($path.$file) && filesize($path.$file)>0) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo "Erreur lors de l'affichage du fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion des liasses au formats excel
|
||||
*/
|
||||
public function liasseAction()
|
||||
{
|
||||
$content_type = 'application/vnd.ms-excel';
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->files).'/';
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
//Envoi du fichier sur la sortie standard
|
||||
if ( file_exists($path.$file) ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo 'Impossible de charger le fichier.';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion des log de consommation
|
||||
*/
|
||||
public function consommationAction()
|
||||
{
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$content_type = 'application/csv-tab-delimited-table';
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->files).'/';
|
||||
//Envoi du fichier sur la sortie standard
|
||||
if ( file_exists($path.$file) ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo 'Impossible de charger le fichier.';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Export du portefeuille au format CSV
|
||||
*/
|
||||
public function portefeuilleAction()
|
||||
{
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$content_type = 'application/csv-tab-delimited-table';
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->files).'/';
|
||||
//Envoi du fichier sur la sortie standard
|
||||
if ( file_exists($path.$file) ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo 'Impossible de charger le fichier.';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Export de la liste des surveillances au format CSV
|
||||
*/
|
||||
public function surveillanceAction()
|
||||
{
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$content_type = 'application/csv-tab-delimited-table';
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->files).'/';
|
||||
//Envoi du fichier sur la sortie standard
|
||||
if ( file_exists($path.$file) ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo 'Impossible de charger le fichier.';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion des fichiers bilan saisie par les clients
|
||||
*/
|
||||
public function bilanclientAction()
|
||||
{
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->data).'/bilanclient/';
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$explode = explode('.', $file);
|
||||
switch ($explode[1]) {
|
||||
case 'pdf' : $content_type = 'application/pdf'; break;
|
||||
case 'tiff' : $content_type = 'image/tiff'; break;
|
||||
}
|
||||
if ( file_exists($path.$file) && filesize($path.$file)>0 ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo "Erreur lors de l'affichage du fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion des kbis
|
||||
*/
|
||||
public function kbisAction()
|
||||
{
|
||||
$content_type = 'application/pdf';
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->files).'/';
|
||||
if ( file_exists($path.$file) && filesize($path.$file)>0 ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo "Erreur lors de l'affichage du fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion des rapports personnalisés
|
||||
*/
|
||||
public function customrapportAction()
|
||||
{
|
||||
$content_type = 'application/pdf';
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->pages).'/';
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$output_file = $directory.'/'.$file;
|
||||
if ( file_exists($path.$file) && filesize($path.$file)>0 ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo "Impossible de charger le fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion bodacc au format PDF
|
||||
*/
|
||||
public function bodaccAction()
|
||||
{
|
||||
$content_type = 'application/pdf';
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->data).'/bodacc/';
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
//Construire le chemin du dossier
|
||||
preg_match('/BODACC_(A|B|C)_([0-9]{4})_(.*)\.pdf/', $file, $matches);
|
||||
$path.= $matches[1].'/'.$matches[2].'/';
|
||||
if ( file_exists($path.$file) && filesize($path.$file)>0 ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo "Impossible de charger le fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion des fichiers PDF des nouveautés
|
||||
*/
|
||||
public function newAction()
|
||||
{
|
||||
$content_type = 'application/pdf';
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->data).'/nouveautes/';
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
if ( file_exists($path.$file) && filesize($path.$file)>0 ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo "Impossible de charger le fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Bodacc history file
|
||||
*/
|
||||
public function histopdfAction()
|
||||
{
|
||||
$content_type = 'application/pdf';
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->files).'/';
|
||||
if ( file_exists($path.$file) && filesize($path.$file)>0 ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo "Impossible de charger le fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Internal files for groupes
|
||||
*/
|
||||
public function groupesAction()
|
||||
{
|
||||
$content_type = 'application/pdf';
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = realpath($c->profil->path->data).'/groupes/';
|
||||
if ( file_exists($path.$file) && filesize($path.$file)>0 ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo "Impossible de charger le fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Bilan : Association
|
||||
*/
|
||||
public function bilanAction()
|
||||
{
|
||||
$content_type = 'application/pdf';
|
||||
$file = $this->getRequest()->getParam('fichier');
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = $c->profil->path->files.'/';
|
||||
Zend_Registry::get('firebug')->info($path.$file);
|
||||
if ( file_exists($path.$file) && filesize($path.$file)>0 ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($path.$file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
|
||||
header('Content-Disposition: filename="' . basename($path.$file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($path.$file);
|
||||
} else {
|
||||
echo "Impossible de charger le fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,224 +0,0 @@
|
||||
<?php
|
||||
require_once 'Scores/RechercheHistorique.php';
|
||||
require_once 'Giant/WSgiant.php';
|
||||
require_once 'Giant/Controllers.lib.php';
|
||||
require_once 'Giant/RequestDatabase.lib.php';
|
||||
require_once 'Giant/Functions.lib.php';
|
||||
require_once 'common/dates.php';
|
||||
|
||||
class GiantController extends Zend_Controller_Action
|
||||
{
|
||||
protected $TestIndication = true;
|
||||
|
||||
protected $TestCompanies = array(
|
||||
'BE' => array(
|
||||
'0439546194', '0436576412', '0430459076', '0430000604', '0404869783', '0404869783',
|
||||
'0406952018'
|
||||
),
|
||||
'ES' => array(
|
||||
'A00000000', 'A80192727'
|
||||
),
|
||||
'GB' => array(
|
||||
'00000086', '00082932', '98888888', '214436', '1777777', '991581', '1800000'
|
||||
),
|
||||
'NL' => array(
|
||||
'533885', '1383988', '1383989', '891962239', '891974008', '892130032', '896614719',
|
||||
'896614735', '896614735', '896615243'
|
||||
),
|
||||
'FR' => array(
|
||||
'55214450300018', '49496793800031', '47997411500012', '48765114300017',
|
||||
'43235433000040', '39435613300022', '39504742600014', '76980020200020',
|
||||
'35379698000020', '56202109700018', '70204756400068', '70204756400068'
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
public function init()
|
||||
{
|
||||
$this->view->headLink()->appendStylesheet('/themes/default/styles/giant.css', 'all');
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/giant.js', 'text/javascript');
|
||||
$this->view->debug = false;
|
||||
}
|
||||
|
||||
public function searchAction()
|
||||
{
|
||||
$user = new Scores_Utilisateur();
|
||||
$params = $this->getRequest()->getParams();
|
||||
$search = new GiantRechercheController($params['pays'], $this->TestIndication);
|
||||
$result = $search->Liste($params, $this->getRequest()->getParam('page'));
|
||||
$this->view->label = $search->getObjet()->getLabelDesc();
|
||||
$this->view->labelResults = $search->getObjet()->getLabelResults();
|
||||
$this->view->pays = $params['pays'];
|
||||
$this->view->currentPage = $search->getObjet()->getCurrentPage();
|
||||
$this->view->userMaxResult = $user->getNbRep();
|
||||
$this->view->resultats = $result;
|
||||
$this->view->page = $this->getRequest()->getParam('page');
|
||||
$this->view->referer = $search->getObjet()->getQuery();
|
||||
$this->view->lienReferer = $search->getQueryLink($params);
|
||||
if($this->view->debug)
|
||||
$this->view->soap = $search->soapG;
|
||||
}
|
||||
|
||||
public function identiteAction()
|
||||
{
|
||||
$rechercheParams = new RechercheHistorique();
|
||||
$giantFunction = new GiantFunction();
|
||||
if (count($rechercheParams->liste()) > 0)
|
||||
{
|
||||
$recherche = $rechercheParams->item(0);
|
||||
$type = $recherche['type'];
|
||||
$params = $recherche['params'];
|
||||
}
|
||||
$Commande = new Commandes();
|
||||
$user = new Scores_Utilisateur();
|
||||
$listeCommandes = $Commande->getCommandesByLogin($user->getLogin());
|
||||
$total = 0;
|
||||
$liste = $giantFunction->divCommande($listeCommandes, $total);
|
||||
$ListeRapport = new GiantRechercheController($params['pays'], $this->TestIndication);
|
||||
$result = $ListeRapport->ListeRapport($this->getRequest()->getParam('CompanyId'));
|
||||
$this->view->total = $total;
|
||||
$this->view->listeCommandes = $liste;
|
||||
$this->view->modification = (isset($result->MonitoringOptions))?($ListeRapport->getModification($result->MonitoringOptions->MonitoringOption[0])):null;
|
||||
$this->view->description = $ListeRapport->getDescription();
|
||||
$this->view->raisonSociale = $this->getRequest()->getParam('raisonSociale');
|
||||
$this->view->listeRapport = $result;
|
||||
$this->view->telephone = $this->getRequest()->getParam('telephone');
|
||||
$this->view->CompanyId = $this->getRequest()->getParam('CompanyId');
|
||||
$this->view->raisonSociale = $this->getRequest()->getParam('raisonSociale');
|
||||
$this->view->CompanyRegisterNumber = $this->getRequest()->getParam('CompanyRegisterNumber');
|
||||
$this->view->Pays = $this->getRequest()->getParam('Pays');
|
||||
$this->view->Adresse = explode(':', $this->getRequest()->getParam('Adresse'));
|
||||
if($this->view->debug)
|
||||
$this->view->soap = $ListeRapport->soapG;
|
||||
}
|
||||
|
||||
public function creditrecommendationAction()
|
||||
{
|
||||
$giantController = new GiantControllerLib($this->getRequest()->getParam('CompanyId'));
|
||||
$id = $giantController->commande($this->getRequest()->getParam('CompanyId'),
|
||||
$this->getRequest()->getParam('Type'),
|
||||
$this->getRequest()->getParam('Pays'),
|
||||
$this->TestIndication
|
||||
);
|
||||
$creditrecommendationAction = array('getAvisDeCredit' => 'CreditRecommendation');
|
||||
$creditrecommendation = unserialize(base64_decode($id));
|
||||
$identiteController = new GiantIdentiteController($creditrecommendation);
|
||||
$giantConstroller = new GiantControllerLib($this->getRequest()->getParam('CompanyId').'-'.$this->getRequest()->getParam('Type'));
|
||||
$identiteController->ficheAction();
|
||||
$fiche = $identiteController->getObjet('fiche');
|
||||
foreach($creditrecommendationAction as $action => $val) {
|
||||
if(isset($creditrecommendation->DataSet->Company->$val)) {
|
||||
$creditrecommendation = $giantConstroller->$action($creditrecommendation);
|
||||
}
|
||||
}
|
||||
$fiche = $giantConstroller->getInformationGenerale($creditrecommendation);
|
||||
$this->view->carte = $this->getRequest()->getParam('Pays');
|
||||
$this->view->reportType = $this->getRequest()->getParam('Type');
|
||||
$this->view->report = $fiche;
|
||||
$this->view->Type = $this->getRequest()->getParam('Type');
|
||||
$this->view->dateFunction = new WDate();
|
||||
}
|
||||
|
||||
public function compactAction()
|
||||
{
|
||||
$giantController = new GiantControllerLib($this->getRequest()->getParam('CompanyId'));
|
||||
$id = $giantController->commande($this->getRequest()->getParam('CompanyId'),
|
||||
$this->getRequest()->getParam('Type'),
|
||||
$this->getRequest()->getParam('Pays'),
|
||||
$this->TestIndication
|
||||
);
|
||||
$compactAction = array('getAvisDeCredit' => 'CreditRecommendation', 'getPositionFinanciere' => 'FinancialSummary',
|
||||
'getStructureEntreprise' => 'Associated', 'getDirigeant' => 'Position'
|
||||
);
|
||||
$compact = unserialize(base64_decode($id));
|
||||
$identiteController = new GiantIdentiteController($compact);
|
||||
$giantConstroller = new GiantControllerLib($this->getRequest()->getParam('CompanyId').'-'.$this->getRequest()->getParam('Type'));
|
||||
$identiteController->ficheAction();
|
||||
$fiche = $identiteController->getObjet('fiche');
|
||||
|
||||
foreach($compactAction as $action => $val) {
|
||||
if(isset($compact->DataSet->Company->$val)) {
|
||||
$compact = $giantConstroller->$action($compact);
|
||||
}
|
||||
}
|
||||
$fiche = $giantConstroller->getInformationGenerale($compact);
|
||||
$this->view->carte = $this->getRequest()->getParam('Pays');
|
||||
$this->view->reportType = $this->getRequest()->getParam('Type');
|
||||
$this->view->report = $fiche;
|
||||
$this->view->Type = $this->getRequest()->getParam('Type');
|
||||
$this->view->dateFunction = new WDate();
|
||||
}
|
||||
|
||||
public function fullAction()
|
||||
{
|
||||
$giantController = new GiantControllerLib($this->getRequest()->getParam('CompanyId').'-'.$this->getRequest()->getParam('Type'));
|
||||
$id = $giantController->commande($this->getRequest()->getParam('CompanyId'),
|
||||
$this->getRequest()->getParam('Type'),
|
||||
$this->getRequest()->getParam('Pays'),
|
||||
$this->TestIndication
|
||||
);
|
||||
$fullAction = array('getAvisDeCredit' => 'CreditRecommendation', 'getComptesAnnuels' => 'AnnualAccounts', 'getPositionFinanciere' => 'FinancialSummary',
|
||||
'getComportementPaiement' => 'PaymentBehaviour', 'getStructureEntreprise' => 'Associated', 'getDirigeant' => 'Position',
|
||||
'getComparaisonValeurs'=> 'PeerGroup', 'getHistoriques' => 'Event'
|
||||
);
|
||||
$full = unserialize(base64_decode($id));
|
||||
$full->DataSet->Company->CompanyId= $this->getRequest()->getParam('CompanyId');
|
||||
$identiteController = new GiantIdentiteController($full);
|
||||
$giantConstroller = new GiantControllerLib($this->getRequest()->getParam('CompanyId').'-'.$this->getRequest()->getParam('Type'));
|
||||
$identiteController->ficheAction();
|
||||
$fiche = $identiteController->getObjet('fiche');
|
||||
|
||||
foreach($fullAction as $action => $val) {
|
||||
if(isset($full->DataSet->Company->$val))
|
||||
$full = $giantConstroller->$action($full);
|
||||
}
|
||||
$fiche = $giantConstroller->getInformationGenerale($full);
|
||||
$this->view->carte = $this->getRequest()->getParam('Pays');
|
||||
$this->view->reportType = $this->getRequest()->getParam('Type');
|
||||
$this->view->report = $fiche;
|
||||
$this->view->Type = $this->getRequest()->getParam('Type');
|
||||
$this->view->dateFunction = new WDate();
|
||||
}
|
||||
|
||||
public function getForm()
|
||||
{
|
||||
$form = new Zend_Form();
|
||||
$form->setMethod('post')
|
||||
->setAction('investigation');
|
||||
|
||||
$reference = $form->createElement('text', 'reference', array('label' => 'Votre Reference'));
|
||||
$reference->setRequired(true);
|
||||
$elements[] = $reference;
|
||||
|
||||
$telephone = $form->createElement('text', 'telephone', array('label' => 'Votre téléphone'));
|
||||
$telephone->setRequired(true);
|
||||
$elements[] = $telephone;
|
||||
|
||||
$mail = $form->createElement('text', 'mail', array('label' => 'Adresse Email'));
|
||||
$mail->setRequired(true);
|
||||
$elements[] = $mail;
|
||||
|
||||
$elements[] = $form->createElement('textarea', 'remarque', array('label' => 'Remarque ou commentaire à destination de l\'enquêteur :'));
|
||||
$elements[] = $form->createElement('text', 'domiciliation', array('label' => 'Domiciliation Bancaire :'));
|
||||
$elements[] = $form->createElement('text', 'Encours', array('label' => 'Encours demandé :'));
|
||||
$elements[] = $form->createElement('text', 'nbEcheance', array('label' => 'Nombre d\'échéances :'));
|
||||
|
||||
$form->addElements($elements)
|
||||
->addElement('submit', 'Envoyer', array('label' => 'Envoyer'));
|
||||
return ($form);
|
||||
}
|
||||
|
||||
public function investigationAction()
|
||||
{
|
||||
|
||||
if($this->getRequest()->isPost()) {
|
||||
$data = $this->getRequest()->getPost();
|
||||
if($this->getForm()->isValid($data))
|
||||
$this->view->form = $this->getRequest()->getParam('reference');
|
||||
else {
|
||||
return ($this->view->form = $this->getForm());
|
||||
}
|
||||
} else
|
||||
$this->view->form = $this->getForm();
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,58 +0,0 @@
|
||||
<?php
|
||||
class IndexController extends Zend_Controller_Action
|
||||
{
|
||||
|
||||
public function indexAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$page = $request->getParam('page');
|
||||
if ($page == 'annonces')
|
||||
{
|
||||
$siret = $request->getParam('siret');
|
||||
$source = $request->getParam('source');
|
||||
$idAnn = $request->getParam('idAnn');
|
||||
$lien = '/juridique/annonces/siret/'.$siret;
|
||||
if (!empty($source)) $lien.= '/source/'.$source;
|
||||
if (!empty($idAnn)) $lien.= '/idAnn/'.$idAnn;
|
||||
$this->_redirect($lien);
|
||||
}
|
||||
elseif ( Zend_Registry::get('theme')->name=='mobile' )
|
||||
{
|
||||
//Afficher le menu pour la version mobile
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->_forward('entreprise', 'recherche');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retourne l'url pour le csv d'export du portefeuille
|
||||
*/
|
||||
public function portefeuillecsvAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
||||
require_once 'Scores/WsScores.php';
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
$login = $user->getLogin();
|
||||
$idClient = $user->getIdClient();
|
||||
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getPortefeuilleCsv($login, $idClient);
|
||||
|
||||
$log = Zend_Registry::get('config')->profil->path->data.'/log/altisys.log';
|
||||
|
||||
if ($reponse === false){
|
||||
file_put_contents($log, date('Y-m-d H:i:s')." - URL = ERREUR\n", FILE_APPEND);
|
||||
echo "Erreur";
|
||||
} elseif (!empty($reponse->result->Url)) {
|
||||
file_put_contents($log, date('Y-m-d H:i:s')." - URL = ".$reponse->result->Url."\n", FILE_APPEND);
|
||||
echo $reponse->result->Url;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,443 +0,0 @@
|
||||
<?php
|
||||
class JuridiqueController extends Zend_Controller_Action
|
||||
{
|
||||
protected $siret = null;
|
||||
protected $id = 0;
|
||||
|
||||
public function init()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$this->siret = $request->getParam('siret');
|
||||
$this->id = $request->getParam('id', 0);
|
||||
|
||||
require_once 'Scores/WsScores.php';
|
||||
require_once 'Scores/SessionEntreprise.php';
|
||||
require_once 'common/dates.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* Affichage de la liste des annonces ou d'une annonce
|
||||
*/
|
||||
public function annoncesAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
|
||||
$vue = $request->getParam('vue', 'bodacc');
|
||||
|
||||
$p = $request->getParam('p', 1);
|
||||
$this->view->assign('p', $p);
|
||||
|
||||
$idAnn = $request->getParam('idAnn', 0);
|
||||
$siren = substr($this->siret, 0,9);
|
||||
|
||||
$source = $request->getParam('source');
|
||||
if (!empty($source)) {
|
||||
switch ($source){
|
||||
case 1: $vue='bodacc'; break;
|
||||
case 2: $vue='balo'; break;
|
||||
case 3: $vue='asso'; break;
|
||||
}
|
||||
}
|
||||
|
||||
$session = new SessionEntreprise($this->siret, $this->id);
|
||||
$fj = $session->getFormeJuridique();
|
||||
if ( $fj>9000 && $fj<9999 && intval($siren)==0 ) {
|
||||
$vue = 'asso';
|
||||
}
|
||||
|
||||
$this->view->assign('vue', $vue);
|
||||
|
||||
$nbAnnonces = 20;
|
||||
$position = ($p-1)*$nbAnnonces;
|
||||
|
||||
$ws = new WsScores();
|
||||
switch ( $vue ) {
|
||||
case 'bodacc':
|
||||
case 'abod':
|
||||
default:
|
||||
if(intval($siren)==0) {
|
||||
$idAnn = $session->getSourceId();
|
||||
}
|
||||
$infos = $ws->getAnnoncesLegales($siren, $idAnn, null, $position, $nbAnnonces);
|
||||
break;
|
||||
case 'balo':
|
||||
$infos = $ws->getAnnoncesBalo($siren, $idAnn, null, $position, $nbAnnonces);
|
||||
break;
|
||||
case 'asso':
|
||||
if ( intval($siren)==0 && substr($session->getAutreId(),0,1)=='W' ) {
|
||||
$infos = $ws->getAnnoncesAsso($session->getAutreId(), $idAnn, null, $position, $nbAnnonces);
|
||||
} elseif (intval($siren)!=0) {
|
||||
$infos = $ws->getAnnoncesAsso($siren, $idAnn, null, $position, $nbAnnonces);
|
||||
} else {
|
||||
$idAnn = $session->getSourceId();
|
||||
$infos = $ws->getAnnoncesAsso($siren, $idAnn, null, $position, $nbAnnonces);
|
||||
}
|
||||
break;
|
||||
case 'bomp':
|
||||
$filtre = $request->getParam('filtre', null);
|
||||
$this->view->assign('filtre', $filtre);
|
||||
$infos = $ws->getAnnoncesBoamp($siren, $idAnn, $filtre, $position, $nbAnnonces);
|
||||
break;
|
||||
}
|
||||
if ($infos === false) $this->_forward('soap', 'error');
|
||||
Zend_Registry::get('firebug')->info($infos);
|
||||
require_once 'Scores/Annonces.php';
|
||||
$objAnnonces = new Annonces($infos->result->item);
|
||||
|
||||
$typeAnnonces = array(
|
||||
'Bodacc',
|
||||
'Balo',
|
||||
'Bomp',
|
||||
'Asso',
|
||||
);
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
$this->view->assign('hasModeEdition', $user->checkModeEdition());
|
||||
|
||||
$this->view->assign('id', $session->getId());
|
||||
$this->view->assign('siren', $siren);
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('raisonSociale', $session->getRaisonSociale());
|
||||
$this->view->assign('AutrePage', $request->getParam('apage'));
|
||||
$this->view->assign('exportObjet', $infos);
|
||||
$this->view->assign('surveillance', $user->checkPerm('survannonce'));
|
||||
|
||||
//Affichage pour une annonce
|
||||
if (!empty($idAnn) && in_array($vue, array('bodacc', 'abod', 'balo', 'asso', 'bomp')) ) {
|
||||
|
||||
if ( $user->checkModeEdition() ){
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/saisieannonces.js', 'text/javascript');
|
||||
}
|
||||
|
||||
$classType = 'annonces'.ucfirst($vue);
|
||||
foreach($objAnnonces->$classType as $ann) {
|
||||
if($ann->id==$idAnn) break;
|
||||
}
|
||||
Zend_Registry::get('firebug')->info($ann);
|
||||
$annonce = array(
|
||||
'Desc' => $objAnnonces->getAnnonceDesc($ann),
|
||||
'Entree' => $objAnnonces->getAnnonceEntree($ann),
|
||||
'EntreeSD' => $objAnnonces->getAnnonceEntreeSD($ann),
|
||||
'Even' => $objAnnonces->getAnnonceEven($ann),
|
||||
'Texte' => $objAnnonces->getAnnonceTexte($ann),
|
||||
'Type' => $objAnnonces->getType($ann),
|
||||
'Code' => $objAnnonces->getCode($ann),
|
||||
'Annee' => $objAnnonces->getAnnee($ann),
|
||||
'Num' => $objAnnonces->getNum($ann),
|
||||
'Deleted' => $objAnnonces->isDeleted($ann)
|
||||
);
|
||||
|
||||
$this->view->assign('source', $session->getSource());
|
||||
if ( intval($this->siret)==0 ){
|
||||
$this->view->assign('sourceId', $session->getSourceId());
|
||||
} else {
|
||||
$this->view->assign('sourceId', null);
|
||||
}
|
||||
$this->view->assign('idAnn', $idAnn);
|
||||
$this->view->assign('annonce', $annonce);
|
||||
|
||||
if ($request->getParam('q')=='ajax')
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
//$this->_helper->viewRenderer->setNoRender(true);
|
||||
$this->renderScript('juridique/annonce-ajax.phtml');
|
||||
} else {
|
||||
//Définir url pour téléchargement pdf
|
||||
if ( in_array($annonce['Code'], array('BODA', 'BODB', 'BODC')) && intval($annonce['Annee'])>=2008) {
|
||||
$lienBodacc = $this->view->url(array(
|
||||
'controller' => 'juridique',
|
||||
'action' => 'bodaccpdf',
|
||||
'type' => substr($annonce['Code'],3,1),
|
||||
'annee' => $annonce['Annee'],
|
||||
'num' => $annonce['Num'],
|
||||
), null, true);
|
||||
$this->view->assign('lienBodacc', $lienBodacc);
|
||||
}
|
||||
|
||||
$this->renderScript('juridique/annonce.phtml');
|
||||
}
|
||||
|
||||
//Affichage pour la liste des annonces
|
||||
} else {
|
||||
|
||||
$nbReponses = $infos->nbReponses;
|
||||
$nbPages = ceil($nbReponses/$nbAnnonces);
|
||||
|
||||
//Attention ajout des filtres
|
||||
if ( $p <= 1 ) {
|
||||
$lienPagePrecedente = false;
|
||||
} else {
|
||||
$lienPagePrecedente = $this->view->url(array(
|
||||
'controller' => 'juridique',
|
||||
'action' => 'annonces',
|
||||
'vue'=> $vue,
|
||||
'p' => $p-1
|
||||
));
|
||||
}
|
||||
|
||||
if ( $p+1 > $nbPages ) {
|
||||
$lienPageSuivante = false;
|
||||
} else {
|
||||
$lienPageSuivante = $this->view->url(array(
|
||||
'controller' => 'juridique',
|
||||
'action' => 'annonces',
|
||||
'vue' => $vue,
|
||||
'p' => $p+1
|
||||
));
|
||||
}
|
||||
|
||||
$this->view->assign('nbPages',$nbPages);
|
||||
$this->view->assign('lienPagePrecedente',$lienPagePrecedente);
|
||||
$this->view->assign('lienPageSuivante',$lienPageSuivante);
|
||||
|
||||
foreach ($typeAnnonces as $type)
|
||||
{
|
||||
$classType = 'annonces'.$type;
|
||||
$annonces = array();
|
||||
if (count($objAnnonces->$classType)>0)
|
||||
{
|
||||
foreach($objAnnonces->$classType as $ann)
|
||||
{
|
||||
Zend_Registry::get('firebug')->info('id:'.$ann->id.', deleted:'.$ann->deleted);
|
||||
$annonces[] = $objAnnonces->getAnnonceResume($ann);
|
||||
}
|
||||
$this->view->assign($classType, $annonces);
|
||||
}
|
||||
}
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/annonces.js', 'text/javascript');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Affichage infos réglementées
|
||||
*/
|
||||
public function infosregAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$idAnn = $request->getParam('idann', false);
|
||||
$siren = substr($this->siret, 0,9);
|
||||
$session = new SessionEntreprise($this->siret, $this->id);
|
||||
|
||||
$ws = new WsScores();
|
||||
if ($idAnn!=false) {
|
||||
$this->view->assign('idAnn', $idAnn);
|
||||
$infos = $ws->getInfosReg($siren,$idAnn);
|
||||
} else {
|
||||
$infos = $ws->getInfosReg($siren);
|
||||
}
|
||||
if ($infos === false) $this->_forward('soap', 'error');
|
||||
|
||||
if (is_string($infos)){
|
||||
$this->view->assign('message', $infos);
|
||||
}
|
||||
|
||||
$objAnnonces = $infos->result->item;
|
||||
$annonces = array();
|
||||
if (count($objAnnonces)>0) {
|
||||
foreach ( $objAnnonces as $item ) {
|
||||
$annonces[] = array(
|
||||
'id' => $item->id,
|
||||
'titre' => $item->titre,
|
||||
'communique' => $item->communique,
|
||||
'source' => $item->source,
|
||||
'DateParution' => WDate::dateT('Y-m-d','d/m/Y',$item->DateParution),
|
||||
'dateInsertionSD' => WDate::dateT('Y-m-d','d/m/Y',$item->dateInsertionSD),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$this->view->assign('annonces', $annonces);
|
||||
$this->view->assign('siren', $siren);
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('raisonSociale', $session->getRaisonSociale());
|
||||
$this->view->assign('exportObjet', $infos);
|
||||
}
|
||||
|
||||
/**
|
||||
* Affichage listes des compétences
|
||||
*/
|
||||
public function competencesAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$type = $request->getParam('type', '');
|
||||
$siren = substr($this->siret,0,9);
|
||||
$session = new SessionEntreprise($this->siret, $this->id);
|
||||
|
||||
$abbrev = array(
|
||||
' TGI ' => 'TRIBUNAL DE GRANDE INSTANCE DE ',
|
||||
' TI ' => 'TRIBUNAL D\'INSTANCE DE ',
|
||||
' TC ' => 'TRIBUNAL DE COMMERCE DE ',
|
||||
' TGICC ' => 'TRIBUNAL DE GRANDE INSTANCE A COMPETENCE COMMERCIALE ',
|
||||
' TICC ' => 'TRIBUNAL D\'INSTANCE A COMPETENCE COMMERCIALE '
|
||||
);
|
||||
|
||||
if (!empty($type)){
|
||||
$ws = new WsScores();
|
||||
$infos = $ws->getListeCompetences($siret, $type, $session->getCodeCommune());
|
||||
if ($infos === false) $this->_forward('soap', 'error');
|
||||
|
||||
$competences = $infos->result->item;
|
||||
Zend_Registry::get('firebug')->info($infos);
|
||||
if( $type=='tri' || $type=='cfe' ) {
|
||||
$i=0;
|
||||
foreach($competences as $comp){
|
||||
$competences[$i]->Nom = strtr(' '.strtoupper($comp->Nom), $abbrev);
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
$this->view->assign('competences', $competences);
|
||||
$this->view->assign('type', $type);
|
||||
$this->view->assign('exportObjet', $infos);
|
||||
}
|
||||
|
||||
$this->view->assign('siren', $siren);
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('raisonSociale', $session->getRaisonSociale());
|
||||
}
|
||||
|
||||
/**
|
||||
* Affichage des la listes des conventions collectives
|
||||
* Enter description here ...
|
||||
*/
|
||||
public function conventionsAction()
|
||||
{
|
||||
$siren = substr($this->siret, 0,9);
|
||||
$session = new SessionEntreprise($this->siret, $this->id);
|
||||
$this->view->assign('siren', $siren);
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('raisonSociale', $session->getRaisonSociale());
|
||||
$ws = new WsScores();
|
||||
$infos = $ws->getListeConventions($siren);
|
||||
$conventions = $infos->result->item;
|
||||
Zend_Registry::get('firebug')->info($conventions);
|
||||
$this->view->assign('conventions', $conventions);
|
||||
$this->view->assign('exportObjet', $infos);
|
||||
}
|
||||
|
||||
/**
|
||||
* Affichage des marques déposées
|
||||
*/
|
||||
public function marquesAction()
|
||||
{
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/marques.js', 'text/javascript');
|
||||
|
||||
$request = $this->getRequest();
|
||||
$idObject = $request->getParam('idObject', 0);
|
||||
$siren = substr($this->siret, 0,9);
|
||||
$session = new SessionEntreprise($this->siret, $this->id);
|
||||
$this->view->assign('siren', $siren);
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('raisonSociale', $session->getRaisonSociale());
|
||||
$ws = new WsScores();
|
||||
$infos = $ws->getMarques($siren, $idObject);
|
||||
if ($infos === false) $this->_forward('soap', 'error');
|
||||
|
||||
$marques = $infos->result->item;
|
||||
$this->view->assign('marques', $marques);
|
||||
$this->view->assign('idObject', $idObject);
|
||||
$this->view->assign('exportObjet', $marques);
|
||||
Zend_Registry::get('firebug')->info($infos);
|
||||
}
|
||||
|
||||
/**
|
||||
* Affiche le lien pour télécharger le fichier concernant le dépot
|
||||
*/
|
||||
public function getmarqueAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
$request = $this->getRequest();
|
||||
$numdepot = $request->getParam('numdepot', '');
|
||||
if (empty($numdepot)){
|
||||
echo 'Paramètres incorrects';
|
||||
exit;
|
||||
}
|
||||
$c = Zend_Registry::get('config');
|
||||
$directory = realpath($c->profil->path->data).'/marques';
|
||||
$file = $numdepot.'.pdf';
|
||||
|
||||
//Le fichier n'existe pas alors on le télécharger
|
||||
if(!file_exists($directory.'/'.$file)
|
||||
|| filesize($directory.'/'.$file)==0 ) {
|
||||
$cmd = 'php ' . APPLICATION_PATH . '/../scripts/jobs/getMarque.php ' . $numdepot;
|
||||
Zend_Registry::get('firebug')->info($cmd);
|
||||
$result = exec($cmd);
|
||||
Zend_Registry::get('firebug')->info($result);
|
||||
}
|
||||
//On vérfie que le fichier existe après le téléchargement
|
||||
if(file_exists($directory.'/'.$file) && filesize($directory.'/'.$file)>0) {
|
||||
$href = $this->view->baseUrl().'/fichier/marque/'.$file;
|
||||
echo '<a href="'.$href.'" target="_blank">Télécharger le PDF de l\'insciption au BOPI.</a>';
|
||||
} else {
|
||||
echo 'Document introuvable.';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function bodaccpdfAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
$request = $this->getRequest();
|
||||
|
||||
$type = $request->getParam('type');
|
||||
$annee = $request->getParam('annee');
|
||||
$num = $request->getParam('num');
|
||||
|
||||
//$num doit être retraité pour être sur 4 position
|
||||
$c = strlen($num);
|
||||
for($i=0;$i<4-$c;$i++){
|
||||
$num = '0'.$num;
|
||||
}
|
||||
|
||||
$c = Zend_Registry::get('config');
|
||||
$file = realpath($c->profil->path->data)
|
||||
.'/bodacc/'.$type.'/'.$annee.'/'.
|
||||
'BODACC_'.$type.'_'.$annee.'_'.$num.'.pdf';
|
||||
|
||||
if ( !file_exists($file) ) {
|
||||
exec('php ' . APPLICATION_PATH . "/../scripts/jobs/getBodaccPdf.php $type $annee $num >> getBodaccPdf.log");
|
||||
}
|
||||
|
||||
if (file_exists($file)) {
|
||||
$href = $this->view->url(array(
|
||||
'controller' => 'fichier',
|
||||
'action' => 'bodacc',
|
||||
'fichier' => basename($file),
|
||||
), null, true);
|
||||
echo "<a target=\"_blank\" href=\"".$href."\">Cliquer ici pour télécharger le fichier.</a>";
|
||||
} else {
|
||||
echo "Erreur lors du chargement du fichier.";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function annoncenumAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
|
||||
$request = $this->getRequest();
|
||||
$siren = $request->getParam('siren');
|
||||
|
||||
$ws = new WsScores();
|
||||
$result = $ws->getAnnoncesNum($siren);
|
||||
Zend_Registry::get('firebug')->info($result);
|
||||
$numWS = array();
|
||||
if (count($result->item)>0) {
|
||||
foreach ($result->item as $item) {
|
||||
$numWS[$item->type] = $item->num;
|
||||
}
|
||||
}
|
||||
$types = array('bodacc', 'balo', 'boamp', 'asso');
|
||||
|
||||
$num = array();
|
||||
foreach($types as $type) {
|
||||
if ( array_key_exists($type, $numWS) ) {
|
||||
$num['Type'.ucfirst($type)] = $numWS[$type];
|
||||
}
|
||||
}
|
||||
|
||||
$this->view->assign('num', $num);
|
||||
}
|
||||
|
||||
}
|
@ -1,443 +0,0 @@
|
||||
<?php
|
||||
class LogoController extends Zend_Controller_Action
|
||||
{
|
||||
protected $pathLogo = '';
|
||||
|
||||
public function init()
|
||||
{
|
||||
$c = Zend_Registry::get('config');
|
||||
$this->pathLogo = $c->profil->path->data.'/logos';
|
||||
}
|
||||
|
||||
public function indexAction()
|
||||
{
|
||||
$this->_helper->layout->disableLayout();
|
||||
$request = $this->getRequest();
|
||||
$siren = $request->getParam('siren', '');
|
||||
$isin = $request->getParam('isin', '');
|
||||
$logo = $this->_findlogo($siren, $isin);
|
||||
|
||||
$this->view->assign('siren', $siren);
|
||||
$this->view->assign('logo', $logo);
|
||||
}
|
||||
|
||||
public function uploadAction()
|
||||
{
|
||||
$this->_helper->layout->disableLayout();
|
||||
$request = $this->getRequest();
|
||||
|
||||
$siren = $request->getParam('siren');
|
||||
|
||||
if ($request->isPost()) {
|
||||
|
||||
if ( !empty($siren) && isset($_FILES['file']) && $_FILES['file']['error']!=UPLOAD_ERR_NO_FILE )
|
||||
{
|
||||
$logoFile = $_FILES['file'];
|
||||
$tmp_file = $logoFile['tmp_name'];
|
||||
if ( $logoFile['error']!=UPLOAD_ERR_OK ) {
|
||||
$output.= '';
|
||||
} elseif ( !is_uploaded_file($tmp_file) ){
|
||||
$output.= '';
|
||||
} else {
|
||||
// On vérifie maintenant l'extension
|
||||
$extAuthorized = array('jpeg', 'jpg', 'png', 'gif', 'bmp');
|
||||
$type_file = str_replace('image/', '',$logoFile['type']);
|
||||
$ext = '';
|
||||
if ( in_array($type_file, $extAuthorized) ){
|
||||
$ext = $type_file;
|
||||
}
|
||||
if ( !empty($ext) ){
|
||||
// on copie le fichier dans le dossier de destination
|
||||
$name_file = $siren.'.'.$ext;
|
||||
if ( file_exists(PATH_LOGOS . $name_file) ){
|
||||
unlink($this->pathLogo.'/'.$name_file);
|
||||
}
|
||||
if( !move_uploaded_file($tmp_file, $this->pathLogo.'/'.$name_file) ) {
|
||||
$output.= '';
|
||||
} else {
|
||||
$this->view->assign('image', $name_file);
|
||||
}
|
||||
} else {
|
||||
$output.= '';
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->view->assign('isPost', true);
|
||||
}
|
||||
$this->view->assign('siren', $siren);
|
||||
}
|
||||
|
||||
public function cropAction()
|
||||
{
|
||||
$this->_helper->layout->disableLayout();
|
||||
$request = $this->getRequest();
|
||||
|
||||
$siren = $request->getParam('siren');
|
||||
$image = $request->getParam('image');
|
||||
|
||||
if ($request->isPost())
|
||||
{
|
||||
$jpeg_quality = 90;
|
||||
$png_quality = 9;
|
||||
|
||||
list($name, $ext) = explode('.', $image);
|
||||
|
||||
$src = $name.'.'.$ext;
|
||||
$dst = str_replace('tmp_', '', $src);
|
||||
|
||||
//Création image
|
||||
switch($ext){
|
||||
case 'gif':
|
||||
$img_r = imagecreatefromgif($this->pathLogo.'/'.$src);
|
||||
break;
|
||||
case 'png':
|
||||
$img_r = imagecreatefrompng($this->pathLogo.'/'.$src);
|
||||
break;
|
||||
case 'jpgeg':
|
||||
case 'jpg':
|
||||
$img_r = imagecreatefromjpeg($this->pathLogo.'/'.$src);
|
||||
break;
|
||||
}
|
||||
//Resample
|
||||
$dst_r = ImageCreateTrueColor( $_POST['w'], $_POST['h'] );
|
||||
imagecopyresampled($dst_r,$img_r,0,0,$_POST['x'],$_POST['y'],
|
||||
$_POST['w'],$_POST['h'],$_POST['w'],$_POST['h']);
|
||||
//Enregistrement comme le format de départ
|
||||
if ( file_exists($this->pathLogo.'/'.$dst) ) {
|
||||
unlink($this->pathLogo.'/'.$dst);
|
||||
}
|
||||
switch($ext){
|
||||
case 'gif':
|
||||
imagegif($dst_r,$this->pathLogo.'/'.$dst);
|
||||
break;
|
||||
case 'png':
|
||||
imagepng($dst_r,$this->pathLogo.'/'.$dst, $png_quality);
|
||||
break;
|
||||
case 'jpgeg':
|
||||
case 'jpg':
|
||||
imagejpeg($dst_r,$this->pathLogo.'/'.$dst, $jpeg_quality);
|
||||
break;
|
||||
}
|
||||
$this->view->assign('image', $dst);
|
||||
$this->view->assign('isPost', true);
|
||||
} else {
|
||||
$this->view->assign('image', $image);
|
||||
}
|
||||
$this->view->assign('siren', $siren);
|
||||
}
|
||||
|
||||
public function saveAction()
|
||||
{
|
||||
$this->_helper->layout->disableLayout();
|
||||
$request = $this->getRequest();
|
||||
|
||||
$file = $request->getParam('image');
|
||||
|
||||
if ( !empty($file) ) {
|
||||
list($name, $ext) = explode('.', $file);
|
||||
$name_dst = str_replace('tmp_','',$name);
|
||||
//Vérifier les dimensions
|
||||
$max_width = 350;
|
||||
$max_height = 150;
|
||||
$size = GetImageSize($this->pathLogo.'/'.$file); // Read the size
|
||||
$width = $size[0];
|
||||
$height = $size[1];
|
||||
$x_ratio = $max_width / $width;
|
||||
$y_ratio = $max_height / $height;
|
||||
if( ($width <= $max_width) && ($height <= $max_height) )
|
||||
{
|
||||
$tn_width = $width;
|
||||
$tn_height = $height;
|
||||
}
|
||||
elseif (($x_ratio * $height) < $max_height)
|
||||
{
|
||||
$tn_height = ceil($x_ratio * $height);
|
||||
$tn_width = $max_width;
|
||||
}
|
||||
else
|
||||
{
|
||||
$tn_width = ceil($y_ratio * $width);
|
||||
$tn_height = $max_height;
|
||||
}
|
||||
//Création image
|
||||
switch($ext){
|
||||
case 'gif':
|
||||
$src = imagecreatefromgif($this->pathLogo.'/'.$src);
|
||||
break;
|
||||
case 'png':
|
||||
$src = imagecreatefrompng($this->pathLogo.'/'.$src);
|
||||
break;
|
||||
case 'jpgeg':
|
||||
case 'jpg':
|
||||
$src = imagecreatefromjpeg($this->pathLogo.'/'.$src);
|
||||
break;
|
||||
}
|
||||
$dst = imagecreatetruecolor($tn_width, $tn_height);
|
||||
imagecopyresized($dst, $src, 0, 0, 0, 0, $tn_width, $tn_height, $width, $height);
|
||||
switch($ext){
|
||||
case 'gif':
|
||||
imagegif($dst,$this->pathLogo.'/'.$name_dst.'.'.$ext);
|
||||
break;
|
||||
case 'png':
|
||||
imagepng($dst,$this->pathLogo.'/'.$name_dst.'.'.$ext);
|
||||
break;
|
||||
case 'jpgeg':
|
||||
case 'jpg':
|
||||
imagejpeg($dst,$this->pathLogo.'/'.$name_dst.'.'.$ext);
|
||||
break;
|
||||
}
|
||||
//Affecté au siren
|
||||
$dst = $this->pathLogo.'/'.str_replace('tmp_', '', $file);
|
||||
if (rename($this->pathLogo.'/'.$file, $dst)){
|
||||
chmod($dst, 0755);
|
||||
$message = 'Image affecté.';
|
||||
} else {
|
||||
$message = 'Erreur.';
|
||||
}
|
||||
}
|
||||
$this->view->assign('message', $message);
|
||||
|
||||
}
|
||||
|
||||
public function urlAction()
|
||||
{
|
||||
$this->_helper->layout->disableLayout();
|
||||
$request = $this->getRequest();
|
||||
|
||||
$siren = $request->getParam('siren');
|
||||
|
||||
if ($request->isPost()){
|
||||
|
||||
require_once 'common/curl.php';
|
||||
$logoUrl = $request->getParam('url');
|
||||
$tabTmp = parse_url($logoUrl);
|
||||
$hostUrl = $tabTmp['host'];
|
||||
$pathUrl = $tabTmp['path'];
|
||||
$tmp = explode('.', basename($pathUrl));
|
||||
$ext = strtolower(end($tmp));
|
||||
|
||||
$page = getUrl($logoUrl, '', '', '', false, $hostUrl, '', 7);
|
||||
$body = $page['body'];
|
||||
|
||||
$extAuthorized = array('jpeg', 'jpg', 'png', 'gif', 'bmp');
|
||||
|
||||
//Vérification fichier est une image
|
||||
if ( in_array($ext, $extAuthorized ) )
|
||||
{
|
||||
$name_file = $siren.'.'.$ext;
|
||||
$fp = fopen($this->pathLogo.'/'.$name_file, 'w');
|
||||
fwrite($fp, $body);
|
||||
fclose($fp);
|
||||
$this->view->assign('image', $name_file);
|
||||
}
|
||||
$this->view->assign('isPost', true);
|
||||
}
|
||||
$this->view->assign('siren', $siren);
|
||||
|
||||
}
|
||||
|
||||
public function deleteAction()
|
||||
{
|
||||
$this->_helper->layout->disableLayout();
|
||||
$request = $this->getRequest();
|
||||
|
||||
$file = $request->getParam('image');
|
||||
|
||||
if ( !empty($file) ){
|
||||
$message = "Erreur suppression fichier.";
|
||||
if ( unlink($this->pathLogo.'/'.$file)){
|
||||
$message = 'Fichier supprimé.';
|
||||
}
|
||||
}
|
||||
|
||||
$this->view->assign('message', $message);
|
||||
}
|
||||
|
||||
//====> Function interne
|
||||
|
||||
function _logo( $siren )
|
||||
{
|
||||
$message = '';
|
||||
if ( isset($_FILES['logoFile']) &&
|
||||
$_FILES['logoFile']['error']!=UPLOAD_ERR_NO_FILE ) {
|
||||
|
||||
/** Un fichier a été uploadé **/
|
||||
$logoFile = $_FILES['logoFile'];
|
||||
$tmp_file = $logoFile['tmp_name'];
|
||||
|
||||
if ( $logoFile['error']!=UPLOAD_ERR_OK ) {
|
||||
$message = 'Erreur lors de la copie du fichier';
|
||||
}
|
||||
|
||||
if ( !is_uploaded_file($tmp_file) ){
|
||||
$message = "Le fichier est introuvable";
|
||||
} else {
|
||||
// on vérifie maintenant l'extension
|
||||
$type_file = $logoFile['type'];
|
||||
$ext = '';
|
||||
if ( strstr($type_file, 'jpg')) $ext='jpg';
|
||||
elseif( strstr($type_file, 'jpeg')) $ext='jpeg';
|
||||
elseif( strstr($type_file, 'bmp')) $ext='bmp';
|
||||
elseif( strstr($type_file, 'gif')) $ext='gif';
|
||||
elseif( strstr($type_file, 'png')) $ext='png';
|
||||
if ($ext=='') {
|
||||
$message = "Le fichier n'est pas une image";
|
||||
} else {
|
||||
// on copie le fichier dans le dossier de destination
|
||||
$name_file = $siren.'.'.$ext;
|
||||
if( !move_uploaded_file($tmp_file, $this->pathLogo.'/'.$name_file) ) {
|
||||
$message = "Impossible de copier le fichier dans ".$this->pathLogo;
|
||||
} else {
|
||||
$message = "Le fichier a bien été uploadé";
|
||||
}
|
||||
}
|
||||
}
|
||||
//Suppression ou URL fichier image
|
||||
} elseif ( isset($_REQUEST['logoUrl']['del']) ||
|
||||
( isset($_REQUEST['logoUrl']['url']) &&
|
||||
$_REQUEST['logoUrl']['url']!='' ) ) {
|
||||
|
||||
//Suppression du fichier
|
||||
if ( isset($_REQUEST['logoUrl']['del']) && $_REQUEST['logoUrl']['del'] )
|
||||
{
|
||||
$extensions = array('jpeg', 'jpg', 'png', 'gif', 'bmp');
|
||||
foreach ( $extensions as $ext ) {
|
||||
if ( file_exists(PATH_LOGOS.$siren.'.'.$ext) ){
|
||||
unlink($this->pathLogo.'/'.$siren.'.'.$ext);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
saisie_getlogo($siren);
|
||||
}
|
||||
}
|
||||
return $message;
|
||||
}
|
||||
|
||||
function _saveimg( $siren )
|
||||
{
|
||||
$message = '';
|
||||
if ( isset($_FILES['logoFile']) &&
|
||||
$_FILES['logoFile']['error']!=UPLOAD_ERR_NO_FILE ) {
|
||||
$logoFile = $_FILES['logoFile'];
|
||||
$tmp_file = $logoFile['tmp_name'];
|
||||
if ( $logoFile['error']!=UPLOAD_ERR_OK ) {
|
||||
$output = '';
|
||||
} elseif ( !is_uploaded_file($tmp_file) ){
|
||||
$output = '';
|
||||
} else {
|
||||
// On vérifie maintenant l'extension
|
||||
$extAuthorized = array('jpeg', 'jpg', 'png', 'gif', 'bmp');
|
||||
$type_file = $logoFile['type'];
|
||||
$ext = '';
|
||||
if ( !in_array($type_file, $extAuthorized ) )
|
||||
{
|
||||
$ext = $type_file;
|
||||
}
|
||||
if ( !empty($ext) ){
|
||||
// on copie le fichier dans le dossier de destination
|
||||
$name_file = 'tmp_'.$siren.'.'.$ext;
|
||||
if( !move_uploaded_file($tmp_file, $this->pathLogo.'/'.$name_file) ) {
|
||||
$output = '';
|
||||
} else {
|
||||
chmod($this->pathLogo.'/'.$name_file, 0755);
|
||||
$output = $name_file;
|
||||
}
|
||||
} else {
|
||||
$output = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
function _findlogo( $siren, $isin = '' )
|
||||
{
|
||||
$img = '';
|
||||
$extensions = array('jpeg', 'jpg', 'png', 'gif', 'bmp');
|
||||
//Recherche image sur base siren
|
||||
foreach ( $extensions as $ext ) {
|
||||
if ( file_exists($this->pathLogo.'/'.$siren.'.'.$ext) ) {
|
||||
$img = $siren.'.'.$ext;
|
||||
break;
|
||||
}
|
||||
}
|
||||
//Recherche image sur base isin
|
||||
if ( $img == '' && $isin != '' ) {
|
||||
foreach ( $extensions as $ext ) {
|
||||
if ( file_exists($this->pathLogo.'/'.$isin.'.'.$ext) ) {
|
||||
$img = $isin.'.'.$ext;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $img;
|
||||
}
|
||||
|
||||
|
||||
function _loadlogo( $siren, $isin = '' )
|
||||
{
|
||||
$urlImg = '';
|
||||
$locImg = $this->pathLogo.'/'.$siren;
|
||||
$extensions = array('jpeg', 'jpg', 'png', 'gif', 'bmp');
|
||||
|
||||
//Recherche image sur base siren
|
||||
foreach ( $extensions as $ext ) {
|
||||
if ( file_exists($locImg.'.'.$ext) ) {
|
||||
$urlImg = '/logos/'.$siren.'.'.$ext;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//Recherche image sur base isin
|
||||
if ( $urlImg == '' && $isin != '' ) {
|
||||
$locImg = PATH_LOGOS . $isin;
|
||||
foreach ( $extensions as $ext ) {
|
||||
if ( file_exists($locImg.'.'.$ext) ) {
|
||||
$urlImg = '/logos/'.$isin.'.'.$ext;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$output = '';
|
||||
//Redimensionnement
|
||||
if ( $urlImg != '' ) {
|
||||
$tabTmp = getimagesize($locImg.'.'.$ext);
|
||||
$w = $tabTmp[0];
|
||||
$h = $tabTmp[1];
|
||||
if ( $w>350 ) {
|
||||
$strSize = redimage($locImg.'.'.$ext,350,150);
|
||||
} else {
|
||||
$strSize = '';
|
||||
}
|
||||
|
||||
$output = '<img src="'.$urlImg.'" '.$strSize.'/>';
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
function _getlogo( $siren )
|
||||
{
|
||||
require_once 'common/curl.php';
|
||||
$logoUrl = $_REQUEST['logoUrl']['url'];
|
||||
$tabTmp = parse_url($logoUrl);
|
||||
$hostUrl = $tabTmp['host'];
|
||||
$pathUrl = $tabTmp['path'];
|
||||
$tmp = explode('.', basename($pathUrl));
|
||||
$ext = strtolower(end($tmp));
|
||||
$page = getUrl($logoUrl, '', '', '', false, $hostUrl, '', 7);
|
||||
$body = $page['body'];
|
||||
$extAuthorized = array('jpeg', 'jpg', 'png', 'gif', 'bmp');
|
||||
if ( !in_array($ext, $extAuthorized ) )
|
||||
{
|
||||
$tmp = explode('/', $page['header']['Content-Type']);
|
||||
$ext = trim ( str_replace('?', '',strtolower(end($tmp)) ) );
|
||||
}
|
||||
$name_file = $siren.'.'.$ext;
|
||||
$fp = @fopen($this->pathLogo.'/'.$name_file, 'w');
|
||||
@fwrite($fp, $body);
|
||||
@fclose($fp);
|
||||
chmod($this->pathLogo.'/'.$name_file, 0755);
|
||||
}
|
||||
|
||||
}
|
@ -1,283 +0,0 @@
|
||||
<?php
|
||||
class MandataireController extends Zend_Controller_Action
|
||||
{
|
||||
protected $coursAppel = array(
|
||||
array( "triId"=>"1756", "triCode"=>"AIXPRL", "triNom"=>"Cour d'Appel d'Aix-en-Provence", "triCP"=>"13616" ),
|
||||
array( "triId"=>"1757", "triCode"=>"AMIENL", "triNom"=>"Cour d'Appel d'Amiens", "triCP"=>"80027" ),
|
||||
array( "triId"=>"1758", "triCode"=>"ANGERL", "triNom"=>"Cour d'Appel d'Angers", "triCP"=>"49043" ),
|
||||
array( "triId"=>"1759", "triCode"=>"BASSEL", "triNom"=>"Cour d'Appel de Basse-Terre", "triCP"=>"97109" ),
|
||||
array( "triId"=>"1760", "triCode"=>"BASTIL", "triNom"=>"Cour d'Appel de Bastia", "triCP"=>"20407" ),
|
||||
array( "triId"=>"1761", "triCode"=>"BESANL", "triNom"=>"Cour d'Appel de Besançon", "triCP"=>"25017" ),
|
||||
array( "triId"=>"1762", "triCode"=>"BORDEL", "triNom"=>"Cour d'Appel de Bordeaux", "triCP"=>"33077" ),
|
||||
array( "triId"=>"1763", "triCode"=>"BOURGL", "triNom"=>"Cour d'Appel de Bourges", "triCP"=>"18023" ),
|
||||
array( "triId"=>"1764", "triCode"=>"CAENL", "triNom"=>"Cour d'Appel de Caen", "triCP"=>"14050" ),
|
||||
array( "triId"=>"1765", "triCode"=>"CHAMBL", "triNom"=>"Cour d'Appel de Chambéry", "triCP"=>"73018" ),
|
||||
array( "triId"=>"1766", "triCode"=>"COLMAL", "triNom"=>"Cour d'Appel de Colmar", "triCP"=>"68027" ),
|
||||
array( "triId"=>"1767", "triCode"=>"DIJONL", "triNom"=>"Cour d'Appel de Dijon", "triCP"=>"21034" ),
|
||||
array( "triId"=>"1768", "triCode"=>"DOUAIL", "triNom"=>"Cour d'Appel de Douai", "triCP"=>"59507" ),
|
||||
array( "triId"=>"1769", "triCode"=>"FORTFL", "triNom"=>"Cour d'Appel de Fort-de-France", "triCP"=>"97200" ),
|
||||
array( "triId"=>"1770", "triCode"=>"GRENOL", "triNom"=>"Cour d'Appel de Grenoble", "triCP"=>"38019" ),
|
||||
array( "triId"=>"1771", "triCode"=>"LIMOGL", "triNom"=>"Cour d'Appel de Limoges", "triCP"=>"87031" ),
|
||||
array( "triId"=>"1772", "triCode"=>"LYONL", "triNom"=>"Cour d'Appel de Lyon", "triCP"=>"69321" ),
|
||||
array( "triId"=>"1773", "triCode"=>"METZL", "triNom"=>"Cour d'Appel de Metz", "triCP"=>"57036" ),
|
||||
array( "triId"=>"1774", "triCode"=>"MONTPL", "triNom"=>"Cour d'Appel de Montpellier", "triCP"=>"34023" ),
|
||||
array( "triId"=>"1775", "triCode"=>"NANCYL", "triNom"=>"Cour d'Appel de Nancy", "triCP"=>"54035" ),
|
||||
array( "triId"=>"1776", "triCode"=>"NIMESL", "triNom"=>"Cour d'Appel de Nîmes", "triCP"=>"30031" ),
|
||||
array( "triId"=>"1777", "triCode"=>"NOUMEL", "triNom"=>"Cour d'Appel de Nouméa", "triCP"=>"98848" ),
|
||||
array( "triId"=>"1778", "triCode"=>"PAPEEL", "triNom"=>"Cour d'Appel de Papeete", "triCP"=>"98714" ),
|
||||
array( "triId"=>"1779", "triCode"=>"PARISL", "triNom"=>"Cour d'Appel de Paris", "triCP"=>"75055" ),
|
||||
array( "triId"=>"1780", "triCode"=>"PAUL", "triNom"=>"Cour d'Appel de Pau", "triCP"=>"64034" ),
|
||||
array( "triId"=>"1781", "triCode"=>"POITIL", "triNom"=>"Cour d'Appel de Poitiers", "triCP"=>"86020" ),
|
||||
array( "triId"=>"1782", "triCode"=>"REIMSL", "triNom"=>"Cour d'Appel de Reims", "triCP"=>"51096" ),
|
||||
array( "triId"=>"1783", "triCode"=>"RENNEL", "triNom"=>"Cour d'Appel de Rennes", "triCP"=>"35064" ),
|
||||
array( "triId"=>"1784", "triCode"=>"RIOML", "triNom"=>"Cour d'Appel de Riom", "triCP"=>"63201" ),
|
||||
array( "triId"=>"1785", "triCode"=>"ROUENL", "triNom"=>"Cour d'Appel de Rouen", "triCP"=>"76037" ),
|
||||
array( "triId"=>"1786", "triCode"=>"STDENL", "triNom"=>"Cour d'Appel de Saint-Denis-de-La Réunion", "triCP"=>"97488" ),
|
||||
array( "triId"=>"1787", "triCode"=>"TOULOL", "triNom"=>"Cour d'Appel de Toulouse", "triCP"=>"31068" ),
|
||||
array( "triId"=>"1788", "triCode"=>"VERSAL", "triNom"=>"Cour d'Appel de Versailles", "triCP"=>"78011" ),
|
||||
array( "triId"=>"1789", "triCode"=>"ORLEAL", "triNom"=>"Cour d'Appel d'Orléans", "triCP"=>"45044" ),
|
||||
array( "triId"=>"1790", "triCode"=>"CAYENL", "triNom"=>"Chambre Détachée de la Cour d'Appel de Fort de France à Cayenne", "triCP"=>"97300" ),
|
||||
array( "triId"=>"1798", "triCode"=>"AGENL", "triNom"=>"Cour d'Appel d'Agen", "triCP"=>"47916" ),
|
||||
);
|
||||
|
||||
public function init()
|
||||
{
|
||||
require_once 'Scores/WsScores.php';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Enregistrement d'un mandataire
|
||||
*/
|
||||
public function addAction()
|
||||
{
|
||||
$this->_helper->layout->disableLayout();
|
||||
|
||||
$request = $this->getRequest();
|
||||
$idMandataire = $request->getParam('idMand', '');
|
||||
$tribunal = $request->getParam('tribunal', '');
|
||||
|
||||
$ws = new WsScores();
|
||||
|
||||
Zend_Registry::get('firebug')->info('idMandataire : '.$idMandataire);
|
||||
|
||||
//Mode edition
|
||||
if ($idMandataire != '') {
|
||||
$idMandataire = (int)substr($idMandataire,1);
|
||||
$reponse = $ws->getMandataire($idMandataire);
|
||||
Zend_Registry::get('firebug')->info($reponse);
|
||||
if ($reponse!==false) {
|
||||
$tabMandataires = json_decode($reponse, true);
|
||||
} else {
|
||||
$message = 'Une erreur est survenue durant la recherche de mandataire.';
|
||||
}
|
||||
//Mode ajout
|
||||
} else {
|
||||
$tabMandataires = $request->getParam('tabMandataires');
|
||||
}
|
||||
|
||||
if ($tribunal!='') {
|
||||
//La cour d'appel suivant le tribunal sélectionné
|
||||
$codeCourAppel = $ws->getIdCoursAppel($tribunal);
|
||||
|
||||
//Les tribunaux
|
||||
$tmp = $ws->getTribunaux(array('C','I','G')); //
|
||||
|
||||
$tribunaux = $tmp->result->item;
|
||||
}else{
|
||||
$message = 'Pas de tribunal sélectionné.';
|
||||
}
|
||||
|
||||
$this->view->assign('message', $message);
|
||||
$this->view->assign('tabMandataires', $tabMandataires);
|
||||
$this->view->assign('coursAppel', $this->coursAppel);
|
||||
$this->view->assign('tribunal', $tribunal);
|
||||
$this->view->assign('tribunaux', $tribunaux);
|
||||
}
|
||||
|
||||
/**
|
||||
* Edition d'un mandataire
|
||||
*/
|
||||
public function editAction()
|
||||
{
|
||||
$this->_forward('add');
|
||||
}
|
||||
|
||||
/**
|
||||
* Recherche d'un mandataire à partir d'une chaine de caractères
|
||||
* "nom, departement"
|
||||
*/
|
||||
public function searchAction()
|
||||
{
|
||||
$this->_helper->layout->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender();
|
||||
|
||||
$request = $this->getRequest();
|
||||
$search = $request->getParam('search', '');
|
||||
|
||||
if (empty($search)) { echo ''; }
|
||||
else { $search = strtolower($search); }
|
||||
|
||||
list($searchStr, $filtre) = explode(',', $search);
|
||||
$searchStr = trim($searchStr);
|
||||
$filtre = str_replace(' ', '', $filtre);
|
||||
if( strlen($filtre) != 5 && strlen($filtre) != 2 ){
|
||||
$filtre = '';
|
||||
}
|
||||
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->searchMandataires(
|
||||
$searchStr,
|
||||
array('V', 'N', 'H', 'A', 'M'), //types de mandataires
|
||||
$filtre
|
||||
);
|
||||
|
||||
if ($reponse == false){
|
||||
echo 'Erreur durant la recherche';
|
||||
exit;
|
||||
}
|
||||
|
||||
$mandataires = $reponse->result->item;
|
||||
|
||||
$output = array();
|
||||
$output[] = array(
|
||||
'label' => "A l'adresse du bien vendu",
|
||||
'id' => 'adresse'
|
||||
);
|
||||
|
||||
/*
|
||||
REGEX Code Postal : ^(F-)?((2[A|B])|[0-9]{2})[0-9]{3}$
|
||||
(?<!/BP /i) Ne pas avoir la présence de BP devant les 5 chiffres
|
||||
*/
|
||||
//Recherche des codes postaux
|
||||
if( count($mandataires)>0 ) {
|
||||
$tableResults = array();
|
||||
$i=0;
|
||||
foreach ($mandataires as $mandataire) {
|
||||
$tabResults[$i]['code'] = $mandataire->id;
|
||||
$tabResults[$i]['lib'] = htmlspecialchars_decode(
|
||||
html_entity_decode($mandataire->mand, ENT_COMPAT | ENT_HTML401, 'UTF-8')
|
||||
, ENT_QUOTES);
|
||||
|
||||
preg_match('/(?<!bp )((2[A|B])|[0-9]{2})[0-9]{3}( )/i', $mandataire->mand, $matches);
|
||||
$tabResults[$i]['cp'] = $matches[0];
|
||||
$i++;
|
||||
}
|
||||
foreach ($tabResults as $key => $row){
|
||||
$code[$key] = $row['code'];
|
||||
$lib[$key] = $row['lib'];
|
||||
$cp[$key] = $row['cp'];
|
||||
}
|
||||
//Classement du tableau
|
||||
array_multisort($cp, SORT_NUMERIC, $tabResults);
|
||||
|
||||
//Affichage des valeurs
|
||||
foreach ($tabResults as $item){
|
||||
$output[] = array(
|
||||
'label' => $item['lib'],
|
||||
'id' => $item['code']
|
||||
);
|
||||
}
|
||||
}
|
||||
echo json_encode($output);
|
||||
}
|
||||
|
||||
public function getAction()
|
||||
{
|
||||
$this->_helper->layout->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
||||
$request = $this->getRequest();
|
||||
$siren = $request->getParam('siren');
|
||||
$siren = str_replace(' ','',$siren); //Remplacer les espaces
|
||||
|
||||
if ( $siren=='' || strlen($siren)!=14 ) {
|
||||
$output = array(
|
||||
'Siret' => 'Siret incorrect',
|
||||
);
|
||||
echo json_encode($output);
|
||||
exit;
|
||||
}
|
||||
|
||||
$tabEntrep = array();
|
||||
$ws = new WsScores();
|
||||
$tabEntrep = $ws->getIdentite($siren);
|
||||
if ($tabEntrep!==false){
|
||||
/**
|
||||
* Utiliser la raison sociale la plus longue
|
||||
* Nom, Nom2, NomLong
|
||||
*/
|
||||
if (!empty($tabEntrep->NomLong) && strlen($tabEntrep->NomLong)>strlen($tabEntrep->Nom)){
|
||||
$tabEntrep->Nom = $tabEntrep->NomLong;
|
||||
}
|
||||
|
||||
//Retourner le tableau sous forme json
|
||||
echo json_encode($tabEntrep);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function saveAction()
|
||||
{
|
||||
$this->_helper->layout->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender();
|
||||
|
||||
$request = $this->getRequest();
|
||||
|
||||
$error = false;
|
||||
|
||||
$tabMandataires = $request->getParam('tabMandataires', array());
|
||||
|
||||
//Vérification des données
|
||||
$fields = array();
|
||||
if($tabMandataires['sirenGrp']=='' && $tabMandataires['sirenMand']==''){
|
||||
$fields[] ='Siret'; $error = true;
|
||||
}
|
||||
if($tabMandataires['sirenGrp'] == $tabMandataires['sirenMand']){
|
||||
$fields[] ='Siret de la société civile identique au Siret du mandataire';
|
||||
$error = true;
|
||||
}
|
||||
if( (strlen($tabMandataires['sirenGrp'])!=14 && empty($tabMandataires['sirenMand'])) ||
|
||||
(empty($tabMandataires['sirenGrp']) && strlen($tabMandataires['sirenMand'])!=14) ){
|
||||
$fields = 'Siret avec la bonne taille';
|
||||
$error = true;
|
||||
}
|
||||
|
||||
if($tabMandataires['Nom']=='' ){$fields[] ='Nom'; $error = true;}
|
||||
if($tabMandataires['type']==''){$fields[] ='Type'; $error = true;}
|
||||
if($tabMandataires['tribunal']==''){$fields[] ='Tribunal'; $error = true;}
|
||||
if($tabMandataires['coursAppel']==''){$fields[] ='Cours d\'appel'; $error = true;}
|
||||
if($tabMandataires['Statut']==''){$fields[] ='Statut'; $error = true;}
|
||||
if($tabMandataires['adresse']==''){$fields[] ='Adresse'; $error = true;}
|
||||
if($tabMandataires['cp']==''){$fields[] ='Code Postal'; $error = true;}
|
||||
if($tabMandataires['ville']==''){$fields[] ='Ville'; $error = true;}
|
||||
if($tabMandataires['tel']==''){$fields[] ='Téléphone'; $error = true;}
|
||||
|
||||
//Envoi de la requête au webservices
|
||||
if ($error==true){
|
||||
$message = '<font color="red">';
|
||||
$message.= 'Veuillez remplir les champs suivants : ';
|
||||
$message.= join(', ', $fields);
|
||||
$message.= '</font>';
|
||||
}else{
|
||||
$message='';
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->setMandataire($tabMandataires);
|
||||
if ($reponse===false || $reponse->result==false){
|
||||
$message = 'Une erreur s\'est produite durant l\'enregistrement';
|
||||
}
|
||||
}
|
||||
echo $message;
|
||||
}
|
||||
|
||||
protected function htmlentitydecode_deep($value)
|
||||
{
|
||||
$value = is_array($value) ?
|
||||
array_map(array('MandataireController' ,'htmlentitydecode_deep'), $value) :
|
||||
html_entity_decode($value, ENT_QUOTES);
|
||||
return $value;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,227 +0,0 @@
|
||||
<?php
|
||||
class PrintController extends Zend_Controller_Action
|
||||
{
|
||||
|
||||
public function init(){}
|
||||
|
||||
/**
|
||||
* Renvoie les paramètres pour l'impression
|
||||
*/
|
||||
protected function pageParams($fichierPart)
|
||||
{
|
||||
$elements = explode('-', $fichierPart);
|
||||
$controller = $elements[0];
|
||||
$action = $elements[1];
|
||||
$params = array();
|
||||
switch($controller){
|
||||
case 'identite':
|
||||
case 'dirigeant':
|
||||
$params['siret'] = $elements[2];
|
||||
$params['id'] = $elements[3];
|
||||
break;
|
||||
case 'finance':
|
||||
switch($action){
|
||||
case 'synthese':
|
||||
case 'bilan':
|
||||
$params['typeBilan'] = $elements[4];
|
||||
break;
|
||||
case 'ratios':
|
||||
$params['typeBilan'] = $elements[4];
|
||||
$params['mil'] = $elements[5];
|
||||
break;
|
||||
case 'liasse':
|
||||
$params['unit'] = $elements[4];
|
||||
$params['date'] = $elements[5];
|
||||
break;
|
||||
}
|
||||
$params['siret'] = $elements[2];
|
||||
$params['id'] = $elements[3];
|
||||
break;
|
||||
case 'juridique':
|
||||
switch($action){
|
||||
case 'annonces':
|
||||
$params['siret'] = $elements[2];
|
||||
$params['id'] = $elements[3];
|
||||
$params['idAnn'] = $elements[4];
|
||||
$params['vue'] = $elements[5];
|
||||
$params['p'] = $elements[6];
|
||||
break;
|
||||
case 'infosreg':
|
||||
case 'conventions':
|
||||
$params['siret'] = $elements[2];
|
||||
$params['id'] = $elements[3];
|
||||
break;
|
||||
case 'competences':
|
||||
$params['siret'] = $elements[2];
|
||||
$params['id'] = $elements[3];
|
||||
$params['type'] = $elements[4];
|
||||
break;
|
||||
case 'marques':
|
||||
$params['siret'] = $elements[2];
|
||||
$params['id'] = $elements[3];
|
||||
$params['idObject'] = $elements[4];
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 'evaluation':
|
||||
$params['siret'] = $elements[2];
|
||||
$params['id'] = $elements[3];
|
||||
break;
|
||||
case 'giant':
|
||||
$params['idRapport'] = $elements[2];
|
||||
break;
|
||||
case 'surveillance':
|
||||
switch($action){
|
||||
case 'fichier':
|
||||
$params['nomFic'] = $elements[2];
|
||||
$params['filtre'] = $elements[3];
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return array(
|
||||
'controller' => $controller,
|
||||
'action' => $action,
|
||||
'params' => $params
|
||||
);
|
||||
}
|
||||
|
||||
public function indexAction(){}
|
||||
|
||||
/**
|
||||
* Imprime la page en PDF
|
||||
* Par défaut, le contenu html a déjà été enregistré..
|
||||
* Mais si ce n'est pas le cas retrouver le contenu
|
||||
* Générer le PDF gràce à wkhtmltopdf
|
||||
* Attention à bien retrouver les css spécifiques pour l'impression
|
||||
* !! Cacher le menu display:none
|
||||
*/
|
||||
public function pdfAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$fichier = $request->getParam('fichier');
|
||||
|
||||
if (substr($fichier,-4)!='.pdf') {
|
||||
echo 'Fichier incorrect';
|
||||
exit;
|
||||
}
|
||||
$fichier = str_replace('.pdf', '', $fichier);
|
||||
|
||||
$c = Zend_Registry::get('config');
|
||||
$file = $c->profil->path->pages.'/'.$fichier.'.html';
|
||||
if (!file_exists($file))
|
||||
{
|
||||
echo 'Fichier introuvable';
|
||||
exit;
|
||||
}
|
||||
|
||||
require_once 'wkhtmltopdf/wkhtmltopdf.php';
|
||||
$pdf = new wkhtmltopdf();
|
||||
$pdf->setOptions('footer-right', 'Page [page] sur [toPage]');
|
||||
$pdf->setOptions('header-right', date('d/m/Y H:i:s'));
|
||||
$output_file = $pdf->exec($file);
|
||||
|
||||
//Envoi au navigateur
|
||||
if(!file_exists($output_file))
|
||||
{
|
||||
echo 'Impossible de générer le fichier PDF';
|
||||
exit;
|
||||
}
|
||||
|
||||
$content_type = 'application/pdf';
|
||||
$dest = 'I';
|
||||
switch($dest)
|
||||
{
|
||||
case 'I': //Send to standard output
|
||||
header('Content-type: '.$content_type.'');
|
||||
header('Content-Length: '.filesize($output_file));
|
||||
header('Content-MD5: '.base64_encode(md5_file($output_file)));
|
||||
header('Content-Disposition: inline; filename="'.basename($output_file).'"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression','0');
|
||||
echo file_get_contents($output_file);
|
||||
exit; // nécessaire pour être certain de ne pas envoyer de fichier corrompu
|
||||
|
||||
break;
|
||||
|
||||
case 'D': //Download file
|
||||
header('Content-Tranfer-Encoding: none');
|
||||
header('Content-Length: '.filesize($output_file));
|
||||
header('Content-MD5: '.base64_encode(md5_file($output_file)));
|
||||
header('Content-Type: application/octetstream; name="'.basename($output_file).'"');
|
||||
header('Content-Disposition: attachment; filename="'.basename($output_file).'"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression','0');
|
||||
//header('Date: '.gmdate(DATE_RFC1123););
|
||||
//header('Expires: '.gmdate(DATE_RFC1123, time()+1));
|
||||
//header('Last-Modified: '.gmdate(DATE_RFC1123, filemtime($output_file)));
|
||||
echo file_get_contents($output_file);
|
||||
exit; // nécessaire pour être certain de ne pas envoyer de fichier corrompu
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Imprime la page en activant le javascript d'impression
|
||||
* Il faut récupérer le controller et l'action du nom du fichier, ainsi que
|
||||
* les paramètres
|
||||
* Par exemple :
|
||||
* identite-fiche-siret-id.html
|
||||
*/
|
||||
public function ecranAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$fichier = $request->getParam('fichier', '');
|
||||
|
||||
if (substr($fichier,-5)!='.html') {
|
||||
echo 'Fichier incorrect';
|
||||
exit;
|
||||
}
|
||||
|
||||
$fichier = str_replace('.html', '', $fichier);
|
||||
$elements = $this->pageParams($fichier);
|
||||
if ($elements===false){
|
||||
exit;
|
||||
}
|
||||
$this->view->assign('controller', $elements['controller']);
|
||||
$this->view->assign('action', $elements['action']);
|
||||
$this->view->assign('params', $elements['params']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Envoi le fichier XML de l'objet sérialiser sur la sortie standard
|
||||
*/
|
||||
public function xmlAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
$request = $this->getRequest();
|
||||
$fichier = $request->getParam('fichier', '');
|
||||
|
||||
if (substr($fichier,-4)!='.xml') {
|
||||
echo 'Fichier incorrect.';
|
||||
exit;
|
||||
}
|
||||
|
||||
$c = Zend_Registry::get('config');
|
||||
$file = $c->profil->path->files.'/'.$fichier;
|
||||
if (!file_exists($file)){
|
||||
echo "Erreur lors de la génération du fichier.";
|
||||
exit;
|
||||
}
|
||||
|
||||
header("Content-type: application/xml");
|
||||
header("Content-Disposition: attachement; filename=\"$fichier\"");
|
||||
flush();
|
||||
echo file_get_contents($file);
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,300 +0,0 @@
|
||||
<?php
|
||||
class TelechargementController extends Zend_Controller_Action
|
||||
{
|
||||
/**
|
||||
* Temps de mis en cache en heure
|
||||
* @var interger
|
||||
*/
|
||||
protected $filetime = 8;
|
||||
|
||||
/**
|
||||
* Répertoire de stockage pour le fichier
|
||||
* @var string
|
||||
*/
|
||||
protected $path = '';
|
||||
|
||||
/**
|
||||
* Vérifie ou télécharge le fichier sur une url
|
||||
* @param string $url
|
||||
* URL of file to download
|
||||
* @param mixed $filename
|
||||
* Override filename
|
||||
*/
|
||||
protected function getFile($url, $filename=null)
|
||||
{
|
||||
if (!is_dir($this->path)) mkdir($this->path);
|
||||
|
||||
require_once 'common/curl.php';
|
||||
|
||||
// Recuperation du nom du fichier
|
||||
if ($filename===null) {
|
||||
$tableau = explode('/', $url);
|
||||
$file = $tableau[sizeof($tableau) - 1];
|
||||
} else {
|
||||
$file = $filename;
|
||||
}
|
||||
|
||||
// Suppression du fichier si le temps de cache est depasse
|
||||
if (file_exists($this->path.'/'.$file)){
|
||||
$dateFile = filemtime($this->path.'/'.$file);
|
||||
$now = mktime(date('G'), date('i'), date('s'),
|
||||
date('m') , date('d'), date('Y'));
|
||||
$maxTime = mktime(date('G',$dateFile)+$this->filetime, date('i',$dateFile),
|
||||
date('s',$dateFile), date('m',$dateFile),
|
||||
date('d',$dateFile), date('Y',$dateFile));
|
||||
if ($maxTime-$now<0) {
|
||||
unlink($this->path.'/'.$file);
|
||||
}
|
||||
}
|
||||
|
||||
// Recuperation du fichier sur le serveur
|
||||
if (!file_exists($this->path.'/'.$file)) {
|
||||
// On check si le fichier est present sur l'url
|
||||
Zend_Registry::get('firebug')->info('URL : '.$url);
|
||||
$url_tab = getUrl($url, '', '', '', false);
|
||||
if ($url_tab['code'] == 408 ||
|
||||
$url_tab['code'] == 400 ||
|
||||
$url_tab['code'] == 404) {
|
||||
// Fichier non disponible
|
||||
Zend_Registry::get('firebug')->info('Fichier non disponible !');
|
||||
return false;
|
||||
} else {
|
||||
// Ecriture du fichier sur le serveur en local
|
||||
$body = $url_tab['body'];
|
||||
Zend_Registry::get('firebug')->info('Taille fichier '.strlen($body));
|
||||
if ( strlen($body) ) {
|
||||
$fp = fopen($this->path.'/'.$file, 'w');
|
||||
fwrite($fp, $body);
|
||||
fclose($fp);
|
||||
Zend_Registry::get('firebug')->info('Ecriture fichier : '.$this->path.'/'.$file);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $file;
|
||||
}
|
||||
|
||||
public function init()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
||||
$c = Zend_Registry::get('config');
|
||||
$this->path = $c->profil->path->files;
|
||||
|
||||
require_once 'Scores/WsScores.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* Télécharge la consommation client sous forme de fichier csv et affiche le lien
|
||||
*/
|
||||
public function consommationAction()
|
||||
{
|
||||
$this->filetime = 1;
|
||||
|
||||
$request = $this->getRequest();
|
||||
$start = $request->getParam('start', false);
|
||||
|
||||
//On souhaite récupérer l'url du fichier
|
||||
if ($start==1) {
|
||||
$mois = $request->getParam('mois');
|
||||
$detail = $request->getParam('detail', 0);
|
||||
$idClient = $request->getParam('idClient', 0);
|
||||
$login = $request->getParam('login', '');
|
||||
$all = $request->getParam('all', 0);
|
||||
|
||||
$date = substr($mois, 3, 4).substr($mois, 0, 2);
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
if (empty($login) && (!$user->isAdmin() && !$user->isSuperAdmin()) ) {
|
||||
$login = $user->getLogin();
|
||||
}
|
||||
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getLogsClients($date, $detail, $idClient, $login, $all);
|
||||
|
||||
if (!empty($reponse->result->Url)) {
|
||||
echo $reponse->result->Url;
|
||||
} else {
|
||||
echo 'FALSE';
|
||||
}
|
||||
} else {
|
||||
$url = $request->getParam('url', '');
|
||||
$file = $this->getFile($url);
|
||||
|
||||
// Le fichier existe sur l'extranet
|
||||
if ($file && file_exists($this->path.'/'.$file)) {
|
||||
if (filesize($this->path.'/'.$file) > 0) {
|
||||
echo '<u><a title="Télécharger le fichier"'.
|
||||
' target="_blank" href="/fichier/consommation/'.$file.
|
||||
'">Cliquez-ici pour télécharger'.
|
||||
' le fichier.</a></u>';
|
||||
} else {
|
||||
echo 'Aucune consommmation enregistrée.';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Télécharge les surveillances sous forme de fichier csv et affiche le lien
|
||||
*/
|
||||
public function surveillanceAction()
|
||||
{
|
||||
$this->filetime = 4;
|
||||
|
||||
$request = $this->getRequest();
|
||||
$start = $request->getParam('start', false);
|
||||
|
||||
if ($start==1) {
|
||||
$source = $request->getParam('source', '');
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
$login = $user->getLogin();
|
||||
$idClient = $user->getIdClient();
|
||||
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getListeSurveillancesCsv($source, $login, $idClient);
|
||||
|
||||
if (!empty($reponse->result->Url)) {
|
||||
echo $reponse->result->Url;
|
||||
exit;
|
||||
}
|
||||
echo 'FALSE';
|
||||
exit;
|
||||
|
||||
} else {
|
||||
$url = $request->getParam('url', '');
|
||||
$file = $this->getFile($url);
|
||||
|
||||
// Le fichier existe sur l'extranet
|
||||
if ($file && file_exists($this->path.'/'.$file)) {
|
||||
if (filesize($this->path.'/'.$file) > 0) {
|
||||
echo '<u><a title="Télécharger le fichier"'.
|
||||
' target="_blank" href="/fichier/surveillance/'.$file.
|
||||
'">Cliquez-ici pour télécharger'.
|
||||
' le fichier.</a></u>';
|
||||
} else {
|
||||
echo 'Aucune surveillance enregistrée.';
|
||||
}
|
||||
}
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Télécharge le portefeuille sous forme de fichier csv et affiche le lien
|
||||
* Enter description here ...
|
||||
*/
|
||||
public function portefeuilleAction()
|
||||
{
|
||||
$this->filetime = 4;
|
||||
|
||||
$request = $this->getRequest();
|
||||
$start = $request->getParam('start', false);
|
||||
|
||||
if ($start==1) {
|
||||
$user = new Scores_Utilisateur();
|
||||
$login = $user->getLogin();
|
||||
$idClient = $user->getIdClient();
|
||||
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getPortefeuilleCsv($login, $idClient);
|
||||
|
||||
if (!empty($reponse->result->Url)) {
|
||||
echo $reponse->result->Url;
|
||||
exit;
|
||||
}
|
||||
echo 'FALSE';
|
||||
exit;
|
||||
|
||||
} else {
|
||||
$url = $request->getParam('url', '');
|
||||
$file = $this->getFile($url);
|
||||
|
||||
// Le fichier existe sur l'extranet
|
||||
if ($file && file_exists($this->path.'/'.$file)) {
|
||||
if (filesize($this->path.'/'.$file) > 0) {
|
||||
echo '<u><a title="Télécharger le fichier"'.
|
||||
' target="_blank" href="/fichier/portefeuille/'.$file.
|
||||
'">Cliquez-ici pour télécharger'.
|
||||
' le fichier.</a></u>';
|
||||
} else {
|
||||
echo 'Aucune surveillance enregistrée.';
|
||||
}
|
||||
}
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Download pdf of bodacc history
|
||||
*/
|
||||
public function histopdfAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
|
||||
$q = $request->getParam('q', '');
|
||||
$host = base64_decode($request->getParam('host', ''));
|
||||
|
||||
//Authenticate info
|
||||
$auth = Zend_Auth::getInstance();
|
||||
$identity = $auth->getIdentity();
|
||||
$authinfo = '/login/'.$identity->username.'/hach/'.$identity->password;
|
||||
$url = $host.$authinfo.'/q/'.$q;
|
||||
|
||||
Zend_Registry::get('firebug')->info($url);
|
||||
|
||||
$file = $this->getFile($url, uniqid('histo-').'.pdf');
|
||||
|
||||
// Le fichier existe sur l'extranet
|
||||
if ($file && file_exists($this->path.'/'.$file)) {
|
||||
if (filesize($this->path.'/'.$file) > 0) {
|
||||
echo '<u><a title="Télécharger le fichier"'.
|
||||
' target="_blank" href="/fichier/histopdf/'.$file.
|
||||
'">Cliquez-ici pour télécharger'.
|
||||
' le fichier.</a></u>';
|
||||
} else {
|
||||
echo "Erreur lors du téléchargement du fichier.";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Download bilan pdf file
|
||||
*/
|
||||
public function bilanAction()
|
||||
{
|
||||
$this->filetime = 40;
|
||||
|
||||
$request = $this->getRequest();
|
||||
$siren = $request->getParam('siren');
|
||||
$dateCloture = $request->getParam('dateCloture');
|
||||
$reference = $request->getParam('reference');
|
||||
|
||||
//Récupération du l'URL
|
||||
require_once 'Scores/WsScores.php';
|
||||
$ws = new WsScores();
|
||||
$url = $ws->getPiecesBilan($siren, 'T', $dateCloture, $reference);
|
||||
|
||||
//Téléchargement
|
||||
if( $url !== false) {
|
||||
Zend_Registry::get('firebug')->info($url);
|
||||
$file = $this->getFile($url);
|
||||
Zend_Registry::get('firebug')->info('File:'.$this->path.'/'.$file);
|
||||
// Le fichier existe sur l'extranet
|
||||
if ($file && file_exists($this->path.'/'.$file)) {
|
||||
if (filesize($this->path.'/'.$file) > 0) {
|
||||
echo '<br/><u><a title="Télécharger le fichier"'.
|
||||
' target="_blank" href="/fichier/bilan/'.$file.
|
||||
'">Cliquez-ici pour télécharger'.
|
||||
' le fichier.</a></u>';
|
||||
} else {
|
||||
echo "<br/>Erreur lors du téléchargement du fichier.";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
echo "<br/>Erreur.";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,438 +0,0 @@
|
||||
<?php
|
||||
class UserController extends Zend_Controller_Action
|
||||
{
|
||||
/**
|
||||
* Récupére les valeurs du profil depuis le webservice
|
||||
* @param unknown_type $login
|
||||
* @param unknown_type $password
|
||||
*/
|
||||
protected function updateProfil($login, $password)
|
||||
{
|
||||
Zend_Registry::get('firebug')->info('updateProfil');
|
||||
$ws = new WsScores();
|
||||
$InfosLogin = $ws->getInfosLogin($login, $_SERVER['REMOTE_ADDR']);
|
||||
$identity = new stdClass;
|
||||
$identity->username = $login;
|
||||
$identity->password = $password;
|
||||
$identity->email = $InfosLogin->result->email;
|
||||
$identity->profil = $InfosLogin->result->profil;
|
||||
$identity->pref = $InfosLogin->result->pref;
|
||||
$identity->droits = $InfosLogin->result->droits;
|
||||
$identity->droitsClients = $InfosLogin->result->droitsClients;
|
||||
$identity->nom = $InfosLogin->result->nom;
|
||||
$identity->prenom = $InfosLogin->result->prenom;
|
||||
$identity->tel = $InfosLogin->result->tel;
|
||||
$identity->fax = $InfosLogin->result->fax;
|
||||
$identity->mobile = $InfosLogin->result->mobile;
|
||||
$identity->id = $InfosLogin->result->id;
|
||||
$identity->idClient = $InfosLogin->result->idClient;
|
||||
$identity->reference = $InfosLogin->result->reference;
|
||||
$identity->nbReponses = $InfosLogin->result->nbReponses;
|
||||
$identity->typeScore = $InfosLogin->result->typeScore;
|
||||
$identity->timeout = (!empty($InfosLogin->result->timeout)) ?
|
||||
$InfosLogin->result->timeout : 1800;
|
||||
$identity->time = time() + $identity->timeout;
|
||||
$identity->modeEdition = false;
|
||||
$identity->acceptationCGU = $InfosLogin->result->acceptationCGU;;
|
||||
return $identity;
|
||||
}
|
||||
|
||||
public function init()
|
||||
{
|
||||
require_once 'Scores/WsScores.php';
|
||||
|
||||
$this->view->headLink()->appendStylesheet('/themes/default/styles/user.css', 'all');
|
||||
}
|
||||
|
||||
/**
|
||||
* Affiche le fomulaire d'edition des paramètres utilisateur
|
||||
*/
|
||||
public function indexAction()
|
||||
{
|
||||
$user = new Scores_Utilisateur();
|
||||
if (!$user->checkPerm('MONPROFIL')){
|
||||
$this->_forward('perms', 'error');
|
||||
}
|
||||
|
||||
$this->view->headLink()->appendStylesheet('/themes/default/styles/form.css', 'all');
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/user.js', 'text/javascript');
|
||||
|
||||
$request = $this->getRequest();
|
||||
|
||||
$messages = '';
|
||||
$isProfilUpdated = false;
|
||||
$isPasswordUpdated = false;
|
||||
$updateResult = false;
|
||||
|
||||
$ws = new WsScores();
|
||||
|
||||
$login = $request->getParam('login', '');
|
||||
$op = $request->getParam('op');
|
||||
|
||||
if ($request->isPost()) {
|
||||
$options = $request->getParam('frmOptions', '');
|
||||
$action = $options['action'];
|
||||
|
||||
if ($login=='') $login = $options['login'];
|
||||
|
||||
//Enregistrement des données new & update
|
||||
if (in_array($action, array('new','update'))) {
|
||||
|
||||
if ($options['changepwd']!=1) {
|
||||
$options['password'] = '';
|
||||
}
|
||||
|
||||
if ( in_array($options['profil'], array('Administrateur', 'SuperAdministrateur'))
|
||||
&& !in_array('monprofil', $options['droits']) ) {
|
||||
$options['droits'][] = 'monprofil';
|
||||
}
|
||||
|
||||
if( !isset($options['profil']) ) {
|
||||
$options['profil'] = 'Utilisateur';
|
||||
}
|
||||
|
||||
$reponse = $ws->setInfosLogin($login, $action, $options);
|
||||
|
||||
$isProfilUpdated = true;
|
||||
$message = 'Erreur lors de la mise à jour du compte !';
|
||||
if (is_string($reponse)) {
|
||||
$message = $reponse;
|
||||
} elseif ($reponse){
|
||||
$updateResult = true;
|
||||
$message = 'Compte mis à jour.';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Liste des catégories des accès
|
||||
$reponse = $ws->getCategory();
|
||||
$wscategory = $reponse->item;
|
||||
$this->view->assign('wscategory', $wscategory);
|
||||
|
||||
//Liste de tous les droits
|
||||
$listeDroits = $ws->getListeDroits();
|
||||
$droitsLib = array();
|
||||
foreach($listeDroits->item as $droit) {
|
||||
$droitsLib[strtoupper($droit->code)] = $droit->desc;
|
||||
}
|
||||
$this->view->assign('droitsLib', $droitsLib);
|
||||
|
||||
//Liste de toutes les préférences
|
||||
$listePrefs = $ws->getListePrefs();
|
||||
$prefsLib = array();
|
||||
foreach($listePrefs->item as $pref) {
|
||||
$prefsLib[strtoupper($pref->code)] = $pref->desc;
|
||||
}
|
||||
$this->view->assign('prefsLib', $prefsLib);
|
||||
|
||||
//Récupération des informations de l'identité
|
||||
$auth = Zend_Auth::getInstance();
|
||||
$identity = $auth->getIdentity();
|
||||
if ($identity->idClient == $options['idClient'] && $identity->username == $login) {
|
||||
//Modification lors du changement de mot de passe
|
||||
if ($options['changepwd']==1 && $updateResult) {
|
||||
|
||||
$identity->password = md5($login.'|'.$options['password']);
|
||||
$auth->getStorage()->write($identity);
|
||||
|
||||
}
|
||||
//Mise à jour du profil
|
||||
if ($isProfilUpdated && $updateResult) {
|
||||
|
||||
$identity = $this->updateProfil($identity->username, $identity->password);
|
||||
$auth->getStorage()->write($identity);
|
||||
|
||||
}
|
||||
//Gestion mode edition en SESSION
|
||||
if ($action=='update') {
|
||||
$modeEdition = $request->getParam('modeEdition', false);
|
||||
if ( $modeEdition ) {
|
||||
|
||||
$identity->modeEdition = true;
|
||||
$auth->getStorage()->write($identity);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( $isProfilUpdated || $isPasswordUpdated ) {
|
||||
$this->view->assign('message', $message);
|
||||
}
|
||||
|
||||
$isAdmin = false;
|
||||
if ( $identity->profil == 'Administrateur'
|
||||
|| $identity->profil == 'SuperAdministrateur' ) {
|
||||
$isAdmin = true;
|
||||
}
|
||||
$this->view->assign('isAdmin', $isAdmin);
|
||||
|
||||
$isSuperAdmin = false;
|
||||
if ($identity->profil == 'SuperAdministrateur') {
|
||||
$isSuperAdmin = true;
|
||||
}
|
||||
$this->view->assign('isSuperAdmin', $isSuperAdmin);
|
||||
|
||||
if ($op=='new')
|
||||
{
|
||||
$idClient = $request->getParam('idClient', '');
|
||||
if ($idClient == '') {
|
||||
$idClient = $identity->idClient;
|
||||
}
|
||||
$reponse = $ws->getNextLogin($idClient);
|
||||
$options->idClient = $idClient;
|
||||
if ($identity->idClient!=1 && $identity->profil!='SuperAdministrateur') {
|
||||
$options->profil = 'Utilisateur';
|
||||
}
|
||||
$this->view->assign('options', $options);
|
||||
|
||||
$this->view->assign('loginNew', $reponse->result->racine);
|
||||
$this->view->assign('droitsClients', explode(' ', strtolower($reponse->result->droitsClients)));
|
||||
$this->view->assign('action', 'new');
|
||||
$this->view->assign('pref', array());
|
||||
}
|
||||
elseif (!empty($op) || $op!='new')
|
||||
{
|
||||
if ( !empty($login) && $identity->username != $login ) {
|
||||
Zend_Registry::get('firebug')->info('getInfosLogin');
|
||||
$reponse = $ws->getInfosLogin($login, $_SERVER['REMOTE_ADDR']);
|
||||
$this->view->assign('options', $reponse->result);
|
||||
$this->view->assign('loginVu', $reponse->result->login);
|
||||
$this->view->assign('droits', explode(' ', strtolower($reponse->result->droits)));
|
||||
$this->view->assign('droitsClients', explode(' ', strtolower($reponse->result->droitsClients)));
|
||||
} else {
|
||||
$this->view->assign('options', $identity);
|
||||
$this->view->assign('loginVu', $identity->username);
|
||||
$this->view->assign('droits', explode(' ', strtolower($identity->droits)));
|
||||
$this->view->assign('droitsClients', explode(' ', strtolower($identity->droitsClients)));
|
||||
}
|
||||
$this->view->assign('loginNew', '');
|
||||
$this->view->assign('action', 'update');
|
||||
$this->view->assign('pref', explode(' ',$identity->pref));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Téléchargement de la consommation au format CSV
|
||||
*/
|
||||
public function consoAction()
|
||||
{
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/conso.js', 'text/javascript');
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
|
||||
$request = $this->getRequest();
|
||||
$idClient = $request->getParam('idClient', $user->getIdClient());
|
||||
$login = $request->getParam('login', '');
|
||||
|
||||
$this->view->assign('idClient', $idClient);
|
||||
$this->view->assign('login', $login);
|
||||
$this->view->assign('profil', $user->getProfil());
|
||||
}
|
||||
|
||||
/**
|
||||
* Renvoi vers le formulaire utilisateur avec les paramètres de la requete
|
||||
*/
|
||||
public function editAction()
|
||||
{
|
||||
$params = $this->getRequest()->getParams();
|
||||
$this->_forward('index', 'user', null, $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Suppression d'un utilisateur
|
||||
*/
|
||||
public function deleteAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$login = $request->getParam('login');
|
||||
$action = 'delete';
|
||||
$ws = new WsScores();
|
||||
$ws->setInfosLogin($login, $action);
|
||||
//Redirect
|
||||
$this->_forward('liste');
|
||||
}
|
||||
|
||||
/**
|
||||
* Activation d'un utilisateur
|
||||
*/
|
||||
public function enableAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$login = $request->getParam('login');
|
||||
$action = 'enable';
|
||||
$ws = new WsScores();
|
||||
$ws->setInfosLogin($login, $action);
|
||||
//Redirect
|
||||
$this->_forward('liste');
|
||||
}
|
||||
|
||||
/**
|
||||
* Désactivation d'un utilisateur
|
||||
*/
|
||||
public function disableAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$login = $request->getParam('login');
|
||||
$action = 'disable';
|
||||
$ws = new WsScores();
|
||||
$ws->setInfosLogin($login, $action);
|
||||
//Redirect
|
||||
$this->_forward('liste');
|
||||
}
|
||||
|
||||
/**
|
||||
* Méthode AJAX pour modifier le password d'un utilisateur
|
||||
*/
|
||||
public function changepwdAction()
|
||||
{
|
||||
//Redirect
|
||||
}
|
||||
|
||||
/**
|
||||
* Affiche la liste des utiliateurs
|
||||
*/
|
||||
public function listeAction()
|
||||
{
|
||||
$user = new Scores_Utilisateur();
|
||||
|
||||
$request = $this->getRequest();
|
||||
$idClient = $request->getParam('idClient', $user->getIdClient());
|
||||
|
||||
if (!$user->isSuperAdmin() && !$user->isAdmin()) {
|
||||
$this->renderScript('error/perms.phtml');
|
||||
}
|
||||
if ($user->isAdmin()){
|
||||
$idClient = $user->getIdClient();
|
||||
}
|
||||
$ws = new WsScores();
|
||||
$infos = $ws->getListeUtilisateurs($user->getLogin(), $idClient);
|
||||
$utilisateurs = $infos->result->item;
|
||||
$this->view->assign('utilisateurs', $utilisateurs);
|
||||
$this->view->assign('idClient', $idClient);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion de l'authentification
|
||||
*/
|
||||
public function loginAction()
|
||||
{
|
||||
$this->view->inlineScript()
|
||||
->appendFile('/libs/jquery/jquery-1.9.1.min.js')
|
||||
->appendFile('/libs/jquery/jquery.infieldlabel.min.js');
|
||||
|
||||
//@todo : gestion des affichages particuliers pour les clients
|
||||
$this->view->headTitle()->append('Connexion');
|
||||
$form = new Form_Login();
|
||||
$this->view->form = $form;
|
||||
$request = $this->getRequest();
|
||||
if ($request->isPost()) {
|
||||
$formData = $request->getPost ();
|
||||
if ($form->isValid($formData)) {
|
||||
$login = $form->getValue('login');
|
||||
$pass = $form->getValue('pass');
|
||||
|
||||
$auth = Zend_Auth::getInstance();
|
||||
$authAdapter = new Scores_AuthAdapter($login, md5($login.'|'.$pass));
|
||||
$result = $auth->authenticate($authAdapter);
|
||||
if (!$result->isValid()){
|
||||
$this->view->message = '';
|
||||
Zend_Registry::get('firebug')->info($result);
|
||||
foreach ($result->getMessages() as $message) {
|
||||
$this->view->message.= $message."<br/>";
|
||||
}
|
||||
} else {
|
||||
$url = '';
|
||||
if (Zend_Session::namespaceIsset('login')){
|
||||
$session = new Zend_Session_Namespace('login');
|
||||
if (isset($session->url)) {
|
||||
$url = $session->url;
|
||||
}
|
||||
}
|
||||
if (!empty($url) && $url!='/user/login' && $url!='/user/logout' && $url!='/localauth'){
|
||||
$this->_redirect($url);
|
||||
}
|
||||
$this->_redirect('/');
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->_helper->layout()->disableLayout();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion de la déconnexion
|
||||
*/
|
||||
public function logoutAction()
|
||||
{
|
||||
Zend_Auth::getInstance()->clearIdentity();
|
||||
$this->_helper->layout()->disableLayout();
|
||||
|
||||
$request = $this->getRequest();
|
||||
$message = $request->getParam('message');
|
||||
$this->view->assign('message', $message);
|
||||
|
||||
$ajax = $request->getParam('ajax', 0);
|
||||
$this->view->assign('ajax', $ajax);
|
||||
|
||||
$refresh = 5;
|
||||
|
||||
$url = 'http://'.$_SERVER['SERVER_NAME'].$this->view->url(array(
|
||||
'controller' => 'user',
|
||||
'action' => 'login',
|
||||
), null, true);
|
||||
|
||||
$this->view->assign('url', $url);
|
||||
|
||||
if (!$ajax) {
|
||||
$this->view->assign('refresh', $refresh);
|
||||
$this->view->headMeta()->appendHttpEquiv('refresh', $refresh.'; url='.$url);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Mettre à jour le mode edition en session sans refresh de la page
|
||||
*/
|
||||
public function editionsessionAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
$request = $this->getRequest();
|
||||
$mode = $request->getParam('mode', 'false');
|
||||
$auth = Zend_Auth::getInstance();
|
||||
$identity = $auth->getIdentity();
|
||||
if ($identity->idClient == 1) {
|
||||
if ($mode == 'false') {
|
||||
$identity->modeEdition = false;
|
||||
echo 0;
|
||||
} else {
|
||||
$identity->modeEdition = true;
|
||||
echo 1;
|
||||
}
|
||||
$auth->getStorage()->write($identity);
|
||||
} else {
|
||||
echo 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Changer le theme de l'utilisateur
|
||||
*/
|
||||
public function changethemeAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
||||
$request = $this->getRequest();
|
||||
$nom = $request->getParam('nom', 'default');
|
||||
|
||||
$auth = Zend_Auth::getInstance();
|
||||
$identity = $auth->getIdentity();
|
||||
|
||||
$identity->theme = $nom;
|
||||
|
||||
$auth->getStorage()->write($identity);
|
||||
|
||||
//Rediriger vers l'écran de recherche
|
||||
$this->_redirect('/');
|
||||
|
||||
}
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
<?php
|
||||
class Application_Model_ActesFiles extends Zend_Db_Table_Abstract
|
||||
{
|
||||
protected $_name = 'actes_files';
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
<?php
|
||||
class Application_Model_Aide extends Zend_Db_Table_Abstract
|
||||
{
|
||||
protected $_name = 'aide';
|
||||
|
||||
/**
|
||||
* Enter description here ...
|
||||
* @param array $keys
|
||||
*/
|
||||
public function texte($methode, $keys)
|
||||
{
|
||||
$sql = $this->select()
|
||||
->where('methode = ?', $methode)
|
||||
->where('champ IN ?', $keys);
|
||||
return $this->fetchAll($sql);
|
||||
}
|
||||
|
||||
}
|
@ -1,74 +0,0 @@
|
||||
<?php
|
||||
class Application_Model_BilanSaisie extends Zend_Db_Table_Abstract
|
||||
{
|
||||
protected $_name = 'bilansaisie';
|
||||
|
||||
/**
|
||||
* Enregistre les informations nécessaire pour la saisie
|
||||
* @param unknown_type $email
|
||||
* @param unknown_type $method
|
||||
* @param unknown_type $confidentiel
|
||||
* @param unknown_type $siren
|
||||
* @param unknown_type $bilanCloture
|
||||
* @param unknown_type $format
|
||||
* @param unknown_type $bilanDuree
|
||||
*/
|
||||
public function setInformations($cliendId, $utilisateurId, $utilisateurLogin, $email, $method, $confidentiel, $siren, $bilanCloture, $format, $bilanDuree)
|
||||
{
|
||||
$env = 'PRD';
|
||||
$data = array(
|
||||
'clientId' => $cliendId,
|
||||
'utilisateurId' => $utilisateurId,
|
||||
'utilisateurLogin' => $utilisateurLogin,
|
||||
'utilisateurEmail' => $email,
|
||||
'method' => $method,
|
||||
'confidentiel' => $confidentiel,
|
||||
'siren' => $siren,
|
||||
'env' => $env,
|
||||
'fichier' => '',
|
||||
'bilanCloture' => $bilanCloture,
|
||||
'format' => $format,
|
||||
'bilanDuree' => $bilanDuree,
|
||||
'dateInsert' => date('Y-m-d H:i:s'),
|
||||
);
|
||||
return $this->insert($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retourne les informations
|
||||
* @param string $ref
|
||||
*/
|
||||
public function getInfosBilan($ref)
|
||||
{
|
||||
$sql = $this->select()->where(" ref='$ref'");
|
||||
$result = $this->fetchAll($sql)->toArray();
|
||||
return $result[0];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enregistre le nom du fichier
|
||||
* @param string $ref
|
||||
* @param string $name
|
||||
*/
|
||||
public function setFilename($ref, $name)
|
||||
{
|
||||
$data = array( 'fichier' => $name );
|
||||
$this->update($data, "ref='$ref'");
|
||||
}
|
||||
|
||||
public function listBilans()
|
||||
{
|
||||
$sql = $this->select()
|
||||
->from($this, array('ref','utilisateurId','confidentiel','siren','bilanCloture','bilanDuree','fichier','env'))
|
||||
->where("dateEnvoi='0000-00-00 00:00:00' AND fichier!=''");
|
||||
$result = $this->fetchAll($sql)->toArray();
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function setDateEnvoi($ref)
|
||||
{
|
||||
$data = array( 'dateEnvoi' => date('Y-m-d H:m:s') );
|
||||
return $this->update($data, "ref='$ref'");
|
||||
}
|
||||
|
||||
}
|
@ -1,64 +0,0 @@
|
||||
<?php
|
||||
class Application_Model_Commandes extends Zend_Db_Table_Abstract
|
||||
{
|
||||
protected $_name = 'commandes';
|
||||
|
||||
/**
|
||||
* Liste les commandes suivant la
|
||||
* @param unknown_type $timestamp
|
||||
* @param unknown_type $etat
|
||||
* @param unknown_type $mode
|
||||
*/
|
||||
public function getCommandes($timestamp, $etat, $mode)
|
||||
{
|
||||
$dateTDebut = mktime(0, 0, 0, date('m', $timestamp), 1, date('Y', $timestamp));
|
||||
$dateDebut = date('Y-m',$dateTDebut);
|
||||
$sql = $this->select()->where('dateCommande LIKE ?', $dateDebut.'%');
|
||||
if (!empty($mode)){
|
||||
if ( $mode == 'G' ) {
|
||||
$sql->where('typeCommande IN (?) ', array('', $mode));
|
||||
} else {
|
||||
$sql->where('typeCommande = ?', $mode);
|
||||
}
|
||||
}
|
||||
if (!empty($etat)){
|
||||
$sql->where('statutCommande = ?', $etat);
|
||||
}
|
||||
$this->getAdapter()->setFetchMode(Zend_Db::FETCH_OBJ);
|
||||
$result = $this->getAdapter()->fetchAll($sql);
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function getCommandesById($id)
|
||||
{
|
||||
$sql = $this->select()->where('idCommande = ?', $id);
|
||||
$this->getAdapter()->setFetchMode(Zend_Db::FETCH_OBJ);
|
||||
$result = $this->getAdapter()->fetchAll($sql);
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function getCommandesBySiren($siren)
|
||||
{
|
||||
$sql = $this->select()
|
||||
->where('siren = ?', $siren)
|
||||
->order('dateCommande ASC');
|
||||
$this->getAdapter()->setFetchMode(Zend_Db::FETCH_OBJ);
|
||||
$result = $this->getAdapter()->fetchAll($sql);
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function getCommandesByLogin($login, $timestamp)
|
||||
{
|
||||
$dateTDebut = mktime(0, 0, 0, date('m', $timestamp), 1, date('Y', $timestamp));
|
||||
$dateDebut = date('Y-m',$dateTDebut);
|
||||
|
||||
$sql = $this->select()
|
||||
->where('login = ?', $login)
|
||||
->order('dateCommande ASC')
|
||||
->where('dateCommande LIKE ?', $dateDebut.'%');
|
||||
$this->getAdapter()->setFetchMode(Zend_Db::FETCH_OBJ);
|
||||
$result = $this->getAdapter()->fetchAll($sql);
|
||||
return $result;
|
||||
}
|
||||
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
<?php
|
||||
class Application_Model_CommandesErreur extends Zend_Db_Table_Abstract
|
||||
{
|
||||
protected $_name = 'commandes_erreur';
|
||||
}
|
@ -1,49 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
|
||||
class Application_Model_CommandesGiants extends Zend_Db_Table_Abstract
|
||||
{
|
||||
protected $_name = 'commandes_giants';
|
||||
|
||||
public function getCommandesGiantByLogin($login)
|
||||
{
|
||||
$sql = $this->select()
|
||||
->where('login = ?', $login);
|
||||
$result = $this->getAdapter()->fetchAll($sql);
|
||||
return ($result);
|
||||
}
|
||||
|
||||
public function getCommandesGiantByDate($date)
|
||||
{
|
||||
$sql = $this->select()
|
||||
->where('date = ?', $date);
|
||||
$result = $this->getAdapter()->fetchAll($sql);
|
||||
return ($result);
|
||||
}
|
||||
|
||||
public function getCommandesGiantByLoginAndDate($login, $date)
|
||||
{
|
||||
$sql = $this->select()
|
||||
->where('login = ?', $login)
|
||||
->where('date = ?', $date);
|
||||
$result = $this->getAdapter()->fetchAll($sql);
|
||||
return ($result);
|
||||
}
|
||||
|
||||
public function getCommandesGiantLoginDateReportType($login, $date, $type, $pays)
|
||||
{
|
||||
$sql = $this->select()
|
||||
->where('login = ?', $login)
|
||||
->where('typeReport = ?', $type)
|
||||
->where('date = ?', $date)
|
||||
->where('pays = ?', $pays);
|
||||
$result = $this->getAdapter()->fetchRow($sql);
|
||||
return ($result['id']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
@ -1,42 +0,0 @@
|
||||
<?php
|
||||
class Application_Model_CommandesKbis extends Zend_Db_Table_Abstract
|
||||
{
|
||||
protected $_name = 'commandes_kbis';
|
||||
|
||||
public function getCommandes($timestamp, $etat, $mode)
|
||||
{
|
||||
$dateTDebut = mktime(0, 0, 0, date('m', $timestamp), 1, date('Y', $timestamp));
|
||||
$dateDebut = date('Y-m',$dateTDebut);
|
||||
$sql = $this->select()->where('dateCommande LIKE ?', $dateDebut.'%');
|
||||
if (!empty($etat)){
|
||||
$sql->where('statutCommande = ?', $etat);
|
||||
}
|
||||
if (!empty($mode) && $mode != '-'){
|
||||
$sql->where('type = ?', $mode);
|
||||
}
|
||||
$sql->order('dateCommande ASC');
|
||||
$this->getAdapter()->setFetchMode(Zend_Db::FETCH_OBJ);
|
||||
$result = $this->getAdapter()->fetchAll($sql);
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function getCommandesKbisById($id)
|
||||
{
|
||||
$sql = $this->select()
|
||||
->where('id = ?', $id);
|
||||
$this->getAdapter()->setFetchMode(Zend_Db::FETCH_OBJ);
|
||||
$result = $this->getAdapter()->fetchAll($sql);
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function getCommandesKbisBySiren($siren)
|
||||
{
|
||||
$sql = $this->select()
|
||||
->where('siren = ?', $siren)
|
||||
->order('dateCommande ASC');
|
||||
$this->getAdapter()->setFetchMode(Zend_Db::FETCH_OBJ);
|
||||
$result = $this->getAdapter()->fetchAll($sql);
|
||||
return $result;
|
||||
}
|
||||
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
<?php
|
||||
class Application_Model_CommandesPieces extends Zend_Db_Table_Abstract
|
||||
{
|
||||
protected $_name = 'commandes_pieces';
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
<?php
|
||||
class Application_Model_CommandesStatut extends Zend_Db_Table_Abstract
|
||||
{
|
||||
protected $_name = 'commandes_statut';
|
||||
|
||||
public function getStatut()
|
||||
{
|
||||
$sql = $this->select()->order('ordre ASC');
|
||||
$result = $this->fetchAll($sql);
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function getStatutByTypeCommande($type)
|
||||
{
|
||||
$sql = $this->select()
|
||||
->where('typeCommande = ?', $type)
|
||||
->order('ordre ASC');
|
||||
$result = $this->fetchAll($sql);
|
||||
return $result;
|
||||
}
|
||||
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
<?php
|
||||
class Application_Model_CommandesTarifs extends Zend_Db_Table_Abstract
|
||||
{
|
||||
protected $_name = 'commandes_tarifs';
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
<?php
|
||||
class Application_Model_Naf5 extends Zend_Db_Table_Abstract
|
||||
{
|
||||
protected $_name = 'tabnaf5';
|
||||
}
|
||||
|
@ -1,6 +0,0 @@
|
||||
<?php
|
||||
class Application_Model_Nouveautes extends Zend_Db_Table_Abstract
|
||||
{
|
||||
protected $_name = 'nouveautes';
|
||||
}
|
||||
|
@ -1,42 +0,0 @@
|
||||
<?php
|
||||
class Application_Model_RapportsGiants extends Zend_Db_Table_Abstract
|
||||
{
|
||||
protected $_name = 'rapports_giants';
|
||||
|
||||
public function getReportById($companyId)
|
||||
{
|
||||
$sql = $this->select('report')
|
||||
->where('companyId = ?', $companyId);
|
||||
$result = $this->getAdapter()->fetchAll($sql);
|
||||
return ($result);
|
||||
}
|
||||
|
||||
public function getReportByIdAndType($companyId, $type)
|
||||
{
|
||||
if($type == 'CR') {
|
||||
$where = 'type="FU" or type="CO"';
|
||||
} else $where = 'type = "FU"';
|
||||
$sql = $this->select()
|
||||
->where('companyId = ? and '.$where, $companyId);
|
||||
$result = $this->getAdapter()->fetchRow($sql);
|
||||
if($type == 'FU') {
|
||||
$where = $this->getAdapter()->quoteInto('companyId = ? AND type = "CR" OR type = "CO"' , $companyId);
|
||||
//var_dump($where);exit;
|
||||
$this->delete($where);
|
||||
} else if($type == 'CO') {
|
||||
$where = $this->getAdapter()->quoteInto('companyId = ? and type = "CR"', $companyId);
|
||||
$this->delete($where);
|
||||
}
|
||||
return ($result['report']);
|
||||
}
|
||||
|
||||
public function getReportDate($companyId, $type)
|
||||
{
|
||||
$sql = $this->select('date')
|
||||
->where('companyId = ?', $companyId)
|
||||
->where('type = ?', $type);
|
||||
$result = $this->getAdapter()->fetchAll($sql);
|
||||
return ($result);
|
||||
}
|
||||
}
|
||||
?>
|
@ -1,6 +0,0 @@
|
||||
<?php
|
||||
class Application_Model_TabEvenements extends Zend_Db_Table_Abstract
|
||||
{
|
||||
protected $_name = 'tabEvenements';
|
||||
}
|
||||
|
@ -1,15 +0,0 @@
|
||||
<?php
|
||||
class Zend_View_Helper_CssHelper extends Zend_View_Helper_Abstract
|
||||
{
|
||||
function cssHelper() {
|
||||
$request = Zend_Controller_Front::getInstance()->getRequest();
|
||||
$file_uri = 'media/css/' . $request->getControllerName() . '/' . $request->getActionName() . '.css';
|
||||
|
||||
if (file_exists($file_uri)) {
|
||||
$this->view->headLink()->appendStylesheet('/' . $file_uri);
|
||||
}
|
||||
|
||||
return $this->view->headLink();
|
||||
|
||||
}
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
<?php
|
||||
class Zend_View_Helper_Editable extends Zend_View_Helper_Abstract
|
||||
{
|
||||
public function Editable($name, $value, $category)
|
||||
{
|
||||
$class = 'editable-change';
|
||||
if ( null === $value ) {
|
||||
$value = $name;
|
||||
$class = 'editable';
|
||||
}
|
||||
if ( !empty($class) ) {
|
||||
$class = 'class="'.$class.' '.$category.'"';
|
||||
}
|
||||
$html = '<span id="'.$name.'" '.$class.'>';
|
||||
$html.= $value;
|
||||
$html.= '</span>';
|
||||
return $html;
|
||||
}
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
<?php
|
||||
Class Zend_View_Helper_FormatPct extends Zend_View_Helper_Abstract {
|
||||
|
||||
public function FormatPct($pct)
|
||||
{
|
||||
$pct = round($pct / 10, 0) * 10;
|
||||
if ($pct == 0) $pct = 10;
|
||||
if ($pct > 100) $pct = 100;
|
||||
return $pct;
|
||||
}
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
<?php
|
||||
class Zend_View_Helper_JavascriptHelper extends Zend_View_Helper_Abstract
|
||||
{
|
||||
function javascriptHelper()
|
||||
{
|
||||
$request = Zend_Controller_Front::getInstance()->getRequest();
|
||||
|
||||
$controller = $request->getControllerName();
|
||||
$action = $request->getActionName();
|
||||
|
||||
$paramsTheme = Zend_Registry::get('theme');
|
||||
|
||||
$fileController = APPLICATION_PATH . '/../public/' .
|
||||
$paramsTheme->pathScript . '/' . $controller . '.js';
|
||||
if ( file_exists($fileController) ) {
|
||||
$contentScript = file_get_contents($fileController);
|
||||
$view->inlineScript()->appendScript($contentScript);
|
||||
}
|
||||
|
||||
$fileControllerAction = APPLICATION_PATH . '/../public/' .
|
||||
$paramsTheme->pathScript . '/' . $controller . '-' . $action . '.js';
|
||||
|
||||
if ( file_exists($fileControllerAction) ) {
|
||||
$contentScript = file_get_contents($fileControllerAction);
|
||||
$view->inlineScript()->appendScript($contentScript);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
<?php
|
||||
class Zend_View_Helper_MenuScript extends Zend_View_Helper_Abstract
|
||||
{
|
||||
public function menuScript()
|
||||
{
|
||||
$i = 0;
|
||||
$container = $this->view->navigation()->getContainer();
|
||||
$submenu = $this->view->navigation()->findActive($container);
|
||||
if ($submenu != null){
|
||||
$parentLabel = $submenu['page']->getParent()->getLabel();
|
||||
foreach($container as $page){
|
||||
if ($page->label == $parentLabel){
|
||||
break;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
return $i;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -1,35 +0,0 @@
|
||||
<?php
|
||||
Class Zend_View_Helper_NewsDate extends Zend_View_Helper_Abstract
|
||||
{
|
||||
protected $mois = array (
|
||||
'Jan' => 1,
|
||||
'Feb' => 2,
|
||||
'Mar' => 3,
|
||||
'Apr' => 4,
|
||||
'May' => 5,
|
||||
'Jun' => 6,
|
||||
'Jul' => 7,
|
||||
'Aug' => 8,
|
||||
'Sep' => 9,
|
||||
'Oct' => 10,
|
||||
'Nov' => 11,
|
||||
'Dev' => 12,
|
||||
);
|
||||
|
||||
public function NewsDate($date)
|
||||
{
|
||||
$tmp = explode(', ', $date);
|
||||
$tabDate = explode(' ', $tmp[1]);
|
||||
$tabTime = explode(':', $tabDate[3]);
|
||||
$timestamp = gmmktime(
|
||||
$tabTime[0]-1,
|
||||
$tabTime[1],
|
||||
$tabTime[2],
|
||||
$this->mois[$tabDate[1]],
|
||||
$tabDate[0],
|
||||
$tabDate[2]
|
||||
);
|
||||
$pubDate = date('d/m/Y à H:i', $timestamp);
|
||||
return $pubDate;
|
||||
}
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
<?php
|
||||
class Zend_View_Helper_RemplaceSiren extends Zend_View_Helper_Abstract
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
require_once 'Scores/Siren.php';
|
||||
}
|
||||
|
||||
public function RemplaceSiren($texte)
|
||||
{
|
||||
$pattern = "/((?:[0-9]{9,9})|(?:[0-9]{3,3} [0-9]{3,3} [0-9]{3,3})|(?:[0-9]{3,3}\.[0-9]{3,3}\.[0-9]{3,3})|(?:[0-9]{3,3}-[0-9]{3,3}-[0-9]{3,3}))/";
|
||||
return preg_replace_callback($pattern, array($this, 'replace_siren'), $texte);
|
||||
}
|
||||
|
||||
public function replace_siren($matches)
|
||||
{
|
||||
foreach ($matches as $i => $sirenBrut) {
|
||||
$siren = strtr($sirenBrut, array(' '=>'', '.'=>'', '-'=>''));
|
||||
if (strlen($sirenBrut)==9) {
|
||||
$sirenBrut = implode(' ', str_split($sirenBrut, 3));
|
||||
}
|
||||
$sirenMethod = new Siren();
|
||||
if ($sirenMethod->valide($siren)) {
|
||||
if ($sirenMethod->exist($siren)){
|
||||
$href = $this->view->url(array(
|
||||
'controller' => 'identite',
|
||||
'action' => 'fiche',
|
||||
'siret' => $siren,
|
||||
), null, true);
|
||||
return '<a href="'.$href.'" title="Voir la fiche identité de cette entreprise">'.$sirenBrut.'</a>';
|
||||
} else {
|
||||
return $sirenBrut;
|
||||
}
|
||||
}
|
||||
return $sirenBrut;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,10 +0,0 @@
|
||||
<?php
|
||||
class Zend_View_Helper_SirenTexte extends Zend_View_Helper_Abstract
|
||||
{
|
||||
public function SirenTexte($siren)
|
||||
{
|
||||
return substr($siren, 0, 3).' '.
|
||||
substr($siren, 3, 3).' '.
|
||||
substr($siren, 6, 3);
|
||||
}
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
<?php
|
||||
class Zend_View_Helper_SiretTexte extends Zend_View_Helper_Abstract
|
||||
{
|
||||
public function SiretTexte($siret)
|
||||
{
|
||||
return substr($siret, 0, 3).' '.
|
||||
substr($siret, 3, 3).' '.
|
||||
substr($siret, 6, 3).' '.
|
||||
'<i>'.substr($siret, 9, 5).'</i>';
|
||||
}
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
<?php
|
||||
Class Zend_View_Helper_TrueLabel extends Zend_View_Helper_Abstract
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function TrueLabel($list, $name)
|
||||
{
|
||||
try {
|
||||
return (self::GetTrueLabel($list, $name));
|
||||
} catch (Exception $e) {
|
||||
echo 'Aucun label : ' . $e;
|
||||
}
|
||||
}
|
||||
|
||||
private function GetTrueLabel($list, $name)
|
||||
{
|
||||
if(isset($list)) {
|
||||
foreach ($list as $nameLabel => $label)
|
||||
{
|
||||
if ($nameLabel == $name)
|
||||
return ($label);
|
||||
}
|
||||
}
|
||||
return ($name);
|
||||
}
|
||||
}
|
@ -1,108 +0,0 @@
|
||||
<?=$this->doctype();?>
|
||||
<html>
|
||||
<head>
|
||||
<?=$this->headMeta();?>
|
||||
<?=$this->headTitle();?>
|
||||
<?=$this->headStyle();?>
|
||||
<?=$this->headLink();?>
|
||||
<?=$this->headScript();?>
|
||||
<style>
|
||||
p { margin:10px 0;}
|
||||
div#content { float:none; width:auto;}
|
||||
</style>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$('input[type=checkbox][name=accept]').click(function(e){
|
||||
$('form[name=cgu]').css('display', 'none');
|
||||
$('#msgsave').css('display', 'block');
|
||||
$('form[name=cgu]').submit();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="global">
|
||||
<div id="content">
|
||||
|
||||
<div id="center">
|
||||
|
||||
<h1>Conditions d’accès à l'extranet (comptes d'accès test et comptes payants)</h1>
|
||||
<div class="paragraph">
|
||||
<p>Ce site est destiné uniquement aux professionnels et non au grand public.</p>
|
||||
|
||||
<p>Ce site est destiné uniquement aux entreprises ayant une représentation juridique France,
|
||||
il a spécialement été conçu pour les professionnels français et ne peut être considéré comme une
|
||||
offre d’achat ou de vente, ni comme une incitation à l’achat ou à la vente dans toute autre
|
||||
juridiction que la France.</p>
|
||||
</div>
|
||||
|
||||
<h2>Mises en garde</h2>
|
||||
<div class="paragraph">
|
||||
<p>Les informations communiquées par l’intermédiaire de ce site Web ne vous sont communiquées
|
||||
qu’aux termes et conditions des présentes et ne sont destinées qu'à votre utilisation à des fins
|
||||
professionnelles et légitimes (les « fins autorisées »). Sans l’accord écrit de Scores & Décisions,
|
||||
vous n’êtes pas autorisé à stocker, télécharger, reproduire, vendre, redistribuer ou disposer des
|
||||
informations de toute manière ou à toute autre fin que celles autorisées.</p>
|
||||
|
||||
<p>La consultation ou la réception de documents n'entraîne aucun transfert de droit de propriété
|
||||
intellectuelle en faveur du Client. Ce dernier s'engage à ne pas rediffuser ou reproduire les
|
||||
données fournies autrement que pour son usage dans le cadre de la relation contractuelle établie ou
|
||||
le test entre Scores & Décisions SAS et "le Client".</p>
|
||||
|
||||
<p>Scores & Décisions garantit que les informations sont conforme à la réglementation en vigueur et
|
||||
notamment au Code de la Propriété Intellectuelle.</p>
|
||||
<p>La base de données Scores & Décisions est pour partie issue du RNCS de l'INSEE, de la DILA et
|
||||
de diverses collectes internes et privés.</p>
|
||||
|
||||
<p>Bien que Scores & Décisions utilise des procédures rigoureuses et mette en œuvre toutes les
|
||||
diligences requises par les usages de la profession pour tenir à jour la présente base de données
|
||||
et fournir des informations précises, les informations peuvent comporter une certaine marge d'erreur.</p>
|
||||
<p>En raison des conditions d'accès à l’information et autres aléas de traitements, les informations
|
||||
issue des sources privées sont données "en l'état" sans aucune garantie, ni quelconque force
|
||||
juridique ou opposabilité aux tiers. L'utilisateur recherche, traite et interprète les données sous
|
||||
sa propre responsabilité.</p>
|
||||
|
||||
Les informations présentées sur le présent service constituent des œuvres protégeables du Code la
|
||||
propriété intellectuelle, dont le producteur est seul auteur et propriétaire exclusif, toute
|
||||
retransmission d'information ou données à un "tiers, personne physique ou morale" pourra faire
|
||||
l'objet de poursuite par Scores & Décisions SAS le cas échéant. L'utilisateur final s'engage donc
|
||||
à faire un usage strictement personnel et professionnel de ces informations, et en aucun cas pour
|
||||
constituer des fichiers destinés notamment à la location ou à la (re)vente ou pour (re)diffuser ces
|
||||
informations à des tiers de façon payante ou même gracieuse. »
|
||||
|
||||
<p>Scores & Décisions se réserve le droit d’accorder ou de révoquer l’autorisation d’utiliser les
|
||||
sites scores-decisions.com à son entière discrétion dans le cadre d'un test. Bien que toutes les
|
||||
précautions raisonnables aient été prises pour veiller à l’exactitude, la sécurité et la
|
||||
confidentialité des informations disponibles par l’intermédiaire des sites Extranets
|
||||
scores-decisions.com, Scores & Décisions ne saurait cependant être tenue responsable des
|
||||
conséquences des agissements d’un utilisateur autorisé ou non autorisé. Scores & Décisions
|
||||
communique uniquement des informations, données identifiées et sourçables et issues de sources
|
||||
officielles et privées.</p>
|
||||
|
||||
<p>Les données communiquées dans les présentes et l’utilisation que vous en faites ultérieurement
|
||||
peuvent, le cas échéant, être soumises à certaines réglementations, conditions et restrictions
|
||||
externes légales ou autres. Toutes les utilisations que vous faites des informations doivent
|
||||
respecter les réglementations, conditions et restrictions applicables à la région ou au territoire
|
||||
où vous utilisez les informations des présentes ainsi que les présentes conditions d'utilisation.</p>
|
||||
|
||||
<form name="cgu" method="post" action="<?=$this->url(array('controller'=>'aide','action'=>'cgu'),null,true)?>">
|
||||
<p style="font-size:14px; font-weight:bold;">
|
||||
<input type="checkbox" value="1" name="accept" />
|
||||
Je certifie être un Professionnel (au sens visé ci-dessus) et avoir pris connaissance, compris et accepté les conditions d’accès et de mise en garde.
|
||||
</p>
|
||||
</form>
|
||||
|
||||
<p id="msgsave" style="display:none; font-size:14px; font-weight:bold;">Enregistrement de votre acceptation des CGU...</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
<?=$this->render('footer.phtml')?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,18 +0,0 @@
|
||||
<?php if ( count($this->nouveautes)>0 ) {?>
|
||||
<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>
|
||||
<?php $cpt = 0;?>
|
||||
<?php foreach ( $this->nouveautes as $nouveaute) {?>
|
||||
<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,
|
||||
ou <a href="<?=$this->url(array('controller'=>'aide', 'action'=>'newliste'))?>">ici</a> pour retrouver la liste des modifications</span>
|
||||
</p>
|
||||
</div>
|
||||
<?php }?>
|
@ -1,42 +0,0 @@
|
||||
<style>
|
||||
table { width:100%; }
|
||||
table th { border:1px solid; font-weight:bold; padding:5px; }
|
||||
table tr { }
|
||||
table td { border:1px solid; padding:5px; }
|
||||
</style>
|
||||
|
||||
<div id="center">
|
||||
<h1>Nouveautés</h1>
|
||||
<div class="paragraph">
|
||||
<!-- Tri par date - Tri par catégorie -->
|
||||
</div>
|
||||
|
||||
<h2>Liste par date</h2>
|
||||
<div class="paragraph">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<th>Intitulé</th>
|
||||
<th>Catégorie</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if ( count($this->nouveautes)>0 ){?>
|
||||
<?php foreach ( $this->nouveautes as $nouveau) {?>
|
||||
<tr>
|
||||
<td><?=substr($nouveau->date,8,2).'/'.substr($nouveau->date,5,2).'/'.substr($nouveau->date,0,4)?></td>
|
||||
<td>
|
||||
<a href="<?=$this->url(array('controller'=>'fichier',
|
||||
'action'=>'new', 'fichier'=>$nouveau->fichier))?>" target="_blank">
|
||||
<?=$nouveau->intitule?></a>
|
||||
</td>
|
||||
<td><?=$nouveau->categorie?></td>
|
||||
</tr>
|
||||
<?php }?>
|
||||
<?php }?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
@ -1,190 +0,0 @@
|
||||
<style>
|
||||
#identifiant {
|
||||
float:left;
|
||||
width:40%;
|
||||
}
|
||||
#modules {
|
||||
float:left;
|
||||
width:40%;
|
||||
}
|
||||
|
||||
#listeModules {
|
||||
position:absolute;
|
||||
width:500px;
|
||||
display:none;
|
||||
background-color:#FBF7AA;
|
||||
border:1px solid #000000;
|
||||
z-index:3;
|
||||
}
|
||||
|
||||
#closelisteModules {
|
||||
float:right;
|
||||
padding:0.4em 1em;
|
||||
}
|
||||
|
||||
#listeModules ul {
|
||||
width:100%;
|
||||
margin-left:-10px;
|
||||
list-style-type:none;
|
||||
}
|
||||
|
||||
#listeModules ul li {
|
||||
display:inline;
|
||||
float:left;
|
||||
width:50%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="center">
|
||||
|
||||
<h1>Banque de France - Modules</h1>
|
||||
<h2>Recherche FIBEN / FCC identifiant unique</h2>
|
||||
<div class="paragraph">
|
||||
<form name="rFibenU" method="post" action="<?=$this->url(array('controller'=>'bdf', 'action'=>'module'))?>">
|
||||
<input type="hidden" name="type" value="u"/>
|
||||
<input type="hidden" name="siret" value="<?=$this->siret?>"/>
|
||||
|
||||
<div id="identifiant">
|
||||
<label>Identifiant</label> <input type="text" name="req" value="<?=$this->req?>"/>
|
||||
<br/><span>SIREN ou clé BDF</span>
|
||||
</div>
|
||||
<div id="modules" class="clearfix">
|
||||
<a href='#' id="listeModulesD">Liste des modules</a>
|
||||
<span id="selected">
|
||||
<?php if ($this->module && is_array($this->module)){ ?>
|
||||
<?php
|
||||
foreach ($this->listModulesFiben as $id => $module) {
|
||||
if (isset($module['liste']) == false || $module['liste'] !== false) {
|
||||
if (in_array($id, $this->module))
|
||||
{
|
||||
echo '<br/>'.$module['titre'];
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach ($this->listModulesFcc as $id => $module) {
|
||||
if (isset($module['liste']) == false || $module['liste'] !== false) {
|
||||
if (in_array($id, $this->module))
|
||||
{
|
||||
echo '<br/>'.$module['titre'];
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php } ?>
|
||||
</span>
|
||||
</div>
|
||||
<div id="listeModules">
|
||||
<a href="#" id="closelisteModules">Fermer</a>
|
||||
<ul>
|
||||
<?php
|
||||
foreach ($this->listModulesFiben as $id => $module) {
|
||||
if (isset($module['liste']) == false || $module['liste'] !== false) {
|
||||
$checked = '';
|
||||
if (isset($this->module) && is_array($this->module) && in_array($id, $this->module))
|
||||
{
|
||||
$checked = 'checked';
|
||||
}
|
||||
?>
|
||||
<li>
|
||||
<input type="checkbox" name="bdfmodule[]" value="<?=$id?>" <?=$checked?>/>
|
||||
<?=$module['titre']?>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
foreach ($this->listModulesFcc as $id => $module) {
|
||||
if (isset($module['liste']) == false || $module['liste'] !== false) {
|
||||
$checked = '';
|
||||
if (isset($this->module) && is_array($this->module) && in_array($id, $this->module))
|
||||
{
|
||||
$checked = 'checked';
|
||||
}
|
||||
?>
|
||||
<li>
|
||||
<input type="checkbox" name="module[]" value="<?=$id?>" <?=$checked?>/>
|
||||
<?=$module['titre']?>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
<br/>
|
||||
</div>
|
||||
<input class="button" type="submit" name="rFiben" value="Afficher"/>
|
||||
</form>
|
||||
</div>
|
||||
<br/>
|
||||
|
||||
<h2>Recherche FIBEN / FCC identifiants multiples</h2>
|
||||
<div class="paragraph">
|
||||
<form name="rFibenM" method="post" action="<?=$this->url(array('controller'=>'bdf', 'action'=>'module'))?>">
|
||||
<input type="hidden" name="type" value="m"/>
|
||||
<input type="hidden" name="siret" value="<?=$siret?>"/>
|
||||
<div id="identifiant">
|
||||
<label>Identifiant</label>
|
||||
<input type="text" name="identifiant[]" value="<?=$req?>" />
|
||||
<a href="#" id="addIdentifiant">Ajouter</a>
|
||||
</div>
|
||||
|
||||
<div id="modules" class="clearfix">
|
||||
<label>Module</label>
|
||||
<select name="bdfmodule">
|
||||
<?php
|
||||
foreach ($this->listModulesFiben as $id => $module) {
|
||||
if (isset($module['liste']) == false || $module['liste'] !== false) {
|
||||
echo '<option value="'.$id.'">'.$module['titre'].'</option>';
|
||||
}
|
||||
}
|
||||
foreach ($this->listModulesFcc as $id => $module) {
|
||||
if (isset($module['liste']) == false || $module['liste'] !== false) {
|
||||
echo '<option value="'.$id.'">'.$module['titre'].'</option>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<input class="button" type="submit" name="rFiben" value="Afficher"/>
|
||||
</form>
|
||||
</div>
|
||||
<br/>
|
||||
|
||||
<h2>Recherche FICP</h2>
|
||||
<div class="paragraph">
|
||||
<form name="rFicp" method="post" action="<?=$this->url(array('controller'=>'bdf', 'action'=>'module'))?>">
|
||||
<input type="hidden" name="bdfmodule" value="G"/>
|
||||
<input type="hidden" name="service" value="ficp"/>
|
||||
<label>Clé BDF</label>
|
||||
<input type="text" name="req"/>
|
||||
<input class="button" type="submit" name="rFicp" value="Ok"/>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$('#listeModulesD').click(function(){
|
||||
var position = $(this).position();
|
||||
$('#listeModules').css('top', position.top);
|
||||
$('#listeModules').css('left', position.left-200);
|
||||
var display = $('#listeModules').css('display');
|
||||
if(display=='none') $('#listeModules').css('display', 'block');
|
||||
else $('#listeModules').css('display', 'none');
|
||||
});
|
||||
|
||||
$('#closelisteModules').click(function(){
|
||||
$('#listeModules').css('display', 'none');
|
||||
$('#modules > #selected').html('');
|
||||
$('input[name="module[]"]').each(function(){
|
||||
if ($(this).prop('checked')){
|
||||
$('#modules > #selected').append('<br/>'+$(this).parent().text());
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#addIdentifiant').click(function(){
|
||||
$('form[name=rFibenM] > #identifiant').append('<br/><label>Identifiant</label> <input type="text" name="identifiant[]" />');
|
||||
});
|
||||
});
|
||||
</script>
|
@ -1,8 +0,0 @@
|
||||
<h1 class="titre"><?=$this->titre?></h1>
|
||||
<div class="paragraph">
|
||||
<?php if ( !empty($this->html) ) {?>
|
||||
<?=$this->html?>
|
||||
<?php } else {?>
|
||||
ERREUR
|
||||
<?php }?>
|
||||
</div>
|
@ -1,42 +0,0 @@
|
||||
<style>
|
||||
#identifiant {
|
||||
float:left;
|
||||
width:40%;
|
||||
}
|
||||
#modules {
|
||||
float:left;
|
||||
width:40%;
|
||||
}
|
||||
|
||||
#listeModules {
|
||||
position:absolute;
|
||||
width:500px;
|
||||
display:none;
|
||||
background-color:#FBF7AA;
|
||||
border:1px solid #000000;
|
||||
z-index:3;
|
||||
}
|
||||
|
||||
#closelisteModules {
|
||||
float:right;
|
||||
padding:0.4em 1em;
|
||||
}
|
||||
|
||||
#listeModules ul {
|
||||
width:100%;
|
||||
margin-left:-10px;
|
||||
list-style-type:none;
|
||||
}
|
||||
|
||||
#listeModules ul li {
|
||||
display:inline;
|
||||
float:left;
|
||||
width:50%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="center">
|
||||
<?php foreach ( $this->content as $item ) {?>
|
||||
<?=$this->partial('bdf/module-content.phtml', array('titre'=>$item['titre'],'html'=>$item['html']))?>
|
||||
<?php }?>
|
||||
</div>
|
@ -1,5 +0,0 @@
|
||||
<div class="paragraph">
|
||||
<p class="confidentiel">
|
||||
<?=$this->cgu?>
|
||||
</p>
|
||||
</div>
|
@ -1,526 +0,0 @@
|
||||
<style type="text/css">
|
||||
.close { display: none; }
|
||||
.open { display: block; }
|
||||
.field span { display:inline; }
|
||||
fieldset { margin:10px 0;}
|
||||
fieldset legend { font-weight:bold; font-size: 108%; padding:0; }
|
||||
div.submit { clear: both; text-align: center; }
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
|
||||
$('.menu-close').click(function(){
|
||||
$('div.blockh2').css('display','none');
|
||||
$(this).next('div.blockh2').css('display','block');
|
||||
});
|
||||
|
||||
$('a#addIp').click(function(e){
|
||||
e.preventDefault();
|
||||
var text = $('div.formip').html();
|
||||
var title = $(this).html();
|
||||
var dialogOpts = {
|
||||
bgiframe: true,
|
||||
title: title,
|
||||
width: 250,
|
||||
height: 130,
|
||||
modal: true,
|
||||
open: function(event, ui) { $(this).html(text); },
|
||||
buttons: {
|
||||
'Ajouter' : function() {
|
||||
var select1 = $('#formip input[name=ip0]').val()+'.'+
|
||||
$('#formip input[name=ip1]').val()+'.'+
|
||||
$('#formip input[name=ip2]').val()+'.'+
|
||||
$('#formip input[name=ip3]').val();
|
||||
var select2 = $('#formip input[name=ip4]').val()+'.'+
|
||||
$('#formip input[name=ip5]').val()+'.'+
|
||||
$('#formip input[name=ip6]').val()+'.'+
|
||||
$('#formip input[name=ip7]').val();
|
||||
VerifIp = new RegExp('^([0-9]{1,3}\.){3}[0-9]{1,3}$');
|
||||
if ( (VerifIp.test(select1) && VerifIp.test(select2)) || (VerifIp.test(select1) && select2=='...') ){
|
||||
var txt = $('input[name=filtres_ip]').val();
|
||||
if (select2=='...'){
|
||||
select = select1;
|
||||
} else {
|
||||
select = select1+'-'+select2;
|
||||
}
|
||||
(txt.length>0) ? txt = txt+';'+select : txt = select;
|
||||
var concat = '';
|
||||
var liste = txt.split(';');
|
||||
for (item in liste){
|
||||
concat = concat+liste[item]+' [<a href="#" class="deleteIP" id="'+liste[item]+'">Suppression</a>]<br/>';
|
||||
}
|
||||
$('input[name=filtres_ip]').val(txt);
|
||||
$('#listeip').html(concat);
|
||||
}
|
||||
$(this).dialog('close');
|
||||
},
|
||||
'Fermer': function() { $(this).dialog('close'); }
|
||||
},
|
||||
close: function() { $('div#formip').remove(); }
|
||||
};
|
||||
$('<div id="formip"></div>').dialog(dialogOpts);
|
||||
return false;
|
||||
});
|
||||
|
||||
$('body').delegate('.deleteIP', 'click', function(e){
|
||||
e.preventDefault();
|
||||
var select = $(this).attr('id');
|
||||
var txt = '';
|
||||
var concat = '';
|
||||
var strListe = $('input[name=filtres_ip]').val();
|
||||
strListe = strListe.substring(0, strListe.length-1);
|
||||
var liste = strListe.split(';');
|
||||
for (item in liste){
|
||||
if (liste[item]!=select){
|
||||
(txt.length>0) ? txt = txt+';'+liste[item] : txt = liste[item];
|
||||
concat = concat+liste[item]+' [<a href="#" class="deleteIP" id="'+liste[item]+'">Suppression</a>]<br/>';
|
||||
}
|
||||
}
|
||||
$('input[name=filtres_ip]').val(txt);
|
||||
$('#listeip').html(concat);
|
||||
});
|
||||
|
||||
$('input.checkskin[type=checkbox]').checkbox();
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<div id="center">
|
||||
|
||||
<h1><?=$this->titre?></h1>
|
||||
|
||||
<div class="formip" style="display: none;">
|
||||
<input type="text" maxlength="3" size="3" name="ip0" /> .
|
||||
<input type="text" maxlength="3" size="3" name="ip1" /> .
|
||||
<input type="text" maxlength="3" size="3" name="ip2" /> .
|
||||
<input type="text" maxlength="3" size="3" name="ip3" /> -
|
||||
<input type="text" maxlength="3" size="3" name="ip4" /> .
|
||||
<input type="text" maxlength="3" size="3" name="ip5" /> .
|
||||
<input type="text" maxlength="3" size="3" name="ip6" /> .
|
||||
<input type="text" maxlength="3" size="3" name="ip7" />
|
||||
</div>
|
||||
|
||||
<form name="client" method="post" action="<?=$this->url(array('controller'=>'dashboard', 'action'=>'clientsave'), null, true)?>">
|
||||
<input type="hidden" name="action" value="client" />
|
||||
<input type="hidden" name="idClient" value="<?=$this->idClient?>" />
|
||||
|
||||
<h2 class="menu-close">Identification</h2>
|
||||
<div class="blockh2 close">
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Nom</label>
|
||||
<div class="field">
|
||||
<input name="nom" type="text" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->nom : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Siren</label>
|
||||
<div class="field">
|
||||
<input name="siren" type="text" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->siren : '';?>" />
|
||||
<a href="#">Obtention Raison sociale</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Nic du siège</label>
|
||||
<div class="field">
|
||||
<input name="nic" type="text" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->nic : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Racine des identifiants</label>
|
||||
<div class="field">
|
||||
<input name="racineLogin" type="text" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->racineLogin: '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Test</label>
|
||||
<div class="field">
|
||||
<select name="test">
|
||||
<option value="Oui" <?php if ($this->InfosClient->test=='Oui') echo 'selected';?>>Oui</option>
|
||||
<option value="Non" <?php if ($this->InfosClient->test=='Non') echo 'selected';?>>Non</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Actif</label>
|
||||
<div class="field">
|
||||
<select name="actif">
|
||||
<option value="Oui" <?php if ($this->InfosClient->actif=='Oui') echo 'selected';?>>Oui</option>
|
||||
<option value="Non" <?php if ($this->InfosClient->actif=='Non') echo 'selected';?>>Non</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Date de signature</label>
|
||||
<div class="field">
|
||||
<input name="dateSignature" type="text" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->dateSignature : '';?>" />
|
||||
(AAAA-MM-YY)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Type de contrat</label>
|
||||
<div class="field">
|
||||
<select name="typeContrat">
|
||||
<option value="Contrat" <?php if ($this->InfosClient->typeContrat=='Contrat') echo 'selected';?>>Contrat</option>
|
||||
<option value="Marché" <?php if ($this->InfosClient->typeContrat=='Marché') echo 'selected';?>>Marché</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Commercial S&D</label>
|
||||
<div class="field">
|
||||
<input name="respComSD" type="text" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->respComSD : '';?>" disabled />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Nom de l'apporteur d'affaire</label>
|
||||
<div class="field">
|
||||
<input name="apporteurAffaire" type="text" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->apporteurAffaire: '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Type d'accès</label>
|
||||
<div class="field">
|
||||
<select name="typeAcces">
|
||||
<option value="userPassword" <?php if ($this->InfosClient->typeAcces=='userPassword') echo 'selected';?>>userPassword</option>
|
||||
<option value="userPasswordIP" <?php if ($this->InfosClient->typeAcces=='userPasswordIP') echo 'selected';?>>userPasswordIP</option>
|
||||
<option value="IP" <?php if ($this->InfosClient->typeAcces=='IP') echo 'selected';?>>IP</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Remarques / Observations</label>
|
||||
<div class="field">
|
||||
<textarea name="remarque">
|
||||
<?php echo isset($this->InfosClient) ? $this->InfosClient->remarque : '';?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2 class="menu-close">Facturation</h2>
|
||||
<div class="blockh2 close">
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>N° de TVA</label>
|
||||
<div class="field">
|
||||
<input name="tva" type="text" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->tva : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Compte client rattaché</label>
|
||||
<div class="field">
|
||||
<input name="xxxx" type="text" value="" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Editer la facture automatiquement</label>
|
||||
<div class="field">
|
||||
<select name="editerFacture">
|
||||
<option value="Oui" <?php if ($this->InfosClient->editerFacture=='Oui') echo 'selected';?>>Oui</option>
|
||||
<option value="Non" <?php if ($this->InfosClient->editerFacture=='Non') echo 'selected';?>>Non</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Editer le détail de la facture</label>
|
||||
<div class="field">
|
||||
<select name="fact_detail">
|
||||
<option value="Oui" <?php if ($this->InfosClient->editerFacture=='Oui') echo 'selected';?>>Oui</option>
|
||||
<option value="Non" <?php if ($this->InfosClient->fact_detail=='Non') echo 'selected';?>>Non</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Nom du destinataire de la facture</label>
|
||||
<div class="field">
|
||||
<input name="fac_dest" type="text" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->fac_dest : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Adresse1</label>
|
||||
<div class="field">
|
||||
<input name="fac_adr1" type="text" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->fac_adr1 : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Adresse2</label>
|
||||
<div class="field">
|
||||
<input name="fac_adr2" type="text" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->fac_adr2 : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Adresse3</label>
|
||||
<div class="field">
|
||||
<input name="fac_adr3" type="text" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->fac_adr3 : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Email</label>
|
||||
<div class="field">
|
||||
<input name="fac_email" type="text" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->fac_email : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Téléphone</label>
|
||||
<div class="field">
|
||||
<input name="fac_tel" type="text" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->fac_tel : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>RIB joint à la facture</label>
|
||||
<div class="field">
|
||||
<select name="fact_rib">
|
||||
<option value="BPOSTALE" <?php if ($this->InfosClient->fact_rib=='BPOSTALE') echo 'selected';?>>BPOSTALE</option>
|
||||
<option value="CCOOP" <?php if ($this->InfosClient->fact_rib=='CCOOP') echo 'selected';?>>CCOOP</option>
|
||||
<option value="CDNORD" <?php if ($this->InfosClient->fact_rib=='CDNORD') echo 'selected';?>>CDNORD</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<h2 class="menu-close">Livraison : Informations sur le destinataire de la livraison</h2>
|
||||
<div class="blockh2 close">
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Nom</label>
|
||||
<div class="field">
|
||||
<input name="liv_dest" type="text" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->liv_dest : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Adresse1</label>
|
||||
<div class="field">
|
||||
<input name="liv_adr1" type="text" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->liv_adr1 : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Adresse2</label>
|
||||
<div class="field">
|
||||
<input name="liv_adr2" type="text" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->liv_adr2 : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Adresse3</label>
|
||||
<div class="field">
|
||||
<input name="liv_adr3" type="text" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->liv_adr3 : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Email</label>
|
||||
<div class="field">
|
||||
<input name="liv_email" type="text" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->liv_email : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Téléphone</label>
|
||||
<div class="field">
|
||||
<input name="liv_tel" type="text" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->liv_tel : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<h2 class="menu-close">Paramétrage</h2>
|
||||
<div class="blockh2 close">
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>IndiScore</label>
|
||||
<div class="field">
|
||||
<select name="typeScore">
|
||||
<option value="100" <?php if ($this->InfosClient->typeScore=='100') echo 'selected';?>>100</option>
|
||||
<option value="20" <?php if ($this->InfosClient->typeScore=='20') echo 'selected';?>>20</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Liste des adresses IP</label>
|
||||
<div class="field">
|
||||
<?php
|
||||
$text_ip = '';
|
||||
$filtres_ip = '';
|
||||
if (isset($this->InfosClient) && !empty($this->InfosClient->filtres_ip)){
|
||||
$ips = explode(';',$this->InfosClient->filtres_ip);
|
||||
foreach ($ips as $ip){
|
||||
$filtres_ip.= $ip.';';
|
||||
$text_ip.= $ip.' [<a href="#" class="deleteIP" id="'.$ip.'">Suppression</a>]<br/>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<input type="hidden" name="filtres_ip" value="<?php echo $filtres_ip?>">
|
||||
<span id="listeip">
|
||||
<?php
|
||||
if (!empty($text_ip)){
|
||||
echo $text_ip;
|
||||
} else {
|
||||
echo "Aucune IPs.";
|
||||
}
|
||||
?> </span> <br /> <a href="#" id="addIp">Ajouter une adresse IP</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Listes des Droits</label>
|
||||
<div class="field">
|
||||
<?php $listedroits = explode(' ', $this->InfosClient->droits); ?>
|
||||
<?php foreach($this->wscategory as $category) { ?>
|
||||
<fieldset>
|
||||
<legend><?=$category->desc?></legend>
|
||||
<?php foreach($category->droits->item as $droit) {
|
||||
$check = '';
|
||||
if (in_array(strtolower($droit), $listedroits)) {
|
||||
$check = ' checked';
|
||||
}
|
||||
?>
|
||||
<input class="checkskin" type="checkbox" name="droits[]" value="<?=strtolower($droit)?>"<?=$check?>/>
|
||||
<?=$this->wsdroits[$droit]?><br/>
|
||||
<?php } ?>
|
||||
</fieldset>
|
||||
<?php }?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Timeout</label>
|
||||
<div class="field">
|
||||
<input type="text" name="timeout" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->timeout : '3600';?>" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2 class="menu-close">Tarification</h2>
|
||||
<div class="blockh2 close">
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>forfaitExtranetPeriode</label>
|
||||
<div class="field">
|
||||
<select name="forfaitExtranetPeriode">
|
||||
<option value="Mensuel" <?php if ($this->InfosClient->forfaitExtranetPeriode=='Mensuel') echo 'selected';?>>Mensuel</option>
|
||||
<option value="Trimestriel" <?php if ($this->InfosClient->forfaitExtranetPeriode=='Trimestriel') echo 'selected';?>>Trimestriel</option>
|
||||
<option value="Semestriel" <?php if ($this->InfosClient->forfaitExtranetPeriode=='Semestriel') echo 'selected';?>>Semestriel</option>
|
||||
<option value="Annuel" <?php if ($this->InfosClient->forfaitExtranetPeriode=='Annuel') echo 'selected';?>>Annuel</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>forfaitExtranetMontant</label>
|
||||
<div class="field">
|
||||
<input type="text" name="forfaitExtranetMontant" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->forfaitExtranetMontant : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>reconductionAuto</label>
|
||||
<div class="field">
|
||||
<select name="reconductionAuto">
|
||||
<option value="Oui" <?php if ($this->InfosClient->reconductionAuto=='Oui') echo 'selected';?>>Oui</option>
|
||||
<option value="Non" <?php if ($this->InfosClient->reconductionAuto=='Non') echo 'selected';?>>Non</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Nombre de pièces officielles inclues dans le forfait client</label>
|
||||
<div class="field">
|
||||
<input type="text" name="forfaitPiecesNb" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->forfaitPiecesNb : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Montant du forfait des pièces officielles</label>
|
||||
<div class="field">
|
||||
<input type="text" name="forfaitPiecesMt" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->forfaitPiecesMt : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Tarif unitaire en cas de dépassement</label>
|
||||
<div class="field">
|
||||
<input type="text" name="forfaitPiecesDep" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->forfaitPiecesDep : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Nombre d'investigations inclues dans le forfait client</label>
|
||||
<div class="field">
|
||||
<input type="text" name="forfaitInvestigNb" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->forfaitInvestigNb : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Montant du forfait des investigations</label>
|
||||
<div class="field">
|
||||
<input type="text" name="forfaitInvestigMt" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->forfaitInvestigMt : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Tarif unitaire pour les indiscore</label>
|
||||
<div class="field">
|
||||
<input type="text" name="tarifIndiscore" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->tarifIndiscore : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<h2 class="menu-close">Divers</h2>
|
||||
<div class="blockh2 close">
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Accès Webservice</label>
|
||||
<div class="field">
|
||||
<input type="text" name="accesWS" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->accesWS : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="fieldgrp">
|
||||
<label>Intersud - Login</label>
|
||||
<div class="field">
|
||||
<input type="text" name="InterSudLogin" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->InterSudLogin : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Intersud - Mot de passe</label>
|
||||
<div class="field">
|
||||
<input type="text" name="InterSudPass" value="<?php echo isset($this->InfosClient) ? $this->InfosClient->InterSudPass : '';?>" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="submit">
|
||||
<p class="submit-button">
|
||||
<input type="submit" class="button" value="<?php echo $this->submitValue?>" />
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
@ -1,110 +0,0 @@
|
||||
<style type="text/css">
|
||||
#utilisateur { border-collapse:collapse; width:100%;}
|
||||
#utilisateur tr.titre td { background-color: #D9EEF1; font-weight:bold; }
|
||||
#utilisateur tr.border td { border:1px dashed #939393; padding:5px; margin:0; vertical-align:top; }
|
||||
#utilisateur tr.bordertop td { border:1px dashed #939393; border-top:1px solid; padding:5px; margin:0; vertical-align:top; }
|
||||
#utilisateur tr.borderbottom td { border:1px dashed #939393; border-bottom:1px solid; padding:5px; margin:0; vertical-align:top; }
|
||||
#utilisateur tr.actif { background-color:#D9EEF1; }
|
||||
#utilisateur tr.noactif { background-color:#F0F0F6; }
|
||||
.cadreinfo {display:none;}
|
||||
</style>
|
||||
<div id="center">
|
||||
<h1>GESTION DES CLIENTS</h1>
|
||||
<div class="paragraph">
|
||||
<a href="<?=$this->url(array('action'=>'client'))?>">Créer un client</a>
|
||||
</div>
|
||||
|
||||
<h2>Liste des clients</h2>
|
||||
<div class="paragraph">
|
||||
<table id="utilisateur" >
|
||||
<tr class="border titre">
|
||||
<td class="StyleInfoLib">Nom</td>
|
||||
<td class="StyleInfoLib">Actions</td>
|
||||
</tr>
|
||||
<?php
|
||||
if (count($this->ListeClients) > 0) {
|
||||
foreach ($this->ListeClients as $cl) {
|
||||
if ($cl->actif == 'Oui') {
|
||||
$class = 'actif';
|
||||
} else {
|
||||
$class = 'noactif';
|
||||
}
|
||||
?>
|
||||
<tr class="bordertop <?=$class?>">
|
||||
<td><?=$cl->nom?></td>
|
||||
<td rowspan="3">
|
||||
<?php if ($cl->actif == 'Oui') {?>
|
||||
<a href="<?=$this->url(array(
|
||||
'controller' => 'dashboard',
|
||||
'action' => 'client',
|
||||
'idClient' => $cl->idClient
|
||||
))?>">
|
||||
<img src="/themes/default/images/interfaces/editer_trans.png" title="Editer" width="16" height="16"/>
|
||||
</a>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="border <?=$class?>">
|
||||
<td>
|
||||
<a title="Informations" id="informations" class="lien" href="#">Informations</a> |
|
||||
<a title="Paramètres" id="parametres" class="lien" href="#">Paramètres</a> |
|
||||
<a title="Droits" id="droits" class="lien" href="#">Droits</a> |
|
||||
<a title="Liste des prestations" href="<?=$this->url(array(
|
||||
'controller' => 'dashboard',
|
||||
'action' => 'prestations',
|
||||
'idClient' => $cl->idClient
|
||||
))?>">Prestations fichier</a>
|
||||
|
||||
<div id="informations" class="cadreinfo">
|
||||
idClient : <?=$cl->idClient?><br/>
|
||||
Nom : <?=$cl->nom?><br/>
|
||||
SIREN : <?=$cl->siren?><br/>
|
||||
dateInsert : <?=$cl->dateInsert?><br/>
|
||||
dateUpdate : <?=$cl->dateUpdate?><br/>
|
||||
Actif : <?=$cl->actif?><br/>
|
||||
</div>
|
||||
|
||||
<div id="parametres" class="cadreinfo">
|
||||
Filtre Ip :<br/>
|
||||
<?php
|
||||
$ips = explode(';', $cl->filtres_ip);
|
||||
foreach ($ips as $ip){
|
||||
echo $ip.'<br/>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div id="droits" class="cadreinfo">
|
||||
<?php
|
||||
$listedroits = explode(' ', $cl->droits);
|
||||
foreach($listedroits as $droit) {
|
||||
foreach($this->wsdroits as $item){
|
||||
if (strtolower($item->code)==$droit){
|
||||
echo $item->desc.'<br/>';
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="borderbottom <?=$class?>">
|
||||
<td>
|
||||
<a href="<?=$this->url(array('action'=>'tarifs','idClient'=>$cl->idClient))?>">Tarification</a> |
|
||||
<a href="<?=$this->url(array('action'=>'services','idClient'=>$cl->idClient))?>">Services</a> |
|
||||
<a title="Liste des utiliateurs" href="<?=$this->url(array(
|
||||
'controller' => 'dashboard',
|
||||
'action' => 'users',
|
||||
'idClient' => $cl->idClient
|
||||
))?>">Utilisateurs</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
@ -1,10 +0,0 @@
|
||||
<div id="center">
|
||||
<h1>GESTION CLIENTS</h1>
|
||||
|
||||
<div class="paragraph">
|
||||
Client créer.<br/>
|
||||
<a href="<?=$this->url(array('controller'=>'dashboard', 'action'=>'clients'))?>">Liste des clients</a>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
@ -1,132 +0,0 @@
|
||||
<style type="text/css">
|
||||
table {width:100%; border-collapse:collapse; margin:5px 0;}
|
||||
table tr.odd {background-color:#e6eeee;}
|
||||
table tr.even {}
|
||||
table tr {
|
||||
border-top:2px solid;
|
||||
vertical-align:top;
|
||||
border-bottom:2px solid;
|
||||
}
|
||||
table th, table td {border:1px dashed; padding:5px;}
|
||||
select {font-size:11px;}
|
||||
</style>
|
||||
|
||||
<div id="center">
|
||||
<h1>Gestion des commandes Greffes</h1>
|
||||
|
||||
<h2>Rechercher une commande</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<form>
|
||||
<label>N° de commande ou siren</label><input type="text" name="num" value="<?=$this->num?>" />
|
||||
<input type="submit" name="submit" value="Ok" />
|
||||
<br/>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="paragraph">
|
||||
<form>
|
||||
<label>Login</label><input type="text" name="login" value="<?=$this->login?>" />
|
||||
<label>Mois</label>
|
||||
<select name="date">
|
||||
<?php foreach($this->dateSelect as $item):?>
|
||||
<option value="<?=$item['value']?>"<?=$item['select']?>><?=$item['affichage']?></option>
|
||||
<?php endforeach;?>
|
||||
</select>
|
||||
<input type="submit" name="submit" value="Ok" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="paragraph">
|
||||
<form>
|
||||
<label>Etat</label>
|
||||
<select name="etat">
|
||||
<?php foreach($this->etatSelect as $item):?>
|
||||
<option value="<?=$item['value']?>"<?=$item['select']?>><?=$item['affichage']?></option>
|
||||
<?php endforeach;?>
|
||||
</select>
|
||||
<label>Mode</label>
|
||||
<select name="mode">
|
||||
<?php foreach($this->modeSelect as $item):?>
|
||||
<option value="<?=$item['value']?>"<?=$item['select']?>><?=$item['affichage']?></option>
|
||||
<?php endforeach;?>
|
||||
</select>
|
||||
<label>Mois</label>
|
||||
<select name="date">
|
||||
<?php foreach($this->dateSelect as $item):?>
|
||||
<option value="<?=$item['value']?>"<?=$item['select']?>><?=$item['affichage']?></option>
|
||||
<?php endforeach;?>
|
||||
</select>
|
||||
<input type="submit" name="submit" value="Ok" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<h2>Liste des commandes</h2>
|
||||
<div class="paragraph">
|
||||
<?php if (count($this->commandes)>0): ?>
|
||||
<table>
|
||||
<tbody>
|
||||
<?php $compteur = 0;?>
|
||||
<?php foreach ($this->commandes as $item):?>
|
||||
<?php
|
||||
if ($compteur%2) $class = ' even';
|
||||
else $class = ' odd';
|
||||
$compteur++;
|
||||
?>
|
||||
<tr class="<?=$class?>">
|
||||
<td><b><?=$item->typeCommande?><?=$item->idCommande?></b></td>
|
||||
<td width="20%">
|
||||
<a href="<?=$item->sirenLien?>"><?=$this->SirenTexte($item->siren)?></a><br/>
|
||||
<b><a href="<?=$this->url(array(
|
||||
'controller' => 'dashboard',
|
||||
'action' => 'rs',
|
||||
'siren' => $item->siren,
|
||||
), null, true)?>" class="rs">Raison sociale</a>
|
||||
</b>
|
||||
</td>
|
||||
<td width="40%">
|
||||
<?php if ($item->typeCommande=='G'):?>
|
||||
<u>Commande Greffe standard</u><br/>
|
||||
<?php elseif ($item->typeCommande=='C'):?>
|
||||
<u>Commande Greffe par <a href="<?=$this->url(array('controller'=>'dashboard', 'action'=>'courrier', 'commande'=>'C'.$item->idCommande))?>" target="_blank">courrier</a> S&D</u><br/>
|
||||
<a href="<?=$this->url(array(
|
||||
'controller'=>'dashboard',
|
||||
'action' => 'courrier',
|
||||
'commande' => 'C'.$item->idCommande,
|
||||
), null, true)?>" target="_blank">
|
||||
Générer le courrier</a><br/>
|
||||
<?php endif;?>
|
||||
|
||||
Document : <?=$item->document?> <br/>
|
||||
<br/>
|
||||
Ref : <?=$item->refDocument?><br/>
|
||||
Lib : <?=$item->libDocument?><br/>
|
||||
<br/>
|
||||
Login : <?=$item->login?><br/>
|
||||
Email : <?=$item->emailCommande?><br/>
|
||||
|
||||
</td>
|
||||
<td width="40%">
|
||||
Date de commande : <?=$item->dateCommande?><br/>
|
||||
<b>Date de reception : <?=$item->dateReception?></b><br/>
|
||||
<br/>
|
||||
<form action="<?=$this->url(array('controller'=>'dashboard', 'action'=>'commandesetatchange', 'type'=>'greffe'))?>">
|
||||
Changer l'etat :
|
||||
<select name="<?=$item->idCommande?>" class="changeEtat">
|
||||
<?php foreach($item->cmdEtatSelect as $etat) {?>
|
||||
<option value="<?=$etat['value']?>"<?=$etat['select']?>><?=$etat['affichage']?></option>
|
||||
<?php }?>
|
||||
</select>
|
||||
</form>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php else:?>
|
||||
Aucune commandes.
|
||||
<?php endif;?>
|
||||
</div>
|
||||
|
||||
</div>
|
@ -1,109 +0,0 @@
|
||||
<style type="text/css">
|
||||
table {width:100%; border-collapse:collapse; margin:5px 0;}
|
||||
table tr.odd {background-color:#e6eeee;}
|
||||
table tr.even {}
|
||||
table tr {
|
||||
border-top:2px solid;
|
||||
vertical-align:top;
|
||||
border-bottom:2px solid;
|
||||
}
|
||||
table th, table td {border:1px dashed; padding:5px;}
|
||||
select {font-size:11px;}
|
||||
</style>
|
||||
|
||||
<div id="center">
|
||||
<h1>Gestion des commandes KBIS</h1>
|
||||
|
||||
<h2>Rechercher une commande</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<form>
|
||||
N° de commande ou siren <input type="text" name="num" value="<?=$this->num?>" />
|
||||
<input type="submit" name="submit" value="Ok" />
|
||||
<br/>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="paragraph">
|
||||
<form>
|
||||
Etat
|
||||
<select name="etat">
|
||||
<?php foreach($this->etatSelect as $item):?>
|
||||
<option value="<?=$item['value']?>"<?=$item['select']?>><?=$item['affichage']?></option>
|
||||
<?php endforeach;?>
|
||||
</select>
|
||||
<br/>
|
||||
Mode
|
||||
<select name="mode">
|
||||
<?php foreach($this->modeSelect as $item):?>
|
||||
<option value="<?=$item['value']?>"<?=$item['select']?>><?=$item['affichage']?></option>
|
||||
<?php endforeach;?>
|
||||
</select>
|
||||
<br/>
|
||||
Mois
|
||||
<select name="date">
|
||||
<?php foreach($this->dateSelect as $item):?>
|
||||
<option value="<?=$item['value']?>"<?=$item['select']?>><?=$item['affichage']?></option>
|
||||
<?php endforeach;?>
|
||||
</select>
|
||||
<input type="submit" name="submit" value="Ok" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<h2>Liste des commandes</h2>
|
||||
<div class="paragraph">
|
||||
<?php if (count($this->commandes)>0): ?>
|
||||
<table>
|
||||
<tbody>
|
||||
<?php $compteur = 0;?>
|
||||
<?php foreach ($this->commandes as $item):?>
|
||||
<?php
|
||||
if ($compteur%2) $class = ' even';
|
||||
else $class = ' odd';
|
||||
$compteur++;
|
||||
?>
|
||||
<tr class="<?=$class?>">
|
||||
<td><b>K<?=$item->id?></b></td>
|
||||
<td width="26%">
|
||||
<a href="<?=$this->url(array(
|
||||
'controller' => 'identite',
|
||||
'action' => 'fiche',
|
||||
'siret' => $item->siren
|
||||
), null, true)?>"><?=$this->SirenTexte($item->siren)?></a><br/>
|
||||
<b><?=$item->raisonSociale?></b>
|
||||
</td>
|
||||
<td width="34%">
|
||||
<?php if ($item->type=='M'){?>
|
||||
<u>Commande de kbis par Mail</u> (<a href="<?=$this->url(array('controller'=>'dashboard', 'action'=>'courrier', 'commande'=>'K'.$item->id))?>" target="_blank">Courrier</a>)<br/>
|
||||
<?php } elseif ($item->type=='C') {?>
|
||||
<u>Commande de kbis original par <a href="<?=$this->url(array('controller'=>'dashboard', 'action'=>'courrier', 'commande'=>'K'.$item->id))?>" target="_blank">Courrier</a></u><br/>
|
||||
<?=$item->societe?><br/>
|
||||
<?=$item->nom?><br/>
|
||||
<?=$item->adresse?><br/>
|
||||
<?=$item->cp . ' ' . $item->ville?><br/>
|
||||
<?php }?>
|
||||
Email : <?=$item->email?><br/>
|
||||
Etat : ...
|
||||
</td>
|
||||
<td width="34%">
|
||||
Date de commande : <?=$item->dateCommande?></br>
|
||||
Date de reception : <?=$item->dateReception?><br/>
|
||||
<form action="<?=$this->url(array('controller'=>'dashboard', 'action'=>'commandesetatchange', 'type'=>'kbis'))?>">
|
||||
Changer l'etat : <select name="<?=$item->id?>" class="changeEtat">
|
||||
<?php foreach($item->cmdEtatSelect as $etat) {?>
|
||||
<option value="<?=$etat['value']?>"<?=$etat['select']?>><?=$etat['affichage']?></option>
|
||||
<?php }?>
|
||||
</select>
|
||||
</form>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php else:?>
|
||||
Aucunes commandes.
|
||||
<?php endif;?>
|
||||
</div>
|
||||
|
||||
</div>
|
@ -1,16 +0,0 @@
|
||||
<div id="center">
|
||||
<h1>Gestion des commandes</h1>
|
||||
<div class="paragraph">
|
||||
|
||||
<?php foreach($this->typesCommande as $type):?>
|
||||
<a href="<?=$this->url(array(
|
||||
'controller' => 'dashboard',
|
||||
'action' => 'commandes',
|
||||
'type' => $type
|
||||
))?>" title="Gérer vos commandes">Gestion des commandes <?=$type?></a>
|
||||
<br/>
|
||||
|
||||
<?php endforeach;?>
|
||||
|
||||
</div>
|
||||
</div>
|
@ -1,10 +0,0 @@
|
||||
<div id="center">
|
||||
<h1>Gestion Système</h1>
|
||||
|
||||
<div class="paragraph">
|
||||
<?php foreach ($this->Liens as $lien):?>
|
||||
<a href="<?=$lien['url']?>"><?=$lien['libelle']?></a><br/>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
|
||||
</div>
|
@ -1,46 +0,0 @@
|
||||
<div id="center">
|
||||
<h2>Gestion des nouveautés</h2>
|
||||
<div class="paragraph">
|
||||
|
||||
<form id="uploadForm" name="uploadForm" action="<?=$this->url(array('controller'=>'dashboard', 'action'=>'newupload'))?>" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="APC_UPLOAD_PROGRESS" id="key" value="<?=uniqid()?>"/>
|
||||
<input type="hidden" name="MAX_FILE_SIZE" value="50000000" />
|
||||
Catégorie : <input type="text" name="categorie" />
|
||||
<br/>
|
||||
Intitulé : <input type="text" name="intitule" />
|
||||
<br/>
|
||||
Date : <input type="text" name="date" /> (Format AAAA-MM-JJ)
|
||||
<br/>
|
||||
Fichier PDF : <input type="file" name="fichier" />
|
||||
<br/>
|
||||
<input type="submit" name="upload" value="Valider" />
|
||||
</form>
|
||||
<div id="uploadOutput"></div>
|
||||
<script type="text/javascript" src="/libs/form/jquery.form.js">
|
||||
</script>
|
||||
<script>
|
||||
var timer;
|
||||
|
||||
function checkProgress() {
|
||||
$.getJSON('<?=$this->url(array('controller'=>'dashboard', 'action'=>'newprogress'))?>',
|
||||
{key: $('#key').val()}, function(data) {
|
||||
$('#uploadOutput').html(data.current+'/'+data.total);
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#uploadForm').ajaxForm({
|
||||
beforeSubmit: function() {
|
||||
$('#uploadOutput').html('Envoi en cours...');
|
||||
timer = setInterval(checkProgress,500);
|
||||
},
|
||||
success: function(data) {
|
||||
clearInterval(timer);
|
||||
$('#uploadOutput').html(data);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
</div>
|
@ -1,291 +0,0 @@
|
||||
<style type="text/css">
|
||||
.close {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.open {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.fieldgrp {
|
||||
clear: both;
|
||||
width: 100%;
|
||||
margin-bottom: .5em;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.fieldgrp:after {
|
||||
content: ".";
|
||||
display: block;
|
||||
clear: both;
|
||||
visibility: hidden;
|
||||
line-height: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.fieldgrp label {
|
||||
font-weight: bold;
|
||||
margin-left: 30px;
|
||||
width: 180px;
|
||||
clear: both;
|
||||
padding: 0 10px 0 0;
|
||||
line-height: 22px;
|
||||
_padding-top: 3px;
|
||||
float: left;
|
||||
display: block;
|
||||
font-size: 108%;
|
||||
}
|
||||
|
||||
.field {
|
||||
width: 320px;
|
||||
float: left;
|
||||
padding: 0 10px 0 0;
|
||||
line-height: 22px;
|
||||
_padding-top: 3px;
|
||||
}
|
||||
|
||||
.field .longfield {
|
||||
width: 215px;
|
||||
}
|
||||
|
||||
.field .longfield-select {
|
||||
width: 220px;
|
||||
}
|
||||
|
||||
.field .smallfield {
|
||||
width: 95px;
|
||||
}
|
||||
|
||||
.field .medfield {
|
||||
width: 110px;
|
||||
}
|
||||
|
||||
.field input,.field select {
|
||||
font-size: 110%;
|
||||
margin: 2px 0;
|
||||
}
|
||||
|
||||
.field input[type="radio"] {
|
||||
margin: 0 5px 0 5px;
|
||||
}
|
||||
|
||||
fieldset { margin:10px 0;}
|
||||
fieldset legend { font-weight:bold; font-size: 108%; }
|
||||
|
||||
div.submit {
|
||||
clear: both;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="center">
|
||||
<h1>Prestations fichier client (idClient=<?=$this->idClient?>)</h1>
|
||||
<div class="paragraph">
|
||||
|
||||
<form>
|
||||
<input type="hidden" name="idClient" value="<?=$this->idClient?>"/>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Type de prestation : </label>
|
||||
<div class="field">
|
||||
<select name="typeprestation">
|
||||
<option>-</option>
|
||||
<option value="Diffusion">Diffusion</option>
|
||||
<option value="Surveillance">Surveillance</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Source</label>
|
||||
<div class="field">
|
||||
<select name="source">
|
||||
<option>-</option>
|
||||
<option value="Bodacc">Bodacc</option>
|
||||
<option value="Insee">Insee</option>
|
||||
<option value="Rncs">Rncs</option>
|
||||
<option value="Bilans">Bilans</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Date de mise en place</label>
|
||||
<div class="field">
|
||||
<input type="text" name="datemiseenplace" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Date première facture</label>
|
||||
<div class="field">
|
||||
<input type="text" name="datepremierefacture" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Fréquence de facturation (en mois)</label>
|
||||
<div class="field">
|
||||
<select name="freqfacturation">
|
||||
<option value="Unitaire">Unitaire</option>
|
||||
<option value="Quotidien">Quotidien</option>
|
||||
<option value="Hebdo">Hebdo</option>
|
||||
<option value="Mensuel">Mensuel</option>
|
||||
<option value="Trimestriel">Trimestriel</option>
|
||||
<option value="Semestriel">Semestriel</option>
|
||||
<option value="Annuel">Annuel</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Date de fin</label>
|
||||
<div class="field">
|
||||
<input type="text" name="datefinprestation" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Test</label>
|
||||
<div class="field">
|
||||
<select name="prestatest">
|
||||
<option value="0">Non</option>
|
||||
<option value="1">Oui</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Identifiant</label>
|
||||
<div class="field">
|
||||
<input type="text" name="identifiantPrestation" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Password</label>
|
||||
<div class="field">
|
||||
<input type="text" name="passwordprestation" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Support de livraison</label>
|
||||
<div class="field">
|
||||
<select name="supportprestation">
|
||||
<option value="FTP">FTP</option>
|
||||
<option value="Email">EMAIL</option>
|
||||
<option value="CD/DVD">CD/DVD</option>
|
||||
<option value="CFT">CFT</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Identifiant CFT</label>
|
||||
<div class="field">
|
||||
<input type="text" name="identifiantCFT" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Durée du contrat</label>
|
||||
<div class="field">
|
||||
<input type="text" name="dureecontrat" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Montant annuel facturation</label>
|
||||
<div class="field">
|
||||
<input type="text" name="montantannuelfact" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Fréquence des envois</label>
|
||||
<div class="field">
|
||||
<select name="freqenvois">
|
||||
<option value="Unitaire">Unitaire</option>
|
||||
<option value="Quotidien">Quotidien</option>
|
||||
<option value="Hebdo">Hebdo</option>
|
||||
<option value="Mensuel">Mensuel</option>
|
||||
<option value="Trimestriel">Trimestriel</option>
|
||||
<option value="Semestriel">Semestriel</option>
|
||||
<option value="Annuel">Annuel</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Options (format INI)</label>
|
||||
<div class="field">
|
||||
<textarea name="optionsprestation"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Active</label>
|
||||
<div class="field">
|
||||
<select name="prestationactive">
|
||||
<option value="oui">Oui</option>
|
||||
<option value="non">Non</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Options support (format INI)</label>
|
||||
<div class="field">
|
||||
<textarea name="optionssupport"></textarea>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Main d'info fichier entrant</label>
|
||||
<div class="field">
|
||||
<input type="text" name="mailIN" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Main d'info fichier sortant</label>
|
||||
<div class="field">
|
||||
<input type="text" name="mailOUT" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>osClient</label>
|
||||
<div class="field">
|
||||
<select name="osClient">
|
||||
<option value="WINDOWS">WINDOWS</option>
|
||||
<option value="LINUX">LINUX</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Compression</label>
|
||||
<div class="field">
|
||||
<select name="compression">
|
||||
<option value="none">none</option>
|
||||
<option value="zip">zip</option>
|
||||
<option value="gzip">gzip</option>
|
||||
<option value="bzip2">bzip2</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="submit">
|
||||
<p class="submit-button">
|
||||
<input type="submit" class="button" value="<?=$this->submitValue?>" />
|
||||
</p>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
@ -1,55 +0,0 @@
|
||||
<style type="text/css">
|
||||
#utilisateur { border-collapse:collapse; width:100%;}
|
||||
#utilisateur tr.titre td { background-color: #D9EEF1; font-weight:bold; }
|
||||
#utilisateur tr.border td {
|
||||
border:1px dashed #939393; padding:5px; margin:0; vertical-align:top; }
|
||||
#utilisateur tr.actif { background-color:#D9EEF1; }
|
||||
#utilisateur tr.noactif { background-color:#F0F0F6; }
|
||||
.cadreinfo {display:none;}
|
||||
</style>
|
||||
<div id="center">
|
||||
<h1>Prestations fichier client (idClient=<?=$this->idClient?>)</h1>
|
||||
<div class="paragraph">
|
||||
<a href="<?=$this->url(array('controller'=>'dashboard','action'=>'prestation'))?>">Ajouter une prestation</a>
|
||||
</div>
|
||||
|
||||
<h2>Liste</h2>
|
||||
<div class="paragraph">
|
||||
<?php if (count($this->prestations) > 0) { ?>
|
||||
<table id="utilisateur" >
|
||||
<tr class="border titre">
|
||||
<td class="StyleInfoLib">Nom</td>
|
||||
<td class="StyleInfoLib">Type</td>
|
||||
<td class="StyleInfoLib">Debut</td>
|
||||
<td class="StyleInfoLib">Fin</td>
|
||||
<td class="StyleInfoLib"></td>
|
||||
</tr>
|
||||
<?php
|
||||
foreach ($this->prestations as $prestation) {
|
||||
if ($prestation->active == 'Oui') {
|
||||
$class = 'actif';
|
||||
} else {
|
||||
$class = 'noactif';
|
||||
}
|
||||
?>
|
||||
<tr class="border <?=$class?>">
|
||||
<td><?=$prestation->identifiant?></td>
|
||||
<td><?=$prestation->type?></td>
|
||||
<td><?=$prestation->dateDebut?></td>
|
||||
<td><?=$prestation->dateFin?></td>
|
||||
<td><?php if ($prestation->active == 'Oui') { ?>
|
||||
<a href="<?=$this->url(array('controller'=>'dashboard','action'=>'prestation','id'=>$prestation->id))?>">
|
||||
<img src="/themes/default/images/interfaces/editer_trans.png" title="Editer" width="16" height="16"/>
|
||||
</a><?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
?>
|
||||
Aucune prestation.
|
||||
<?php }?>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
@ -1 +0,0 @@
|
||||
<?php
|
@ -1,47 +0,0 @@
|
||||
<div id="center">
|
||||
|
||||
<h1>Ajout d'un service</h1>
|
||||
|
||||
<?php if ($this->message) {?>
|
||||
|
||||
<?=$this->message?>
|
||||
|
||||
<?php } else {?>
|
||||
|
||||
<form method="post" action="<?=$this->url(array('controller'=>'dashboard','action'=>'service'),null,true)?>">
|
||||
<div class="paragraph">
|
||||
|
||||
<input type="hidden" name="idClient" value="<?=$this->idClient?>"/>
|
||||
Code <input type="text" name="code" value="<?=$this->code?>" />,
|
||||
Libellé <input type="text" name="label" value="<?=$this->label?>" />
|
||||
|
||||
<div class="infoTitle StyleInfoLib">Droits d'accès</div>
|
||||
<div class="infoData">
|
||||
<?php foreach($this->wscategory as $category) {?>
|
||||
<fieldset>
|
||||
<legend><?=$category->desc?></legend>
|
||||
<?php
|
||||
foreach($category->droits->item as $droit) {
|
||||
$droit = strtolower($droit);
|
||||
if (in_array($droit, $this->droitsClients)) {
|
||||
$check = '';
|
||||
if ( count($this->droits)>0 && in_array($droit, $this->droits) ) {
|
||||
$check = ' checked';
|
||||
}
|
||||
?>
|
||||
<input type="checkbox" name="droits[]" value="<?=$droit?>"<?=$check?> class="noborder"/>
|
||||
<?=$this->droitsLib[strtoupper($droit)]?><br/>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</fieldset>
|
||||
<?php }?>
|
||||
</div>
|
||||
|
||||
<div class="submit"><p class="submit-button"><input type="submit" name="submit" value="Ajouter" class="button"/></p></div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<?php }?>
|
||||
|
||||
</div>
|
@ -1,22 +0,0 @@
|
||||
<div id="center">
|
||||
<h1>Ajout d'un tarif</h1>
|
||||
<?php if ($this->error) {?>
|
||||
<?=$this->error?>
|
||||
<?php }?>
|
||||
<div class="paragraph">
|
||||
<form method="post" action="<?=$this->url(array('controller'=>'dashboard','action'=>'tarif'),null,true)?>">
|
||||
<input type="hidden" name="idClient" value="<?=$this->idClient?>"/>
|
||||
|
||||
<label>Log</label><input type="text" name="log"/><br/>
|
||||
<label>Service</label><input type="text" name="service"/><br/>
|
||||
<label>Type</label><input type="text" name="type"/> (Unitaire, ForfaitLimit, ForfaitNoLimit)<br/>
|
||||
<label>Prix unitaire</label><input type="text" name="priceUnit"/><br/>
|
||||
<label>Nb Limit</label><input type="text" name="limit"/><br/>
|
||||
<label>Date</label><input type="text" name="date"/> (AAAAMMJJ)<br/>
|
||||
<label>Durée</label><input type="text" name="duree"/> (Jour)<br/>
|
||||
<label>Doublon</label><input type="text" name="doublon"/> (jour, mois, period, )<br/>
|
||||
|
||||
<input type="submit" name="submit" value="Ajouter" class="button"/>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
@ -1,42 +0,0 @@
|
||||
<div id="center">
|
||||
<h1>TARIFS</h1>
|
||||
<div class="paragraph">
|
||||
<a href="<?=$this->url(array('controller'=>'dashboard','action'=>'tarif','idClient'=>$this->idClient),null,true)?>">Créer un tarifs</a>
|
||||
</div>
|
||||
|
||||
<h2>Liste des tarifs</h2>
|
||||
<div class="paragraph">
|
||||
<?php if(count($this->tarifs->item)>0) {?>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Log</th>
|
||||
<th>Service</th>
|
||||
<th>type</th>
|
||||
<th>Prix unitaire</th>
|
||||
<th>Limit</th>
|
||||
<th>Date de début</th>
|
||||
<th>Durée</th>
|
||||
<th>Dédoublonnage</th>
|
||||
</tr>
|
||||
<?php foreach ( $this->tarifs->item as $tarif ) {?>
|
||||
<tr>
|
||||
<td><?=$tarif->log?></td>
|
||||
<td><?=$tarif->service?></td>
|
||||
<td><?=$tarif->type?></td>
|
||||
<td><?=$tarif->priceUnit?></td>
|
||||
<td><?=$tarif->limit?></td>
|
||||
<td><?=$tarif->date?></td>
|
||||
<td><?=$tarif->duree?></td>
|
||||
<td><?=$tarif->doublon?></td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<?php }?>
|
||||
</table>
|
||||
<?php } else {?>
|
||||
Aucun tarif défini.
|
||||
<?php }?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
@ -1,290 +0,0 @@
|
||||
<div id="center">
|
||||
|
||||
<?php if (!empty($this->message)) { ?>
|
||||
<div style="margin:5px; padding: 5pt 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->message?>
|
||||
</p></div>
|
||||
<?php } ?>
|
||||
|
||||
<h1 class="titre">PROFIL UTILISATEUR</h1>
|
||||
|
||||
<form id="moncompte" name="moncompte" action="/dashboard/user/op/save" method="post">
|
||||
|
||||
<div class="paragraph">
|
||||
|
||||
<input type="hidden" name="frmOptions[idClient]" value="<?=$this->options['idClient']?>"/>
|
||||
<input type="hidden" name="frmOptions[action]" value="<?=$this->action?>"/>
|
||||
|
||||
<div class="infoTitle StyleInfoLib">Identifiant utilisateur</div>
|
||||
<div class="infoData">
|
||||
<?php
|
||||
if ($this->action == 'new') {
|
||||
?>
|
||||
<input type="text" size="20" maxlength="80" name="frmOptions[login]" value="<?=$this->loginNew?>"/>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<input type="text" size="20" maxlength="80" name="frmOptions[login]" value="<?=$this->options['login']?>"/>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<div class="infoTitle StyleInfoLib">Identité (NOM/Prénom)</div>
|
||||
<div class="infoData">
|
||||
<input type="text" size="20" maxlength="80" name="frmOptions[nom]" value="<?=$this->options['nom']?>"/>
|
||||
<input type="text" size="20" maxlength="80" name="frmOptions[prenom]" value="<?=$this->options['prenom']?>"/>
|
||||
</div>
|
||||
|
||||
<div class="infoTitle StyleInfoLib">Réf. facturation (service, etc...)</div>
|
||||
<div class="infoData">
|
||||
<input type="text" size="20" maxlength="80" name="frmOptions[reference]" value="<?=$this->options['referenceParDefaut']?>"/>
|
||||
</div>
|
||||
|
||||
<div class="infoTitle StyleInfoLib">Adresse e-mail</div>
|
||||
<div class="infoData">
|
||||
<input type="text" size="30" maxlength="80" name="frmOptions[email]" value="<?=$this->options['email']?>"/>
|
||||
</div>
|
||||
|
||||
<div class="infoTitle StyleInfoLib">
|
||||
Numéros de téléphone<br/><i>(Fixe, Fax, Mobile)</i>
|
||||
</div>
|
||||
<div class="infoData">
|
||||
<input type="text" size="10" maxlength="15" name="frmOptions[tel_fix]" value="<?=$this->options['tel']?>"/>
|
||||
<input type="text" size="10" maxlength="15" name="frmOptions[tel_fax]" value="<?=$this->options['fax']?>"/>
|
||||
<input type="text" size="10" maxlength="15" name="frmOptions[tel_mob]" value="<?=$this->options['mobile']?>"/>
|
||||
</div>
|
||||
<br/>
|
||||
|
||||
<div class="infoTitle StyleInfoLib">Mot de passe</div>
|
||||
<div class="infoData last">
|
||||
<?php
|
||||
if ($this->action=='new') {
|
||||
$typeChamp = 'text';
|
||||
$changePassword = 1;
|
||||
?>
|
||||
<input type="<?=$typeChamp?>" name="frmOptions[password]" value="<?=$this->password?>"/>
|
||||
<input type="hidden" name="frmOptions[changepwd]" value="<?=$changePassword?>"/>
|
||||
<?php
|
||||
} else {
|
||||
$typeChamp = 'hidden';
|
||||
$changePassword = 0;
|
||||
?>
|
||||
<a href="#" id="password">Modifier le mot de passe.</a>
|
||||
<input type="<?=$typeChamp?>" name="frmOptions[password]" value="<?=$this->options['password']?>"/>
|
||||
<input type="hidden" name="frmOptions[changepwd]" value="<?=$changePassword?>"/>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2>Paramètres spécifiques</h2>
|
||||
<div class="paragraph">
|
||||
|
||||
<div class="infoTitle StyleInfoLib">Résultats par page</div>
|
||||
<div class="infoData">
|
||||
<select name="frmOptions[nbReponses]">
|
||||
<?php
|
||||
$opts = array(10, 20, 30, 40, 50, 100, 150, 200);
|
||||
foreach($opts as $opt)
|
||||
{
|
||||
$selected = '';
|
||||
if($opt == $this->options['nbReponses']) $selected = 'selected';
|
||||
?><option value="<?=$opt?>" <?=$selected?>><?=$opt?></option><?php
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="infoTitle StyleInfoLib">Type de Compte</div>
|
||||
<div class="infoData">
|
||||
<select name="frmOptions[typeCompte]">
|
||||
<?php
|
||||
$opts = array('PROD', 'TEST');
|
||||
foreach($opts as $opt)
|
||||
{
|
||||
$selected = '';
|
||||
if($opt == $this->options['typeCompte']) $selected = 'selected';
|
||||
?><option value="<?=$opt?>" <?=$selected?>><?=$opt?></option><?php
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="infoTitle StyleInfoLib">Format mail</div>
|
||||
<div class="infoData">
|
||||
<select name="frmOptions[formatMail]">
|
||||
<?php
|
||||
$opts = array(
|
||||
'txt1'=> 'Une annonce par mail',
|
||||
'txt2' => 'Toutes les annonces dans un mail',
|
||||
'csv' => 'Toutes les annonces dans un mail, fichier csv joint',
|
||||
'pdf' => 'Une annonce par mail, fichier pdf joint',
|
||||
'pdf1' => 'Toutes les annonces dans un mail, fichier pdf joint',
|
||||
'xls' => 'XLS',
|
||||
'htm'=> 'HTML');
|
||||
foreach($opts as $opt => $lib)
|
||||
{
|
||||
$selected = '';
|
||||
if($opt == $this->options['formatMail']) $selected = 'selected';
|
||||
?><option value="<?=$opt?>" <?=$selected?>><?=$lib?></option><?php
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="infoTitle StyleInfoLib">Lien vers annonces légales dans mail</div>
|
||||
<div class="infoData">
|
||||
<select name="frmOptions[lienExtranetMail]">
|
||||
<?php
|
||||
$opts = array( '0'=> 'Non', '1' => 'Oui');
|
||||
foreach($opts as $opt => $lib)
|
||||
{
|
||||
$selected = '';
|
||||
if($opt == $this->options['lienExtranetMail']) $selected = 'selected';
|
||||
?><option value="<?=$opt?>" <?=$selected?>><?=$lib?></option><?php
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="infoTitle StyleInfoLib">Liste Evenement</div>
|
||||
<div class="infoData">
|
||||
<textarea name="frmOptions[listeEven]">
|
||||
<?=$this->options['listeEven']?>
|
||||
</textarea>
|
||||
<br/><span>Liste de code évenements séparés par des ;</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="infoTitle StyleInfoLib">Date de debut de compte</div>
|
||||
<div class="infoData">
|
||||
<input type="text" name="frmOptions[dateDebutCompte]" value="<?=$this->options['dateDebutCompte']?>"/>
|
||||
<br/><span>Format AAAA-MM-JJ</span>
|
||||
</div>
|
||||
|
||||
<div class="infoTitle StyleInfoLib">Date de fin de compte</div>
|
||||
<div class="infoData">
|
||||
<input type="text" name="frmOptions[dateFinCompte]" value="<?=$this->options['dateFinCompte']?>"/>
|
||||
<br/><span>Format AAAA-MM-JJ</span>
|
||||
</div>
|
||||
|
||||
<div class="infoTitle StyleInfoLib">Appliquer le Filtre IP du compte Client</div>
|
||||
<div class="infoData">
|
||||
<select name="frmOptions[ip]">
|
||||
<?php
|
||||
$opts = array( 1 => 'Oui', 0 => 'Non');
|
||||
foreach($opts as $opt)
|
||||
{
|
||||
$selected = '';
|
||||
if($this->options['filtre_ip'] == $this->options['filtreIpClient']) $selected = 'selected';
|
||||
?><option value="<?=$opt?>" <?=$selected?>><?=$opt?></option><?php
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<br/><span><?=$this->options['filtre_ip']?></span>
|
||||
</div>
|
||||
|
||||
<div class="infoTitle StyleInfoLib">Type de recherche par référence</div>
|
||||
<div class="infoData">
|
||||
<select name="frmOptions[rechRefType]">
|
||||
<?php
|
||||
$opts = array('UTI', 'CLI');
|
||||
foreach($opts as $opt)
|
||||
{
|
||||
$selected = '';
|
||||
if($opt == $this->options['rechRefType']) $selected = 'selected';
|
||||
?><option value="<?=$opt?>" <?=$selected?>><?=$opt?></option><?php
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="infoTitle StyleInfoLib">Accès WebService</div>
|
||||
<div class="infoData">
|
||||
<select name="frmOptions[accesWS]">
|
||||
<?php
|
||||
$opts = array(0 =>'Non', 1=>'Oui');
|
||||
foreach($opts as $opt => $lib)
|
||||
{
|
||||
$selected = '';
|
||||
if($opt == $this->options['accesWS']) $selected = 'selected';
|
||||
?><option value="<?=$opt?>" <?=$selected?>><?=$lib?></option><?php
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<h2>Gestion des droits</h2>
|
||||
<div class="paragraph">
|
||||
|
||||
<div class="infoTitle StyleInfoLib">Type de profil</div>
|
||||
<div class="infoData">
|
||||
|
||||
<select name="frmOptions[profil]">
|
||||
<?php
|
||||
$profil = array('Utilisateur', 'Administrateur', 'SuperAdministrateur');
|
||||
foreach ($profil as $item){
|
||||
$select = '';
|
||||
if ($this->options['profil'] == $item) {
|
||||
$select = ' selected';
|
||||
}
|
||||
?>
|
||||
<option value="<?=$item?>"<?=$select?>><?=$item?></option>
|
||||
<?php }?>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="infoTitle StyleInfoLib">Droits d'accès</div>
|
||||
<div class="infoData">
|
||||
<?php foreach($this->wscategory as $category) {?>
|
||||
<fieldset>
|
||||
<legend><?=$category->desc?></legend>
|
||||
<?php
|
||||
foreach($category->droits->item as $droit) {
|
||||
$droit = strtolower($droit);
|
||||
if (in_array($droit, $this->droitsClients)) {
|
||||
$check = '';
|
||||
if ( count($this->droits)>0 && in_array($droit, $this->droits) ) {
|
||||
$check = ' checked';
|
||||
}
|
||||
?>
|
||||
<input type="checkbox" name="frmOptions[droits][]" value="<?=$droit?>"<?=$check?> class="noborder"/>
|
||||
<?=$this->droitsLib[strtoupper($droit)]?><br/>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</fieldset>
|
||||
<?php }?>
|
||||
</div>
|
||||
|
||||
<div class="infoTitle StyleInfoLib">Préférences</div>
|
||||
<div class="infoData last">
|
||||
<?php
|
||||
foreach ($this->prefsLib as $code => $lib) {
|
||||
$check = '';
|
||||
if ($this->prefs && in_array(strtolower($code), $this->prefs)) {
|
||||
$check = ' checked';
|
||||
}
|
||||
?>
|
||||
<input type="checkbox" name="frmOptions[pref][]" value="<?=strtolower($code)?>"<?=$check?> class="noborder"/>
|
||||
<?=$lib?><br/>
|
||||
<?php }?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="submit"><p class="submit-button"><input type="submit" class="button" value="Sauver"/></p></div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="dialog" title="Modifier le mot de passe">
|
||||
<form>
|
||||
<label for="npass1">Nouveau mot de passe</label><br/>
|
||||
<input type="password" name="npass1" size="15" maxlength="32"/><br/>
|
||||
<label for="npass2">Répéter le nouveau mot de passe</label><br/>
|
||||
<input type="password" name="npass2" size="15" maxlength="32"/><br/>
|
||||
<span id="form-message"></span>
|
||||
</form>
|
||||
</div>
|
@ -1,162 +0,0 @@
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
|
||||
$('a.delete').on('click', function(e){
|
||||
e.preventDefault();
|
||||
var href = $(this).attr('href');
|
||||
var title = $(this).attr('title');
|
||||
if (confirm(title)) {
|
||||
document.location.href=href;
|
||||
}
|
||||
});
|
||||
|
||||
$('a.enable').on('click', function(e){
|
||||
e.preventDefault();
|
||||
var href = $(this).attr('href');
|
||||
var title = $(this).attr('title');
|
||||
if (confirm(title)) {
|
||||
document.location.href=href;
|
||||
}
|
||||
});
|
||||
|
||||
$('a.disable').on('click', function(e){
|
||||
e.preventDefault();
|
||||
var href = $(this).attr('href');
|
||||
var title = $(this).attr('title');
|
||||
if (confirm(title)) {
|
||||
document.location.href=href;
|
||||
}
|
||||
});
|
||||
|
||||
$('input[name=searchLogin]').autocomplete({
|
||||
minLength:3,
|
||||
source: function(request, response) {
|
||||
$.getJSON('<?=$this->url(array('controller'=>'dashboard','action'=>'usersearch','idClient'=>$this->idClient))?>', { q: request.term },
|
||||
function(data) { response(data); }
|
||||
);
|
||||
},
|
||||
select: function (event, ui) {
|
||||
var href = '<?=$this->url(array('controller'=>'dashboard','action'=>'user','op'=>'edit','idClient'=>$this->idClient))?>/login/'+ui.item.value;
|
||||
document.location.href=href;
|
||||
}
|
||||
});
|
||||
|
||||
$('select[name=service]').change(function(e){
|
||||
e.preventDefault();
|
||||
document.location.href='<?=$this->url(array('controller'=>'dashboard','action'=>'users','idClient'=>$this->idClient),null,true)?>/service/'+$(this).val();
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
<div id="center">
|
||||
<h1>GESTION DES CLIENTS</h1>
|
||||
<div class="paragraph">
|
||||
Recherche de login <input type="text" name="searchLogin"/>
|
||||
<a href="<?=$this->url(array('controller'=>'dashboard','action'=>'user','op' =>'new'))?>">
|
||||
Créer un profil utilisateur</a>
|
||||
</div>
|
||||
<h2>Services</h2>
|
||||
<div class="paragraph">
|
||||
<select name="service">
|
||||
<option value="">Afficher tout</option>
|
||||
<option value="DEFAULT"<?php if ('DEFAULT'==$this->service) echo ' selected';?>>Default</option>
|
||||
<?php foreach($this->services as $service) {?>
|
||||
<?php $select = ''; if ($service->code==$this->service) $select = ' selected';?>
|
||||
<option value="<?=$service->code?>"<?=$select?>><?=$service->label?> (<?=$service->code?>)</option>
|
||||
<?php }?>
|
||||
</select>
|
||||
<a href="<?=$this->url(array('controller'=>'dashboard','action'=>'service','idClient'=>$this->idClient),null,true)?>">
|
||||
Editer le service</a>
|
||||
| <a href="<?=$this->url(array('controller'=>'dashboard','action'=>'service','idClient'=>$this->idClient),null,true)?>">
|
||||
Créer un service</a>
|
||||
</div>
|
||||
|
||||
<h2>Liste des profils utilisateurs</h2>
|
||||
<div class="paragraph">
|
||||
<table id="utilisateur">
|
||||
<?php if (isset($message) && $message != '') {?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td colspan="5" class="StyleInfoData" align="center">
|
||||
<h3><?=$message?></h3>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr class="border titre">
|
||||
<td class="StyleInfoLib">Login</td>
|
||||
<td class="StyleInfoLib">Actions</td>
|
||||
<td class="StyleInfoLib">Actif</td>
|
||||
<td class="StyleInfoLib">Informations</td>
|
||||
<td class="StyleInfoLib">Référence</td>
|
||||
</tr>
|
||||
<?php
|
||||
if (count($this->utilisateurs)>0) {
|
||||
foreach ($this->utilisateurs as $uti) {
|
||||
$lienParams = ' login="'.$uti->login.'"';
|
||||
?>
|
||||
<tr class="border">
|
||||
<td class="StyleInfoData"><?=$uti->login;?></td>
|
||||
<td align="center" valign="middle">
|
||||
<a href="<?=$this->url(array(
|
||||
'controller' => 'dashboard',
|
||||
'action' => 'user',
|
||||
'op' => 'edit',
|
||||
'login' => $uti->login,
|
||||
))?>" class="edit">
|
||||
<img src="/themes/default/images/interfaces/edit0.gif" title="Editer le profil utilisateur" width="16" height="16"/>
|
||||
</a>
|
||||
<a href="<?=$this->url(array(
|
||||
'controller' => 'dashboard',
|
||||
'action' => 'user',
|
||||
'op' => 'delete',
|
||||
'login' => $uti->login,
|
||||
'idUti' => $uti->idUti,
|
||||
))?>" class="delete" title="Supprimer l'utilisateur <?=$uti->login?>">
|
||||
<img src="/themes/default/images/interfaces/delete.gif" title="Supprimer le profil utilisateur" width="11" height="11"/>
|
||||
</a>
|
||||
</td>
|
||||
<td class="StyleInfoData">
|
||||
<?php
|
||||
if ($uti->actif == 1) {
|
||||
?>
|
||||
<a href="<?=$this->url(array(
|
||||
'controller' => 'dashboard',
|
||||
'action' => 'user',
|
||||
'op' => 'disable',
|
||||
'login' => $uti->login,
|
||||
'idUti' => $uti->idUti,
|
||||
))?>" class="disable" title="Désactiver le profil utilisateur <?=$uti->login?>">
|
||||
<u><font color="green">Oui</font></u>
|
||||
</a>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<a href="<?=$this->url(array(
|
||||
'controller' => 'dashboard',
|
||||
'action' => 'user',
|
||||
'op' => 'enable',
|
||||
'login' => $uti->login,
|
||||
'idUti' => $uti->idUti,
|
||||
))?>" class="enable" title="Activer le profil utilisateur <?=$uti->login?>">
|
||||
<u><font color="red">Non</font></u>
|
||||
</a>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td class="StyleInfoData">
|
||||
<?=$uti->nom.' '.$uti->prenom?><br/>
|
||||
<a href="mailto:<?=$uti->email?>">
|
||||
<?=str_replace(array(';',','), array('<br/>', '<br/>'), $uti->email);?>
|
||||
</a>
|
||||
</td>
|
||||
<td class="StyleInfoData"><?=$uti->reference?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
@ -1 +0,0 @@
|
||||
<?=json_encode($this->output)?>
|
@ -1,16 +0,0 @@
|
||||
<?php $i = 0;?>
|
||||
<div id="inDebug">
|
||||
<div id="debug" style="margin-bottom:2px;">
|
||||
<b><?php echo $this->resultat->RegisteredName;?></b>
|
||||
</div>
|
||||
<?php foreach($this->menu as $menu):?>
|
||||
<div <?php ($i > 0)?'style="margin-left:2px;"':null; ?> id="debug_menu"><center><?php echo $menu;?></center></div>
|
||||
<?php $i++;?>
|
||||
<?php endforeach;?>
|
||||
<div style="float:left" id="debug">
|
||||
<center><b>Objet</b></center>
|
||||
<div id="objet0" style="display:none"><?php echo htmlentities($this->requestXML);?></div>
|
||||
<div id="objet1" style="display:none"><pre><?php print_r($this->resultat);?></pre></div>
|
||||
<div id="objet2"><pre><?php print_r($this->resultat);?></pre></div>
|
||||
</div>
|
||||
</div>
|
@ -1,69 +0,0 @@
|
||||
<div id="center">
|
||||
<h1>DIRIGEANTS</h1>
|
||||
<div class="paragraph">
|
||||
<table class="identite">
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Numéro identifiant Siren</td>
|
||||
<td width="350" class="StyleInfoData"><?=$this->SirenTexte($this->siren)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Raison Sociale</td>
|
||||
<td width="350" class="StyleInfoData"><?=$this->raisonSociale?></td>
|
||||
</tr>
|
||||
<?php if ($this->surveillance) {?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td colspan="2" width="550" class="StyleInfoData">
|
||||
<?=$this->action('infos','surveillance', null, array(
|
||||
'source' => 'dirigeants',
|
||||
'siret' => $this->siret
|
||||
))?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php }?>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h2>Historique des dirigeants</h2>
|
||||
<div class="paragraph">
|
||||
|
||||
<?php if (count($this->dirigeants) > 0) {?>
|
||||
<style>
|
||||
table.data td { border:1px solid #ccc; padding:5px; }
|
||||
</style>
|
||||
<table class="data">
|
||||
<?php foreach ($this->dirigeants as $dir) {?>
|
||||
<tr>
|
||||
<td class="StyleInfoData" width="270"><?=$dir->Titre?></td>
|
||||
<td class="StyleInfoData" width="200"><?=$dir->Societe.' '.$dir->Nom.' '.$dir->Prenom?></td>
|
||||
<td class="StyleInfoData" width="200">
|
||||
<?php if ($dir->DateFct != '') { ?>
|
||||
Modification le
|
||||
<?php
|
||||
if (strpos($dir->DateFct, '/') != false) {
|
||||
echo $dir->DateFct.' ';
|
||||
} else {
|
||||
$wdate = new WDate();
|
||||
echo $wdate->dateT('Y-m-d', 'd/m/Y', $dir->DateFct);
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php }?>
|
||||
</table>
|
||||
<?php } else {?>
|
||||
<table>
|
||||
<tr>
|
||||
<td class="StyleInfoData" width="550">
|
||||
Aucune donnée n'est présente dans notre base
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php }?>
|
||||
</div>
|
||||
|
||||
<?=$this->render('cgu.phtml', $this->cgu)?>
|
||||
</div>
|
@ -1,113 +0,0 @@
|
||||
<?php if (empty($this->AutrePage)):?>
|
||||
<div id="center">
|
||||
<?php endif;?>
|
||||
|
||||
<?php if (empty($this->AutrePage)):?>
|
||||
<h1>DIRIGEANTS</h1>
|
||||
<div class="paragraph">
|
||||
<table class="identite">
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Numéro identifiant Siren</td>
|
||||
<td width="350" class="StyleInfoData"><?=$this->SirenTexte($this->siren)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Raison Sociale</td>
|
||||
<td width="350" class="StyleInfoData"><?=$this->raisonSociale?></td>
|
||||
</tr>
|
||||
<?php if ($this->surveillance) {?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td colspan="2" width="550" class="StyleInfoData">
|
||||
<?=$this->action('infos','surveillance', null, array(
|
||||
'source' => 'dirigeants',
|
||||
'siret' => $this->siret
|
||||
))?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php }?>
|
||||
<?php if( $this->dirigeantsop ){ ?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td colspan="2" width="550" class="StyleInfoData">
|
||||
<a href="<?=$this->dirigeantsop?>">Consulter la liste des dirigeants opérationnels</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</table>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
|
||||
<h2>Liste des dirigeants actifs</h2>
|
||||
<div class="paragraph">
|
||||
<?php if ( count($this->dirigeants)>0 ) { ?>
|
||||
<style>
|
||||
table.data td { border:1px solid #ccc; padding:5px; }
|
||||
</style>
|
||||
<table class="data">
|
||||
<?php foreach ($this->dirigeants as $dir) {?>
|
||||
<tr>
|
||||
<td class="StyleInfoData" width="200"><?=$dir->Titre?></td>
|
||||
<td class="StyleInfoData" width="320">
|
||||
<?php if ($dir->Societe != '') { ?>
|
||||
<a href="<?=$this->url(array('controller' => 'recherche', 'action' => 'liste', 'type' => 'ent','raisonSociale' => $dir->Societe), null, true)?>"
|
||||
title="Recherche à partir de la raison sociale">
|
||||
<?=$dir->Societe?>
|
||||
</a>
|
||||
<br/>
|
||||
<?php }?>
|
||||
<?php if ($dir->Nom != '') { ?>
|
||||
<a href="<?=$this->url(array(
|
||||
'controller' => 'recherche',
|
||||
'action' => 'liste',
|
||||
'type' => 'dir',
|
||||
'dirNom' => $dir->Nom,
|
||||
'dirPrenom' => $dir->Prenom,
|
||||
'dirNaissJJ' => substr($dir->NaissDate,0,2),
|
||||
'dirDateNaissMM' => substr($dir->NaissDate,3,2),
|
||||
'dirDateNaissAAAA' => substr($dir->NaissDate,6,4),
|
||||
'dirCpVille' => $dir->NaissVille,
|
||||
), null, true)?>" title="Recherche à partir du nom du dirigeant">
|
||||
<?=$dir->Nom.' '.$dir->Prenom?>
|
||||
</a>
|
||||
<?php
|
||||
if (trim($dir->NaissDate) != '' && trim($dir->NaissVille.' '.$dir->NaissDepPays) != '') { ?>
|
||||
<br/>né(e) le <?=$dir->NaissDate?> à <?=$dir->NaissVille?>
|
||||
<?php if (trim($dir->NaissDepPays) != '') { ?>
|
||||
(<?=$dir->NaissDepPays?>)
|
||||
<?php }
|
||||
} else if (trim($dir->NaissDate) != '') {
|
||||
?>
|
||||
né(e) le <?=$dir->NaissDate?>
|
||||
<?php
|
||||
} else if (trim($dir->NaissVille.' '.$dir->NaissDepPays) != '') {
|
||||
?>
|
||||
né(e) à <?=$dir->NaissVille?> (<?=$dir->NaissDepPays?>)
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<td class="StyleInfoData" width="100" valign="top">
|
||||
<?php if ($dir->Siren!='') {?>
|
||||
<a title="Consulter la fiche identité" href="<?=$this->url(array('controller'=>'identite', 'action'=>'fiche', 'siret'=>$dir->Siren))?>">
|
||||
<?=$this->SirenTexte($dir->Siren)?></a>
|
||||
<?php }?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</table>
|
||||
<?php } else { ?>
|
||||
<table>
|
||||
<tr>
|
||||
<td class="StyleInfoData" width="550">
|
||||
Aucune donnée n'est présente dans notre base
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<?php if (empty($this->AutrePage)):?>
|
||||
<?=$this->render('cgu.phtml', $this->cgu)?>
|
||||
</div>
|
||||
<?php endif;?>
|
@ -1,106 +0,0 @@
|
||||
<?php if (empty($this->AutrePage)):?>
|
||||
<div id="center">
|
||||
<?php endif;?>
|
||||
|
||||
<?php if (empty($this->AutrePage)):?>
|
||||
<h1>DIRIGEANTS OPÉRATIONNELS</h1>
|
||||
<div class="paragraph">
|
||||
<table class="identite">
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">
|
||||
Numéro identifiant Siren
|
||||
</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?=$this->SirenTexte($this->siren)?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Raison Sociale</td>
|
||||
<td width="350" class="StyleInfoData"><?=$this->raisonSociale?></td>
|
||||
</tr>
|
||||
<?php if ($this->surveillance) {?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td colspan="2" width="550" class="StyleInfoData">
|
||||
<?=$this->action('infos','surveillance', null, array(
|
||||
'source' => 'dirigeants',
|
||||
'siret' => $this->siret
|
||||
))?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php }?>
|
||||
</table>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
|
||||
<h2>Liste des dirigeants actifs</h2>
|
||||
<div class="paragraph">
|
||||
|
||||
<?php if ( count($this->dirigeants)>0 ) {?>
|
||||
<style>
|
||||
table.data td { border:1px solid #ccc; padding:5px; }
|
||||
</style>
|
||||
<table class="data">
|
||||
<?php foreach ($this->dirigeants as $dir) {?>
|
||||
<tr>
|
||||
<td class="StyleInfoData" width="120"><?=$dir->Titre?></td>
|
||||
<td class="StyleInfoData" width="200">
|
||||
<?php if ($dir->Societe != '') { ?>
|
||||
<a href="<?=$this->url(array(
|
||||
'controller' => 'recherche',
|
||||
'action' => 'liste',
|
||||
'type' => 'ent',
|
||||
'raisonSociale' => $dir->Societe
|
||||
), null, true)?>"
|
||||
title="Recherche à partir de la raison sociale">
|
||||
<?=$dir->Societe?>
|
||||
</a>
|
||||
|
||||
<?php }?>
|
||||
<?php if ($dir->Nom != '') { ?>
|
||||
<a href="<?=$this->url(array(
|
||||
'controller' => 'recherche',
|
||||
'action' => 'liste',
|
||||
'type' => 'dir',
|
||||
'dirNom' => $dir->Nom,
|
||||
'dirPrenom' => $dir->Prenom,
|
||||
), null, true)?>" title="Recherche à partir du nom du dirigeant">
|
||||
<?=$dir->Nom.' '.$dir->Prenom?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<td class="StyleInfoData" width="230">
|
||||
<?php if (trim($dir->NaissDate) != '' && trim($dir->NaissVille.' '.$dir->NaissDepPays) != '') { ?>
|
||||
né(e) le <?=$dir->NaissDate?> à <?=$dir->NaissVille?>
|
||||
<?php if (trim($dir->NaissDepPays) != '') { ?>
|
||||
(<?=$dir->NaissDepPays?>)
|
||||
<?php }
|
||||
} else if (trim($dir->NaissDate) != '') {
|
||||
?>
|
||||
né(e) le <?=$dir->NaissDate?>
|
||||
<?php
|
||||
} else if (trim($dir->NaissVille.' '.$dir->NaissDepPays) != '') {
|
||||
?>
|
||||
né(e) à <?=$dir->NaissVille?> (<?=$dir->NaissDepPays?>)
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</table>
|
||||
<?php } else { ?>
|
||||
<table>
|
||||
<tr>
|
||||
<td class="StyleInfoData" width="550">
|
||||
Aucune donnée n'est présente dans notre base
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<?php if (empty($this->AutrePage)):?>
|
||||
<?=$this->render('cgu.phtml', $this->cgu)?>
|
||||
</div>
|
||||
<?php endif;?>
|
@ -1,37 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Extranet - Erreur</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="center">
|
||||
<h1>Erreur</h1>
|
||||
<div class="paragraph">
|
||||
<b><?php echo $this->message ?></b>
|
||||
</div>
|
||||
|
||||
<?php if (isset($this->exception)): ?>
|
||||
<h2>Exception information:</h2>
|
||||
<div class="paragraph">
|
||||
<p>
|
||||
<b>Message:</b> <pre><?php echo $this->exception->getMessage() ?></pre>
|
||||
</p>
|
||||
</div>
|
||||
<br/>
|
||||
|
||||
<h2>Stack trace:</h2>
|
||||
<div class="paragraph">
|
||||
<pre><?php echo $this->exception->getTraceAsString() ?></pre>
|
||||
</div>
|
||||
<br/>
|
||||
|
||||
<h2>Request Parameters:</h2>
|
||||
<div class="paragraph">
|
||||
<pre><?php echo var_export($this->request->getParams(), true) ?></pre>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,12 +0,0 @@
|
||||
<div id="center">
|
||||
<h2>Erreur</h2>
|
||||
<div class="paragraph">
|
||||
<?php
|
||||
$message = 'Paramètres incorrectes!';
|
||||
?>
|
||||
<div style="padding:0.7em;" class="ui-state-error ui-corner-all">
|
||||
<p><span style="float: left; margin-right: 0.3em;" class="ui-icon ui-icon-alert"></span>
|
||||
<strong>Erreur :</strong> <?=$message?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,13 +0,0 @@
|
||||
<div id="center">
|
||||
<h2>Droits d'accès</h2>
|
||||
<div class="paragraph">
|
||||
<?php
|
||||
$message = 'Vous n\'avez pas les droits nécessaires pour afficher cette page.';
|
||||
?>
|
||||
<div style="padding:0.7em;" class="ui-state-error ui-corner-all">
|
||||
<p><span style="float: left; margin-right: 0.3em;" class="ui-icon ui-icon-alert"></span>
|
||||
<strong>Erreur :</strong> <?=$message?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,16 +0,0 @@
|
||||
<div id="center">
|
||||
<h2>Erreur</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
|
||||
<div style="padding:0.7em;" class="ui-state-error ui-corner-all">
|
||||
<p><span style="float: left; margin-right: 0.3em;" class="ui-icon ui-icon-alert"></span>
|
||||
Une erreur est survenue lors de votre requête...<br/>
|
||||
Un message à été envoyé à l'administrateur.<br/>
|
||||
Nous vous remercions de bien vouloir renouveler votre demande ultérieurement.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
@ -1,253 +0,0 @@
|
||||
<style>
|
||||
#center p { margin:5px; padding:5px;}
|
||||
.infoTitle {clear:both; float:left; width:250px; margin-left:30px; padding:0 10px 0 0;}
|
||||
.infoData {float:left; width:320px; margin:2px 0;}
|
||||
form { }
|
||||
form em { color:#FF0000;}
|
||||
fieldset {border:0; margin:0; padding:0;}
|
||||
fieldset legend{ padding:0 0 0 10px;}
|
||||
.fieldgrp{clear:both; width:100%; margin-bottom:.5em; overflow:hidden;}
|
||||
.fieldgrp:after{content:"."; display:block; clear:both; visibility:hidden; line-height:0; height:0; }
|
||||
.fieldgrp label{font-weight:bold; margin-left:30px; width:250px; clear:both; padding:0 10px 0 0;line-height:22px;_padding-top:3px; float:left; display:block; font-size:108%;}
|
||||
.fieldgrp label span{font-weight:normal;}
|
||||
.fieldgrp label abbr{color:#4B911C; font-size:120%; vertical-align:middle;}
|
||||
.field {width:320px; float:left; padding:0 10px 0 0; line-height:22px; _padding-top:3px;}
|
||||
.field .longfield{width:215px;}
|
||||
.field .longfield-select{width:220px;}
|
||||
.field .smallfield{width:95px;}
|
||||
.field .medfield{width:110px;}
|
||||
.field input, .field select{ font-size:110%; margin:2px 0; }
|
||||
.field input[type="radio"] { margin:0 5px 0 5px; }
|
||||
div.submit{ margin-left:200px; padding-left:0px; margin-top:1em; }
|
||||
div.submit p.submit-button{margin-top:0;}
|
||||
div.submit p.details{font-size:85%;color:#666;margin:0;}
|
||||
div.submit p.required-note{margin-top:1em;}
|
||||
div.submit p.required-note span{color:#4B911C;_color:#666;font-size:170%;vertical-align:top;}
|
||||
.noborder {border:none;}
|
||||
</style>
|
||||
|
||||
<div id="center">
|
||||
<h1 class="titre">Demande d'avis de credit personnalisé</h1>
|
||||
|
||||
<?php
|
||||
if($this->commande == false){
|
||||
?>
|
||||
|
||||
<div id="message"><?=$this->message;?></div>
|
||||
|
||||
<form action="<?=$this->url(array('controller'=>'evaluation', 'action'=>'aviscredit'))?>" method="post" enctype="multipart/form-data">
|
||||
|
||||
<h2>Entreprise concernée : </h2>
|
||||
|
||||
<div class="infoTitle StyleInfoLib">Numéro identifiant Siren</div>
|
||||
<div class="infoData">
|
||||
<?=$this->SirenTexte($this->Etab->Siren)?>
|
||||
<input type="hidden" name="InfoEnq[Siren]" value="<?=$this->Etab->Siren?>"/>
|
||||
</div>
|
||||
|
||||
<div class="infoTitle StyleInfoLib">Numéro identifiant Siret</div>
|
||||
<div class="infoData"><?=$this->SiretTexte($this->Etab->Siret)?></div>
|
||||
|
||||
<div class="infoTitle StyleInfoLib">Numéro de TVA Intracom.</div>
|
||||
<div class="infoData"><?=substr($this->Etab->TvaNumero,0,2).' '.substr($this->Etab->TvaNumero,2,2).' '.substr($this->Etab->TvaNumero,-9)?></div>
|
||||
|
||||
<div class="infoTitle StyleInfoLib">Raison Sociale</div>
|
||||
<div class="infoData"><?=$this->Etab->Nom?></div>
|
||||
|
||||
<div class="infoTitle StyleInfoLib">Adresse</div>
|
||||
<div class="infoData"><?=$this->Etab->Adresse.' '.$this->Etab->CP.' '.$this->Etab->Ville?></div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Téléphone <?php if (trim($this->Etab->Tel)==''){?><font color="Red">*</font><?php }?> / Fax</label>
|
||||
<div class="field">
|
||||
<?php if (trim($this->Etab->Tel)!=''){ print $this->Etab->Tel; }else{?><input type="text" name="InfoEnq[Entrep][Tel]" value="<?=$this->InfoEnq['Entrep']['Tel']?>"/><?php } ?> <b>/</b>
|
||||
<?php if (trim($this->Etab->Fax)!=''){ print $this->Etab->Fax; }else{?><input type="text" name="InfoEnq[Entrep][Fax]" value="<?=$this->InfoEnq['Entrep']['Fax']?>"/><?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if (trim($this->Etab->Tel)!=''){?>
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib"> Autre téléphone :</label>
|
||||
<div class="field"><input type="text" name="InfoEnq[Entrep][AutreTel]" value="<?=$this->InfoEnq['Entrep']['AutreTel'];?>"/> </div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">E-mail</label>
|
||||
<div class="field"><?php if (trim($this->Etab->Mail)!=''){ print $this->Etab->Mail; }else{?><input type="text" name="InfoEnq[Entrep][Mail]" value="<?=$this->InfoEnq['Entrep']['Mail']?>"/><?php }?></div>
|
||||
</div>
|
||||
|
||||
<?php if (trim($this->Etab->Mail)!=''){ ?>
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Autre e-mail</label>
|
||||
<div class="field"><input type="text" name="InfoEnq[Entrep][AutreMail]" value="<?=$this->InfoEnq['Entrep']['AutreMail']?>"/></div>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Site Web</label>
|
||||
<div class="field"><?php if (trim($this->Etab->Web)!=''){ print $this->Etab->Web; }else{?><input type="text" name="InfoEnq[Entrep][Web]" value="<?=$this->InfoEnq['Entrep']['Web']?>"/><?php }?></div>
|
||||
</div>
|
||||
|
||||
<h2>Demandeur : </h2>
|
||||
|
||||
<input type="hidden" name="login" value="<?=$this->user->getLogin()?>" />
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Votre Identité</label>
|
||||
<div class="field"><input type="text" name="InfoUser[Identite]" value="<?=$this->user->getNom().' '.$this->user->getPrenom(); ?>"/></div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Votre Téléphone <font color="Red"></font>:</label>
|
||||
<div class="field"><input type="text" name="InfoUser[Tel]" value="<?php
|
||||
if(isset($this->InfoUser['Tel'])){echo $this->InfoUser['Tel'];}
|
||||
else echo $this->user->getTel(); ?>" /></div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Votre E-mail <font color="Red">*</font></label>
|
||||
<div class="field"><input type="text" name="InfoUser[Email]" value="<?php
|
||||
if(isset($this->InfoUser['Email'])){echo $this->InfoUser['Email'];}
|
||||
else echo $this->user->getEmail(); ?>"/></div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Votre Référence</label>
|
||||
<div class="field"><input type="text" name="InfoUser[Ref]" value="<?php
|
||||
if(isset($this->InfoUser['Ref'])){echo $this->InfoUser['Ref'];}
|
||||
?>"/></div>
|
||||
</div>
|
||||
|
||||
<h2>La relation commerciale : </h2>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Précisions sur la demande</label>
|
||||
<div class="field">
|
||||
<select id="precision" name="InfoEnq[PrecisionsChoix]">
|
||||
<option value="">Choisissez...</option>
|
||||
<option value="Sur un client" <?php if($this->InfoEnq['PrecisionsChoix']=='Sur un client'){print 'selected="selected"';};?>>Sur un client</option>
|
||||
<option value="Sur un prospect" <?php if($this->InfoEnq['PrecisionsChoix']=='Sur un prospect'){print 'selected="selected"';};?>>Sur un prospect</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Ancienneté de la relation :</label>
|
||||
<div class="field">
|
||||
<input type="text" name="InfoEnq[Anciennete]" size="2" value="<?=$this->InfoEnq['Anciennete']?>"/>
|
||||
<input class="noborder" type="radio" name="InfoEnq[AncienneteDuree]" value="Mois" <?php if($this->InfoEnq['AncienneteDuree']=='Mois'){ print 'checked="checked"';}?>/>Mois
|
||||
<input class="noborder" type="radio" name="InfoEnq[AncienneteDuree]" value="Annees" <?php if($this->InfoEnq['AncienneteDuree']=='Annees'){ print 'checked="checked"';}?>/>Années
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Impayées :</label>
|
||||
<div class="field">
|
||||
<input class="noborder" type="radio" name="InfoEnq[ImpayeesChoix]" value="oui" <?php if($this->InfoEnq['ImpayeesChoix']=='oui'){ print 'checked="checked"';}?>/>Oui
|
||||
<input class="noborder" type="radio" name="InfoEnq[ImpayeesChoix]" value="non" <?php if($this->InfoEnq['ImpayeesChoix']=='non'){ print 'checked="checked"';}?>/>Non
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="impayees">
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Montant :</label>
|
||||
<div class="field"><input type="text" name="InfoEnq[Impayees][Montant]" value="<?=$this->InfoEnq['Impayees']['Montant']?>"/> €</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Nombre :</label>
|
||||
<div class="field"><input type="text" name="InfoEnq[Impayees][Nombre]" value="<?=$this->InfoEnq['Impayees']['Nombre']?>"/></div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Date :</label>
|
||||
<div class="field"><input type="text" name="InfoEnq[Impayees][Date]" value="<?=$this->InfoEnq['Impayees']['Date']?>"/> (Format : JJ/MM/AAAA)</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Retard de paiement :</label>
|
||||
<div class="field">
|
||||
<input class="noborder" type="radio" name="InfoEnq[RetardPaiementChoix]" value="oui" <?php if($this->InfoEnq['RetardPaiementChoix']=='oui'){ print 'checked="checked"';}?>/>Oui
|
||||
<input class="noborder" type="radio" name="InfoEnq[RetardPaiementChoix]" value="non" <?php if($this->InfoEnq['RetardPaiementChoix']=='non'){ print 'checked="checked"';}?>/>Non
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="retardpaiement">
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Montant :</label>
|
||||
<div class="field"><input type="text" name="InfoEnq[RetardPaiement][Montant]" value="<?=$this->InfoEnq['RetardPaiement']['Montant']?>"/> €</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Nombre :</label>
|
||||
<div class="field"><input type="text" name="InfoEnq[RetardPaiement][Nombre]" value="<?=$this->InfoEnq['RetardPaiement']['Nombre']?>"/></div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Date :</label>
|
||||
<div class="field"><input type="text" name="InfoEnq[RetardPaiement][Date]" value="<?=$this->InfoEnq['RetardPaiement']['Date']?>"/> (Format : JJ/MM/AAAA)</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Litiges techniques ou commerciaux :</label>
|
||||
<div class="field">
|
||||
<input class="noborder" type="radio" name="InfoEnq[LitigeChoix]" value="oui" <?php if($this->InfoEnq['LitigeChoix']=='oui'){ print 'checked="checked"';}?>/>Oui
|
||||
<input class="noborder" type="radio" name="InfoEnq[LitigeChoix]" value="non" <?php if($this->InfoEnq['LitigeChoix']=='non'){ print 'checked="checked"';}?>/>Non
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="litige">
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Précisions :</label>
|
||||
<div class="field">
|
||||
<textarea name="InfoEnq[Litige][Precisions]"><?=$this->InfoEnq['Litige']['Precisions']?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Observations ou questions spéciales</label>
|
||||
<div class="field"><textarea name="InfoEnq[Observation]"><?=$this->InfoEnq['Observation']; ?></textarea></div>
|
||||
</div>
|
||||
|
||||
<h2>Votre demande : </h2>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Encours Réel</label>
|
||||
<div class="field"><input type="text" name="InfoEnq[EncoursReel]" value="<?=$this->InfoEnq['EncoursReel']?>"/> €</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Encours demandé</label>
|
||||
<div class="field"><input type="text" name="InfoEnq[EncoursDemande]" value="<?=$this->InfoEnq['EncoursDemande']?>"/> €</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="submit"><p class="submit-button"><input type="submit" name="submit" value="Envoyer" /></p></div>
|
||||
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
|
||||
if($this->commande == true)
|
||||
{
|
||||
?>
|
||||
<p>Votre demande à été prise en compte pour le siren <b><?=$this->siren?></b>.</p>
|
||||
<p><a href="<?=$this->url(array('controller'=>'identite', 'action'=>'fichier', 'siret'=>$this->siren), null, true)?>">
|
||||
Retour à la fiche identite
|
||||
</a></p>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
@ -1,68 +0,0 @@
|
||||
<div align="center" style="height:305px;<?=$this->background;?>">
|
||||
<div id="remove">
|
||||
<form name="uploadForm" id="uploadForm" method="post" action="<?=$this->url(array(
|
||||
'controller'=>'evaluation',
|
||||
'action'=>'customindiscore3',
|
||||
'siret'=>$this->siret,
|
||||
'id'=>$this->id))?>">
|
||||
<table style="margin-top:30px">
|
||||
<tr>
|
||||
<td><b>Coordonnées adresse</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<?php foreach($this->adresse as $item){?>
|
||||
<input style="width:377px" type="text" name="adresse[]" value="<?=$item?>"/><br/>
|
||||
<?php }?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top"><b>Nom de la société</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="text" name="societe_name" value="Nom de la société." /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Logo en fond ecran : </b><input type="checkbox" name="logo_background" value="true" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Logo à :</b> Gauche <input checked="checked" type="radio" name="image" value="left"/> Droite<input value="right" type="radio" name="image" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>couleur des grands titres</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Fond : <input value="<?=$this->color1;?>" type="text" name="couleurh1" /> Texte <input value="black" type="text" name="texth1" /> ex : black</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>couleur des sous titres</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Fond : <input value="<?=$this->color1;?>" type="text" name="couleurh2" /> Texte <input value="black" type="text" name="texth2" /> ex : black</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><input type="submit" name="upload" value="Envoyer" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript" src="/libs/form/jquery.form.js">
|
||||
</script type="text/javascript">
|
||||
<script>
|
||||
$('#uploadForm').ajaxForm({
|
||||
beforeSubmit: function() {
|
||||
$('#remove').html('<b style="color:green">Votre document est en cours de chargement...</b>');
|
||||
},
|
||||
success: function(data) {
|
||||
$('#remove').html(data);
|
||||
}
|
||||
});
|
||||
$('#dialogcustomrapport').dialog({ buttons: [ {
|
||||
text: "Quitter",
|
||||
click: function() { $(this).dialog("close"); }
|
||||
} ] });
|
||||
</script>
|
||||
</div>
|
@ -1,366 +0,0 @@
|
||||
<style>
|
||||
#center p { margin:5px; padding:5px;}
|
||||
.infoTitle {clear:both; float:left; width:180px; margin-left:30px; padding:0 10px 0 0;}
|
||||
.infoData {float:left; width:320px; margin:2px 0;}
|
||||
form { }
|
||||
form em { color:#FF0000;}
|
||||
fieldset {border:0; margin:0; padding:0;}
|
||||
fieldset legend{ padding:0 0 0 10px;}
|
||||
.fieldgrp{clear:both; width:100%; margin-bottom:.5em; overflow:hidden;}
|
||||
.fieldgrp:after{content:"."; display:block; clear:both; visibility:hidden; line-height:0; height:0; }
|
||||
.fieldgrp label{font-weight:bold; margin-left:30px; width:180px; clear:both; padding:0 10px 0 0;line-height:22px;_padding-top:3px; float:left; display:block; font-size:108%;}
|
||||
.fieldgrp label span{font-weight:normal;}
|
||||
.fieldgrp label abbr{color:#4B911C; font-size:120%; vertical-align:middle;}
|
||||
.field {width:320px; float:left; padding:0 10px 0 0; line-height:22px; _padding-top:3px;}
|
||||
.field .longfield{width:215px;}
|
||||
.field .longfield-select{width:220px;}
|
||||
.field .smallfield{width:95px;}
|
||||
.field .medfield{width:110px;}
|
||||
.field input, .field select{ font-size:110%; margin:2px 0; }
|
||||
.field input[type="radio"] { margin:0 5px 0 5px; }
|
||||
div.submit{ margin-left:200px; padding-left:0px; margin-top:1em; }
|
||||
div.submit p.submit-button{margin-top:0;}
|
||||
div.submit p.details{font-size:85%;color:#666;margin:0;}
|
||||
div.submit p.required-note{margin-top:1em;}
|
||||
div.submit p.required-note span{color:#4B911C;_color:#666;font-size:170%;vertical-align:top;}
|
||||
.noborder {border:none;}
|
||||
<?php if(isset($this->InfoUser['Profil']) && $this->InfoUser['Profil']=='Autre'){ ?> #autreProfil {display:block;}<?php }else{?> #autreProfil {display:none;} <?php }?>
|
||||
<?php if(isset($this->InfoEnq['PrecisionsChoix']) && $this->InfoEnq['PrecisionsChoix']=='5'){ ?> #autrePrecisions {display:block;} <?php }else{ ?> #autrePrecisions {display:none;} <?php }?>
|
||||
<?php if(isset($this->InfoEnq['PrecisionsChoix']) && ($this->InfoEnq['PrecisionsChoix']=='3' || $this->InfoEnq['PrecisionsChoix']=='4')){ ?> #fournisseur {display:block;} <?php }else{ ?> #fournisseur {display:none;} <?php }?>
|
||||
<?php if(isset($this->InfoEnq['PrecisionsChoix']) && $this->InfoEnq['PrecisionsChoix']=='1'){ ?> #credit {display:block;} <?php }else{ ?> #credit {display:none;} <?php }?>
|
||||
<?php if(isset($this->InfoEnq['ImpayeesChoix']) && $this->InfoEnq['ImpayeesChoix']=='oui'){ ?> #impayees {display:block;}<?php }else{?> #impayees {display:none;} <?php }?>
|
||||
<?php if(isset($this->InfoEnq['ImpayeesChoix']) && $this->InfoEnq['ImpayeesChoix']=='oui'){ ?> #retardpaiement {display:block;}<?php }else{?> #retardpaiement {display:none;} <?php }?>
|
||||
<?php if(isset($this->InfoEnq['LitigeChoix']) && $this->InfoEnq['LitigeChoix']=='oui'){ ?> #litige {display:block;}<?php }else{?> #litige {display:none;} <?php }?>
|
||||
</style>
|
||||
|
||||
<div id="center">
|
||||
<h1 class="titre">ENQUÊTE COMMERCIALE</h1>
|
||||
|
||||
<?php
|
||||
if($this->commandeEnquete == false){
|
||||
?>
|
||||
|
||||
<p class="StyleInfoLib">Nos enquêtes commerciales sont réalisées par des analystes financiers.</p>
|
||||
|
||||
<div id="message"><?=$this->message;?></div>
|
||||
|
||||
<form action="<?=$this->url(array('controller'=>'evaluation', 'action'=>'enquetec'))?>" method="post" enctype="multipart/form-data">
|
||||
<input name="pays" value="<?=$pays?>" type="hidden"/>
|
||||
|
||||
<h2>Entreprise concernée : </h2>
|
||||
|
||||
<div class="infoTitle StyleInfoLib">Numéro identifiant Siren</div>
|
||||
<div class="infoData">
|
||||
<?=$this->SirenTexte($this->Etab->Siren)?>
|
||||
<input type="hidden" name="InfoEnq[Siren]" value="<?=$this->Etab->Siren?>"/>
|
||||
</div>
|
||||
|
||||
<div class="infoTitle StyleInfoLib">Numéro identifiant Siret</div>
|
||||
<div class="infoData"><?=$this->SiretTexte($this->Etab->Siret)?></div>
|
||||
|
||||
<div class="infoTitle StyleInfoLib">Numéro de TVA Intracom.</div>
|
||||
<div class="infoData"><?=substr($this->Etab->TvaNumero,0,2).' '.substr($this->Etab->TvaNumero,2,2).' '.substr($this->Etab->TvaNumero,-9)?></div>
|
||||
|
||||
<div class="infoTitle StyleInfoLib">Raison Sociale</div>
|
||||
<div class="infoData"><?=$this->Etab->Nom?></div>
|
||||
|
||||
<div class="infoTitle StyleInfoLib">Adresse</div>
|
||||
<div class="infoData"><?=$this->Etab->Adresse.' '.$this->Etab->CP.' '.$this->Etab->Ville?></div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Téléphone <?php if (trim($this->Etab->Tel)==''){?><font color="Red">*</font><?php }?> / Fax</label>
|
||||
<div class="field">
|
||||
<?php if (trim($this->Etab->Tel)!=''){ print $this->Etab->Tel; }else{?><input type="text" name="InfoEnq[Entrep][Tel]" value="<?=$this->InfoEnq['Entrep']['Tel']?>"/><?php } ?> <b>/</b>
|
||||
<?php if (trim($this->Etab->Fax)!=''){ print $this->Etab->Fax; }else{?><input type="text" name="InfoEnq[Entrep][Fax]" value="<?=$this->InfoEnq['Entrep']['Fax']?>"/><?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if (trim($this->Etab->Tel)!=''){?>
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib"> Autre téléphone :</label>
|
||||
<div class="field"><input type="text" name="InfoEnq[Entrep][AutreTel]" value="<?=$this->InfoEnq['Entrep']['AutreTel'];?>"/> </div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">E-mail</label>
|
||||
<div class="field"><?php if (trim($this->Etab->Mail)!=''){ print $this->Etab->Mail; }else{?><input type="text" name="InfoEnq[Entrep][Mail]" value="<?=$this->InfoEnq['Entrep']['Mail']?>"/><?php }?></div>
|
||||
</div>
|
||||
|
||||
<?php if (trim($this->Etab->Mail)!=''){ ?>
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Autre e-mail</label>
|
||||
<div class="field"><input type="text" name="InfoEnq[Entrep][AutreMail]" value="<?=$this->InfoEnq['Entrep']['AutreMail']?>"/></div>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Site Web</label>
|
||||
<div class="field"><?php if (trim($this->Etab->Web)!=''){ print $this->Etab->Web; }else{?><input type="text" name="InfoEnq[Entrep][Web]" value="<?=$this->InfoEnq['Entrep']['Web']?>"/><?php }?></div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Domiciliation bancaire</label>
|
||||
<div class="field">
|
||||
<input type="text" name="InfoEnq[Entrep][Rib][Banque]" maxlength="5" size="5" value="<?=$this->InfoEnq['Entrep']['Rib']['Banque']?>"/>
|
||||
<input type="text" name="InfoEnq[Entrep][Rib][Guichet]" maxlength="5" size="5" value="<?=$this->InfoEnq['Entrep']['Rib']['Guichet']?>"/>
|
||||
<input type="text" name="InfoEnq[Entrep][Rib][Compte]" maxlength="11" size="11" value="<?=$this->InfoEnq['Entrep']['Rib']['Compte']?>"/>
|
||||
<input type="text" name="InfoEnq[Entrep][Rib][Cle]" maxlength="2" size="2" value="<?=$this->InfoEnq['Entrep']['Rib']['Cle']?>"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Encours demandé</label>
|
||||
<div class="field"><input type="text" name="InfoEnq[Encours]" value="<?=$this->InfoEnq['Encours']?>"/> €</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Nombre d'échéances</label>
|
||||
<div class="field"><input type="text" name="InfoEnq[NbEcheances]" value="<?=$this->InfoEnq['NbEcheances']?>"/></div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Avis de l'assureur crédit</label>
|
||||
<div class="field">
|
||||
<select name="InfoEnq[AvisAssureur]">
|
||||
<option value="-" <?php if($this->InfoEnq['AvisAssureur']=='-'){ print 'checked="check"';} ?>>-</option>
|
||||
<option value="Favorable" <?php if($this->InfoEnq['AvisAssureur']=='Favorable'){ print 'checked="check"';} ?>>Favorable</option>
|
||||
<option value="Défavorable" <?php if($this->InfoEnq['AvisAssureur']=='Défavorable'){ print 'checked="check"';} ?>>Défavorable</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2>Demandeur : </h2>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Votre profil <font color="Red">*</font></label>
|
||||
<div class="field">
|
||||
<select id="profil" name="InfoUser[Profil]">
|
||||
<option value="Achats" <?php if($this->InfoUser['Profil']=='Achats'){print 'selected="selected"';};?>>Service Achats</option>
|
||||
<option value="Commerce" <?php if($this->InfoUser['Profil']=='Commerce'){print 'selected="selected"';};?>>Commerce</option>
|
||||
<option value="Recouvrement" <?php if($this->InfoUser['Profil']=='Recouvrement'){print 'selected="selected"';};?>>Recouvrement</option>
|
||||
<option value="Contentieux" <?php if($this->InfoUser['Profil']=='Contentieux'){print 'selected="selected"';};?>>Contentieux</option>
|
||||
<option value="Autre" <?php if($this->InfoUser['Profil']=='Autre'){print 'selected="selected"';};?>>Autre</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="autreProfil" class="fieldgrp">
|
||||
<label class="StyleInfoLib">Précisez</label>
|
||||
<div class="field"><input type="text" name="InfoUser[ProfilAutre]" value="<?=$this->InfoUser['ProfilAutre']?>" /></div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Votre Identité</label>
|
||||
<div class="field"><input type="text" name="InfoUser[Identite]" value="<?php echo $this->user->getNom().' '.$this->user->getPrenom(); ?>"/></div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Votre Téléphone <font color="Red"></font>:</label>
|
||||
<div class="field"><input type="text" name="InfoUser[Tel]" value="<?php
|
||||
if(isset($this->InfoUser['Tel'])){echo $this->InfoUser['Tel'];}
|
||||
else echo $this->user->getTel(); ?>" /></div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Votre Fax</label>
|
||||
<div class="field"><input type="text" name="InfoUser[Fax]" value="<?php
|
||||
if(isset($this->InfoUser['Fax'])){echo $this->InfoUser['Fax'];}
|
||||
else echo $this->user->getFax(); ?>"/></div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Votre E-mail <font color="Red">*</font></label>
|
||||
<div class="field"><input type="text" name="InfoUser[Email]" value="<?php
|
||||
if(isset($this->InfoUser['Email'])){echo $this->InfoUser['Email'];}
|
||||
else echo $this->user->getEmail(); ?>"/></div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Votre Référence</label>
|
||||
<div class="field"><input type="text" name="InfoUser[Ref]" value="<?php
|
||||
if(isset($this->InfoUser['Ref'])){echo $this->InfoUser['Ref'];}
|
||||
?>"/></div>
|
||||
</div>
|
||||
|
||||
<h2>Enquête : </h2>
|
||||
|
||||
<?php
|
||||
if( $pays=='' )
|
||||
{
|
||||
?>
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Type d'enquête</label>
|
||||
<div class="field">
|
||||
<input class="noborder" type="radio" id="premier" name="InfoEnq[Type]" value="premier" <?php if($this->InfoEnq['Type']=='premier'){print 'checked="checked"';};?>>EXPRESS ( encours inférieur à 20K€ )
|
||||
<br/>
|
||||
<input class="noborder" type="radio" id="gold" name="InfoEnq[Type]" value="gold" <?php if($this->InfoEnq['Type']=='gold'){print 'checked="checked"';};?>>DECISION ( encours supérieur à 20K€ )
|
||||
<br/>
|
||||
<input class="noborder" type="radio" id="btp" name="InfoEnq[Type]" value="btp" <?php if($this->InfoEnq['Type']=='btp'){print 'checked="checked"';};?>>SECTEUR BTP
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
if( isset($pays) && $pays!='' )
|
||||
{
|
||||
?>
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Délais de livraison</label>
|
||||
<div class="field">
|
||||
<input class="noborder" type="radio" name="InfoEnq[Delai]" value="normal" <?php if($this->InfoEnq['Delai']=='normal'){print 'checked="checked"';};?>>Normal
|
||||
<input class="noborder" type="radio" name="InfoEnq[Delai]" value="urgent" <?php if($this->InfoEnq['Delai']=='urgent'){print 'checked="checked"';};?>>Urgent
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}else{
|
||||
?>
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Délais de livraison</label>
|
||||
<div class="field">
|
||||
<input class="noborder" type="radio" name="InfoEnq[Delai]" value="1" <?php if($this->InfoEnq['Delai']=='1'){print 'checked="checked"';};?>>24 h
|
||||
<input class="noborder" type="radio" name="InfoEnq[Delai]" value="2" <?php if($this->InfoEnq['Delai']=='2'){print 'checked="checked"';};?>>72 h
|
||||
<input class="noborder" type="radio" name="InfoEnq[Delai]" value="5" <?php if($this->InfoEnq['Delai']=='5'){print 'checked="checked"';};?>>5 jours ou +
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Précisions sur la demande</label>
|
||||
<div class="field">
|
||||
<select id="precision" name="InfoEnq[PrecisionsChoix]">
|
||||
<option value="">Choisissez...</option>
|
||||
<option value="1" <?php if($this->InfoEnq['PrecisionsChoix']=='1'){print 'selected="selected"';};?>>Enquête sur un client (contrôle crédit)</option>
|
||||
<option value="2" <?php if($this->InfoEnq['PrecisionsChoix']=='2'){print 'selected="selected"';};?>>Enquête sur un prospect (ouverture de compte)</option>
|
||||
<option value="3" <?php if($this->InfoEnq['PrecisionsChoix']=='3'){print 'selected="selected"';};?>>Enquête sur un fournisseur stratégique</option>
|
||||
<option value="4" <?php if($this->InfoEnq['PrecisionsChoix']=='4'){print 'selected="selected"';};?>>Enquête sur un fournisseur non stratégique</option>
|
||||
<option value="5" <?php if($this->InfoEnq['PrecisionsChoix']=='5'){print 'selected="selected"';};?>>Autre type d'enquête (Précisez...)</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="fournisseur" class="fieldgrp">
|
||||
<label class="StyleInfoLib">CA réalisé avec le fournisseur</label>
|
||||
<div class="field"><input type="text" name="InfoEnq[Precisions][MontantCA]" value="<?=$this->InfoEnq['Precisions']['MontantCA']?>" /> €</div>
|
||||
</div>
|
||||
|
||||
<div id="credit" class="fieldgrp">
|
||||
<label class="StyleInfoLib">Motif du contrôle</label>
|
||||
<div class="field"><textarea name="InfoEnq[Precisions][Motif]"><?=$this->InfoEnq['Precisions']['Motif']?></textarea></div>
|
||||
</div>
|
||||
|
||||
<div id="autrePrecisions" class="fieldgrp">
|
||||
<label class="StyleInfoLib">Précisez</label>
|
||||
<div class="field"><textarea name="InfoEnq[Precisions][Autre]"><?=$this->InfoEnq['Precisions']['Autre']?></textarea></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Ancienneté de la relation :</label>
|
||||
<div class="field">
|
||||
<input type="text" name="InfoEnq[Anciennete]" size="2" value="<?=$this->InfoEnq['Anciennete']?>"/>
|
||||
<input class="noborder" type="radio" name="InfoEnq[AncienneteDuree]" value="Mois" <?php if($this->InfoEnq['AncienneteDuree']=='Mois'){ print 'checked="checked"';}?>/>Mois
|
||||
<input class="noborder" type="radio" name="InfoEnq[AncienneteDuree]" value="Annees" <?php if($this->InfoEnq['AncienneteDuree']=='Annees'){ print 'checked="checked"';}?>/>Années
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Impayées :</label>
|
||||
<div class="field">
|
||||
<input class="noborder" type="radio" name="InfoEnq[ImpayeesChoix]" value="oui" <?php if($this->InfoEnq['ImpayeesChoix']=='oui'){ print 'checked="checked"';}?>/>Oui
|
||||
<input class="noborder" type="radio" name="InfoEnq[ImpayeesChoix]" value="non" <?php if($this->InfoEnq['ImpayeesChoix']=='non'){ print 'checked="checked"';}?>/>Non
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="impayees">
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Montant :</label>
|
||||
<div class="field"><input type="text" name="InfoEnq[Impayees][Montant]" value="<?=$this->InfoEnq['Impayees']['Montant']?>"/> €</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Nombre :</label>
|
||||
<div class="field"><input type="text" name="InfoEnq[Impayees][Nombre]" value="<?=$this->InfoEnq['Impayees']['Nombre']?>"/></div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Date :</label>
|
||||
<div class="field"><input type="text" name="InfoEnq[Impayees][Date]" value="<?=$this->InfoEnq['Impayees']['Date']?>"/> (Format : JJ/MM/AAAA)</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Retard de paiement :</label>
|
||||
<div class="field">
|
||||
<input class="noborder" type="radio" name="InfoEnq[RetardPaiementChoix]" value="oui" <?php if($this->InfoEnq['RetardPaiementChoix']=='oui'){ print 'checked="checked"';}?>/>Oui
|
||||
<input class="noborder" type="radio" name="InfoEnq[RetardPaiementChoix]" value="non" <?php if($this->InfoEnq['RetardPaiementChoix']=='non'){ print 'checked="checked"';}?>/>Non
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="retardpaiement">
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Montant :</label>
|
||||
<div class="field"><input type="text" name="InfoEnq[RetardPaiement][Montant]" value="<?=$this->InfoEnq['RetardPaiement']['Montant']?>"/> €</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Nombre :</label>
|
||||
<div class="field"><input type="text" name="InfoEnq[RetardPaiement][Nombre]" value="<?=$this->InfoEnq['RetardPaiement']['Nombre']?>"/></div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Date :</label>
|
||||
<div class="field"><input type="text" name="InfoEnq[RetardPaiement][Date]" value="<?=$this->InfoEnq['RetardPaiement']['Date']?>"/> (Format : JJ/MM/AAAA)</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Litiges techniques ou commerciaux :</label>
|
||||
<div class="field">
|
||||
<input class="noborder" type="radio" name="InfoEnq[LitigeChoix]" value="oui" <?php if($this->InfoEnq['LitigeChoix']=='oui'){ print 'checked="checked"';}?>/>Oui
|
||||
<input class="noborder" type="radio" name="InfoEnq[LitigeChoix]" value="non" <?php if($this->InfoEnq['LitigeChoix']=='non'){ print 'checked="checked"';}?>/>Non
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="litige">
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Précisions :</label>
|
||||
<div class="field">
|
||||
<textarea name="InfoEnq[Litige][Precisions]"><?=$this->InfoEnq['Litige']['Precisions']?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Observations ou questions spéciales</label>
|
||||
<div class="field"><textarea name="InfoEnq[Observation]"><?=$this->InfoEnq['Observation']; ?></textarea></div>
|
||||
</div>
|
||||
|
||||
<div class="submit"><p class="submit-button"><input type="submit" name="submit" value="Envoyer" /></p></div>
|
||||
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
|
||||
if($this->commandeEnquete == true)
|
||||
{
|
||||
?>
|
||||
<p>
|
||||
Votre demande à été prise en compte le <?=$this->jour.'/'.$this->mois.'/'.$this->annee?> à <?=$this->heure?> h <?=$this->minutes?> sous la référence <b><?=$this->ref?></b> pour le siren <b><?=$this->siren?></b>.
|
||||
</p>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
@ -1,285 +0,0 @@
|
||||
<?php if (empty($this->AutrePage)):?>
|
||||
<div id="center">
|
||||
<?php endif;?>
|
||||
|
||||
<?php if (empty($this->AutrePage)):?>
|
||||
<h1>INDISCORE©</h1>
|
||||
<div class="paragraph">
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Numéro identifiant Siren</td>
|
||||
<td width="350" class="StyleInfoData"><?=$this->SirenTexte($this->indiscore->Siren)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Numéro identifiant Siret du siège</td>
|
||||
<td width="350" class="StyleInfoData"><?=$this->SiretTexte($this->indiscore->Siret)?></td>
|
||||
</tr>
|
||||
<?php if (isset($this->indiscore->NumRC) && $this->indiscore->NumRC*1!=0) { ?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Numéro R.C.</td>
|
||||
<td width="350" class="StyleInfoData"><?=$this->indiscore->NumRC?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr><td colspan="3"> </td></tr>
|
||||
<?php if ($this->edition) {?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib"></td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?=$this->action('scorecutoff','saisie',null, array('siren'=>$this->indiscore->Siren)); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php }?>
|
||||
</table>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
|
||||
<h2>Raison sociale & coordonnées</h2>
|
||||
<div class="paragraph">
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"></td>
|
||||
<td width="200" class="StyleInfoLib">Raison Sociale</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?php
|
||||
echo $this->indiscore->Nom;
|
||||
if (!empty($this->indiscore->Nom2)) {
|
||||
echo '<br/>'.$this->indiscore->Nom2;
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
<?php
|
||||
$titre='';
|
||||
if ($this->indiscore->Enseigne!='' && $this->indiscore->Sigle!='') {
|
||||
$titre = 'Enseigne / Sigle'; $lib = $this->indiscore->Enseigne.' / '.$this->indiscore->Sigle;
|
||||
} elseif ($this->indiscore->Enseigne!='' && $this->indiscore->Sigle=='') {
|
||||
$titre = 'Enseigne'; $lib = $this->indiscore->Enseigne;
|
||||
} elseif ($this->indiscore->Enseigne=='' && $this->indiscore->Sigle!='') {
|
||||
$titre = 'Sigle'; $lib = $this->indiscore->Sigle;
|
||||
}
|
||||
|
||||
if (!empty($titre)) {
|
||||
?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib"><?=$titre?></td>
|
||||
<td width="350" class="StyleInfoData"><?=$lib?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<td width="30"></td>
|
||||
<td width="200" class="StyleInfoLib">Forme juridique</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?=$this->indiscore->FJ_lib?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"></td>
|
||||
<td width="200" class="StyleInfoLib">Date de création de l'entreprise</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?=WDate::dateT('Ymd', 'm/Y', $this->indiscore->DateCreaEn)?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"></td>
|
||||
<td width="200" class="StyleInfoLib">Adresse</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?=$this->indiscore->Adresse?><br/>
|
||||
<?php if ($this->indiscore->Adresse2<>'') echo $this->indiscore->Adresse2.'<br/>';?>
|
||||
<?=$this->indiscore->CP?> <?=$this->indiscore->Ville?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"></td>
|
||||
<td width="200" class="StyleInfoLib">Téléphone</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?=$this->indiscore->Tel?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if ($this->surveillance) {?>
|
||||
<tr>
|
||||
<td width="30"></td>
|
||||
<td colspan="2">
|
||||
<?=$this->action('infos','surveillance', null, array(
|
||||
'source' => 'score',
|
||||
'siret' => $this->siret
|
||||
));?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php }?>
|
||||
|
||||
<?php if ($this->aviscredit) {?>
|
||||
<tr>
|
||||
<td width="30"></td>
|
||||
<td colspan="2">
|
||||
<a href="<?=$this->url(array('controller'=>'evaluation', 'action'=>'aviscredit', 'siret' => $this->siret))?>">
|
||||
Saisir votre demande d'avis credit personnalisé</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php }?>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h2>Évaluation</h2>
|
||||
<div class="paragraph">
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoData">
|
||||
L'évaluation indiScore© est en partie basée sur les points notables suivants :<br/>
|
||||
|
||||
<h3><u>Conformité légale :</u></h3>
|
||||
<div class="stats gradiant_pic">
|
||||
<ul>
|
||||
<li>
|
||||
<i><?=$this->indiscore->AnalyseConfor?></i>
|
||||
<div class="blocdegrade clearfix">
|
||||
<span class="textdegrade">Conformité</span>
|
||||
<div class="imgdegrade"><img class="borderimg" src="/themes/default/images/indiscore/imgscores-<?=$this->FormatPct($this->indiscore->ScoreConfor)?>.png"/></div>
|
||||
<div class="regle"><img src="/themes/default/images/indiscore/sgradiant2.png" /></div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<h3><u>Dirigeance :</u></h3>
|
||||
<div class="stats gradiant_pic">
|
||||
<ul>
|
||||
<li>
|
||||
<i><?=$this->indiscore->AnalyseDirigeance?></i>
|
||||
<div class="blocdegrade clearfix">
|
||||
<span class="textdegrade">Dirigeance</span>
|
||||
<div class="imgdegrade"><img class="borderimg" src="/themes/default/images/indiscore/imgscores-<?=$this->FormatPct($this->indiscore->ScoreDirigeance)?>.png"/></div>
|
||||
<div class="regle"><img src="/themes/default/images/indiscore/sgradiant2.png" /></div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<h3><u>Solvabilité :</u></h3>
|
||||
<div class="stats gradiant_pic">
|
||||
<ul>
|
||||
<li>
|
||||
<i>L'analyse de la solvabilité est <?=$this->indiscore->AnalyseSolvabilite?></i>
|
||||
<div class="blocdegrade clearfix">
|
||||
<span class="textdegrade">Solvabilité</span>
|
||||
<div class="imgdegrade"><img class="borderimg" src="/themes/default/images/indiscore/imgscores-<?php echo $this->FormatPct($this->indiscore->Indiscore);?>.png"/></div>
|
||||
<div class="regle"><img src="/themes/default/images/indiscore/sgradiant2.png" /></div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php $millesimeMax = date('Ymd', mktime(0, 0, 0, date('m'), date('d'), date('Y')-2));?>
|
||||
<?php if($this->indiscore->NbBilansScore > 0 && $this->indiscore->Bilans->item[0]->Millesime >= $millesimeMax):?>
|
||||
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoData">
|
||||
A la lecture du dernier bilan, la situation financière de l'entreprise <?php echo $this->Nom;?> est <b><?php echo $this->indiscore->tabInfosNotations->SituationFinanciere;?></b>.<br/>
|
||||
<!-- Cette notation financière est <?php echo $this->indiscore->tabInfosNotations->Notation;?>.<br/>-->
|
||||
<?php
|
||||
if (html_entity_decode($this->indiscore->tabInfosNotations->ProbabiliteDefaut) <> 'En défaut')
|
||||
echo 'La probabilité de défaillance associée à cette note avoisine les '. number_format($this->indiscore->tabInfosNotations->ProbabiliteDefaut,3,',',' ') .' %';
|
||||
else
|
||||
echo 'Cette entreprise est défaillante ou sur le point de le devenir.';
|
||||
//[EquivalenceBDF]
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoData">
|
||||
<i>Pour information, les méthodes standards donnent : Conan & Holder = <b><?php echo $this->indiscore->scores->ConanH;?></b>,
|
||||
Afdcc2 = <b><?php echo $this->indiscore->scores->Afdcc2;?></b> et Score Z = <b><?php echo $this->indiscore->scores->Z;?></b>.</i>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php else:?>
|
||||
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoData">
|
||||
La situation financière de l'entreprise ne peut être évaluée en détail car
|
||||
<?php
|
||||
if($this->indiscore->Bilans->item[0]->Millesime < $millesimeMax && count($this->indiscore->Bilans) > 0 ) {
|
||||
echo 'le dernier bilan disponible date de '.substr($this->indiscore->Bilans->item[0]->Millesime,0,4).'.';
|
||||
} else {
|
||||
echo 'aucun bilan n\'est disponible.';
|
||||
} ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php endif;?>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h2>Paiements</h2>
|
||||
<div class="paragraph">
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoData">
|
||||
<?php if(!empty($this->indiscore->infoPaiement)):?>
|
||||
<?php echo html_entity_decode($this->indiscore->infoPaiement);?>
|
||||
<?php else :?>
|
||||
Aucune information sur les paiements disponnible.
|
||||
<?php endif;?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h2>Conclusion</h2>
|
||||
<div class="paragraph">
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoData">
|
||||
Compte tenu des informations disponibles auprès des sources officielles
|
||||
Scores et Décisions présente la conclusion suivante :<br/>
|
||||
<?php
|
||||
switch($this->typeScore)
|
||||
{
|
||||
case '20':
|
||||
$maxIndiscore = $this->typeScore;
|
||||
$indiscore = $this->indiscore->Indiscore20;
|
||||
break;
|
||||
case '100':
|
||||
default:
|
||||
$maxIndiscore = empty($this->typeScore)? '100' : $this->typeScore;
|
||||
$indiscore = $this->indiscore->Indiscore;
|
||||
break;
|
||||
}
|
||||
?>
|
||||
<h3 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><?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É EST DE <?php echo round($this->indiscore->encours / 1000);?> K€</b></h3>
|
||||
<?php } ?>
|
||||
<h3><?php echo $this->indiscore->infoEncours;?></h3>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="3" align="center"><img src="/themes/default/images/indiscore/logo_indiscore.png"/></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<?php if (empty($this->AutrePage)):?>
|
||||
<?=$this->render('cgu.phtml', $this->cgu);?>
|
||||
</div>
|
||||
<?php endif;?>
|
@ -1,151 +0,0 @@
|
||||
<div id="center">
|
||||
<h1>RAPPORT DE SYNTHESE</h1>
|
||||
<div class="paragraph">
|
||||
<table>
|
||||
<?php
|
||||
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Siret']);
|
||||
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['SiretSiege']);
|
||||
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['NumRC']);
|
||||
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Actif']);
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h2>Raison sociale & Coordonnées</h2>
|
||||
<div class="paragraph">
|
||||
<table>
|
||||
<?php
|
||||
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['RaisonSociale']);
|
||||
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['FormeJuridique']);
|
||||
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['DateImmat']);
|
||||
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['DateCreaEt']);
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h2>Activité(s) & Chiffre d'affaires</h2>
|
||||
<div class="paragraph">
|
||||
<table>
|
||||
<?php
|
||||
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['ActiviteEn']);
|
||||
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['FormeJuridique']);
|
||||
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Naf4']);
|
||||
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['OrigineFond']);
|
||||
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['TypeExploitation']);
|
||||
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Saisonnalite']);
|
||||
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Capital']);
|
||||
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['ChiffreAffaire']);
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->action('liste', 'dirigeant', null, array('siret' => $this->siret, 'id' => $this->id, 'apage' => 'indiscore2'));
|
||||
echo $this->action('liens', 'identite', null, array('siret' => $this->siret, 'id' => $this->id, 'apage' => 'indiscore2'));
|
||||
?>
|
||||
<h2>Eléments financiers</h2>
|
||||
<div class="paragraph">
|
||||
<?php if(count($this->tabResult)>0){ ?>
|
||||
<table id="synthese">
|
||||
<thead>
|
||||
<tr>
|
||||
<th align="center"></th>
|
||||
<th colspan="2" class="date"><?=$this->tabResult[0]['dateCloture']?><br/><?=$this->tabResult[0]['duree']?></th>
|
||||
<th colspan="2" class="date"><?=$this->tabResult[1]['dateCloture']?><br/><?=$this->tabResult[1]['duree']?></th>
|
||||
<th colspan="2" class="date"><?=$this->tabResult[2]['dateCloture']?><br/><?=$this->tabResult[2]['duree']?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
Zend_Registry::get('firebug')->info($this->tabResult);
|
||||
?>
|
||||
<?php foreach($this->tabRatio as $ratio => $info) { ?>
|
||||
<tr>
|
||||
<td class="head"><a class="tooltip" title="<?=$info['comment']?>"><?=$info['titre']?></a></td>
|
||||
<td class="right"><?=$this->tabResult[0]['ratio'][$ratio]?></td>
|
||||
<td class="right" title="<?=$this->tabResult[0]['info'][$ratio]?>"><?=$this->tabResult[0]['total'][$ratio]?> %</td>
|
||||
<td class="right"><?=$this->tabResult[1]['ratio'][$ratio]?></td>
|
||||
<td class="right" title="<?=$this->tabResult[1]['info'][$ratio]?>"><?=$this->tabResult[1]['total'][$ratio]?> %</td>
|
||||
<td class="right"><?=$this->tabResult[2]['ratio'][$ratio]?></td>
|
||||
<td class="right" title="<?=$this->tabResult[2]['info'][$ratio]?>"><?=$this->tabResult[3]['total'][$ratio]?> %</td>
|
||||
</tr>
|
||||
<?php }?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php } else {?>
|
||||
Aucun bilan disponible.
|
||||
<?php }?>
|
||||
</div>
|
||||
|
||||
<h2>Paiement</h2>
|
||||
<div class="paragraph">
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"></td>
|
||||
<td class="StyleInfoData"><?=html_entity_decode($this->paiement)?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h2>Procédures collectives</h2>
|
||||
<div class="paragraph">
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"></td>
|
||||
<td class="StyleInfoLib" width="200">Situation juridique</td>
|
||||
<td class="StyleInfoData" width="350">
|
||||
<?php if ($this->SituationJuridique == 'P'):?>
|
||||
<a href="<?=$this->url(array(
|
||||
'controller' => 'juridique',
|
||||
'action' => 'annonces',
|
||||
'siret' => $this->siret,
|
||||
'id' => $this->id,
|
||||
))?>">
|
||||
<font color="red">
|
||||
<b>En procédure collective</b>
|
||||
</font>
|
||||
</a>
|
||||
<?php if($this->dateRadiation != ''):?>
|
||||
<br/>Radié du RCS le <?php echo $this->dateRadiation;?>
|
||||
<?php endif;?>
|
||||
<?php elseif ($this->SituationJuridique == 'RR'):?>
|
||||
Radié du RCS <?php if($this->dateRadiation != ''):?>
|
||||
le <?php echo $this->dateRadiation;?>
|
||||
<?php endif;?>
|
||||
<?php elseif ($this->SituationJuridique == 'RP'):?>
|
||||
Radiation publiée <?php if($this->dateRadiation != ''):?>
|
||||
le <?php echo $this->dateRadiation;?>
|
||||
<?php endif;?>
|
||||
<?php else:?>
|
||||
Aucune procédure enregistrée à ce jour par nos services.
|
||||
<?php endif;?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h2>Scores et encours</h2>
|
||||
<div class="paragraph">
|
||||
<table>
|
||||
<?php foreach ($this->scores as $name => $score):?>
|
||||
<tr>
|
||||
<td width="30"></td>
|
||||
<td width="250" class="StyleInfoLib"><?=$score[1]?></td>
|
||||
<td width="300" class="StyleInfoData">
|
||||
<a class="rTip" name="Score <?=$name?>" rel="<?=$this->url(array(
|
||||
'controller'=> 'evaluation',
|
||||
'action' => 'printscores',
|
||||
'score'=> $name, 'note' => $score[0]))?>"><?=$score[0]?>
|
||||
<?php if ($name == 'Indiscore') :?> (<?=$this->TendanceIndiscore?>) <?php endif;?>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
<tr>
|
||||
<td width="30"></td>
|
||||
<td class="StyleInfoLib">Encours conseillé</td>
|
||||
<td class="StyleInfoData"><?php echo number_format($this->encours/1000, 0, '', ' ');?> K€</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?=$this->render('cgu.phtml', $this->cgu);?>
|
||||
</div>
|
@ -1,50 +0,0 @@
|
||||
<?php
|
||||
$parametresAction = array(
|
||||
'siret' => $this->siret,
|
||||
'id' => $this->id,
|
||||
'apage' => 'indiscore3'
|
||||
);
|
||||
?>
|
||||
<div id="center">
|
||||
|
||||
<?php if ($this->customRapport) {?>
|
||||
<div><a id="customRapport" href="<?=$this->customRapport?>">Rapport personnalisé</a></div>
|
||||
<?php }?>
|
||||
|
||||
<h1>RAPPORT COMPLET</h1>
|
||||
<div class="paragraph">
|
||||
<p id="rsynthese">SOCIÉTÉ : <?=$this->raisonSociale?></p>
|
||||
</div>
|
||||
|
||||
<h1>FICHE D'IDENTITÉ</h1>
|
||||
<?=$this->action('fiche', 'identite', null, array_merge($parametresAction, array('infos'=>$this->Identite)));?>
|
||||
|
||||
<h1>DIRIGEANTS</h1>
|
||||
<?=$this->action('liste', 'dirigeant', null, array_merge($parametresAction, array('infos'=>$this->Dirigeants)));?>
|
||||
|
||||
<h1>LIENS FINANCIERS</h1>
|
||||
<?=$this->action('liens', 'identite', null, array_merge($parametresAction, array('infos'=>$this->Liens)));?>
|
||||
|
||||
<h1>ANNONCES LÉGALES</h1>
|
||||
<?=$this->action('annonces', 'juridique', null, array_merge($parametresAction, array('infos'=>$this->Annonces)))?>
|
||||
|
||||
<h1>SYNTHÈSE</h1>
|
||||
<?=$this->action('synthese', 'finance', null, array_merge($parametresAction, array('infos'=>$this->Ratios)));?>
|
||||
|
||||
<h1>ÉLÉMENTS FINANCIERS - BILANS</h1>
|
||||
<?=$this->action('bilan', 'finance', null, array_merge($parametresAction, array('infos'=>$this->Ratios)));?>
|
||||
|
||||
<h1>RATIOS</h1>
|
||||
<?=$this->action('ratios', 'finance', null, array_merge($parametresAction, array('infos'=>$this->Ratios)));?>
|
||||
|
||||
<h1>COMMENTAIRES</h1>
|
||||
<div class="paragraph">
|
||||
<div id="commentaires">
|
||||
<?=$this->comment?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h1>INDISCORE©</h1>
|
||||
<?=$this->action('indiscore', 'evaluation', null, array_merge($parametresAction, array('infos'=>$this->Indiscore)));?>
|
||||
|
||||
</div>
|
@ -1,12 +0,0 @@
|
||||
<div class="blocdegrade clearfix">
|
||||
<div>
|
||||
<img class="borderimg" src="/themes/default/images/indiscore/imgscores-<?php echo $this->note;?>.png"/>
|
||||
</div>
|
||||
<div>
|
||||
<img src="/themes/default/images/indiscore/reglette.png" />
|
||||
</div>
|
||||
<div class="echelle">
|
||||
<span class="echelleleft"><?php echo $this->min;?></span>
|
||||
<span class="echelleright"><?php echo $this->max;?></span>
|
||||
</div>
|
||||
</div>
|
@ -1,58 +0,0 @@
|
||||
<div id="center">
|
||||
<h1 class="titre">ÉVALUATION</h1>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Numéro identifiant Siren</td>
|
||||
<td width="350" class="StyleInfoData"><?php echo $this->SirenTexte($this->siren);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Raison Sociale</td>
|
||||
<td width="350" class="StyleInfoData"><?php echo $this->raisonSociale?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
</table>
|
||||
|
||||
<h2>Scoring partenaire : Creditsafe®</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<table cellspacing="0">
|
||||
<tr>
|
||||
<td width="20"> </td>
|
||||
<td width="10" bgcolor="#bebebe"> </td>
|
||||
<td width="200" bgcolor="#bebebe"><font size="2"><b>Note à ce jour [0 - 100]</b></font></td>
|
||||
<td width="250" bgcolor="#bebebe"><font color="<?php echo $this->fontColor;?>" size="2"><?php echo $this->rating;?></font></td>
|
||||
<td width="100" bgcolor="#bebebe">
|
||||
<?php echo $this->imgFeux?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20"> </td>
|
||||
<td width="10" bgcolor="#e7e7e7"> </td>
|
||||
<td width="200" bgcolor="#e7e7e7"><font size="2"><b>Limite à ce jour [€]</b></font></td>
|
||||
<td width="350" colspan="2" bgcolor="#e7e7e7"><font size="2"><?php echo $this->strCreditlimit;?></font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20"> </td>
|
||||
<td width="10" bgcolor="#bebebe"> </td>
|
||||
<td width="200" bgcolor="#bebebe"><font size="2"><b>Informations complémentaires</b></font></td>
|
||||
<td width="350" colspan="2" bgcolor="#bebebe"><font color="<?php echo $this->fontColor;?>" size="2"><?php echo $this->libelle.'<br/>'.$this->ratingdesc1; if (trim($this->ratingdesc2)<>'') echo '<br/>'.$this->ratingdesc2;?></font></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoData">
|
||||
<form action="<?=$this->url(array('controller'=>'evaluation', 'action'=>'scoringcommande'))?>" method="post">
|
||||
<input type="hidden" name="siren" value="<?=$this->siren?>"/>
|
||||
<input type="checkbox"/>Mettre cette entreprise sous surveillance scoring partenaire
|
||||
<br/>
|
||||
Adresse email du destinataire <input name="email" type="text" value="<?=$this->emailCommande?>" size="20"/>
|
||||
<input class="imgButton" type="image" src="/themes/default/images/boutton_valider_off.gif" name="submit" onmouseover="this.src='/themes/default/images/boutton_valider_on.gif'" onmouseout="this.src='/themes/default/images/boutton_valider_off.gif'" title="Surveiller le score partenaire de cette entreprise...">
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
@ -1,11 +0,0 @@
|
||||
<div id="center">
|
||||
<h1></h1>
|
||||
|
||||
<div class="paragraph">
|
||||
<?=$this->message?>
|
||||
<br/>
|
||||
<a href="<?=$this->url(array('controller'=>'evaluation', 'action'=>'scoring'))?>">Retour</a>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
@ -1,94 +0,0 @@
|
||||
<style type="text/css">
|
||||
ul.relation {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
ul.relation li {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.banque {
|
||||
text-decoration: underline;
|
||||
width: 35%;
|
||||
float: left;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.adresse {
|
||||
width: 30%;
|
||||
float: left;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.codeBanque {
|
||||
width: 10%;
|
||||
float: left
|
||||
}
|
||||
|
||||
.codeGuichet {
|
||||
width: 10%;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.clearfix:after {
|
||||
content: ".";
|
||||
display: block;
|
||||
height: 0;
|
||||
clear: both;
|
||||
visibility: hidden;
|
||||
}
|
||||
</style>
|
||||
<div id="center">
|
||||
<h1 class="titre">RELATIONS BANCAIRES</h1>
|
||||
<div class="paragraph">
|
||||
<table class="identite">
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">
|
||||
Numéro identifiant Siren
|
||||
</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?=$this->SirenTexte($this->siren)?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Raison Sociale</td>
|
||||
<td width="350" class="StyleInfoData"><?=$this->raisonSociale?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h2>Liste des relations bancaires</h2>
|
||||
<div class="paragraph">
|
||||
<?php
|
||||
if(count($this->banques)>0)
|
||||
{
|
||||
?>
|
||||
<ul class="relation clearfix">
|
||||
<?php
|
||||
foreach($this->banques as $relation)
|
||||
{
|
||||
?>
|
||||
<li>
|
||||
<div class="banque"><?=$relation->libBanque?></div>
|
||||
<div class="adresse"><?php if($relation->adresse1!='') {?>
|
||||
<?=$relation->adresse1?><br />
|
||||
<?php } ?> <?php if($relation->adresse2!='') {?>
|
||||
<?=$relation->adresse2?><br />
|
||||
<?php } ?> <?=$relation->cp?> <?=$relation->ville?></div>
|
||||
<div class="codeBanque"><?php if( $relation->codeBanque*1!=0 ){ echo $relation->codeBanque; } ?></div>
|
||||
<div class="codeGuichet"><?php if( $relation->codeGuichet*1!=0 ){ echo $relation->codeGuichet; }?></div>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<p>Aucune information.</p>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php echo $this->render('cgu.phtml', $this->cgu);?>
|
||||
</div>
|
@ -1,91 +0,0 @@
|
||||
<?php if (empty($this->AutrePage)):?>
|
||||
<div id="center">
|
||||
<?php endif;?>
|
||||
|
||||
<?php if (empty($this->AutrePage)):?>
|
||||
<h1>ÉLÉMENTS FINANCIERS - BILANS</h1>
|
||||
<div class="paragraph">
|
||||
<table class="identite">
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">
|
||||
Numéro identifiant Siren
|
||||
</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?php echo $this->SirenTexte($this->siren);?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Raison Sociale</td>
|
||||
<td width="350" class="StyleInfoData"><?php echo $this->raisonSociale;?></td>
|
||||
</tr>
|
||||
<?php if (isset($this->tabResultActif) && isset($this->tabResultPassif) && isset($this->tabResultSig)){?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Type de bilans</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?php if ($this->nbBilanC==0){?>
|
||||
Réel normal ou Simplifié
|
||||
<?php } elseif ($this->nbBilanN==0){?>
|
||||
Consolidé
|
||||
<?php } else {?>
|
||||
<form>
|
||||
<select name="typeBilan">
|
||||
<option value="N"<?=($this->typeBilan=='N')? ' selected' : '';?>>Réel normal ou Simplifié</option>
|
||||
<option value="C"<?=($this->typeBilan=='C')? ' selected' : '';?>>Consolidé</option>
|
||||
</select>
|
||||
</form>
|
||||
<?php }?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php }?>
|
||||
</table>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php if($this->typeBilan == 'B' and $this->typeBilan == 'A'):?>
|
||||
|
||||
<div class="paragraph">
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td colspan="2" class="StyleInfoLib" width="200">Bilan de banque/assurance non gérés</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php else: ?>
|
||||
|
||||
<?php if ($this->nbBilanN==0 && $this->nbBilanN==0):?>
|
||||
|
||||
<div class="paragraph">
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td colspan="2" class="StyleInfoLib" width="200">Aucun bilan disponible.</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php else:?>
|
||||
|
||||
<h2>Bilan actif - passif</h2>
|
||||
<?=$this->partial('finance/bilan/actif.phtml')?>
|
||||
<?=$this->partial('finance/bilan/passif.phtml')?>
|
||||
|
||||
<h2>Soldes Intermédiaire de Gestion</h2>
|
||||
<?=$this->partial('finance/bilan/sig.phtml')?>
|
||||
|
||||
<?php endif;?>
|
||||
|
||||
<?php endif;?>
|
||||
|
||||
<?php if (empty($this->AutrePage)):?>
|
||||
<?=$this->render('cgu.phtml', $this->cgu)?>
|
||||
<?php endif;?>
|
||||
|
||||
<?php if (empty($this->AutrePage)):?>
|
||||
</div>
|
||||
<?php endif;?>
|
@ -1,42 +0,0 @@
|
||||
<?php
|
||||
$tabResult = $this->partial()->view->tabResultActif;
|
||||
$tabRatio = $this->partial()->view->tabRatioActif;
|
||||
?>
|
||||
<div class="paragraph">
|
||||
<table class="bilans">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Actif</th>
|
||||
<?php foreach($tabResult as $info) { ?>
|
||||
<th class="date" >
|
||||
<?=$info['dateCloture']?><br/><?=$info['duree']?>
|
||||
</th>
|
||||
<?php }?>
|
||||
<?php $lastDateCloture = $info['dateCloture']; ?>
|
||||
<th>% T.B.</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($tabRatio as $idRatio => $info) { ?>
|
||||
<tr<?php if (!empty($info['class'])) echo ' class="'.$info['class'].'"'?>>
|
||||
<td>
|
||||
<?=$info['titre']?></td>
|
||||
<?php foreach($tabResult as $value) { ?>
|
||||
<td class="left"><?=$value['entrep'][$idRatio]?></td>
|
||||
<?php }?>
|
||||
<td><?=$value['total'][$idRatio]?></td>
|
||||
<?php }?>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="paragraph">
|
||||
<?=$this->action('bilangraph', 'finance', null, array(
|
||||
'type' => 'actif',
|
||||
'typeBilan' => $this->partial()->view->typeBilan,
|
||||
'dateCloture' => $this->partial()->view->lastDateCloture,
|
||||
'siret' => $this->partial()->view->siret,
|
||||
'id' => $this->partial()->view->id,
|
||||
))?>
|
||||
</div>
|
@ -1,41 +0,0 @@
|
||||
<?php
|
||||
$tabResult = $this->partial()->view->tabResultPassif;
|
||||
$tabRatio = $this->partial()->view->tabRatioPassif;
|
||||
?>
|
||||
<div class="paragraph">
|
||||
<table class="bilans">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Passif</th>
|
||||
<?php foreach($tabResult as $info) { ?>
|
||||
<th class="date" >
|
||||
<?=$info['dateCloture']?><br/><?=$info['duree']?>
|
||||
</th>
|
||||
<?php }?>
|
||||
<th>% T.B.</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($tabRatio as $idRatio => $info) { ?>
|
||||
<tr<?php if (!empty($info['class'])) echo ' class="'.$info['class'].'"'?>>
|
||||
<td>
|
||||
<?=$info['titre']?></td>
|
||||
<?php foreach($tabResult as $value) { ?>
|
||||
<td class="left"><?=$value['entrep'][$idRatio]?></td>
|
||||
<?php }?>
|
||||
<td><?=$value['total'][$idRatio]?></td>
|
||||
<?php }?>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="paragraph">
|
||||
<?=$this->action('bilangraph', 'finance', null, array(
|
||||
'type' => 'passif',
|
||||
'typeBilan' => $this->partial()->view->typeBilan,
|
||||
'dateCloture' => $this->partial()->view->lastDateCloture,
|
||||
'siret' => $this->partial()->view->siret,
|
||||
'id' => $this->partial()->view->id,
|
||||
))?>
|
||||
</div>
|
@ -1,44 +0,0 @@
|
||||
<?php
|
||||
$tabResult = $this->partial()->view->tabResultSig;
|
||||
$tabRatio = $this->partial()->view->tabRatioSig;
|
||||
?>
|
||||
<div class="paragraph">
|
||||
<table class="bilans">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">SOLDES INTERMEDIAIRE DE GESTION</th>
|
||||
<?php foreach($tabResult as $info) { ?>
|
||||
<th class="date" >
|
||||
<?=$info['dateCloture']?><br/><?=$info['duree']?>
|
||||
</th>
|
||||
<?php }?>
|
||||
<th>% C.A.</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($tabRatio as $idRatio => $info) { ?>
|
||||
<tr<?php if (!empty($info['class'])) echo ' class="'.$info['class'].'"'?>>
|
||||
<?php if(empty($info['op'])){?>
|
||||
<td colspan="2"><?=$info['titre']?></td>
|
||||
<?php } else {?>
|
||||
<td><?=$info['op']?></td><td><?=$info['titre']?></td>
|
||||
<?php }?>
|
||||
<?php foreach($tabResult as $value) { ?>
|
||||
<td class="left"><?=$value['entrep'][$idRatio]?></td>
|
||||
<?php }?>
|
||||
<td><?=$value['total'][$idRatio]?></td>
|
||||
<?php }?>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="paragraph">
|
||||
<?=$this->action('bilangraph', 'finance', null, array(
|
||||
'type' => 'sig',
|
||||
'typeBilan' => $this->partial()->view->typeBilan,
|
||||
'dateCloture' => $this->partial()->view->lastDateCloture,
|
||||
'siret' => $this->partial()->view->siret,
|
||||
'id' => $this->partial()->view->id,
|
||||
))?>
|
||||
</div>
|
@ -1,291 +0,0 @@
|
||||
<div id="center">
|
||||
<h1 class="titre">INFORMATIONS BOURSIÈRES</h1>
|
||||
<div class="paragraph">
|
||||
<table id="identite">
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">
|
||||
Numéro identifiant Siren
|
||||
</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?=$this->SirenTexte($this->siren)?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Raison Sociale</td>
|
||||
<td width="350" class="StyleInfoData"><?=$this->raisonSociale?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if ( !empty($this->InfosBourse->Isin) ) {
|
||||
//logo
|
||||
|
||||
if (trim($this->InfosBourse->Web)!='') {
|
||||
if (substr($this->InfosBourse->Web,0,7)!='http://'){
|
||||
$siteWeb = 'http://'.$this->InfosBourse->Web;
|
||||
} else {
|
||||
$siteWeb = $this->InfosBourse->Web;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div class="paragraph">
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Code ISIN</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?php
|
||||
echo $this->InfosBourse->Isin;
|
||||
if (trim($this->InfosBourse->CodeSicovam)*1>0)
|
||||
echo ' <b>(ancien code Sicovam : </b>'.$this->InfosBourse->CodeSicovam.'<b>)</b>';
|
||||
if ($this->edition) {
|
||||
echo ' <a href="'.$this->edition.'">(Edition)</a>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Code Mnémo</td>
|
||||
<td width="350" class="StyleInfoData"><?=$this->InfosBourse->CodeMnemo?></td>
|
||||
</tr>
|
||||
<?php if( !empty($this->InfosBourse->CodeBloomberg) ){ ?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Code Bloomberg</td>
|
||||
<td width="350" class="StyleInfoData"><?=$this->InfosBourse->CodeBloomberg?></td>
|
||||
</tr>
|
||||
<?php }?>
|
||||
|
||||
<?php if( !empty($this->InfosBourse->CodeDatastream) ) { ?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Code Datastream</td>
|
||||
<td width="350" class="StyleInfoData"><?=$this->InfosBourse->CodeDatastream?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php if( !empty($this->InfosBourse->CodeRic) ) { ?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Code Ric</td>
|
||||
<td width="350" class="StyleInfoData"><?=$this->InfosBourse->CodeRic?></td>
|
||||
</tr>
|
||||
<?php }?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Place de cotation</td>
|
||||
<td width="350" class="StyleInfoData"><?=$this->InfosBourse->placeCotation?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Marché</td>
|
||||
<td width="350" class="StyleInfoData"><?=$this->InfosBourse->Marche?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Nombre de titres</td>
|
||||
<td width="350" class="StyleInfoData"><?=number_format($this->InfosBourse->nombreTitres,0,'', ' ')?> titres</td>
|
||||
</tr>
|
||||
<?php
|
||||
switch (trim(strtoupper($this->InfosBourse->EligibleSRD)))
|
||||
{
|
||||
case 'O': $srd='Oui'; break;
|
||||
default: $srd='Non'; break;
|
||||
}
|
||||
switch (trim(strtoupper($this->InfosBourse->EligiblePEA)))
|
||||
{
|
||||
case 'O': $pea='Oui'; break;
|
||||
default: $pea='Non'; break;
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Éligible SRD / PEA</td>
|
||||
<td width="350" class="StyleInfoData"><?=$srd?> / <?=$pea?></td>
|
||||
</tr>
|
||||
<?php
|
||||
if ($urlImg!='')
|
||||
{
|
||||
$tabTmp=@getimagesize($locImg.$ext);
|
||||
$w=$tabTmp[0];
|
||||
$h=$tabTmp[1];
|
||||
if ($w>350) $strSize=@redimage($locImg.$ext,350,150);
|
||||
else $strSize='';
|
||||
?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Logo</td>
|
||||
<td width="350" class="StyleInfoData"><img src="<?=$urlImg?>" <?=$strSize?>/></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h2>Coordonnées</h2>
|
||||
<div class="paragraph">
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Raison Sociale</td>
|
||||
<td width="350" class="StyleInfoData"><?=empty($this->InfosBourse->RaisonSociale) ? $this->raisonSociale : $this->InfosBourse->RaisonSociale;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Adresse</td>
|
||||
<td width="350" class="StyleInfoData"><?=$this->InfosBourse->Adresse?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Date d'introduction en bourse</td>
|
||||
<td width="350" class="StyleInfoData"><?=$this->InfosBourse->DateIntroduction?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Date dernière assemblée générale</td>
|
||||
<td width="350" class="StyleInfoData"><?=$this->InfosBourse->DateDerAG?></td>
|
||||
</tr>
|
||||
<?php if (trim($this->InfosBourse->DateRadiation)<>'' && $this->InfosBourse->DateRadiation<>'0000-00-00') { ?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Date de radiation</td>
|
||||
<td width="350" class="StyleInfoData"><?=$this->InfosBourse->DateRadiation?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Téléphone</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?php
|
||||
if (strlen(trim($this->InfosBourse->Tel))>5) echo $this->InfosBourse->Tel.' ';
|
||||
if (strlen(trim($this->InfosBourse->Tel2))>5) echo $this->InfosBourse->Tel2;
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Fax</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?php
|
||||
if (strlen(trim($this->InfosBourse->Fax))>5) echo $this->InfosBourse->Fax.' ';
|
||||
if (strlen(trim($this->InfosBourse->Fax2))>5) echo $this->InfosBourse->Fax2;
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if ($siteWeb<>'') { ?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Site Internet</td>
|
||||
<td width="350" class="StyleInfoData"><a href="<?=$siteWeb?>" target="_blank"><?=$siteWeb?></a></td>
|
||||
</tr>
|
||||
<?php }?>
|
||||
<?php if (trim($this->InfosBourse->Mail)<>'') { ?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Courriel</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<a href="mailto:<?=$this->InfosBourse->Mail;?>" target="_blank"><?=$this->InfosBourse->Mail?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h2>Activité(s)</h2>
|
||||
<div class="paragraph">
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Activité</td>
|
||||
<td width="350" class="StyleInfoData"><?=$this->InfosBourse->Activite?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Secteur</td>
|
||||
<td width="350" class="StyleInfoData"><?=$this->InfosBourse->Secteur?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoData"><?=str_replace("\n", '<br/>',$this->InfosBourse->ActiviteDet)?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h2>Dernier cours</h2>
|
||||
<div class="paragraph">
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Dernière cotation connue</td>
|
||||
<td width="350" class="StyleInfoData"><?=WDate::dateT('Y-m-d','d/m/Y',$this->InfosBourse->derCoursDate)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Clôture</td>
|
||||
<td width="350" class="StyleInfoData"><?=number_format($this->InfosBourse->derCoursCloture,2,',', ' ')?> €</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Ouverture</td>
|
||||
<td width="350" class="StyleInfoData"><?=number_format($this->InfosBourse->derCoursOuverture,2,',', ' ')?> €</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Plus haut</td>
|
||||
<td width="350" class="StyleInfoData"><?=number_format($this->InfosBourse->derCoursPlusHaut,2,',', ' ')?> €</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Plus Bas</td>
|
||||
<td width="350" class="StyleInfoData"><?=number_format($this->InfosBourse->derCoursPlusBas,2,',', ' ')?> €</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Volume échangé</td>
|
||||
<td width="350" class="StyleInfoData"><?=number_format($this->InfosBourse->derCoursVolume,0,'', ' ')?> titres (<?=number_format($this->InfosBourse->derCoursVolume/$this->InfosBourse->nombreTitres,2,',', ' ')?> %)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Capitalisation</td>
|
||||
<td width="350" class="StyleInfoData"><?=number_format($this->InfosBourse->capitalisation,2,',', ' ')?> €</td>
|
||||
</tr>
|
||||
<tr><td colspan="3"> </td></tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Minimum historique</td>
|
||||
<td width="350" class="StyleInfoData"><?=number_format($this->InfosBourse->coursMin,2,',', ' ')?> €</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Maximum historique</td>
|
||||
<td width="350" class="StyleInfoData"><?=number_format($this->InfosBourse->coursMax,2,',', ' ')?> €</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Cours moyen</td>
|
||||
<td width="350" class="StyleInfoData"><?=number_format($this->InfosBourse->coursMoy,2,',', ' ')?> €</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<div class="paragraph">
|
||||
<table>
|
||||
<tr>
|
||||
<td width="580" class="StyleInfoLib" colspan="3"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" class="StyleInfoLib" colspan="2">
|
||||
Société non côtée en bourse à ce jour.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php echo $this->render('cgu.phtml', $this->cgu);?>
|
||||
</div>
|
@ -1,91 +0,0 @@
|
||||
<div id="center">
|
||||
<h1 class="titre">Flux de Trésorerie <span style="color:red;">(beta)</span></h1>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Numéro identifiant Siren</td>
|
||||
<td width="340" class="StyleInfoData"><?=$this->SirenTexte($this->siret)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Raison Sociale</td>
|
||||
<td width="340" class="StyleInfoData"><?=$this->raisonSociale?></td>
|
||||
</tr>
|
||||
<?php if ($this->nbBilanN > 0 || $this->nbBilanC > 0) { ?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Type de bilans</td>
|
||||
<td width="340" class="StyleInfoData">
|
||||
<?php if ($this->nbBilanN > 0 && $this->nbBilanC > 0) { ?>
|
||||
<input type="radio" name="typeBilan" value="<?=$this->url(array(
|
||||
'controller'=>'finance', 'action'=>'flux',
|
||||
'siret'=>$this->siret, 'id'=>$this->id, 'type'=>'N'), null, true)?>"
|
||||
<?php if ($this->typeBilan == 'N') { echo ' checked'; }?>/><label>Réel normal ou Simplifié</label>
|
||||
<input type="radio" name="typeBilan" value="<?=$this->url(array(
|
||||
'controller'=>'finance', 'action'=>'flux',
|
||||
'siret'=>$this->siret, 'id'=>$this->id, 'type'=>'C'), null, true)?>"
|
||||
<?php if ($this->typeBilan == 'C') { echo ' checked'; }?>/><label>Consolidé</label>
|
||||
<?php } else if ($this->nbBilanN > 0 && $this->nbBilanC == 0) {?>
|
||||
Réel normal ou Simplifié
|
||||
<?php } else if ($this->nbBilanN == 0 && $this->nbBilanC > 0) {?>
|
||||
Consolidé
|
||||
<?php }?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</table>
|
||||
|
||||
<h2>Tableau des flux</h2>
|
||||
<div class="paragraph">
|
||||
<table class="bilans">
|
||||
<tr class="subhead">
|
||||
<td colspan="2"> </td>
|
||||
<?php foreach ($this->dateCloture as $k=>$date) { ?>
|
||||
<td class="center" >
|
||||
<?=substr($date,6,2).'/'.substr($date,4,2).'/'.substr($date,0,4)?><br/>
|
||||
<?=$this->bilansInfos[$date]->duree?> mois</td>
|
||||
<?php } ?>
|
||||
</tr>
|
||||
<?php
|
||||
foreach ($this->dataTable as $ratio) {
|
||||
$trClass = '';
|
||||
if ( empty($ratio['r']) ){
|
||||
$trClass = ' class="darkblue"';
|
||||
}
|
||||
|
||||
if ( isset($ratio['class']) && $ratio['class']=='subhead' ){
|
||||
$trClass = ' class="'.$ratio['class'].'"';
|
||||
}
|
||||
?>
|
||||
<tr<?=$trClass?>>
|
||||
<td><?=$ratio['op']?></td>
|
||||
<td><?=$ratio['titre']?></td>
|
||||
<?php foreach ($this->dateCloture as $k=>$date) { ?>
|
||||
<td class="right">
|
||||
<?php if ( !empty($ratio['r']) ){ ?>
|
||||
<?=$ratio['values'][$date]?>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<?php }?>
|
||||
</tr>
|
||||
<?php }?>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php if ($this->graph) {?>
|
||||
<div class="paragraph">
|
||||
<img src="/fichier/imgcache/<?=$this->graph?>" />
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
<?=$this->render('cgu.phtml', $this->cgu);?>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$('input[name=typeBilan]').click(function(e){
|
||||
window.location.href = $(this).val();
|
||||
});
|
||||
});
|
||||
</script>
|
@ -1,174 +0,0 @@
|
||||
<div id="center">
|
||||
<h1>ELEMENTS FINANCIERS - BILANS</h1>
|
||||
<div class="paragraph">
|
||||
<table class="identite">
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Numéro identifiant Siren</td>
|
||||
<td width="350" class="StyleInfoData"><?=$this->SirenTexte($this->siren)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Raison Sociale</td>
|
||||
<td width="350" class="StyleInfoData"><?=$this->raisonSociale?></td>
|
||||
</tr>
|
||||
|
||||
<?php if($this->haveLiasse):?>
|
||||
<form method="post" action="<?=$this->url(array('controller' => 'finance', 'action' => 'liasse', 'siret' => $this->siret, 'id' => $this->id))?>">
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Valeurs exprimées en</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<select name="unit">
|
||||
<?php foreach ($this->unit as $id => $titre):?>
|
||||
<option value="<?=$id?>"<?=($id==$this->unite)? ' selected': '';?>><?=$titre?></option>
|
||||
<?php endforeach;?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Millesime</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<select name="date">
|
||||
<?php foreach ($this->type as $champType => $name):?>
|
||||
<?php foreach ($this->liste[$champType] as $element):?>
|
||||
<option value="<?=$element.':'.$champType?>"<?=($this->date == $element && $champType == $this->champType)? ' selected': '';?>>
|
||||
<?=$this->dateFunction->dateT('Ymd', 'd/m/Y', $element).' '.$name;?>
|
||||
</option>
|
||||
<?php endforeach;?>
|
||||
<?php endforeach;?>
|
||||
</select>
|
||||
<input type="submit" value="OK" />
|
||||
</td>
|
||||
</tr>
|
||||
</form>
|
||||
<?php endif;?>
|
||||
|
||||
<?php if ($this->edition) {?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td colspan="2">
|
||||
<?php if ($this->haveLiasse) {?>
|
||||
<a href="<?=$this->url(array('controller'=>'saisie', 'action'=>'liasse', 'siret'=>$this->siren, 'selection'=>$this->date.':'.$this->champType))?>">
|
||||
Corriger le bilan sélectionné</a><br/> ou <?php }?>
|
||||
Saisir une nouvelle liasse au format
|
||||
<a href="<?=$this->url(array('controller'=>'saisie', 'action'=>'liasse', 'siret'=>$this->siren, 'selection'=>'NEW:N'))?>">Normal (2050)</a>,
|
||||
<a href="<?=$this->url(array('controller'=>'saisie', 'action'=>'liasse', 'siret'=>$this->siren, 'selection'=>'NEW:C'))?>">Consolidé (2050)</a>,
|
||||
<a href="<?=$this->url(array('controller'=>'saisie', 'action'=>'liasse', 'siret'=>$this->siren, 'selection'=>'NEW:S'))?>">Simplifié (2033)</a>
|
||||
<script>
|
||||
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<?php }?>
|
||||
|
||||
<?php if ($this->exportxls) {?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td colspan="2">
|
||||
<a href="<?=$this->url(array(
|
||||
'controller' => 'finance',
|
||||
'action' => 'liassexls',
|
||||
'siret' => $this->siret,
|
||||
'unite' => $this->unite,
|
||||
'type' => $this->champType,
|
||||
'date' => $this->dateCloture,
|
||||
))?>" id="xls">Exporter en fichier Excel.</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php }?>
|
||||
<?php if ($this->saisiebilan) {?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td colspan="2" width="550" class="StyleInfoData">
|
||||
<a id="bilanClient" href="<?=$this->url(array(
|
||||
'controller'=>'finance',
|
||||
'action'=>'saisiebilan',
|
||||
'siren'=>$this->siren
|
||||
), null, true)?>" title="Envoi du bilan">
|
||||
Vous possèdez un bilan plus récent
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php }?>
|
||||
<?php if ($this->surveillance) {?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td colspan="2" width="550" class="StyleInfoData">
|
||||
<?=$this->action('infos','surveillance', null, array(
|
||||
'source' => 'bilans',
|
||||
'siret' => $this->siret
|
||||
))?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php }?>
|
||||
<?php if ( $this->champType == 'S' ):?>
|
||||
<tr>
|
||||
<td colspan="3">Ce bilan a été déposé au format réel simplifié mais vous est livré au format réel normal pour des raisons de standardisation.</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="paragraph">
|
||||
<?php if(empty($this->date)):?>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td colspan="2" class="StyleInfoLib" width="200">Aucun bilan disponible.</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php else:?>
|
||||
|
||||
<div class="tabbed_area">
|
||||
<ul class="tabs">
|
||||
<?php foreach ($this->ancres as $id => $name):?>
|
||||
<li><a href="#<?=$id?>" title="<?=$name?>" class="tab"><?=$name?></a></li>
|
||||
<?php endforeach;?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
|
||||
<?php if( in_array($this->champType, array('S', 'N', 'C')) ):?>
|
||||
|
||||
<?php echo $this->partial('finance/liasse/2050.phtml', array(
|
||||
'liasse' => $this->liasse,
|
||||
'dateCloture' => $this->dateFunction->dateT('Ymd', 'd/m/Y', $this->dateCloture),
|
||||
'dateCloturePre' => $this->dateFunction->dateT('Ymd', 'd/m/Y', $this->dateCloturePre),
|
||||
'dureesMois' => $this->dureesMois,
|
||||
'dureesMoisPre'=> $this->dureesMoisPre,
|
||||
'unite'=> $this->unite,
|
||||
));?>
|
||||
|
||||
<?php elseif ($this->champType == 'B'):?>
|
||||
|
||||
<?php echo $this->partial('finance/liasse/banque.phtml', array(
|
||||
'liasse' => $this->liasse,
|
||||
'dateCloture' => $this->dateFunction->dateT('Ymd', 'd/m/Y', $this->dateCloture),
|
||||
'dateCloturePre' => $this->dateFunction->dateT('Ymd', 'd/m/Y', $this->dateCloturePre),
|
||||
'dureesMois' => $this->dureesMois,
|
||||
'dureesMoisPre'=> $this->dureesMoisPre,
|
||||
'unite'=> $this->unite,
|
||||
));?>
|
||||
|
||||
<?php elseif ($this->champType == 'A'):?>
|
||||
|
||||
<?php echo $this->partial('finance/liasse/assurance.phtml', array(
|
||||
'liasse' => $this->liasse,
|
||||
'dateCloture' => $this->dateFunction->dateT('Ymd', 'd/m/Y', $this->dateCloture),
|
||||
'dateCloturePre' => $this->dateFunction->dateT('Ymd', 'd/m/Y', $this->dateCloturePre),
|
||||
'dureesMois' => $this->dureesMois,
|
||||
'dureesMoisPre'=> $this->dureesMoisPre,
|
||||
'unite'=> $this->unite,
|
||||
));?>
|
||||
|
||||
<?php endif;?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php echo $this->render('cgu.phtml', $this->cgu);?>
|
||||
</div>
|
File diff suppressed because it is too large
Load Diff
@ -1,79 +0,0 @@
|
||||
<a name="actif">Actif</a>
|
||||
<table id="LiasseTable">
|
||||
<tr>
|
||||
<td align="right" colspan="2"><b>Exercices, clos le :</b></td>
|
||||
<td align="right"><b><?php echo $this->dateCloture;?></b></td>
|
||||
<td align="right"><b><?php echo $this->dateCloturePre;?></b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Placements</td>
|
||||
<td align="center">AA1</td>
|
||||
<td align="right"><?php echo $this->liasse['AA1'];?></td>
|
||||
<td align="right"><?php echo $this->liasse['NA1'];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bold">TOTAL ACTIF</td>
|
||||
<td align="center">AA2</td>
|
||||
<td align="right"><?php echo $this->liasse['AA2'];?></td>
|
||||
<td align="right"><?php echo $this->liasse['NA2'];?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="passif">Passif</a>
|
||||
<table id="LiasseTable">
|
||||
<tr>
|
||||
<td align="right" colspan="2"><b>Exercices, clos le :</b></td>
|
||||
<td align="right"><b><?php echo $this->dateCloture;?></b></td>
|
||||
<td align="right"><b><?php echo $this->dateCloturePre;?></b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Capitaux propres</td>
|
||||
<td align="center">AP1</td>
|
||||
<td align="right"><?php echo $this->liasse['AP1'];?></td>
|
||||
<td align="right"><?php echo $this->liasse['NP1'];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Provisions techniques brutes</td>
|
||||
<td align="center">AP2</td>
|
||||
<td align="right"><?php echo $this->liasse['AP2'];?></td>
|
||||
<td align="right"><?php echo $this->liasse['NP2'];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bold">TOTAL PASSIF</td>
|
||||
<td align="center">AP3</td>
|
||||
<td align="right"><?php echo $this->liasse['AP3'];?></td>
|
||||
<td align="right"><?php echo $this->liasse['NP3'];?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
<a name="compteDeResultat">Compte de resultat</a>
|
||||
<table id="LiasseTable">
|
||||
<tr>
|
||||
<td align="right" colspan="2"><b>Exercices, clos le :</b></td>
|
||||
<td align="right"><b><?php echo $this->dateCloture;?></b></td>
|
||||
<td align="right"><b><?php echo $this->dateCloturePre;?></b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Primes - cotisations acquises</td>
|
||||
<td align="center">AR1</td>
|
||||
<td align="right"><?php echo $this->liasse['AR1'];?></td>
|
||||
<td align="right"><?php echo $this->liasse['NR1'];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Charges des sinistres</td>
|
||||
<td align="center">AR2</td>
|
||||
<td align="right"><?php echo $this->liasse['AR2'];?></td>
|
||||
<td align="right"><?php echo $this->liasse['NR2'];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Résultat technique</td>
|
||||
<td align="center">AR3</td>
|
||||
<td align="right"><?php echo $this->liasse['AR3'];?></td>
|
||||
<td align="right"><?php echo $this->liasse['NR3'];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Résultat de l'exercice</td>
|
||||
<td align="center">AR4</td>
|
||||
<td align="right"><?php echo $this->liasse['AR4'];?></td>
|
||||
<td align="right"><?php echo $this->liasse['NR5'];?></td>
|
||||
</tr>
|
||||
</table>
|
@ -1,114 +0,0 @@
|
||||
<a name="actif">Actif</a>
|
||||
<table id="LiasseTable">
|
||||
<tr>
|
||||
<td align="right" colspan="2"><b>Exercices, clos le :</b></td>
|
||||
<td align="right"><b><?php echo $this->dateCloture;?></b></td>
|
||||
<td align="right"><b><?php echo $this->dateCloturePre;?></b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Créances sur les établissements de crédit</td>
|
||||
<td align="center">BA1</td>
|
||||
<td align="right"><?php echo $this->liasse['BA1'];?></td>
|
||||
<td align="right"><?php echo $this->liasse['NA1'];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Créances sur la clientèle</td>
|
||||
<td align="center">BA2</td>
|
||||
<td align="right"><?php echo $this->liasse['BA2'];?></td>
|
||||
<td align="right"><?php echo $this->liasse['NA2'];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bold">TOTAL ACTIF</td>
|
||||
<td align="center">BA3</td>
|
||||
<td align="right"><?php echo $this->liasse['BA3'];?></td>
|
||||
<td align="right"><?php echo $this->liasse['NA3'];?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="passif">Passif</a>
|
||||
<table id="LiasseTable">
|
||||
<tr>
|
||||
<td align="right" colspan="2"><b>Exercices, clos le :</b></td>
|
||||
<td align="right"><b><?php echo $this->dateCloture;?></b></td>
|
||||
<td align="right"><b><?php echo $this->dateCloturePre;?></b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Dettes envers les établissements de crédit</td>
|
||||
<td align="center">BP1</td>
|
||||
<td align="right"><?php echo $this->liasse['BP1'];?></td>
|
||||
<td align="right"><?php echo $this->liasse['NP1'];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Comptes créditeurs à la clientèle</td>
|
||||
<td align="center">BP2</td>
|
||||
<td align="right"><?php echo $this->liasse['BP2'];?></td>
|
||||
<td align="right"><?php echo $this->liasse['NP2'];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Capital souscrit</td>
|
||||
<td align="center">BP3</td>
|
||||
<td align="right"><?php echo $this->liasse['BP3'];?></td>
|
||||
<td align="right"><?php echo $this->liasse['NP3'];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Primes d'émissions</td>
|
||||
<td align="center">BP4</td>
|
||||
<td align="right"><?php echo $this->liasse['BP4'];?></td>
|
||||
<td align="right"><?php echo $this->liasse['NP4'];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Réserves</td>
|
||||
<td align="center">BP5</td>
|
||||
<td align="right"><?php echo $this->liasse['BP5'];?></td>
|
||||
<td align="right"><?php echo $this->liasse['NP5'];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Ecarts de réevaluation</td>
|
||||
<td align="center">BP6</td>
|
||||
<td align="right"><?php echo $this->liasse['BP6'];?></td>
|
||||
<td align="right"><?php echo $this->liasse['NP6'];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Report à nouveau</td>
|
||||
<td align="center">BP7</td>
|
||||
<td align="right"><?php echo $this->liasse['BP7'];?></td>
|
||||
<td align="right"><?php echo $this->liasse['NP7'];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Résultat de l'exercice</td>
|
||||
<td align="center">BP8</td>
|
||||
<td align="right"><?php echo $this->liasse['BP8'];?></td>
|
||||
<td align="right"><?php echo $this->liasse['NP8'];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bold">TOTAL PASSIF</td>
|
||||
<td align="center">BP9</td>
|
||||
<td align="right"><?php echo $this->liasse['BP9'];?></td>
|
||||
<td align="right"><?php echo $this->liasse['NP9'];?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="compteDeResultat">COMPTE DE RESULTAT</a>
|
||||
<table id="LiasseTable">
|
||||
<tr>
|
||||
<td align="right" colspan="2"><b>Exercices, clos le :</b></td>
|
||||
<td align="right"><b><?php echo $this->dateCloture;?></b></td>
|
||||
<td align="right"><b><?php echo $this->dateCloturePre;?></b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Intérêts et produits assimilés</td>
|
||||
<td align="center">BR1</td>
|
||||
<td align="right"><?php echo $this->liasse['BR1'];?></td>
|
||||
<td align="right"><?php echo $this->liasse['NR1'];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Intérêts et charges assimilées</td>
|
||||
<td align="center">BR2</td>
|
||||
<td align="right"><?php echo $this->liasse['BR2'];?></td>
|
||||
<td align="right"><?php echo $this->liasse['NR2'];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Résultat de l'exercice</td>
|
||||
<td align="center">BR3</td>
|
||||
<td align="right"><?php echo $this->liasse['BR3'];?></td>
|
||||
<td align="right"><?php echo $this->liasse['NR3'];?></td>
|
||||
</tr>
|
||||
</table>
|
@ -1,5 +0,0 @@
|
||||
<?php if (!empty($this->file)) { ?>
|
||||
<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 }?>
|
@ -1,151 +0,0 @@
|
||||
<?php if (empty($this->AutrePage)):?>
|
||||
<div id="center">
|
||||
<?php endif;?>
|
||||
|
||||
<?php if (empty($this->AutrePage)):?>
|
||||
<h1>RATIOS</h1>
|
||||
<div class="paragraph">
|
||||
<table class="identite">
|
||||
<tr>
|
||||
<td width="30"></td>
|
||||
<td class="StyleInfoLib" width="200">Numéro identifiant Siren</td>
|
||||
<td class="StyleInfoData" width="340"><?=$this->SirenTexte($this->siret);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"></td>
|
||||
<td class="StyleInfoLib" width="200">Raison Sociale</td>
|
||||
<td class="StyleInfoData" width="340"><?=$this->raisonSociale;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"></td>
|
||||
<td class="StyleInfoLib" width="200">Secteur d'activité </td>
|
||||
<td class="StyleInfoData" width="340"><?=$this->naf?> - <?=$this->nafLib?></td>
|
||||
</tr>
|
||||
<?php if (isset($this->tabResult)){?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Type de bilans</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?php if ($this->nbBilanC==0){?>
|
||||
Réel normal ou Simplifié
|
||||
<?php } elseif ($this->nbBilanN==0){?>
|
||||
Consolidé
|
||||
<?php } else {?>
|
||||
<form name="selectBilan">
|
||||
<select name="typeBilan">
|
||||
<option value="N"<?=($this->typeBilan=='N')? ' selected' : '';?>>Réel normal ou Simplifié</option>
|
||||
<option value="C"<?=($this->typeBilan=='C')? ' selected' : '';?>>Consolidé</option>
|
||||
</select>
|
||||
</form>
|
||||
<?php }?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"></td>
|
||||
<td width="200" class="StyleInfoLib">Millésime</td>
|
||||
<td width="340" class="StyleInfoData">
|
||||
<form>
|
||||
<input type="hidden" name="typeBilan" value="<?=$this->typeBilan?>" />
|
||||
<select name="mil">
|
||||
<?php foreach ($this->annees as $annee => $value){?>
|
||||
<option value="<?=$annee?>"<?=($this->mil==$annee) ? ' selected' : '';?>><?=$value?></option>
|
||||
<?php }?>
|
||||
</select>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"></td>
|
||||
<td class="StyleInfoLib" width="200">Durée du bilan</td>
|
||||
<td class="StyleInfoData" width="340"><?=$this->duree?> Mois</td>
|
||||
</tr>
|
||||
<?php } else {?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td colspan="2" class="StyleInfoLib" width="200">Aucun bilan disponible.</td>
|
||||
<td class="StyleInfoData" width="340"></td>
|
||||
</tr>
|
||||
<?php }?>
|
||||
</table>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
|
||||
<div class="paragraph">
|
||||
|
||||
<?php if(!isset($this->tabResult)){?>
|
||||
|
||||
<?php } else {?>
|
||||
<table id="ratios" style="border-collapse:collapse">
|
||||
<tbody>
|
||||
<?php foreach ($this->tabResult as $item) { ?>
|
||||
<?php if (isset($item['ratio'])) { ?>
|
||||
<tr>
|
||||
<td>
|
||||
<a class="tooltip" title="<?=$item['comment']?>">
|
||||
<?=$item['titre']?><br/><?=$item['stitre']?></a>
|
||||
</td>
|
||||
<td class="right"><?=$item['entrep']?></td>
|
||||
<td class="right"><?=$item['secteur']?></td>
|
||||
<td class="position">
|
||||
<a class="rTip"
|
||||
href=""
|
||||
rel="<?=$this->url(array(
|
||||
'controller'=>'finance',
|
||||
'action'=>'ratiosgraph',
|
||||
'siret' => $this->siret,
|
||||
'id' => $this->id,
|
||||
'ratio' => $item['ratio']
|
||||
))?>" name="<?=$item['titre']?>">
|
||||
<?=$item['position']?>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } else { ?>
|
||||
<tr class="subhead">
|
||||
<td class="center italique"><?=$item['titre']?></td>
|
||||
<td>Entreprise</td>
|
||||
<td>Secteur</td>
|
||||
<td>Position</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php
|
||||
/*
|
||||
} else if ($ratio == $item['ratio']) {
|
||||
|
||||
$row .= '<tr class="subhead">'."\n".
|
||||
'<td class="center italique">'.
|
||||
$tabRatio[$item['parent']]['titre'].'</td>'."\n".
|
||||
'<td>Entreprise</td>'."\n".
|
||||
'<td>Secteur</td>'."\n".
|
||||
'<td>Position</td>'."\n".
|
||||
'</tr>'."\n";
|
||||
$row .= '<tr>'."\n".
|
||||
'<td><a tooltip="'.
|
||||
wrapComment($ratiosInfos[$item['ratio']]['commentaires']).
|
||||
'">'.$item['titre'].'<br/>'.$item['stitre'].'</a></td>'."\n".
|
||||
'<td class="right">'.
|
||||
dRatio($bilan, $item['ratio']).'</td>'."\n".
|
||||
'<td class="right">'.
|
||||
dSecteur($bilan, $item['ratio']).'</td>'."\n".
|
||||
'<td class="position">'."\n".
|
||||
'<a href="#" name="'.$item['titre'].'">'."\n".
|
||||
dPosition($bilan, $item['ratio'], $item['position'])."\n".
|
||||
'</a>'."\n".
|
||||
'</td>'."\n".
|
||||
'</tr>'."\n";
|
||||
}
|
||||
*/
|
||||
?>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<?php }?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php if (empty($this->AutrePage)):?>
|
||||
<?=$this->render('cgu.phtml', $this->cgu)?>
|
||||
</div>
|
||||
<?php endif;?>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user