38703-vm/index.php
Flatlogic Bot 4f8d01cddc sadiq
2026-02-23 11:06:46 +00:00

126 lines
7.8 KiB
PHP

<?php
require_once __DIR__ . '/includes/header.php';
$pdo = db();
// Get hot deals
$hotDeals = $pdo->query("SELECT c.*, ci.image_path FROM cars c LEFT JOIN car_images ci ON c.id = ci.car_id AND ci.is_main = 1 WHERE c.is_hot_deal = 1 AND c.status = 'approved' LIMIT 6")->fetchAll();
$testimonials = [
[
'name' => 'Ahmad Wali',
'city' => 'Kabul',
'text' => 'Found my dream Land Cruiser here. The process was smooth and the seller was very professional. Highly recommended for premium cars in Afghanistan!',
'rating' => 5
],
[
'name' => 'Mariam Sadat',
'city' => 'Herat',
'text' => 'As a first-time car buyer, I felt very safe using AfgCars. The verified listings give me peace of mind. Excellent service!',
'rating' => 5
],
[
'name' => 'Zubair Khan',
'city' => 'Mazar-i-Sharif',
'text' => 'The best marketplace in the country. Clean interface and very easy to contact sellers. Sold my Corolla within 3 days!',
'rating' => 4
]
];
?>
<section class="hero" style="background: linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.85)), url('assets/images/hero-home.jpg') center/cover no-repeat fixed;">
<div style="z-index: 2; position: relative;">
<h1 style="color: #ffffff; font-size: 5rem; font-weight: 900; letter-spacing: -2px;">Find Your Premium Ride</h1>
<p style="color: var(--text-secondary); font-size: 1.4rem; max-width: 700px; margin: 0 auto 3rem;">Exclusive luxury vehicles and reliable everyday cars in Afghanistan's most trusted marketplace.</p>
<div style="display: flex; gap: 1.5rem; justify-content: center;">
<a href="cars.php" class="btn btn-primary">View Marketplace</a>
<?php if (!isset($_SESSION['user_id'])): ?>
<a href="register.php" class="btn btn-outline">Start Selling</a>
<?php else: ?>
<a href="dashboard.php" class="btn btn-outline">My Account</a>
<?php endif; ?>
</div>
</div>
</section>
<div class="container" style="margin-top: 5rem; margin-bottom: 5rem;">
<h2 style="font-size: 3rem; font-weight: 900; margin-bottom: 3rem; text-align: center; color: #fff;">Hot Deals</h2>
<div class="grid grid-3">
<?php foreach ($hotDeals as $car): ?>
<div class="card">
<div class="car-img-container" style="overflow: hidden; height: 240px; border-bottom: 1px solid var(--glass-border);">
<img src="<?= htmlspecialchars($car['image_path'] ?: 'assets/images/placeholder-car.jpg') ?>" style="width: 100%; height: 100%; object-fit: cover;">
</div>
<div class="card-content">
<div style="display: flex; gap: 1rem; color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 1rem; font-weight: 600;">
<span>📅 <?= htmlspecialchars($car['year']) ?></span>
<span>📍 <?= htmlspecialchars($car['city']) ?></span>
</div>
<h3 style="margin-bottom: 1.5rem; font-size: 1.5rem; font-weight: 800; color: #fff;"><?= htmlspecialchars($car['brand'] . ' ' . $car['model']) ?></h3>
<div style="display: flex; justify-content: space-between; align-items: center;">
<div style="font-size: 1.5rem; font-weight: 900; color: var(--primary-color);">$<?= number_format($car['price']) ?></div>
<a href="car_detail.php?id=<?= $car['id'] ?>" class="btn btn-outline btn-sm">View Details</a>
</div>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
<section style="background: var(--card-bg); padding: 8rem 0; border-top: 1px solid var(--glass-border); border-bottom: 1px solid var(--glass-border);">
<div class="container">
<h2 style="font-size: 3rem; font-weight: 900; margin-bottom: 4rem; text-align: center; color: #fff;">What Our Clients Say</h2>
<div class="grid grid-3">
<?php foreach ($testimonials as $t): ?>
<div class="box" style="padding: 3rem; background: var(--bg-color);">
<div class="review-stars" style="color: var(--primary-color); margin-bottom: 1.5rem; font-size: 1.5rem;">
<?php for($i=0; $i<$t['rating']; $i++) echo '★'; ?>
</div>
<p style="font-style: italic; color: var(--text-secondary); line-height: 1.8; margin-bottom: 2rem; font-size: 1.1rem;">"<?= htmlspecialchars($t['text']) ?>"</p>
<div class="review-author" style="display: flex; align-items: center; gap: 1rem;">
<div style="width: 50px; height: 50px; background: var(--primary-color); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #000;">
<?= substr($t['name'], 0, 1) ?>
</div>
<div>
<h4 style="margin: 0; font-size: 1.1rem; font-weight: 700; color: #fff;"><?= htmlspecialchars($t['name']) ?></h4>
<p style="margin: 0; font-size: 0.85rem; color: var(--text-secondary);"><?= htmlspecialchars($t['city']) ?></p>
</div>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
</section>
<div class="container" style="padding: 8rem 0;">
<h2 style="font-size: 3rem; font-weight: 900; margin-bottom: 4rem; text-align: center; color: #fff;">Our Physical Showrooms</h2>
<div class="grid grid-3">
<div class="box" style="text-align: center; padding: 4rem 2rem;">
<div style="font-size: 4rem; margin-bottom: 2rem;">📍</div>
<h3 style="font-size: 1.5rem; font-weight: 800; margin-bottom: 1rem; color: #fff;">Kabul HQ</h3>
<p style="color: var(--text-secondary); margin-bottom: 1.5rem;">Wazir Akbar Khan, Street 15</p>
<p style="font-weight: 800; color: var(--primary-color); font-size: 1.25rem;">+93 700 123 456</p>
</div>
<div class="box" style="text-align: center; padding: 4rem 2rem;">
<div style="font-size: 4rem; margin-bottom: 2rem;">📍</div>
<h3 style="font-size: 1.5rem; font-weight: 800; margin-bottom: 1rem; color: #fff;">Herat Branch</h3>
<p style="color: var(--text-secondary); margin-bottom: 1.5rem;">Jada-e-Main, Near Blue Mosque</p>
<p style="font-weight: 800; color: var(--primary-color); font-size: 1.25rem;">+93 700 987 654</p>
</div>
<div class="box" style="text-align: center; padding: 4rem 2rem;">
<div style="font-size: 4rem; margin-bottom: 2rem;">📍</div>
<h3 style="font-size: 1.5rem; font-weight: 800; margin-bottom: 1rem; color: #fff;">Mazar-i-Sharif</h3>
<p style="color: var(--text-secondary); margin-bottom: 1.5rem;">Balkh Gate Road</p>
<p style="font-weight: 800; color: var(--primary-color); font-size: 1.25rem;">+93 700 456 789</p>
</div>
</div>
</div>
<div class="container" style="text-align: center; margin-bottom: 8rem;">
<div class="box" style="padding: 8rem 4rem; background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(30, 41, 59, 0.5));">
<h2 style="font-size: 3.5rem; margin-bottom: 2rem; font-weight: 900; color: #fff;">Ready to sell your car?</h2>
<p style="color: var(--text-secondary); margin-bottom: 4rem; max-width: 700px; margin-left: auto; margin-right: auto; font-size: 1.2rem; line-height: 1.8;">Join thousands of Afghans who have successfully sold their vehicles through our platform. No hidden fees, just results.</p>
<a href="register.php" class="btn btn-primary" style="padding: 1.5rem 4rem; font-size: 1.1rem;">Start Listing Now</a>
</div>
</div>
<?php require_once __DIR__ . '/includes/footer.php'; ?>