# Project plan — Sheriff

Evidence date: 2026-10-04.

Source repository: `git@bitbucket.org:overdrive/sheriff.git`.

Inspected revision: `master` at `6269872` (2025-05-20, Uriel_Balela, `removed deprecated "E_strict" error reporting`). `git ls-remote` on this date returned that same commit as `HEAD`. The scan-host path `~/projects/sonar_scan/repos/Sheriff` was not on this machine. The tree below was read from a clone of that revision. The source repository was not modified.

This plan describes what the repository contains. It does not decide what the product should become.

## Product

The public site names itself, in Afrikaans and English, in `layouts/Layout1.php`:

- Balju vir Wynberg-Noord
- Sheriff for Wynberg North

Provenance: **Documented** in that layout.

The footer credits `www.sheriff.co.za`, copyright 2013, developed by Silicon Overdrive (`http://www.overdrive.co.za/`). Provenance: **Documented** in `layouts/Layout1.php`. Whether `www.sheriff.co.za` is the host that serves this repository is **Unknown / Requires Confirmation**.

`index.php` contains a host switch for `localhost` and `dev.overdrive.co.za` (path `Sheriff`). That switch runs before `system.php`, and `system.php` then overwrites `BASE_URL`. The switch values do not reach the page object. Provenance: **Implemented**. Whether either host is still used is **Unknown / Requires Confirmation**.

No README, project plan, or requirements document exists in the repository. The purpose below is **Inferred** from the pages the six PHP scripts render:

- Tell a visitor that the office publishes sales in execution for immovable property, movable property, and ships (including yachts).
- Publish the current notice for each of those categories as static HTML.
- Publish the suburbs the office says it services.
- Publish office address, telephone number, and a contact directory.

## Branch reality

One remote branch.

| Branch | Tip | Date | Subject |
|---|---|---|---|
| `master` (`origin/HEAD`) | `6269872` | 2025-05-20 | removed deprecated `E_STRICT` error reporting |

History is ten commits, 2022-11-25 to 2025-05-20.

| Commit | Date | Author | Subject |
|---|---|---|---|
| `52b303f` | 2022-11-25 | Jaco Brits | Initial commit |
| `16a8f16` | 2022-11-25 | Uriel Balela | initial commit |
| `4aa934b` | 2022-11-28 | Uriel Balela | php 8 upgrate |
| `089abd8` | 2023-11-14 | Wessels | CXopy files from prod to repo |
| `4ca1cad` | 2023-11-14 | Wessels | Fix passing null to parameter on function |
| `928de25` | 2023-11-14 | Wessels | Fixes for creation of dynamic properties depricated |
| `326f860` | 2023-11-14 | Wessels | Remove direct reference to global param |
| `578206c` | 2023-11-16 | Wessels | Update contact details |
| `497d493` | 2025-05-20 | Uriel_Balela | home page changes: removed postal address |
| `6269872` | 2025-05-20 | Uriel_Balela | removed deprecated `E_STRICT` error reporting |

`089abd8` is the commit that refreshed `immovable.htm` and `movable.htm` from production, according to its message. Provenance of "these files were copied from production": **Documented** in that message. What production URL was copied, and whether production has changed since `6269872`, is **Unknown / Requires Confirmation**.

## Objectives (inferred from the site, not from a written plan)

No written objectives exist in the repository. The following are **Inferred** from the rendered pages:

- Give the public a bilingual introduction to sales in execution run by this sheriff's office.
- Publish auction notices and a movable catalogue without a content-management system.
- Publish jurisdiction suburbs and contact details.
- Keep a shared header, menu, banner, and footer around those notices.

## Scope

### In scope of the repository

- Six public PHP entry points: `index.php`, `immovable.php`, `movable.php`, `shipping.php`, `jurisdiction.php`, `contact.php`.
- Word-exported HTML included as the body of each page.
- Shared chrome in `layouts/Layout1.php` and `layouts/header.incl.php`.
- One stylesheet, `css/styles.css`, and the images under `images/`.
- A vendored Nemo PHP class library (`_nemo.*.cls.php`, `system.php`, `system.functions.inc.php`) carried with the site.
- Word source files (`immovable.docx`, `movable.docx`, `movable.doc`) and `Immovable.zip`.
- Dated PHP snapshots from the November 2022 upgrade (`*20221128`, and `_nemo.basic.cls.php202211228`).

### Out of scope / not in this repository

- A database server, schema, or connection credentials. `system.php` reads `$db` and `$DATABASE_SETTINGS` and neither is assigned anywhere in this tree.
- A `modules/` directory. `NemoBasic` looks for `modules/Login.mod.inc.php` and `modules/GMaps.mod.inc.php`. Those files are absent, and the public layout does not call the methods that would include them.
- Bidder registration, payment, FICA storage, or an auction admin. Those topics appear as text inside the HTML notices. No form, table, or handler implements them.
- Tests, Composer, npm, Docker, CI, and a deployment pipeline. None are in the repository.
- The scan-host files `sonar-project.properties` and `sonarqube_scan.bat` were not part of the task-creation listing for this repository, and they are not in `master`.

