From d73f83ad72788e584cc8496d32886dd5cded5f94 Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Wed, 7 Jan 2026 23:57:08 +0000 Subject: [PATCH] =?UTF-8?q?=D9=86=D8=B8=D8=A7=D9=85=20=D8=A7=D9=84=D9=85?= =?UTF-8?q?=D8=A8=D9=8A=D8=B9=D8=A7=D8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/css/styles.css | 3 + distributors.php | 72 ++++++++++++++++++++ index.php | 154 ++---------------------------------------- layout/footer.php | 4 ++ layout/header.php | 29 ++++++++ 5 files changed, 113 insertions(+), 149 deletions(-) create mode 100644 assets/css/styles.css create mode 100644 distributors.php create mode 100644 layout/footer.php create mode 100644 layout/header.php diff --git a/assets/css/styles.css b/assets/css/styles.css new file mode 100644 index 0000000..5a1a1cf --- /dev/null +++ b/assets/css/styles.css @@ -0,0 +1,3 @@ +body { + background-color: #f8f9fa; +} diff --git a/distributors.php b/distributors.php new file mode 100644 index 0000000..b491596 --- /dev/null +++ b/distributors.php @@ -0,0 +1,72 @@ +exec("CREATE TABLE IF NOT EXISTS distributors ( + id INT AUTO_INCREMENT PRIMARY KEY, + name VARCHAR(255) NOT NULL, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP + )"); + + // Check if table is empty + $stmt = $pdo->query("SELECT COUNT(*) FROM distributors"); + if ($stmt->fetchColumn() == 0) { + // Insert initial data + $distributors = ['ابن سينا', 'فارما اوفرسيز', 'سوفيكو']; + $insert_stmt = $pdo->prepare("INSERT INTO distributors (name) VALUES (?)"); + foreach ($distributors as $distributor) { + $insert_stmt->execute([$distributor]); + } + } + + // Fetch distributors + $stmt = $pdo->query("SELECT id, name, created_at FROM distributors ORDER BY id"); + $all_distributors = $stmt->fetchAll(PDO::FETCH_ASSOC); + +} catch (PDOException $e) { + echo "
فشل الاتصال بقاعدة البيانات: " . $e->getMessage() . "
"; + include 'layout/footer.php'; + exit; +} + +?> + +
+

قائمة الموزعين

+ + +
+ +
+
+ + + + + + + + + + + + + + + + + + + +
#الاسمتاريخ الإنشاءالإجراءات
+ + +
+
+
+ + diff --git a/index.php b/index.php index 7205f3d..6411b60 100644 --- a/index.php +++ b/index.php @@ -1,150 +1,6 @@ - -$phpVersion = PHP_VERSION; -$now = date('Y-m-d H:i:s'); -?> - - - - - - 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/layout/footer.php b/layout/footer.php new file mode 100644 index 0000000..a0e3019 --- /dev/null +++ b/layout/footer.php @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/layout/header.php b/layout/header.php new file mode 100644 index 0000000..88baa45 --- /dev/null +++ b/layout/header.php @@ -0,0 +1,29 @@ + + + + + + نظام إدارة المبيعات + + + + + +