/[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.5 by sysadm, Sun Mar 13 09:06:27 2005 UTC Revision 1.8 by sysadm, Mon Apr 28 03:31:00 2025 UTC
# Line 1  Line 1 
 #!/usr/local/php/bin/php  
1  <?  <?
2          if (!isset($_SERVER["argc"]))          if (!isset($_SERVER["argc"]))
3                  $_SERVER["argc"] = 0;                  $_SERVER["argc"] = 0;
# Line 12  Line 11 
11                  "               \033[1;34m-----\033[37m=====\033[41;37m 本站十大热门话题 \033[40m=====\033[34m-----\033[m\r\n\r\n";                  "               \033[1;34m-----\033[37m=====\033[41;37m 本站十大热门话题 \033[40m=====\033[34m-----\033[m\r\n\r\n";
12    
13          $db_conn = include "./db_open.inc.php";          $db_conn = include "./db_open.inc.php";
14            
15          $rs = mysql_query(          $rs = mysql_query(
16                  " select bbs.title, sname, username, sub_dt".                  " select bbs.title, sname, username, sub_dt".
17                  " from bbs inner join section_config on".                  " from bbs inner join section_config on".
# Line 32  Line 31 
31                          $i++, $row["sname"], str_repeat(" ", 20 - strlen($row["sname"])),                          $i++, $row["sname"], str_repeat(" ", 20 - strlen($row["sname"])),
32                          strftime("%b %d %H:%M:%S", strtotime($row["sub_dt"])),                          strftime("%b %d %H:%M:%S", strtotime($row["sub_dt"])),
33                          str_repeat(" ", 16 - strlen($row["username"])),                          str_repeat(" ", 16 - strlen($row["username"])),
34                          $row["username"], substr($row["title"],0,60),                          $row["username"], substr($row["title"],0,60),
35                          str_repeat(" ", 60 - strlen($row["title"]))                          str_repeat(" ", 60 - strlen($row["title"]) >=0 ? 60 - strlen($row["title"]) : 0)
36                          );                          );
37          }          }
38            
39          mysql_free_result($rs);          mysql_free_result($rs);
40    
41          mysql_close($db_conn);          mysql_close($db_conn);
# Line 46  Line 45 
45                  fwrite($fp,$buffer);                  fwrite($fp,$buffer);
46                  fclose($fp);                  fclose($fp);
47          }          }
48            
49          return 0;          return 0;
50  ?>  ?>


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

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