Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit c807720

Browse files
Update master.php
1 parent 9ad8368 commit c807720

File tree

1 file changed

+37
-43
lines changed

1 file changed

+37
-43
lines changed

app/layout/master.php

Lines changed: 37 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,39 @@
1-
<?php $page = isset($_GET['page']) ? $_GET['page'] : "manage-apps"; ?>
2-
<!--begin::Main-->
3-
<!--begin::Root-->
4-
<div class="d-flex flex-column flex-root">
5-
<!--begin::Page-->
6-
<div class="page d-flex flex-row flex-column-fluid">
7-
8-
<?php include 'aside/_base.php' ?>
9-
10-
<!--begin::Wrapper-->
11-
<div class="wrapper d-flex flex-column flex-row-fluid" id="kt_wrapper">
12-
13-
<?php include 'header/_base.php' ?>
14-
15-
<!--begin::Content-->
16-
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
17-
18-
<?php include 'toolbars/_toolbar-1.php' ?>
19-
20-
<!--begin::Post-->
21-
<div class="post d-flex flex-column-fluid" id="kt_post">
22-
23-
<?php
24-
// prevent directory traversal
25-
if(str_contains($page, ".")) {
26-
die("Page name is invalid");
27-
}
28-
require __DIR__ . "/../pages/{$page}.php";
29-
?>
30-
31-
</div>
32-
<!--end::Post-->
33-
</div>
34-
<!--end::Content-->
35-
36-
<?php include '_footer.php' ?>
37-
38-
</div>
39-
<!--end::Wrapper-->
1+
<?php
2+
$page = isset($_GET['page']) ? $_GET['page'] : "manage-apps";
3+
4+
require '../app/layout/topbar.php';
5+
6+
?>
7+
8+
<div class="flex overflow-hidden pt-16 bg-[#09090d]">
9+
10+
<?php
11+
if ($_SESSION["role"] == 'Reseller'){
12+
include '../app/layout/reselleraside.php';
13+
} else{
14+
include '../app/layout/aside.php';
15+
}
16+
17+
?>
18+
19+
<div class="hidden fixed inset-0 z-10" id="sidebarBackdrop"></div>
20+
21+
<?php
22+
if (str_contains($page, ".")) {
23+
require '../404_error.html';
24+
}
25+
26+
?>
27+
<div id="main-content" class="overflow-y-auto relative w-full h-full lg:ml-64">
28+
<main>
29+
<?php
30+
require __DIR__ . "/../pages/{$page}.php";
31+
?>
32+
33+
</main>
34+
35+
<?php
36+
require '../app/layout/footer.php';
37+
?>
4038
</div>
41-
<!--end::Page-->
4239
</div>
43-
<!--end::Root-->
44-
45-
<!--end::Main-->

0 commit comments

Comments
 (0)