bug message succès fixed
This commit is contained in:
parent
432e111c47
commit
d0ac49f024
5 changed files with 33 additions and 7 deletions
|
|
@ -25,6 +25,7 @@
|
|||
header("Location:index.php?ctrl=error&action=error_403");
|
||||
exit;
|
||||
}
|
||||
var_dump($_SESSION);
|
||||
|
||||
//gestion de l'user
|
||||
$objCategoryModel = new CategoryModel;
|
||||
|
|
@ -33,6 +34,7 @@
|
|||
$newCat = new Category();
|
||||
$newCat->setName($_POST['new_category']);
|
||||
$objCategoryModel->insertCategory($newCat);
|
||||
$_SESSION['success'] = "La catégorie a bien été ajoutée";
|
||||
header('Location: index.php?ctrl=admin&action=admin');
|
||||
exit;
|
||||
}
|
||||
|
|
@ -68,12 +70,12 @@
|
|||
$objUser->setId($intUserId);
|
||||
$objUser->setStatus((int)$_POST['new_status']);
|
||||
if ($objUserModel->editStatus($objUser)) {
|
||||
$_SESSION['message_success'] = "Le statut a bien été modifié !";
|
||||
$_SESSION['success'] = "Le statut a bien été modifié !";
|
||||
}
|
||||
}
|
||||
elseif ($_POST['action'] === 'delete_user') {
|
||||
$objUserModel->delete_soft($intUserId);
|
||||
$_SESSION['message_success'] = "L'utilisateur a été supprimé.";
|
||||
$_SESSION['success'] = "L'utilisateur a été supprimé.";
|
||||
}
|
||||
header("Location: index.php?ctrl=admin&action=admin");
|
||||
exit;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue