<div id="container"> <div id="header"> <div id="header"> <?php include 'inc/header.php'; ?> </div> </div> <div id="content"> <?php if (isset($_SESSION['user'])) { //Alles echo "<h2>Welkom " . $_SESSION['user']['voornaam'] . " " . $_SESSION['user']['achternaam'] . "</h2>"; $targetUser = filter_input(INPUT_GET, 'user', FILTER_VALIDATE_INT); if ($targetUser) { $subjects = portfolio_get_user_subjects($targetUser); $userData = portfolio_get_user_details($targetUser); if ($userData) { echo '<h2>Vakken van ' . $userData['voornaam'] . ' ' . $userData['achternaam'] . '</h2>'; //echo '<p><a href="students.php">Terug naar studentenoverzicht</a></p>'; if ($userData['rol'] != 'student') { echo '<p>Geeft de volgende vakken</p>'; } echo '<hr>'; } if (count($subjects) > 0) { echo '<table class="tableLeft">'; foreach ($subjects as $sub) { if ($userData['rol'] != 'student') { //Geen link echo '<tr><td>' . $sub['vaknaam'] . '</td></tr>';
$janee = $targetData['isOpenbaar'] ? 'Ja' : 'Nee'; echo '<tr><th rel="row">' . 'Is openbaar' . '</th><td>'; echo '<select name="isOpenbaar">'; if ($targetData['isOpenbaar']) { echo '<option value="1" selected="selected">Ja</option><option value="0">Nee</option>'; } else { echo '<option value="1">Ja</option><option value="0" selected="selected">Nee</option>'; } echo '</select>'; echo '</td></tr>'; /* * Iets met vakken */ $vakkenActief = portfolio_get_material_subjects($targetId); echo '<tr><th rel="row">' . 'Vakken' . '</th><td>'; $vakken = portfolio_get_user_subjects($targetData['eigenaarId']); foreach ($vakken as $r) { echo '<input type="checkbox" name="vak' . $r['vakId'] . '"'; foreach ($vakkenActief as $va) { if ($r['vakId'] === $va['vakId']) { echo ' checked="checked"'; continue; } } echo '>' . $r['vaknaam'] . '<br>'; } echo '</td></tr>'; echo '</table>'; echo '<input type="submit" name="submit" value="Apply">'; echo '</form>'; echo '<p><a href="viewmaterial.php?material=' . $targetId . '">Terug</a></p>';