Add authentication, roles, dashboard and access control
This commit is contained in:
@@ -1,4 +1,10 @@
|
||||
<?php
|
||||
include 'auth.php';
|
||||
// Hanya Admin Pemerintah yang bisa mengakses halaman ini
|
||||
if (!isAdminPemerintah()) {
|
||||
header("Location: dashboard.php");
|
||||
exit;
|
||||
}
|
||||
include 'koneksi.php';
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
@@ -143,6 +149,13 @@ include 'koneksi.php';
|
||||
<button class="btn-mode" id="mode-parsil" onclick="changeMode('parsil')">
|
||||
<i class="bi bi-square-fill text-primary"></i> Kelola Tanah
|
||||
</button>
|
||||
<hr style="border:none;border-top:1px solid rgba(255,255,255,0.08);margin:8px 0;">
|
||||
<a href="dashboard.php" class="btn-mode" style="text-decoration:none;">
|
||||
<i class="bi bi-speedometer2" style="color:#f39c12"></i> Dashboard
|
||||
</a>
|
||||
<a href="logout.php" class="btn-mode" style="text-decoration:none;" onclick="return confirm('Yakin ingin logout?')">
|
||||
<i class="bi bi-box-arrow-right" style="color:#e74c3c"></i> Logout
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user