| 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". |
| 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"]) >=0 ? 60 - strlen($row["title"]) : 0) |
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); |
| 45 |
fwrite($fp,$buffer); |
fwrite($fp,$buffer); |
| 46 |
fclose($fp); |
fclose($fp); |
| 47 |
} |
} |
| 48 |
|
|
| 49 |
return 0; |
return 0; |
| 50 |
?> |
?> |