38394-vm/about.php
2026-02-14 02:57:23 +00:00

95 lines
2.7 KiB
PHP

<?php
require_once 'db/config.php';
// Language configuration
$lang = $_GET['lang'] ?? 'ar';
if (!in_array($lang, ['en', 'ar'])) $lang = 'ar';
$dir = ($lang === 'ar') ? 'rtl' : 'ltr';
// UI Text
$texts = [
'en' => [
'title' => 'About Us',
'subtitle' => 'Learn more about our mission, vision, and values.',
'lang_name' => 'العربية',
'lang_code' => 'ar',
'hero_title' => 'About Our Organization',
'hero_sub' => 'Dedicated to making a difference in the world.',
'admin_panel' => 'Admin Panel',
'home' => 'Home',
'about_us' => 'About Us',
'contact_us' => 'Contact Us',
],
'ar' => [
'title' => 'من نحن',
'subtitle' => 'تعرف على المزيد حول مهمتنا ورؤيتنا وقيمنا.',
'lang_name' => 'English',
'lang_code' => 'en',
'hero_title' => 'حول منظمتنا',
'hero_sub' => 'مكرسون لإحداث فرق في العالم.',
'admin_panel' => 'لوحة التحكم',
'home' => 'الرئيسية',
'about_us' => 'من نحن',
'contact_us' => 'اتصل بنا',
]
];
$t = $texts[$lang];
// Database fetch
$pdo = db();
$profile = $pdo->query("SELECT * FROM org_profile LIMIT 1")->fetch(PDO::FETCH_ASSOC);
require_once 'includes/header.php';
?>
<style>
.hero {
padding: 4rem 0;
background: #fff;
border-bottom: 1px solid #e5e7eb;
text-align: center;
}
.hero h1 {
font-size: 2.5rem;
font-weight: 800;
}
.page-content {
line-height: 1.8;
}
.page-content h2 {
font-weight: 700;
margin-top: 2rem;
margin-bottom: 1rem;
}
</style>
<header class="hero">
<div class="container">
<h1><?= $t['hero_title'] ?></h1>
<p class="lead text-muted"><?= $t['hero_sub'] ?></p>
</div>
</header>
<main class="container py-5">
<div class="row">
<div class="col-lg-8 mx-auto">
<div class="bg-white p-5 rounded-4 shadow-sm page-content">
<?php
$content = $lang === 'ar' ? $profile['description_ar'] : $profile['description_en'];
if (empty(trim($content))) {
echo "<p class="text-center text-muted">" . ($lang === 'ar' ? 'لم يتم إضافة المحتوى بعد. يرجى إضافته من لوحة التحكم.' : 'Content has not been added yet. Please add it from the admin panel.') . "</p>";
} else {
echo $content;
}
?>
</div>
</div>
</div>
</main>
<?php require_once 'includes/footer.php'; ?>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>