salve, qualcuno sa come modificare questo codice affinchè nasconda i topic delle sezioni protette in phpbb?
Codice PHP:
<?
//Edit these parameters:
//MySQL server adress
$host="localhost";
//Username
$user="pincopallino";
//Password
$pass="pincopallino_pass";
//Database
$db="my_pincopallino";
//Table prefix
$table="phpbb3_";
//Show last x topics
$laforums="6";
$link=mysql_connect($host, $user, $pass);
$db=mysql_select_db($db);
$query="select * from $table".topics." WHERE topic_approved = '1' order by topic_last_post_time desc limit 0,$laforums";
$query2="select config_name,config_value from $table".config." where config_name = 'server_name' limit 0,1";
$result2=mysql_query($query2);
$row2 = mysql_fetch_array($result2);
extract($row2);
$posts_per_page = $r3[1];
$result=mysql_query($query);
while ($row=mysql_fetch_array($result)) {
extract($row);
$date = date("F j, Y, g:i a", $topic_last_post_time );
$query3="select forum_name from $table".forums." WHERE forum_id = ".$forum_id."";
$result3=mysql_query($query3);
$row2 = mysql_fetch_array($result3);
//Edit the folder name of your forum
echo "<a href='http://".$config_value."/forum/viewforum.php?f=".$forum_id."' target='_blank'>".$row2[forum_name].":</a> <a href='http://".$config_value."/forum/viewtopic.php?f=".$forum_id."&t=".$topic_id."&p=".$topic_last_post_id."#p".$topic_last_post_id."' target='_blank'>".$topic_title."</a> view: ".$topic_views.", replies: ".$topic_replies.", topic first poster: ".$topic_first_poster_name.", topic last poster: ".$topic_last_poster_name.", topic last post time: ".$date."<br>\n";
}
//-------------------------- END
?>