132 lines
5.4 KiB
PHP
132 lines
5.4 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>MajuroEats - Food Delivery in Majuro</title>
|
|
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap" rel="stylesheet">
|
|
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
|
|
<script src="https://unpkg.com/feather-icons"></script>
|
|
</head>
|
|
<body>
|
|
<?php session_start(); ?>
|
|
<header class="navbar">
|
|
<div class="container">
|
|
<div class="navbar-inner">
|
|
<a href="/" class="logo">MajuroEats</a>
|
|
<nav class="nav-links">
|
|
<a href="#how-it-works">How It Works</a>
|
|
<a href="restaurants.php">Restaurants</a>
|
|
<a href="#contact">Contact</a>
|
|
<?php if (isset($_SESSION['user_id'])): ?>
|
|
<?php if ($_SESSION['user_role'] === 'customer'): ?>
|
|
<a href="customer_dashboard.php">My Account</a>
|
|
<?php elseif ($_SESSION['user_role'] === 'restaurant_owner'): ?>
|
|
<a href="dashboard.php">Dashboard</a>
|
|
<?php endif; ?>
|
|
<a href="logout.php">Log Out</a>
|
|
<?php else: ?>
|
|
<a href="login.php">Login</a>
|
|
<a href="customer_signup.php" class="btn btn-primary">Sign Up</a>
|
|
<?php endif; ?>
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
|
|
<main>
|
|
<section class="hero">
|
|
<div class="container">
|
|
<div class="hero-content">
|
|
<h1>Your Favorite Food, Delivered in Majuro</h1>
|
|
<p>Fresh, fast, and reliable. The best local restaurants at your fingertips.</p>
|
|
<a href="restaurants.php" class="btn btn-primary">Browse Restaurants</a>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<section id="how-it-works" class="container section">
|
|
<h2>How It Works</h2>
|
|
<div class="steps">
|
|
<div class="step">
|
|
<i data-feather="map-pin"></i>
|
|
<h3>1. Discover</h3>
|
|
<p>Browse menus from the best local restaurants.</p>
|
|
</div>
|
|
<div class="step">
|
|
<i data-feather="shopping-cart"></i>
|
|
<h3>2. Order</h3>
|
|
<p>Select your favorite dishes and place your order in seconds.</p>
|
|
</div>
|
|
<div class="step">
|
|
<i data-feather="gift"></i>
|
|
<h3>3. Enjoy</h3>
|
|
<p>Get your food delivered hot and fresh to your doorstep.</p>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<section id="contact" class="section-alt">
|
|
<div class="container">
|
|
<h2>Contact Us</h2>
|
|
<div class="contact-content">
|
|
<p>Have a question or feedback? Get in touch with us!</p>
|
|
<form id="contactForm" class="contact-form">
|
|
<div class="form-group">
|
|
<input type="text" id="name" name="name" required placeholder="Your Name">
|
|
</div>
|
|
<div class="form-group">
|
|
<input type="email" id="email" name="email" required placeholder="Your Email">
|
|
</div>
|
|
<div class="form-group">
|
|
<textarea id="message" name="message" rows="5" required placeholder="Your Message"></textarea>
|
|
</div>
|
|
<button type="submit" class="btn btn-primary">Send Message</button>
|
|
</form>
|
|
<div id="form-message"></div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</main>
|
|
|
|
<footer>
|
|
<div class="container">
|
|
<p>© 2025 MajuroEats. All Rights Reserved.</p>
|
|
</div>
|
|
</footer>
|
|
|
|
<script src="assets/js/main.js?v=<?php echo time(); ?>"></script>
|
|
<script>
|
|
feather.replace();
|
|
|
|
document.getElementById('contactForm').addEventListener('submit', function(e) {
|
|
e.preventDefault();
|
|
const form = e.target;
|
|
const messageDiv = document.getElementById('form-message');
|
|
const formData = new FormData(form);
|
|
|
|
fetch('mail/contact_form_handler.php', {
|
|
method: 'POST',
|
|
body: formData
|
|
})
|
|
.then(response => response.json())
|
|
.then(data => {
|
|
if (data.success) {
|
|
messageDiv.className = 'form-message success';
|
|
messageDiv.textContent = 'Thank you for your message! We will get back to you shortly.';
|
|
form.reset();
|
|
} else {
|
|
messageDiv.className = 'form-message error';
|
|
messageDiv.textContent = 'An error occurred: ' + (data.error || 'Please try again.');
|
|
}
|
|
})
|
|
.catch(error => {
|
|
messageDiv.className = 'form-message error';
|
|
messageDiv.textContent = 'A network error occurred. Please try again later.';
|
|
console.error('Error:', error);
|
|
});
|
|
});
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|