Débug et ajout de la page addedit_project

This commit is contained in:
Guillaume HESS 2026-02-17 16:25:33 +01:00
parent 46f48230a9
commit a448d0e2b4
14 changed files with 186 additions and 124 deletions

View file

@ -125,7 +125,7 @@
$_SESSION['content'] = $_POST['textProject']??"";
$_SESSION['thumbnail'] = $_FILES['imageThumbnail']['name']??"";
$_SESSION['status'] = 'en_attente';
$_SESSION['user_id'] = $_SESSION['user']['user_id'];
$_SESSION['user_id'] = $_SESSION['user']['user_id']??null;
$_SESSION['category']= $_POST['category']??0;
$objProject = new Project();
@ -169,6 +169,9 @@
$this->_arrData['arrImageToDiplay'] = $arrImageToDisplay;
$this->_display("project");
header("Location: index.php");
exit;
}
@ -308,4 +311,18 @@
header("Location: index.php");
exit;
}
public function modify(){
//Récupéré l'id dans l'url
$intId = $_GET['id'];
//Je créer un nouveau model pour exec la commande SQL
$objProjectModel = new ProjectModel;
$objProjectModel->modify($intId);
//Redirection vers la page projet
header("Location: index.php?ctrl=project&action=addedit_project&id=".$intId);
exit;
}
}