Added proper lock and favicon

Implemented not being able to go to ticket_submit if not unlocked. Also
added favicon to display in address bar (from csg-germering.de). Deleted
unnessecary files.
This commit is contained in:
sraffauf
2026-01-28 15:49:54 +01:00
parent bb8c35b6d1
commit f055f8943f
7 changed files with 59 additions and 57 deletions

View File

@@ -11,6 +11,7 @@ if (!isset($_SESSION["loggedIn"])) {
<meta charset="UTF-8">
<title>Admin Dashboard</title>
<link rel="stylesheet" href="../css/style.css">
<link rel="icon" type="image/x-icon" href="/img/favicon.ico">
</head>
<body>
<div class="container">

View File

@@ -1,10 +0,0 @@
<?php
session_start();
if (!isset($_SESSION['unlocked'])) {
header("Location: ../index.html");
exit;
} else {
header("Location: ../pages/ticket_submit.html");
exit;
}
?>

55
php/ticket_submit.php Normal file
View File

@@ -0,0 +1,55 @@
<?php
session_start();
if (!isset($_SESSION["unlocked"])) {
header("Location: ../index.html");
exit;
}
?>
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Schul-IT Ticketsystem</title>
<link rel="stylesheet" href="../css/style.css" />
<link rel="icon" type="image/x-icon" href="/img/favicon.ico">
</head>
<body>
<div class="container">
<div class="header-with-image">
<h2>CSG IT Ticket System</h2>
<img src="../img/csg.png" width="100" />
</div>
<form action="../php/save_ticket.php" method="post">
<label for="title">Betreff</label>
<input type="text" id="title" name="title" required />
<label for="description">Problem-Beschreibung</label>
<textarea id="description" name="description" rows="5" required></textarea>
<label for="room">Raum</label>
<input type="number" id="room" name="room" required />
<label for="name">Name, Vorname</label>
<input type="text" id="name" name="name" required>
<label for="category">Kategorie</label>
<select id="category" name="category">
<option value="Whiteboard">Whiteboard</option>
<option value="Internet">Internet</option>
<option value="Schülerportal">Schülerportal</option>
<option value="Ipad(Koffer)">Ipad(Koffer)</option>
<option value="Apple TV">Apple TV</option>
<option value="DocuCam">Docu Kamera</option>
<option value="Sonstiges">Sonstiges</option>
</select>
<button type="submit">Ticket absenden</button>
<a href="../pages/login.html" class="login-btn">Admin Login</a>
</form>
</div>
</body>
</html>

View File

@@ -11,7 +11,7 @@ if ($pass === $try) {
if ($unlocked) {
$_SESSION['unlocked'] = true;
header("Location: ./ticket_lock.php");
header("Location: ./ticket_submit.php");
exit;
} else {
header("Location: ../index.html?error=1");