Skip to content

Repository files navigation

Table

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

1. Table de multiplication (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.php

Enter e.g. A = 5, B = 12: the app shows 13 rows 5 × 0 … 5 × 12, each editable or deletable.

2. Library — catalogue de livres (L2_HAJANIRINA_Heritina_09/)

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.html

3. Orphaned "boutique" assets

header.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.

4. Archived chat projects

  • message.tar — a Java web app (Message/) with WEB-INF/web.xml, a bundled mysql-connector-java-8.3.0.jar and 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 with tpM/ + StpM/ folders, plus aide.sql for the schema).

Both are snapshot archives of an earlier version of the chat project. They duplicate source that exists elsewhere in this account.

messagePHP.tar contains 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.


Known limitations

PHP multiplication table

  1. $_GET/$_POST values are interpolated into HTML and echoed unescaped. Numbers are expected, but any string works: affichage.php reflects $_GET['varA'] into the page, so a crafted URL injects HTML/script.
  2. $_SERVER['REQUEST_METHOD'] branching in traitement.php is 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.
  3. varB on 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.
  4. 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.
  5. No validation: negative, huge, or non-numeric B (loop bound i <= $b) produces nonsense or a very long page. A × B uses PHP integer overflow silently.

Library

  1. The Disponible catalogue is data.json rendered verbatim. Its records are placeholders, several obviously unfinished (1964 for Nineteen Eighty-Four, isbn: 123456789, truncated resume). This is the demo dataset a visitor sees first.
  2. Additions live only in that browser's localStorage and are a separate list from the data.json catalogue. There is no edit or remove for user-added books, and nothing written is ever sent anywhere.
  3. The index.html form closes its "ajout" container with a stray </divs> tag, and add reloads the page after every insertion rather than updating the list in place.

Assets / archives

  1. The orphaned boutique assets have no page to run with.
  2. Committing the .tar archives put ~3.9 MB of duplicate source into the repository (see §4).

Documentation

License

MIT.

About

Archive of L2 coursework — PHP multiplication table and a JS library catalogue

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages