39728-vm/includes/footer.php
2026-04-23 17:29:21 +00:00

83 lines
3.7 KiB
PHP

<?php
$user = current_user();
$isPublic = !isset($user) || !$user;
$companyDisplayName = current_lang() === 'ar' ? get_setting('company_name_ar', 'حلوى الريامي') : get_setting('company_name_en', 'Al Riyami Sweets');
$privacyUrl = url_for('privacy-policy.php');
$termsUrl = url_for('terms-conditions.php');
?>
<?php if ($isPublic): ?>
</main>
<footer class="bg-white border-top mt-4 py-4 px-3 text-muted small">
<div class="container">
<div class="d-flex justify-content-between align-items-center flex-wrap gap-2">
<div>
&copy; <?= date('Y') ?> <strong><?= h($companyDisplayName) ?></strong>. <?= h(tr('جميع الحقوق محفوظة.', 'All rights reserved.')) ?>
</div>
<div class="d-flex align-items-center flex-wrap gap-3">
<a href="<?= h($privacyUrl) ?>" class="text-decoration-none"><?= h(tr('سياسة الخصوصية', 'Privacy Policy')) ?></a>
<a href="<?= h($termsUrl) ?>" class="text-decoration-none"><?= h(tr('الشروط والأحكام', 'Terms & Conditions')) ?></a>
<span class="text-secondary"><?= h(tr('تم التطوير بواسطة', 'Developed via')) ?> </span><a href="https://flatlogic.com" target="_blank" class="text-decoration-none fw-semibold">Flatlogic</a>
</div>
</div>
</div>
</footer>
<?php else: ?>
</div> <!-- /.container-fluid -->
<!-- App Footer -->
<footer class="bg-white border-top mt-auto py-3 px-4 text-muted small">
<div class="d-flex justify-content-between align-items-center flex-wrap gap-2">
<div>
&copy; <?= date('Y') ?> <strong><?= h($companyDisplayName) ?></strong>. <?= h(tr('جميع الحقوق محفوظة.', 'All rights reserved.')) ?>
</div>
<div class="d-flex align-items-center flex-wrap gap-3 mt-2 mt-md-0">
<a href="<?= h($privacyUrl) ?>" class="text-decoration-none"><?= h(tr('سياسة الخصوصية', 'Privacy Policy')) ?></a>
<a href="<?= h($termsUrl) ?>" class="text-decoration-none"><?= h(tr('الشروط والأحكام', 'Terms & Conditions')) ?></a>
<div>
<span class="text-secondary"><?= h(tr('تم التطوير بواسطة', 'Developed via')) ?> </span><a href="https://omanapp.cloud" target="_blank" class="text-decoration-none fw-semibold">Oman App</a>
</div>
</div>
</div>
</footer>
<!-- /App Footer -->
</div> <!-- /#page-content-wrapper -->
</div> <!-- /#wrapper -->
<?php endif; ?>
<?php require_once __DIR__ . "/footer_settings.php"; ?>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
<script>
// Menu Toggle Script
document.addEventListener('DOMContentLoaded', function() {
var toggleBtn = document.getElementById("menu-toggle");
if (toggleBtn) {
toggleBtn.addEventListener('click', function(e) {
e.preventDefault();
document.getElementById("wrapper").classList.toggle("toggled");
});
}
});
</script>
<script>
function confirmSwal(e, msg) {
e.preventDefault();
const form = e.target;
Swal.fire({
title: msg,
icon: 'warning',
showCancelButton: true,
confirmButtonText: '<?= h(tr("نعم", "Yes")) ?>',
cancelButtonText: '<?= h(tr("إلغاء", "Cancel")) ?>',
confirmButtonColor: '#d33'
}).then((result) => {
if (result.isConfirmed) {
form.submit();
}
});
}
</script>
<script src="assets/js/main.js?v=<?= h(date('YmdHi')) ?>"></script>
</body>
</html>