# Fizasite - Dynamic PHP + MySQL Website

Dynamic website for **CRIMSON - Manufacturer of Corrugated Boxes** with admin panel. Database name: **fizasie**.

## Setup

1. **Database**
   - Open phpMyAdmin (http://localhost/phpmyadmin) or MySQL CLI.
   - Import the schema: run the SQL in `database/schema.sql` (creates database `fizasie` and all tables).

2. **Config**
   - Edit `config/database.php` if needed (host, user, password). Default: `root` with no password.

3. **Run**
   - Place project in XAMPP `htdocs` (e.g. `htdocs/fizasite`).
   - Open: http://localhost/fizasite/

## Client section & footer (dynamic)

- Import `database/client_footer.sql` once (or use full `schema.sql` on fresh install).
- **Admin → Client section**: headline, subtext, optional image (`uploads/home/`).
- **Admin → Stats**: counters (value + label) shown in a row on the home page.
- **Admin → Footer**: columns; body lines as `Label|page.php` or plain text; optional HTML above copyright.
- **Admin → Our clients**: client logos on home page; import `database/our_clients.sql` once.
- **Dummy clients**: SVG placeholders in `uploads/clients/client_dummy_*.svg` — run `database/seed_our_clients_dummy.sql` to populate the home section.

## Admin Panel

- URL: **http://localhost/fizasite/admin/**
- **Dashboard** groups: Catalogue, Content, Home page (client section, stats, clients, footer), Messages, Settings.
- **Logo**: Admin → **Settings** → at the top, **Site logo** — upload PNG/JPG/SVG; stored in `uploads/site/`, shown in header.
- **Sidebar**: left menu on desktop; ☰ opens drawer on mobile.
- **Videos**: Admin → Videos — add YouTube URL or upload MP4/WebM/OGG (run `database/video_smtp_update_simple.sql` once).
- **SMTP**: Admin → SMTP mail — enable and set host/user/pass; enquiry & contact then email the notify address.
- Default login: **admin** / **password**
- Change password after first login (edit `admin_users` or add a “change password” feature).

## Features

- **Frontend:** Home, About us, Products, Technology & Quality, Enquiry, Photo Gallery, Video gallery, Contact us, Search.
- **Products:** Listing by category, product detail page with image and information.
- **Admin:** Dashboard, Products (add/edit/delete + image upload), Categories, Pages (About, Technology, Home content), Gallery, Videos, Enquiries, Site settings (name, tagline, contact).

## Folders

- `config/` – database and app config
- `includes/` – header, footer
- `uploads/products/` – product images
- `uploads/gallery/` – gallery images
- `admin/` – admin panel (login, CRUD)
- `database/schema.sql` – database structure and seed data
