Esempio n. 1
0
 public static function setSession($key, $value)
 {
     try {
         Session::checkSessionTimeout();
     } catch (SessionTimeoutException $ste) {
         throw $ste;
     }
     $_SESSION[$key] = $value;
 }
Esempio n. 2
0
<?php

//$path = ROOT_PATH . '/assets/tests/employee_details.csv';
//$contents = file_get_contents($path);
//die(str_replace(PHP_EOL, '<br>', CSV::EscapeCSV($contents)));
//print_r(CSV::Parse($path));
if (\Utilities\Session::IsLoggedIn()) {
    $sessData = \Utilities\Session::Initialize();
    if ($sessData instanceof Models\SessionData) {
        if ($sessData->getUser()->isAdmin()) {
            header('location: ' . BASE_URL . 'admin/');
        } else {
            header('location: ' . BASE_URL . 'user/');
        }
    }
}
Esempio n. 3
0
<?php

if (!\Utilities\Session::IsLoggedIn()) {
    header('location: ' . \Utilities\System::GetBaseURL());
}