} if (!isset($_GET['id'])) { header('HTTP/1.0 302 Found'); header("Location: index.php?map=default&page=home"); exit; } //Haal ID op $id = $_GET['id']; $bands = new Bands(); $bandsmusic = new BandsMusic(); $bandsusers = new BandsUsers(); //Haal genres op $genres = new Genres(); $genres = $genres->get_all(); //Haal band op $band = $bands->get($id); if (!$band) { header('HTTP/1.0 302 Found'); header("Location: index.php?map=events&page=index"); exit; } //Haal bandleden op $bandmembers = $bandsusers->getBandMembers($id); $remainingMembers = $bandsusers->getAllMembers($id); //Haal video's op $video = $bandsmusic->getVideo($id); //Check of er POST waarde is if ($_SERVER['REQUEST_METHOD'] === 'POST') { //Valideer post attr van info form if (!empty($_POST['info_submit'])) { if ($_POST && isset($_POST['naam'], $_POST['website'], $_POST['woonplaats'], $_POST['telefoon'], $_POST['genre'])) {
$naam = $genre_id = $website = $woonplaats = $telefoon = ""; //Haal genres op $genres = new Genres(); $genres = $genres->get_all(); //Check of er POST waarde is if ($_SERVER['REQUEST_METHOD'] === 'POST') { //Valideer post attr if ($_POST && isset($_POST['naam'], $_POST['genre'], $_POST['website'], $_POST['woonplaats'], $_POST['telefoon'])) { $naam = test_input($_POST['naam']); $genre_id = test_input($_POST['genre']); $website = test_input($_POST['website']); $woonplaats = test_input($_POST['woonplaats']); $telefoon = test_input($_POST['telefoon']); $band = $bands->add($naam, $genre_id, $website, $woonplaats, $telefoon, $usr['id']); if ($band) { $band = $bands->get($band); if ($band) { ?> <script> $.notify("Band is succesvol aangemaakt!", "success"); </script> <?php } else { ?> <script> $.notify("Band kon niet worden aangemaakt", "error"); </script> <?php } } } else {