# Project plan — knowmore_php84 (Knowmore)

Evidence date: 2026-10-11.

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

Inspected default branch: `master` at `2e5a13d0` (2020-10-19, "update details class to not use null default values", JacquesOverdrive). `origin/HEAD` points at `master`. History on `master` has 128 commits, from 2019-06-13 through 2020-10-19.

This plan describes what the repository contains. It does not decide what the product should become. There was no prior Silicon Ark folder for this repository. A related folder, `knowmorescan/`, documents a different remote (`knowmorescan.git`, tip 2022-06-02). That folder is not evidence for this tree.

## Product

**Knowmore** is an online learning and practice-tools site for people in financial-planning businesses. The repository is the full site: a WordPress 5.2.3 public site, a custom "Nemo" learner area, a Nemo web admin, and a large business-tools engine.

Provenance: **Implemented**. WordPress version is `$wp_version = '5.2.3'` in `wp-includes/version.php`. The theme header in `wp-content/themes/knowmore/style.css` names the theme **Knowmore**, version 1.0, author Ekkra IT Solutions. Learner, admin, and tool code use the Nemo class family (`Nemo`, `NemoBasic`, `NemoDatabase`).

Public copy that names the audience and the legal owner is not stored as a product README in this repository. Comments and page text speak as Knowmore, Celestis, and Old Mutual / OMW. Examples:

- Learner home and CPD screens name IWP (Integrated Wealth Planning) packages and FPI CPD categories (`training/my.cpd.points.php`, `training/module.php`).
- BAT report comments dated 2019-04-03 rename FSB to Financial Sector Conduct Authority (FSCA) (`tools/bat_2020.class.php`).
- Contact and survey copy in the tools area still says Celestis in older files. Whether Celestis is a former brand is **Unknown / Requires Confirmation**.

A later Silicon Ark document for `knowmorescan` records Old Mutual Wealth as the named owner on static legal pages. Those pages are not the source of truth for this repository. Owner, operator, and current brand are **Unknown / Requires Confirmation** from this tree alone.

## Branch reality

| Branch | Tip | Relative to `master` |
|---|---|---|
| `master` | `2e5a13d0` 2020-10-19 | Default. This document set treats this tree as the implemented baseline |
| `origin/successionservive` | `449bf1a9` 2026-07-23 "Succession Services navigation updates" | 5 commits ahead of `master`. Not merged |
| `origin/feature/manual-adhoc-invoice` | `e6c45b3d` 2026-07-23 "remove system generated PDF's" | The succession commits, plus one commit that deletes generated PDFs under `PDF/` |

Both later branches share merge-base `2e5a13d0` with `master`. They are **not** on the default branch.

The 2026 commits, authors rachelmogano and Uriel_Balela, change training layouts, Nemo classes, html2fpdf, and add succession-service admin screens plus SQL. A sample of `training/_nemo.basic.cls.php` shows bare PHP array keys such as `$_SESSION[LEARNER]` rewritten to `$_SESSION["LEARNER"]`, and new declared properties. That pattern is a PHP 8 compatibility pass. Provenance: **Implemented on the unmerged branches only**.

The repository name `knowmore_php84` is not explained by a PHP version constraint, a README, or a commit on `master`. Comments on `master` record a PHP 5.6 pass (2015) and a PHP 7.2 `NemoDatabase2` pass (March 2020). Whether the 2026 work targets PHP 8.4 specifically is **Unknown / Requires Confirmation**.

`bitbucket-pipelines.yml` defines a `development` branch pipeline. No `development` branch was present on the remote at inspection time.

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

No project plan or product README exists in the repository. `license.txt` is the WordPress GPL notice. The following objectives are **Inferred** from the implemented modules:

- Publish a WordPress marketing site on the Knowmore theme.
- Register and sign in learners, sell or enrol them on courses, workshops, and Wealth Intelligence (WI) content, and track modules, assignments, forums, and CPD points.
- Give practices online tools: Business Assessment (BAT, including BAT 2020), client satisfaction survey (CAT / CSS), gap analyses (TCF, RDR, PoPI, succession planning), and related PDF and Excel reports.
- Operate a Nemo `webadmin` for learners, courses, modules, practices, licences, invoices, email, vouchers, workshops, and security groups.
- Send scheduled course, workshop, survey, certificate, AML, and IBC emails from cron scripts.
- Watch file permissions and integrity through NemoFIM.

## Scope in this repository

In scope of `master` at `2e5a13d0`:

- WordPress core 5.2.3 (`wp-admin`, `wp-includes`, root `wp-*.php`) and the Knowmore theme plus the plugins listed in technical documentation.
- Learner area under `training/`.
- Nemo web admin under `webadmin/`.
- Business-tool engines under `tools/`, including a nested older `tools/webadmin/`.
- Shared layouts under `layouts/` and small modules under `modules/`.
- PDF helpers under `htmltopdf/` and `webadmin/fpdi/`. Flowplayer under `flowplayer/`.
- File-integrity code under `fim_2.0/` and `webadmin/_nemo.fim.cls.php`.
- FTP deploy pipeline in `bitbucket-pipelines.yml`.

Out of scope of what this repository stores:

- A full database schema. Tables are queried by PHP (`tblLearner`, `sysUser`, `sysSettings`, BAT and survey tables, and others). `CREATE TABLE` scripts for the live schema are not in `master`. The unmerged succession branch adds two SQL files under `webadmin/`.
- Infrastructure-as-code, Docker, Composer application dependencies, or an automated test suite for the Nemo code.
- Proof of what is deployed today. The last `master` commit is 2020-10-19. Later work exists only on the two unmerged branches.

