diff --git a/assets/css/custom.css b/assets/css/custom.css index 50e0502..ce93305 100644 --- a/assets/css/custom.css +++ b/assets/css/custom.css @@ -1,302 +1,247 @@ -body { - background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab); - background-size: 400% 400%; - animation: gradient 15s ease infinite; - color: #212529; - font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; - font-size: 14px; - margin: 0; - min-height: 100vh; +:root { + --bg-color: #0a0a0f; + --surface-color: #1a1a24; + --accent-blue: #00f2ff; + --accent-violet: #8a2be2; + --text-primary: #ffffff; + --text-secondary: #a0a0b0; + --gradient-primary: linear-gradient(135deg, #00f2ff 0%, #8a2be2 100%); + --card-bg: rgba(26, 26, 36, 0.7); + --border-color: rgba(255, 255, 255, 0.1); } -.main-wrapper { - display: flex; - align-items: center; - justify-content: center; - min-height: 100vh; - width: 100%; - padding: 20px; +* { box-sizing: border-box; - position: relative; - z-index: 1; + margin: 0; + padding: 0; } -@keyframes gradient { - 0% { - background-position: 0% 50%; - } - 50% { - background-position: 100% 50%; - } - 100% { - background-position: 0% 50%; - } +body { + background-color: var(--bg-color); + color: var(--text-primary); + font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; + line-height: 1.6; + overflow-x: hidden; } -.chat-container { - width: 100%; - max-width: 600px; - background: rgba(255, 255, 255, 0.85); - border: 1px solid rgba(255, 255, 255, 0.3); - border-radius: 20px; - display: flex; - flex-direction: column; - height: 85vh; - box-shadow: 0 20px 40px rgba(0,0,0,0.2); - backdrop-filter: blur(15px); - -webkit-backdrop-filter: blur(15px); - overflow: hidden; +a { + text-decoration: none; + color: inherit; } -.chat-header { - padding: 1.5rem; - border-bottom: 1px solid rgba(0, 0, 0, 0.05); - background: rgba(255, 255, 255, 0.5); - font-weight: 700; - font-size: 1.1rem; +.container { + max-width: 1200px; + margin: 0 auto; + padding: 0 20px; +} + +/* Header */ +header { + padding: 20px 0; display: flex; justify-content: space-between; align-items: center; -} - -.chat-messages { - flex: 1; - overflow-y: auto; - padding: 1.5rem; - display: flex; - flex-direction: column; - gap: 1.25rem; -} - -/* Custom Scrollbar */ -::-webkit-scrollbar { - width: 6px; -} - -::-webkit-scrollbar-track { - background: transparent; -} - -::-webkit-scrollbar-thumb { - background: rgba(255, 255, 255, 0.3); - border-radius: 10px; -} - -::-webkit-scrollbar-thumb:hover { - background: rgba(255, 255, 255, 0.5); -} - -.message { - max-width: 85%; - padding: 0.85rem 1.1rem; - border-radius: 16px; - line-height: 1.5; - font-size: 0.95rem; - box-shadow: 0 4px 15px rgba(0,0,0,0.05); - animation: fadeIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); -} - -@keyframes fadeIn { - from { opacity: 0; transform: translateY(20px) scale(0.95); } - to { opacity: 1; transform: translateY(0) scale(1); } -} - -.message.visitor { - align-self: flex-end; - background: linear-gradient(135deg, #212529 0%, #343a40 100%); - color: #fff; - border-bottom-right-radius: 4px; -} - -.message.bot { - align-self: flex-start; - background: #ffffff; - color: #212529; - border-bottom-left-radius: 4px; -} - -.chat-input-area { - padding: 1.25rem; - background: rgba(255, 255, 255, 0.5); - border-top: 1px solid rgba(0, 0, 0, 0.05); -} - -.chat-input-area form { - display: flex; - gap: 0.75rem; -} - -.chat-input-area input { - flex: 1; - border: 1px solid rgba(0, 0, 0, 0.1); - border-radius: 12px; - padding: 0.75rem 1rem; - outline: none; - background: rgba(255, 255, 255, 0.9); - transition: all 0.3s ease; -} - -.chat-input-area input:focus { - border-color: #23a6d5; - box-shadow: 0 0 0 3px rgba(35, 166, 213, 0.2); -} - -.chat-input-area button { - background: #212529; - color: #fff; - border: none; - padding: 0.75rem 1.5rem; - border-radius: 12px; - cursor: pointer; - font-weight: 600; - transition: all 0.3s ease; -} - -.chat-input-area button:hover { - background: #000; - transform: translateY(-2px); - box-shadow: 0 5px 15px rgba(0,0,0,0.2); -} - -/* Background Animations */ -.bg-animations { - position: fixed; + position: sticky; top: 0; - left: 0; + z-index: 100; + background: rgba(10, 10, 15, 0.8); + backdrop-filter: blur(10px); +} + +.logo { + font-size: 24px; + font-weight: 700; + background: var(--gradient-primary); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + letter-spacing: -1px; +} + +.nav-links { + display: flex; + gap: 30px; +} + +.nav-links a { + color: var(--text-secondary); + font-weight: 500; + transition: color 0.3s; +} + +.nav-links a:hover { + color: var(--text-primary); +} + +.btn { + padding: 12px 24px; + border-radius: 12px; + font-weight: 600; + cursor: pointer; + transition: transform 0.2s, opacity 0.2s; + border: none; + display: inline-block; +} + +.btn:active { + transform: scale(0.98); +} + +.btn-primary { + background: var(--gradient-primary); + color: #fff; +} + +.btn-secondary { + background: var(--surface-color); + color: #fff; + border: 1px solid var(--border-color); +} + +/* Hero Section */ +.hero { + padding: 100px 0; + text-align: center; + position: relative; +} + +.hero h1 { + font-size: 64px; + font-weight: 800; + margin-bottom: 20px; + letter-spacing: -2px; + line-height: 1.1; +} + +.hero p { + font-size: 20px; + color: var(--text-secondary); + max-width: 700px; + margin: 0 auto 40px; +} + +.hero-bg { + position: absolute; + top: -100px; + left: 50%; + transform: translateX(-50%); width: 100%; height: 100%; - z-index: 0; + z-index: -1; overflow: hidden; - pointer-events: none; } -.blob { +.hero-blob { position: absolute; - width: 500px; - height: 500px; - background: rgba(255, 255, 255, 0.2); - border-radius: 50%; - filter: blur(80px); - animation: move 20s infinite alternate cubic-bezier(0.45, 0, 0.55, 1); -} - -.blob-1 { - top: -10%; - left: -10%; - background: rgba(238, 119, 82, 0.4); -} - -.blob-2 { - bottom: -10%; - right: -10%; - background: rgba(35, 166, 213, 0.4); - animation-delay: -7s; width: 600px; height: 600px; + background: radial-gradient(circle, rgba(0, 242, 255, 0.1) 0%, rgba(138, 43, 226, 0.1) 100%); + filter: blur(100px); + border-radius: 50%; } -.blob-3 { - top: 40%; - left: 30%; - background: rgba(231, 60, 126, 0.3); - animation-delay: -14s; - width: 450px; - height: 450px; +/* Features Cards */ +.features { + padding: 80px 0; + display: grid; + grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); + gap: 30px; } -@keyframes move { - 0% { transform: translate(0, 0) rotate(0deg) scale(1); } - 33% { transform: translate(150px, 100px) rotate(120deg) scale(1.1); } - 66% { transform: translate(-50px, 200px) rotate(240deg) scale(0.9); } - 100% { transform: translate(0, 0) rotate(360deg) scale(1); } -} - -.admin-link { - font-size: 14px; - color: #fff; - text-decoration: none; - background: rgba(0, 0, 0, 0.2); - padding: 0.5rem 1rem; - border-radius: 8px; - transition: all 0.3s ease; -} - -.admin-link:hover { - background: rgba(0, 0, 0, 0.4); - text-decoration: none; -} - -/* Admin Styles */ -.admin-container { - max-width: 900px; - margin: 3rem auto; - padding: 2.5rem; - background: rgba(255, 255, 255, 0.85); +.card { + background: var(--card-bg); + border: 1px solid var(--border-color); backdrop-filter: blur(20px); - -webkit-backdrop-filter: blur(20px); + padding: 40px; border-radius: 24px; - box-shadow: 0 20px 50px rgba(0,0,0,0.15); - border: 1px solid rgba(255, 255, 255, 0.4); - position: relative; - z-index: 1; + transition: transform 0.3s, border-color 0.3s; } -.admin-container h1 { - margin-top: 0; - color: #212529; - font-weight: 800; +.card:hover { + transform: translateY(-10px); + border-color: rgba(0, 242, 255, 0.3); } -.table { - width: 100%; - border-collapse: separate; - border-spacing: 0 8px; - margin-top: 1.5rem; -} - -.table th { - background: transparent; - border: none; - padding: 1rem; - color: #6c757d; - font-weight: 600; - text-transform: uppercase; - font-size: 0.75rem; - letter-spacing: 1px; -} - -.table td { - background: #fff; - padding: 1rem; - border: none; -} - -.table tr td:first-child { border-radius: 12px 0 0 12px; } -.table tr td:last-child { border-radius: 0 12px 12px 0; } - -.form-group { - margin-bottom: 1.25rem; -} - -.form-group label { - display: block; - margin-bottom: 0.5rem; - font-weight: 600; - font-size: 0.9rem; -} - -.form-control { - width: 100%; - padding: 0.75rem 1rem; - border: 1px solid rgba(0, 0, 0, 0.1); +.card-icon { + width: 48px; + height: 48px; + background: var(--surface-color); border-radius: 12px; - background: #fff; - transition: all 0.3s ease; - box-sizing: border-box; + display: flex; + align-items: center; + justify-content: center; + margin-bottom: 24px; + color: var(--accent-blue); + font-size: 24px; } -.form-control:focus { - outline: none; - border-color: #23a6d5; - box-shadow: 0 0 0 3px rgba(35, 166, 213, 0.1); -} \ No newline at end of file +.card h3 { + margin-bottom: 16px; + font-size: 22px; +} + +.card p { + color: var(--text-secondary); +} + +/* How it Works */ +.how-it-works { + padding: 100px 0; + text-align: center; +} + +.how-it-works h2 { + font-size: 40px; + margin-bottom: 60px; +} + +.steps { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); + gap: 40px; +} + +.step { + position: relative; +} + +.step-number { + font-size: 48px; + font-weight: 800; + opacity: 0.1; + margin-bottom: -20px; + display: block; +} + +.step h4 { + font-size: 24px; + margin-bottom: 12px; +} + +/* Footer */ +footer { + padding: 60px 0; + border-top: 1px solid var(--border-color); + margin-top: 100px; + text-align: center; + color: var(--text-secondary); +} + +.footer-links { + display: flex; + justify-content: center; + gap: 40px; + margin-bottom: 20px; +} + +.footer-links a:hover { + color: var(--text-primary); +} + +@media (max-width: 768px) { + .hero h1 { + font-size: 40px; + } + .nav-links { + display: none; + } +} diff --git a/dashboard.php b/dashboard.php new file mode 100644 index 0000000..68fccf7 --- /dev/null +++ b/dashboard.php @@ -0,0 +1,184 @@ +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"); + } + exit; +} + +$platformName = defined('PLATFORM_NAME') ? PLATFORM_NAME : 'Gatsby'; + +// Fetch user's data based on role +$myStartups = []; +$myInvestments = []; + +if ($user['role'] === 'founder') { + $stmt = db()->prepare("SELECT * FROM startups WHERE founder_id = ? ORDER BY created_at DESC"); + $stmt->execute([$_SESSION['user_id']]); + $myStartups = $stmt->fetchAll(); +} else { + $stmt = db()->prepare("SELECT i.*, s.name as startup_name FROM investments i JOIN startups s ON i.startup_id = s.id WHERE i.investor_id = ? ORDER BY i.created_at DESC"); + $stmt->execute([$_SESSION['user_id']]); + $myInvestments = $stmt->fetchAll(); +} +?> + + + + + + Dashboard — <?= htmlspecialchars($platformName) ?> + + + + + + +
+
+ + +
+ () + Log Out +
+
+
+ +
+

