kann mir jemand erklären wie ich das machen muss:
ist das so richtig??<?php
/* Basic config */
$topicnumber = 10; /*+++ Number of topics you want to display +++*/
$scroll = "up"; /*+++ Scroll "down" or "up" */
/* Database config */
include 'forum/config.php'; /*+++ Replace "XXX" with relative or URL path of your forum directory. +++*/
/*+++ Example (Relative Path): phpBB2, forum, board, etc. +++*/
/*+++ Example (URL Path): http://www.phpbb.com/phpBB2 +++*/
/* Connecting, selecting database */
$table_topics = $table_prefix. "topics";
$table_forums = $table_prefix. "forums";
$table_posts = $table_prefix. "posts";
$table_users = $table_prefix. "users";
$link = mysql_connect("$dbhost", "$dbuser", "$dbpasswd") or die("Could not connect");
mysql_select_db("$dbname") or die("Could not select database");
/* Performing SQL query */
$query = "SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, p.post_id, p.poster_id, p.post_time, u.user_id, u.username
FROM $table_topics t, $table_forums f, $table_posts p, $table_users u
WHERE t.topic_id = p.topic_id AND
f.forum_id = t.forum_id AND
t.topic_status <> 2 AND
p.post_id = t.topic_last_post_id AND
p.poster_id = u.user_id
ORDER BY p.post_id DESC LIMIT $topicnumber";
$result = mysql_query($query) or die("Query failed");
/* Printing results in HTML */
print "<marquee id=\"recent_topics\" behavior=\"scroll\" direction=\"$scroll\" height=\"200\" scrolldelay=\"100\" scrollamount=\"2\">
<table cellpadding='4' cellSpacing='1' width='550'>";
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo "<tr valign='top'><td>" .
$row["topic_title"] .
"</td><td>" .
$row["username"] .
"</td><td>" .
date('F j, Y, g:i a', $row["post_time"]) .
"</td></tr>";
}
print "</table></marquee>";
/* Free resultset */
mysql_free_result($result);
/* Closing connection */
mysql_close($link);
?>
danke<?php
/* Basic config */
$topicnumber = 10; /*+++ Number of topics you want to display +++*/
$scroll = "up"; /*+++ Scroll "down" or "up" */
/* Database config */
include 'forum/config.php'; /*+++ Replace "XXX" with relative or URL path of your forum directory. +++*/
/phpBB2/
/http://www.ferrum-noricum.comball.net/phpBB2/
/* Connecting, selecting database */
$table_topics = $table_prefix. "topics";
$table_forums = $table_prefix. "forums";
$table_posts = $table_prefix. "posts";
$table_users = $table_prefix. "users";
$link = mysql_connect("$dbhost", "$dbuser", "$dbpasswd") or die("Could not connect");
mysql_select_db("$dbname") or die("Could not select database");
/* Performing SQL query */
$query = "SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, p.post_id, p.poster_id, p.post_time, u.user_id, u.username
FROM $table_topics t, $table_forums f, $table_posts p, $table_users u
WHERE t.topic_id = p.topic_id AND
f.forum_id = t.forum_id AND
t.topic_status <> 2 AND
p.post_id = t.topic_last_post_id AND
p.poster_id = u.user_id
ORDER BY p.post_id DESC LIMIT $topicnumber";
$result = mysql_query($query) or die("Query failed");
/* Printing results in HTML */
print "<marquee id=\"recent_topics\" behavior=\"scroll\" direction=\"$scroll\" height=\"200\" scrolldelay=\"100\" scrollamount=\"2\">
<table cellpadding='4' cellSpacing='1' width='550'>";
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo "<tr valign='top'><td>" .
$row["topic_title"] .
"</td><td>" .
$row["username"] .
"</td><td>" .
date('F j, Y, g:i a', $row["post_time"]) .
"</td></tr>";
}
print "</table></marquee>";
/* Free resultset */
mysql_free_result($result);
/* Closing connection */
mysql_close($link);
?>
mario