if (eregi("block-phpBB2_Forum_Topics.php",$PHP_SELF)) {Header("Location: index.php"); die();} global $prefix, $dbi, $sitename; $result = sql_query("SELECT post_id, post_text FROM ".$prefix."_posts_text ORDER BY post_id DESC LIMIT 5", $dbi); $result5 = sql_query("SELECT topic_id, topic_title FROM ".$prefix."_topicsbb ORDER BY topic_time DESC LIMIT 5", $dbi); $result6 = sql_query("SELECT topic_replies, topic_time FROM ".$prefix."_topicsbb ORDER BY topic_time DESC LIMIT 5", $dbi); $content .="<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=2 WIDTH=\"100%\"><tr> <TD bgcolor=#999999><center> <P>Mitglied: </center></P> </TD> <TD bgcolor=#999999><center> <P>Betreff: </center></P> </TD> <TD bgcolor=#999999><center> <P>Antworten: </center></P> </TD> <td bgcolor=#999999><center> <p>Geschrieben am: </center></p> </td> </tr>"; while(list($post_id, $post_text) = sql_fetch_row($result, $dbi)) { #$result2 = sql_query("SELECT topic_id, poster_id, post_time FROM ".$prefix."_posts where post_id='$post_id'", $dbi); $result2 = sql_query("SELECT topic_id, poster_id, FROM_UNIXTIME(post_time,'%d. %b %Y @ %T') as post_time FROM ".$prefix."_posts where post_id='$post_id'", $dbi); list($topic_id, $poster_id, $post_time)=sql_fetch_row($result2, $dbi); $result3 = sql_query("SELECT topic_views, topic_time FROM ".$prefix."_topicsbb where topic_id='$topic_id'", $dbi); list($topic_views)=sql_fetch_row($result3, $dbi); $topic_title=substr($topic_titlel,0,22); $result4 = sql_query("SELECT uname, uid FROM ".$prefix."_users where uid='$poster_id'", $dbi); list($uname, $uid)=sql_fetch_row($result4, $dbi); $msg_text=substr($post_text,0,15); list($topic_id, $topic_title) = sql_fetch_row($result5, $dbi); list($topic_replies, $topic_time) = sql_fetch_row($result6, $dbi); #$post_date=gmdate ("M d Y H:i:s", $post_time + (3600 * 8)); #$post_date=create_date('D M d, Y g:i a', '$post_time', '8'); #$post_date=$post_time $content .= "<tr><td align=\"left\"><b> <A HREF=\"modules.php?name=Forums&file=profile&mode=viewprofile&u=$uid\"STYLE=\"text-decoration: none\"><b><font color=\"#000000\"> $uname:</font></b></a></b></td> <td align=\"left\"><b><a href=\"modules.php?name=Forums&file=viewtopic&t=$topic_id\"STYLE=\"text-decoration: none\"> $topic_title...</a></b></td> <td align=\"center\"><b>$topic_replies x</b></td> <td><font color=\"#666666\"><i>$post_time</i></font></td></tr>"; } $content .= "</table>"; $content .= "<center>[ <a href=\"modules.php?name=Forums\">Forum</a> ] [ <a href=\"modules.php?name=Forums&file=search\">Suchen</a> ]</center>"; ?> |