query("SELECT * FROM bb".$n."_threads WHERE boardparentid=$newsboard_id ORDER BY threadid DESC LIMIT $anzlastnews"); while($themen=$db_zugriff->fetch_array($res3) AND $i < $anzlastnews) { $res4 = $db_zugriff->query("SELECT a.userid,a.posttime,a.posttopic,a.message, b.userhp,b.username,a.postid FROM bb".$n."_posts AS a, bb".$n."_user_table AS b WHERE a.threadparentid = $themen[threadid] && b.userid=a.userid ORDER BY a.postid LIMIT 1"); $news2 = $db_zugriff->fetch_array($res4); $userarr['userid'] = $news2[0]; $userarr['userhp'] = $news2[4]; $userarr['username'] = $news2[5]; $news['posttime'] = $news2[1]; $news['posttopic'] = $news2[2]; $news['message'] = $news2[3]; $news['postid'] = $news[6]; $longdateformat = "DD.MM.YYYY, HH:II"; $datum = $news['posttime']; $postdatum = formatdate($datum,$longdateformat); $newspostt = "$news[posttopic]"; if ($newspostt == "") { $newspostt = "No Titel for this Post was specified"; } $newsmessage = $news[message]; //print_r($newsmessage); $newsmessage = str_replace("<","&lt;",$newsmessage); $newsmessage = str_replace(">","&gt;",$newsmessage); $newsmessage = str_replace("<","<",$newsmessage); $newsmessage = str_replace(">",">",$newsmessage); $newsmessage = nl2br($newsmessage); $newsmessage = smilies($newsmessage); $newsmessage = prepare_code($newsmessage); $newsmessage = censor($newsmessage); $newsmessage = nt_wordwrap(editDBdata($newsmessage)); $newsimage = ""; if ($themen[flags]== "1") { $schreiben = "Topic closed!]"; } else{ $schreiben = "Write comment...]"; } if ($themen[replies] >15) { $hotreplies = "\"More"; } else{ $hotreplies = ""; } if ($themen[views] >150) { $topviews = "\"More"; } else{ $topviews = ""; } $newsposterhome = "\"Visit"; $newspostermail = "\"Send"; $newsposterpm = "\"Send "; $Newsforums .= "
\"\" $newspostt $hotreplies $topviews
 Written by: $userarr[username], on $postdatum Uhr.
$newsmessage

\"\" [...to Topic | Comments: $themen[replies] | $themen[views] Views | $schreiben

"; $i++; } $newsforen .= "$Newsforums
\"More More than 15 replys \"More More than 150 views[...to Archive]
"; $box3 = str_replace("{newsforen}","$newsforen",$box3); /* ########### Ende News Beiträge ########## */ /* ########### Anfang Anzeige der letzten Themen ########## */ $boardno = array("0"); $ltboardid = $array = explode(",",$ltboardid); $boardno = array_merge($boardno, $ltboardid); $anzlastthread++; foreach ($boardno as $key) { $whereit .= " && boardparentid <> '$key'"; } $res = $db_zugriff->query("SELECT * FROM bb".$n."_threads WHERE boardparentid $whereit ORDER BY timelastreply DESC LIMIT $anzlastthread"); $ltportal .= "
"; $i = 1; while($thread=$db_zugriff->fetch_array($res) AND $i < $anzlastthread) { $useit = "1"; if ($useit == "1") { if (!$thread[topicicon]) $ViewPosticon = ""; else $ViewPosticon = ""; $newslastuseridqu = mysql_query("SELECT * FROM bb".$n."_posts WHERE threadparentid = $thread[threadid] ORDER BY postid DESC LIMIT 1"); $newslastuserid = mysql_fetch_array($newslastuseridqu); if ($thread[replies]== "0") { $newslastuser = ""; $newslastuserlink = ""; $newslastuserlinkend = ""; $newslastpost = ""; $von = ""; } elseif ($newslastuserid[userid] == "0") { $von = "von: "; $newslastuser = "$gast"; $newslastuserlink = ""; $newslastuserlinkend = ""; $newslastpost = "\"zum"; } else { $lastuserqu = mysql_query("SELECT * FROM bb".$n."_user_table WHERE userid = $newslastuserid[userid]"); $lastuserarr = mysql_fetch_array($lastuserqu); $newslastpost = "\"zum"; $von = "by: "; $newslastuser = "$lastuserarr[username]"; $newslastuserlink = ""; $newslastuserlinkend = ""; } if ($thread[authorid] == "0") { $firstuser = "$gast"; $firstvon ="by: "; $firstuserlink = ""; $firstuserlinkend = ""; } else{ $firstuserarr = $db_zugriff->query_first("SELECT username FROM bb".$n."_user_table WHERE userid = $thread[authorid] LIMIT 1"); $firstvon ="by: "; $firstuser = "$firstuserarr[username]"; $firstuserlink = ""; $firstuserlinkend = ""; } $longdateformat = "DD.MM.YYYY, HH:II"; $firstdatum = $thread[starttime]; $firstdatum = formatdate($firstdatum,$longdateformat,1); $prfirstd ="$firstdatum
"; if ($thread[replies]== "0") { $lastdatum = ""; $lastdatum = ""; $prlastd = ""; } else{ $lastdatum = $thread[timelastreply]; $lastdatum = formatdate($lastdatum,$longdateformat,1); $prlastd ="$lastdatum
"; } $boardname = getBoardname($thread[boardparentid]); $ltportal .= ""; $i++; } } $ltportal .= "
 Topic/ForumCreatedClicksReplysLast Post
