Autosave: 20260422-044403
This commit is contained in:
parent
8cadf8aa40
commit
69f39cc9cd
@ -20,7 +20,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
'wablas_template_invoice', 'wablas_template_daily_report',
|
||||
'wablas_template_created', 'wablas_template_pending', 'wablas_template_accepted', 'wablas_template_completed', 'wablas_template_rejected',
|
||||
'smtp_host', 'smtp_port', 'smtp_user', 'smtp_pass', 'smtp_secure', 'mail_from', 'mail_from_name',
|
||||
'thawani_enabled', 'thawani_mode', 'thawani_publishable_key', 'thawani_secret_key', 'thawani_success_url', 'thawani_cancel_url'
|
||||
'thawani_enabled', 'thawani_mode', 'thawani_publishable_key', 'thawani_secret_key', 'thawani_success_url', 'thawani_cancel_url',
|
||||
'privacy_policy_content', 'terms_conditions_content'
|
||||
];
|
||||
|
||||
$stmt = $pdo->prepare("INSERT INTO settings (setting_key, setting_value) VALUES (?, ?) ON DUPLICATE KEY UPDATE setting_value = VALUES(setting_value)");
|
||||
|
||||
@ -152,7 +152,9 @@ try {
|
||||
('thawani_publishable_key', ''),
|
||||
('thawani_secret_key', ''),
|
||||
('thawani_success_url', ''),
|
||||
('thawani_cancel_url', '')");
|
||||
('thawani_cancel_url', ''),
|
||||
('privacy_policy_content', ''),
|
||||
('terms_conditions_content', '')");
|
||||
|
||||
@file_put_contents($flagFileV8, '1');
|
||||
}
|
||||
|
||||
@ -1,20 +1,41 @@
|
||||
<?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>
|
||||
© <?= 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">
|
||||
<div class="d-flex justify-content-between align-items-center flex-wrap gap-2">
|
||||
<div>
|
||||
© <?= date('Y') ?> <strong><?= h(current_lang() === 'ar' ? get_setting('company_name_ar', 'حلوى الريامي') : get_setting('company_name_en', 'Al Riyami Sweets')) ?></strong>. <?= h(tr('جميع الحقوق محفوظة.', 'All rights reserved.')) ?>
|
||||
© <?= date('Y') ?> <strong><?= h($companyDisplayName) ?></strong>. <?= h(tr('جميع الحقوق محفوظة.', 'All rights reserved.')) ?>
|
||||
</div>
|
||||
<div class="mt-2 mt-md-0">
|
||||
<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 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://flatlogic.com" target="_blank" class="text-decoration-none fw-semibold">Flatlogic</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
@ -58,4 +79,4 @@ $isPublic = !isset($user) || !$user;
|
||||
</script>
|
||||
<script src="assets/js/main.js?v=<?= h(date('YmdHi')) ?>"></script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@ -49,6 +49,11 @@
|
||||
<?= h(tr('البريد الإلكتروني', 'Email')) ?>
|
||||
</button>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link" id="settings-policies-tab" data-bs-toggle="tab" data-bs-target="#settings-policies-pane" type="button" role="tab" aria-controls="settings-policies-pane" aria-selected="false">
|
||||
<?= h(tr('السياسات والشروط', 'Policies')) ?>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content" id="settingsTabsContent">
|
||||
@ -235,6 +240,27 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="settings-policies-pane" role="tabpanel" aria-labelledby="settings-policies-tab" tabindex="0">
|
||||
<div class="row g-3">
|
||||
<div class="col-12">
|
||||
<div class="alert alert-light border rounded-4 mb-0">
|
||||
<div class="fw-semibold mb-1"><?= h(tr('روابط التذييل', 'Footer links')) ?></div>
|
||||
<div class="small text-muted mb-0"><?= h(tr('سيتم ربط صفحات سياسة الخصوصية والشروط والأحكام تلقائياً في تذييل النظام والمتجر.', 'Privacy Policy and Terms pages will be linked automatically in the admin and store footer.')) ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<label class="form-label"><?= h(tr('سياسة الخصوصية', 'Privacy Policy')) ?></label>
|
||||
<textarea class="form-control" name="privacy_policy_content" rows="12" placeholder="<?= h(tr('أدخل نص سياسة الخصوصية هنا...', 'Enter the privacy policy content here...')) ?>"><?= h(get_setting('privacy_policy_content')) ?></textarea>
|
||||
<div class="form-text"><?= h(tr('يظهر هذا النص في صفحة سياسة الخصوصية العامة.', 'This content appears on the public Privacy Policy page.')) ?></div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<label class="form-label"><?= h(tr('الشروط والأحكام', 'Terms & Conditions')) ?></label>
|
||||
<textarea class="form-control" name="terms_conditions_content" rows="12" placeholder="<?= h(tr('أدخل نص الشروط والأحكام هنا...', 'Enter the terms and conditions content here...')) ?>"><?= h(get_setting('terms_conditions_content')) ?></textarea>
|
||||
<div class="form-text"><?= h(tr('يظهر هذا النص في صفحة الشروط والأحكام العامة.', 'This content appears on the public Terms & Conditions page.')) ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
||||
35
privacy-policy.php
Normal file
35
privacy-policy.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/includes/app.php';
|
||||
|
||||
$forcePublic = true;
|
||||
$pageTitle = tr('سياسة الخصوصية', 'Privacy Policy');
|
||||
$metaDescription = tr('اطّلع على سياسة الخصوصية الخاصة بنا وكيفية التعامل مع البيانات في المتجر والنظام.', 'Read our privacy policy and how data is handled across the store and admin system.');
|
||||
$privacyContent = trim((string) get_setting('privacy_policy_content'));
|
||||
|
||||
require __DIR__ . '/includes/header.php';
|
||||
?>
|
||||
<section class="py-5">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-lg-10 col-xl-8">
|
||||
<div class="card border-0 shadow-sm rounded-4 overflow-hidden">
|
||||
<div class="card-body p-4 p-md-5">
|
||||
<div class="mb-4">
|
||||
<span class="badge text-bg-light border mb-3"><?= h(tr('صفحة قانونية', 'Legal page')) ?></span>
|
||||
<h1 class="h2 fw-bold mb-3"><?= h(tr('سياسة الخصوصية', 'Privacy Policy')) ?></h1>
|
||||
<p class="text-muted mb-0"><?= h(tr('آخر تحديث يتم بواسطة إدارة النظام عند حفظ النص من الإعدادات.', 'This page is updated by the admin team whenever the content is saved from Settings.')) ?></p>
|
||||
</div>
|
||||
|
||||
<?php if ($privacyContent !== ''): ?>
|
||||
<article class="legal-content lh-lg"><?= nl2br(h($privacyContent)) ?></article>
|
||||
<?php else: ?>
|
||||
<div class="alert alert-warning rounded-4 mb-0">
|
||||
<strong><?= h(tr('لم تتم إضافة المحتوى بعد.', 'Content not added yet.')) ?></strong>
|
||||
<div class="small mt-2"><?= h(tr('يمكنك إضافته من الإعدادات ← السياسات والشروط.', 'You can add it from Settings → Policies.')) ?></div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<?php require __DIR__ . '/includes/footer.php'; ?>
|
||||
35
terms-conditions.php
Normal file
35
terms-conditions.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/includes/app.php';
|
||||
|
||||
$forcePublic = true;
|
||||
$pageTitle = tr('الشروط والأحكام', 'Terms & Conditions');
|
||||
$metaDescription = tr('راجع الشروط والأحكام الخاصة باستخدام المتجر والخدمات المقدمة عبر النظام.', 'Review the terms and conditions for using the online store and related services.');
|
||||
$termsContent = trim((string) get_setting('terms_conditions_content'));
|
||||
|
||||
require __DIR__ . '/includes/header.php';
|
||||
?>
|
||||
<section class="py-5">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-lg-10 col-xl-8">
|
||||
<div class="card border-0 shadow-sm rounded-4 overflow-hidden">
|
||||
<div class="card-body p-4 p-md-5">
|
||||
<div class="mb-4">
|
||||
<span class="badge text-bg-light border mb-3"><?= h(tr('صفحة قانونية', 'Legal page')) ?></span>
|
||||
<h1 class="h2 fw-bold mb-3"><?= h(tr('الشروط والأحكام', 'Terms & Conditions')) ?></h1>
|
||||
<p class="text-muted mb-0"><?= h(tr('آخر تحديث يتم بواسطة إدارة النظام عند حفظ النص من الإعدادات.', 'This page is updated by the admin team whenever the content is saved from Settings.')) ?></p>
|
||||
</div>
|
||||
|
||||
<?php if ($termsContent !== ''): ?>
|
||||
<article class="legal-content lh-lg"><?= nl2br(h($termsContent)) ?></article>
|
||||
<?php else: ?>
|
||||
<div class="alert alert-warning rounded-4 mb-0">
|
||||
<strong><?= h(tr('لم تتم إضافة المحتوى بعد.', 'Content not added yet.')) ?></strong>
|
||||
<div class="small mt-2"><?= h(tr('يمكنك إضافته من الإعدادات ← السياسات والشروط.', 'You can add it from Settings → Policies.')) ?></div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<?php require __DIR__ . '/includes/footer.php'; ?>
|
||||
Loading…
x
Reference in New Issue
Block a user