Auto commit: 2025-09-17T15:46:15.288Z

This commit is contained in:
Flatlogic Bot 2025-09-17 15:46:15 +00:00
parent 0ad162d6ac
commit c42fdade52
17 changed files with 1103 additions and 217 deletions

121
admin/add-job.php Normal file
View File

@ -0,0 +1,121 @@
<?php
session_start();
if (!isset($_SESSION['user'])) {
header('Location: login.php');
exit;
}
require_once __DIR__ . '/../db/config.php';
$error_message = '';
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$title = trim($_POST['title'] ?? '');
$department = trim($_POST['department'] ?? '');
$location = trim($_POST['location'] ?? '');
$type = trim($_POST['type'] ?? '');
$description = trim($_POST['description'] ?? '');
$requirements = trim($_POST['requirements'] ?? '');
$benefits = trim($_POST['benefits'] ?? '');
if (empty($title) || empty($department) || empty($location) || empty($type) || empty($description)) {
$error_message = 'Please fill in all fields.';
} else {
$requirements_arr = array_filter(array_map('trim', explode("\n", $requirements)));
$benefits_arr = array_filter(array_map('trim', explode("\n", $benefits)));
try {
$pdo = db();
$stmt = $pdo->prepare("INSERT INTO jobs (title, department, location, type, description, requirements, benefits) VALUES (?, ?, ?, ?, ?, ?, ?)");
$stmt->execute([$title, $department, $location, $type, $description, json_encode($requirements_arr), json_encode($benefits_arr)]);
header('Location: jobs.php');
exit;
} catch (PDOException $e) {
$error_message = 'Database error: ' . $e->getMessage();
}
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin - Add Job</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="../assets/css/custom.css?v=<?php echo time(); ?>">
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light bg-white shadow-sm">
<div class="container">
<a class="navbar-brand" href="index.php">CosmicHire Admin</a>
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link" href="applications.php">Applications</a>
</li>
<li class="nav-item">
<a class="nav-link" href="jobs.php">Jobs</a>
</li>
</ul>
<ul class="navbar-nav ms-auto">
<li class="nav-item">
<a class="nav-link" href="logout.php">Logout</a>
</li>
</ul>
</div>
</nav>
<main class="container my-5">
<h1 class="h2 mb-4">Add New Job</h1>
<?php if ($error_message): ?>
<div class="alert alert-danger"><?php echo $error_message; ?></div>
<?php endif; ?>
<form method="post">
<div class="card p-4">
<div class="mb-3">
<label for="title" class="form-label">Title</label>
<input type="text" class="form-control" id="title" name="title" required>
</div>
<div class="row">
<div class="col-md-6 mb-3">
<label for="department" class="form-label">Department</label>
<input type="text" class="form-control" id="department" name="department" required>
</div>
<div class="col-md-6 mb-3">
<label for="location" class="form-label">Location</label>
<input type="text" class="form-control" id="location" name="location" required>
</div>
</div>
<div class="mb-3">
<label for="type" class="form-label">Type</label>
<select class="form-select" id="type" name="type" required>
<option value="Full-time">Full-time</option>
<option value="Part-time">Part-time</option>
<option value="Contract">Contract</option>
<option value="Internship">Internship</option>
</select>
</div>
<div class="mb-3">
<label for="description" class="form-label">Description</label>
<textarea class="form-control" id="description" name="description" rows="5" required></textarea>
</div>
<div class="mb-3">
<label for="requirements" class="form-label">Requirements</label>
<textarea class="form-control" id="requirements" name="requirements" rows="5"></textarea>
<div class="form-text">Enter one requirement per line.</div>
</div>
<div class="mb-3">
<label for="benefits" class="form-label">Benefits</label>
<textarea class="form-control" id="benefits" name="benefits" rows="5"></textarea>
<div class="form-text">Enter one benefit per line.</div>
</div>
<div class="d-flex justify-content-end">
<a href="jobs.php" class="btn btn-secondary me-2">Cancel</a>
<button type="submit" class="btn btn-primary">Add Job</button>
</div>
</div>
</form>
</main>
</body>
</html>

125
admin/applications.php Normal file
View File

@ -0,0 +1,125 @@
<?php
session_start();
if (!isset($_SESSION['user'])) {
header('Location: login.php');
exit;
}
require_once __DIR__ . '/../db/config.php';
// Fetch job titles from the database
$pdo = db();
$stmt = $pdo->query("SELECT id, title FROM jobs");
$jobs_data = $stmt->fetchAll();
$job_titles = array_column($jobs_data, 'title', 'id');
// Fetch job titles from the database
$pdo = db();
$stmt = $pdo->query("SELECT id, title FROM jobs");
$jobs_data = $stmt->fetchAll();
$job_titles = array_column($jobs_data, 'title', 'id');
// Pagination settings
$results_per_page = 10;
$page = isset($_GET['page']) ? (int)$_GET['page'] : 1;
$page = max(1, $page);
$offset = ($page - 1) * $results_per_page;
// Get total number of applications
$total_results = $pdo->query("SELECT COUNT(*) FROM applications")->fetchColumn();
$total_pages = ceil($total_results / $results_per_page);
// Fetch applications for the current page
$stmt = $pdo->prepare("SELECT id, job_id, name, email, resume_path, applied_at FROM applications ORDER BY applied_at DESC LIMIT :limit OFFSET :offset");
$stmt->bindValue(':limit', $results_per_page, PDO::PARAM_INT);
$stmt->bindValue(':offset', $offset, PDO::PARAM_INT);
$stmt->execute();
$applications = $stmt->fetchAll();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin - Applications</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="../assets/css/custom.css?v=<?php echo time(); ?>">
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light bg-white shadow-sm">
<div class="container">
<a class="navbar-brand" href="index.php">CosmicHire Admin</a>
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link active" href="applications.php">Applications</a>
</li>
<li class="nav-item">
<a class="nav-link" href="jobs.php">Jobs</a>
</li>
</ul>
<ul class="navbar-nav ms-auto">
<li class="nav-item">
<a class="nav-link" href="logout.php">Logout</a>
</li>
</ul>
</div>
</nav>
<main class="container my-5">
<h1 class="h2 mb-4">Submitted Applications</h1>
<div class="card">
<div class="table-responsive">
<table class="table table-striped table-hover mb-0">
<thead>
<tr>
<th>Job Title</th>
<th>Name</th>
<th>Email</th>
<th>Applied At</th>
<th>Resume</th>
</tr>
</thead>
<tbody>
<?php if (empty($applications)): ?>
<tr>
<td colspan="5" class="text-center">No applications found.</td>
</tr>
<?php else: ?>
<?php foreach ($applications as $app): ?>
<tr>
<td><?php echo htmlspecialchars($job_titles[$app['job_id']] ?? 'Unknown Job'); ?></td>
<td><?php echo htmlspecialchars($app['name']); ?></td>
<td><?php echo htmlspecialchars($app['email']); ?></td>
<td><?php echo date('M d, Y h:i A', strtotime($app['applied_at'])); ?></td>
<td><a href="download.php?id=<?php echo $app['id']; ?>" class="btn btn-sm btn-outline-primary">Download</a></td>
</tr>
<?php endforeach; ?>
<?php endif; ?>
</tbody>
</table>
</div>
<?php if ($total_pages > 1): ?>
<div class="card-footer d-flex justify-content-center">
<nav aria-label="Page navigation">
<ul class="pagination mb-0">
<li class="page-item <?php if ($page <= 1) echo 'disabled'; ?>">
<a class="page-link" href="?page=<?php echo $page - 1; ?>">Previous</a>
</li>
<?php for ($i = 1; $i <= $total_pages; $i++): ?>
<li class="page-item <?php if ($page == $i) echo 'active'; ?>">
<a class="page-link" href="?page=<?php echo $i; ?>"><?php echo $i; ?></a>
</li>
<?php endfor; ?>
<li class="page-item <?php if ($page >= $total_pages) echo 'disabled'; ?>">
<a class="page-link" href="?page=<?php echo $page + 1; ?>">Next</a>
</li>
</ul>
</nav>
</div>
<?php endif; ?>
</div>
</main>
</body>
</html>

23
admin/delete-job.php Normal file
View File

@ -0,0 +1,23 @@
<?php
session_start();
if (!isset($_SESSION['user'])) {
header('Location: login.php');
exit;
}
require_once __DIR__ . '/../db/config.php';
$job_id = $_GET['id'] ?? null;
if ($job_id) {
try {
$pdo = db();
$stmt = $pdo->prepare("DELETE FROM jobs WHERE id = ?");
$stmt->execute([$job_id]);
} catch (PDOException $e) {
// Optional: log the error
}
}
header('Location: jobs.php');
exit;

43
admin/download.php Normal file
View File

@ -0,0 +1,43 @@
<?php
session_start();
if (!isset($_SESSION['user'])) {
http_response_code(403);
die('Forbidden');
}
require_once __DIR__ . '/../db/config.php';
$app_id = $_GET['id'] ?? null;
if (!$app_id) {
http_response_code(400);
die('Bad Request');
}
$pdo = db();
$stmt = $pdo->prepare("SELECT resume_path FROM applications WHERE id = ?");
$stmt->execute([$app_id]);
$application = $stmt->fetch();
if (!$application) {
http_response_code(404);
die('Application not found.');
}
$resume_path = $application['resume_path'];
if (!file_exists($resume_path)) {
http_response_code(404);
die('Resume file not found.');
}
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="' . basename($resume_path) . '"');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
header('Content-Length: ' . filesize($resume_path));
readfile($resume_path);
exit;

144
admin/edit-job.php Normal file
View File

@ -0,0 +1,144 @@
<?php
session_start();
if (!isset($_SESSION['user'])) {
header('Location: login.php');
exit;
}
require_once __DIR__ . '/../db/config.php';
$job_id = $_GET['id'] ?? null;
if (!$job_id) {
header('Location: jobs.php');
exit;
}
$pdo = db();
$error_message = '';
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$title = trim($_POST['title'] ?? '');
$department = trim($_POST['department'] ?? '');
$location = trim($_POST['location'] ?? '');
$type = trim($_POST['type'] ?? '');
$description = trim($_POST['description'] ?? '');
$requirements = trim($_POST['requirements'] ?? '');
$benefits = trim($_POST['benefits'] ?? '');
if (empty($title) || empty($department) || empty($location) || empty($type) || empty($description)) {
$error_message = 'Please fill in all fields.';
} else {
$requirements_arr = array_filter(array_map('trim', explode("\n", $requirements)));
$benefits_arr = array_filter(array_map('trim', explode("\n", $benefits)));
try {
$stmt = $pdo->prepare("UPDATE jobs SET title = ?, department = ?, location = ?, type = ?, description = ?, requirements = ?, benefits = ? WHERE id = ?");
$stmt->execute([$title, $department, $location, $type, $description, json_encode($requirements_arr), json_encode($benefits_arr), $job_id]);
header('Location: jobs.php');
exit;
} catch (PDOException $e) {
$error_message = 'Database error: ' . $e->getMessage();
}
}
} else {
$stmt = $pdo->prepare("SELECT * FROM jobs WHERE id = ?");
$stmt->execute([$job_id]);
$job = $stmt->fetch();
if (!$job) {
header('Location: jobs.php');
exit;
}
$title = $job['title'];
$department = $job['department'];
$location = $job['location'];
$type = $job['type'];
$description = $job['description'];
$requirements = implode("\n", json_decode($job['requirements'], true));
$benefits = implode("\n", json_decode($job['benefits'], true));
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin - Edit Job</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="../assets/css/custom.css?v=<?php echo time(); ?>">
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light bg-white shadow-sm">
<div class="container">
<a class="navbar-brand" href="index.php">CosmicHire Admin</a>
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link" href="applications.php">Applications</a>
</li>
<li class="nav-item">
<a class="nav-link" href="jobs.php">Jobs</a>
</li>
</ul>
<ul class="navbar-nav ms-auto">
<li class="nav-item">
<a class="nav-link" href="logout.php">Logout</a>
</li>
</ul>
</div>
</nav>
<main class="container my-5">
<h1 class="h2 mb-4">Edit Job</h1>
<?php if ($error_message): ?>
<div class="alert alert-danger"><?php echo $error_message; ?></div>
<?php endif; ?>
<form method="post">
<div class="card p-4">
<div class="mb-3">
<label for="title" class="form-label">Title</label>
<input type="text" class="form-control" id="title" name="title" value="<?php echo htmlspecialchars($title); ?>" required>
</div>
<div class="row">
<div class="col-md-6 mb-3">
<label for="department" class="form-label">Department</label>
<input type="text" class="form-control" id="department" name="department" value="<?php echo htmlspecialchars($department); ?>" required>
</div>
<div class="col-md-6 mb-3">
<label for="location" class="form-label">Location</label>
<input type="text" class="form-control" id="location" name="location" value="<?php echo htmlspecialchars($location); ?>" required>
</div>
</div>
<div class="mb-3">
<label for="type" class="form-label">Type</label>
<select class="form-select" id="type" name="type" required>
<option value="Full-time" <?php if ($type === 'Full-time') echo 'selected'; ?>>Full-time</option>
<option value="Part-time" <?php if ($type === 'Part-time') echo 'selected'; ?>>Part-time</option>
<option value="Contract" <?php if ($type === 'Contract') echo 'selected'; ?>>Contract</option>
<option value="Internship" <?php if ($type === 'Internship') echo 'selected'; ?>>Internship</option>
</select>
</div>
<div class="mb-3">
<label for="description" class="form-label">Description</label>
<textarea class="form-control" id="description" name="description" rows="5" required><?php echo htmlspecialchars($description); ?></textarea>
</div>
<div class="mb-3">
<label for="requirements" class="form-label">Requirements</label>
<textarea class="form-control" id="requirements" name="requirements" rows="5"><?php echo htmlspecialchars($requirements); ?></textarea>
<div class="form-text">Enter one requirement per line.</div>
</div>
<div class="mb-3">
<label for="benefits" class="form-label">Benefits</label>
<textarea class="form-control" id="benefits" name="benefits" rows="5"><?php echo htmlspecialchars($benefits); ?></textarea>
<div class="form-text">Enter one benefit per line.</div>
</div>
<div class="d-flex justify-content-end">
<a href="jobs.php" class="btn btn-secondary me-2">Cancel</a>
<button type="submit" class="btn btn-primary">Save Changes</button>
</div>
</div>
</form>
</main>
</body>
</html>

105
admin/index.php Normal file
View File

@ -0,0 +1,105 @@
<?php
session_start();
if (!isset($_SESSION['user'])) {
header('Location: login.php');
exit;
}
require_once __DIR__ . '/../db/config.php';
$pdo = db();
// Get stats
$total_jobs = $pdo->query("SELECT COUNT(*) FROM jobs")->fetchColumn();
$total_applications = $pdo->query("SELECT COUNT(*) FROM applications")->fetchColumn();
// Get recent applications
$stmt = $pdo->query("SELECT a.id, a.name, a.email, j.title AS job_title FROM applications a JOIN jobs j ON a.job_id = j.id ORDER BY a.applied_at DESC LIMIT 5");
$recent_applications = $stmt->fetchAll();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin - Dashboard</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="../assets/css/custom.css?v=<?php echo time(); ?>">
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light bg-white shadow-sm">
<div class="container">
<a class="navbar-brand" href="index.php">CosmicHire Admin</a>
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link" href="applications.php">Applications</a>
</li>
<li class="nav-item">
<a class="nav-link" href="jobs.php">Jobs</a>
</li>
</ul>
<ul class="navbar-nav ms-auto">
<li class="nav-item">
<a class="nav-link" href="logout.php">Logout</a>
</li>
</ul>
</div>
</nav>
<main class="container my-5">
<h1 class="h2 mb-4">Dashboard</h1>
<div class="row">
<div class="col-md-6">
<div class="card text-center mb-4">
<div class="card-body">
<h5 class="card-title">Total Jobs</h5>
<p class="card-text display-4"><?php echo $total_jobs; ?></p>
<a href="jobs.php" class="btn btn-primary">Manage Jobs</a>
</div>
</div>
</div>
<div class="col-md-6">
<div class="card text-center mb-4">
<div class="card-body">
<h5 class="card-title">Total Applications</h5>
<p class="card-text display-4"><?php echo $total_applications; ?></p>
<a href="applications.php" class="btn btn-primary">Manage Applications</a>
</div>
</div>
</div>
</div>
<h2 class="h3 mb-4">Recent Applications</h2>
<div class="card">
<div class="table-responsive">
<table class="table table-striped table-hover mb-0">
<thead>
<tr>
<th>Job Title</th>
<th>Name</th>
<th>Email</th>
</tr>
</thead>
<tbody>
<?php if (empty($recent_applications)): ?>
<tr>
<td colspan="3" class="text-center">No recent applications.</td>
</tr>
<?php else: ?>
<?php foreach ($recent_applications as $app): ?>
<tr>
<td><?php echo htmlspecialchars($app['job_title']); ?></td>
<td><?php echo htmlspecialchars($app['name']); ?></td>
<td><?php echo htmlspecialchars($app['email']); ?></td>
</tr>
<?php endforeach; ?>
<?php endif; ?>
</tbody>
</table>
</div>
</div>
</main>
</body>
</html>

121
admin/jobs.php Normal file
View File

@ -0,0 +1,121 @@
<?php
session_start();
if (!isset($_SESSION['user'])) {
header('Location: login.php');
exit;
}
require_once __DIR__ . '/../db/config.php';
$pdo = db();
// Pagination settings
$results_per_page = 10;
$page = isset($_GET['page']) ? (int)$_GET['page'] : 1;
$page = max(1, $page);
$offset = ($page - 1) * $results_per_page;
// Get total number of jobs
$total_results = $pdo->query("SELECT COUNT(*) FROM jobs")->fetchColumn();
$total_pages = ceil($total_results / $results_per_page);
// Fetch jobs for the current page
$stmt = $pdo->prepare("SELECT * FROM jobs ORDER BY created_at DESC LIMIT :limit OFFSET :offset");
$stmt->bindValue(':limit', $results_per_page, PDO::PARAM_INT);
$stmt->bindValue(':offset', $offset, PDO::PARAM_INT);
$stmt->execute();
$jobs = $stmt->fetchAll();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin - Jobs</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="../assets/css/custom.css?v=<?php echo time(); ?>">
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light bg-white shadow-sm">
<div class="container">
<a class="navbar-brand" href="index.php">CosmicHire Admin</a>
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link" href="applications.php">Applications</a>
</li>
<li class="nav-item">
<a class="nav-link active" href="jobs.php">Jobs</a>
</li>
</ul>
<ul class="navbar-nav ms-auto">
<li class="nav-item">
<a class="nav-link" href="logout.php">Logout</a>
</li>
</ul>
</div>
</nav>
<main class="container my-5">
<div class="d-flex justify-content-between align-items-center mb-4">
<h1 class="h2">Manage Jobs</h1>
<a href="add-job.php" class="btn btn-primary">Add New Job</a>
</div>
<div class="card">
<div class="table-responsive">
<table class="table table-striped table-hover mb-0">
<thead>
<tr>
<th>Title</th>
<th>Department</th>
<th>Location</th>
<th>Type</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<?php if (empty($jobs)): ?>
<tr>
<td colspan="5" class="text-center">No jobs found.</td>
</tr>
<?php else: ?>
<?php foreach ($jobs as $job): ?>
<tr>
<td><?php echo htmlspecialchars($job['title']); ?></td>
<td><?php echo htmlspecialchars($job['department']); ?></td>
<td><?php echo htmlspecialchars($job['location']); ?></td>
<td><?php echo htmlspecialchars($job['type']); ?></td>
<td>
<a href="edit-job.php?id=<?php echo $job['id']; ?>" class="btn btn-sm btn-outline-primary">Edit</a>
<a href="delete-job.php?id=<?php echo $job['id']; ?>" class="btn btn-sm btn-outline-danger" onclick="return confirm('Are you sure you want to delete this job?')">Delete</a>
</td>
</tr>
<?php endforeach; ?>
<?php endif; ?>
</tbody>
</table>
</div>
<?php if ($total_pages > 1): ?>
<div class="card-footer d-flex justify-content-center">
<nav aria-label="Page navigation">
<ul class="pagination mb-0">
<li class="page-item <?php if ($page <= 1) echo 'disabled'; ?>">
<a class="page-link" href="?page=<?php echo $page - 1; ?>">Previous</a>
</li>
<?php for ($i = 1; $i <= $total_pages; $i++): ?>
<li class="page-item <?php if ($page == $i) echo 'active'; ?>">
<a class="page-link" href="?page=<?php echo $i; ?>"><?php echo $i; ?></a>
</li>
<?php endfor; ?>
<li class="page-item <?php if ($page >= $total_pages) echo 'disabled'; ?>">
<a class="page-link" href="?page=<?php echo $page + 1; ?>">Next</a>
</li>
</ul>
</nav>
</div>
<?php endif; ?>
</div>
</main>
</body>
</html>

74
admin/login.php Normal file
View File

@ -0,0 +1,74 @@
<?php
session_start();
require_once __DIR__ . '/../db/config.php';
$error_message = '';
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$username = $_POST['username'] ?? '';
$password = $_POST['password'] ?? '';
if (empty($username) || empty($password)) {
$error_message = 'Please enter both username and password.';
} else {
try {
$pdo = db();
$stmt = $pdo->prepare("SELECT * FROM users WHERE username = ?");
$stmt->execute([$username]);
$user = $stmt->fetch();
if ($user && password_verify($password, $user['password'])) {
$_SESSION['user'] = $user['username'];
header('Location: index.php');
exit;
} else {
$error_message = 'Invalid username or password.';
}
} catch (PDOException $e) {
$error_message = 'Database error. Please try again later.';
// Optional: Log the detailed error: error_log($e->getMessage());
}
}
}
if (isset($_SESSION['user'])) {
header('Location: index.php');
exit;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin Login - CosmicHire</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="../assets/css/custom.css?v=<?php echo time(); ?>">
</head>
<body>
<main class="container my-5">
<div class="row justify-content-center">
<div class="col-lg-5">
<div class="card p-4">
<h1 class="h3 mb-3 text-center">Admin Login</h1>
<?php if ($error_message): ?>
<div class="alert alert-danger"><?php echo $error_message; ?></div>
<?php endif; ?>
<form method="post">
<div class="mb-3">
<label for="username" class="form-label">Username</label>
<input type="text" class="form-control" id="username" name="username" required>
</div>
<div class="mb-3">
<label for="password" class="form-label">Password</label>
<input type="password" class="form-control" id="password" name="password" required>
</div>
<button type="submit" class="btn btn-primary w-100">Login</button>
</form>
</div>
</div>
</div>
</main>
</body>
</html>

6
admin/logout.php Normal file
View File

@ -0,0 +1,6 @@
<?php
session_start();
session_unset();
session_destroy();
header('Location: login.php');
exit;

178
apply.php Normal file
View File

@ -0,0 +1,178 @@
<?php
// Disable caching
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Expires: 0");
require_once __DIR__ . '/mail/MailService.php';
require_once __DIR__ . '/db/config.php';
$job_id = $_GET['id'] ?? null;
$job = null;
if ($job_id) {
$pdo = db();
$stmt = $pdo->prepare("SELECT * FROM jobs WHERE id = ?");
$stmt->execute([$job_id]);
$job = $stmt->fetch();
}
// Redirect if job not found
if (!$job) {
header("Location: careers.php");
exit;
}
$success_message = '';
$error_message = '';
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$name = trim($_POST['name'] ?? '');
$email = trim($_POST['email'] ?? '');
$resume = $_FILES['resume'] ?? null;
if (empty($name) || empty($email) || !filter_var($email, FILTER_VALIDATE_EMAIL) || empty($resume) || $resume['error'] !== UPLOAD_ERR_OK) {
$error_message = 'Please fill in all fields and upload a valid resume.';
} else {
// Handle file upload
$upload_dir = __DIR__ . '/uploads/resumes/';
$file_extension = pathinfo($resume['name'], PATHINFO_EXTENSION);
$safe_filename = uniqid('resume_', true) . '.' . $file_extension;
$upload_path = $upload_dir . $safe_filename;
if (move_uploaded_file($resume['tmp_name'], $upload_path)) {
try {
// Save application to database
$pdo = db();
$stmt = $pdo->prepare("INSERT INTO applications (job_id, name, email, resume_path) VALUES (?, ?, ?, ?)");
$stmt->execute([$job_id, $name, $email, $upload_path]);
// Send email notification
$to = getenv('MAIL_TO') ?: 'your-email@example.com'; // Fallback email
$subject = "New Application for " . $job['title'];
$html_content = "<p>A new application has been submitted for the position of <strong>" . htmlspecialchars($job['title']) . "</strong>.</p>"
. "<p><strong>Applicant Name:</strong> " . htmlspecialchars($name) . "</p>"
. "<p><strong>Applicant Email:</strong> " . htmlspecialchars($email) . "</p>"
. "<p>The resume has been saved to the server.</p>";
$text_content = "New Application for " . $job['title'] . "\n"
. "Applicant Name: " . $name . "\n"
. "Applicant Email: " . $email;
$result = MailService::sendMail($to, $subject, $html_content, $text_content);
if (!empty($result['success'])) {
// Send confirmation email to applicant
$applicant_subject = "Your Application for " . $job['title'];
$applicant_html_content = "<p>Dear " . htmlspecialchars($name) . ",</p>"
. "<p>Thank you for applying for the position of <strong>" . htmlspecialchars($job['title']) . "</strong> at CosmicHire.</p>"
. "<p>We have received your application and will be in touch shortly if your qualifications match our requirements.</p>"
. "<p>Best regards,<br>The CosmicHire Team</p>";
$applicant_text_content = "Dear " . $name . ",\n\nThank you for applying for the position of " . $job['title'] . " at CosmicHire.\n\nWe have received your application and will be in touch shortly if your qualifications match our requirements.\n\nBest regards,\nThe CosmicHire Team";
MailService::sendMail($email, $applicant_subject, $applicant_html_content, $applicant_text_content);
$success_message = 'Your application has been submitted successfully! A confirmation email has been sent to you.';
} else {
$error_message = 'Your application was saved, but there was an error sending the notification email.';
// Optional: Log the detailed error: error_log($result['error']);
}
} catch (PDOException $e) {
$error_message = 'There was a database error. Please try again later.';
// Optional: Log the detailed error: error_log($e->getMessage());
}
} else {
$error_message = 'There was an error uploading your resume. Please try again.';
}
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Apply for <?php echo htmlspecialchars($job['title']); ?> - CosmicHire</title>
<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.gstatic.com" crossorigin>
<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(); ?>">
<meta name="robots" content="noindex, nofollow">
</head>
<body>
<!-- Header -->
<nav class="navbar navbar-expand-lg navbar-light">
<div class="container">
<a class="navbar-brand" href="index.php">CosmicHire</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav ms-auto">
<li class="nav-item">
<a class="nav-link" href="index.php">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="careers.php">Open Positions</a>
</li>
</ul>
</div>
</div>
</nav>
<!-- Application Form -->
<main class="container my-5">
<div class="row justify-content-center">
<div class="col-lg-8">
<h1 class="mb-4">Apply for <?php echo htmlspecialchars($job['title']); ?></h1>
<?php if ($success_message): ?>
<div class="alert alert-success">
<?php echo $success_message; ?>
</div>
<?php endif; ?>
<?php if ($error_message): ?>
<div class="alert alert-danger">
<?php echo $error_message; ?>
</div>
<?php endif; ?>
<?php if (!$success_message): ?>
<form action="apply.php?id=<?php echo htmlspecialchars($job['id']); ?>" method="post" enctype="multipart/form-data">
<div class="mb-3">
<label for="name" class="form-label">Full Name</label>
<input type="text" class="form-control" id="name" name="name" required>
</div>
<div class="mb-3">
<label for="email" class="form-label">Email Address</label>
<input type="email" class="form-control" id="email" name="email" required>
</div>
<div class="mb-3">
<label for="resume" class="form-label">Resume (PDF, DOC, DOCX)</label>
<input type="file" class="form-control" id="resume" name="resume" accept=".pdf,.doc,.docx" required>
</div>
<div class="mb-3 form-check">
<input type="checkbox" class="form-check-input" id="consent" required>
<label class="form-check-label" for="consent">I consent to my data being processed for this application.</label>
</div>
<button type="submit" class="btn btn-primary">Submit Application</button>
<a href="job-details.php?id=<?php echo htmlspecialchars($job['id']); ?>" class="btn btn-secondary">Cancel</a>
</form>
<?php endif; ?>
</div>
</div>
</main>
<!-- Footer -->
<footer class="footer">
<div class="container">
<p>&copy; <?php echo date('Y'); ?> CosmicHire. All Rights Reserved.</p>
</div>
</footer>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>

View File

@ -16,23 +16,45 @@ body {
color: #4A90E2 !important; color: #4A90E2 !important;
} }
.navbar-brand img {
height: 30px;
}
/* Hero Section */ /* Hero Section */
.hero-section { .hero-section {
background: linear-gradient(45deg, rgba(74, 144, 226, 0.9), rgba(80, 227, 194, 0.9)), url('https://picsum.photos/seed/space-odyssey/1600/500') no-repeat center center; background: #222 url('https://picsum.photos/seed/milkyway/1600/800') no-repeat center center;
background-size: cover; background-size: cover;
color: white; color: white;
padding: 6rem 0; padding: 6rem 0;
text-align: center; text-align: center;
position: relative;
}
.hero-section::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
}
.hero-section .container {
position: relative;
z-index: 2;
} }
.hero-section h1 { .hero-section h1 {
font-weight: 700; font-weight: 700;
font-size: 3.5rem; font-size: 3.5rem;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
} }
.hero-section p { .hero-section p {
font-size: 1.25rem; font-size: 1.25rem;
opacity: 0.9; opacity: 0.9;
text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
} }
/* Job Listings */ /* Job Listings */
@ -66,13 +88,14 @@ body {
padding: 0.4em 0.7em; padding: 0.4em 0.7em;
} }
/* Buttons */
.btn-primary { .btn-primary {
background-color: #4A90E2; background-color: #4A90E2;
border-color: #4A90E2; border-color: #4A90E2;
border-radius: 12px; border-radius: 12px;
padding: 0.75rem 1.5rem; padding: 0.75rem 1.5rem;
font-weight: 600; font-weight: 600;
transition: background-color 0.2s; transition: background-color 0.3s ease;
} }
.btn-primary:hover { .btn-primary:hover {
@ -95,7 +118,6 @@ body {
border-color: #40B59A; border-color: #40B59A;
} }
/* Footer */ /* Footer */
.footer { .footer {
background-color: #FFFFFF; background-color: #FFFFFF;
@ -117,3 +139,37 @@ body {
#job-search-form { #job-search-form {
transition: all 0.3s ease-in-out; transition: all 0.3s ease-in-out;
} }
/* Job Details Page */
.job-header {
background: linear-gradient(135deg, #4A90E2 0%, #50E3C2 100%);
color: white;
padding: 4rem 0;
border-bottom-left-radius: 20px;
border-bottom-right-radius: 20px;
}
.job-header h1 {
font-weight: 700;
}
.card {
border-radius: 12px;
border: none;
box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.breadcrumb-item a {
color: #4A90E2;
text-decoration: none;
}
.list-group-item {
border: none;
padding-left: 0;
}
.list-group-item i {
color: #50E3C2;
margin-right: 10px;
}

View File

@ -5,30 +5,12 @@ header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache"); header("Pragma: no-cache");
header("Expires: 0"); header("Expires: 0");
// Job listings data require_once __DIR__ . '/db/config.php';
$jobs = [
[ $pdo = db();
'id' => 1, $stmt = $pdo->query("SELECT * FROM jobs ORDER BY created_at DESC");
'title' => 'Senior Frontend Developer Space Data Platform Engineering', $jobs = $stmt->fetchAll();
'department' => 'Engineering',
'location' => 'Remote',
'type' => 'Full-time'
],
[
'id' => 2,
'title' => 'Product Manager Orbital Systems & Services Product',
'department' => 'Product',
'location' => 'New York, NY',
'type' => 'Full-time'
],
[
'id' => 3,
'title' => 'UI/UX Designer Mission-Control Interfaces Design',
'department' => 'Design',
'location' => 'Remote',
'type' => 'Contract'
],
];
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
@ -141,7 +123,7 @@ $jobs = [
<section class="container my-5"> <section class="container my-5">
<div class="row align-items-center flex-row-reverse"> <div class="row align-items-center flex-row-reverse">
<div class="col-md-6"> <div class="col-md-6">
<img src="https://picsum.photos/seed/milky-way-person/800/600" class="img-fluid rounded" alt="A person standing in front of the Milky Way, representing the vast opportunities at our company."> <img src="https://picsum.photos/seed/stars/800/600" class="img-fluid rounded" alt="A beautiful image of a starry night sky, representing the vast opportunities at our company.">
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<h3>Our Benefits</h3> <h3>Our Benefits</h3>

View File

@ -0,0 +1,24 @@
<?php
require_once __DIR__ . '/../config.php';
function migrate_003_create_applications_table() {
try {
$pdo = db();
$sql = "
CREATE TABLE IF NOT EXISTS `applications` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`job_id` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`resume_path` varchar(255) NOT NULL,
`applied_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
";
$pdo->exec($sql);
echo "Migration 003: Applications table created successfully.\n";
} catch (PDOException $e) {
die("Migration 003 failed: " . $e->getMessage() . "\n");
}
}

View File

@ -0,0 +1,27 @@
<?php
require_once __DIR__ . '/../config.php';
function migrate_004_create_jobs_table() {
try {
$pdo = db();
$sql = "
CREATE TABLE IF NOT EXISTS `jobs` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL,
`department` varchar(255) NOT NULL,
`location` varchar(255) NOT NULL,
`type` varchar(255) NOT NULL,
`description` text NOT NULL,
`requirements` json NOT NULL,
`benefits` json NOT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
";
$pdo->exec($sql);
echo "Migration 004: Jobs table created successfully.\n";
} catch (PDOException $e) {
die("Migration 004 failed: " . $e->getMessage() . "\n");
}
}

View File

@ -5,45 +5,12 @@ header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache"); header("Pragma: no-cache");
header("Expires: 0"); header("Expires: 0");
// Sample data for job listings require_once __DIR__ . '/db/config.php';
$jobs = [
[ $pdo = db();
'title' => 'Senior Frontend Developer', $stmt = $pdo->query("SELECT * FROM jobs ORDER BY created_at DESC");
'department' => 'Engineering', $jobs = $stmt->fetchAll();
'location' => 'Remote',
'type' => 'Full-time'
],
[
'title' => 'Product Manager',
'department' => 'Product',
'location' => 'New York, NY',
'type' => 'Full-time'
],
[
'title' => 'UI/UX Designer',
'department' => 'Design',
'location' => 'Remote',
'type' => 'Contract'
],
[
'title' => 'HR Generalist',
'department' => 'People Ops',
'location' => 'San Francisco, CA',
'type' => 'Full-time'
],
[
'title' => 'DevOps Engineer',
'department' => 'Engineering',
'location' => 'Remote',
'type' => 'Full-time'
],
[
'title' => 'Marketing Specialist',
'department' => 'Marketing',
'location' => 'Austin, TX',
'type' => 'Part-time'
]
];
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
@ -128,7 +95,7 @@ $jobs = [
<?php echo htmlspecialchars($job['department']); ?> &middot; <?php echo htmlspecialchars($job['location']); ?> <?php echo htmlspecialchars($job['department']); ?> &middot; <?php echo htmlspecialchars($job['location']); ?>
</p> </p>
<span class="badge bg-light text-dark border"><?php echo htmlspecialchars($job['type']); ?></span> <span class="badge bg-light text-dark border"><?php echo htmlspecialchars($job['type']); ?></span>
<a href="#" class="btn btn-primary mt-3 stretched-link">View Details</a> <a href="job-details.php?id=<?php echo $job['id']; ?>" class="btn btn-primary mt-3 stretched-link">View Details</a>
</div> </div>
</div> </div>
<?php endforeach; ?> <?php endforeach; ?>
@ -155,7 +122,7 @@ $jobs = [
<section class="container my-5"> <section class="container my-5">
<div class="row align-items-center flex-row-reverse"> <div class="row align-items-center flex-row-reverse">
<div class="col-md-6"> <div class="col-md-6">
<img src="https://picsum.photos/seed/milky-way-person/800/600" class="img-fluid rounded" alt="A person standing in front of the Milky Way, representing the vast opportunities at our company."> <img src="https://picsum.photos/seed/stars/800/600" class="img-fluid rounded" alt="A beautiful image of a starry night sky, representing the vast opportunities at our company.">
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<h3>Our Benefits</h3> <h3>Our Benefits</h3>

View File

@ -5,103 +5,21 @@ header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache"); header("Pragma: no-cache");
header("Expires: 0"); header("Expires: 0");
// Simulate fetching job data based on an ID from the URL require_once __DIR__ . '/db/config.php';
$jobs = [
[
'id' => 1,
'title' => 'Senior Product Manager',
'department' => 'Product',
'location' => 'Remote',
'description' => 'We are looking for an experienced Senior Product Manager to help us build the future of HR technology. You will be responsible for the product planning and execution throughout the Product Lifecycle, including: gathering and prioritizing product and customer requirements, defining the product vision, and working closely with engineering, sales, marketing and support to ensure revenue and customer satisfaction goals are met.',
'requirements' => [
'5+ years of product management experience',
'Demonstrated success defining and launching excellent products',
'Excellent written and verbal communication skills',
'Bachelors degree (MBA preferred)',
'Technical background, with experience in SaaS',
'Excellent teamwork skills',
],
'benefits' => [
'Competitive salary and equity',
'Comprehensive health, dental, and vision insurance',
'Unlimited paid time off',
'Remote work stipend',
'Annual team offsites',
]
],
[
'id' => 2,
'title' => 'Lead Software Engineer (Backend)',
'department' => 'Engineering',
'location' => 'New York, NY',
'description' => 'As a Lead Software Engineer, you will be a key member of our engineering team, responsible for designing, developing, and deploying our backend services. You will work with a modern tech stack and have a significant impact on our product's architecture and performance.',
'requirements' => [
'8+ years of software development experience',
'Expertise in PHP, Python, or similar languages',
'Strong understanding of database design and SQL',
'Experience with cloud platforms (AWS, GCP, Azure)',
'Proven leadership and mentoring skills',
],
'benefits' => [
'Competitive salary and equity',
'Comprehensive health, dental, and vision insurance',
'401(k) with company match',
'Commuter benefits',
'Catered lunches',
]
],
[
'id' => 3,
'title' => 'UX/UI Designer',
'department' => 'Design',
'location' => 'Remote',
'description' => 'We are seeking a talented UX/UI Designer to create amazing user experiences. The ideal candidate should have an eye for clean and artful design, possess superior UX/UI skills and be able to translate high-level requirements into interaction flows and artifacts, and transform them into beautiful, intuitive, and functional user interfaces.',
'requirements' => [
'3+ years of UX/UI design experience',
'A strong portfolio of design projects',
'Proficiency in Figma, Sketch, or other visual design and wire-framing tools',
'Experience in creating wireframes, storyboards, user flows, process flows and site maps',
'Excellent visual design skills with sensitivity to user-system interaction',
],
'benefits' => [
'Competitive salary',
'Flexible work hours',
'Health and wellness stipend',
'Remote work stipend',
'Opportunities for professional development',
]
],
[
'id' => 4,
'title' => 'Marketing Manager',
'department' => 'Marketing',
'location' => 'San Francisco, CA',
'description' => 'We are looking for a results-driven Marketing Manager to join our growing team. You will be responsible for developing and implementing marketing strategies to increase brand awareness and drive lead generation. This is a great opportunity for someone who is passionate about marketing and technology.',
'requirements' => [
'5+ years of marketing experience in the tech industry',
'Proven experience in developing and executing marketing campaigns',
'Strong understanding of digital marketing channels (SEO, SEM, social media, etc.)',
'Excellent analytical and communication skills',
'Bachelor's degree in Marketing or related field',
],
'benefits' => [
'Competitive salary and performance bonuses',
'Comprehensive health, dental, and vision insurance',
'Generous PTO and paid holidays',
'401(k) with company match',
'A vibrant and collaborative work environment',
]
],
];
$job_id = isset($_GET['id']) ? (int)$_GET['id'] : 0; $job_id = isset($_GET['id']) ? (int)$_GET['id'] : 0;
$job = null; $job = null;
foreach ($jobs as $j) { if ($job_id > 0) {
if ($j['id'] === $job_id) { $pdo = db();
$job = $j; $stmt = $pdo->prepare("SELECT * FROM jobs WHERE id = ?");
break; $stmt->execute([$job_id]);
$job = $stmt->fetch();
} }
if ($job) {
$job['requirements'] = json_decode($job['requirements'], true);
$job['benefits'] = json_decode($job['benefits'], true);
} }
// SEO and page metadata // SEO and page metadata
@ -135,60 +53,32 @@ $page_keywords = 'jobs, careers, hiring, ' . ($job ? htmlspecialchars($job['titl
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.css"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.css">
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>"> <link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
<style> <?php if ($job): ?>
body { <script type="application/ld+json">
background-color: #F9F9F9; {
color: #333; "@context" : "https://schema.org/",
font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; "@type" : "JobPosting",
"title" : "<?php echo htmlspecialchars($job['title']); ?>",
"description" : "<?php echo htmlspecialchars($job['description']); ?>",
"hiringOrganization" : {
"@type" : "Organization",
"name" : "CosmicHire",
"sameAs" : "https://flatlogic.com/",
"logo" : "https://flatlogic.com/assets/logo.svg"
},
"datePosted" : "<?php echo date('Y-m-d', strtotime($job['created_at'])); ?>",
"employmentType" : "<?php echo strtoupper(str_replace('-', '_', $job['type'])); ?>",
"jobLocation": {
"@type": "Place",
"address": {
"@type": "PostalAddress",
"addressLocality": "<?php echo htmlspecialchars($job['location']); ?>"
} }
.navbar-brand img {
height: 30px;
} }
.job-header {
background: linear-gradient(135deg, #4A90E2 0%, #50E3C2 100%);
color: white;
padding: 4rem 0;
border-bottom-left-radius: 20px;
border-bottom-right-radius: 20px;
} }
.job-header h1 { </script>
font-weight: 700; <?php endif; ?>
}
.card {
border-radius: 12px;
border: none;
box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.btn-primary {
background-color: #4A90E2;
border-color: #4A90E2;
border-radius: 12px;
padding: 0.75rem 1.5rem;
font-weight: 600;
transition: background-color 0.3s ease;
}
.btn-primary:hover {
background-color: #357ABD;
border-color: #357ABD;
}
.breadcrumb-item a {
color: #4A90E2;
text-decoration: none;
}
.list-group-item {
border: none;
padding-left: 0;
}
.list-group-item i {
color: #50E3C2;
margin-right: 10px;
}
footer {
padding: 2rem 0;
background-color: #FFFFFF;
margin-top: 4rem;
}
</style>
</head> </head>
<body> <body>
@ -264,7 +154,7 @@ $page_keywords = 'jobs, careers, hiring, ' . ($job ? htmlspecialchars($job['titl
<div class="card p-4 sticky-top" style="top: 20px;"> <div class="card p-4 sticky-top" style="top: 20px;">
<h3 class="h5 mb-3">Interested?</h3> <h3 class="h5 mb-3">Interested?</h3>
<p class="text-muted">Apply now to join our team and make an impact.</p> <p class="text-muted">Apply now to join our team and make an impact.</p>
<a href="#" class="btn btn-primary w-100">Apply Now</a> <a href="apply.php?id=<?php echo $job['id']; ?>" class="btn btn-primary w-100">Apply Now</a>
</div> </div>
</div> </div>
</div> </div>