Sindbad~EG File Manager
<!-- Footer -->
<footer class="bg-white border-t border-gray-200 mt-auto">
<div class="container mx-auto px-4 py-6">
<div class="flex flex-col md:flex-row justify-between items-center text-sm text-gray-600">
<div class="mb-4 md:mb-0">
<p>© <?php echo date('Y'); ?> <?php echo APP_NAME; ?>. All rights reserved.</p>
</div>
<div class="flex space-x-6">
<a href="#" class="hover:text-blue-500 transition">Help</a>
<a href="#" class="hover:text-blue-500 transition">Privacy Policy</a>
<a href="#" class="hover:text-blue-500 transition">Terms of Service</a>
</div>
</div>
</div>
</footer>
<!-- Scripts -->
<script>
// Toast Notification Function
function showToast(message, type = 'info') {
const toast = document.createElement('div');
toast.className = `fixed bottom-4 right-4 px-6 py-3 rounded-lg shadow-lg text-white z-50 animate-slide-up ${
type === 'success' ? 'bg-green-500' :
type === 'error' ? 'bg-red-500' :
type === 'warning' ? 'bg-yellow-500' :
'bg-blue-500'
}`;
toast.textContent = message;
document.body.appendChild(toast);
setTimeout(() => {
toast.style.transition = 'opacity 0.5s';
toast.style.opacity = '0';
setTimeout(() => toast.remove(), 500);
}, 3000);
}
// Confirm Dialog
function confirmAction(message, callback) {
if (confirm(message)) {
callback();
}
}
// Loading Spinner
function showLoader() {
const loader = document.createElement('div');
loader.id = 'pageLoader';
loader.className = 'fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50';
loader.innerHTML = '<div class="bg-white rounded-lg p-8"><i class="fas fa-spinner fa-spin text-4xl text-blue-500"></i></div>';
document.body.appendChild(loader);
}
function hideLoader() {
document.getElementById('pageLoader')?.remove();
}
// Format Date
function formatDate(dateString) {
const date = new Date(dateString);
return date.toLocaleDateString('en-US', { year: 'numeric', month: 'short', day: 'numeric' });
}
// Export Table
function exportTable(tableId, filename, type = 'csv') {
const table = document.getElementById(tableId);
if (!table) return;
if (type === 'csv') {
let csv = [];
const rows = table.querySelectorAll('tr');
for (let row of rows) {
const cols = row.querySelectorAll('td, th');
const csvRow = [];
for (let col of cols) {
csvRow.push('"' + col.textContent.trim().replace(/"/g, '""') + '"');
}
csv.push(csvRow.join(','));
}
const csvContent = csv.join('\n');
const blob = new Blob([csvContent], { type: 'text/csv' });
const url = window.URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = filename + '.csv';
a.click();
window.URL.revokeObjectURL(url);
}
}
</script>
<style>
@keyframes slide-up {
from {
transform: translateY(100%);
opacity: 0;
}
to {
transform: translateY(0);
opacity: 1;
}
}
.animate-slide-up {
animation: slide-up 0.3s ease-out;
}
</style>
<?php
// Include appropriate chat widget based on user type
if (isLoggedIn()) {
$userAccessLevel = $_SESSION['access_level'] ?? '';
// Admin users get inbox widget to receive member chats
if (in_array($userAccessLevel, ['superuser', 'admin', 'regional_admin', 'district_admin'])) {
if (file_exists(__DIR__ . '/admin-chat-inbox.php')) {
include __DIR__ . '/admin-chat-inbox.php';
}
} else {
// Regular members get chat hub widget
if (file_exists(__DIR__ . '/chat-hub-widget.php')) {
include __DIR__ . '/chat-hub-widget.php';
}
}
} else {
// Public visitors get chat hub widget
if (file_exists(__DIR__ . '/chat-hub-widget.php')) {
include __DIR__ . '/chat-hub-widget.php';
}
}
?>
</body>
</html>
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists