2003-10-15 08:47:13 +00:00
|
|
|
<?php {
|
2004-04-14 20:55:37 +00:00
|
|
|
require_once("../inc/cache.inc");
|
|
|
|
$sort_by = $_GET["sort_by"];
|
|
|
|
if (!$sort_by) $sort_by = "expavg_credit";
|
|
|
|
$cache_args = "sort_by=$sort_by";
|
|
|
|
start_cache(3600, $cache_args);
|
|
|
|
|
2004-02-02 23:34:39 +00:00
|
|
|
require_once("../inc/util.inc");
|
2004-04-14 20:55:37 +00:00
|
|
|
require_once("../inc/db.inc");
|
2004-02-02 23:34:39 +00:00
|
|
|
require_once("../inc/user.inc");
|
2002-11-08 17:21:45 +00:00
|
|
|
|
2003-09-08 00:12:37 +00:00
|
|
|
if ($sort_by == "total_credit") {
|
2004-04-14 20:55:37 +00:00
|
|
|
$sort_order = "total_credit desc, total_credit desc";
|
2003-09-08 00:12:37 +00:00
|
|
|
} else {
|
2004-04-14 20:55:37 +00:00
|
|
|
$sort_order = "expavg_credit desc, total_credit desc";
|
2003-09-08 00:12:37 +00:00
|
|
|
}
|
2004-04-14 20:55:37 +00:00
|
|
|
|
|
|
|
db_init();
|
|
|
|
$numusers = 100;
|
2004-05-12 17:54:23 +00:00
|
|
|
page_head("Top $numusers participants");
|
2004-04-14 20:55:37 +00:00
|
|
|
$result = mysql_query("select * from user order by $sort_order limit $numusers");
|
2002-11-08 17:21:45 +00:00
|
|
|
user_table_start();
|
2003-10-15 08:47:13 +00:00
|
|
|
$i = 0;
|
2002-11-08 17:21:45 +00:00
|
|
|
while ($user = mysql_fetch_object($result)) {
|
2003-10-15 08:47:15 +00:00
|
|
|
show_user_row($user, ++$i);
|
2002-11-08 17:21:45 +00:00
|
|
|
}
|
|
|
|
echo "</table>\n";
|
|
|
|
page_tail();
|
2004-04-14 20:55:37 +00:00
|
|
|
|
|
|
|
end_cache($cache_args);
|
2003-10-15 08:47:13 +00:00
|
|
|
} ?>
|