-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
55 lines (36 loc) · 1.3 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
<?php
//error_reporting(0);
require_once 'classes/SessionVars.class.php';
require_once 'classes/Portada.class.php';
require_once 'classes/MenuView.class.php';
require_once 'classes/ReportesCtrl.php';
require_once 'classes/DbConfig.class.php';
SessionVars::start();
DbConfig::setup();
if ($_GET['action'] == "detalles_parte_rechazado"){
ReportesController::getPdfParteRechazado($_GET['id_parte']);
}
if ( !(SessionVars::isUserLogged()) ) header("location: login.php?view=login");
$controller = new ReportesController();
$action = $_POST['action'];
if( !isset($action)) $action = $_GET['action'];
$view = $_GET['view'];
if ( isset($action)){
// cambiar el llamado, y hacerle un echo
echo $controller->requestAsyncAction($action);
} else {
$portada = new Portada();
$header = new MenuView();
$header->setDisplayOptions();
$portada->header = $header->getDisplay();
// si es admin, muestro la vista de administrador
if( SessionVars::getSeccion() == "Administrador" ){
$portada->content = $controller->getView("admin");
} else {
$portada->content = $controller->getView("reportesIndex");
}
$portada->footer = "";
$portada->setDisplayOptions();
echo $portada->getDisplay();
}
?>