Kod: Zaznacz cały
function last_post($limit, $lim, $punkt='> ') {
global $forum_post_tbl, $forum_topic_tbl, $forum_user_tbl, $PHP_SELF, $phpbb_root_path;
$query = "SELECT * FROM $forum_post_tbl ORDER BY post_time DESC LIMIT 5";
$result = mysql_query($query);
while($r = mysql_fetch_array($result)) {
$forum_id=$r['forum_id'];
$topic_id=$r['topic_id'];
$author=$r['poster_id'];
$query2 = "SELECT * FROM $forum_user_tbl WHERE user_id='$author'";
$result2 = mysql_query($query2);
$r2 = mysql_fetch_array($result2);
$author=$r2['username'];
$query3 = "SELECT * FROM $forum_topic_tbl WHERE topic_id='$topic_id'";
$result3 = mysql_query($query3);
$r3 = mysql_fetch_array($result3);
$title=$r3['topic_title'];
$title = stripslashes($title);
$len = strlen($title);
if($len>=$lim) {
$tit = $title;
$len = $lim - 3;
$len = ceil($len);
$title = substr($title, 0, $len);
$title = $title."...";
$title = iconv('iso-8859-2', 'UTF-8', $title);
//UTF-8
}
echo $punkt.'<a href="'.$phpbb_root_path.'viewtopic.php?f='.$forum_id.'&t='.$topic_id.'" title="dodal: '.$author.'">'.$title.'</a><br>';
}
}"Co my?licie o naszych serwisach"
Jak to naprawić proszę o poradę...