## System shape

```text
Browser
  ├─ WordPress 5.2.3 (index.php → wp-blog-header.php, theme knowmore)
  ├─ Learner scripts (login.php, register*.php, training/*)
  ├─ Business tools (tools/*)
  └─ Nemo webadmin (webadmin/*)
        │
        ├─ MySQL via mysqli, host chosen from $_SERVER[SERVER_NAME]
        ├─ PHP sessions on disk (session path per host)
        ├─ mail() and NemoEmail for cron and transactional mail
        ├─ Sage Pay / Pay Now, PayGate, and Netcash references in payment and debit-order code
        └─ FTP deploy of master to knowmore.overdriveqa.co.za (Bitbucket Pipelines + git-ftp)
```

## Major components

| Area | Path | Role |
|---|---|---|
| Public site | WordPress root, `wp-content/themes/knowmore` | Marketing pages, menus from WordPress, theme assets |
| Learner portal | `training/` | Courses, modules, workshops, assignments, CPD, profile, purchases |
| Registration and login | Root `login.php`, `register*.php`, `forgot.password.php`, `second.wp.php` | Learner session in `$_SESSION[LEARNER]` |
| Web admin | `webadmin/` | Staff session in `$_SESSION[USER]`, menu from `sysMenuLevel1` / `sysMenuLevel2` / `sysSecurity` |
| Business tools | `tools/` | BAT, CAT, gap tools, invoices, crons, payments |
| Legacy tools admin | `tools/webadmin/` | Older admin screens that include `include/system.inc.php` |
| Config | `webadmin/system.php` | Host-keyed database, session, and Pay Now settings |
| FIM | `fim_2.0/`, `webadmin/cron.fim.php` | Permission and integrity cron |
| Pipeline | `bitbucket-pipelines.yml` | `git ftp push` on `master` |

## Milestones visible in history

There is no milestone plan in the repo. The history that is present:

| When | What the commits show |
|---|---|
| 2019-06 to 2019-07 | Repository created and the Knowmore tree pushed (Jaco Brits, Jacques). Pipeline file added |
| 2020-02-28 to 2020-03-09 | Tree refreshed from QA Celestis; WordPress files committed; PHP 7.2 `NemoDatabase2` update |
| 2020-03 to 2020-06 | BAT 2020 results, filters, Excel and PDF reports, registration and coach-login changes |
| 2020-05-19 | `training/module.php`: assignment re-upload counter (`313c4dd2`) |
| 2020-10-19 | `master` stops. Details class treats a column default of the string `NULL` as empty (`2e5a13d0`) |
| 2026-04 to 2026-07 | Unmerged: succession service screens and SQL, PHP quoting updates, removal of generated PDFs on `feature/manual-adhoc-invoice` |

## Implementation plan

No forward plan is written in the repository. The code that exists is the plan that was executed through October 2020 on `master`, plus unmerged 2026 work.

## Known dependencies

- PHP with `mysqli`, `mail`, and `exec` (used for `chmod` via `find` in `webadmin/system.php`). Exact runtime version on `master` is not pinned. Comments cite PHP 5.6 and PHP 7.2.
- MySQL / MariaDB on Hetzner `host-h.net` for the named QA and live hosts, and localhost for the `localhost` and `lamp` keys.
- WordPress 5.2.3 and the plugins under `wp-content/plugins/`.
- Wordfence, via `.user.ini` `auto_prepend_file` and `.htaccess` rules.
- Apache `mod_rewrite` (`.htaccess` forces HTTPS and WordPress front-controller rules).
- Bitbucket Pipelines image `python:3.5.7`, packages `zip`, `git`, `git-ftp`. Pipeline secrets `FTP_USERNAME_LIVE`, `FTP_PASSWORD_LIVE`, `FTP_HOST_LIVE`, and the QA equivalents. Values are not in the file.
- reCAPTCHA on registration pages (`modules/recaptchalib.php`). The PHP library comment points at the legacy Google reCAPTCHA API.
- Payment: Sage Pay Pay Now service key per host in `webadmin/system.php`; PayGate result handler `tools/payGateResults.php`; Netcash assignment text in `tools/dtPDF.cls.php`.

## Current project status

`master` has not moved since 2020-10-19. The remote still has two unmerged branches from 2026. Whether either branch is what runs in production, and whether this repository is the PHP upgrade line for the Knowmore site documented under `knowmorescan/`, is **Unknown / Requires Confirmation**.

The pipeline on `master` pushes the tree by FTP to `public_html/knowmore.overdriveqa.co.za` using variables named `FTP_*_LIVE`. The path is a QA hostname and the variable prefix says LIVE. Which environment that job updates is **Unknown / Requires Confirmation**.

## Human confirmation

1. Why this repository is named `knowmore_php84`, and whether PHP 8.4 is the intended runtime.
2. Whether `master` at `2e5a13d0` or `successionservive` / `feature/manual-adhoc-invoice` is the line that should be documented as current product behaviour.
3. Relationship to `knowmorescan` and to production `www.knowmore.co.za`.
4. Whether committed credentials in `webadmin/system.php`, `wp-config.php`, and `tools/system.inc.LIVE.php` are still valid. Values are omitted from these documents. They should be treated as exposed and rotated if they were ever real.
5. Legal owner and whether Celestis copy is historical.
6. What the branch name `feature/manual-adhoc-invoice` was for. Its only unique commit deletes generated PDFs.
