Add files via upload

This commit is contained in:
LordMittens 2023-10-09 13:27:50 +02:00 committed by GitHub
parent 5f24936766
commit 1feeaa5b65
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 152 additions and 0 deletions

76
adminlogin.html Normal file
View file

@ -0,0 +1,76 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Login Page</title>
<style>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f2f2f2;
}
.container {
width: 300px;
margin: 0 auto;
padding: 20px;
background-color: #fff;
border-radius: 5px;
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
margin-top: 100px;
}
h2 {
text-align: center;
}
label {
display: block;
margin-bottom: 8px;
}
input[type="text"], input[type="password"] {
width: 92%;
padding: 10px;
margin-bottom: 10px;
border: 1px solid #ccc;
border-radius: 3px;
}
input[type="submit"] {
width: 100%;
background-color: #007BFF;
color: #fff;
padding: 10px;
border: none;
border-radius: 3px;
cursor: pointer;
}
</style>
</style>
</head>
<body>
<div class="container">
<h2>Admin Login</h2>
<form id="loginForm" action="webvm.html" method="post" onsubmit="return validateForm()">
<label for="username">Username:</label>
<input type="text" id="username" name="username" required>
<label for="password">Password:</label>
<input type="password" id="password" name="password" required>
<input type="submit" value="Login">
</form>
</div>
<script>
function validateForm() {
var username = document.getElementById("username").value;
var password = document.getElementById("password").value;
if (username === "admin" && password === "3p1cAdm!nP4ss") {
return true; // Allow submission and redirect
} else {
alert("Invalid username or password. Please try again.");
return false; // Prevent submission
}
}
</script>
</body>
</html>

76
index.html Normal file
View file

@ -0,0 +1,76 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Login Page</title>
<style>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f2f2f2;
}
.container {
width: 300px;
margin: 0 auto;
padding: 20px;
background-color: #fff;
border-radius: 5px;
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
margin-top: 100px;
}
h2 {
text-align: center;
}
label {
display: block;
margin-bottom: 8px;
}
input[type="text"], input[type="password"] {
width: 92%;
padding: 10px;
margin-bottom: 10px;
border: 1px solid #ccc;
border-radius: 3px;
}
input[type="submit"] {
width: 100%;
background-color: #007BFF;
color: #fff;
padding: 10px;
border: none;
border-radius: 3px;
cursor: pointer;
}
</style>
</style>
</head>
<body>
<div class="container">
<h2>Login as user</h2>
<form id="loginForm" action="userpage.html?userID=2" method="post" onsubmit="return validateForm()">
<label for="username">Username:</label>
<input type="text" id="username" name="username" required>
<label for="password">Password:</label>
<input type="password" id="password" name="password" required>
<input type="submit" value="Login">
</form>
</div>
<script>
function validateForm() {
var username = document.getElementById("username").value;
var password = document.getElementById("password").value;
if (username === "user" && password === "user") {
return true; // Allow submission and redirect
} else {
alert("Invalid username or password. Please try again.");
return false; // Prevent submission
}
}
</script>
</body>
</html>