diff --git a/admin/includes/footer.php b/admin/includes/footer.php new file mode 100644 index 0000000..c7c7c7f --- /dev/null +++ b/admin/includes/footer.php @@ -0,0 +1,8 @@ + + + + + + diff --git a/admin/includes/header.php b/admin/includes/header.php new file mode 100644 index 0000000..7cdcf0c --- /dev/null +++ b/admin/includes/header.php @@ -0,0 +1,106 @@ + + + + + + + لوحة التحكم | لوجستيك برو + + + + + + + + + + + + + + +
diff --git a/admin/index.php b/admin/index.php new file mode 100644 index 0000000..a812e02 --- /dev/null +++ b/admin/index.php @@ -0,0 +1,107 @@ + 0, + 'quotes_new' => 0, + 'shipments_total' => 0, + 'services_total' => 0 +]; + +try { + $stats['quotes_total'] = $pdo->query("SELECT COUNT(*) FROM quotes")->fetchColumn(); + $stats['quotes_new'] = $pdo->query("SELECT COUNT(*) FROM quotes WHERE status = 'new'")->fetchColumn(); + $stats['shipments_total'] = $pdo->query("SELECT COUNT(*) FROM shipments")->fetchColumn(); // Might fail if table doesn't exist yet + $stats['services_total'] = $pdo->query("SELECT COUNT(*) FROM services")->fetchColumn(); + + // Fetch Recent Quotes + $stmt = $pdo->query("SELECT * FROM quotes ORDER BY created_at DESC LIMIT 5"); + $recent_quotes = $stmt->fetchAll(PDO::FETCH_ASSOC); + +} catch (Exception $e) { + // Graceful fallback if tables missing + $error = $e->getMessage(); +} +?> + +
+

لوحة القيادة

+ عرض كل الطلبات +
+ + +
+ خطأ في قاعدة البيانات: +
+ + +
+ +
+
طلبات تسعير جديدة
+
+ من أصل طلب +
+ + +
+
شحنات مسجلة
+
+ في النظام +
+ + +
+
الخدمات المفعلة
+
+ خدمات معروضة للعملاء +
+
+ +

آخر طلبات التسعير (Leads)

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#العميلرقم الهاتفالخدمة المطلوبةالحالةالتاريخ
+ + + + + +
+ لا توجد طلبات تسعير حتى الآن. +
+
+ + diff --git a/admin/quotes.php b/admin/quotes.php new file mode 100644 index 0000000..46bdd6c --- /dev/null +++ b/admin/quotes.php @@ -0,0 +1,82 @@ +prepare("UPDATE quotes SET status = 'contacted' WHERE id = ?"); + $stmt->execute([$_GET['id']]); + // Redirect to remove query param + echo ""; +} + +// Fetch All Quotes +$stmt = $pdo->query("SELECT q.*, s.title_ar as service_name + FROM quotes q + LEFT JOIN services s ON q.service_id = s.id + ORDER BY q.created_at DESC"); +$quotes = $stmt->fetchAll(PDO::FETCH_ASSOC); +?> + +
+

إدارة طلبات التسعير (Leads)

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#العميلالتواصلالخدمةالرسالةالحالةإجراءات
+
+ +
+ +
+ +
+ +
+ + + + + + + تم التواصل + + + مكتمل + +
+ لا توجد طلبات حتى الآن. +
+
+ + diff --git a/admin/services.php b/admin/services.php new file mode 100644 index 0000000..221a55a --- /dev/null +++ b/admin/services.php @@ -0,0 +1,74 @@ +prepare("INSERT INTO services (title_ar, description_ar, price_start, icon_class) VALUES (?, ?, ?, ?)"); + $stmt->execute([$title, $desc, $price, $icon]); + echo ""; +} + +// Fetch Services +$services = $pdo->query("SELECT * FROM services ORDER BY id DESC")->fetchAll(PDO::FETCH_ASSOC); +?> + +
+

إدارة الخدمات (Custom Fields)

+ +
+ + + + + +
+ +
+
+ +
+

+

+ +

