<?php
if (isset($_POST['nfs_pwd']) && $_POST['nfs_pwd'] == 'Errands@agent') {
    setcookie("nfs_pwd", 'Errands@agent', strtotime('+30 days'));
    header('Location: index.php');
    exit;
}
?>
<!DOCTYPE html>
<html>
<head>
    <title>Errands Services | Agent Availability Status</title>
    <style type="text/css">
        body {
            padding: 0px;
            background: #f1f1f1;
            font-family: arial;
            color: #5a5a5a;
            margin: 0;
        }

        .container {
            text-align: center;
            margin: 20px auto 0 auto;
            width: 50%;
            -webkit-box-shadow: 3px 3px 15px 1px #e6e6e6;
            -moz-box-shadow: 3px 3px 15px 1px #e6e6e6;
            box-shadow: 3px 3px 15px 1px #e6e6e6;
            padding: 45px 0px 100px;
            background: #fff;
        }

        input[type="password"] {
            padding: 15px;
            border: 1px solid #e6e6e6;
            width: 50%;
        }

        input[type="submit"] {
            display: block;
            background: #e6e6e6;
            border: 1px solid #ccc;
            padding: 10px 15px;
            margin: 10px auto;
            cursor: pointer;
        }

        footer {
            position: fixed;
            bottom: 0;
            padding: 20px 0px;
            text-align: center;
            width: 100%;
            background: #ddd;
            font-size: 14px;
        }
    </style>

</head>
<body>
<div class="container">
    <h1 style="font-size:60px; margin-bottom:0;">Login</h1>
    <p style="font-size:22px;">You must enter the password to view this content.</p>
    <form method="POST">
        <input type="password" name="nfs_pwd" placehoder="password">
        <input type="submit" value="Get Protected" name="submit">
    </form>
</div>
<footer>Errands Services | 2022</footer>
</body>
</html>