$session_life) { $_SESSION = array(); session_destroy(); $pag = $_SERVER['SERVER_NAME']."/salir.php?expired=1"; header("Location: http://".$pag); exit(); } }else{ $_SESSION = array(); session_destroy(); $pag = $_SERVER['SERVER_NAME']."/salir.php?expired=1"; header("Location: http://".$pag); exit(); } $_SESSION["timeout"] = time(); //--- Valida que el usuaro tenga permisos de superadministrador if(!$_SESSION["sgi_administrador"]){ header("Location: main.php"); exit(); } if(!isset($_GET['sist']) || $_GET['sist'] ==""){ header("Location: sistemas.php"); exit(); } $sist = filter_input(INPUT_GET, "sist", FILTER_SANITIZE_NUMBER_INT);//limpia texto /*if(!isset($_POST['sist']) || $_POST['sist'] ==""){ header("Location: sistemas.php"); exit(); } $sist = filter_input(INPUT_POST, "sist", FILTER_SANITIZE_NUMBER_INT);//limpia texto*/ //recibe ID sistema ?> .: Facultad de Ingeniería :.
printMenu(); //Obtiene submenus y menus $stmt = $pdo->prepare('Select * from fs_submenu(NULL, :sist)');//para pintar listado $stmt->bindParam(":sist", $sist); if(!$stmt->execute()){ $errorDesc = "Ocurrió un error al cargar los datos de los submenús"; }else $submenu_rs = $stmt->fetchAll(); $stmt->closeCursor(); $stmt = $pdo->prepare('Select * from fs_menu(NULL, true, :sist)');//para crear nuevos $stmt->bindParam(":sist", $sist); if(!$stmt->execute()){ $errorDesc = "Ocurrió un error al cargar los datos de los menús"; }else $menu_rs = $stmt->fetchAll(); $stmt->closeCursor(); $stmt = null; //--Manejo de errores y mensajes de exito if(isset($_GET["error"]) && is_numeric($_GET["error"])){ switch ($_GET["error"]){ case 0: $errorDesc = "No se reciberon los datos del submenú."; break; case 1: $errorDesc = "Ocurrió un error al insertar los datos del submenú."; break; case 2: $errorDesc = "Ocurrió un error al actualizar los datos del submenú."; break; case 3: $errorDesc = "No tienes permisos para realizar esa acción."; break; } } if(isset($_GET["ok"]) && is_numeric($_GET["ok"])){ switch ($_GET["ok"]){ case 0: $successDesc = "El submenú se guardó correctamente."; break; case 1: $successDesc = "El submenú se actualizó correctamente."; break; } } ?>
" id="id">
Menú Activo ID Nombre Página Acciones
fa-fw"> ".$ICO["aceptar"].""; else echo "".$ICO["menos"].""; ?>

Regresar