Sindbad~EG File Manager
<?php
session_start();
require_once 'config/database.php';
require_once 'includes/functions.php';
// Redirect to login if not authenticated
if (!isset($_SESSION['user_id'])) {
header('Location: login.php');
exit();
}
// Redirect based on user level and role
$user_level = $_SESSION['user_level'];
$user_role = $_SESSION['user_role'];
switch ($user_level) {
case 'superuser':
header('Location: dashboard/superuser.php');
break;
case 'area':
header('Location: dashboard/area.php');
break;
case 'district':
header('Location: dashboard/district.php');
break;
case 'assembly':
header('Location: dashboard/assembly.php');
break;
default:
header('Location: login.php');
break;
}
exit();
?>
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists