12/27/25 V.17
This commit is contained in:
parent
64b8d99c1d
commit
8f0a4321a8
65
apply.php
65
apply.php
@ -1,65 +0,0 @@
|
||||
<?php
|
||||
|
||||
require_once 'db/config.php';
|
||||
require_once 'mail/MailService.php';
|
||||
|
||||
// 1. Validation
|
||||
$name = trim($_POST['name'] ?? '');
|
||||
$company = trim($_POST['company'] ?? '');
|
||||
$email = trim($_POST['email'] ?? '');
|
||||
$role = trim($_POST['role'] ?? '');
|
||||
$error = '';
|
||||
|
||||
if (empty($name) || empty($company) || empty($email) || empty($role)) {
|
||||
$error = 'All fields are required.';
|
||||
} elseif (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
|
||||
$error = 'Please enter a valid email address.';
|
||||
}
|
||||
|
||||
if ($error) {
|
||||
header('Location: index.php?error=' . urlencode($error) . '#apply');
|
||||
exit;
|
||||
}
|
||||
|
||||
// 2. Database Insert
|
||||
try {
|
||||
$pdo = db();
|
||||
$stmt = $pdo->prepare(
|
||||
'INSERT INTO applications (name, company, email, role) VALUES (?, ?, ?, ?)'
|
||||
);
|
||||
$stmt->execute([$name, $company, $email, $role]);
|
||||
} catch (PDOException $e) {
|
||||
// In a real app, log this error. For now, redirect with a generic error.
|
||||
error_log('DB Error: ' . $e->getMessage());
|
||||
header('Location: index.php?error=' . urlencode('A database error occurred.') . '#apply');
|
||||
exit;
|
||||
}
|
||||
|
||||
// 3. Email Notification
|
||||
$to = getenv('MAIL_TO') ?: null; // Use admin email from .env
|
||||
$subject = 'New FinMox Founding Access Application';
|
||||
$htmlBody = "
|
||||
<h1>New Application Received</h1>
|
||||
<p>A new application has been submitted for FinMox founding access:</p>
|
||||
<ul>
|
||||
<li><strong>Name:</strong> " . htmlspecialchars($name) . "</li>
|
||||
<li><strong>Company:</strong> " . htmlspecialchars($company) . "</li>
|
||||
<li><strong>Email:</strong> " . htmlspecialchars($email) . "</li>
|
||||
<li><strong>Role:</strong> " . htmlspecialchars($role) . "</li>
|
||||
</ul>
|
||||
";
|
||||
$textBody = "New Application:\nName: $name\nCompany: $company\nEmail: $email\nRole: $role";
|
||||
|
||||
// Use MailService, but don't block the user if it fails
|
||||
try {
|
||||
MailService::sendMail($to, $subject, $htmlBody, $textBody);
|
||||
} catch (Exception $e) {
|
||||
// Log email error but don't prevent user from seeing success
|
||||
error_log('MailService Error: ' . $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
// 4. Redirect to Success
|
||||
header('Location: index.php?status=applied#apply');
|
||||
exit;
|
||||
|
||||
173
index.php
173
index.php
@ -637,13 +637,172 @@
|
||||
|
||||
<!-- SIGNIN PAGE (PART 1/2) --> <section id="page-signin" class="page fade hidden"> <section class="panel-strong p-8 lg:p-10"> <div class="grid lg:grid-cols-12 gap-10 items-start"> <!-- Left: Trust / context --> <div class="lg:col-span-5"> <div class="chip inline-flex px-3 py-1 text-xs">Account</div> <h1 class="mt-5 text-4xl font-extrabold tracking-tight"> Sign in to FinMox </h1> <p class="mt-5 text-gray-700"> Access your workspace to review hiring execution, decision trails, and audit-ready outputs. </p> <div class="mt-7 panel p-6"> <div class="text-sm font-semibold">What you can do inside</div> <ul class="mt-3 text-sm text-gray-700 space-y-2"> <li>✔ Review ranked candidates + structured scoring</li> <li>✔ See interview summaries + recommendations</li> <li>✔ Track movement + SLA nudges</li> <li>✔ Export decision logs for audits</li> </ul> <div class="mt-4 flex flex-wrap gap-2"> <span class="chip px-3 py-1 text-xs">Role-based access</span> <span class="chip px-3 py-1 text-xs">Least privilege</span> <span class="chip px-3 py-1 text-xs">Audit trail</span> </div> </div> <div class="mt-7 panel p-6"> <div class="text-sm font-semibold">Need access?</div> <p class="mt-2 text-sm text-gray-700"> FinMox is onboarding teams through private beta. Apply and we’ll confirm fit. </p> <div class="mt-4 flex flex-wrap gap-3"> <a href="#apply" onclick="openPage('apply'); return false;" class="bg-black text-white px-6 py-3 rounded-2xl text-sm hoverlift"> Apply for Access </a> <a href="#trust" onclick="openPage('trust'); return false;" class="chip px-6 py-3 rounded-2xl text-sm hoverlift"> Security & Trust → </a> </div> </div> </div><!-- SIGNIN PAGE (PART 2/2) --> <!-- Right: Sign in card --> <div class="lg:col-span-7"> <div class="panel p-7"> <div class="flex items-center justify-between gap-4"> <div> <div class="text-sm font-semibold">Welcome back</div> <div class="text-sm text-gray-600 mt-1">Sign in to continue.</div> </div> <span class="chip px-3 py-1 text-xs">Private beta</span> </div> <form class="mt-6 grid gap-3" onsubmit="return false;"> <div class="grid md:grid-cols-2 gap-3"> <input type="email" placeholder="Work email" class="panel-strong px-4 py-3 rounded-2xl" autocomplete="email" /> <input type="password" placeholder="Password" class="panel-strong px-4 py-3 rounded-2xl" autocomplete="current-password" /> </div> <div class="flex items-center justify-between gap-4 text-sm"> <label class="flex items-center gap-2 text-gray-700"> <input type="checkbox" class="accent-black" /> Remember me </label> <a href="#apply" onclick="openPage('apply'); return false;" class="underline text-gray-700"> Forgot access? </a> </div> <button type="button" class="bg-black text-white py-3 rounded-2xl hoverlift" > Sign In </button> <div class="text-xs text-gray-600"> Demo placeholder. Wire this to your auth later (AppWizzy auth, Supabase, Clerk, etc.). </div> </form> <div class="mt-6 grid md:grid-cols-3 gap-3"> <div class="panel-strong p-5"> <div class="text-xs text-gray-500">Access control</div> <div class="mt-2 text-sm text-gray-700">Role-based permissions supported.</div> </div> <div class="panel-strong p-5"> <div class="text-xs text-gray-500">Session security</div> <div class="mt-2 text-sm text-gray-700">Least-privilege by default.</div> </div> <div class="panel-strong p-5"> <div class="text-xs text-gray-500">Auditability</div> <div class="mt-2 text-sm text-gray-700">Actions map to decision trail.</div> </div> </div> <div class="mt-6 panel-strong p-6"> <div class="text-sm font-semibold">New here?</div> <div class="mt-2 text-sm text-gray-700"> Apply for beta access and we’ll onboard your team with a short process.</div></div></div></div></section></section>
|
||||
|
||||
<!-- ========================= APPLY PAGE (Placeholder) ========================= -->
|
||||
<section id="page-apply" class="page fade hidden">
|
||||
<section class="panel-strong p-8 lg:p-10">
|
||||
<h1 class="text-4xl font-extrabold tracking-tight">Apply</h1>
|
||||
<p class="mt-5 text-gray-700">Content for this page is coming soon.</p>
|
||||
</section>
|
||||
</section>
|
||||
<!-- APPLY PAGE (PART 1/3) -->
|
||||
<section id="page-apply" class="page fade hidden">
|
||||
<section class="panel-strong p-8 lg:p-10">
|
||||
<div class="grid lg:grid-cols-12 gap-10 items-start">
|
||||
<!-- Left: Positioning + fit -->
|
||||
<div class="lg:col-span-5">
|
||||
<div class="chip inline-flex px-3 py-1 text-xs">Founding Access</div>
|
||||
<h1 class="mt-5 text-4xl font-extrabold tracking-tight">
|
||||
Apply for FinMox
|
||||
</h1>
|
||||
<p class="mt-5 text-gray-700">
|
||||
We onboard a limited number of teams to keep outcomes strong,
|
||||
execution tight, and iteration fast. Most customers start with a pilot
|
||||
on <strong>1–2 roles</strong>.
|
||||
</p>
|
||||
<div class="mt-7 panel p-6">
|
||||
<div class="text-sm font-semibold">What you’re applying for</div>
|
||||
<ul class="mt-3 text-sm text-gray-700 space-y-2">
|
||||
<li>✔ A controlled hiring execution layer (not another ATS)</li>
|
||||
<li>✔ Locked criteria + structured qualification</li>
|
||||
<li>✔ Automated movement (follow-ups + handoffs)</li>
|
||||
<li>✔ Automatic decision trail + exportable logs</li>
|
||||
</ul>
|
||||
<div class="mt-4 flex flex-wrap gap-2">
|
||||
<span class="chip px-3 py-1 text-xs">Human-in-the-loop</span>
|
||||
<span class="chip px-3 py-1 text-xs">No AI decisions</span>
|
||||
<span class="chip px-3 py-1 text-xs">Audit-ready</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-7 panel p-6">
|
||||
<div class="text-sm font-semibold">Best fit</div>
|
||||
<ul class="mt-3 text-sm text-gray-700 space-y-2">
|
||||
<li>✔ 10–200 employees</li>
|
||||
<li>✔ Hiring 1–10 roles/month</li>
|
||||
<li>✔ Multiple stakeholders deciding</li>
|
||||
<li>✔ You want defensibility + consistency</li>
|
||||
</ul>
|
||||
<div class="mt-4 text-xs text-gray-600">
|
||||
If you’re doing high-volume hourly hiring or need payroll/benefits
|
||||
built-in, FinMox may not be the right fit (yet).
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Right: Application form -->
|
||||
<div class="lg:col-span-7">
|
||||
<div class="panel p-7">
|
||||
<div class="flex items-center justify-between gap-4">
|
||||
<div>
|
||||
<div class="text-sm font-semibold">Application</div>
|
||||
<div class="text-sm text-gray-600 mt-1">
|
||||
Tell us your workflow so we can confirm fit.
|
||||
</div>
|
||||
</div>
|
||||
<span class="chip px-3 py-1 text-xs">Pilot-first</span>
|
||||
</div>
|
||||
<form class="mt-6 grid gap-3" onsubmit="return false;">
|
||||
<div class="grid md:grid-cols-2 gap-3">
|
||||
<input type="text" placeholder="Company name" class="panel-strong px-4 py-3 rounded-2xl" />
|
||||
<input type="text" placeholder="Your name" class="panel-strong px-4 py-3 rounded-2xl" />
|
||||
</div>
|
||||
<div class="grid md:grid-cols-2 gap-3">
|
||||
<input type="email" placeholder="Work email" class="panel-strong px-4 py-3 rounded-2xl" />
|
||||
<input type="text" placeholder="Role / title" class="panel-strong px-4 py-3 rounded-2xl" />
|
||||
</div>
|
||||
<div class="grid md:grid-cols-3 gap-3">
|
||||
<input type="number" placeholder="Employees" class="panel-strong px-4 py-3 rounded-2xl" />
|
||||
<input type="number" placeholder="Roles per month" class="panel-strong px-4 py-3 rounded-2xl" />
|
||||
<input type="number" placeholder="Candidates per role" class="panel-strong px-4 py-3 rounded-2xl" />
|
||||
</div>
|
||||
<div class="grid md:grid-cols-2 gap-3">
|
||||
<input type="text" placeholder="ATS (Greenhouse, Lever, etc.)" class="panel-strong px-4 py-3 rounded-2xl" />
|
||||
<input type="text" placeholder="Scheduling (Calendly, Google, etc.)" class="panel-strong px-4 py-3 rounded-2xl" />
|
||||
</div>
|
||||
<textarea rows="4" placeholder="Where does hiring execution break today? (drift, delays, inconsistency, documentation)" class="panel-strong px-4 py-3 rounded-2xl"></textarea>
|
||||
<textarea rows="3" placeholder="What does success look like in 30 days? (faster decisions, less chasing, audit trail, etc.)" class="panel-strong px-4 py-3 rounded-2xl"></textarea>
|
||||
<div class="grid md:grid-cols-2 gap-3">
|
||||
<select class="panel-strong px-4 py-3 rounded-2xl">
|
||||
<option>Primary hiring focus</option>
|
||||
<option>Engineering</option>
|
||||
<option>Sales</option>
|
||||
<option>Marketing</option>
|
||||
<option>Other</option>
|
||||
</select>
|
||||
<button type="button" class="bg-black text-white py-3 rounded-2xl hoverlift" > Apply Now </button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- APPLY PAGE (PART 3/3) -->
|
||||
<div class="mt-6 grid md:grid-cols-2 gap-4">
|
||||
<div class="panel p-6">
|
||||
<div class="text-sm font-semibold">
|
||||
What happens after you apply
|
||||
</div>
|
||||
<ol class="mt-3 text-sm text-gray-700 space-y-2">
|
||||
<li>
|
||||
<strong>1)</strong> Fit check (volume, stakeholders, workflow)
|
||||
</li>
|
||||
<li>
|
||||
<strong>2)</strong> Pilot plan (1–2 roles, locked criteria +
|
||||
rubric)
|
||||
</li>
|
||||
<li>
|
||||
<strong>3)</strong> Execution tuning (movement, follow-ups,
|
||||
handoffs)
|
||||
</li>
|
||||
<li><strong>4)</strong> Results review + expansion decision</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="panel p-6">
|
||||
<div class="text-sm font-semibold">What we’ll need from you</div>
|
||||
<ul class="mt-3 text-sm text-gray-700 space-y-2">
|
||||
<li>• Your current job description (even if messy)</li>
|
||||
<li>• Your interview stages + stakeholders</li>
|
||||
<li>• Your “must-have” criteria for the role</li>
|
||||
<li>• Your current ATS/scheduling tools</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-6 panel-strong p-6">
|
||||
<div class="flex items-center justify-between gap-4">
|
||||
<div>
|
||||
<div class="text-sm font-semibold">
|
||||
Trust basics (early access)
|
||||
</div>
|
||||
<div class="text-sm text-gray-600 mt-1">
|
||||
We build like a system that will be security-reviewed — even
|
||||
before enterprise rollout.
|
||||
</div>
|
||||
</div>
|
||||
<a href="#trust" onclick="openPage('trust'); return false;" class="underline text-sm text-gray-700">
|
||||
View Security & Trust →
|
||||
</a>
|
||||
</div>
|
||||
<div class="mt-4 grid sm:grid-cols-3 gap-3">
|
||||
<div class="panel p-5">
|
||||
<div class="text-xs text-gray-500">No AI decisions</div>
|
||||
<div class="mt-2 text-sm text-gray-700">
|
||||
Humans decide. FinMox enforces + records.
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel p-5">
|
||||
<div class="text-xs text-gray-500">
|
||||
Automatic documentation
|
||||
</div>
|
||||
<div class="mt-2 text-sm text-gray-700">
|
||||
Decision trail created from execution events.
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel p-5">
|
||||
<div class="text-xs text-gray-500">
|
||||
Integrates with your stack
|
||||
</div>
|
||||
<div class="mt-2 text-sm text-gray-700">
|
||||
No forced migration required.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Right -->
|
||||
</div>
|
||||
<!-- /Grid -->
|
||||
</section>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user