ich hatte es wie gesagt getestet und da die ts unter statistik getestet gejedoch geht es nicht.
<?php
# Copyright by Manuel
# Support www.ilch.de
#
# Umgeschrieben von Ilch 1.0.5 auf 1.1
# Dazu gekommen sind Usercheck abfrage und User Map
# Mod Copyright by DaGiZm0 - www.teod-clan.de
#
# Danke an jihi für seine geniale Usermap !
defined ('main') or die ( 'no direct access' );
$ip = "85.25.55.53"; // Hier Die TeamSpeak-Serveradresse eingeben
$tPort = "51234"; // Server QueryPort "51234"
$port = "5006"; // Port des TS2 server
$basic = true;
function indexOf($str,$strChar)
{
if(strlen(strchr($str,$strChar))>0) {
$position_num = strpos($str,$strChar) + strlen($strChar);
return $position_num;
} else {
return -1;
}
}
function getTSInfo($ip,$port,$tPort,$basic,$bgcolor)
{
global $name;
$out = "";
$fp = @fsockopen($ip, $tPort, $errno, $errstr, 5);
if($fp) {
fputs($fp, "sel ".$port."\n");
fputs($fp, "si\n");
fputs($fp, "quit\n");
while(!feof($fp)) {
$out .= fgets($fp, 1024);
}
$out = str_replace("[TS]", "", $out);
$out = str_replace("OK", "", $out);
$out = trim($out);
$name=substr($out,indexOf($out,"server_name="),strlen($out));
$name=substr($name,0,indexOf($name,"server_platform=")-strlen("server_platform="));
if($basic) {
$user=substr($out,indexOf($out,"server_currentusers="),strlen($out));
$user=substr($user,0,indexOf($user,"server_currentchannels=")-strlen("server_currentchannels="));}
if (empty($_GET['sum'])) {
$heute = date ('Y-m-d');
$ges_visits = db_result(db_query("SELECT SUM(count) FROM prefix_counter"),0);
$ges_heute = @db_result(db_query("SELECT count FROM prefix_counter WHERE date = '".$heute."'"),0);
$ges_gestern = @db_result(db_query('SELECT count FROM prefix_counter WHERE date < "'.$heute.'" ORDER BY date DESC LIMIT 1'),0);
$gbook = @db_result(db_query("SELECT count(ID) FROM prefix_gbook"),0);
$posts = @db_result(db_query("SELECT count(ID) FROM prefix_posts"),0);
$topic = @db_result(db_query("SELECT count(ID) FROM prefix_topics"),0);
$gesuser = @db_result(db_query("SELECT count(ID) FROM prefix_user"),0);
$usrchk = @db_result(db_query("SELECT count(name) FROM prefix_usercheck"),0);
$map = @db_result(db_query("SELECT count(uid) FROM prefix_map"),0);
echo '<div align="left"><b> » </b>Online: '.ges_online().'<br />';
echo '<b> » </b>Heute: '.$ges_heute.'<br />';
echo '<b> » </b>Gestern: '.$ges_gestern.'<br />';
echo '<b> » </b>Gesamt: '.$ges_visits.'<br />';
echo '<b> » </b>Forum Posts: '.$posts.'<br />';
echo '<b> » </b>Angemeldete User: '.$gesuser.'<br />';
echo '<b> » </b>Teamspeak: '.$user.'<br />';
} else {
$title = $allgAr['title'].' :: Statistik';
$hmenu = 'Statistik';
$design = new design ( $title , $hmenu , 0 );
$design->header();
$anzahlShownTage = 7;
echo '<br /><table width=90%" align="center" class="border" cellpadding="0" cellspacing="1" border="0"><tr><td>';
echo '<table width="100%" border="0" cellpadding="5" cellspacing="0">';
echo '<tr class="Chead"><td colspan="3" align="center"><b>Site Statistik</b></td></tr>';
$max_in = 0;
$ges = 0;
$dat = array();
$max_width = 200;
$maxErg = db_query('SELECT MAX(count) FROM `prefix_counter`');
$max_in = db_result($maxErg,0);
$erg = db_query ("SELECT count, DATE_FORMAT(date,'%a der %d. %b') as datum FROM `prefix_counter` ORDER BY date DESC LIMIT ".$anzahlShownTage);
while ($row = db_fetch_row($erg) ) {
$value = $row[0];
if ( empty($value) ) {
$bwidth = 0;
} else {
$bwidth = $value/$max_in * $max_width;
$bwidth = round($bwidth,0);
}
echo '<tr class="Cnorm">';
echo '<td>'.$row[1].'</td>';
echo '<td><table width="'.$bwidth.'" border="0" cellpadding="0" cellspacing="0">';
echo '<tr><td height="2" class="border"></td></tr></table>';
echo '</td><td align="right">'.$value.'</td></tr>';
$ges += $value;
}
$gesBesucher = db_query('SELECT SUM(count) FROM prefix_counter');
$gesBesucher = @db_result($gesBesucher,0);
echo '<tr class="Cmite"><td colspan="3"><div align="right">';
echo 'Wochen Summe: '.$ges.'</div>';
echo 'Besucher Gesamt '.$gesBesucher.' Maximal '.$max_in.'<br /><br />';
echo '</td></tr><tr class="Cdark">';
echo '<td colspan="3" align="center">[ <a href="javascript:window.close()">Fenster Schliesen</a> ]</td>';
echo '</tr></table></td></tr></table><br />';
$design->footer();
}
?>
Bitte um hilfe