143 lines
7.5 KiB
PHP
143 lines
7.5 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Post a New Job - SkillRunner</title>
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css" rel="stylesheet">
|
|
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
|
|
</head>
|
|
<body>
|
|
<?php
|
|
session_start();
|
|
|
|
// Redirect to login if client is not logged in
|
|
if (!isset($_SESSION['client_id'])) {
|
|
header('Location: login-client.php');
|
|
exit;
|
|
}
|
|
?>
|
|
<nav class="navbar navbar-expand-lg navbar-light bg-white sticky-top">
|
|
<div class="container">
|
|
<a class="navbar-brand" href="/">SkillRunner</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">
|
|
<?php if (isset($_SESSION['client_id'])): ?>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="dashboard-client.php">Dashboard</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="logout.php">Logout</a>
|
|
</li>
|
|
<?php elseif (isset($_SESSION['worker_id'])): ?>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="dashboard.php">Dashboard</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="logout.php">Logout</a>
|
|
</li>
|
|
<?php else: ?>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="login.php">Login</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="register.php">Register</a>
|
|
</li>
|
|
<?php endif; ?>
|
|
<li class="nav-item">
|
|
<a class="btn btn-primary" href="post-job.php">Post a Job</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</nav>
|
|
|
|
<main class="container my-5">
|
|
<div class="row justify-content-center">
|
|
<div class="col-md-8 col-lg-7">
|
|
<div class="text-center mb-5">
|
|
<h1 class="display-5 fw-bold">Post a New Job</h1>
|
|
<p class="lead text-muted">Fill out the details below to find the perfect skilled worker.</p>
|
|
</div>
|
|
|
|
<div id="confirmation-alert" class="alert alert-success d-none" role="alert">
|
|
<i class="bi bi-check-circle-fill"></i> Your job has been posted successfully! You can <a href="/">view it on the job board</a> or post another one.
|
|
</div>
|
|
|
|
<form id="post-job-form" action="add_job.php" method="POST" class="needs-validation" novalidate>
|
|
<input type="hidden" name="client_id" value="<?php echo $_SESSION['client_id']; ?>">
|
|
<div class="card p-4 mb-4">
|
|
<h5 class="card-title mb-4">Job Details</h5>
|
|
<div class="mb-3">
|
|
<label for="title" class="form-label">Job Title</label>
|
|
<input type="text" class="form-control" id="title" name="title" placeholder="e.g., Senior Web Developer" required>
|
|
<div class="invalid-feedback">Please provide a job title.</div>
|
|
</div>
|
|
|
|
<div class="mb-3">
|
|
<label for="description" class="form-label">Description</label>
|
|
<textarea class="form-control" id="description" name="description" rows="5" placeholder="Describe the responsibilities, requirements, and what makes this a great opportunity." required></textarea>
|
|
<div class="invalid-feedback">Please provide a job description.</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-md-6 mb-3">
|
|
<label for="category" class="form-label">Category</label>
|
|
<select class="form-select" id="category" name="category" required>
|
|
<option value="" disabled selected>Select a category...</option>
|
|
<option value="Web Development">Web Development</option>
|
|
<option value="Mobile Development">Mobile Development</option>
|
|
<option value="Design">Design</option>
|
|
<option value="Writing">Writing</option>
|
|
<option value="Marketing">Marketing</option>
|
|
<option value="Other">Other</option>
|
|
</select>
|
|
<div class="invalid-feedback">Please select a category.</div>
|
|
</div>
|
|
<div class="col-md-6 mb-3">
|
|
<label for="skills" class="form-label">Required Skills</label>
|
|
<input type="text" class="form-control" id="skills" name="skills" placeholder="e.g., PHP, React, Figma" required>
|
|
<div class="form-text">Enter skills separated by commas.</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card p-4">
|
|
<h5 class="card-title mb-4">Budget & Deadline</h5>
|
|
<div class="row">
|
|
<div class="col-md-6 mb-3">
|
|
<label for="budget" class="form-label">Budget ($)</label>
|
|
<div class="input-group">
|
|
<span class="input-group-text">$</span>
|
|
<input type="number" class="form-control" id="budget" name="budget" placeholder="e.g., 5000" min="1" required>
|
|
<div class="invalid-feedback">Please enter a valid budget.</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6 mb-3">
|
|
<label for="deadline" class="form-label">Deadline</label>
|
|
<input type="date" class="form-control" id="deadline" name="deadline" required>
|
|
<div class="invalid-feedback">Please set a deadline.</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="d-grid gap-2 mt-4">
|
|
<button type="submit" class="btn btn-primary btn-lg">Post Job & Fund Escrow</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
|
|
<footer class="text-center py-4 text-muted border-top">
|
|
© <?php echo date("Y"); ?> SkillRunner. All Rights Reserved.
|
|
</footer>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
|
|
<script src="assets/js/main.js?v=<?php echo time(); ?>"></script>
|
|
</body>
|
|
</html>
|