Fractionnement de la page admin pour enlever le header et footer car déjà présent en partial. Attente de maj CSS/HTML du la page Admin de Guillaume pour pouvoir avancer sur le PHP

This commit is contained in:
laura.chevillet 2026-01-27 16:23:47 +01:00
parent 08cf6cc31c
commit 466c4b0625
4 changed files with 9 additions and 11 deletions

View file

@ -14,18 +14,18 @@
* @author Laura
*/
class Admin{
class AdminCtrl{
public function admin() {
$objCategory = new Category ();
/* $objCategory = new Category ();
$objCategory->setName($_POST['category_name'] ?? "");
$objCategory->setParent($_POST['category_parent'] ?? "");
$objCategoryModel = new CategoryModel();
$boolInsert = $objCategoryModel->insert($objCategory);
/* EN ATTENTE
EN ATTENTE
if ($boolInsert === true) {
$_SESSION['success'] = "Catégorie ajoutée avec succès";
header("Location:index.php?ctrl=admin&action=admin");
@ -41,5 +41,4 @@
include('../app/views/partials/footer.php');
}
}