forked from Carlos007007/VENTAS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
61 lines (50 loc) · 1.53 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php
require_once "./config/app.php";
require_once "./autoload.php";
/*---------- Iniciando sesion ----------*/
require_once "./app/views/inc/session_start.php";
if(isset($_GET['views'])){
$url=explode("/", $_GET['views']);
}else{
$url=["login"];
}
?>
<!DOCTYPE html>
<html lang="es">
<head>
<?php require_once "./app/views/inc/head.php"; ?>
</head>
<body>
<?php
use app\controllers\viewsController;
use app\controllers\loginController;
$insLogin = new loginController();
$viewsController= new viewsController();
$vista=$viewsController->obtenerVistasControlador($url[0]);
if($vista=="login" || $vista=="404"){
require_once "./app/views/content/".$vista."-view.php";
}else{
?>
<main class="page-container">
<?php
# Cerrar sesion #
if((!isset($_SESSION['id']) || $_SESSION['id']=="") || (!isset($_SESSION['usuario']) || $_SESSION['usuario']=="")){
$insLogin->cerrarSesionControlador();
exit();
}
require_once "./app/views/inc/navlateral.php";
?>
<section class="full-width pageContent scroll" id="pageContent">
<?php
require_once "./app/views/inc/navbar.php";
require_once $vista;
require_once "./app/views/inc/footer.php";
?>
</section>
</main>
<?php
}
require_once "./app/views/inc/script.php";
?>
</body>
</html>