<?php
//server configure
$dbhost="localhost";
$dbuser="сфд";
$dbpass="фддфс";
$dbname="фдфддсф";
//server configure
//file settings
$limit="30"; //ê
$simvola_title="25"; /
$simvola_text="120"; //
$root_forum="../../forum"; //пътя до форума
$like="66"; //кой форум да се показва
//file settings
$connection = mysql_connect($dbhost, $dbuser, $dbpass);
$db = mysql_select_db($dbname, $connection);
$query = mysql_query("select * from phpbb_topics where forum_id='$like' order by topic_time desc limit 0,$limit");
while($rows = mysql_fetch_array($query))
{
$qry = mysql_query("select * from phpbb_forums where forum_id='$rows[forum_id]'");
$rwz = mysql_fetch_array($qry);
$forum = $rwz[forum_name];
$catid = $rwz[cat_id];
$qry2 = mysql_query("select * from phpbb_categories where cat_id='$catid'");
$rwz2 = mysql_fetch_array($qry2);
$cat = $rwz2[cat_title];
if (strlen($rows[topic_title])>$simvola_title)
{$totchki='...';}
else
{$totchki='';}
$zaglavieto=substr($rows[topic_title],0 , $simvola_title);
echo "» $cat: <a href=\"$root_forum/viewtopic.php?t=".$rows[topic_id]."\">$zaglavieto$totchki</a> ($rows[topic_replies])<br/>\n";
}
?>