示例#1
0
文件: clMenu.php 项目: jeromecc/tuv2
 function genMenu()
 {
     global $options;
     global $session;
     $auth = new clAuthentification();
     $this->menuAuth = $auth->getFormulaire();
     //$menu = "<center>\n" ;
     $menu = "";
     $param['cw'] = "WHERE type='menu' AND etat=1 AND idapplication=" . IDAPPLICATION . " ORDER BY rang";
     $req = new clResultQuery();
     $res = $req->Execute("Fichier", "getMenus", $param, "ResultQuery");
     for ($i = 0; isset($res['idmenu'][$i]); $i++) {
         $faux = 0;
         if ($res['noption'][$i]) {
             if ($options->getOption($res['noption'][$i]) != $res['valeur'][$i]) {
                 /*eko ( "Option fausse" ) ;*/
                 $faux = 1;
             }
         }
         if (!$session->getDroit($res['droit'][$i], "r")) {
             $faux = 1;
         }
         if ($res['libelle'][$i] == "Accueil") {
             $faux = 0;
         }
         if (!$faux) {
             $menu .= $this->genItem($res['libelle'][$i], $res['cle'][$i], $res['idunique'][$i]);
         }
     }
     //$menu .= "\t</center>\n" ;
     // On renvoie le menu ainsi construit.
     return $menu;
 }
示例#2
0
 function setUser()
 {
     global $superAdmin;
     // On appelle la classe authentification qui se charge d'afficher les informations de connexion.
     if ($this->navifull) {
         $init = $this->navifull;
     } else {
         $init = "Accueil";
     }
     $user = new clAuthentification($init);
     $this->user = $user->getInformations();
     $superAdmin = isset($this->user['superadmin']) ? $this->user['superadmin'] : '';
 }