Felix Gonschorek download the latest version: http://www.thwboard.de This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. ============================================== */ include "./inc/header.inc.php"; $titleprepend ="Statistikcenter |"; $titleprepend_key ="Statistikcenter,"; $searcharray = array("ä", "ö", "ü", "ß", "Ä", "Ö", "Ü"); $replacearray = array("ae", "oe", "ue", "ss", "Ae", "Oe", "Ue"); function getusercount() { global $pref; $r_user = thwb_query("SELECT count(userid) AS usercount FROM ".$pref."user"); $user = mysql_result($r_user, 0); return $user; } function getactiveusers() { global $pref; $r_user = thwb_query("SELECT count(userid) AS usercount FROM ".$pref."user WHERE userlastpost > " . (time() - 60 * 60 * 24 * 31)); $user = mysql_result($r_user, 0); return $user; } function getnumposts($show = 0) { global $pref; if( !$show ) { $query = "SELECT count(postid) As postcount FROM ".$pref."post As post, ".$pref."thread As thread,". $pref."board As board WHERE thread.threadid = post.threadid AND board.boardid = thread.boardid AND board.boarddisabled = 0"; } else { $query = "SELECT count(postid) AS postcount FROM ".$pref."post"; } $r_post = thwb_query($query); $post = mysql_result($r_post, 0); return $post; } function getnumboards($show = 0) { global $pref; $query = ''; if( !$show ) { $query = "SELECT count(boardid) AS boardcount FROM ".$pref."board WHERE boarddisabled = 0"; } else { $query = "SELECT count(boardid) AS boardcount FROM ".$pref."board"; } $r_board = thwb_query($query); $board = mysql_result($r_board, 0); return $board; } function getnumthreads($show = 0) { global $pref; $thread = 0; if( !$show ) { $query = "SELECT count(thread.threadid) FROM ".$pref."thread As thread, ".$pref."board As board WHERE board.boardid = thread.boardid AND board.boarddisabled = 0"; } else { $query = "SELECT count(threadid) AS threadcount FROM ".$pref."thread"; } $r_thread = thwb_query($query); $thread = mysql_result($r_thread, 0); return $thread; } function dirsize($dir) { $dh = opendir($dir); $size = 0; while (($file = readdir($dh)) !== false) if ($file != "." and $file != "..") { $path = $dir."/".$file; if (is_dir($path)) $size += dirsize($path); elseif (is_file($path)) $size += filesize($path); } closedir($dh); $mgs_size = $size/1024; return $mgs_size; } function filesnum($dir) { $dh = opendir($dir); $files = 0; while (($file = readdir($dh)) !== false) if ($file != "." and $file != "..") { $path = $dir."/".$file; if (is_dir($path)) $files += filesnum($path); elseif (is_file($path)) $files += 1; } closedir($dh); return $files; } function gettopposter($num = 10) { global $pref; $r_poster = thwb_query("SELECT userid, username, userposts FROM ".$pref."user WHERE userposts > 0 ORDER BY userposts DESC LIMIT $num"); $poster = array(); while( $postrow = mysql_fetch_array($r_poster) ) { $postrow[username_hacked] = str_replace($searcharray, $replacearray, $postrow[username]); $postrow[username_hacked] = preg_replace('/[^\w\d_-]+/', '-', $postrow[username_hacked]); $poster[] = $postrow; } return $poster; } function gettopnickpage($num = 10) { global $pref; $r_nickpage = thwb_query("SELECT userid, username, viewcount FROM ".$pref."user WHERE viewcount > 0 ORDER BY viewcount DESC LIMIT $num"); $nickpage = array(); while( $nickpagerow = mysql_fetch_array($r_nickpage) ) { $nickpagerow[username_hacked] = str_replace($searcharray, $replacearray, $nickpagerow[username]); $nickpagerow[username_hacked] = preg_replace('/[^\w\d_-]+/', '-', $nickpagerow[username_hacked]); $nickpage[] = $nickpagerow; } return $nickpage; } function gettopautoklau($num = 10) { global $pref; $r_klau = thwb_query("SELECT * FROM ".$pref."autoklau WHERE count > 0 ORDER BY count DESC LIMIT $num"); $klau = array(); while( $klaurow = mysql_fetch_array($r_klau) ) { $r_user_klau = thwb_query("SELECT username FROM ".$pref."user WHERE userid='" . $klaurow[userid] . "'"); $user_klau = mysql_fetch_array( $r_user_klau ); $klaurow[username] = $user_klau[username]; $klaurow[username_hacked] = str_replace($searcharray, $replacearray, $user_klau[username]); $klaurow[username_hacked] = preg_replace('/[^\w\d_-]+/', '-', $klaurow[username_hacked]); $klau[] = $klaurow; } return $klau; } function gettopboards($show = 0, $num = 10) { global $pref; if( !$show ) { $query = "SELECT board.boardid, board.boardname, board.boardposts, category.categoryname As category FROM ".$pref."board As board, ".$pref."category As category WHERE board.boarddisabled = 0 AND category.categoryid = board.categoryid AND board.boardid != 46 ORDER BY board.boardposts DESC LIMIT $num"; } else { $query = "SELECT board.boardid, board.boardname, board.boardposts, category.categoryname As category FROM ".$pref."board As board, ".$pref."category As category WHERE category.categoryid = board.categoryid AND board.boardid != 46 ORDER BY boardposts DESC LIMIT $num"; } $r_boards = thwb_query($query); $boards = array(); while( $boardrow = mysql_fetch_array($r_boards) ) { $boardrow[boardname_hacked] = str_replace($searcharray, $replacearray, $boardrow[boardname]); $boardrow[boardname_hacked] = preg_replace('/[^\w\d_-]+/', '-', $boardrow[boardname_hacked]); $boards[] = $boardrow; } return $boards; } function gettopthreads($show = 0, $view = 0, $num = 10) { global $pref; if( !$show ) { $query = "SELECT thread.threadid, thread.threadtopic, thread.threadreplies, thread.threadviews, board.boardname FROM ".$pref."thread As thread, ".$pref."board As board WHERE thread.boardid = board.boardid AND board.boarddisabled = 0 AND thread.boardid != 46 ORDER BY"; } else { $query = "SELECT thread.threadid, thread.threadtopic, thread.threadreplies, thread.threadviews, board.boardname FROM ".$pref."thread As thread, ".$pref."board As board WHERE board.boardid = thread.boardid AND thread.boardid != 46 ORDER BY"; } if( $view ) { $query .= " thread.threadviews DESC"; } else { $query .= " thread.threadreplies DESC"; } $query .= " LIMIT $num"; $r_top = thwb_query($query); $threads = array(); while( $threadrow = mysql_fetch_array($r_top) ) { $threadrow[threadtopic_hacked] = str_replace($searcharray, $replacearray, $threadrow[threadtopic]); $threadrow[threadtopic_hacked] = preg_replace('/[^\w\d_-]+/', '-', $threadrow[threadtopic_hacked]); $threads[] = $threadrow; } return $threads; } function getlastposts($show = 0, $num = 10) { global $pref; if( !$show ) { $query = "SELECT post.threadid, post.posttime, thread.threadtopic, board.boardname FROM ".$pref."post As post, ".$pref."thread As thread, ".$pref."board As board WHERE thread.threadid = post.threadid AND board.boardid = thread.boardid AND board.boarddisabled = 0 AND thread.boardid != 46 ORDER BY post.posttime DESC LIMIT $num"; } else { $query = "SELECT post.threadid, post.posttime, thread.threadtopic, board.boardname FROM ".$pref."post As post, ".$pref."thread As thread, ".$pref."board As board WHERE thread.threadid = post.threadid AND board.boardid = thread.boardid AND thread.boardid != 46 ORDER BY post.posttime DESC LIMIT $num"; } $r_posts = thwb_query($query); $a_posts = array(); while( $datarow = mysql_fetch_array($r_posts) ) { $datarow[threadtopic_hacked] = str_replace($searcharray, $replacearray, $datarow[threadtopic]); $datarow[threadtopic_hacked] = preg_replace('/[^\w\d_-]+/', '-', $datarow[threadtopic_hacked]); $a_posts[] = $datarow; } return $a_posts; } function getmonthview($show = 0) { global $pref; $akt_monat = (int)date("m", time()); $akt_jahr = (int)date("Y", time()); $monatsnamen = array(" ", "Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"); for( $i = 0; $i < 12; $i++ ) { $monate[$i]['start'] = mktime(0, 0, 0, $akt_monat - $i, 1, $akt_jahr); $monate[$i]['ende'] = mktime(0, 0, -1, $akt_monat + 1 - $i, 1, $akt_jahr); } $i = 0; while( $i < 12 ) { $starttime = $monate[$i]['start']; $endtime = $monate[$i]['ende']; $monthview[$i]['month'] = $monatsnamen[(int)date("m", $starttime)] . date(" Y", $starttime); $monthview[$i]['user'] = mysql_result(thwb_query("SELECT count(userid) As usercount FROM ".$pref."user WHERE userjoin >= $starttime AND userjoin <= $endtime"), 0); $monthview[$i]['thread'] = mysql_result(thwb_query("SELECT count(threadid) As threadcount FROM ".$pref."thread WHERE threadcreationtime >= $starttime AND threadcreationtime <= $endtime"), 0); # Monatliche Posts if( !$show ) { $query = "SELECT count(post.postid) As postcount FROM ".$pref."post As post, ".$pref."thread As thread, ".$pref."board As board WHERE thread.threadid = post.threadid AND board.boardid = thread.boardid AND post.posttime >= '$starttime' AND post.posttime <= '$endtime' AND board.boarddisabled = 0"; } else { $query = "SELECT count(postid) AS postcount FROM ".$pref."post WHERE posttime >= $starttime AND posttime < $endtime"; } $r_post = thwb_query($query); $monthview[$i]['posts'] = mysql_result($r_post, 0); if( $monthview[$i]['posts'] == 0 ) { $i = 12; } else { $i++; } # Ende mon. posts } return $monthview; } ################################################################### $maxusers = explode('|', $config['max_useronline']); if( $onlinecount > $maxusers[0] ) { thwb_query("UPDATE $pref"."registry SET keyvalue='".$onlinecount.'|'.time()."' WHERE keyname='max_useronline'"); $maxusers[0] = $onlinecount; $maxusers[1] = time(); } $useronlinestats = ''.$maxusers[0].' Benutzer, am '.form_date($maxusers[1], 0).'.
'; $pstats = array(); $sconf = array(); if( $g_user['userid'] != 0 ) { $r_pstats = thwb_query("SELECT userposts FROM $pref" . "user WHERE userid = '$g_user[userid]'"); $pstats = mysql_fetch_array($r_pstats); mysql_free_result($r_pstats); } $admin = thwb_query("SELECT userisadmin FROM $pref" . "user WHERE userid = '$g_user[userid]'"); $status = mysql_fetch_array($admin); if($status[0] == 1){ $sconf['showall'] = 1; }else{ $sconf['showall'] = 0; } if( $sconf['showall'] == "1") { $astats['beitrag_text'] = " $style[smallfont](inklusive verborgener Boards)$style[smallfontend]"; $astats['board_text'] = " $style[smallfont](inklusive verborgener Boards)$style[smallfontend]"; $astats['newmember_text'] = " $style[smallfont](inklusive unsichtbarer Mitglieder)$style[smallfontend]"; $astats['themen_text'] = " $style[smallfont](inklusive verborgener Boards)$style[smallfontend]"; } $result = mysql_query("SELECT userjoin FROM $pref"."user ORDER by userjoin ASC LIMIT 1"); if (mysql_num_rows($result) == 1) { list($firstactivation) = mysql_fetch_row($result); $astats['firstactivate'] = date("d.m.Y H:i",$firstactivation); } mysql_free_result($result); $astats['usercount'] = getusercount(); $astats['activeusers'] = getactiveusers(); $astats['numposts'] = getnumposts($sconf['showall']); $astats['numthreads'] = getnumthreads($sconf['showall']); $astats['numviews'] = mysql_result(thwb_query("SELECT sum(threadviews) As viewcount FROM " .$pref . "thread"), 0); $astats['numkateg'] = mysql_result(thwb_query("SELECT count(categoryid) FROM " . $pref . "category"), 0); $astats['numboards'] = getnumboards($sconf['showall']); # Die 5 neusten Mitglieder .... $astats['newmember'] = ''; if( $sconf['showall'] == "1") { $result = thwb_query("SELECT username, userid FROM $pref"."user ORDER BY userjoin DESC LIMIT 5"); } else { $result = thwb_query("SELECT username, userid FROM $pref"."user WHERE userinvisible=0 ORDER BY userjoin DESC LIMIT 5"); } if( mysql_num_rows($result) > 0 ) { $j = mysql_num_rows($result); $i = 0; while( list($zwi,$uid) = mysql_fetch_row($result) ) { $i++; $zwi_hacked = str_replace($searcharray, $replacearray, $zwi); $zwi_hacked = preg_replace('/[^\w\d_-]+/', '-', $zwi_hacked); $astats['newmember'] .= "$zwi"; if( $i < $j ) { $astats['newmember'] .= " || "; } } } mysql_free_result($result); # Ende Neueste Mitglieder Block # Auflistung aller Admins $astats['admins'] = ''; $result = mysql_query("SELECT username, userid FROM $pref"."user WHERE userisadmin = 1 || groupids = ',6,' ORDER BY username ASC"); if( mysql_num_rows($result) > 0 ) { $j = mysql_num_rows($result); $i = 0; while( list($zwi,$uid) = mysql_fetch_row($result) ) { $i++; $zwi_hacked = str_replace($searcharray, $replacearray, $zwi); $zwi_hacked = preg_replace('/[^\w\d_-]+/', '-', $zwi_hacked); $astats['admins'] .= "$zwi"; if( $i < $j ) { $astats['admins'] .= " || "; } } } # Ende Block Admins # Auflistung aller UrAdmins $astats['uradmins'] = ''; $result = mysql_query("SELECT username, userid FROM $pref"."user WHERE usernodelete = 1 ORDER BY username ASC"); if( mysql_num_rows($result) > 0 ) { $j = mysql_num_rows($result); $i = 0; while( list($zwi,$uid) = mysql_fetch_row($result) ) { $i++; $zwi_hacked = str_replace($searcharray, $replacearray, $zwi); $zwi_hacked = preg_replace('/[^\w\d_-]+/', '-', $zwi_hacked); $astats['uradmins'] .= "$zwi"; if( $i < $j ) { $astats['uradmins'] .= " || "; } } } # Ende Block UrAdmins # Block physical infos include "./inc/config.inc.php"; $mysql_h = ''; $mysql_u = ''; $mysql_p = ''; $result = thwb_query("SHOW TABLE STATUS FROM $mysql_db"); $mysql_db = ''; $astats['dbsize'] = 0; $astats['dbentries'] = 0; while( $reihe = mysql_fetch_array($result) ) { if ( substr($reihe['Name'], 0, strlen( $pref ) ) == $pref ) { $astats['dbentries'] += $reihe["Rows"]; $astats['dbsize'] += $reihe["Data_length"]; $astats['dbsize'] += $reihe["Index_length"]; } } mysql_free_result($result); $astats['dbsize'] = round($astats['dbsize']/1024,1); if( $astats['dbentries'] == 0 ) { $astats['dbentries'] = "nicht verfügbar"; } if( $astats['dbsize'] == 0 ) { $astats['dbsize'] = "nicht verfügbar"; } $astats['filesize'] = round(dirsize(dirname (ereg_replace ("\\\\","/",$_SERVER['SCRIPT_FILENAME']))),1) or "nicht verfügbar"; $astats['files'] = filesnum(dirname(ereg_replace("\\\\","/",$_SERVER['SCRIPT_FILENAME']))) or "nicht verfügbar"; # Ende block physical infos # Block Topposter $Tposter = new Template("templates/" . $style['styletemplate'] . "/stats_posterrow.html"); $posterzwi = gettopposter(); $i = 1; $topbgcol = "$style[CellA]"; foreach( $posterzwi As $poster ) { $poster['num'] = $i; $poster['bgcolor'] = $topbgcol; $i++; eval($Tposter->GetTemplate("astats['topposter']")); if( $topbgcol == "$style[CellA]" ) { $topbgcol = "$style[CellB]"; } else { $topbgcol = "$style[CellA]"; } } # Ende Block Topposter # Block Topnickpage $Tnickpage = new Template("templates/" . $style['styletemplate'] . "/stats_nickpage.html"); $posterzwi = gettopnickpage(); $i = 1; $topbgcol = "$style[CellA]"; foreach( $posterzwi As $nickpage ) { $nickpage['num'] = $i; $nickpage['bgcolor'] = $topbgcol; $i++; eval($Tnickpage->GetTemplate("astats['nickpage']")); if( $topbgcol == "$style[CellA]" ) { $topbgcol = "$style[CellB]"; } else { $topbgcol = "$style[CellA]"; } } # Ende Block Topnickpage # Block Topautoklau $Tklau = new Template("templates/" . $style['styletemplate'] . "/stats_klau.html"); $posterzwi = gettopautoklau(); $i = 1; $topbgcol = "$style[CellA]"; foreach( $posterzwi As $klau ) { $klau['num'] = $i; $klau['bgcolor'] = $topbgcol; $i++; eval($Tklau->GetTemplate("astats['klau']")); if( $topbgcol == "$style[CellA]" ) { $topbgcol = "$style[CellB]"; } else { $topbgcol = "$style[CellA]"; } } # Ende Block Topautoklau # Block Topboards $Tboards = new Template("templates/" . $style['styletemplate'] . "/stats_boardsrow.html"); $boardszwi = gettopboards($sconf['showall']); $i = 1; $topbgcol = "$style[CellA]"; foreach( $boardszwi As $board ) { $board['num'] = $i; $board['bgcolor'] = $topbgcol; eval($Tboards->GetTemplate("astats['topboards']")); $i++; if( $topbgcol == "$style[CellA]" ) { $topbgcol = "$style[CellB]"; } else { $topbgcol = "$style[CellA]"; } } # Ende Block Topboards $Tthreads = new Template("templates/" . $style['styletemplate'] . "/stats_threadsrow.html"); # Block Topthreads_Posts $thread = array(); $threadszwi = gettopthreads($sconf['showall'], 0); $i = 1; $topbgcol = "$style[CellA]"; foreach( $threadszwi As $thread ) { $thread['num'] = $i; $thread['bgcolor'] = $topbgcol; $thread['sort'] = $thread['threadreplies'] + 1; eval($Tthreads->GetTemplate("astats['topthreadspost']")); $i++; if( $topbgcol == "$style[CellA]" ) { $topbgcol = "$style[CellB]"; } else { $topbgcol = "$style[CellA]"; } } # Ende Topthreadspost # Block Topthreads_views $thread = array(); $threadszwi2 = gettopthreads($sconf['showall'], 1); $i = 1; $topbgcol = "$style[CellA]"; foreach( $threadszwi2 As $thread ) { $thread['num'] = $i; $thread['bgcolor'] = $topbgcol; $thread['sort'] = $thread['threadviews']; eval($Tthreads->GetTemplate("astats['topthreadsview']")); $i++; if( $topbgcol == "$style[CellA]" ) { $topbgcol = "$style[CellB]"; } else { $topbgcol = "$style[CellA]"; } } # Ende Block Topthreadsviews # Block Lastposts $lposts = getlastposts($sconf['showall']); $i = 1; $topbgcol = "$style[CellA]"; foreach( $lposts As $thread ) { $thread['num'] = $i; $thread['bgcolor'] = $topbgcol; $thread['sort'] = "" . form_date($thread['posttime']) . ""; eval($Tthreads->GetTemplate("astats['toplastposts']")); $i++; if( $topbgcol == "$style[CellA]" ) { $topbgcol = "$style[CellB]"; } else { $topbgcol = "$style[CellA]"; } } # Ende Block Lastposts # History $Thistory = new Template("templates/" . $style['styletemplate'] . "/stats_historyrow.html"); $his = getmonthview($sconf['showall']); $i = 1; $topbgcol = "$style[CellA]"; foreach( $his As $history ) { if( $history['posts'] != 0 ) { $history['bgcolor'] = $topbgcol; eval($Thistory->GetTemplate("astats['history']")); $i++; if( $topbgcol == "$style[CellA]" ) { $topbgcol = "$style[CellB]"; } else { $topbgcol = "$style[CellA]"; } } } /* ################################################################################ users in the last 24 hours - by Narodnaja ################################################################################ */ $last_day = time() - 60*60*24; $j=0; $a_users_today = array(); $r_users_today = thwb_query("SELECT lv.userid,ud.username FROM $pref"."lastvisited lv INNER JOIN $pref"."user ud ON lv.userid = ud.userid WHERE lv.lastvisitedtime>'$last_day' ORDER BY ud.username"); while( $users_today = mysql_fetch_array($r_users_today) ) { $a_users_today_name [] = $users_today['username']; $a_users_today_id [] = $users_today['userid']; $j++; } $guests = 0; $ips = array(); thwb_query("DELETE FROM " . $pref . "lastvisited WHERE lastvisitedtime<='$last_day' && ip"); $r_guests_today = thwb_query("SELECT ip FROM $pref"."lastvisited WHERE ip && lastvisitedtime>'$last_day'"); while ($guests_today = mysql_fetch_array($r_guests_today)) { $ip = $guests_today['ip']; if (!in_array($ip,$ips)) { $ips[$guests] = $ip; $guests++; } } $a_users_today_clear_name = array(); $a_users_today_clear_id = array(); for($i=0; $i<$j; ++$i) { if(in_array($a_users_today_name[$i], $a_users_today_clear_name) != "true") { $a_users_today_clear_name[] = $a_users_today_name[$i]; $a_users_today_clear_id[] = $a_users_today_id[$i]; } } $user_on_count = count($a_users_today_clear_name); for ($i=0; $i<$user_on_count; $i++) { $a_users_today_clear_name_hacked[$i] = str_replace($searcharray, $replacearray, $a_users_today_clear_name[$i]); $a_users_today_clear_name_hacked[$i] = preg_replace('/[^\w\d_-]+/', '-', $a_users_today_clear_name_hacked[$i]); if ($i != $user_on_count-1) { $user_on_list .= ''.$a_users_today_clear_name[$i].', '; //$user_on_list .= ''.$a_users_today_clear_name[$i].', '; } else { $user_on_list .= ''.$a_users_today_clear_name[$i].''; //$user_on_list .= ''.$a_users_today_clear_name[$i].''; } } $user_only = $user_on_count; $user_on_count = $user_on_count + $guests; // POLLHACK $r_poll = thwb_query("SELECT count(threadpollid) AS pollcount FROM ".$pref."thread WHERE threadpollid > 0"); $polls = mysql_result($r_poll, 0); // POLLHACK //Galerie & Fights $results1 = thwb_query("SELECT category_id, COUNT(category_name) FROM ".$pref."gallery_category GROUP BY category_id"); $astats[alben] = mysql_num_rows( $results1 ); $results2 = thwb_query("SELECT COUNT(photo_id) FROM ".$pref."gallery_photos GROUP BY photo_id"); $astats[bilder] = mysql_num_rows( $results2 ); $results3 = thwb_query("SELECT photo_viewed FROM ".$pref."gallery_photos WHERE photo_viewed>0"); $astats[views] =0; while($r_results3 = mysql_fetch_array($results3)) { $astats[views] = $r_results3[0] + $astats[views]; } $results4 = thwb_query("SELECT votes FROM ".$pref."gallery_photos WHERE votes>0"); $astats[votes] =0; while($r_results4 = mysql_fetch_array($results4)) { $astats[votes] = $r_results4[0] + $astats[votes]; } $results5 = thwb_query("SELECT fightswon FROM ".$pref."gallery_photos WHERE fightswon>0"); $astats[fights] =0; while($r_results5 = mysql_fetch_array($results5)) { $astats[fights] = $r_results5[0] + $astats[fights]; } //Anzahl Uploads alt $upl=0; $pfad="bildupload/"; $verz=opendir ($pfad); while ($file=readdir($verz)) { if (filetype($pfad.$file)!="dir") { $upl++; } } closedir($verz); //Anzahl BIlder im Upload neu $upl_new = 0; $results6 = thwb_query("SELECT COUNT(p_upl_id) FROM ".$pref."bildupload GROUP BY p_upl_id"); $upl_new = mysql_num_rows( $results6 ); $upl = $upl + $upl_new; //Games $results7 = thwb_query("SELECT arc_views FROM ".$pref."arcade WHERE arc_views>0"); $astats[games] =0; while($r_results7 = mysql_fetch_array($results7)) { $astats[games] = $r_results7[0] + $astats[games]; } //Nickpage-Views $results8 = thwb_query("SELECT viewcount FROM ".$pref."user WHERE viewcount>0"); $astats[nickpage_views] =0; while($r_results8 = mysql_fetch_array($results8)) { $astats[nickpage_views] = $r_results8[0] + $astats[nickpage_views]; } //Geworbene User $r_geworbene = thwb_query("SELECT count(id) AS ge_count FROM ".$pref."promotion WHERE active = 0"); $geworbene = mysql_result($r_geworbene, 0); //Verwarnungen //Geworbene User $r_verwarnungen = thwb_query("SELECT count(id) AS vw_count FROM ".$pref."warnings"); $verwarnungen = mysql_result($r_verwarnungen, 0); $Tframe = new Template("templates/" . $style['styletemplate'] . "/frame.html"); $Tstats = new Template("templates/" . $style['styletemplate'] . "/stats2.html"); $navpath .= 'Statistikcenter'; eval($Tstats->GetTemplate("CONTENT")); eval($Tframe->GetTemplate());