Esempio n. 1
0
<?php

include '../../../Conf/Include.php';
set_dependencies(array("AdminController"));
Session::InitSession();
//INICIA SESION
$header = new Http\Header();
//INSTANCIA EL HEADER
if (Session::ExistSession("login")) {
    //VERIFICA SI EXISTE LA SESION LOGIN
    $id_log = Session::GetSession("log");
    //OBTIENE EL LOG DE LOGUEO
    $hora_salida = FunctionsController::get_time();
    //OBTIENE LA HORA DE SALIDA
    $admin = new AdminController();
    //INSTANCIA EL CONTROLADOR DEL ADMIN
    $admin->Update_log($id_log, $hora_salida);
    //ACTUALIZA EL LOG O BITACORA
    if (!Session::ExistSession("DUPLICATE_SESSION")) {
        //VERIFICA SI ES SESION DUPLICADA
        $admin->UpdateSession($_SESSION['login']["id_log"], 0);
        //EN DADO CASO NO SEA ENTONCES RESTABLECE LA ACTIVIDAD A CERO
    }
    Session::DestroySession("", true);
    //LIBERA TODAS LAS VARIABLES DE SESION ...
    $header->redirect(FunctionsController::GetUrl("login.php"));
    //REDIRECT
} else {
    $header->redirect(FunctionsController::GetUrl("login.php"));
    //REDIRECT
}
Esempio n. 2
0
<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->

<?php 
include '../../../Conf/Include.php';
$http = new Http\Header();
Session::InitSession();
if (Session::ExistSession("login")) {
    $http->redirect("user/");
}
?>

<html lang="en">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<meta charset="utf-8"/>
<title>Lieisoft Logueate !!</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<meta content="" name="description"/>
<meta content="" name="author"/>
<!-- BEGIN GLOBAL MANDATORY STYLES -->
<link href="http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700&subset=all" rel="stylesheet" type="text/css"/>
<link href="../../assets/global/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
<link href="../../assets/global/plugins/simple-line-icons/simple-line-icons.min.css" rel="stylesheet" type="text/css"/>
<link href="../../assets/global/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
<link href="../../assets/global/plugins/uniform/css/uniform.default.css" rel="stylesheet" type="text/css"/>
Esempio n. 3
0
<?php

include '../../../Conf/Include.php';
set_dependencies(array("AdminController"));
//INICIA UNA NUEVA SESION...CLASE DEL CORE Tools/Session
Session::InitSession();
Session::InsertSession("page_name", "Principal");
//EN EL INDEX DESTRUYE TODO TIPO DE SESION DENTRO DE LOS TITULOS...
if (Session::ExistSession("title")) {
    Session::DestroySession("title");
    if (Session::ExistSession("home")) {
        Session::DestroySession("home");
    }
}
//CARGARA LOS SCRIPTS NECESARIOS EN EL HEADER
$header = "";
//CARGARA EL BODY
$body = "<?php include 'view_logout.php' ?>";
//CARGARA EL FOOTER O LOS SCRIPTS JS
$footer = "<script src='session.js'></script>";
//CUIDADO SOLO CARGA LOS INITS DE JS ejemplo Load();
$end_footer = "exit_session();";
//PREPARANDO LA VISTA ...
ViewClass::PrepareView("View.phtml", "Admin");
//LLAMANDO LA VISTA
ViewClass::SetView(ViewClass::SetParamsString($body, $header, $end_footer, $footer));
Esempio n. 4
0
<?php

/**
 * ESTE FRAGMENTO DE CODIGO LO QUE HACE ES REDIRECCIONAR SI EXISTE 
 * EL TOKEN DE BOX , ESTO QUIERE DECIR QUE SE HA LOGADO ANTES A UNA CUENTA
 */
if (Session::ExistSession("box")) {
    echo "<script> " . " window.location.href='includes/box.php?init=0&box=" . Session::GetSession("box") . "';" . "</script>";
} elseif (file_exists("includes/token.box")) {
    echo "<script> " . " window.location.href='includes/box.php?init=0';" . "</script>";
}
?>
<div class="portlet box purple">
    
				<div class="portlet-title">
							<div class="caption">
                                                                 Security Box
							</div>
							
						</div>
						<div class="portlet-body form">
							<form role="form" class="form-horizontal">
								<div align="center" class="form-body">
                                                                    <H2><b>¿TIENES CUENTA DE BOX?</b></H2>
									<div class="form-group">

										<div align="center" class="col-md-12">
                                                                                    <a href="includes/box.php?init=0" class="btn btn-primary">SI</a>
                                                                                    <a href="dashboard_add_task.php?security=1&box=0" class="btn green">NO</a>
										</div>
									</div>