<?php
// Daten für Verbindung zur Datenbank
$dbhost = "localhost";
$dbuser = "ZENSIERT";
$dbpassword = "ZENSIERT";
$dbdatabase = "ZENSIERT";
// Präfix
$prefix = "mybb_";
// URL zum Forum
$url = "http://www.cyberdyne-sky.net/mybb/";
// Anzahl der Themen
$limit = "5";
// Überlange Themen kürzen (0 = Nein, x = Anzahl der auszugebenden Zeichen)
$length = "0";
// Globales
define("KILL_GLOBALS", 1);
define("NO_ONLINE", 1);
require("./mybb/global.php");
### Konfiguration ###
//Nicht sichtbare Foren ausschließen
$unviewable = get_unviewable_forums();
if($unviewable)
{
$unviewwhere = "AND t.fid NOT IN (".$unviewable.")";
}
// Head ausgeben
echo "<table width=\"100%\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\"><tr><td colpan=\"4\"><strong></strong></td></tr><tr><td>Forum</td><td>Benutzer</td><td>Datum</td><td>Thema</td></tr>";
// Themen aus Datenbank holen
$query = $db->query ("SELECT subject,username,uid,tid,fid,dateline FROM ".TABLE_PREFIX."threads WHERE visible='1' $unviewwhere ORDER BY tid DESC LIMIT 0,".$limit."");
while($threads = $db->fetch_array($query))
{
// Forum ermitteln
$query2 = $db->query ("SELECT name FROM ".TABLE_PREFIX."forums WHERE fid = '".$threads['fid']."'");
$forums = $db->fetch_array($query2);
// Betreff kürzen?
if ($length != 0)
{
if (strlen($threads['subject']) > $length)
{
$threads['subject'] = substr($threads['subject'],0,$length) . "...";
}
}
// Daten ausgeben
echo "<tr><td><a href=\"".$mybb->settings['bburl']."/forumdisplay.php?fid=".$threads['fid']."\" target=\"_blank\">".htmlentities($forums['name'])."</a></td>
<td><a href=\"".$mybb->settings['bburl']."/member.php?action=profile&uid=".$threads['uid']."\" target=\"_blank\">".htmlentities($threads['username'])."</a></td>
<td>".htmlentities(mydate($mybb->settings['dateformat'], $threads['dateline'])).", ".htmlentities(mydate($mybb->settings['timeformat'], $threads['dateline']))."</td>
<td><a href=\"".$mybb->settings['bburl']."/showthread.php?tid=".$threads['tid']."\" target=\"_blank\">".htmlentities($threads['subject'])."</a></td></tr>";
}
// Footer ausgeben
echo "</table>";
?>