diff --git a/dashboard.php b/dashboard.php
index 68fccf7..2d3b75e 100644
--- a/dashboard.php
+++ b/dashboard.php
@@ -11,13 +11,22 @@ $stmt = db()->prepare("SELECT * FROM users WHERE id = ?");
$stmt->execute([$_SESSION['user_id']]);
$user = $stmt->fetch();
-// Check if profile is complete (e.g., bio or interests)
-if (empty($user['bio']) && empty($user['interests'])) {
- if ($user['role'] === 'investor') {
- header("Location: investor_onboarding.php");
- } else {
- header("Location: founder_onboarding.php");
- }
+if (!$user) {
+ session_destroy();
+ header("Location: login.php");
+ exit;
+}
+
+// Security: Check if verified
+if ($user['verified'] == 0) {
+ session_destroy();
+ header("Location: login.php?error=not_verified");
+ exit;
+}
+
+// Check if onboarding is complete
+if ($user['role'] === 'founder' && $user['onboarding_completed'] == 0) {
+ header("Location: founder_onboarding.php");
exit;
}
@@ -36,6 +45,10 @@ if ($user['role'] === 'founder') {
$stmt->execute([$_SESSION['user_id']]);
$myInvestments = $stmt->fetchAll();
}
+
+function number_get_formatted($num) {
+ return number_format((float)$num, 0, '.', ',');
+}
?>
@@ -64,42 +77,45 @@ if ($user['role'] === 'founder') {
Notifications
-
= htmlspecialchars($user['full_name']) ?> (= ucfirst($user['role']) ?>)
-
Log Out
+
= htmlspecialchars($user['full_name']) ?> (= ucfirst($user['role']) ?>)
+
Log Out
-
- Welcome, = htmlspecialchars($user['full_name']) ?>!
- Here is your startup ecosystem overview.
+
+ Welcome, = htmlspecialchars(explode(' ', $user['full_name'])[0]) ?>!
+ Manage your projects and network from one place.
-
-
My Startups
-
+ List Startup
+
-
-
-
You haven't listed any startups yet.
-
Start Funding Round
+
-
+
-
= htmlspecialchars($startup['name']) ?>
-
= htmlspecialchars($startup['status']) ?> • Raising £= number_get_formatted($startup['funding_target']) ?>
+
= htmlspecialchars($startup['name']) ?>
+
+ = strtoupper($startup['status']) ?>
+ Target: £= number_get_formatted($startup['funding_target']) ?>
+
-
£= number_get_formatted($startup['funding_raised']) ?> raised
-
of £= number_get_formatted($startup['funding_target']) ?>
+
£= number_get_formatted($startup['funding_raised']) ?>
+
Raised so far
@@ -108,28 +124,30 @@ if ($user['role'] === 'founder') {
-
-
My Portfolio
-
Explore Startups
+
-
-
-
You haven't backed any student projects yet.
-
Discover Startups
+
+
+
Browse the next generation of student-led innovation.
+
Start Investing
-
+
-
= htmlspecialchars($inv['startup_name']) ?>
-
Invested on = date('M d, Y', strtotime($inv['created_at'])) ?>
+
= htmlspecialchars($inv['startup_name']) ?>
+
Committed on = date('M d, Y', strtotime($inv['created_at'])) ?>
-
£= number_get_formatted($inv['amount']) ?>
-
= ucfirst($inv['status']) ?>
+
£= number_get_formatted($inv['amount']) ?>
+
+ = strtoupper($inv['status']) ?>
+
@@ -139,46 +157,75 @@ if ($user['role'] === 'founder') {
-
Latest Network Activity
-
Discover the latest student innovations and trends.
-
-
No new activity in your network. Follow founders or startups to see updates.
+
Insights & Activity
+
+
Coming soon: Real-time insights from your network and matching suggestions based on your profile.
-
Your Profile
-
-
+
+
+
= substr($user['full_name'], 0, 1) ?>
-
= htmlspecialchars($user['full_name']) ?>
-
= htmlspecialchars($user['university']) ?>
+
= htmlspecialchars($user['full_name']) ?>
+
= htmlspecialchars($user['university']) ?> '= substr($user['graduation_year'], -2) ?>
-
- = htmlspecialchars($user['bio'] ?? 'Tell the community about yourself.') ?>
+
+ = htmlspecialchars($user['bio'] ?: 'No bio provided yet.') ?>
-
Edit Profile
+
+
+
+
+ = htmlspecialchars(trim($skill)) ?>
+
+
+
-
-
Networking
-
Find the right people to build the future with.
-
Find Partners
+
+
Gatsby Pro
+
Get advanced analytics and direct intros to top-tier VC scouts.
+
-
+
-