diff --git a/application/controllers/AccountController.php b/application/controllers/AccountController.php index d2fd6a88b..4e1510e6d 100644 --- a/application/controllers/AccountController.php +++ b/application/controllers/AccountController.php @@ -1,6 +1,18 @@ utilisateurs, consommation, contrats */ public function clientAction() @@ -22,8 +34,35 @@ class AccountController extends Zend_Controller_Action /** * Fiche du service */ - public function serviceAction(){} - public function consoAction(){} - public function usersAction(){} - public function userAction(){} + public function serviceAction() + { + + } + + /** + * Tableau des consommations par rapport aux paramètres contrat + * Calculé tout les J-1 au service + */ + public function consoAction() + { + + } + + /** + * Liste des utilisateurs + */ + public function usersAction() + { + + } + + /** + * Fiche d'un utilisateur pour edition + */ + public function userAction() + { + + + } + } \ No newline at end of file diff --git a/application/controllers/AuthController.php b/application/controllers/AuthController.php index bca1f3253..1db274ba4 100644 --- a/application/controllers/AuthController.php +++ b/application/controllers/AuthController.php @@ -7,7 +7,7 @@ class AuthController extends Zend_Controller_Action 'clientId' => 195, 'serviceCode' => 'SSO', 'authType' => 'userSSO', - 'login' => 'MAIL', + 'login' => 'mail', 'token' => 'token', ) ); @@ -64,10 +64,10 @@ class AuthController extends Zend_Controller_Action // --- Set form value $this->view->FormPartner = $partner; $this->view->FormIdentifiant = $login; - $this->view->FormCourriel = $request->getParam('MAIL'); - $this->view->FormSiret = $request->getParam('SIRET'); - $this->view->FormNom = $request->getParam('LASTNAME'); - $this->view->FormPrenom = $request->getParam('FIRSTNAME'); + $this->view->FormCourriel = $request->getParam('mail'); + $this->view->FormSiret = $request->getParam('siret'); + $this->view->FormNom = $request->getParam('lastname'); + $this->view->FormPrenom = $request->getParam('name'); } // --- Redirection else { diff --git a/application/controllers/DashboardController.php b/application/controllers/DashboardController.php index 87e7989ac..6a7ad2364 100644 --- a/application/controllers/DashboardController.php +++ b/application/controllers/DashboardController.php @@ -634,7 +634,7 @@ class DashboardController extends Zend_Controller_Action $ws = new WsScores(); $reponse = $ws->setClient($infos); if ($reponse->error->errnum==1) { - $this->_forward('client', 'dashboard', null, array('idClient' => $infos['idClient'])); + $this->forward('client', 'dashboard', null, array('idClient' => $infos['idClient'])); } $this->view->assign('infos', $request->getParams()); } diff --git a/application/controllers/EvaluationController.php b/application/controllers/EvaluationController.php index 2bcd4e2f6..42ae191f8 100644 --- a/application/controllers/EvaluationController.php +++ b/application/controllers/EvaluationController.php @@ -83,15 +83,15 @@ class EvaluationController extends Zend_Controller_Action ); $bornes = array( - 'indiScore' => array('min'=>0, 'max'=>20, 'rouge'=>8, 'orange'=>12), - 'scoreDir' => array('min'=>0, 'max'=>100, 'rouge'=>45, 'orange'=>56), - 'scoreConf' => array('min'=>0, 'max'=>100, 'rouge'=>45, 'orange'=>56), - 'scoreZ' => array('min'=>-3, 'max'=>3, 'rouge'=>-0.25, 'orange'=>0.125), - 'scoreCH' => array('min'=>-4.5,'max'=>16, 'rouge'=>3.75, 'orange'=>10), - 'scoreAfdcc1' => array('min'=>-7, 'max'=>7, 'rouge'=>0, 'orange'=>1), - 'scoreAfdcc2' => array('min'=>-3, 'max'=>2, 'rouge'=>-1, 'orange'=>0.5), - 'scoreAltman' => array('min'=>-2, 'max'=>8, 'rouge'=>0, 'orange'=>2.7), - 'scoreCCF' => array('min'=>500,'max'=>5000,'rouge'=>2160, 'orange'=>3450 ), + 'indiScore' => array('min' => 0, 'max' => 20, 'rouge' => 7, 'orange' => 10), + 'scoreDir' => array('min' => 0, 'max' => 100, 'rouge' => 45, 'orange' => 56), + 'scoreConf' => array('min' => 0, 'max' => 100, 'rouge' => 45, 'orange' => 56), + 'scoreZ' => array('min' => -3, 'max' => 3, 'rouge' => -0.25, 'orange' => 0.125), + 'scoreCH' => array('min' => -4.5, 'max' => 16, 'rouge' => 3.75, 'orange' => 10), + 'scoreAfdcc1' => array('min' => -7, 'max' => 7, 'rouge' => 0, 'orange' => 1), + 'scoreAfdcc2' => array('min' => -3, 'max' => 2, 'rouge' => -1, 'orange' => 0.5), + 'scoreAltman' => array('min' => -2, 'max' => 8, 'rouge' => 0, 'orange' => 2.7), + 'scoreCCF' => array('min' => 500, 'max' => 5000, 'rouge' => 2160, 'orange' => 3450 ), ); $request = $this->getRequest(); diff --git a/application/controllers/SurveillanceController.php b/application/controllers/SurveillanceController.php index eb7e82179..32712a4e2 100644 --- a/application/controllers/SurveillanceController.php +++ b/application/controllers/SurveillanceController.php @@ -192,7 +192,7 @@ class SurveillanceController extends Zend_Controller_Action $this->_helper->layout->disableLayout(); $this->_forward('ajouter', 'surveillance', null, array( 'source' => 'score' )); } - + /** * Affiche les infos d'une surveillance */ @@ -210,8 +210,6 @@ class SurveillanceController extends Zend_Controller_Action $user = new Scores_Utilisateur(); - //if ($user->checkPerm()) - $listSurv = array(); if (intval($siret)!=0) @@ -422,16 +420,11 @@ class SurveillanceController extends Zend_Controller_Action public function portefeuilleAction() { $user = new Scores_Utilisateur(); - if(!$user->checkPerm('portefeuille')){ + if( !$user->checkPerm('portefeuille') ) { $this->_forward('perms', 'error'); } - - $this->view->headLink() - ->appendStylesheet('/libs/tablesorter/themes/blue/style.css', 'all'); - - $this->view->headScript() - ->appendFile('/libs/tablesorter/jquery.tablesorter.js', 'text/javascript') - ->appendFile('/themes/default/scripts/surveillance.js', 'text/javascript'); + + $this->view->headScript()->appendFile('/themes/default/scripts/surveillance.js', 'text/javascript'); $request = $this->getRequest(); @@ -482,15 +475,15 @@ class SurveillanceController extends Zend_Controller_Action ); $couleurRisque100 = array( - 'rouge' => array('min'=>0, 'max'=>40), + 'rouge' => array('min'=>0, 'max'=>40), 'orange' => array('min'=>41, 'max'=>50), - 'vert' => array('min'=>51, 'max'=>100), + 'vert' => array('min'=>51, 'max'=>100), ); $couleurRisque20 = array( - 'rouge' => array('min'=>0, 'max'=>6), + 'rouge' => array('min'=>0, 'max'=>6), 'orange' => array('min'=>7, 'max'=>10), - 'vert' => array('min'=>11, 'max'=>20), + 'vert' => array('min'=>11, 'max'=>20), ); $ws = new WsScores(); diff --git a/application/controllers/UserController.php b/application/controllers/UserController.php index 6aa4be20c..dae7b78b7 100644 --- a/application/controllers/UserController.php +++ b/application/controllers/UserController.php @@ -36,14 +36,20 @@ class UserController extends Zend_Controller_Action */ public function indexAction() { - $this->view->headLink()->appendStylesheet('/themes/default/styles/user.css', 'all'); - $user = new Scores_Utilisateur(); - - if (!$user->checkPerm('MONPROFIL')){ - $this->_forward('perms', 'error'); + + // --- Redirection vers l'authentification v2 + if ($user->getVersion() == 2) { + $this->redirect('/account/index'); + } + + // @todo : transformer en affichage simple pour les utilisateurs + if ( !$user->checkPerm('MONPROFIL') ){ + $this->forward('perms', 'error'); } + $this->view->headLink()->appendStylesheet('/themes/default/styles/user.css', 'all'); + $this->view->assign('device_type', $user->getBrowserInfo()->mobile); $this->view->assign('browser_info', $user->getBrowserInfo()->name.' '.$user->getBrowserInfo()->version); diff --git a/application/views/default2015/scripts/account/client.phtml b/application/views/default2015/scripts/account/client.phtml new file mode 100644 index 000000000..b3d9bbc7f --- /dev/null +++ b/application/views/default2015/scripts/account/client.phtml @@ -0,0 +1 @@ + -table { width:100%; } -table th { border:1px solid; font-weight:bold; padding:5px; } -table tr { } -table td { border:1px solid; padding:5px; } - -

