Sindbad~EG File Manager
<?php
$current_page = basename($_SERVER['PHP_SELF']);
$user = getCurrentUser();
?>
<!-- Modern Admin Sidebar -->
<aside class="fixed left-0 top-0 h-full w-72 bg-white/90 backdrop-blur-sm shadow-2xl border-r border-slate-200/50 z-40">
<!-- Logo Section -->
<div class="p-6 border-b border-slate-200/50">
<div class="flex items-center space-x-3">
<div class="p-2 rounded-xl bg-gradient-to-br from-blue-500 to-purple-600">
<i class="fas fa-church text-white text-xl"></i>
</div>
<div>
<h2 class="text-lg font-bold bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent">
COP Madina
</h2>
<p class="text-xs text-slate-500">Admin Panel</p>
</div>
</div>
</div>
<!-- User Info -->
<div class="p-4 border-b border-slate-200/50">
<div class="flex items-center space-x-3">
<div class="w-10 h-10 rounded-full bg-gradient-to-br from-blue-500 to-purple-600 flex items-center justify-center">
<span class="text-white font-semibold text-sm">
<?php echo strtoupper(substr($user['first_name'], 0, 1) . substr($user['last_name'], 0, 1)); ?>
</span>
</div>
<div class="flex-1 min-w-0">
<p class="text-sm font-semibold text-slate-800 truncate">
<?php echo htmlspecialchars($user['first_name'] . ' ' . $user['last_name']); ?>
</p>
<p class="text-xs text-slate-500 truncate">
<?php echo ucfirst(str_replace('_', ' ', $user['role'])); ?>
</p>
</div>
</div>
</div>
<!-- Navigation Menu -->
<nav class="flex-1 p-4 space-y-2 overflow-y-auto max-h-[calc(100vh-200px)]">
<!-- Dashboard -->
<a href="index.php" class="group flex items-center space-x-3 px-4 py-3 rounded-xl transition-all duration-200 <?php echo $current_page === 'index.php' ? 'bg-gradient-to-r from-blue-500 via-slate-500 to-red-500 text-white shadow-lg' : 'text-slate-700 hover:bg-slate-100'; ?>">
<i class="fas fa-tachometer-alt <?php echo $current_page === 'index.php' ? 'text-white' : 'text-slate-400 group-hover:text-slate-600'; ?>"></i>
<span class="font-medium">Dashboard</span>
</a>
<!-- Management Section -->
<div class="pt-4">
<p class="px-4 text-xs font-semibold text-slate-400 uppercase tracking-wider mb-2">Management</p>
<?php if (in_array($user['role'], ['superuser'])): ?>
<a href="areas.php" class="group flex items-center space-x-3 px-4 py-3 rounded-xl transition-all duration-200 <?php echo $current_page === 'areas.php' ? 'bg-gradient-to-r from-blue-500 via-slate-500 to-red-500 text-white shadow-lg' : 'text-slate-700 hover:bg-slate-100'; ?>">
<i class="fas fa-map <?php echo $current_page === 'areas.php' ? 'text-white' : 'text-slate-400 group-hover:text-slate-600'; ?>"></i>
<span class="font-medium">Areas</span>
</a>
<?php endif; ?>
<?php if (in_array($user['role'], ['superuser', 'area_admin'])): ?>
<a href="districts.php" class="group flex items-center space-x-3 px-4 py-3 rounded-xl transition-all duration-200 <?php echo $current_page === 'districts.php' ? 'bg-gradient-to-r from-blue-500 via-slate-500 to-red-500 text-white shadow-lg' : 'text-slate-700 hover:bg-slate-100'; ?>">
<i class="fas fa-building <?php echo $current_page === 'districts.php' ? 'text-white' : 'text-slate-400 group-hover:text-slate-600'; ?>"></i>
<span class="font-medium">Districts</span>
</a>
<?php endif; ?>
<?php if (in_array($user['role'], ['superuser', 'area_admin', 'district_admin'])): ?>
<a href="assemblies.php" class="group flex items-center space-x-3 px-4 py-3 rounded-xl transition-all duration-200 <?php echo $current_page === 'assemblies.php' ? 'bg-gradient-to-r from-blue-500 via-slate-500 to-red-500 text-white shadow-lg' : 'text-slate-700 hover:bg-slate-100'; ?>">
<i class="fas fa-church <?php echo $current_page === 'assemblies.php' ? 'text-white' : 'text-slate-400 group-hover:text-slate-600'; ?>"></i>
<span class="font-medium">Assemblies</span>
</a>
<?php endif; ?>
<a href="events.php" class="group flex items-center space-x-3 px-4 py-3 rounded-xl transition-all duration-200 <?php echo $current_page === 'events.php' ? 'bg-gradient-to-r from-blue-500 via-slate-500 to-red-500 text-white shadow-lg' : 'text-slate-700 hover:bg-slate-100'; ?>">
<i class="fas fa-calendar <?php echo $current_page === 'events.php' ? 'text-white' : 'text-slate-400 group-hover:text-slate-600'; ?>"></i>
<span class="font-medium">Events</span>
</a>
<a href="event-participants.php" class="group flex items-center space-x-3 px-4 py-3 rounded-xl transition-all duration-200 <?php echo $current_page === 'event-participants.php' ? 'bg-gradient-to-r from-blue-500 via-slate-500 to-red-500 text-white shadow-lg' : 'text-slate-700 hover:bg-slate-100'; ?>">
<i class="fas fa-user-friends <?php echo $current_page === 'event-participants.php' ? 'text-white' : 'text-slate-400 group-hover:text-slate-600'; ?>"></i>
<span class="font-medium">Event Participants</span>
</a>
<?php if (in_array($user['role'], ['superuser', 'area_admin'])): ?>
<a href="users.php" class="group flex items-center space-x-3 px-4 py-3 rounded-xl transition-all duration-200 <?php echo $current_page === 'users.php' ? 'bg-gradient-to-r from-blue-500 via-slate-500 to-red-500 text-white shadow-lg' : 'text-slate-700 hover:bg-slate-100'; ?>">
<i class="fas fa-users <?php echo $current_page === 'users.php' ? 'text-white' : 'text-slate-400 group-hover:text-slate-600'; ?>"></i>
<span class="font-medium">Users</span>
</a>
<a href="members.php" class="group flex items-center space-x-3 px-4 py-3 rounded-xl transition-all duration-200 <?php echo $current_page === 'members.php' ? 'bg-gradient-to-r from-blue-500 via-slate-500 to-red-500 text-white shadow-lg' : 'text-slate-700 hover:bg-slate-100'; ?>">
<i class="fas fa-users <?php echo $current_page === 'members.php' ? 'text-white' : 'text-slate-400 group-hover:text-slate-600'; ?>"></i>
<span class="font-medium">Members</span>
</a>
<a href="non-members.php" class="group flex items-center space-x-3 px-4 py-3 rounded-xl transition-all duration-200 <?php echo $current_page === 'non-members.php' ? 'bg-gradient-to-r from-blue-500 via-slate-500 to-red-500 text-white shadow-lg' : 'text-slate-700 hover:bg-slate-100'; ?>">
<i class="fas fa-user-friends <?php echo $current_page === 'non-members.php' ? 'text-white' : 'text-slate-400 group-hover:text-slate-600'; ?>"></i>
<span class="font-medium">Non-Members</span>
</a>
<?php endif; ?>
</div>
<!-- Operations Section -->
<div class="pt-4">
<p class="px-4 text-xs font-semibold text-slate-400 uppercase tracking-wider mb-2">Operations</p>
<a href="registrations.php" class="group flex items-center space-x-3 px-4 py-3 rounded-xl transition-all duration-200 <?php echo $current_page === 'registrations.php' ? 'bg-gradient-to-r from-blue-500 via-slate-500 to-red-500 text-white shadow-lg' : 'text-slate-700 hover:bg-slate-100'; ?>">
<i class="fas fa-ticket-alt <?php echo $current_page === 'registrations.php' ? 'text-white' : 'text-slate-400 group-hover:text-slate-600'; ?>"></i>
<span class="font-medium">Registrations</span>
</a>
<a href="merchandise.php" class="group flex items-center space-x-3 px-4 py-3 rounded-xl transition-all duration-200 <?php echo $current_page === 'merchandise.php' ? 'bg-gradient-to-r from-blue-500 via-slate-500 to-red-500 text-white shadow-lg' : 'text-slate-700 hover:bg-slate-100'; ?>">
<i class="fas fa-shopping-bag <?php echo $current_page === 'merchandise.php' ? 'text-white' : 'text-slate-400 group-hover:text-slate-600'; ?>"></i>
<span class="font-medium">Merchandise</span>
</a>
<a href="tickets.php" class="group flex items-center space-x-3 px-4 py-3 rounded-xl transition-all duration-200 <?php echo $current_page === 'tickets.php' ? 'bg-gradient-to-r from-blue-500 via-slate-500 to-red-500 text-white shadow-lg' : 'text-slate-700 hover:bg-slate-100'; ?>">
<i class="fas fa-ticket-alt <?php echo $current_page === 'tickets.php' ? 'text-white' : 'text-slate-400 group-hover:text-slate-600'; ?>"></i>
<span class="font-medium">Tickets</span>
</a>
<a href="promo-codes.php" class="group flex items-center space-x-3 px-4 py-3 rounded-xl transition-all duration-200 <?php echo $current_page === 'promo-codes.php' ? 'bg-gradient-to-r from-blue-500 via-slate-500 to-red-500 text-white shadow-lg' : 'text-slate-700 hover:bg-slate-100'; ?>">
<i class="fas fa-tags <?php echo $current_page === 'promo-codes.php' ? 'text-white' : 'text-slate-400 group-hover:text-slate-600'; ?>"></i>
<span class="font-medium">Promo Codes</span>
</a>
<a href="check-in.php" class="group flex items-center space-x-3 px-4 py-3 rounded-xl transition-all duration-200 <?php echo $current_page === 'check-in.php' ? 'bg-gradient-to-r from-indigo-500 to-purple-600 text-white shadow-lg' : 'text-slate-600 hover:bg-slate-100 hover:text-indigo-600'; ?>">
<i class="fas fa-sign-in-alt <?php echo $current_page === 'check-in.php' ? 'text-white' : 'text-indigo-500 group-hover:text-indigo-600'; ?>"></i>
<span class="font-medium">Check-In</span>
</a>
<a href="attendance-reports.php" class="group flex items-center space-x-3 px-4 py-3 rounded-xl transition-all duration-200 <?php echo $current_page === 'attendance-reports.php' ? 'bg-gradient-to-r from-emerald-500 to-green-600 text-white shadow-lg' : 'text-slate-600 hover:bg-slate-100 hover:text-emerald-600'; ?>">
<i class="fas fa-chart-bar <?php echo $current_page === 'attendance-reports.php' ? 'text-white' : 'text-emerald-500 group-hover:text-emerald-600'; ?>"></i>
<span class="font-medium">Attendance Reports</span>
</a>
<a href="reports.php" class="group flex items-center space-x-3 px-4 py-3 rounded-xl transition-all duration-200 <?php echo $current_page === 'reports.php' ? 'bg-gradient-to-r from-blue-500 via-slate-500 to-red-500 text-white shadow-lg' : 'text-slate-700 hover:bg-slate-100'; ?>">
<i class="fas fa-chart-line <?php echo $current_page === 'reports.php' ? 'text-white' : 'text-slate-400 group-hover:text-slate-600'; ?>"></i>
<span class="font-medium">Analytics</span>
</a>
<a href="advanced-reports.php" class="group flex items-center space-x-3 px-4 py-3 rounded-xl transition-all duration-200 <?php echo $current_page === 'advanced-reports.php' ? 'bg-gradient-to-r from-blue-500 via-slate-500 to-red-500 text-white shadow-lg' : 'text-slate-700 hover:bg-slate-100'; ?>">
<i class="fas fa-chart-pie <?php echo $current_page === 'advanced-reports.php' ? 'text-white' : 'text-slate-400 group-hover:text-slate-600'; ?>"></i>
<span class="font-medium">Reports</span>
</a>
</div>
<!-- Templates Section -->
<?php if (in_array($user['role'], ['superuser', 'area_admin'])): ?>
<div class="pt-4">
<p class="px-4 text-xs font-semibold text-slate-400 uppercase tracking-wider mb-2">Templates</p>
<a href="event-templates.php" class="group flex items-center space-x-3 px-4 py-3 rounded-xl transition-all duration-200 <?php echo $current_page === 'event-templates.php' ? 'bg-gradient-to-r from-blue-500 via-slate-500 to-red-500 text-white shadow-lg' : 'text-slate-700 hover:bg-slate-100'; ?>">
<i class="fas fa-clipboard-list <?php echo $current_page === 'event-templates.php' ? 'text-white' : 'text-slate-400 group-hover:text-slate-600'; ?>"></i>
<span class="font-medium">Event Templates</span>
</a>
<a href="form-builder.php" class="group flex items-center space-x-3 px-4 py-3 rounded-xl transition-all duration-200 <?php echo $current_page === 'form-builder.php' ? 'bg-gradient-to-r from-blue-500 via-slate-500 to-red-500 text-white shadow-lg' : 'text-slate-700 hover:bg-slate-100'; ?>">
<i class="fas fa-wpforms <?php echo $current_page === 'form-builder.php' ? 'text-white' : 'text-slate-400 group-hover:text-slate-600'; ?>"></i>
<span class="font-medium">Form Builder</span>
</a>
</div>
<?php endif; ?>
<!-- System Section -->
<div class="pt-4">
<p class="px-4 text-xs font-semibold text-slate-400 uppercase tracking-wider mb-2">System</p>
<a href="settings.php" class="group flex items-center space-x-3 px-4 py-3 rounded-xl transition-all duration-200 <?php echo $current_page === 'settings.php' ? 'bg-gradient-to-r from-blue-500 via-slate-500 to-red-500 text-white shadow-lg' : 'text-slate-700 hover:bg-slate-100'; ?>">
<i class="fas fa-cog <?php echo $current_page === 'settings.php' ? 'text-white' : 'text-slate-400 group-hover:text-slate-600'; ?>"></i>
<span class="font-medium">Settings</span>
</a>
<?php if (in_array($user['role'], ['superuser'])): ?>
<a href="email-settings.php" class="group flex items-center space-x-3 px-4 py-3 rounded-xl transition-all duration-200 <?php echo $current_page === 'email-settings.php' ? 'bg-gradient-to-r from-blue-500 via-slate-500 to-red-500 text-white shadow-lg' : 'text-slate-700 hover:bg-slate-100'; ?>">
<i class="fas fa-envelope-open-text <?php echo $current_page === 'email-settings.php' ? 'text-white' : 'text-slate-400 group-hover:text-slate-600'; ?>"></i>
<span class="font-medium">Email Settings</span>
</a>
<a href="audit.php" class="group flex items-center space-x-3 px-4 py-3 rounded-xl transition-all duration-200 <?php echo $current_page === 'audit.php' ? 'bg-gradient-to-r from-blue-500 via-slate-500 to-red-500 text-white shadow-lg' : 'text-slate-700 hover:bg-slate-100'; ?>">
<i class="fas fa-history <?php echo $current_page === 'audit.php' ? 'text-white' : 'text-slate-400 group-hover:text-slate-600'; ?>"></i>
<span class="font-medium">Audit Log</span>
</a>
<a href="notifications.php" class="group flex items-center space-x-3 px-4 py-3 rounded-xl transition-all duration-200 <?php echo $current_page === 'notifications.php' ? 'bg-gradient-to-r from-blue-500 via-slate-500 to-red-500 text-white shadow-lg' : 'text-slate-700 hover:bg-slate-100'; ?>">
<i class="fas fa-bell <?php echo $current_page === 'notifications.php' ? 'text-white' : 'text-slate-400 group-hover:text-slate-600'; ?>"></i>
<span class="font-medium">Notifications</span>
</a>
<a href="backup.php" class="group flex items-center space-x-3 px-4 py-3 rounded-xl transition-all duration-200 <?php echo $current_page === 'backup.php' ? 'bg-gradient-to-r from-blue-500 via-slate-500 to-red-500 text-white shadow-lg' : 'text-slate-700 hover:bg-slate-100'; ?>">
<i class="fas fa-database <?php echo $current_page === 'backup.php' ? 'text-white' : 'text-slate-400 group-hover:text-slate-600'; ?>"></i>
<span class="font-medium">Backup & Restore</span>
</a>
<a href="manage_dynamic_tables.php" class="group flex items-center space-x-3 px-4 py-3 rounded-xl transition-all duration-200 <?php echo $current_page === 'manage_dynamic_tables.php' ? 'bg-gradient-to-r from-blue-500 via-slate-500 to-red-500 text-white shadow-lg' : 'text-slate-700 hover:bg-slate-100'; ?>">
<i class="fas fa-table <?php echo $current_page === 'manage_dynamic_tables.php' ? 'text-white' : 'text-slate-400 group-hover:text-slate-600'; ?>"></i>
<span class="font-medium">Dynamic Tables</span>
</a>
<?php endif; ?>
</div>
<!-- Navigation Section -->
<div class="pt-4">
<p class="px-4 text-xs font-semibold text-slate-400 uppercase tracking-wider mb-2">Navigation</p>
<a href="../dashboard.php" class="group flex items-center space-x-3 px-4 py-3 rounded-xl transition-all duration-200 text-slate-700 hover:bg-slate-100">
<i class="fas fa-home text-slate-400 group-hover:text-slate-600"></i>
<span class="font-medium">Public Dashboard</span>
</a>
<a href="../logout.php" class="group flex items-center space-x-3 px-4 py-3 rounded-xl transition-all duration-200 text-red-600 hover:bg-red-50">
<i class="fas fa-sign-out-alt text-red-500"></i>
<span class="font-medium">Logout</span>
</a>
</div>
</nav>
</aside>
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists