Archive of L2 coursework. This repository contains two unrelated student exercises plus orphaned assets and two archived copies of an older project. Like everything in this account that predates 2026, it was uploaded through the GitHub web interface with no README to speak of.
| What | Where | Language |
|---|---|---|
| Table de multiplication | PHP at the root (index.php, traitement.php, …) |
PHP |
| Library — catalogue de livres | L2_HAJANIRINA_Heritina_09/ |
HTML/CSS/JS + JSON |
| Orphaned "boutique" assets | *.css, reservation.js, style.js, bluediv.js |
HTML/CSS/JS — page missing |
| Archived chat projects | message.tar, messagePHP.tar |
Java / PHP |
A small server-rendered exercise that builds a multiplication table for
A × 0 … A × B and lets you edit or delete rows before the result is shown.
State lives in the PHP session — there is no database.
| File | Role |
|---|---|
index.php |
Form: enter A and B |
traitement.php |
Computes A×0 … A×B into $_SESSION['tableau']; also handles row delete (GET) and row edit (POST) |
affichage.php |
Renders the table with a Modifier (edit) and X (delete) action per row |
modifier.php |
Edit form, prefilled from the row's A and current multiplier |
Run it:
php -S localhost:8000
# open http://localhost:8000/index.phpEnter e.g. A = 5, B = 12: the app shows 13 rows 5 × 0 … 5 × 12, each
editable or deletable.
A static front-end library catalogue: the Disponible list is loaded at
runtime from data.json via fetch; the form on the left adds a book to a
second list (Ajouter) that is stored in localStorage; the Detail buttons
render a book's full record in a side pane. Open index.html, add records, and
browse the catalogue. Book records use this shape — titre, auteurs, isbn,
image, editeur, datePublication, genre, resume, langue,
nombrePages, disponibilite, etat, emplacement — and cover images sit in
l2/.
The data.json records are fabricated placeholders (1964 by
George Orwell, publisher Gellimard…), and the images in l2/ are real book
covers downloaded for the exercise — they are not redistributable.
python3 -m http.server 8000 # inside L2_HAJANIRINA_Heritina_09/
# open http://localhost:8000/index.htmlheader.css, footer.css, porte.css, reservation.js, style.js and
bluediv.js reference an HTML layout — cards with .btn-outline-dark buttons,
an .icon-boutique toggle, a #blueDiv reservation drawer — that is not
present in this repository. They look like a "boutique avec réservation"
exercise whose page was never uploaded. The reservation logic persists into
localStorage. Without the HTML these files do nothing; they are kept for
reference.
message.tar— a Java web app (Message/) withWEB-INF/web.xml, a bundledmysql-connector-java-8.3.0.jarand Bootstrap assets. The same "message" chat idea as the PHP one below, in Java.messagePHP.tar— the PHP "Chat One" code, developed further in ProjetGit (Auth1/layout withtpM/+StpM/folders, plusaide.sqlfor the schema).
Both are snapshot archives of an earlier version of the chat project. They duplicate source that exists elsewhere in this account.
messagePHP.tarcontains inline database credentials (new PDO(..., 'phpmyadmin', 'p')) in four files inside the archive. The archives were untracked in September 2026 (files kept on local disk) so the credentials are no longer in the current tree — but they remain in the git history of every earlier commit. See SECURITY.md.
$_GET/$_POSTvalues are interpolated into HTML and echoed unescaped. Numbers are expected, but any string works:affichage.phpreflects$_GET['varA']into the page, so a crafted URL injects HTML/script.$_SERVER['REQUEST_METHOD']branching intraitement.phpis correct but fragile: the delete path does not use a session token, so a cross-site request (<img src="…/traitement.php?varA=…&varB=…&varI=…">) deletes a row.varBon the delete/modify links is the table length at render time; if two tabs are open, deleting from one can leave the other with a stale length and drop the wrong row.- Editing replaces the row whose index matches the hidden
i; a row deleted concurrently makes indices shift and the edit can hit the wrong row. - No validation: negative, huge, or non-numeric
B(loop boundi <= $b) produces nonsense or a very long page.A × Buses PHP integer overflow silently.
- The Disponible catalogue is
data.jsonrendered verbatim. Its records are placeholders, several obviously unfinished (1964for Nineteen Eighty-Four,isbn: 123456789, truncatedresume). This is the demo dataset a visitor sees first. - Additions live only in that browser's
localStorageand are a separate list from thedata.jsoncatalogue. There is no edit or remove for user-added books, and nothing written is ever sent anywhere. - The
index.htmlform closes its "ajout" container with a stray</divs>tag, andaddreloads the page after every insertion rather than updating the list in place.
- The orphaned boutique assets have no page to run with.
- Committing the
.tararchives put ~3.9 MB of duplicate source into the repository (see §4).
- SECURITY.md — what data this does (and does not) hold.
- CONTRIBUTING.md — working on this repository.
- CHANGELOG.md — version history.
MIT.