$actionMessage = "Opération Valide : Config Ajouté(e) avec succès."; $typeMessage = "success"; } else { $actionMessage = "Erreur Ajout config : Vous devez remplir le champ 'indexContent'."; $typeMessage = "error"; } } else { if ($action == "update") { $idConfig = htmlentities($_POST['idConfig']); if (!empty($_POST['indexContent'])) { $indexContent = htmlentities($_POST['indexContent']); $sliderType = htmlentities($_POST['sliderType']); $updatedBy = $_SESSION['userAnnahdaSite']->login(); $updated = date('Y-m-d h:i:s'); $config = new Config(array('id' => $idConfig, 'indexContent' => $indexContent, 'sliderType' => $sliderType, 'updated' => $updated, 'updatedBy' => $updatedBy)); $configManager->update($config); $actionMessage = "Opération Valide : Config Modifié(e) avec succès."; $typeMessage = "success"; } else { $actionMessage = "Erreur Modification Config : Vous devez remplir le champ 'indexContent'."; $typeMessage = "error"; } } else { if ($action == "changeIndexContent") { $indexContent = htmlentities($_POST['indexContent']); $configManager->changeIndexContent($indexContent); $actionMessage = "Opération Valide : Configuration Modifié(e) avec succès."; $typeMessage = "success"; } else { if ($action == "changeSliderType") { $sliderType = htmlentities($_POST['sliderType']);