//affichage d'un message d'informations manquantes: } break; case 5: if ($txtD && $ivertG) { $article = new News(0, $titre, $txtD, "", $today, $id_user, $id_dispo); array_push($image, new Image(0, $ivertG, 0)); } else { //affichage d'un message d'informations manquantes: } break; case 6: if ($txtG && $ivertD) { $article = new News(0, $titre, $txtG, "", $today, $id_user, $id_dispo); array_push($image, new Image(0, $ivertD, 0)); } else { //affichage d'un message d'informations manquantes: } break; } //Ajout du nouvel article: creerNews($article); addPicture($image); } } $page['vue'] = 'vue/form_add_article.php'; $page['css'] = '<link rel="stylesheet" type="text/css" href="static/css/css_f_add_article.css" />'; } else { $page['vue'] = 'vue/access_denied.php'; $page['css'] = '<link rel="stylesheet" type="text/css" href="static/css/css_access_denied.css" />'; }
$listeSection = recupSection(); if (isset($_POST['creerSection']) && !empty($_POST['creerSection'])) { $error = checkSection(); $_POST['error'] = $error; if ($error == "NoError") { echo "<div class='succes' >Section crée !!!</div>"; creerSection($_POST['nom'], $_POST['couleur'], $_POST['image'], $_POST['desc']); } else { echo "<div class='error' >" . $error . "</div>"; } } if (isset($_POST['creerNews'])) { $error = checkNews(); $_POST['error'] = $error; if ($error == "NoError") { creerNews($_POST['nom'], $_POST['image'], $_POST['jeux'], $_POST['desc']); } else { echo "<div class='error' >" . $error . "</div>"; } } if (isset($_POST['creerEvent']) && !empty($_POST['creerEvent'])) { $error = checkEvent(); $_POST['error'] = $error; if ($error == "NoError") { creerEvent($_POST['nom'], $_POST['type'], $_POST['date'], $_POST['heure'], $_POST['localisation'], $_POST['image'], $_POST['jeux'], $_POST['desc']); echo "<div class='success' >Event ajoutée !</div>"; } else { echo "<div class='error' >" . $error . "</div>"; } } /******************************************************/