# Features — Kyalami9Hour2019

Evidence date: 2026-10-10. Source tip: `master` at `5b60e52` (2020-10-28). `qa` and `prod` tips are `e0f870a` and `0950599` (2020-12-04).

No features document existed in the repository or in Silicon Ark. Status words below mean:

- **Current** — present on `master` and reachable from the public portal or from a URL the public views generate.
- **Present, not on the public path** — code exists; the Kyalami header does not link to it.
- **Changed on qa/prod** — behaviour on those branches differs from `master`.
- **Not found** — searched for and absent.

## Current features

### Public accreditation wizard

- **Status:** Current.
- **Where:** `application/modules/default/controllers/IndexController.php`, `application/modules/default/views/scripts/index/index.phtml`, `ApplicationController::applyAction`.
- **What:** Home page for code `5F9298188128B`. Steps are Personal, Organisation, Photo, optional Apply, Finish. Ajax submit returns a reference and a thank-you modal, then reloads.
- **Personal fields:** first name, surname, email, mobile, ID or passport number, gender (Male / Female), suburb. All marked `required` in the view.
- **Organisation fields:** organisation name, category, role, reason for application. Media fields (invite source, producer name, producer email) depend on category and `MediaOnly`. See business rules.

### Sign-in, profile, sign-out

- **Status:** Current.
- **Where:** `ApplicationController` `loginAction`, `loginnowAction`, `profileAction`, `logoutAction`; views `application/login.phtml`, `application/profile.phtml`; header links in `application/layouts/default.phtml`.
- **What:** Email plus reference. Profile shows status, messages, services, zones, and an edit form. Header labels are "Sign-In", "Application Form" (hidden until login script shows it), and "Login Out".

### Attendance confirm and cancel

- **Status:** Current.
- **Where:** `attendanceAction`, `application/attendance.phtml`, links rendered on the profile when `AttendanceKey` is set.
- **What:** `att/1` confirms attendance. `att/2` declines the application.

### Closed event page

- **Status:** Current.
- **Where:** `application/closed.phtml`, selected by the close-date check on `/` and on `/application/apply`.
- **What:** Banner, title, closed sentence, contact mailto.

### Linked-event apply step

- **Status:** Current, conditional on data.
- **Where:** `Model_AccreditationLinks`, Apply step in `index/index.phtml`.
- **What:** Checkboxes for linked rows with `DateTo` today or later. Ticked values become extra application rows.

### Headshot crop and Footprint upload

- **Status:** Current.
- **Where:** Photo step and cropper scripts in `index/index.phtml`; `sendImage` and `updateimageAction` in `ApplicationController`.
- **What:** Browser cropper. Submit and later profile changes POST the image to Footprint. Profile reads `https://www.footprintapp.net/accre/photos/{Ref}.jpg`.

### Applicant email

- **Status:** Current when the accreditation row has a template.
- **Where:** `EmailApplicant`, `EmailApplicantDeclined`, `sendMail`.
- **What:** HTML mail through Gmail SMTP. Subject is always "Kyalami 9 Hour 2020 Notification" on `master`.

### Browser gate

- **Status:** Current.
- **Where:** `application/layouts/default.phtml`.
- **What:** Internet Explorer and an empty user agent see a "browser not supported" panel. Firefox, Safari, Chrome, Flock, and Opera see the portal.

### Theme colour switch

- **Status:** Current, conditional on data.
- **Where:** `default.phtml` when `DATA["Theme"] == 2`.
- **What:** Wizard step colours change to `#096b47` (current) and `#9B0E17` (done).

### Deployment

- **Status:** Current on `qa` and `prod` branches. `master` has the scripts and has no pipeline step.
- **Where:** `bitbucket-pipelines.yml`, `codedeploy_deploy.py`, `appspec.yml`, `scripts/`.
- **What:** Zip the tree, upload to S3, create a CodeDeploy deployment. Files land in `/mnt/data/www/html/magus.events/kyalami9hour2019.magus.events/`. ApplicationStop runs `scripts/remove_archives.sh`. ApplicationStart runs `service httpd start`.

