| 1 |
<?
|
| 2 |
$rs=mysql_query("select bbs.UID,count(*)*10+".
|
| 3 |
"sum(bbs.excerption*100+".
|
| 4 |
"bbs.ontop*50+bbs.reply_count/10+".
|
| 5 |
"bbs.view_count/100+bbs.length/1000)".
|
| 6 |
" as c_order,bbs.username from bbs".
|
| 7 |
" inner join section_config on bbs.SID=section_config.SID".
|
| 8 |
" where bbs.TID=0 and bbs.visible and bbs.transship=0 and".
|
| 9 |
" section_config.read_user_level=0 and section_config.write_user_level=0 and".
|
| 10 |
" section_config.exp_get".
|
| 11 |
" and section_config.recommend and (bbs.sub_dt >= ".
|
| 12 |
"subdate(now(),interval '14' day))".
|
| 13 |
" group by bbs.UID,bbs.username having c_order>=100".
|
| 14 |
" order by c_order desc limit 10")
|
| 15 |
or die("Query data error!");
|
| 16 |
|
| 17 |
$order=1;
|
| 18 |
while ($row=mysql_fetch_array($rs))
|
| 19 |
{
|
| 20 |
?>
|
| 21 |
第<? echo str_repeat(" ",3-strlen($order)).$order; ?> 名 <? echo $row["username"]; ?><br>
|
| 22 |
<?
|
| 23 |
$order++;
|
| 24 |
}
|
| 25 |
|
| 26 |
mysql_free_result($rs);
|
| 27 |
?>
|