sadiq
This commit is contained in:
parent
4f8d01cddc
commit
bde9c05daa
90
about.php
90
about.php
@ -2,72 +2,76 @@
|
||||
require_once __DIR__ . '/includes/header.php';
|
||||
?>
|
||||
|
||||
<section class="hero" style="height: 40vh; background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('assets/images/about-hero.jpg') center/cover no-repeat;">
|
||||
<h1>About AfgCars</h1>
|
||||
<p>Afghanistan's Premier Marketplace for Luxury & Reliable Vehicles.</p>
|
||||
<section class="hero" style="height: 50vh; background: linear-gradient(rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.8)), url('assets/images/about-hero.jpg') center/cover no-repeat fixed;">
|
||||
<h1 class="fw-black" style="font-size: 5rem; letter-spacing: -3px; color: #fff;">Our Legacy</h1>
|
||||
<p class="text-secondary fw-bold" style="font-size: 1.3rem; max-width: 700px; margin-left: auto; margin-right: auto;">The definitive portal for elite automotive excellence in Afghanistan.</p>
|
||||
</section>
|
||||
|
||||
<div class="container">
|
||||
<div class="grid" style="grid-template-columns: 1fr 1fr; align-items: center; gap: 4rem;">
|
||||
<div class="glass" style="padding: 2.5rem;">
|
||||
<h2 style="color: var(--primary-color); margin-bottom: 1.5rem;">Our Mission</h2>
|
||||
<p style="margin-bottom: 1rem; color: var(--text-secondary);">
|
||||
Founded in 2026, AfgCars aims to revolutionize the automotive industry in Afghanistan by providing a safe, transparent, and efficient platform for buying and selling premium vehicles.
|
||||
<div class="container" style="padding: 10rem 0;">
|
||||
<div class="grid" style="grid-template-columns: 1fr 1fr; align-items: center; gap: 6rem;">
|
||||
<div class="glass" style="padding: 4rem; border-top: 5px solid var(--primary-color);">
|
||||
<h2 class="fw-black mb-2 text-gold" style="font-size: 2.5rem; text-transform: uppercase; letter-spacing: 2px;">Our Strategic Mission</h2>
|
||||
<p class="text-secondary mb-2 fw-bold" style="font-size: 1.2rem; line-height: 2;">
|
||||
Established in 2026, AfgCars has redefined the standards of the Afghan automotive industry. Our platform is engineered to deliver absolute transparency, unparalleled security, and an elite trading experience for the nation's most discerning car enthusiasts.
|
||||
</p>
|
||||
<p style="color: var(--text-secondary);">
|
||||
We bridge the gap between high-end luxury and everyday reliability, ensuring that every citizen has access to the best automotive options with verified seller information and comprehensive vehicle details.
|
||||
<p class="text-secondary fw-bold" style="font-size: 1.15rem; line-height: 2;">
|
||||
We bridge the critical gap between high-end global automotive luxury and the dynamic local Afghan market, ensuring every transaction is verified and every vehicle is an asset.
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<img src="assets/images/about-team.jpg" alt="Team" style="width: 100%; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.5);">
|
||||
<div style="position: relative;">
|
||||
<img src="assets/images/about-team.jpg" alt="Team" class="w-full" style="border-radius: 32px; box-shadow: 0 30px 60px rgba(0,0,0,0.5); border: 1px solid var(--glass-border);">
|
||||
<div style="position: absolute; bottom: -30px; right: -30px; background: var(--primary-color); padding: 2.5rem; border-radius: 20px; color: #000; box-shadow: 0 20px 40px rgba(0,0,0,0.3);">
|
||||
<h3 class="fw-black" style="font-size: 1.5rem;">EST. 2026</h3>
|
||||
<p class="fw-bold text-sm">Founded in Kabul</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<h2 class="section-title">Our Physical Locations</h2>
|
||||
<div class="grid">
|
||||
<div class="glass" style="padding: 2rem; text-align: center;">
|
||||
<h3 style="color: var(--primary-color); margin-bottom: 1rem;">Kabul Main Showroom</h3>
|
||||
<p style="color: var(--text-secondary);">Wazir Akbar Khan, Street 15</p>
|
||||
<p style="color: var(--text-secondary);">Kabul, Afghanistan</p>
|
||||
<p style="color: var(--text-primary); margin-top: 1rem;">+93 700 123 456</p>
|
||||
<div class="container" style="padding: 8rem 0;">
|
||||
<h2 class="section-title justify-center mb-4" style="font-size: 3.5rem;">Our National Network</h2>
|
||||
<div class="grid grid-3 mt-3">
|
||||
<div class="glass text-center" style="padding: 4rem 2rem;">
|
||||
<h3 class="fw-black text-gold mb-1" style="font-size: 1.6rem; text-transform: uppercase;">Kabul Main Experience</h3>
|
||||
<p class="text-secondary fw-bold">Wazir Akbar Khan, District 10</p>
|
||||
<p class="text-secondary fw-bold">Kabul, Afghanistan</p>
|
||||
<p class="fw-black mt-2" style="font-size: 1.3rem; color: #fff;">+93 700 123 456</p>
|
||||
</div>
|
||||
<div class="glass" style="padding: 2rem; text-align: center;">
|
||||
<h3 style="color: var(--primary-color); margin-bottom: 1rem;">Herat Branch</h3>
|
||||
<p style="color: var(--text-secondary);">Jada-e-Main, Near Blue Mosque</p>
|
||||
<p style="color: var(--text-secondary);">Herat, Afghanistan</p>
|
||||
<p style="color: var(--text-primary); margin-top: 1rem;">+93 700 987 654</p>
|
||||
<div class="glass text-center" style="padding: 4rem 2rem;">
|
||||
<h3 class="fw-black text-gold mb-1" style="font-size: 1.6rem; text-transform: uppercase;">Herat Elite Branch</h3>
|
||||
<p class="text-secondary fw-bold">Jada-e-Main, Near Blue Mosque</p>
|
||||
<p class="text-secondary fw-bold">Herat, Afghanistan</p>
|
||||
<p class="fw-black mt-2" style="font-size: 1.3rem; color: #fff;">+93 700 987 654</p>
|
||||
</div>
|
||||
<div class="glass" style="padding: 2rem; text-align: center;">
|
||||
<h3 style="color: var(--primary-color); margin-bottom: 1rem;">Mazar-i-Sharif Office</h3>
|
||||
<p style="color: var(--text-secondary);">Balkh Gate Road</p>
|
||||
<p style="color: var(--text-secondary);">Mazar-i-Sharif, Afghanistan</p>
|
||||
<p style="color: var(--text-primary); margin-top: 1rem;">+93 700 456 789</p>
|
||||
<div class="glass text-center" style="padding: 4rem 2rem;">
|
||||
<h3 class="fw-black text-gold mb-1" style="font-size: 1.6rem; text-transform: uppercase;">Mazar-i-Sharif Luxury</h3>
|
||||
<p class="text-secondary fw-bold">Balkh Gate National Road</p>
|
||||
<p class="text-secondary fw-bold">Mazar-i-Sharif, Afghanistan</p>
|
||||
<p class="fw-black mt-2" style="font-size: 1.3rem; color: #fff;">+93 700 456 789</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container" style="text-align: center; background: rgba(212, 175, 55, 0.05); padding: 5rem 5%;">
|
||||
<h2 style="margin-bottom: 2rem;">Why trust us?</h2>
|
||||
<div class="grid" style="grid-template-columns: repeat(4, 1fr);">
|
||||
<div class="container" style="text-align: center; background: rgba(30, 41, 59, 0.4); padding: 10rem 6%; border-radius: 48px; margin-bottom: 8rem;">
|
||||
<h2 class="fw-black mb-4" style="font-size: 3.5rem; color: #fff;">Unrivaled Standards</h2>
|
||||
<div class="grid grid-4 mt-3">
|
||||
<div>
|
||||
<h1 style="color: var(--primary-color);">500+</h1>
|
||||
<p style="color: var(--text-secondary);">Premium Cars Sold</p>
|
||||
<h1 class="text-gold fw-black" style="font-size: 5rem; line-height: 1;">800+</h1>
|
||||
<p class="text-secondary fw-bold" style="font-size: 1.1rem; text-transform: uppercase; letter-spacing: 2px;">Premium Sales</p>
|
||||
</div>
|
||||
<div>
|
||||
<h1 style="color: var(--primary-color);">24/7</h1>
|
||||
<p style="color: var(--text-secondary);">Support Availability</p>
|
||||
<h1 class="text-gold fw-black" style="font-size: 5rem; line-height: 1;">24/7</h1>
|
||||
<p class="text-secondary fw-bold" style="font-size: 1.1rem; text-transform: uppercase; letter-spacing: 2px;">Concierge Access</p>
|
||||
</div>
|
||||
<div>
|
||||
<h1 style="color: var(--primary-color);">100%</h1>
|
||||
<p style="color: var(--text-secondary);">Verified Sellers</p>
|
||||
<h1 class="text-gold fw-black" style="font-size: 5rem; line-height: 1;">100%</h1>
|
||||
<p class="text-secondary fw-bold" style="font-size: 1.1rem; text-transform: uppercase; letter-spacing: 2px;">Verified Listings</p>
|
||||
</div>
|
||||
<div>
|
||||
<h1 style="color: var(--primary-color);">5</h1>
|
||||
<p style="color: var(--text-secondary);">Major Cities</p>
|
||||
<h1 class="text-gold fw-black" style="font-size: 5rem; line-height: 1;">08+</h1>
|
||||
<p class="text-secondary fw-bold" style="font-size: 1.1rem; text-transform: uppercase; letter-spacing: 2px;">National Hubs</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php require_once __DIR__ . '/includes/footer.php'; ?>
|
||||
<?php require_once __DIR__ . '/includes/footer.php'; ?>
|
||||
78
add_car.php
78
add_car.php
@ -79,51 +79,51 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
$cities = ['Kabul', 'Herat', 'Mazar-i-Sharif', 'Kandahar', 'Jalalabad', 'Kunduz', 'Ghazni', 'Balkh'];
|
||||
?>
|
||||
|
||||
<div class="container" style="max-width: 900px;">
|
||||
<div class="box" style="padding: 4rem;">
|
||||
<h1 style="margin-bottom: 1rem; font-size: 2.5rem; font-weight: 900;">List Your Vehicle</h1>
|
||||
<p style="color: var(--text-secondary); margin-bottom: 3rem;">Provide details about your car and yourself. Our team will review and approve your listing.</p>
|
||||
<div class="container" style="max-width: 1000px; padding: 4rem 0;">
|
||||
<div class="box" style="padding: 4.5rem;">
|
||||
<h1 class="fw-black mb-1" style="font-size: 3rem; color: #fff;">List Your Vehicle</h1>
|
||||
<p class="text-secondary mb-3" style="font-size: 1.15rem; font-weight: 500;">Provide all details about your car and yourself. Our team will review and approve your listing shortly.</p>
|
||||
|
||||
<?php if ($success): ?>
|
||||
<div class="glass" style="padding: 2rem; border-color: var(--success); background: rgba(46, 213, 115, 0.05); color: var(--success); margin-bottom: 3rem; text-align: center; border-radius: 16px;">
|
||||
<h3 style="margin-bottom: 0.5rem;">🎉 Listing Submitted!</h3>
|
||||
<p>Your car and seller information have been sent for approval. You can track its status in your dashboard.</p>
|
||||
<div style="margin-top: 1.5rem;">
|
||||
<a href="dashboard.php" class="btn btn-primary btn-sm">Go to Dashboard</a>
|
||||
<div class="glass text-center" style="padding: 3rem; border-color: var(--success); background: rgba(46, 213, 115, 0.05); color: var(--success); margin-bottom: 4rem; border-radius: 24px;">
|
||||
<h3 class="fw-black mb-1" style="font-size: 2rem;">🎉 Listing Successfully Submitted!</h3>
|
||||
<p class="text-secondary mb-2" style="font-size: 1.1rem; font-weight: 700;">Your vehicle and seller documentation are now under review. Check your dashboard for status updates.</p>
|
||||
<div class="mt-2">
|
||||
<a href="dashboard.php" class="btn btn-primary btn-lg">Return to My Dashboard</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($error): ?>
|
||||
<div class="alert alert-error" style="margin-bottom: 2rem;"><?= $error ?></div>
|
||||
<div class="alert alert-error mb-2"><?= $error ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<form method="POST" enctype="multipart/form-data">
|
||||
<h3 style="margin-bottom: 1.5rem; color: var(--primary-color);">1. Vehicle Details</h3>
|
||||
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;">
|
||||
<h3 class="fw-black text-gold mb-2" style="font-size: 1.3rem; text-transform: uppercase; letter-spacing: 1px;">1. Vehicle Details</h3>
|
||||
<div class="grid grid-2 mb-2">
|
||||
<div class="form-group">
|
||||
<label>Brand</label>
|
||||
<label>Vehicle Brand</label>
|
||||
<input type="text" name="brand" class="form-control" required placeholder="e.g. Toyota">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Model</label>
|
||||
<label>Vehicle Model</label>
|
||||
<input type="text" name="model" class="form-control" required placeholder="e.g. Land Cruiser">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;">
|
||||
<div class="grid grid-2 mb-2">
|
||||
<div class="form-group">
|
||||
<label>Year</label>
|
||||
<label>Manufacturing Year</label>
|
||||
<input type="number" name="year" class="form-control" required placeholder="2024" min="1990" max="<?= date('Y') + 1 ?>">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Price (USD)</label>
|
||||
<label>Asking Price (USD)</label>
|
||||
<input type="number" name="price" class="form-control" required placeholder="55000">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>City</label>
|
||||
<label>Current City Location</label>
|
||||
<select name="city" class="form-control" required>
|
||||
<?php foreach ($cities as $c): ?>
|
||||
<option value="<?= $c ?>"><?= $c ?></option>
|
||||
@ -132,42 +132,42 @@ $cities = ['Kabul', 'Herat', 'Mazar-i-Sharif', 'Kandahar', 'Jalalabad', 'Kunduz'
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Vehicle Photo</label>
|
||||
<div class="glass" style="padding: 2rem; text-align: center; border: 2px dashed var(--glass-border); border-radius: 12px;">
|
||||
<label>Vehicle Photography</label>
|
||||
<div class="glass text-center" style="padding: 3rem; border: 3px dashed var(--glass-border); border-radius: 20px; background: rgba(0,0,0,0.1);">
|
||||
<input type="file" name="car_image" id="car_image" style="display: none;" accept="image/*">
|
||||
<label for="car_image" style="cursor: pointer;">
|
||||
<div style="font-size: 2.5rem; margin-bottom: 1rem;">📸</div>
|
||||
<div style="font-weight: 700; color: var(--primary-color);">Click to upload photo</div>
|
||||
<div style="font-size: 0.85rem; color: var(--text-secondary); margin-top: 0.5rem;">JPG, PNG or WEBP (Max 5MB)</div>
|
||||
<label for="car_image" style="cursor: pointer; display: block;">
|
||||
<div style="font-size: 3.5rem; margin-bottom: 1.5rem; filter: drop-shadow(0 5px 15px rgba(0,0,0,0.3));">📸</div>
|
||||
<div class="fw-black text-gold" style="font-size: 1.2rem; text-transform: uppercase; letter-spacing: 1px;">Click to Choose Image</div>
|
||||
<div class="text-secondary text-sm mt-1 fw-bold">Professional quality JPG, PNG or WEBP recommended (Max 5MB)</div>
|
||||
</label>
|
||||
<div id="file-name" style="margin-top: 1rem; font-weight: 600; color: var(--success); display: none;"></div>
|
||||
<div id="file-name" class="mt-2 fw-black" style="color: var(--success); font-size: 1rem; display: none;"></div>
|
||||
</div>
|
||||
<div style="margin-top: 1rem;">
|
||||
<label>Or Image URL</label>
|
||||
<input type="url" name="image_url" class="form-control" placeholder="https://example.com/car.jpg">
|
||||
<div class="mt-2">
|
||||
<label>Or Provide External Image URL</label>
|
||||
<input type="url" name="image_url" class="form-control" placeholder="https://example.com/premium-car-image.jpg">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Description</label>
|
||||
<textarea name="description" class="form-control" rows="4" required placeholder="Describe the condition, features..."></textarea>
|
||||
<label>Vehicle Description & Special Features</label>
|
||||
<textarea name="description" class="form-control" rows="5" required placeholder="Enter all details about current condition, special features, and maintenance history..."></textarea>
|
||||
</div>
|
||||
|
||||
<hr style="margin: 3rem 0; border: 0; border-top: 1px solid var(--glass-border);">
|
||||
<hr style="margin: 4rem 0; border: 0; border-top: 1px solid var(--glass-border);">
|
||||
|
||||
<h3 style="margin-bottom: 1.5rem; color: var(--primary-color);">2. Seller Information</h3>
|
||||
<h3 class="fw-black text-gold mb-2" style="font-size: 1.3rem; text-transform: uppercase; letter-spacing: 1px;">2. Verified Seller Documentation</h3>
|
||||
<div class="form-group">
|
||||
<label>Phone Number</label>
|
||||
<label>Verified Phone Number</label>
|
||||
<input type="text" name="phone" class="form-control" required placeholder="+93 7xx xxx xxx" value="<?= htmlspecialchars($user_info['phone'] ?? '') ?>">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Location/Address</label>
|
||||
<textarea name="address" class="form-control" rows="2" required placeholder="Detailed address for vehicle inspection..."><?= htmlspecialchars($user_info['address'] ?? '') ?></textarea>
|
||||
<label>Detailed Residential Address / Location</label>
|
||||
<textarea name="address" class="form-control" rows="2" required placeholder="Enter your full residential address for identity verification and inspection arrangements..."><?= htmlspecialchars($user_info['address'] ?? '') ?></textarea>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 3rem; display: flex; gap: 1.5rem;">
|
||||
<button type="submit" class="btn btn-primary" style="flex: 2; padding: 1.2rem; font-size: 1.1rem; font-weight: 700;">Submit for Approval</button>
|
||||
<a href="dashboard.php" class="btn btn-outline" style="flex: 1; text-align: center; padding: 1.2rem;">Cancel</a>
|
||||
<div class="mt-3 flex gap-1 align-center">
|
||||
<button type="submit" class="btn btn-primary btn-lg" style="flex: 2; font-weight: 900; letter-spacing: 1px;">SUBMIT VEHICLE FOR APPROVAL</button>
|
||||
<a href="dashboard.php" class="btn btn-outline btn-lg" style="flex: 1; font-weight: 700;">CANCEL</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@ -177,7 +177,7 @@ $cities = ['Kabul', 'Herat', 'Mazar-i-Sharif', 'Kandahar', 'Jalalabad', 'Kunduz'
|
||||
document.getElementById('car_image').onchange = function() {
|
||||
if (this.files && this.files[0]) {
|
||||
const fileName = document.getElementById('file-name');
|
||||
fileName.textContent = 'Selected: ' + this.files[0].name;
|
||||
fileName.textContent = '✅ Selected File: ' + this.files[0].name;
|
||||
fileName.style.display = 'block';
|
||||
}
|
||||
};
|
||||
|
||||
188
admin_cars.php
188
admin_cars.php
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/includes/header.php';
|
||||
session_start();
|
||||
require_once __DIR__ . '/db/config.php';
|
||||
|
||||
if (!isset($_SESSION['role']) || $_SESSION['role'] !== 'admin') {
|
||||
header('Location: index.php');
|
||||
if (!isset($_SESSION['user_id']) || ($_SESSION['role'] ?? '') !== 'admin') {
|
||||
header('Location: login.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
@ -39,81 +40,110 @@ $stmt = $pdo->query("
|
||||
");
|
||||
$cars = $stmt->fetchAll();
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Manage Inventory | Admin</title>
|
||||
<link rel="stylesheet" href="assets/css/fonts.css">
|
||||
<link rel="stylesheet" href="assets/css/style.css?v=<?= time() ?>">
|
||||
</head>
|
||||
<body>
|
||||
<div class="dashboard-container">
|
||||
<!-- Sidebar -->
|
||||
<aside class="sidebar">
|
||||
<a href="index.php" class="sidebar-brand">AFGCARS</a>
|
||||
<ul class="sidebar-menu">
|
||||
<li><a href="admin_dashboard.php"><span>Dashboard</span></a></li>
|
||||
<li><a href="admin_cars.php" class="active"><span>Manage Cars</span></a></li>
|
||||
<li><a href="admin_purchases.php"><span>Purchase Requests</span></a></li>
|
||||
<li><a href="admin_users.php"><span>Users</span></a></li>
|
||||
<li><a href="admin_messages.php"><span>Messages</span></a></li>
|
||||
</ul>
|
||||
<div class="sidebar-footer">
|
||||
<a href="logout.php" class="btn btn-danger btn-sm" style="width: 100%;">Logout</a>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
<div class="container-fluid" style="padding: 2rem 4rem;">
|
||||
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 3rem;">
|
||||
<div>
|
||||
<h1 style="font-size: 2.5rem; font-weight: 900; margin-bottom: 0.5rem;">Inventory Management</h1>
|
||||
<p style="color: var(--text-secondary);">Review and approve vehicle listings from sellers.</p>
|
||||
</div>
|
||||
<div style="display: flex; gap: 1rem;">
|
||||
<a href="admin_purchases.php" class="btn btn-primary">View Purchase Requests</a>
|
||||
<a href="admin_dashboard.php" class="btn btn-outline">Back to Dashboard</a>
|
||||
</div>
|
||||
<!-- Main Content -->
|
||||
<main class="main-content">
|
||||
<header class="mb-3" style="display: flex; justify-content: space-between; align-items: center;">
|
||||
<div>
|
||||
<h1 class="fw-bold" style="font-size: 2.5rem;">Inventory Management</h1>
|
||||
<p class="text-secondary">Review, approve, and manage all vehicle listings across the platform.</p>
|
||||
</div>
|
||||
<div class="nav-actions">
|
||||
<a href="admin_purchases.php" class="btn btn-primary">Purchase Requests</a>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<?php if ($message): ?>
|
||||
<div class="alert alert-success">
|
||||
<span class="text-gold">✓</span> <?= $message ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="glass" style="padding: 2.5rem;">
|
||||
<div class="table-container">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Vehicle Details</th>
|
||||
<th>Seller Info</th>
|
||||
<th>Price & City</th>
|
||||
<th>Status</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($cars as $car): ?>
|
||||
<tr>
|
||||
<td>
|
||||
<div style="display: flex; align-items: center; gap: 1.2rem;">
|
||||
<img src="<?= htmlspecialchars($car['image_path'] ?: 'assets/images/placeholder-car.jpg') ?>" style="width: 110px; height: 70px; object-fit: cover; border-radius: 12px; border: 1px solid var(--glass-border);">
|
||||
<div>
|
||||
<div class="fw-bold"><?= htmlspecialchars($car['brand'] . ' ' . $car['model']) ?></div>
|
||||
<div class="text-sm text-secondary"><?= $car['year'] ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="fw-bold text-sm"><?= htmlspecialchars($car['seller_name']) ?></div>
|
||||
<div class="text-sm text-secondary"><?= htmlspecialchars($car['seller_phone']) ?></div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="text-gold fw-bold">$<?= number_format($car['price']) ?></div>
|
||||
<div class="text-sm text-secondary"><?= htmlspecialchars($car['city']) ?></div>
|
||||
</td>
|
||||
<td>
|
||||
<span class="badge badge-<?= $car['status'] === 'approved' ? 'success' : ($car['status'] === 'sold' ? 'info' : ($car['status'] === 'rejected' ? 'danger' : 'warning')) ?>">
|
||||
<?= ucfirst($car['status']) ?>
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<div style="display: flex; gap: 1rem; align-items: center;">
|
||||
<?php if ($car['status'] === 'pending'): ?>
|
||||
<form method="POST" style="display: inline;">
|
||||
<input type="hidden" name="car_id" value="<?= $car['id'] ?>">
|
||||
<button type="submit" name="action" value="approve" class="text-gold text-sm fw-bold btn-sm" style="background: none; border: none; cursor: pointer; padding: 0;">Approve</button>
|
||||
</form>
|
||||
<form method="POST" style="display: inline;">
|
||||
<input type="hidden" name="car_id" value="<?= $car['id'] ?>">
|
||||
<button type="submit" name="action" value="reject" class="text-sm fw-bold btn-sm" style="background: none; border: none; cursor: pointer; padding: 0; color: var(--danger);">Reject</button>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
<a href="edit_car.php?id=<?= $car['id'] ?>" class="text-sm fw-bold text-secondary" style="text-decoration: none;">Edit</a>
|
||||
<a href="?delete=<?= $car['id'] ?>" class="text-sm fw-bold" style="color: var(--danger); text-decoration: none;" onclick="return confirm('Delete this vehicle?')">Delete</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<?php if ($message): ?>
|
||||
<div class="glass" style="padding: 1rem; margin-bottom: 2rem; border-color: var(--primary-color); color: var(--primary-color); font-weight: 600;">
|
||||
<?= $message ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="glass" style="overflow-x: auto; padding: 0;">
|
||||
<table style="width: 100%; border-collapse: collapse; text-align: left;">
|
||||
<thead>
|
||||
<tr style="background: rgba(0,0,0,0.05);">
|
||||
<th style="padding: 1.5rem;">Vehicle</th>
|
||||
<th style="padding: 1.5rem;">Seller</th>
|
||||
<th style="padding: 1.5rem;">Price</th>
|
||||
<th style="padding: 1.5rem;">Location</th>
|
||||
<th style="padding: 1.5rem;">Status</th>
|
||||
<th style="padding: 1.5rem;">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($cars as $car): ?>
|
||||
<tr style="border-bottom: 1px solid var(--glass-border);">
|
||||
<td style="padding: 1.5rem;">
|
||||
<div style="display: flex; align-items: center; gap: 1rem;">
|
||||
<img src="<?= htmlspecialchars($car['image_path'] ?: 'assets/images/placeholder-car.jpg') ?>" style="width: 100px; height: 60px; object-fit: cover; border-radius: 8px;">
|
||||
<div>
|
||||
<div style="font-weight: 700;"><?= htmlspecialchars($car['brand'] . ' ' . $car['model']) ?></div>
|
||||
<div style="font-size: 0.8rem; color: var(--text-secondary);"><?= $car['year'] ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td style="padding: 1.5rem;">
|
||||
<div style="font-weight: 600;"><?= htmlspecialchars($car['seller_name']) ?></div>
|
||||
<div style="font-size: 0.85rem; color: var(--text-secondary);"><?= htmlspecialchars($car['seller_phone']) ?></div>
|
||||
</td>
|
||||
<td style="padding: 1.5rem; font-weight: 700;">$<?= number_format($car['price']) ?></td>
|
||||
<td style="padding: 1.5rem; color: var(--text-secondary);"><?= htmlspecialchars($car['city']) ?></td>
|
||||
<td style="padding: 1.5rem;">
|
||||
<span class="badge" style="background: <?= $car['status'] === 'approved' ? 'var(--success)' : ($car['status'] === 'sold' ? '#000' : ($car['status'] === 'rejected' ? 'var(--danger)' : 'var(--primary-color)')) ?>; color: white; padding: 0.3rem 0.8rem; border-radius: 20px; font-size: 0.75rem; text-transform: uppercase;">
|
||||
<?= $car['status'] ?>
|
||||
</span>
|
||||
</td>
|
||||
<td style="padding: 1.5rem;">
|
||||
<div style="display: flex; gap: 0.5rem;">
|
||||
<?php if ($car['status'] === 'pending'): ?>
|
||||
<form method="POST" style="display: inline;">
|
||||
<input type="hidden" name="car_id" value="<?= $car['id'] ?>">
|
||||
<button type="submit" name="action" value="approve" class="btn btn-primary" style="padding: 0.5rem 1rem; font-size: 0.8rem;">Approve</button>
|
||||
</form>
|
||||
<form method="POST" style="display: inline;">
|
||||
<input type="hidden" name="car_id" value="<?= $car['id'] ?>">
|
||||
<button type="submit" name="action" value="reject" class="btn btn-outline" style="padding: 0.5rem 1rem; font-size: 0.8rem; color: var(--danger); border-color: var(--danger);">Reject</button>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
<a href="edit_car.php?id=<?= $car['id'] ?>" class="btn btn-outline" style="padding: 0.5rem 1rem; font-size: 0.8rem;">Edit</a>
|
||||
<a href="?delete=<?= $car['id'] ?>" class="btn btn-outline" style="padding: 0.5rem 1rem; font-size: 0.8rem; color: var(--danger); border-color: var(--danger);" onclick="return confirm('Are you sure?')">Delete</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php require_once __DIR__ . '/includes/footer.php'; ?>
|
||||
</body>
|
||||
</html>
|
||||
@ -36,10 +36,10 @@ $recentMessages = $pdo->query("SELECT * FROM contact_messages ORDER BY created_a
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Admin Dashboard | AfgCars</title>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="assets/css/fonts.css">
|
||||
<link rel="stylesheet" href="assets/css/style.css?v=<?= time() ?>">
|
||||
</head>
|
||||
<body style="background: #050505;">
|
||||
<body>
|
||||
<div class="dashboard-container">
|
||||
<!-- Sidebar -->
|
||||
<aside class="sidebar">
|
||||
@ -52,19 +52,19 @@ $recentMessages = $pdo->query("SELECT * FROM contact_messages ORDER BY created_a
|
||||
<li><a href="admin_messages.php"><span>Messages</span></a></li>
|
||||
</ul>
|
||||
<div class="sidebar-footer">
|
||||
<a href="logout.php" style="color: var(--danger); font-size: 0.9rem; text-decoration: none; font-weight: 600;">Logout</a>
|
||||
<a href="logout.php" class="btn btn-danger btn-sm" style="width: 100%;">Logout</a>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
<!-- Main Content -->
|
||||
<main class="main-content">
|
||||
<header style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 3rem;">
|
||||
<header class="mb-3" style="display: flex; justify-content: space-between; align-items: center;">
|
||||
<div>
|
||||
<h1 style="font-size: 2rem; font-weight: 900;">Dashboard Overview</h1>
|
||||
<p style="color: var(--text-secondary);">Welcome back, <?= htmlspecialchars($_SESSION['user_name']) ?></p>
|
||||
<h1 class="fw-bold" style="font-size: 2.5rem;">Dashboard Overview</h1>
|
||||
<p class="text-secondary">Welcome back, <?= htmlspecialchars($_SESSION['user_name']) ?></p>
|
||||
</div>
|
||||
<div style="display: flex; gap: 1rem;">
|
||||
<a href="index.php" class="btn-auth">View Site</a>
|
||||
<div class="nav-actions">
|
||||
<a href="index.php" class="btn btn-outline">View Site</a>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
@ -88,21 +88,20 @@ $recentMessages = $pdo->query("SELECT * FROM contact_messages ORDER BY created_a
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="display: grid; grid-template-columns: 2fr 1fr; gap: 2rem;">
|
||||
<div class="grid grid-2">
|
||||
<!-- Recent Listings -->
|
||||
<div class="glass" style="padding: 2rem;">
|
||||
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem;">
|
||||
<h3 style="font-weight: 800;">Recent Car Listings</h3>
|
||||
<a href="admin_cars.php" style="color: var(--primary-color); text-decoration: none; font-size: 0.85rem; font-weight: 600;">View All</a>
|
||||
<div class="glass" style="padding: 2.5rem; grid-column: span 1;">
|
||||
<div class="mb-2" style="display: flex; justify-content: space-between; align-items: center;">
|
||||
<h3 class="fw-bold">Recent Car Listings</h3>
|
||||
<a href="admin_cars.php" class="text-gold text-sm fw-bold" style="text-decoration: none;">View All</a>
|
||||
</div>
|
||||
<div class="table-container" style="overflow-x: auto;">
|
||||
<table style="width: 100%;">
|
||||
<div class="table-container">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Car</th>
|
||||
<th>Owner</th>
|
||||
<th>Price</th>
|
||||
<th>Status</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -110,17 +109,12 @@ $recentMessages = $pdo->query("SELECT * FROM contact_messages ORDER BY created_a
|
||||
<?php foreach ($recentCars as $car): ?>
|
||||
<tr>
|
||||
<td>
|
||||
<div style="font-weight: 600;"><?= htmlspecialchars($car['brand'] . ' ' . $car['model']) ?></div>
|
||||
<div style="font-size: 0.8rem; color: var(--text-secondary);"><?= $car['year'] ?></div>
|
||||
<div class="fw-bold"><?= htmlspecialchars($car['brand'] . ' ' . $car['model']) ?></div>
|
||||
<div class="text-sm"><?= $car['year'] ?></div>
|
||||
</td>
|
||||
<td><?= htmlspecialchars($car['owner_name']) ?></td>
|
||||
<td style="color: var(--primary-color); font-weight: 700;">$<?= number_format($car['price']) ?></td>
|
||||
<td>
|
||||
<span class="badge badge-<?= $car['status'] === 'approved' ? 'success' : ($car['status'] === 'pending' ? 'warning' : 'danger') ?>">
|
||||
<?= ucfirst($car['status']) ?>
|
||||
</span>
|
||||
</td>
|
||||
<td><a href="car_detail.php?id=<?= $car['id'] ?>" style="color: var(--info); text-decoration: none; font-weight: 600; font-size: 0.85rem;">View</a></td>
|
||||
<td class="text-gold fw-bold">$<?= number_format($car['price']) ?></td>
|
||||
<td><a href="car_detail.php?id=<?= $car['id'] ?>" class="btn-auth text-sm" style="padding: 0.4rem 0.8rem;">View</a></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
@ -129,19 +123,22 @@ $recentMessages = $pdo->query("SELECT * FROM contact_messages ORDER BY created_a
|
||||
</div>
|
||||
|
||||
<!-- Recent Messages -->
|
||||
<div class="glass" style="padding: 2rem;">
|
||||
<h3 style="font-weight: 800; margin-bottom: 1.5rem;">Recent Messages</h3>
|
||||
<div class="glass" style="padding: 2.5rem;">
|
||||
<div class="mb-2" style="display: flex; justify-content: space-between; align-items: center;">
|
||||
<h3 class="fw-bold">Recent Messages</h3>
|
||||
<a href="admin_messages.php" class="text-gold text-sm fw-bold" style="text-decoration: none;">All Messages</a>
|
||||
</div>
|
||||
<?php if (empty($recentMessages)): ?>
|
||||
<p style="color: var(--text-secondary); font-size: 0.9rem;">No new messages.</p>
|
||||
<p class="text-secondary text-sm">No new messages.</p>
|
||||
<?php else: ?>
|
||||
<div style="display: flex; flex-direction: column; gap: 1.5rem;">
|
||||
<?php foreach ($recentMessages as $msg): ?>
|
||||
<div style="border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 1rem;">
|
||||
<div style="display: flex; justify-content: space-between; margin-bottom: 0.3rem;">
|
||||
<span style="font-weight: 700; font-size: 0.9rem;"><?= htmlspecialchars($msg['name']) ?></span>
|
||||
<span style="font-size: 0.7rem; color: var(--text-secondary);"><?= date('M d', strtotime($msg['created_at'])) ?></span>
|
||||
<span class="fw-bold text-sm"><?= htmlspecialchars($msg['name']) ?></span>
|
||||
<span class="text-sm text-secondary"><?= date('M d', strtotime($msg['created_at'])) ?></span>
|
||||
</div>
|
||||
<p style="font-size: 0.85rem; color: var(--text-secondary); line-height: 1.4;">
|
||||
<p class="text-sm text-secondary" style="line-height: 1.4;">
|
||||
<?= htmlspecialchars(substr($msg['message'] ?? '', 0, 80)) ?>...
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@ -12,7 +12,7 @@ $pdo = db();
|
||||
if (isset($_GET['action']) && isset($_GET['id'])) {
|
||||
$id = $_GET['id'];
|
||||
if ($_GET['action'] === 'read') {
|
||||
$pdo->prepare("UPDATE contact_messages SET status = 'read' WHERE id = ?")->execute([$id]);
|
||||
$pdo->prepare("UPDATE contact_messages SET status = 'read' WHERE id = ?")->execute([id]);
|
||||
} elseif ($_GET['action'] === 'delete') {
|
||||
$pdo->prepare("DELETE FROM contact_messages WHERE id = ?")->execute([$id]);
|
||||
}
|
||||
@ -28,10 +28,12 @@ $messages = $pdo->query("SELECT * FROM contact_messages ORDER BY created_at DESC
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Manage Messages | Admin</title>
|
||||
<link rel="stylesheet" href="assets/css/fonts.css">
|
||||
<link rel="stylesheet" href="assets/css/style.css?v=<?= time() ?>">
|
||||
</head>
|
||||
<body style="background: #050505;">
|
||||
<body>
|
||||
<div class="dashboard-container">
|
||||
<!-- Sidebar -->
|
||||
<aside class="sidebar">
|
||||
<a href="index.php" class="sidebar-brand">AFGCARS</a>
|
||||
<ul class="sidebar-menu">
|
||||
@ -42,40 +44,44 @@ $messages = $pdo->query("SELECT * FROM contact_messages ORDER BY created_at DESC
|
||||
<li><a href="admin_messages.php" class="active"><span>Messages</span></a></li>
|
||||
</ul>
|
||||
<div class="sidebar-footer">
|
||||
<a href="logout.php" style="color: var(--danger); font-size: 0.9rem; text-decoration: none; font-weight: 600;">Logout</a>
|
||||
<a href="logout.php" class="btn btn-danger btn-sm" style="width: 100%;">Logout</a>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
<!-- Main Content -->
|
||||
<main class="main-content">
|
||||
<h1 style="margin-bottom: 2rem; font-weight: 900;">Customer Inquiries</h1>
|
||||
<header class="mb-3">
|
||||
<h1 class="fw-bold" style="font-size: 2.5rem;">Customer Inquiries</h1>
|
||||
<p class="text-secondary">Review and respond to messages from marketplace users and visitors.</p>
|
||||
</header>
|
||||
|
||||
<div class="grid" style="grid-template-columns: 1fr;">
|
||||
<div class="grid" style="grid-template-columns: 1fr; gap: 2rem;">
|
||||
<?php if (empty($messages)): ?>
|
||||
<div class="glass" style="padding: 4rem; text-align: center;">
|
||||
<p style="color: var(--text-secondary);">No messages found.</p>
|
||||
<p class="text-secondary">No messages found.</p>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<?php foreach ($messages as $msg): ?>
|
||||
<div class="glass" style="padding: 2.5rem; border-left: 4px solid <?= $msg['status'] === 'unread' ? 'var(--primary-color)' : 'transparent' ?>;">
|
||||
<div style="display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.5rem;">
|
||||
<div class="glass" style="padding: 2.5rem; border-left: 5px solid <?= $msg['status'] === 'unread' ? 'var(--primary-color)' : 'transparent' ?>;">
|
||||
<div style="display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 2rem;">
|
||||
<div>
|
||||
<h3 style="margin-bottom: 0.3rem;"><?= htmlspecialchars($msg['subject']) ?></h3>
|
||||
<p style="font-size: 0.85rem; color: var(--text-secondary);">From: <strong><?= htmlspecialchars($msg['name']) ?></strong> (<?= htmlspecialchars($msg['email']) ?>)</p>
|
||||
<h3 class="fw-bold mb-1" style="font-size: 1.4rem;"><?= htmlspecialchars($msg['subject']) ?></h3>
|
||||
<p class="text-sm">From: <strong class="text-gold"><?= htmlspecialchars($msg['name']) ?></strong> <span class="text-secondary">(<?= htmlspecialchars($msg['email']) ?>)</span></p>
|
||||
</div>
|
||||
<div style="text-align: right;">
|
||||
<div style="font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 0.5rem;"><?= date('M d, Y H:i', strtotime($msg['created_at'])) ?></div>
|
||||
<div class="text-sm text-secondary mb-1" style="font-weight: 600;"><?= date('M d, Y H:i', strtotime($msg['created_at'])) ?></div>
|
||||
<span class="badge badge-<?= $msg['status'] === 'unread' ? 'warning' : 'success' ?>"><?= ucfirst($msg['status']) ?></span>
|
||||
</div>
|
||||
</div>
|
||||
<div style="background: rgba(255,255,255,0.02); padding: 2rem; border-radius: 12px; margin-bottom: 2rem; line-height: 1.8; color: var(--text-secondary);">
|
||||
<div class="mb-2" style="background: rgba(255,255,255,0.03); padding: 2rem; border-radius: 16px; line-height: 1.8; color: var(--text-secondary); font-size: 0.95rem;">
|
||||
<?= nl2br(htmlspecialchars($msg['message'])) ?>
|
||||
</div>
|
||||
<div style="display: flex; gap: 1rem;">
|
||||
<div style="display: flex; gap: 1.2rem;">
|
||||
<?php if ($msg['status'] === 'unread'): ?>
|
||||
<a href="admin_messages.php?action=read&id=<?= $msg['id'] ?>" class="btn-auth">Mark as Read</a>
|
||||
<a href="admin_messages.php?action=read&id=<?= $msg['id'] ?>" class="btn btn-primary btn-sm" style="padding: 0.8rem 1.5rem;">Mark as Read</a>
|
||||
<?php endif; ?>
|
||||
<a href="mailto:<?= $msg['email'] ?>" class="btn-auth" style="border-color: var(--primary-color); color: var(--primary-color);">Reply via Email</a>
|
||||
<a href="admin_messages.php?action=delete&id=<?= $msg['id'] ?>" onclick="return confirm('Delete this message?')" class="btn-auth" style="border-color: var(--danger); color: var(--danger);">Delete</a>
|
||||
<a href="mailto:<?= $msg['email'] ?>" class="btn btn-outline btn-sm" style="padding: 0.8rem 1.5rem; border-color: var(--primary-color); color: var(--primary-color);">Reply via Email</a>
|
||||
<a href="admin_messages.php?action=delete&id=<?= $msg['id'] ?>" onclick="return confirm('Delete this message?')" class="btn btn-outline btn-sm" style="padding: 0.8rem 1.5rem; border-color: var(--danger); color: var(--danger);">Delete Inquiry</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/includes/header.php';
|
||||
session_start();
|
||||
require_once __DIR__ . '/db/config.php';
|
||||
|
||||
if (!isset($_SESSION['role']) || $_SESSION['role'] !== 'admin') {
|
||||
header('Location: index.php');
|
||||
if (!isset($_SESSION['user_id']) || ($_SESSION['role'] ?? '') !== 'admin') {
|
||||
header('Location: login.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
@ -51,86 +52,116 @@ $stmt = $pdo->query("
|
||||
");
|
||||
$purchases = $stmt->fetchAll();
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Purchase Requests | Admin</title>
|
||||
<link rel="stylesheet" href="assets/css/fonts.css">
|
||||
<link rel="stylesheet" href="assets/css/style.css?v=<?= time() ?>">
|
||||
</head>
|
||||
<body>
|
||||
<div class="dashboard-container">
|
||||
<!-- Sidebar -->
|
||||
<aside class="sidebar">
|
||||
<a href="index.php" class="sidebar-brand">AFGCARS</a>
|
||||
<ul class="sidebar-menu">
|
||||
<li><a href="admin_dashboard.php"><span>Dashboard</span></a></li>
|
||||
<li><a href="admin_cars.php"><span>Manage Cars</span></a></li>
|
||||
<li><a href="admin_purchases.php" class="active"><span>Purchase Requests</span></a></li>
|
||||
<li><a href="admin_users.php"><span>Users</span></a></li>
|
||||
<li><a href="admin_messages.php"><span>Messages</span></a></li>
|
||||
</ul>
|
||||
<div class="sidebar-footer">
|
||||
<a href="logout.php" class="btn btn-danger btn-sm" style="width: 100%;">Logout</a>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
<div class="container-fluid" style="padding: 2rem 4rem;">
|
||||
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 3rem;">
|
||||
<div>
|
||||
<h1 style="font-size: 2.5rem; font-weight: 900; margin-bottom: 0.5rem;">Purchase Requests</h1>
|
||||
<p style="color: var(--text-secondary);">Review and manage buyer bank verification requests.</p>
|
||||
</div>
|
||||
<a href="admin_dashboard.php" class="btn btn-outline">Back to Dashboard</a>
|
||||
<!-- Main Content -->
|
||||
<main class="main-content">
|
||||
<header class="mb-3">
|
||||
<h1 class="fw-bold" style="font-size: 2.5rem;">Purchase Requests</h1>
|
||||
<p class="text-secondary">Verify bank IDs and personal information to approve or reject vehicle transactions.</p>
|
||||
</header>
|
||||
|
||||
<?php if ($message): ?>
|
||||
<div class="alert alert-success">
|
||||
<span class="text-gold">✓</span> <?= $message ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="glass" style="padding: 2.5rem;">
|
||||
<div class="table-container">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Vehicle Details</th>
|
||||
<th>Buyer Verification</th>
|
||||
<th>Bank Reference</th>
|
||||
<th>Transaction Amount</th>
|
||||
<th>Current Status</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($purchases as $p): ?>
|
||||
<tr>
|
||||
<td>
|
||||
<div style="display: flex; align-items: center; gap: 1.2rem;">
|
||||
<img src="<?= htmlspecialchars($p['image_path'] ?: 'assets/images/placeholder-car.jpg') ?>" style="width: 90px; height: 60px; object-fit: cover; border-radius: 10px; border: 1px solid var(--glass-border);">
|
||||
<div>
|
||||
<div class="fw-bold"><?= htmlspecialchars($p['brand'] . ' ' . $p['model']) ?></div>
|
||||
<div class="text-sm text-secondary"><?= $p['year'] ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="fw-bold text-sm"><?= htmlspecialchars($p['buyer_name']) ?></div>
|
||||
<div class="text-sm text-secondary"><?= htmlspecialchars($p['buyer_phone']) ?></div>
|
||||
<div class="text-sm text-secondary" style="max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"><?= htmlspecialchars($p['personal_info']) ?></div>
|
||||
</td>
|
||||
<td>
|
||||
<code style="background: rgba(255, 255, 255, 0.05); padding: 0.4rem 0.8rem; border-radius: 8px; border: 1px solid rgba(255,255,255,0.1); color: var(--primary-color); font-weight: 700; font-family: monospace;"><?= htmlspecialchars($p['bank_id']) ?></code>
|
||||
</td>
|
||||
<td>
|
||||
<div class="text-gold fw-bold">$<?= number_format($p['price']) ?></div>
|
||||
</td>
|
||||
<td>
|
||||
<span class="badge badge-<?= $p['status'] === 'approved' ? 'success' : ($p['status'] === 'rejected' ? 'danger' : 'warning') ?>">
|
||||
<?= ucfirst($p['status']) ?>
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($p['status'] === 'pending'): ?>
|
||||
<div style="display: flex; gap: 1rem; align-items: center;">
|
||||
<form method="POST" style="display: inline;">
|
||||
<input type="hidden" name="purchase_id" value="<?= $p['id'] ?>">
|
||||
<button type="submit" name="action" value="approve" class="text-gold text-sm fw-bold btn-sm" style="background: none; border: none; cursor: pointer; padding: 0;">Approve</button>
|
||||
</form>
|
||||
<form method="POST" style="display: inline;">
|
||||
<input type="hidden" name="purchase_id" value="<?= $p['id'] ?>">
|
||||
<button type="submit" name="action" value="reject" class="text-sm fw-bold btn-sm" style="background: none; border: none; cursor: pointer; padding: 0; color: var(--danger);">Reject</button>
|
||||
</form>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<span class="text-secondary text-sm fw-bold">Verified</span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php if (empty($purchases)): ?>
|
||||
<tr>
|
||||
<td colspan="6" style="padding: 4rem; text-align: center;">
|
||||
<p class="text-secondary">No purchase requests waiting for verification.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<?php if ($message): ?>
|
||||
<div class="glass" style="padding: 1rem; margin-bottom: 2rem; border-color: var(--primary-color); color: var(--primary-color); font-weight: 600;">
|
||||
<?= $message ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="glass" style="overflow-x: auto; padding: 0;">
|
||||
<table style="width: 100%; border-collapse: collapse; text-align: left;">
|
||||
<thead>
|
||||
<tr style="background: rgba(0,0,0,0.05);">
|
||||
<th style="padding: 1.5rem;">Vehicle</th>
|
||||
<th style="padding: 1.5rem;">Buyer Details</th>
|
||||
<th style="padding: 1.5rem;">Bank ID</th>
|
||||
<th style="padding: 1.5rem;">Price</th>
|
||||
<th style="padding: 1.5rem;">Status</th>
|
||||
<th style="padding: 1.5rem;">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($purchases as $p): ?>
|
||||
<tr style="border-bottom: 1px solid var(--glass-border);">
|
||||
<td style="padding: 1.5rem;">
|
||||
<div style="display: flex; align-items: center; gap: 1rem;">
|
||||
<img src="<?= htmlspecialchars($p['image_path'] ?: 'assets/images/placeholder-car.jpg') ?>" style="width: 80px; height: 50px; object-fit: cover; border-radius: 8px;">
|
||||
<div>
|
||||
<div style="font-weight: 700;"><?= htmlspecialchars($p['brand'] . ' ' . $p['model']) ?></div>
|
||||
<div style="font-size: 0.8rem; color: var(--text-secondary);"><?= $p['year'] ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td style="padding: 1.5rem;">
|
||||
<div style="font-weight: 600;"><?= htmlspecialchars($p['buyer_name']) ?></div>
|
||||
<div style="font-size: 0.85rem; color: var(--text-secondary);"><?= htmlspecialchars($p['buyer_phone']) ?></div>
|
||||
<div style="font-size: 0.75rem; color: var(--text-secondary); max-width: 200px;"><?= htmlspecialchars($p['personal_info']) ?></div>
|
||||
</td>
|
||||
<td style="padding: 1.5rem;">
|
||||
<code style="background: rgba(0,0,0,0.1); padding: 0.3rem 0.6rem; border-radius: 4px;"><?= htmlspecialchars($p['bank_id']) ?></code>
|
||||
</td>
|
||||
<td style="padding: 1.5rem; font-weight: 700; color: var(--primary-color);">$<?= number_format($p['price']) ?></td>
|
||||
<td style="padding: 1.5rem;">
|
||||
<span class="badge" style="background: <?= $p['status'] === 'approved' ? 'var(--success)' : ($p['status'] === 'rejected' ? 'var(--danger)' : 'var(--primary-color)') ?>; color: white; padding: 0.3rem 0.8rem; border-radius: 20px; font-size: 0.75rem; text-transform: uppercase;">
|
||||
<?= $p['status'] ?>
|
||||
</span>
|
||||
</td>
|
||||
<td style="padding: 1.5rem;">
|
||||
<?php if ($p['status'] === 'pending'): ?>
|
||||
<div style="display: flex; gap: 0.5rem;">
|
||||
<form method="POST" style="display: inline;">
|
||||
<input type="hidden" name="purchase_id" value="<?= $p['id'] ?>">
|
||||
<button type="submit" name="action" value="approve" class="btn btn-primary" style="padding: 0.5rem 1rem; font-size: 0.8rem;">Approve</button>
|
||||
</form>
|
||||
<form method="POST" style="display: inline;">
|
||||
<input type="hidden" name="purchase_id" value="<?= $p['id'] ?>">
|
||||
<button type="submit" name="action" value="reject" class="btn btn-outline" style="padding: 0.5rem 1rem; font-size: 0.8rem; border-color: var(--danger); color: var(--danger);">Reject</button>
|
||||
</form>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<span style="color: var(--text-secondary); font-size: 0.85rem;">Completed</span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php if (empty($purchases)): ?>
|
||||
<tr>
|
||||
<td colspan="6" style="padding: 4rem; text-align: center; color: var(--text-secondary);">No purchase requests found.</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php require_once __DIR__ . '/includes/footer.php'; ?>
|
||||
</body>
|
||||
</html>
|
||||
@ -30,10 +30,12 @@ $users = $pdo->query("SELECT * FROM users WHERE deleted_at IS NULL ORDER BY crea
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Manage Users | Admin</title>
|
||||
<link rel="stylesheet" href="assets/css/fonts.css">
|
||||
<link rel="stylesheet" href="assets/css/style.css?v=<?= time() ?>">
|
||||
</head>
|
||||
<body style="background: #050505;">
|
||||
<body>
|
||||
<div class="dashboard-container">
|
||||
<!-- Sidebar -->
|
||||
<aside class="sidebar">
|
||||
<a href="index.php" class="sidebar-brand">AFGCARS</a>
|
||||
<ul class="sidebar-menu">
|
||||
@ -44,14 +46,18 @@ $users = $pdo->query("SELECT * FROM users WHERE deleted_at IS NULL ORDER BY crea
|
||||
<li><a href="admin_messages.php"><span>Messages</span></a></li>
|
||||
</ul>
|
||||
<div class="sidebar-footer">
|
||||
<a href="logout.php" style="color: var(--danger); font-size: 0.9rem; text-decoration: none; font-weight: 600;">Logout</a>
|
||||
<a href="logout.php" class="btn btn-danger btn-sm" style="width: 100%;">Logout</a>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
<!-- Main Content -->
|
||||
<main class="main-content">
|
||||
<h1 style="margin-bottom: 2rem; font-weight: 900;">User Management</h1>
|
||||
|
||||
<div class="glass" style="padding: 2rem;">
|
||||
<header class="mb-3">
|
||||
<h1 class="fw-bold" style="font-size: 2.5rem;">User Management</h1>
|
||||
<p class="text-secondary">Manage access levels and monitor activity of marketplace users.</p>
|
||||
</header>
|
||||
|
||||
<div class="glass" style="padding: 2.5rem;">
|
||||
<div class="table-container">
|
||||
<table>
|
||||
<thead>
|
||||
@ -67,23 +73,23 @@ $users = $pdo->query("SELECT * FROM users WHERE deleted_at IS NULL ORDER BY crea
|
||||
<?php foreach ($users as $u): ?>
|
||||
<tr>
|
||||
<td>
|
||||
<div style="font-weight: 700;"><?= htmlspecialchars($u['name']) ?></div>
|
||||
<div style="font-size: 0.8rem; color: var(--text-secondary);"><?= htmlspecialchars($u['email']) ?></div>
|
||||
<div class="fw-bold"><?= htmlspecialchars($u['name']) ?></div>
|
||||
<div class="text-sm"><?= htmlspecialchars($u['email']) ?></div>
|
||||
</td>
|
||||
<td>
|
||||
<div style="font-size: 0.85rem; font-weight: 600;"><?= htmlspecialchars($u['phone'] ?: 'N/A') ?></div>
|
||||
<div style="font-size: 0.75rem; color: var(--text-secondary); max-width: 200px;"><?= htmlspecialchars($u['address'] ?: 'N/A') ?></div>
|
||||
<div class="fw-bold text-sm"><?= htmlspecialchars($u['phone'] ?: 'N/A') ?></div>
|
||||
<div class="text-sm text-secondary" style="max-width: 250px; overflow: hidden; text-overflow: ellipsis;"><?= htmlspecialchars($u['address'] ?: 'N/A') ?></div>
|
||||
</td>
|
||||
<td><span class="badge badge-<?= $u['role'] === 'admin' ? 'danger' : 'success' ?>"><?= strtoupper($u['role']) ?></span></td>
|
||||
<td><span class="badge badge-<?= $u['status'] === 'active' ? 'success' : 'warning' ?>"><?= ucfirst($u['status']) ?></span></td>
|
||||
<td>
|
||||
<div style="display: flex; gap: 0.8rem;">
|
||||
<div style="display: flex; gap: 1rem;">
|
||||
<?php if ($u['status'] === 'active'): ?>
|
||||
<a href="admin_users.php?action=deactivate&id=<?= $u['id'] ?>" style="color: var(--warning); text-decoration: none; font-weight: 700; font-size: 0.8rem;">Deactivate</a>
|
||||
<a href="admin_users.php?action=deactivate&id=<?= $u['id'] ?>" class="text-gold text-sm fw-bold" style="text-decoration: none;">Deactivate</a>
|
||||
<?php else: ?>
|
||||
<a href="admin_users.php?action=activate&id=<?= $u['id'] ?>" style="color: var(--success); text-decoration: none; font-weight: 700; font-size: 0.8rem;">Activate</a>
|
||||
<a href="admin_users.php?action=activate&id=<?= $u['id'] ?>" class="text-gold text-sm fw-bold" style="text-decoration: none;">Activate</a>
|
||||
<?php endif; ?>
|
||||
<a href="admin_users.php?action=delete&id=<?= $u['id'] ?>" onclick="return confirm('Delete this user?')" style="color: var(--danger); text-decoration: none; font-weight: 700; font-size: 0.8rem;">Delete</a>
|
||||
<a href="admin_users.php?action=delete&id=<?= $u['id'] ?>" onclick="return confirm('Delete this user?')" class="text-sm fw-bold" style="color: var(--danger); text-decoration: none;">Delete</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
--text-primary: #f8fafc;
|
||||
--text-secondary: #94a3b8;
|
||||
--transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
|
||||
--sidebar-width: 260px;
|
||||
--sidebar-width: 280px;
|
||||
--danger: #ff4757;
|
||||
--success: #2ed573;
|
||||
--warning: #ffa502;
|
||||
@ -103,6 +103,76 @@ nav {
|
||||
padding: 0 4%;
|
||||
}
|
||||
|
||||
/* Dashboard Layout */
|
||||
.dashboard-container {
|
||||
display: flex;
|
||||
min-height: 100vh;
|
||||
background: #050505;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
flex: 1;
|
||||
margin-left: var(--sidebar-width);
|
||||
padding: 3rem 4rem;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
/* Sidebar (Admin) */
|
||||
.sidebar {
|
||||
width: var(--sidebar-width);
|
||||
height: 100vh;
|
||||
background: #0a0a0a;
|
||||
border-right: 1px solid var(--glass-border);
|
||||
position: fixed;
|
||||
padding: 2.5rem 1.5rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.sidebar-brand {
|
||||
font-size: 1.5rem;
|
||||
font-weight: 900;
|
||||
color: var(--primary-color);
|
||||
text-decoration: none;
|
||||
letter-spacing: 4px;
|
||||
margin-bottom: 3.5rem;
|
||||
padding-left: 1rem;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.sidebar-menu {
|
||||
list-style: none;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.sidebar-menu li {
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.sidebar-menu a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
padding: 1.2rem 1.5rem;
|
||||
color: var(--text-secondary);
|
||||
text-decoration: none;
|
||||
font-weight: 600;
|
||||
border-radius: 12px;
|
||||
transition: var(--transition);
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
.sidebar-menu a:hover, .sidebar-menu a.active {
|
||||
background: rgba(212, 175, 55, 0.1);
|
||||
color: var(--primary-color);
|
||||
}
|
||||
|
||||
.sidebar-footer {
|
||||
padding-top: 2rem;
|
||||
border-top: 1px solid var(--glass-border);
|
||||
}
|
||||
|
||||
/* Hero Section */
|
||||
.hero {
|
||||
height: 85vh;
|
||||
@ -161,6 +231,10 @@ label {
|
||||
box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.2);
|
||||
}
|
||||
|
||||
textarea.form-control {
|
||||
resize: none;
|
||||
}
|
||||
|
||||
/* Buttons */
|
||||
.btn {
|
||||
padding: 1rem 2rem;
|
||||
@ -170,10 +244,12 @@ label {
|
||||
text-decoration: none;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 0.8rem;
|
||||
transition: var(--transition);
|
||||
border: none;
|
||||
font-size: 0.95rem;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
@ -204,6 +280,22 @@ label {
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.btn-lg {
|
||||
padding: 1.5rem 3rem;
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
.btn-danger {
|
||||
background: rgba(255, 71, 87, 0.1);
|
||||
color: var(--danger);
|
||||
border: 1px solid var(--danger);
|
||||
}
|
||||
|
||||
.btn-danger:hover {
|
||||
background: var(--danger);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.btn-auth {
|
||||
padding: 0.8rem 1.5rem;
|
||||
border-radius: 12px;
|
||||
@ -213,6 +305,9 @@ label {
|
||||
font-weight: 700;
|
||||
font-size: 0.9rem;
|
||||
transition: var(--transition);
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.btn-auth:hover {
|
||||
@ -223,12 +318,97 @@ label {
|
||||
/* Grid Layouts */
|
||||
.grid {
|
||||
display: grid;
|
||||
gap: 2.5rem;
|
||||
gap: 2rem;
|
||||
}
|
||||
|
||||
.grid-2 { grid-template-columns: repeat(2, 1fr); }
|
||||
.grid-3 { grid-template-columns: repeat(3, 1fr); }
|
||||
.grid-4 { grid-template-columns: repeat(4, 1fr); }
|
||||
|
||||
/* Stats Card */
|
||||
.stats-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
|
||||
gap: 1.5rem;
|
||||
margin-bottom: 3rem;
|
||||
}
|
||||
|
||||
.stat-card {
|
||||
padding: 2.5rem 2rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.stat-label {
|
||||
font-size: 0.8rem;
|
||||
color: var(--text-secondary);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 2px;
|
||||
font-weight: 800;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.stat-value {
|
||||
font-size: 3rem;
|
||||
font-weight: 900;
|
||||
color: var(--primary-color);
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
/* Table Styling */
|
||||
.table-container {
|
||||
overflow-x: auto;
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
table thead tr {
|
||||
background: rgba(255, 255, 255, 0.03) !important;
|
||||
}
|
||||
|
||||
table th {
|
||||
padding: 1.5rem;
|
||||
color: var(--text-primary);
|
||||
font-weight: 800;
|
||||
font-size: 0.85rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
border-bottom: 1px solid var(--glass-border);
|
||||
}
|
||||
|
||||
table td {
|
||||
padding: 1.5rem;
|
||||
color: var(--text-secondary);
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
table tr:last-child td {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
/* Badge */
|
||||
.badge {
|
||||
padding: 0.4rem 1rem;
|
||||
border-radius: 30px;
|
||||
font-size: 0.75rem;
|
||||
font-weight: 800;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.badge-success { background: rgba(46, 213, 115, 0.15); color: #2ed573; border: 1px solid rgba(46, 213, 115, 0.3); }
|
||||
.badge-warning { background: rgba(255, 165, 2, 0.15); color: #ffa502; border: 1px solid rgba(255, 165, 2, 0.3); }
|
||||
.badge-danger { background: rgba(255, 71, 87, 0.15); color: #ff4757; border: 1px solid rgba(255, 71, 87, 0.3); }
|
||||
.badge-info { background: rgba(30, 144, 255, 0.15); color: #1e90ff; border: 1px solid rgba(30, 144, 255, 0.3); }
|
||||
.badge-primary { background: rgba(212, 175, 55, 0.15); color: var(--primary-color); border: 1px solid rgba(212, 175, 55, 0.3); }
|
||||
|
||||
/* Card Styling */
|
||||
.card {
|
||||
background: var(--card-bg);
|
||||
@ -254,61 +434,103 @@ label {
|
||||
padding: 2rem;
|
||||
}
|
||||
|
||||
/* Table styling */
|
||||
table thead tr {
|
||||
background: rgba(255, 255, 255, 0.05) !important;
|
||||
/* Page Header */
|
||||
.page-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 4rem;
|
||||
padding: 2rem 0;
|
||||
}
|
||||
|
||||
table tr {
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
|
||||
.page-header h1 {
|
||||
font-size: 3rem;
|
||||
font-weight: 900;
|
||||
color: #fff;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
table td {
|
||||
padding: 1.2rem;
|
||||
.page-header p {
|
||||
color: var(--text-secondary);
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
table th {
|
||||
padding: 1.2rem;
|
||||
text-align: left;
|
||||
color: var(--text-primary);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
/* Sidebar (Admin) */
|
||||
.sidebar {
|
||||
width: var(--sidebar-width);
|
||||
height: 100vh;
|
||||
background: var(--bg-color);
|
||||
border-right: 1px solid var(--glass-border);
|
||||
position: fixed;
|
||||
padding: 3rem 2rem;
|
||||
}
|
||||
|
||||
.sidebar-link {
|
||||
/* Section Title */
|
||||
.section-title {
|
||||
font-size: 2rem;
|
||||
font-weight: 800;
|
||||
margin-bottom: 2.5rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
padding: 1.2rem;
|
||||
color: var(--text-secondary);
|
||||
text-decoration: none;
|
||||
font-weight: 600;
|
||||
border-radius: 12px;
|
||||
margin-bottom: 0.5rem;
|
||||
transition: var(--transition);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.sidebar-link:hover, .sidebar-link.active {
|
||||
background: rgba(212, 175, 55, 0.1);
|
||||
.section-icon {
|
||||
background: var(--primary-color);
|
||||
color: #000;
|
||||
width: 45px;
|
||||
height: 45px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 12px;
|
||||
font-size: 1.3rem;
|
||||
}
|
||||
|
||||
/* Sold Overlay */
|
||||
.sold-overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0,0,0,0.7);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: var(--primary-color);
|
||||
font-weight: 900;
|
||||
font-size: 2.5rem;
|
||||
letter-spacing: 5px;
|
||||
text-shadow: 0 5px 15px rgba(0,0,0,0.5);
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
.sold-stamp {
|
||||
border: 10px double white;
|
||||
color: white;
|
||||
padding: 20px 50px;
|
||||
font-weight: 900;
|
||||
font-size: 5rem;
|
||||
transform: rotate(-15deg);
|
||||
letter-spacing: 10px;
|
||||
text-shadow: 0 10px 30px rgba(0,0,0,0.5);
|
||||
}
|
||||
|
||||
/* Price Tag */
|
||||
.price-tag {
|
||||
font-weight: 900;
|
||||
color: var(--primary-color);
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.price-tag-large {
|
||||
font-size: 3.5rem;
|
||||
font-weight: 900;
|
||||
color: var(--primary-color);
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
/* Alerts */
|
||||
.alert {
|
||||
padding: 1rem 1.5rem;
|
||||
border-radius: 12px;
|
||||
margin-bottom: 1rem;
|
||||
padding: 1.2rem 2rem;
|
||||
border-radius: 16px;
|
||||
margin-bottom: 2rem;
|
||||
font-weight: 600;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.alert-error {
|
||||
@ -326,32 +548,28 @@ table th {
|
||||
/* Box component */
|
||||
.box {
|
||||
background: var(--card-bg);
|
||||
border-radius: 24px;
|
||||
border-radius: 32px;
|
||||
border: 1px solid var(--glass-border);
|
||||
box-shadow: 0 10px 30px rgba(0,0,0,0.3);
|
||||
padding: 4rem;
|
||||
}
|
||||
|
||||
/* Stats Card */
|
||||
.stats-card {
|
||||
padding: 2rem;
|
||||
border-radius: 20px;
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--glass-border);
|
||||
}
|
||||
|
||||
.stats-card h3 {
|
||||
font-size: 0.9rem;
|
||||
color: var(--text-secondary);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.stats-card .value {
|
||||
font-size: 2.5rem;
|
||||
font-weight: 900;
|
||||
color: var(--primary-color);
|
||||
}
|
||||
/* Utility */
|
||||
.mb-1 { margin-bottom: 1rem; }
|
||||
.mb-2 { margin-bottom: 2rem; }
|
||||
.mb-3 { margin-bottom: 3rem; }
|
||||
.mt-1 { margin-top: 1rem; }
|
||||
.mt-2 { margin-top: 2rem; }
|
||||
.mt-3 { margin-top: 3rem; }
|
||||
.fw-bold { font-weight: 700; }
|
||||
.fw-black { font-weight: 900; }
|
||||
.text-gold { color: var(--primary-color); }
|
||||
.text-sm { font-size: 0.85rem; }
|
||||
.text-center { text-align: center; }
|
||||
.flex { display: flex; }
|
||||
.justify-between { justify-content: space-between; }
|
||||
.align-center { align-items: center; }
|
||||
.gap-1 { gap: 1rem; }
|
||||
.w-full { width: 100%; }
|
||||
|
||||
/* Footer Styles */
|
||||
footer {
|
||||
@ -404,13 +622,21 @@ footer {
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
@media (max-width: 1200px) {
|
||||
.main-content { padding: 3rem 2rem; }
|
||||
}
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
.grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
|
||||
.footer-grid { grid-template-columns: 1fr 1fr; }
|
||||
.sidebar { width: 80px; padding: 2rem 0.5rem; }
|
||||
.sidebar span, .sidebar-brand { display: none; }
|
||||
.main-content { margin-left: 80px; }
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.grid-4, .grid-3 { grid-template-columns: 1fr; }
|
||||
.grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
|
||||
.hero h1 { font-size: 3rem; }
|
||||
.footer-grid { grid-template-columns: 1fr; }
|
||||
.page-header { flex-direction: column; text-align: center; gap: 2rem; }
|
||||
}
|
||||
@ -25,29 +25,29 @@ $stmt->execute([$id]);
|
||||
$images = $stmt->fetchAll(PDO::FETCH_COLUMN);
|
||||
?>
|
||||
|
||||
<div class="container" style="padding: 2rem 0;">
|
||||
<div style="display: grid; grid-template-columns: 1.5fr 1fr; gap: 4rem; align-items: start;">
|
||||
<div class="container" style="padding: 4rem 0;">
|
||||
<div class="grid" style="grid-template-columns: 1.5fr 1fr; gap: 4rem; align-items: start;">
|
||||
|
||||
<!-- Left Column: Images & Info -->
|
||||
<div>
|
||||
<div style="position: relative; margin-bottom: 2rem;">
|
||||
<img src="<?= htmlspecialchars($car['image_path'] ?: 'assets/images/placeholder-car.jpg') ?>" style="width: 100%; border-radius: 24px; box-shadow: 0 20px 40px rgba(0,0,0,0.1);">
|
||||
<img src="<?= htmlspecialchars($car['image_path'] ?: 'assets/images/placeholder-car.jpg') ?>" class="w-full" style="border-radius: 24px; box-shadow: 0 20px 40px rgba(0,0,0,0.3);">
|
||||
<?php if ($car['status'] === 'sold'): ?>
|
||||
<div style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); border-radius: 24px; display: flex; align-items: center; justify-content: center;">
|
||||
<div style="border: 10px double white; color: white; padding: 20px 50px; font-weight: 900; font-size: 5rem; transform: rotate(-15deg); letter-spacing: 10px;">SOLD</div>
|
||||
<div class="sold-overlay">
|
||||
<div class="sold-stamp">SOLD</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div style="display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 3rem;">
|
||||
<div class="grid grid-4 mb-3">
|
||||
<?php foreach ($images as $img): ?>
|
||||
<img src="<?= htmlspecialchars($img) ?>" style="width: 100%; height: 100px; object-fit: cover; border-radius: 12px; cursor: pointer; transition: transform 0.3s ease;" onmouseover="this.style.transform='scale(1.05)'" onmouseout="this.style.transform='scale(1)'">
|
||||
<img src="<?= htmlspecialchars($img) ?>" class="w-full" style="height: 120px; object-fit: cover; border-radius: 16px; cursor: pointer; transition: transform 0.3s ease; border: 1px solid var(--glass-border);" onmouseover="this.style.transform='scale(1.05)'" onmouseout="this.style.transform='scale(1)'">
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<div class="glass" style="padding: 3rem;">
|
||||
<h2 style="font-size: 1.8rem; font-weight: 800; margin-bottom: 1.5rem;">Description</h2>
|
||||
<div style="line-height: 1.8; color: var(--text-secondary); white-space: pre-line;">
|
||||
<h2 class="section-title mb-2">Description</h2>
|
||||
<div style="line-height: 2; color: var(--text-secondary); white-space: pre-line; font-size: 1.1rem;">
|
||||
<?= htmlspecialchars($car['description']) ?>
|
||||
</div>
|
||||
</div>
|
||||
@ -55,51 +55,51 @@ $images = $stmt->fetchAll(PDO::FETCH_COLUMN);
|
||||
|
||||
<!-- Right Column: Details & Actions -->
|
||||
<div style="position: sticky; top: 120px;">
|
||||
<div class="glass" style="padding: 3rem; border-top: 5px solid var(--primary-color);">
|
||||
<div style="margin-bottom: 2rem;">
|
||||
<span style="background: rgba(212, 175, 55, 0.1); color: var(--primary-color); padding: 0.5rem 1rem; border-radius: 30px; font-size: 0.8rem; font-weight: 800; text-transform: uppercase;"><?= htmlspecialchars($car['city']) ?></span>
|
||||
<div class="glass" style="padding: 3.5rem; border-top: 5px solid var(--primary-color);">
|
||||
<div class="mb-2">
|
||||
<span class="badge badge-primary"><?= htmlspecialchars($car['city']) ?></span>
|
||||
</div>
|
||||
|
||||
<h1 style="font-size: 2.5rem; font-weight: 900; margin-bottom: 1rem; line-height: 1.1;">
|
||||
<h1 class="fw-black mb-1" style="font-size: 3rem; line-height: 1.1; color: #fff;">
|
||||
<?= htmlspecialchars($car['brand'] . ' ' . $car['model']) ?>
|
||||
</h1>
|
||||
|
||||
<p style="font-size: 1.2rem; color: var(--text-secondary); margin-bottom: 2rem;">
|
||||
Year: <strong><?= $car['year'] ?></strong> | Status: <strong><?= ucfirst($car['status']) ?></strong>
|
||||
<p class="text-secondary mb-3" style="font-size: 1.2rem; font-weight: 600;">
|
||||
Year: <span class="text-gold"><?= $car['year'] ?></span> | Status: <span class="text-gold"><?= ucfirst($car['status']) ?></span>
|
||||
</p>
|
||||
|
||||
<div style="background: rgba(0,0,0,0.03); padding: 2rem; border-radius: 16px; margin-bottom: 2.5rem;">
|
||||
<p style="color: var(--text-secondary); margin-bottom: 0.5rem; font-size: 0.9rem; font-weight: 700; text-transform: uppercase;">Current Price</p>
|
||||
<div style="font-size: 3rem; font-weight: 900; color: var(--primary-color);">$<?= number_format($car['price']) ?></div>
|
||||
<div style="background: rgba(0,0,0,0.2); padding: 2.5rem; border-radius: 24px; margin-bottom: 3rem; border: 1px solid var(--glass-border);">
|
||||
<p class="text-secondary mb-1 text-sm fw-black" style="text-transform: uppercase; letter-spacing: 2px;">Current Marketplace Price</p>
|
||||
<div class="price-tag-large">$<?= number_format($car['price']) ?></div>
|
||||
</div>
|
||||
|
||||
<?php if ($car['status'] === 'sold'): ?>
|
||||
<div style="padding: 2rem; background: rgba(0,0,0,0.05); border-radius: 16px; text-align: center; color: var(--text-secondary); font-weight: 700;">
|
||||
This vehicle has been sold.
|
||||
<div class="box text-center" style="padding: 2.5rem; background: rgba(0,0,0,0.1); border-color: var(--glass-border);">
|
||||
<p class="text-secondary fw-bold" style="font-size: 1.1rem;">This vehicle has been successfully sold.</p>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<a href="purchase.php?id=<?= $car['id'] ?>" class="btn btn-primary" style="width: 100%; padding: 1.5rem; font-size: 1.2rem; font-weight: 800; margin-bottom: 1.5rem; text-align: center; display: block;">Initiate Purchase Request</a>
|
||||
<a href="purchase.php?id=<?= $car['id'] ?>" class="btn btn-primary btn-lg w-full mb-2 fw-black">Initiate Purchase Request</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<div style="padding-top: 2rem; border-top: 1px solid var(--glass-border);">
|
||||
<div style="display: flex; align-items: center; gap: 1rem;">
|
||||
<div style="width: 50px; height: 50px; background: var(--primary-color); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 1.2rem;">
|
||||
<div class="mt-3 pt-3" style="border-top: 1px solid var(--glass-border);">
|
||||
<div class="flex align-center gap-1">
|
||||
<div style="width: 55px; height: 55px; background: var(--primary-color); color: #000; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 1.4rem;">
|
||||
<?= strtoupper(substr($car['seller_name'], 0, 1)) ?>
|
||||
</div>
|
||||
<div>
|
||||
<p style="color: var(--text-secondary); font-size: 0.8rem; text-transform: uppercase; margin-bottom: 0.2rem;">Seller</p>
|
||||
<p style="font-weight: 700;"><?= htmlspecialchars($car['seller_name']) ?></p>
|
||||
<p class="text-secondary text-sm fw-black" style="text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.2rem;">Verified Seller</p>
|
||||
<p class="fw-black" style="font-size: 1.1rem; color: #fff;"><?= htmlspecialchars($car['seller_name']) ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="glass" style="margin-top: 2rem; padding: 2rem; background: rgba(46, 213, 115, 0.05); border-color: rgba(46, 213, 115, 0.2);">
|
||||
<h4 style="color: #2ed573; margin-bottom: 0.8rem; display: flex; align-items: center; gap: 0.5rem;">
|
||||
<span>🛡️</span> AfgCars Secure
|
||||
<div class="glass mt-2" style="padding: 2rem; background: rgba(46, 213, 115, 0.05); border-color: rgba(46, 213, 115, 0.2);">
|
||||
<h4 style="color: #2ed573; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.8rem; font-weight: 800;">
|
||||
<span style="font-size: 1.5rem;">🛡️</span> AfgCars Secure Payment
|
||||
</h4>
|
||||
<p style="font-size: 0.85rem; color: #666; line-height: 1.6;">
|
||||
Every listing is manually verified by our team. Personal information and bank IDs are encrypted and used only for legal documentation.
|
||||
<p class="text-secondary text-sm" style="line-height: 1.8;">
|
||||
Every transaction is protected. We verify bank references and legal documentation before finalizing any sale in Afghanistan.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
73
cars.php
73
cars.php
@ -35,30 +35,32 @@ $cities = $pdo->query("SELECT DISTINCT city FROM cars WHERE status = 'approved'"
|
||||
$brands = $pdo->query("SELECT DISTINCT brand FROM cars WHERE status = 'approved'")->fetchAll(PDO::FETCH_COLUMN);
|
||||
?>
|
||||
|
||||
<div class="container" style="padding: 2rem 0;">
|
||||
<div style="margin-bottom: 4rem;">
|
||||
<h1 style="font-size: 3rem; font-weight: 900; margin-bottom: 1rem; color: #fff;">Premium Inventory</h1>
|
||||
<p style="color: var(--text-secondary); font-size: 1.2rem;">Find the perfect vehicle for your lifestyle in our verified marketplace.</p>
|
||||
<div class="container" style="padding: 6rem 0;">
|
||||
<div class="page-header" style="margin-bottom: 5rem;">
|
||||
<div>
|
||||
<h1 class="fw-black" style="font-size: 4rem; color: #fff; line-height: 1;">Premium Inventory</h1>
|
||||
<p class="text-secondary fw-bold" style="font-size: 1.25rem;">Explore our curated selection of verified elite vehicles across Afghanistan.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Filters -->
|
||||
<div class="glass" style="padding: 2rem; margin-bottom: 4rem;">
|
||||
<form method="GET" style="display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 1.5rem; align-items: end;">
|
||||
<div class="form-group" style="margin-bottom: 0;">
|
||||
<label style="color: var(--text-secondary);">Search</label>
|
||||
<div class="glass mb-4" style="padding: 3.5rem; border-top: 5px solid var(--primary-color);">
|
||||
<form method="GET" class="grid" style="grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; align-items: end;">
|
||||
<div class="form-group mb-0">
|
||||
<label class="text-secondary fw-black mb-1" style="text-transform: uppercase; letter-spacing: 2px; font-size: 0.75rem;">Vehicle Search</label>
|
||||
<input type="text" name="search" class="form-control" placeholder="Search brand or model..." value="<?= htmlspecialchars($search) ?>">
|
||||
</div>
|
||||
<div class="form-group" style="margin-bottom: 0;">
|
||||
<label style="color: var(--text-secondary);">City</label>
|
||||
<div class="form-group mb-0">
|
||||
<label class="text-secondary fw-black mb-1" style="text-transform: uppercase; letter-spacing: 2px; font-size: 0.75rem;">Location</label>
|
||||
<select name="city" class="form-control">
|
||||
<option value="">All Cities</option>
|
||||
<option value="">All Regions</option>
|
||||
<?php foreach ($cities as $c): ?>
|
||||
<option value="<?= $c ?>" <?= $city === $c ? 'selected' : '' ?>><?= $c ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group" style="margin-bottom: 0;">
|
||||
<label style="color: var(--text-secondary);">Brand</label>
|
||||
<div class="form-group mb-0">
|
||||
<label class="text-secondary fw-black mb-1" style="text-transform: uppercase; letter-spacing: 2px; font-size: 0.75rem;">Brand</label>
|
||||
<select name="brand" class="form-control">
|
||||
<option value="">All Brands</option>
|
||||
<?php foreach ($brands as $b): ?>
|
||||
@ -66,31 +68,36 @@ $brands = $pdo->query("SELECT DISTINCT brand FROM cars WHERE status = 'approved'
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary" style="height: 50px; color: #000;">Apply Filters</button>
|
||||
<button type="submit" class="btn btn-primary fw-black" style="height: 56px; padding: 0 2rem; letter-spacing: 1px;">APPLY FILTERS</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Listings -->
|
||||
<div style="display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2.5rem;">
|
||||
<div class="grid grid-3 mt-4">
|
||||
<?php foreach ($cars as $car): ?>
|
||||
<div class="glass car-card" style="padding: 0; overflow: hidden; position: relative;">
|
||||
<div style="height: 220px; background-image: url('<?= htmlspecialchars($car['image_path'] ?: 'assets/images/placeholder-car.jpg') ?>'); background-size: cover; background-position: center; position: relative;">
|
||||
<div class="card car-card">
|
||||
<div style="height: 240px; background-image: url('<?= htmlspecialchars($car['image_path'] ?: 'assets/images/placeholder-car.jpg') ?>'); background-size: cover; background-position: center; position: relative;">
|
||||
<?php if ($car['status'] === 'sold'): ?>
|
||||
<div style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; z-index: 2;">
|
||||
<div style="border: 4px solid var(--primary-color); color: var(--primary-color); padding: 10px 25px; font-weight: 900; font-size: 2rem; transform: rotate(-15deg); letter-spacing: 4px; text-shadow: 0 5px 15px rgba(0,0,0,0.5);">SOLD</div>
|
||||
<div class="sold-overlay">
|
||||
<div class="sold-stamp" style="font-size: 2.5rem; padding: 10px 20px; border-width: 5px;">SOLD</div>
|
||||
</div>
|
||||
<?php elseif ($car['is_hot_deal']): ?>
|
||||
<span style="position: absolute; top: 1.5rem; left: 1.5rem; background: var(--danger); color: white; padding: 0.5rem 1rem; border-radius: 30px; font-size: 0.75rem; font-weight: 800; text-transform: uppercase; z-index: 1;">Hot Deal</span>
|
||||
<span class="badge badge-danger" style="position: absolute; top: 1.5rem; left: 1.5rem; z-index: 5;">Hot Deal</span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div style="padding: 2rem;">
|
||||
<h3 style="font-size: 1.4rem; font-weight: 800; margin-bottom: 0.5rem; color: #fff;"><?= htmlspecialchars($car['brand'] . ' ' . $car['model']) ?></h3>
|
||||
<p style="color: var(--text-secondary); margin-bottom: 1.5rem; font-size: 0.95rem; display: flex; align-items: center; gap: 0.5rem;">
|
||||
<span>📍</span> <?= htmlspecialchars($car['city']) ?> • <?= $car['year'] ?>
|
||||
</p>
|
||||
<div style="display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--glass-border); padding-top: 1.5rem;">
|
||||
<span style="font-size: 1.5rem; font-weight: 900; color: var(--primary-color);">$<?= number_format($car['price']) ?></span>
|
||||
<a href="car_detail.php?id=<?= $car['id'] ?>" class="btn btn-primary btn-sm" style="<?= $car['status'] === 'sold' ? 'background: #334155; pointer-events: none; color: #94a3b8;' : 'color: #000;' ?>">View Details</a>
|
||||
<div class="card-content" style="padding: 2.5rem;">
|
||||
<div class="flex gap-1 text-secondary text-sm fw-black mb-1" style="text-transform: uppercase; letter-spacing: 1px;">
|
||||
<span>📍 <?= htmlspecialchars($car['city']) ?></span>
|
||||
<span>📅 <?= $car['year'] ?> Model</span>
|
||||
</div>
|
||||
<h3 class="fw-black mb-2" style="font-size: 1.6rem; color: #fff;"><?= htmlspecialchars($car['brand'] . ' ' . $car['model']) ?></h3>
|
||||
<div class="flex justify-between align-center mt-2 pt-2" style="border-top: 1px solid var(--glass-border);">
|
||||
<span class="price-tag" style="font-size: 1.8rem;">$<?= number_format($car['price']) ?></span>
|
||||
<?php if ($car['status'] === 'sold'): ?>
|
||||
<a href="car_detail.php?id=<?= $car['id'] ?>" class="btn btn-outline btn-sm fw-bold" style="opacity: 0.5;">View Info</a>
|
||||
<?php else: ?>
|
||||
<a href="car_detail.php?id=<?= $car['id'] ?>" class="btn btn-primary btn-sm fw-bold">View Details</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -98,12 +105,12 @@ $brands = $pdo->query("SELECT DISTINCT brand FROM cars WHERE status = 'approved'
|
||||
</div>
|
||||
|
||||
<?php if (empty($cars)): ?>
|
||||
<div style="text-align: center; padding: 10rem 0;">
|
||||
<div style="font-size: 4rem; margin-bottom: 2rem;">🔍</div>
|
||||
<h2 style="font-weight: 800; margin-bottom: 1rem; color: #fff;">No vehicles found</h2>
|
||||
<p style="color: var(--text-secondary);">Try adjusting your filters or search terms.</p>
|
||||
<div class="text-center" style="padding: 12rem 0;">
|
||||
<div style="font-size: 5rem; margin-bottom: 2rem; filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));">🔍</div>
|
||||
<h2 class="fw-black mb-1" style="font-size: 2.5rem; color: #fff;">No premium vehicles found</h2>
|
||||
<p class="text-secondary fw-bold" style="font-size: 1.1rem;">Try adjusting your filters or refining your search criteria.</p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php require_once __DIR__ . '/includes/footer.php'; ?>
|
||||
<?php require_once __DIR__ . '/includes/footer.php'; ?>
|
||||
92
contact.php
92
contact.php
@ -16,90 +16,92 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
}
|
||||
?>
|
||||
|
||||
<section class="hero" style="height: 40vh; background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('assets/images/contact-hero.jpg') center/cover no-repeat;">
|
||||
<h1>Get in Touch</h1>
|
||||
<p>Have questions? Our team is here to help you find the perfect vehicle.</p>
|
||||
<section class="hero" style="height: 50vh; background: linear-gradient(rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.8)), url('assets/images/contact-hero.jpg') center/cover no-repeat fixed;">
|
||||
<h1 class="fw-black" style="font-size: 5rem; letter-spacing: -3px; color: #fff;">Connect With Us</h1>
|
||||
<p class="text-secondary fw-bold" style="font-size: 1.3rem; max-width: 700px; margin-left: auto; margin-right: auto;">Our elite concierge team is ready to assist you with every aspect of your premium automotive journey.</p>
|
||||
</section>
|
||||
|
||||
<div class="container" style="max-width: 1200px; margin-top: -5rem;">
|
||||
<div style="display: grid; grid-template-columns: 1fr 2fr; gap: 3rem;">
|
||||
<div style="display: flex; flex-direction: column; gap: 2rem;">
|
||||
<div class="glass" style="padding: 2.5rem; border-left: 4px solid var(--primary-color);">
|
||||
<h3 style="color: var(--primary-color); margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.8rem;">
|
||||
<span>📍</span> Visit Us
|
||||
<div class="container" style="max-width: 1200px; margin-top: -6rem; padding-bottom: 8rem;">
|
||||
<div class="grid" style="grid-template-columns: 1fr 1.8fr; gap: 4rem; align-items: start;">
|
||||
<div class="flex" style="flex-direction: column; gap: 2rem;">
|
||||
<div class="glass" style="padding: 3rem; border-left: 6px solid var(--primary-color);">
|
||||
<h3 class="fw-black text-gold mb-2" style="display: flex; align-items: center; gap: 1rem; font-size: 1.4rem;">
|
||||
<span style="font-size: 2rem;">📍</span> Headquarters
|
||||
</h3>
|
||||
<p style="font-size: 1rem; color: var(--text-secondary); line-height: 1.8;">
|
||||
<p class="text-secondary fw-bold" style="font-size: 1.1rem; line-height: 1.8;">
|
||||
Wazir Akbar Khan, District 10,<br>
|
||||
Kabul, Afghanistan
|
||||
</p>
|
||||
<p style="margin-top: 1.5rem; font-weight: 700; font-size: 1.2rem;">+93 799 123 456</p>
|
||||
<p class="text-gold fw-black mt-2" style="font-size: 1.5rem;">+93 799 123 456</p>
|
||||
</div>
|
||||
|
||||
<div class="glass" style="padding: 2.5rem; border-left: 4px solid var(--primary-color);">
|
||||
<h3 style="color: var(--primary-color); margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.8rem;">
|
||||
<span>🕒</span> Working Hours
|
||||
<div class="glass" style="padding: 3rem; border-left: 6px solid var(--primary-color);">
|
||||
<h3 class="fw-black text-gold mb-2" style="display: flex; align-items: center; gap: 1rem; font-size: 1.4rem;">
|
||||
<span style="font-size: 2rem;">🕒</span> Concierge Hours
|
||||
</h3>
|
||||
<div style="display: flex; justify-content: space-between; margin-bottom: 0.8rem;">
|
||||
<span style="color: var(--text-secondary);">Sat - Wed:</span>
|
||||
<span style="font-weight: 600;">8:00 - 18:00</span>
|
||||
<div class="flex justify-between mb-1">
|
||||
<span class="text-secondary fw-bold">Sat - Wed:</span>
|
||||
<span class="fw-black">08:00 - 18:00</span>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: space-between;">
|
||||
<span style="color: var(--text-secondary);">Thursday:</span>
|
||||
<span style="font-weight: 600;">8:00 - 13:00</span>
|
||||
<div class="flex justify-between">
|
||||
<span class="text-secondary fw-bold">Thursday:</span>
|
||||
<span class="fw-black">08:00 - 13:00</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="glass" style="padding: 2.5rem; border-left: 4px solid var(--primary-color);">
|
||||
<h3 style="color: var(--primary-color); margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.8rem;">
|
||||
<span>✉️</span> Support Email
|
||||
<div class="glass" style="padding: 3rem; border-left: 6px solid var(--primary-color);">
|
||||
<h3 class="fw-black text-gold mb-2" style="display: flex; align-items: center; gap: 1rem; font-size: 1.4rem;">
|
||||
<span style="font-size: 2rem;">✉️</span> Digital Inquiries
|
||||
</h3>
|
||||
<p style="font-size: 1rem; color: var(--text-secondary);">info@afgcars.af</p>
|
||||
<p style="font-size: 1rem; color: var(--text-secondary);">support@afgcars.af</p>
|
||||
<p class="text-secondary fw-bold" style="font-size: 1.1rem;">info@afgcars.af</p>
|
||||
<p class="text-secondary fw-bold" style="font-size: 1.1rem;">concierge@afgcars.af</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="glass" style="padding: 4rem;">
|
||||
<h2 style="margin-bottom: 2rem; font-size: 2rem;">Send us a message</h2>
|
||||
<div class="glass" style="padding: 5rem;">
|
||||
<h2 class="fw-black mb-2" style="font-size: 2.5rem; color: #fff;">Direct Inquiry Portal</h2>
|
||||
<p class="text-secondary mb-3 fw-bold">Submit your requirements and our specialists will contact you shortly.</p>
|
||||
|
||||
<?php if ($success): ?>
|
||||
<div class="alert alert-success" style="margin-bottom: 3rem;">
|
||||
✨ Message sent successfully! Our representative will contact you within 24 hours.
|
||||
<div class="alert alert-success mb-3" style="padding: 2rem; border-radius: 20px;">
|
||||
<span style="font-size: 1.5rem;">✨</span> Your message has been encrypted and securely transmitted to our team.
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<form method="POST">
|
||||
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 2rem;">
|
||||
<div class="grid grid-2 mb-2">
|
||||
<div class="form-group">
|
||||
<label>Your Name</label>
|
||||
<label class="text-secondary fw-black mb-1" style="text-transform: uppercase; letter-spacing: 2px; font-size: 0.75rem;">Your Full Name</label>
|
||||
<input type="text" name="name" class="form-control" required placeholder="John Doe">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Email Address</label>
|
||||
<label class="text-secondary fw-black mb-1" style="text-transform: uppercase; letter-spacing: 2px; font-size: 0.75rem;">Email Address</label>
|
||||
<input type="email" name="email" class="form-control" required placeholder="john@example.com">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Subject</label>
|
||||
<input type="text" name="subject" class="form-control" required placeholder="Inquiry about Toyota Land Cruiser">
|
||||
<label class="text-secondary fw-black mb-1" style="text-transform: uppercase; letter-spacing: 2px; font-size: 0.75rem;">Inquiry Subject</label>
|
||||
<input type="text" name="subject" class="form-control" required placeholder="Regarding Land Cruiser 2024 Inquiry">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>How can we help?</label>
|
||||
<textarea name="message" class="form-control" rows="6" required placeholder="Write your message here..."></textarea>
|
||||
<label class="text-secondary fw-black mb-1" style="text-transform: uppercase; letter-spacing: 2px; font-size: 0.75rem;">Detailed Message</label>
|
||||
<textarea name="message" class="form-control" rows="6" required placeholder="Provide as much detail as possible..."></textarea>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary" style="width: 100%; padding: 1.2rem; font-size: 1.1rem;">Send Message</button>
|
||||
<button type="submit" class="btn btn-primary w-full fw-black" style="padding: 1.5rem; font-size: 1.1rem; letter-spacing: 1px;">TRANSMIT SECURE MESSAGE</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container" style="margin-top: 4rem;">
|
||||
<div class="glass" style="height: 450px; width: 100%; position: relative; overflow: hidden;">
|
||||
<div class="container" style="padding-bottom: 8rem;">
|
||||
<div class="glass" style="height: 500px; width: 100%; position: relative; overflow: hidden; border-radius: 32px;">
|
||||
<!-- Map Placeholder -->
|
||||
<div style="position: absolute; inset: 0; background: url('assets/images/contact-map.jpg') center/cover; filter: grayscale(1) contrast(1.2) brightness(0.5);"></div>
|
||||
<div style="position: relative; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; background: rgba(0,0,0,0.4);">
|
||||
<div style="font-size: 4rem; margin-bottom: 1rem;">📍</div>
|
||||
<h2 style="font-size: 2.5rem; text-transform: uppercase; letter-spacing: 3px;">Our Location</h2>
|
||||
<p style="color: var(--primary-color); font-weight: 700;">VISIT US IN KABUL</p>
|
||||
<a href="https://maps.google.com" target="_blank" class="btn btn-outline" style="margin-top: 2rem;">Open in Google Maps</a>
|
||||
<div style="position: absolute; inset: 0; background: url('assets/images/contact-map.jpg') center/cover; filter: grayscale(0.8) contrast(1.1) brightness(0.4);"></div>
|
||||
<div style="position: relative; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; background: rgba(15, 23, 42, 0.4);">
|
||||
<div style="font-size: 5rem; margin-bottom: 2rem; filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));">📍</div>
|
||||
<h2 class="fw-black" style="font-size: 3.5rem; text-transform: uppercase; letter-spacing: 5px; color: #fff; line-height: 1;">Strategic Location</h2>
|
||||
<p class="text-gold fw-black" style="font-size: 1.4rem; letter-spacing: 2px; margin-top: 1rem;">VISIT THE KABUL EXPERIENCE CENTER</p>
|
||||
<a href="https://maps.google.com" target="_blank" class="btn btn-outline fw-black" style="margin-top: 3rem; padding: 1.2rem 3rem;">OPEN IN NAVIGATION</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
126
dashboard.php
126
dashboard.php
@ -34,51 +34,51 @@ $my_purchases = $stmt->fetchAll();
|
||||
?>
|
||||
|
||||
<div class="container" style="padding: 4rem 0;">
|
||||
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 4rem;">
|
||||
<div class="page-header">
|
||||
<div>
|
||||
<h1 style="font-size: 3rem; font-weight: 900; margin-bottom: 0.5rem; color: #fff;">User Dashboard</h1>
|
||||
<p style="color: var(--text-secondary); font-size: 1.1rem;">Manage your vehicle listings and track your purchase requests.</p>
|
||||
<h1>User Dashboard</h1>
|
||||
<p>Manage your vehicle listings and track your purchase requests.</p>
|
||||
</div>
|
||||
<a href="add_car.php" class="btn btn-primary">List New Vehicle</a>
|
||||
</div>
|
||||
|
||||
<div style="display: grid; grid-template-columns: 1fr; gap: 5rem;">
|
||||
<div class="grid" style="grid-template-columns: 1fr; gap: 5rem;">
|
||||
|
||||
<!-- My Listings Section -->
|
||||
<section>
|
||||
<h2 style="font-size: 2rem; font-weight: 800; margin-bottom: 2.5rem; display: flex; align-items: center; gap: 1rem; color: #fff;">
|
||||
<span style="background: var(--primary-color); color: #000; width: 45px; height: 45px; display: flex; align-items: center; justify-content: center; border-radius: 12px; font-size: 1.3rem;">🚗</span>
|
||||
<h2 class="section-title">
|
||||
<span class="section-icon">🚗</span>
|
||||
My Vehicle Listings
|
||||
</h2>
|
||||
|
||||
<?php if (empty($my_listings)): ?>
|
||||
<div class="box" style="padding: 5rem; text-align: center;">
|
||||
<p style="color: var(--text-secondary); margin-bottom: 2rem; font-size: 1.2rem;">You haven't listed any vehicles yet.</p>
|
||||
<div class="box text-center">
|
||||
<p class="text-secondary mb-2" style="font-size: 1.2rem;">You haven't listed any vehicles yet.</p>
|
||||
<a href="add_car.php" class="btn btn-outline">Start Selling Today</a>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div style="display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2.5rem;">
|
||||
<div class="grid grid-3">
|
||||
<?php foreach ($my_listings as $car): ?>
|
||||
<div class="card" style="position: relative;">
|
||||
<div style="height: 200px; background-image: url('<?= htmlspecialchars($car['image_path'] ?: 'assets/images/placeholder-car.jpg') ?>'); background-size: cover; background-position: center;">
|
||||
<?php if ($car['status'] === 'sold'): ?>
|
||||
<div style="position: absolute; top: 0; left: 0; width: 100%; height: 200px; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; color: var(--primary-color); font-weight: 900; font-size: 2.5rem; letter-spacing: 5px; text-shadow: 0 5px 15px rgba(0,0,0,0.5);">SOLD</div>
|
||||
<div class="sold-overlay">SOLD</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="card-content">
|
||||
<div style="display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.5rem;">
|
||||
<div class="flex justify-between align-center mb-2">
|
||||
<div>
|
||||
<h3 style="font-size: 1.4rem; font-weight: 800; margin-bottom: 0.3rem; color: #fff;"><?= htmlspecialchars($car['brand'] . ' ' . $car['model']) ?></h3>
|
||||
<p style="color: var(--text-secondary); font-size: 0.9rem; font-weight: 600;"><?= $car['year'] ?> • <?= htmlspecialchars($car['city']) ?></p>
|
||||
<h3 class="fw-black mb-1" style="font-size: 1.4rem;"><?= htmlspecialchars($car['brand'] . ' ' . $car['model']) ?></h3>
|
||||
<p class="text-secondary text-sm fw-bold"><?= $car['year'] ?> • <?= htmlspecialchars($car['city']) ?></p>
|
||||
</div>
|
||||
<span style="background: <?= $car['status'] === 'approved' ? 'var(--success)' : ($car['status'] === 'sold' ? 'rgba(255,255,255,0.1)' : ($car['status'] === 'rejected' ? 'var(--danger)' : 'var(--primary-color)')) ?>; color: <?= $car['status'] === 'approved' || $car['status'] === 'rejected' || $car['status'] === 'sold' ? '#fff' : '#000' ?>; padding: 0.4rem 0.8rem; border-radius: 8px; font-size: 0.75rem; text-transform: uppercase; font-weight: 800; letter-spacing: 0.5px;">
|
||||
<span class="badge badge-<?= $car['status'] === 'approved' ? 'success' : ($car['status'] === 'sold' ? 'info' : ($car['status'] === 'rejected' ? 'danger' : 'primary')) ?>">
|
||||
<?= $car['status'] ?>
|
||||
</span>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--glass-border); padding-top: 1.5rem;">
|
||||
<span style="font-weight: 900; color: var(--primary-color); font-size: 1.25rem;">$<?= number_format($car['price']) ?></span>
|
||||
<a href="edit_car.php?id=<?= $car['id'] ?>" style="color: var(--text-primary); font-size: 0.95rem; font-weight: 700; text-decoration: none; display: flex; align-items: center; gap: 0.5rem;">
|
||||
Edit Details <span style="color: var(--primary-color);">→</span>
|
||||
<div class="flex justify-between align-center mt-2 pt-2" style="border-top: 1px solid var(--glass-border);">
|
||||
<span class="price-tag">$<?= number_format($car['price']) ?></span>
|
||||
<a href="edit_car.php?id=<?= $car['id'] ?>" class="text-gold fw-bold text-sm" style="text-decoration: none;">
|
||||
Edit Details →
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@ -90,58 +90,60 @@ $my_purchases = $stmt->fetchAll();
|
||||
|
||||
<!-- My Purchase Requests Section -->
|
||||
<section>
|
||||
<h2 style="font-size: 2rem; font-weight: 800; margin-bottom: 2.5rem; display: flex; align-items: center; gap: 1rem; color: #fff;">
|
||||
<span style="background: var(--primary-color); color: #000; width: 45px; height: 45px; display: flex; align-items: center; justify-content: center; border-radius: 12px; font-size: 1.3rem;">💰</span>
|
||||
<h2 class="section-title">
|
||||
<span class="section-icon">💰</span>
|
||||
My Purchase Requests
|
||||
</h2>
|
||||
|
||||
<?php if (empty($my_purchases)): ?>
|
||||
<div class="box" style="padding: 5rem; text-align: center;">
|
||||
<p style="color: var(--text-secondary); margin-bottom: 2rem; font-size: 1.2rem;">You haven't made any purchase requests yet.</p>
|
||||
<div class="box text-center">
|
||||
<p class="text-secondary mb-2" style="font-size: 1.2rem;">You haven't made any purchase requests yet.</p>
|
||||
<a href="cars.php" class="btn btn-outline">Browse Marketplace</a>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="box" style="overflow: hidden; padding: 0;">
|
||||
<table style="width: 100%; border-collapse: collapse; text-align: left;">
|
||||
<thead>
|
||||
<tr style="background: rgba(255,255,255,0.02);">
|
||||
<th style="padding: 1.5rem; font-weight: 800; font-size: 0.85rem; text-transform: uppercase; color: var(--text-secondary);">Vehicle</th>
|
||||
<th style="padding: 1.5rem; font-weight: 800; font-size: 0.85rem; text-transform: uppercase; color: var(--text-secondary);">Price</th>
|
||||
<th style="padding: 1.5rem; font-weight: 800; font-size: 0.85rem; text-transform: uppercase; color: var(--text-secondary);">Bank ID</th>
|
||||
<th style="padding: 1.5rem; font-weight: 800; font-size: 0.85rem; text-transform: uppercase; color: var(--text-secondary);">Status</th>
|
||||
<th style="padding: 1.5rem; font-weight: 800; font-size: 0.85rem; text-transform: uppercase; color: var(--text-secondary);">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($my_purchases as $p): ?>
|
||||
<tr style="border-bottom: 1px solid var(--glass-border);">
|
||||
<td style="padding: 1.5rem;">
|
||||
<div style="display: flex; align-items: center; gap: 1.2rem;">
|
||||
<img src="<?= htmlspecialchars($p['image_path'] ?: 'assets/images/placeholder-car.jpg') ?>" style="width: 80px; height: 50px; object-fit: cover; border-radius: 8px;">
|
||||
<div>
|
||||
<div style="font-weight: 800; font-size: 1.1rem; color: #fff;"><?= htmlspecialchars($p['brand'] . ' ' . $p['model']) ?></div>
|
||||
<div style="font-size: 0.85rem; color: var(--text-secondary); font-weight: 600;"><?= $p['year'] ?> Model</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td style="padding: 1.5rem; font-weight: 900; color: var(--primary-color); font-size: 1.1rem;">$<?= number_format($p['price']) ?></td>
|
||||
<td style="padding: 1.5rem;"><code style="font-size: 0.9rem; background: rgba(255,255,255,0.05); padding: 0.4rem 0.8rem; border-radius: 6px; font-weight: 700; color: var(--primary-color);"><?= htmlspecialchars($p['bank_id']) ?></code></td>
|
||||
<td style="padding: 1.5rem;">
|
||||
<span style="color: <?= $p['status'] === 'approved' ? 'var(--success)' : ($p['status'] === 'rejected' ? 'var(--danger)' : 'var(--primary-color)') ?>; font-weight: 800; font-size: 0.9rem; text-transform: uppercase;">
|
||||
<?= $p['status'] ?>
|
||||
</span>
|
||||
</td>
|
||||
<td style="padding: 1.5rem;">
|
||||
<?php if ($p['status'] === 'approved'): ?>
|
||||
<a href="receipt.php?id=<?= $p['id'] ?>" class="btn btn-primary btn-sm">View Receipt</a>
|
||||
<?php else: ?>
|
||||
<span style="color: var(--text-secondary); font-size: 0.9rem; font-weight: 600;">Under Review</span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<div class="box" style="padding: 0; overflow: hidden;">
|
||||
<div class="table-container">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Vehicle</th>
|
||||
<th>Price</th>
|
||||
<th>Bank ID</th>
|
||||
<th>Status</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($my_purchases as $p): ?>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="flex align-center gap-1">
|
||||
<img src="<?= htmlspecialchars($p['image_path'] ?: 'assets/images/placeholder-car.jpg') ?>" style="width: 80px; height: 50px; object-fit: cover; border-radius: 8px;">
|
||||
<div>
|
||||
<div class="fw-black" style="font-size: 1.1rem; color: #fff;"><?= htmlspecialchars($p['brand'] . ' ' . $p['model']) ?></div>
|
||||
<div class="text-sm text-secondary fw-bold"><?= $p['year'] ?> Model</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="price-tag">$<?= number_format($p['price']) ?></td>
|
||||
<td><code class="text-gold fw-bold" style="background: rgba(255,255,255,0.05); padding: 0.4rem 0.8rem; border-radius: 6px;"><?= htmlspecialchars($p['bank_id']) ?></code></td>
|
||||
<td>
|
||||
<span class="badge badge-<?= $p['status'] === 'approved' ? 'success' : ($p['status'] === 'rejected' ? 'danger' : 'primary') ?>">
|
||||
<?= $p['status'] ?>
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($p['status'] === 'approved'): ?>
|
||||
<a href="receipt.php?id=<?= $p['id'] ?>" class="btn btn-primary btn-sm">View Receipt</a>
|
||||
<?php else: ?>
|
||||
<span class="text-secondary text-sm fw-bold">Under Review</span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
|
||||
63
edit_car.php
63
edit_car.php
@ -10,9 +10,15 @@ $pdo = db();
|
||||
$id = $_GET['id'] ?? 0;
|
||||
$userId = $_SESSION['user_id'];
|
||||
|
||||
// Check ownership
|
||||
$stmt = $pdo->prepare("SELECT * FROM cars WHERE id = ? AND user_id = ? AND deleted_at IS NULL");
|
||||
$stmt->execute([$id, $userId]);
|
||||
// Check ownership or admin role
|
||||
$isAdmin = isset($_SESSION['role']) && $_SESSION['role'] === 'admin';
|
||||
if ($isAdmin) {
|
||||
$stmt = $pdo->prepare("SELECT * FROM cars WHERE id = ? AND deleted_at IS NULL");
|
||||
$stmt->execute([$id]);
|
||||
} else {
|
||||
$stmt = $pdo->prepare("SELECT * FROM cars WHERE id = ? AND user_id = ? AND deleted_at IS NULL");
|
||||
$stmt->execute([$id, $userId]);
|
||||
}
|
||||
$car = $stmt->fetch();
|
||||
|
||||
if (!$car) {
|
||||
@ -35,6 +41,13 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
$stmt = $pdo->prepare("UPDATE cars SET brand = ?, model = ?, year = ?, price = ?, city = ?, description = ?, status = 'pending' WHERE id = ?");
|
||||
$stmt->execute([$brand, $model, $year, $price, $city, $description, $id]);
|
||||
$success = true;
|
||||
// Refresh car data
|
||||
$car['brand'] = $brand;
|
||||
$car['model'] = $model;
|
||||
$car['year'] = $year;
|
||||
$car['price'] = $price;
|
||||
$car['city'] = $city;
|
||||
$car['description'] = $description;
|
||||
} catch (Exception $e) {
|
||||
$error = "Update failed: " . $e->getMessage();
|
||||
}
|
||||
@ -43,50 +56,50 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
$cities = ['Kabul', 'Herat', 'Mazar-i-Sharif', 'Kandahar', 'Jalalabad', 'Kunduz', 'Ghazni', 'Balkh'];
|
||||
?>
|
||||
|
||||
<div class="container" style="max-width: 800px;">
|
||||
<div class="box" style="padding: 4rem;">
|
||||
<h1 style="margin-bottom: 1rem; font-size: 2.5rem; font-weight: 900;">Edit Listing</h1>
|
||||
<p style="color: var(--text-secondary); margin-bottom: 3rem;">Update your vehicle details. Note: editing will reset the status to 'pending' for re-approval.</p>
|
||||
<div class="container" style="max-width: 900px; padding: 4rem 0;">
|
||||
<div class="box" style="padding: 4.5rem;">
|
||||
<h1 class="fw-black mb-1" style="font-size: 3rem; color: #fff;">Edit Vehicle Listing</h1>
|
||||
<p class="text-secondary mb-3" style="font-size: 1.15rem; font-weight: 500;">Update your vehicle specifications. Note: making changes will reset the approval status to 'pending'.</p>
|
||||
|
||||
<?php if ($success): ?>
|
||||
<div class="glass" style="padding: 2rem; border-color: var(--success); background: rgba(46, 213, 115, 0.05); color: var(--success); margin-bottom: 3rem; text-align: center; border-radius: 16px;">
|
||||
<h3 style="margin-bottom: 0.5rem;">✨ Changes Saved!</h3>
|
||||
<p>Your listing has been updated and is now pending approval.</p>
|
||||
<div style="margin-top: 1.5rem;">
|
||||
<a href="dashboard.php" class="btn btn-primary btn-sm">Back to Dashboard</a>
|
||||
<div class="glass text-center mb-4" style="padding: 3rem; border-color: var(--success); background: rgba(46, 213, 115, 0.05); color: var(--success); border-radius: 24px;">
|
||||
<h3 class="fw-black mb-1" style="font-size: 2rem;">✨ Vehicle Updated Successfully!</h3>
|
||||
<p class="text-secondary mb-2" style="font-size: 1.1rem; font-weight: 700;">Your changes have been saved and the listing is awaiting re-approval by our administrators.</p>
|
||||
<div class="mt-2">
|
||||
<a href="<?= $isAdmin ? 'admin_cars.php' : 'dashboard.php' ?>" class="btn btn-primary btn-lg">Back to Management Console</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($error): ?>
|
||||
<div class="alert alert-error" style="margin-bottom: 2rem;"><?= $error ?></div>
|
||||
<div class="alert alert-error mb-2"><?= $error ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<form method="POST">
|
||||
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;">
|
||||
<div class="grid grid-2 mb-2">
|
||||
<div class="form-group">
|
||||
<label>Brand</label>
|
||||
<label>Vehicle Brand</label>
|
||||
<input type="text" name="brand" class="form-control" value="<?= htmlspecialchars($car['brand']) ?>" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Model</label>
|
||||
<label>Vehicle Model</label>
|
||||
<input type="text" name="model" class="form-control" value="<?= htmlspecialchars($car['model']) ?>" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;">
|
||||
<div class="grid grid-2 mb-2">
|
||||
<div class="form-group">
|
||||
<label>Year</label>
|
||||
<label>Manufacturing Year</label>
|
||||
<input type="number" name="year" class="form-control" value="<?= htmlspecialchars($car['year']) ?>" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Price (USD)</label>
|
||||
<label>Asking Price (USD)</label>
|
||||
<input type="number" name="price" class="form-control" value="<?= htmlspecialchars($car['price']) ?>" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>City</label>
|
||||
<label>Current Location (City)</label>
|
||||
<select name="city" class="form-control" required>
|
||||
<?php foreach ($cities as $c): ?>
|
||||
<option value="<?= $c ?>" <?= $car['city'] === $c ? 'selected' : '' ?>><?= $c ?></option>
|
||||
@ -95,13 +108,13 @@ $cities = ['Kabul', 'Herat', 'Mazar-i-Sharif', 'Kandahar', 'Jalalabad', 'Kunduz'
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Description</label>
|
||||
<textarea name="description" class="form-control" rows="5" required><?= htmlspecialchars($car['description']) ?></textarea>
|
||||
<label>Vehicle Description & Details</label>
|
||||
<textarea name="description" class="form-control" rows="6" required placeholder="Describe the current condition, maintenance history, and features..."><?= htmlspecialchars($car['description']) ?></textarea>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 3rem; display: flex; gap: 1.5rem;">
|
||||
<button type="submit" class="btn btn-primary" style="flex: 2; padding: 1.2rem;">Save Changes</button>
|
||||
<a href="dashboard.php" class="btn btn-outline" style="flex: 1; text-align: center; padding: 1.2rem;">Cancel</a>
|
||||
<div class="mt-3 flex gap-1 align-center">
|
||||
<button type="submit" class="btn btn-primary btn-lg" style="flex: 2; font-weight: 900; letter-spacing: 1px;">SAVE DOCUMENTED CHANGES</button>
|
||||
<a href="<?= $isAdmin ? 'admin_cars.php' : 'dashboard.php' ?>" class="btn btn-outline btn-lg" style="flex: 1; font-weight: 700;">DISCARD & EXIT</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@ -4,6 +4,17 @@ if (session_status() === PHP_SESSION_NONE) {
|
||||
}
|
||||
require_once __DIR__ . '/../db/config.php';
|
||||
$projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? 'Premium Car Marketplace Afghanistan';
|
||||
|
||||
// List of admin pages that use the sidebar layout
|
||||
$adminPages = [
|
||||
'admin_dashboard.php',
|
||||
'admin_cars.php',
|
||||
'admin_users.php',
|
||||
'admin_messages.php',
|
||||
'admin_purchases.php'
|
||||
];
|
||||
$currentPage = basename($_SERVER['SCRIPT_NAME']);
|
||||
$isAdminPage = in_array($currentPage, $adminPages);
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
@ -13,19 +24,11 @@ $projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? 'Premium Car Marketplac
|
||||
<title>AfgCars | Premium Marketplace</title>
|
||||
<meta name="description" content="<?= htmlspecialchars($projectDescription) ?>">
|
||||
|
||||
|
||||
<link rel="stylesheet" href="assets/css/fonts.css">
|
||||
<link rel="stylesheet" href="assets/css/style.css?v=<?= time() ?>">
|
||||
<style>
|
||||
.nav-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<?php if (!str_contains($_SERVER['SCRIPT_NAME'], 'admin_dashboard.php')): ?>
|
||||
<?php if (!$isAdminPage): ?>
|
||||
<nav>
|
||||
<a href="index.php" class="logo">AfgCars</a>
|
||||
<ul class="nav-links">
|
||||
@ -34,7 +37,7 @@ $projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? 'Premium Car Marketplac
|
||||
<li><a href="about.php">About</a></li>
|
||||
<li><a href="contact.php">Contact</a></li>
|
||||
</ul>
|
||||
<div class="nav-actions">
|
||||
<div class="nav-actions" style="display: flex; align-items: center; gap: 1rem;">
|
||||
<?php if (isset($_SESSION['user_id'])): ?>
|
||||
<?php if (($_SESSION['role'] ?? '') === 'admin'): ?>
|
||||
<a href="admin_dashboard.php" class="btn-auth">Admin Panel</a>
|
||||
|
||||
101
index.php
101
index.php
@ -29,36 +29,37 @@ $testimonials = [
|
||||
|
||||
<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>
|
||||
<h1 class="fw-black" style="color: #ffffff; font-size: 5.5rem; letter-spacing: -3px; line-height: 1;">Find Your Premium Ride</h1>
|
||||
<p class="text-secondary mt-2 mb-3" style="font-size: 1.4rem; max-width: 800px; margin-left: auto; margin-right: auto; font-weight: 500;">Afghanistan's most trusted elite automotive marketplace. Where luxury meets reliability.</p>
|
||||
<div class="flex justify-center gap-1">
|
||||
<a href="cars.php" class="btn btn-primary btn-lg fw-black">View Marketplace</a>
|
||||
<?php if (!isset($_SESSION['user_id'])): ?>
|
||||
<a href="register.php" class="btn btn-outline">Start Selling</a>
|
||||
<a href="register.php" class="btn btn-outline btn-lg fw-black">Start Selling Today</a>
|
||||
<?php else: ?>
|
||||
<a href="dashboard.php" class="btn btn-outline">My Account</a>
|
||||
<a href="dashboard.php" class="btn btn-outline btn-lg fw-black">Access My Portal</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">
|
||||
<div class="container" style="padding: 8rem 0;">
|
||||
<h2 class="section-title justify-center mb-4" style="font-size: 3.5rem;">🔥 Current Hot Deals</h2>
|
||||
<div class="grid grid-3 mt-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 style="overflow: hidden; height: 260px; border-bottom: 1px solid var(--glass-border); position: relative;">
|
||||
<img src="<?= htmlspecialchars($car['image_path'] ?: 'assets/images/placeholder-car.jpg') ?>" class="w-full" style="height: 100%; object-fit: cover;">
|
||||
<span class="badge badge-danger" style="position: absolute; top: 1.5rem; left: 1.5rem; z-index: 5;">Hot Deal</span>
|
||||
</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>
|
||||
<div class="flex gap-1 text-secondary text-sm fw-black mb-1" style="text-transform: uppercase; letter-spacing: 1px;">
|
||||
<span>📅 <?= htmlspecialchars($car['year']) ?> Model</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>
|
||||
<h3 class="fw-black mb-2" style="font-size: 1.6rem; color: #fff;"><?= htmlspecialchars($car['brand'] . ' ' . $car['model']) ?></h3>
|
||||
<div class="flex justify-between align-center mt-2 pt-2" style="border-top: 1px solid var(--glass-border);">
|
||||
<div class="price-tag" style="font-size: 1.8rem;">$<?= number_format($car['price']) ?></div>
|
||||
<a href="car_detail.php?id=<?= $car['id'] ?>" class="btn btn-outline btn-sm fw-bold">View Details</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -66,23 +67,23 @@ $testimonials = [
|
||||
</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);">
|
||||
<section style="background: rgba(30, 41, 59, 0.4); padding: 10rem 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">
|
||||
<h2 class="section-title justify-center mb-4" style="font-size: 3.5rem;">What Our Clients Say</h2>
|
||||
<div class="grid grid-3 mt-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;">
|
||||
<div class="glass" style="padding: 4rem; background: rgba(15, 23, 42, 0.6);">
|
||||
<div style="color: var(--primary-color); margin-bottom: 2rem; font-size: 1.5rem; letter-spacing: 5px;">
|
||||
<?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;">
|
||||
<p class="text-secondary mb-3" style="font-style: italic; line-height: 2; font-size: 1.2rem; font-weight: 500;">"<?= htmlspecialchars($t['text']) ?>"</p>
|
||||
<div class="flex align-center gap-1">
|
||||
<div style="width: 60px; height: 60px; background: var(--primary-color); border-radius: 16px; display: flex; align-items: center; justify-content: center; font-weight: 900; color: #000; font-size: 1.4rem;">
|
||||
<?= 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>
|
||||
<h4 class="fw-black" style="margin: 0; font-size: 1.2rem; color: #fff;"><?= htmlspecialchars($t['name']) ?></h4>
|
||||
<p class="text-secondary text-sm fw-bold" style="margin: 0;"><?= htmlspecialchars($t['city']) ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -91,35 +92,35 @@ $testimonials = [
|
||||
</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 class="container" style="padding: 10rem 0;">
|
||||
<h2 class="section-title justify-center mb-4" style="font-size: 3.5rem;">Elite Showrooms</h2>
|
||||
<div class="grid grid-3 mt-3">
|
||||
<div class="box text-center" style="padding: 5rem 3rem;">
|
||||
<div style="font-size: 5rem; margin-bottom: 2.5rem; filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));">📍</div>
|
||||
<h3 class="fw-black mb-1" style="font-size: 1.8rem; color: #fff;">Kabul Headquarters</h3>
|
||||
<p class="text-secondary mb-2 fw-bold">Wazir Akbar Khan, Street 15</p>
|
||||
<p class="text-gold fw-black" style="font-size: 1.4rem;">+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 class="box text-center" style="padding: 5rem 3rem;">
|
||||
<div style="font-size: 5rem; margin-bottom: 2.5rem; filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));">📍</div>
|
||||
<h3 class="fw-black mb-1" style="font-size: 1.8rem; color: #fff;">Herat Elite Branch</h3>
|
||||
<p class="text-secondary mb-2 fw-bold">Jada-e-Main, Near Blue Mosque</p>
|
||||
<p class="text-gold fw-black" style="font-size: 1.4rem;">+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 class="box text-center" style="padding: 5rem 3rem;">
|
||||
<div style="font-size: 5rem; margin-bottom: 2.5rem; filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));">📍</div>
|
||||
<h3 class="fw-black mb-1" style="font-size: 1.8rem; color: #fff;">Mazar Luxury Center</h3>
|
||||
<p class="text-secondary mb-2 fw-bold">Balkh Gate Road Center</p>
|
||||
<p class="text-gold fw-black" style="font-size: 1.4rem;">+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 class="container" style="text-align: center; margin-bottom: 10rem;">
|
||||
<div class="box" style="padding: 10rem 5rem; background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(30, 41, 59, 0.4)); border-radius: 48px;">
|
||||
<h2 class="fw-black mb-2" style="font-size: 4.5rem; color: #fff; line-height: 1;">Ready to sell your vehicle?</h2>
|
||||
<p class="text-secondary mb-4" style="max-width: 800px; margin-left: auto; margin-right: auto; font-size: 1.4rem; line-height: 1.8; font-weight: 500;">Experience the most professional automotive trading platform in Afghanistan. Verified buyers and seamless documentation guaranteed.</p>
|
||||
<a href="register.php" class="btn btn-primary btn-lg fw-black" style="padding: 1.8rem 5rem; font-size: 1.2rem; letter-spacing: 1px;">START SELLING TODAY</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
26
login.php
26
login.php
@ -34,33 +34,33 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="container" style="display: flex; justify-content: center; align-items: center; min-height: 70vh;">
|
||||
<div class="box" style="width: 100%; max-width: 450px; padding: 3.5rem;">
|
||||
<div style="text-align: center; margin-bottom: 2.5rem;">
|
||||
<h2 style="font-size: 2.2rem; font-weight: 900; margin-bottom: 0.5rem;">Welcome Back</h2>
|
||||
<p style="color: var(--text-secondary);">Sign in to your AfgCars account</p>
|
||||
<div class="container" style="display: flex; justify-content: center; align-items: center; min-height: 80vh; padding: 4rem 0;">
|
||||
<div class="box" style="width: 100%; max-width: 500px; padding: 4.5rem;">
|
||||
<div class="text-center mb-3">
|
||||
<h2 class="fw-black" style="font-size: 2.8rem; color: #fff; margin-bottom: 0.5rem; line-height: 1.1;">Welcome Back</h2>
|
||||
<p class="text-secondary fw-bold" style="font-size: 1.1rem;">Sign in to your premium AfgCars portal</p>
|
||||
</div>
|
||||
|
||||
<?php if ($error): ?>
|
||||
<div class="glass" style="padding: 1rem; border-color: rgba(255, 71, 87, 0.3); background: rgba(255, 71, 87, 0.05); color: var(--danger); margin-bottom: 1.5rem; border-radius: 12px; font-size: 0.9rem; font-weight: 600; text-align: center;">
|
||||
<div class="alert alert-error mb-2 text-center" style="justify-content: center;">
|
||||
<?= $error ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<form method="POST">
|
||||
<div class="form-group">
|
||||
<label style="font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-secondary); font-weight: 700;">Email Address</label>
|
||||
<input type="email" name="email" class="form-control" required placeholder="admin@gmail.com" style="margin-top: 0.5rem;">
|
||||
<label class="text-secondary fw-black mb-1" style="text-transform: uppercase; letter-spacing: 2px; font-size: 0.75rem;">Email Address</label>
|
||||
<input type="email" name="email" class="form-control" required placeholder="name@example.com">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label style="font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-secondary); font-weight: 700;">Password</label>
|
||||
<input type="password" name="password" class="form-control" required placeholder="••••••••" style="margin-top: 0.5rem;">
|
||||
<label class="text-secondary fw-black mb-1" style="text-transform: uppercase; letter-spacing: 2px; font-size: 0.75rem;">Security Password</label>
|
||||
<input type="password" name="password" class="form-control" required placeholder="••••••••">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary" style="width: 100%; margin-top: 1.5rem; padding: 1.1rem;">Sign In</button>
|
||||
<button type="submit" class="btn btn-primary w-full mt-2 fw-black" style="padding: 1.3rem; font-size: 1.1rem; letter-spacing: 1px;">SIGN IN TO ACCOUNT</button>
|
||||
</form>
|
||||
|
||||
<p style="text-align: center; margin-top: 2.5rem; color: var(--text-secondary); font-size: 0.95rem;">
|
||||
New to AfgCars? <a href="register.php" style="color: var(--primary-color); font-weight: 700; text-decoration: none;">Create an account</a>
|
||||
<p class="text-center mt-3 text-secondary fw-bold" style="font-size: 1rem;">
|
||||
New to AfgCars? <a href="register.php" class="text-gold" style="text-decoration: none; border-bottom: 1px solid var(--primary-color);">Create your account</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
74
purchase.php
74
purchase.php
@ -37,46 +37,45 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="container" style="max-width: 1100px;">
|
||||
<div class="container" style="max-width: 1200px; padding: 4rem 0;">
|
||||
<?php if ($success): ?>
|
||||
<div class="glass" style="padding: 5rem; text-align: center; border-top: 4px solid var(--primary-color);">
|
||||
<div style="font-size: 5rem; margin-bottom: 2rem;">🚀</div>
|
||||
<h1 style="color: var(--primary-color); font-size: 3rem; margin-bottom: 1.5rem; font-weight: 800;">Request Submitted!</h1>
|
||||
<p style="margin-bottom: 3rem; font-size: 1.2rem; color: var(--text-secondary); max-width: 700px; margin-left: auto; margin-right: auto; line-height: 1.8;">
|
||||
Your purchase request for the <strong><?= htmlspecialchars($car['brand'] . ' ' . $car['model']) ?></strong> with Bank ID <strong><?= htmlspecialchars($bank_id) ?></strong> has been sent to our admin for review.
|
||||
Once approved, you will receive a confirmation receipt.
|
||||
<div class="box text-center" style="padding: 6rem;">
|
||||
<div style="font-size: 6rem; margin-bottom: 2.5rem; filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));">🚀</div>
|
||||
<h1 class="text-gold fw-black mb-1" style="font-size: 3.5rem;">Purchase Request Sent!</h1>
|
||||
<p class="text-secondary mb-3" style="font-size: 1.3rem; max-width: 750px; margin-left: auto; margin-right: auto; line-height: 1.8; font-weight: 600;">
|
||||
Your verification request for the <strong class="text-gold"><?= htmlspecialchars($car['brand'] . ' ' . $car['model']) ?></strong> with Bank Reference <strong class="text-gold"><?= htmlspecialchars($bank_id) ?></strong> has been successfully submitted to our verification team.
|
||||
</p>
|
||||
<div style="display: flex; gap: 1.5rem; justify-content: center;">
|
||||
<a href="dashboard.php" class="btn btn-primary">Go to Dashboard</a>
|
||||
<a href="cars.php" class="btn btn-outline">Back to Marketplace</a>
|
||||
<div class="flex justify-center gap-1 mt-3">
|
||||
<a href="dashboard.php" class="btn btn-primary btn-lg">View Request Status</a>
|
||||
<a href="cars.php" class="btn btn-outline btn-lg">Back to Marketplace</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div style="display: grid; grid-template-columns: 1fr 1.5fr; gap: 3rem; align-items: start;">
|
||||
<div class="glass" style="padding: 2rem; position: sticky; top: 120px;">
|
||||
<h3 style="margin-bottom: 1.5rem; color: var(--primary-color);">Purchase Summary</h3>
|
||||
<div style="width: 100%; height: 200px; background-image: url('<?= htmlspecialchars($car['image_path'] ?: 'assets/images/placeholder-car.jpg') ?>'); background-size: cover; background-position: center; border-radius: 12px; margin-bottom: 1.5rem;"></div>
|
||||
<h2 style="font-size: 1.5rem; margin-bottom: 0.5rem;"><?= htmlspecialchars($car['brand'] . ' ' . $car['model']) ?></h2>
|
||||
<p style="color: var(--text-secondary); margin-bottom: 1.5rem;"><?= $car['year'] ?> Model - <?= $car['city'] ?></p>
|
||||
<div style="display: flex; justify-content: space-between; border-top: 1px solid var(--glass-border); padding-top: 1.5rem;">
|
||||
<span style="font-weight: 600;">Total Price</span>
|
||||
<span style="font-weight: 800; color: var(--primary-color); font-size: 1.5rem;">$<?= number_format($car['price']) ?></span>
|
||||
<div class="grid" style="grid-template-columns: 1fr 1.6fr; gap: 4rem; align-items: start;">
|
||||
<div class="glass" style="padding: 2.5rem; position: sticky; top: 120px; border-top: 5px solid var(--primary-color);">
|
||||
<h3 class="fw-black mb-2 text-gold" style="text-transform: uppercase; letter-spacing: 2px; font-size: 1rem;">Transaction Summary</h3>
|
||||
<div class="mb-2" style="width: 100%; height: 220px; background-image: url('<?= htmlspecialchars($car['image_path'] ?: 'assets/images/placeholder-car.jpg') ?>'); background-size: cover; background-position: center; border-radius: 20px; border: 1px solid var(--glass-border);"></div>
|
||||
<h2 class="fw-black mb-1" style="font-size: 1.8rem; color: #fff;"><?= htmlspecialchars($car['brand'] . ' ' . $car['model']) ?></h2>
|
||||
<p class="text-secondary mb-2 fw-bold" style="font-size: 1.1rem;"><?= $car['year'] ?> Model • <?= $car['city'] ?></p>
|
||||
<div class="flex justify-between align-center mt-2 pt-2" style="border-top: 1px solid var(--glass-border);">
|
||||
<span class="text-secondary fw-black" style="text-transform: uppercase; font-size: 0.85rem;">Total Amount Due</span>
|
||||
<span class="price-tag" style="font-size: 1.8rem;">$<?= number_format($car['price']) ?></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="glass" style="padding: 4rem;">
|
||||
<h1 style="margin-bottom: 1rem; font-size: 2.5rem; font-weight: 800;">Buyer Verification</h1>
|
||||
<p style="color: var(--text-secondary); margin-bottom: 3rem; font-size: 1.1rem;">Please provide your banking and personal information to initiate the purchase process.</p>
|
||||
<div class="glass" style="padding: 4.5rem;">
|
||||
<h1 class="fw-black mb-1" style="font-size: 3rem; color: #fff;">Buyer Verification</h1>
|
||||
<p class="text-secondary mb-3" style="font-size: 1.15rem; font-weight: 500;">Provide your legal documentation and banking details to proceed with this secure purchase.</p>
|
||||
|
||||
<?php if ($error): ?>
|
||||
<div class="alert alert-error" style="margin-bottom: 2rem;"><?= $error ?></div>
|
||||
<div class="alert alert-error mb-2"><?= $error ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<form method="POST">
|
||||
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;">
|
||||
<div class="grid grid-2">
|
||||
<div class="form-group">
|
||||
<label>Full Legal Name</label>
|
||||
<input type="text" name="buyer_name" class="form-control" value="<?= htmlspecialchars($_SESSION['user_name']) ?>" required>
|
||||
<label>Full Legal Name (as on ID Card)</label>
|
||||
<input type="text" name="buyer_name" class="form-control" value="<?= htmlspecialchars($_SESSION['user_name']) ?>" required placeholder="Enter your full name">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Phone Number</label>
|
||||
@ -85,25 +84,26 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Bank ID / Account Number</label>
|
||||
<input type="text" name="bank_id" class="form-control" required placeholder="Azizi Bank / Kabul Bank ID">
|
||||
<small style="color: var(--text-secondary);">This ID will be used to verify your transaction.</small>
|
||||
<label>Bank Reference ID / Account Number</label>
|
||||
<input type="text" name="bank_id" class="form-control" required placeholder="Azizi Bank / Kabul Bank Transaction ID">
|
||||
<p class="text-sm text-secondary mt-1 fw-bold">This reference will be verified with the Afghan banking systems.</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Additional Personal Info (ID Card No, Address, etc.)</label>
|
||||
<textarea name="personal_info" class="form-control" rows="3" required placeholder="Enter your ID card number and current residential address for legal documentation..."></textarea>
|
||||
<label>Legal Identification & Address</label>
|
||||
<textarea name="personal_info" class="form-control" rows="4" required placeholder="Enter Tazkira/Passport number and current residential address for official sale documentation..."></textarea>
|
||||
</div>
|
||||
|
||||
<div style="margin: 2rem 0; padding: 2rem; background: rgba(212, 175, 55, 0.05); border-left: 5px solid var(--primary-color); border-radius: 12px;">
|
||||
<p style="font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; margin: 0;">
|
||||
<strong>Note:</strong> By submitting this request, you agree to the verification process. After admin approval, a sale receipt will be generated.
|
||||
<div class="mt-3 mb-3" style="padding: 2.5rem; background: rgba(212, 175, 55, 0.05); border-left: 5px solid var(--primary-color); border-radius: 20px;">
|
||||
<p class="text-secondary text-sm" style="line-height: 1.8; margin: 0; font-weight: 600;">
|
||||
<strong class="text-gold" style="font-size: 1.1rem; display: block; margin-bottom: 0.5rem;">IMPORTANT SECURITY NOTICE:</strong>
|
||||
Your personal data is encrypted. Submission of fraudulent bank IDs will result in account suspension and legal action under Afghanistan's automotive marketplace regulations.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; gap: 1.5rem; align-items: center;">
|
||||
<button type="submit" class="btn btn-primary" style="flex: 2; padding: 1.2rem; font-size: 1.1rem; font-weight: 700;">Submit Purchase Request</button>
|
||||
<a href="car_detail.php?id=<?= $id ?>" class="btn btn-outline" style="flex: 1; text-align: center; padding: 1.2rem;">Cancel</a>
|
||||
<div class="flex align-center gap-1 mt-3">
|
||||
<button type="submit" class="btn btn-primary btn-lg" style="flex: 2; font-weight: 900; letter-spacing: 1px;">SUBMIT SECURE PURCHASE REQUEST</button>
|
||||
<a href="car_detail.php?id=<?= $id ?>" class="btn btn-outline btn-lg" style="flex: 1; font-weight: 700;">CANCEL</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
84
receipt.php
84
receipt.php
@ -28,87 +28,87 @@ if (!$data) {
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="container" style="max-width: 800px; padding: 4rem 0;">
|
||||
<div id="receipt" class="glass" style="padding: 4rem; background: white; color: #333; position: relative; overflow: hidden; border: 1px solid #ddd; border-radius: 0;">
|
||||
<div class="container" style="max-width: 900px; padding: 4rem 0;">
|
||||
<div id="receipt" class="glass receipt-box" style="padding: 4rem; background: #fff; color: #1a1a1a; position: relative; overflow: hidden; border-radius: 0; border: 1px solid #ddd;">
|
||||
<!-- Watermark -->
|
||||
<div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-45deg); font-size: 8rem; font-weight: 900; color: rgba(46, 213, 115, 0.1); pointer-events: none; z-index: 0; white-space: nowrap;">PAID & VERIFIED</div>
|
||||
<div class="receipt-watermark" style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-45deg); font-size: 8rem; font-weight: 900; color: rgba(46, 213, 115, 0.08); pointer-events: none; z-index: 0; white-space: nowrap;">PAID & VERIFIED</div>
|
||||
|
||||
<div style="display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 4rem; position: relative; z-index: 1;">
|
||||
<div class="flex justify-between align-center mb-3" style="position: relative; z-index: 1; border-bottom: 2px solid #f0f0f0; padding-bottom: 2rem;">
|
||||
<div>
|
||||
<h1 style="color: var(--primary-color); font-weight: 900; font-size: 2.5rem; margin: 0;">AfgCars</h1>
|
||||
<p style="color: #666; margin-top: 0.5rem;">Premium Vehicle Marketplace</p>
|
||||
<h1 class="fw-black text-gold" style="font-size: 2.5rem; margin: 0; filter: brightness(0.8);">AfgCars</h1>
|
||||
<p style="color: #666; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; font-size: 0.8rem; margin-top: 0.5rem;">Premium Vehicle Marketplace</p>
|
||||
</div>
|
||||
<div style="text-align: right;">
|
||||
<h2 style="font-weight: 800; margin: 0;">OFFICIAL RECEIPT</h2>
|
||||
<p style="color: #666; margin-top: 0.5rem;">Receipt #: RC-<?= str_pad($data['id'], 6, '0', STR_PAD_LEFT) ?></p>
|
||||
<p style="color: #666;">Date: <?= date('M d, Y', strtotime($data['created_at'])) ?></p>
|
||||
<h2 class="fw-black" style="margin: 0; color: #333;">OFFICIAL RECEIPT</h2>
|
||||
<p style="color: #888; font-weight: 700; margin-top: 0.5rem;">Receipt #: <span style="color: #333;">RC-<?= str_pad($data['id'], 6, '0', STR_PAD_LEFT) ?></span></p>
|
||||
<p style="color: #888; font-weight: 700;">Date: <span style="color: #333;"><?= date('M d, Y', strtotime($data['created_at'])) ?></span></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; margin-bottom: 4rem; position: relative; z-index: 1;">
|
||||
<div class="grid grid-2 mb-3" style="position: relative; z-index: 1; gap: 4rem;">
|
||||
<div>
|
||||
<h4 style="border-bottom: 2px solid #eee; padding-bottom: 0.5rem; margin-bottom: 1rem; color: #888; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px;">Buyer Details</h4>
|
||||
<p style="font-weight: 700; font-size: 1.1rem; margin-bottom: 0.3rem;"><?= htmlspecialchars($data['buyer_name']) ?></p>
|
||||
<p style="margin-bottom: 0.3rem;"><?= htmlspecialchars($data['buyer_email']) ?></p>
|
||||
<p style="margin-bottom: 0.3rem;"><?= htmlspecialchars($data['buyer_phone']) ?></p>
|
||||
<p style="font-weight: 600; color: var(--primary-color); margin-top: 1rem;">Bank ID: <?= htmlspecialchars($data['bank_id']) ?></p>
|
||||
<h4 style="border-bottom: 1px solid #eee; padding-bottom: 0.5rem; margin-bottom: 1.5rem; color: #aaa; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 2px; font-weight: 800;">Buyer Information</h4>
|
||||
<p class="fw-black" style="font-size: 1.2rem; margin-bottom: 0.5rem; color: #333;"><?= htmlspecialchars($data['buyer_name']) ?></p>
|
||||
<p style="margin-bottom: 0.3rem; color: #666; font-weight: 500;"><?= htmlspecialchars($data['buyer_email']) ?></p>
|
||||
<p style="margin-bottom: 0.3rem; color: #666; font-weight: 500;"><?= htmlspecialchars($data['buyer_phone']) ?></p>
|
||||
<p class="fw-black" style="color: var(--primary-color); margin-top: 1.5rem; filter: brightness(0.8);">Bank Verification ID: <?= htmlspecialchars($data['bank_id']) ?></p>
|
||||
</div>
|
||||
<div>
|
||||
<h4 style="border-bottom: 2px solid #eee; padding-bottom: 0.5rem; margin-bottom: 1rem; color: #888; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px;">Seller Details</h4>
|
||||
<p style="font-weight: 700; font-size: 1.1rem; margin-bottom: 0.3rem;"><?= htmlspecialchars($data['seller_name']) ?></p>
|
||||
<p style="margin-bottom: 0.3rem;">Verification: Verified Merchant</p>
|
||||
<p style="margin-bottom: 0.3rem;"><?= htmlspecialchars($data['seller_phone']) ?></p>
|
||||
<p style="margin-bottom: 0.3rem;"><?= htmlspecialchars($data['city']) ?>, Afghanistan</p>
|
||||
<h4 style="border-bottom: 1px solid #eee; padding-bottom: 0.5rem; margin-bottom: 1.5rem; color: #aaa; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 2px; font-weight: 800;">Seller Information</h4>
|
||||
<p class="fw-black" style="font-size: 1.2rem; margin-bottom: 0.5rem; color: #333;"><?= htmlspecialchars($data['seller_name']) ?></p>
|
||||
<p style="margin-bottom: 0.3rem; color: #666; font-weight: 500;">Status: Verified Premium Merchant</p>
|
||||
<p style="margin-bottom: 0.3rem; color: #666; font-weight: 500;"><?= htmlspecialchars($data['seller_phone']) ?></p>
|
||||
<p style="margin-bottom: 0.3rem; color: #666; font-weight: 500;"><?= htmlspecialchars($data['city']) ?>, Afghanistan</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="margin-bottom: 4rem; position: relative; z-index: 1;">
|
||||
<table style="width: 100%; border-collapse: collapse;">
|
||||
<div class="mb-3" style="position: relative; z-index: 1;">
|
||||
<table style="width: 100%; border-collapse: collapse; border: 1px solid #eee;">
|
||||
<thead>
|
||||
<tr style="background: #f9f9f9; text-align: left;">
|
||||
<th style="padding: 1rem; border-bottom: 2px solid #ddd;">Description</th>
|
||||
<th style="padding: 1rem; border-bottom: 2px solid #ddd; text-align: right;">Amount</th>
|
||||
<tr style="background: #fcfcfc; text-align: left;">
|
||||
<th style="padding: 1.2rem; border-bottom: 2px solid #eee; color: #333;">Transaction Description</th>
|
||||
<th style="padding: 1.2rem; border-bottom: 2px solid #eee; text-align: right; color: #333;">Price (USD)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="padding: 1.5rem 1rem; border-bottom: 1px solid #eee;">
|
||||
<div style="font-weight: 700; font-size: 1.2rem;"><?= htmlspecialchars($data['brand'] . ' ' . $data['model']) ?></div>
|
||||
<div style="color: #666; font-size: 0.9rem; margin-top: 0.3rem;"><?= $data['year'] ?> Model - Transaction Verified via Bank ID: <?= htmlspecialchars($data['bank_id']) ?></div>
|
||||
<td style="padding: 2rem 1.2rem; border-bottom: 1px solid #eee;">
|
||||
<div class="fw-black" style="font-size: 1.3rem; color: #333;"><?= htmlspecialchars($data['brand'] . ' ' . $data['model']) ?></div>
|
||||
<div style="color: #888; font-size: 0.9rem; margin-top: 0.5rem; font-weight: 500;"><?= $data['year'] ?> Model Vehicle - Secured Transaction</div>
|
||||
</td>
|
||||
<td style="padding: 1.5rem 1rem; border-bottom: 1px solid #eee; text-align: right; font-weight: 700; font-size: 1.2rem;">$<?= number_format($data['price']) ?></td>
|
||||
<td style="padding: 2rem 1.2rem; border-bottom: 1px solid #eee; text-align: right; font-weight: 800; font-size: 1.3rem; color: #333;">$<?= number_format($data['price']) ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td style="padding: 2rem 1rem; text-align: right; font-weight: 600; font-size: 1.1rem;">Total Paid</td>
|
||||
<td style="padding: 2rem 1rem; text-align: right; font-weight: 900; font-size: 1.8rem; color: var(--primary-color);">$<?= number_format($data['price']) ?></td>
|
||||
<tr style="background: #fafafa;">
|
||||
<td style="padding: 2.5rem 1.2rem; text-align: right; font-weight: 700; font-size: 1.2rem; color: #666;">Total Transaction Amount</td>
|
||||
<td style="padding: 2.5rem 1.2rem; text-align: right; font-weight: 900; font-size: 2.2rem; color: var(--primary-color); filter: brightness(0.8);">$<?= number_format($data['price']) ?></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div style="border-top: 1px dashed #ccc; padding-top: 2rem; text-align: center; color: #888; font-size: 0.85rem; position: relative; z-index: 1;">
|
||||
<p style="margin-bottom: 0.5rem;">This is a computer-generated receipt. No signature is required.</p>
|
||||
<p>AfgCars Verification System - Securing the Afghan Automotive Market</p>
|
||||
<div class="mt-3 text-center" style="border-top: 2px dashed #eee; padding-top: 2.5rem; color: #aaa; font-size: 0.85rem; font-weight: 600; position: relative; z-index: 1; letter-spacing: 0.5px;">
|
||||
<p style="margin-bottom: 0.5rem;">This official document is computer-generated and verified by AfgCars Security Systems.</p>
|
||||
<p style="color: #ccc;">NATIONAL AUTOMOTIVE REGISTRY OF AFGHANISTAN • SECURE MARKETPLACE VERIFICATION</p>
|
||||
</div>
|
||||
|
||||
<!-- Paid Badge -->
|
||||
<div style="position: absolute; bottom: 100px; right: 40px; border: 5px double var(--success); color: var(--success); padding: 10px 20px; font-size: 2rem; font-weight: 900; transform: rotate(-15deg); border-radius: 10px; opacity: 0.8;">PAID</div>
|
||||
<div style="position: absolute; bottom: 80px; right: 60px; border: 6px double #2ed573; color: #2ed573; padding: 15px 30px; font-size: 2.5rem; font-weight: 900; transform: rotate(-15deg); border-radius: 12px; opacity: 0.6; pointer-events: none;">PAID</div>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 3rem; display: flex; gap: 1.5rem; justify-content: center;">
|
||||
<button onclick="window.print()" class="btn btn-primary">Print Receipt</button>
|
||||
<a href="dashboard.php" class="btn btn-outline">Back to Dashboard</a>
|
||||
<div class="mt-3 flex justify-center gap-1">
|
||||
<button onclick="window.print()" class="btn btn-primary btn-lg">Print Documentation</button>
|
||||
<a href="dashboard.php" class="btn btn-outline btn-lg">Return to Dashboard</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
@media print {
|
||||
nav, footer, .btn { display: none !important; }
|
||||
body { background: white !important; }
|
||||
nav, footer, .btn, .nav-actions { display: none !important; }
|
||||
body { background: #fff !important; color: #000 !important; }
|
||||
.container { max-width: 100% !important; padding: 0 !important; margin: 0 !important; }
|
||||
.glass { border: none !important; box-shadow: none !important; }
|
||||
.glass { border: none !important; box-shadow: none !important; background: #fff !important; }
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
30
register.php
30
register.php
@ -30,37 +30,37 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="container" style="display: flex; justify-content: center; align-items: center; min-height: 80vh;">
|
||||
<div class="box" style="width: 100%; max-width: 500px; padding: 4rem;">
|
||||
<div style="text-align: center; margin-bottom: 3rem;">
|
||||
<h2 style="font-size: 2.2rem; font-weight: 900; margin-bottom: 0.5rem;">Join AfgCars</h2>
|
||||
<p style="color: var(--text-secondary);">Create your premium account today</p>
|
||||
<div class="container" style="display: flex; justify-content: center; align-items: center; min-height: 80vh; padding: 4rem 0;">
|
||||
<div class="box" style="width: 100%; max-width: 550px; padding: 4.5rem;">
|
||||
<div class="text-center mb-3">
|
||||
<h2 class="fw-black" style="font-size: 2.8rem; color: #fff; margin-bottom: 0.5rem; line-height: 1.1;">Join AfgCars</h2>
|
||||
<p class="text-secondary fw-bold" style="font-size: 1.1rem;">Create your premium automotive portal today</p>
|
||||
</div>
|
||||
|
||||
<?php if ($error): ?>
|
||||
<div class="glass" style="padding: 1rem; border-color: rgba(255, 71, 87, 0.3); background: rgba(255, 71, 87, 0.05); color: var(--danger); margin-bottom: 1.5rem; border-radius: 12px; font-size: 0.9rem; font-weight: 600; text-align: center;">
|
||||
<div class="alert alert-error mb-2 text-center" style="justify-content: center;">
|
||||
<?= $error ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<form method="POST">
|
||||
<div class="form-group">
|
||||
<label style="font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-secondary); font-weight: 700;">Full Name</label>
|
||||
<input type="text" name="name" class="form-control" required placeholder="John Doe" style="margin-top: 0.5rem;">
|
||||
<label class="text-secondary fw-black mb-1" style="text-transform: uppercase; letter-spacing: 2px; font-size: 0.75rem;">Full Legal Name</label>
|
||||
<input type="text" name="name" class="form-control" required placeholder="John Doe">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label style="font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-secondary); font-weight: 700;">Email Address</label>
|
||||
<input type="email" name="email" class="form-control" required placeholder="name@example.com" style="margin-top: 0.5rem;">
|
||||
<label class="text-secondary fw-black mb-1" style="text-transform: uppercase; letter-spacing: 2px; font-size: 0.75rem;">Email Address</label>
|
||||
<input type="email" name="email" class="form-control" required placeholder="name@example.com">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label style="font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-secondary); font-weight: 700;">Password</label>
|
||||
<input type="password" name="password" class="form-control" required placeholder="••••••••" style="margin-top: 0.5rem;">
|
||||
<label class="text-secondary fw-black mb-1" style="text-transform: uppercase; letter-spacing: 2px; font-size: 0.75rem;">Security Password</label>
|
||||
<input type="password" name="password" class="form-control" required placeholder="••••••••">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary" style="width: 100%; margin-top: 1.5rem; padding: 1.1rem;">Create Account</button>
|
||||
<button type="submit" class="btn btn-primary w-full mt-2 fw-black" style="padding: 1.3rem; font-size: 1.1rem; letter-spacing: 1px;">CREATE PREMIUM ACCOUNT</button>
|
||||
</form>
|
||||
|
||||
<p style="text-align: center; margin-top: 2.5rem; color: var(--text-secondary); font-size: 0.95rem;">
|
||||
Already have an account? <a href="login.php" style="color: var(--primary-color); font-weight: 700; text-decoration: none;">Sign in</a>
|
||||
<p class="text-center mt-3 text-secondary fw-bold" style="font-size: 1rem;">
|
||||
Already registered? <a href="login.php" class="text-gold" style="text-decoration: none; border-bottom: 1px solid var(--primary-color);">Sign in here</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user