<?php
/**
 * Ce script définit la classe 'utils'.
 *
 * @package opencimetiere
 * @version SVN : $Id: utils.class.php 547 2011-08-25 12:03:42Z fmichon $
 */

/**
 *
 */
if (file_exists("../dyn/locales.inc.php") === true) {
    require_once "../dyn/locales.inc.php";
}

/**
 * Définition de la constante représentant le chemin d'accès au framework
 */
define("PATH_OPENMAIRIE", getcwd()."/../core/");

/**
 * Dépendances PHP du framework
 * On modifie la valeur de la directive de configuration include_path en
 * fonction pour y ajouter les chemins vers les librairies dont le framework
 * dépend.
 */
set_include_path(
    get_include_path().PATH_SEPARATOR.implode(
        PATH_SEPARATOR,
        array(
            getcwd()."/../php/pear",
            getcwd()."/../php/db",
            getcwd()."/../php/fpdf",
            getcwd()."/../php/phpmailer",
            getcwd()."/../php/tcpdf",
        )
    )
);

/**
 *
 */
if (file_exists("../dyn/debug.inc.php") === true) {
    require_once "../dyn/debug.inc.php";
}

/**
 *
 */
(defined("PATH_OPENMAIRIE") ? "" : define("PATH_OPENMAIRIE", ""));

/**
 *
 */
require_once PATH_OPENMAIRIE."om_application.class.php";

/**
 * Définition de la classe 'opencimetiere' (om_application).
 *
 * Cette classe permet la surcharge de certaines méthodes de
 * la classe om_application pour des besoins spécifiques de l'application.
 */
class opencimetiere extends application {

    /**
     * Gestion du nom de l'application.
     *
     * @var mixed Configuration niveau application.
     */
    protected $_application_name = "openCimetière";

    /**
     * Titre HTML.
     *
     * @var mixed Configuration niveau application.
     */
    protected $html_head_title = ":: openMairie :: openCimetière";

    /**
     * Gestion du nom de la session.
     *
     * @var mixed Configuration niveau application.
     */
    protected $_session_name = "1bb484de79f96a6dab00aaf4463c18f8bf";

    /**
     * Gestion du mode de gestion des permissions.
     *
     * @var mixed Configuration niveau application.
     */
    protected $config__permission_by_hierarchical_profile = false;

    /**
     *
     * @return void
     */
    function setDefaultValues() {
        $this->addHTMLHeadCss(
            array(
                "../lib/om-theme/jquery-ui-theme/jquery-ui.custom.css",
                "../lib/om-theme/om.css",
            ),
            21
        );
    }

    /**
     * Surcharge - view_main().
     *
     * Ajoute la vue 'search' comme un nouveau module.
     *
     * @return void
     */
    function view_main() {
        if ($this->get_submitted_get_value("module") === "search") {
            $this->view_module_search();
            return;
        }
        parent::view_main();
    }

    /**
     * Cette vue permet d'afficher un formulaire de recherche globale ainsi que
     * les résultats de recherche associés.
     *
     * @return void
     */
    function view_module_search() {
        $this->isAuthorized("recherche");
        $this->setTitle(__("recherche")." -> ".__("recherche globale"));
        $this->setFlag(null);
        $this->display();
        //
        set_time_limit(1800);
        //
        (isset($_GET['obj']) ? $obj = $_GET['obj'] : $obj = "");
        // Description de la page
        $description = __("Cette page vous permet de rechercher dans toutes les tables ".
        "de l'application.");
        $this->displayDescription($description);
        //
        echo "\n<div id=\"edition\">\n";
        //
        echo "<fieldset class=\"cadre ui-corner-all ui-widget-content\">\n";
        echo "\t<legend class=\"ui-corner-all ui-widget-content ui-state-active\">";
        echo __("recherche");
        echo "</legend>\n";
        //
        require_once "../sql/".OM_DB_PHPTYPE."/".$obj.".search.inc.php";
        require_once "../obj/search.class.php";
        $objRech = new search($this, $configTypeRecherche);
        $objRech->searchInclude("../app/index.php?module=search&obj=concession");
        $objRech->showForm();
        $objRech->showResults();
        //
        echo "</fieldset>\n";
        //
        echo "</div>";
    }