$ViewPosticon$thread[threadname]
Forum: $boardname $top
$prfirstd$firstvon$firstuserlink$firstuser$firstuserlinkend$thread[views]$thread[replies]
$newslastpost$prlastd$von$newslastuserlink$newslastuser$newslastuserlinkend
"; $box3 = str_replace("{themen}","$ltportal",$box3); /* ########### Ende Anzeige der letzten Themen ########## */ /* ########### Anfang Statistik ########## */ $result = $db_zugriff -> query_first("SELECT COUNT(*) FROM bb".$n."_avatars"); $avatars = $result[0]; $result = $db_zugriff -> query_first("SELECT COUNT(*) FROM bb".$n."_smilies"); $smilies = $result[0]; $result = $db_zugriff -> query_first("SELECT COUNT(*) FROM bb".$n."_style"); $themes = $result[0]; $result = $db_zugriff -> query_first("SELECT COUNT(*) FROM bb".$n."_user_table WHERE activation='1'"); $user_stats = $result[0]; $result = $db_zugriff -> query_first("SELECT COUNT(*) FROM bb".$n."_user_table WHERE (groupid=2)"); $mods = $result[0]; $result = $db_zugriff -> query_first("SELECT COUNT(*) FROM bb".$n."_user_table WHERE (groupid=5)"); $smod = $result[0]; $result = $db_zugriff -> query_first("SELECT COUNT(*) FROM bb".$n."_user_table WHERE (groupid=1)"); $admins = $result[0]; $inaktiv = $db_zugriff->query_first("SELECT COUNT(userid) FROM bb".$n."_user_table WHERE activation <> 1"); $blocked = $db_zugriff->query_first("SELECT COUNT(userid) FROM bb".$n."_user_table WHERE blocked <> 0"); $inaktiv = $inaktiv[0]; $blocked = $blocked[0]; $boardstats .="
Newest User: $newestuser
Registered Users: $user_stats Administrators: $admins
Threads: $anzahlthreads Super Moderators: $smod
Posts: $anzahlposts Moderators: $mods
Smilies: $smilies Avatars: $avatars
Inactive Users: $inaktiv Blocked Users: $blocked
"; $box3 = str_replace("{statistik}","$boardstats",$box3); /* ########### Ende Statistik ########## */ if ($action == "hp") { $info = $db_zugriff->query_first("SELECT * FROM bb".$n."_mywbb_portal_hp WHERE hpid='$hpid'"); $hptitle = editDBdata($info[hptitle]); $hpname = editDBdata($info[hpname]); if ($info[ueberid]==0) $zuruck = " Portal
\n "; else $zuruck = " zurück
\n "; $result = $db_zugriff->query("SELECT * FROM bb".$n."_mywbb_portal_hp WHERE ueberid='$info[hpid]'"); while($row = $db_zugriff->fetch_array($result)) $vorwarts .= "".($row['hpname'])."
"; $db_zugriff->free_result($result); eval ("dooutput(\"".gettemplate("portal2_hp")."\");"); } else { eval ("dooutput(\"".gettemplate("portal2")."\");"); } ?>