public static function accesoEstricto(array $level, $noAdmin = false) { if (!Session::get('autenticado')) { header('location:' . BASE_URL . 'error/access/5050'); exit; } Session::tiempo(); if ($noAdmin == false) { if (Session::get('level') == 'admin') { return; } } if (count($level)) { if (in_array(Session::get('level'), $level)) { return; } } header('location:' . BASE_URL . 'error/access/5050'); }
public static function accesoEstricto(array $level, $noAdmin = false) { if (!Session::get('autenticado_cemcop')) { header('location:' . BASE_URL . 'error/access/5050'); exit; } Session::tiempo(); if ($noAdmin == false) { if (Session::get('level') == 'admin') { return; } } //Si existe el leve, va salir de la funcion y le va a permitir el acceso if (count($level)) { if (in_array(Session::get('level'), $level)) { return; } } header('location:' . BASE_URL . 'error/access/5050'); }
public static function accesoEstricto(array $level, $noAdmin = false) { // Comprobamos si existe una autentificacion if (!Session::get('autenticado')) { header('Location:' . BASE_URL . 'error/access/5050'); exit; } Session::tiempo(); // Verificamos el tiempo de la sesion. // Comprobamos si no se a enviado el 'admin' if ($noAdmin == false) { if (Session::get('level') == 'admin') { return; } } if (count($level)) { if (in_array(Session::get('level'), $level)) { return; } } header('Location:' . BASE_URL . 'error/access/5050'); }
public function acceso($key) { Session::tiempo(); if ($this->permiso($key)) { return; } header("location:" . BASE_URL . "error/access/5050"); }
public static function accForm($level) { if (!Session::get('Autenticado')) { header('Location: ' . BASE_URL . 'login/logForm'); exit; } Session::tiempo(); }