forked from Carlos007007/INVENTARIO
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
38 lines (30 loc) · 1.03 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php require "./inc/session_start.php"; ?>
<!DOCTYPE html>
<html>
<head>
<?php include "./inc/head.php"; ?>
</head>
<body>
<?php
if(!isset($_GET['vista']) || $_GET['vista']==""){
$_GET['vista']="login";
}
if(is_file("./vistas/".$_GET['vista'].".php") && $_GET['vista']!="login" && $_GET['vista']!="404"){
/*== Cerrar sesion ==*/
if((!isset($_SESSION['id']) || $_SESSION['id']=="") || (!isset($_SESSION['usuario']) || $_SESSION['usuario']=="")){
include "./vistas/logout.php";
exit();
}
include "./inc/navbar.php";
include "./vistas/".$_GET['vista'].".php";
include "./inc/script.php";
}else{
if($_GET['vista']=="login"){
include "./vistas/login.php";
}else{
include "./vistas/404.php";
}
}
?>
</body>
</html>