How peterlevis3327/vehicle-website works
This is a PHP vehicle-marketing catalog with a JavaScript browser UI and a small admin workflow. Visitors can load the vehicle gallery, search by vehicle type, or filter by price; the browser calls the corresponding PHP endpoint, which queries MySQL and returns JSON for display. Administrators log in using a PHP session, reach the vehicle-entry form, and submit vehicle details and an image for insertion. The graph covers the sampled runtime; the README is empty, and unsampled frontend pages and backend files are not assumed to add capabilities.
Main entry points: config.php DB connection · script.js Catalog UI · get_vehicles.php List vehicles · search_vehicles.php Search vehicles
Components 11
Browser catalog
- Catalog UI
frontend/script.js - Vehicle gallery
frontend/script.js
Admin workflow
- Admin login
frontend/login.php - Vehicle form
frontend/admin.php
PHP and storage
- Vehicle upload
backend/add_vehicle.php - List vehicles
backend/get_vehicles.php - Search vehicles
backend/search_vehicles.php - Price filter
backend/filter_by_price.php - DB connection
backend/config.php - Vehicle database
Other components
- Visitor
Connections 15
- Catalog UI → List vehicles: fetches list
frontend/script.js - Catalog UI → Search vehicles: searches by type
frontend/script.js - Catalog UI → Price filter: filters prices
frontend/script.js - List vehicles → DB connection: includes connection
backend/get_vehicles.php - Search vehicles → DB connection: includes connection
backend/search_vehicles.php - Price filter → DB connection: includes connection
backend/filter_by_price.php - Vehicle upload → DB connection: includes connection
backend/add_vehicle.php - DB connection → Vehicle database: opens MySQL connection
backend/config.php - List vehicles → Vehicle database: queries vehicles
backend/get_vehicles.php - Search vehicles → Vehicle database: searches vehicles
backend/search_vehicles.php - Price filter → Vehicle database: filters vehicles
backend/filter_by_price.php - Vehicle upload → Vehicle database: inserts vehicle
backend/add_vehicle.php - Catalog UI → Vehicle gallery: renders results
frontend/script.js - Admin login → Vehicle form: redirects after login
frontend/login.php - Vehicle form → Vehicle upload: submits vehicle form
frontend/admin.php