* Added nav-bar inside php file which is included in each page instead of copy pasting * Clicking on images will now redirect the user to a new page with the url of the image. This is to facilitate the exploit
35 lines
1.3 KiB
PHP
35 lines
1.3 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Tux gallery !</title>
|
|
<link rel="stylesheet" href="static/css/stylesheet.css">
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-sRIl4kxILFvY47J16cr9ZwB07vP4J8+LH7qKQnuqkuIAvNWLzeN8tE5YBujZqJLB" crossorigin="anonymous">
|
|
</head>
|
|
<body>
|
|
<?php include 'include/nav.php'?>
|
|
<div class="wrapper">
|
|
<form id="loginForm" method="POST" action="login.php">
|
|
<h1>Login</h1>
|
|
<p>Note : The register feature is not implemented yet !</p>
|
|
<label for="username">Username</label>
|
|
<input type="text" id="username" name="username">
|
|
<label for="password">Password</label>
|
|
<input type="password" id="password" name="password">
|
|
<input type="button" class="btn btn-primary" value="Login">
|
|
</form>
|
|
</div>
|
|
<?php
|
|
if (! empty($_POST)) {
|
|
$name = $_POST['username'];
|
|
$password = $_POST['password'];
|
|
if (empty($name)) {
|
|
echo "Username is empty";
|
|
} else {
|
|
echo $name;
|
|
}
|
|
}
|
|
?>
|
|
</body>
|
|
</html>
|