Welcome, !

+

Here is your startup ecosystem overview.

+ +
+
+ +
+
+

My Startups

+ + List Startup +
+ + +
+ +

You haven't listed any startups yet.

+ Start Funding Round +
+ +
+ +
+
+
+
• Raising £
+
+
+
£ raised
+
of £
+
+
+ +
+ +
+ +
+
+

My Portfolio

+ Explore Startups +
+ + +
+ +

You haven't backed any student projects yet.

+ Discover Startups +
+ +
+ +
+
+
+
Invested on
+
+
+
£
+
+
+
+ +
+ +
+ + +
+

Latest Network Activity

+

Discover the latest student innovations and trends.

+
+

No new activity in your network. Follow founders or startups to see updates.

+
+
+
+ +
+
+

Your Profile

+
+
+ +
+
+
+
+
+
+
+ +
+ Edit Profile +
+ +
+

Networking

+

Find the right people to build the future with.

+ Find Partners +
+
+
+
+ + + + + \ No newline at end of file diff --git a/db/config.php b/db/config.php index e512965..1fcb433 100644 --- a/db/config.php +++ b/db/config.php @@ -1,17 +1,22 @@ PDO::ERRMODE_EXCEPTION, - PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, - ]); + try { + $pdo = new PDO('mysql:host='.DB_HOST.';dbname='.DB_NAME.';charset=utf8mb4', DB_USER, DB_PASS, [ + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, + ]); + } catch (PDOException $e) { + die("Connection failed: " . $e->getMessage()); + } } return $pdo; } diff --git a/db/migrations/01_initial_schema.sql b/db/migrations/01_initial_schema.sql new file mode 100644 index 0000000..9ec6347 --- /dev/null +++ b/db/migrations/01_initial_schema.sql @@ -0,0 +1,58 @@ +CREATE TABLE IF NOT EXISTS users ( + id INT AUTO_INCREMENT PRIMARY KEY, + full_name VARCHAR(255) NOT NULL, + email VARCHAR(255) NOT NULL UNIQUE, + password VARCHAR(255) NOT NULL, + role ENUM('founder', 'investor') NOT NULL, + university VARCHAR(255), + graduation_year INT, + bio TEXT, + interests TEXT, -- Store as JSON or comma-separated tags + investment_appetite VARCHAR(255), + verified TINYINT(1) DEFAULT 0, + verification_code VARCHAR(100), + profile_photo VARCHAR(255), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP +); + +CREATE TABLE IF NOT EXISTS startups ( + id INT AUTO_INCREMENT PRIMARY KEY, + name VARCHAR(255) NOT NULL, + description TEXT NOT NULL, + founder_id INT NOT NULL, + funding_target DECIMAL(15, 2), + funding_raised DECIMAL(15, 2) DEFAULT 0.00, + status ENUM('public', 'private') DEFAULT 'public', + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + FOREIGN KEY (founder_id) REFERENCES users(id) ON DELETE CASCADE +); + +CREATE TABLE IF NOT EXISTS investments ( + id INT AUTO_INCREMENT PRIMARY KEY, + investor_id INT NOT NULL, + startup_id INT NOT NULL, + amount DECIMAL(15, 2) NOT NULL, + status ENUM('pending', 'approved', 'rejected') DEFAULT 'pending', + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + FOREIGN KEY (investor_id) REFERENCES users(id) ON DELETE CASCADE, + FOREIGN KEY (startup_id) REFERENCES startups(id) ON DELETE CASCADE +); + +CREATE TABLE IF NOT EXISTS messages ( + id INT AUTO_INCREMENT PRIMARY KEY, + sender_id INT NOT NULL, + receiver_id INT NOT NULL, + content TEXT NOT NULL, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + FOREIGN KEY (sender_id) REFERENCES users(id) ON DELETE CASCADE, + FOREIGN KEY (receiver_id) REFERENCES users(id) ON DELETE CASCADE +); + +CREATE TABLE IF NOT EXISTS notifications ( + id INT AUTO_INCREMENT PRIMARY KEY, + user_id INT NOT NULL, + content TEXT NOT NULL, + is_read TINYINT(1) DEFAULT 0, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE +); diff --git a/discover.php b/discover.php new file mode 100644 index 0000000..8813ee0 --- /dev/null +++ b/discover.php @@ -0,0 +1,162 @@ +prepare("SELECT * FROM users WHERE id = ?"); +$stmt->execute([$_SESSION['user_id']]); +$user = $stmt->fetch(); + +// Fetch startups (mock or real) +$stmt = db()->query("SELECT s.*, u.full_name as founder_name, u.university FROM startups s JOIN users u ON s.founder_id = u.id ORDER BY s.created_at DESC"); +$startups = $stmt->fetchAll(); + +$platformName = defined('PLATFORM_NAME') ? PLATFORM_NAME : 'Gatsby'; +?> + + + + + + Discover Startups — <?= htmlspecialchars($platformName) ?> + + + + + + +
+
+ + +
+ + Log Out +
+
+
+ +
+
+
+

