示例#1
0
文件: asynch.php 项目: haverver/SVN
function getOpponentScores($init, $data)
{
    $player = new player($init->settings, $init->repository->get_data("player"));
    $scores = $player->getOpponentScores($init->repository->get_data("tempo"));
    foreach ($scores as $key => $opponentData) {
        $opponent = new player($settings, $opponentData["TegenstanderId"]);
        $opponent->getDetails();
        $scores[$key]["name"] = $opponent->name;
    }
    echo json_encode($scores);
}
示例#2
0
                            <th>Speler</th>
                            <th>Rating</th>
                            <th></th>
                            <th>Tegenstander</th>
                            <th>KNSB</th>
                            <th>Rating</th>
                            <th>Uitslag</th>
                        </tr> 
                    </thead>
                    <?php 
$results = array("1" => "1 - 0", "0.5" => "&#189;-&#189;", "0" => "0 - 1");
for ($a = 1; $a < 11; $a++) {
    $game = $data->filter($matchGames, "bord", $a);
    $game = $game[0];
    $speler = new player($settings, $game["spelerId"]);
    $speler->getDetails();
    ?>
                        <tr>
                            <td><?php 
    echo $a;
    ?>
                                <input type="hidden" name="gameId<?php 
    echo $a;
    ?>
" value="<?php 
    echo $game["id"];
    ?>
">
                                <input type="hidden" name="memberId<?php 
    echo $a;
    ?>
示例#3
0
文件: member.php 项目: haverver/SVN
<?php

//WEBSITE STARTUP
include_once '../../includes/class.init.php';
include_once '../../includes/class.player.php';
$init = new init(1, 0, 0);
$settings = new settings();
$member = new player($settings, $init->repository->get_data("memberId"));
if ($init->repository->get_data("memberAction") == 1) {
    $member->setDetails($init->repository->get_data("memberKNSB"), $init->repository->get_data("memberInitials"), $init->repository->get_data("memberFirstname"), $init->repository->get_data("memberMiddlename"), $init->repository->get_data("memberSurname"));
}
$member->getDetails();
include_once '../../includes/header.beheer.php';
?>
<body class="container">

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


    <div class="row hidden-print">
        <div class="col-md-12">
            <h1 class="hidden-print">Leden bewerken</h1>
            <form class="form-horizontal" method="post">
                <input type="hidden" name="memberId" value=<?php 
echo $init->repository->get_data("memberId");
?>
>
                <input type="hidden" name="memberAction" value=1>
示例#4
0
$player = new player($settings, $_GET["spelerId"]);
$player->getDetails();
?>
                    <h2>Partijen: <?php 
echo "<a href=\"competitieSpeler.php?seizoen=" . $_GET["seizoen"] . "&competitie=" . $_GET["competitie"] . "&spelerId=" . $player->id . "\">" . $player->name . "</a>";
?>
</h2>
                    <table class="table table-striped table-hover">
                        <thead><tr><th>Datum</th><th>Witspeler</th><th></th><th>Zwartspeler</th><th>Uitslag</th></tr></thead>
                        <?php 
foreach ($competitie->getMatches(null, $_GET["spelerId"]) as $match) {
    // print_r($match);
    $playerWhite = new player($settings, $match["speler_wit"]);
    $playerWhite->getDetails();
    $playerBlack = new player($settings, $match["speler_zwart"]);
    $playerBlack->getDetails();
    $uitslag;
    switch ($match["uitslag"]) {
        case "1":
            $uitslag = "1 - 0";
            break;
        case "2":
            $uitslag = "&#189;-&#189;";
            break;
        case "3":
            $uitslag = "0 - 1";
            break;
    }
    echo "<tr><td>" . date("d-m-Y", strtotime($match["datum"])) . "</td><td><a href=\"competitieSpeler.php?seizoen=" . $_GET["seizoen"] . "&competitie=" . $_GET["competitie"] . "&spelerId=" . $playerWhite->id . "\">" . $playerWhite->name . "</a> (" . $match["rating_wit"] . ")</td><td>-</td><td><a href=\"competitieSpeler.php?seizoen=" . $_GET["seizoen"] . "&competitie=" . $_GET["competitie"] . "&spelerId=" . $playerBlack->id . "\">" . $playerBlack->name . "</a> (" . $match["rating_zwart"] . ")</td><td>" . $uitslag . "</td></tr>";
}
?>
示例#5
0
文件: standen.php 项目: haverver/SVN
                            </table> 
                        </div>
                        <div id="kruistabel" class="tab-pane table-responsive"> 
                            <table class="table table-striped table-condensed" id="kruistabel">
                                <?php 
$competitie->getMatches(array(1, $roundSelect["ronde"]));
echo "<tr><thead><th></th><th>Speler</th>";
foreach ($competitie->standings as $key => $data) {
    echo "<th>" . ($key + 1) . "</th>";
}
echo "</thead></tr>";
foreach ($competitie->standings as $key => $data) {
    echo "<tr><td>" . ($key + 1) . "</td>";
    $player = new player($settings, $data["player"]);
    $player->getDetails();
    echo "<td><a href=\"competitieSpeler.php?seizoen=" . $_GET["seizoen"] . "&competitie=" . $_GET["competitie"] . "&spelerId=" . $data["player"] . "\">" . $player->name . "</a></td>";
    foreach ($competitie->standings as $nr => $speler) {
        if ($key == $nr) {
            echo "<td style='background-color: black'></td>";
        } else {
            echo "<td>";
            foreach ($competitie->matches as $partij) {
                if ($partij["uitslag"] != "" && ($partij["speler_wit"] == $data["player"] && $competitie->standings[$nr]["player"] == $partij["speler_zwart"]) || $partij["speler_wit"] == $competitie->standings[$nr]["player"] && $data["player"] == $partij["speler_zwart"]) {
                    $uitslag = $partij["uitslag"];
                    if ($partij["speler_zwart"] == $data["player"]) {
                        $uitslag = 4 - $uitslag;
                    }
                    switch ($uitslag) {
                        case 1:
                            echo "1";