<?php $IIIIIIIIIIl1 = new SQLite3('./a/.eggziepanels.db');
$IIIIIIIIII1I = $IIIIIIIIIIl1->query('SELECT * ' . "
				" . '  FROM USERS ' . "
				" . '  WHERE id=\'1\'');
$IIIIIIIIII1l = $IIIIIIIIII1I->fetchArray();
if (isset($_POST['submit'])) {
    $IIIIIIIIl1ll = 'Profile Updated!';
    $IIIIIIIIIIl1->exec('UPDATE USERS ' . "
			" . 'SET' . "	" . 'NAME=\'' . $_POST['name'] . '\',' . "
			" . '    USERNAME=\'' . $_POST['username'] . '\', ' . "
				" . 'PASSWORD=\'' . $_POST['password'] . '\',' . "
				" . 'LOGO=\'' . $_POST['logo'] . '\'' . "
			" . 'WHERE ' . "
				" . 'id=\'1\'');
    header('Location: profile.php');
}
$name = $IIIIIIIIII1l['NAME'];
$IIIIIII1IIIl = $IIIIIIIIII1l['USERNAME'];
$IIIIIII1III1 = $IIIIIIIIII1l['PASSWORD'];
$logo = $IIIIIIIIII1l['LOGO'];
include 'includes/header.php';
echo ' <!-- Begin Page Content -->' . "
";
echo '        <div class="container-fluid">' . "
";
echo "
";
echo '          <h1 class="h3 mb-1 text-gray-800">Update Login</h1>' . "
";
echo '         ' . "
";
echo '          <!-- Content Row -->' . "
";
echo '          <div class="row">' . "
";
echo "
";
echo '            <!-- First Column -->' . "
";
echo '            <div class="col-lg-12">' . "
";
echo "
";
echo '              <!-- Custom codes -->' . "
";
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="fa fa-user"></i> Update Profile</h6>' . "
";
echo '                </div>' . "
";
echo '                <div class="card-body">' . "
";
echo '                            <form method="post">' . "
";
echo '                            <div class="form-group ">' . "
";
echo '                            <label class="control-label " for="name">' . "
";
echo '                            <strong>Name</strong>' . "
";
echo '                            </label>' . "
";
echo '                            <div class="input-group">' . "
";
echo '                            <input type="text" class="form-control text-primary" name="name" value="' . $name . '" placeholder="Enter Name">' . "
";
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="' . $IIIIIII1IIIl . '" placeholder="Enter Username">' . "
";
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="password" class="form-control text-primary" name="password"';
echo 'value="' . $IIIIIII1III1 . '"';
echo ' id="myInput" placeholder="Enter Password">' . "
";
echo '                            </div>' . "
";
echo '                            </div>' . "
";
echo '                            <div class="form-group ">' . "
";
echo ' <input type="checkbox" onclick="myFunction()">' . "
";
echo '                            <label class="control-label " for="password">' . "
";
echo '                            <strong>Show Password</strong>' . "
";
echo '                            </label>' . "
";
echo '                            </div>' . "
";
echo '                            <div class="form-group ">' . "
";
echo '                            <label class="control-label " for="logo">' . "
";
echo '                            <strong>Logo</strong>' . "
";
echo '                            </label>' . "
";
echo '                            <div class="input-group">' . "
";
echo '                            <input type="text" class="form-control text-primary" name="logo" value="' . $logo . '" placeholder="Enter Image URL">' . "
";
echo '                            </div>' . "
";
echo '                            </div>' . "
";
echo '                            <div class="form-group">' . "
";
echo '                            <img type="image" width="100px" src="' . $logo . '" alt="image" />' . "
";
echo '                            </div>' . "
";
echo "								" . '                       <div class="form-group">' . "
";
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 '                            </div>' . "
";
echo '                </div>' . "
";
echo '                            </div>' . "
";
echo '                            </form>' . "
";
echo '            </div>' . "
";
echo '                </div>' . "
";
include 'includes/footer.php';
require 'includes/egz.php';
echo '<script>' . "
";
echo 'function myFunction() {' . "
";
echo '  var x = document.getElementById(\'myInput\');' . "
";
echo '  if (x.type === \'password\') {' . "
";
echo '    x.type = \'text\';' . "
";
echo '  } else {' . "
";
echo '    x.type = \'password\';' . "
";
echo '  }' . "
";
echo '}';
echo '</script>' . "
";
echo '</body>' . "
";