99 lines
2.4 KiB
PHP
99 lines
2.4 KiB
PHP
<?php
|
|
// admin hasło admin
|
|
// worker hasło worker
|
|
// user hasło user
|
|
|
|
session_start();
|
|
if(isset($_SESSION['logged'])) {
|
|
header("Location: ./");
|
|
exit();
|
|
}
|
|
?>
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="pl">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Projekt</title>
|
|
<style>
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
font-family: Arial;
|
|
}
|
|
body {
|
|
background-color: cornflowerblue;
|
|
}
|
|
form {
|
|
border: 1px solid black;
|
|
margin: 1em auto;
|
|
width: fit-content;
|
|
padding: 1em;
|
|
background-color: beige;
|
|
box-shadow: 5px 5px 0px black;
|
|
}
|
|
h1 {
|
|
text-align: center;
|
|
margin-bottom: .25em;
|
|
}
|
|
h1 + p {
|
|
text-align: center;
|
|
margin-bottom: .25em;
|
|
}
|
|
.cred-container {
|
|
width: 100%;
|
|
clear: both;
|
|
}
|
|
.cred-container > label {
|
|
float: left;
|
|
margin: .5em 0;
|
|
}
|
|
.cred-container > input {
|
|
float: right;
|
|
margin: .5em 0;
|
|
}
|
|
|
|
input[type='text'] {
|
|
width: 50%;
|
|
}
|
|
input[type='password'] {
|
|
width: 50%;
|
|
}
|
|
|
|
input[type='submit'] {
|
|
clear: both;
|
|
width: 100%;
|
|
margin: .5em 0;
|
|
margin-bottom: 0;
|
|
padding: .5em;
|
|
}
|
|
|
|
hr {
|
|
margin-bottom: .25em;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<form action="validate.php" method="post">
|
|
<h1>SIEMANDEROOO</h1>
|
|
<p>No bo ogólnie to tu mamy takie tajne dane pliki <s>epsztajna</s><br>i fajnie by było jakbyś się zalogował żeby to zobaczyć...</p>
|
|
<hr>
|
|
<?php
|
|
if(isset($_GET['error'])) {
|
|
echo '<span style="font-style: oblique; color: red;">Nieprawidłowa nazwa użytkownika lub hasło!</span><br>';
|
|
}
|
|
?>
|
|
<div class='cred-container'>
|
|
<label>username:</label><input type="text" name="username" id="username">
|
|
</div>
|
|
<div class='cred-container'>
|
|
<label>hasło:</label><input type="password" name="password" id="password">
|
|
</div><br>
|
|
<input type="submit" value="Zaloguj">
|
|
</form>
|
|
</body>
|
|
</html>
|
|
|