Nouveautés

-
- -

Liste par date

- +
- - + + @@ -27,11 +17,11 @@ table td { border:1px solid; padding:5px; } - + + diff --git a/application/views/default2015/scripts/cgu.phtml b/application/views/default2015/scripts/cgu.phtml index fb767f200..a62fdc442 100644 --- a/application/views/default2015/scripts/cgu.phtml +++ b/application/views/default2015/scripts/cgu.phtml @@ -1,5 +1,3 @@
-

-cgu?> -

+cgu?>
\ No newline at end of file diff --git a/application/views/default2015/scripts/footer.phtml b/application/views/default2015/scripts/footer.phtml index e69246d2a..610ef59a0 100644 --- a/application/views/default2015/scripts/footer.phtml +++ b/application/views/default2015/scripts/footer.phtml @@ -1,18 +1,20 @@ - -

© 2006- Scores & Décisions SAS - -translate("Tous droits réservés")?> - - -translate("Mentions légales")?> - - - -

\ No newline at end of file + \ No newline at end of file diff --git a/application/views/default2015/scripts/header.phtml b/application/views/default2015/scripts/header.phtml index 9d68a3e7f..1e606bd6e 100644 --- a/application/views/default2015/scripts/header.phtml +++ b/application/views/default2015/scripts/header.phtml @@ -1,13 +1,49 @@
- -
 
+
+
+
+
+
diff --git a/application/views/default2015/scripts/identite/etablissements.phtml b/application/views/default2015/scripts/identite/etablissements.phtml index 512d70231..75ceb546a 100644 --- a/application/views/default2015/scripts/identite/etablissements.phtml +++ b/application/views/default2015/scripts/identite/etablissements.phtml @@ -1,5 +1,5 @@ -
-

translate("LISTE DES ÉTABLISSEMENTS")?>

+

translate("Liste des établissements")?>

+
DateIntituléCatégorieIntituléCatégorie
date,8,2).'/'.substr($nouveau->date,5,2).'/'.substr($nouveau->date,0,4)?> - url(array('controller'=>'fichier', 'action'=>'new', 'fichier'=>$nouveau->fichier))?>" target="_blank"> intitule?> - categorie?>categorie?>
@@ -48,11 +48,11 @@
-

Établissements

+

Établissements

etabs)>0) { ?>
- +
etabs as $etab) { ?> Siege==1) $type = 'siège '; @@ -74,7 +74,7 @@ - + - - - +
+

label?>

+
+ + titre)) { $titre = ' title="'.$this->titre.'"'; } else { $titre = ''; } ?> - - +
> +

texte?>

+
+ \ No newline at end of file diff --git a/application/views/default2015/scripts/identite/fiche.phtml b/application/views/default2015/scripts/identite/fiche.phtml index 12c17d56b..ef2a0c4d9 100644 --- a/application/views/default2015/scripts/identite/fiche.phtml +++ b/application/views/default2015/scripts/identite/fiche.phtml @@ -1,10 +1,6 @@ -AutrePage) ) {?> -
- - message ) {?> -

Informations

+

Informations

@@ -16,15 +12,6 @@ AutrePage) ) {?> -

- surveillance) ) {?>
action('infos','surveillance', null, array('siret' => $this->siret))?> @@ -34,11 +21,18 @@ AutrePage) ) {?> -

translate("FICHE D'IDENTITÉ");?>

+ +dateDerMaj)) { ?> +
+ + translate("Dernière mise à jour le")?> dateDerMaj?> + datemajTexte?> + +
-
-
" href="">Nic?> Enseigne!='') { @@ -133,6 +133,4 @@ AutrePage) ) {?> render('cgu.phtml', $this->cgu)?> - - - \ No newline at end of file + \ No newline at end of file diff --git a/application/views/default2015/scripts/identite/evenements.phtml b/application/views/default2015/scripts/identite/evenements.phtml index 2eac93f7b..7dc3a24a9 100644 --- a/application/views/default2015/scripts/identite/evenements.phtml +++ b/application/views/default2015/scripts/identite/evenements.phtml @@ -1,29 +1,15 @@ -AutrePage) ) {?> -
- -

LISTE DES ÉVÉNEMENTS

-
- - - - - - - - - - - - - - - -
 Numéro identifiant SirenSirenTexte($this->siren)?>
 Dénomination SocialeraisonSociale?>
  - action('infos','surveillance',null,array('source' => 'insee','siret'=>$this->siret))?> -
+

LISTE DES ÉVÉNEMENTS

+ +
+

Numéro identifiant Siren

+
SirenTexte($this->siren)?>

+
+
+

Dénomination Sociale

+
raisonSociale?>

-

Événements INSEE

+

Événements INSEE

AutrePage) ) {?>
@@ -46,8 +32,7 @@ Liste des événements uniquement sur l'établissement Nic?>. evens)==0 ) { ?>
Aucun évènement n'est présent dans notre base
-
- +
evens as $i=>$even) { if ($even->Siege==1) $type='siège'; @@ -85,7 +70,6 @@ Liste des événements uniquement sur l'établissement Nic?>.
-
PageTotal>1 ) {?>
@@ -103,5 +87,4 @@ Liste des événements uniquement sur l'établissement Nic?>. AutrePage) ) {?> render('cgu.phtml', $this->cgu)?> -
\ No newline at end of file diff --git a/application/views/default2015/scripts/identite/fiche-item.phtml b/application/views/default2015/scripts/identite/fiche-item.phtml index 6571d253c..cb9cdc61f 100644 --- a/application/views/default2015/scripts/identite/fiche-item.phtml +++ b/application/views/default2015/scripts/identite/fiche-item.phtml @@ -1,18 +1,18 @@ texte ) {?> -
- aide) ) {?> - - - label?>>texte?>
+

translate("Fiche d'identité")?>

+partial('identite/fiche-item.phtml', $this->dBlock['Siret']); echo $this->partial('identite/fiche-item.phtml', $this->dBlock['SiretSiege']); @@ -55,14 +49,13 @@ echo $this->partial('identite/fiche-item.phtml', $this->dBlock['SituationInsee'] echo $this->partial('identite/fiche-item.phtml', $this->dBlock['SituationRncs']); echo $this->partial('identite/fiche-item.phtml', $this->dBlock['AutreSiren']); ?> -
+ +
+

translate("Dénomination sociale & Coordonnées")?>

-

translate("Dénomination sociale & Coordonnées")?>

-
- AutrePage) && $this->accessWorldCheck) { ?> -
+ -partial('identite/fiche-item.phtml', $this->dBlock['RaisonSociale']); echo $this->partial('identite/fiche-item.phtml', $this->dBlock['NomCommercial']); @@ -110,12 +103,8 @@ echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Fax']); echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Web']); echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Mail']); ?> -
-
-