## Features present in code and not on the public path

### Apply by any accreditation code

- **Status:** Present. The home page does not link to it. The form's action uses whatever code the controller assigned.
- **Where:** `ApplicationController::applyAction`.

### Duplicate-email check endpoint

- **Status:** Present. Called by the wizard, not by a page of its own.
- **Where:** `IndexController::checkemailAction` and `ApplicationController::checkemailAction`. Both call `Model_AccreditationList::checkEmails`.

### Alternate apply actions

- **Status:** Present, not linked from the home wizard.
- **Where:**
  - `applymultipleAction` — echoes the reference before insert, does not call `sendImage`, and can fall through to the thank-you view.
  - `applytestAction` — same shape as `applyAction`, with view `application/applytest.phtml`.
  - `testattendanceAction` — attendance flow that prints exceptions.
  - `barcodeAction` — draws a Code 39 barcode for the fixed text `FD5T67` using `Barcode39.php`.
  - `testAction` and `indexAction` on `ApplicationController` — `indexAction` lists every role from `getAll()` and is not the public wizard.
  - `partnersAction` — empty.

### Supplier company portal

- **Status:** Present, not linked from the Kyalami header.
- **Where:** `application/modules/supplier/controllers/` — `LoginController`, `RegisterController`, `PermitsController`, `UsersController`, `CompanyController`, `OrganisationController`, `OrgController`, `EventsController`, `IndexController`, `AuthonController`.
- **What the controllers implement:** company login (MD5, plus one hard-coded bypass password that is not reproduced), password reset mail to SA Rugby wording, company registration, permits (create, duplicate, cancel, PDF path on the supplier index), users, and organisation profile.
- **Layout:** config expects `supplier.phtml`. That file is not in the repository.

### Maintenance splash

- **Status:** Present as comments only.
- **Where:** top of `public/index.php`. A "technical difficulties" message and `/Background4_2018_maintenance.jpg` are commented out, so the application boots.

## Changed relative to earlier commits

| When | Commit | Change |
|---|---|---|
| 2020-10-27 | `afcd3f3` | Public title and terms sentence changed from "Kyalami 9 Hour" to "Kyalami 9 Hour 2020". Home and login code changed from `5D9466852AE6B` to `5F9298188128B`. ApplicationStop hook changed from `scripts/stop_server` to `scripts/remove_archives.sh`. `stop_server` remains in the tree and is no longer referenced by `appspec.yml` |
| 2020-12-04 | `d80a39c` on `FN-55`, merged to `qa` and `prod` | When the email is already used, `#email_comfirm` is set to that email as well as the warning label. `master` only clears the confirm field |
| 2020-12-04 | `qa` / `prod` vs `master` | Outbound mail identity changes from `accreditation@kyalami9hour.com` to `accreditation@magus.events`. `application.ini` is tracked on those branches. `qa` database host is `qadb.footprintapp.net`; `prod` host is `db.footprintapp.net` |

## Deprecated or removed

- Hard-coded event code `5D9466852AE6B` and the untitled "Kyalami 9 Hour" strings were replaced in `afcd3f3`. They remain only in Git history.
- Commented SMTP settings for `accreditation@footprintapp.net` and for port 465 remain in `sendMail` and are not active.
- `IndexController` POST path that would save a photo locally is not used by the form. `applyAction` has `SavePhoto` commented out and uses `sendImage` instead.
- No feature flag or changelog marks a feature as removed after 2020-12-04. The repository simply stops.

## Not found

- Approver, decline (except attendance cancel), or zone-assignment UI.
- Account passwords for applicants. Sign-in is email plus reference.
- Payment, ticketing, or RFID encoding.
- `OpenDate` enforcement.
- Queues, cron, or background workers.
- Automated tests (`phpunit`, a `tests/` directory). Files named `test` under the modules are extra actions and views, not a test suite.
- README, changelog, or in-repo PRD.
- `sonar-project.properties` and `sonarqube_scan.bat` (named by the onboarding scan, absent from Git).
- Composer or npm manifests. Front-end libraries are committed under `public/`.
