/[LeafOK_CVS]/lbbs/utils/bin/gen_top.php
ViewVC logotype

Diff of /lbbs/utils/bin/gen_top.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.1 by sysadm, Fri Oct 22 17:45:36 2004 UTC Revision 1.3 by sysadm, Sat Oct 23 08:22:25 2004 UTC
# Line 9  Line 9 
9          $cache_path = "../../data/bbs_top.txt";          $cache_path = "../../data/bbs_top.txt";
10    
11          $buffer =          $buffer =
12                  "                -----===== 全国十大热门话题 =====-----\r\n\r\n";                  "               \033[1;34m-----\033[37m=====\033[41;37m 本站十大热门话题 \033[40m=====\033[34m-----\033[m\r\n\r\n";
13    
14          $db_conn = include "./db_open.inc.php";          $db_conn = include "./db_open.inc.php";
15                    
16          $rs = mysql_query(          $rs = mysql_query(
17                  " select bbs.title, sname, username".                  " select bbs.title, sname, username, sub_dt".
18                  " from bbs inner join section_config on".                  " from bbs inner join section_config on".
19                  " bbs.SID=section_config.SID inner join user_list on".                  " bbs.SID=section_config.SID inner join user_list on".
20                  " user_list.UID=bbs.UID where section_config.recommend".                  " user_list.UID=bbs.UID where section_config.recommend".
# Line 23  Line 23 
23                  " order by bbs.excerption desc,bbs.view_count+bbs.reply_count desc,".                  " order by bbs.excerption desc,bbs.view_count+bbs.reply_count desc,".
24                  "bbs.transship limit 10",$db_conn);                  "bbs.transship limit 10",$db_conn);
25    
26          i = 1;          $i = 1;
   
27          while ($row=mysql_fetch_array($rs))          while ($row=mysql_fetch_array($rs))
28          {          {
29                  sprintf ($temp,                  $buffer .= sprintf (
30                          "第 %2d 名 版块 : [%s]%s%s%s\r\n".                          " \033[1;37m第 \033[31m%2d \033[37m名 版块 : \033[33m%s%s \033[37m【\033[32m%s \033[37m】    \033[35m%s%s \r\n".
31                          "         标题 : %s%s\r\n",                          " \033[37m     标题 : \033[44;37m%s%s \033[0;40;37m\r\n",
32                          i++, $row["sname"], str_repeat(" ", 36 - strlen($row["sname"])),                          $i++, $row["sname"], str_repeat(" ", 20 - strlen($row["sname"])),
33                          $row["username"], str_repeat(" ", 28 - strlen($row["username"]))                          strftime("%a %d %H:%M:%S", strtotime($row["sub_dt"])),
34                            str_repeat(" ", 16 - strlen($row["username"])),
35                            $row["username"], substr($row["title"],0,60),
36                            str_repeat(" ", 60 - strlen($row["title"]))
37                          );                          );
                 $buffer.=$temp;  
38          }          }
39                    
40          mysql_free_result($rs);          mysql_free_result($rs);


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

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