<?php
session_start();
?>
<!DOCTIPE html>
<html>
    <head>
        <title>Error page</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
    </head>
    <body>
        <div class=" container my-5 p-4 col-md-5 col-sm-12 col-lg-5 bg-dark text-center text-white" style="height: 40%; border-radius: 15px">
            <h1>Error</h1>
            <p>
                <?php
                //zobrazení chybové zprávy
                if(isset($_SESSION['message']) AND !empty($_SESSION['message']))
                {
                    echo $_SESSION['message'];
                }
                else
                {
                    header("location: index.php");
                }
                
                ?>
            </p>
            <button class="btn btn-outline-secondary btn-lg"><a class="text-white" href="index.php">Home</a></button>
            <span style="display: block; margin-top: 60px ">iagriculture.cz</span>
        </div>
    </body>
</html>
