Sindbad~EG File Manager

Current Path : /home/copmadinaarea/thecopmadinaarea.org/conference/includes/
Upload File :
Current File : /home/copmadinaarea/thecopmadinaarea.org/conference/includes/public_sidebar.php

<?php
// Public Sidebar Navigation Component
$current_page = basename($_SERVER['PHP_SELF']);
$current_dir = basename(dirname($_SERVER['PHP_SELF']));
?>

<!-- Sidebar -->
<div class="bg-white shadow-lg w-64 min-h-screen">
    <div class="p-6">
        <div class="flex items-center space-x-3 mb-8">
            <img src="<?php echo BASE_URL; ?>assets/images/logo.png" alt="COP Madina" class="h-10 w-10 rounded-full">
            <div>
                <h1 class="text-lg font-bold text-gray-800">COP Madina</h1>
                <p class="text-xs text-gray-600">Conference Management</p>
            </div>
        </div>
        
        <nav class="space-y-2">
            <a href="<?php echo BASE_URL; ?>dashboard.php" 
               class="<?php echo $current_page === 'dashboard.php' ? 'sidebar-active' : 'text-gray-700 hover:bg-gray-100'; ?> flex items-center space-x-3 px-4 py-3 rounded-lg transition-colors">
                <i class="fas fa-tachometer-alt"></i>
                <span>Dashboard</span>
            </a>
            
            <?php if (hasRole('assembly_admin')): ?>
            <a href="<?php echo BASE_URL; ?>events/index.php" 
               class="<?php echo $current_dir === 'events' ? 'sidebar-active' : 'text-gray-700 hover:bg-gray-100'; ?> flex items-center space-x-3 px-4 py-3 rounded-lg transition-colors">
                <i class="fas fa-calendar"></i>
                <span>Events</span>
            </a>
            <?php endif; ?>
            
            <?php if (hasRole('district_admin')): ?>
            <a href="<?php echo BASE_URL; ?>assemblies/index.php" 
               class="<?php echo $current_dir === 'assemblies' ? 'sidebar-active' : 'text-gray-700 hover:bg-gray-100'; ?> flex items-center space-x-3 px-4 py-3 rounded-lg transition-colors">
                <i class="fas fa-church"></i>
                <span>Assemblies</span>
            </a>
            <?php endif; ?>
            
            <?php if (hasRole('area_admin')): ?>
            <a href="<?php echo BASE_URL; ?>districts/index.php" 
               class="<?php echo $current_dir === 'districts' ? 'sidebar-active' : 'text-gray-700 hover:bg-gray-100'; ?> flex items-center space-x-3 px-4 py-3 rounded-lg transition-colors">
                <i class="fas fa-building"></i>
                <span>Districts</span>
            </a>
            <?php endif; ?>
            
            <?php if (hasRole('superuser')): ?>
            <a href="<?php echo BASE_URL; ?>areas/index.php" 
               class="<?php echo $current_dir === 'areas' ? 'sidebar-active' : 'text-gray-700 hover:bg-gray-100'; ?> flex items-center space-x-3 px-4 py-3 rounded-lg transition-colors">
                <i class="fas fa-map"></i>
                <span>Areas</span>
            </a>
            <a href="<?php echo BASE_URL; ?>users/index.php" 
               class="<?php echo $current_dir === 'users' ? 'sidebar-active' : 'text-gray-700 hover:bg-gray-100'; ?> flex items-center space-x-3 px-4 py-3 rounded-lg transition-colors">
                <i class="fas fa-users"></i>
                <span>Users</span>
            </a>
            <?php endif; ?>
            
            <a href="<?php echo BASE_URL; ?>registrations/index.php" 
               class="<?php echo $current_dir === 'registrations' ? 'sidebar-active' : 'text-gray-700 hover:bg-gray-100'; ?> flex items-center space-x-3 px-4 py-3 rounded-lg transition-colors">
                <i class="fas fa-user-plus"></i>
                <span>Registrations</span>
            </a>
            
            <?php if (hasRole('assembly_admin')): ?>
            <a href="<?php echo BASE_URL; ?>reports/index.php" 
               class="<?php echo $current_dir === 'reports' ? 'sidebar-active' : 'text-gray-700 hover:bg-gray-100'; ?> flex items-center space-x-3 px-4 py-3 rounded-lg transition-colors">
                <i class="fas fa-chart-bar"></i>
                <span>Reports</span>
            </a>
            <?php endif; ?>
            
            <a href="<?php echo BASE_URL; ?>profile.php" 
               class="<?php echo $current_page === 'profile.php' ? 'sidebar-active' : 'text-gray-700 hover:bg-gray-100'; ?> flex items-center space-x-3 px-4 py-3 rounded-lg transition-colors">
                <i class="fas fa-user"></i>
                <span>Profile</span>
            </a>
            
            <?php if (hasRole('superuser')): ?>
            <a href="<?php echo BASE_URL; ?>settings/index.php" 
               class="<?php echo $current_dir === 'settings' ? 'sidebar-active' : 'text-gray-700 hover:bg-gray-100'; ?> flex items-center space-x-3 px-4 py-3 rounded-lg transition-colors">
                <i class="fas fa-cog"></i>
                <span>Settings</span>
            </a>
            <?php endif; ?>

            <!-- Quick Links Section -->
            <div class="pt-4 border-t border-gray-200 mt-4">
                <p class="text-xs font-semibold text-gray-500 uppercase tracking-wider mb-2 px-4">Quick Links</p>
                
                <a href="<?php echo BASE_URL; ?>" 
                   class="text-gray-700 hover:bg-gray-100 flex items-center space-x-3 px-4 py-3 rounded-lg transition-colors">
                    <i class="fas fa-home"></i>
                    <span>Main Site</span>
                </a>

                <?php if (hasRole('superuser') || hasRole('area_admin') || hasRole('district_admin')): ?>
                <a href="<?php echo BASE_URL; ?>admin/" 
                   class="text-gray-700 hover:bg-gray-100 flex items-center space-x-3 px-4 py-3 rounded-lg transition-colors">
                    <i class="fas fa-tools"></i>
                    <span>Admin Panel</span>
                </a>
                <?php endif; ?>

                <a href="<?php echo BASE_URL; ?>logout.php" 
                   class="text-red-600 hover:bg-red-50 flex items-center space-x-3 px-4 py-3 rounded-lg transition-colors">
                    <i class="fas fa-sign-out-alt"></i>
                    <span>Logout</span>
                </a>
            </div>
        </nav>
    </div>
</div>

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists