/[openfoncier]/trunk/obj/utils.class.php
ViewVC logotype

Annotation of /trunk/obj/utils.class.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 8329 - (hide annotations)
Wed Nov 14 11:20:57 2018 UTC (6 years, 2 months ago) by softime
File size: 151704 byte(s)
* Merge de la branche d'intégration 4.8.0-develop dans le trunk

1 mbroquet 3730 <?php
2     /**
3     * Ce fichier est destine a permettre la surcharge de certaines methodes de
4     * la classe om_application pour des besoins specifiques de l'application
5     *
6     * @package openmairie_exemple
7     * @version SVN : $Id: utils.class.php 6132 2016-03-09 09:18:18Z stimezouaght $
8     */
9    
10     /**
11     *
12     */
13 softime 8329 if (file_exists("../dyn/locales.inc.php") === true) {
14     require_once "../dyn/locales.inc.php";
15     }
16 mbroquet 3730
17     /**
18     *
19     */
20 softime 8329 if (file_exists("../dyn/include.inc.php") === true) {
21     require_once "../dyn/include.inc.php";
22     } else {
23     /**
24     * Définition de la constante représentant le chemin d'accès au framework
25     */
26     define("PATH_OPENMAIRIE", getcwd()."/../core/");
27    
28     /**
29     * Dépendances PHP du framework
30     * On modifie la valeur de la directive de configuration include_path en
31     * fonction pour y ajouter les chemins vers les librairies dont le framework
32     * dépend.
33     */
34     set_include_path(
35     get_include_path().PATH_SEPARATOR.implode(
36     PATH_SEPARATOR,
37     array(
38     getcwd()."/../php/pear",
39     getcwd()."/../php/db",
40     getcwd()."/../php/fpdf",
41     getcwd()."/../php/phpmailer",
42     getcwd()."/../php/tcpdf",
43     )
44     )
45     );
46 mbroquet 3730
47 softime 8329 /**
48     * Retourne l'URL de la racine d'openADS.
49     * Exemple : http://localhost/openads/
50     */
51     if (!function_exists("get_base_url")) {
52     function get_base_url() {
53     // Récupération du protocole
54     $protocol = 'http';
55     if (isset($_SERVER['HTTPS'])) {
56     $protocol = ($_SERVER['HTTPS'] && $_SERVER['HTTPS'] != "off") ? "https" : "http";
57     }
58     // Récupération du domaine
59     $domain = $_SERVER['HTTP_HOST'];
60     // Récupération du port
61     $port = $_SERVER['SERVER_PORT'];
62     $disp_port = ($protocol == 'http' && $port == 80 || $protocol == 'https' && $port == 443) ? '' : ":$port";
63     // Construction du chemin restant
64     $base_url = str_replace('app', '', rtrim(dirname($_SERVER['PHP_SELF']), '/\\'));
65     //
66     return $protocol."://".$domain.$disp_port.$base_url;
67     }
68     }
69     define("PATH_BASE_URL", get_base_url());
70     }
71    
72 mbroquet 3730 /**
73     *
74     */
75 softime 8329 if (file_exists("../dyn/debug.inc.php") === true) {
76     require_once "../dyn/debug.inc.php";
77     }
78 mbroquet 3730
79     /**
80     *
81     */
82     (defined("PATH_OPENMAIRIE") ? "" : define("PATH_OPENMAIRIE", ""));
83    
84     /**
85     *
86     */
87     require_once PATH_OPENMAIRIE."om_application.class.php";
88    
89     /**
90     *
91     */
92     class utils extends application {
93    
94 fmichon 4471 /**
95 softime 8329 * Gestion du nom de l'application.
96     *
97     * @var mixed Configuration niveau application.
98     */
99     protected $_application_name = "openADS";
100    
101     /**
102     * Titre HTML.
103     *
104     * @var mixed Configuration niveau application.
105     */
106     protected $html_head_title = ":: openMairie :: openADS";
107    
108     /**
109     * Gestion du nom de la session.
110     *
111     * @var mixed Configuration niveau application.
112     */
113     protected $_session_name = "openads";
114    
115     /**
116 fmichon 4471 * Gestion du favicon de l'application.
117     *
118     * @var mixed Configuration niveau application.
119     */
120     var $html_head_favicon = '../app/img/favicon.ico';
121    
122 softime 8329 /**
123     * Gestion du mode de gestion des permissions.
124     *
125     * @var mixed Configuration niveau application.
126     */
127     protected $config__permission_by_hierarchical_profile = false;
128    
129 mbroquet 3730 // {{{
130    
131     /**
132     * SURCHARGE DE LA CLASSE OM_APPLICATION.
133     *
134     * @see Documentation sur la méthode parent 'om_application:getCollectivite'.
135     */
136     function getCollectivite($om_collectivite_idx = null) {
137     // On vérifie si une valeur a été passée en paramètre ou non.
138     if ($om_collectivite_idx === null) {
139     // Cas d'utilisation n°1 : nous sommes dans le cas où on
140     // veut récupérer les informations de la collectivité de
141     // l'utilisateur et on stocke l'info dans un flag.
142     $is_get_collectivite_from_user = true;
143     // On initialise l'identifiant de la collectivité
144     // à partir de la variable de session de l'utilisateur.
145     $om_collectivite_idx = $_SESSION['collectivite'];
146     } else {
147     // Cas d'utilisation n°2 : nous sommes dans le cas où on
148     // veut récupérer les informations de la collectivité
149     // passée en paramètre et on stocke l'info dans le flag.
150     $is_get_collectivite_from_user = false;
151     }
152     //
153     $collectivite_parameters = parent::getCollectivite($om_collectivite_idx);
154    
155     //// BEGIN - SURCHARGE OPENADS
156    
157     // Ajout du paramétrage du sig pour la collectivité
158     if (file_exists("../dyn/var.inc")) {
159     include "../dyn/var.inc";
160     }
161     if (file_exists("../dyn/sig.inc.php")) {
162     include "../dyn/sig.inc.php";
163     }
164 softime 4760 if (!isset($sig_externe)) {
165     $sig_externe = "sig-default";
166     }
167 mbroquet 3730 $idx_multi = $this->get_idx_collectivite_multi();
168    
169 softime 4749 if (isset($collectivite_parameters['om_collectivite_idx'])
170     && isset($conf[$sig_externe][$collectivite_parameters['om_collectivite_idx']])
171     && isset($conf[$sig_externe]["sig_treatment_mod"])
172     && isset($collectivite_parameters["option_sig"])
173     && $collectivite_parameters["option_sig"] == "sig_externe"
174 mbroquet 3730 ) {
175    
176     // Cas numéro 1 : conf sig définie sur la collectivité et option sig active
177     $collectivite_parameters["sig"] = $conf[$sig_externe][$collectivite_parameters['om_collectivite_idx']];
178 nhaye 4099 $collectivite_parameters["sig"]["sig_treatment_mod"] = $conf[$sig_externe]["sig_treatment_mod"];
179 mbroquet 3730
180 softime 4749 } elseif($idx_multi != ''
181     && isset($conf[$sig_externe][$idx_multi])
182     && isset($conf[$sig_externe]["sig_treatment_mod"])
183     && isset($collectivite_parameters["option_sig"])
184     && $collectivite_parameters["option_sig"] == "sig_externe") {
185 mbroquet 3730 // Cas numéro : conf sig définie sur la collectivité multi et
186     // option_sig activé pour la collectivité mono
187     $collectivite_parameters["sig"] = $conf[$sig_externe][$idx_multi];
188 nhaye 4099 $collectivite_parameters["sig"]["sig_treatment_mod"] = $conf[$sig_externe]["sig_treatment_mod"];
189 mbroquet 3730 }
190    
191     //// END - SURCHARGE OPENADS
192    
193     // Si on se trouve dans le cas d'utilisation n°1
194     if ($is_get_collectivite_from_user === true) {
195     // Alors on stocke dans l'attribut collectivite le tableau de
196     // paramètres pour utilisation depuis la méthode 'getParameter'.
197     $this->collectivite = $collectivite_parameters;
198     }
199     // On retourne le tableau de paramètres.
200     return $collectivite_parameters;
201     }
202    
203     /**
204     * Retourne l'identifiant de la collectivité multi ou l'identifiant de la
205     * seule collectivité dans le cas d'une installation mono.
206     *
207     * @return integer Identifiant de la collectivité multi.
208     */
209     public function get_idx_collectivite_multi() {
210     // Récupère l'identifiant de la collectivité de niveau 2
211     $sql = "SELECT om_collectivite FROM ".DB_PREFIXE."om_collectivite WHERE niveau = '2'";
212     $idx = $this->db->getOne($sql);
213     $this->addToLog(__METHOD__.": db->getOne(\"".$sql."\");", VERBOSE_MODE);
214     $this->isDatabaseError($idx);
215    
216     // S'il n'y a pas de collectivité de niveau 2
217     if ($idx == null || $idx == '') {
218    
219     // Compte le nombre de collectivité
220     $sql = "SELECT count(om_collectivite) FROM ".DB_PREFIXE."om_collectivite";
221     $count = $this->db->getOne($sql);
222     $this->addToLog(__METHOD__.": db->getOne(\"".$sql."\");", VERBOSE_MODE);
223     $this->isDatabaseError($count);
224    
225     // S'il y qu'une collectivité
226     if ($count == 1) {
227    
228     // Récupère l'identifiant de la seule collectivité
229     $sql = "SELECT om_collectivite FROM ".DB_PREFIXE."om_collectivite WHERE niveau = '1'";
230     $idx = $this->db->getOne($sql);
231     $this->addToLog(__METHOD__.": db->getOne(\"".$sql."\");", VERBOSE_MODE);
232     $this->isDatabaseError($idx);
233     }
234    
235     }
236    
237     // Retourne l'identifiant
238     return $idx;
239     }
240    
241    
242     /**
243     * Retourne l'identifiant de la collectivité de l'element de la table passée
244     * en paramètre.
245     *
246     * @param string $table Table de l'element.
247     * @param mixed $id Identifiant de l'element.
248     *
249     * @return string identifiant de la collectivite ou false si l'element n'existe pas.
250     */
251     public function get_collectivite_of_element($table, $id) {
252 softime 7996 $instance = $this->get_inst__om_dbform(array(
253     "obj" => $table,
254     "idx" => $id,
255     ));
256 mbroquet 3730 if($instance->getVal($instance->clePrimaire) != '') {
257     return $instance->getVal('om_collectivite');
258     }
259     return false;
260     }
261    
262    
263     /**
264 softime 6929 * Retourne vrai si la collectivité passée en paramètre ou la collectivité
265     * de l'utilisateur connecté est mono.
266     *
267     * @param string $id Identifiant de la collectivité.
268     *
269     * @return boolean
270 mbroquet 3730 */
271 softime 6929 public function isCollectiviteMono($id = null) {
272     // Si on ne passe pas de collectivité en argument
273     if ($id == null) {
274     // On vérifie la collectivité stockée en session de l'utilisateur
275     // connecté
276     $res = false;
277     if ($_SESSION['niveau'] === '1') {
278     //
279     $res = true;
280     }
281     //
282     return $res;
283     }
284    
285     // Requête SQL
286 mbroquet 3730 $sql = "SELECT niveau FROM ".DB_PREFIXE."om_collectivite WHERE om_collectivite = ".$id;
287     $niveau = $this->db->getOne($sql);
288     $this->addToLog(__METHOD__.": db->getOne(\"".$sql."\");", VERBOSE_MODE);
289     $this->isDatabaseError($niveau);
290 softime 6929
291     //
292     if ($niveau === '1') {
293     //
294 mbroquet 3730 return true;
295     }
296 softime 6929 //
297 mbroquet 3730 return false;
298     }
299    
300 softime 6929
301 mbroquet 3730 // }}}
302    
303     // {{{
304    
305     var $om_utilisateur = array();
306     var $user_is_instr = NULL;
307     var $user_is_service = NULL;
308     var $user_is_admin = NULL;
309     var $user_is_service_ext = NULL;
310     var $user_is_qualificateur = NULL;
311     var $user_is_chef = NULL;
312     var $user_is_divisionnaire = NULL;
313     var $user_is_service_int = NULL;
314    
315     /**
316     * Méthode de récupération des informations de l'utilisateur connecté.
317     */
318     function getUserInfos() {
319    
320     // Si l'utilisateur est loggé $_SESSION existe
321     if(isset($_SESSION['login']) AND !empty($_SESSION['login'])) {
322    
323     // Récupération des infos utilisateur
324     $sqlUser = "SELECT om_utilisateur, nom, email, login, om_collectivite, om_profil ".
325     "FROM ".DB_PREFIXE."om_utilisateur WHERE login = '".$_SESSION['login']."'";
326     $resUser=$this->db->query($sqlUser);
327     $this->addToLog("getUserInfos(): db->query(\"".$sqlUser."\");", VERBOSE_MODE);
328     if ( database::isError($resUser)){
329     die();
330     }
331     $this->om_utilisateur=&$resUser->fetchRow(DB_FETCHMODE_ASSOC);
332    
333     // Récupère le profil et test si c'est un
334     $sqlProfil = "SELECT libelle FROM ".DB_PREFIXE."om_profil WHERE om_profil = ".$this->om_utilisateur['om_profil'];
335     $resProfil=$this->db->getOne($sqlProfil);
336     $this->addToLog("getUserInfos(): db->getOne(\"".$sqlProfil."\");", VERBOSE_MODE);
337     if (database::isError($resProfil)){
338     die();
339     }
340     // Sauvegarde le libelle du profil
341     $this->om_utilisateur["libelle_profil"] = $resProfil;
342    
343     // si c'est un administrateur technique
344     // XXX Mauvaise méthode, il faut utiliser isAccredited
345     if ($resProfil == "ADMINISTRATEUR TECHNIQUE"
346     || $resProfil == "ADMINISTRATEUR FONCTIONNEL") {
347     $this->user_is_admin = true;
348     } else {
349     $this->user_is_admin = false;
350     }
351    
352     //si c'est un service externe
353     if ($resProfil == "SERVICE CONSULTÉ") {
354     $this->user_is_service_ext = true;
355     } else {
356     $this->user_is_service_ext = false;
357     }
358    
359     //si c'est un service interne
360     if ($resProfil == "SERVICE CONSULTÉ INTERNE") {
361     $this->user_is_service_int = true;
362     } else {
363     $this->user_is_service_int = false;
364     }
365    
366     // si c'est un qualificateur
367     if ($resProfil == "QUALIFICATEUR") {
368     $this->user_is_qualificateur = true;
369     } else {
370     $this->user_is_qualificateur = false;
371     }
372    
373     // si c'est un chef de service
374     if ($resProfil == "CHEF DE SERVICE") {
375     $this->user_is_chef = true;
376     } else {
377     $this->user_is_chef = false;
378     }
379    
380     // si c'est un divisionnaire
381     if ($resProfil == "DIVISIONNAIRE") {
382     $this->user_is_divisionnaire = true;
383     } else {
384     $this->user_is_divisionnaire = false;
385     }
386    
387     // Récupération des infos instructeur
388     $sqlInstr = "SELECT instructeur.instructeur, instructeur.nom, instructeur.telephone,
389     division.division, division.code, division.libelle ".
390     "FROM ".DB_PREFIXE."instructeur INNER JOIN ".DB_PREFIXE."division ON division.division=instructeur.division ".
391     "WHERE instructeur.om_utilisateur = ".$this->om_utilisateur['om_utilisateur'];
392     $resInstr=$this->db->query($sqlInstr);
393     $this->addToLog("getUserInfos(): db->query(\"".$sqlInstr."\");", VERBOSE_MODE);
394     if ( database::isError($resInstr)){
395     die();
396     }
397     $tempInstr=&$resInstr->fetchRow(DB_FETCHMODE_ASSOC);
398     // Si il y a un resultat c'est un instructeur
399     if(count($tempInstr)>0) {
400     $this->user_is_instr=true;
401     $this->om_utilisateur = array_merge($this->om_utilisateur,$tempInstr);
402     } else {
403     $this->user_is_instr=false;
404     }
405    
406     // Récupération des infos de services consultés
407     $sqlServ = "SELECT service.service, service.abrege, service.libelle ".
408     "FROM ".DB_PREFIXE."service ".
409     "INNER JOIN ".DB_PREFIXE."lien_service_om_utilisateur ON lien_service_om_utilisateur.service=service.service ".
410     "WHERE lien_service_om_utilisateur.om_utilisateur = ".$this->om_utilisateur['om_utilisateur'];
411     $resServ=$this->db->query($sqlServ);
412     $this->addToLog("getUserInfos(): db->query(\"".$sqlServ."\");", VERBOSE_MODE);
413     if ( database::isError($resServ)){
414     die();
415     }
416    
417     while ($tempServ=&$resServ->fetchRow(DB_FETCHMODE_ASSOC)) {
418     $this->om_utilisateur['service'][]=$tempServ;
419     }
420     // Si il y a un resultat c'est un utilisateur de service
421     if(isset($this->om_utilisateur['service'])) {
422     $this->user_is_service=true;
423     } else {
424     $this->user_is_service=false;
425     }
426     }
427     }
428    
429     /**
430     * getter user_is_service
431     */
432     function isUserService() {
433     //
434     if (is_null($this->user_is_service)) {
435     //
436     $this->getUserInfos();
437     }
438     //
439     return $this->user_is_service;
440     }
441    
442     /**
443     * getter user_is_instr
444     */
445     function isUserInstructeur() {
446     //
447     if (is_null($this->user_is_instr)) {
448     //
449     $this->getUserInfos();
450     }
451     //
452     return $this->user_is_instr;
453     }
454    
455     function isUserAdministrateur() {
456     //
457     if (is_null($this->user_is_admin)) {
458     //
459     $this->getUserInfos();
460     }
461     //
462     return $this->user_is_admin;
463     }
464    
465     /**
466     * getter user_is_service_ext
467     */
468     function isUserServiceExt() {
469     //
470     if (is_null($this->user_is_service_ext)) {
471     //
472     $this->getUserInfos();
473     }
474     //
475     return $this->user_is_service_ext;
476     }
477    
478     /**
479     * getter user_is_service_int
480     */
481     function isUserServiceInt() {
482     //
483     if (is_null($this->user_is_service_int)) {
484     //
485     $this->getUserInfos();
486     }
487     //
488     return $this->user_is_service_int;
489     }
490    
491     /**
492     * getter user_is_qualificateur
493     */
494     function isUserQualificateur() {
495     //
496     if (is_null($this->user_is_qualificateur)) {
497     //
498     $this->getUserInfos();
499     }
500     //
501     return $this->user_is_qualificateur;
502     }
503    
504     /**
505     * getter user_is_chef
506     */
507     function isUserChef() {
508     //
509     if (is_null($this->user_is_chef)) {
510     //
511     $this->getUserInfos();
512     }
513     //
514     return $this->user_is_chef;
515     }
516    
517     /**
518     * getter user_is_divisionnaire
519     */
520     function isUserDivisionnaire() {
521     //
522     if (is_null($this->user_is_divisionnaire)) {
523     //
524     $this->getUserInfos();
525     }
526     //
527     return $this->user_is_divisionnaire;
528     }
529    
530     /**
531     * Méthode permettant de définir si l'utilisateur connecté peut ajouter un
532     * événement d'instruction
533     *
534     * @param integer $idx identifiant du dossier
535     * @param string $obj objet
536     *
537     * @return boolean true si il peut false sinon
538     */
539     function isUserCanAddObj($idx, $obj) {
540     // Si il à le droit "bypass" il peut ajouter
541     if($this->isAccredited($obj."_ajouter_bypass") === true) {
542     return true;
543     }
544     if($this->isAccredited(array($obj."_ajouter", $obj), "OR") === false) {
545     return false;
546     }
547 softime 6565 $return = false;
548    
549 softime 7996 $object_instance = $this->get_inst__om_dbform(array(
550     "obj" => $obj,
551     "idx" => "]",
552     ));
553 mbroquet 3730 // Si il n'est pas dans la même division on défini le retour comme faux
554     // à moins qu'il ai un droit de changement de decision
555 softime 6565 if($this->isUserInstructeur() === true &&
556     ($object_instance->getDivisionFromDossier($idx) == $_SESSION["division"] or
557     ($obj == "instruction" &&
558     $object_instance->isInstrCanChangeDecision($idx) === true))) {
559 mbroquet 3730
560 softime 6565 $return = true;
561 mbroquet 3730 }
562    
563     return $return;
564     }
565    
566 softime 6565
567 mbroquet 3730 /**
568 softime 6565 * Ajout de variables de session contenant la division pour permettre une
569     * utilisation plus efficace dans les requetes.
570 mbroquet 3730 *
571 softime 6565 * @param array $utilisateur Tableau d'informations de l'utilisateur.
572 mbroquet 3730 */
573 softime 6929 function triggerAfterLogin($utilisateur = NULL) {
574 softime 6565 // Récupération de la division de l'utilisateur.
575 mbroquet 3730 $sql = "SELECT instructeur.division, division.code
576 softime 6565 FROM ".DB_PREFIXE."instructeur
577     LEFT JOIN ".DB_PREFIXE."division
578     ON instructeur.division = division.division
579     WHERE instructeur.om_utilisateur='".$utilisateur["om_utilisateur"]."'";
580 mbroquet 3730 $res = $this->db->query($sql);
581 softime 6565 $this->addToLog(
582     "triggerAfterLogin(): db->query(\"".$sql."\");",
583     VERBOSE_MODE
584     );
585     if (database::isError($res)) {
586 mbroquet 3730 die();
587     }
588     $row = $res->fetchrow(DB_FETCHMODE_ASSOC);
589 softime 6565 // Enregistrement de la division en session
590 mbroquet 3730 if (isset($row["division"]) && $row["division"] != NULL) {
591     $_SESSION["division"] = $row["division"];
592     $_SESSION["division_code"] = $row["code"];
593     } else {
594     $_SESSION["division"] = "0";
595     $_SESSION["division_code"] = "";
596     }
597 softime 6565 // Récupération du paramétrage des groupes de l'utilisateur.
598     $sqlGroupes = "SELECT groupe.code, lien_om_utilisateur_groupe.confidentiel, lien_om_utilisateur_groupe.enregistrement_demande, groupe.libelle
599     FROM ".DB_PREFIXE."groupe
600     RIGHT JOIN ".DB_PREFIXE."lien_om_utilisateur_groupe ON
601     lien_om_utilisateur_groupe.groupe = groupe.groupe
602 softime 6674 WHERE lien_om_utilisateur_groupe.login = '".$utilisateur["login"] ."'
603 softime 6565 ORDER BY libelle";
604     $resGroupes = $this->db->query($sqlGroupes);
605     $this->addToLog(
606     "triggerAfterLogin(): db->query(\"".$sqlGroupes."\");",
607     VERBOSE_MODE
608     );
609     if (database::isError($resGroupes)) {
610     die();
611     }
612     // Si aucun résultat alors récupération du paramétrage des groupes du profil
613     if ($resGroupes->numRows() === 0) {
614     $sqlGroupes = "SELECT groupe.code, lien_om_profil_groupe.confidentiel, lien_om_profil_groupe.enregistrement_demande, groupe.libelle
615     FROM ".DB_PREFIXE."groupe
616     RIGHT JOIN ".DB_PREFIXE."lien_om_profil_groupe ON
617     lien_om_profil_groupe.groupe = groupe.groupe
618     AND om_profil = ".$utilisateur["om_profil"] ."
619     ORDER BY libelle";
620     $resGroupes = $this->db->query($sqlGroupes);
621     $this->addToLog(
622     "triggerAfterLogin(): db->query(\"".$sqlGroupes."\");",
623     VERBOSE_MODE
624     );
625     if (database::isError($resGroupes)) {
626     die();
627     }
628     }
629     $_SESSION["groupe"] = array();
630     // Enregistrement des groupe en session
631     while ($row = $resGroupes->fetchrow(DB_FETCHMODE_ASSOC)) {
632     if ($row["confidentiel"] === 't') {
633     $row["confidentiel"] = true;
634     } else {
635     $row["confidentiel"] = false;
636     }
637     if ($row["enregistrement_demande"] === 't') {
638     $row["enregistrement_demande"] = true;
639     } else {
640     $row["enregistrement_demande"] = false;
641     }
642     $_SESSION["groupe"][$row["code"]] = array(
643     "confidentiel" => $row["confidentiel"],
644     "enregistrement_demande" => $row["enregistrement_demande"],
645     "libelle" => $row["libelle"],
646     );
647     }
648     }
649 mbroquet 3730
650     // Affichage des actions supplémentaires
651     function displayActionExtras() {
652     // Affichage de la division si l'utilisateur en possède une
653     if ($_SESSION["division"] != 0) {
654     echo "\t\t\t<li class=\"action-division\">";
655     echo "(".$_SESSION['division_code'].")";
656     echo "</li>\n";
657     }
658     }
659    
660     // }}}
661    
662    
663     // {{{ GESTION DES FICHIERS
664    
665     /**
666     *
667     */
668     function notExistsError ($explanation = NULL) {
669     // message
670     $message_class = "error";
671     $message = _("Cette page n'existe pas.");
672     $this->addToMessage ($message_class, $message);
673     //
674     $this->setFlag(NULL);
675     $this->display();
676    
677     //
678     die();
679     }
680    
681     // }}}
682     /**
683     * Retourne le statut du dossier d'instruction
684     * @param string $idx Identifiant du dossier d'instruction
685     * @return string Le statut du dossier d'instruction
686     */
687     function getStatutDossier($idx){
688    
689     $statut = '';
690    
691     //Si l'identifiant du dossier d'instruction fourni est correct
692     if ( $idx != '' ){
693    
694     //On récupère le statut de l'état du dossier à partir de l'identifiant du
695     //dossier d'instruction
696     $sql = "SELECT etat.statut
697     FROM ".DB_PREFIXE."dossier
698     LEFT JOIN
699     ".DB_PREFIXE."etat
700     ON
701     dossier.etat = etat.etat
702     WHERE dossier ='".$idx."'";
703     $statut = $this->db->getOne($sql);
704     $this->addToLog("getStatutDossier() : db->getOne(\"".$sql."\")", VERBOSE_MODE);
705     if ( database::isError($statut)){
706     die();
707     }
708     }
709     return $statut;
710     }
711    
712     /**
713     * Formate le champ pour le type Timestamp
714     * @param date $date_str Date
715     * @param boolean $show Format pour l'affichage
716     * @return mixed False si le traitement échoue ou la date formatée
717     */
718     function formatTimestamp ($date_str, $show = true) {
719    
720     // Sépare la date et l'heure
721     $date = explode(" ", $date_str);
722     if (count($date) != 2) {
723     return false;
724     }
725    
726     // Date en BDD
727     $date_db = explode ('-', $date[0]);
728     // Date en affichage
729     $date_show = explode ('/', $date[0]);
730    
731     // Contrôle la composition de la date
732     if (count ($date_db) != 3 and count ($date_show) != 3) {
733     return false;
734     }
735    
736     if (count ($date_db) == 3) {
737     // Vérifie que c'est une date valide
738     if (!checkdate($date_db[1], $date_db[2], $date_db[0])) {
739     return false;
740     }
741     // Si c'est pour l'affichage de la date
742     if ($show == true) {
743     return $date_db [2]."/".$date_db [1]."/".$date_db [0]." ".$date[1];
744     } else {
745     return $date[0];
746     }
747     }
748    
749     //
750     if (count ($date_show) == 3) {
751     // Vérifie que c'est une date valide
752     if (!checkdate($date_show[1], $date_show[0], $date_show[2])) {
753     return false;
754     }
755     // Si c'est pour l'affichage de la date
756     if ($show == true) {
757     return $date[0];
758     } else {
759     return $date_show [2]."-".$date_show [1]."-".$date_show [0]." ".$date[1];
760     }
761    
762     }
763     return false;
764    
765     }
766    
767     /**
768     * Permet de calculer la liste des parcelles à partir de la chaîne passée en paramètre
769     * et la retourner sous forme d'un tableau associatif
770     *
771     * @param string $strParcelles Chaîne de la parcelles.
772     * @param string $collectivite_idx Collectivite de la parcelle.
773     *
774     * @return array (array(prefixe, quartier, section, parcelle), ...)
775     */
776     function parseParcelles($strParcelles, $collectivite_idx = null) {
777    
778     // Séparation des lignes
779     $references = explode(";", $strParcelles);
780     $liste_parcelles = array();
781    
782     // On boucle sur chaque ligne pour ajouter la liste des parcelles de chaque ligne
783     foreach ($references as $parcelles) {
784    
785     // On transforme la chaîne de la ligne de parcelles en tableau
786     $ref = str_split($parcelles);
787     // Les 1er caractères sont numériques
788     $num = true;
789    
790     // Tableau des champs de la ligne de références cadastrales
791     $reference_tab = array();
792     $temp = "";
793     foreach ($ref as $carac) {
794    
795     // Permet de tester si le caractère courant est de même type que le précédent
796     if(is_numeric($carac) === $num) {
797     $temp .= $carac;
798     } else {
799     // Bascule
800     $num = !$num;
801     // On stock le champ
802     $reference_tab[] = $temp;
803     // re-init de la valeur temporaire pour le champ suivant
804     $temp = $carac;
805     }
806     }
807     // Stockage du dernier champ sur lequel il n'y a pas eu de bascule
808     $reference_tab[] = $temp;
809     // Calcul des parcelles
810     $quartier = $reference_tab[0];
811     $sect = $reference_tab[1];
812    
813     $ancien_ref_parc = "";
814     for ($i=2; $i < count($reference_tab); $i+=2) {
815     if($collectivite_idx != null) {
816     // Récupération du code impot de l'arrondissement
817     $collectivite = $this->getCollectivite($collectivite_idx);
818     $parc["prefixe"] = $this->get_arrondissement_code_impot($quartier);
819     }
820     $parc["quartier"] = $quartier;
821     // Met en majuscule si besoin
822     $parc["section"] = strtoupper($sect);
823     if( $ancien_ref_parc == "" OR $reference_tab[$i-1] == "/") {
824     // 1ere parcelle ou parcelle individuelle
825     // Compléte par des "0" le début de la chaîne si besoin
826     $parc["parcelle"] = str_pad($reference_tab[$i], 4, "0", STR_PAD_LEFT);
827     // Ajout d'une parcelle à la liste
828     $liste_parcelles[] = $parc;
829     } elseif ($reference_tab[$i-1] == "A") {
830     // Interval de parcelles
831     for ($j=$ancien_ref_parc+1; $j <= $reference_tab[$i]; $j++) {
832     // Compléte par des "0" le début de la chaîne si besoin
833     $parc["parcelle"] = str_pad($j, 4, "0", STR_PAD_LEFT);
834     // Ajout d'une parcelle à la liste
835     $liste_parcelles[] = $parc;
836     }
837     }
838     //Gestion des erreurs
839     else{
840    
841     echo _("Une erreur de formattage a ete detecte dans la reference cadastrale du dossier ").$this->row['dossier'];
842     }
843     // Sauvegarde de la référence courante de parcelle
844     $ancien_ref_parc = $reference_tab[$i];
845     }
846     }
847    
848     return $liste_parcelles;
849     }
850    
851    
852     /**
853     * Récupère le code impôt par rapport au quartier.
854     *
855     * @param string $quartier Numéro de quartier.
856     * @return string Code impôts.
857     */
858     protected function get_arrondissement_code_impot($quartier) {
859     // Initialisation
860     $code_impots = "";
861     // Si le quartier fournis est correct
862     if ($quartier != "") {
863     // Requête SQL
864     $sql = "SELECT
865     arrondissement.code_impots
866     FROM
867     ".DB_PREFIXE."arrondissement
868     LEFT JOIN
869     ".DB_PREFIXE."quartier
870     ON
871     quartier.arrondissement = arrondissement.arrondissement
872     WHERE
873     quartier.code_impots = '".$quartier."'";
874    
875     }
876     $code_impots = $this->db->getOne($sql);
877     if ($code_impots === null) {
878     $code_impots = "";
879     }
880     $this->isDatabaseError($code_impots);
881     // Retour
882     return $code_impots;
883     }
884    
885    
886     /**
887     * Formate les parcelles en ajoutant le code impôt
888     * @param array $liste_parcelles Tableau des parcelles
889     * @return string Liste des parcelles formatées
890     */
891     function formatParcelleToSend($liste_parcelles) {
892    
893     //
894     $wParcelle = array();
895    
896     //Formatage des références cadastrales pour l'envoi
897     foreach ($liste_parcelles as $value) {
898    
899     // On ajoute les données dans le tableau que si quartier + section + parcelle
900     // a été fourni
901     if ($value["quartier"] !== ""
902     && $value["section"] !== ""
903     && $value["parcelle"] !== ""){
904    
905     //On récupère le code impôt de l'arrondissement
906     $arrondissement = $this->getCodeImpotByQuartier($value["quartier"]);
907    
908     //On ajoute la parcelle, si un arrondissement a été trouvé
909     if ($arrondissement!=="") {
910     //
911     $wParcelle[] = $arrondissement.$value["quartier"].
912     str_pad($value["section"], 2, " ", STR_PAD_LEFT).
913     $value["parcelle"];
914     }
915     }
916     }
917    
918     //
919     return $wParcelle;
920     }
921    
922     /**
923     * Récupère le code impôt par rapport au quartier
924     * @param string $quartier Numéro de quartier
925     * @return string Code impôt
926     */
927     function getCodeImpotByQuartier($quartier) {
928    
929     $arrondissement = "";
930    
931     // Si le quartier fournis est correct
932     if ($quartier != "") {
933    
934     // Requête SQL
935     $sql = "SELECT
936     arrondissement.code_impots
937     FROM
938     ".DB_PREFIXE."arrondissement
939     LEFT JOIN
940     ".DB_PREFIXE."quartier
941     ON
942     quartier.arrondissement = arrondissement.arrondissement
943     WHERE
944     quartier.code_impots = '".$quartier."'";
945     $this->addToLog("getCodeImpotByQuartier() : db->getOne(\"".$sql."\")", VERBOSE_MODE);
946     $arrondissement = $this->db->getOne($sql);
947     $this->isDatabaseError($arrondissement);
948     }
949    
950     // Retour
951     return $arrondissement;
952     }
953    
954    
955     /**
956     * Retourne true si tous les paramètres du SIG externe ont bien été définis
957     * @return bool true/false
958     */
959     public function issetSIGParameter($idx) {
960     $collectivite_idx = $this->get_collectivite_of_element("dossier", $idx);
961     $collectivite = $this->getCollectivite($collectivite_idx);
962     if(isset($collectivite["sig"])) {
963     return true;
964     } else {
965     return false;
966     }
967     }
968    
969     /**
970     * Permet de vérifier que des champs existe dans une table
971     * @param array $list_fields Liste des champs à tester
972     * @param string $table Table où les champs doivent exister
973     * @return mixed Retourne les champs qui n'existent pas
974     * ou true
975     */
976     public function check_field_exist($list_fields, $table) {
977    
978     // Instance de la classe en paramètre
979 softime 7996 $object = $this->get_inst__om_dbform(array(
980     "obj" => $table,
981     "idx" => "]",
982     ));
983 mbroquet 3730
984     // Récupère les champs de la table
985     foreach ($object->champs as $champ) {
986     $list_column[] = $champ;
987     }
988    
989     // Tableau des champs en erreur
990     $error_fields = array();
991    
992     // Pour chaque champ à tester
993     foreach ($list_fields as $value) {
994    
995     // S'il n'apparaît pas dans la liste des champs possible
996     if (!in_array($value, $list_column)) {
997    
998     // Alors le champ est ajouté au tableau des erreurs
999     $error_fields[] = $value;
1000     }
1001     }
1002    
1003     // Si le tableau des erreurs n'est pas vide on le retourne
1004     if (count($error_fields) > 0) {
1005     return $error_fields;
1006     }
1007    
1008     // Sinon on retourne le booléen true
1009     return true;
1010    
1011     }
1012    
1013     /*
1014     *
1015     */
1016     /**
1017     * Récupère la lettre type lié à un événement
1018     * @param integer $evenement L'identifiant de l'événement
1019     * @return integer Retourne l'idenfiant de la lettre-type ou true
1020     */
1021     function getLettreType($evenement){
1022    
1023     $lettretype = NULL;
1024    
1025     $sql =
1026     "SELECT
1027     lettretype
1028     FROM
1029     ".DB_PREFIXE."evenement
1030     WHERE
1031     evenement = $evenement";
1032    
1033     $this->addToLog("getLettreType() : db->query(\"".$sql."\")", VERBOSE_MODE);
1034     $res = $this->db->query($sql);
1035     if ( database::isError($res)){
1036     die();
1037     }
1038    
1039     if ( $res->numrows() > 0 ){
1040    
1041     $row=& $res->fetchRow(DB_FETCHMODE_ASSOC);
1042     $lettretype = $row['lettretype'];
1043     }
1044    
1045     return $lettretype;
1046     }
1047    
1048     /**
1049     * Retourne le type de dossier d'autorisation du dossier courant :
1050     * @param $idxDossier Le numéro du dossier d'instruction
1051     * @return le code du type détaillée de dossier d'autorisation
1052     **/
1053     function getDATDCode($idxDossier) {
1054     $sql = "SELECT dossier_autorisation_type_detaille.code
1055     FROM ".DB_PREFIXE."dossier_autorisation_type_detaille
1056     INNER JOIN ".DB_PREFIXE."dossier_autorisation
1057     ON dossier_autorisation_type_detaille.dossier_autorisation_type_detaille =
1058     dossier_autorisation.dossier_autorisation_type_detaille
1059     INNER JOIN ".DB_PREFIXE."dossier ON dossier.dossier_autorisation = dossier_autorisation.dossier_autorisation
1060     WHERE dossier.dossier = '".$idxDossier."'";
1061     $res = $this->db->getOne($sql);
1062     $this->addToLog("getDATDCode() : db->getOne(\"".$sql."\")", VERBOSE_MODE);
1063     if ( database::isError($res)){
1064     die();
1065     }
1066     return $res;
1067     }
1068    
1069     /**
1070 fmichon 4708 * Retourne le type de dossier d'autorisation du dossier courant :
1071     * @param $idxDossier Le numéro du dossier d'instruction
1072     * @return le code du type de dossier d'autorisation
1073     **/
1074     function getDATCode($idxDossier) {
1075     $sql = "
1076     SELECT
1077     dossier_autorisation_type.code
1078     FROM
1079     ".DB_PREFIXE."dossier_autorisation_type
1080     INNER JOIN ".DB_PREFIXE."dossier_autorisation_type_detaille
1081     ON dossier_autorisation_type.dossier_autorisation_type=dossier_autorisation_type_detaille.dossier_autorisation_type
1082     INNER JOIN ".DB_PREFIXE."dossier_autorisation
1083     ON dossier_autorisation_type_detaille.dossier_autorisation_type_detaille=dossier_autorisation.dossier_autorisation_type_detaille
1084     INNER JOIN ".DB_PREFIXE."dossier
1085     ON dossier.dossier_autorisation=dossier_autorisation.dossier_autorisation
1086     WHERE
1087     dossier.dossier = '".$idxDossier."'
1088     ";
1089     $res = $this->db->getOne($sql);
1090     $this->addToLog(__METHOD__."(): db->getOne(\"".$sql."\")", VERBOSE_MODE);
1091     if ( database::isError($res)){
1092     die();
1093     }
1094     return $res;
1095     }
1096    
1097     /**
1098 mbroquet 3730 * Permet de copier un enregistrement
1099     * @param mixed $idx Identifiant de l'enregistrment
1100     * @param string $obj Objet de l'enregistrment
1101     * @param string $objsf Objets associés
1102     * @return array Tableau des nouveaux id et du message
1103     */
1104     function copier($idx, $obj, $objsf) {
1105    
1106     // Tableau de résultat
1107     $resArray = array();
1108     // Message retourné à l'utilisateur
1109     $message = "";
1110     // Type du message (valid ou error)
1111     $message_type = "valid";
1112    
1113     // Requête SQL permettant de récupérer les informations sur l'objet métier
1114     $sql = "SELECT *
1115     FROM ".DB_PREFIXE.$obj."
1116     WHERE ".$obj." = ".$idx;
1117     $res = $this->db->query($sql);
1118     $this->isDatabaseError($res);
1119    
1120     // Valeurs clonées
1121     $valF = array();
1122     while ($row=& $res->fetchRow(DB_FETCHMODE_ASSOC)) {
1123     // Recupère la valeur
1124     $valF = $row;
1125     }
1126    
1127     // Valeurs non clonées
1128     // Identifiant modifié pour que ça soit un ajout
1129     $valF[$obj] = "]";
1130     // Instance de l'objet métier
1131 softime 7996 $clone_obj = $this->get_inst__om_dbform(array(
1132     "obj" => $obj,
1133     "idx" => "]",
1134     ));
1135 mbroquet 3730 // Si dans l'objet métier la fonction "copier" existe
1136     if (method_exists($clone_obj, "update_for_copy")) {
1137     // Traitement sur les valeurs du duplicata
1138     $valF = $clone_obj->update_for_copy($valF, $objsf, DEBUG);
1139     // Recupère les messages retourné par la fonction
1140     $message .= $valF['message'];
1141     // Supprime les messages de la liste des valeurs
1142     unset($valF['message']);
1143     }
1144     // Ajoute le duplicata
1145     $clone_obj->ajouter($valF, $this->db, DEBUG);
1146     // Si aucune erreur se produit dans la classe instanciée
1147     if ($clone_obj->correct === true) {
1148     // Récupère l'identifiant de l'objet créé
1149     $clone_obj_id = $clone_obj->valF[$obj];
1150    
1151     // Message
1152     $message .= sprintf(_("La copie de l'enregistrement %s avec l'identifiant %s s'est effectuee avec succes"), "<span class='bold'>"._($obj)."</span>", "<span class='bold'>".$idx."</span>")."<br />";
1153 softime 7996 $message .= sprintf(
1154     '<a class="om-prev-icon" id="action-link--copy-of-%s-%s" href="%s">%s</a><br/><br/>',
1155     $obj,
1156     $idx,
1157     sprintf(
1158     '%s&obj=%s&action=3&idx=%s',
1159     OM_ROUTE_FORM,
1160     $obj,
1161     $clone_obj_id
1162     ),
1163     ("Cliquer ici pour accéder à la copie")
1164     );
1165 mbroquet 3730 // Ajout de l'identifant au tableau des résultat
1166     $resArray[$obj.'_'.$idx] = $clone_obj_id;
1167    
1168     // S'il y a au moins un objet metier associé
1169     if ($objsf != "") {
1170     // Liste des objet métier associés
1171     $list_objsf = explode(",", $objsf);
1172     // Pour chaque objet associé
1173     foreach ($list_objsf as $key => $objsf) {
1174     // Requête SQL permettant de récupérer les informations sur
1175     // l'objet métier associé
1176     $sql = "SELECT *
1177     FROM ".DB_PREFIXE.$objsf."
1178     WHERE ".$obj." = ".$idx;
1179     $res = $this->db->query($sql);
1180     $this->isDatabaseError($res);
1181    
1182     // Pour chaque élément associé
1183     while ($row=& $res->fetchRow(DB_FETCHMODE_ASSOC)){
1184     // Identifiant de l'objet associé à copier
1185     $idxsf = $row[$objsf];
1186    
1187     // Valeurs clonées
1188     $valF = $row;
1189     // Valeurs non clonées
1190     $valF[$obj] = $clone_obj_id;
1191     // Identifiant modifié pour que ça soit un ajout
1192     $valF[$objsf] = "]";
1193     // Instance de l'objet métier associé
1194 softime 7996 $clone_objsf = $this->get_inst__om_dbform(array(
1195     "obj" => $objsf,
1196     "idx" => "]",
1197     ));
1198 mbroquet 3730 // Si dans l'objet métier associé
1199     // la fonction "copier" existe
1200     if (method_exists($clone_objsf, "update_for_copy")) {
1201     // Traitement sur les valeurs du duplicata
1202     $valF = $clone_objsf->update_for_copy($valF, $objsf, DEBUG);
1203     // Recupère les messages retourné par la fonction
1204     $message .= $valF['message'];
1205     // Supprime les messages de la liste des valeurs
1206     unset($valF['message']);
1207     }
1208     // Ajoute le duplicata
1209     $clone_objsf->ajouter($valF, $this->db, DEBUG);
1210     // Si aucune erreur se produit dans la classe instanciée
1211     if ($clone_objsf->correct === true) {
1212     // Récupère l'identifiant de l'objet créé
1213     $clone_objsf_id = $clone_objsf->valF[$objsf];
1214    
1215     // Message
1216 softime 7996 $message .= sprintf(
1217     _("La copie de l'enregistrement %s avec l'identifiant %s s'est effectuee avec succes"),
1218     "<span class='bold'>"._($objsf)."</span>",
1219     "<span class='bold'>".$idxsf."</span>"
1220     )."<br />";
1221 mbroquet 3730
1222     // Ajout de l'identifant au tableau des résultat
1223     $resArray[$objsf.'_'.$row[$objsf]] = $clone_objsf_id;
1224     } else {
1225    
1226     // Message d'erreur récupéré depuis la classe
1227     $message .= $clone_objsf->msg;
1228     // Type du message
1229     $message_type = "error";
1230     }
1231     }
1232     }
1233     }
1234     //
1235     } else {
1236    
1237     // Message d'erreur récupéré depuis la classe
1238     $message .= $clone_obj->msg;
1239     // Type du message
1240     $message_type = "error";
1241     }
1242    
1243     // Ajout du message au tableau des résultats
1244     $resArray['message'] = $message;
1245     // Ajout du type de message au tableau des résultats
1246     $resArray['message_type'] = $message_type;
1247    
1248     // Retourne le tableau des résultats
1249     return $resArray;
1250     }
1251    
1252     /**
1253     * Cette fonction prend en entrée le ou les paramètres du &contrainte qui sont entre
1254     * parenthèses (un ensemble de paramètres séparés par des points-virgules). Elle
1255     * sépare les paramètres et leurs valeurs puis construit et retourne un tableau
1256     * associatif qui contient pour les groupes et sous-groupes :
1257     * - un tableau de valeurs, avec un nom de groupe ou sous-groupe par ligne
1258     * pour les autres options :
1259     * - la valeur de l'option
1260     *
1261     * @param string $contraintes_param Chaîne contenant tous les paramètres
1262     *
1263     * @return array Tableau associatif avec paramètres et valeurs séparés
1264     */
1265     function explodeConditionContrainte($contraintes_param) {
1266    
1267     // Initialisation des variables
1268     $return = array();
1269     $listGroupes = "";
1270     $listSousgroupes = "";
1271     $service_consulte = "";
1272     $affichage_sans_arborescence = "";
1273    
1274     // Sépare toutes les conditions avec leurs valeurs et les met dans un tableau
1275     $contraintes_params = explode(";", $contraintes_param);
1276    
1277     // Pour chaque paramètre de &contraintes
1278     foreach ($contraintes_params as $value) {
1279     // Récupère le mot-clé "liste_groupe" et les valeurs du paramètre
1280     if (strstr($value, "liste_groupe=")) {
1281     // On enlève le mots-clé "liste_groupe=", on garde les valeurs
1282     $listGroupes = str_replace("liste_groupe=", "", $value);
1283     }
1284     // Récupère le mot-clé "liste_ssgroupe" et les valeurs du paramètre
1285     if (strstr($value, "liste_ssgroupe=")) {
1286     // On enlève le mots-clé "liste_ssgroupe=", on garde les valeurs
1287     $listSousgroupes = str_replace("liste_ssgroupe=", "", $value);
1288     }
1289     // Récupère le mot-clé "service_consulte" et la valeur du paramètre
1290     if (strstr($value, "service_consulte=")) {
1291     // On enlève le mots-clé "service_consulte=", on garde sa valeur
1292     $service_consulte = str_replace("service_consulte=", "", $value);
1293     }
1294     // Récupère le mot-clé "affichage_sans_arborescence" et la valeur du
1295     // paramètre
1296     if (strstr($value, "affichage_sans_arborescence=")) {
1297     // On enlève le mots-clé "affichage_sans_arborescence=", on garde la valeur
1298     $affichage_sans_arborescence = str_replace("affichage_sans_arborescence=", "", $value);
1299     }
1300     }
1301    
1302     // Récupère dans des tableaux la liste des groupes et sous-groupes qui
1303     // doivent être utilisés lors du traitement de la condition
1304     if ($listGroupes != "") {
1305     $listGroupes = array_map('trim', explode(",", $listGroupes));
1306     }
1307     if ($listSousgroupes != "") {
1308     $listSousgroupes = array_map('trim', explode(",", $listSousgroupes));
1309     }
1310    
1311     // Tableau à retourner
1312     $return['groupes'] = $listGroupes;
1313     $return['sousgroupes'] = $listSousgroupes;
1314     $return['service_consulte'] = $service_consulte;
1315     $return['affichage_sans_arborescence'] = $affichage_sans_arborescence;
1316     return $return;
1317     }
1318    
1319     /**
1320     * Méthode qui complète la clause WHERE de la requête SQL de récupération des
1321     * contraintes, selon les paramètres fournis. Elle permet d'ajouter une condition sur
1322     * les groupes, sous-groupes et les services consultés.
1323     *
1324     * @param $string $part Contient tous les paramètres fournis à &contraintes séparés
1325     * par des points-virgules, tel que définis dans l'état.
1326     * array[] $conditions Paramètre optionnel, contient les conditions déjà explosées
1327     * par la fonction explodeConditionContrainte()
1328     *
1329     * @return string Contient les clauses WHERE à ajouter à la requête SQL principale.
1330     */
1331     function traitement_condition_contrainte($part, $conditions = NULL) {
1332    
1333     // Initialisation de la condition
1334     $whereContraintes = "";
1335     // Lorsqu'on a déjà les conditions explosées dans le paramètre $conditions, on
1336     // utilise ces données. Sinon, on appelle la méthode qui explose la chaîne de
1337     // caractères contenant l'ensemble des paramètres.
1338     if (is_array($conditions)){
1339     $explodeConditionContrainte = $conditions;
1340     }
1341     else {
1342     $explodeConditionContrainte = $this->explodeConditionContrainte($part);
1343     }
1344     // Récupère les groupes, sous-groupes et service_consulte pour la condition
1345     $groupes = $explodeConditionContrainte['groupes'];
1346     $sousgroupes = $explodeConditionContrainte['sousgroupes'];
1347     $service_consulte = $explodeConditionContrainte['service_consulte'];
1348    
1349     // Pour chaque groupe
1350     if ($groupes != "") {
1351     foreach ($groupes as $key => $groupe) {
1352     // Si le groupe n'est pas vide
1353     if (!empty($groupe)) {
1354     // Choisit l'opérateur logique
1355     $op_logique = $key > 0 ? 'OR' : 'AND (';
1356     // Ajoute la condition
1357     $whereContraintes .= " ".$op_logique." lower(trim(both E'\n\r\t' from contrainte.groupe)) = lower('"
1358     .pg_escape_string($groupe)."')";
1359     }
1360     }
1361     // S'il y a des valeurs dans groupe
1362     if (count($groupe) > 0) {
1363     // Ferme la parenthèse
1364     $whereContraintes .= " ) ";
1365     }
1366     }
1367    
1368     // Pour chaque sous-groupe
1369     if ($sousgroupes != "") {
1370     foreach ($sousgroupes as $key => $sousgroupe) {
1371     // Si le sous-groupe n'est pas vide
1372     if (!empty($sousgroupe)) {
1373     // Choisit l'opérateur logique
1374     $op_logique = $key > 0 ? 'OR' : 'AND (';
1375     // Ajoute la condition
1376     $whereContraintes .= " ".$op_logique." lower(trim(both E'\n\r\t' from contrainte.sousgroupe)) = lower('"
1377     .pg_escape_string($sousgroupe)."')";
1378     }
1379     }
1380     // S'il y a des valeurs dans sous-groupe
1381     if (count($sousgroupes) > 0) {
1382     // Ferme la parenthèse
1383     $whereContraintes .= " ) ";
1384     }
1385     }
1386    
1387     // Si l'option service_consulte n'est pas vide
1388     if ($service_consulte != "") {
1389     // Ajoute la condition
1390     $whereContraintes .= " AND service_consulte = cast(lower('".$service_consulte."') as boolean) ";
1391     }
1392    
1393     // Condition retournée
1394     return $whereContraintes;
1395     }
1396    
1397     /**
1398     * Calcule une date par l'ajout ou la soustraction de mois ou de jours.
1399     *
1400     * @param date $date Date de base (format dd-mm-yyyy)
1401     * @param integer $delay Délais à ajouter
1402     * @param string $operator Opérateur pour le calcul ("-" ou "+")
1403     * @param string $type Type de calcul (mois ou jour)
1404     *
1405     * @return date Date calculée
1406     */
1407     function mois_date($date, $delay, $operator = "+", $type = "mois") {
1408    
1409     // Si un type n'est pas définit
1410     if ($type != "mois" && $type != "jour") {
1411     //
1412     return null;
1413     }
1414    
1415     // Si aucune date n'a été fournie ou si ce n'est pas une date correctement
1416     // formatée
1417     if ( is_null($date) || $date == "" ||
1418     preg_match('/[0-9]{4}-[0-9]{2}-[0-9]{2}/', $date) == 0 ){
1419     return null;
1420     }
1421    
1422     // Si l'opérateur n'est pas définit
1423     if ($operator != "+" && $operator != "-") {
1424     //
1425     return null;
1426     }
1427    
1428     // Découpage de la date
1429     $temp = explode("-", $date);
1430     $day = (int) $temp[2];
1431     $month = (int) $temp[1];
1432     $year = (int) $temp[0];
1433    
1434     // Si c'est un calcul sur des mois
1435     // Le calcul par mois ne se fait pas comme le calcul par jour car
1436     // les fonctions PHP ne réalisent pas les calculs réglementaires
1437     if ($type == "mois") {
1438    
1439     // Si c'est une addition
1440     if ($operator == '+') {
1441     // Année à ajouter
1442     $year += floor($delay / 12);
1443     // Mois restant
1444     $nb_month = ($delay % 12);
1445     // S'il y a des mois restant
1446     if ($nb_month != 0) {
1447     // Ajout des mois restant
1448     $month += $nb_month;
1449     // Si ça dépasse le mois 12 (décembre)
1450     if ($month > 12) {
1451     // Soustrait 12 au mois
1452     $month -= 12;
1453     // Ajoute 1 à l'année
1454     $year += 1;
1455     }
1456     }
1457     }
1458    
1459     // Si c'est une soustraction
1460     if ($operator == "-") {
1461     // Année à soustraire
1462     $year -= floor($delay / 12);
1463     // Mois restant
1464     $nb_month = ($delay % 12);
1465     // S'il y a des mois restant
1466     if ($nb_month != 0) {
1467     // Soustrait le délais
1468     $month -= $nb_month;
1469     // Si ça dépasse le mois 1 (janvier)
1470     if ($month < 1) {
1471     // Soustrait 12 au mois
1472     $month += 12;
1473     // Ajoute 1 à l'année
1474     $year -= 1;
1475     }
1476     }
1477     }
1478    
1479     // Calcul du nombre de jours dans le mois sélectionné
1480     switch($month) {
1481     // Mois de février
1482     case "2":
1483     if ($year % 4 == 0 && $year % 100 != 0 || $year % 400 == 0) {
1484     $day_max = 29;
1485     } else {
1486     $day_max = 28;
1487     }
1488     break;
1489     // Mois d'avril, juin, septembre et novembre
1490     case "4":
1491     case "6":
1492     case "9":
1493     case "11":
1494     $day_max = 30;
1495     break;
1496     // Mois de janvier, mars, mai, juillet, août, octobre et décembre
1497     default:
1498     $day_max = 31;
1499     }
1500    
1501     // Si le jour est supérieur au jour maximum du mois
1502     if ($day > $day_max) {
1503     // Le jour devient le jour maximum
1504     $day = $day_max;
1505     }
1506    
1507     // Compléte le mois et le jour par un 0 à gauche si c'est un chiffre
1508     $month = str_pad($month, 2, "0", STR_PAD_LEFT);
1509     $day = str_pad($day, 2, "0", STR_PAD_LEFT);
1510    
1511     // Résultat du calcul
1512     $date_result = $year."-".$month."-".$day;
1513     }
1514    
1515     // Si c'est un calcul sur des jours
1516     if ($type == "jour") {
1517     //
1518     $datetime = new DateTime($date);
1519     // Si le délai est un numérique
1520     if (is_numeric($delay)) {
1521     // Modifie la date
1522     $datetime->modify($operator.$delay.' days');
1523     }
1524     // Résultat du calcul
1525     $date_result = $datetime->format('Y-m-d');
1526     }
1527    
1528     // Retourne la date calculée
1529     return $date_result;
1530     }
1531    
1532     /**
1533     * Vérifie la valididité d'une date.
1534     *
1535     * @param string $pDate Date à vérifier
1536     *
1537     * @return boolean
1538     */
1539     function check_date($pDate) {
1540    
1541     // Vérifie si c'est une date valide
1542     if (preg_match("/^([0-9]{4})-([0-9]{2})-([0-9]{2})$/", $pDate, $date)
1543     && checkdate($date[2], $date[3], $date[1])
1544     && $date[1] >= 1900) {
1545     //
1546     return true;
1547     }
1548    
1549     //
1550     return false;
1551     }
1552    
1553     /**
1554     * Permet de tester le bypass
1555     *
1556     * @param string $obj le nom de l'objet
1557     * @param string $permission_suffix
1558     * @return boolean
1559     */
1560     function can_bypass($obj="", $permission_suffix=""){
1561     //On teste le droit bypass
1562     if ($permission_suffix!=""&&$obj!=""&&
1563     $this->isAccredited($obj."_".$permission_suffix."_bypass")){
1564     return true;
1565     }
1566     return false;
1567     }
1568    
1569    
1570     /**
1571     * Vérifie l'option de numérisation.
1572     *
1573     * @return boolean
1574     */
1575     public function is_option_digitalization_folder_enabled() {
1576     //
1577     if ($this->getParameter("option_digitalization_folder") !== true) {
1578     //
1579     return false;
1580     }
1581     //
1582     return true;
1583     }
1584    
1585    
1586     /**
1587     * Vérifie que l'option d'accès au portail citoyen est activée.
1588     *
1589 softime 7366 * @param integer $om_collectivite Identifiant de la collectivité.
1590     *
1591 mbroquet 3730 * @return boolean
1592     */
1593 softime 7366 public function is_option_citizen_access_portal_enabled($om_collectivite=null) {
1594 mbroquet 3730 //
1595 softime 7366 $parameters = $this->getCollectivite($om_collectivite);
1596 mbroquet 3730 //
1597 softime 7366 if (isset($parameters['option_portail_acces_citoyen']) === true
1598     && $parameters['option_portail_acces_citoyen'] === 'true') {
1599 mbroquet 3730 //
1600 softime 7366 return true;
1601 mbroquet 3730 }
1602    
1603     //
1604 softime 7366 return false;
1605 mbroquet 3730 }
1606    
1607 softime 7366
1608 nmeucci 4108 /**
1609 softime 4626 * Vérifie que l'option du SIG est activée.
1610     *
1611     * @return boolean
1612     */
1613 softime 7996 public function is_option_sig_enabled($om_collectivite=null) {
1614 softime 4626 //
1615 softime 7996 $parameters = $this->getCollectivite($om_collectivite);
1616 softime 4626 //
1617 softime 7996 if (isset($parameters['option_sig']) === true
1618     && $parameters['option_sig'] === 'sig_externe') {
1619 softime 4626 //
1620 softime 7996 return true;
1621 softime 4626 }
1622 softime 7996 //
1623     return false;
1624     }
1625 softime 4626
1626 softime 7996 /**
1627     * Vérifie que l'option du SIG est activée.
1628     *
1629     * @return boolean
1630     */
1631     public function is_option_ws_synchro_contrainte_enabled($om_collectivite=null) {
1632 softime 4626 //
1633 softime 7996 $parameters = $this->getCollectivite($om_collectivite);
1634     //
1635     if (isset($parameters['option_ws_synchro_contrainte']) === true
1636     && $parameters['option_ws_synchro_contrainte'] === 'true') {
1637     //
1638     return true;
1639     }
1640     //
1641     return false;
1642 softime 4626 }
1643    
1644 softime 6929
1645 softime 4626 /**
1646 softime 6929 * Vérifie que l'option de simulation des taxes est activée.
1647     *
1648     * @param integer $om_collectivite Identifiant de la collectivité.
1649     *
1650     * @return boolean
1651     */
1652     public function is_option_simulation_taxes_enabled($om_collectivite=null) {
1653     //
1654     $parameters = $this->getCollectivite($om_collectivite);
1655     //
1656     if (isset($parameters['option_simulation_taxes']) === true
1657     && $parameters['option_simulation_taxes'] === 'true') {
1658     //
1659     return true;
1660     }
1661    
1662     //
1663     return false;
1664     }
1665    
1666 softime 7521 /**
1667     * Vérifie que l'option de prévisualisation de l'édition est activée.
1668     *
1669     * @param integer $om_collectivite Identifiant de la collectivité.
1670     *
1671     * @return boolean
1672     */
1673     public function is_option_preview_pdf_enabled($om_collectivite=null) {
1674     //
1675     $parameters = $this->getCollectivite($om_collectivite);
1676     //
1677     if (isset($parameters['option_previsualisation_edition']) === true
1678     && $parameters['option_previsualisation_edition'] === 'true') {
1679     //
1680     return true;
1681     }
1682 softime 6929
1683 softime 7521 //
1684     return false;
1685     }
1686    
1687 softime 7685
1688 softime 6929 /**
1689 softime 7685 * Vérifie que l'option de finalisation automatique des instructions tacites
1690     * et retours est activée..
1691     *
1692     * @param integer $om_collectivite Identifiant de la collectivité.
1693     *
1694     * @return boolean
1695     */
1696     public function is_option_finalisation_auto_enabled($om_collectivite = null) {
1697     //
1698     $parameters = $this->getCollectivite($om_collectivite);
1699     //
1700     if (isset($parameters['option_final_auto_instr_tacite_retour']) === true
1701     && $parameters['option_final_auto_instr_tacite_retour'] === 'true') {
1702     //
1703     return true;
1704     }
1705    
1706     //
1707     return false;
1708     }
1709    
1710 softime 8329 /**
1711     * Vérifie que l'option de trouillotage numérique automatique des
1712     * pièces est activée.
1713     *
1714     * @param integer $om_collectivite Identifiant de la collectivité.
1715     *
1716     * @return boolean
1717     */
1718     public function is_option_trouillotage_numerique_enabled($om_collectivite = null) {
1719     //
1720     $parameters = $this->getCollectivite($om_collectivite);
1721     //
1722     if (isset($parameters['option_trouillotage_numerique']) === true
1723     && $parameters['option_trouillotage_numerique'] === 'true') {
1724     //
1725     return true;
1726     }
1727     //
1728     return false;
1729     }
1730 softime 7685
1731     /**
1732 nmeucci 4108 * Vérifie le niveau de la collectivité de l'utilisateur connecté
1733     *
1734     * @return boolean
1735     */
1736     function has_collectivite_multi() {
1737     $idx_multi = $this->get_idx_collectivite_multi();
1738     if (intval($_SESSION['collectivite']) === intval($idx_multi)) {
1739     return true;
1740     }
1741     return false;
1742     }
1743 mbroquet 3730
1744 nmeucci 4108
1745 softime 3976 /**
1746     * Pour un path absolu donné, retourne le relatif à la racine de
1747     * l'application.
1748     *
1749     * @param string $absolute Chemin absolu.
1750     *
1751     * @return mixed Faux si échec sinon chemin relatif.
1752     */
1753     public function get_relative_path($absolute) {
1754     if ($this->get_path_app() === false) {
1755     return false;
1756     }
1757     $path_app = $this->get_path_app();
1758     return str_replace($path_app, '', $absolute);
1759     }
1760    
1761    
1762     /**
1763     * Retourne le path absolu de la racine de l'application
1764     *
1765     * @return mixed Faux si échec sinon chemin absolu
1766     */
1767     public function get_path_app() {
1768     $match = array();
1769     preg_match( '/(.*)\/[a-zA-Z0-9]+\/\.\.\/core\/$/', PATH_OPENMAIRIE, $match);
1770     // On vérifie qu'il n'y a pas d'erreur
1771     if (isset($match[1]) === false) {
1772     return false;
1773     }
1774     return $match[1];
1775     }
1776    
1777 nmeucci 3981 /**
1778     * Compose un tableau et retourne son code HTML
1779     *
1780     * @param string $id ID CSS du conteneur
1781     * @param array $headers entêtes de colonnes
1782     * @param array $rows lignes
1783     * @return string code HTML
1784     */
1785 nmeucci 3980 public function compose_generate_table($id, $headers, $rows) {
1786 nmeucci 3981 //
1787     $html = '';
1788 nmeucci 3980 // Début conteneur
1789 nmeucci 3981 $html .= '<div id="'.$id.'">';
1790 nmeucci 3980 // Début tableau
1791 nmeucci 3981 $html .= '<table class="tab-tab">';
1792 nmeucci 3980 // Début entête
1793 nmeucci 3981 $html .= '<thead>';
1794     $html .= '<tr class="ui-tabs-nav ui-accordion ui-state-default tab-title">';
1795 nmeucci 3980 // Colonnes
1796     $nb_colonnes = count($headers);
1797     $index_last_col = $nb_colonnes - 1;
1798     foreach ($headers as $i => $header) {
1799     if ($i === 0) {
1800     $col = ' firstcol';
1801     }
1802     if ($i === $index_last_col) {
1803     $col = ' lastcol';
1804     }
1805 nmeucci 3981 $html .= '<th class="title col-'.$i.$col.'">';
1806     $html .= '<span class="name">';
1807     $html .= $header;
1808     $html .= '</span>';
1809     $html .= '</th>';
1810 nmeucci 3980 }
1811     // Fin entête
1812 nmeucci 3981 $html .= '</tr>';
1813     $html .= '</thead>';
1814 nmeucci 3980 // Début corps
1815 nmeucci 3981 $html .= '<tbody>';
1816 nmeucci 3980 // Lignes
1817     foreach ($rows as $cells) {
1818     // Début ligne
1819 nmeucci 3981 $html .= '<tr class="tab-data">';
1820 nmeucci 3980 // Cellules
1821     foreach ($cells as $j => $cell) {
1822     if ($j === 0) {
1823     $col = ' firstcol';
1824     }
1825     if ($j === $index_last_col) {
1826     $col = ' lastcol';
1827     }
1828 nmeucci 3981 $html .= '<td class="title col-'.$j.$col.'">';
1829     $html .= '<span class="name">';
1830     $html .= $cell;
1831     $html .= '</span>';
1832     $html .= '</td>';
1833 nmeucci 3980 }
1834     // Fin ligne
1835 nmeucci 3981 $html .= "</tr>";
1836 nmeucci 3980 }
1837     // Fin corps
1838 nmeucci 3981 $html .= '</tbody>';
1839 nmeucci 3980 // Fin tableau
1840 nmeucci 3981 $html .= '</table>';
1841 nmeucci 3980 // Fin conteneur
1842 nmeucci 3981 $html .= '</div>';
1843     //
1844     return $html;
1845 nmeucci 3980 }
1846 nmeucci 4156
1847     /**
1848     * Retourne le login de l'utilisateur connecté + entre parenthèses son nom
1849     * s'il en a un.
1850     *
1851     * @return string myLogin OU myLogin (myName)
1852     */
1853     public function get_connected_user_login_name() {
1854     // Requête et stockage des informations de l'user connecté
1855     $this->getUserInfos();
1856     // Si le nom existe et est défini on le récupère
1857     $nom = "";
1858     if (isset($this->om_utilisateur["nom"])
1859     && !empty($this->om_utilisateur["nom"])) {
1860     $nom = trim($this->om_utilisateur["nom"]);
1861     }
1862     // Définition de l'émetteur : obligatoirement son login
1863     $emetteur = $_SESSION['login'];
1864     // Définition de l'émetteur : + éventuellement son nom
1865     if ($nom != "") {
1866     $emetteur .= " (".$nom.")";
1867     }
1868     // Retour
1869     return $emetteur;
1870     }
1871 nhaye 4218
1872     /**
1873 fmichon 4708 * Cette méthode permet d'interfacer le module 'Settings'.
1874     */
1875     function view_module_settings() {
1876     //
1877     require_once "../obj/settings.class.php";
1878     $settings = new settings();
1879     $settings->view_main();
1880     }
1881    
1882 softime 7366
1883 fmichon 4708 /**
1884 softime 7366 * Vérifie que l'option référentiel ERP est activée.
1885 fmichon 4708 *
1886 softime 7366 * @param integer $om_collectivite Identifiant de la collectivité.
1887 fmichon 4708 *
1888     * @return boolean
1889     */
1890 softime 7366 public function is_option_referentiel_erp_enabled($om_collectivite=null) {
1891 fmichon 4708 //
1892 softime 7366 $parameters = $this->getCollectivite($om_collectivite);
1893     //
1894     if (isset($parameters['option_referentiel_erp']) === true
1895     && $parameters['option_referentiel_erp'] === 'true') {
1896     //
1897     return true;
1898 fmichon 4708 }
1899 softime 7366
1900 fmichon 4708 //
1901 softime 7366 return false;
1902 fmichon 4708 }
1903    
1904 softime 7366
1905 fmichon 4708 /**
1906     * Interface avec le référentiel ERP.
1907     */
1908     function send_message_to_referentiel_erp($code, $infos) {
1909     //
1910     require_once "../obj/interface_referentiel_erp.class.php";
1911     $interface_referentiel_erp = new interface_referentiel_erp();
1912     $ret = $interface_referentiel_erp->send_message_to_referentiel_erp($code, $infos);
1913     return $ret;
1914     }
1915    
1916     /**
1917 nhaye 4218 * Récupère la liste des identifiants des collectivités
1918     *
1919     * @param string $return_type 'string' ou 'array' selon que l'on retourne
1920     * respectivement une chaîne ou un tableau
1921     * @param string $separator caractère(s) séparateur(s) employé(s) lorsque
1922     * l'on retourne une chaîne, inutilisé si tableau
1923     * @return mixed possibilité de boolean/string/array :
1924     * false si erreur BDD sinon résultat
1925     */
1926     public function get_list_id_collectivites($return_type = 'string', $separator = ',') {
1927     $sql = "
1928     SELECT
1929     array_to_string(
1930     array_agg(om_collectivite),
1931     '".$separator."'
1932     ) as list_id_collectivites
1933     FROM ".DB_PREFIXE."om_collectivite";
1934     $list = $this->db->getone($sql);
1935     $this->addTolog(
1936     __FILE__." - ".__METHOD__." : db->getone(\"".$sql."\");",
1937     VERBOSE_MODE
1938     );
1939     if ($this->isDatabaseError($list, true)) {
1940     return false;
1941     }
1942     if ($return_type === 'array') {
1943     return explode($separator, $list);
1944     }
1945     return $list;
1946     }
1947 nhaye 5254
1948 softime 6565 /**
1949     * Teste si l'utilisateur connecté appartient au groupe indiqué en paramètre
1950     * ou s'il a le goupe bypass.
1951     *
1952     * @param string $groupe Code du groupe : ADS / CTX / CU / RU / ERP.
1953     * @return boolean vrai si utilisateur appartient au groupe fourni
1954     */
1955     public function is_user_in_group($groupe) {
1956     if (isset($_SESSION['groupe']) === true
1957     && (array_key_exists($groupe, $_SESSION['groupe']) === true
1958     || array_key_exists("bypass", $_SESSION['groupe']) === true)) {
1959     return true;
1960     }
1961     return false;
1962     }
1963    
1964     /**
1965     * CONDITION - can_user_access_dossiers_confidentiels_from_groupe
1966     *
1967     * Permet de savoir si le type de dossier d'autorisation du dossier courant est
1968     * considéré comme confidentiel ou si l'utilisateur a le groupe bypass.
1969     *
1970     * @param string $groupe Code du groupe : ADS / CTX / CU / RU / ERP.
1971     * @return boolean true si l'utilisateur à accès aux dossiers confidentiels du groupe
1972     * passé en paramètre, sinon false.
1973     *
1974     */
1975     public function can_user_access_dossiers_confidentiels_from_groupe($groupe) {
1976     if ((isset($_SESSION['groupe'][$groupe]['confidentiel']) === true
1977     AND $_SESSION['groupe'][$groupe]['confidentiel'] === true)
1978     || array_key_exists("bypass", $_SESSION['groupe']) === true) {
1979     return true;
1980     }
1981     return false;
1982     }
1983    
1984     public function starts_with($haystack, $needle) {
1985     $length = strlen($needle);
1986     return (substr($haystack, 0, $length) === $needle);
1987     }
1988    
1989     public function ends_with($haystack, $needle) {
1990     $length = strlen($needle);
1991     if ($length == 0) {
1992     return true;
1993     }
1994     return (substr($haystack, -$length) === $needle);
1995     }
1996    
1997     /**
1998     * Récupère le type définit dans la base de données des champs d'une table
1999     * entière ou d'un champs si celui-ci est précisé.
2000     *
2001     * Liste des types BDD :
2002     * - int4
2003     * - varchar
2004     * - bool
2005     * - numeric
2006     * - text
2007     *
2008     * @param string $table Nom de la table.
2009     * @param string $column Nom de la colonne (facultatif).
2010     *
2011     * @return array
2012     */
2013     public function get_type_from_db($table, $column = null) {
2014     // Composition de la requête
2015     $sql_select = ' SELECT column_name, udt_name ';
2016     $sql_from = ' FROM information_schema.columns ';
2017     $sql_where = ' WHERE table_schema = \''.str_replace('.', '', DB_PREFIXE).'\' AND table_name = \''.$table.'\' ';
2018     $sql_order = ' ORDER BY ordinal_position ';
2019    
2020     // Si une colonne est précisé
2021     if ($column !== null || $column !== '') {
2022     //
2023     $sql_where .= ' AND column_name = \''.$column.'\' ';
2024     }
2025    
2026     // Requête SQL
2027     $sql = $sql_select.$sql_from.$sql_where.$sql_order;
2028     // Exécution de la requête
2029     $res = $this->db->query($sql);
2030     // Log
2031     $this->addToLog(__METHOD__."() : db->query(\"".$sql."\");", VERBOSE_MODE);
2032     // Erreur BDD
2033     $this->isDatabaseError($res);
2034     //
2035     $list_type = array();
2036     while ($row =& $res->fetchRow(DB_FETCHMODE_ASSOC)) {
2037     $list_type[$row['column_name']] = $row['udt_name'];
2038     }
2039    
2040     // Retourne la liste des codes
2041     return $list_type;
2042     }
2043    
2044 softime 7366
2045     /**
2046     * Cette méthode permet de récupérer le code de division correspondant
2047     * au dossier sur lequel on se trouve.
2048     *
2049     * Méthode identique à la méthode getDivisionFromDossier() de la classe
2050     * om_dbform à l'exception d'un cas de récupération du numéro de dossier par
2051     * la méthode getVal(). Cette exception permet d'utiliser cette méthode dans
2052     * les scripts instanciant seulement la classe utils tel que les *.inc.php.
2053     *
2054     * @param string $dossier Identifiant du dossier d'instruction.
2055     *
2056     * @return string Code de la division du dossier en cours
2057     */
2058     public function get_division_from_dossier_without_inst($dossier = null) {
2059    
2060     // Cette méthode peut être appelée plusieurs fois lors d'une requête.
2061     // Pour éviter de refaire le traitement de recherche de la division
2062     // alors on vérifie si nous ne l'avons pas déjà calculé.
2063     if (isset($this->_division_from_dossier) === true
2064     && $this->_division_from_dossier !== null) {
2065     // Log
2066     $this->addToLog(__METHOD__."() : retour de la valeur déjà calculée - '".$this->_division_from_dossier."'", EXTRA_VERBOSE_MODE);
2067     // On retourne la valeur déjà calculée
2068     return $this->_division_from_dossier;
2069     }
2070    
2071     // Récupère le paramétre retourformulaire présent dans l'URL
2072     $retourformulaire = $this->getParameter("retourformulaire");
2073     // Récupère le paramétre idxformulaire présent dans l'URL
2074     $idxformulaire = $this->getParameter("idxformulaire");
2075    
2076     // Si le dossier n'est pas passé en paramètre de la méthode
2077     if ($dossier === null) {
2078    
2079     // La méthode de récupération du dossier diffère selon le contexte
2080     // du formulaire
2081     if ($retourformulaire === "dossier"
2082     || $retourformulaire === "dossier_instruction"
2083     || $retourformulaire === "dossier_instruction_mes_encours"
2084     || $retourformulaire === "dossier_instruction_tous_encours"
2085     || $retourformulaire === "dossier_instruction_mes_clotures"
2086     || $retourformulaire === "dossier_instruction_tous_clotures"
2087     || $retourformulaire === "dossier_contentieux_mes_infractions"
2088     || $retourformulaire === "dossier_contentieux_toutes_infractions"
2089     || $retourformulaire === "dossier_contentieux_mes_recours"
2090     || $retourformulaire === "dossier_contentieux_tous_recours") {
2091    
2092     // Récupère le numéro du dossier depuis le paramètre
2093     // idxformulaire présent dans l'URL
2094     $dossier = $idxformulaire;
2095     }
2096     //
2097     if ($retourformulaire === "lot") {
2098    
2099     // Requête SQL
2100     $sql = sprintf("SELECT dossier FROM ".DB_PREFIXE."lot WHERE lot = %s", $idxformulaire);
2101     // Récupère l'identifiant du dossier
2102     $dossier = $this->db->getone($sql);
2103     // Log
2104     $this->addToLog(__METHOD__."() : db->query(\"".$dossier."\");", VERBOSE_MODE);
2105     // Erreur BDD
2106     $this->isDatabaseError($dossier);
2107     }
2108     }
2109    
2110     // À cette étape si le dossier n'est toujours pas récupéré alors la
2111     // division ne pourra pas être récupérée
2112     if ($dossier === null) {
2113     //
2114     return null;
2115     }
2116    
2117     // Requête SQL
2118     $sql = sprintf("SELECT division FROM ".DB_PREFIXE."dossier WHERE dossier = '%s'", $dossier);
2119     // Récupère l'identifiant de la division du dossier
2120     $this->_division_from_dossier = $this->db->getOne($sql);
2121     // Log
2122     $this->addToLog(__METHOD__."(): db->getone(\"".$sql."\")", VERBOSE_MODE);
2123     // Erreur BDD
2124     $this->isDatabaseError($this->_division_from_dossier);
2125    
2126     //
2127     return $this->_division_from_dossier;
2128    
2129     }
2130    
2131 softime 8329 /**
2132     * Permet de définir la configuration des liens du footer.
2133     *
2134     * @return void
2135     */
2136     protected function set_config__footer() {
2137     $footer = array();
2138     // Documentation du site
2139     $footer[] = array(
2140     "title" => __("Documentation"),
2141     "description" => __("Acceder a l'espace documentation de l'application"),
2142     "href" => "http://docs.openmairie.org/?project=openads&version=4.8&format=html&path=manuel_utilisateur",
2143     "target" => "_blank",
2144     "class" => "footer-documentation",
2145     );
2146 softime 7366
2147 softime 8329 // Forum openMairie
2148     $footer[] = array(
2149     "title" => __("Forum"),
2150     "description" => __("Espace d'échange ouvert du projet openMairie"),
2151     "href" => "https://communaute.openmairie.org/c/openads",
2152     "target" => "_blank",
2153     "class" => "footer-forum",
2154     );
2155    
2156     // Portail openMairie
2157     $footer[] = array(
2158     "title" => __("openMairie.org"),
2159     "description" => __("Site officiel du projet openMairie"),
2160     "href" => "http://www.openmairie.org/catalogue/openads",
2161     "target" => "_blank",
2162     "class" => "footer-openmairie",
2163     );
2164     //
2165     $this->config__footer = $footer;
2166     }
2167    
2168     /**
2169     * Surcharge - set_config__menu().
2170     *
2171     * @return void
2172     */
2173     protected function set_config__menu() {
2174     //
2175     $menu = array();
2176    
2177     // {{{ Rubrique AUTORISATION
2178     //
2179     $rubrik = array(
2180     "title" => _("Autorisation"),
2181     "class" => "autorisation",
2182     "right" => "menu_autorisation",
2183     );
2184     //
2185     $links = array();
2186    
2187     $links[] = array(
2188     "href" => "".OM_ROUTE_TAB."&obj=dossier_autorisation",
2189     "class" => "dossier_autorisation",
2190     "title" => _("Dossiers d'autorisation"),
2191     "right" => array("dossier_autorisation", "dossier_autorisation_tab", ),
2192     "open" => array("index.php|dossier_autorisation[module=tab]", "index.php|dossier_autorisation[module=form]", ),
2193     );
2194    
2195     // Lien vers les dossiers d'autorisations qui ont une demande d'avis
2196     $links[] = array(
2197     "href" => "".OM_ROUTE_TAB."&obj=dossier_autorisation_avis",
2198     "class" => "dossier_autorisation",
2199     "title" => _("Dossiers d'autorisation"),
2200     "right" => array(
2201     "dossier_autorisation_avis",
2202     "dossier_autorisation_avis_tab",
2203     ),
2204     "open" => array("index.php|dossier_autorisation_avis[module=tab]", "index.php|dossier_autorisation[module=form]", ),
2205     );
2206    
2207     //
2208     $rubrik['links'] = $links;
2209     //
2210     $menu[] = $rubrik;
2211     // }}}
2212    
2213     // {{{ Rubrique GUICHET UNIQUE
2214     //
2215     $rubrik = array(
2216     "title" => _("Guichet Unique"),
2217     "class" => "guichet_unique",
2218     "right" => "menu_guichet_unique",
2219     );
2220     //
2221     $links = array();
2222     //
2223     $links[] = array(
2224     "href" => OM_ROUTE_DASHBOARD,
2225     "class" => "tableau-de-bord",
2226     "title" => _("tableau de bord"),
2227     "right" => "menu_guichet_unique_dashboard",
2228     "open" => array("index.php|[module=dashboard]",),
2229     );
2230     //
2231     $links[] = array(
2232     "class" => "category",
2233     "title" => _("nouvelle demande"),
2234     "right" => array(
2235     "demande",
2236     "demande_nouveau_dossier_ajouter",
2237     "demande_dossier_encours_ajouter", "demande_dossier_encours_tab",
2238     "demande_autre_dossier_ajouter", "demande_autre_dossier_tab",
2239     "demande_consulter","demande_tab",
2240     ),
2241     );
2242     $links[] = array(
2243     "title" => "<hr/>",
2244     "right" => array(
2245     "demande",
2246     "demande_dossier_encours_ajouter",
2247     "demande_dossier_encours_ajouter", "demande_dossier_encours_tab",
2248     ),
2249     );
2250     $links[] = array(
2251     "href" => "".OM_ROUTE_FORM."&obj=demande_nouveau_dossier&amp;action=0&amp;advs_id=&amp;tricol=&amp;valide=&amp;retour=tab&amp;new=",
2252     "class" => "nouveau-dossier",
2253     "title" => _("nouveau dossier"),
2254     "right" => array(
2255     "demande",
2256     "demande_nouveau_dossier_ajouter",
2257     ),
2258     "open" => array("index.php|demande_nouveau_dossier[module=form]",),
2259     );
2260     $links[] = array(
2261     "href" => "".OM_ROUTE_TAB."&obj=demande_dossier_encours",
2262     "class" => "dossier-existant",
2263     "title" => _("dossier en cours"),
2264     "right" => array(
2265     "demande",
2266     "demande_dossier_encours_ajouter",
2267     "demande_dossier_encours_tab",
2268     ),
2269     "open" => array("index.php|demande_dossier_encours[module=tab]", "index.php|demande_dossier_encours[module=form]"),
2270     );
2271     $links[] = array(
2272     "href" => "".OM_ROUTE_TAB."&obj=demande_autre_dossier",
2273     "class" => "autre-dossier",
2274     "title" => _("autre dossier"),
2275     "right" => array(
2276     "demande",
2277     "demande_autre_dossier_ajouter",
2278     "demande_autre_dossier_tab",
2279     ),
2280     "open" => array("index.php|demande_autre_dossier[module=tab]", "index.php|demande_autre_dossier[module=form]"),
2281     );
2282     $links[] = array(
2283     "title" => "<hr/>",
2284     "right" => array(
2285     "demande",
2286     "demande_consulter",
2287     "demande_tab"
2288     ),
2289     );
2290     $links[] = array(
2291     "href" => "".OM_ROUTE_TAB."&obj=demande",
2292     "class" => "pdf",
2293     "title" => _("recepisse"),
2294     "right" => array(
2295     "demande",
2296     "demande_consulter",
2297     "demande_tab"
2298     ),
2299     "open" => array("index.php|demande[module=tab]","index.php|demande[module=form]"),
2300     );
2301     $links[] = array(
2302     "title" => "<hr/>",
2303     "right" => array(
2304     "petitionnaire_frequent",
2305     "petitionnaire_frequent_consulter",
2306     "petitionnaire_frequent_tab"
2307     ),
2308     );
2309     $links[] = array(
2310     "href" => "".OM_ROUTE_TAB."&obj=petitionnaire_frequent",
2311     "class" => "petitionnaire_frequent",
2312     "title" => _("petitionnaire_frequent"),
2313     "right" => array(
2314     "petitionnaire_frequent",
2315     "petitionnaire_frequent_consulter",
2316     "petitionnaire_frequent_tab"
2317     ),
2318     "open" => array("index.php|petitionnaire_frequent[module=tab]","index.php|petitionnaire_frequent[module=form]"),
2319     );
2320     //
2321     $links[] = array(
2322     "class" => "category",
2323     "title" => _("affichage reglementaire"),
2324     "right" => array(
2325     "affichage_reglementaire_registre",
2326     "affichage_reglementaire_attestation",
2327     ),
2328     );
2329     $links[] = array(
2330     "title" => "<hr/>",
2331     "right" => array(
2332     "affichage_reglementaire_registre",
2333     "affichage_reglementaire_attestation",
2334     ),
2335     );
2336     $links[] = array(
2337     "href" => "".OM_ROUTE_FORM."&obj=demande_affichage_reglementaire_registre&action=110&idx=0",
2338     "class" => "affichage_reglementaire_registre",
2339     "title" => _("registre"),
2340     "right" => array(
2341     "affichage_reglementaire_registre",
2342     ),
2343     "open" => array("index.php|demande_affichage_reglementaire_registre[module=tab]", "index.php|demande_affichage_reglementaire_registre[module=form]"),
2344     );
2345     $links[] = array(
2346     "href" => "".OM_ROUTE_FORM."&obj=demande_affichage_reglementaire_attestation&action=120&idx=0",
2347     "class" => "affichage_reglementaire_attestation",
2348     "title" => _("attestation"),
2349     "right" => array(
2350     "affichage_reglementaire_attestation",
2351     ),
2352     "open" => array("index.php|demande_affichage_reglementaire_attestation[module=tab]", "index.php|demande_affichage_reglementaire_attestation[module=form]"),
2353     );
2354     //
2355     $rubrik['links'] = $links;
2356     //
2357     $menu[] = $rubrik;
2358     // }}}
2359    
2360     // {{{ Rubrique QUALIFICATION
2361     //
2362     $rubrik = array(
2363     "title" => _("Qualification"),
2364     "class" => "qualification",
2365     "right" => "qualification_menu",
2366     );
2367     //
2368     $links = array();
2369     //
2370     $links[] = array(
2371     "href" => OM_ROUTE_DASHBOARD,
2372     "class" => "tableau-de-bord",
2373     "title" => _("tableau de bord"),
2374     "right" => "menu_qualification_dashboard",
2375     "open" => array("index.php|[module=dashboard]",),
2376     );
2377    
2378     //
2379     $links[] = array(
2380     "href" => "".OM_ROUTE_TAB."&obj=dossier_qualifier_qualificateur",
2381     "class" => "dossier_qualifier_qualificateur",
2382     "title" => _("dossiers a qualifier"),
2383     "right" => array(
2384     "dossier_qualifier_qualificateur",
2385     "dossier_qualifier_qualificateur_tab",
2386     ),
2387     "open" => array("index.php|dossier_qualifier_qualificateur[module=tab]", "index.php|dossier_instruction[module=form]", ),
2388     );
2389    
2390     //
2391     $rubrik['links'] = $links;
2392     //
2393     $menu[] = $rubrik;
2394     // }}}
2395    
2396     // {{{ Rubrique INSTRUCTION
2397     //
2398     $rubrik = array(
2399     "title" => _("instruction"),
2400     "class" => "instruction",
2401     "right" => "menu_instruction",
2402     );
2403     //
2404     $links = array();
2405     //
2406     $links[] = array(
2407     "href" => OM_ROUTE_DASHBOARD,
2408     "class" => "tableau-de-bord",
2409     "title" => _("tableau de bord"),
2410     "right" => "menu_instruction_dashboard",
2411     "open" => array("index.php|[module=dashboard]",),
2412     );
2413     // Catégorie DOSSIERS D'INSTRUCTION
2414     $links[] = array(
2415     "class" => "category",
2416     "title" => _("dossiers d'instruction"),
2417     "right" => array(
2418     "dossier_instruction_mes_encours", "dossier_instruction_mes_encours_tab",
2419     "dossier_instruction_tous_encours", "dossier_instruction_tous_encours_tab",
2420     "dossier_instruction_mes_clotures", "dossier_instruction_mes_clotures_tab",
2421     "dossier_instruction_tous_clotures", "dossier_instruction_tous_clotures_tab",
2422     "dossier_instruction", "dossier_instruction_tab",
2423     "PC_modificatif", "PC_modificatif_tab",
2424     ),
2425     );
2426     $links[] = array(
2427     "title" => "<hr/>",
2428     "right" => array(
2429     "dossier_instruction_mes_encours", "dossier_instruction_mes_encours_tab",
2430     "dossier_instruction_tous_encours", "dossier_instruction_tous_encours_tab",
2431     ),
2432     );
2433     //
2434     $links[] = array(
2435     "href" => "".OM_ROUTE_TAB."&obj=dossier_instruction_mes_encours",
2436     "class" => "dossier_instruction_mes_encours",
2437     "title" => _("mes encours"),
2438     "right" => array("dossier_instruction_mes_encours", "dossier_instruction_mes_encours_tab", ),
2439     "open" => array("index.php|dossier_instruction_mes_encours[module=tab]", "index.php|dossier_instruction_mes_encours[module=form]", ),
2440     );
2441     //
2442     $links[] = array(
2443     "href" => "".OM_ROUTE_TAB."&obj=dossier_instruction_tous_encours",
2444     "class" => "dossier_instruction_tous_encours",
2445     "title" => _("tous les encours"),
2446     "right" => array("dossier_instruction_tous_encours", "dossier_instruction_tous_encours_tab", ),
2447     "open" => array("index.php|dossier_instruction_tous_encours[module=tab]", "index.php|dossier_instruction_tous_encours[module=form]", ),
2448     );
2449     //
2450     $links[] = array(
2451     "title" => "<hr/>",
2452     "right" => array(
2453     "dossier_instruction_mes_clotures", "dossier_instruction_mes_clotures_tab",
2454     "dossier_instruction_tous_clotures", "dossier_instruction_tous_clotures_tab",
2455     ),
2456     );
2457     //
2458     $links[] = array(
2459     "href" => "".OM_ROUTE_TAB."&obj=dossier_instruction_mes_clotures",
2460     "class" => "dossier_instruction_mes_clotures",
2461     "title" => _("mes clotures"),
2462     "right" => array("dossier_instruction_mes_clotures", "dossier_instruction_mes_clotures_tab", ),
2463     "open" => array("index.php|dossier_instruction_mes_clotures[module=tab]", "index.php|dossier_instruction_mes_clotures[module=form]", ),
2464     );
2465     //
2466     $links[] = array(
2467     "href" => "".OM_ROUTE_TAB."&obj=dossier_instruction_tous_clotures",
2468     "class" => "dossier_instruction_tous_clotures",
2469     "title" => _("tous les clotures"),
2470     "right" => array("dossier_instruction_tous_clotures", "dossier_instruction_tous_clotures_tab", ),
2471     "open" => array("index.php|dossier_instruction_tous_clotures[module=tab]", "index.php|dossier_instruction_tous_clotures[module=form]", ),
2472     );
2473     //
2474     $links[] = array(
2475     "title" => "<hr/>",
2476     "right" => array(
2477     "dossier_instruction", "dossier_instruction_tab",
2478     ),
2479     );
2480     //
2481     $links[] = array(
2482     "href" => "".OM_ROUTE_TAB."&obj=dossier_instruction",
2483     "class" => "dossier_instruction_recherche",
2484     "title" => _("recherche"),
2485     "right" => array("dossier_instruction", "dossier_instruction_tab", ),
2486     "open" => array("index.php|dossier_instruction[module=tab]", "index.php|dossier_instruction[module=form]", ),
2487     );
2488    
2489     // Catégorier Qualification
2490     $links[] = array(
2491     "class" => "category",
2492     "title" => _("qualification"),
2493     "right" => array("dossier_qualifier", "architecte_frequent",),
2494     );
2495     //
2496     $links[] = array(
2497     "title" => "<hr/>",
2498     "right" => array("dossier_qualifier", "architecte_frequent", ),
2499     );
2500     //
2501     $links[] = array(
2502     "href" => "".OM_ROUTE_TAB."&obj=dossier_qualifier",
2503     "class" => "dossier_qualifier",
2504     "title" => _("dossiers a qualifier"),
2505     "right" => array("dossier_qualifier", "dossier_qualifier_tab", ),
2506     "open" => array("index.php|dossier_qualifier[module=tab]", "index.php|dossier_qualifier[module=form]", ),
2507     );
2508     //
2509     $links[] = array(
2510     "href" => "".OM_ROUTE_TAB."&obj=architecte_frequent",
2511     "class" => "architecte_frequent",
2512     "title" => _("architecte_frequent"),
2513     "right" => array("architecte_frequent", "architecte_frequent_tab", ),
2514     "open" => array("index.php|architecte_frequent[module=tab]", "index.php|architecte_frequent[module=form]", ),
2515     );
2516     // Catégorie CONSULTATIONS
2517     $links[] = array(
2518     "class" => "category",
2519     "title" => _("consultations"),
2520     "right" => array(
2521     "consultation",
2522     "consultation_mes_retours",
2523     "consultation_retours_ma_division",
2524     "consultation_tous_retours",
2525     ),
2526     );
2527     $links[] = array(
2528     "title" => "<hr/>",
2529     "right" => array(
2530     "consultation",
2531     "consultation_mes_retours",
2532     "consultation_retours_ma_division",
2533     "consultation_tous_retours",
2534     ),
2535     );
2536     $links[] = array(
2537     "href" => "".OM_ROUTE_TAB."&obj=consultation_mes_retours",
2538     "class" => "consultation_mes_retours",
2539     "title" => _("Mes retours"),
2540     "right" => array(
2541     "consultation",
2542     "consultation_mes_retours",
2543     "consultation_mes_retours_tab",
2544     ),
2545     "open" => array("index.php|consultation_mes_retours[module=tab]", "index.php|consultation_mes_retours[module=form]", ),
2546     );
2547     $links[] = array(
2548     "href" => "".OM_ROUTE_TAB."&obj=consultation_retours_ma_division",
2549     "class" => "consultation_retours_ma_division",
2550     "title" => _("Retours de ma division"),
2551     "right" => array(
2552     "consultation",
2553     "consultation_retours_ma_division",
2554     "consultation_retours_ma_division_tab",
2555     ),
2556     "open" => array("index.php|consultation_retours_ma_division[module=tab]", "index.php|consultation_retours_ma_division[module=form]", ),
2557     );
2558     $links[] = array(
2559     "href" => "".OM_ROUTE_TAB."&obj=consultation_tous_retours",
2560     "class" => "consultation_tous_retours",
2561     "title" => _("Tous les retours"),
2562     "right" => array(
2563     "consultation_tous_retours",
2564     "consultation_tous_retours_tab",
2565     ),
2566     "open" => array("index.php|consultation_tous_retours[module=tab]", "index.php|consultation_tous_retours[module=form]", ),
2567     );
2568     // Catégorie MESSAGES
2569     $links[] = array(
2570     "class" => "category",
2571     "title" => _("Messages"),
2572     "right" => array(
2573     "messages",
2574     "messages_mes_retours",
2575     "messages_retours_ma_division",
2576     "messages_tous_retours",
2577     ),
2578     );
2579     //
2580     $links[] = array(
2581     "title" => "<hr/>",
2582     "right" => array(
2583     "messages",
2584     "messages_mes_retours",
2585     "messages_retours_ma_division",
2586     "messages_tous_retours",
2587     ),
2588     );
2589     //
2590     $links[] = array(
2591     "href" => "".OM_ROUTE_TAB."&obj=messages_mes_retours",
2592     "class" => "messages_mes_retours",
2593     "title" => _("Mes messages"),
2594     "right" => array(
2595     "messages",
2596     "messages_mes_retours",
2597     "messages_mes_retours_tab",
2598     ),
2599     "open" => array("index.php|messages_mes_retours[module=tab]", "index.php|messages_mes_retours[module=form]", ),
2600     );
2601     //
2602     $links[] = array(
2603     "href" => "".OM_ROUTE_TAB."&obj=messages_retours_ma_division",
2604     "class" => "messages_retours_ma_division",
2605     "title" => _("Messages de ma division"),
2606     "right" => array(
2607     "messages",
2608     "messages_retours_ma_division",
2609     "messages_retours_ma_division_tab",
2610     ),
2611     "open" => array("index.php|messages_retours_ma_division[module=tab]", "index.php|messages_retours_ma_division[module=form]", ),
2612     );
2613     //
2614     $links[] = array(
2615     "href" => "".OM_ROUTE_TAB."&obj=messages_tous_retours",
2616     "class" => "messages_tous_retours",
2617     "title" => _("Tous les messages"),
2618     "right" => array(
2619     "messages",
2620     "messages_tous_retours",
2621     "messages_tous_retours_tab",
2622     ),
2623     "open" => array("index.php|messages_tous_retours[module=tab]", "index.php|messages_tous_retours[module=form]", ),
2624     );
2625     // Catégorie COMMISSIONS
2626     $links[] = array(
2627     "class" => "category",
2628     "title" => _("commissions"),
2629     "right" => array(
2630     "commission_mes_retours",
2631     "commission_mes_retours_tab",
2632     "commission_retours_ma_division",
2633     "commission_retours_ma_division_tab",
2634     "commission_tous_retours",
2635     "commission_tous_retours_tab",
2636     ),
2637     );
2638     $links[] = array(
2639     "title" => "<hr/>",
2640     "right" => array(
2641     "commission_mes_retours",
2642     "commission_mes_retours_tab",
2643     "commission_retours_ma_division",
2644     "commission_retours_ma_division_tab",
2645     "commission_tous_retours",
2646     "commission_tous_retours_tab",
2647     ),
2648     );
2649     $links[] = array(
2650     "href" => "".OM_ROUTE_TAB."&obj=commission_mes_retours",
2651     "class" => "commission_mes_retours",
2652     "title" => _("Mes retours"),
2653     "right" => array(
2654     "commission_mes_retours",
2655     "commission_mes_retours_tab",
2656     ),
2657     "open" => array("index.php|commission_mes_retours[module=tab]", "index.php|commission_mes_retours[module=form]", ),
2658     );
2659     $links[] = array(
2660     "href" => "".OM_ROUTE_TAB."&obj=commission_retours_ma_division",
2661     "class" => "commission_retours_ma_division",
2662     "title" => _("Retours de ma division"),
2663     "right" => array(
2664     "commission_retours_ma_division",
2665     "commission_retours_ma_division_tab",
2666     ),
2667     "open" => array("index.php|commission_retours_ma_division[module=tab]", "index.php|commission_retours_ma_division[module=form]", ),
2668     );
2669     $links[] = array(
2670     "href" => "".OM_ROUTE_TAB."&obj=commission_tous_retours",
2671     "class" => "commission_tous_retours",
2672     "title" => _("Tous les retours"),
2673     "right" => array(
2674     "commission_tous_retours",
2675     "commission_tous_retours_tab",
2676     ),
2677     "open" => array("index.php|commission_tous_retours[module=tab]", "index.php|commission_tous_retours[module=form]", ),
2678     );
2679    
2680     //
2681     $rubrik['links'] = $links;
2682     //
2683     $menu[] = $rubrik;
2684     // }}}
2685    
2686     // {{{ Rubrique Contentieux
2687     //
2688     $rubrik = array(
2689     "title" => _("Contentieux"),
2690     "class" => "contentieux",
2691     "right" => "menu_contentieux",
2692     );
2693     //
2694     $links = array();
2695     //
2696     $links[] = array(
2697     "href" => OM_ROUTE_DASHBOARD,
2698     "class" => "tableau-de-bord",
2699     "title" => _("tableau de bord"),
2700     "right" => "menu_contentieux_dashboard",
2701     "open" => array("index.php|[module=dashboard]", "index.php|dossier_contentieux_contradictoire[module=tab]", "index.php|dossier_contentieux_ait[module=tab]", "index.php|dossier_contentieux_audience[module=tab]", "index.php|dossier_contentieux_clotures[module=tab]", "index.php|dossier_contentieux_inaffectes[module=tab]", "index.php|dossier_contentieux_alerte_visite[module=tab]", "index.php|dossier_contentieux_alerte_parquet[module=tab]", ),
2702     );
2703     // Catégorie Nouvelle demande
2704     $links[] = array(
2705     "class" => "category",
2706     "title" => _("Nouvelle demande"),
2707     "right" => array(
2708     "demande_nouveau_dossier_contentieux_ajouter",
2709     ),
2710     );
2711     $links[] = array(
2712     "href" => "".OM_ROUTE_FORM."&obj=demande_nouveau_dossier_contentieux&amp;action=0&amp;advs_id=&amp;tricol=&amp;valide=&amp;retour=tab&amp;new=",
2713     "class" => "nouveau-dossier",
2714     "title" => _("nouveau dossier"),
2715     "right" => array(
2716     "demande_nouveau_dossier_contentieux_ajouter",
2717     ),
2718     "open" => array("index.php|demande_nouveau_dossier_contentieux[module=form]",),
2719     );
2720     // Catégorie Recours
2721     $links[] = array(
2722     "class" => "category",
2723     "title" => _("Recours"),
2724     "right" => array(
2725     "dossier_contentieux_mes_recours", "dossier_contentieux_mes_recours_tab",
2726     "dossier_contentieux_tous_recours", "dossier_contentieux_tous_recours_tab",
2727     ),
2728     );
2729     //
2730     $links[] = array(
2731     "href" => "".OM_ROUTE_TAB."&obj=dossier_contentieux_mes_recours",
2732     "class" => "dossier_contentieux_mes_recours",
2733     "title" => _("Mes recours"),
2734     "right" => array("dossier_contentieux_mes_recours", "dossier_contentieux_mes_recours_tab", ),
2735     "open" => array("index.php|dossier_contentieux_mes_recours[module=tab]", "index.php|dossier_contentieux_mes_recours[module=form]", ),
2736     );
2737     $links[] = array(
2738     "href" => "".OM_ROUTE_TAB."&obj=dossier_contentieux_tous_recours",
2739     "class" => "dossier_contentieux_tous_recours",
2740     "title" => _("Tous les recours"),
2741     "right" => array("dossier_contentieux_tous_recours", "dossier_contentieux_tous_recours_tab", ),
2742     "open" => array("index.php|dossier_contentieux_tous_recours[module=tab]", "index.php|dossier_contentieux_tous_recours[module=form]", ),
2743     );
2744     // Catégorie Infractions
2745     $links[] = array(
2746     "class" => "category",
2747     "title" => _("Infractions"),
2748     "right" => array(
2749     "dossier_contentieux_mes_infractions", "dossier_contentieux_mes_infractions_tab",
2750     "dossier_contentieux_toutes_infractions", "dossier_contentieux_toutes_infractions_tab",
2751     ),
2752     );
2753     //
2754     $links[] = array(
2755     "href" => "".OM_ROUTE_TAB."&obj=dossier_contentieux_mes_infractions",
2756     "class" => "dossier_contentieux_mes_infractions",
2757     "title" => _("Mes infractions"),
2758     "right" => array("dossier_contentieux_mes_infractions", "dossier_contentieux_mes_infractions_tab", ),
2759     "open" => array("index.php|dossier_contentieux_mes_infractions[module=tab]", "index.php|dossier_contentieux_mes_infractions[module=form]", ),
2760     );
2761     //
2762     $links[] = array(
2763     "href" => "".OM_ROUTE_TAB."&obj=dossier_contentieux_toutes_infractions",
2764     "class" => "dossier_contentieux_toutes_infractions",
2765     "title" => _("Toutes les infractions"),
2766     "right" => array("dossier_contentieux_toutes_infractions", "dossier_contentieux_toutes_infractions_tab", ),
2767     "open" => array("index.php|dossier_contentieux_toutes_infractions[module=tab]", "index.php|dossier_contentieux_toutes_infractions[module=form]", ),
2768     );
2769     // Catégorie MESSAGES
2770     $links[] = array(
2771     "class" => "category",
2772     "title" => _("Messages"),
2773     "right" => array(
2774     "messages_contentieux",
2775     "messages_contentieux_mes_retours",
2776     "messages_contentieux_retours_ma_division",
2777     "messages_contentieux_tous_retours",
2778     ),
2779     );
2780     //
2781     $links[] = array(
2782     "title" => "<hr/>",
2783     "right" => array(
2784     "messages_contentieux",
2785     "messages_contentieux_mes_retours",
2786     "messages_contentieux_retours_ma_division",
2787     "messages_contentieux_tous_retours",
2788     ),
2789     );
2790     //
2791     $links[] = array(
2792     "href" => "".OM_ROUTE_TAB."&obj=messages_contentieux_mes_retours",
2793     "class" => "messages_contentieux_mes_retours",
2794     "title" => _("Mes messages"),
2795     "right" => array(
2796     "messages_contentieux",
2797     "messages_contentieux_mes_retours",
2798     "messages_contentieux_mes_retours_tab",
2799     ),
2800     "open" => array("index.php|messages_contentieux_mes_retours[module=tab]", "index.php|messages_contentieux_mes_retours[module=form]", ),
2801     );
2802     //
2803     $links[] = array(
2804     "href" => "".OM_ROUTE_TAB."&obj=messages_contentieux_retours_ma_division",
2805     "class" => "messages_contentieux_retours_ma_division",
2806     "title" => _("Messages de ma division"),
2807     "right" => array(
2808     "messages_contentieux",
2809     "messages_contentieux_retours_ma_division",
2810     "messages_contentieux_retours_ma_division_tab",
2811     ),
2812     "open" => array("index.php|messages_contentieux_retours_ma_division[module=tab]", "index.php|messages_contentieux_retours_ma_division[module=form]", ),
2813     );
2814     //
2815     $links[] = array(
2816     "href" => "".OM_ROUTE_TAB."&obj=messages_contentieux_tous_retours",
2817     "class" => "messages_contentieux_tous_retours",
2818     "title" => _("Tous les messages"),
2819     "right" => array(
2820     "messages_contentieux",
2821     "messages_contentieux_tous_retours",
2822     "messages_contentieux_tous_retours_tab",
2823     ),
2824     "open" => array("index.php|messages_contentieux_tous_retours[module=tab]", "index.php|messages_contentieux_tous_retours[module=form]", ),
2825     );
2826    
2827    
2828     //
2829     $rubrik['links'] = $links;
2830     //
2831     $menu[] = $rubrik;
2832     // }}}
2833    
2834     // {{{ Rubrique SUIVI
2835     //
2836     $rubrik = array(
2837     "title" => _("Suivi"),
2838     "class" => "suivi",
2839     "right" => "menu_suivi",
2840     );
2841     //
2842     $links = array();
2843     //
2844     $links[] = array(
2845     "href" => OM_ROUTE_DASHBOARD,
2846     "class" => "tableau-de-bord",
2847     "title" => _("tableau de bord"),
2848     "right" => "menu_suivi_dashboard",
2849     "open" => array("index.php|[module=dashboard]",),
2850     );
2851     $links[] = array(
2852     "class" => "category",
2853     "title" => _("suivi des pieces"),
2854     "right" => array(
2855     "instruction_suivi_retours_de_consultation", "instruction_suivi_mise_a_jour_des_dates",
2856     "instruction_suivi_envoi_lettre_rar", "instruction_suivi_bordereaux",
2857     "instruction_suivi_retours_de_consultation_consulter", "instruction_suivi_mise_a_jour_des_dates_consulter",
2858     "instruction_suivi_envoi_lettre_rar_consulter", "instruction_suivi_bordereaux_consulter",
2859     ),
2860     );
2861     //
2862     $links[] = array(
2863     "title" => "<hr/>",
2864     "right" => array(
2865     "instruction_suivi_retours_de_consultation", "instruction_suivi_mise_a_jour_des_dates",
2866     "instruction_suivi_envoi_lettre_rar", "instruction_suivi_bordereaux",
2867     "instruction_suivi_retours_de_consultation_consulter", "instruction_suivi_mise_a_jour_des_dates_consulter",
2868     "instruction_suivi_envoi_lettre_rar_consulter", "instruction_suivi_bordereaux_consulter",
2869     ),
2870     );
2871     //
2872     $links[] = array(
2873     "title" => "<hr/>",
2874     "right" => array(
2875     "instruction_suivi_mise_a_jour_des_dates", "instruction_suivi_mise_a_jour_des_dates_consulter",
2876     ),
2877     );
2878     //
2879     $links[] = array(
2880     "href" => "".OM_ROUTE_FORM."&obj=instruction_suivi_mise_a_jour_des_dates&action=170&idx=0",
2881     "class" => "suivi_mise_a_jour_des_dates",
2882     "title" => _("Mise a jour des dates"),
2883     "right" => array("instruction_suivi_mise_a_jour_des_dates", "instruction_suivi_mise_a_jour_des_dates_consulter", ),
2884     "open" => array("index.php|instruction_suivi_mise_a_jour_des_dates[module=tab]", "index.php|instruction_suivi_mise_a_jour_des_dates[module=form]"),
2885     );
2886     //
2887     $links[] = array(
2888     "title" => "<hr/>",
2889     "right" => array(
2890     "instruction_suivi_envoi_lettre_rar", "instruction_suivi_envoi_lettre_rar_consulter",
2891     ),
2892     );
2893     //
2894     $links[] = array(
2895     "href" => "".OM_ROUTE_FORM."&obj=instruction_suivi_envoi_lettre_rar&action=160&idx=0",
2896     "class" => "envoi_lettre_rar",
2897     "title" => _("envoi lettre RAR"),
2898     "right" => array("instruction_suivi_envoi_lettre_rar", "instruction_suivi_envoi_lettre_rar_consulter", ),
2899     "open" => array("index.php|instruction_suivi_envoi_lettre_rar[module=tab]", "index.php|instruction_suivi_envoi_lettre_rar[module=form]"),
2900     );
2901     //
2902     $links[] = array(
2903     "title" => "<hr/>",
2904     "right" => array(
2905     "instruction_suivi_bordereaux", "instruction_suivi_bordereaux_consulter",
2906     ),
2907     );
2908     //
2909     $links[] = array(
2910     "href" => "".OM_ROUTE_FORM."&obj=instruction_suivi_bordereaux&action=150&idx=0",
2911     "class" => "bordereaux",
2912     "title" => _("Bordereaux"),
2913     "right" => array("instruction_suivi_bordereaux", "instruction_suivi_bordereaux_consulter", ),
2914     "open" => array("index.php|instruction_suivi_bordereaux[module=tab]", "index.php|instruction_suivi_bordereaux[module=form]"),
2915     );
2916     //
2917     $links[] = array(
2918     "href" => "".OM_ROUTE_FORM."&obj=bordereau_envoi_maire&action=190&idx=0",
2919     "class" => "bordereau_envoi_maire",
2920     "title" => _("Bordereau d'envoi au maire"),
2921     "right" => array("instruction_bordereau_envoi_maire","bordereau_envoi_maire"),
2922     "open" => array("index.php|bordereau_envoi_maire[module=form]",),
2923     );
2924     //
2925     $links[] = array(
2926     "class" => "category",
2927     "title" => _("Demandes d'avis"),
2928     "right" => array(
2929     "consultation_suivi_mise_a_jour_des_dates",
2930     "consultation_suivi_retours_de_consultation",
2931     ),
2932     );
2933     //
2934     $links[] = array(
2935     "href" => "".OM_ROUTE_FORM."&obj=consultation&idx=0&action=110",
2936     "class" => "demandes_avis_mise_a_jour_des_dates",
2937     "title" => _("Mise a jour des dates"),
2938     "right" => array("consultation_suivi_mise_a_jour_des_dates", ),
2939     "open" => array("index.php|consultation[module=form][action=110]"),
2940     );
2941     //
2942     $links[] = array(
2943     "href" => "".OM_ROUTE_FORM."&obj=consultation&idx=0&action=120",
2944     "class" => "consultation-retour",
2945     "title" => _("retours de consultation"),
2946     "right" => array("consultation_suivi_retours_de_consultation", ),
2947     "open" => array("index.php|consultation[module=form][action=120]", "index.php|consultation[module=form][action=100]", ),
2948     );
2949     // Catégorie COMMISSIONS
2950     $links[] = array(
2951     "class" => "category",
2952     "title" => _("commissions"),
2953     "right" => array(
2954     "commission",
2955     "commission_tab",
2956     "commission_demandes_passage",
2957     "commission_demandes_passage_tab",
2958     ),
2959     );
2960     //
2961     $links[] = array(
2962     "title" => "<hr/>",
2963     "right" => array(
2964     "commission",
2965     "commission_tab",
2966     "commission_demandes_passage",
2967     "commission_demandes_passage_tab",
2968     ),
2969     );
2970     //
2971     $links[] = array(
2972     "href" => "".OM_ROUTE_TAB."&obj=commission",
2973     "class" => "commissions",
2974     "title" => _("gestion"),
2975     "right" => array(
2976     "commission",
2977     ),
2978     "open" => array("index.php|commission[module=tab]", "index.php|commission[module=form]", ),
2979     );
2980     //
2981     $links[] = array(
2982     "href" => "".OM_ROUTE_TAB."&obj=commission_demandes_passage",
2983     "class" => "commissions-demande-passage",
2984     "title" => _("demandes"),
2985     "right" => array(
2986     "commission",
2987     "commission_demandes_passage",
2988     ),
2989     "open" => array("index.php|commission_demandes_passage[module=tab]", "index.php|commission_demandes_passage[module=form]", ),
2990     );
2991     //
2992     $rubrik['links'] = $links;
2993     //
2994     $menu[] = $rubrik;
2995     // }}}
2996    
2997     // {{{ Rubrique DEMANDES D'AVIS
2998     //
2999     $rubrik = array(
3000     "title" => _("Demandes d'avis"),
3001     "class" => "demande_avis",
3002     "right" => "menu_demande_avis",
3003     );
3004     //
3005     $links = array();
3006     //
3007     $links[] = array(
3008     "href" => OM_ROUTE_DASHBOARD,
3009     "class" => "tableau-de-bord",
3010     "title" => _("tableau de bord"),
3011     "right" => "menu_demande_avis_dashboard",
3012     "open" => array("index.php|[module=dashboard]",),
3013     );
3014     //
3015     $links[] = array(
3016     "title" => "<hr/>",
3017     "right" => array(
3018     "demande_avis_encours", "demande_avis_encours_tab",
3019     "demande_avis_passee", "demande_avis_passee_tab",
3020     "demande_avis", "demande_avis_tab",
3021     ),
3022     );
3023     //
3024     $links[] = array(
3025     "href" => "".OM_ROUTE_TAB."&obj=demande_avis_encours",
3026     "class" => "demande_avis_encours",
3027     "title" => _("Demandes en cours"),
3028     "right" => array("demande_avis_encours", "demande_avis_encours_tab", ),
3029     "open" => array("index.php|demande_avis_encours[module=tab]", "index.php|demande_avis_encours[module=form]", ),
3030     );
3031    
3032     $links[] = array(
3033     "href" => "".OM_ROUTE_TAB."&obj=demande_avis_passee",
3034     "class" => "demande_avis_passee",
3035     "title" => _("Demandes passees"),
3036     "right" => array("demande_avis_passee", "demande_avis_passee_tab", ),
3037     "open" => array("index.php|demande_avis_passee[module=tab]", "index.php|demande_avis_passee[module=form]", ),
3038     );
3039    
3040     $links[] = array(
3041     "href" => "".OM_ROUTE_TAB."&obj=demande_avis",
3042     "class" => "demande_avis",
3043     "title" => _("Exports"),
3044     "right" => array("demande_avis", "demande_avis_tab", ),
3045     "open" => array("index.php|demande_avis[module=tab]", "index.php|demande_avis[module=form]", ),
3046     );
3047    
3048     //
3049     $rubrik['links'] = $links;
3050     //
3051     $menu[] = $rubrik;
3052     // }}}
3053    
3054    
3055     // Commentaire de la rubrique EXPORT qui n'est pas prévue d'être opérationnelle
3056     // dans cette version
3057     // {{{ Rubrique EXPORT
3058     //
3059     $rubrik = array(
3060     "title" => _("export / import"),
3061     "class" => "edition",
3062     "right" => "menu_export",
3063     );
3064     //
3065     $links = array();
3066    
3067     //
3068     $links[] = array(
3069     "href" => "".OM_ROUTE_FORM."&obj=sitadel&action=6&idx=0",
3070     "class" => "sitadel",
3071     "title" => _("export sitadel"),
3072     "right" => "export_sitadel",
3073     "open" => "index.php|sitadel[module=form]",
3074     );
3075     //
3076     $links[] = array(
3077     "href" => "../app/versement_archives.php",
3078     "class" => "versement_archives",
3079     "title" => _("versement aux archives"),
3080     "right" => "versement_archives",
3081     "open" => "versement_archives.php|",
3082     );
3083     //
3084     $links[] = array(
3085     "href" => "../app/reqmo_pilot.php",
3086     "class" => "reqmo",
3087     "title" => _("statistiques a la demande"),
3088     "right" => "reqmo_pilot",
3089     "open" => "reqmo_pilot.php|",
3090     );
3091     //
3092     $rubrik['links'] = $links;
3093     //
3094     $menu[] = $rubrik;
3095     // }}}
3096    
3097    
3098     // {{{ Rubrique PARAMETRAGE
3099     //
3100     $rubrik = array(
3101     "title" => _("parametrage dossiers"),
3102     "class" => "parametrage-dossier",
3103     "right" => "menu_parametrage",
3104     );
3105     //
3106     $links = array();
3107     //
3108     $links[] = array(
3109     "class" => "category",
3110     "title" => _("dossiers"),
3111     "right" => array(
3112     "dossier_autorisation_type", "dossier_autorisation_type_tab",
3113     "dossier_autorisation_type_detaille",
3114     "dossier_autorisation_type_detaille_tab", "dossier_instruction_type",
3115     "dossier_instruction_type_tab", "cerfa", "cerfa_tab",
3116     ),
3117     );
3118     //
3119     $links[] = array(
3120     "title" => "<hr/>",
3121     "right" => array(
3122     "cerfa", "cerfa_tab",
3123     ),
3124     );
3125     //
3126     $links[] = array(
3127     "href" => "".OM_ROUTE_TAB."&obj=cerfa",
3128     "class" => "cerfa",
3129     "title" => _("cerfa"),
3130     "right" => array("cerfa", "cerfa_tab", ),
3131     "open" => array("index.php|cerfa[module=tab]", "index.php|cerfa[module=form]", ),
3132     );
3133     //
3134     $links[] = array(
3135     "title" => "<hr/>",
3136     "right" => array(
3137     "dossier_autorisation_type", "dossier_autorisation_type_tab",
3138     "dossier_autorisation_type_detaille",
3139     "dossier_autorisation_type_detaille_tab", "dossier_instruction_type",
3140     "dossier_instruction_type_tab",
3141     ),
3142     );
3143     //
3144     $links[] = array(
3145     "href" => "".OM_ROUTE_TAB."&obj=dossier_autorisation_type",
3146     "class" => "dossier_autorisation_type",
3147     "title" => _("type DA"),
3148     "right" => array("dossier_autorisation_type", "dossier_autorisation_type_tab", ),
3149     "open" => array("index.php|dossier_autorisation_type[module=tab]", "index.php|dossier_autorisation_type[module=form]", ),
3150     );
3151     //
3152     $links[] = array(
3153     "href" => "".OM_ROUTE_TAB."&obj=dossier_autorisation_type_detaille",
3154     "class" => "dossier_autorisation_type_detaille",
3155     "title" => _("type DA detaille"),
3156     "right" => array("dossier_autorisation_type_detaille", "dossier_autorisation_type_detaille_tab", ),
3157     "open" => array("index.php|dossier_autorisation_type_detaille[module=tab]", "index.php|dossier_autorisation_type_detaille[module=form]", ),
3158     );
3159     //
3160     $links[] = array(
3161     "href" => "".OM_ROUTE_TAB."&obj=dossier_instruction_type",
3162     "class" => "dossier_instruction_type",
3163     "title" => _("type DI"),
3164     "right" => array("dossier_instruction_type", "dossier_instruction_type_tab", ),
3165     "open" => array("index.php|dossier_instruction_type[module=tab]", "index.php|dossier_instruction_type[module=form]", ),
3166     );
3167     //
3168     $links[] = array(
3169     "title" => "<hr/>",
3170     "right" => array(
3171     "contrainte", "contrainte_tab",
3172     "contrainte_souscategorie", "contrainte_souscategorie_tab",
3173     "contrainte_categorie", "contrainte_categorie_tab"
3174     ),
3175     );
3176     //
3177     $links[] = array(
3178     "href" => "".OM_ROUTE_TAB."&obj=contrainte",
3179     "class" => "contrainte",
3180     "title" => _("contrainte"),
3181     "right" => array("contrainte", "contrainte_tab", ),
3182     "open" => array(
3183     "index.php|contrainte[module=tab]",
3184     "index.php|contrainte[module=form][action=0]",
3185     "index.php|contrainte[module=form][action=1]",
3186     "index.php|contrainte[module=form][action=2]",
3187     "index.php|contrainte[module=form][action=3]",
3188     ),
3189     );
3190     //
3191     $links[] = array(
3192     "class" => "category",
3193     "title" => _("demandes"),
3194     "right" => array(
3195     "demande_type",
3196     "demande_type_tab", "demande_nature", "demande_nature_tab",
3197     ),
3198     );
3199     //
3200     $links[] = array(
3201     "title" => "<hr/>",
3202     "right" => array(
3203     "demande_type",
3204     "demande_type_tab", "demande_nature", "demande_nature_tab",
3205     ),
3206     );
3207     //
3208     $links[] = array(
3209     "href" => "".OM_ROUTE_TAB."&obj=demande_nature",
3210     "class" => "demande_nature",
3211     "title" => _("nature"),
3212     "right" => array("demande_nature", "demande_nature_tab", ),
3213     "open" => array("index.php|demande_nature[module=tab]", "index.php|demande_nature[module=form]", ),
3214     );
3215     //
3216     $links[] = array(
3217     "href" => "".OM_ROUTE_TAB."&obj=demande_type",
3218     "class" => "demande_type",
3219     "title" => _("type"),
3220     "right" => array("demande_type", "demande_type_tab",),
3221     "open" => array("index.php|demande_type[module=tab]", "index.php|demande_type[module=form]", ),
3222     );
3223     //
3224     $links[] = array(
3225     "class" => "category",
3226     "title" => _("workflows"),
3227     "right" => array(
3228     "workflows",
3229     "action", "action_tab", "etat",
3230     "etat_tab", "evenement", "evenement_tab", "bible", "bible_tab", "avis_decision",
3231     "avis_decision_tab", "avis_consultation", "avis_consultation_tab",
3232     ),
3233     );
3234     //
3235     $links[] = array(
3236     "title" => "<hr/>",
3237     "right" => array(
3238     "workflows",
3239     "action", "action_tab", "etat",
3240     "etat_tab", "evenement", "evenement_tab", "bible", "bible_tab", "avis_decision",
3241     "avis_decision_tab", "avis_consultation", "avis_consultation_tab",
3242     ),
3243     );
3244     //
3245     $links[] = array(
3246     "href" => "../app/workflows.php",
3247     "class" => "workflows",
3248     "title" => _("workflows"),
3249     "right" => array("workflows", ),
3250     "open" => array("workflows.php|", ),
3251     );
3252     //
3253     $links[] = array(
3254     "title" => "<hr/>",
3255     "right" => array(
3256     "evenement", "evenement_tab",
3257     ),
3258     );
3259     //
3260     $links[] = array(
3261     "href" => "".OM_ROUTE_TAB."&obj=evenement",
3262     "class" => "evenement",
3263     "title" => _("evenement"),
3264     "right" => array("evenement", "evenement_tab", ),
3265     "open" => array("index.php|evenement[module=tab]", "index.php|evenement[module=form]", ),
3266     );
3267     //
3268     $links[] = array(
3269     "title" => "<hr/>",
3270     "right" => array(
3271     "action", "action_tab", "etat",
3272     "etat_tab", "avis_decision",
3273     "avis_decision_tab",
3274     ),
3275     );
3276     //
3277     $links[] = array(
3278     "href" => "".OM_ROUTE_TAB."&obj=etat",
3279     "class" => "workflow-etat",
3280     "title" => _("etat"),
3281     "right" => array("etat", "etat_tab", ),
3282     "open" => array("index.php|etat[module=tab]", "index.php|etat[module=form]", ),
3283     );
3284     //
3285     $links[] = array(
3286     "href" => "".OM_ROUTE_TAB."&obj=avis_decision",
3287     "class" => "avis_decision",
3288     "title" => _("avis decision"),
3289     "right" => array("avis_decision", "avis_decision_tab", ),
3290     "open" => array("index.php|avis_decision[module=tab]", "index.php|avis_decision[module=form]", ),
3291     );
3292     //
3293     $links[] = array(
3294     "href" => "".OM_ROUTE_TAB."&obj=action",
3295     "class" => "action",
3296     "title" => _("action"),
3297     "right" => array("action", "action_tab", ),
3298     "open" => array("index.php|action[module=tab]", "index.php|action[module=form]", ),
3299     );
3300     //
3301     $links[] = array(
3302     "title" => "<hr/>",
3303     "right" => array(
3304     "bible", "bible_tab",
3305     ),
3306     );
3307     //
3308     $links[] = array(
3309     "href" => "".OM_ROUTE_TAB."&obj=bible",
3310     "class" => "bible",
3311     "title" => _("bible"),
3312     "right" => array("bible", "bible_tab", ),
3313     "open" => array("index.php|bible[module=tab]", "index.php|bible[module=form]", ),
3314     );
3315     //
3316     $links[] = array(
3317     "class" => "category",
3318     "title" => _("editions"),
3319     "right" => array(
3320     "om_etat", "om_etat_tab", "om_sousetat", "om_sousetat_tab",
3321     "om_lettretype", "om_lettretype_tab", "om_requete", "om_requete_tab",
3322     "om_logo", "om_logo_tab",
3323     ),
3324     );
3325     //
3326     $links[] = array(
3327     "title" => "<hr/>",
3328     "right" => array(
3329     "om_etat", "om_etat_tab", "om_lettretype", "om_lettretype_tab",
3330     ),
3331     );
3332     //
3333     $links[] = array(
3334     "href" => "".OM_ROUTE_TAB."&obj=om_etat",
3335     "class" => "om_etat",
3336     "title" => _("om_etat"),
3337     "right" => array("om_etat", "om_etat_tab", ),
3338     "open" => array("index.php|om_etat[module=tab]", "index.php|om_etat[module=form]", ),
3339     );
3340     //
3341     $links[] = array(
3342     "href" => "".OM_ROUTE_TAB."&obj=om_lettretype",
3343     "class" => "om_lettretype",
3344     "title" => _("om_lettretype"),
3345     "right" => array("om_lettretype", "om_lettretype_tab"),
3346     "open" => array("index.php|om_lettretype[module=tab]", "index.php|om_lettretype[module=form]", ),
3347     );
3348     //
3349     $links[] = array(
3350     "title" => "<hr/>",
3351     "right" => array(
3352     "om_logo", "om_logo_tab",
3353     ),
3354     );
3355     //
3356     $links[] = array(
3357     "href" => "".OM_ROUTE_TAB."&obj=om_logo",
3358     "class" => "om_logo",
3359     "title" => _("om_logo"),
3360     "right" => array("om_logo", "om_logo_tab", ),
3361     "open" => array("index.php|om_logo[module=tab]", "index.php|om_logo[module=form]", ),
3362     );
3363     //
3364     $rubrik['links'] = $links;
3365     //
3366     $menu[] = $rubrik;
3367     // }}}
3368    
3369     // {{{ Rubrique PARAMETRAGE
3370     //
3371     $rubrik = array(
3372     "title" => _("parametrage"),
3373     "class" => "parametrage",
3374     "right" => "menu_parametrage",
3375     );
3376     //
3377     $links = array();
3378     //
3379     $links[] = array(
3380     "href" => "".OM_ROUTE_TAB."&obj=civilite",
3381     "class" => "civilite",
3382     "title" => _("civilite"),
3383     "right" => array("civilite", "civilite_tab", ),
3384     "open" => array("index.php|civilite[module=tab]", "index.php|civilite[module=form]", ),
3385     );
3386     //
3387     $links[] = array(
3388     "href" => "".OM_ROUTE_TAB."&obj=arrondissement",
3389     "class" => "arrondissement",
3390     "title" => _("arrondissement"),
3391     "right" => array("arrondissement", "arrondissement_tab", ),
3392     "open" => array("index.php|arrondissement[module=tab]", "index.php|arrondissement[module=form]", ),
3393     );
3394     //
3395     $links[] = array(
3396     "href" => "".OM_ROUTE_TAB."&obj=quartier",
3397     "class" => "quartier",
3398     "title" => _("quartier"),
3399     "right" => array("quartier", "quartier_tab", ),
3400     "open" => array("index.php|quartier[module=tab]", "index.php|quartier[module=form]", ),
3401     );
3402     //
3403     $links[] = array(
3404     "class" => "category",
3405     "title" => _("Organisation"),
3406     "right" => array(
3407     "direction", "direction_tab", "division", "division_tab", "instructeur_qualite",
3408     "instructeur_qualite_tab", "instructeur", "instructeur_tab", "groupe",
3409     "groupe_tab", "genre", "genre_tab", "signataire_arrete", "signataire_arrete_tab",
3410     "taxe_amenagement_tab", "taxe_amenagement",
3411     ),
3412     );
3413     $links[] = array(
3414     "title" => "<hr/>",
3415     "right" => array(
3416     "direction", "direction_tab", "division", "division_tab", "instructeur_qualite",
3417     "instructeur_qualite_tab", "instructeur", "instructeur_tab", "groupe",
3418     "groupe_tab", "genre", "genre_tab", "signataire_arrete", "signataire_arrete_tab",
3419     "taxe_amenagement_tab", "taxe_amenagement",
3420     ),
3421     );
3422     //
3423     $links[] = array(
3424     "href" => "".OM_ROUTE_TAB."&obj=genre",
3425     "class" => "genre",
3426     "title" => _("genre"),
3427     "right" => array("genre", "genre_tab", ),
3428     "open" => array("index.php|genre[module=tab]", "index.php|genre[module=form]", ),
3429     );
3430     //
3431     $links[] = array(
3432     "href" => "".OM_ROUTE_TAB."&obj=groupe",
3433     "class" => "groupe",
3434     "title" => _("groupe"),
3435     "right" => array("groupe", "groupe_tab", ),
3436     "open" => array("index.php|groupe[module=tab]", "index.php|groupe[module=form]", ),
3437     );
3438     //
3439     $links[] = array(
3440     "href" => "".OM_ROUTE_TAB."&obj=direction",
3441     "class" => "direction",
3442     "title" => _("direction"),
3443     "right" => array("direction", "direction_tab", ),
3444     "open" => array("index.php|direction[module=tab]", "index.php|direction[module=form]", ),
3445     );
3446     //
3447     $links[] = array(
3448     "href" => "".OM_ROUTE_TAB."&obj=division",
3449     "class" => "division",
3450     "title" => _("division"),
3451     "right" => array("division", "division_tab", ),
3452     "open" => array("index.php|division[module=tab]", "index.php|division[module=form]", ),
3453     );
3454     //
3455     $links[] = array(
3456     "href" => "".OM_ROUTE_TAB."&obj=instructeur_qualite",
3457     "class" => "instructeur_qualite",
3458     "title" => _("instructeur_qualite"),
3459     "right" => array("instructeur_qualite", "instructeur_qualite_tab", ),
3460     "open" => array("index.php|instructeur_qualite[module=tab]", "index.php|instructeur_qualite[module=form]", ),
3461     );
3462     //
3463     $links[] = array(
3464     "href" => "".OM_ROUTE_TAB."&obj=instructeur",
3465     "class" => "instructeur",
3466     "title" => _("instructeur"),
3467     "right" => array("instructeur", "instructeur_tab", ),
3468     "open" => array("index.php|instructeur[module=tab]", "index.php|instructeur[module=form]", ),
3469     );
3470     //
3471     $links[] = array(
3472     "href" => "".OM_ROUTE_TAB."&obj=signataire_arrete",
3473     "class" => "signataire_arrete",
3474     "title" => _("signataire arrete"),
3475     "right" => array("signataire_arrete", "signataire_arrete", ),
3476     "open" => array("index.php|signataire_arrete[module=tab]", "index.php|signataire_arrete[module=form]", ),
3477     );
3478     //
3479     $links[] = array(
3480     "href" => "".OM_ROUTE_TAB."&obj=taxe_amenagement",
3481     "class" => "taxe_amenagement",
3482     "title" => _("taxes"),
3483     "right" => array("taxe_amenagement", "taxe_amenagement_tab", ),
3484     "open" => array("index.php|taxe_amenagement[module=tab]", "index.php|taxe_amenagement[module=form]", ),
3485     );
3486     //
3487     $links[] = array(
3488     "class" => "category",
3489     "title" => _("gestion des commissions"),
3490     "right" => array(
3491     "commission_type", "commission_type_tab",
3492     ),
3493     );
3494     //
3495     $links[] = array(
3496     "title" => "<hr/>",
3497     "right" => array(
3498     "commission_type", "commission_type_tab",
3499     ),
3500     );
3501     //
3502     $links[] = array(
3503     "href" => "".OM_ROUTE_TAB."&obj=commission_type",
3504     "class" => "commission-type",
3505     "title" => _("commission_type"),
3506     "right" => array("commission_type", "commission_type_tab", ),
3507     "open" => array("index.php|commission_type[module=tab]", "index.php|commission_type[module=form]", ),
3508     );
3509     //
3510     $links[] = array(
3511     "class" => "category",
3512     "title" => _("gestion des consultations"),
3513     "right" => array(
3514     "avis_consultation", "avis_consultation_tab", "service", "service_tab",
3515     "service_categorie", "service_categorie_tab",
3516     "lien_service_service_categorie", "lien_service_service_categorie_tab",
3517     ),
3518     );
3519     //
3520     $links[] = array(
3521     "title" => "<hr/>",
3522     "right" => array(
3523     "avis_consultation", "avis_consultation_tab", "service", "service_tab",
3524     "service_categorie", "service_categorie_tab",
3525     "lien_service_service_categorie", "lien_service_service_categorie_tab",
3526     ),
3527     );
3528     //
3529     $links[] = array(
3530     "href" => "".OM_ROUTE_TAB."&obj=avis_consultation",
3531     "class" => "avis_consultation",
3532     "title" => _("avis consultation"),
3533     "right" => array("avis_consultation", "avis_consultation_tab", ),
3534     "open" => array("index.php|avis_consultation[module=tab]", "index.php|avis_consultation[module=form]", ),
3535     );
3536     //
3537     $links[] = array(
3538     "href" => "".OM_ROUTE_TAB."&obj=service",
3539     "class" => "service",
3540     "title" => _("service"),
3541     "right" => array("service", "service_tab", ),
3542     "open" => array("index.php|service[module=tab]", "index.php|service[module=form]", ),
3543     );
3544     $links[] = array(
3545     "href" => "".OM_ROUTE_TAB."&obj=service_categorie",
3546     "class" => "service_categorie",
3547     "title" => _("thematique des services"),
3548     "right" => array("service_categorie", "service_categorie_tab", ),
3549     "open" => array("index.php|service_categorie[module=tab]", "index.php|service_categorie[module=form]", ),
3550     );
3551     //
3552     $links[] = array(
3553     "class" => "category",
3554     "title" => _("Gestion des dossiers"),
3555     "right" => array(
3556     "dossier_autorisation_type", "dossier_autorisation_type_tab",
3557     "dossier_autorisation_type_detaille",
3558     "dossier_autorisation_type_detaille_tab", "dossier_instruction_type",
3559     "dossier_instruction_type_tab",
3560     "autorite_competente", "autorite_competente_tab",
3561     "affectation_automatique", "affectation_automatique_tab",
3562     ),
3563     );
3564     //
3565     $links[] = array(
3566     "title" => "<hr/>",
3567     "right" => array(
3568     "dossier_autorisation_type", "dossier_autorisation_type_tab",
3569     "dossier_autorisation_type_detaille",
3570     "dossier_autorisation_type_detaille_tab", "dossier_instruction_type",
3571     "dossier_instruction_type_tab",
3572     "autorite_competente", "autorite_competente_tab",
3573     "affectation_automatique", "affectation_automatique_tab",
3574    
3575     ),
3576     );
3577     //
3578     $links[] = array(
3579     "href" => "".OM_ROUTE_TAB."&obj=etat_dossier_autorisation",
3580     "class" => "etat_dossier_autorisation",
3581     "title" => _("etat dossiers autorisations"),
3582     "right" => array("etat_dossier_autorisation", "etat_dossier_autorisation_tab", ),
3583     "open" => array("index.php|etat_dossier_autorisation[module=tab]", "index.php|etat_dossier_autorisation[module=form]", ),
3584     );
3585     //
3586     $links[] = array(
3587     "href" => "".OM_ROUTE_TAB."&obj=affectation_automatique",
3588     "class" => "affectation_automatique",
3589     "title" => _("affectation automatique"),
3590     "right" => array("affectation_automatique", "affectation_automatique_tab", ),
3591     "open" => array("index.php|affectation_automatique[module=tab]", "index.php|affectation_automatique[module=form]", ),
3592     );
3593     //
3594     $links[] = array(
3595     "href" => "".OM_ROUTE_TAB."&obj=autorite_competente",
3596     "class" => "autorite_competente",
3597     "title" => _("autorite")." "._("competente"),
3598     "right" => array("autorite_competente", "autorite_competente_tab", ),
3599     "open" => array("index.php|autorite_competente[module=tab]", "index.php|autorite_competente[module=form]", ),
3600     );
3601     //
3602     $links[] = array(
3603     "href" => "".OM_ROUTE_TAB."&obj=phase",
3604     "class" => "phase",
3605     "title" => _("phase"),
3606     "right" => array("phase", "phase_tab", ),
3607     "open" => array("index.php|phase[module=tab]", "index.php|phase[module=form]", ),
3608     );
3609    
3610     //Gestion des pièces
3611     $links[] = array(
3612     "class" => "category",
3613     "title" => _("Gestion des pièces"),
3614     "right" => array(
3615     "document_numerise_type_categorie", "document_numerise_type_categorie_tab",
3616     "document_numerise_type",
3617     "document_numerise_type_tab", "document_numerise_traitement_metadonnees",
3618     "document_numerise_traitement_metadonnees_executer",
3619     ),
3620     );
3621     //
3622     $links[] = array(
3623     "title" => "<hr/>",
3624     "right" => array(
3625     "document_numerise_type_categorie", "document_numerise_type_categorie_tab",
3626     "document_numerise_type",
3627     "document_numerise_type_tab", "document_numerise_traitement_metadonnees",
3628     "document_numerise_traitement_metadonnees_executer",
3629     ),
3630     );
3631     //
3632     $links[] = array(
3633     "href" => "".OM_ROUTE_TAB."&obj=document_numerise_type_categorie",
3634     "class" => "document_numerise_type_categorie",
3635     "title" => _("Catégorie des pièces"),
3636     "right" => array(
3637     "document_numerise_type_categorie",
3638     "document_numerise_type_categorie_tab",
3639     ),
3640     "open" => array(
3641     "index.php|document_numerise_type_categorie[module=tab]",
3642     "index.php|document_numerise_type_categorie[module=form]",
3643     ),
3644     );
3645     //
3646     $links[] = array(
3647     "href" => "".OM_ROUTE_TAB."&obj=document_numerise_type",
3648     "class" => "document_numerise_type",
3649     "title" => _("Type des pièces"),
3650     "right" => array(
3651     "document_numerise_type",
3652     "document_numerise_type_tab",
3653     ),
3654     "open" => array(
3655     "index.php|document_numerise_type[module=tab]",
3656     "index.php|document_numerise_type[module=form][action=0]",
3657     "index.php|document_numerise_type[module=form][action=1]",
3658     "index.php|document_numerise_type[module=form][action=2]",
3659     "index.php|document_numerise_type[module=form][action=3]",
3660     ),
3661     );
3662     //
3663     $links[] = array(
3664     "href" => "".OM_ROUTE_FORM."&obj=document_numerise_traitement_metadonnees&action=100&idx=0",
3665     "class" => "document_numerise_traitement_metadonnees",
3666     "title" => _("Mise à jour des métadonnées"),
3667     "description" => _("Mettre à jour les métadonnées de tous les documents numérisés."),
3668     "right" => array(
3669     "document_numerise_traitement_metadonnees",
3670     "document_numerise_traitement_metadonnees_executer",
3671     ),
3672     "open" => array("index.php|document_numerise_traitement_metadonnees[module=form]", ),
3673     );
3674    
3675     // Gestion des contentieux
3676     $links[] = array(
3677     "class" => "category",
3678     "title" => _("Gestion des contentieux"),
3679     "right" => array(
3680     "objet_recours", "objet_recours_tab", "moyen_souleve", "moyen_souleve_tab",
3681     "moyen_retenu_juge", "moyen_retenu_juge_tab",
3682     ),
3683     );
3684     //
3685     $links[] = array(
3686     "title" => "<hr/>",
3687     "right" => array(
3688     "objet_recours", "objet_recours_tab", "moyen_souleve", "moyen_souleve_tab",
3689     "moyen_retenu_juge", "moyen_retenu_juge_tab",
3690     ),
3691     );
3692     //
3693     $links[] = array(
3694     "href" => "".OM_ROUTE_TAB."&obj=objet_recours",
3695     "class" => "objet_recours",
3696     "title" => _("objet_recours"),
3697     "right" => array(
3698     "objet_recours", "objet_recours_tab",
3699     ),
3700     "open" => array(
3701     "index.php|objet_recours[module=tab]", "index.php|objet_recours[module=form]",
3702     ),
3703     );
3704     //
3705     $links[] = array(
3706     "href" => "".OM_ROUTE_TAB."&obj=moyen_souleve",
3707     "class" => "moyen_souleve",
3708     "title" => _("moyen_souleve"),
3709     "right" => array(
3710     "moyen_souleve", "moyen_souleve_tab",
3711     ),
3712     "open" => array(
3713     "index.php|moyen_souleve[module=tab]", "index.php|moyen_souleve[module=form]",
3714     ),
3715     );
3716     //
3717     $links[] = array(
3718     "href" => "".OM_ROUTE_TAB."&obj=moyen_retenu_juge",
3719     "class" => "moyen_retenu_juge",
3720     "title" => _("moyen_retenu_juge"),
3721     "right" => array(
3722     "moyen_retenu_juge", "moyen_retenu_juge_tab",
3723     ),
3724     "open" => array(
3725     "index.php|moyen_retenu_juge[module=tab]", "index.php|moyen_retenu_juge[module=form]",
3726     ),
3727     );
3728    
3729     //
3730     $rubrik['links'] = $links;
3731     //
3732     $menu[] = $rubrik;
3733     // }}}
3734    
3735     // {{{ Rubrique ADMINISTRATION
3736     //
3737     $rubrik = array(
3738     "title" => _("administration"),
3739     "class" => "administration",
3740     "right" => "menu_administration",
3741     );
3742     //
3743     $links = array();
3744     //
3745     $links[] = array(
3746     "href" => "".OM_ROUTE_TAB."&obj=om_collectivite",
3747     "class" => "collectivite",
3748     "title" => _("om_collectivite"),
3749     "right" => array("om_collectivite", "om_collectivite_tab", ),
3750     "open" => array("index.php|om_collectivite[module=tab]", "index.php|om_collectivite[module=form]", ),
3751     );
3752     //
3753     $links[] = array(
3754     "href" => "".OM_ROUTE_TAB."&obj=om_parametre",
3755     "class" => "parametre",
3756     "title" => _("om_parametre"),
3757     "right" => array("om_parametre", "om_parametre_tab", ),
3758     "open" => array("index.php|om_parametre[module=tab]", "index.php|om_parametre[module=form]", ),
3759     );
3760     //
3761     $links[] = array(
3762     "class" => "category",
3763     "title" => _("gestion des utilisateurs"),
3764     "right" => array(
3765     "om_utilisateur", "om_utilisateur_tab", "om_profil", "om_profil_tab",
3766     "om_droit", "om_droit_tab", "directory",
3767     ),
3768     );
3769     //
3770     $links[] = array(
3771     "title" => "<hr/>",
3772     "right" => array(
3773     "om_utilisateur", "om_utilisateur_tab", "om_profil", "om_profil_tab",
3774     "om_droit", "om_droit_tab",
3775     ),
3776     );
3777     //
3778     $links[] = array(
3779     "href" => "".OM_ROUTE_TAB."&obj=om_profil",
3780     "class" => "profil",
3781     "title" => _("om_profil"),
3782     "right" => array("om_profil", "om_profil_tab", ),
3783     "open" => array("index.php|om_profil[module=tab]", "index.php|om_profil[module=form]", ),
3784     );
3785     //
3786     $links[] = array(
3787     "href" => "".OM_ROUTE_TAB."&obj=om_droit",
3788     "class" => "droit",
3789     "title" => _("om_droit"),
3790     "right" => array("om_droit", "om_droit_tab", ),
3791     "open" => array("index.php|om_droit[module=tab]", "index.php|om_droit[module=form]", ),
3792     );
3793     //
3794     $links[] = array(
3795     "href" => "".OM_ROUTE_TAB."&obj=om_utilisateur",
3796     "class" => "utilisateur",
3797     "title" => _("om_utilisateur"),
3798     "right" => array("om_utilisateur", "om_utilisateur_tab", ),
3799     "open" => array(
3800     "index.php|om_utilisateur[module=tab]",
3801     "index.php|om_utilisateur[module=form][action=0]",
3802     "index.php|om_utilisateur[module=form][action=1]",
3803     "index.php|om_utilisateur[module=form][action=2]",
3804     "index.php|om_utilisateur[module=form][action=3]",
3805     ),
3806     );
3807     //
3808     $links[] = array(
3809     "title" => "<hr/>",
3810     "right" => array("om_utilisateur", "om_utilisateur_synchroniser", ),
3811     "parameters" => array("isDirectoryOptionEnabled" => true, ),
3812     );
3813     //
3814     $links[] = array(
3815     "href" => "".OM_ROUTE_FORM."&obj=om_utilisateur&idx=0&action=11",
3816     "class" => "annuaire",
3817     "title" => _("annuaire"),
3818     "right" => array("om_utilisateur", "om_utilisateur_synchroniser", ),
3819     "open" => array("index.php|om_utilisateur[module=form][action=11]", ),
3820     "parameters" => array("isDirectoryOptionEnabled" => true, ),
3821     );
3822     //
3823     $links[] = array(
3824     "class" => "category",
3825     "title" => _("tableaux de bord"),
3826     "right" => array(
3827     "om_widget", "om_widget_tab", "om_dashboard",
3828     ),
3829     );
3830     //
3831     $links[] = array(
3832     "title" => "<hr/>",
3833     "right" => array(
3834     "om_widget", "om_widget_tab", "om_dashboard",
3835     ),
3836     );
3837     //
3838     $links[] = array(
3839     "href" => "".OM_ROUTE_TAB."&obj=om_widget",
3840     "class" => "om_widget",
3841     "title" => _("om_widget"),
3842     "right" => array("om_widget", "om_widget_tab", ),
3843     "open" => array("index.php|om_widget[module=tab]", "index.php|om_widget[module=form]", ),
3844     );
3845     //
3846     $links[] = array(
3847     "href" => "".OM_ROUTE_FORM."&obj=om_dashboard&amp;idx=0&amp;action=4",
3848     "class" => "om_dashboard",
3849     "title" => _("composition"),
3850     "right" => array("om_dashboard", ),
3851     "open" => array("index.php|om_dashboard[module=form][action=4]", ),
3852     );
3853     //
3854     $links[] = array(
3855     "class" => "category",
3856     "title" => _("sig"),
3857     "right" => array(
3858     "om_sig_map", "om_sig_map_tab", "om_sig_flux", "om_sig_flux_tab", "om_sig_extent", "om_sig_extent_tab",
3859     ),
3860     "parameters" => array("option_localisation" => "sig_interne", ),
3861     );
3862     //
3863     $links[] = array(
3864     "title" => "<hr/>",
3865     "right" => array(
3866     "om_sig_map", "om_sig_map_tab", "om_sig_flux", "om_sig_flux_tab", "om_sig_extent", "om_sig_extent_tab",
3867     ),
3868     "parameters" => array("option_localisation" => "sig_interne", ),
3869     );
3870     //
3871     $links[] = array(
3872     "href" => "".OM_ROUTE_TAB."&obj=om_sig_extent",
3873     "class" => "om_sig_extent",
3874     "title" => _("om_sig_extent"),
3875     "right" => array("om_sig_extent", "om_sig_extent_tab", ),
3876     "open" => array("index.php|om_sig_extent[module=tab]", "index.php|om_sig_extent[module=form]", ),
3877     "parameters" => array("option_localisation" => "sig_interne", ),
3878     );
3879     //
3880     $links[] = array(
3881     "href" => "".OM_ROUTE_TAB."&obj=om_sig_map",
3882     "class" => "om_sig_map",
3883     "title" => _("om_sig_map"),
3884     "right" => array("om_sig_map", "om_sig_map_tab", ),
3885     "open" => array("index.php|om_sig_map[module=tab]", "index.php|om_sig_map[module=form]", ),
3886     "parameters" => array("option_localisation" => "sig_interne", ),
3887     );
3888     //
3889     $links[] = array(
3890     "href" => "".OM_ROUTE_TAB."&obj=om_sig_flux",
3891     "class" => "om_sig_flux",
3892     "title" => _("om_sig_flux"),
3893     "right" => array("om_sig_flux", "om_sig_flux_tab", ),
3894     "open" => array("index.php|om_sig_flux[module=tab]", "index.php|om_sig_flux[module=form]", ),
3895     "parameters" => array("option_localisation" => "sig_interne", ),
3896     );
3897     //
3898     $links[] = array(
3899     "class" => "category",
3900     "title" => _("options avancees"),
3901     "right" => array("import", "gen", "om_requete", "om_requete_tab",
3902     "om_sousetat", "om_sousetat_tab",),
3903     );
3904     //
3905     $links[] = array(
3906     "title" => "<hr/>",
3907     "right" => array(
3908     "interface_referentiel_erp",
3909     ),
3910     );
3911     //
3912     $links[] = array(
3913     "href" => "../app/settings.php?controlpanel=interface_referentiel_erp",
3914     "class" => "interface_referentiel_erp",
3915     "title" => _("interface_referentiel_erp"),
3916     "right" => array("interface_referentiel_erp", ),
3917     "open" => array("settings.php|[controlpanel=interface_referentiel_erp]", ),
3918     );
3919     //
3920     $links[] = array(
3921     "title" => "<hr/>",
3922     "right" => array(
3923     "om_sousetat", "om_sousetat_tab",
3924     ),
3925     );
3926     //
3927     $links[] = array(
3928     "href" => "".OM_ROUTE_TAB."&obj=om_sousetat",
3929     "class" => "om_sousetat",
3930     "title" => _("om_sousetat"),
3931     "right" => array("om_sousetat", "om_sousetat_tab", ),
3932     "open" => array("index.php|om_sousetat[module=tab]", "index.php|om_sousetat[module=form]", ),
3933     );
3934     //
3935     $links[] = array(
3936     "title" => "<hr/>",
3937     "right" => array("om_requete", "om_requete_tab", ),
3938     );
3939     //
3940     $links[] = array(
3941     "href" => "".OM_ROUTE_TAB."&obj=om_requete",
3942     "class" => "om_requete",
3943     "title" => _("om_requete"),
3944     "right" => array("om_requete", "om_requete_tab", ),
3945     "open" => array("index.php|om_requete[module=tab]", "index.php|om_requete[module=form]", ),
3946     );
3947     //
3948     $links[] = array(
3949     "title" => "<hr/>",
3950     "right" => array("import", ),
3951     );
3952     //
3953     $links[] = array(
3954     "href" => OM_ROUTE_MODULE_IMPORT,
3955     "class" => "import",
3956     "title" => _("Import"),
3957     "right" => array("import", ),
3958     "open" => array("import.php|", ),
3959     );
3960     //
3961     $links[] = array(
3962     "href" => "../app/import_specific.php",
3963     "class" => "import_specific",
3964     "title" => _("Import specifique"),
3965     "right" => array("import", ),
3966     "open" => array("import_specific.php|", ),
3967     );
3968     //
3969     $links[] = array(
3970     "title" => "<hr/>",
3971     "right" => array("gen", ),
3972     );
3973     //
3974     $links[] = array(
3975     "title" => _("Generateur"),
3976     "href" => OM_ROUTE_MODULE_GEN,
3977     "class" => "generator",
3978     "right" => array("gen", ),
3979     "open" => array(
3980     "gen.php|","genauto.php|", "gensup.php|", "genfull.php|",
3981     "genetat.php|", "gensousetat.php|", "genlettretype.php|",
3982     "genimport.php|",
3983     ),
3984     );
3985     //
3986     $links[] = array(
3987     "href" => "".OM_ROUTE_FORM."&obj=contrainte&action=100&idx=0",
3988     "class" => "contrainte",
3989     "title" => _("synchronisation des contraintes"),
3990     "right" => array("contrainte", "contrainte_synchronisation", ),
3991     "open" => array("index.php|contrainte[module=form][action=100]", ),
3992     "parameters" => array(
3993     "option_sig" => "sig_externe",
3994     ),
3995     );
3996     //
3997     $links[] = array(
3998     "href" => "".OM_ROUTE_FORM."&obj=dossier_instruction&action=126&idx=0",
3999     "class" => "geocoder",
4000     "title" => _("Géolocalisation des dossiers"),
4001     "right" => array("dossier_instruction_geocoder", ),
4002     "open" => array("index.php|dossier_instruction[module=form][action=126]", ),
4003     "parameters" => array(
4004     "option_sig" => "sig_externe",
4005     ),
4006     );
4007     //
4008     $rubrik['links'] = $links;
4009     //
4010     $menu[] = $rubrik;
4011     $this->config__menu = $menu;
4012     }
4013 mbroquet 3730 }
4014    
4015 softime 7996

Properties

Name Value
svn:keywords "Id"

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26