autoload("constants"); $auth = Autentifikace::singleton(); $action = LOGIN; if (isset($_POST['action'])) $action = $_POST['action']; elseif (isset($_GET['action'])) $action = $_GET['action']; if ($action == LOGIN_AUTENT) { if (isset($_POST['login'])) $username = $_POST['login']; else $username = ''; if (isset($_POST['heslo'])) $password = $_POST['heslo']; else $password = ''; $user_id = $auth->isValidUser($username, $password); $action = MENU; } if (!$auth->isValidSession()) $action = LOGIN; if ($auth->printMenu()) { } else { echo "(o:o)"; } ?>
Přihlásit