Пример #1
0
$nextButton = true;
if (isset($_GET['numero'])) {
    $prec = $_GET['numero'] - 3;
    if ($prec < 0) {
        $prec = 0;
    }
    $next = $_GET['numero'] + 3;
    $listeNext = recupNews(3, $next);
    if (empty($listeNext)) {
        $nextButton = false;
    }
    $listeNews = recupNews(3, $_GET['numero']);
} else {
    $prec = 0;
    $next = 3;
    $listeNews = recupNews(3, 0);
}
/*************************************/
/*				Pagination Event	 */
/*************************************/
$nextButtonE = true;
if (isset($_GET['event'])) {
    $precE = $_GET['event'] - 3;
    if ($precE < 0) {
        $prec = 0;
    }
    $nextE = $_GET['event'] + 3;
    if ($precE == 0) {
        $next = 3;
    }
    $listeNext = recupEvent(3, $nextE);
Пример #2
0
}
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>";
    }
}
/******************************************************/
/*					Edition 			     		  */
/******************************************************/
if (isset($_GET['post'])) {
    $news = recupNews($_GET['post']);
}
if (isset($_POST['editerNews'])) {
    $error = checkNewsEdition($news);
    $_POST['error'] = $error;
    if ($error == "NoError") {
        updateNews($_POST['nom'], $_POST['image'], $_POST['jeux'], $_POST['desc'], $news->idnews);
        header('Location : index.php?page=admin');
    } else {
        echo "<div class='error' >" . $error . "</div>";
    }
}
if (isset($_GET['section'])) {
    $jeu = recupJeu($_GET['section']);
}
if (isset($_POST['editerSection'])) {