$_SESSION['id_rol'] = 1; $script = $_SERVER['SCRIPT_NAME']; if (strpos($script, '/') !== FALSE) { $script = preg_replace('/\\.php$/', '', array_pop(explode('/', $script))); } if ($script == 'permiso') { $script = 'rol'; } if ($script == 'submenu') { $script = 'menu'; } $submenu = new SubMenu(); $m = $submenu->findMenu($script); $id_submenu = $m[0]['id']; $permiso = new Permiso(); $per = $permiso->getPermisosSub($_SESSION['id_rol'], $id_submenu); $parametros = new Parametro(); $par = $parametros->find(1); $title = $par[0]['nom']; $_SESSION['id_ciu'] = $par[0]['id_ciu']; $_SESSION['id_dep'] = $par[0]['id_dep']; $_SESSION['show'] = $par[0]['ver']; function head_html() { echo "<meta charset='utf-8'>\n\t<title>.: " . $GLOBALS['title'] . " :.</title>\n\t<script type='text/javascript' src='js/prototype.js'></script>\n\t<script type='text/javascript' src='js/scriptaculous.js'></script>\n\t<script type='text/javascript' src='js/AjaxLib.js'></script>\n\t<script type='text/javascript' src='js/jquery.min.js'></script>\n\t<script type='text/javascript' src='js/jquery.scrollbar.js'></script>\n\t<script type='text/javascript' src='js/materialize.js'></script>\n\t<script type='text/javascript' src='js/init.js'></script>\n\t<link rel='stylesheet' type='text/css' href='css/jquery.scrollbar.css'>\n\t<link rel='stylesheet' type='text/css' href='css/materialize.css'>\n\t<link rel='stylesheet' type='text/css' href='css/style.css'>\n\t<link rel='shortcut icon' href='img/favicon.png'>"; } function nav_html() { $permiso = new Permiso(); $menu = new Menu(); $submenu = new SubMenu();