diff --git a/assets/css/custom.css b/assets/css/custom.css new file mode 100644 index 0000000..f876be9 --- /dev/null +++ b/assets/css/custom.css @@ -0,0 +1,42 @@ +body { + background-color: #f8f9fa; + font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; +} + +.navbar-dark { + background-color: #0052cc !important; +} + +.btn-primary { + background-color: #0052cc; + border-color: #0052cc; +} + +.btn-primary:hover { + background-color: #0041a3; + border-color: #003a94; +} + +.accent-gold { + color: #ffd700; +} + +.card-title { + font-weight: bold; +} + +.table { + font-size: 0.9rem; +} + +.thead-dark th { + background-color: #343a40; + color: #fff; +} + +.toast-container { + position: fixed; + top: 1rem; + right: 1rem; + z-index: 1055; +} diff --git a/db/config.php b/db/config.php index 0b7e326..a37f3be 100644 --- a/db/config.php +++ b/db/config.php @@ -1,17 +1,30 @@ PDO::ERRMODE_EXCEPTION, - PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, - ]); - } - return $pdo; + static $pdoconn = null; + if ($pdoconn !== null) { + return $pdoconn; + } + + $host = '127.0.0.1'; + $db = 'investor_crm'; + $user = 'investor_user'; + $pass = 'investor_password_123!'; + $charset = 'utf8mb4'; + + $dsn = "mysql:host=$host;dbname=$db;charset=$charset"; + $options = [ + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, + PDO::ATTR_EMULATE_PREPARES => false, + ]; + + try { + $pdoconn = new PDO($dsn, $user, $pass, $options); + } catch (\PDOException $e) { + throw new \PDOException($e->getMessage(), (int)$e->getCode()); + } + + return $pdoconn; } diff --git a/index.php b/index.php index 7205f3d..aa17149 100644 --- a/index.php +++ b/index.php @@ -1,150 +1,53 @@ - - + - - - New Style - - - - - - - - - - - - - - - - - - - + + + Investor 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 Investor CRM

+

Manage your investors, track commitments, and streamline your workflow.

+
+
+ +
+
+
+
+ +
Investor Management
+

Add new investors, view your existing list, and manage their details.

+ Go to Investors +
+
+
+
-
- + + - + \ No newline at end of file diff --git a/investors.php b/investors.php new file mode 100644 index 0000000..6b248fd --- /dev/null +++ b/investors.php @@ -0,0 +1,179 @@ +prepare("INSERT INTO investors (name, email, phone, entity_name, accreditation_status) VALUES (?, ?, ?, ?, ?)"); + $stmt->execute([$name, $email, $phone, $entity_name, $accreditation_status]); + $message = 'Investor added successfully!'; + $message_type = 'success'; + } catch (PDOException $e) { + if ($e->getCode() == 23000) { // Integrity constraint violation (duplicate email) + $message = 'An investor with this email already exists.'; + $message_type = 'danger'; + } else { + $message = 'Error adding investor: ' . $e->getMessage(); + $message_type = 'danger'; + } + } + } +} + +$investors = $pdo->query("SELECT * FROM investors ORDER BY created_at DESC")->fetchAll(); +?> + + + + + + Investor Tracking + + + + + + + + + + + + + + + + +
+
+
+
+
+
Add New Investor
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+
+
+
+
+
+
+
Investor List
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameEmailPhoneEntityStatus
No investors found.
+
+
+
+
+
+
+ + +
+ +
+ + + + + +