<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
session_start();
include_once ($_SERVER['DOCUMENT_ROOT'] . '/_config/functions.php');
spl_autoload_register('my_autoload');

include($_SERVER['DOCUMENT_ROOT'] . HOME_DIR . '/Auth/chk.auth.php');

$linkNew                            = '<a href="' . HOME_DIR_HTML . '/users/create.php">' .
                                        '<button type="button" class="btn btn-secondary">Neuer Benutzer <i class="fa fa-plus" aria-hidden="true"></i></button>' .
                                      '</a>';
if ($_GET['status']                 == 0) {
  $showStatus                       = 'aktiv';
  $showPanel                        = 'panel panel-success';
} else {
  $showStatus                       = 'inaktiv';
  $showPanel                        = 'panel panel-danger';
}

$headline                           = '<h3>Benutzer - ' . $showStatus . '</h3>';

if (isset($_GET['status'])) {
  $status                           = $_GET['status'];
} else {
  $status                           = 0;
}

$user                               = new user();
$rows                               = $user->getUserData($status);

include($_SERVER['DOCUMENT_ROOT'] . HOME_DIR . TEMPLATE_DIR . '/users/show.php');

