# Car Sells in Afghanistan - Modern Web Application This project is a modern, feature-rich web application for a car dealership in Afghanistan. It provides a platform for users to browse, book, and review cars, along with a comprehensive admin panel for managing the entire platform. This project was built using PHP, MySQL, and Bootstrap, and features a clean, responsive, and modern design. ## Features - **Modern & Responsive Design:** A beautiful and intuitive user interface built with Bootstrap and custom modern styling. - **Car Listings:** Browse a filterable and searchable list of available cars. - **Detailed Car View:** View detailed information and images for each car. - **User Authentication:** Secure user registration and login system. - **Car Booking System:** Registered users can book cars, which reserves the car until an admin approves the sale. - **Review System:** Users can leave ratings and reviews on cars they are interested in. - **Comprehensive Admin Dashboard:** - **Analytics:** View stats on total users, cars, sales, and pending bookings. See charts for sales over time and booking distributions. - **User Management:** View, search, and manage user accounts. - **Car Management:** Add, edit, and delete car listings. - **Booking Management:** Approve or cancel car bookings. - **Review Management:** Approve or delete user-submitted reviews. - **Afghanistan-Specific Details:** Car listings include relevant details for the Afghan market, such as province and city. ## Getting Started To get the application up and running on your local system, follow these steps. ### Prerequisites You will need a LAMP (Linux, Apache, MySQL, PHP) or equivalent stack. - Apache - PHP 8.0+ - MySQL or MariaDB ### 1. Set up the Database 1. **Create a database** in your MySQL/MariaDB server. For example: ```sql CREATE DATABASE car_dealership; ``` 2. **Configure the connection.** Open `db/config.php` and update the following with your database details: - `DB_HOST` - `DB_NAME` - `DB_USER` - `DB_PASS` ### 2. Run Installation Scripts Open your web browser and navigate to the following URLs in order. This will set up the necessary tables and seed them with initial data. 1. `http:///db/setup_users.php` 2. `http:///db/setup_cars.php` 3. `http:///db/migrate.php` ### 3. Access the Application Once the setup is complete, you can access the application in your browser: - **Main Site:** `http:///` - **Admin Panel:** `http:///admin/` ### 4. Admin Login - **Username:** `admin` - **Password:** `123` It is highly recommended to change the default admin password after your first login.