-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex2.php
executable file
·101 lines (89 loc) · 2.81 KB
/
index2.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<?php
/**
* @Package: ELFIC FRAMEWORK
* @subpackage CATMAN FUSM
* @Author: edison <edison [DOT] galindo [AT] gmail [DOT] com>
* @Date: Enero, 2011
* @File: index2.php
* @Version: 1.0
*/
define('APP_PATH', dirname(__FILE__) );
define( 'DS', '/' );
include ('includes'.DS.'elfic.ini.php');
include (APP_PATH.DS.'includes'.DS.'auth.inc.php'); //incluye control de autenticación
$msg = isset($_REQUEST['msg']) ? $_REQUEST['msg'] : ''; //mensajes retornados por url
$tpl = isset($_REQUEST['tpl']) ? $_REQUEST['tpl'] : null; //
$starting = isset($_REQUEST['starting']) ? $_REQUEST['starting'] : 0; //offset paginador de resultados
$smarty = new Elfic_Smarty();
$smarty->assign('title',APP_TITULO);
$smarty->display('html_top.tpl');
$smarty->assign('login',$login);
if($tpl != "clean")
{
$smarty->display('html_header.tpl');
$smarty->display('top_menu.tpl');
$smarty->assign('msg',$msg);
$smarty->display('containTop.tpl');
}
$_com = isset($_REQUEST['com']) ? $_REQUEST['com'] : 'home';
$pid = isset($_REQUEST['pid']);
switch($_com) {
case 'usuarios':
if(!$uperms['usuarios_r']){
Utils::cosRedirect('index2.php', MSG_NOPERM_COM);
} else {
require_once 'components'.DS.'usuarios'.DS.'usuarios.php';
}
break;
case 'evaluacion':
if(!$uperms['evaluacion_r']){
Utils::cosRedirect('index2.php', MSG_NOPERM_COM);
} else {
require_once 'components'.DS.'evaluacion'.DS.'evaluacion.php';
}
break;
case 'agenda':
if(!$uperms['agenda_r']){
Utils::cosRedirect('index2.php', MSG_NOPERM_COM);
} else {
require_once 'components'.DS.'agenda'.DS.'agenda.php';
}
break;
case 'asistencia':
if(!$uperms['asistencia_r']){
Utils::cosRedirect('index2.php', MSG_NOPERM_COM);
} else {
require_once 'components'.DS.'asistencia'.DS.'asistencia.php';
}
break;
case 'cursos':
if(!$uperms['cursos_r']){
Utils::cosRedirect('index2.php', MSG_NOPERM_COM);
} else {
require_once 'components'.DS.'cursos'.DS.'cursos.php';
}
break;
case 'reportes':
if(!$uperms['reportes']){
Utils::cosRedirect('index2.php', MSG_NOPERM_COM);
} else {
require_once 'components'.DS.'reportes'.DS.'reportes.php';
}
break;
case 'home':
doCpanel();
}
if($tpl != "clean") $smarty->display('containBottom.tpl');
function doCpanel(){
global $uid, $uperms;
$tpl = new Elfic_Smarty();
$tpl->assign('usuario', Elfic::getNombreUsuario($uid));
$tpl->assign('usuarios', $uperms['usuarios_r']);
$tpl->assign('agenda', $uperms['agenda_r']);
$tpl->assign('asistencia', $uperms['asistencia_r']);
$tpl->assign('cursos', $uperms['cursos_r']);
$tpl->assign('evaluacion', $uperms['evaluacion_r']);
$tpl->assign('reportes', $uperms['reportes']);
$tpl->display('featCpanel.tpl');
//$home = new Home();
}