public static function seLogado() { if (!$_SESSION['usuarioLogado']) { $controllerUsuario = new controllerUsuario(); $controllerUsuario->login(); die; } }
<?php session_start(); error_reporting(E_ALL); ini_set("display_errors", 1); /********************RUTEADOR DE REQUERIMIENTOS*********************************/ if (array_key_exists('action', $_REQUEST) and $_REQUEST['action'] == 'login') { include_once "./Controller/controllerUsuario.php"; $log = new controllerUsuario(); $log->login(); } else { if (array_key_exists('action', $_REQUEST) and $_REQUEST['action'] == 'registrarse') { include_once "./Controller/controllerUsuario.php"; $registrarse = new controllerUsuario(); $registrarse->registrarse(); } else { if (array_key_exists('action', $_REQUEST) and $_REQUEST['action'] == 'base') { include_once "./Model/modelRegistro.php"; $aux = new modelRegistro(); $patente = $_POST['consultaViaPatente']; var_dump($aux->transportistasVehiculo($patente)); } else { if ((array_key_exists('action', $_REQUEST) and $_REQUEST['action'] == 'home') && isset($_SESSION['sesionUsuario'])) { include_once "./Controller/controllerHome.php"; $home = new controllerHome(); $home->visualizar(); } else { if (array_key_exists('action', $_REQUEST) and $_REQUEST['action'] == 'consultaViaPatente') { include_once "./Controller/controllerRegistro.php"; $registro = new controllerRegistro(); $registro->consultaViaPatente();