<!DOCTYPE html>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm"
    crossorigin="anonymous">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/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.3/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script>
<html>

<head>
    <title>Login Page</title>
</head>

<body>
    <nav class="navbar navbar-dark bg-dark justify-content-between">
        <form action="/contact_admin">
            <button class="btn btn-outline-primary my-2 my-sm-0" type="submit">Contact Admin</button>
        </form>
        <form class="form-inline" action="/logout">
            <label style="color:white; padding-right: 10px">Hi {{session.get('username')}}!</label>
            <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Logout</button>
        </form>
    </nav>
    <div class="jumbotron">
        <center>
            <h1 class="display-4">Hostel Management</h1>
        </center>
    </div>
    {% if not_found == True %}
    <p>Sorry! Your Aren't there in Our Database</p>
    {% else %}
    <table class="table table-striped table-sm">
        {% for i in range(0,fields | length) %}
        <tr>
            <th scope="row">{{i+1}}</th>
            <td>{{fields[i]}}</td>
            <td>{{res[i]}}</td>
        </tr>
        {%endfor%}
        {% if warden_found %}
        <tr>
            <th scope="row">{{fields|length + 1}}</th>
            <td>Warden</td>
            <td>
                <table class="table">
                    {% for i in range(0,warden_list | length) %}
                    <tr>
                        <td>
                            {{warden_list[i][0]}}
                        </td>
                    </tr>
                    {%endfor%}
                </table>
            </td>
        </tr>
        {% endif %}
    </table>
    {% endif %}
</body>

</html>
