case -3:
        //inactive
    //inactive
    case -4:
        //due
        G::SendMessageXml('ID_USER_INACTIVE', 'warning');
        break;
}
if ($res < 0) {
    header('location: login.html');
    die;
}
$uid = $res;
$_SESSION['USER_LOGGED'] = $uid;
$res = $RBAC->userCanAccess('RBAC_LOGIN');
if ($res != 1) {
    G::SendMessageXml('ID_USER_HAVENT_RIGHTS_PAGE', 'error');
    header('location: login.html');
    die;
}
$_SESSION['USER_NAME'] = $usr;
$file = PATH_RBAC . PATH_SEP . 'class.authentication.php';
require_once $file;
$obj = new authenticationSource();
$obj->SetTo($dbc);
$res = $obj->verifyStructures();
if ($RBAC->userCanAccess("RBAC_READONLY") == 1) {
    header('location: ../rbac/userList');
} else {
    header('location: ../rbac/appList');
}