/[LeafOK_CVS]/fenglin/bbs/top_user_gen.inc.php
ViewVC logotype

Annotation of /fenglin/bbs/top_user_gen.inc.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Mon Jun 21 00:13:21 2004 UTC (21 years, 9 months ago) by sysadm
Branch: MAIN
Generate top_user_list

1 sysadm 1.1 <?
2     function top_user_gen($db_conn)
3     {
4     $OPT_buffer="".
5     "";
6    
7     $rs=mysql_query("select bbs.UID,count(*)*10+".
8     "sum(bbs.excerption*100+".
9     "bbs.ontop*50+bbs.reply_count/10+".
10     "bbs.view_count/100+bbs.length/1000)".
11     " as c_order,user_pubinfo.nickname from bbs".
12     " inner join user_pubinfo on bbs.UID=user_pubinfo.UID".
13     " inner join section_config on bbs.SID=section_config.SID".
14     " where bbs.TID=0 and bbs.visible and bbs.transship=0 and".
15     " section_config.public and section_config.exp_get".
16     " and section_config.recommend and (bbs.sub_dt >= ".
17     "subdate(now(),interval '14' day))".
18     " group by bbs.UID having c_order>=100".
19     " order by c_order desc limit 10")
20     or die("Query data error!");
21    
22     while ($row=mysql_fetch_array($rs))
23     {
24     $OPT_buffer.=" \n".
25     " <a class=\"s2\" href=\"javascript:show_profile(";
26     $OPT_buffer.= $row["UID"]; $OPT_buffer.=")\">";
27     $OPT_buffer.= $row["nickname"]; $OPT_buffer.="</a><br> \n".
28     "";
29    
30     }
31    
32     mysql_free_result($rs);
33     $OPT_buffer.=" \n".
34     "\n".
35     "";
36    
37     return ($OPT_buffer);
38     }
39     ?>

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1