$master_board_name
  $statistiken"; $apb_useronline_string = 'Betrachtet die Statistik'; $htitle = " - $statistiken"; require "_header.inc"; if (!$logged) { apb_error($nur_reg_benutzer1g."".$nur_reg_benutzer2."".$nur_reg_benutzer3."".$nur_reg_benutzer2."".$nur_reg_benutzer4,FALSE); } $me_userinfo = GetUserInfoByID ($UserInformation[uid]); $me_userinfo = mysql_fetch_array($me_userinfo); if( $me_userinfo[username] == "" ) { $guestaccount=1; $me_userid=-1; $me_username=""; $me_userstatus=""; $me_ulastlogin="0"; $me_showlastposting="1"; $me_showonlineinfo = "0"; $me_statsboards=""; $me_dbshowstatsrating=1; $me_statsbirthdays=0; $me_uservoteaverage=0; $me_showtooltips="1"; $me_useractions=0; $me_showavatar=0; $me_dbshowstatsviews=1; $me_dbshowstatsposts=-1; $ulastlogin=0; } else { $guestaccount=0; $me_userid=$me_userinfo[userid]; $me_username=$me_userinfo[username]; $me_userstatus=$me_userinfo[status]; $me_ulastlogin=$me_userinfo[ulastlogin]; $me_showlastposting=$me_userinfo[showlastentry]; $me_uservoteaverage=$me_userinfo[voteaverage]; $me_showonlineinfo= $me_userinfo[showonlineinfo]; $me_statsboards= $me_userinfo[statsboards]; $me_dbshowstatsrating= $me_userinfo[dbshowstatsrating]; $me_statsbirthdays=$me_userinfo[statsbirthdays]; $me_showtooltips=$me_userinfo[statstooltips]; $me_useractions=$me_userinfo[statsuseractions]; $me_showavatar=$me_userinfo[showavatar]; $me_dbshowstatsviews=$me_userinfo[dbshowstatsviews]; $ulastlogin=$me_userinfo[ulastlogin]; } function simple_table( $command, $headline, $headline2,$tab_head1,$tab_head2,$special_action=0 ) { global $tablebg,$tableB,$tableA,$php_path,$font; $thread_top = mysql_query($command); if ($totalthreadposts == 0) $totalthreadposts = 1; $stati2 = 1; $first_found=0; while ($thread_t = mysql_fetch_array($thread_top)) { if( $special_action == 1 ) { $counter = round($thread_t[2],2); $num= strpos ($counter, "."); if($num == false ) $counter.=".00"; else if( ( strlen($counter)- $num ) == 2 ) $counter.="0"; $board_id=$thread_t[0]; $name = $thread_t[1]; $name = RemoveCrop($name); $link="$php_path/board.php?id=$board_id&BoardID=$BoardID"; } else { $counter = $thread_t[0]; $name = $thread_t[1]; $name = RemoveCrop($name); $link="$php_path/user.php?username=yes&id=$name&BoardID=$BoardID"; } if( $first_found == 0 ) { echo ""; echo " \n \n"; echo " \n \n \n \n"; $first_found++; } echo " \n \n \n \n"; $stati2++; } if( $first_found == 1 ) echo "
\n$headline\n
$headline2
\n
\nPos\n
\n$tab_head1
\n$tab_head2
\n$stati2\n
\n".$name."
\n$counter
"; } ?> "; echo ""; $stati2 = 1; while ($thread_t = mysql_fetch_array($thread_last)) { $threadid = $thread_t["threadid"]; $threadname = $thread_t["threadname"]; $boardparentid = $thread_t["boardparentid"]; $threadtopicicon = $thread_t["topicicon"]; $threadlastreply = $thread_t["timelastreply"]; $threadname = RemoveCrop($threadname); echo " \n"; echo " \n \n"; $stati2++; } ?>
-
"; echo ""; $stati = 1; while ($user_t = mysql_fetch_array($user_top)) { $userid = $user_t[userid]; $username = $user_t[username]; $userposts = $user_t[userposts]; $user_post_percent = (int) ($userposts*$max_laenge/$totalposts); echo "\n"; $stati++; } ?>
"; echo "
User Top 10
 
\n\n".$stati.". \n
\n\n ".$username."    \n
\n \n \n     ".$userposts." Posts\n

"; echo "
User im Board Online

"; $reg_user = mysql_query("SELECT DISTINCT nickname FROM apb".$n."_useronline WHERE nickname != '' and file !='_ inv _'"); $anzahl_reg_user = mysql_num_rows($reg_user); $anzahl_guests = mysql_query("SELECT DISTINCT ip FROM apb".$n."_useronline WHERE nickname = ''"); $anzahl_guests = mysql_num_rows($anzahl_guests); $anzahl_user = $anzahl_reg_user + $anzahl_guests; if ($anzahl_user == "1") { echo "Es ist zur Zeit ein Besucher online:

