<?php ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$IIIIIIIIIIl1 = new SQLite3('./a/.eggziedb.db');
$IIIIIIIIII1I = $IIIIIIIIIIl1->query('SELECT * ' . "
				" . '  FROM ibo ' . "
				" . '  WHERE id=\'' . $_GET['update'] . '\'');
$IIIIIIIIII1l = $IIIIIIIIII1I->fetchArray();
$id = $IIIIIIIIII1l['id'];
$mac_address = $IIIIIIIIII1l['mac_address'];
$expire_date = $IIIIIIIIII1l['expire_date'];
$username = $IIIIIIIIII1l['username'];
$password = $IIIIIIIIII1l['password'];
if (isset($_POST['submit'])) {
    $IIIIIII1lll1 = strtotime($_POST['expire_date']);
    $IIIIIII1ll1l = date('Y-m-d', $IIIIIII1lll1);
    $IIIIIII1ll11 = date('Y-m-d');
    $IIIIIII1l1II = date('h:m:s');
    $IIIIIII1l1Il = $IIIIIII1ll11 . 'T' . $IIIIIII1l1II . '.000000Z';
    $IIIIIII1l1l1 = date('yyyy-MM-dd\'T\'hh:mm:ss.SSSSSS\'Z\'');
    $IIIIIIIIIIl1->exec('UPDATE ibo SET mac_address=\'' . $_POST['mac_address'] . '\',' . "
								" . 'expire_date=\'' . $IIIIIII1ll1l . '\',' . "
								" . 'username=\'' . $_POST['username'] . '\',' . "
								" . 'url=\'' . $_POST['url'] . '\',' . "
								" . 'title=\'' . $_POST['title'] . '\',' . "
								" . 'password=\'' . $_POST['password'] . '\',' . "
								" . 'created_at=\'' . $IIIIIII1l1Il . '\'' . "
						" . '  WHERE ' . "
							" . '  id=\'' . $_POST['id'] . '\'');
    $IIIIIIIIIIl1->close();
    header('Location: users.php');
}
include 'includes/header.php';
$IIIIIII1l11I = $IIIIIIIIII1l['id'];
$IIIIIII1l11l = $IIIIIIIIII1l['mac_address'];
$IIIIIII1l111 = $IIIIIIIIII1l['expire_date'];
$IIIIIII11III = $IIIIIIIIII1l['username'];
$IIIIIII11IIl = $IIIIIIIIII1l['password'];
$IIIIIII11II1 = $IIIIIIIIII1l['url'];
$IIIIIII11IlI = $IIIIIIIIII1l['title'];
echo '        <div class="container-fluid">' . "
";
echo '          <h1 class="h3 mb-1 text-gray-800"> Update User</h1>' . "
";
echo '                <div class="card border-left-primary shadow h-100 card shadow mb-4">' . "
";
echo '                <div class="card-header py-3">' . "
";
echo '                <h6 class="m-0 font-weight-bold text-primary"><i class="fas fa-user"></i> Edit User</h6>' . "
";
echo '                </div>' . "
";
echo '                <div class="card-body">' . "
";
echo '                        <form method="post">          ' . "
";
echo '                        <div class="form-group ">' . "
";
echo '                                    <label class="control-label " for="mac_address">' . "
";
echo '                                        <strong>Mac Address</strong> ' . "
";
echo '                                    </label>' . "
";
echo '                                    <div class="input-group">' . "
";
echo '                                        <input type="form-control text-primary" name="id" value="' . $IIIIIII1l11I . '" type="hidden">' . "
";
echo '                                        <input class="form-control text-primary" id="description" name="mac_address" value="' . $IIIIIII1l11l . '" type="text"required/>' . "
";
echo '                                    </div>' . "
";
echo '                                </div>' . "
";
echo '                                <div class="form-group ">' . "
";
echo '                                    <label class="control-label " for="username">' . "
";
echo '                                        <strong>Username</strong>' . "
";
echo '                                    </label>' . "
";
echo '                                    <div class="input-group">' . "
";
echo '                                        <input type="text" class="form-control text-primary" name="username" value="' . $IIIIIII11III . '" id="discription" required/>' . "
";
echo '                                    </div>' . "
";
echo '                                </div>' . "
";
echo '                                <div class="form-group ">' . "
";
echo '                                    <label class="control-label " for="password">' . "
";
echo '                                        <strong>Password</strong>' . "
";
echo '                                    </label>' . "
";
echo '                                    <div class="input-group">' . "
";
echo '                                        <input type="text" class="form-control text-primary" name="password" value="' . $IIIIIII11IIl . '" id="discription" required/>' . "
";
echo '                                    </div>' . "
";
echo '                                </div>' . "
";
echo '                                <div class="form-group ">' . "
";
echo '                                    <label class="control-label " for="expire_date">' . "
";
echo '                                        <strong>Expiration</strong>' . "
";
echo '                                    </label>' . "
";
echo '                                    <div class="input-group">' . "
";
echo '                                        <input type="text" class="form-control text-primary" name="expire_date" value="' . $IIIIIII1l111 . '" id="datepicker" /> ' . "
";
echo '                                    </div>' . "
";
echo "
";
echo '                                </div>' . "
";
echo '                                <div class="form-group ">' . "
";
echo '                                    <label class="control-label " for="dns">' . "
";
echo '                                        <strong>DNS</strong>' . "
";
echo '                                    </label>' . "
";
echo '                                    <div class="input-group">' . "
";
echo '                                        <input type="text" class="form-control text-primary" name="url" value="' . $IIIIIII11II1 . '" id="discription" required/>' . "
";
echo '                                    </div>' . "
";
echo '                                </div>' . "
";
echo '                                <div class="form-group ">' . "
";
echo '                                    <label class="control-label " for="title">' . "
";
echo '                                        <strong>Server Name</strong>' . "
";
echo '                                    </label>' . "
";
echo '                                    <div class="input-group">' . "
";
echo '                                        <input type="text" class="form-control text-primary" name="title" value="' . $IIIIIII11IlI . '" id="discription" required/>' . "
";
echo '                                    </div>' . "
";
echo "
";
echo '                                </div>' . "
";
echo '                                <div class="form-group">' . "
";
echo '                                    <div>' . "
";
echo '                                        <button class="btn btn-success btn-icon-split" name="submit" type="submit">' . "
";
echo '                        <span class="icon text-white-50"><i class="fas fa-check"></i></span><span class="text">Submit</span>' . "
";
echo '                        </button>' . "
";
echo '                                    </div>' . "
";
echo "
";
echo '                                </div>' . "
";
echo '                            </form>' . "
";
echo '                        </div>' . "
";
echo '                    </div>' . "
";
echo '                </div>' . "
";
include 'includes/footer.php';
echo '</body>' . "
";
echo "
";
echo '</html>';