/var/www/vhosts/m-auto.co/httpdocs/admin
NameSizeModeActions
assets/-0755rm
includes/-0755rm
7-6-2026.zip102060644editdlrm
about_edit.php38990644editdlrm
about_process.php13670644editdlrm
auth.php6840644editdlrm
bookings.php53670644editdlrm
booking_delete.php9240644editdlrm
branches.php24700644editdlrm
branch_delete.php12900644editdlrm
branch_form.php46940644editdlrm
branch_process.php12330644editdlrm
brands.php25780644editdlrm
brand_delete.php13270644editdlrm
brand_form.php23690644editdlrm
brand_process.php16600644editdlrm
cars.php69460644editdlrm
car_delete.php28860644editdlrm
car_form.php403480644editdlrm
car_image_actions.php51420644editdlrm
car_process.php104260644editdlrm
categories.php21670644editdlrm
category_delete.php7460644editdlrm
category_form.php16070644editdlrm
category_process.php9430644editdlrm
dashboard.php49650644editdlrm
index.php27130644editdlrm
login_process.php15320644editdlrm
logout.php1000644editdlrm
news.php34480644editdlrm
news_delete.php7710644editdlrm
news_form.php67690644editdlrm
news_process.php25270644editdlrm
offers.php28100644editdlrm
offer_delete.php13270644editdlrm
offer_form.php45730644editdlrm
offer_process.php21150644editdlrm
settings.php52170644editdlrm
settings_process.php6920644editdlrm
slider.php35290644editdlrm
slider_delete.php13450644editdlrm
slider_form.php45290644editdlrm
slider_process.php19830644editdlrm
themes.php47030644editdlrm
theme_delete.php13320644editdlrm
theme_form.php15220644editdlrm
theme_process.php17850644editdlrm
users.php44800644editdlrm
user_delete.php10550644editdlrm
user_form.php54630644editdlrm
user_process.php31930644editdlrm
videos.php49420644editdlrm
video_delete.php17170644editdlrm
video_form.php71810644editdlrm
video_process.php33360644editdlrm
Edit: /var/www/vhosts/m-auto.co/httpdocs/admin/themes.php (4703B)
ليس لديك الصلاحية لعرض هذه الصفحة.
"; include 'includes/footer.php'; exit; } $activeCount = 0; $activeResult = $conn->query("SELECT COUNT(*) AS total FROM `themes` WHERE `is_active` = 1"); if ($activeResult) { $activeRow = $activeResult->fetch_assoc(); if ($activeRow) { $activeCount = (int) $activeRow['total']; } } $defaultThemes = [ ['name' => 'الثيم الافتراضي', 'css_file' => 'style.css'], ['name' => 'ثيم الكريسماس', 'css_file' => 'christmas.css'], ['name' => 'ثيم رمضان', 'css_file' => 'ramadan.css'], ['name' => 'ثيم نصر أكتوبر', 'css_file' => 'october_war.css'], ['name' => 'ثيم عيد الفطر', 'css_file' => 'eid_al_fitr.css'], ['name' => 'ثيم عيد الأضحى', 'css_file' => 'eid_al_adha.css'] ]; foreach ($defaultThemes as $defaultTheme) { $existingStmt = $conn->prepare("SELECT `id`, `name` FROM `themes` WHERE `css_file` = ? LIMIT 1"); $existingStmt->bind_param('s', $defaultTheme['css_file']); $existingStmt->execute(); $existingResult = $existingStmt->get_result(); $existingTheme = $existingResult ? $existingResult->fetch_assoc() : null; if ($existingTheme) { if ($existingTheme['name'] !== $defaultTheme['name']) { $updateStmt = $conn->prepare("UPDATE `themes` SET `name` = ? WHERE `id` = ?"); $updateStmt->bind_param('si', $defaultTheme['name'], $existingTheme['id']); $updateStmt->execute(); } } else { $isActive = $defaultTheme['css_file'] === 'style.css' && $activeCount === 0 ? 1 : 0; $insertStmt = $conn->prepare("INSERT INTO `themes` (`name`, `css_file`, `is_active`) VALUES (?, ?, ?)"); $insertStmt->bind_param('ssi', $defaultTheme['name'], $defaultTheme['css_file'], $isActive); $insertStmt->execute(); if ($isActive === 1) { $activeCount = 1; } } } // Handle theme activation if (isset($_GET['activate']) && is_numeric($_GET['activate'])) { $theme_id = $_GET['activate']; // Deactivate all themes $conn->query("UPDATE `themes` SET `is_active` = 0"); // Activate the selected theme $stmt = $conn->prepare("UPDATE `themes` SET `is_active` = 1 WHERE `id` = ?"); $stmt->bind_param('i', $theme_id); $stmt->execute(); // Update the active_theme setting $stmt = $conn->prepare("UPDATE `settings` SET `setting_value` = ? WHERE `setting_key` = 'active_theme'"); $stmt->bind_param('s', $theme_id); $stmt->execute(); echo "
تم تفعيل الثيم بنجاح.
"; } // Fetch all themes $result = $conn->query("SELECT * FROM `themes`"); $themes = $result->fetch_all(MYSQLI_ASSOC); ?>

إدارة الثيمات

إضافة ثيم جديد
اسم الثيم ملف الـ CSS الحالة إجراءات
نشط غير نشط تفعيل تعديل حذف