Exemplo n.º 1
0
<?php

session_start();
if (!$_SESSION['usergroup'] == "admin") {
    header('Location: ../noauth.html');
}
?>
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
    <?php 
require_once '../src/DAL.php';
$d = new DAL();
$users = $d->query_for_all_users();
?>
    <h2 class="sub-header">Users</h2>
    <div class="table-responsive">
        <table class="table table-striped">
            <thead>
            <tr>
                <th>Email</th>
                <th>Name</th>
                <th>User Group</th>
                <th>Create Time</th>
                <th>Last Login</th>
                <th></th>
            </tr>
            </thead>
            <tbody>

            <?php 
foreach ($users as $user) {
    if ($user->usergroup == "admin") {