<script type="text/javascript">
    $(function () {
        var data = [
<?php 
$categoriedata = checkCategorie();
$gegevens = getAllExamquestionCategories();
$x = count($gegevens);
$e = 1;
foreach ($gegevens as $gegeven) {
    ?>
            { label: "<br><?php 
    foreach ($categoriedata as $t) {
        $q = $t['categorieomschrijving'];
        if ($gegeven['categorie_id'] == $t['categorie_id']) {
            echo $q;
        }
    }
    ?>
<br><br>", data:"<?php 
    echo $gegeven['count(categorie_id)'];
    ?>
"}
    <?php 
    $e++;
    if ($x >= $e) {
        echo ",";
    }
    ?>
    <?php 
}
?>
        ?>
"  type="text" name="maxscore<?php 
        echo $getal;
        ?>
"></td>
									<td>
										<select class="form-control" name="categorie<?php 
        echo $getal;
        ?>
">
											<option><?php 
        echo $a['categorieomschrijving'];
        ?>
</option>
											<?php 
        $test = checkCategorie();
        foreach ($test as $t) {
            $t = $t['categorieomschrijving'];
            echo "<option>" . $t . "</option>";
        }
        ?>
										</select>
									</td>
								</tr>
								<?php 
        $getal++;
    }
    ?>
							</tbody>
						</table>
					
                <h1 class="m-n font-thin h3 text-black">Score invoeren</h1>
                <small class="text-muted">Voer hier de score in van je gemaakte examens:</small>
            </div>
        </div>
    </div>
    <!-- / main header -->
    <div class="wrapper-md">
        <div class="row">
            <div class="col-sm-12">
                    <div class="panel panel-default">
                        <div class="panel-heading"><h3 class="panel-title">Selecteer een examen om je resultaten in toe voeren of bij te werken.</h3></div>
                        <div class="panel-body">
                            <?php 
$niveau = getNiveauFromStudent($_SESSION['gebruiker_id']);
$examenlijst = getexamen($niveau);
$categorien = checkCategorie();
if (empty($examenlijst)) {
    echo "Jij bent ingedeeld in een <b>" . $niveau . "</b> klas. Voor dit niveau zijn er nog geen examens beschikbaar. Vraag je docent om examens toe toe voegen.";
} else {
    ?>
                                <div class="responsive">
                                    <table class="table">
                                        <tr>
                                            <td>Examenvak</td>
                                            <td>Examenjaar</td>
                                            <td>Tijdvak</td>
                                            <td>nTerm</td>
                                            <td>Niveau</td>
                                            <td></td>
                                        </tr>
                                        <?php 
Example #4
0
    header('Location : index.php?page=admin&supprimer=Event');
}
/******************************************************/
/*				 Forum Gestion			     		  */
/******************************************************/
$listeCategorie = recupCategories();
$listeForum = recupForum();
function checkCategorie()
{
    if (isCategorieInDb($_POST['nom'])) {
        return "Categorie déjà utilisé, merci d'en choisir un autre.";
    }
    return "NoError";
}
if (isset($_POST['creerCat'])) {
    $error = checkCategorie();
    if ($error == "NoError") {
        addCategorie($_POST['nom']);
        echo "<div class='success' >Categorie ajoutée !</div>";
    } else {
        echo "<div class='error' >" . $error . "</div>";
    }
}
function checkForum()
{
    if (isForumInDb($_POST['nom'])) {
        return "Forum déjà utilisé, merci d'en choisir un autre.";
    }
    return "NoError";
}
if (isset($_POST['creerForum'])) {