Author: Asgard | Instagram: @3.9.9.6 | Telegram: @asgard_0
Files Preview is a simple, lightweight web application built with PHP and MySQL that functions as a product or digital item catalog and manager. It provides a simple administration interface for uploading product details and associated media, and a public-facing site for users to browse and download file packages.
This project is ideal for showcasing digital assets where multiple files need to be neatly organized, previewed, and then downloaded as a package.
- Product Management: Add new products with a name, description, and status (e.g., free/paid) via the simple admin panel (
admin.htmlandadd.php). - Multi-File Upload: Supports uploading a main image, multiple preview images (for a gallery/slider), and multiple post images (the full set of files).
- Dynamic Catalog: Products are fetched from a MySQL database and displayed on the main page (
index.php). - Product Detail Page: A dedicated page (
product.php) displays all media, including an image gallery/slider for the preview images. - ZIP Download Utility: Users can download all associated "post" images for a product as a single ZIP file using the
download_posts_zip.phputility.
- Backend: PHP
- Database: MySQL
- Frontend: HTML, CSS, JavaScript
To run this project, you need a local development environment that supports PHP and MySQL. XAMPP, WAMP, or MAMP are the recommended solutions.
- A Local Server Stack: Install a server package like XAMPP.
- Web Browser: Any modern web browser.
- Start Services: Start the Apache and MySQL services in your local server control panel (e.g., XAMPP).
- Create Project Folder: Navigate to your web server's root directory (e.g.,
C:\xampp\htdocs\) and create a new folder, for example,files-preview. - Copy Files: Place all your project files (
index.php,config.php,admin.html, etc.) into thisfiles-previewfolder. - Create Image Directories: Inside your
files-previewfolder, create the following empty subdirectories, as these are used for file uploads:imgs(for the main product image)preview(for the preview images)posts(for the full set of post images)
- Access phpMyAdmin: Open your web browser and go to
http://localhost/phpmyadmin/. - Create Database: Click the Databases tab and create a new database named
bot.- Note: This name is specified in your
config.phpfile.
- Note: This name is specified in your
- Import SQL: Select the newly created
botdatabase. Click the Import tab. - Upload
files_preview.sql: Click Choose file and select thefiles_preview.sqlfile from your project folder. Click Go to import the database table structure (products) and initial data.
- Public Site (Catalog):
http://localhost/files-preview/index.php - Admin Panel (To add new images):
http://localhost/files-preview/admin.html