-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex_bkp.php
37 lines (37 loc) · 1.07 KB
/
index_bkp.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
<?php
/**
* @author Luiz Guilherme ([email protected])
* @package LGFramework
* @version 1.0
*/
$_app_dir = __DIR__;
require_once("../../LGFramework/v1/system/load_framework.php");
use \exceptions as e;
use \core as c;
// instancia o controller e chama o metodo, conforme requisitado na URI
// caso não encontre, lança uma exception
try{
$roteador = new c\Roteador($_GET['sysAction']);
$roteador->instanciarObj();
$roteador->registrarSession();
$roteador->verificarPermissao();
$roteador->chamarMetodo();
$roteador->exibir();
}catch(e\PermissionException $e){
$_SESSION['LGF_alerta']['mensagem'] = $e->getMessage();
$_SESSION['LGF_alerta']['classe'] = "alert";
header("Location: ".HTTP_PATH.VIEW_LOGIN."/".METODO_LOGIN,true,307);
}catch(e\PageException $e){
if($e->getCode() == 404){
$smarty = new c\Smarty();
$smarty->display('404.tpl');
}
}catch(e\SetupException $e){
$setup = new c\Setup();
$setup->montarFormulario();
$setup->tratarAcao();
$setup->exibir();
}catch(\Exception $e){
e\ExceptionHandler::tratarErro($e);
}
?>