Sindbad~EG File Manager
<?php
require_once 'config/config.php';
require_once 'classes/MemberAuth.php';
$pageTitle = "Welcome - " . APP_NAME;
// Check if member is logged in
$isMemberLoggedIn = MemberAuth::isMemberLoggedIn();
$memberData = null;
if ($isMemberLoggedIn) {
$memberData = MemberAuth::getCurrentMember();
}
// Get settings for theme colors
$db = Database::getInstance()->getConnection();
$stmt = $db->query("SELECT * FROM general_settings ORDER BY id DESC LIMIT 1");
$settings = $stmt->fetch();
// Default settings if none exist
$settings = array_merge([
'site_title' => 'Church Membership System',
'theme_primary_color' => '#1E40AF', // Deep Blue
'theme_secondary_color' => '#F97316', // Orange
'header_text' => '',
'footer_text' => ''
], $settings ?: []);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?php echo $pageTitle; ?></title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<style>
:root {
--primary-blue: #1E40AF;
--secondary-orange: #F97316;
--accent-yellow: #FBBF24;
--accent-mauve: #9333EA;
}
.hero-gradient {
background: linear-gradient(135deg, #1E40AF 0%, #9333EA 50%, #F97316 100%);
}
.card-gradient {
background: linear-gradient(135deg, rgba(30, 64, 175, 0.1) 0%, rgba(249, 115, 22, 0.1) 100%);
}
.text-gradient {
background: linear-gradient(135deg, #1E40AF 0%, #F97316 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.hover-scale {
transition: transform 0.3s ease;
}
.hover-scale:hover {
transform: translateY(-5px);
}
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.animate-fadeInUp {
animation: fadeInUp 0.8s ease-out;
}
</style>
</head>
<body class="bg-gray-50">
<!-- Header -->
<header class="bg-white shadow-lg sticky top-0 z-50">
<div class="container mx-auto px-4">
<div class="flex items-center justify-between h-16">
<!-- Logo and Title -->
<div class="flex items-center space-x-3">
<div class="w-12 h-12 rounded-xl flex items-center justify-center" style="background: linear-gradient(135deg, #1E40AF 0%, #F97316 100%);">
<i class="fas fa-church text-white text-xl"></i>
</div>
<div>
<h1 class="text-xl font-bold text-gradient"><?php echo htmlspecialchars($settings['site_title']); ?></h1>
</div>
</div>
<!-- Navigation -->
<nav class="hidden md:flex items-center space-x-8">
<a href="index.php" class="text-gray-700 hover:text-blue-700 font-medium transition">Home</a>
<a href="public-directory.php" class="text-gray-700 hover:text-blue-600 font-medium transition">
<i class="fas fa-address-book mr-1"></i>Directory
</a>
<a href="features.php" class="text-gray-700 hover:text-orange-600 font-medium transition">Features</a>
<a href="about.php" class="text-gray-700 hover:text-purple-600 font-medium transition">About</a>
<a href="contact.php" class="text-gray-700 hover:text-yellow-600 font-medium transition">Contact</a>
<a href="conference.php" class="text-gray-700 hover:text-blue-700 font-medium transition">
<i class="fas fa-calendar mr-1"></i>Events
</a>
</nav>
<!-- Auth Buttons -->
<div class="flex items-center space-x-3">
<?php if ($isMemberLoggedIn): ?>
<!-- Member is logged in -->
<div class="flex items-center space-x-3">
<span class="text-sm text-gray-600">Welcome, <?php echo htmlspecialchars($memberData['full_name'] ?? 'Member'); ?></span>
<a href="members/dashboard.php" class="px-6 py-2 rounded-full text-white font-semibold transition hover:shadow-lg" style="background: linear-gradient(135deg, #1E40AF 0%, #9333EA 100%);">
<i class="fas fa-tachometer-alt mr-2"></i>My Dashboard
</a>
<a href="logout.php?member=1" class="text-gray-600 hover:text-red-600 transition">
<i class="fas fa-sign-out-alt mr-1"></i>Logout
</a>
</div>
<?php elseif (isLoggedIn()): ?>
<!-- Admin is logged in -->
<div class="flex items-center space-x-3">
<span class="text-sm text-gray-600">Welcome, <?php echo htmlspecialchars(getCurrentUserName()); ?></span>
<a href="dashboard.php" class="px-6 py-2 rounded-full text-white font-semibold transition hover:shadow-lg" style="background: linear-gradient(135deg, #1E40AF 0%, #9333EA 100%);">
<i class="fas fa-tachometer-alt mr-2"></i>Dashboard
</a>
<a href="logout.php" class="text-gray-600 hover:text-red-600 transition">
<i class="fas fa-sign-out-alt mr-1"></i>Logout
</a>
</div>
<?php else: ?>
<a href="public-search.php" class="px-6 py-2 rounded-full text-white font-semibold transition hover:shadow-lg" style="background: linear-gradient(135deg, #F97316 0%, #FBBF24 100%);">
<i class="fas fa-search mr-2"></i>Search Membership
</a>
<a href="login.php" class="px-6 py-2 rounded-full text-white font-semibold transition hover:shadow-lg" style="background: linear-gradient(135deg, #1E40AF 0%, #9333EA 100%);">
<i class="fas fa-sign-in-alt mr-2"></i>Login
</a>
<?php endif; ?>
</div>
<!-- Mobile Menu Button -->
<button class="md:hidden text-gray-600" onclick="toggleMobileMenu()">
<i class="fas fa-bars text-xl"></i>
</button>
</div>
<!-- Mobile Menu -->
<div id="mobileMenu" class="md:hidden hidden border-t border-gray-200 py-4">
<div class="flex flex-col space-y-3">
<a href="index.php" class="text-gray-700 hover:text-blue-700 font-medium">Home</a>
<a href="public-directory.php" class="text-gray-700 hover:text-blue-600 font-medium">
<i class="fas fa-address-book mr-1"></i>Directory
</a>
<a href="features.php" class="text-gray-700 hover:text-orange-600 font-medium">Features</a>
<a href="about.php" class="text-gray-700 hover:text-purple-600 font-medium">About</a>
<a href="contact.php" class="text-gray-700 hover:text-yellow-600 font-medium">Contact</a>
<a href="conference.php" class="text-gray-700 hover:text-blue-700 font-medium">
<i class="fas fa-calendar mr-1"></i>Events
</a>
<hr class="border-gray-200">
<?php if ($isMemberLoggedIn): ?>
<!-- Member is logged in -->
<a href="members/dashboard.php" class="text-blue-700 font-medium">
<i class="fas fa-tachometer-alt mr-2"></i>My Dashboard
</a>
<a href="event-checkin.php" class="text-green-600 font-medium">
<i class="fas fa-qrcode mr-1"></i>Event Check-in
</a>
<a href="logout.php?member=1" class="text-red-600">
<i class="fas fa-sign-out-alt mr-1"></i>Logout
</a>
<?php elseif (isLoggedIn()): ?>
<!-- Admin is logged in -->
<a href="dashboard.php" class="text-blue-700 font-medium">
<i class="fas fa-tachometer-alt mr-2"></i>Dashboard
</a>
<a href="logout.php" class="text-red-600">
<i class="fas fa-sign-out-alt mr-1"></i>Logout
</a>
<?php else: ?>
<!-- Not logged in -->
<a href="public-search.php" class="text-orange-600 font-medium">
<i class="fas fa-search mr-1"></i>Search Membership
</a>
<a href="event-checkin.php" class="text-green-600 font-medium">
<i class="fas fa-qrcode mr-1"></i>Event Check-in
</a>
<a href="login.php" class="text-blue-700 font-medium">
<i class="fas fa-sign-in-alt mr-1"></i>Login
</a>
<?php endif; ?>
</div>
</div>
</div>
</header>
<!-- Hero Section -->
<section class="hero-gradient text-white py-20 min-h-[60vh] flex items-center">
<div class="container mx-auto px-4">
<div class="max-w-5xl mx-auto text-center animate-fadeInUp">
<h1 class="text-5xl md:text-6xl font-bold mb-5 leading-tight">
<?php echo htmlspecialchars($settings['site_title']); ?>
</h1>
<p class="text-xl md:text-2xl mb-8 text-white/90 font-light">
Modern Church Membership Management
</p>
<div class="flex flex-col sm:flex-row gap-6 justify-center mb-8">
<?php if ($isMemberLoggedIn): ?>
<!-- Member is logged in -->
<a href="members/dashboard.php" class="px-10 py-5 rounded-full text-lg font-semibold transition hover:shadow-2xl hover-scale" style="background: white; color: #1E40AF;">
<i class="fas fa-tachometer-alt mr-2"></i>My Dashboard
</a>
<a href="event-checkin.php" class="px-10 py-5 rounded-full text-lg font-semibold transition hover:shadow-2xl hover-scale" style="background: linear-gradient(135deg, #10B981 0%, #059669 100%); color: white;">
<i class="fas fa-qrcode mr-2"></i>Event Check-in
</a>
<a href="logout.php?member=1" class="px-10 py-5 rounded-full border-3 border-white text-white text-lg font-semibold transition hover:bg-white hover-scale" style="border: 3px solid white;" onmouseover="this.style.color='#1E40AF'" onmouseout="this.style.color='white'">
<i class="fas fa-sign-out-alt mr-2"></i>Logout
</a>
<?php elseif (isLoggedIn()): ?>
<!-- Admin is logged in -->
<a href="dashboard.php" class="px-10 py-5 rounded-full text-lg font-semibold transition hover:shadow-2xl hover-scale" style="background: white; color: #1E40AF;">
<i class="fas fa-tachometer-alt mr-2"></i>Go to Dashboard
</a>
<a href="modules/membership/index.php" class="px-10 py-5 rounded-full border-3 border-white text-white text-lg font-semibold transition hover:bg-white hover-scale" style="border: 3px solid white;" onmouseover="this.style.color='#1E40AF'" onmouseout="this.style.color='white'">
<i class="fas fa-users mr-2"></i>Manage Members
</a>
<a href="logout.php" class="px-10 py-5 rounded-full text-lg font-semibold transition hover:shadow-2xl hover-scale" style="background: rgba(255,255,255,0.2); backdrop-filter: blur(10px); color: white; border: 2px solid white;">
<i class="fas fa-sign-out-alt mr-2"></i>Logout
</a>
<?php else: ?>
<!-- Not logged in -->
<a href="login.php" class="px-10 py-5 rounded-full text-lg font-semibold transition hover:shadow-2xl hover-scale" style="background: white; color: #1E40AF;">
<i class="fas fa-sign-in-alt mr-2"></i>Login
</a>
<a href="event-checkin.php" class="px-10 py-5 rounded-full text-lg font-semibold transition hover:shadow-2xl hover-scale" style="background: linear-gradient(135deg, #10B981 0%, #059669 100%); color: white;">
<i class="fas fa-qrcode mr-2"></i>Event Check-in
</a>
<a href="public-search.php" class="px-10 py-5 rounded-full text-lg font-semibold transition hover:shadow-2xl hover-scale" style="background: rgba(255,255,255,0.2); backdrop-filter: blur(10px); color: white; border: 2px solid white;">
<i class="fas fa-search mr-2"></i>Search Membership
</a>
<?php endif; ?>
</div>
</div>
</div>
</section>
<!-- Quick Actions Section -->
<section class="py-20 bg-gray-50">
<div class="container mx-auto px-4">
<div class="max-w-6xl mx-auto">
<div class="text-center mb-16">
<h2 class="text-4xl md:text-5xl font-bold text-gradient mb-4">Quick Actions</h2>
<p class="text-xl text-gray-600">Everything you need, just a click away</p>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8">
<!-- Search Members -->
<a href="public-search.php" class="card-gradient rounded-2xl p-8 text-center hover-scale shadow-lg hover:shadow-2xl transition group">
<div class="w-20 h-20 mx-auto mb-6 rounded-2xl flex items-center justify-center" style="background: linear-gradient(135deg, #1E40AF 0%, #9333EA 100%);">
<i class="fas fa-search text-white text-3xl"></i>
</div>
<h3 class="text-2xl font-bold text-gray-800 mb-3 group-hover:text-blue-700 transition">Search</h3>
<p class="text-gray-600">Find members instantly</p>
</a>
<!-- Events -->
<a href="conference.php" class="card-gradient rounded-2xl p-8 text-center hover-scale shadow-lg hover:shadow-2xl transition group">
<div class="w-20 h-20 mx-auto mb-6 rounded-2xl flex items-center justify-center" style="background: linear-gradient(135deg, #F97316 0%, #FBBF24 100%);">
<i class="fas fa-calendar-alt text-white text-3xl"></i>
</div>
<h3 class="text-2xl font-bold text-gray-800 mb-3 group-hover:text-orange-600 transition">Events</h3>
<p class="text-gray-600">View upcoming events</p>
</a>
<!-- Features -->
<a href="features.php" class="card-gradient rounded-2xl p-8 text-center hover-scale shadow-lg hover:shadow-2xl transition group">
<div class="w-20 h-20 mx-auto mb-6 rounded-2xl flex items-center justify-center" style="background: linear-gradient(135deg, #9333EA 0%, #F97316 100%);">
<i class="fas fa-star text-white text-3xl"></i>
</div>
<h3 class="text-2xl font-bold text-gray-800 mb-3 group-hover:text-purple-600 transition">Features</h3>
<p class="text-gray-600">Explore capabilities</p>
</a>
<!-- About -->
<a href="about.php" class="card-gradient rounded-2xl p-8 text-center hover-scale shadow-lg hover:shadow-2xl transition group">
<div class="w-20 h-20 mx-auto mb-6 rounded-2xl flex items-center justify-center" style="background: linear-gradient(135deg, #FBBF24 0%, #F97316 100%);">
<i class="fas fa-info-circle text-white text-3xl"></i>
</div>
<h3 class="text-2xl font-bold text-gray-800 mb-3 group-hover:text-yellow-600 transition">About</h3>
<p class="text-gray-600">Learn more about us</p>
</a>
</div>
</div>
</div>
</section>
<!-- Footer -->
<footer class="bg-gradient-to-r from-gray-900 via-gray-800 to-gray-900 text-white py-12">
<div class="container mx-auto px-4">
<div class="grid grid-cols-1 md:grid-cols-3 gap-8 mb-8">
<div>
<div class="flex items-center space-x-3 mb-4">
<div class="w-12 h-12 rounded-xl flex items-center justify-center" style="background: linear-gradient(135deg, #1E40AF 0%, #F97316 100%);">
<i class="fas fa-church text-white text-xl"></i>
</div>
<h3 class="text-2xl font-bold text-gradient-white"><?php echo htmlspecialchars($settings['site_title']); ?></h3>
</div>
<p class="text-gray-400">Modern Church Membership Management System</p>
</div>
<div>
<h4 class="text-lg font-bold mb-4 text-white">Quick Links</h4>
<ul class="space-y-2">
<li><a href="index.php" class="text-gray-400 hover:text-white transition">Home</a></li>
<li><a href="features.php" class="text-gray-400 hover:text-orange-400 transition">Features</a></li>
<li><a href="about.php" class="text-gray-400 hover:text-purple-400 transition">About</a></li>
<li><a href="contact.php" class="text-gray-400 hover:text-yellow-400 transition">Contact</a></li>
</ul>
</div>
<div>
<h4 class="text-lg font-bold mb-4 text-white">System</h4>
<ul class="space-y-2">
<li><a href="login.php" class="text-gray-400 hover:text-blue-400 transition">Login</a></li>
<li><a href="public-search.php" class="text-gray-400 hover:text-orange-400 transition">Search Members</a></li>
<li><a href="conference.php" class="text-gray-400 hover:text-purple-400 transition">Events</a></li>
</ul>
</div>
</div>
<hr class="border-gray-700 my-8">
<div class="flex flex-col md:flex-row justify-between items-center">
<p class="text-gray-400 text-sm">
© <?php echo date('Y'); ?> <?php echo htmlspecialchars($settings['site_title']); ?>. All rights reserved.
</p>
<div class="flex space-x-4 mt-4 md:mt-0">
<a href="#" class="text-gray-400 hover:text-blue-400 transition">
<i class="fab fa-facebook text-xl"></i>
</a>
<a href="#" class="text-gray-400 hover:text-orange-400 transition">
<i class="fab fa-twitter text-xl"></i>
</a>
<a href="#" class="text-gray-400 hover:text-purple-400 transition">
<i class="fab fa-instagram text-xl"></i>
</a>
</div>
</div>
</div>
</footer>
<script>
function toggleMobileMenu() {
const menu = document.getElementById('mobileMenu');
menu.classList.toggle('hidden');
}
</script>
<?php
// Include Chat Hub Widget (Admin Chat + AI Chatbot)
if (file_exists(__DIR__ . '/includes/chat-hub-widget.php')) {
include 'includes/chat-hub-widget.php';
}
?>
</body>
</html>
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists