Files
resatennis_tyroltenn/www/tyroltenn/AGENTS.md

58 lines
2.6 KiB
Markdown
Executable File

# resatennis_tyroltenn - AGENTS.md
## Repo structure
Legacy PHP app for tennis court reservation, club management, and championship tracking. No framework, no build system, no test harness.
- `/tyroltenn/` — application root. Hundreds of standalone `.php` files, no MVC separation.
- `/tyroltenn/conf.php` — **DB credentials & connection**. Never commit this file.
- `/tyroltenn/constantes.php` — time slots, rating tiers, holiday list, reservation limits, color constants.
- `/tyroltenn/fpdf.php`, `/tyroltenn/jpgraph/`, `/tyroltenn/font/` — bundled libraries (no composer).
- `/tyroltenn/images/` — assets. `/tyroltenn/videos/` — FLV videos + player SWF.
## Entry points
| Entry | Purpose |
|---|---|
| `index.php` | Landing — links to 4 sub-apps |
| `login_resa.php` | Court reservation portal |
| `login_champ.php` | Championship (club captain) portal |
| `admin_login.php` | Club admin panel |
| `serveur_vocal.php` | IVR telephone reservation server |
| `connexion_port.php` / `consult_port.php` / `inscription_port.php` | Mobile/wap portal |
Every page starts with `include("enTete.php")`, `include("menu.php")`, `include("piedDePage.php")`.
## DB
MySQL/MariaDB on `10.10.10.22:3307` with failover to `10.10.10.50:3306`. `mysqli` (procedural). Connection happens in `conf.php`.
## Files to exclude / preserve
```
*.bak *.BAK *.old *.new *.sav
planning_resa_suite.php.old
login_resa_suite.php.old
login_resa_suite.php.new
fct_affichage_planning.php.BAK
fct_affichage_planning.php.old
liste_jetons.php.old
```
`.gitignore` should be present. **Never commit `conf.php`** — it holds plaintext DB passwords and SMS credentials.
## Gotchas
- **No `conf.php` in git** — each environment generates its own copy at deploy time.
- PHP short tags `<?` are used alongside `<?php` — edit carefully.
- All `mysqli` calls are procedural, not OOP.
- The old `www/conf.php` (parent directory) has different credentials — it belongs to the legacy `www/` site, not the tyroltenn app. Only `tyroltenn/conf.php` matters for this app.
- Files ending in `_suite.php` are form-action handlers (POST processing). Pair them with their `_` counterpart.
- `fct_jatennis.php` / `fct_jatennis_v2.php` — integration with external "JTennis" service.
- `fpdf.php` is included inline for PDF planning exports. Do not refactor it separately.
- No routing layer — filenames map directly to URLs. Renaming a file without a redirect will break hotlinks/TV screens.
## No build/lint/test
There is no lint, typecheck, test, or build command. Changes are deployed by rsync/scp to the web server. Manual browser testing is the only verification.