Ejemplo n.º 1
0
    }
    $ret = mysql_query("select matchdate from lgmatch order by matchdate desc limit 1");
    if ($ret && mysql_num_rows($ret) > 0) {
        $row = mysql_fetch_array($ret);
        if ($row) {
            $latest->enctime($row[0]);
        }
    }
    $ret = mysql_query("select count(*) from season where league='T'");
    if ($ret && mysql_num_rows($ret) > 0) {
        $row = mysql_fetch_array($ret);
        if ($row) {
            $seasnum = $row[0] + 1;
        }
    }
    $name = "Season {$seasnum} {$earliest->display_month()} to {$latest->display_month()}";
    for ($d = 1; $d <= $ml; $d++) {
        $promo[$d]->fetchdets();
        $releg[$d]->fetchdets();
    }
    print "<h2>Champions</h2>\n";
    print "<p><b>{$promo[1]->display_name()} are the league champions!!!</b></p>\n";
    for ($d = 2; $d <= $ml; $d++) {
        print "<p>{$promo[$d]->display_name()} are champions of division {$d}</p>\n";
    }
    print <<<EOT
<h2>The Wooden Spoon</h2>
<p>We commiserate with {$releg[$ml]->display_name()} on coming bottom.</p>
<h2>End of Season / Promotions and relegations</h2>
<form action="archive2.php" method="post" enctype="application/x-www-form-urlencoded" onsubmit="javascript:return checkok()">
<p>Name for season: <input type="text" name="seasname" value="{$name}" size="60"></p>