openside("Ostatnie na forum"); echo" "; $con = mysql_connect('HOST', 'USER', 'PASS') or die(mysql_error()); mysql_select_db('NAZWA BAZY') or die(mysql_error()); $limit='13'; $strAdr='LINK DO FORUM'; //sciezka do forum(bez koncowego slasha); $strPfx='ibf_';//prefix tabel Invision $r=mysql_query('SELECT t.last_post, t.tid, t.title, t.views, t.posts, t.start_date, t.starter_name, t.last_poster_name, t.last_poster_id, t.approved, t.forum_id, f.name, f.id FROM '.$strPfx.'topics t LEFT JOIN '.$strPfx.'forums f ON (t.forum_id = f.id) GROUP BY t.title ORDER BY t.last_post DESC LIMIT 0,'.$limit.''); while($row=mysql_fetch_array($r)){ $strT=$row['title']; if (strlen($strT)>30) { $strT = substr( $strT, 0, 400 ) . '.'; } if ($row['approved'] == 1) { echo''; } } echo"
Dzia³ Temat Posta Ostatnia odpowied¼ Czas ostatniej odpowiedzi Postów Ods³on
'.trimlink($row['name'], 25).' '.trimlink($strT, 40).' '.$row['last_poster_name'].' '.showdate("forumdate", $row['last_post']).' ('.$row['posts'].') ('.$row['views'].')
"; closeside(); dbconnect($db_host, $db_user, $db_pass, $db_name);