來源連結:phpBBHacks
參考連結:[外掛] Recent Topics 檢視近日發表的文章
使用版本:1.0.3 (phpBB 2.0.4 or lower)
網站位置:LAN內測試主機
phpBB版本:phpBB 2.0.4
加裝外掛狀況:無,純安裝後。
狀況描述:
1.檢視日期功能失效, 無法隨著點選 '最後 24 小時'、'今天'、'昨天'、'上週'、'最後 [ ]天內' 標籤檢視各別限定期限內文章, 永遠只能列出 '最後 24 小時' 的文章(且頁面提示也是顯示 "顯示中: 最後 24 小時"), 但網址列確會改變搜尋關鍵字(例如 : 點 '上週' -> ./phpbb2/recent.php?selorder=lweek, 點 '今天' -> ./phpbb2/recent.php?selorder=today ...etc)
2.訪客直接於頁面 檢視近日發表的文章 連結進入會出現此錯誤..
代碼: 選擇全部
Could not obtain main information
DEBUG MODE
SQL Error : 1064 You have an error in your SQL syntax near ') AND p.post_id = t.topic_last_post_id AND UNIX_TIMESTAMP(NOW()) - p.post_time <' at line 7
SELECT from_unixtime(p.post_time, '%d.%m.%y %H:%i:%s') as topic_time, f.forum_name as forum_name, f.forum_id as forum_id, u.username as username, u2.username as username2, u2.user_id as user_id2, p.poster_id as poster_id, p.post_username as post_username, p.post_id as post_id, t.*, p.post_time as post_time FROM phpbb_topics t, phpbb_posts p LEFT OUTER JOIN phpbb_forums f on p.forum_id = f.forum_id LEFT OUTER JOIN phpbb_users u on p.poster_id = u.user_id LEFT OUTER JOIN phpbb_users u2 on u2.user_id = t.topic_poster WHERE t.topic_id IN () AND p.post_id = t.topic_last_post_id AND UNIX_TIMESTAMP(NOW()) - p.post_time < 86400 ORDER BY p.post_time desc LIMIT 0, 50
Line : 110
File : /usr/home/ruka/www/204/recent.php唯提出此狀況, 想了解是否有朋友碰到同樣問題.


