roles guard + docs + logo

This commit is contained in:
Thanakorn S
2026-05-06 16:37:20 +07:00
parent 797dee5d17
commit 2eb6a1a315
60 changed files with 496 additions and 105 deletions
+21 -15
View File
@@ -1,5 +1,7 @@
<?php
$current_page = basename($_SERVER['PHP_SELF']);
$setting_role = $_SESSION['login_role'] ?? 'viewer';
$setting_can_admin = in_array($setting_role, ['owner', 'admin'], true);
?>
<!-- SIDEBAR -->
@@ -36,13 +38,15 @@
</a>
</li>
<li>
<a class="nav-link <?php echo $current_page === 'users.php' ? 'active' : ''; ?>"
href="<?php echo $server_url?>setting/users.php">
<i class="ti ti-users"></i>
<span class="nav-text">Users Access</span>
</a>
</li>
<?php if ($setting_can_admin): ?>
<li>
<a class="nav-link <?php echo $current_page === 'users.php' ? 'active' : ''; ?>"
href="<?php echo $server_url?>setting/users.php">
<i class="ti ti-users"></i>
<span class="nav-text">Users Access</span>
</a>
</li>
<?php endif; ?>
<li>
<a class="nav-link <?php echo $current_page === 'smtp.php' ? 'active' : ''; ?>"
@@ -52,13 +56,15 @@
</a>
</li>
<li>
<a class="nav-link <?php echo $current_page === 'system_config.php' ? 'active' : ''; ?>"
href="<?php echo $server_url?>setting/system_config.php">
<i class="ti ti-adjustments-cog"></i>
<span class="nav-text">System Configuration</span>
</a>
</li>
<?php if ($setting_can_admin): ?>
<li>
<a class="nav-link <?php echo $current_page === 'system_config.php' ? 'active' : ''; ?>"
href="<?php echo $server_url?>setting/system_config.php">
<i class="ti ti-adjustments-cog"></i>
<span class="nav-text">System Configuration</span>
</a>
</li>
<?php endif; ?>
<!-- Back -->
<li class="nav-text-space mt-2">
@@ -74,4 +80,4 @@
</ul>
</aside>
</aside>