Discover Startups

+

Back the most ambitious student projects.

+
+ + Start Funding Round + +
+ + +
+ +

No startups found

+

Be the first to list a startup or check back later.

+ + List My Startup + +
+ + +

Featured Startups (Mock)

+
+
+
+ Fintech + Oxford University +
+

UniPay

+

A decentralized payment platform designed specifically for international students to avoid high exchange fees.

+
+
+ Raised: £4,500 + Target: £10,000 +
+
+
+
+
+
+ Min Invest: £50 + View Details +
+
+ +
+
+ Sustainability + LSE +
+

GreenCampus

+

AI-powered waste management system for university campuses to increase recycling rates by 40%.

+
+
+ Raised: £1,200 + Target: £5,000 +
+
+
+
+
+
+ Min Invest: £50 + View Details +
+
+
+ +
+ +
+
+ Startup + +
+

+

+
+
+ Raised: £ + Target: £ +
+ 0) ? ($startup['funding_raised'] / $startup['funding_target'] * 100) : 0; + $percent = min(100, $percent); + ?> +
+
+
+
+
+ Min Invest: £50 + View Details +
+
+ +
+ +
+ + + + + diff --git a/edit_profile.php b/edit_profile.php new file mode 100644 index 0000000..0116bd0 --- /dev/null +++ b/edit_profile.php @@ -0,0 +1,129 @@ +prepare("SELECT * FROM users WHERE id = ?"); +$stmt->execute([$_SESSION['user_id']]); +$user = $stmt->fetch(); + +$platformName = defined('PLATFORM_NAME') ? PLATFORM_NAME : 'Gatsby'; + +$error = ''; +$success = ''; + +if ($_SERVER['REQUEST_METHOD'] === 'POST') { + $full_name = trim($_POST['full_name'] ?? ''); + $bio = trim($_POST['bio'] ?? ''); + $interests = trim($_POST['interests'] ?? ''); + $investment_appetite = trim($_POST['investment_appetite'] ?? ''); + + if (empty($full_name)) { + $error = "Name cannot be empty."; + } else { + $stmt = db()->prepare("UPDATE users SET full_name = ?, bio = ?, interests = ?, investment_appetite = ? WHERE id = ?"); + try { + $stmt->execute([$full_name, $bio, $interests, $investment_appetite, $_SESSION['user_id']]); + $success = "Profile updated successfully!"; + // Update session if name changed + $_SESSION['full_name'] = $full_name; + // Refresh user data + $stmt = db()->prepare("SELECT * FROM users WHERE id = ?"); + $stmt->execute([$_SESSION['user_id']]); + $user = $stmt->fetch(); + } catch (PDOException $e) { + $error = "Update failed: " . $e->getMessage(); + } + } +} +?> + + + + + + Edit Profile — <?= htmlspecialchars($platformName) ?> + + + + + + +
+
+ + +
+ Back to Dashboard +
+
+
+ +
+
+

Edit Profile

+

Manage your public presence in the community.

+ + +
+ +
+ + + +
+ +
+ + +
+
+
+ + +
+
+ + + University status is verified and cannot be changed. +
+
+ + +
+
+ + +
+ +
+ + +
+ + +
+
+
+
+ + + diff --git a/founder_onboarding.php b/founder_onboarding.php new file mode 100644 index 0000000..587ca42 --- /dev/null +++ b/founder_onboarding.php @@ -0,0 +1,88 @@ +prepare("UPDATE users SET bio = ?, interests = ? WHERE id = ?"); + try { + $stmt->execute([$bio, $interests, $_SESSION['user_id']]); + header("Location: dashboard.php"); + exit; + } catch (PDOException $e) { + $error = "Database error: " . $e->getMessage(); + } + } +} + +$platformName = defined('PLATFORM_NAME') ? PLATFORM_NAME : 'Gatsby'; +$skills_options = ['Frontend Development', 'Backend Development', 'Mobile App Development', 'UI/UX Design', 'Digital Marketing', 'Sales & Business Dev', 'Data Science', 'Operations', 'Finance', 'Legal']; +?> + + + + + + Founder Onboarding — <?= htmlspecialchars($platformName) ?> + + + + + + +
+

Create Your Founder Profile

+

Let people know what you're building and what skills you have.

+ + +
+ +
+ + +
+
+ + +
+ +
+ +
+ + + +
+
+ + +
+
+ + + + + diff --git a/index.php b/index.php index 9416a71..95b2afb 100644 --- a/index.php +++ b/index.php @@ -1,14 +1,15 @@ - Chat Assistant + <?= htmlspecialchars($platformName) ?> — Connect. Fund. Build. @@ -18,35 +19,97 @@ $projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? ''; - + + -
-
-
-
-
-
-
-
- Chat Assistant - Admin -
-
-
- Hello! I'm your assistant. How can I help you today? -
-
-
-
- - -
+ +
+ -
+ + +
+
+
+
+
+
+
+

Build the future,
funded by each other.

+

The exclusive platform for university students and graduates to connect as co-founders, share ideas, and micro-invest in the next big thing.

+ +
+
+ +
+
+
+
+

Verify

+

Exclusive access for verified university students and recent graduates (up to 5 years). Safe, trusted, and high-quality network.

+
+
+
+

Connect

+

Find your ideal co-founder or early team members using our intelligent matching questionnaire based on skills and vision.

+
+
+
+

Fund

+

Launch your startup to raise micro-investments starting from £50, or build your own portfolio by backing your peers.

+
+
+
+ +
+

How it works

+
+
+ 01 +

Join & Verify

+

Sign up with your university email. We verify your status to keep the community exclusive.

+
+
+ 02 +

Choose Your Path

+

Identify as a Founder to build or an Investor to back. Tailor your profile to your goals.

+
+
+ 03 +

Launch & Scale

+

List your startup, find co-founders, or start investing in the most ambitious student projects.

+
+
+
+
+ + - - \ No newline at end of file + diff --git a/investor_onboarding.php b/investor_onboarding.php new file mode 100644 index 0000000..64d994b --- /dev/null +++ b/investor_onboarding.php @@ -0,0 +1,94 @@ +prepare("UPDATE users SET bio = ?, interests = ?, investment_appetite = ? WHERE id = ?"); + try { + $stmt->execute([$bio, $interests, $investment_appetite, $_SESSION['user_id']]); + header("Location: dashboard.php"); + exit; + } catch (PDOException $e) { + $error = "Database error: " . $e->getMessage(); + } + } +} + +$platformName = defined('PLATFORM_NAME') ? PLATFORM_NAME : 'Gatsby'; +$interests_options = ['Tech', 'Sustainability', 'Healthcare', 'Fintech', 'Education', 'Consumer', 'Social Impact', 'AI', 'SaaS', 'E-commerce']; +?> + + + + + + Investor Onboarding — <?= htmlspecialchars($platformName) ?> + + + + + + +
+

