openside("name"); $con = mysql_connect('localhost', 'pspteam_novy', 'tutaj powinno byc haslo') or die(mysql_error()); mysql_select_db('pspteam_forumpsp') or die(mysql_error()); $intIle='6'; // ilość wyświetlanych tematów $strAdr='forumpsp'; //sciezka do forum(bez koncowego slasha); $strPfx='ibf_';//prefix tabel Invision $r=mysql_query('SELECT tid,title,posts,last_poster_name 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)>20) { $strT = substr( $strT, 0, 17 ) . '...'; } echo ''.$strT.'('.$row['posts'].')'.$row['last_poster_name'].'
'; } closeside(); dbconnect($db_host, $db_user, $db_pass, $db_name);