"; } else { echo "Es sind zur Zeit ".$anzahl_user." Besucher online:

"; } while ($nickname = mysql_fetch_row($reg_user)) { echo "".$nickname[0]."
"; } if ($anzahl_guests == 1) { echo "1 Gast
"; } else if ($anzahl_guests > 1) { echo "$anzahl_guests Gäste
"; } ?>

"; echo ""; $stati1 = 1; while ($board_t = mysql_fetch_array($board_top)) { $boardid = $board_t["boardid"]; $boardname = $board_t["boardname"]; $boardtotalposts = $board_t["totalposts"]; $board_post_percent = (int) ($boardtotalposts*$max_laenge/$totalboardposts); echo "\n"; $stati1++; } ?>
"; echo "
Boards Top 10
 
\n\n".$stati1.". \n
\n\n ".$boardname."    \n
\n\n \n     ".$boardtotalposts." Posts\n

"; echo "
Last Threads Top 10
 
\n\n"; echo $stati2.". \n
\n\n".$threadname."    \n
\n\n    ".Hackdate($threadlastreply)."\n

"; echo ""; $stati2 = 1; while ($thread_t = mysql_fetch_array($thread_top)) { $threadid = $thread_t["threadid"]; $threadname = $thread_t["threadname"]; $boardparentid = $thread_t["boardparentid"]; $threadtopicicon = $thread_t["topicicon"]; $threadtotalposts = $thread_t["replies"] + 1; $thread_post_percent = (int) ($threadtotalposts*$max_laenge/$totalthreadposts); $threadname = RemoveCrop($threadname); echo " \n"; echo " \n \n"; $stati2++; } ?>
"; echo "
Threads Top 10
 
\n\n"; echo $stati2.". \n
\n\n".$threadname."    \n
\n\n \n     ".$threadtotalposts." Posts\n

"; echo "
Diverse

