<?php
if (
eregi("block-vB_Last_Post",$_SERVER['PHP_SELF'])) {
Header("Location: index.php");
die();
}
global $prefix, $db;
## CUSTOMIZE SETTINGS FOR YOUR SITE ##
$forum_url = "forums"; // äèğåêòîğèş â êîòîğîé íàõîäèòñÿ ôîğóì.
$forum_id = ""; // çäåñü âû ìîæèòå óêàçàòü id ôîğóìà êîòîğîãî âû íå õîòèòå ïîêàçûâàòü â ıòîì áëîêå.
$limit = "5"; // Êîëè÷åñòâî ñîîáùåíèé.
$txtlimit = "100"; // Êîëè÷åñòâî ñëîâ â íàçâàíèè òåìû.
$titlecolor="#000000"; //Öâåò òåìû
$postedcolor="#CCCCCC"; //Öâåò ïîäïèñè
#######################################
@include_once("$forum_url/includes/config.php");
if ($forum_id) {
$forumid = "AND forumid=$forum_id";
}
if ($limit) {
$limited = "LIMIT $limit";
}
$thread_sql = $db->sql_query("SELECT threadid,title,lastpost,lastposter,forumid,replycount,views FROM ".$tableprefix."thread WHERE visible=1 AND open=1 $forumid ORDER BY lastpost DESC $limited");
while($thread_get=$db->sql_fetchrow($thread_sql))
{
$lastpost = $thread_get['lastpost'];
$poster = $thread_get['lastposter'];
$tid = $thread_get['threadid'];
$for = $thread_get['forumid'];
$reply
count = $thread_get['reply
count'];
$views = $thread_get['views'];
$psql = $db->sql_query("SELECT postid FROM ".$tableprefix."post WHERE threadid=$tid ORDER BY postid DESC");
$getp=$db->sql_fetchrow($psql);
$pid = $getp['postid'];
$date2 =
date ("d/m/y G:i" ,$lastpost);
$title = $thread_get['title'];
$title =
substr($title,0,$txtlimit);
$content .= "<font size=\"2\" face=\"arial,verdana,geneva\"><a href=\"$forum_url/showthread.php?p=$pid#post$pid\"><FONT SIZE=\"2\" COLOR=\"$titlecolor\" face=\"arial,verdana,geneva\">$title</FONT></a></font><br /><font color=\"$postedcolor\" face=\"arial,verdana,geneva\" size='1'>íàïèñàë $poster <i>$date2</i></FONT><br>";
}
?>