# Features — SuperHero2020

Evidence date: 2026-10-02. Source: `master` at `ab4effc` (2020-02-07).

No features document existed in the repository or in Silicon Ark. Status below is recovered from code. "Current" means the behaviour is on `master` and reachable from a controller or view. It does not mean the site is still operated.

## Current features

### Applicant application wizard

A multi-step form (jQuery Steps): Personal, Organisation, Photo, optional Apply (linked events), Finish.

- Personal: first name, surname, email, mobile, ID or passport number.
- Organisation: organisation, category, role, reason for application.
- Photo: crop and upload, 1.5 MB client limit, placeholder `/accre/profile-icon.png`.
- Finish: optional accreditation note checkbox, required terms checkbox, terms popup from `TermsAndConditions`.

Evidence: `application/modules/default/views/scripts/index/index.phtml` (homepage, posts to `/application/apply/code/{code}`), `application/modules/default/views/scripts/application/apply.phtml` (posts to `/accreditations/application/apply/code/{code}`), `ApplicationController::applyAction`.

### Hardcoded event on the homepage and sign-in

`/` and `/application/login` load accreditation code `5DEB6F11DDA93`. The apply action uses the code in the URL.

Evidence: `IndexController::indexAction`, `ApplicationController::loginAction`, `ApplicationController::applyAction`.

### Closed applications

When `CloseDate` at `24:00:00` is not in the future, the form is replaced by `application/closed.phtml`.

### Reference number and confirmation mail

A 6-character uppercase hex reference is stored on `AccreditationApplycation.Ref`. If `EmailNotes` is set, that HTML template is mailed. The apply response body is the reference. The page shows it and reloads after 5 seconds. The server-side thank-you render sits after `exit` and does not run.

Evidence: `ApplicationController::applyAction`, `random_id`, `EmailApplicant`, `apply.phtml` ajaxForm handler. A separate thank-you template exists at `application/thankyou.phtml` and is used by `applymultipleAction`.

### Duplicate email warning

Browser check against existing applications for the same email and event. Message: "Email already in use,please use different email address."

Evidence: `checkemailAction` on `IndexController` and `ApplicationController`; scripts in `apply.phtml`, `index/index.phtml`, and `profile.phtml`. The three views call three different URLs. Only `/index/checkemail` and `/application/checkemail` exist in this app.

### Media / producer capture

Days attending, editor/producer name, and editor/producer email. Shown when `MediaOnly == 1`, or when `MediaOnly` is not set and the applicant picks category id `1`.

Evidence: `apply.phtml` (`ChangeSelectCat`, `MediaOnly` block).

### Linked-event applications

Extra wizard step of checkboxes for linked accreditations still open (`DateTo >= today`). Each checked `OID` is inserted as another application row.

Evidence: `Model_AccreditationLinks::getAllWhere`, `applyAction` `apply[]` loop, `apply.phtml`.

### Supplier-registration notice

When role `SupplierReg` is 1, the form links the applicant to `http://supplier.sarugby.online`. Submit is not blocked.

Evidence: `apply.phtml` `#suppliers_show_message`. The layout item for `supplier.sarugby.online/register` is commented out (`default.phtml`).

### Applicant sign-in

Email plus reference number, matched to `AC` + `Ref` + `email`. Session keys `Code` and `AAID`. Failure text: "Bad credentials." Layout links: Sign-In, Application Form, "Login Out".

Evidence: `login.phtml`, `loginnowAction`, `logoutAction`, `default.phtml`.

### Application profile

Shows reference and a status label (New Application, Pending, In Review, Confirmed, Declined, Approved). Editing of name, contact, organisation, category, and role is rendered when the status is not Confirmed, Declined, or Approved. Services and zones are loaded for display.

Evidence: `profileAction`, `profile.phtml`, `updateAction`.

### Photo stored on Footprint

Apply and profile image update POST the image to `https://www.footprintapp.net/accreditations/application/updateimage`. The profile reads `https://www.footprintapp.net/accre/photos/{Ref}.jpg`.

Evidence: `sendImage`, `updateimageAction`, `remoteFileExists`.

### Attendance confirmation

Links on the profile: attending (`att=1`) or not attending (`att=2`), keyed by `AttendanceKey`. Confirming clears the key and sends `EmailAttandanceConfirmed`. Declining sets status Declined, history "Declined by Applicant", and sends `EmailRejected` when that template exists. A used or unknown key shows a warning.

Evidence: `attendanceAction`, `attendance.phtml`, `profile.phtml`.

### Event title from fixture or date range

Title includes home vs away squad and fixture date when `FID > 0`, otherwise the accreditation date range and location.

Evidence: `getAccreditationName` on `ApplicationController` and a copy on `IndexController`.

### Error pages

