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 @@ + + + + + + نظام إدارة المبيعات + + + + + +