2003-10-15 08:47:13 +00:00
|
|
|
<?php {
|
2003-08-22 05:36:25 +00:00
|
|
|
require_once("db.inc");
|
2002-11-08 17:21:45 +00:00
|
|
|
require_once("util.inc");
|
|
|
|
require_once("user.inc");
|
|
|
|
|
2002-12-04 19:14:00 +00:00
|
|
|
$authenticator = init_session();
|
2002-11-08 17:21:45 +00:00
|
|
|
db_init();
|
2003-03-17 22:37:49 +00:00
|
|
|
$numusers = 100;
|
|
|
|
page_head("Top $numusers users");
|
2003-09-08 00:12:37 +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 user order by $sort_by limit $numusers");
|
2003-10-15 08:48:02 +00:00
|
|
|
row1("Users", 6);
|
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();
|
2003-10-15 08:47:13 +00:00
|
|
|
} ?>
|