diff --git a/add_lead.php b/add_lead.php new file mode 100644 index 0000000..beb19ce --- /dev/null +++ b/add_lead.php @@ -0,0 +1,86 @@ + + + + + + + Add New Lead + + + + + +
+
+
+
+
+

Add New Lead

+
+
+
+
+
+ + +
+
+ + +
+
+
+ + +
+
+ + +
+
+ + +
+
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+
+ + +
+ + + + + Cancel +
+
+
+
+
+
+ + + + diff --git a/assets/css/custom.css b/assets/css/custom.css new file mode 100644 index 0000000..117a9be --- /dev/null +++ b/assets/css/custom.css @@ -0,0 +1,41 @@ + +:root { + --primary-color: #4A90E2; + --secondary-color: #50E3C2; + --background-color: #F4F7F6; + --surface-color: #FFFFFF; + --font-family: 'Inter', sans-serif; +} + +body { + background-color: var(--background-color); + font-family: var(--font-family); +} + +.navbar-dark { + background-color: var(--primary-color) !important; +} + +.btn-primary { + background-color: var(--primary-color); + border-color: var(--primary-color); +} + +.btn-primary:hover { + opacity: 0.9; + background-color: var(--primary-color); + border-color: var(--primary-color); +} + +.card { + border: none; + border-radius: 0.5rem; + box-shadow: 0 4px 6px rgba(0,0,0,0.1); +} + +.card-header { + background: linear-gradient(45deg, var(--primary-color), var(--secondary-color)); + color: white; + border-top-left-radius: 0.5rem; + border-top-right-radius: 0.5rem; +} diff --git a/assets/js/main.js b/assets/js/main.js new file mode 100644 index 0000000..2d179d5 --- /dev/null +++ b/assets/js/main.js @@ -0,0 +1,4 @@ + +// This file is ready for your custom JavaScript. + +console.log("main.js loaded."); diff --git a/db/migrate.php b/db/migrate.php new file mode 100644 index 0000000..2b940b2 --- /dev/null +++ b/db/migrate.php @@ -0,0 +1,12 @@ +exec($sql); + echo "Migration successful!\n"; +} catch (PDOException $e) { + die("Migration failed: " . $e->getMessage() . "\n"); +} + diff --git a/db/migrations/001_create_leads_table.sql b/db/migrations/001_create_leads_table.sql new file mode 100644 index 0000000..fbf1082 --- /dev/null +++ b/db/migrations/001_create_leads_table.sql @@ -0,0 +1,20 @@ + +CREATE TABLE IF NOT EXISTS leads ( + id INT AUTO_INCREMENT PRIMARY KEY, + did_number VARCHAR(255) NOT NULL, + campaign_name VARCHAR(255) NOT NULL, + vertical VARCHAR(255) NOT NULL, + first_name VARCHAR(255) NOT NULL, + last_name VARCHAR(255) NOT NULL, + phone_number VARCHAR(255) NOT NULL, + email VARCHAR(255), + street_address VARCHAR(255) NOT NULL, + city VARCHAR(255) NOT NULL, + state VARCHAR(255) NOT NULL, + zip_code VARCHAR(255) NOT NULL, + agent_name VARCHAR(255) NOT NULL, + verifier_name VARCHAR(255), + lead_status ENUM('Pending', 'Verified', 'Rejected') DEFAULT 'Pending', + notes TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP +); diff --git a/handle_add_lead.php b/handle_add_lead.php new file mode 100644 index 0000000..46cd9ff --- /dev/null +++ b/handle_add_lead.php @@ -0,0 +1,58 @@ +prepare($sql); + + $stmt->execute([ + $_POST['did_number'], + $_POST['campaign_name'], + $_POST['vertical'], + $_POST['first_name'], + $_POST['last_name'], + $_POST['phone_number'], + $_POST['email'], + $_POST['street_address'], + $_POST['city'], + $_POST['state'], + $_POST['zip_code'], + $_POST['agent_name'], + $_POST['notes'] + ]); + + $_SESSION['success_message'] = "Lead added successfully!"; + header('Location: index.php'); + exit; + +} catch (PDOException $e) { + error_log("Database error: " . $e->getMessage()); + $_SESSION['error_message'] = "A database error occurred. Please try again later."; + header('Location: add_lead.php'); + exit; +} diff --git a/index.php b/index.php index 7205f3d..afa959f 100644 --- a/index.php +++ b/index.php @@ -1,150 +1,66 @@ - + - - - New Style - - - - - - - - - - - - - - - - - - - + + + CRM Dashboard + + -
-
-

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

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

Welcome to your CRM

+
+

This is your central hub for managing leads and agent performance. Get started by adding a new lead or viewing existing ones.

+ +
+
+
-
- + +