示例#1
0
 function __construct($id_menu = NULL, $lang = NULL)
 {
     $this->session = NEnvironment::getSession('Menu');
     $this->pageModel = PageModel::init();
     if ($id_menu == NULL) {
         if (isset($_GET["id_menu"])) {
             $this->session['id_menu'] = $_GET["id_menu"];
         }
         if (!isset($this->session['id_menu'])) {
             $this->session['id_menu'] = NEnvironment::getVariable('ADMIN_DEFAULT_IDMENU');
         }
         $this->id_menu = $this->session['id_menu'];
     } else {
         $this->id_menu = $id_menu;
     }
     if (@$lang == NULL) {
         if (!isset(NEnvironment::getSession('Page')->lang)) {
             $this->lang = NEnvironment::getVariable('ADMIN_DEFAULT_LANG');
         }
         $this->lang = NEnvironment::getSession('Page')->lang;
     } else {
         $this->lang = $lang;
     }
     $this->var = NEnvironment::getConfig('ADMINMENU');
 }