This commit is contained in:
Flatlogic Bot 2026-02-28 21:29:02 +00:00
parent 86b73d7d46
commit 142cd9134d
16 changed files with 14 additions and 7 deletions

View File

@ -19,6 +19,7 @@ $existingStartup = $stmt->fetch();
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$name = $_POST['name'] ?? '';
$description = $_POST['description'] ?? ''; // New field for Short Pitch
$legal_name = $_POST['legal_name'] ?? '';
$country = $_POST['country'] ?? '';
$industry = $_POST['industry'] ?? '';
@ -61,8 +62,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
}
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 (empty($name) || empty($description) || 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, including the short pitch.";
}
}
@ -85,6 +86,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
// AI Prompt
$prompt = "As a financial analyst, calculate a recommended annual dividend yield (interest percentage) based on this startup profile:
Name: {$name}
Short Pitch: {$description}
Industry: {$industry}/{$sub_industry}
Business Model: {$business_model}
Product: {$product_service}
@ -114,7 +116,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
if ($existingStartup) {
$stmt = db()->prepare("UPDATE startups SET
name = ?, legal_name = ?, country = ?, industry = ?, sub_industry = ?, business_model = ?, product_service = ?, operational_stage = ?,
name = ?, description = ?, legal_name = ?, country = ?, industry = ?, sub_industry = ?, business_model = ?, product_service = ?, operational_stage = ?,
cofounder_equity_pct = ?, cofounder_equity_type = ?, cofounder_responsibilities = ?, desired_cofounder_experience = ?, cofounder_commitment = ?, other_partnership_details = ?,
current_cash_balance = ?, burn_rate = ?,
doc_income_statements = ?, doc_balance_sheets = ?, doc_cash_flow_statements = ?, doc_revenue_breakdown = ?, doc_gross_margin = ?,
@ -122,7 +124,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
WHERE id = ? AND founder_id = ?");
$stmt->execute([
$name, $legal_name, $country, $industry, $sub_industry, $business_model, $product_service, $operational_stage,
$name, $description, $legal_name, $country, $industry, $sub_industry, $business_model, $product_service, $operational_stage,
$cofounder_equity_pct, $cofounder_equity_type, $cofounder_responsibilities, $desired_cofounder_experience, $cofounder_commitment, $other_partnership_details,
$current_cash_balance, $burn_rate,
$uploaded_paths['doc_income_statements'], $uploaded_paths['doc_balance_sheets'], $uploaded_paths['doc_cash_flow_statements'],
@ -132,7 +134,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$final_id = $existingStartup['id'];
} else {
$stmt = db()->prepare("INSERT INTO startups (
name, legal_name, country, industry, sub_industry, business_model, product_service, operational_stage,
name, description, legal_name, country, industry, sub_industry, business_model, product_service, operational_stage,
cofounder_equity_pct, cofounder_equity_type, cofounder_responsibilities, desired_cofounder_experience, cofounder_commitment, other_partnership_details,
current_cash_balance, burn_rate,
doc_income_statements, doc_balance_sheets, doc_cash_flow_statements, doc_revenue_breakdown, doc_gross_margin,
@ -140,7 +142,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 'private')");
$stmt->execute([
$name, $legal_name, $country, $industry, $sub_industry, $business_model, $product_service, $operational_stage,
$name, $description, $legal_name, $country, $industry, $sub_industry, $business_model, $product_service, $operational_stage,
$cofounder_equity_pct, $cofounder_equity_type, $cofounder_responsibilities, $desired_cofounder_experience, $cofounder_commitment, $other_partnership_details,
$current_cash_balance, $burn_rate,
$uploaded_paths['doc_income_statements'], $uploaded_paths['doc_balance_sheets'], $uploaded_paths['doc_cash_flow_statements'],
@ -244,6 +246,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
</div>
</div>
<div style="margin-top: 20px;">
<label style="display: block; margin-bottom: 8px; color: #aaa;">Short Description / Elevator Pitch *</label>
<input type="text" name="description" value="<?= htmlspecialchars($existingStartup['description'] ?? '') ?>" required placeholder="A catchy one-sentence pitch (max 150 chars)" maxlength="255" style="width: 100%; padding: 12px; border-radius: 8px; background: #222; border: 1px solid #333; color: #fff;">
</div>
<div style="margin-top: 20px;">
<label style="display: block; margin-bottom: 8px; color: #aaa;">Business Model *</label>
<textarea name="business_model" required style="width: 100%; padding: 12px; border-radius: 8px; background: #222; border: 1px solid #333; color: #fff; height: 100px;" placeholder="e.g. B2B Subscription, Marketplace, Freemium..."><?= htmlspecialchars($existingStartup['business_model'] ?? '') ?></textarea>
@ -353,4 +360,4 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
</div>
</body>
</html>
</html>