# Lounge/index.php Upload Checklist

## The Problem

After uploading lounge/index.php, the page doesn't load online. The PHP file depends on `menu.json` which must exist in the same directory.

## ✅ Before Uploading - Verify These Files Exist Locally

In your `/lounge/` folder, make sure you have:

```
lounge/
├── index.php              ← Main page file
├── menu.json              ← REQUIRED - Contains all menu items
├── admin.php              ← Optional admin file
├── css/                   ← CSS folder
│   ├── bootstrap.css
│   ├── app.css
│   ├── swiper-bundle.min.css
│   ├── all.min.css
│   └── aos.css
├── js/                    ← JavaScript folder
│   ├── jquery.min.js
│   ├── app.js
│   ├── bootstrap.min.js
│   └── (other JS files)
├── images/                ← Images folder
└── fonts/                 ← Fonts folder
```

## 🚀 Upload Instructions

### Using FTP (Recommended):

1. Connect to your server via FTP
2. Navigate to your website root or appropriate folder
3. **IMPORTANT**: Upload the ENTIRE `lounge` folder (including all subfolders and files)
4. Do NOT upload just the `index.php` file alone
5. Ensure file/folder permissions:
   - Folders: 755
   - Files: 644
   - menu.json: 644 (must be readable)

### Using cPanel/File Manager:

1. Upload the entire `lounge` folder preserving the directory structure
2. Make sure `menu.json` is uploaded alongside `index.php`
3. Check file permissions if pages show errors

### Using Git/GitHub:

1. Push all changes including `menu.json`
2. Pull on the server: `git pull origin main`

## 🔍 Verify Upload Success

After uploading, visit this diagnostic page in your browser:

```
https://yourdomain.com/lounge/check-files.php
```

This will show you exactly which files are missing or have permission issues.

## ⚠️ If Page Still Shows Blank

The updated `index.php` now displays error messages. If you see an error:

1. **"menu.json not found"** → Re-upload the `menu.json` file
2. **"Could not read menu.json"** → Check file permissions (should be 644)
3. **"Invalid JSON syntax"** → The `menu.json` file may be corrupted; re-upload it
4. **Blank white page** → Check server error logs or contact hosting support

## 📝 Files in This Upload

- `index.php` - Updated with better error handling
- `check-files.php` - New diagnostic tool
- `menu.json` - Must be included!
- All CSS files in `css/` folder
- All JS files in `js/` folder
- All images in `images/` folder

## ❓ Still Not Working?

1. Run the diagnostic: `yourdomain.com/lounge/check-files.php`
2. Check your hosting provider's error logs
3. Verify PHP version supports `file_get_contents()` (all modern versions do)
4. Ensure your domain uses HTTPS if required

---

**Key Point**: Always upload the complete `lounge` folder structure, not just individual files!
