From 38f186919cbdb5a96e82860cde458e834093ed0d Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Thu, 27 Nov 2025 10:50:02 +0000 Subject: [PATCH] 1.0 --- assets/css/custom.css | 0 assets/js/main.js | 0 index.php | 254 ++++++++++++++++++------------------------ place-order.php | 153 +++++++++++++++++++++++++ 4 files changed, 262 insertions(+), 145 deletions(-) create mode 100644 assets/css/custom.css create mode 100644 assets/js/main.js create mode 100644 place-order.php diff --git a/assets/css/custom.css b/assets/css/custom.css new file mode 100644 index 0000000..e69de29 diff --git a/assets/js/main.js b/assets/js/main.js new file mode 100644 index 0000000..e69de29 diff --git a/index.php b/index.php index 7205f3d..1cbe8e0 100644 --- a/index.php +++ b/index.php @@ -1,150 +1,114 @@ - - + - - - New Style - - - - - - - - - - - - - - - - - - - + + + LogPort - Indian Logistics Marketplace + + + + + + -
-
-

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

-
-
- + + + +
+
+

Your Goods, Our Network.

+

The future of logistics in India. Connecting you with reliable transporters, in real-time.

+ + Ship Now + +
+
+ +
+
+

How It Works

+

A simple, three-step process to get your goods moving.

+
+
+
+
+ +

1. Place Your Order

+

Enter your pickup and delivery details, and get an instant quote.

+
+
+
+
+
+
+ +

2. Transporter Connects

+

Our network of verified transporters accepts your order.

+
+
+
+
+
+
+ +

3. Track Your Shipment

+

Monitor your goods with real-time tracking until they reach their destination.

+
+
+
+
+
+
+ + + + + - + \ No newline at end of file diff --git a/place-order.php b/place-order.php new file mode 100644 index 0000000..89ebf28 --- /dev/null +++ b/place-order.php @@ -0,0 +1,153 @@ +exec("CREATE TABLE IF NOT EXISTS orders ( + id INT AUTO_INCREMENT PRIMARY KEY, + pickup_location VARCHAR(255) NOT NULL, + delivery_location VARCHAR(255) NOT NULL, + goods_description TEXT, + estimated_weight DECIMAL(10, 2), + status VARCHAR(50) DEFAULT 'PENDING', + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP + );"); +} catch (PDOException $e) { + // In a real app, log this error. For this prototype, we'll show it. + $message = 'Database setup failed: ' . $e->getMessage(); + $message_type = 'danger'; +} + +if ($_SERVER['REQUEST_METHOD'] === 'POST') { + $pickup_location = $_POST['pickup_location'] ?? ''; + $delivery_location = $_POST['delivery_location'] ?? ''; + $goods_description = $_POST['goods_description'] ?? ''; + $estimated_weight = $_POST['estimated_weight'] ?? ''; + + if (empty($pickup_location) || empty($delivery_location) || empty($estimated_weight)) { + $message = 'Please fill in all required fields: Pickup Location, Delivery Location, and Estimated Weight.'; + $message_type = 'warning'; + } else { + try { + $sql = "INSERT INTO orders (pickup_location, delivery_location, goods_description, estimated_weight) VALUES (:pickup_location, :delivery_location, :goods_description, :estimated_weight)"; + $stmt = $db->prepare($sql); + $stmt->bindParam(':pickup_location', $pickup_location, PDO::PARAM_STR); + $stmt->bindParam(':delivery_location', $delivery_location, PDO::PARAM_STR); + $stmt->bindParam(':goods_description', $goods_description, PDO::PARAM_STR); + $stmt->bindParam(':estimated_weight', $estimated_weight, PDO::PARAM_STR); + + if ($stmt->execute()) { + $message = 'Your order has been placed successfully! A transporter will be in touch soon.'; + $message_type = 'success'; + } else { + $message = 'There was an error placing your order. Please try again.'; + $message_type = 'danger'; + } + } catch (PDOException $e) { + $message = 'Database error: ' . $e->getMessage(); + $message_type = 'danger'; + } + } +} +?> + + + + + + Place an Order - LogPort + + + + + + + + + + +
+
+
+

Place a New Shipment Order

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