| 1 |
#!/usr/local/bin/php |
#!/usr/local/php/bin/php |
| 2 |
<? |
<? |
| 3 |
if (!isset($_SERVER["argc"])) |
if (!isset($_SERVER["argc"])) |
| 4 |
$_SERVER["argc"] = 0; |
$_SERVER["argc"] = 0; |
| 16 |
$rs = mysql_query( |
$rs = mysql_query( |
| 17 |
" select bbs.title, sname, username, sub_dt". |
" 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 where section_config.recommend". |
|
" user_list.UID=bbs.UID where section_config.recommend". |
|
| 20 |
" and bbs.TID=0 and bbs.visible and bbs.view_count>=10". |
" and bbs.TID=0 and bbs.visible and bbs.view_count>=10". |
| 21 |
" and (bbs.sub_dt >= subdate(now(),interval '7' day))". |
" and (bbs.sub_dt >= subdate(now(),interval '7' day))". |
| 22 |
" order by bbs.excerption desc,bbs.view_count+bbs.reply_count desc,". |
" order by bbs.excerption desc,bbs.view_count+bbs.reply_count desc,". |
| 23 |
"bbs.transship limit 10",$db_conn); |
"bbs.transship limit 10",$db_conn) |
| 24 |
|
or die ("Query data error"); |
| 25 |
|
|
| 26 |
$i = 1; |
$i = 1; |
| 27 |
while ($row=mysql_fetch_array($rs)) |
while ($row=mysql_fetch_array($rs)) |
| 33 |
strftime("%b %d %H:%M:%S", strtotime($row["sub_dt"])), |
strftime("%b %d %H:%M:%S", strtotime($row["sub_dt"])), |
| 34 |
str_repeat(" ", 16 - strlen($row["username"])), |
str_repeat(" ", 16 - strlen($row["username"])), |
| 35 |
$row["username"], substr($row["title"],0,60), |
$row["username"], substr($row["title"],0,60), |
| 36 |
str_repeat(" ", 60 - strlen($row["title"])) |
str_repeat(" ", 60 - strlen($row["title"]) >=0 ? 60 - strlen($row["title"]) : 0) |
| 37 |
); |
); |
| 38 |
} |
} |
| 39 |
|
|