diff --git a/admin/config.php b/admin/config.php new file mode 100644 index 0000000..769a370 --- /dev/null +++ b/admin/config.php @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/admin/index.php b/admin/index.php new file mode 100644 index 0000000..8d8fc7f --- /dev/null +++ b/admin/index.php @@ -0,0 +1,45 @@ + + + + + + + Admin Login + + + +
+
+
+
+
+

Admin Login

+
+
+ + +
+
+ + +
+ + + + +
+
+
+
+
+
+ + \ No newline at end of file diff --git a/assets/pasted-20250911-143542-582ee338.png b/assets/pasted-20250911-143542-582ee338.png new file mode 100644 index 0000000..cf2ec89 Binary files /dev/null and b/assets/pasted-20250911-143542-582ee338.png differ diff --git a/index.php b/index.php index e13ae95..286f34c 100644 --- a/index.php +++ b/index.php @@ -1,131 +1,190 @@ prepare( + 'INSERT INTO orders (customer_name, phone, address, bouquet_id) VALUES (:customer_name, :phone, :address, :bouquet_id)' + ); + $statement->execute([ + ':customer_name' => $_POST['customer_name'], + ':phone' => $_POST['phone'], + ':address' => $_POST['address'], + ':bouquet_id' => (int)$_POST['bouquet_id'], + ]); + // Redirect or show success message + header('Location: ' . $_SERVER['PHP_SELF'] . '?order=success'); + exit; + } catch (PDOException $e) { + die("Order placement failed: " . $e->getMessage()); + } +} + +try { + $pdoconnection = db(); + $statement = $pdoconnection->query('SELECT id, name, description, price, image_url FROM bouquets'); + $bouquets = $statement->fetchAll(); +} catch (PDOException $e) { + die("Database error: " . $e->getMessage()); +} -$phpVersion = PHP_VERSION; -$now = date('Y-m-d H:i:s'); ?> - - + + - - - New Style - - - - + + + Flower Shop + + + + + -
-
-

Analyzing your requirements and generating your website…

-
- Loading… -
-

Flatlogic AI is collecting your requirements and applying the first changes.

-

This page will update automatically as the plan is implemented.

-

Runtime: PHP — UTC

+ + + + + +
+
+

Flower Shop

+

Свежие букеты для любого повода с доставкой на дом.

+
+
+ + + +
+
-
- + + + +
+
+

Наши Букеты

+
+ +

Букеты скоро появятся!

+ + +
+
+ <?= htmlspecialchars($bouquet['name']) ?> +
+
+

+

руб.

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

Оформить Заказ

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