69 lines
1.9 KiB
HTML
69 lines
1.9 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="no">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<title>EKT</title>
|
|
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
|
<meta name="description" content="Elektronisk Kadaver Tidtakningssystem" />
|
|
<link rel="stylesheet" href="matcha.css">
|
|
<style>
|
|
body {
|
|
padding: 0;
|
|
}
|
|
.settings {
|
|
padding: 0 1.5rem;
|
|
}
|
|
fieldset {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
justify-content: space-evenly;
|
|
}
|
|
.bg-success {
|
|
background: var(--bg-success) !important;
|
|
}
|
|
.bg-active {
|
|
background: var(--bg-active) !important;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<nav>
|
|
<menu>
|
|
<li class="disabled"><a href="/admin.php">Dashbord</a></li>
|
|
<li class="disabled"><a href="/registrering.php">Registrer passering på matpost/mål</a></li>
|
|
<li class="selected"><a href="/db_editor.html">Endre løperbase</a></li>
|
|
</menu>
|
|
</nav>
|
|
<h2>Simple Form</h2>
|
|
<form action="/runner.php" method="POST">
|
|
<label for="password">Passord:</label><br>
|
|
<input type="text" id="password" name="password" required><br><br>
|
|
|
|
<label for="id">Startnummer:</label><br>
|
|
<input type="text" id="id" name="id" required><br><br>
|
|
|
|
<label for="navn">Navn:</label><br>
|
|
<input type="text" id="name" name="input2"><br><br>
|
|
|
|
<button type="submit">Submit</button>
|
|
</form>
|
|
|
|
</div>
|
|
<script>
|
|
function log_out(){
|
|
localStorage.removeItem("navn");
|
|
localStorage.removeItem("passord");
|
|
window.location.href = "/login.html";
|
|
}
|
|
|
|
let xmlHttpReq = new XMLHttpRequest();
|
|
xmlHttpReq.open("POST", "/is_authorized.php", false);
|
|
xmlHttpReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=UTF-8")
|
|
xmlHttpReq.send("username=" + localStorage.getItem("navn")+"&"+"password=" + localStorage.getItem("passord"));
|
|
if (xmlHttpReq.status != 200){
|
|
window.location.href = "/login.html";
|
|
}
|
|
|
|
</script>
|
|
</body>
|
|
</html> |