-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
62 lines (52 loc) · 1.84 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
62
<?php session_start();
/***
**** @archivo : index.php
**** @desc : Archivo de carga del Site y <dispatcher> de las demas clases
**** @project : CitasWeb
**** @version : 0.1;
**** @author : R&R;
**** @date : Viernes, 08 de agosto 2009;
**** @license : Copyright BlackPrince Enterprise. Todos los derechos reservados;
***/
/* <!---Includes--- */
require_once('siteConfig.php');
require_once('arbolServicio.php');
require_once('class/dbConector.php');
require_once('class/templateLoader.php');
require_once('class/screenEngine.php');
require_once('class/eventListener.php');
require_once('class/navigatorWeb.php');
/* ---Includes---> */
$objNavegador = new navigatorWeb;
$objDb = new dbConector($siteConfig);
$objTemplate = new templateLoader();
$objScreen = new screenEngine();
$objListener = new eventListener();
$objNavegador->nodoActual = $arbol['index']['auto'];
if ($_POST) {
$getArray = array();
$resultBR[] = array();
foreach ($_POST as $key => $value)
$getArray[$key] = $value;
$resultBR = $objListener->rulesExec($siteConfig, $objDb,'rules_btnIniciar', $getArray);
$_SESSION['codigousuario'] = $resultBR['codigousuario'];
$_SESSION['tipousuario'] = $resultBR['tipousuario'];
if($resultBR["success"]) {
$resultBR["xy"] = $resultBR["xy"]."1";
if($resultBR["tipousuario"] =='F' )
$resultBR["xy"] = $resultBR["xy"]."10";
if((($resultBR["tipousuario"] =='P') || ($resultBR["tipousuario"] =='D')) || ($resultBR["tipousuario"] =='A'))
$resultBR["xy"] = $resultBR["xy"]."01";
}
else {
$resultBR['xy'] = '';
$resultBR['xy'] = $resultBR['xy']."000";
}
$objNavegador->ruteador($arbol, $resultBR['xy']);
echo json_encode($resultBR);
}
else {
$hTemplate = $objTemplate->getTemplate($siteEvent, $objNavegador);
$objScreen->renderScreen($siteConfig,$hTemplate);
}
?>