-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
39 lines (34 loc) · 817 Bytes
/
Copy pathindex.php
File metadata and controls
39 lines (34 loc) · 817 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<!DOCTYPE html>
<?php
include_once('inc/autoload.php');
if (!$user->isLoggedIn()) {
header("Location: login.php");
exit;
}
?>
<html lang="en" data-bs-theme="auto">
<head>
<?php include_once('layout/html_head.php'); ?>
</head>
<body>
<?php include_once('layout/header.php'); ?>
<div class="container-fluid">
<div class="row">
<?php include('layout/sidebar.php'); ?>
<main class="col-md-9 ms-sm-auto col-lg-10 px-md-4">
<?php
// Determine which page to show
$page = $_GET['page'] ?? 'dashboard';
if ($page === 'order_search') {
$page = 'orders';
}
$pageFile = "pages/{$page}.php";
if (!file_exists($pageFile)) $pageFile = 'pages/404.php';
include($pageFile);
?>
</main>
</div>
</div>
<?php include_once('layout/footer.php'); ?>
</body>
</html>