## System architecture

One public path. Each entry script constructs `NemoBasic`, sets a heading, an active menu key, and an HTML include, then calls `Display()`.

`NemoBasic::Display()` includes `layouts/header.incl.php` and then `layouts/Layout1.php`. The layout prints the office name, the South African sheriffs logo file `images/SASSLogo.png`, a six-item menu, `images/Banner.png`, the chosen HTML file, and a footer of related offices. What the letters SASS stand for is not written in the repository. **Unknown / Requires Confirmation**.

The included `.htm` files are full Word HTML documents (their own `html`, `head`, and `body`). They are nested inside the layout's content `div`. Provenance: **Implemented**.

A second class, `Nemo` in `_nemo.cls.php`, is an authenticated back-office shell (session user required, SQL menus, toolbars). None of the six public scripts instantiate it. Provenance: **Implemented** as unused code on the public path.

```text
Browser
  -> index.php | immovable.php | movable.php | shipping.php | jurisdiction.php | contact.php
       -> NemoBasic
            -> system.php
                 -> system.functions.inc.php
            -> layouts/header.incl.php
            -> layouts/Layout1.php
                 -> home.htm | immovable.htm | movable.htm | shipping.htm | jurisdiction.htm | contact.htm
```

There is no database step on this path. `system.php` selects a database only when `$db` is already a resource. It never is, in this repository.

## Major components

| Component | Role | Evidence |
|---|---|---|
| Page scripts | Choose heading, menu key, and HTML body | `index.php` and the five sibling scripts |
| `layouts/Layout1.php` | Header, menu, banner, footer | That file |
| Word HTML bodies | The text a visitor reads | `home.htm`, `immovable.htm`, `movable.htm`, `shipping.htm`, `jurisdiction.htm`, `contact.htm` |
| `css/styles.css` | Fixed-width chrome (1000px content) | That file |
| `NemoBasic` and `system.php` | Bootstrap and display | `_nemo.basic.cls.php`, `system.php` |
| Nemo data, email, list, report, menu classes | Inherited library, not called by the six pages | `_nemo.*.cls.php` |
| jQuery and plugins | Linked from the header | `layouts/header.incl.php`, `js/` |

## Milestones visible in git

These are commit milestones, not a planned roadmap. No future milestone is written in the repository.

| When | What landed |
|---|---|
| 2022-11-25 | First tree: home, contact, layout, `system.php` |
| 2022-11-28 | PHP 8 notes in `index.php`, `system.php`, header, email, control, and functions |
| 2023-11-14 | Production HTML copied in for immovable and movable notices; PHP 8 property and null fixes |
| 2023-11-16 | Contact directory updated; Wynberg East footer telephone changed from `021 761 3439` to `021 224 0055`; postal box on the home page corrected from `162` / `Docx16` to `18162` / `Docex 16` |
| 2025-05-20 | Postal address block removed from `home.htm`; `E_STRICT` removed from `error_reporting` |

## Implementation plan

No implementation plan is in the repository. The history shows content changes as edits to Word HTML and small PHP compatibility edits. A content-management screen is not present. **Inferred** from that history: the next auction notice would be a replacement of the relevant `.htm` file.

## Known dependencies

- PHP, with comments that record a PHP 8 upgrade. The exact runtime version is **Unknown / Requires Confirmation**. `system.php` still calls `mysql_select_db` when `$db` is a resource. The old `mysql_*` extension is not part of PHP 7 or PHP 8. The public pages do not create `$db`, so that call is not reached on the path inspected here.
- The header requests stylesheets and scripts. Several of those files are not in the repository. See technical documentation.
- `NemoEmail` uses PHP `mail()`. `SendSMS()` posts to `http://www.mymobileapi.com/api5/http5.aspx`. Neither is called by the six public pages.
- Word, for the HTML exports. Not a runtime dependency.

## Current project status

`master` at `6269872` is a static public brochure plus an inherited Nemo library that the brochure does not exercise.

Auction dates still published at that commit:

- Immovable notice: 9 October 2023 (`immovable.htm`, last changed `089abd8`, 2023-11-14).
- Movable catalogue: September 2023 (`movable.htm`, same commit).
- Shipping page: no sale listing in the visible body. The included file's own `<title>` is `SALE OF YACHT "MONDINA"`. That file was last changed in the 2022-11-25 initial commit.
- Jurisdiction list: last changed in the 2022-11-25 initial commit.

The May 2025 commits changed the home postal address and error reporting. They did not refresh the auction notices.

Planned work inside the repository: none found.