"; $memberresult = mysql_query ("SELECT username FROM apb".$n."_user_table ORDER BY regdate DESC LIMIT 0,1"); $newestm = mysql_fetch_array ($memberresult); echo "Neuestes Mitglied:   ".$newestm[0]."
"; echo "Insgesamt registrierte Mitglieder:   ".$user_gesamt." (Liste)
"; $threads_result = mysql_query("SELECT COUNT(*) FROM apb".$n."_threads"); $threads_gesamt = mysql_fetch_array($threads_result); $allthreads = $threads_gesamt[0]; $posts_result = mysql_query("SELECT COUNT(*) FROM apb".$n."_posts"); $posts_gesamt = mysql_fetch_array($posts_result); $allposts = $posts_gesamt[0]; echo "Insgesamt bisherige Threads:   ".$allthreads."
"; echo "Insgesamt bisherige Posts:   ".$allposts."
"; $statistik2 = mysql_query("SELECT mostusers_count,mostusers_date,mostposts_count,mostposts_date,mostposts_lastupdate,mostthreads_count,mostthreads_date,mostthreads_lastupdate FROM apb".$n."_statistik2"); $statistik2 = mysql_fetch_array ($statistik2); $sUserstr="User"; if( $geheimbund_spezial==1) $sUserstr="Geheimbündler"; $aktivstring="Die meisten $sUserstr online: $statistik2[mostusers_count] (".HackDateX($statistik2[mostusers_date]).")"; echo $aktivstring."
"; $aktivstring="Die meisten Beiträge: $statistik2[mostposts_count] (".HackDate2($statistik2[mostposts_date]).")"; echo $aktivstring."
"; $aktivstring="Die meisten Threads: $statistik2[mostthreads_count] (".HackDate2($statistik2[mostthreads_date]).")"; echo $aktivstring."
"; $installdate_format = HackDate($installdate); $timediff = $now - $installdate; // Sek. vom Zeitpunkt der Installation, bis heute $postperday = ($allposts) / ((($timediff / 60) / 60) / 24); $postperhour = ($allposts) / (($timediff / 60) / 60); $postperday = round($postperday); $postperhour = round($postperhour); echo "Postings/Tag:   ".$postperday."  (seit ".$installdate_format.")
"; echo "Postings/Std.:   ".$postperhour."  (seit ".$installdate_format.")
"; ?>
"; echo ""; # leftside... echo ""; $headline="Eröffnete Threads Top 10"; $headline2="Wer hat wieviele Threads im Forensystem $master_board_name eröffnet?"; $tab_head1="Username"; $tab_head2="Threads"; $command = "SELECT count(*), author FROM apb".$n."_threads group by author order by 1 desc limit 0,10"; simple_table( $command, $headline, $headline2,$tab_head1,$tab_head2,0 ); echo "
"; # rightside... echo ""; $headline="Angeschaute Threads Top 10"; $headline2="Wessen Threads wurden insgesamt gesehen am häufigsten angeschaut?"; $tab_head1="Username"; $tab_head2="Views"; $command="SELECT sum(views), author FROM apb".$n."_threads group by author order by 1 desc limit 0,10"; simple_table( $command, $headline, $headline2,$tab_head1,$tab_head2,0 ); echo ""; ?>
"; echo ""; # leftside... echo ""; $headline="Beantwortete Threads Top 10"; $headline2="Auf wessen Threads wurde insgesamt am meisten geantwortet?"; $tab_head1="Username"; $tab_head2="Antworten"; $command = "SELECT sum(replies), author FROM apb".$n."_threads group by author order by 1 desc limit 0,10"; simple_table( $command, $headline, $headline2,$tab_head1,$tab_head2,0 ); echo "
"; # rightside... echo ""; $headline="Angeschaute Profile Top 10"; $headline2="Wessen Profil wurde am häufigsten angeschaut?"; $tab_head1="Username"; $tab_head2="Views"; $command="SELECT viewcount, username FROM apb".$n."_user_table order by 1 desc limit 0,10"; simple_table( $command, $headline, $headline2,$tab_head1,$tab_head2,0 ); echo ""; ?>
"; echo ""; # leftside... echo ""; $headline="Bewertungen Top 10"; $headline2="Wer hat die meisten Bewertungen abgegeben?"; $tab_head1="Username"; $tab_head2="Bewertungen"; $command = "SELECT count(r.userid), u.username,r.userid FROM apb".$n."_rate r, apb".$n."_user_table u where r.type=\"userrate\" and r.userid=u.userid group by r.userid order by 1 desc limit 0,10"; simple_table( $command, $headline, $headline2,$tab_head1,$tab_head2,0 ); echo "
"; # rightside... echo ""; $headline="Umfragen-Teilnahme Top 10"; $headline2="Wer hat am häufigsten an Umfragen teilgenommen?"; $tab_head1="Username"; $tab_head2="Umfragen"; $command="SELECT count(p.pollid), u.username, p.userid FROM apb".$n."_poll_user p, apb".$n."_user_table u where p.userid=u.userid group by p.userid order by 1 desc limit 0,10"; simple_table( $command, $headline, $headline2,$tab_head1,$tab_head2,0 ); echo ""; ?>
"; echo ""; # leftside... echo ""; $headline="Das beste Board nach Punkten"; $headline2="Welches Board hat die am besten bewerteten Threads?"; $tab_head1="Boardname"; $tab_head2="Punkte"; $special_action=1; $command="select b.boardid, b.boardname,sum(voteaverage)/count(threadid) from apb".$n."_threads,apb".$n."_boards b where votecount > 0 and boardparentid=b.boardid and b.board_hidden=0 and b.boardid=boardparentid and b.showrating=1 group by b.boardid order by 3 desc limit 0,10"; simple_table( $command, $headline, $headline2,$tab_head1,$tab_head2,$special_action ); echo "
"; # rightside... echo ""; # leer echo ""; ?>
\n \n"; echo " \n \n \n \n \n"; $first_found++; } $t_username=mysql_query("select username from apb".$n."_user_table where userid='$userid'"); $t_username= mysql_fetch_array($t_username); $username = RemoveCrop($t_username[username]); $gestern=strtotime ("-1 day",$thread_t[datum]); $thread_last = mysql_query("SELECT datum,userid,position,points FROM apb".$n."_user_history where datum='$gestern' and userid='$userid'"); $gestern_position="(-)"; $gestern_punkte=" "; if( $thread_last = mysql_fetch_array($thread_last) ) { $gestern_position="($thread_last[position])"; $gestern_punkte=$thread_last[points]; $diff=$thread_t[points]-$thread_last[points]; if( $diff > 0 ) $gestern_punkte.=' (+'.round(($thread_t[points]-$thread_last[points]),2).")"; if( $diff == 0 ) $gestern_punkte.=" (±0)"; if( $diff < 0 ) $gestern_punkte.=" (".round(($thread_t[points]-$thread_last[points]),2).")"; $oldpoints= $thread_last[position].'/'.round(($thread_t[points]-$thread_last[points]),2); if( $stati2 < $thread_last[position] ) { $gestern_tendenzgfx="\"pfeil-hoch\""; } if( $stati2 == $thread_last[position] ) { $gestern_tendenzgfx="\"pfeil-rechts\""; } if( $stati2 > $thread_last[position] ) { $gestern_tendenzgfx="\"pfeil-runter\""; } } echo " \n \n \n \n \n"; $stati2++; } if( $first_found == 1 ) echo "
"; echo "
\nPunkteverteilung Top 50 Mitglieder\n
(Stand: ".HackDateX2($thread_t[datum])." )

