v28
This commit is contained in:
parent
096a24971d
commit
66df8a0207
347
create_startup.php
Normal file
347
create_startup.php
Normal file
@ -0,0 +1,347 @@
|
||||
<?php
|
||||
session_start();
|
||||
if (!isset($_SESSION['user_id']) || $_SESSION['role'] !== 'founder') {
|
||||
header("Location: login.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
require_once __DIR__ . '/db/config.php';
|
||||
require_once __DIR__ . '/ai/LocalAIApi.php';
|
||||
|
||||
$error = '';
|
||||
$success = '';
|
||||
$existingStartup = null;
|
||||
|
||||
$startup_id = (int)($_GET['id'] ?? 0);
|
||||
if ($startup_id > 0) {
|
||||
$stmt = db()->prepare("SELECT * FROM startups WHERE id = ? AND founder_id = ?");
|
||||
$stmt->execute([$startup_id, $_SESSION['user_id']]);
|
||||
$existingStartup = $stmt->fetch();
|
||||
}
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
// Basic Info
|
||||
$name = trim($_POST['name'] ?? '');
|
||||
$legal_name = trim($_POST['legal_name'] ?? '');
|
||||
$country = trim($_POST['country'] ?? '');
|
||||
$industry = trim($_POST['industry'] ?? '');
|
||||
$sub_industry = trim($_POST['sub_industry'] ?? '');
|
||||
$business_model = trim($_POST['business_model'] ?? '');
|
||||
$product_service = trim($_POST['product_service'] ?? '');
|
||||
$operational_stage = trim($_POST['operational_stage'] ?? '');
|
||||
|
||||
// Equity Structure
|
||||
$total_shares = (int)($_POST['total_shares'] ?? 0);
|
||||
$share_classes = trim($_POST['share_classes'] ?? '');
|
||||
$founder_ownership = trim($_POST['founder_ownership'] ?? '');
|
||||
$investor_ownership = trim($_POST['investor_ownership'] ?? '');
|
||||
$esop_percentage = (float)($_POST['esop_percentage'] ?? 0);
|
||||
$convertible_instruments = trim($_POST['convertible_instruments'] ?? '');
|
||||
|
||||
// Current Financials
|
||||
$current_cash_balance = (float)($_POST['current_cash_balance'] ?? 0);
|
||||
$outstanding_debt = trim($_POST['outstanding_debt'] ?? '');
|
||||
$accounts_receivable_payable = trim($_POST['accounts_receivable_payable'] ?? '');
|
||||
$burn_rate = (float)($_POST['burn_rate'] ?? 0);
|
||||
|
||||
// File Uploads
|
||||
$upload_dir = 'assets/docs/financials/';
|
||||
if (!is_dir($upload_dir)) {
|
||||
mkdir($upload_dir, 0775, true);
|
||||
}
|
||||
|
||||
$doc_fields = [
|
||||
'doc_income_statements',
|
||||
'doc_balance_sheets',
|
||||
'doc_cash_flow_statements',
|
||||
'doc_revenue_breakdown',
|
||||
'doc_gross_margin',
|
||||
'doc_opex_breakdown'
|
||||
];
|
||||
|
||||
$uploaded_paths = [];
|
||||
foreach ($doc_fields as $field) {
|
||||
if (isset($_FILES[$field]) && $_FILES[$field]['error'] === UPLOAD_ERR_OK) {
|
||||
$file_ext = pathinfo($_FILES[$field]['name'], PATHINFO_EXTENSION);
|
||||
$file_name = uniqid($field . '_', true) . '.' . $file_ext;
|
||||
$dest_path = $upload_dir . $file_name;
|
||||
if (move_uploaded_file($_FILES[$field]['tmp_name'], $dest_path)) {
|
||||
$uploaded_paths[$field] = $dest_path;
|
||||
} else {
|
||||
$error = "Failed to upload $field.";
|
||||
break;
|
||||
}
|
||||
} elseif ($existingStartup && !empty($existingStartup[$field])) {
|
||||
$uploaded_paths[$field] = $existingStartup[$field];
|
||||
} else {
|
||||
$error = "The financial document for $field is mandatory.";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
if (empty($name) || empty($legal_name) || empty($country) || empty($industry) || empty($business_model) || empty($product_service) || empty($operational_stage)) {
|
||||
$error = "Please fill in all mandatory company information fields.";
|
||||
}
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
db()->beginTransaction();
|
||||
try {
|
||||
// Compute AI Recommended Return Rate
|
||||
$recommended_return_rate = $existingStartup['recommended_return_rate'] ?? 0.0;
|
||||
|
||||
// Re-calculate only if it's a new startup or if financials changed significantly (simplified: always re-calc if it's a POST)
|
||||
$prompt = "As a financial analyst, calculate a recommended annual dividend yield (interest percentage) based on this startup profile:
|
||||
Name: {$name}
|
||||
Industry: {$industry}/{$sub_industry}
|
||||
Business Model: {$business_model}
|
||||
Product: {$product_service}
|
||||
Stage: {$operational_stage}
|
||||
Cash Balance: £{$current_cash_balance}
|
||||
Burn Rate: £{$burn_rate}
|
||||
|
||||
Respond ONLY with a JSON object: {\"recommended_rate\": X.X}";
|
||||
|
||||
$aiResponse = LocalAIApi::createResponse([
|
||||
'input' => [
|
||||
['role' => 'system', 'content' => 'You are a financial analyst. Return JSON only.'],
|
||||
['role' => 'user', 'content' => $prompt],
|
||||
],
|
||||
]);
|
||||
|
||||
if (!empty($aiResponse['success'])) {
|
||||
$decoded = LocalAIApi::decodeJsonFromResponse($aiResponse);
|
||||
$recommended_return_rate = (float)($decoded['recommended_rate'] ?? 5.0);
|
||||
}
|
||||
|
||||
if ($existingStartup) {
|
||||
$stmt = db()->prepare("UPDATE startups SET
|
||||
name = ?, legal_name = ?, country = ?, industry = ?, sub_industry = ?, business_model = ?, product_service = ?, operational_stage = ?,
|
||||
total_shares = ?, share_classes = ?, founder_ownership = ?, investor_ownership = ?, esop_percentage = ?, convertible_instruments = ?,
|
||||
current_cash_balance = ?, outstanding_debt = ?, accounts_receivable_payable = ?, burn_rate = ?,
|
||||
doc_income_statements = ?, doc_balance_sheets = ?, doc_cash_flow_statements = ?, doc_revenue_breakdown = ?, doc_gross_margin = ?, doc_opex_breakdown = ?,
|
||||
recommended_return_rate = ?
|
||||
WHERE id = ? AND founder_id = ?");
|
||||
|
||||
$stmt->execute([
|
||||
$name, $legal_name, $country, $industry, $sub_industry, $business_model, $product_service, $operational_stage,
|
||||
$total_shares, $share_classes, $founder_ownership, $investor_ownership, $esop_percentage, $convertible_instruments,
|
||||
$current_cash_balance, $outstanding_debt, $accounts_receivable_payable, $burn_rate,
|
||||
$uploaded_paths['doc_income_statements'], $uploaded_paths['doc_balance_sheets'], $uploaded_paths['doc_cash_flow_statements'],
|
||||
$uploaded_paths['doc_revenue_breakdown'], $uploaded_paths['doc_gross_margin'], $uploaded_paths['doc_opex_breakdown'],
|
||||
$recommended_return_rate, $existingStartup['id'], $_SESSION['user_id']
|
||||
]);
|
||||
$final_id = $existingStartup['id'];
|
||||
} else {
|
||||
$stmt = db()->prepare("INSERT INTO startups (
|
||||
name, legal_name, country, industry, sub_industry, business_model, product_service, operational_stage,
|
||||
total_shares, share_classes, founder_ownership, investor_ownership, esop_percentage, convertible_instruments,
|
||||
current_cash_balance, outstanding_debt, accounts_receivable_payable, burn_rate,
|
||||
doc_income_statements, doc_balance_sheets, doc_cash_flow_statements, doc_revenue_breakdown, doc_gross_margin, doc_opex_breakdown,
|
||||
founder_id, recommended_return_rate, status
|
||||
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 'private')");
|
||||
|
||||
$stmt->execute([
|
||||
$name, $legal_name, $country, $industry, $sub_industry, $business_model, $product_service, $operational_stage,
|
||||
$total_shares, $share_classes, $founder_ownership, $investor_ownership, $esop_percentage, $convertible_instruments,
|
||||
$current_cash_balance, $outstanding_debt, $accounts_receivable_payable, $burn_rate,
|
||||
$uploaded_paths['doc_income_statements'], $uploaded_paths['doc_balance_sheets'], $uploaded_paths['doc_cash_flow_statements'],
|
||||
$uploaded_paths['doc_revenue_breakdown'], $uploaded_paths['doc_gross_margin'], $uploaded_paths['doc_opex_breakdown'],
|
||||
$_SESSION['user_id'], $recommended_return_rate
|
||||
]);
|
||||
$final_id = db()->lastInsertId();
|
||||
}
|
||||
|
||||
db()->commit();
|
||||
$success = "Startup profile saved successfully! Recommended return rate: " . number_format($recommended_return_rate, 2) . "%ற்றில்";
|
||||
header("refresh:2;url=startup_details.php?id=" . $final_id);
|
||||
} catch (Exception $e) {
|
||||
db()->rollBack();
|
||||
$error = "Error: " . $e->getMessage();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$platformName = defined('PLATFORM_NAME') ? PLATFORM_NAME : 'Gatsby';
|
||||
?>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title><?= $existingStartup ? 'Edit Profile' : 'Step 1: Setup Startup Profile' ?> — <?= htmlspecialchars($platformName) ?></title>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
||||
</head>
|
||||
<body style="padding: 60px 20px; background: #0f0f13;">
|
||||
|
||||
<div class="container" style="max-width: 900px; margin: 0 auto;">
|
||||
<div class="card" style="padding: 40px;">
|
||||
<h1 style="font-size: 32px; font-weight: 800; margin-bottom: 10px;"><?= $existingStartup ? 'Edit Startup Profile' : 'Step 1: Company Profile Setup' ?></h1>
|
||||
<p style="color: var(--text-secondary); margin-bottom: 30px;">
|
||||
<?= $existingStartup ? 'Update your venture details below.' : 'This information is required to establish your startup entity and calculate investor return projections.' ?>
|
||||
</p>
|
||||
|
||||
<?php if ($error): ?>
|
||||
<div style="background: rgba(255, 0, 0, 0.1); border: 1px solid rgba(255, 0, 0, 0.3); color: #ff5555; padding: 15px; border-radius: 12px; margin-bottom: 25px;">
|
||||
<i class="fas fa-exclamation-circle" style="margin-right: 8px;"></i> <?= htmlspecialchars($error) ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($success): ?>
|
||||
<div style="background: rgba(0, 255, 0, 0.1); border: 1px solid rgba(0, 255, 0, 0.3); color: #55ff55; padding: 15px; border-radius: 12px; margin-bottom: 25px;">
|
||||
<i class="fas fa-check-circle" style="margin-right: 8px;"></i> <?= htmlspecialchars($success) ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<form method="POST" enctype="multipart/form-data">
|
||||
|
||||
<h3 style="margin-bottom: 20px; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; font-size: 18px;"><i class="fas fa-info-circle"></i> 1. Basic Company Information</h3>
|
||||
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px;">
|
||||
<div>
|
||||
<label>Startup Name *</label>
|
||||
<input type="text" name="name" required value="<?= htmlspecialchars($existingStartup['name'] ?? '') ?>">
|
||||
</div>
|
||||
<div>
|
||||
<label>Registered Legal Name *</label>
|
||||
<input type="text" name="legal_name" required value="<?= htmlspecialchars($existingStartup['legal_name'] ?? '') ?>">
|
||||
</div>
|
||||
<div>
|
||||
<label>Country of Incorporation *</label>
|
||||
<input type="text" name="country" required value="<?= htmlspecialchars($existingStartup['country'] ?? '') ?>">
|
||||
</div>
|
||||
<div>
|
||||
<label>Industry *</label>
|
||||
<select name="industry" required>
|
||||
<?php $ind = $existingStartup['industry'] ?? ''; ?>
|
||||
<option value="">Select Industry</option>
|
||||
<option value="Fintech" <?= $ind == 'Fintech' ? 'selected' : '' ?>>Fintech</option>
|
||||
<option value="Healthtech" <?= $ind == 'Healthtech' ? 'selected' : '' ?>>Healthtech</option>
|
||||
<option value="Edtech" <?= $ind == 'Edtech' ? 'selected' : '' ?>>Edtech</option>
|
||||
<option value="SaaS" <?= $ind == 'SaaS' ? 'selected' : '' ?>>SaaS</option>
|
||||
<option value="AI & Robotics" <?= $ind == 'AI & Robotics' ? 'selected' : '' ?>>AI & Robotics</option>
|
||||
<option value="Clean Energy" <?= $ind == 'Clean Energy' ? 'selected' : '' ?>>Clean Energy</option>
|
||||
<option value="Other" <?= $ind == 'Other' ? 'selected' : '' ?>>Other</option>
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<label>Sub-Industry *</label>
|
||||
<input type="text" name="sub_industry" required value="<?= htmlspecialchars($existingStartup['sub_industry'] ?? '') ?>">
|
||||
</div>
|
||||
<div>
|
||||
<label>Operational Stage *</label>
|
||||
<select name="operational_stage" required>
|
||||
<?php $stage = $existingStartup['operational_stage'] ?? ''; ?>
|
||||
<option value="">Select Stage</option>
|
||||
<option value="Idea" <?= $stage == 'Idea' ? 'selected' : '' ?>>Idea / Concept</option>
|
||||
<option value="MVP" <?= $stage == 'MVP' ? 'selected' : '' ?>>MVP (Minimum Viable Product)</option>
|
||||
<option value="Pre-revenue" <?= $stage == 'Pre-revenue' ? 'selected' : '' ?>>Pre-revenue (Early Traction)</option>
|
||||
<option value="Revenue-generating" <?= $stage == 'Revenue-generating' ? 'selected' : '' ?>>Revenue-generating</option>
|
||||
<option value="Scaling" <?= $stage == 'Scaling' ? 'selected' : '' ?>>Scaling / Growth</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-bottom: 20px;">
|
||||
<label>Business Model Description *</label>
|
||||
<textarea name="business_model" required style="height: 80px;"><?= htmlspecialchars($existingStartup['business_model'] ?? '') ?></textarea>
|
||||
</div>
|
||||
<div style="margin-bottom: 30px;">
|
||||
<label>Product/Service Description *</label>
|
||||
<textarea name="product_service" required style="height: 80px;"><?= htmlspecialchars($existingStartup['product_service'] ?? '') ?></textarea>
|
||||
</div>
|
||||
|
||||
<h3 style="margin-bottom: 20px; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; font-size: 18px;"><i class="fas fa-chart-pie"></i> 2. Equity Structure Information</h3>
|
||||
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px;">
|
||||
<div>
|
||||
<label>Total Shares Issued</label>
|
||||
<input type="number" name="total_shares" value="<?= (int)($existingStartup['total_shares'] ?? 1000000) ?>">
|
||||
</div>
|
||||
<div>
|
||||
<label>ESOP Pool (%)</label>
|
||||
<input type="number" step="0.01" name="esop_percentage" value="<?= (float)($existingStartup['esop_percentage'] ?? 0) ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-bottom: 20px;">
|
||||
<label>Share Classes</label>
|
||||
<textarea name="share_classes" style="height: 60px;"><?= htmlspecialchars($existingStartup['share_classes'] ?? '') ?></textarea>
|
||||
</div>
|
||||
<div style="margin-bottom: 20px;">
|
||||
<label>Founder Ownership Breakdown</label>
|
||||
<textarea name="founder_ownership" style="height: 60px;"><?= htmlspecialchars($existingStartup['founder_ownership'] ?? '') ?></textarea>
|
||||
</div>
|
||||
<div style="margin-bottom: 20px;">
|
||||
<label>Existing Investor Ownership</label>
|
||||
<textarea name="investor_ownership" style="height: 60px;"><?= htmlspecialchars($existingStartup['investor_ownership'] ?? '') ?></textarea>
|
||||
</div>
|
||||
<div style="margin-bottom: 30px;">
|
||||
<label>Convertible Instruments (SAFE, Notes)</label>
|
||||
<textarea name="convertible_instruments" style="height: 60px;"><?= htmlspecialchars($existingStartup['convertible_instruments'] ?? '') ?></textarea>
|
||||
</div>
|
||||
|
||||
<h3 style="margin-bottom: 20px; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; font-size: 18px;"><i class="fas fa-file-invoice-dollar"></i> 3. Mandatory Financials</h3>
|
||||
|
||||
<div style="background: rgba(255,255,255,0.03); padding: 20px; border-radius: 12px; margin-bottom: 25px;">
|
||||
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px;">
|
||||
<div>
|
||||
<label>Current Cash Balance (£)</label>
|
||||
<input type="number" step="0.01" name="current_cash_balance" value="<?= (float)($existingStartup['current_cash_balance'] ?? 0) ?>">
|
||||
</div>
|
||||
<div>
|
||||
<label>Monthly Burn Rate (£)</label>
|
||||
<input type="number" step="0.01" name="burn_rate" value="<?= (float)($existingStartup['burn_rate'] ?? 0) ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-bottom: 20px;">
|
||||
<label>Outstanding Debt</label>
|
||||
<input type="text" name="outstanding_debt" value="<?= htmlspecialchars($existingStartup['outstanding_debt'] ?? '') ?>">
|
||||
</div>
|
||||
<div style="margin-bottom: 20px;">
|
||||
<label>Accounts Receivable / Payable</label>
|
||||
<input type="text" name="accounts_receivable_payable" value="<?= htmlspecialchars($existingStartup['accounts_receivable_payable'] ?? '') ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p style="font-size: 14px; font-weight: 700; color: var(--accent-blue); margin-bottom: 15px;">Historical Financial Documentation (PDF/Images)</p>
|
||||
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 30px;">
|
||||
<?php
|
||||
$doc_labels = [
|
||||
'doc_income_statements' => 'Income Statements',
|
||||
'doc_balance_sheets' => 'Balance Sheets',
|
||||
'doc_cash_flow_statements' => 'Cash Flow Statements',
|
||||
'doc_revenue_breakdown' => 'Revenue Breakdown',
|
||||
'doc_gross_margin' => 'Gross Margin Data',
|
||||
'doc_opex_breakdown' => 'OpEx Breakdown'
|
||||
];
|
||||
foreach ($doc_labels as $f_name => $label):
|
||||
?>
|
||||
<div class="file-input-group">
|
||||
<label><?= $label ?> <?= $existingStartup ? '' : '*' ?></label>
|
||||
<input type="file" name="<?= $f_name ?>" <?= $existingStartup ? '' : 'required' ?> accept=".pdf,image/*">
|
||||
<?php if ($existingStartup && !empty($existingStartup[$f_name])):
|
||||
?>
|
||||
<span style="font-size: 10px; color: #4cd964;"><i class="fas fa-check"></i> Already uploaded</span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary" style="width: 100%; padding: 18px; font-weight: 800; font-size: 18px; border-radius: 16px;">
|
||||
<?= $existingStartup ? 'Update Profile' : 'Create Startup Profile' ?> <i class="fas fa-save" style="margin-left: 10px;"></i>
|
||||
</button>
|
||||
<a href="<?= $existingStartup ? 'startup_details.php?id=' . $startup_id : 'dashboard.php' ?>" style="display: block; text-align: center; margin-top: 15px; color: var(--text-secondary); text-decoration: none;">Cancel</a>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--text-secondary); }
|
||||
input, select, textarea { width: 100%; padding: 12px 16px; background: var(--surface-color); border: 1px solid var(--border-color); border-radius: 12px; color: #fff; font-size: 14px; margin-bottom: 10px; }
|
||||
textarea { resize: vertical; }
|
||||
.file-input-group { background: rgba(255,255,255,0.02); padding: 15px; border-radius: 12px; border: 1px dashed var(--border-color); }
|
||||
.file-input-group input { border: none; padding: 0; margin: 0; background: transparent; }
|
||||
</style>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@ -163,14 +163,14 @@ function number_get_formatted($num) {
|
||||
<div class="card" style="margin-bottom: 40px; padding: 35px;">
|
||||
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px;">
|
||||
<h3 style="margin: 0; font-size: 24px; font-weight: 800;">My Ventures</h3>
|
||||
<a href="start_funding.php" class="btn btn-primary" style="padding: 12px 24px; font-size: 14px;">+ Launch Startup</a>
|
||||
<a href="create_startup.php" class="btn btn-primary" style="padding: 12px 24px; font-size: 14px;">+ Launch Startup</a>
|
||||
</div>
|
||||
|
||||
<?php if (empty($myStartups)): ?>
|
||||
<div style="text-align: center; padding: 60px 0; background: rgba(255,255,255,0.02); border-radius: 32px; border: 1px dashed var(--border-color);">
|
||||
<div class="card-icon" style="margin: 0 auto 20px; background: rgba(0, 242, 255, 0.1);"><i class="fas fa-rocket"></i></div>
|
||||
<p style="color: var(--text-secondary); margin-bottom: 25px; font-size: 18px;">Ready to share your vision with the world?</p>
|
||||
<a href="start_funding.php" class="btn btn-primary">Start Your First Round</a>
|
||||
<a href="create_startup.php" class="btn btn-primary">Start Your First Round</a>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div style="display: grid; grid-template-columns: 1fr; gap: 20px;">
|
||||
|
||||
24
db/migrations/12_detailed_startup_profile.sql
Normal file
24
db/migrations/12_detailed_startup_profile.sql
Normal file
@ -0,0 +1,24 @@
|
||||
-- Migration: Add detailed startup profile fields
|
||||
ALTER TABLE startups
|
||||
ADD COLUMN legal_name VARCHAR(255) AFTER name,
|
||||
ADD COLUMN country VARCHAR(100) AFTER legal_name,
|
||||
ADD COLUMN sub_industry VARCHAR(100) AFTER industry,
|
||||
ADD COLUMN business_model TEXT AFTER sub_industry,
|
||||
ADD COLUMN product_service TEXT AFTER business_model,
|
||||
ADD COLUMN operational_stage VARCHAR(100) AFTER product_service,
|
||||
ADD COLUMN total_shares BIGINT AFTER operational_stage,
|
||||
ADD COLUMN share_classes TEXT AFTER total_shares,
|
||||
ADD COLUMN founder_ownership TEXT AFTER share_classes,
|
||||
ADD COLUMN investor_ownership TEXT AFTER founder_ownership,
|
||||
ADD COLUMN esop_percentage DECIMAL(5,2) AFTER investor_ownership,
|
||||
ADD COLUMN convertible_instruments TEXT AFTER esop_percentage,
|
||||
ADD COLUMN current_cash_balance DECIMAL(15,2) AFTER convertible_instruments,
|
||||
ADD COLUMN outstanding_debt TEXT AFTER current_cash_balance,
|
||||
ADD COLUMN accounts_receivable_payable TEXT AFTER outstanding_debt,
|
||||
ADD COLUMN burn_rate DECIMAL(15,2) AFTER accounts_receivable_payable,
|
||||
ADD COLUMN doc_income_statements VARCHAR(255) AFTER financial_doc_path,
|
||||
ADD COLUMN doc_balance_sheets VARCHAR(255) AFTER doc_income_statements,
|
||||
ADD COLUMN doc_cash_flow_statements VARCHAR(255) AFTER doc_balance_sheets,
|
||||
ADD COLUMN doc_revenue_breakdown VARCHAR(255) AFTER doc_cash_flow_statements,
|
||||
ADD COLUMN doc_gross_margin VARCHAR(255) AFTER doc_revenue_breakdown,
|
||||
ADD COLUMN doc_opex_breakdown VARCHAR(255) AFTER doc_gross_margin;
|
||||
@ -1,226 +0,0 @@
|
||||
<?php
|
||||
session_start();
|
||||
if (!isset($_SESSION['user_id']) || $_SESSION['role'] !== 'founder') {
|
||||
header("Location: login.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
require_once __DIR__ . '/db/config.php';
|
||||
require_once __DIR__ . '/ai/LocalAIApi.php';
|
||||
|
||||
$error = '';
|
||||
$success = '';
|
||||
$existingStartup = null;
|
||||
|
||||
$startup_id = (int)($_GET['id'] ?? 0);
|
||||
if ($startup_id > 0) {
|
||||
$stmt = db()->prepare("SELECT * FROM startups WHERE id = ? AND founder_id = ?");
|
||||
$stmt->execute([$startup_id, $_SESSION['user_id']]);
|
||||
$existingStartup = $stmt->fetch();
|
||||
|
||||
if (!$existingStartup) {
|
||||
header("Location: startups.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
// Check if there is already an active round
|
||||
$stmt = db()->prepare("SELECT id FROM funding_rounds WHERE startup_id = ? AND status = 'Active'");
|
||||
$stmt->execute([$startup_id]);
|
||||
if ($stmt->fetch()) {
|
||||
header("Location: startup_details.php?id=" . $startup_id);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
$name = trim($_POST['name'] ?? '');
|
||||
$description = trim($_POST['description'] ?? '');
|
||||
$industry = trim($_POST['industry'] ?? '');
|
||||
$equity_structure = trim($_POST['equity_structure'] ?? '');
|
||||
$target = (float)($_POST['funding_target'] ?? 0);
|
||||
$status = $_POST['status'] ?? 'public';
|
||||
$founder_return_rate = isset($_POST['founder_return_rate']) && $_POST['founder_return_rate'] !== '' ? (float)$_POST['founder_return_rate'] : null;
|
||||
|
||||
// Financial Document Upload
|
||||
$financial_doc_path = '';
|
||||
if (isset($_FILES['financial_doc']) && $_FILES['financial_doc']['error'] === UPLOAD_ERR_OK) {
|
||||
$upload_dir = 'assets/docs/financials/';
|
||||
if (!is_dir($upload_dir)) {
|
||||
mkdir($upload_dir, 0775, true);
|
||||
}
|
||||
$file_ext = pathinfo($_FILES['financial_doc']['name'], PATHINFO_EXTENSION);
|
||||
$file_name = uniqid('fin_', true) . '.' . $file_ext;
|
||||
$dest_path = $upload_dir . $file_name;
|
||||
|
||||
if (move_uploaded_file($_FILES['financial_doc']['tmp_name'], $dest_path)) {
|
||||
$financial_doc_path = $dest_path;
|
||||
} else {
|
||||
$error = "Failed to upload financial documentation.";
|
||||
}
|
||||
} elseif (!$existingStartup) {
|
||||
$error = "Financial documentation is mandatory for new startups.";
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
if ((!$existingStartup && (empty($name) || empty($description) || empty($industry) || empty($equity_structure) || empty($financial_doc_path))) || $target < 50) {
|
||||
$error = "Please fill in all required fields and upload financial documents. Minimum target is £50.";
|
||||
} else {
|
||||
// AI Calculation for Recommended Return Rate
|
||||
$recommended_return_rate = 5.0; // Default fallback
|
||||
|
||||
$prompt = "As a financial analyst for a startup investment platform, calculate a recommended annual dividend yield (interest percentage) for the following startup.
|
||||
Startup Name: {$name}
|
||||
Industry: {$industry}
|
||||
Description: {$description}
|
||||
Funding Target: £{$target}
|
||||
Equity Structure: {$equity_structure}
|
||||
|
||||
Respond ONLY with a JSON object containing a single key 'recommended_rate' with a numeric value (percentage). Example: {\"recommended_rate\": 8.5}";
|
||||
|
||||
$aiResponse = LocalAIApi::createResponse([
|
||||
'input' => [['role' => 'system', 'content' => 'You are a professional financial analyst. Return JSON only.'],
|
||||
['role' => 'user', 'content' => $prompt],
|
||||
],
|
||||
]);
|
||||
|
||||
if (!empty($aiResponse['success'])) {
|
||||
$decoded = LocalAIApi::decodeJsonFromResponse($aiResponse);
|
||||
if (isset($decoded['recommended_rate'])) {
|
||||
$recommended_return_rate = (float)$decoded['recommended_rate'];
|
||||
}
|
||||
}
|
||||
|
||||
db()->beginTransaction();
|
||||
try {
|
||||
if ($existingStartup) {
|
||||
// Update existing startup with new return rates if provided
|
||||
$stmt = db()->prepare("UPDATE startups SET recommended_return_rate = ?, founder_return_rate = ? WHERE id = ?");
|
||||
$stmt->execute([$recommended_return_rate, $founder_return_rate, $existingStartup['id']]);
|
||||
|
||||
// Create a new round
|
||||
$stmt = db()->prepare("INSERT INTO funding_rounds (startup_id, funding_goal, status) VALUES (?, ?, 'Active')");
|
||||
$stmt->execute([$existingStartup['id'], $target]);
|
||||
$final_id = $existingStartup['id'];
|
||||
} else {
|
||||
// 1. Insert startup with new fields
|
||||
$stmt = db()->prepare("INSERT INTO startups (name, description, industry, equity_structure, financial_doc_path, founder_id, funding_target, status, recommended_return_rate, founder_return_rate) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
|
||||
$stmt->execute([$name, $description, $industry, $equity_structure, $financial_doc_path, $_SESSION['user_id'], $target, $status, $recommended_return_rate, $founder_return_rate]);
|
||||
$new_startup_id = db()->lastInsertId();
|
||||
|
||||
// 2. Insert initial funding round
|
||||
$stmt = db()->prepare("INSERT INTO funding_rounds (startup_id, funding_goal, status) VALUES (?, ?, 'Active')");
|
||||
$stmt->execute([$new_startup_id, $target]);
|
||||
$final_id = $new_startup_id;
|
||||
}
|
||||
|
||||
db()->commit();
|
||||
$success = "Startup successfully listed with a recommended return rate of " . number_format($recommended_return_rate, 2) . "%!";
|
||||
header("refresh:3;url=startup_details.php?id=" . $final_id);
|
||||
} catch (PDOException $e) {
|
||||
db()->rollBack();
|
||||
$error = "Database error: " . $e->getMessage();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$platformName = defined('PLATFORM_NAME') ? PLATFORM_NAME : 'Gatsby';
|
||||
?>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title><?= $existingStartup ? 'Start New Round' : 'Launch Startup' ?> — <?= htmlspecialchars($platformName) ?></title>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
||||
</head>
|
||||
<body style="display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 40px 20px;">
|
||||
|
||||
<div class="card" style="width: 100%; max-width: 650px;">
|
||||
<h2 style="margin-bottom: 10px;"><?= $existingStartup ? 'Start New Round for ' . htmlspecialchars($existingStartup['name']) : 'Launch Your Startup' ?></h2>
|
||||
<p style="color: var(--text-secondary); margin-bottom: 30px;">
|
||||
<?= $existingStartup ? 'Update your funding goal and return rates.' : 'Complete the form below to list your startup and receive a platform-calculated return rate recommendation.' ?>
|
||||
</p>
|
||||
|
||||
<?php if ($error): ?>
|
||||
<div style="background: rgba(255, 0, 0, 0.1); border: 1px solid rgba(255, 0, 0, 0.3); color: #ff5555; padding: 12px; border-radius: 8px; margin-bottom: 20px;">
|
||||
<i class="fas fa-exclamation-circle" style="margin-right: 8px;"></i> <?= htmlspecialchars($error) ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($success): ?>
|
||||
<div style="background: rgba(0, 255, 0, 0.1); border: 1px solid rgba(0, 255, 0, 0.3); color: #55ff55; padding: 12px; border-radius: 8px; margin-bottom: 20px;">
|
||||
<i class="fas fa-check-circle" style="margin-right: 8px;"></i> <?= htmlspecialchars($success) ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<form method="POST" enctype="multipart/form-data">
|
||||
<?php if (!$existingStartup): ?>
|
||||
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 15px;">
|
||||
<div>
|
||||
<label style="display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500;">Startup Name *</label>
|
||||
<input type="text" name="name" required style="width: 100%; padding: 12px; border-radius: 12px; background: var(--surface-color); border: 1px solid var(--border-color); color: #fff;">
|
||||
</div>
|
||||
<div>
|
||||
<label style="display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500;">Industry *</label>
|
||||
<select name="industry" required style="width: 100%; padding: 12px; border-radius: 12px; background: var(--surface-color); border: 1px solid var(--border-color); color: #fff;">
|
||||
<option value="">Select Industry</option>
|
||||
<option value="Fintech">Fintech</option>
|
||||
<option value="Healthtech">Healthtech</option>
|
||||
<option value="Edtech">Edtech</option>
|
||||
<option value="E-commerce">E-commerce</option>
|
||||
<option value="SaaS">SaaS</option>
|
||||
<option value="Clean Energy">Clean Energy</option>
|
||||
<option value="AI & Robotics">AI & Robotics</option>
|
||||
<option value="Other">Other</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="margin-bottom: 15px;">
|
||||
<label style="display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500;">Description *</label>
|
||||
<textarea name="description" placeholder="What does your startup do?" required style="width: 100%; padding: 12px; border-radius: 12px; background: var(--surface-color); border: 1px solid var(--border-color); color: #fff; height: 100px; resize: none;"></textarea>
|
||||
</div>
|
||||
|
||||
<div style="margin-bottom: 15px;">
|
||||
<label style="display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500;">Equity Structure *</label>
|
||||
<textarea name="equity_structure" placeholder="Explain the distribution of ownership..." required style="width: 100%; padding: 12px; border-radius: 12px; background: var(--surface-color); border: 1px solid var(--border-color); color: #fff; height: 80px; resize: none;"></textarea>
|
||||
</div>
|
||||
|
||||
<div style="margin-bottom: 15px;">
|
||||
<label style="display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500;">Financial Documentation * (PDF, Images)</label>
|
||||
<input type="file" name="financial_doc" required accept=".pdf,image/*" style="width: 100%; padding: 10px; border-radius: 12px; background: var(--surface-color); border: 1px dashed var(--border-color); color: #fff;">
|
||||
<span style="font-size: 12px; color: var(--text-secondary); margin-top: 4px; display: block;">Upload revenue statements, projections, or balance sheets.</span>
|
||||
</div>
|
||||
|
||||
<div style="margin-bottom: 15px;">
|
||||
<label style="display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500;">Listing Type</label>
|
||||
<select name="status" style="width: 100%; padding: 12px; border-radius: 12px; background: var(--surface-color); border: 1px solid var(--border-color); color: #fff;">
|
||||
<option value="public">Public (Visible to all investors)</option>
|
||||
<option value="private">Private (Invite-only)</option>
|
||||
</select>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 25px;">
|
||||
<div>
|
||||
<label style="display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500;">Funding Target (£) *</label>
|
||||
<input type="number" name="funding_target" min="50" step="50" required style="width: 100%; padding: 12px; border-radius: 12px; background: var(--surface-color); border: 1px solid var(--border-color); color: #fff;">
|
||||
</div>
|
||||
<div>
|
||||
<label style="display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500;">Proposed Dividend (%) (Optional)</label>
|
||||
<input type="number" name="founder_return_rate" min="0" max="100" step="0.1" placeholder="e.g. 8.5" style="width: 100%; padding: 12px; border-radius: 12px; background: var(--surface-color); border: 1px solid var(--border-color); color: #fff;">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary" style="width: 100%; padding: 15px; font-weight: 600; font-size: 16px;">
|
||||
<i class="fas fa-rocket" style="margin-right: 8px;"></i> <?= $existingStartup ? 'Launch New Round' : 'Launch Startup' ?>
|
||||
</button>
|
||||
<a href="<?= $existingStartup ? 'startup_details.php?id=' . $startup_id : 'dashboard.php' ?>" class="btn btn-secondary" style="width: 100%; padding: 15px; margin-top: 10px; display: block; text-align: center; text-decoration: none;">Cancel</a>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
138
start_funding_round.php
Normal file
138
start_funding_round.php
Normal file
@ -0,0 +1,138 @@
|
||||
<?php
|
||||
session_start();
|
||||
if (!isset($_SESSION['user_id']) || $_SESSION['role'] !== 'founder') {
|
||||
header("Location: login.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
require_once __DIR__ . '/db/config.php';
|
||||
|
||||
$startup_id = (int)($_GET['id'] ?? 0);
|
||||
if ($startup_id <= 0) {
|
||||
header("Location: dashboard.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$stmt = db()->prepare("SELECT * FROM startups WHERE id = ? AND founder_id = ?");
|
||||
$stmt->execute([$startup_id, $_SESSION['user_id']]);
|
||||
$startup = $stmt->fetch();
|
||||
|
||||
if (!$startup) {
|
||||
header("Location: dashboard.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
// Check for existing active round
|
||||
$stmt = db()->prepare("SELECT id FROM funding_rounds WHERE startup_id = ? AND status = 'Active'");
|
||||
$stmt->execute([$startup_id]);
|
||||
if ($stmt->fetch()) {
|
||||
header("Location: startup_details.php?id=" . $startup_id);
|
||||
exit;
|
||||
}
|
||||
|
||||
$error = '';
|
||||
$success = '';
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
$goal = (float)($_POST['funding_goal'] ?? 0);
|
||||
$founder_rate = isset($_POST['founder_return_rate']) && $_POST['founder_return_rate'] !== '' ? (float)$_POST['founder_return_rate'] : null;
|
||||
$status = $_POST['listing_status'] ?? 'public';
|
||||
|
||||
if ($goal < 100) {
|
||||
$error = "Minimum funding goal is £100.";
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
db()->beginTransaction();
|
||||
try {
|
||||
// Update startup with round-specific settings
|
||||
$stmt = db()->prepare("UPDATE startups SET status = ?, founder_return_rate = ? WHERE id = ?");
|
||||
$stmt->execute([$status, $founder_rate, $startup_id]);
|
||||
|
||||
// Create the round
|
||||
$stmt = db()->prepare("INSERT INTO funding_rounds (startup_id, funding_goal, status) VALUES (?, ?, 'Active')");
|
||||
$stmt->execute([$startup_id, $goal]);
|
||||
|
||||
db()->commit();
|
||||
$success = "Funding round launched successfully!";
|
||||
header("refresh:2;url=startup_details.php?id=" . $startup_id);
|
||||
} catch (Exception $e) {
|
||||
db()->rollBack();
|
||||
$error = "Error: " . $e->getMessage();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$platformName = defined('PLATFORM_NAME') ? PLATFORM_NAME : 'Gatsby';
|
||||
?>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Step 2: Start Funding Round — <?= htmlspecialchars($platformName) ?></title>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
||||
</head>
|
||||
<body style="padding: 60px 20px; background: #0f0f13;">
|
||||
|
||||
<div class="container" style="max-width: 600px; margin: 0 auto;">
|
||||
<div class="card" style="padding: 40px;">
|
||||
<h1 style="font-size: 28px; font-weight: 800; margin-bottom: 10px;">Step 2: Launch Funding Round</h1>
|
||||
<p style="color: var(--text-secondary); margin-bottom: 30px;">
|
||||
Set your investment targets and return rates for <strong><?= htmlspecialchars($startup['name']) ?></strong>.
|
||||
</p>
|
||||
|
||||
<?php if ($error): ?>
|
||||
<div style="background: rgba(255, 0, 0, 0.1); border: 1px solid rgba(255, 0, 0, 0.3); color: #ff5555; padding: 15px; border-radius: 12px; margin-bottom: 25px;">
|
||||
<?= htmlspecialchars($error) ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($success): ?>
|
||||
<div style="background: rgba(0, 255, 0, 0.1); border: 1px solid rgba(0, 255, 0, 0.3); color: #55ff55; padding: 15px; border-radius: 12px; margin-bottom: 25px;">
|
||||
<?= htmlspecialchars($success) ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div style="background: rgba(0, 242, 255, 0.05); border: 1px solid var(--accent-blue); padding: 20px; border-radius: 16px; margin-bottom: 30px; text-align: center;">
|
||||
<div style="font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-secondary); margin-bottom: 5px;">AI Recommended Return Rate</div>
|
||||
<div style="font-size: 32px; font-weight: 900; color: var(--accent-blue);"><?= number_format($startup['recommended_return_rate'] ?? 5.0, 1) ?>%</div>
|
||||
<div style="font-size: 12px; color: var(--text-secondary); margin-top: 5px; line-height: 1.4;">Based on your company profile and historical financials.</div>
|
||||
</div>
|
||||
|
||||
<form method="POST">
|
||||
<div style="margin-bottom: 20px;">
|
||||
<label style="display: block; margin-bottom: 8px; font-weight: 600; font-size: 14px;">Funding Goal (£) *</label>
|
||||
<input type="number" name="funding_goal" min="100" step="100" required placeholder="e.g. 50000"
|
||||
style="width: 100%; padding: 14px; background: var(--surface-color); border: 1px solid var(--border-color); border-radius: 12px; color: #fff; font-size: 18px; font-weight: 700;">
|
||||
</div>
|
||||
|
||||
<div style="margin-bottom: 25px;">
|
||||
<label style="display: block; margin-bottom: 8px; font-weight: 600; font-size: 14px;">Your Proposed Dividend (%) <span style="font-weight: 400; opacity: 0.6;">(Optional)</span></label>
|
||||
<input type="number" name="founder_return_rate" step="0.1" min="0" max="100" placeholder="e.g. 8.5"
|
||||
style="width: 100%; padding: 14px; background: var(--surface-color); border: 1px solid var(--border-color); border-radius: 12px; color: #fff; font-size: 16px;">
|
||||
<small style="color: var(--text-secondary); display: block; margin-top: 8px; line-height: 1.4;">
|
||||
This is the annual return rate you propose to investors. It will be displayed alongside the platform recommendation.
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<div style="margin-bottom: 30px;">
|
||||
<label style="display: block; margin-bottom: 8px; font-weight: 600; font-size: 14px;">Listing Status</label>
|
||||
<select name="listing_status" style="width: 100%; padding: 14px; background: var(--surface-color); border: 1px solid var(--border-color); border-radius: 12px; color: #fff;">
|
||||
<option value="public">Public (Visible to all investors)</option>
|
||||
<option value="private">Private (Only visible via direct link)</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary" style="width: 100%; padding: 18px; font-weight: 800; font-size: 18px; border-radius: 16px;">
|
||||
Go Live <i class="fas fa-rocket" style="margin-left: 10px;"></i>
|
||||
</button>
|
||||
<a href="startup_details.php?id=<?= $startup_id ?>" style="display: block; text-align: center; margin-top: 15px; color: var(--text-secondary); text-decoration: none; font-size: 14px;">Cancel</a>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@ -164,6 +164,15 @@ if ($canSeeHistory) {
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
||||
<style>
|
||||
.section-title { font-size: 24px; font-weight: 800; margin-bottom: 20px; display: flex; align-items: center; gap: 12px; }
|
||||
.data-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 30px; }
|
||||
.data-item { background: rgba(255,255,255,0.03); padding: 20px; border-radius: 16px; border: 1px solid var(--border-color); }
|
||||
.data-label { font-size: 11px; text-transform: uppercase; color: var(--text-secondary); letter-spacing: 1px; margin-bottom: 8px; }
|
||||
.data-value { font-size: 18px; font-weight: 700; color: #fff; }
|
||||
.doc-link { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: rgba(0, 242, 255, 0.05); border: 1px solid var(--border-color); border-radius: 12px; color: var(--accent-blue); text-decoration: none; font-size: 14px; transition: all 0.2s; }
|
||||
.doc-link:hover { background: rgba(0, 242, 255, 0.1); border-color: var(--accent-blue); }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@ -215,10 +224,11 @@ if ($canSeeHistory) {
|
||||
</div>
|
||||
<div style="flex: 1;">
|
||||
<h1 style="margin: 0; font-size: 36px;"><?= htmlspecialchars($startup['name']) ?></h1>
|
||||
<div style="color: var(--text-secondary); display: flex; align-items: center; gap: 10px;">
|
||||
<span><i class="fas fa-industry"></i> <?= htmlspecialchars($startup['industry'] ?? 'General') ?></span>
|
||||
<span><i class="fas fa-calendar-alt"></i> Founded <?= date('M Y', strtotime($startup['created_at'])) ?></span>
|
||||
<span class="badge" style="background: var(--accent-blue); color: #000; padding: 4px 10px; border-radius: 50px; font-size: 11px; font-weight: 700; text-transform: uppercase;"><?= ucfirst($startup['status']) ?></span>
|
||||
<div style="color: var(--text-secondary); display: flex; align-items: center; gap: 10px; flex-wrap: wrap;">
|
||||
<span><i class="fas fa-building"></i> <?= htmlspecialchars($startup['legal_name'] ?? $startup['name']) ?></span>
|
||||
<span><i class="fas fa-globe"></i> <?= htmlspecialchars($startup['country'] ?? 'N/A') ?></span>
|
||||
<span><i class="fas fa-industry"></i> <?= htmlspecialchars($startup['industry'] ?? 'General') ?> (<?= htmlspecialchars($startup['sub_industry'] ?? 'N/A') ?>)</span>
|
||||
<span class="badge" style="background: var(--accent-blue); color: #000; padding: 4px 10px; border-radius: 50px; font-size: 11px; font-weight: 700; text-transform: uppercase;"><?= htmlspecialchars($startup['operational_stage'] ?? 'Seed') ?></span>
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($startup['founder_id'] != $user_id): ?>
|
||||
@ -235,16 +245,77 @@ if ($canSeeHistory) {
|
||||
</div>
|
||||
|
||||
<section class="card" style="margin-bottom: 40px;">
|
||||
<h2 style="margin-top: 0; margin-bottom: 20px;">About the Venture</h2>
|
||||
<p style="font-size: 18px; line-height: 1.6; color: var(--text-secondary); white-space: pre-wrap;"><?= htmlspecialchars($startup['description']) ?></p>
|
||||
<h2 class="section-title"><i class="fas fa-info-circle" style="color: var(--accent-blue);"></i> About the Venture</h2>
|
||||
<div style="margin-bottom: 25px;">
|
||||
<h4 style="margin-bottom: 10px; font-size: 14px; text-transform: uppercase; color: var(--text-secondary); opacity: 0.7;">Business Model</h4>
|
||||
<p style="font-size: 16px; line-height: 1.6; color: var(--text-secondary);"><?= htmlspecialchars($startup['business_model'] ?: $startup['description']) ?></p>
|
||||
</div>
|
||||
<div>
|
||||
<h4 style="margin-bottom: 10px; font-size: 14px; text-transform: uppercase; color: var(--text-secondary); opacity: 0.7;">Product/Service</h4>
|
||||
<p style="font-size: 16px; line-height: 1.6; color: var(--text-secondary);"><?= htmlspecialchars($startup['product_service'] ?: 'Details coming soon.') ?></p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php if ($startup['equity_structure']): ?>
|
||||
<section class="card" style="margin-bottom: 40px;">
|
||||
<h2 style="margin-top: 0; margin-bottom: 20px;"><i class="fas fa-chart-pie" style="color: var(--accent-blue);"></i> Equity Structure</h2>
|
||||
<p style="font-size: 16px; line-height: 1.6; color: var(--text-secondary); white-space: pre-wrap;"><?= htmlspecialchars($startup['equity_structure']) ?></p>
|
||||
</section>
|
||||
<?php endif; ?>
|
||||
<section class="card" style="margin-bottom: 40px;">
|
||||
<h2 class="section-title"><i class="fas fa-chart-pie" style="color: var(--accent-blue);"></i> Equity Structure</h2>
|
||||
<div class="data-grid">
|
||||
<div class="data-item">
|
||||
<div class="data-label">Total Shares</div>
|
||||
<div class="data-value"><?= number_format($startup['total_shares'] ?? 0) ?></div>
|
||||
</div>
|
||||
<div class="data-item">
|
||||
<div class="data-label">ESOP Pool</div>
|
||||
<div class="data-value"><?= number_format($startup['esop_percentage'] ?? 0, 1) ?>%</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px;">
|
||||
<div class="data-item">
|
||||
<div class="data-label">Founder Ownership</div>
|
||||
<div style="font-size: 14px; color: var(--text-secondary);"><?= nl2br(htmlspecialchars($startup['founder_ownership'] ?: 'N/A')) ?></div>
|
||||
</div>
|
||||
<div class="data-item">
|
||||
<div class="data-label">Investor Ownership</div>
|
||||
<div style="font-size: 14px; color: var(--text-secondary);"><?= nl2br(htmlspecialchars($startup['investor_ownership'] ?: 'N/A')) ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="data-item" style="width: 100%;">
|
||||
<div class="data-label">Convertible Instruments</div>
|
||||
<div style="font-size: 14px; color: var(--text-secondary);"><?= nl2br(htmlspecialchars($startup['convertible_instruments'] ?: 'None reported.')) ?></div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="card" style="margin-bottom: 40px;">
|
||||
<h2 class="section-title"><i class="fas fa-file-invoice-dollar" style="color: var(--accent-blue);"></i> Financial Position & Docs</h2>
|
||||
<div class="data-grid" style="grid-template-columns: 1fr 1fr;">
|
||||
<div class="data-item">
|
||||
<div class="data-label">Current Cash Balance</div>
|
||||
<div class="data-value">£<?= number_format($startup['current_cash_balance'] ?? 0, 2) ?></div>
|
||||
</div>
|
||||
<div class="data-item">
|
||||
<div class="data-label">Monthly Burn Rate</div>
|
||||
<div class="data-value">£<?= number_format($startup['burn_rate'] ?? 0, 2) ?></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4 style="margin-bottom: 15px; font-size: 14px; text-transform: uppercase; color: var(--text-secondary); opacity: 0.7;">Historical Documentation</h4>
|
||||
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 10px;">
|
||||
<?php
|
||||
$docs = [
|
||||
'Income Statements' => $startup['doc_income_statements'],
|
||||
'Balance Sheets' => $startup['doc_balance_sheets'],
|
||||
'Cash Flow' => $startup['doc_cash_flow_statements'],
|
||||
'Revenue Breakdown' => $startup['doc_revenue_breakdown'],
|
||||
'Gross Margin' => $startup['doc_gross_margin'],
|
||||
'OpEx Breakdown' => $startup['doc_opex_breakdown']
|
||||
];
|
||||
foreach ($docs as $label => $path): if ($path):
|
||||
?>
|
||||
<a href="<?= htmlspecialchars($path) ?>" target="_blank" class="doc-link">
|
||||
<i class="fas fa-file-pdf"></i> <?= $label ?>
|
||||
</a>
|
||||
<?php endif; endforeach; ?>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Return Rates Comparison -->
|
||||
<section class="card" style="margin-bottom: 40px; background: rgba(0, 242, 255, 0.03); border: 1px solid var(--accent-blue);">
|
||||
@ -255,7 +326,7 @@ if ($canSeeHistory) {
|
||||
<div style="padding: 20px; background: rgba(0,0,0,0.2); border-radius: 16px; border: 1px solid var(--border-color); text-align: center;">
|
||||
<div style="font-size: 12px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px;">Platform Recommendation</div>
|
||||
<div style="font-size: 32px; font-weight: 900; color: var(--accent-blue);"><?= number_format($startup['recommended_return_rate'] ?? 5.0, 1) ?>%</div>
|
||||
<div style="font-size: 11px; color: var(--text-secondary); margin-top: 5px;">Based on financial analysis & industry benchmarks</div>
|
||||
<div style="font-size: 11px; color: var(--text-secondary); margin-top: 5px;">AI analysis based on uploaded financials</div>
|
||||
</div>
|
||||
<div style="padding: 20px; background: rgba(0,0,0,0.2); border-radius: 16px; border: 1px solid var(--border-color); text-align: center;">
|
||||
<div style="font-size: 12px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px;">Founder's Proposal</div>
|
||||
@ -270,25 +341,18 @@ if ($canSeeHistory) {
|
||||
<!-- Funding History Section -->
|
||||
<?php if ($canSeeHistory): ?>
|
||||
<section class="card" style="margin-bottom: 40px;">
|
||||
<h2 style="margin-top: 0; margin-bottom: 25px; display: flex; align-items: center; gap: 12px;">
|
||||
<i class="fas fa-history" style="color: var(--accent-blue);"></i> Funding History
|
||||
</h2>
|
||||
<h2 class="section-title"><i class="fas fa-history" style="color: var(--accent-blue);"></i> Funding History</h2>
|
||||
<?php if (empty($fundingHistory)): ?>
|
||||
<div style="padding: 40px; text-align: center; background: rgba(255,255,255,0.02); border-radius: 20px; border: 1px dashed var(--border-color);">
|
||||
<i class="fas fa-coins" style="font-size: 32px; color: var(--text-secondary); opacity: 0.3; margin-bottom: 15px;"></i>
|
||||
<p style="color: var(--text-secondary); margin: 0; font-style: italic;">No investment history available yet.</p>
|
||||
<p style="color: var(--text-secondary); margin: 0;">No investment history available yet.</p>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div style="display: flex; flex-direction: column; gap: 15px;">
|
||||
<?php foreach ($fundingHistory as $inv): ?>
|
||||
<div style="display: flex; align-items: center; justify-content: space-between; padding: 20px; background: rgba(255,255,255,0.03); border-radius: 18px; border: 1px solid var(--border-color);">
|
||||
<div style="display: flex; align-items: center; gap: 15px;">
|
||||
<div style="width: 45px; height: 45px; border-radius: 12px; background: var(--surface-color); border: 1px solid var(--border-color); display: flex; align-items: center; justify-content: center; overflow: hidden;">
|
||||
<?php if ($inv['investor_photo']): ?>
|
||||
<img src="<?= htmlspecialchars($inv['investor_photo']) ?>" style="width: 100%; height: 100%; object-fit: cover;">
|
||||
<?php else: ?>
|
||||
<span style="font-weight: 800; color: var(--accent-blue);"><?= substr($inv['investor_name'], 0, 1) ?></span>
|
||||
<?php endif; ?>
|
||||
<div style="width: 45px; height: 45px; border-radius: 12px; background: var(--surface-color); display: flex; align-items: center; justify-content: center;">
|
||||
<span style="font-weight: 800; color: var(--accent-blue);"><?= substr($inv['investor_name'], 0, 1) ?></span>
|
||||
</div>
|
||||
<div>
|
||||
<div style="font-weight: 700; font-size: 16px;"><?= htmlspecialchars($inv['investor_name']) ?></div>
|
||||
@ -296,12 +360,7 @@ if ($canSeeHistory) {
|
||||
</div>
|
||||
</div>
|
||||
<div style="text-align: right;">
|
||||
<div style="font-weight: 800; font-size: 18px; color: <?= $inv['status'] === 'Refunded' ? '#ff5555' : 'var(--accent-blue)' ?>;">
|
||||
<?= $inv['status'] === 'Refunded' ? '-' : '' ?>£<?= number_format($inv['amount']) ?>
|
||||
</div>
|
||||
<div style="font-size: 11px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px;">
|
||||
<?= $inv['status'] === 'Refunded' ? 'Refunded' : 'Investment' ?>
|
||||
</div>
|
||||
<div style="font-weight: 800; font-size: 18px; color: var(--accent-blue);">£<?= number_format($inv['amount']) ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
@ -309,66 +368,6 @@ if ($canSeeHistory) {
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
<?php endif; ?>
|
||||
|
||||
<section class="card" style="margin-bottom: 40px;">
|
||||
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px;">
|
||||
<h2 style="margin: 0; font-size: 28px; font-weight: 800;">Public Updates</h2>
|
||||
<?php if ($user['role'] === 'founder' && $startup['founder_id'] == $user_id): ?>
|
||||
<button class="btn btn-primary" onclick="document.getElementById('postUpdateForm').style.display='block'" style="padding: 10px 20px; font-size: 14px;">
|
||||
<i class="fas fa-plus"></i> New Update
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php if ($user['role'] === 'founder' && $startup['founder_id'] == $user_id): ?>
|
||||
<div id="postUpdateForm" style="display: none; background: rgba(255,255,255,0.03); padding: 35px; border-radius: 24px; margin-bottom: 40px; border: 1px solid var(--glass-border); backdrop-filter: blur(10px);">
|
||||
<div style="display: flex; align-items: center; gap: 12px; margin-bottom: 25px;">
|
||||
<div style="width: 40px; height: 40px; background: var(--gradient-primary); border-radius: 12px; display: flex; align-items: center; justify-content: center;">
|
||||
<i class="fas fa-bullhorn" style="color: #fff;"></i>
|
||||
</div>
|
||||
<h3 style="margin: 0; font-size: 22px;">Share Progress</h3>
|
||||
</div>
|
||||
<form method="POST">
|
||||
<input type="hidden" name="action" value="post_update">
|
||||
<div style="margin-bottom: 20px;">
|
||||
<label style="display: block; font-size: 13px; font-weight: 700; color: var(--text-secondary); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px;">Update Title</label>
|
||||
<input type="text" name="update_title" required placeholder="e.g., Major Milestone: Beta Launch"
|
||||
style="width: 100%; padding: 16px; background: rgba(0,0,0,0.2); border: 1px solid var(--border-color); border-radius: 14px; color: #fff; font-family: inherit; font-size: 16px; outline: none; transition: border-color 0.3s;"
|
||||
onfocus="this.style.borderColor='var(--accent-blue)'" onblur="this.style.borderColor='var(--border-color)'">
|
||||
</div>
|
||||
<div style="margin-bottom: 25px;">
|
||||
<label style="display: block; font-size: 13px; font-weight: 700; color: var(--text-secondary); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px;">Content</label>
|
||||
<textarea name="update_content" rows="6" required placeholder="Tell your investors and followers what's new..."
|
||||
style="width: 100%; padding: 16px; background: rgba(0,0,0,0.2); border: 1px solid var(--border-color); border-radius: 14px; color: #fff; font-family: inherit; font-size: 16px; line-height: 1.6; outline: none; transition: border-color 0.3s; resize: vertical;"
|
||||
onfocus="this.style.borderColor='var(--accent-blue)'" onblur="this.style.borderColor='var(--border-color)'"></textarea>
|
||||
</div>
|
||||
<div style="display: flex; gap: 15px;">
|
||||
<button type="submit" class="btn btn-primary" style="flex: 2; padding: 16px; font-weight: 700;">Post & Notify Everyone</button>
|
||||
<button type="button" class="btn btn-secondary" onclick="document.getElementById('postUpdateForm').style.display='none'" style="flex: 1; padding: 16px;">Cancel</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
$stmt = db()->prepare("SELECT * FROM startup_updates WHERE startup_id = ? ORDER BY created_at DESC");
|
||||
$stmt->execute([$startup_id]);
|
||||
$updates = $stmt->fetchAll();
|
||||
?>
|
||||
<?php if (empty($updates)): ?>
|
||||
<p style="color: var(--text-secondary); font-style: italic;">No updates have been posted yet.</p>
|
||||
<?php else: ?>
|
||||
<?php foreach ($updates as $upd): ?>
|
||||
<div style="border-bottom: 1px solid var(--border-color); padding-bottom: 25px; margin-bottom: 25px;">
|
||||
<h4 style="margin: 0 0 10px 0; font-size: 20px;"><?= htmlspecialchars($upd['title']) ?></h4>
|
||||
<div style="font-size: 13px; color: var(--text-secondary); margin-bottom: 15px;">
|
||||
<i class="fas fa-clock"></i> Posted on <?= date('M d, Y', strtotime($upd['created_at'])) ?>
|
||||
</div>
|
||||
<p style="color: var(--text-secondary); line-height: 1.6; white-space: pre-wrap; font-size: 16px;"><?= htmlspecialchars($upd['content']) ?></p>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
@ -390,16 +389,10 @@ if ($canSeeHistory) {
|
||||
<div style="font-size: 11px; color: var(--text-secondary);">Followers</div>
|
||||
</div>
|
||||
<div>
|
||||
<div style="font-weight: 700;">Seed</div>
|
||||
<div style="font-weight: 700;"><?= htmlspecialchars($startup['operational_stage'] ?: 'Seed') ?></div>
|
||||
<div style="font-size: 11px; color: var(--text-secondary);">Stage</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ($startup['financial_doc_path']): ?>
|
||||
<a href="<?= htmlspecialchars($startup['financial_doc_path']) ?>" target="_blank" class="btn btn-secondary" style="width: 100%; padding: 12px; font-size: 14px; border-radius: 12px; display: flex; align-items: center; justify-content: center; gap: 10px;">
|
||||
<i class="fas fa-file-invoice-dollar"></i> View Financial Docs
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
|
||||
<?php if ($activeRound): ?>
|
||||
@ -426,17 +419,14 @@ if ($canSeeHistory) {
|
||||
<button type="submit" class="btn btn-primary" style="width: 100%; padding: 15px; font-weight: 700; font-size: 16px;">Back this Venture</button>
|
||||
</form>
|
||||
<?php elseif ($user['role'] === 'founder' && $startup['founder_id'] == $user_id): ?>
|
||||
<div style="background: rgba(0,0,0,0.2); padding: 15px; border-radius: 12px; font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 20px;">
|
||||
<i class="fas fa-info-circle"></i> This is your active funding round. Share the link with potential investors to reach your goal.
|
||||
</div>
|
||||
<div style="display: flex; flex-direction: column; gap: 10px;">
|
||||
<form method="POST" onsubmit="return confirm('Are you sure you want to finish this round early? Future investments will be disabled until you start a new round.')">
|
||||
<form method="POST" onsubmit="return confirm('Finish this round?')">
|
||||
<input type="hidden" name="action" value="finish_round">
|
||||
<button type="submit" class="btn btn-secondary" style="width: 100%; border-color: var(--accent-blue); color: var(--accent-blue);"><i class="fas fa-check-circle"></i> Finish Round Early</button>
|
||||
<button type="submit" class="btn btn-secondary" style="width: 100%;"><i class="fas fa-check-circle"></i> Finish Round Early</button>
|
||||
</form>
|
||||
<form method="POST" onsubmit="return confirm('DANGER: This will cancel the current round and mark all investments as REFUNDED. This cannot be undone. Proceed?')">
|
||||
<form method="POST" onsubmit="return confirm('Cancel round and refund all?')">
|
||||
<input type="hidden" name="action" value="cancel_round">
|
||||
<button type="submit" class="btn btn-secondary" style="width: 100%; border-color: #ff5555; color: #ff5555;"><i class="fas fa-times-circle"></i> Cancel & Refund All</button>
|
||||
<button type="submit" class="btn btn-secondary" style="width: 100%; color: #ff5555;"><i class="fas fa-times-circle"></i> Cancel Round</button>
|
||||
</form>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
@ -446,8 +436,8 @@ if ($canSeeHistory) {
|
||||
<section class="card" style="margin-bottom: 30px; text-align: center; border: 2px dashed var(--border-color);">
|
||||
<i class="fas fa-plus-circle" style="font-size: 32px; color: var(--accent-blue); margin-bottom: 15px; opacity: 0.5;"></i>
|
||||
<h4 style="margin: 0 0 10px 0;">No Active Round</h4>
|
||||
<p style="font-size: 13px; color: var(--text-secondary); margin-bottom: 20px;">Ready to raise more capital?</p>
|
||||
<a href="start_funding.php?id=<?= $startup_id ?>" class="btn btn-primary" style="width: 100%;">Start New Round</a>
|
||||
<p style="font-size: 13px; color: var(--text-secondary); margin-bottom: 20px;">Ready to raise capital?</p>
|
||||
<a href="start_funding_round.php?id=<?= $startup_id ?>" class="btn btn-primary" style="width: 100%;">Start New Round</a>
|
||||
</section>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
@ -476,14 +466,10 @@ if ($canSeeHistory) {
|
||||
|
||||
<footer style="margin-top: 80px; padding: 60px 0; border-top: 1px solid var(--border-color); background: rgba(0,0,0,0.2);">
|
||||
<div class="container" style="text-align: center;">
|
||||
<div class="logo-container" style="justify-content: center; margin-bottom: 25px;">
|
||||
<img src="assets/images/logo.svg" alt="<?= htmlspecialchars($platformName) ?> Logo" class="logo-img" style="width: 30px; height: 30px;">
|
||||
<span class="logo-text" style="font-size: 20px;"><?= htmlspecialchars($platformName) ?></span>
|
||||
</div>
|
||||
<p style="color: var(--text-secondary); font-size: 14px;">© <?= date('Y') ?> <?= htmlspecialchars($platformName) ?>. All rights reserved.</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="assets/js/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
@ -178,7 +178,7 @@ if ($user['role'] === 'founder') {
|
||||
<div style="display: flex; gap: 10px;">
|
||||
<a href="startup_details.php?id=<?= $startup['id'] ?>" class="btn btn-outline" style="flex: 1; padding: 10px; font-size: 13px;">View Details</a>
|
||||
<?php if ($user['role'] === 'founder'): ?>
|
||||
<a href="start_funding.php?id=<?= $startup['id'] ?>" class="btn btn-secondary" style="padding: 10px; font-size: 13px;"><i class="fas fa-edit"></i></a>
|
||||
<a href="create_startup.php?id=<?= $startup['id'] ?>" class="btn btn-secondary" style="padding: 10px; font-size: 13px;"><i class="fas fa-edit"></i></a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user