50 lines
2.1 KiB
PHP
50 lines
2.1 KiB
PHP
<?php
|
|
$user_role = $_SESSION['user']['role'] ?? '';
|
|
$current_page = basename($_SERVER['PHP_SELF']);
|
|
?>
|
|
<nav id="sidebar">
|
|
<div class="sidebar-header">
|
|
<h3>Mikrotik CRM</h3>
|
|
</div>
|
|
|
|
<ul class="list-unstyled components">
|
|
<li class="<?php echo ($current_page == 'index.php') ? 'active' : ''; ?>">
|
|
<a href="index.php"><i data-feather="grid"></i> Dashboard</a>
|
|
</li>
|
|
|
|
<?php if ($user_role === 'Administrator'): ?>
|
|
<li class="<?php echo ($current_page == 'routers.php') ? 'active' : ''; ?>">
|
|
<a href="routers.php"><i data-feather="server"></i> Routers</a>
|
|
</li>
|
|
<li class="<?php echo ($current_page == 'packages.php') ? 'active' : ''; ?>">
|
|
<a href="packages.php"><i data-feather="package"></i> Paket Layanan</a>
|
|
</li>
|
|
<li class="<?php echo ($current_page == 'users.php') ? 'active' : ''; ?>">
|
|
<a href="users.php"><i data-feather="users"></i> Operators</a>
|
|
</li>
|
|
<li class="<?php echo ($current_page == 'settings.php') ? 'active' : ''; ?>">
|
|
<a href="settings.php"><i data-feather="settings"></i> Pengaturan</a>
|
|
</li>
|
|
<?php endif; ?>
|
|
|
|
<li class="<?php echo ($current_page == 'vouchers.php') ? 'active' : ''; ?>">
|
|
<a href="vouchers.php"><i data-feather="file-text"></i> Vouchers</a>
|
|
</li>
|
|
<li class="<?php echo ($current_page == 'accounts.php') ? 'active' : ''; ?>">
|
|
<a href="accounts.php"><i data-feather="user-plus"></i> Akun PPPoE/Hotspot</a>
|
|
</li>
|
|
<li class="<?php echo ($current_page == 'monitoring.php') ? 'active' : ''; ?>">
|
|
<a href="monitoring.php"><i data-feather="bar-chart-2"></i> Monitoring</a>
|
|
</li>
|
|
<li class="<?php echo ($current_page == 'billing.php') ? 'active' : ''; ?>">
|
|
<a href="billing.php"><i data-feather="dollar-sign"></i> Billing</a>
|
|
</li>
|
|
</ul>
|
|
|
|
<ul class="list-unstyled logout-link">
|
|
<li>
|
|
<a href="logout.php"><i data-feather="log-out"></i> Logout</a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|