38808-vm/includes/footer.php
2026-02-28 03:56:18 +00:00

66 lines
2.5 KiB
PHP

<?php if (isLoggedIn()): ?>
</div><!-- Close main-content -->
<?php endif; ?>
<footer class="footer mt-auto py-4 bg-white border-top">
<div class="container-fluid px-md-4 text-center">
<div class="d-flex flex-column align-items-center">
<span class="text-muted small mb-1">
&copy; <?= date('Y') ?> <?= htmlspecialchars($charity_info['charity_name'] ?? 'نظام إدارة البريد') ?>. جميع الحقوق محفوظة.
</span>
<div class="d-flex align-items-center gap-3">
<span class="badge bg-secondary opacity-50 fw-normal" style="font-size: 0.65rem;">نسخة النظام 1.2.0</span>
<?php if (isAdmin()): ?>
<a href="charity-settings.php" onclick="localStorage.setItem('activeSettingsTab', '#general');" class="text-muted text-decoration-none small hover-primary border-start ps-3">
<i class="fas fa-cog me-1"></i> الإعدادات
</a>
<a href="charity-settings.php#logs" onclick="localStorage.setItem('activeSettingsTab', '#logs');" class="text-muted text-decoration-none small hover-primary border-start ps-3">
<i class="fas fa-history me-1"></i> سجل المراسلات
</a>
<?php endif; ?>
</div>
</div>
</div>
</footer>
<style>
.hover-primary:hover {
color: #0d6efd !important;
}
.footer .border-start {
border-color: rgba(0,0,0,0.1) !important;
}
</style>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
<script src="assets/js/main.js?v=<?= time() ?>"></script>
<script>
// Sidebar Toggle for Mobile
document.getElementById('sidebarToggle')?.addEventListener('click', function() {
document.getElementById('sidebar').classList.toggle('show');
});
// Theme Switcher
const checkbox = document.getElementById('checkbox');
if (checkbox) {
checkbox.addEventListener('change', () => {
const theme = checkbox.checked ? 'dark' : 'light';
document.documentElement.setAttribute('data-bs-theme', theme);
// Save preference to database
fetch('api/update_theme.php', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ theme: theme })
});
});
}
</script>
</body>
</html>
<?php
if (ob_get_level() > 0) {
ob_end_flush();
}
?>