Created rest of the pages and isLoggedIn.php to check if the user is logged in to make changes to the system

This commit is contained in:
Rohit Pai 2022-11-24 10:26:37 +00:00
parent e809e9e7e0
commit f03023a000
9 changed files with 99 additions and 0 deletions

View File

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
</body>
</html>

View File

@ -0,0 +1,11 @@
<?php
session_start();
if (isset($_SESSION["username"]))
{
echo json_encode(array("message" => "ok"));
}
else
{
echo json_encode(array("message" => "not logged in"));
}

View File

@ -0,0 +1,10 @@
// document.addEventListener("DOMContentLoaded", () =>
// {
// fetch("isLoggedIn.php").then(res => res.json().then(json =>
// {
// if (json.message !== "ok")
// {
// window.location.href = "index.html";
// }
// }));
// });

View File

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
</body>
</html>

View File

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
</body>
</html>

View File

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
</body>
</html>

View File

@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Reports</title>
</head>
<body>
<nav>
<ul>
<li><a href="search.html">Search</a></li>
<li><a href="newVehicle.html">Add new vehicle</a></li>
<li><a href="newReport.html">Create new report</a></li>
<li><a href="newUser.html">Create new user</a></li>
<li><a href="addFines.html">Add Fines</a></li>
<li><a href="viewLog.html">View log</a></li>
<li><a href="#">Logout</a></li>
</ul>
</nav>
<main>
<div class="search-container">
<fom><input type="text"><input type="submit" value=""></fom>
</div>
<div class="content"></div>
</main>
<script src="js/reports.js"></script>
</body>
</html>

View File

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
</body>
</html>