fancy design, new fields

This commit is contained in:
Flatlogic Bot 2025-11-13 13:40:09 +00:00
parent 51ff987408
commit 4552461d76
4 changed files with 141 additions and 20 deletions

View File

@ -7,6 +7,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$company = trim($_POST['company'] ?? ''); $company = trim($_POST['company'] ?? '');
$occupation = trim($_POST['occupation'] ?? ''); $occupation = trim($_POST['occupation'] ?? '');
$relation = trim($_POST['relation'] ?? ''); $relation = trim($_POST['relation'] ?? '');
$company_type = trim($_POST['company_type'] ?? '');
$linkedin_url = trim($_POST['linkedin_url'] ?? '');
if (empty($name) || empty($email) || !filter_var($email, FILTER_VALIDATE_EMAIL)) { if (empty($name) || empty($email) || !filter_var($email, FILTER_VALIDATE_EMAIL)) {
header('Location: index.php?status=error'); header('Location: index.php?status=error');
@ -16,13 +18,15 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
try { try {
$pdo = db(); $pdo = db();
$stmt = $pdo->prepare( $stmt = $pdo->prepare(
"INSERT INTO attendees (name, email, company, occupation, relation) VALUES (:name, :email, :company, :occupation, :relation)" "INSERT INTO attendees (name, email, company, occupation, relation, company_type, linkedin_url) VALUES (:name, :email, :company, :occupation, :relation, :company_type, :linkedin_url)"
); );
$stmt->bindParam(':name', $name, PDO::PARAM_STR); $stmt->bindParam(':name', $name, PDO::PARAM_STR);
$stmt->bindParam(':email', $email, PDO::PARAM_STR); $stmt->bindParam(':email', $email, PDO::PARAM_STR);
$stmt->bindParam(':company', $company, PDO::PARAM_STR); $stmt->bindParam(':company', $company, PDO::PARAM_STR);
$stmt->bindParam(':occupation', $occupation, PDO::PARAM_STR); $stmt->bindParam(':occupation', $occupation, PDO::PARAM_STR);
$stmt->bindParam(':relation', $relation, PDO::PARAM_STR); $stmt->bindParam(':relation', $relation, PDO::PARAM_STR);
$stmt->bindParam(':company_type', $company_type, PDO::PARAM_STR);
$stmt->bindParam(':linkedin_url', $linkedin_url, PDO::PARAM_STR);
$stmt->execute(); $stmt->execute();

View File

@ -1,39 +1,134 @@
:root {
--primary-color: #8a2be2; /* Bright Purple */
--secondary-color: #ff1493; /* Deep Pink */
--accent-color: #ff4500; /* Orange Red */
--light-color: #ffffff;
--dark-color: #1a1a1a;
--background-color: #f0e6ff; /* Light Lavender */
--font-family-headings: 'Poppins', sans-serif;
--font-family-body: 'Montserrat', sans-serif;
}
body { body {
background-color: #f8f9fa; /* Light gray background */ background-color: var(--background-color);
font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-family: var(--font-family-body);
color: var(--dark-color);
} }
.hero { .hero {
background: linear-gradient(135deg, #6f42c1, #4a148c); /* Purple gradient */ background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
color: white; color: var(--light-color);
padding: 4rem 2rem; padding: 5rem 2rem;
border-radius: 0.5rem; border-radius: 20px;
text-align: center;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
transform: scale(1.02);
} }
.hero h1 { .hero h1 {
font-family: var(--font-family-headings);
font-weight: 700; font-weight: 700;
font-size: 3.5rem;
text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
} }
.form-section, .list-section { .form-section, .list-section {
background: #ffffff; /* White */ background: rgba(255, 255, 255, 0.8);
padding: 2rem; backdrop-filter: blur(10px);
border-radius: 0.5rem; padding: 2.5rem;
box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); border-radius: 20px;
margin-top: 2rem; box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
margin-top: 3rem;
transition: transform 0.3s ease-in-out;
}
.form-section:hover, .list-section:hover {
transform: translateY(-10px);
}
h2 {
font-family: var(--font-family-headings);
color: var(--primary-color);
margin-bottom: 1.5rem;
}
.form-control, .form-select {
border-radius: 10px;
padding: 0.75rem 1rem;
border: 1px solid #ddd;
transition: all 0.3s ease;
}
.form-control:focus, .form-select:focus {
border-color: var(--primary-color);
box-shadow: 0 0 10px rgba(138, 43, 226, 0.3);
} }
.btn-primary { .btn-primary {
background-color: #dc3545; /* Red */ background-image: linear-gradient(to right, var(--accent-color), var(--secondary-color));
border-color: #dc3545; /* Red */ border: none;
border-radius: 10px;
padding: 0.75rem 1.5rem;
font-weight: 500;
color: var(--light-color);
transition: all 0.4s ease;
background-size: 200% auto;
animation: pulse 2s infinite;
} }
.btn-primary:hover { .btn-primary:hover {
background-color: #c82333; /* Darker Red */ background-position: right center;
border-color: #bd2130; /* Darker Red */ transform: scale(1.05);
box-shadow: 0 5px 15px rgba(255, 20, 147, 0.4);
}
@keyframes pulse {
0% { transform: scale(1); }
50% { transform: scale(1.03); }
100% { transform: scale(1); }
} }
.table { .table {
margin-top: 1.5rem; margin-top: 2rem;
border-collapse: separate;
border-spacing: 0 10px;
}
.table thead th {
background-color: var(--primary-color);
color: var(--light-color);
border: none;
}
.table tbody tr {
background-color: var(--light-color);
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
border-radius: 10px;
}
.table tbody td {
padding: 1rem;
}
.table tbody tr td:first-child {
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
}
.table tbody tr td:last-child {
border-top-right-radius: 10px;
border-bottom-right-radius: 10px;
}
.table a {
color: var(--accent-color);
text-decoration: none;
font-weight: 500;
}
.table a:hover {
text-decoration: underline;
} }
.toast-container { .toast-container {

View File

@ -11,6 +11,8 @@ try {
company VARCHAR(255), company VARCHAR(255),
occupation VARCHAR(255), occupation VARCHAR(255),
relation VARCHAR(50), relation VARCHAR(50),
company_type VARCHAR(100),
linkedin_url VARCHAR(255),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);"; );";
$pdo->exec($sql); $pdo->exec($sql);

View File

@ -5,7 +5,7 @@ require_once __DIR__ . '/db/setup.php';
$attendees = []; $attendees = [];
try { try {
$pdo = db(); $pdo = db();
$stmt = $pdo->query("SELECT name, company, occupation, relation, created_at FROM attendees ORDER BY created_at DESC"); $stmt = $pdo->query("SELECT name, company, occupation, relation, company_type, linkedin_url, created_at FROM attendees ORDER BY created_at DESC");
$attendees = $stmt->fetchAll(PDO::FETCH_ASSOC); $attendees = $stmt->fetchAll(PDO::FETCH_ASSOC);
} catch (PDOException $e) { } catch (PDOException $e) {
// Silently fail for now, or log error // Silently fail for now, or log error
@ -28,7 +28,7 @@ try {
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet"> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@700&family=Montserrat:wght@400;500&display=swap" rel="stylesheet">
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>"> <link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
</head> </head>
<body> <body>
@ -64,6 +64,22 @@ try {
<label for="occupation" class="form-label">Occupation</label> <label for="occupation" class="form-label">Occupation</label>
<input type="text" class="form-control" id="occupation" name="occupation"> <input type="text" class="form-control" id="occupation" name="occupation">
</div> </div>
<div class="mb-3">
<label for="company_type" class="form-label">Company Type</label>
<select class="form-select" id="company_type" name="company_type">
<option selected value="">- Select -</option>
<option value="Startup">Startup</option>
<option value="Scaleup">Scaleup</option>
<option value="Enterprise">Enterprise</option>
<option value="VC">VC</option>
<option value="Ecosystem">Ecosystem</option>
<option value="Solo">Solo</option>
</select>
</div>
<div class="mb-3">
<label for="linkedin_url" class="form-label">LinkedIn Profile URL</label>
<input type="url" class="form-control" id="linkedin_url" name="linkedin_url" placeholder="https://www.linkedin.com/in/your-profile">
</div>
<div class="mb-3"> <div class="mb-3">
<label for="relation" class="form-label">Relation to the Booth</label> <label for="relation" class="form-label">Relation to the Booth</label>
<select class="form-select" id="relation" name="relation"> <select class="form-select" id="relation" name="relation">
@ -86,6 +102,8 @@ try {
<th>Name</th> <th>Name</th>
<th>Company / Startup</th> <th>Company / Startup</th>
<th>Occupation</th> <th>Occupation</th>
<th>Company Type</th>
<th>LinkedIn</th>
<th>Relation</th> <th>Relation</th>
<th>Date Joined</th> <th>Date Joined</th>
</tr> </tr>
@ -101,6 +119,8 @@ try {
<td><?php echo htmlspecialchars($attendee['name']); ?></td> <td><?php echo htmlspecialchars($attendee['name']); ?></td>
<td><?php echo htmlspecialchars($attendee['company']); ?></td> <td><?php echo htmlspecialchars($attendee['company']); ?></td>
<td><?php echo htmlspecialchars($attendee['occupation']); ?></td> <td><?php echo htmlspecialchars($attendee['occupation']); ?></td>
<td><?php echo htmlspecialchars($attendee['company_type']); ?></td>
<td><a href="<?php echo htmlspecialchars($attendee['linkedin_url']); ?>" target="_blank">View Profile</a></td>
<td><?php echo htmlspecialchars($attendee['relation']); ?></td> <td><?php echo htmlspecialchars($attendee['relation']); ?></td>
<td><?php echo date('M d, Y', strtotime($attendee['created_at'])); ?></td> <td><?php echo date('M d, Y', strtotime($attendee['created_at'])); ?></td>
</tr> </tr>