diff --git a/dashboard.php b/dashboard.php index 63a5f5c..30e21df 100644 --- a/dashboard.php +++ b/dashboard.php @@ -109,6 +109,15 @@ function number_get_formatted($num) { margin-left: 8px; vertical-align: middle; } + .profile-link-card { + text-decoration: none; + color: inherit; + transition: transform 0.2s; + display: block; + } + .profile-link-card:hover { + transform: translateY(-2px); + } @@ -179,7 +188,7 @@ function number_get_formatted($num) { $raised = $startup['active_raised'] ?? $startup['funding_raised']; $isTrending = in_array($startup['id'], $trendingIds); ?> -
+
@@ -224,7 +233,7 @@ function number_get_formatted($num) {
-
+
@@ -259,15 +268,17 @@ function number_get_formatted($num) {

My Profile

Edit
-
- +
@@ -304,4 +315,4 @@ function number_get_formatted($num) { - \ No newline at end of file + diff --git a/messages.php b/messages.php index 359002c..939e872 100644 --- a/messages.php +++ b/messages.php @@ -124,6 +124,15 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['content']) && $active + @@ -149,10 +158,12 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['content']) && $active
-
- -
- + +
+ +
+ +
Log Out
@@ -184,15 +195,18 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['content']) && $active
- -
- -
-
-
-
-
-
+
@@ -210,14 +224,17 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['content']) && $active
-
- -
+ +
+ +
+
-
+
Online
+ View Profile
@@ -273,4 +290,4 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['content']) && $active - \ No newline at end of file + diff --git a/profile.php b/profile.php new file mode 100644 index 0000000..5a68fad --- /dev/null +++ b/profile.php @@ -0,0 +1,205 @@ +prepare("SELECT * FROM users WHERE id = ?"); +$stmt->execute([$target_user_id]); +$target_user = $stmt->fetch(); + +if (!$target_user) { + die("User not found."); +} + +$is_own_profile = ($current_user_id == $target_user_id); +$platformName = defined('PLATFORM_NAME') ? PLATFORM_NAME : 'Gatsby'; + +// Fetch target user's startups if they are a founder +$startups = []; +if ($target_user['role'] === 'founder') { + $stmt = db()->prepare("SELECT * FROM startups WHERE founder_id = ? ORDER BY created_at DESC"); + $stmt->execute([$target_user_id]); + $startups = $stmt->fetchAll(); +} + +?> + + + + + <?= htmlspecialchars($target_user['full_name']) ?> | Profile + + + + + + + + + +
+ +
+ +
+
+ +
+
+
+ +
+
+
+

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

About

+

+ +

+ +

Details

+
+
+
Location
+
+
+ +
+
Commitment
+
+
+ +
+
+ +
+ +

Skills & Expertise

+
+ + + No skills listed.

'; + ?> +
+ +

Ventures

+
+ + +
+
+ +
+
+
+
+
+
+ +
+ No startups listed.

'; ?> +
+ +

Investment Profile

+
+
+
Appetite
+
+
+
+
Risk Tolerance
+
+
+
+ +

Interests

+
+ + + No interests listed.

'; + ?> +
+ +
+
+
+ +
+
+ +
+

© Gatsby Capitalist Platform. All rights reserved.

+
+ + + diff --git a/startup_details.php b/startup_details.php index ce972f9..6b14f29 100644 --- a/startup_details.php +++ b/startup_details.php @@ -18,7 +18,12 @@ if (!$startupId) { exit; } -$stmt = db()->prepare("SELECT * FROM startups WHERE id = ?"); +$stmt = db()->prepare(" + SELECT s.*, fr.id as round_id, fr.funding_goal as active_goal, fr.funding_raised as active_raised, fr.status as round_status + FROM startups s + LEFT JOIN funding_rounds fr ON s.id = fr.startup_id AND fr.status = 'Active' + WHERE s.id = ? +"); $stmt->execute([$startupId]); $startup = $stmt->fetch(); @@ -39,17 +44,22 @@ if (!$isFounder && $startup['status'] === 'private' && !$isInvestor) { $canSeeHistory = $isFounder || $isInvestor; $fundingHistory = []; if ($canSeeHistory) { - $stmt = db()->prepare("SELECT i.*, u.full_name as investor_name FROM investments i JOIN users u ON i.investor_id = u.id WHERE i.startup_id = ? ORDER BY i.created_at DESC"); + $stmt = db()->prepare("SELECT i.*, u.full_name as investor_name, u.id as investor_user_id FROM investments i JOIN users u ON i.investor_id = u.id WHERE i.startup_id = ? AND i.status != 'rejected' ORDER BY i.created_at DESC"); $stmt->execute([$startupId]); $fundingHistory = $stmt->fetchAll(); } // Fetch founders -$stmt = db()->prepare("SELECT full_name as name FROM users WHERE id = ?"); +$stmt = db()->prepare("SELECT id, full_name as name FROM users WHERE id = ?"); $stmt->execute([$startup['founder_id']]); $founder = $stmt->fetch(); $platformName = defined('PLATFORM_NAME') ? PLATFORM_NAME : 'Gatsby'; + +// Calculate progress +$goal = $startup['active_goal'] ?: 0; +$raised = $startup['active_raised'] ?: 0; +$progress = ($goal > 0) ? round(($raised / $goal) * 100) : 0; ?> @@ -125,6 +135,21 @@ $platformName = defined('PLATFORM_NAME') ? PLATFORM_NAME : 'Gatsby'; transform: scale(1.05); box-shadow: 0 12px 32px rgba(0, 242, 255, 0.4); } + .progress-bar-container { + width: 100%; + height: 12px; + background: rgba(255,255,255,0.05); + border-radius: 100px; + overflow: hidden; + margin: 20px 0; + border: 1px solid var(--border-color); + } + .progress-bar-fill { + height: 100%; + background: var(--gradient-primary); + box-shadow: 0 0 15px rgba(0, 242, 255, 0.3); + border-radius: 100px; + } @@ -176,13 +201,13 @@ $platformName = defined('PLATFORM_NAME') ? PLATFORM_NAME : 'Gatsby';

- Founded by + Founded by

+ + +
+
+

Active Funding Round

+ % Complete +
+
+
+
+
+
+
Raised
+
£
+
+
+
Goal
+
£
+
+
+
+ +

Product & Vision

@@ -302,11 +350,13 @@ $platformName = defined('PLATFORM_NAME') ? PLATFORM_NAME : 'Gatsby';
@@ -323,8 +373,8 @@ $platformName = defined('PLATFORM_NAME') ? PLATFORM_NAME : 'Gatsby';
- \ No newline at end of file +