Create Your Investor Profile

+

Tell us about your investment preferences.

+ + +
+ +
+ + +
+
+ + +
+ +
+ +
+ + + +
+
+ +
+ + +
+ + +
+
+ + + + + diff --git a/login.php b/login.php new file mode 100644 index 0000000..9c637db --- /dev/null +++ b/login.php @@ -0,0 +1,71 @@ +prepare("SELECT * FROM users WHERE email = ?"); + $stmt->execute([$email]); + $user = $stmt->fetch(); + + if ($user && password_verify($password, $user['password'])) { + $_SESSION['user_id'] = $user['id']; + $_SESSION['role'] = $user['role']; + $_SESSION['full_name'] = $user['full_name']; + + header("Location: dashboard.php"); + exit; + } else { + $error = "Invalid email or password."; + } + } +} + +$platformName = defined('PLATFORM_NAME') ? PLATFORM_NAME : 'Gatsby'; +?> + + + + + + Log In — <?= htmlspecialchars($platformName) ?> + + + + + + +
+ +

Welcome Back

+

Log in to access your startup network.

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

Don't have an account? Sign Up

+
+
+ + + diff --git a/logout.php b/logout.php new file mode 100644 index 0000000..b818557 --- /dev/null +++ b/logout.php @@ -0,0 +1,5 @@ +prepare("SELECT * FROM users WHERE id = ?"); +$stmt->execute([$_SESSION['user_id']]); +$user = $stmt->fetch(); + +$platformName = defined('PLATFORM_NAME') ? PLATFORM_NAME : 'Gatsby'; + +$stmt = db()->prepare("SELECT m.*, u.full_name as other_user_name FROM messages m JOIN users u ON (m.sender_id = u.id OR m.receiver_id = u.id) WHERE (m.sender_id = ? OR m.receiver_id = ?) AND u.id != ? ORDER BY m.created_at DESC"); +$stmt->execute([$_SESSION['user_id'], $_SESSION['user_id'], $_SESSION['user_id']]); +$messages = $stmt->fetchAll(); +?> + + + + + + Messages — <?= htmlspecialchars($platformName) ?> + + + + + + +
+ +
+ +
+