$aktivstring\n
\n
\nPos\n
\nUsername
\nPunkte
\nPunkte
gestern
\n$stati2 $gestern_position $gestern_tendenzgfx\n
\n".$username."
\n$thread_t[points]
\n$gestern_punkte
"; ?>
"; echo "
\nAktive Mitglieder erste Plätze\n
(alltime hiscorelist)

$aktivstring2\n
\n
\n \n"; echo "
\nPos\n
\n
\nUsername
\n
\nTage
\n \n"; $first_found++; } $t_username=mysql_query("select username from apb".$n."_user_table where userid='$userid'"); $t_username= mysql_fetch_array($t_username); $username = RemoveCrop($t_username[username]); echo "
\n$stati2\n
\n
\n".$username."
\n
\n$thread_t[points]
\n \n"; $stati2++; } if( $first_found == 1 ) echo ""; # end new 2 echo ""; ?>
"; if( $geheimbund_spezial == 1 ) echo ""; $stati2 = 1; while ($thread_t = mysql_fetch_array($thread_top)) { # $counter = $thread_t[1]; $name = $thread_t[0]; $name = RemoveCrop($name); $onlinestring=CalcPointsOnlineToTimeString($thread_t[1]); echo " \n"; echo "\n"; $stati2++; } ?>
"; echo "
Online-Zeit Top 20
(seit dem 18.01.2003)
\n\n"; echo $stati2.". \n
\n".$name."    
\n    $onlinestring

"; echo "
"; echo "
"; $stati2 = 1; #while ($thread_t = mysql_fetch_array($thread_top)) { # $counter = round($thread_t[1],2); # $name = $thread_t[0]; # $name = RemoveCrop($name); # echo "
\n\n"; # echo $stati2.". \n
\n"; # echo "
\n".$name."    
#
\n    ".$counter." Punkte
# \n"; # $stati2++; #} echo ""; ?> "; if( $boarddetails != $boards_t[boardid]) { $limit=" limit 0,15"; $headline="$boards_t[boardname] - Top 15"; $headline2="[ Alle anzeigen ]"; } else { $limit=""; $headline="$boards_t[boardname] - Alle"; $headline2=" "; } if( $leftright == 0 ) # linke tabelle { echo "
" ); } if( $leftright == 1 ) # rechte tabelle { echo "" ); echo "
"; $thread_top = mysql_query("Select p.authorname, count(p.postid) from apb".$n."_posts p, apb".$n."_threads t where t.boardparentid = $boards_t[boardid] and t.threadid = p.threadparentid group by p.authorname order by 2 desc $limit"); if ($totalthreadposts == 0) $totalthreadposts = 1; echo ""; echo ""; echo ""; $stati2 = 1; while ($thread_t = mysql_fetch_array($thread_top)) { $counter = $thread_t[1]; $name = $thread_t[0]; $name = RemoveCrop($name); echo " \n"; echo "\n"; $stati2++; } echo ( "
$headline
$headline2
\n\n"; echo $stati2.". \n
\n".$name."    
\n    ".$counter." Posts

"; $thread_top = mysql_query("Select p.authorname, count(p.postid) from apb".$n."_posts p, apb".$n."_threads t where t.boardparentid = $boards_t[boardid] and t.threadid = p.threadparentid group by p.authorname order by 2 desc $limit"); if ($totalthreadposts == 0) $totalthreadposts = 1; echo ""; echo ""; echo ""; $stati2 = 1; while ($thread_t = mysql_fetch_array($thread_top)) { $counter = $thread_t[1]; $name = $thread_t[0]; $name = RemoveCrop($name); echo " \n"; echo "\n"; $stati2++; } echo ( "
$headline
$headline2
\n\n"; echo $stati2.". \n
\n".$name."    
\n    ".$counter." Posts

"; } $leftright++; if( $leftright == 2 ) $leftright = 0; } # end CheckBoardProtection } if( $leftright==1) { echo ""; echo ""; echo ""; echo ""; echo ( "
  
 

" ); echo ""; } ?>