Update create_admin.php
This commit is contained in:
@@ -1,62 +1,36 @@
|
|||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
|
||||||
<title>Cyberhex Installation</title>
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
|
||||||
<style>
|
<title>Change Password</title>
|
||||||
body {
|
|
||||||
font-family: 'Arial', sans-serif;
|
|
||||||
text-align: center;
|
|
||||||
margin: 50px;
|
|
||||||
}
|
|
||||||
h1 {
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
form {
|
|
||||||
display: inline-block;
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
label {
|
|
||||||
display: block;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
input {
|
|
||||||
width: 200px;
|
|
||||||
padding: 8px;
|
|
||||||
margin-bottom: 15px;
|
|
||||||
}
|
|
||||||
button {
|
|
||||||
padding: 10px 20px;
|
|
||||||
background-color: #4CAF50;
|
|
||||||
color: white;
|
|
||||||
border: none;
|
|
||||||
border-radius: 5px;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
footer {
|
|
||||||
text-align: center;
|
|
||||||
position: fixed;
|
|
||||||
bottom: 0;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>Please create an admin user:</h1>
|
|
||||||
<p>The admin user is later used to create new users, add machines and do all administrative tasks in cyberhex.</p>
|
<div class="container mt-5">
|
||||||
<p>Please choose a strong password, because the admin user is one of the main attack vectors of cyberhex.</p>
|
<div class="row justify-content-center">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h4>Add a user</h4>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
<form action="create_admin.php?create=true" method="post">
|
<form action="create_admin.php?create=true" method="post">
|
||||||
|
<div class="form-group">
|
||||||
<label for="username">Username:</label>
|
<label for="username">Username:</label>
|
||||||
<input type="text" id="username" name="username" required>
|
<input type="text" class="form-control" id="username" name="username" required>
|
||||||
|
</div>
|
||||||
<label for="email">email:</label>
|
<div class="form-group">
|
||||||
<input type="text" id="email" name="email" required>
|
<label for="email">Email:</label>
|
||||||
|
<input type="email" class="form-control" id="email" name="email" required>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
<label for="password">Password:</label>
|
<label for="password">Password:</label>
|
||||||
<input type="password" id="password" name="password" required>
|
<input type="password" class="form-control" id="password" name="password" required>
|
||||||
<br>
|
</div>
|
||||||
<button type="submit">Create admin</button>
|
<button type="submit" class="btn btn-primary btn-block">Add user</button>
|
||||||
</form>
|
</form>
|
||||||
<?php
|
<?php
|
||||||
include "../config.php";
|
include "../config.php";
|
||||||
@@ -85,12 +59,16 @@
|
|||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
$stmt->close();
|
$stmt->close();
|
||||||
$conn->close();
|
$conn->close();
|
||||||
echo('<p style="font-size: 20px; color: green;">Admin created successfully! <a href="end.php">Continue installation</a></p>');
|
echo '<br><div class="alert alert-success" role="alert">
|
||||||
|
Admin user created successfully! <a href="end.php">Continue installation</a>
|
||||||
|
</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<footer>
|
</div>
|
||||||
<p>© 2024 Cyberhex Antivirus by Jakach Software <a href="mailto:info.jakach@gmail.com">info.jakach@gmail.com</a></p>
|
</div>
|
||||||
</footer>
|
</div>
|
||||||
</body>
|
</div>
|
||||||
</html>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user