37 lines
1.2 KiB
PHP
Executable file
37 lines
1.2 KiB
PHP
Executable file
<?php
|
|
|
|
// We need to use sessions, so you should always start sessions using the below code.
|
|
session_start();
|
|
include('../config.php');
|
|
|
|
// If the user is not logged in redirect to the login page...
|
|
if (!isset($_SESSION['loggedin'])) {
|
|
header('Location: index.php');
|
|
exit;
|
|
}
|
|
?>
|
|
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Settings</title>
|
|
<link href="style.css" rel="stylesheet" type="text/css">
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css" integrity="sha512-xh6O/CkQoPOWDdYTDqeRdPCVd1SpvCA9XXcUnZS2FmJNp1coAFzvtCN9BmamE+4aHK8yyUHUSCcJHgXloTyT2A==" crossorigin="anonymous" referrerpolicy="no-referrer">
|
|
</head>
|
|
<body class="loggedin">
|
|
<nav class="navtop">
|
|
<div>
|
|
<h1><?= $siteName; ?></h1>
|
|
<a href="../index.php"><i class="fas fa-house"></i>Home</a>
|
|
<a href="profile.php"><i class="fas fa-user-circle"></i>Info</a>
|
|
<a href="../users.php"><i class="fas fa-users"></i>Users</a>
|
|
<a href="logout.php"><i class="fas fa-sign-out-alt"></i>Logout</a>
|
|
</div>
|
|
</nav>
|
|
<div class="content">
|
|
<h2>Settings</h2>
|
|
<p>Welcome back, <?=htmlspecialchars($_SESSION['name'], ENT_QUOTES)?>!</p>
|
|
</div>
|
|
</body>
|
|
</html>
|