2011-01-05 09:59:49 +00:00
|
|
|
<?php
|
2013-11-18 14:49:04 +00:00
|
|
|
class Scores_Menu
|
2011-01-05 09:59:49 +00:00
|
|
|
{
|
2011-01-05 15:14:23 +00:00
|
|
|
protected $menu = null;
|
2011-04-15 09:05:30 +00:00
|
|
|
protected $siret = null;
|
|
|
|
protected $id = 0;
|
2012-11-15 13:30:33 +00:00
|
|
|
protected $lienref = null;
|
2012-12-26 10:36:47 +00:00
|
|
|
|
2011-06-08 07:40:11 +00:00
|
|
|
/**
|
|
|
|
* Définition du menu avec ces groupes et pages
|
|
|
|
* Groupes
|
|
|
|
* => label : titre du menu
|
|
|
|
* => check : nom du controller
|
|
|
|
* => permission : code de la permission nécessaire pour l'affichage
|
2011-08-24 15:56:56 +00:00
|
|
|
* activateMenu : Définir controller/action pour activer le menu
|
|
|
|
* => controller : nom du controller
|
|
|
|
* => action : nom de l'action
|
2011-06-08 07:40:11 +00:00
|
|
|
* Pages
|
|
|
|
* => label : titre de la page
|
|
|
|
* => title : titre de l'infobulle
|
|
|
|
* => controller : nom du controller
|
|
|
|
* => action : nom de l'action
|
|
|
|
* => permission : code de la permission nécessaire pour l'affichage
|
|
|
|
* => forceVisible : boolean, affiche le menu en grisé même si l'utilisateur n'a pas la permission
|
|
|
|
* @var array
|
|
|
|
*/
|
2011-01-05 09:59:49 +00:00
|
|
|
protected $defineMenu = array(
|
|
|
|
array(
|
|
|
|
'label' => 'RECHERCHES',
|
2011-08-24 15:56:56 +00:00
|
|
|
'activateMenu' => array(
|
|
|
|
array('controller'=>'recherche', 'action'=>'liste'),
|
|
|
|
array('controller'=>'recherche', 'action'=>'list'),
|
2011-09-20 07:26:03 +00:00
|
|
|
array('controller'=>'recherche', 'action'=>'annonceliste'),
|
2011-08-24 15:56:56 +00:00
|
|
|
array('controller'=>'recherche', 'action'=>'enquete'),
|
2011-12-09 15:27:22 +00:00
|
|
|
array('controller'=>'recherche', 'action'=>'refclientliste'),
|
2013-09-16 15:41:31 +00:00
|
|
|
array('controller'=>'worldcheck', 'action'=>'index'),
|
|
|
|
array('controller'=>'worldcheck', 'action'=>'matchcontent'),
|
2011-08-29 14:19:14 +00:00
|
|
|
array('controller'=>'giant', 'action'=>'search'),
|
|
|
|
array('controller'=>'giant', 'action'=>'identite'),
|
|
|
|
array('controller'=>'giant', 'action'=>'commandes'),
|
|
|
|
array('controller'=>'giant', 'action'=>'rapport'),
|
2011-08-24 15:56:56 +00:00
|
|
|
),
|
2011-01-05 09:59:49 +00:00
|
|
|
'pages' => array(
|
|
|
|
array(
|
|
|
|
'label' => "Rechercher une entreprise",
|
2011-01-06 08:37:20 +00:00
|
|
|
'title' => "Rechercher une entreprise",
|
|
|
|
'controller' => 'recherche',
|
|
|
|
'action' => 'entreprise',
|
2012-12-26 10:36:47 +00:00
|
|
|
'forceVisible' => true,
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
|
|
|
array(
|
|
|
|
'label' => "Rechercher par dirigeant",
|
2011-01-06 08:37:20 +00:00
|
|
|
'controller' => 'recherche',
|
|
|
|
'action' => 'dirigeant',
|
2012-12-26 10:36:47 +00:00
|
|
|
'forceVisible' => true,
|
|
|
|
'permission' => 'SEARCHDIR',
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
|
|
|
array(
|
|
|
|
'label' => "Recherche Internationale",
|
|
|
|
'controller' => '',
|
|
|
|
'action' => '',
|
2011-04-15 10:25:46 +00:00
|
|
|
'permission' => 'INTERNATIONAL'
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
2012-05-20 16:31:28 +00:00
|
|
|
array( // idClient = 1 && idClient =
|
2011-01-05 09:59:49 +00:00
|
|
|
'label' => "Rechercher une annonce",
|
2011-05-19 08:51:49 +00:00
|
|
|
'controller' => 'recherche',
|
|
|
|
'action' => 'annonce',
|
2012-12-26 10:36:47 +00:00
|
|
|
'permission' => 'HISTOBODACC',
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
2012-05-20 16:31:28 +00:00
|
|
|
array(
|
2011-11-23 13:06:55 +00:00
|
|
|
'label' => "Rechercher par actionnaire",
|
2011-05-19 08:51:49 +00:00
|
|
|
'controller' => 'recherche',
|
2012-12-26 10:36:47 +00:00
|
|
|
'action' => 'actionnaire',
|
|
|
|
'forceVisible' => true,
|
|
|
|
'permission' => 'SEARCHACT',
|
2011-04-15 09:05:30 +00:00
|
|
|
),
|
2013-09-16 15:41:31 +00:00
|
|
|
array(
|
2013-10-04 12:41:24 +00:00
|
|
|
'label' => "Recherche WorldCheck",
|
2013-09-16 15:41:31 +00:00
|
|
|
'controller' => 'recherche',
|
|
|
|
'action' => 'worldcheck',
|
|
|
|
'forceVisible' => false,
|
|
|
|
'permission' => 'WORLDCHECK',
|
|
|
|
),
|
2011-08-19 14:25:16 +00:00
|
|
|
array(
|
2011-01-05 09:59:49 +00:00
|
|
|
'label' => "Dernière recherche",
|
2011-01-06 08:37:20 +00:00
|
|
|
'controller' => 'recherche',
|
|
|
|
'action' => 'last',
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
2011-08-19 14:25:16 +00:00
|
|
|
array(
|
2011-01-05 09:59:49 +00:00
|
|
|
'label' => "Liste des dernières recherches",
|
2011-01-06 08:37:20 +00:00
|
|
|
'controller' => 'recherche',
|
|
|
|
'action' => 'list',
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
|
|
|
array(
|
|
|
|
'label' => "Centrale IparI",
|
2011-04-15 09:05:30 +00:00
|
|
|
'controller' => 'recherche',
|
|
|
|
'action' => 'ipari',
|
2012-12-26 10:36:47 +00:00
|
|
|
'permission' => 'IPARI',
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'label' => 'IDENTITE',
|
2013-11-21 16:31:49 +00:00
|
|
|
'activateMenu' => array(
|
|
|
|
array('controller'=>'identite', 'action'=>'contacts'),
|
|
|
|
),
|
2011-01-05 09:59:49 +00:00
|
|
|
'pages' => array(
|
2011-05-03 15:58:48 +00:00
|
|
|
array(
|
2011-01-05 09:59:49 +00:00
|
|
|
'label' => "Fiche d'identité",
|
2011-04-15 09:05:30 +00:00
|
|
|
'controller' => 'identite',
|
|
|
|
'action' => 'fiche',
|
2011-05-09 08:47:50 +00:00
|
|
|
'forceVisible' => true,
|
2012-12-26 10:36:47 +00:00
|
|
|
'permission' => 'IDENTITE',
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
2011-05-03 15:58:48 +00:00
|
|
|
array(
|
2011-01-05 09:59:49 +00:00
|
|
|
'label' => "Fiche Procédure Collective",
|
2011-04-15 09:05:30 +00:00
|
|
|
'controller' => 'identite',
|
|
|
|
'action' => 'fichepc',
|
2012-12-26 10:36:47 +00:00
|
|
|
'permission' => 'IDPROCOL'
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
2011-05-03 15:58:48 +00:00
|
|
|
array(
|
2011-01-05 09:59:49 +00:00
|
|
|
'label' => "Liste des établissements",
|
2011-04-15 09:05:30 +00:00
|
|
|
'controller' => 'identite',
|
|
|
|
'action' => 'etablissements',
|
2011-05-09 08:47:50 +00:00
|
|
|
'forceVisible' => true,
|
2012-12-26 10:36:47 +00:00
|
|
|
'permission' => 'ETABLISSEMENTS',
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
2011-05-03 15:58:48 +00:00
|
|
|
array(
|
2012-12-03 21:01:11 +00:00
|
|
|
'label' => "Liens inter-entreprises",
|
2011-04-18 15:25:26 +00:00
|
|
|
'controller' => 'identite',
|
|
|
|
'action' => 'liens',
|
2011-05-09 08:47:50 +00:00
|
|
|
'forceVisible' => true,
|
2012-12-26 10:36:47 +00:00
|
|
|
'permission' => 'LIENS',
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
2012-03-29 13:38:20 +00:00
|
|
|
array(
|
2012-03-30 07:47:35 +00:00
|
|
|
'label' => "Informations Groupe",
|
2012-03-29 13:38:20 +00:00
|
|
|
'controller' => 'identite',
|
|
|
|
'action' => 'groupe',
|
2012-12-26 10:36:47 +00:00
|
|
|
'permission' => 'GROUPE'
|
2012-05-20 16:31:28 +00:00
|
|
|
),
|
2011-01-05 09:59:49 +00:00
|
|
|
array(
|
|
|
|
'label' => "Modifications Insee",
|
2011-04-18 15:25:26 +00:00
|
|
|
'controller' => 'identite',
|
2011-04-22 15:10:03 +00:00
|
|
|
'action' => 'evenements',
|
2011-08-29 10:07:19 +00:00
|
|
|
'permission' => 'eveninsee',
|
2011-08-29 14:24:02 +00:00
|
|
|
'forceVisible' => true,
|
2012-12-26 10:36:47 +00:00
|
|
|
'permission' => 'EVENINSEE',
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'label' => 'DIRIGEANTS',
|
2012-02-29 09:14:53 +00:00
|
|
|
'activateMenu' => array(
|
|
|
|
array('controller'=>'dirigeants', 'action'=>'op'),
|
|
|
|
),
|
2011-01-05 09:59:49 +00:00
|
|
|
'pages' => array(
|
2011-05-03 15:58:48 +00:00
|
|
|
array(
|
2011-01-05 09:59:49 +00:00
|
|
|
'label' => "Liste des dirigeants",
|
2011-04-19 06:23:20 +00:00
|
|
|
'controller' => 'dirigeant',
|
|
|
|
'action' => 'liste',
|
2011-05-09 08:47:50 +00:00
|
|
|
'forceVisible' => true,
|
2012-12-26 10:36:47 +00:00
|
|
|
'permission' => 'DIRIGEANTS',
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
2011-05-03 15:58:48 +00:00
|
|
|
array(
|
2011-01-05 09:59:49 +00:00
|
|
|
'label' => "Historique des dirigeants",
|
2011-04-19 06:23:20 +00:00
|
|
|
'controller' => 'dirigeant',
|
|
|
|
'action' => 'histo',
|
2011-05-09 08:47:50 +00:00
|
|
|
'forceVisible' => true,
|
2012-12-26 10:36:47 +00:00
|
|
|
'permission' => 'DIRIGEANTS',
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'label' => 'ELEMENTS FINANCIERS',
|
2013-11-13 14:10:30 +00:00
|
|
|
'activateMenu' => array(
|
|
|
|
array('controller'=>'finance', 'action'=>'subvention'),
|
|
|
|
),
|
2011-01-05 09:59:49 +00:00
|
|
|
'pages' => array(
|
|
|
|
array(
|
|
|
|
'label' => "Synthèse",
|
2011-04-19 07:21:06 +00:00
|
|
|
'controller' => 'finance',
|
|
|
|
'action' => 'synthese',
|
2011-05-17 15:05:31 +00:00
|
|
|
'forceVisible' => true,
|
2012-12-26 10:36:47 +00:00
|
|
|
'permission' => 'SYNTHESE',
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
|
|
|
array(
|
|
|
|
'label' => "Bilans, Compte de résultat",
|
2011-04-19 07:21:06 +00:00
|
|
|
'controller' => 'finance',
|
|
|
|
'action' => 'bilan',
|
2011-05-17 15:05:31 +00:00
|
|
|
'forceVisible' => true,
|
2012-12-26 10:36:47 +00:00
|
|
|
'permission' => 'RATIOS',
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
|
|
|
array(
|
|
|
|
'label' => "Ratios",
|
2011-04-19 07:21:06 +00:00
|
|
|
'controller' => 'finance',
|
|
|
|
'action' => 'ratios',
|
2011-05-17 15:05:31 +00:00
|
|
|
'forceVisible' => true,
|
2012-12-26 10:36:47 +00:00
|
|
|
'permission' => 'RATIOS',
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
2012-04-05 09:14:03 +00:00
|
|
|
array(
|
|
|
|
'label' => "Flux de trésorerie",
|
|
|
|
'controller' => 'finance',
|
|
|
|
'action' => 'flux',
|
2012-12-26 10:36:47 +00:00
|
|
|
'forceVisible' => true,
|
|
|
|
'permission' => 'FLUX',
|
2012-04-05 09:14:03 +00:00
|
|
|
),
|
2011-01-05 09:59:49 +00:00
|
|
|
array(
|
|
|
|
'label' => "Liasse fiscale",
|
2011-04-19 07:21:06 +00:00
|
|
|
'controller' => 'finance',
|
|
|
|
'action' => 'liasse',
|
2011-05-17 15:05:31 +00:00
|
|
|
'forceVisible' => true,
|
2012-12-26 10:36:47 +00:00
|
|
|
'permission' => 'LIASSE',
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
|
|
|
array(
|
|
|
|
'label' => "Bourse & Cotations",
|
2011-04-19 07:21:06 +00:00
|
|
|
'controller' => 'finance',
|
|
|
|
'action' => 'bourse',
|
2011-05-17 15:05:31 +00:00
|
|
|
'forceVisible' => true,
|
2012-12-26 10:36:47 +00:00
|
|
|
'permission' => 'BOURSE',
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
|
|
|
array(
|
|
|
|
'label' => "Relations bancaires",
|
2011-04-19 07:21:06 +00:00
|
|
|
'controller' => 'finance',
|
|
|
|
'action' => 'banque',
|
2011-05-17 15:05:31 +00:00
|
|
|
'forceVisible' => true,
|
2012-12-26 10:36:47 +00:00
|
|
|
'permission' => 'BANQUE',
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
2013-11-13 14:10:30 +00:00
|
|
|
array(
|
|
|
|
'label' => "Subventions",
|
|
|
|
'controller' => 'finance',
|
|
|
|
'action' => 'subventions',
|
|
|
|
'forceVisible' => true,
|
|
|
|
),
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'label' => 'ELEMENTS JURIDIQUES',
|
|
|
|
'pages' => array(
|
|
|
|
array(
|
|
|
|
'label' => "Annonces Légales",
|
2011-04-20 07:25:37 +00:00
|
|
|
'controller' => 'juridique',
|
|
|
|
'action' => 'annonces',
|
2011-05-17 15:05:31 +00:00
|
|
|
'forceVisible' => true,
|
2012-12-26 10:36:47 +00:00
|
|
|
'permission' => 'ANNONCES',
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
|
|
|
array(
|
|
|
|
'label' => "Information Réglementée",
|
2011-04-20 07:25:37 +00:00
|
|
|
'controller' => 'juridique',
|
|
|
|
'action' => 'infosreg',
|
2011-05-17 15:05:31 +00:00
|
|
|
'forceVisible' => true,
|
2012-12-26 10:36:47 +00:00
|
|
|
'permission' => 'INFOSREG',
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
|
|
|
array(
|
|
|
|
'label' => "Compétences Territoriales",
|
2011-04-20 07:25:37 +00:00
|
|
|
'controller' => 'juridique',
|
|
|
|
'action' => 'competences',
|
2011-05-17 15:05:31 +00:00
|
|
|
'forceVisible' => true,
|
2012-12-26 10:36:47 +00:00
|
|
|
'permission' => 'COMPETENCES',
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
|
|
|
array(
|
|
|
|
'label' => "Conventions collectives",
|
2011-04-20 07:25:37 +00:00
|
|
|
'controller' => 'juridique',
|
|
|
|
'action' => 'conventions',
|
2011-05-17 15:05:31 +00:00
|
|
|
'forceVisible' => true,
|
2012-12-26 10:36:47 +00:00
|
|
|
'permission' => 'CONVENTIONS',
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
|
|
|
array(
|
|
|
|
'label' => "Marques déposées",
|
2011-04-20 07:25:37 +00:00
|
|
|
'controller' => 'juridique',
|
2011-05-02 13:38:52 +00:00
|
|
|
'action' => 'marques',
|
2012-12-26 10:36:47 +00:00
|
|
|
'permission' => 'MARQUES',
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'label' => 'BANQUE DE FRANCE',
|
2011-01-05 15:14:23 +00:00
|
|
|
'permission' => 'BDF',
|
2012-06-15 14:30:30 +00:00
|
|
|
'activateMenu' => array(
|
|
|
|
array('controller'=>'bdf', 'action'=>'module'),
|
|
|
|
),
|
2011-01-05 09:59:49 +00:00
|
|
|
'pages' => array(
|
|
|
|
array(
|
|
|
|
'label' => "27. Panorama",
|
2011-04-20 07:25:37 +00:00
|
|
|
'controller' => 'bdf',
|
2012-06-15 14:30:30 +00:00
|
|
|
'action' => 'module27',
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
|
|
|
array(
|
|
|
|
'label' => "28. Concours Bancaires",
|
2011-04-20 07:25:37 +00:00
|
|
|
'controller' => 'bdf',
|
2012-06-15 14:30:30 +00:00
|
|
|
'action' => 'module28',
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
|
|
|
array(
|
|
|
|
'label' => "29. Impayés",
|
2011-04-20 07:25:37 +00:00
|
|
|
'controller' => 'bdf',
|
2012-06-15 14:30:30 +00:00
|
|
|
'action' => 'module29',
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
|
|
|
array(
|
|
|
|
'label' => "40. Relations Bancaires",
|
2011-04-20 07:25:37 +00:00
|
|
|
'controller' => 'bdf',
|
2012-06-15 14:30:30 +00:00
|
|
|
'action' => 'module40',
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
|
|
|
array(
|
|
|
|
'label' => "51. Dirigeants",
|
2011-04-20 07:25:37 +00:00
|
|
|
'controller' => 'bdf',
|
2012-06-15 14:30:30 +00:00
|
|
|
'action' => 'module51',
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
|
|
|
array(
|
|
|
|
'label' => "Autres",
|
2011-04-20 07:25:37 +00:00
|
|
|
'controller' => 'bdf',
|
2012-06-15 14:30:30 +00:00
|
|
|
'action' => 'index',
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'label' => 'EVALUATION',
|
2011-08-24 15:56:56 +00:00
|
|
|
'activateMenu' => array(
|
|
|
|
array('controller'=>'evaluation', 'action'=> 'scoringcommande'),
|
2012-03-12 13:27:59 +00:00
|
|
|
array('controller'=>'evaluation', 'action'=> 'aviscredit'),
|
2012-05-20 16:31:28 +00:00
|
|
|
),
|
2011-01-05 09:59:49 +00:00
|
|
|
'pages' => array(
|
|
|
|
array(
|
|
|
|
'label' => "IndiScore",
|
2011-04-20 07:25:37 +00:00
|
|
|
'controller' => 'evaluation',
|
2011-05-24 16:03:25 +00:00
|
|
|
'action' => 'indiscore',
|
2011-08-29 10:07:19 +00:00
|
|
|
'permission' => array('indiscore', 'indiscorep'),
|
2011-11-29 14:29:12 +00:00
|
|
|
'pref' => array('demanderef'),
|
2011-05-17 15:05:31 +00:00
|
|
|
'forceVisible' => true,
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
|
|
|
array(
|
|
|
|
'label' => "Rapport de synthèse",
|
2011-04-20 07:25:37 +00:00
|
|
|
'controller' => 'evaluation',
|
2011-05-24 16:03:25 +00:00
|
|
|
'action' => 'indiscore2',
|
2012-12-26 10:36:47 +00:00
|
|
|
'permission' => array('INDISCORE2', 'INDISCORE2P'),
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
|
|
|
array(
|
|
|
|
'label' => "Rapport complet",
|
2011-04-20 07:25:37 +00:00
|
|
|
'controller' => 'evaluation',
|
2011-06-03 08:53:22 +00:00
|
|
|
'action' => 'indiscore3',
|
2012-12-26 10:36:47 +00:00
|
|
|
'permission' => array('INDISCORE3', 'INDISCORE3P'),
|
2011-11-29 14:29:12 +00:00
|
|
|
'pref' => array('demanderef'),
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
2013-03-15 15:47:36 +00:00
|
|
|
array(
|
|
|
|
'label' => "Valorisation",
|
|
|
|
'controller' => 'evaluation',
|
|
|
|
'action' => 'valorisation',
|
2013-10-04 12:41:24 +00:00
|
|
|
'permission' => array('VALORISATION'),
|
2013-03-15 15:47:36 +00:00
|
|
|
),
|
2011-01-05 09:59:49 +00:00
|
|
|
array(
|
|
|
|
'label' => "Scoring Credit Safe",
|
2011-04-20 07:25:37 +00:00
|
|
|
'controller' => 'evaluation',
|
2011-06-21 16:09:34 +00:00
|
|
|
'action' => 'scoring',
|
2012-12-26 10:36:47 +00:00
|
|
|
'permission' => 'SCORECSF',
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
|
|
|
array(
|
|
|
|
'label' => "Enquête commerciale",
|
2011-04-20 07:25:37 +00:00
|
|
|
'controller' => 'evaluation',
|
2011-05-19 08:51:49 +00:00
|
|
|
'action' => 'enquetec',
|
2012-12-26 10:36:47 +00:00
|
|
|
'permission' => 'ENQUETEC',
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'label' => 'PIECES OFFICIELLES',
|
2011-08-24 15:56:56 +00:00
|
|
|
'activateMenu' => array(
|
|
|
|
array('controller'=> 'pieces', 'action'=>'cmdassociation'),
|
2012-02-16 17:15:54 +00:00
|
|
|
array('controller'=> 'pieces', 'action'=>'associationactes'),
|
|
|
|
array('controller'=> 'pieces', 'action'=>'associationbilans'),
|
2011-08-24 15:56:56 +00:00
|
|
|
array('controller'=> 'pieces', 'action'=>'cmdcourrier'),
|
|
|
|
array('controller'=> 'pieces', 'action'=>'kbis'),
|
2012-03-09 15:17:31 +00:00
|
|
|
array('controller'=> 'pieces', 'action'=>'kbispasserelle'),
|
2011-08-24 15:56:56 +00:00
|
|
|
),
|
2011-01-05 09:59:49 +00:00
|
|
|
'pages' => array(
|
|
|
|
array(
|
|
|
|
'label' => "Commande de Pièces",
|
2011-04-20 07:25:37 +00:00
|
|
|
'controller' => 'pieces',
|
2011-05-06 14:25:50 +00:00
|
|
|
'action' => 'commande',
|
2012-12-26 10:36:47 +00:00
|
|
|
'permission' => array('KBIS', 'PRIVILEGES'),
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
|
|
|
array(
|
|
|
|
'label' => "Comptes annuels",
|
2011-04-20 07:25:37 +00:00
|
|
|
'controller' => 'pieces',
|
2011-05-06 14:25:50 +00:00
|
|
|
'action' => 'bilans',
|
2011-05-17 15:05:31 +00:00
|
|
|
'forceVisible' => true,
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
|
|
|
array(
|
|
|
|
'label' => "Actes & Statuts",
|
2011-04-20 07:25:37 +00:00
|
|
|
'controller' => 'pieces',
|
2011-05-06 14:25:50 +00:00
|
|
|
'action' => 'actes',
|
2011-05-17 15:05:31 +00:00
|
|
|
'forceVisible' => true,
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
|
|
|
array(
|
|
|
|
'label' => "Suivi Privilèges",
|
2011-04-20 07:25:37 +00:00
|
|
|
'controller' => 'pieces',
|
2011-05-06 14:25:50 +00:00
|
|
|
'action' => 'privileges',
|
2012-12-26 10:36:47 +00:00
|
|
|
'permission' => 'SURVPRIV',
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'label' => 'OPTIONS',
|
|
|
|
'pages' => array(
|
2012-04-02 13:36:19 +00:00
|
|
|
array(
|
|
|
|
'label' => 'Nouveautés',
|
|
|
|
'controller' => 'aide',
|
|
|
|
'action' => 'newliste',
|
|
|
|
),
|
2011-01-05 09:59:49 +00:00
|
|
|
array(
|
|
|
|
'label' => "Mes options",
|
2011-01-07 17:16:07 +00:00
|
|
|
'controller' => 'user',
|
|
|
|
'action' => 'index',
|
2012-12-26 10:36:47 +00:00
|
|
|
'permission' => 'MONPROFIL'
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
|
|
|
array(
|
|
|
|
'label' => "Mes surveillances",
|
2011-04-20 07:25:37 +00:00
|
|
|
'controller' => 'surveillance',
|
|
|
|
'action' => 'liste',
|
2012-12-26 10:36:47 +00:00
|
|
|
'permission' => 'SURVLISTE'
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
2011-05-24 06:25:58 +00:00
|
|
|
array(
|
|
|
|
'label' => "Surveillances fichier",
|
|
|
|
'controller' => 'surveillance',
|
|
|
|
'action' => 'fichier',
|
|
|
|
),
|
2011-01-05 09:59:49 +00:00
|
|
|
array(
|
|
|
|
'label' => "Mon portefeuille",
|
2011-04-20 07:25:37 +00:00
|
|
|
'controller' => 'surveillance',
|
|
|
|
'action' => 'portefeuille',
|
2012-12-26 10:36:47 +00:00
|
|
|
'permission' => 'PORTEFEUILLE',
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
|
|
|
array(
|
|
|
|
'label' => "Administration",
|
2011-05-03 15:58:48 +00:00
|
|
|
'controller' => 'user',
|
|
|
|
'action' => 'liste',
|
2011-01-05 09:59:49 +00:00
|
|
|
),
|
|
|
|
array(
|
|
|
|
'label' => "Surveillances",
|
|
|
|
'controller' => '',
|
|
|
|
'action' => '',
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'label' => "Se déconnecter",
|
|
|
|
'controller' => 'user',
|
|
|
|
'action' => 'logout',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
2011-05-17 15:05:31 +00:00
|
|
|
array(
|
|
|
|
'label' => 'GESTION S&D',
|
|
|
|
'check' => 'dashboard',
|
2011-12-09 15:27:22 +00:00
|
|
|
'activateMenu' => array(
|
|
|
|
array('controller'=>'dashboard', 'action'=>'clients'),
|
|
|
|
array('controller'=>'dashboard', 'action'=>'client'),
|
2012-06-14 12:14:57 +00:00
|
|
|
array('controller'=>'dashboard', 'action'=>'users'),
|
|
|
|
array('controller'=>'dashboard', 'action'=>'user'),
|
2011-12-09 15:27:22 +00:00
|
|
|
array('controller'=>'dashboard', 'action'=>'commandes'),
|
2012-09-25 14:59:49 +00:00
|
|
|
array('controller'=>'dashboard', 'action'=>'prestations'),
|
|
|
|
array('controller'=>'dashboard', 'action'=>'prestation'),
|
2012-10-17 07:52:44 +00:00
|
|
|
array('controller'=>'dashboard', 'action'=>'services'),
|
|
|
|
array('controller'=>'dashboard', 'action'=>'service'),
|
|
|
|
array('controller'=>'dashboard', 'action'=>'tarifs'),
|
|
|
|
array('controller'=>'dashboard', 'action'=>'tarif'),
|
2011-12-09 15:27:22 +00:00
|
|
|
),
|
2011-05-17 15:05:31 +00:00
|
|
|
'pages' => array(
|
|
|
|
array(
|
|
|
|
'label' => "Gestion",
|
|
|
|
'controller' => 'dashboard',
|
|
|
|
'action' => 'index',
|
|
|
|
),
|
2011-11-28 13:05:41 +00:00
|
|
|
array(
|
|
|
|
'label' => "Saisie / Edition",
|
|
|
|
'controller' => 'saisie',
|
|
|
|
'action' => 'fiche',
|
|
|
|
),
|
2012-11-15 13:30:33 +00:00
|
|
|
array(
|
|
|
|
'label' => "Saisie Fiche Etrangère",
|
|
|
|
'controller' => 'saisie',
|
|
|
|
'action' => 'lienetranger',
|
|
|
|
),
|
2011-05-17 15:05:31 +00:00
|
|
|
),
|
|
|
|
),
|
2011-01-05 09:59:49 +00:00
|
|
|
);
|
2012-05-20 16:31:28 +00:00
|
|
|
|
|
|
|
|
2011-06-08 07:40:11 +00:00
|
|
|
/**
|
2012-11-15 13:30:33 +00:00
|
|
|
* Construit le menu en fonction des paramètres de l'URL
|
|
|
|
* @param array $parameters
|
2011-06-08 07:40:11 +00:00
|
|
|
*/
|
2012-11-15 13:30:33 +00:00
|
|
|
public function __construct($parameters)
|
2011-06-08 07:40:11 +00:00
|
|
|
{
|
2012-11-15 13:30:33 +00:00
|
|
|
//Special case, edit foreign company
|
|
|
|
if (array_key_exists('lienref', $parameters)) {
|
|
|
|
$this->lienref = $parameters['lienref'];
|
|
|
|
} else {
|
2012-12-26 10:36:47 +00:00
|
|
|
|
2012-11-15 13:30:33 +00:00
|
|
|
//French Company
|
|
|
|
if (array_key_exists('siret', $parameters)) {
|
|
|
|
$this->siret = $parameters['siret'];
|
|
|
|
}
|
|
|
|
if (array_key_exists('id', $parameters)) {
|
|
|
|
$this->id = $parameters['id'];
|
|
|
|
}
|
|
|
|
if (empty($this->siret) && empty($this->id)) {
|
2013-11-21 16:31:49 +00:00
|
|
|
$session = new Scores_Session_Entreprise(null);
|
2012-11-15 13:30:33 +00:00
|
|
|
$this->siret = $session->getSiret();
|
|
|
|
$this->id = $session->getId();
|
|
|
|
}
|
2012-12-26 10:36:47 +00:00
|
|
|
|
2012-11-15 13:30:33 +00:00
|
|
|
}
|
|
|
|
//Compute Menu
|
2011-01-05 15:14:23 +00:00
|
|
|
$this->menu = new Zend_Navigation();
|
2011-01-05 09:59:49 +00:00
|
|
|
$this->computeMenu();
|
|
|
|
}
|
2012-05-20 16:31:28 +00:00
|
|
|
|
2011-06-08 07:40:11 +00:00
|
|
|
/**
|
|
|
|
* Retourne le menu généré
|
|
|
|
*/
|
|
|
|
public function getMenu()
|
|
|
|
{
|
2011-01-05 09:59:49 +00:00
|
|
|
return $this->menu;
|
|
|
|
}
|
2012-05-20 16:31:28 +00:00
|
|
|
|
2012-12-26 10:36:47 +00:00
|
|
|
/**
|
|
|
|
* Retourne la permission associés à une page
|
|
|
|
* @param string $controller
|
|
|
|
* @param string $action
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getPagePermission($controller, $action)
|
|
|
|
{
|
|
|
|
$permission = null;
|
|
|
|
foreach ( $this->defineMenu as $menu )
|
|
|
|
{
|
|
|
|
foreach ( $menu['pages'] as $item ) {
|
|
|
|
if ( $controller == $item['controller']
|
|
|
|
&& $action == $item['action']
|
|
|
|
&& array_key_exists('permission', $item) ) {
|
|
|
|
$permission = $item['permission'];
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return $permission;
|
|
|
|
}
|
|
|
|
|
2011-06-08 07:40:11 +00:00
|
|
|
/**
|
|
|
|
* Retourne la position du groupe à activé
|
2012-12-26 10:36:47 +00:00
|
|
|
* @param string $controller
|
|
|
|
* @param string $action
|
2011-06-08 07:40:11 +00:00
|
|
|
*/
|
|
|
|
public function getIdMenu($controller, $action)
|
|
|
|
{
|
|
|
|
$i = 0;
|
2011-08-23 09:14:06 +00:00
|
|
|
$stop = false;
|
|
|
|
foreach($this->defineMenu as $menu){
|
|
|
|
$perm = true;
|
|
|
|
if (array_key_exists('permission', $menu)){
|
|
|
|
$perm = $this->checkPermission($menu['permission']);
|
|
|
|
}
|
|
|
|
$visible = true;
|
|
|
|
if (array_key_exists('check', $menu)){
|
|
|
|
$visible = $this->checkMenu($menu['check']);
|
|
|
|
}
|
|
|
|
foreach($menu['pages'] as $item){
|
|
|
|
if($controller == $item['controller'] && $action == $item['action']){
|
|
|
|
$stop = true;
|
2012-05-20 16:31:28 +00:00
|
|
|
break;
|
|
|
|
}
|
2011-08-23 09:14:06 +00:00
|
|
|
}
|
2011-08-24 15:56:56 +00:00
|
|
|
if (array_key_exists('activateMenu', $menu)){
|
|
|
|
foreach($menu['activateMenu'] as $item){
|
|
|
|
if($controller == $item['controller'] && $action == $item['action']){
|
|
|
|
$stop = true;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2012-05-20 16:31:28 +00:00
|
|
|
}
|
2011-08-23 09:14:06 +00:00
|
|
|
if ($stop === true) break;
|
|
|
|
if ($perm && $visible){
|
|
|
|
$i++;
|
|
|
|
}
|
2011-06-08 07:40:11 +00:00
|
|
|
}
|
|
|
|
return $i;
|
|
|
|
}
|
2012-05-20 16:31:28 +00:00
|
|
|
|
2011-06-08 07:40:11 +00:00
|
|
|
/**
|
|
|
|
* Parcours la définition du menu en gérant les permissions et autres
|
|
|
|
* particularités
|
|
|
|
*/
|
|
|
|
protected function computeMenu()
|
|
|
|
{
|
2011-01-05 09:59:49 +00:00
|
|
|
foreach($this->defineMenu as $element){
|
|
|
|
$perm = true;
|
2011-01-05 15:14:23 +00:00
|
|
|
if (array_key_exists('permission', $element)){
|
|
|
|
$perm = $this->checkPermission($element['permission']);
|
2011-01-05 09:59:49 +00:00
|
|
|
}
|
2011-05-17 15:05:31 +00:00
|
|
|
$visible = true;
|
|
|
|
if (array_key_exists('check', $element)){
|
|
|
|
$visible = $this->checkMenu($element['check']);
|
|
|
|
}
|
|
|
|
if ($perm && $visible){
|
2011-01-05 09:59:49 +00:00
|
|
|
$menu = array();
|
|
|
|
$menu['label'] = $element['label'];
|
2011-01-05 15:14:23 +00:00
|
|
|
$menu['uri'] = '#';
|
2011-04-01 12:14:40 +00:00
|
|
|
$menu['class'] = 'header';
|
2011-01-05 09:59:49 +00:00
|
|
|
if (array_key_exists('pages', $element)){
|
2011-01-05 15:14:23 +00:00
|
|
|
$menu['pages'] = $this->computePage($element['pages']);
|
2011-01-05 09:59:49 +00:00
|
|
|
}
|
2011-01-05 15:14:23 +00:00
|
|
|
$this->menu->addPage($menu);
|
2011-01-05 09:59:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2012-05-20 16:31:28 +00:00
|
|
|
|
2011-06-08 07:40:11 +00:00
|
|
|
/**
|
|
|
|
* Parcours les pages d'un groupe du menu pour vérifier les permissions
|
|
|
|
* et autres particularités
|
|
|
|
* @param array $pages
|
|
|
|
*/
|
|
|
|
protected function computePage($pages)
|
|
|
|
{
|
2011-01-05 15:14:23 +00:00
|
|
|
$computePages = array();
|
|
|
|
foreach($pages as $page){
|
|
|
|
$visible = false;
|
2011-05-03 15:58:48 +00:00
|
|
|
if (array_key_exists('forceVisible', $page)){
|
|
|
|
$visible = $page['forceVisible'];
|
2011-01-05 15:14:23 +00:00
|
|
|
}
|
2012-12-26 10:36:47 +00:00
|
|
|
|
2011-01-05 09:59:49 +00:00
|
|
|
$perm = true;
|
2011-01-05 15:14:23 +00:00
|
|
|
if (array_key_exists('permission', $page)){
|
|
|
|
$perm = $this->checkPermission($page['permission']);
|
2011-01-05 09:59:49 +00:00
|
|
|
}
|
2012-01-24 16:05:50 +00:00
|
|
|
|
2011-04-21 13:57:47 +00:00
|
|
|
if (!$perm && $visible){
|
2011-01-05 15:14:23 +00:00
|
|
|
$computePage = array();
|
|
|
|
$computePage['label'] = $page['label'];
|
2011-04-21 13:57:47 +00:00
|
|
|
$computePage['class'] = 'inactif';
|
2011-01-05 15:14:23 +00:00
|
|
|
$computePage['uri'] = '#';
|
|
|
|
$computePages[] = $computePage;
|
2011-04-21 13:57:47 +00:00
|
|
|
} elseif ($perm){
|
|
|
|
if ($this->checkParams($page['controller'], $page['action'])){
|
|
|
|
$computePage = array();
|
|
|
|
$computePage = $page;
|
|
|
|
$computePage['params'] = $this->setParams($page['controller'], $page['action']);
|
2012-05-20 16:31:28 +00:00
|
|
|
|
2012-02-13 12:55:50 +00:00
|
|
|
if (array_key_exists('pref', $page)){
|
|
|
|
if ($this->hasPref('demanderef') && in_array('demanderef', $page['pref']) ){ // @todo: Erreur data
|
|
|
|
$computePage['class'] = 'demanderef';
|
|
|
|
}
|
2011-10-18 08:21:26 +00:00
|
|
|
}
|
2012-05-20 16:31:28 +00:00
|
|
|
|
2011-04-21 13:57:47 +00:00
|
|
|
$computePages[] = $computePage;
|
2011-05-03 15:58:48 +00:00
|
|
|
} elseif ($visible) {
|
2011-04-21 13:57:47 +00:00
|
|
|
$computePage = array();
|
|
|
|
$computePage['label'] = $page['label'];
|
|
|
|
$computePage['class'] = 'inactif';
|
|
|
|
$computePage['uri'] = '#';
|
|
|
|
$computePages[] = $computePage;
|
|
|
|
}
|
2011-01-05 09:59:49 +00:00
|
|
|
}
|
|
|
|
}
|
2011-01-05 15:14:23 +00:00
|
|
|
return $computePages;
|
2011-01-05 09:59:49 +00:00
|
|
|
}
|
2012-05-20 16:31:28 +00:00
|
|
|
|
2011-06-08 07:40:11 +00:00
|
|
|
/**
|
|
|
|
* Vérifie les permissions de l'utilisateur
|
2012-12-26 10:36:47 +00:00
|
|
|
* @param mixed $perm
|
2011-06-08 07:40:11 +00:00
|
|
|
*/
|
|
|
|
protected function checkPermission($perm)
|
|
|
|
{
|
2011-01-05 09:59:49 +00:00
|
|
|
$hasPerm = false;
|
2011-01-05 15:14:23 +00:00
|
|
|
if (is_array($perm)){
|
|
|
|
$list = $perm;
|
|
|
|
} else if (is_string($perm)){
|
|
|
|
$list = (array)$perm;
|
|
|
|
}
|
2012-05-20 16:31:28 +00:00
|
|
|
$user = new Scores_Utilisateur();
|
2011-01-05 15:14:23 +00:00
|
|
|
foreach($list as $permission){
|
2011-08-23 15:12:53 +00:00
|
|
|
if ($user->checkPerm($permission)){
|
2011-01-05 15:14:23 +00:00
|
|
|
$hasPerm = true;
|
|
|
|
break;
|
2011-01-05 09:59:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return $hasPerm;
|
|
|
|
}
|
2012-05-20 16:31:28 +00:00
|
|
|
|
2011-10-18 08:21:26 +00:00
|
|
|
/**
|
2011-11-29 14:29:12 +00:00
|
|
|
* Vérifie préférence utilisateur
|
|
|
|
* @param string $pref
|
2011-10-18 08:21:26 +00:00
|
|
|
*/
|
|
|
|
public function hasPref($pref)
|
|
|
|
{
|
2012-05-20 16:31:28 +00:00
|
|
|
$user = new Scores_Utilisateur();
|
2011-10-18 14:08:48 +00:00
|
|
|
if ($user->checkPref($pref)){
|
2012-05-20 16:31:28 +00:00
|
|
|
return true;
|
2011-10-18 08:21:26 +00:00
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
2012-05-20 16:31:28 +00:00
|
|
|
|
2011-06-08 07:40:11 +00:00
|
|
|
/**
|
|
|
|
* Permet d'effectuer une vérification pour la visibilité d'un menu (Groupe)
|
|
|
|
* @param string $controller
|
|
|
|
*/
|
2011-05-17 15:05:31 +00:00
|
|
|
protected function checkMenu($controller)
|
|
|
|
{
|
|
|
|
switch($controller) {
|
|
|
|
case 'dashboard':
|
2012-05-20 16:31:28 +00:00
|
|
|
$user = new Scores_Utilisateur();
|
2011-10-27 10:10:30 +00:00
|
|
|
if ($user->checkModeEdition() && $user->getIdClient()==1){
|
2011-05-17 15:05:31 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
2012-05-20 16:31:28 +00:00
|
|
|
break;
|
2011-05-17 15:05:31 +00:00
|
|
|
}
|
2011-04-15 09:05:30 +00:00
|
|
|
}
|
2012-05-20 16:31:28 +00:00
|
|
|
|
2011-06-08 07:40:11 +00:00
|
|
|
/**
|
|
|
|
* Vérifie les paramètres pour un controller et/ou une action
|
|
|
|
* @param string $controller
|
|
|
|
* @param string $action
|
|
|
|
*/
|
2011-05-17 15:05:31 +00:00
|
|
|
protected function checkParams($controller, $action = '')
|
2011-04-21 13:57:47 +00:00
|
|
|
{
|
2011-04-21 14:06:08 +00:00
|
|
|
switch($controller) {
|
2012-06-14 12:14:57 +00:00
|
|
|
case 'bdf':
|
2011-05-17 15:05:31 +00:00
|
|
|
return true;
|
|
|
|
break;
|
2012-06-14 12:14:57 +00:00
|
|
|
case 'dashboard':
|
|
|
|
return true;
|
2011-05-03 15:58:48 +00:00
|
|
|
break;
|
2011-04-21 14:06:08 +00:00
|
|
|
case 'recherche':
|
2011-08-19 14:25:16 +00:00
|
|
|
switch($action) {
|
|
|
|
case 'last':
|
|
|
|
case 'list':
|
|
|
|
//Vérifier la présence d'au moins une recherche
|
|
|
|
require_once 'Scores/RechercheHistorique.php';
|
|
|
|
$recherches = new RechercheHistorique();
|
|
|
|
if (count($recherches->liste()>0)){
|
|
|
|
return true;
|
2012-05-20 16:31:28 +00:00
|
|
|
}
|
|
|
|
return false;
|
2011-08-19 14:25:16 +00:00
|
|
|
break;
|
2011-08-29 14:19:14 +00:00
|
|
|
case 'annonce':
|
2012-05-20 16:31:28 +00:00
|
|
|
$user = new Scores_Utilisateur();
|
2012-04-04 09:53:08 +00:00
|
|
|
if($user->checkPerm('histobodacc')){
|
2011-08-29 14:19:14 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
break;
|
2012-05-20 16:31:28 +00:00
|
|
|
}
|
2011-04-21 14:06:08 +00:00
|
|
|
return true;
|
|
|
|
break;
|
2011-04-21 14:21:12 +00:00
|
|
|
case 'user':
|
2011-09-06 09:04:50 +00:00
|
|
|
switch($action){
|
|
|
|
case 'liste':
|
2012-05-20 16:31:28 +00:00
|
|
|
$user = new Scores_Utilisateur();
|
2012-06-14 12:14:57 +00:00
|
|
|
if ($user->isAdmin() || $user->isSuperAdmin()){
|
|
|
|
return true;
|
2012-05-20 16:31:28 +00:00
|
|
|
}
|
2012-06-14 12:14:57 +00:00
|
|
|
return false;
|
2012-05-20 16:31:28 +00:00
|
|
|
break;
|
2011-09-06 09:04:50 +00:00
|
|
|
}
|
2011-04-21 14:21:12 +00:00
|
|
|
return true;
|
|
|
|
break;
|
|
|
|
case 'surveillance':
|
2011-05-24 06:25:58 +00:00
|
|
|
switch($action) {
|
|
|
|
case 'fichier':
|
2012-05-20 16:31:28 +00:00
|
|
|
$user = new Scores_Utilisateur();
|
|
|
|
if (substr($user->getLogin(),0,6)=='cnasea'
|
|
|
|
|| strtolower($user->getLogin())=='omni04'
|
|
|
|
|| strtolower($user->getLogin())=='bodacca3m'
|
|
|
|
|| strtolower($user->getLogin())=='bodaccomni'
|
2012-01-20 14:27:17 +00:00
|
|
|
|| strtolower($user->getLogin())=='bodacccrr'
|
2012-02-13 11:04:44 +00:00
|
|
|
|| strtolower($user->getLogin())=='cpcambr13'
|
|
|
|
|| strtolower($user->getLogin())=='cpcambr14'
|
2012-11-14 16:06:00 +00:00
|
|
|
|| strtolower($user->getLogin())=='frbsurveillance'
|
2012-05-20 16:31:28 +00:00
|
|
|
|| $user->getIdClient()==32
|
2011-08-23 15:16:01 +00:00
|
|
|
|| $user->getIdClient()==82 ) {
|
2011-08-09 15:48:43 +00:00
|
|
|
return true;
|
2011-08-10 12:04:07 +00:00
|
|
|
} else {
|
|
|
|
return false;
|
2011-08-09 15:48:43 +00:00
|
|
|
}
|
2011-05-24 06:25:58 +00:00
|
|
|
break;
|
|
|
|
}
|
2011-04-21 14:21:12 +00:00
|
|
|
return true;
|
|
|
|
break;
|
2011-04-21 13:57:47 +00:00
|
|
|
case 'identite':
|
2011-08-29 14:19:14 +00:00
|
|
|
switch($action) {
|
|
|
|
case 'fiche':
|
|
|
|
case 'fichepc':
|
|
|
|
if ( !empty($this->siret) && intval($this->siret)!=0 ){
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
if ( !empty($this->id) && intval($this->id)!=0 ){
|
|
|
|
return true;
|
|
|
|
}
|
2011-10-25 09:48:08 +00:00
|
|
|
return false;
|
2011-08-29 14:19:14 +00:00
|
|
|
break;
|
2012-05-20 16:31:28 +00:00
|
|
|
case 'groupe':
|
2011-08-29 14:19:14 +00:00
|
|
|
case 'etablissements':
|
|
|
|
case 'evenements':
|
|
|
|
if ( !empty($this->siret) && intval($this->siret)!=0 ){
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
break;
|
2012-11-15 13:30:33 +00:00
|
|
|
case 'liens':
|
|
|
|
if ( !empty($this->lienref) ){
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
if ( !empty($this->siret) && intval($this->siret)!=0 ){
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
break;
|
2011-08-29 14:19:14 +00:00
|
|
|
}
|
|
|
|
break;
|
2011-04-21 13:57:47 +00:00
|
|
|
case 'dirigeant':
|
2011-08-29 14:19:14 +00:00
|
|
|
if ( !empty($this->siret) && intval($this->siret)!=0 ){
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
break;
|
2011-04-21 13:57:47 +00:00
|
|
|
case 'finance':
|
2011-08-29 14:19:14 +00:00
|
|
|
if ( !empty($this->siret) && intval($this->siret)!=0 ){
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
break;
|
2011-04-21 14:06:08 +00:00
|
|
|
case 'juridique':
|
2011-10-25 09:48:08 +00:00
|
|
|
if ( !empty($this->siret) && intval($this->siret)!=0 ){
|
2011-04-21 14:06:08 +00:00
|
|
|
return true;
|
2011-08-20 13:17:03 +00:00
|
|
|
}
|
2011-10-25 09:48:08 +00:00
|
|
|
switch($action){
|
|
|
|
case 'annonces':
|
|
|
|
if ( !empty($this->id) && intval($this->id)!=0 ){
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
2011-08-29 14:19:14 +00:00
|
|
|
return false;
|
|
|
|
break;
|
|
|
|
case 'evaluation':
|
|
|
|
switch($action){
|
2012-05-20 16:31:28 +00:00
|
|
|
case 'indiscore':
|
2011-10-26 12:18:25 +00:00
|
|
|
$siretSiege = substr($this->siret, 0,9);
|
2011-08-31 13:07:03 +00:00
|
|
|
if (!empty($siretSiege) && intval($siretSiege)!=0 ){
|
2011-08-29 14:19:14 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
if ( !empty($this->siret) && intval($this->siret)!=0 ){
|
2011-04-21 14:06:08 +00:00
|
|
|
return true;
|
2011-08-20 13:17:03 +00:00
|
|
|
}
|
2011-04-21 14:06:08 +00:00
|
|
|
return false;
|
2011-04-21 13:57:47 +00:00
|
|
|
break;
|
2011-08-29 14:19:14 +00:00
|
|
|
case 'pieces':
|
|
|
|
if ( !empty($this->siret) && intval($this->siret)!=0 ){
|
|
|
|
return true;
|
2012-05-20 16:31:28 +00:00
|
|
|
}
|
2011-08-29 14:19:14 +00:00
|
|
|
return false;
|
|
|
|
break;
|
2011-11-28 13:05:41 +00:00
|
|
|
case 'saisie':
|
|
|
|
switch($action){
|
|
|
|
case 'fiche':
|
|
|
|
if ( !empty($this->id) && intval($this->id)!=0 ){
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
break;
|
2012-11-15 13:30:33 +00:00
|
|
|
case 'lienetranger':
|
|
|
|
return true;
|
|
|
|
break;
|
2011-11-28 13:05:41 +00:00
|
|
|
}
|
2012-05-20 16:31:28 +00:00
|
|
|
return false;
|
2011-11-28 13:05:41 +00:00
|
|
|
break;
|
2012-04-02 13:36:19 +00:00
|
|
|
case 'aide':
|
|
|
|
return true;
|
|
|
|
break;
|
2011-04-21 13:57:47 +00:00
|
|
|
}
|
|
|
|
}
|
2012-05-20 16:31:28 +00:00
|
|
|
|
2011-06-08 07:40:11 +00:00
|
|
|
/**
|
|
|
|
* Définit les paramètres nécessaire pour les liens des pages
|
|
|
|
* @param string $controller
|
|
|
|
* @param string $action
|
|
|
|
*/
|
|
|
|
protected function setParams($controller, $action)
|
|
|
|
{
|
2011-04-15 09:05:30 +00:00
|
|
|
$params = array();
|
2012-03-26 12:43:09 +00:00
|
|
|
/**
|
|
|
|
* Réinitialiser la route pour avoir toujours les liens du menu propre
|
|
|
|
*/
|
2012-05-20 16:31:28 +00:00
|
|
|
$params['route'] = null;
|
|
|
|
|
2012-11-15 13:30:33 +00:00
|
|
|
switch($controller)
|
|
|
|
{
|
2011-04-15 10:25:46 +00:00
|
|
|
case 'recherche':
|
2012-04-12 13:08:16 +00:00
|
|
|
switch($action){
|
|
|
|
case 'ipari':
|
|
|
|
if (!empty($this->siret)) { $params['siret'] = $this->siret; }
|
2012-05-20 16:31:28 +00:00
|
|
|
break;
|
|
|
|
}
|
2011-08-29 14:19:14 +00:00
|
|
|
break;
|
2011-05-20 08:25:05 +00:00
|
|
|
case 'evaluation':
|
2013-01-07 08:10:04 +00:00
|
|
|
if (!empty($this->siret)) { $params['siret'] = substr($this->siret,0,9); }
|
2011-10-26 12:18:25 +00:00
|
|
|
if (!empty($this->id)) { $params['id'] = $this->id; }
|
|
|
|
break;
|
2011-04-15 09:05:30 +00:00
|
|
|
case 'identite':
|
2012-11-15 13:30:33 +00:00
|
|
|
switch($action){
|
|
|
|
case 'liens':
|
|
|
|
if (!empty($this->lienref)) { $params['lienref'] = $this->lienref; }
|
|
|
|
if (!empty($this->siret)) { $params['siret'] = $this->siret; }
|
|
|
|
if (!empty($this->id)) { $params['id'] = $this->id; }
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
if (!empty($this->siret)) { $params['siret'] = $this->siret; }
|
|
|
|
if (!empty($this->id)) { $params['id'] = $this->id; }
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case 'pieces':
|
2011-05-02 07:20:13 +00:00
|
|
|
case 'finance':
|
2011-04-19 06:23:20 +00:00
|
|
|
case 'dirigeant':
|
2011-04-19 07:21:06 +00:00
|
|
|
if (!empty($this->siret)) { $params['siret'] = $this->siret; }
|
|
|
|
if (!empty($this->id)) { $params['id'] = $this->id; }
|
2011-08-29 14:19:14 +00:00
|
|
|
break;
|
2011-08-24 12:31:08 +00:00
|
|
|
case 'juridique':
|
|
|
|
if (!empty($this->siret)) { $params['siret'] = $this->siret; }
|
|
|
|
if (!empty($this->id)) { $params['id'] = $this->id; }
|
2011-11-28 13:05:41 +00:00
|
|
|
break;
|
|
|
|
case 'saisie':
|
|
|
|
switch($action){
|
|
|
|
case 'fiche':
|
2012-11-15 13:30:33 +00:00
|
|
|
if (!empty($this->siret)) { $params['siret'] = $this->siret; }
|
|
|
|
if (!empty($this->id)) { $params['id'] = $this->id; }
|
2012-05-20 16:31:28 +00:00
|
|
|
break;
|
2011-08-24 12:31:08 +00:00
|
|
|
}
|
2012-05-20 16:31:28 +00:00
|
|
|
break;
|
2012-06-15 14:30:30 +00:00
|
|
|
case 'bdf':
|
|
|
|
if (!empty($this->siret)) {
|
|
|
|
$params['siret'] = $this->siret;
|
|
|
|
}
|
|
|
|
break;
|
2011-04-15 09:05:30 +00:00
|
|
|
}
|
|
|
|
return $params;
|
|
|
|
}
|
2011-09-06 12:40:31 +00:00
|
|
|
}
|