+
+ يبدأ من $ +
+
+ +
+ + diff --git a/assets/css/custom.css b/assets/css/custom.css index 65a1626..ad1997f 100644 --- a/assets/css/custom.css +++ b/assets/css/custom.css @@ -1,346 +1,104 @@ +/* Custom Theme: Navy & Gold */ :root { - --color-bg: #ffffff; - --color-text: #1a1a1a; - --color-primary: #2563EB; /* Vibrant Blue */ - --color-secondary: #000000; - --color-accent: #A3E635; /* Lime Green */ - --color-surface: #f8f9fa; - --font-heading: 'Space Grotesk', sans-serif; - --font-body: 'Inter', sans-serif; - --border-width: 2px; - --shadow-hard: 5px 5px 0px #000; - --shadow-hover: 8px 8px 0px #000; - --radius-pill: 50rem; - --radius-card: 1rem; + --primary-navy: #0A192F; + --accent-gold: #C5A059; + --bg-light: #F8F9FA; + --text-dark: #1A202C; + --border-color: #E2E8F0; } body { - font-family: var(--font-body); - background-color: var(--color-bg); - color: var(--color-text); - overflow-x: hidden; + font-family: 'Inter', system-ui, -apple-system, sans-serif; + background-color: var(--bg-light); + color: var(--text-dark); + direction: rtl; + text-align: right; } -h1, h2, h3, h4, h5, h6, .navbar-brand { - font-family: var(--font-heading); - letter-spacing: -0.03em; -} - -/* Utilities */ -.text-primary { color: var(--color-primary) !important; } -.bg-black { background-color: #000 !important; } -.text-white { color: #fff !important; } -.shadow-hard { box-shadow: var(--shadow-hard); } -.border-2-black { border: var(--border-width) solid #000; } -.py-section { padding-top: 5rem; padding-bottom: 5rem; } - -/* Navbar */ .navbar { - background: rgba(255, 255, 255, 0.9); - backdrop-filter: blur(10px); - border-bottom: var(--border-width) solid transparent; - transition: all 0.3s; - padding-top: 1rem; - padding-bottom: 1rem; + background-color: var(--primary-navy); + border-bottom: 2px solid var(--accent-gold); } -.navbar.scrolled { - border-bottom-color: #000; - padding-top: 0.5rem; - padding-bottom: 0.5rem; +.navbar-brand, .nav-link { + color: #ffffff !important; } -.brand-text { - font-size: 1.5rem; - font-weight: 800; +.nav-link:hover { + color: var(--accent-gold) !important; } -.nav-link { - font-weight: 500; - color: var(--color-text); - margin-left: 1rem; - position: relative; -} - -.nav-link:hover, .nav-link.active { - color: var(--color-primary); -} - -/* Buttons */ -.btn { - font-weight: 700; - font-family: var(--font-heading); - padding: 0.8rem 2rem; - border-radius: var(--radius-pill); - border: var(--border-width) solid #000; - transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1); - box-shadow: var(--shadow-hard); -} - -.btn:hover { - transform: translate(-2px, -2px); - box-shadow: var(--shadow-hover); -} - -.btn:active { - transform: translate(2px, 2px); - box-shadow: 0 0 0 #000; -} - -.btn-primary { - background-color: var(--color-primary); - border-color: #000; - color: #fff; -} - -.btn-primary:hover { - background-color: #1d4ed8; - border-color: #000; - color: #fff; -} - -.btn-outline-dark { - background-color: #fff; - color: #000; -} - -.btn-cta { - background-color: var(--color-accent); - color: #000; -} - -.btn-cta:hover { - background-color: #8cc629; - color: #000; -} - -/* Hero Section */ .hero-section { - min-height: 100vh; - padding-top: 80px; -} - -.background-blob { - position: absolute; - border-radius: 50%; - filter: blur(80px); - opacity: 0.6; - z-index: 1; -} - -.blob-1 { - top: -10%; - right: -10%; - width: 600px; - height: 600px; - background: radial-gradient(circle, var(--color-accent), transparent); -} - -.blob-2 { - bottom: 10%; - left: -10%; - width: 500px; - height: 500px; - background: radial-gradient(circle, var(--color-primary), transparent); -} - -.highlight-text { - background: linear-gradient(120deg, transparent 0%, transparent 40%, var(--color-accent) 40%, var(--color-accent) 100%); - background-repeat: no-repeat; - background-size: 100% 40%; - background-position: 0 88%; - padding: 0 5px; -} - -.dot { color: var(--color-primary); } - -.badge-pill { - display: inline-block; - padding: 0.5rem 1rem; - border: 2px solid #000; - border-radius: 50px; - font-weight: 700; - background: #fff; - box-shadow: 4px 4px 0 #000; - font-family: var(--font-heading); - font-size: 0.9rem; -} - -/* Marquee */ -.marquee-container { + background-color: var(--primary-navy); + color: #ffffff; + padding: 100px 0; + position: relative; overflow: hidden; - white-space: nowrap; - border-top: 2px solid #000; - border-bottom: 2px solid #000; } -.rotate-divider { - transform: rotate(-2deg) scale(1.05); +.hero-section::after { + content: ""; + position: absolute; + bottom: 0; + right: 0; + width: 100%; + height: 4px; + background: var(--accent-gold); +} + +.btn-gold { + background-color: var(--accent-gold); + color: var(--primary-navy); + font-weight: 600; + border: none; + padding: 12px 30px; + border-radius: 4px; + transition: all 0.3s ease; +} + +.btn-gold:hover { + background-color: #b38f4d; + color: #ffffff; + transform: translateY(-2px); +} + +.card { + border: 1px solid var(--border-color); + border-radius: 4px; + box-shadow: 0 2px 4px rgba(0,0,0,0.05); +} + +.tracking-card { + margin-top: -50px; z-index: 10; position: relative; - margin-top: -50px; - margin-bottom: 30px; } -.marquee-content { - display: inline-block; - animation: marquee 20s linear infinite; - font-family: var(--font-heading); - font-weight: 700; - font-size: 1.5rem; - letter-spacing: 2px; -} - -@keyframes marquee { - 0% { transform: translateX(0); } - 100% { transform: translateX(-50%); } -} - -/* Portfolio Cards */ -.project-card { - border: 2px solid #000; - border-radius: var(--radius-card); - overflow: hidden; - background: #fff; - transition: transform 0.3s ease; - box-shadow: var(--shadow-hard); - height: 100%; - display: flex; - flex-direction: column; -} - -.project-card:hover { - transform: translateY(-10px); - box-shadow: 8px 8px 0 #000; -} - -.card-img-holder { - height: 250px; - display: flex; - align-items: center; - justify-content: center; - border-bottom: 2px solid #000; - position: relative; - font-size: 4rem; -} - -.placeholder-art { - transition: transform 0.3s ease; -} - -.project-card:hover .placeholder-art { - transform: scale(1.2) rotate(10deg); -} - -.bg-soft-blue { background-color: #e0f2fe; } -.bg-soft-green { background-color: #dcfce7; } -.bg-soft-purple { background-color: #f3e8ff; } -.bg-soft-yellow { background-color: #fef9c3; } - -.category-tag { - position: absolute; - top: 15px; - right: 15px; - background: #000; - color: #fff; - padding: 5px 12px; +.status-badge { + padding: 5px 15px; border-radius: 20px; - font-size: 0.75rem; - font-weight: 700; + font-size: 0.85rem; + font-weight: 600; } -.card-body { padding: 1.5rem; } +.status-on-way { background-color: #EBF8FF; color: #2B6CB0; } +.status-delivered { background-color: #F0FFF4; color: #2F855A; } +.status-pending { background-color: #FFFAF0; color: #9C4221; } -.link-arrow { - text-decoration: none; - color: #000; +.section-title { + color: var(--primary-navy); font-weight: 700; - display: inline-flex; - align-items: center; - margin-top: auto; -} - -.link-arrow i { transition: transform 0.2s; margin-left: 5px; } -.link-arrow:hover i { transform: translateX(5px); } - -/* About */ -.about-image-stack { + margin-bottom: 40px; position: relative; - height: 400px; - width: 100%; -} - -.stack-card { - position: absolute; - width: 80%; - height: 100%; - border-radius: var(--radius-card); - border: 2px solid #000; - box-shadow: var(--shadow-hard); - left: 10%; - transform: rotate(-3deg); - background-size: cover; -} - -/* Forms */ -.form-control { - border: 2px solid #000; - border-radius: 0.5rem; - padding: 1rem; - font-weight: 500; - background: #f8f9fa; -} - -.form-control:focus { - box-shadow: 4px 4px 0 var(--color-primary); - border-color: #000; - background: #fff; -} - -/* Animations */ -.animate-up { - opacity: 0; - transform: translateY(30px); - animation: fadeUp 0.8s ease forwards; -} - -.delay-100 { animation-delay: 0.1s; } -.delay-200 { animation-delay: 0.2s; } - -@keyframes fadeUp { - to { - opacity: 1; - transform: translateY(0); - } -} - -/* Social */ -.social-links a { - transition: transform 0.2s; display: inline-block; } -.social-links a:hover { - transform: scale(1.2) rotate(10deg); - color: var(--color-accent) !important; -} -/* Responsive */ -@media (max-width: 991px) { - .rotate-divider { - transform: rotate(0); - margin-top: 0; - margin-bottom: 2rem; - } - - .hero-section { - padding-top: 120px; - text-align: center; - min-height: auto; - padding-bottom: 100px; - } - - .display-1 { font-size: 3.5rem; } - - .blob-1 { width: 300px; height: 300px; right: -20%; } - .blob-2 { width: 300px; height: 300px; left: -20%; } -} +.section-title::after { + content: ""; + position: absolute; + bottom: -10px; + right: 0; + width: 40px; + height: 3px; + background: var(--accent-gold); +} \ No newline at end of file diff --git a/db/migrations/002_add_services_quotes.sql b/db/migrations/002_add_services_quotes.sql new file mode 100644 index 0000000..af84d26 --- /dev/null +++ b/db/migrations/002_add_services_quotes.sql @@ -0,0 +1,44 @@ +CREATE TABLE IF NOT EXISTS services ( + id INT AUTO_INCREMENT PRIMARY KEY, + title_ar VARCHAR(255) NOT NULL, + description_ar TEXT, + icon_class VARCHAR(50), + price_start DECIMAL(10,2) DEFAULT 0.00, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP +); + +CREATE TABLE IF NOT EXISTS quotes ( + id INT AUTO_INCREMENT PRIMARY KEY, + service_id INT, + customer_name VARCHAR(255) NOT NULL, + customer_phone VARCHAR(50), + customer_email VARCHAR(255), + message TEXT, + status ENUM('new', 'contacted', 'closed') DEFAULT 'new', + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP +); + +-- Seed Services if empty +INSERT INTO services (title_ar, description_ar, icon_class, price_start) +SELECT * FROM (SELECT 'الشحن البحري', 'حلول شحن بحري موثوقة لمختلف الأحجام والحاويات (FCL/LCL) مع ضمان الوصول الآمن.', 'fa-ship', 500.00) AS tmp +WHERE NOT EXISTS ( + SELECT title_ar FROM services WHERE title_ar = 'الشحن البحري' +) LIMIT 1; + +INSERT INTO services (title_ar, description_ar, icon_class, price_start) +SELECT * FROM (SELECT 'الشحن الجوي', 'نقل جوي سريع وآمن للبضائع المستعجلة والقيمة لجميع مطارات العالم.', 'fa-plane', 1200.00) AS tmp +WHERE NOT EXISTS ( + SELECT title_ar FROM services WHERE title_ar = 'الشحن الجوي' +) LIMIT 1; + +INSERT INTO services (title_ar, description_ar, icon_class, price_start) +SELECT * FROM (SELECT 'التخزين واللوجستيات', 'مستودعات آمنة ومجهزة بأحدث أنظمة التتبع والإدارة للتحكم بالمخزون.', 'fa-warehouse', 200.00) AS tmp +WHERE NOT EXISTS ( + SELECT title_ar FROM services WHERE title_ar = 'التخزين واللوجستيات' +) LIMIT 1; + +INSERT INTO services (title_ar, description_ar, icon_class, price_start) +SELECT * FROM (SELECT 'التخليص الجمركي', 'فريق متخصص لإنهاء كافة الإجراءات الجمركية بسرعة وفعالية لضمان تدفق البضائع.', 'fa-file-signature', 150.00) AS tmp +WHERE NOT EXISTS ( + SELECT title_ar FROM services WHERE title_ar = 'التخليص الجمركي' +) LIMIT 1; diff --git a/includes/footer.php b/includes/footer.php new file mode 100644 index 0000000..7c4f6db --- /dev/null +++ b/includes/footer.php @@ -0,0 +1,13 @@ + + + + + + + + diff --git a/includes/header.php b/includes/header.php new file mode 100644 index 0000000..ecc5860 --- /dev/null +++ b/includes/header.php @@ -0,0 +1,132 @@ + + + + + + + <?php echo htmlspecialchars($page_title); ?> + + + + + + + + + + + + + + + + + + + + + + diff --git a/includes/nav.php b/includes/nav.php new file mode 100644 index 0000000..8945685 --- /dev/null +++ b/includes/nav.php @@ -0,0 +1,29 @@ + 'الرئيسية', + 'services.php' => 'الخدمات', + 'quote.php' => 'طلب تسعير', + '#' => 'تتبع الشحنة', // Placeholder + 'contact.php' => 'اتصل بنا', // Placeholder or future +]; + +?> + + diff --git a/index.php b/index.php index 7205f3d..b26dcca 100644 --- a/index.php +++ b/index.php @@ -1,150 +1,198 @@ prepare("SELECT * FROM shipments WHERE tracking_number = ?"); + $stmt->execute([$tracking_number]); + $tracking_result = $stmt->fetch(PDO::FETCH_ASSOC); +} + +$page_title = 'لوجستيك برو | حلول الشحن الذكية'; +$extra_styles = ' + +'; + +require_once 'includes/header.php'; ?> - - - - - - New Style - - - - - - - - - - - - - - - - - - - - - -
-
-

Analyzing your requirements and generating your website…

-
- Loading… -
-

AI is collecting your requirements and applying the first changes.

-

This page will update automatically as the plan is implemented.

-

Runtime: PHP — UTC

-
-
- - - + + +
+
+

شريكك الاستراتيجي
في عالم اللوجستيات

+

نقدم حلول شحن متكاملة، آمنة، وسريعة لربط أعمالك بالعالم.

+
+
+ + +
+
+

تتبع شحنتك

+
+ + +
+ + +
+
+ رقم الشحنة: + + + +
+

الموقع الحالي:

+

آخر تحديث:

+
+ +
+ عذراً، لم يتم العثور على شحنة بهذا الرقم. +
+ +
+
+ + +
+
+

لماذا تختارنا؟

+

خدمات مصممة لتنمية أعمالك

+
+
+
+ +

شحن بحري

+

حلول اقتصادية للشحنات الكبيرة عبر المحيطات مع تتبع مباشر.

+ المزيد ← +
+
+ +

شحن جوي

+

أسرع وسيلة لنقل بضائعك الحساسة والمستعجلة لأي مكان.

+ المزيد ← +
+
+ +

تخزين ذكي

+

مستودعات آمنة ونظام إدارة مخزون متطور لخدمتك.

+ المزيد ← +
+
+
+ + \ No newline at end of file diff --git a/quote.php b/quote.php new file mode 100644 index 0000000..a77c154 --- /dev/null +++ b/quote.php @@ -0,0 +1,169 @@ +query("SELECT id, title_ar FROM services ORDER BY id ASC"); + $services = $stmt->fetchAll(PDO::FETCH_ASSOC); +} catch (Exception $e) { + // Silent fail for dropdown, but log it + error_log("DB Error: " . $e->getMessage()); +} + +// Handle Form Submission +if ($_SERVER['REQUEST_METHOD'] === 'POST') { + $name = trim($_POST['name'] ?? ''); + $email = trim($_POST['email'] ?? ''); + $phone = trim($_POST['phone'] ?? ''); + $service_id = (int)($_POST['service_id'] ?? 0); + $details = trim($_POST['message'] ?? ''); + + if (empty($name) || empty($email)) { + $error_msg = 'يرجى ملء الاسم والبريد الإلكتروني.'; + } else { + try { + // 1. Save to DB + $stmt = $pdo->prepare("INSERT INTO quotes (customer_name, customer_email, customer_phone, service_id, message) VALUES (?, ?, ?, ?, ?)"); + $stmt->execute([$name, $email, $phone, $service_id, $details]); + + // 2. Send Email + // Using MailService as per context + $admin_email = getenv('MAIL_TO') ?: getenv('MAIL_FROM'); // Fallback + if ($admin_email) { + MailService::sendMail( + $admin_email, + "طلب تسعير جديد: $name", + "

عميل جديد طلب تسعير.

", + "طلب تسعير جديد من $name" + ); + } + + $message_sent = true; + } catch (Exception $e) { + $error_msg = 'حدث خطأ أثناء إرسال الطلب. يرجى المحاولة لاحقاً.'; + error_log($e->getMessage()); + } + } +} + +$selected_service = isset($_GET['service']) ? (int)$_GET['service'] : 0; + +$page_title = 'طلب عرض سعر - شركة الشحن واللوجستيات'; +$extra_styles = ' + +'; + +require_once 'includes/header.php'; +?> + +
+
+

طلب عرض سعر

+

املأ النموذج أدناه وسيقوم فريق المبيعات بالتواصل معك في أقرب وقت.

+ + +
+ تم استلام طلبك بنجاح! سنتواصل معك قريباً. +
+ +
+ +
+ + + +
+
+ + +
+ +
+
+ + +
+
+ + +
+
+ +
+ + +
+ +
+ + +
+ + +
+ +
+
+ + \ No newline at end of file diff --git a/services.php b/services.php new file mode 100644 index 0000000..4a6e0bb --- /dev/null +++ b/services.php @@ -0,0 +1,122 @@ +query("SELECT * FROM services ORDER BY id ASC"); +$services = $stmt->fetchAll(PDO::FETCH_ASSOC); + +$page_title = 'خدماتنا - شركة الشحن واللوجستيات'; +$page_description = 'استكشف خدمات الشحن البحري والجوي والتخليص الجمركي. حلول لوجستية متكاملة لعملك.'; + +$extra_styles = ' + +'; + +require_once 'includes/header.php'; +?> + + + +
+
+ +
+
+ +
+

+

+ تبدأ من ريال +
+ اطلب الخدمة الآن +
+ +
+
+ + \ No newline at end of file