Compare commits
13 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
12bd937a6c | ||
|
4d4df8e6cd | ||
|
c531173db2 | ||
|
a04ea0844d | ||
|
15496c7e1a | ||
|
00b22c28e5 | ||
|
ef3842021f | ||
|
cf5d50ea2e | ||
|
d047c57d67 | ||
|
4f28b3fcb8 | ||
|
1f90b825f4 | ||
|
a6be515460 | ||
|
c709e9c659 |
@ -123,9 +123,9 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||
if (APPLICATION_ENV == 'development') {
|
||||
$level = Logger::DEBUG;
|
||||
} else {
|
||||
$level = Logger::INFO;
|
||||
$level = Logger::NOTICE;
|
||||
}
|
||||
$log->pushHandler(new StreamHandler($logFile), $level);
|
||||
$log->pushHandler(new StreamHandler($logFile, $level));
|
||||
|
||||
// Processor
|
||||
$log->pushProcessor(new IntrospectionProcessor());
|
||||
|
@ -124,10 +124,9 @@ class IdentiteController extends Zend_Controller_Action
|
||||
);
|
||||
$datemajTexte = $dateDerMaj = '';
|
||||
$datemajTexte.= '<table>';
|
||||
foreach ( $tabDate as $dateId => $dateLib ) {
|
||||
if ( isset($infos->{$dateId})
|
||||
&& !empty($infos->{$dateId})
|
||||
&& $infos->{$dateId}!='0000-00-00') {
|
||||
foreach ($tabDate as $dateId => $dateLib ) {
|
||||
if (isset($infos->{$dateId}) && !empty($infos->{$dateId})
|
||||
&& $infos->{$dateId}!='0000-00-00') {
|
||||
|
||||
if ( $dateId == 'DateMajID') {
|
||||
$date = new Zend_Date($infos->DateMajID, 'yyyy-MM-dd');
|
||||
@ -827,7 +826,7 @@ class IdentiteController extends Zend_Controller_Action
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$request = $this->getRequest();
|
||||
|
||||
//@todo :
|
||||
//@todo : mise a jour reguliere
|
||||
$pays = array(
|
||||
'FRA' => "France",
|
||||
'AND' => "Andorre",
|
||||
@ -1237,55 +1236,49 @@ class IdentiteController extends Zend_Controller_Action
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
||||
// --- En environement de preprod, on envoi sur le site
|
||||
if (APPLICATION_ENV == 'staging') {
|
||||
$this->redirect('http://avis-situation-sirene.insee.fr/');
|
||||
}
|
||||
// --- Téléchargement du fichier et distribution
|
||||
else {
|
||||
$avis = new Scores_Insee_AvisSituation($this->siret);
|
||||
if ( !$avis->erreur() ) {
|
||||
$avis->erreurcpt('raz');
|
||||
$file = $avis->get();
|
||||
if ($file === false) {
|
||||
$avis->erreurcpt('plus');
|
||||
echo $avis->erreurmsg();
|
||||
} else {
|
||||
// --- Envoi du fichier sur la sortie standard
|
||||
$content_type = 'application/pdf';
|
||||
if ( file_exists($file) ) {
|
||||
$ws = new WsScores();
|
||||
$ws->setLog('avis_situation', $this->siret, 0, '');
|
||||
$modules = array(); //apache_get_modules();
|
||||
if (in_array('mod_xsendfile', $modules)) {
|
||||
header ('X-Sendfile: ' . $file);
|
||||
header ('Content-Type: ' . $content_type);
|
||||
header ('Content-Disposition: attachment; filename="' . $content_type . '"');
|
||||
exit;
|
||||
} else {
|
||||
ini_set('zlib.output_compression', '0');
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-Type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($file)));
|
||||
header('Content-Disposition: attachment; filename="' . basename($file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
readfile($file);
|
||||
exit;
|
||||
}
|
||||
$avis = new Scores_Insee_AvisSituation($this->siret);
|
||||
if ( !$avis->erreur() ) {
|
||||
$avis->erreurcpt('raz');
|
||||
$file = $avis->get();
|
||||
if ($file === false) {
|
||||
$avis->erreurcpt('plus');
|
||||
echo $avis->erreurmsg();
|
||||
} else {
|
||||
// --- Envoi du fichier sur la sortie standard
|
||||
$content_type = 'application/pdf';
|
||||
if ( file_exists($file) ) {
|
||||
$ws = new WsScores();
|
||||
$ws->setLog('avis_situation', $this->siret, 0, '');
|
||||
$modules = array(); //apache_get_modules();
|
||||
if (in_array('mod_xsendfile', $modules)) {
|
||||
header ('X-Sendfile: ' . $file);
|
||||
header ('Content-Type: ' . $content_type);
|
||||
header ('Content-Disposition: attachment; filename="' . $content_type . '"');
|
||||
exit;
|
||||
} else {
|
||||
echo "Impossible de charger le fichier";
|
||||
ini_set('zlib.output_compression', '0');
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-Type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($file));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($file)));
|
||||
header('Content-Disposition: attachment; filename="' . basename($file) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
readfile($file);
|
||||
exit;
|
||||
}
|
||||
} else {
|
||||
echo "Impossible de charger le fichier";
|
||||
}
|
||||
} else {
|
||||
if ($avis->nberreur()==5){
|
||||
$avis->mailerreur();
|
||||
}
|
||||
$avis->erreurcpt('plus');
|
||||
echo $avis->erreurmsg();
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ($avis->nberreur()==5){
|
||||
$avis->mailerreur();
|
||||
}
|
||||
$avis->erreurcpt('plus');
|
||||
echo $avis->erreurmsg();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -477,7 +477,7 @@ class JuridiqueController extends Zend_Controller_Action
|
||||
$this->view->assign('message', $infos);
|
||||
}
|
||||
|
||||
$objAnnonces = $infos->result->item;
|
||||
$objAnnonces = isset($infos->result->item)?$infos->result->item:null;
|
||||
$annonces = array();
|
||||
if (count($objAnnonces)>0) {
|
||||
foreach ( $objAnnonces as $item ) {
|
||||
|
@ -103,14 +103,15 @@ class MandataireController extends Zend_Controller_Action
|
||||
$tabMandataires = $request->getParam('tabMandataires');
|
||||
}
|
||||
|
||||
//Les tribunaux
|
||||
$tmp = $ws->getTribunaux(array('C','I','G')); //
|
||||
|
||||
$tribunaux = $tmp->result->item;
|
||||
|
||||
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é.';
|
||||
}
|
||||
|
@ -493,7 +493,7 @@ class SaisieController extends Zend_Controller_Action
|
||||
$this->view->assign('ListeTribunaux', $listeTribunaux);
|
||||
/**
|
||||
* table des événements en dur
|
||||
* @todo verifier si liste à jour
|
||||
* @todo verifier si liste à jour derniere maj : ?
|
||||
*/
|
||||
$selectEvent = array(
|
||||
'1100', '1101' , '1200', '1201', '1300', '1301', '1302', '1303', '1304', '1305', '1306',
|
||||
@ -2367,7 +2367,7 @@ class SaisieController extends Zend_Controller_Action
|
||||
$message = '';
|
||||
$getcutoff = null;
|
||||
|
||||
if ( $request->isXmlHttpRequest() ) {
|
||||
if ( $request->isXmlHttpRequest() ) {
|
||||
$this->_helper->layout()->disableLayout();
|
||||
|
||||
$params = $request->getParams();
|
||||
@ -2415,7 +2415,8 @@ class SaisieController extends Zend_Controller_Action
|
||||
else {
|
||||
|
||||
if ( $request->isPost() ) {
|
||||
// check values one more time
|
||||
$message='';
|
||||
// check values one more time
|
||||
$paramlist = array(
|
||||
'siren' => 'Siren',
|
||||
'encours' => 'Encours',
|
||||
@ -2434,7 +2435,7 @@ class SaisieController extends Zend_Controller_Action
|
||||
}
|
||||
}
|
||||
// end checking values
|
||||
|
||||
if(!isset($params['delete'])) $params['delete']=false;
|
||||
if ( $message == '' ) {
|
||||
$message = $ws->setScoreCutoff(
|
||||
$params['siren'],
|
||||
@ -2907,6 +2908,9 @@ class SaisieController extends Zend_Controller_Action
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$request = $this->getRequest();
|
||||
$siren = $request->getParam('siren', null);
|
||||
if(empty($siren)){
|
||||
throw(new Exception('Parametres errones'));
|
||||
}
|
||||
$mode = $request->getParam('mode');
|
||||
$guichetMod = $request->getParam('guichetMod');
|
||||
$banqueMod = $request->getParam('banqueMod');
|
||||
@ -2922,7 +2926,12 @@ class SaisieController extends Zend_Controller_Action
|
||||
$ws = new Scores_Ws_Client('saisie', '0.2');
|
||||
$result = $ws->getRib($params);
|
||||
}
|
||||
$this->view->assign('siren', $siren);
|
||||
$tab=(array)json_decode($result);
|
||||
$oldvals=implode('####',$tab);
|
||||
//$olddvals->siren=$siren;
|
||||
//var_dump($oldvals);die;
|
||||
$this->view->assign('oldvals', urlencode($result));
|
||||
$this->view->assign('siren', $siren);
|
||||
$this->view->assign('mode', $mode);
|
||||
$this->view->assign('banques', $result);
|
||||
|
||||
@ -2935,6 +2944,7 @@ class SaisieController extends Zend_Controller_Action
|
||||
public function ribansaveAction(){
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$request = $this->getRequest();
|
||||
//var_dump($request->getParams());die;
|
||||
$params= new stdClass();
|
||||
$values=array(
|
||||
'siren' => str_replace(' ', '',$request->getParam('siren')),
|
||||
@ -2943,47 +2953,22 @@ class SaisieController extends Zend_Controller_Action
|
||||
'numCompte' => str_replace(' ', '',$request->getParam('num_compte')),
|
||||
'bic' => str_replace(' ', '',$request->getParam('bic_swift')),
|
||||
'iban' => str_replace(' ', '',$request->getParam('iban')),
|
||||
'oldvals' => urldecode($request->getParam('oldvals')),
|
||||
'mode' => $request->getParam('mode'),
|
||||
);
|
||||
$params->infos=json_encode($values);
|
||||
//echo $values['oldvals'];die;
|
||||
|
||||
$ws = new Scores_Ws_Client('saisie', '0.2');
|
||||
$result = $ws->setRib($params);
|
||||
if($result){
|
||||
if($result==true or $result==1){
|
||||
echo 'Opération enregistrée';
|
||||
}else {
|
||||
echo 'Opération échouée ';
|
||||
echo 'Opération non enregistrée '.$result;
|
||||
}
|
||||
die;
|
||||
}
|
||||
|
||||
public function testwsAction(){
|
||||
$c = Zend_Registry::get('config');
|
||||
$wsdl = 'http://webservice.sd.dev/saisie/v0.2?wsdl-auto';
|
||||
$options = array( '0.2' => array(
|
||||
'setRib' => array(
|
||||
'debug' => true,
|
||||
'log' => 'mail',
|
||||
),
|
||||
),
|
||||
);
|
||||
$options['features'] = SOAP_USE_XSI_ARRAY_TYPE + SOAP_SINGLE_ELEMENT_ARRAYS;
|
||||
$options['compression'] = SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP | SOAP_COMPRESSION_DEFLATE;
|
||||
$options['login'] = 'cdelbos';
|
||||
$options['password'] = 'coucou';
|
||||
if (APPLICATION_ENV == 'development'){
|
||||
$options['cache_wsdl'] = WSDL_CACHE_NONE;
|
||||
}
|
||||
$options['trace'] = true;
|
||||
$options['encoding'] = 'utf-8';
|
||||
$client = false;
|
||||
$client = new SoapClient($wsdl, $options);
|
||||
$params = new stdClass();
|
||||
$params->infos=json_encode(array('siren' => '809613144','mode' => 'add', 'codeBanque' => '20041'));
|
||||
$reponse = $client->setRib($params);
|
||||
var_dump($reponse);die;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<div id="center">
|
||||
<?php if ($message!='') { ?>
|
||||
<?php if (isset($message) && $message!='') { ?>
|
||||
<div style="margin:5px; padding: 0pt 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>
|
||||
<?=$message?></p>
|
||||
|
@ -26,17 +26,17 @@ if ( $this->saisie['source']=='JT' ){ $select = 'selected'; }
|
||||
|
||||
<div id="dateParution">
|
||||
<label>Date de parution <font color="Red">*</font></label>
|
||||
<input class="date" type="text" name="jugement[dateParution]" size="10" maxlength="10" value="<?=$this->saisie['dateParution']?>" />
|
||||
<input class="date" type="text" name="jugement[dateParution]" size="10" maxlength="10" value="<?=isset($this->saisie['dateParution'])?$this->saisie['dateParution']:''?>" />
|
||||
<span class="left">(Format JJ/MM/AAAA)</span>
|
||||
</div>
|
||||
|
||||
<div id="numParution">
|
||||
<label>N° de parution</label>
|
||||
<input type="text" name="jugement[numParution]" size="10" maxlength="10" value="<?=$this->saisie['numParution']?>" />
|
||||
<input type="text" name="jugement[numParution]" size="10" maxlength="10" value="<?=isset($this->saisie['numParution'])?$this->saisie['numParution']:''?>" />
|
||||
</div>
|
||||
|
||||
<label>Date évènement / jugement<font color="Red">*</font></label>
|
||||
<input class="date" type="text" name="jugement[dateJuge]" size="10" maxlength="10" value="<?=$this->saisie['dateJugement']?>" />
|
||||
<input class="date" type="text" name="jugement[dateJuge]" size="10" maxlength="10" value="<?=isset($this->saisie['dateJugement'])?$this->saisie['dateJugement']:''?>" />
|
||||
<span class="left">(Format JJ/MM/AAAA)</span>
|
||||
|
||||
<label>Tribunal <font color="Red">*</font></label>
|
||||
|
@ -16,6 +16,7 @@ $lbanque = (array)json_decode($this->banques);
|
||||
<form name="saveRiban" action="<?=$this->url(array('controller'=>'saisie', 'action'=>'ribansave'),null, true)?>" method="post">
|
||||
<input type="hidden" name="mode" value="<?=$this->mode?>" />
|
||||
<input type="hidden" name="siren" value="<?=$this->siren?>" />
|
||||
<input type="hidden" name="oldvals" value="<?=$this->oldvals?>" />
|
||||
<?php if($this->mode == 'add' || $this->mode == 'edit'){?>
|
||||
<div class="fieldgrp">
|
||||
<label>Siren</label>
|
||||
@ -163,8 +164,8 @@ $('#dialog').dialog({ buttons: [
|
||||
var form = $('form[name=saveRiban]');
|
||||
$.post(form.attr('action'), form.serialize(), function(data){
|
||||
form.replaceWith(data);
|
||||
}).done(function(data){ alert(data);
|
||||
}).fail(function(){ alert('Unknow error'); });
|
||||
}).done(function(data){ $('.ui-dialog-buttonset').hide();
|
||||
}).fail(function(){ });
|
||||
} },
|
||||
{ text: "Annuler", click: function() { $(this).dialog("close"); } }
|
||||
] });
|
||||
|
@ -31,10 +31,11 @@ if ( empty($this->source) ){
|
||||
<h2>Traitements de masse</h2>
|
||||
<div class="paragraph">
|
||||
<?=$this->action('surveillancecsv', 'surveillance')?>
|
||||
<!--
|
||||
<p class="options">Demande de surveillance en série :
|
||||
<a class="dialogsurv" href="/surveillance/surveillanceserie" title="Demande de surveillance en série ">
|
||||
OK</a></p>
|
||||
|
||||
-->
|
||||
</div>
|
||||
<h2>Options de recherche</h2>
|
||||
|
||||
|
@ -255,7 +255,7 @@ class Annonces
|
||||
} else {
|
||||
$tabSource = explode('-', $ann->BodaccCode);
|
||||
$source = $tabSource[0];
|
||||
$idSource = $tabSource[1];
|
||||
$idSource = isset($tabSource[1])?$tabSource[1]:null;
|
||||
if ($source[0] == 'B') {
|
||||
$title = 'Source BODACC ' . $ann->BodaccNum . ' ' .
|
||||
substr($source,-1) . ' ' .
|
||||
@ -316,7 +316,7 @@ class Annonces
|
||||
$lib.= $even->LibEven;
|
||||
$tabSource = explode('-', $ann->BodaccCode);
|
||||
$source = $tabSource[0];
|
||||
$idSource = $tabSource[1];
|
||||
$idSource = isset($tabSource[1])?$tabSource[1]:null;
|
||||
$numEven = $even->CodeEven*1;
|
||||
if ($numEven>3000 && $numEven<3999) {
|
||||
if (isset($ann->dateEffet)){
|
||||
|
@ -123,10 +123,11 @@ class Scores_Session_Entreprise
|
||||
|
||||
protected function getInfoEntrep($siret, $id = 0)
|
||||
{
|
||||
$this->logger->info('getInfoEntrep');
|
||||
require_once 'Scores/WsScores.php';
|
||||
$ws = new WsScores();
|
||||
$etab = $ws->getIdentiteLight($siret, $id);
|
||||
$ws = new Scores_Ws_Client('interne', '0.6');
|
||||
$params = new stdClass();
|
||||
$params->siret = $this->siret;
|
||||
$params->id = $this->id;
|
||||
$etab= $ws->getIdentiteLight($params);
|
||||
$this->setSession($etab);
|
||||
}
|
||||
|
||||
|
@ -147,7 +147,7 @@ class Scores_Ws_Client extends Zend_Soap_Client
|
||||
}
|
||||
|
||||
$methodConfig = $this->config[$name];
|
||||
$this->logger->info(print_r($methodConfig,1));
|
||||
|
||||
// --- Cache
|
||||
$cacheEnable = false;
|
||||
if ( array_key_exists('cache', $methodConfig) ) {
|
||||
@ -172,17 +172,22 @@ class Scores_Ws_Client extends Zend_Soap_Client
|
||||
|
||||
// --- Debug
|
||||
if ( array_key_exists('debug', $methodConfig) ) {
|
||||
$this->logger->info(__CLASS__.'->'.$name);
|
||||
$this->logger->info(print_r($arguments,1));
|
||||
$this->logger->info(__CLASS__.'->'.$name.':'.print_r($arguments,1));
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
$response = parent::__call($name, $arguments);
|
||||
|
||||
// --- Response vide
|
||||
if ($response == '') {
|
||||
$this->logger->error(__CLASS__.'->'.$name.':'.print_r($arguments, 1));
|
||||
return false;
|
||||
}
|
||||
|
||||
// --- Debug
|
||||
if ( array_key_exists('debug', $methodConfig) ) {
|
||||
$this->logger->info(print_r($response,1));
|
||||
$this->logger->info(__CLASS__.'->'.$name.':'.print_r($response,1));
|
||||
}
|
||||
|
||||
// --- Cache
|
||||
@ -196,13 +201,13 @@ class Scores_Ws_Client extends Zend_Soap_Client
|
||||
|
||||
// --- Debug
|
||||
if ( array_key_exists('debug', $methodConfig) ) {
|
||||
$this->logger->info($fault->faultcode.' - '.$fault->faultstring);
|
||||
$this->logger->error(__CLASS__.'->'.$name.':'.$fault->faultcode.' - '.$fault->faultstring);
|
||||
}
|
||||
|
||||
// --- Gestion des SOAP fault
|
||||
if ( array_key_exists('errorMsg', $methodConfig) ) {
|
||||
if ( in_array($fault->faultcode, $methodConfig['errorMsg']) ) {
|
||||
$this->logger->info("Exception as error message : ".$fault->faultcode);
|
||||
$this->logger->info(__CLASS__.'->'.$name.':'." Exception as error message : ".$fault->faultcode);
|
||||
throw new Exception($fault->faultstring);
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,10 @@
|
||||
<?php
|
||||
return array(
|
||||
'0.6' => array(
|
||||
'getIdentiteLight' => array(
|
||||
'debug' => true,
|
||||
'log' => 'mail',
|
||||
),
|
||||
'getRncsEven' => array(
|
||||
'debug' => true,
|
||||
'log' => 'mail',
|
||||
|
Loading…
Reference in New Issue
Block a user