Ejemplo n.º 1
0
<th>Date</th>
<th>Team A</th>
<th>Team B</th>
<th>Score</th>
</tr>
<?php 
$ret = mysql_query("select ind from histmatch where {$seas->queryof()} 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 HistMatch($seas, $ind);
        $mtch->fetchdets();
        try {
            $mtch->fetchteams();
            $mtch->fetchgames();
        } catch (MatchException $e) {
            continue;
        }
        if ($mtch->Division != $lastdiv) {
            $lastdiv = $mtch->Division;
            print "<tr><th colspan=\"3\" align=\"center\">Division {$lastdiv}</th></tr>\n";
        }
        print <<<EOT
<tr>
<td>{$mtch->Date->display_month()}</td>
EOT;
        $ht = $mtch->Hteam->display_name();
        $at = $mtch->Ateam->display_name();
        if ($mtch->Result == 'H') {
            $ht = "<b>{$ht}</b>";