Ejemplo n.º 1
0
<?php

require '../../../../classes/AutoLoad.php';
$params['alias'] = Request::req('alias');
$params['password'] = sha1(Request::req('password'));
$db = new Database();
$manager = new ManagerUser($db);
$user = $manager->login($params);
if (!$user) {
    header('Location:../../login.php');
    exit;
} else {
    $session = new Session();
    $session->set('_user', $user);
    header('Location:../');
    exit;
}
Ejemplo n.º 2
0
 private static function locklock()
 {
     $params['alias'] = Request::req('alias');
     $params['password'] = sha1(Request::req('password'));
     $db = new Database();
     $manager = new ManagerUser($db);
     $user = $manager->login($params);
     if (!$user) {
         return self::loginview();
     } else {
         return self::panelview();
     }
 }