From 36d1266f5e586f6ce0a5a3ceee6147acc34bbefb Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Sun, 1 Mar 2026 05:44:43 +0000 Subject: [PATCH] add slogan --- charity-settings.php | 19 +++++++++++++------ db/migrations/017_add_slogan_to_settings.sql | 2 ++ includes/header.php | 14 +++++++++++--- includes/settings.php | 3 +++ print_inbound.php | 20 +++++++++++++------- print_outbound.php | 20 +++++++++++++------- 6 files changed, 55 insertions(+), 23 deletions(-) create mode 100644 db/migrations/017_add_slogan_to_settings.sql diff --git a/charity-settings.php b/charity-settings.php index 62354a6..1a2efc5 100644 --- a/charity-settings.php +++ b/charity-settings.php @@ -35,6 +35,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['update_charity'])) { $_SESSION['error'] = 'عذراً، ليس لديك الصلاحية لتعديل الإعدادات'; } else { $charity_name = $_POST['charity_name']; + $charity_slogan = $_POST['charity_slogan'] ?? null; $charity_email = $_POST['charity_email']; $charity_phone = $_POST['charity_phone']; $charity_address = $_POST['charity_address']; @@ -60,8 +61,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['update_charity'])) { } } - $stmt = db()->prepare("UPDATE charity_settings SET charity_name = ?, charity_email = ?, charity_phone = ?, charity_address = ?, charity_logo = ?, charity_favicon = ? WHERE id = 1"); - $stmt->execute([$charity_name, $charity_email, $charity_phone, $charity_address, $charity_logo, $charity_favicon]); + $stmt = db()->prepare("UPDATE charity_settings SET charity_name = ?, charity_slogan = ?, charity_email = ?, charity_phone = ?, charity_address = ?, charity_logo = ?, charity_favicon = ? WHERE id = 1"); + $stmt->execute([$charity_name, $charity_slogan, $charity_email, $charity_phone, $charity_address, $charity_logo, $charity_favicon]); $_SESSION['success'] = 'تم تحديث إعدادات النظام بنجاح'; } redirect('charity-settings.php'); @@ -241,14 +242,20 @@ $post_max = ini_get('post_max_size'); +
+ + +
+ +
-
-
- - +
+ + +
diff --git a/db/migrations/017_add_slogan_to_settings.sql b/db/migrations/017_add_slogan_to_settings.sql new file mode 100644 index 0000000..d4c0e62 --- /dev/null +++ b/db/migrations/017_add_slogan_to_settings.sql @@ -0,0 +1,2 @@ +-- Add slogan field to charity_settings table +ALTER TABLE charity_settings ADD COLUMN IF NOT EXISTS charity_slogan VARCHAR(255) DEFAULT NULL AFTER charity_name; diff --git a/includes/header.php b/includes/header.php index 29cf2e0..dfb990d 100644 --- a/includes/header.php +++ b/includes/header.php @@ -293,7 +293,7 @@ if (!isLoggedIn() && basename($_SERVER['PHP_SELF']) !== 'login.php' && basename( diff --git a/print_outbound.php b/print_outbound.php index af16015..5a88d54 100644 --- a/print_outbound.php +++ b/print_outbound.php @@ -42,6 +42,7 @@ $settings = get_settings(); $logo = !empty($settings['site_logo']) ? $settings['site_logo'] : ''; $site_name = $settings['site_name']; $site_address = $settings['site_address']; +$site_slogan = $settings['site_slogan']; /** * Convert Gregorian date to Hijri @@ -134,8 +135,8 @@ $hijriDate = gregorianToHijri($mail['date_registered']); /* Header Style */ .header-container { border-bottom: 3px double #00827F; - padding-bottom: 10px; - margin-bottom: 20px; + padding-bottom: 5px; + margin-bottom: 2px; display: flex; justify-content: space-between; align-items: flex-start; @@ -144,16 +145,18 @@ $hijriDate = gregorianToHijri($mail['date_registered']); max-height: 80px; } .header-info { text-align: left; } - .site-name { font-size: 24px; font-weight: bold; color: #00827F; margin-bottom: 5px; } + .site-name { font-size: 24px; font-weight: bold; color: #00827F; margin-bottom: 2px; } + .site-slogan { font-size: 14px; font-weight: bold; color: #00827F; margin-bottom: 2px; } /* Meta & Content */ .mail-meta { - margin-bottom: 25px; + margin-bottom: 10px; display: flex; justify-content: space-between; - background: #f9f9f9; - padding: 12px; - border: 1px solid #eee; + background: transparent; + padding: 2px 0; + border: none; + font-size: 14px; } .mail-content { font-size: 18px; @@ -261,6 +264,9 @@ $hijriDate = gregorianToHijri($mail['date_registered']);
+ +
+