PHP Code:
<?php
## Uredi postavke za svoj sajt ##
$db_host = "localhost"; // MySQL database host
$db_name = "hrportal_vbul"; // Promijeni ime
$db_user = "hrportal_vbullet"; // ime baze.
$db_pw = "e456fgh67"; // password baze.
$forum_url = "http://www.croportal.net/forum"; // tvoj forum URL
$forum_id = ""; // Ako ?eli? prikazati poruke od specifičnog foruma unesi ID od foruma, a ako ne ostavi prazno
$limit = "10"; // broj prikazanih poruka.
$titlecolor = "#0000FF"; // boja naslova.
$postedcolor = "#404040"; // boja doljnjeg teksta.
$txtlimit = "100"; // limit znakova.
#######################################
// konekcija na bazu
mysql_connect($db_host, $db_user, $db_pw)
OR die ("Ne mogu se konektirati na bazu");
mysql_select_db($db_name) OR die("Ne mogu se konektirati na va?u bazu");
// Početak tablice. Ako vam ne treba maknite je
echo "<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"2\">";
if ($forum_id) {
$forumid = "AND forumid=$forum_id";
}
if ($limit) {
$limited = "LIMIT $limit";
}
$thread_sql = mysql_query("SELECT threadid,title,lastpost,lastposter FROM thread WHERE visible=1 AND open=1 $forumid ORDER BY lastpost DESC $limited");
while($thread_get=mysql_fetch_array($thread_sql))
{
$lastpost = $thread_get['lastpost'];
$poster = $thread_get['lastposter'];
$tid = $thread_get['threadid'];
$psql = mysql_query("SELECT postid FROM post WHERE threadid=$tid ORDER BY postid DESC");
$getp=mysql_fetch_array($psql);
$pid = $getp['postid'];
$date2 = date ("m/d/y h:i A" ,$lastpost);
$title = $thread_get['title'];
$title = substr($title,0,$txtlimit);
echo "<tr><td><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'>posted by $poster <i>$date2</i></FONT></td></tr>";
}
echo "</table>";
?>
anybody knwo why this is not working