<?php
    session_start();
    include("func.php");


?>

<!DOCTYPE html>
<html lang="hu">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Munkamenet</title>
</head>
<body>
    <?php
        canSubmit();
        checkLogin();
        if (isLoggedin()) {
            echo "Sikeres bejelentkezés";

        } 
        else { ?>
            <h1>Bejelentkezés</h1>
            <form action="#" method="POST">
                Név: <input type="text" name="loginname"><br>
                Jelszó: <input type="password" name="pwd"><br>
                <button type="submit">Bejelentkezés</button>
            </form>
        <?php } ?>
</body>
</html>