Messages

+

Communicate with founders and investors in the network.

+ +
+
+
+ +
+
+ +
+

No conversations yet.

+ Find people +
+ + +
+
+
+ +
+
+ + +
+
+
+ +

Select a conversation

+

Choose a contact on the left to start messaging. Reach out to students, co-founders, or investors.

+
+
+
+ + + diff --git a/notifications.php b/notifications.php new file mode 100644 index 0000000..150abcc --- /dev/null +++ b/notifications.php @@ -0,0 +1,82 @@ +prepare("SELECT * FROM users WHERE id = ?"); +$stmt->execute([$_SESSION['user_id']]); +$user = $stmt->fetch(); + +$platformName = defined('PLATFORM_NAME') ? PLATFORM_NAME : 'Gatsby'; + +$stmt = db()->prepare("SELECT * FROM notifications WHERE user_id = ? ORDER BY created_at DESC LIMIT 20"); +$stmt->execute([$_SESSION['user_id']]); +$notifications = $stmt->fetchAll(); +?> + + + + + + Notifications — <?= htmlspecialchars($platformName) ?> + + + + + + +
+ +
+ +
+

Notifications

+

Stay up to date with your network's latest updates.

+ +
+ +
+ +

No new notifications

+

We'll alert you here when something important happens.

+ Explore the Network +
+ + +
+
+ +
+
+
+
+
+
+ + +
+
+ + + diff --git a/partners.php b/partners.php new file mode 100644 index 0000000..a443b81 --- /dev/null +++ b/partners.php @@ -0,0 +1,105 @@ +prepare("SELECT * FROM users WHERE id = ?"); +$stmt->execute([$_SESSION['user_id']]); +$user = $stmt->fetch(); + +// Fetch other users with role 'founder' (potential partners) +$stmt = db()->prepare("SELECT * FROM users WHERE role = 'founder' AND id != ? ORDER BY created_at DESC"); +$stmt->execute([$_SESSION['user_id']]); +$partners = $stmt->fetchAll(); + +$platformName = defined('PLATFORM_NAME') ? PLATFORM_NAME : 'Gatsby'; +?> + + + + + + Find Partners — <?= htmlspecialchars($platformName) ?> + + + + + + +
+ +
+ +
+
+
+

