<?php //filmlijst include 'film.php'; $db = new database(); $gebruiker = new filmpje($db); //hier worden alle films geladen $Naam = 'Naam'; if (isset($_GET['Naam'])) { $films = $gebruiker->sort_films($_GET['Naam']); } else { $films = $gebruiker->sort_films($Naam); } ?> <div class="link-blocks"> <table class="bordered"> <thead> <tr> <th>Poster</th> <th>Naam </th> <th>Genre</th> <th>Tijd</th> <th>Wijzig</th> <th>Verwijder</th> </thead> <?php foreach ($films as $gebruiker) { echo '<tbody>'; echo '<tr>';
$gebruiker = new filmpje($db); if (!empty($_POST['Trailer']) and !empty($_POST['Plot'])) { $update = $gebruiker->update_trailer_omschrijving($_GET['form1'], $_POST['Trailer'], $_POST['Plot']); header('Location: test.php '); } elseif (empty($_POST['Trailer']) and !empty($_POST['Plot'])) { $update = $gebruiker->update_omschrijving($_GET['form1'], $_POST['Plot']); header('Location: test.php '); } elseif (empty($_POST['Plot']) and !empty($_POST['Trailer'])) { $update = $gebruiker->update_Trailer($_GET['form1'], $_POST['Trailer']); header('Location: test.php '); } } if (isset($_POST['filmnaam']) and $_POST['filmnaam'] != '') { include 'film.php'; $db = new database(); $gebruiker = new filmpje($db); $filmnaam = urlencode($_POST["filmnaam"]); $QR = "https://chart.googleapis.com/chart?cht=qr&chs=100x100&chl={$filmnaam}"; $get_film = $gebruiker->zoek_films($filmnaam); $sla_op = $gebruiker->sla_op($get_film->Title, $get_film->Genre, $get_film->Actors, $get_film->Runtime, $get_film->Plot, $get_film->Poster, $get_film->Released, $QR); header('Location: test.php'); } elseif (isset($_POST['filmnaam']) and empty($_POST['filmnaam'])) { include 'test.php'; echo "<div class='warning'><center>Vul een filmnaam in.</center></div>"; include 'add_film.php'; } if (isset($_POST['ww']) and $_POST['ww'] != '') { include 'gebruiker.php'; $db = new database(); $gebruiker = new user($db); $nieuw_ww = $gebruiker->change_ww($_POST['ww'], $_SESSION['id']);
function get_spotlight_movies() { $db = new database(); $gebruiker = new filmpje($db); $top_films = $gebruiker->get_top_films(); echo '<ul>'; foreach ($top_films as $gebruiker) { $filmnaam = $gebruiker['Naam']; $filmnaam = str_replace(' ', '%20', $filmnaam); echo '<li class="">'; echo '<a href="film/' . $filmnaam . '" title="' . $filmnaam . '"><img src="' . $gebruiker['Poster'] . '" alt="' . $filmnaam . '"/> '; echo '<div class="margin_left_10">'; echo '<strong>' . $gebruiker['Naam'] . '</strong> <p>' . $gebruiker['Genre'] . '</p> <p><small>IMDB-rating:' . $gebruiker['Raiting'] . '</small ></p>'; echo '</div>'; echo ' </a>'; echo '</li>'; } echo '</ul>'; }
<?php require '../model/functions.php'; require '../model/film.php'; get_header(); $db = new database(); $gebruiker = new filmpje($db); $film = $gebruiker->get_film($_GET['film']); echo $_GET['film']; $filmnaam = $_GET['film']; ?> <div class="filmcolum"> <div class="left_inner_top"> <h1 class="catering_header">Film <?php echo $film['Naam']; ?> </h1> </div> <div class="filmcolum_inner"> <?php echo '<p>'; echo '<img src="' . $film['Poster'] . '" style="height:250px;" alt="Filmpje | plaatje">' . $film['Youtube'] . '<br /></p><p><div style="clear:both;"></div>'; echo 'Tijd'; echo $film['Tijd']; echo '<br />'; echo 'Actors'; echo $film['Actors']; echo '<br />'; echo 'Genre'; echo $film['Genre'];