55 lines
1.9 KiB
PHP
55 lines
1.9 KiB
PHP
<?php if (isLoggedIn()): ?>
|
|
</div><!-- Close main-content -->
|
|
<?php endif; ?>
|
|
|
|
<footer class="footer mt-auto py-3 bg-white border-top">
|
|
<div class="container-fluid px-md-4 text-center">
|
|
<span class="text-muted small">
|
|
© <?= date('Y') ?> <?= htmlspecialchars($charity_info['charity_name'] ?? 'نظام إدارة البريد') ?>. جميع الحقوق محفوظة.
|
|
</span>
|
|
<?php if (isAdmin()): ?>
|
|
<div class="mt-2">
|
|
<ul class="list-inline mb-0">
|
|
<li class="list-inline-item">
|
|
<a href="charity-settings.php" class="text-muted text-decoration-none small hover-primary">
|
|
<i class="fas fa-cog me-1"></i> الإعدادات
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
</footer>
|
|
|
|
<style>
|
|
.hover-primary:hover {
|
|
color: #0d6efd !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>
|