translate("Activité(s) & Chiffre d'affaires")?>

-
- +

translate("Activité(s) & Chiffre d'affaires")?>

dBlock['ActiviteEn']['texte'] = $this->RemplaceSiren($this->dBlock['ActiviteEn']['texte']); @@ -135,8 +124,6 @@ echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Dirigeants']); echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Effectif']); echo $this->partial('identite/fiche-item.phtml', $this->dBlock['EffectifEtab']); ?> -
-
AutrePage) ) {?> @@ -148,20 +135,10 @@ echo $this->partial('identite/fiche-item.phtml', $this->dBlock['EffectifEtab']); Actualités de la société raisonSociale?> sur le Web
-surveillance) ) {?> -
- -
- - AutrePage) ) {?> render('cgu.phtml', $this->cgu)?> - - -AutrePage) ) {?> -
\ No newline at end of file diff --git a/application/views/default2015/scripts/identite/geo.phtml b/application/views/default2015/scripts/identite/geo.phtml index b528bccb7..78cc3ed7e 100644 --- a/application/views/default2015/scripts/identite/geo.phtml +++ b/application/views/default2015/scripts/identite/geo.phtml @@ -1,8 +1,8 @@ -

Localisation géographique

-
-
-
- infos->GeoLat && $this->infos->GeoLon ):?> +

Localisation géographique

+
+
+ + infos->GeoLat && $this->infos->GeoLon ) {?> Information géographique :
Latitude : decLat?> (infos->GeoLat?>)
@@ -11,58 +11,58 @@ Afficher l'adresse sur Google Map ©

- + Code commune / Rivoli :
- infos->Dept.' '.$this->infos->codeCommune.' / '.$this->infos->Rivoli; ?> + infos->Dept.' '.$this->infos->codeCommune.' / '.$this->infos->Rivoli; ?> + infos->InfosIris)>0){?> infos->InfosIris)>0){ - $InfosIris = $this->infos->InfosIris; - $codComIris = str_replace($InfosIris->codIris, '', $InfosIris->codComIris); - ?> -

Iris : - codIris) == 0){ ?> -
Commune non découpée en Iris - -
Code : codIris?> -
Libellé : libIris?> - - - + $InfosIris = $this->infos->InfosIris; + $codComIris = str_replace($InfosIris->codIris, '', $InfosIris->codComIris); + ?> +

Iris : + codIris) == 0){ ?> +
Commune non découpée en Iris + +
Code : codIris?> +
Libellé : libIris?> + + + + +
+
+ + source == 'google') {?> + +
+ action('streetview', 'identite', null, array('infos' => $this->infos));?> +
+ + source == 'mappy') {?> + +
+ + + + +
- - source == 'google') {?> - -
- action('streetview', 'identite', null, array( - 'infos' => $this->infos, - ));?> -
- - source == 'mappy') {?> - -
- - - - - -
\ No newline at end of file diff --git a/application/views/default2015/scripts/identite/streetview.phtml b/application/views/default2015/scripts/identite/streetview.phtml index 389ed8570..0c4b900da 100644 --- a/application/views/default2015/scripts/identite/streetview.phtml +++ b/application/views/default2015/scripts/identite/streetview.phtml @@ -1,7 +1,7 @@ url) {?> -
Cliché à l'approche de l'adresse postale.
+
Cliché à l'approche de l'adresse postale.
streetviewMode == 'gps') {?>
diff --git a/application/views/default2015/scripts/layout.phtml b/application/views/default2015/scripts/layout.phtml index f15bb09e6..f7ea5ec8b 100644 --- a/application/views/default2015/scripts/layout.phtml +++ b/application/views/default2015/scripts/layout.phtml @@ -9,20 +9,29 @@
+
render('header.phtml')?>
+
-
- -
- layout()->content?> - -
+ +
+ +
+ render('menu.phtml')?>
+ +
+ layout()->content?> +
+
+ +
+
-
+ + + inlineScript()?> \ No newline at end of file diff --git a/application/views/default2015/scripts/menu-mobile.phtml b/application/views/default2015/scripts/menu-mobile.phtml deleted file mode 100644 index 89018e4a7..000000000 --- a/application/views/default2015/scripts/menu-mobile.phtml +++ /dev/null @@ -1,41 +0,0 @@ -navigation()->menu()->hasPages() ) { ?> - - \ No newline at end of file diff --git a/application/views/default2015/scripts/recherche/entreprise.phtml b/application/views/default2015/scripts/recherche/entreprise.phtml index f52a7b77f..0ae0bbeb1 100644 --- a/application/views/default2015/scripts/recherche/entreprise.phtml +++ b/application/views/default2015/scripts/recherche/entreprise.phtml @@ -1,109 +1,108 @@ action('new', 'aide')?> -
message)){ ?> -
-

-message?>

-
+

message?>

-

translate("RECHERCHE ENTREPRISE")?>

-
+

translate("Recherche Entreprise")?>

+ + form->type?>
- +
- -
-
- +
+ + + + + + +
- - SEARCHENT) {?> +
+ +SEARCHENT) {?>
- +
- +
- -
- + +
+
-
- +
+
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- + +
+
+ + + +
+
+ +
- - -
-
- - -
-
-
RefClient){?> action('refclient', 'recherche')?> - -
\ No newline at end of file + \ No newline at end of file diff --git a/application/views/default2015/scripts/recherche/liste.phtml b/application/views/default2015/scripts/recherche/liste.phtml index 3cae0d51e..c97905516 100644 --- a/application/views/default2015/scripts/recherche/liste.phtml +++ b/application/views/default2015/scripts/recherche/liste.phtml @@ -1,8 +1,5 @@ -
- -
-

- +

+

nbReponsesTotal?> réponsenbReponsesTotal>1){?>s avec les critères " criteresTexte?>". @@ -23,7 +20,6 @@ $('select[name=filtre]').change(function(e){ }); -

@@ -34,79 +30,92 @@ $('select[name=filtre]').change(function(e){
+liste) > 0 ) {?>
    liste as $item ) { ?>
  1. - -IDENTITE) {?> - - - - - - - - -
    + +IDENTITE) { + if ($item['source']==7 && !empty($item['sourceId'])) { + $lienHref = $this->url(array('controller'=>'identite','action'=>'liens','lienref'=>$item['sourceId']), 'default', true); + $lienTitle = "Voir les liens inter entreprises de cet établissement"; + } else { + $lienHref = $this->url(array('controller'=>'identite','action'=>'fiche','id'=>$item['id'],'siret'=>$item['siret']), 'default', true); + $lienTitle = "Voir la fiche d'identité de cet établissement"; + } +} else { + $lienHref = '#'; + $lienTitle = "Vous n'avez pas les permissions nécessaires pour accèder à la fiche identité"; +} +?> +

    +
    RCS +
    -
    -
    + + + +
    + + +
    + + - + - + + 0) {?> -
    Liens : +
    + Liens : - + +

+ + PageTotal>1) {?> -
- -
+

+

+

-
rechCsv) { ?> filtres as $k => $filtre) { if ( !empty($filtre['select']) ) break; }?> -