Find Co-Founders

+

Connect with ambitious students building the future.

+
+
+ + +
+ +

No potential partners found

+

Be the first to list your profile or check back later.

+
+ +
+ +
+
+
+ +
+
+
+
'
+
+
+

+
+ + + + + +
+ Send Message +
+ +
+ +
+ + + + + diff --git a/portfolio.php b/portfolio.php new file mode 100644 index 0000000..9d15a90 --- /dev/null +++ b/portfolio.php @@ -0,0 +1,110 @@ +prepare("SELECT * FROM users WHERE id = ?"); +$stmt->execute([$_SESSION['user_id']]); +$user = $stmt->fetch(); + +$platformName = defined('PLATFORM_NAME') ? PLATFORM_NAME : 'Gatsby'; + +$myInvestments = []; +$stmt = db()->prepare("SELECT i.*, s.name as startup_name, s.description as startup_desc FROM investments i JOIN startups s ON i.startup_id = s.id WHERE i.investor_id = ? ORDER BY i.created_at DESC"); +$stmt->execute([$_SESSION['user_id']]); +$myInvestments = $stmt->fetchAll(); + +$totalInvested = 0; +foreach ($myInvestments as $inv) { + if ($inv['status'] === 'approved') { + $totalInvested += $inv['amount']; + } +} +?> + + + + + + My Portfolio — <?= htmlspecialchars($platformName) ?> + + + + + + +
+
+ + +
+ + Log Out +
+
+
+ +
+
+
+

