123456789101112131415161718192021222324252627 |
- <?php
-
- require_once(dirname(__DIR__) . "/models/document.class.php");
- require_once(dirname(__DIR__) . "/models/promo.class.php");
-
- function document()
- {
- set("title", "Document");
- set("data", Document::getAll());
- set("promos", Promo::getAll());
-
- return html("list.html.php", "layout.html.php");
- }
-
- function add_document()
- {
- Document::addDocument($_FILES["document"], [
- "rang" => $_POST["rang"],
- "promo" => $_POST["promo"],
- "libelle" => $_POST["libelle"]
- ]);
- }
-
- function delete_document($fileid)
- {
- (new Document($fileid))->erase();
- }
|