From 78f468993c18dd1feb24091e7c8b50be78083e37 Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Mon, 24 Nov 2025 04:55:03 +0000 Subject: [PATCH] V.01 --- assets/css/custom.css | 22 +++ assets/js/main.js | 1 + index.php | 351 +++++++++++++++++++++++++----------------- 3 files changed, 232 insertions(+), 142 deletions(-) create mode 100644 assets/css/custom.css create mode 100644 assets/js/main.js diff --git a/assets/css/custom.css b/assets/css/custom.css new file mode 100644 index 0000000..6a146aa --- /dev/null +++ b/assets/css/custom.css @@ -0,0 +1,22 @@ +/* Add your custom styles here */ +body { + font-family: 'system-ui', -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'Liberation Sans', sans-serif; +} + +.navbar-brand { + color: #0D6EFD !important; +} + +.btn-primary { + background-color: #0D6EFD; + border-color: #0D6EFD; +} + +.btn-primary:hover { + background-color: #0b5ed7; + border-color: #0a58ca; +} + +.fs-1 { + font-size: 3rem !important; +} diff --git a/assets/js/main.js b/assets/js/main.js new file mode 100644 index 0000000..52fef2d --- /dev/null +++ b/assets/js/main.js @@ -0,0 +1 @@ +// Add your custom scripts here diff --git a/index.php b/index.php index 7205f3d..bc0fcb4 100644 --- a/index.php +++ b/index.php @@ -1,150 +1,217 @@ exec($sql); +} catch (PDOException $e) { + // For now, we'll just die on a DB error. In a real app, handle this gracefully. + die("Database setup failed: " . $e->getMessage()); +} + + +$success_message = ''; +$error_message = ''; + +if ($_SERVER["REQUEST_METHOD"] == "POST") { + $customer_name = trim($_POST['name']); + $customer_email = trim($_POST['email']); + $customer_phone = trim($_POST['phone']); + $appliance_type = trim($_POST['appliance']); + $issue_description = trim($_POST['issue']); + + if (empty($customer_name) || empty($customer_email) || empty($appliance_type)) { + $error_message = "Please fill in all required fields (Name, Email, Appliance Type)."; + } elseif (!filter_var($customer_email, FILTER_VALIDATE_EMAIL)) { + $error_message = "Invalid email format."; + } else { + try { + $sql = "INSERT INTO requests (customer_name, customer_email, customer_phone, appliance_type, issue_description) VALUES (:name, :email, :phone, :appliance, :issue)"; + $stmt = $pdo->prepare($sql); + + $stmt->bindParam(':name', $customer_name); + $stmt->bindParam(':email', $customer_email); + $stmt->bindParam(':phone', $customer_phone); + $stmt->bindParam(':appliance', $appliance_type); + $stmt->bindParam(':issue', $issue_description); + + $stmt->execute(); + + $success_message = "Thank you! Your service request has been submitted. We will get back to you shortly."; + } catch (PDOException $e) { + $error_message = "Error submitting request: " . $e->getMessage(); + } + } +} + +$project_name = htmlspecialchars($_SERVER['PROJECT_NAME'] ?? 'Appliance CRM'); +$project_description = htmlspecialchars($_SERVER['PROJECT_DESCRIPTION'] ?? 'CRM for appliance service requests.'); +$project_image_url = htmlspecialchars($_SERVER['PROJECT_IMAGE_URL'] ?? ''); -$phpVersion = PHP_VERSION; -$now = date('Y-m-d H:i:s'); ?> - + - - - New Style - - - - - - - - - - - - - - - - - - - + + + <?= $project_name ?> + + + + + + + + + + + + + + + + + + + -
-
-

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

-
-
- + + + +
+
+

Appliance Repair Made Easy

+

Fast, reliable service for your TV, A/C, and Washing Machine. Book a technician today!

+ Book a Service +
+
+ +
+
+
+

Our Services

+

We specialize in the installation and repair of:

+
+
+
+
+
+ +

Televisions

+

Screen repairs, sound issues, smart TV setup, and more.

+
+
+
+
+
+
+ +

Air Conditioners

+

Cooling problems, regular maintenance, and new installations.

+
+
+
+
+
+
+ +

Washing Machines

+

Drum issues, water leaks, and electronic faults.

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

Submit a Service Request

+
+ + +
+ + +
+ + +
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+
+
+
+
+
+
+ + + + + - + \ No newline at end of file