# R/ Jeilani National School — Official Website A complete, multilingual (English / Tamil / Sinhala) school website with a secure admin content management system, built with plain PHP 8 + MySQL (MariaDB) and a vanilla CSS/JS front end. It is designed to match a green-and-gold academic identity and to migrate cleanly to WordPress + Elementor later. --- ## 1. Requirements - PHP 8.1+ (developed on PHP 8.2) with extensions: `pdo_mysql`, `mbstring`, `fileinfo`, `gd`, `openssl`, `json`. - MySQL 5.7+ / MariaDB 10.4+. - Apache with `mod_rewrite` (XAMPP is fine). The app is served from `http://localhost/rjeilani/`. ## 2. Installation (XAMPP) 1. Copy the project folder to `C:\xampp\htdocs\rjeilani`. 2. Start **Apache** and **MySQL** from the XAMPP control panel. 3. Import the database. In phpMyAdmin (or the command line) run `database/rjeilani.sql`: ``` C:\xampp\mysql\bin\mysql.exe -u root < database\rjeilani.sql ``` 4. Check `includes/config.php` — the defaults are: - database `rjeilani`, user `root`, empty password, host `localhost`; - `base_url` empty (auto-detected). Set an absolute URL in production. 5. Make sure `uploads/` is writable by the web server. 6. Open `http://localhost/rjeilani/`. ## 3. Admin panel - URL: `http://localhost/rjeilani/admin/` - Default account: **admin** / **Jeilani@2026** (email `admin@local.test`). - **Change this password immediately** under *Users*. From the admin you can manage: pages, news, events, academics, co-curricular activities, achievements, gallery albums and photos, downloads, teachers & staff, alumni, the media library, enquiry submissions, site settings and users. Every content item can be edited in English, Tamil and Sinhala. ## 4. Project structure ``` rjeilani/ ├── index.php Front controller / router ├── robots.txt Crawler rules ├── .htaccess Pretty-URL rewrite to index.php ├── admin/ Admin CMS (see admin/includes/) ├── assets/ │ ├── css/site.css Public design system │ ├── css/admin.css Admin panel styles │ ├── js/site.js Header, mobile nav, search toggle │ ├── sitemap.php XML sitemap │ └── images/ School crest and other images ├── database/rjeilani.sql Schema + seed data ├── docs/ Migration and design notes ├── includes/ │ ├── bootstrap.php Session + shared requires │ ├── config.php DB, locales, colour tokens │ ├── functions.php Helpers (i18n, URLs, media, CSRF, SEO) │ ├── database.php PDO wrapper + enquiry storage │ ├── repositories.php Localised content queries │ ├── content.php Navigation + request resolver │ ├── header.php / footer.php │ └── templates/ home, page, archive, detail, calendar, search, contact ├── languages/ en.php, ta.php, si.php └── uploads/ Uploaded media (YYYY/MM/…) ``` ## 5. Multilingual model - Every content type stores language-neutral columns in its main table and the translated text in a matching `*_translations` table keyed by `(foreign key, locale)`. - URLs are language-prefixed: `/en/…`, `/ta/…`, `/si/…`. The chosen language is remembered in the session. - Missing interface strings fall back to English (`languages/en.php` is the canonical set). ## 6. Design system Defined in `includes/config.php` (`colours`) and `assets/css/site.css`: | Token | Value | |-----------------|-----------| | Primary green | `#176B3A` | | Secondary green | `#2E8B57` | | Heritage gold | `#D6B63C` | | Soft ivory | `#FFFDF5` | | Soft sage | `#E8F1E8` | | Light gold | `#F8F1D7` | | Deep green text | `#183A2B` | | Diamond blue | `#4A78B8` | Headings use **Lora**, body text **Inter**, with **Noto Sans Tamil** and **Noto Sans Sinhala** for the respective scripts. ## 7. Content policy The site never invents facts. Any detail that has not yet been confirmed by the school (history, statistics, names, results, addresses, social links, …) is shown as a clearly marked placeholder (`[To be updated]` / a “to be updated” note) and can be replaced through the admin or *Settings*. ## 8. SEO - Per-page `