+

Exporter les résultats de la recherche en CSV.

blockDirToEntreprise){ ?> -

-Effectuer une recherche entreprise avec les paramètres " -searchDirToEntrepriseTxt?>" -

+

Effectuer une recherche entreprise avec les paramètres " +searchDirToEntrepriseTxt?>"

blockInvestig) { ?> -

+

Si aucun résultat ne correspond à votre recherche. Cliquez-ici.

- - -
- -
\ No newline at end of file + \ No newline at end of file diff --git a/application/views/default2015/scripts/recherche/refclient.phtml b/application/views/default2015/scripts/recherche/refclient.phtml index 8f7568e5d..53d91e4d3 100644 --- a/application/views/default2015/scripts/recherche/refclient.phtml +++ b/application/views/default2015/scripts/recherche/refclient.phtml @@ -1,4 +1,4 @@ -

translate("RECHERCHE SURVEILLANCE")?>

+

translate("Recherche Surveillance")?>

@@ -6,12 +6,16 @@
- -
- + +
+ +
+
+ +
+
+
-
-
\ No newline at end of file diff --git a/application/views/default2015/scripts/surveillance/portefeuille.phtml b/application/views/default2015/scripts/surveillance/portefeuille.phtml index dfa55226a..119a9d2dc 100644 --- a/application/views/default2015/scripts/surveillance/portefeuille.phtml +++ b/application/views/default2015/scripts/surveillance/portefeuille.phtml @@ -1,8 +1,8 @@
-

PORTEFEUILLE

+

Portefeuille

- +
@@ -14,12 +14,21 @@
Nombre d'entités affichées nbReponses?>
-

Exportation de votre portefeuille

+

Extraction de votre portefeuille

action('portefeuillecsv', 'surveillance')?>
-

Options de recherche

+

Affichage

+
+
+" /> +" /> +" /> + +
+
+
Tri par
-
-
-" />
-" />
-" /> - -
-
-

Surveillance Score

-totPage>1) {?> -
- -
-
-portefeuille)>0) { -?> - +portefeuille)>0) { ?> +
- + @@ -71,60 +58,36 @@ if (count($this->portefeuille)>0) { portefeuille as $item ){ ?> - - - + - indiScoreDate!='0000-00-00' && $item->procol!='P' && $item->actif!=0) { - ?> - - + - +
Siren Dénomination Sociale RéférenceScoreScore Encours demandé Encours conseillé
- - siren?> - - - rs?>
- cp.' '.$item->ville?> +
+ siren?> -

ref?>

+

rs?>

+

cp.' '.$item->ville?>

-
colScore?>
+

ref?>

colScore?> -
- indiScoreDate!='0000-00-00' && - $item->procol!='P' && $item->actif!=0) - { - ?> - - - + indiScoreDate!='0000-00-00' && $item->procol!='P' && $item->actif!=0) { ?> - encoursClient)) { ?> - encoursClient/1000), 0, ',', ' ')?> K€ - - - - -
+ encoursClient)) { ?> - + encoursClient/1000), 0, ',', ' ')?> K€ + + + + + -
- encours/1000), 0, ',', ' ')?> K€ + indiScoreDate!='0000-00-00' && $item->procol!='P' && $item->actif!=0) { ?> + + encours/1000), 0, ',', ' ')?> K€ -
@@ -165,28 +128,14 @@ $(document).ready(function(){ window.location.href = $(this).val(); }); - $('#surveillance').tablesorter({ - headers: { - 3: { sorter: false }, - 4: { sorter: false }, - 5: { sorter: false } - } - }); - - $('.tooltip').each(function(){ + $('td.infotip').each(function(){ $(this).qtip({ - content: $(this).attr('tooltip'), + content: $(this).attr('data-tooltip'), style: { width: 300, classes: "qtip-dark" }, position: { at: "bottom center", my: "top center" } }); }); - $('.set').hover(function(){ - $(this).find('a.editencours').css('display', 'inline'); - },function () { - $(this).find('a.editencours').css('display', 'none'); - }); - $('input[name=siren]').focusin(function(){ var txt = 'Siren'; var val = $(this).val(); diff --git a/application/views/default2015/scripts/user/index.phtml b/application/views/default2015/scripts/user/index.phtml index d1d3742ff..fd48ec7a2 100644 --- a/application/views/default2015/scripts/user/index.phtml +++ b/application/views/default2015/scripts/user/index.phtml @@ -6,7 +6,7 @@

-

PROFIL UTILISATEUR

+

Paramètres utilisateur

@@ -15,101 +15,107 @@ -
Identifiant utilisateur
-
-action != 'new') { - echo $this->loginVu; -} else { -?> - - +
+

Identifiant utilisateur

+

+ action != 'new') { + echo $this->loginVu; + } else { + ?> + + +

-
Identité (NOM/Prénom)
-
-isAdmin) { ?> - - -options->nom.' '.$this->options->prenom ; } ?> +
+

Identité (NOM/Prénom)

+
+ isAdmin) { ?> + + + options->nom.' '.$this->options->prenom ; } ?> +
-
Réf. facturation (service, etc...)
-
-isAdmin) { ?> - -options->reference; } ?> +
+

Réf. facturation (service, etc...)

+
+ isAdmin) { ?> + + options->reference; } ?> +
-
Adresse e-mail
-
-options->email); ?> - -
- +
+