Investment Portfolio

+

Manage your stakes in student-led startups.

+
+
+
+
Total Invested
+
£
+
+
+
Startups
+
+
+
+
+ +
+ +
+ +

No investments yet

+

Start building your portfolio by discovering startups.

+ Discover Startups +
+ + +
+
+
Invested on
+

+

...

+
+
+
+
Amount
+
£
+
+
+
Status
+
+ +
+
+ View Startup +
+
+ + +
+
+ + + diff --git a/register.php b/register.php new file mode 100644 index 0000000..e368d00 --- /dev/null +++ b/register.php @@ -0,0 +1,137 @@ + 2100) { + $error = "Invalid graduation year."; + } else { + // Check if email already exists + $stmt = db()->prepare("SELECT id FROM users WHERE email = ?"); + $stmt->execute([$email]); + if ($stmt->fetch()) { + $error = "Email already registered."; + } else { + // Generate verification code + $verification_code = bin2hex(random_bytes(16)); + $hashed_password = password_hash($password, PASSWORD_DEFAULT); + + // Insert user + $stmt = db()->prepare("INSERT INTO users (full_name, email, password, role, university, graduation_year, verification_code) VALUES (?, ?, ?, ?, ?, ?, ?)"); + try { + $stmt->execute([$full_name, $email, $hashed_password, $role, $university, $graduation_year, $verification_code]); + $success = "Registration successful! Please check your email to verify your account."; + + // Send verification email + // MailService::sendMail($email, "Verify your account", "Your verification code is: $verification_code", "Your verification code is: $verification_code"); + // For now, we'll just show the success message. + } catch (PDOException $e) { + $error = "Database error: " . $e->getMessage(); + } + } + } +} + +$platformName = defined('PLATFORM_NAME') ? PLATFORM_NAME : 'Gatsby'; +?> + + + + + + Sign Up — <?= htmlspecialchars($platformName) ?> + + + + + + +
+ +

Join the Exclusive Network

+

Verify your student or graduate status to get started.

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

Go to Log In

+ +
+
+ + +
+
+ + + Only university/graduate emails accepted. +
+
+
+ + +
+
+ + +
+
+
+ + +
+
+ +
+ + +
+
+ +

Already have an account? Log In

+
+ +
+ + + + + diff --git a/start_funding.php b/start_funding.php new file mode 100644 index 0000000..8effe63 --- /dev/null +++ b/start_funding.php @@ -0,0 +1,89 @@ +prepare("INSERT INTO startups (name, description, founder_id, funding_target, status) VALUES (?, ?, ?, ?, ?)"); + try { + $stmt->execute([$name, $description, $_SESSION['user_id'], $target, $status]); + $success = "Startup listed successfully! Your funding round is now active."; + header("refresh:2;url=dashboard.php"); + } catch (PDOException $e) { + $error = "Database error: " . $e->getMessage(); + } + } +} + +$platformName = defined('PLATFORM_NAME') ? PLATFORM_NAME : 'Gatsby'; +?> + + + + + + Start Funding Round — <?= htmlspecialchars($platformName) ?> + + + + + + +
+