    /**
     * Surcharge - set_config__footer().
     *
     * @return void
     */
    protected function set_config__footer() {
        $footer = array();
        // Documentation du site
        $footer[] = array(
            "title" => __("Documentation"),
            "description" => __("Acceder a l'espace documentation de l'application"),
            "href" => "http://docs.openmairie.org/?project=opencimetiere&version=4.0&format=html&path=manuel_utilisateur",
            "target" => "_blank",
            "class" => "footer-documentation",
        );
        // Forum openMairie
        $footer[] = array(
            "title" => __("Forum"),
            "description" => __("Espace d'échange ouvert du projet openMairie"),
            "href" => "https://communaute.openmairie.org/c/opencimetiere",
            "target" => "_blank",
            "class" => "footer-forum",
        );
        // Portail openMairie
        $footer[] = array(
            "title" => __("openMairie.org"),
            "description" => __("Site officiel du projet openMairie"),
            "href" => "http://www.openmairie.org/catalogue/opencimetiere",
            "target" => "_blank",
            "class" => "footer-openmairie",
        );
        //
        $this->config__footer = $footer;
    }

    /**
     * Surcharge - set_config__menu().
     *
     * @return void
     */
    protected function set_config__menu() {
        parent::set_config__menu();
        $parent_menu = $this->config__menu;
        //
        $menu = array();
        // {{{ Rubrique EMPLACEMENT
        //
        $rubrik = array(
            "title" => __("emplacement"),
            "class" => "emplacement",
            "open" => array(
                "emplacement.php|",
            )
        );
        //
        $links = array();
        //
        $links[] = array(
            "href" => OM_ROUTE_TAB."&obj=concession",
            "class" => "concession",
            "title" => __("concession"),
            "right" => array(
                "concession",
                "concession_tab",
            ),
            "open" => array(
                "index.php|concession[module=tab]",
                "index.php|concession[module=form][action=0]",
                "index.php|concession[module=form][action=1]",
                "index.php|concession[module=form][action=2]",
                "index.php|concession[module=form][action=3]",
                "index.php|concession[module=map][mode=tab_sig]",
                "localisation_plan_view.php|concession",
            ),
        );
        //
        $links[] = array(
            "href" => OM_ROUTE_TAB."&obj=colombarium",
            "class" => "colombarium",
            "title" => __("colombarium"),
            "right" => array(
                "colombarium",
                "colombarium_tab",
            ),
            "open" => array(
                "index.php|colombarium[module=tab]",
                "index.php|colombarium[module=form][action=0]",
                "index.php|colombarium[module=form][action=1]",
                "index.php|colombarium[module=form][action=2]",
                "index.php|colombarium[module=form][action=3]",
                "index.php|colombarium[module=map][mode=tab_sig]",
                "localisation_plan_view.php|colombarium",
            ),
        );
        //
        $links[] = array(
            "href" => OM_ROUTE_TAB."&obj=enfeu",
            "class" => "enfeu",
            "title" => __("enfeu"),
            "right" => array(
                "enfeu",
                "enfeu_tab",
            ),
            "open" => array(
                "index.php|enfeu[module=tab]",
                "index.php|enfeu[module=form][action=0]",
                "index.php|enfeu[module=form][action=1]",
                "index.php|enfeu[module=form][action=2]",
                "index.php|enfeu[module=form][action=3]",
                "index.php|enfeu[module=map][mode=tab_sig]",
                "localisation_plan_view.php|enfeu",
            ),
        );
        //
        $links[] = array(
            "href" => OM_ROUTE_TAB."&obj=ossuaire",
            "class" => "ossuaire",
            "title" => __("ossuaire"),
            "right" => array(
                "ossuaire",
                "ossuaire_tab",
            ),
            "open" => array(
                "index.php|ossuaire[module=tab]",
                "index.php|ossuaire[module=form]",
            ),
        );
        //
        $links[] = array(
            "href" => OM_ROUTE_TAB."&obj=depositoire",
            "class" => "depositoire",
            "title" => __("depositoire"),
            "right" => array(
                "depositoire",
                "depositoire_tab",
            ),
            "open" => array(
                "index.php|depositoire[module=tab]",
                "index.php|depositoire[module=form]",
            ),
        );
        //
        $links[] = array(
            "href" => OM_ROUTE_TAB."&obj=terraincommunal",
            "class" => "terraincommunal",
            "title" => __("terraincommunal"),
            "right" => array(
                "terraincommunal",
                "terraincommunal_tab",
            ),
            "open" => array(
                "index.php|terraincommunal[module=tab]",
                "index.php|terraincommunal[module=form][action=0]",
                "index.php|terraincommunal[module=form][action=1]",
                "index.php|terraincommunal[module=form][action=2]",
                "index.php|terraincommunal[module=form][action=3]",
                "index.php|terraincommunal[module=map][mode=tab_sig]",
                "localisation_plan_view.php|terraincommunal",
            ),
        );
        //
        $rubrik['links'] = $links;
        //
        $menu["app-menu-rubrik-emplacement"] = $rubrik;
        // }}}

        // {{{ Rubrique RECHERCHE
        //
        $rubrik = array(
            "title" => __("recherche"),
            "class" => "recherche",
        );
        //
        $links = array();
        //
        $links[] = array(
            "href" => "../app/index.php?module=search&obj=concession",
            "class" => "recherche",
            "title" => __("recherche").' '.__("globale"),
            "right" => array(
                "recherche",
            ),
            "open" => array(
                "index.php|concession[module=search]",
            ),
        );
        //
        $links[] = array(
            "title" => "<hr/>",
            "right" => array(
                "terme",
                "terme_tab",
            ),
        );
        //
        $links[] = array(
            "href" => OM_ROUTE_TAB."&obj=terme",
            "class" => "concession_terme",
            "title" => __("concession_terme"),
            "right" => array(
                "terme",
                "terme_tab",
            ),
            "open" => array(
                "index.php|terme[module=tab]",
                "index.php|terme[module=form]",
            ),
        );
        //
        $links[] = array(
            "title" => "<hr/>",
            "right" => array(
                "concessionlibre",
                "concessionlibre_tab",
                "colombariumlibre",
                "colombariumlibre_tab",
                "terraincommunallibre",
                "terraincommunallibre_tab",
            ),
        );
        //
        $links[] = array(
            "href" => OM_ROUTE_TAB."&obj=concessionlibre",
            "class" => "concession_libre",
            "title" => __("concession_libre"),
            "right" => array(
                "concessionlibre",
                "concessionlibre_tab",
            ),
            "open" => array(
                "index.php|concessionlibre[module=tab]",
                "index.php|concessionlibre[module=form]",
            ),
        );
        //
        $links[] = array(
            "href" => OM_ROUTE_TAB."&obj=colombariumlibre",
            "class" => "colombarium_libre",
            "title" => __("colombarium_libre"),
            "right" => array(
                "colombariumlibre",
                "colombariumlibre_tab",
            ),
            "open" => array(
                "index.php|colombariumlibre[module=tab]",
                "index.php|colombariumlibre[module=form]",
            ),
        );
        //
        $links[] = array(
            "href" => OM_ROUTE_TAB."&obj=terraincommunallibre",
            "class" => "terraincommunal_libre",
            "title" => __("terraincommunal_libre"),
            "right" => array(
                "terraincommunallibre",
                "terraincommunallibre_tab",
            ),
            "open" => array(
                "index.php|terraincommunallibre[module=tab]",
                "index.php|terraincommunallibre[module=form]",
            ),
        );
        //
        $rubrik['links'] = $links;
        //
        $menu["app-menu-rubrik-recherche"] = $rubrik;
        // }}}

        // {{{ Rubrique OPERATIONS
        //
        $rubrik = array(
            "title" => __("operations"),
            "class" => "operation",
        );
        //
        $links = array();
        //
        $links[] = array(
            "class" => "category",
            "title" => __("inhumations"),
            "right" => array(
                "inhumation_concession",
                "inhumation_concession_tab",
                "inhumation_terraincommunal",
                "inhumation_terraincommunal_tab",
                "inhumation_enfeu",
                "inhumation_enfeu_tab",
                "inhumation_colombarium",
                "inhumation_colombarium_tab",
            ),
        );
        //
        $links[] = array(
            "title" => "<hr/>",
            "right" => array(
                "inhumation_concession",
                "inhumation_concession_tab",
                "inhumation_terraincommunal",
                "inhumation_terraincommunal_tab",
                "inhumation_enfeu",
                "inhumation_enfeu_tab",
                "inhumation_colombarium",
                "inhumation_colombarium_tab",
            ),
        );
        //
        $links[] = array(
            "href" => OM_ROUTE_TAB."&obj=inhumation_concession",
            "class" => "operation",
            "title" => __("inhumation")." ".__("concession"),
            "right" => array(
                "inhumation_concession",
                "inhumation_concession_tab",
            ),
            "open" => array(
                "index.php|inhumation_concession[module=tab]",
                "index.php|inhumation_concession[module=form]",
            ),
        );
        //
        $links[] = array(
            "href" => OM_ROUTE_TAB."&obj=inhumation_terraincommunal",
            "class" => "operation",
            "title" => __("inhumation")." ".__("terraincommunal"),
            "right" => array(
                "inhumation_terraincommunal",
                "inhumation_terraincommunal_tab",
            ),
            "open" => array(
                "index.php|inhumation_terraincommunal[module=tab]",
                "index.php|inhumation_terraincommunal[module=form]",
            ),
        );
        //
        $links[] = array(
            "href" => OM_ROUTE_TAB."&obj=inhumation_enfeu",
            "class" => "operation",
            "title" => __("inhumation")." ".__("enfeu"),
            "right" => array(
                "inhumation_enfeu",
                "inhumation_enfeu_tab",
            ),
            "open" => array(
                "index.php|inhumation_enfeu[module=tab]",
                "index.php|inhumation_enfeu[module=form]",
            ),
        );
        //
        $links[] = array(
            "href" => OM_ROUTE_TAB."&obj=inhumation_colombarium",
            "class" => "operation",
            "title" => __("inhumation")." ".__("colombarium"),
            "right" => array(
                "inhumation_colombarium",
                "inhumation_colombarium_tab",
            ),
            "open" => array(
                "index.php|inhumation_colombarium[module=tab]",
                "index.php|inhumation_colombarium[module=form]",
            ),
        );
        //
        $links[] = array(
            "class" => "category",
            "title" => __("reductions"),
            "right" => array(
                "reduction_concession",
                "reduction_concession_tab",
                "reduction_enfeu",
                "reduction_enfeu_tab",
            ),
        );
        //
        $links[] = array(
            "title" => "<hr/>",
            "right" => array(
                "reduction_concession",
                "reduction_concession_tab",
                "reduction_enfeu",
                "reduction_enfeu_tab",
            ),
        );
        //
        $links[] = array(
            "href" => OM_ROUTE_TAB."&obj=reduction_concession",
            "class" => "operation",
            "title" => __("reduction")." ".__("concession"),
            "right" => array(
                "reduction_concession",
                "reduction_concession_tab",
            ),
            "open" => array(
                "index.php|reduction_concession[module=tab]",
                "index.php|reduction_concession[module=form]",
            ),
        );
        //
        $links[] = array(
            "href" => OM_ROUTE_TAB."&obj=reduction_enfeu",
            "class" => "operation",
            "title" => __("reduction")." ".__("enfeu"),
            "right" => array(
                "reduction_enfeu",
                "reduction_enfeu_tab",
            ),
            "open" => array(
                "index.php|reduction_enfeu[module=tab]",
                "index.php|reduction_enfeu[module=form]",
            ),
        );
        //
        $links[] = array(
            "class" => "category",
            "title" => __("transferts"),
            "right" => array(
                "transfert",
                "transfert_tab",
            ),
        );
        //
        $links[] = array(
            "title" => "<hr/>",
            "right" => array(
                "transfert",
                "transfert_tab",
            ),
        );
        //
        $links[] = array(
            "href" => OM_ROUTE_TAB."&obj=transfert",
            "class" => "operation",
            "title" => __("transfert")." ".__("emplacement"),
            "right" => array(
                "transfert",
                "transfert_tab",
            ),
            "open" => array(
                "index.php|transfert[module=tab]",
                "index.php|transfert[module=form]",
            ),
        );
        //
        $links[] = array(
            "class" => "category",
            "title" => __("autres"),
            "right" => array(
                "operation_trt",
                "operation_trt_tab",
                "concessionplace",
                "numdossier",
            ),
        );
        //
        $links[] = array(
            "title" => "<hr/>",
            "right" => array(
                "operation_trt",
                "operation_trt_tab",
                "edition",
            ),
        );
        //
        $links[] = array(
            "href" => OM_ROUTE_TAB."&obj=operation_trt",
            "class" => "operation",
            "title" => __("operation(s) traitee(s)"),
            "right" => array(
                "operation_trt",
                "operation_trt_tab",
            ),
            "open" => array(
                "index.php|operation_trt[module=tab]",
                "index.php|operation_trt[module=form]",
            ),
        );
        //
        $links[] = array(
            "title" => "<hr/>",
            "right" => array(
                "emplacement_calculer_place",
            ),
        );
        //
        $links[] = array(
            "href" => OM_ROUTE_FORM."&obj=emplacement&action=91",
            "class" => "concessionplace",
            "title" => __("calcul")." ".__("place"),
            "right" => array(
                "emplacement_calculer_place",
            ),
            "open" => array(
                "index.php|emplacement[action=91]"
            ),
        );
        //
        $links[] = array(
            "title" => "<hr/>",
            "right" => array(
                "operation_reset_numdossier",
            ),
        );
        //
        $links[] = array(
            "href" => OM_ROUTE_FORM."&obj=operation&action=90",
            "class" => "trt_reset_seq_numdossier",
            "title" => __("réinitialisation du n° de dossier"),
            "right" => array(
                "operation_reset_numdossier",
            ),
            "open" => array(
                "index.php|operation[action=90]"
            ),
        );
        //
        $rubrik['links'] = $links;
        //
        $menu["app-menu-rubrik-operation"] = $rubrik;
        // }}}

        // {{{ RUBRIQUE ARCHIVE
        //
        $rubrik = array(
            "title" => __("archive"),
            "class" => "archive",
        );
        //
        $links = array();
        //
        $links[] = array(
            "href" => OM_ROUTE_TAB."&obj=emplacement_archive",
            "class" => "emplacement_archive",
            "title" => __("emplacement"),
            "right" => array(
                "emplacement_archive",
                "emplacement_archive_tab",
            ),
            "open" => array(
                "index.php|emplacement_archive[module=tab]",
                "index.php|emplacement_archive[module=form]",
            ),
        );
        //
        $links[] = array(
            "href" => OM_ROUTE_TAB."&obj=defunt_archive",
            "class" => "defunt_archive",
            "title" => __("defunt"),
            "right" => array(
                "defunt_archive",
                "defunt_archive_tab",
            ),
            "open" => array(
                "index.php|defunt_archive[module=tab]",
                "index.php|defunt_archive[module=form]",
            ),
        );
        //
        $links[] = array(
            "href" => OM_ROUTE_TAB."&obj=concessionnaire_archive",
            "class" => "concessionnaire_archive",
            "title" => __("concessionnaire"),
            "right" => array(
                "concessionnaire_archive",
                "concessionnaire_archive_tab",
            ),
            "open" => array(
                "index.php|concessionnaire_archive[module=tab]",
                "index.php|concessionnaire_archive[module=form]",
            ),
        );
        //
        $links[] = array(
            "href" => OM_ROUTE_TAB."&obj=ayantdroit_archive",
            "class" => "ayantdroit_archive",
            "title" => __("ayantdroit"),
            "right" => array(
                "ayantdroit_archive",
                "ayantdroit_archive_tab",
            ),
            "open" => array(
                "index.php|ayantdroit_archive[module=tab]",
                "index.php|ayantdroit_archive[module=form]",
            ),
        );
        //
        $links[] = array(
            "href" => OM_ROUTE_TAB."&obj=operation_archive",
            "class" => "operation_archive",
            "title" => __("operation"),
            "right" => array(
                "operation_archive",
                "operation_archive_tab",
            ),
            "open" => array(
                "index.php|operation_archive[module=tab]",
                "index.php|operation_archive[module=form]",
            ),
        );
        //
        $links[] = array(
            "title" => "<hr/>",
            "right" => array(
                "concessionfin",
                "concessionfin_tab",
                "colombariumfin",
                "colombariumfin_tab",
                "terraincommunalfin",
                "terraincommunalfin_tab",
                "enfeufin",
                "enfeufin_tab",
            ),
        );
        //
        $links[] = array(
            "title" => __("fin_concession"),
            "href" => OM_ROUTE_TAB."&obj=concessionfin",
            "class" => "fin_concession",
            "right" => array(
                "concessionfin",
                "concessionfin_tab",
            ),
            "open" => array(
                "index.php|concessionfin[module=tab]",
                "index.php|concession[module=form][action=31]",
            ),
        );
        //
        $links[] = array(
            "title" => __("fin_colombarium"),
            "href" => OM_ROUTE_TAB."&obj=colombariumfin",
            "class" => "fin_colombarium",
            "right" => array(
                "colombariumfin",
                "colombariumfin_tab",
            ),
            "open" => array(
                "index.php|colombariumfin[module=tab]",
                "index.php|colombarium[module=form][action=31]",
            ),
        );
        //
        $links[] = array(
            "title" => __("fin_terrain_communal"),
            "href" => OM_ROUTE_TAB."&obj=terraincommunalfin",
            "class" => "fin_terrain_communal",
            "right" => array(
                "terraincommunalfin",
                "terraincommunalfin_tab",
            ),
            "open" => array(
                "index.php|terraincommunalfin[module=tab]",
                "index.php|terraincommunal[module=form][action=31]",
            ),
        );
        //
        $links[] = array(
            "title" => __("fin_enfeu"),
            "href" => OM_ROUTE_TAB."&obj=enfeufin",
            "class" => "fin_enfeu",
            "right" => array(
                "enfeufin",
                "enfeufin_tab",
            ),
            "open" => array(
                "index.php|enfeufin[module=tab]",
                "index.php|enfeu[module=form][action=31]",
            ),
        );
        //
        $rubrik['links'] = $links;
        //
        $menu["app-menu-rubrik-archive"] = $rubrik;
        // }}}
        //
        // PARAMETRAGE METIER
        //
        $links = array();
        //
        $links[] = array(
            "class" => "category",
            "title" => __("divers"),
            "right" => array(
                "entreprise",
                "entreprise_tab",
                "titre_de_civilite",
                "titre_de_civilite_tab",
                "travaux_nature",
                "travaux_nature_tab",
                "sepulture_type",
                "sepulture_type_tab",
                "zone_type",
                "zone_type_tab",
                "voie_type",
                "voie_type_tab",
            ),
        );
        //
        $links[] = array(
            "title" => "<hr/>",
            "right" => array(
                "entreprise",
                "entreprise_tab",
                "titre_de_civilite",
                "titre_de_civilite_tab",
                "travaux_nature",
                "travaux_nature_tab",
                "sepulture_type",
                "sepulture_type_tab",
                "zone_type",
                "zone_type_tab",
                "voie_type",
                "voie_type_tab",
            ),
        );
        //
        $links[] = array(
            "href" => OM_ROUTE_TAB."&obj=entreprise",
            "class" => "entreprise",
            "title" => __("entreprise"),
            "right" => array(
                "entreprise",
                "entreprise_tab",
            ),
            "open" => array(
                "index.php|entreprise[module=tab]",
                "index.php|entreprise[module=form]",
            ),
        );
        //
        $links[] = array(
            "href" => OM_ROUTE_TAB."&obj=titre_de_civilite",
            "class" => "titre-de-civilite",
            "title" => __("titre_de_civilite"),
            "right" => array(
                "titre_de_civilite",
                "titre_de_civilite_tab",
            ),
            "open" => array(
                "index.php|titre_de_civilite[module=tab]",
                "index.php|titre_de_civilite[module=form]",
            ),
        );
        //
        $links[] = array(
            "href" => OM_ROUTE_TAB."&obj=sepulture_type",
            "class" => "sepulture_type",
            "title" => __("sepulture_type"),
            "right" => array(
                "sepulture_type",
                "sepulture_type_tab",
            ),
            "open" => array(
                "index.php|sepulture_type[module=tab]",
                "index.php|sepulture_type[module=form]",
            ),
        );
        //
        $links[] = array(
            "href" => OM_ROUTE_TAB."&obj=travaux_nature",
            "class" => "travaux_nature",
            "title" => __("travaux_nature"),
            "right" => array(
                "travaux_nature",
                "travaux_nature_tab",
            ),
            "open" => array(
                "index.php|travaux_nature[module=tab]",
                "index.php|travaux_nature[module=form]",
            ),
        );
        //
        $links[] = array(
            "href" => OM_ROUTE_TAB."&obj=zone_type",
            "class" => "zone_type",
            "title" => __("zone_type"),
            "right" => array(
                "zone_type",
                "zone_type_tab",
            ),
            "open" => array(
                "index.php|zone_type[module=tab]",
                "index.php|zone_type[module=form]",
            ),
        );
        //
        $links[] = array(
            "href" => OM_ROUTE_TAB."&obj=voie_type",
            "class" => "voie_type",
            "title" => __("voie_type"),
            "right" => array(
                "voie_type",
                "voie_type_tab",
            ),
            "open" => array(
                "index.php|voie_type[module=tab]",
                "index.php|voie_type[module=form]",
            ),
        );
        //
        $links[] = array(
            "class" => "category",
            "title" => __("localisation"),
            "right" => array(
                "plans",
                "plans_tab",
                "cimetiere",
                "cimetiere_tab",
                "zone",
                "zone_tab",
                "voie",
                "voie_tab",
            ),
        );
        //
        $links[] = array(
            "title" => "<hr/>",
            "right" => array(
                "cimetiere",
                "cimetiere_tab",
                "zone",
                "zone_tab",
                "voie",
                "voie_tab",
            ),
        );
        //
        $links[] = array(
            "href" => OM_ROUTE_TAB."&obj=cimetiere",
            "class" => "cimetiere",
            "title" => __("cimetiere"),
            "right" => array(
                "cimetiere",
                "cimetiere_tab",
            ),
            "open" => array(
                "index.php|cimetiere[module=tab]",
                "index.php|cimetiere[module=form]",
                "index.php|cimetiere[module=map][mode=tab_sig]",
            ),
        );
        //
        $links[] = array(
            "href" => OM_ROUTE_TAB."&obj=zone",
            "class" => "zone",
            "title" => __("zone"),
            "right" => array(
                "zone",
                "zone_tab",
            ),
            "open" => array(
                "index.php|zone[module=tab]",
                "index.php|zone[module=form]",
                "index.php|zone[module=map][mode=tab_sig]",
            ),
        );
        //
        $links[] = array(
            "href" => OM_ROUTE_TAB."&obj=voie",
            "class" => "voie",
            "title" => __("voie"),
            "right" => array(
                "voie",
                "voie_tab",
            ),
            "open" => array(
                "index.php|voie[module=tab]",
                "index.php|voie[module=form]",
                "index.php|voie[module=map][mode=tab_sig]",
            ),
        );
        //
        $links[] = array(
            "title" => "<hr/>",
            "right" => array(
                "plans",
                "plans_tab",
            ),
            "parameters" => array("option_localisation" => "plan", ),
        );
        //
        $links[] = array(
            "href" => OM_ROUTE_TAB."&obj=plans",
            "class" => "plans",
            "title" => __("plans"),
            "right" => array(
                "plans",
                "plans_tab",
            ),
            "open" => array(
                "index.php|plans[module=tab]",
                "index.php|plans[module=form]",
            ),
            "parameters" => array("option_localisation" => "plan", ),
        );
        //
        $parent_menu["om-menu-rubrik-parametrage"]["links"] = array_merge(
            $links,
            $parent_menu["om-menu-rubrik-parametrage"]["links"]
        );
        //
        $this->config__menu = array_merge(
            $menu,
            $parent_menu
        );
    }
}
