//ustawienia
[b]define("TABLE_PREFIX", "tu wpisz prefix db do forum");[/b]
echo "
Temat
|
Napisal
|
Ogladano
|
Odpowiedzi
|
Lastposter
|
";
$topics = mysql_query("SELECT * FROM ".TABLE_PREFIX."threads WHERE visible = 1 ORDER BY lastpost DESC LIMIT 10");
while ($topic = mysql_fetch_array($topics)) {
$topic_id = $topic["tid"];
$forum_id = $topic["fid"];
$topic_subject = $topic["subject"];
$topic_starter_uid = $topic["uid"];
$topic_starter_name = $topic["username"];
$topic_started = $topic["dateline"];
$topic_firstpost = $topic["firstpost"];
$lastpost = $topic["lastpost"];
$lastposter = $topic["lastposter"];
$lastposter_uid = $topic["lastposteruid"];
$topic_views = $topic["views"];
$topic_replies = $topic["replies"];
echo "
$topic_subject
|
$topic_starter_name
|
$topic_views
|
$topic_replies
|
$lastposter
|
";
}
echo"
";