139 lines
6.5 KiB
PHP
139 lines
6.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>Add Food Listing - Real-Time Food Rescue</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=Poppins:wght@400;600&display=swap" rel="stylesheet">
|
|
<style>
|
|
body {
|
|
font-family: 'Poppins', sans-serif;
|
|
background-color: #f8f9fa;
|
|
color: #212529;
|
|
}
|
|
.navbar {
|
|
box-shadow: 0 2px 4px rgba(0,0,0,.1);
|
|
}
|
|
.card {
|
|
border-radius: 0.5rem;
|
|
border: none;
|
|
box-shadow: 0 4px 8px rgba(0,0,0,.1);
|
|
}
|
|
.form-label {
|
|
font-weight: 600;
|
|
}
|
|
.btn-primary {
|
|
background-color: #28a745;
|
|
border-color: #28a745;
|
|
font-weight: 600;
|
|
padding: 0.75rem 1.5rem;
|
|
}
|
|
.btn-primary:hover {
|
|
background-color: #218838;
|
|
border-color: #1e7e34;
|
|
}
|
|
.alert {
|
|
border-radius: 0.5rem;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<nav class="navbar navbar-expand-lg navbar-light bg-white">
|
|
<div class="container-fluid">
|
|
<a class="navbar-brand" href="index.php" style="font-weight: 600;">Food Rescue</a>
|
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
|
|
<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 active" href="add_listing.php">Add Listing</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="ngo_dashboard.php">NGO Dashboard</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="volunteer_signup.php">Volunteer Signup</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="volunteer_dashboard.php">Volunteer Dashboard</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="volunteer_hub_old.php">Find Pickups</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="distribution_map.php">Distribution Map</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="admin_panel.php">Admin Panel</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<div class="container my-5">
|
|
<div class="row justify-content-center">
|
|
<div class="col-lg-8">
|
|
<div class="card p-4">
|
|
<div class="card-body">
|
|
<h2 class="card-title text-center mb-4">Create a Surplus Food Listing</h2>
|
|
|
|
<?php if (isset($_GET['status']) && $_GET['status'] == 'success'): ?>
|
|
<div class="alert alert-success" role="alert">
|
|
Thank you! Your food listing has been posted successfully.
|
|
</div>
|
|
<?php elseif (isset($_GET['status']) && $_GET['status'] == 'error'): ?>
|
|
<div class="alert alert-danger" role="alert">
|
|
Something went wrong. Please check your inputs and try again.
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<form action="submit_listing.php" method="POST">
|
|
<div class="mb-3">
|
|
<label for="name" class="form-label">Food Item Name</label>
|
|
<input type="text" class="form-control" id="name" name="name" placeholder="e.g., Fresh Bread Loaves" required>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="quantity" class="form-label">Quantity</label>
|
|
<input type="text" class="form-control" id="quantity" name="quantity" placeholder="e.g., 10 loaves, 5 boxes" required>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="pickup_by" class="form-label">Latest Pickup Time</label>
|
|
<input type="datetime-local" class="form-control" id="pickup_by" name="pickup_by" required>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-6 mb-3">
|
|
<label for="latitude" class="form-label">Latitude</label>
|
|
<input type="text" class="form-control" id="latitude" name="latitude" placeholder="e.g., 40.7128">
|
|
</div>
|
|
<div class="col-md-6 mb-3">
|
|
<label for="longitude" class="form-label">Longitude</label>
|
|
<input type="text" class="form-control" id="longitude" name="longitude" placeholder="e.g., -74.0060">
|
|
</div>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="description" class="form-label">Description (Optional)</label>
|
|
<textarea class="form-control" id="description" name="description" rows="3" placeholder="Additional details like ingredients or special instructions."></textarea>
|
|
</div>
|
|
<div class="d-grid">
|
|
<button type="submit" class="btn btn-primary">Submit Listing</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
|
</body>
|
|
</html>
|