<?php ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$IIIIIII1Il11 = 10;
if (isset($_GET['view'])) {
    $IIIIIII1I1II = $_GET['view'];
} else {
    $IIIIIII1I1II = 1;
}
$IIIIIII1I1Il = ($IIIIIII1I1II - 1) * $IIIIIII1Il11;
$IIIIIIIl11ll = new SQLite3('a/.eggziedb.db');
$IIIIIII1I1lI = $IIIIIIIl11ll->query('SELECT COUNT(id) AS total FROM ibo');
$IIIIIII1I1ll = $IIIIIII1I1lI->fetchArray();
$IIIIIII1I1l1 = $IIIIIII1I1ll['total'];
$IIIIIII1I11I = ceil($IIIIIII1I1ll['total'] / $IIIIIII1Il11);
$IIIIIII1IlII = $IIIIIIIl11ll->query('SELECT * FROM ibo ORDER by id ASC LIMIT ' . $IIIIIII1I1Il . ', ' . $IIIIIII1Il11);
if (isset($_GET['delete'])) {
    $IIIIIIIl11ll->exec('DELETE FROM ibo WHERE id=' . $_GET['delete']);
    header('Location: users.php');
}
include 'includes/header.php';
echo "
";
echo "	
";
echo '<div class="modal fade" id="confirm-delete" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">' . "
";
echo '    <div class="modal-dialog">' . "
";
echo '        <div class="modal-content">' . "
";
echo '            <div class="modal-header">' . "
";
echo '                <h2>Confirm</h2>' . "
";
echo '            </div>' . "
";
echo '            <div class="modal-body">' . "
";
echo '                Do you really want to delete this User?' . "
";
echo '            </div>' . "
";
echo '            <div class="modal-footer">' . "
";
echo '                <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>' . "
";
echo '                <a class="btn btn-danger btn-ok">Delete</a>' . "
";
echo '            </div>' . "
";
echo '        </div>' . "
";
echo '    </div>' . "
";
echo '</div>' . "
";
echo '<main role="main" class="col-15 pt-4 px-5"><div class="row justify-text-center"><div class="chartjs-size-monitor" style="position:absolute ; left: 0px; top: 0px; right: 0px; bottom: 0px; overflow: hidden; pointer-events: none; visibility: hidden; z-index: -1;"><div class="chartjs-size-monitor-expand" style="position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1;"><div style="position:absolute;width:1000000px;height:1000000px;left:0;top:0"></div></div><div class="chartjs-size-monitor-shrink" style="position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1;"><div style="position:absolute;width:200%;height:200%;left:0; top:0"></div></div></div>' . "
";
echo '          <div id="main">' . "
";
echo '          <h1 class=" h3 mb-1 text-gray-800"> Users</h1>' . "
";
echo '                        <a button class="btn btn-primary btn-icon-split" id="button" href="./users_create.php">' . "
";
echo '                        <span class="icon text-white-50"><i class="fas fa-check"></i></span><span class="text">Create</span>' . "
";
echo '                        </button></a>' . "
";
echo '          </div>' . "
";
echo "		" . '<div class="table-responsive">' . "
";
echo "			" . '<table class="table table-striped table-sm">' . "
";
echo "			" . '<thead class= "text-primary">' . "
";
echo "				" . '<tr>' . "
";
echo "
";
echo '                  <th>Title</th>' . "
";
echo "				" . '  <th>Mac Address</th>' . "
";
echo '                  <th>Username</th>' . "
";
echo '                  <th>Expire Date</th>' . "
";
echo '                  <th>DNS</th>' . "
";
echo "				" . '  <th>Edit</th>' . "
";
echo "				" . '  <th>Delete</th>';
echo "				" . '</tr>' . "
";
echo "			" . '</thead>' . "
";
while ($IIIIIII1IlIl = $IIIIIII1IlII->fetchArray()) {
    $IIIIIII1lI11 = $IIIIIII1IlIl['id'];
    $IIIIIII1llII = $IIIIIII1IlIl['mac_address'];
    $IIIIIII1llIl = $IIIIIII1IlIl['username'];
    $IIIIIII1llI1 = $IIIIIII1IlIl['expire_date'];
    $IIIIIII1lllI = $IIIIIII1IlIl['url'];
    $IIIIIII1llll = $IIIIIII1IlIl['title'];
    echo '<tbody>' . "
";
    echo '                  <td>' . $IIIIIII1llll . '</td>' . "
";
    echo '                  <td>' . $IIIIIII1llII . '</td>' . "
";
    echo '                  <td>' . $IIIIIII1llIl . '</td>' . "
";
    echo '                  <td>' . $IIIIIII1llI1 . '</td>' . "
";
    echo '                  <td>' . $IIIIIII1lllI . '</td>' . "
";
    echo '                  <td><a class="btn btn-icon" href="./users_update.php?update=' . $IIIIIII1lI11 . '"><span class="icon text-white-50"><i class="fa fa-pencil" style="font-size:24px;color:blue"></i></span></a></td>' . "
";
    echo '                  <td><a class="btn btn-icon" href="#" data-href="./users.php?delete=' . $IIIIIII1lI11 . '" data-toggle="modal" data-target="#confirm-delete"><span class="icon text-white-50"><i class="fa fa-trash" style="font-size:24px;color:red"></i></span></a></td>' . "
";
    echo "				" . '</tr>' . "
";
    echo "			" . '</tbody>';
}
echo "			" . '</table>' . "
";
echo "		" . '</div>' . "
";
if ($IIIIIII1Il11 < $IIIIIII1I1l1) {
    for ($IIIIIII1lII1 = 1;$IIIIIII1lII1 <= $IIIIIII1I11I;$IIIIIII1lII1++) {
        echo '<a class="btn btn-icon" href=\'users.php?view=' . $IIIIIII1lII1 . '\'';
        if ($IIIIIII1lII1 == $IIIIIII1I1II) {
            echo ' class="active"';
        }
        echo '>Page ' . $IIIIIII1lII1 . '</a> ';
    }
}
echo '</main>' . "
";
echo "
";
echo '    <br><br><br>';
include 'includes/footer.php';
require 'includes/egz.php';
echo '</body>' . "
";