コード例 #1
0
ファイル: playing.php プロジェクト: Britgo/Online-League
include 'php/team.php';
function phcp($hred, $diff)
{
    $diff -= $hred;
    if ($diff <= 0) {
        print "the game is an even game.";
    } elseif ($diff == 1) {
        print "the game is played with no komi (strictly 0.5 komi).";
    } elseif ($diff <= 9) {
        print "a handicap of {$diff} is used and 0.5 komi.";
    } else {
        $rkomi = 0.5 - ($diff - 9) * 10;
        print "a handicap of 9 plus {$rkomi} (reverse) komi is used.";
    }
}
$md = max_division();
$pars = new Params();
$pars->fetchvalues();
$hdiv = $pars->Hdiv;
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<?php 
$Title = "Playing games";
include 'php/head.php';
?>
<body>
<script language="javascript" src="webfn.js"></script>
<?php 
include 'php/nav.php';
?>
コード例 #2
0
ファイル: league.php プロジェクト: Britgo/Online-League
<?php 
$Title = "League Standings";
include 'php/head.php';
?>
<body>
<script language="javascript" src="webfn.js"></script>
<?php 
include 'php/nav.php';
?>
<h1>Current League Standings</h1>
<p>Click <a href="leaguehist.php">here</a> to view previous seasons.</p>
<div align="center">
<?php 
$pars = new Params();
$pars->fetchvalues();
$ml = max_division();
for ($d = 1; $d <= $ml; $d++) {
    $tl = list_teams($d);
    $cn = 7 + count($tl);
    print <<<EOT
<table class="league">
<tr>
<th colspan="{$cn}" align="center">Division {$d}</th>
</tr>
<tr>
<th>Team</th>

EOT;
    foreach ($tl as $t) {
        $t->get_scores($pars);
    }
コード例 #3
0
ファイル: matches.php プロジェクト: Britgo/Online-League
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<?php 
$Title = "Matches";
include 'php/head.php';
?>
<body>
<script language="javascript" src="webfn.js"></script>
<?php 
include 'php/nav.php';
?>
<h1>Matches</h1>
<a name="topm"></a>
<table class="plinits"><tr>
<?php 
$maxdiv = max_division();
for ($n = 1; $n <= $maxdiv; $n++) {
    print <<<EOT
<td><a href="#div{$n}">Div {$n}</a></td>
EOT;
}
?>
</tr></table>
<table class="matchesd">
<?php 
$ret = mysql_query("select ind from lgmatch order by divnum,matchdate,hteam,ateam");
if ($ret && mysql_num_rows($ret) > 0) {
    $lastdiv = -99;
    while ($row = mysql_fetch_array($ret)) {
        $ind = $row[0];
        $mtch = new Match($ind);
コード例 #4
0
ファイル: team.php プロジェクト: Britgo/Online-League
 public function divopt()
 {
     print "<select name=\"division\">\n";
     $maxt = max_division() + 1;
     // Allow for 1 more than number of existing
     for ($d = 1; $d <= $maxt; $d++) {
         if ($d == $this->Division) {
             print "<option selected>{$d}</option>\n";
         } else {
             print "<option>{$d}</option>\n";
         }
     }
     print "</select>\n";
 }