# SAVORIA — PHP + MySQL Website

A complete luxury Mediterranean restaurant website with bilingual Arabic/English support,
delivery service, reservations, order tracking, and admin panel.

## Quick Setup

1. **Import database:**
   ```bash
   mysql -u root -p < schema.sql
   ```

2. **Configure database** in `config.php`:
   ```php
   define('DB_HOST', 'localhost');
   define('DB_NAME', 'savoria');
   define('DB_USER', 'your_username');
   define('DB_PASS', 'your_password');
   ```

3. **Deploy files** to your web root (`/var/www/html/` or `public_html/`)

4. **Admin login:** visit `/admin/index.php`
   - Default password: `savoria2024`
   - Change it in `config.php` → `ADMIN_PASSWORD`

## File Structure

```
savoria-php/
├── index.php           ← Home page
├── menu.php            ← Menu with category filter
├── delivery.php        ← Delivery service page
├── order.php           ← Cart + checkout (Delivery / Dine-In / Pickup)
├── reservations.php    ← Table booking
├── track.php           ← Order tracking (auto-refresh)
├── config.php          ← DB connection + settings
├── lang.php            ← Arabic / English translations
├── schema.sql          ← MySQL schema + seed data (17 menu items)
├── includes/
│   ├── header.php      ← Nav + HTML head
│   └── footer.php      ← Footer + closing tags
├── admin/
│   ├── index.php       ← Admin dashboard (Menu/Orders/Reservations)
│   ├── login.php       ← Admin login
│   └── logout.php      ← Session destroy
└── assets/
    ├── css/style.css   ← Full dark luxury theme
    └── img/            ← Place your food images here
```

## Features

- **Bilingual:** Arabic (RTL) / English toggle, stored in cookie
- **Delivery service:** dedicated page + delivery/dine-in/pickup order types
- **Delivery fee:** $5 flat, free over $80 (configurable in `config.php`)
- **Cart:** session-based, persistent across pages
- **Order tracking:** auto-refresh every 30 seconds, step-by-step progress
- **Admin panel:** update prices/images, change order status, view reservations
- **17 menu items** seeded across 6 categories

## Language Switching

Click the language button in the nav to toggle Arabic ↔ English.
The preference is stored in a cookie for 1 year.

## Requirements

- PHP 8.0+
- MySQL 5.7+ / MariaDB 10.3+
- PDO extension
- Sessions enabled
