--- lbbs/utils/bin/gen_top.php 2004/12/01 06:04:37 1.4 +++ lbbs/utils/bin/gen_top.php 2025/04/28 03:31:00 1.8 @@ -1,4 +1,3 @@ -#!/usr/local/bin/php =10". " and (bbs.sub_dt >= subdate(now(),interval '7' day))". " order by bbs.excerption desc,bbs.view_count+bbs.reply_count desc,". - "bbs.transship limit 10",$db_conn); + "bbs.transship limit 10",$db_conn) + or die ("Query data error"); $i = 1; while ($row=mysql_fetch_array($rs)) @@ -32,11 +31,11 @@ $i++, $row["sname"], str_repeat(" ", 20 - strlen($row["sname"])), strftime("%b %d %H:%M:%S", strtotime($row["sub_dt"])), str_repeat(" ", 16 - strlen($row["username"])), - $row["username"], substr($row["title"],0,60), - str_repeat(" ", 60 - strlen($row["title"])) + $row["username"], substr($row["title"],0,60), + str_repeat(" ", 60 - strlen($row["title"]) >=0 ? 60 - strlen($row["title"]) : 0) ); } - + mysql_free_result($rs); mysql_close($db_conn); @@ -46,6 +45,6 @@ fwrite($fp,$buffer); fclose($fp); } - + return 0; ?>