Example #1
0
<?php

//WEBSITE STARTUP
include_once '../../includes/class.init.php';
include_once '../../includes/class.competition.php';
include_once '../../includes/class.swiss.php';
include_once '../../includes/class.player.php';
$init = new init(1, 0, 0);
$competitie = new competition($settings, $init->repository->get_data("competitie"), $init->errorClass, $init->notificationClass);
if ($init->repository->get_data("addPlayer")) {
    $competitie->addPlayer($init->repository->get_data("addPlayer"));
}
if ($init->repository->get_data("removePlayer")) {
    $competitie->removePlayer($init->repository->get_data("removePlayer"));
}
if ($init->repository->get_data("participantsSorting")) {
    $competitie->setPlayerSorting($init->repository->get_data("participantsSorting"));
}
include_once '../../includes/header.beheer.php';
?>
<link href="../css/select2.css" rel="stylesheet"/>
<script src="../js/select2.min.js"></script>
<script>
    $(function() {
        $("#player").select2({
            placeholder: "Selecteer een speler",
            allowClear: true}); 
        $( "#participants" ).sortable({
        }).disableSelection();
        $('input[name=participantsSorting]').val($("#participants li").map(function() { return $(this).attr("value") }).get().join(","));
        $("#participants").on("sortupdate", function( event, ui ) {