MASJID SALAH BOARD — FOLDER STRUCTURE ===================================== Upload the WHOLE masjid-board folder, keeping this shape exactly. The files find each other by relative path, so a flat folder will not run. masjid-board/ │ ├── README.md full documentation — read this ├── STRUCTURE.txt this file ├── .htaccess blocks .sql and .md over HTTP │ ├── config/ │ ├── .htaccess deny all │ └── config.php ★ EDIT THIS — DB details + BASE_URL │ ├── includes/ never served directly │ ├── .htaccess deny all │ ├── db.php PDO connection + settings helpers │ ├── auth.php login, sessions, CSRF │ ├── admin_layout.php admin header/footer │ ├── board_data.php assembles everything the board shows │ └── PrayerTimeService.php Egyptian Gen. Authority of Survey (method 5) │ ├── cron/ │ ├── .htaccess deny all │ └── fetch_times.php nightly prayer-time pull │ ├── install/ │ ├── .htaccess deny all │ ├── install.php run once, then DELETE │ ├── migrate.php run after every upgrade — safe to repeat │ └── schema.sql database tables │ └── public/ ← THE ONLY FOLDER THE WEB SHOULD SERVE ├── .htaccess security headers, no directory listing ├── index.php THE BOARD (display screen) ├── health.php diagnostics — open in a browser, then DELETE │ ├── api/ │ └── board.php JSON feed the screen polls │ ├── assets/ │ ├── css/board.css board styling │ └── js/board.js clock, countdown, rotation │ └── admin/ ├── index.php dashboard ├── login.php sign in ├── logout.php sign out ├── salah.php 1. CHANGE SALAH TIMES ├── content.php 2. POST HADITH OR AYAH ├── announcements.php 3. ANNOUNCEMENTS ├── settings.php masjid details, location, display └── assets/admin.css admin styling TWO index.php FILES ------------------- public/index.php = the display board public/admin/index.php = the admin dashboard They are DIFFERENT files. Never let one overwrite the other. HIDDEN FILES ------------ Six .htaccess files ship with this. They start with a dot, so some FTP clients and file managers hide them. In cPanel File Manager, click Settings (top right) and tick "Show Hidden Files (dotfiles)". If they go missing, nothing breaks visually — but config.php becomes readable over the web, which exposes your database password. WHERE TO PUT IT ON cPANEL ------------------------- Best: put masjid-board OUTSIDE public_html, then create a subdomain (Domains → Create A New Domain) with its document root set to /home/youracct/masjid-board/public Only public/ is then reachable. Everything else is invisible. Workable: put masjid-board inside public_html and rely on the .htaccess files. Set BASE_URL to /masjid-board/public in config/config.php. Board: your-domain.com/masjid-board/public/ Admin: your-domain.com/masjid-board/public/admin/login.php SETUP, IN ORDER --------------- 1. Create the MySQL database and user in cPanel. Both get prefixed with your account name, e.g. youracct_masjidboard. Add the user to the database with ALL PRIVILEGES. 2. Edit config/config.php — DB_NAME, DB_USER, DB_PASS, BASE_URL. 3. From the masjid-board folder (NOT from inside public/): php install/install.php admin "Mufti Ismael Allan" It asks for a password and prints every step. 4. Pull the prayer times: php cron/fetch_times.php 5. Add the nightly cron job in cPanel (Cron Jobs), 2:00 AM: /usr/local/bin/php /home/youracct/masjid-board/cron/fetch_times.php 6. Open your-domain/health.php and confirm every line reads OK. 7. Delete install/install.php and public/health.php. 8. Sign in and set your real coordinates under Settings. The seeded values are for Blantyre — change them to your masjid.