*** empty log message ***

svn path=/trunk/boinc/; revision=2310
This commit is contained in:
Karl Chen 2003-09-08 00:04:55 +00:00
parent 3e48640dd8
commit 664287ec97
2 changed files with 13 additions and 5 deletions

View File

@ -123,8 +123,8 @@ function team_table_start() {
echo "<tr>
<th>Name</th>
<th>Members</th>
<th>Average credit</th>
<th>Total credit</th>
<th><a href=$_SERVER['PHP_SELF']?sort_by=expavg_credit>Average credit</a></th>
<th><a href=$_SERVER['PHP_SELF']?sort_by=total_credit>Total credit</a></th>
<th>Country</th>
</tr>
";

View File

@ -1,4 +1,5 @@
<?php
<?php {
require_once("db.inc");
require_once("util.inc");
require_once("user.inc");
@ -7,7 +8,13 @@
db_init();
page_head("Top teams");
$result = mysql_query("select * from team order by expavg_credit desc, total_credit desc");
$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");
start_table();
row1("Teams", 5);
team_table_start();
@ -19,4 +26,5 @@
mysql_free_result($result);
echo "</table>\n<p>\n";
page_tail();
?>
} ?>