openside("Ostatnio na forum"); $con = mysql_connect('baza', 'login', 'hasło') or die(mysql_error()); mysql_select_db('baza') or die(mysql_error()); $intIle='10'; // ilość wyświetlanych tematów $strAdr='sciezka_do_forum'; //sciezka do forum(bez koncowego slasha); $strPfx='ibf_';//prefix tabel Invision $r=mysql_query('SELECT tid,title,posts FROM '.$strPfx.'topics ORDER BY last_post DESC LIMIT 0,'.$intIle.'')or die(mysql_error()); while($row=mysql_fetch_array($r)){ $strT=$row['title']; if (strlen($strT)>30) { $strT = substr( $strT, 0, 400 ) . '.'; } echo '
'.$strT.'('.$row['posts'].')
'; } closeside(); dbconnect($db_host, $db_user, $db_pass, $db_name);