Adresse e-mail

+
+ options->email); ?> + +
+ +
+
+ + + +
-
- - - -
- diff --git a/library/Scores/Auth/Adapter/Ws.php b/library/Scores/Auth/Adapter/Ws.php index eed7be91d..7e8786745 100644 --- a/library/Scores/Auth/Adapter/Ws.php +++ b/library/Scores/Auth/Adapter/Ws.php @@ -2,35 +2,53 @@ class Scores_Auth_Adapter_Ws implements Zend_Auth_Adapter_Interface { /** - * - * @var unknown + * Identifiant de l'utilisateur + * @var string */ protected $_username; /** - * - * @var unknown + * Password + * @var string */ protected $_password; /** - * - * @var unknown + * Timeout + * @var int */ protected $_timeout = 1800; /** - * - * @var unknown + * Marqueur de vérification IP (en iponly) + * @var boolean */ protected $_checkIp = false; + /** + * Liste des IPs des frontends (proxy) + * @var array + */ + protected $listProxyIp = array( + '62.210.222.34', + ); + + /** + * Authentification par WS + * @param string $username + * @param string $password + * @param boolean $iponly + */ public function __construct($username, $password, $iponly = false) { $this->_username = $username; $this->_password = $password; - if ($iponly){ - $this->_password = 'iponly:'.$_SERVER['REMOTE_ADDR']; + if ($iponly){ + $ip = $_SERVER['REMOTE_ADDR']; + if ( isset($_SERVER['HTTP_X_FORWARDED_FOR']) && in_array($ip, $this->listProxyIp)) { + $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; + } + $this->_password = 'iponly:'.$ip; } $this->_checkIp = $iponly; } @@ -41,11 +59,14 @@ class Scores_Auth_Adapter_Ws implements Zend_Auth_Adapter_Interface */ public function authenticate() { - $adressIp = $_SERVER['REMOTE_ADDR']; + $ip = $_SERVER['REMOTE_ADDR']; + if ( isset($_SERVER['HTTP_X_FORWARDED_FOR']) && in_array($ip, $this->listProxyIp)) { + $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; + } require_once 'Scores/WsScores.php'; $ws = new WsScores($this->_username, $this->_password); - $InfosLogin = $ws->getInfosLogin($this->_username, $adressIp); + $InfosLogin = $ws->getInfosLogin($this->_username, $ip); $identity = new stdClass(); $identity->username = $this->_username; $identity->password = $this->_password; @@ -70,7 +91,7 @@ class Scores_Auth_Adapter_Ws implements Zend_Auth_Adapter_Interface $identity->dateDebutCompte = $InfosLogin->result->dateDebutCompte; $identity->dateFinCompte = $InfosLogin->result->dateFinCompte; $identity->acceptationCGU = $InfosLogin->result->acceptationCGU; - $identity->ip = $adressIp; + $identity->ip = $ip; $identity->version = $InfosLogin->result->version; $identity->modeEdition = false; diff --git a/library/Scores/Menu.php b/library/Scores/Menu.php index b5477c5f7..da5a459a8 100644 --- a/library/Scores/Menu.php +++ b/library/Scores/Menu.php @@ -421,7 +421,6 @@ class Scores_Menu 'label' => "Paramètres", 'controller' => 'user', 'action' => 'index', - 'permission' => 'MONPROFIL' ), array( 'label' => "Surveillances", diff --git a/library/Scores/Utilisateur.php b/library/Scores/Utilisateur.php index 81db76b90..db5357fdd 100644 --- a/library/Scores/Utilisateur.php +++ b/library/Scores/Utilisateur.php @@ -209,7 +209,8 @@ class Scores_Utilisateur */ public function getIpAddress() { - if ( !isset($this->identity->ip) || empty($this->identity->ip) ){ + //@todo : ATTENTION lorsque reverse proxy + if ( !isset($this->identity->ip) || empty($this->identity->ip) ){ return $_SERVER['REMOTE_ADDR']; } return $this->identity->ip; @@ -222,6 +223,14 @@ class Scores_Utilisateur { return $this->identity->dateDerniereConnexion; } + + /** + * Retourne la version d'authentification + */ + public function getVersion() + { + return $this->identity->version; + } /** * Vérifie que l'utiliasteur a le mode edition