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);
$rounds = "";
foreach ($competitie->getRounds() as $round) {
    $rounds .= "<OPTION value=\"" . $round['ronde'] . "\">" . $round['ronde'] . " - " . $round["datum"];
}
include_once '../../includes/header.beheer.php';
?>

<body class="container">

    <?php 
include "../../includes/menu.beheer.php";
?>
       

    <div class="row">
        <div class="col-md-12">
            <form action="compReportCreate.php" method="post" class="form">
                <input type="hidden" name="seizoen" value="<?php 
echo $init->repository->get_data("seizoen");
?>
">
                <input type="hidden" name="competitie" value="<?php 
Example #2
0
    foreach ($_POST as $key => $data) {
        if (preg_match("/^R[0-9]+/", $key)) {
            $matches[substr($key, 1)]["Score"] = $data;
        }
        if (preg_match("/^Regl[0-9]+/", $key)) {
            $matches[substr($key, 4)]["Reglementair"] = $data;
        }
        if (preg_match("/^Rapp[0-9]+/", $key)) {
            $matches[substr($key, 4)]["ExcludeRating"] = $data;
        }
    }
    foreach ($matches as $matchId => $match) {
        $competitie->setMatch($matchId, $match["Score"], $match["Reglementair"], $match["ExcludeRating"]);
    }
}
$compRounds = $competitie->getRounds();
$compDate;
if (is_array($compRounds)) {
    foreach ($compRounds as $round) {
        if ($round["ronde"] == $_GET["ronde"]) {
            $compData = date("d/m/Y", strtotime($round["datum"]));
        }
    }
}
//Processing PGN
if ($init->repository->get_data("pgnText") && $init->repository->get_data("matchId")) {
    include_once '../../includes/class.match.php';
    $pgnMatch = new match($settings, $init->errorClass, $init->notificationClass, $init->repository->get_data("matchId"));
    $pgnMatch->setPGN($init->repository->get_data("pgnText"), $init->repository->get_data("matchId"), $init->repository->get_data("pgnId"));
}
if ($init->repository->get_data("pgnRemove")) {