Missing route, controller, or action returns HTTP 404 "Page not found". Other errors return HTTP 500 "Application error".

Evidence: `ErrorController`, `views/scripts/error/error.phtml`.

### Deployment

`qa` and `prod` branches zip the tree and run `codedeploy_deploy.py` (S3 plus AWS CodeDeploy). The app is installed under `/mnt/data/www/html/magus.events/superhero2020.magus.events/`. Hooks install and start `httpd`, and delete old CodeDeploy revision directories.

Evidence: `bitbucket-pipelines.yml`, `appspec.yml`, `scripts/*`.

## Completed features

Nothing in the repository is marked completed or shipped as a separate release. The `prod` merge on 2020-02-07 is the latest commit inspected. Treating the portal as "finished for the 2020 event" is **Inferred** from the event title and the commit date, not from a changelog.

## Planned features

No roadmap, TODO file, or ticket list is in the repository. Planned work is **Unknown**.

Commented blocks are not treated as a roadmap. They are recorded under removed or inactive below.

## In development

No branch other than `master` was inspected. `bitbucket-pipelines.yml` names `qa` and `prod`. Their contents are **Unknown / Requires Confirmation**.

## Recently changed

The only commit available in this inspection is `ab4effc` (2020-02-07), "Merge branch 'prod'". The diff of that merge was not expanded (shallow clone). What `prod` changed relative to the previous `master` is **Unknown**.

## Present in code, not wired to a screen in this repository

These models and actions exist. No applicant or staff view in this repo calls them. Provenance: **Implemented** as library code. Product use is **Unknown / Requires Confirmation** (likely leftover from the Footprint accreditation module).

| Area | Evidence |
|---|---|
| Permits, occupants, download lists | `AccreditationPermits.php` (`Accreditation_Permits`) |
| Event gates | `AccreditationGates.php` (`EventGates`) |
| Loading zones and load-service types | `AccreditationLoadingZones.php`, `AccreditationLoadingServices.php` |
| Event services and applicant services admin queries | `AccreditationEventServices.php`, `AccreditationApplicantsServices.php` (profile reads `getProfileServices` only) |
| Application queue (`Cue = 1`, `Status = 3`, `AC > 26`, limit 5) | `AccreditationsApplications::getCue` |
| Active events list (`Type = 0` and `DateTo >= today`) plus zones | `AccreditationList::getActiveEvents`. Comment in code: "API LIST ACCREDITATIONS". No controller calls it |
| Administrators | `AccreditationAdministrators.php` |
| Accreditation history insert | `AccreditationHistory.php` |
| Barcode image of the fixed text `FD5T67` | `ApplicationController::barcodeAction` (`Barcode39.php` is included and was not found as an application file in the controller directory listing) |
| PDF helpers, match reports, image uploaders under `library/PG` | `library/PG/Controller/Plugin/*`. `LayoutPicker` is registered in `application.ini.bak`. The other plugins are not referenced by the three controllers |

## Deprecated, commented, or inactive

| Item | Evidence | Notes |
|---|---|---|
| Maintenance splash in `public/index.php` | Commented `exit` before bootstrap | Inactive |
| Local photo save on the main apply path | `SavePhoto` call commented in `applyAction` | Replaced by the Footprint POST. Still called from `applytestAction` |
| Footprint SMTP account | Commented in `sendMail` | Replaced by `accreditation@magus.events` via Gmail |
| Supplier registration nav item | Commented in `default.phtml` | The in-form notice remains |
| Thank-you redirect inside `applyAction` | After `echo` and `exit` | Unreachable |
| `applymultipleAction` | No view posts to it from the files inspected | Still a public action |
| `partnersAction` | Empty action. `partners.phtml` is empty | No behaviour |
| `sean/index.phtml` | Prints `$this->DATA` if set | No `SeanController` in this repo, so the script is unused |
| `index/test.phtml` | View file present | No `testAction` on `IndexController` |
| Sonar project files | Named in the onboarding scan, absent from `master` | **Unknown** whether they existed only on the scan host |
| Layouts `admin`, `union`, `referee`, `gir`, `accreditations` | Named in `application.ini.bak` | Only `application/layouts/default.phtml` exists |

## Test and diagnostic actions (implemented, not applicant features)

| Action | Behaviour |
|---|---|
| `/application/applytest` | Same as apply, but saves the photo with `SavePhoto` |
| `/application/testattendance` | Same as attendance, prints exceptions |
| `/application/test` | Sends a test mail to `andre.ferraz@evolveav.co.za` |
| `/application/barcode` | Draws barcode `FD5T67` |
| `/application/image` | Returns a GIF decoded from a large base64 literal embedded in the controller |

## Removed features

No removal is documented. Git history before `ab4effc` was not retrieved, so deletions in earlier commits are **Unknown**.
