示例#1
0
<?php

// read-matches.php reads all the matches for the competition identified
// by $name below.
set_include_path("../src/");
require_once 'lib/db.php';
require_once 'lib/team.php';
require_once 'lib/match.php';
require_once 'lib/alliance.php';
require_once 'lib/competition.php';
function reportMatches($matches)
{
    foreach ($matches as $match) {
        print "CompetitionID = {$match->CompetitionID}\n";
        $red = $match->RedAlliance;
        $blue = $match->BlueAlliance;
        printf("{$match->Time}, {$match->Number}, {$red->TeamOne}, {$red->TeamTwo}, {$red->TeamThree}, " . "{$blue->TeamOne}, {$blue->TeamTwo}, {$blue->TeamThree}, {$red->Points}, {$blue->Points}\n");
    }
}
//---------------------------------------------------------------------------//
$name = "Oregon City District";
$con = DB::connect();
$comp = competition::selectByName($con, $name);
if (!$comp) {
    die("Competition \"{$name}\" not found.");
}
printf("Competition {$name} ID=%s\n", $comp->ID);
$matches = $comp->selectMatches($con);
reportMatches($matches);
示例#2
0
<?php

//WEBSITE STARTUP
include_once '../../includes/class.init.php';
$init = new init(1, 0, 0);
include_once '../../includes/class.competition.php';
include_once '../../includes/class.swiss.php';
include_once '../../includes/class.player.php';
//require_once('../../includes/class.data.php');
$swiss = new swiss();
$settings = new settings();
$competitie = new competition($settings, $init->repository->get_data("competitie"), $init->errorClass, $init->notificationClass);
$competitie->getGeneralData();
if ($init->repository->get_data("compName")) {
    $competitie->setData($init->repository->get_data("compName"), $init->repository->get_data("compNameExtended"), $init->repository->get_data("typeCompetition"), $init->repository->get_data("tempo"), $init->repository->get_data("tempoExtended"), $init->repository->get_data("place"), $init->repository->get_data("country"), $init->repository->get_data("arbiter"), $init->repository->get_data("arbiterMail"), $init->repository->get_data("compDisplay"), $init->repository->get_data("compSorting"));
    $competitie->getGeneralData();
    $competitie->setOptions("TPRmethod", $init->repository->get_data("TPRmethod"));
    $competitie->setOptions("TPRdamped", $init->repository->get_data("TPRdamped"));
    $competitie->setOptions("compSystem", $init->repository->get_data("compSystem"));
    $competitie->setOptions("keizerIteraties", $init->repository->get_data("keizerIteraties"));
    $competitie->setOptions("keizerInitialSorting", $init->repository->get_data("keizerInitialSorting"));
    $competitie->setOptions("keizerMaxValue", $init->repository->get_data("keizerMaxValue"));
    $competitie->getGeneralData();
}
include_once '../../includes/header.beheer.php';
?>
<script>
    $(function() {
        $( "#rangschikking" ).sortable();
        $( ".compDisplay" ).sortable({
            connectWith: ".compDisplay"
示例#3
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 
示例#4
0
<?php

//WEBSITE STARTUP
include_once '../../includes/class.settings.php';
include_once '../../includes/class.competition.php';
include_once '../../includes/class.swiss.php';
include_once '../../includes/class.player.php';
$swiss = new swiss();
$settings = new settings();
$competitie = new competition($settings, $_GET['competitie']);
$competitie->getGeneralData();
$roundSelect = $competitie->rounds[count($competitie->rounds) - 1];
if ($_GET["ronde"]) {
    foreach ($competitie->rounds as $comp) {
        if ($comp["ronde"] == $_GET["ronde"]) {
            $roundSelect = $comp;
        }
    }
}
$competitie->getStanding(array(1, $roundSelect["ronde"]));
include_once '../../includes/header.archief.php';
?>

<body class="container">

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

    <h1 class="hidden-print">Competitie</h1>
<?php

set_include_path(__DIR__);
require_once 'lib/db.php';
require_once 'lib/competition.php';
include 'header.php';
//session_start();
//printf("Session username = %s\n", $_SESSION['username']);
$con = DB::connect();
$result = competition::selectCompetitions($con);
$year = "2014";
echo "<h1>Competitions " . $year . "</h1>";
while ($row = mysqli_fetch_array($result)) {
    $date = date_create($row['Start']);
    if (date_format($date, 'Y') == $year) {
        printf("\n                   <a href='view-matches.php?id=%s'>%s</a><br/>\n                   <label>%s - %s</label></br>\n", $row['ID'], $row['Name'], $row['Start'], $row['End']);
    }
}
mysqli_free_result($result);
DB::disconnect($con);
include 'footer.php';
示例#6
0
文件: standen.php 项目: haverver/SVN
<?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(0, 0, 1);
$swiss = new swiss();
$settings = new settings();
$competitie = new competition($settings, $init->repository->get_data("competitie"));
if ($init->repository->get_data("competitie")) {
    $competitie->getGeneralData();
    $roundSelect = $competitie->rounds[count($competitie->rounds) - 1];
    if ($init->repository->get_data("competitie")) {
        foreach ($competitie->rounds as $comp) {
            if ($comp["ronde"] == $init->repository->get_data("round")) {
                $roundSelect = $comp;
            }
        }
    }
    $competitie->getStanding(array(1, $roundSelect["ronde"]));
}
include_once '../../includes/header.archief.php';
?>
<script type="text/javascript">
    $(document).ready(function(){
        $('#stand > table').floatThead({
        });
    });                                   
</script>
示例#7
0
<?php 
require_once 'lib/db.php';
require_once 'lib/competition.php';
require_once 'lib/team.php';
require_once 'lib/game.php';
$con = DB::connect();
$matchid = $_GET["match"];
$match = match::select($con, $matchid);
$number = $match->Number;
session_start();
$compid = $_SESSION["competitionid"];
$comp = competition::select($con, $compid);
$prevmatch = match::selectByNumber($con, $compid, $number - 1);
$nextmatch = match::selectByNumber($con, $compid, $number + 1);
include 'header.php';
include 'navbar.php';
$red = $match->RedAlliance;
$blue = $match->BlueAlliance;
?>

<label class="heading">Match <?php 
echo $number;
?>
</label><br/>
<br/>
<table class='scout_table'>
  <tr>
    <td class='team red'><?php 
echo $red->TeamOne;
?>
</td>
示例#8
0
<?php

//WEBSITE STARTUP
include_once '../../includes/class.init.php';
$init = new init(1, 0, 0);
include_once '../../includes/class.competition.php';
include_once '../../includes/class.swiss.php';
include_once '../../includes/class.player.php';
include_once '../../includes/header.beheer.php';
$swiss = new swiss();
$settings = new settings();
$competitie = new competition($settings, $_GET['competitie']);
$competitie->getGeneralData();
//Processing changes
//Adding match
if ($_POST["date"] && $_POST["ronde"] && ($_POST["match"] || $_POST["playerWhite"] && $_POST["playerBlack"])) {
    $playerWhite = new player($settings, $_POST["playerWhite"]);
    $playerWhite->getDetails();
    $playerBlack = new player($settings, $_POST["playerBlack"]);
    $playerBlack->getDetails();
    $date = explode("/", $_POST["date"]);
    $date = $date[2] . "/" . $date[1] . "/" . $date[0];
    $competitie->addMatch($playerWhite, $playerBlack, $init->repository->get_data("round"), $date);
}
//Deleting match
if ($_GET["matchDelete"]) {
    $competitie->deleteMatch($_GET["matchDelete"]);
}
//Updating scores
if ($_POST["updateScores"]) {
    $matches;
示例#9
0
文件: standen.php 项目: haverver/SVN
    //include_once('../class_database.php');
    include_once('../class_menu.php');
    include_once('../../../includes/class.settings.php');
    include_once('../../../includes/class.competition.php');
    include_once('../../../includes/class.swiss.php');
    include_once('../../../includes/class.player.php');
    $swiss = new swiss();
    $settings = new settings();

    //$database = new database();
    $login = new login(1, 0);
    $login->main();

    $menu = new menu();
    $_GET["competitie"] = $_SESSION["competitie_session"];
    $competitie = new competition($settings, $_GET['competitie']);
    $competitie->getGeneralData();

    $competitie->getStanding();
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
    <head>
        <title>SV Nieuwerkerk | Archief</title>

        <meta name="author" content="Rob Hoogland" />
        <meta name="copyright" content="&copy; 2010 jeugdschaken.nl" />
        <meta name="description" content="Welkom - mijn-2e-huis.nl" />
        <meta name="keywords" content="Share documents, School Project, information, file sharing" />
示例#10
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 ) {