Small Merge
This commit is contained in:
commit
33dceaf10c
@ -31,7 +31,6 @@ class AideController extends Zend_Controller_Action
|
||||
->where("date>='".$dateglissant."' AND date<='".$now."'")
|
||||
->order('date DESC')
|
||||
->limit($nbNewsMax);
|
||||
//Zend_Registry::get('firebug')->info($sql->__toString());
|
||||
$nouveautes = $nouveautesM->fetchAll($sql);
|
||||
}
|
||||
$this->view->assign('nouveautes', $nouveautes);
|
||||
|
@ -94,6 +94,7 @@ class AuthController extends Zend_Controller_Action
|
||||
$parameters = new stdClass();
|
||||
$parameters->login = $login;
|
||||
$parameters->ipUtilisateur = $adressIp;
|
||||
$parameters->from = 'auth';
|
||||
try {
|
||||
$ws = new Scores_Ws_Client('gestion', '0.3');
|
||||
$InfosLogin = $ws->getInfosLogin($parameters);
|
||||
|
@ -552,7 +552,7 @@ class SaisieController extends Zend_Controller_Action
|
||||
case '6700':
|
||||
//Liste des établissements
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getListeEtablissements($siren, -1, 0, 200);
|
||||
$reponse = $ws->getListeEtablissements($siren, -1, 0, 100);
|
||||
$listeEtablissements = $reponse->result->item;
|
||||
//Zend_Registry::get('firebug')->info(count($listeEtablissements));
|
||||
$this->view->assign('ListeEtablissements', $listeEtablissements);
|
||||
@ -614,23 +614,29 @@ class SaisieController extends Zend_Controller_Action
|
||||
|
||||
$request = $this->getRequest();
|
||||
$siren = $this->getParam('siren');
|
||||
$p = $request->getParam('p', 0);
|
||||
$p = $request->getParam('p', 1);
|
||||
$nbAffichage = 100;
|
||||
$position = ($p - 1 ) * $nbAffichage;
|
||||
if (!empty($p)) {
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getListeEtablissements($siren, -1, $p);
|
||||
$reponse = $ws->getListeEtablissements($siren, -1, $position, $nbAffichage);
|
||||
$liste = array();
|
||||
if (count($reponse->result->item)>0) {
|
||||
foreach ($reponse->result->item as $item) {
|
||||
$liste[] = array(
|
||||
'value' => $item->Nic,
|
||||
'label' => $siren.$item->Nic.' - '.$item->Adresse.' '.$item->CP.' '.$item->Ville,
|
||||
'label' => $item->Nic.' - '.$item->Adresse.' '.$item->CP.' '.$item->Ville,
|
||||
);
|
||||
}
|
||||
}
|
||||
if ($p < $reponse->nbReponses) {
|
||||
$p = $p+200;
|
||||
}
|
||||
$output = array( 'p' => $p, 'list' => $liste );
|
||||
$nbReponsesTotal = $reponse->nbReponses;
|
||||
$pageTotal = ceil( $nbReponsesTotal / $nbAffichage );
|
||||
$pageNext = $p + 1;
|
||||
if( $pageNext > $pageTotal ) {
|
||||
$pageNext = $pageTotal;
|
||||
}
|
||||
|
||||
$output = array( 'p' => $pageNext, 'list' => $liste );
|
||||
}
|
||||
echo json_encode($output);
|
||||
}
|
||||
|
@ -702,7 +702,7 @@ class SurveillanceController extends Zend_Controller_Action
|
||||
$path = $c->profil->path->files;
|
||||
|
||||
// --- Lister les fichiers
|
||||
if (empty($nomFic)){
|
||||
if (empty($nomFic)) {
|
||||
$ref = $user->getPrenom();
|
||||
if ( strtolower($user->getLogin())=='cnasea95'
|
||||
|| strtolower($user->getLogin())=='cnasea96'
|
||||
@ -743,9 +743,9 @@ class SurveillanceController extends Zend_Controller_Action
|
||||
}
|
||||
$this->view->assign('listeFichier', $listeFichier);
|
||||
}
|
||||
//Lister les annonces
|
||||
elseif (empty($getCSV))
|
||||
{
|
||||
// --- Lister les annonces
|
||||
elseif (empty($getCSV)) {
|
||||
|
||||
$selectFiltre = array(
|
||||
'procol' => array('lib'=> 'Procédures collectives', 'select'=>''),
|
||||
'radiations' => array('lib'=> 'Radiations', 'select'=>''),
|
||||
@ -881,7 +881,10 @@ class SurveillanceController extends Zend_Controller_Action
|
||||
$this->view->assign('annonces', $tab);
|
||||
$this->view->assign('nomFic', $nomFic);
|
||||
$this->renderScript('surveillance/fichier-ann.phtml');
|
||||
} else {
|
||||
|
||||
}
|
||||
// --- Livraison du fichier
|
||||
else {
|
||||
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
@ -896,7 +899,7 @@ class SurveillanceController extends Zend_Controller_Action
|
||||
$params->ref = $ref;
|
||||
$params->nomFic = $nomFic;
|
||||
$response = $client->getListeFichierSurv($params);
|
||||
$fileUrl = $response->item[0]->UrlFichier.'.bz2';
|
||||
$fileUrl = $response->result->item[0]->UrlFichier.'.bz2';
|
||||
} catch (SoapFault $fault) {}
|
||||
|
||||
try {
|
||||
|
@ -112,8 +112,13 @@ class UserController extends Zend_Controller_Action
|
||||
}
|
||||
// --- Mise à jour du profil
|
||||
if ($isProfilUpdated && $updateResult) {
|
||||
$ws = new WsScores();
|
||||
$InfosLogin = $ws->getInfosLogin($identity->username, $_SERVER['REMOTE_ADDR']);
|
||||
$ws = new Scores_Ws_Client('gestion', '0.3');
|
||||
$adressIp = $_SERVER['REMOTE_ADDR'];
|
||||
$parameters = new stdClass();
|
||||
$parameters->login = $identity->username;
|
||||
$parameters->ipUtilisateur = $adressIp;
|
||||
$parameters->from = null;
|
||||
$InfosLogin = $ws->getInfosLogin($parameters);
|
||||
$identity = $user->updateProfil($InfosLogin);
|
||||
$auth->getStorage()->write($identity);
|
||||
}
|
||||
@ -121,10 +126,8 @@ class UserController extends Zend_Controller_Action
|
||||
if ($action=='update') {
|
||||
$modeEdition = $request->getParam('modeEdition', false);
|
||||
if ( $modeEdition ) {
|
||||
|
||||
$identity->modeEdition = true;
|
||||
$auth->getStorage()->write($identity);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -170,9 +173,13 @@ class UserController extends Zend_Controller_Action
|
||||
elseif (!empty($op) || $op!='new')
|
||||
{
|
||||
if ( !empty($login) && $identity->username != $login ) {
|
||||
Zend_Registry::get('firebug')->info('getInfosLogin');
|
||||
$ws = new WsScores();
|
||||
$reponse = $ws->getInfosLogin($login, $_SERVER['REMOTE_ADDR']);
|
||||
$ws = new Scores_Ws_Client('gestion', '0.3');
|
||||
$adressIp = $_SERVER['REMOTE_ADDR'];
|
||||
$parameters = new stdClass();
|
||||
$parameters->login = $login;
|
||||
$parameters->ipUtilisateur = $adressIp;
|
||||
$parameters->from = null;
|
||||
$reponse = $ws->getInfosLogin($parameters);
|
||||
$this->view->assign('options', $reponse->result);
|
||||
$this->view->assign('loginVu', $reponse->result->login);
|
||||
$this->view->assign('droits', explode(' ', strtolower($reponse->result->droits)));
|
||||
|
@ -1,6 +1,3 @@
|
||||
<?php
|
||||
//Afficher la liste des établissements
|
||||
?>
|
||||
<label>Etablissement concerné</label>
|
||||
<select name="jugement[nic]" size="5">
|
||||
<option value="-">-</option>
|
||||
@ -22,17 +19,17 @@ foreach($this->ListeEtablissements as $etablissement) {
|
||||
</select>
|
||||
<div class="info">
|
||||
<a href="<?=$this->url(array('controller'=>'saisie','action'=>'listetab','siren'=>$this->siren),null,true)?>" id="insert-etab">Insérer les établissements suivant</a>
|
||||
<input type="hidden" name="p" value="200"/>
|
||||
<input type="hidden" name="p" value="2"/>
|
||||
<script>
|
||||
$('#insert-etab').click(function(e){
|
||||
e.preventDefault();
|
||||
var p = $('input[name=p]').val();
|
||||
$.getJSON($(this).attr('href'), { p: p }, function(data){
|
||||
$('input[name=p]').val(data.p);
|
||||
$.each(data.list, function(i, v) {
|
||||
var option = '<option value="'+ v.value+'">'+v.label+'</option>';
|
||||
$(option).appendTo('select[name="jugement[nic]"]');
|
||||
});
|
||||
$('input[name=p]').val(data.p);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
@ -33,7 +33,7 @@ class Application_Controller_Plugin_Auth extends Zend_Controller_Plugin_Abstract
|
||||
$mode = null;
|
||||
// --- Mode checkIp=only
|
||||
if ($checkIp == 'only') {
|
||||
$hach = 'iponly:'.$_SERVER['REMOTE_ADDR'];
|
||||
$hach = 'iponly:'.$_SERVER['REMOTE_ADDR'];
|
||||
$mode = 'iponly';
|
||||
}
|
||||
|
||||
|
@ -75,9 +75,16 @@ class Scores_Auth_Adapter_Ws implements Zend_Auth_Adapter_Interface
|
||||
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
|
||||
}
|
||||
|
||||
require_once 'Scores/WsScores.php';
|
||||
$ws = new WsScores($this->_username, $this->_password);
|
||||
$InfosLogin = $ws->getInfosLogin($this->_username, $ip, 'auth');
|
||||
$ws = new Scores_Ws_Client('gestion', '0.3');
|
||||
$ws->setHttpLogin($this->_username);
|
||||
$ws->setHttpPassword($this->_password);
|
||||
$adressIp = $_SERVER['REMOTE_ADDR'];
|
||||
$parameters = new stdClass();
|
||||
$parameters->login = $this->_username;
|
||||
$parameters->ipUtilisateur = $ip;
|
||||
$parameters->from = 'auth';
|
||||
$InfosLogin = $ws->getInfosLogin($parameters);
|
||||
|
||||
// --- Renvoi
|
||||
if ( is_string($InfosLogin) || $InfosLogin->error->errnum != 0 ) {
|
||||
$message = $InfosLogin;
|
||||
|
Loading…
Reference in New Issue
Block a user