2003-09-08 00:04:55 +00:00
|
|
|
<?php {
|
|
|
|
|
2004-02-02 23:34:39 +00:00
|
|
|
require_once("../inc/db.inc");
|
|
|
|
require_once("../inc/util.inc");
|
|
|
|
require_once("../inc/user.inc");
|
|
|
|
require_once("../inc/team.inc");
|
2002-11-11 19:40:22 +00:00
|
|
|
|
2002-11-08 22:30:13 +00:00
|
|
|
db_init();
|
2002-11-11 19:40:22 +00:00
|
|
|
|
2002-11-08 22:30:13 +00:00
|
|
|
page_head("Top teams");
|
2003-09-08 00:04:55 +00:00
|
|
|
$sort_by = $_GET["sort_by"];
|
|
|
|
if ($sort_by == "total_credit") {
|
|
|
|
$sort_by = "total_credit desc, total_credit desc";
|
|
|
|
} else {
|
|
|
|
$sort_by = "expavg_credit desc, total_credit desc";
|
|
|
|
}
|
|
|
|
$result = mysql_query("select * from team order by $sort_by");
|
2003-03-17 22:37:49 +00:00
|
|
|
start_table();
|
2003-10-15 08:47:13 +00:00
|
|
|
row1("Teams", 6);
|
2002-11-08 22:30:13 +00:00
|
|
|
team_table_start();
|
2003-03-17 22:37:49 +00:00
|
|
|
$i = 1;
|
2002-11-08 22:30:13 +00:00
|
|
|
while ($team = mysql_fetch_object($result)) {
|
2003-03-17 22:37:49 +00:00
|
|
|
show_team_row($team, $i);
|
|
|
|
$i++;
|
2002-11-08 22:30:13 +00:00
|
|
|
}
|
2002-11-11 19:40:22 +00:00
|
|
|
mysql_free_result($result);
|
2002-12-06 21:37:30 +00:00
|
|
|
echo "</table>\n<p>\n";
|
2002-11-08 22:30:13 +00:00
|
|
|
page_tail();
|
2003-09-08 00:04:55 +00:00
|
|
|
|
|
|
|
} ?>
|