List Your Startup

+

Kickstart your project with micro-investments from peers.

+ + +
+ +
+ + + +
+ +
+ +
+
+ + +
+
+ + +
+
+ + + Min investment per user will be £50. +
+
+ + +
+ +
+ +
+ + + diff --git a/startups.php b/startups.php new file mode 100644 index 0000000..7086d39 --- /dev/null +++ b/startups.php @@ -0,0 +1,121 @@ +prepare("SELECT * FROM users WHERE id = ?"); +$stmt->execute([$_SESSION['user_id']]); +$user = $stmt->fetch(); + +$platformName = defined('PLATFORM_NAME') ? PLATFORM_NAME : 'Gatsby'; + +$myStartups = []; +if ($user['role'] === 'founder') { + $stmt = db()->prepare("SELECT * FROM startups WHERE founder_id = ? ORDER BY created_at DESC"); + $stmt->execute([$_SESSION['user_id']]); + $myStartups = $stmt->fetchAll(); +} else { + // Investors see all public startups + $stmt = db()->prepare("SELECT * FROM startups WHERE status = 'public' ORDER BY created_at DESC"); + $stmt->execute(); + $myStartups = $stmt->fetchAll(); +} +?> + + + + + + My Startups — <?= htmlspecialchars($platformName) ?> + + + + + + +
+ +
+ +
+
+
+

+

Manage and track your ventures.

+
+ + List New Startup + +
+ +
+ +
+ +

No startups found

+

Start your journey by listing your first startup or idea.

+ + Start Funding Round + +
+ + +
+
+

+ + + +
+

+ ... +

+
+
+ Progress + % +
+
+
+
+
+
+
+
Raised
+
£
+
+
+
Target
+
£
+
+ Manage +
+
+ + +
+
+ + +