Przedszkolak
Postów: 63 Ostrzeżeń: 2
v7.01.05 Data rejestracji: 06.12.2005 21:59
|
Zrobiłem podglad TS klanu ( mod TS author: Noe © 2005) jako link - strona informacyjna - ale mam problem nie wiem jak zrobić tabele (o ile dobrze nazwałem).
Pożądaney efekt : zawartośc TS w prostokacie niebieskim i obramowanie.
Próbowałem z poleceniem table, ale albo był błąd , albo tabela powstawała nad TS jako mały kwadracik.
http://www.pkt-kl...page_id=10 tak to wyglada teraz.
poniżej kod wpisany w strone informacyjną - jeżeli zaśmiecam forum prosze o usuniecie lub o korektę.
<br>
<center><b><font size=4>Server Teamspeak`a - 213.202.216.189:8768</b></font size><br>
logowanie jako anonimus - hasło na server dostępne u Kobry
<br>lub innego klanowicza (zobacz dostępność w panelu Klan w Gadu-Gadu)
<br></center>
<br>
<?php
/*--------------------------------------------+
| PHP-Fusion 6 - Content Management System |
|---------------------------------------------|
| author: Noe © 2005 |
| web: http://ssclan.vel.pl |
| email: |
+---------------------------------------------*/
$result = dbquery("SELECT * FROM ".$db_prefix."team_speak WHERE Team_Speak_id='0'");
$data = dbarray($result);
$ts_ip = $data['Team_Speak_ip'];
$ts_port = $data['Team_Speak_port'];
$ts_chanel = $data['Team_Speak_chanel'];
$ts_tcp = $data['Team_Speak_tcp'];
$settings["serveraddress"] ="$ts_ip";
$settings["serverudpport"] = "$ts_port";
$settings["serverqueryport"] = "$ts_tcp";
$settings["limitchannel"] = "$ts_chanel";
$settings["forbiddennicknamechars"] = "()[]{}";
if ($settings["serveraddress"] == "")
{echo("<table><tr><td>");
echo("<center>Nie podano IP serwera wraz z numerem portu</center>");
echo("</td></tr></table>\n");}
class teamspeakDisplayClass {
function _stripEOL($evalString) {
$newLen = strlen($evalString);
while (((substr($evalString, $newLen - 1, 1) == "\r")) || ((substr($evalString, $newLen - 1, 1) == "\n"))) {
$newLen--;
}
return substr($evalString, 0, $newLen);
}
function _openConnection(&$socket, $host, $port, $timeout) {
@$socket = fsockopen($host, $port, $errno, $errstr, $timeout);
if ($socket and ($this->_stripEOL(fgets($socket, 4096)) == "[TS]")) {
return true;
} else {
return false;
}
}
function _closeConnection($socket) {
fputs($socket, "quit\n");
fclose($socket);
}
function _stripPartFromString(&$evalString) {
$pos = strpos($evalString, "\t");
if(is_integer($pos)) {
$result = substr($evalString, 0, $pos);
$evalString = substr($evalString, $pos + 1);
} else {
$result = $evalString;
$evalString = "";
}
return $result;
}
function _stripQuotes($evalString) {
if(strpos($evalString, '"') == 0) $evalString = substr($evalString, 1, strlen($evalString) - 1);
if(strrpos($evalString, '"') == strlen($evalString) - 1) $evalString = substr($evalString, 0, strlen($evalString) - 1);
return $evalString;
}
function _getServerInfo($socket) {
fputs($socket, "si\n");
$result = array();
do {
$buffer = $this->_stripEOL(fgets($socket, 4096));
if (($buffer != "OK") && (strtoupper(substr($buffer, 0, 5)) != "ERROR")) {
$pos = strpos($buffer, '=');
if ($pos !== False) {
$result[substr($buffer, 0, $pos)] = substr($buffer, $pos + 1);
}
}
} while (($buffer != "OK") && (strtoupper(substr($buffer, 0, 5)) != "ERROR") && (!feof($socket)));
return $result;
}
function _setPlayerDisplayImage(&$playerInfo) {
if (($playerInfo["attribute"] & 8) == 8) { $playerImage = "away"; }
else if (($playerInfo["attribute"] & 32) == 32) { $playerImage = "mutespeakers"; }
else if (($playerInfo["attribute"] & 16) == 16) { $playerImage = "mutemicrophone"; }
else if (($playerInfo["attribute"] & 1) == 1) { $playerImage = "channelcommander"; }
else { $playerImage = "normal"; }
$playerInfo["displayimage"] = $playerImage;
}
function _setPlayerDisplayName(&$playerInfo) {
if (($playerInfo["userstatus"] & 4) == 4) { $playerstatus = "R"; } else { $playerstatus = 'U'; }
if (($playerInfo["userstatus"] & 1) == 1) { $playerstatus .= " SA"; }
if (($playerInfo["privileg"] & 1) == 1) { $playerstatus .= " CA"; }
if (($playerInfo["privileg"] & 8) == 8) { $playerstatus .= " AO"; }
if (($playerInfo["privileg"] & 16) == 16) { $playerstatus .= " AV"; }
if (($playerInfo["privileg"] & 2) == 2) { $playerstatus .= " O"; }
if (($playerInfo["privileg"] & 4) == 4) { $playerstatus .= " V"; }
if (($playerInfo["attribute"] & 64) == 64) { $playerstatus .= " Rec"; }
if (($playerInfo["attribute"] & 2) == 2) { $playerattributes = ' WV'; } else { $playerattributes = ''; }
$playerInfo["displayname"] = $playerInfo["playername"] . " (" . $playerstatus . ")" . $playerattributes;
}
function _getPlayerList($socket) {
fputs($socket, "pl\n");
$buffer = $this->_stripEOL(fgets($socket, 4096));
$result = array();
if (strtoupper(substr($buffer, 0, 5)) == "ERROR") { return $result; }
do {
$buffer = $this->_stripEOL(fgets($socket, 4096));
if (($buffer != "OK") && (strtoupper(substr($buffer, 0, 5)) != "ERROR")) {
$playerid = $this->_stripPartFromString($buffer);
$result[$playerid] = array(
"playerid" => $playerid,
"channelid" => $this->_stripPartFromString($buffer),
"receivedpackets" => $this->_stripPartFromString($buffer),
"receivedbytes" => $this->_stripPartFromString($buffer),
"sentpackets" => $this->_stripPartFromString($buffer),
"sentbytes" => $this->_stripPartFromString($buffer),
"paketlost" => $this->_stripPartFromString($buffer) / 100,
"pingtime" => $this->_stripPartFromString($buffer),
"totaltime" => $this->_stripPartFromString($buffer),
"idletime" => $this->_stripPartFromString($buffer),
"privileg" => $this->_stripPartFromString($buffer),
"userstatus" => $this->_stripPartFromString($buffer),
"attribute" => $this->_stripPartFromString($buffer),
"ip" => $this->_stripPartFromString($buffer),
"playername" => $this->_stripQuotes($this->_stripPartFromString($buffer)),
"loginname" => $this->_stripQuotes($this->_stripPartFromString($buffer))
);
$this->_setPlayerDisplayImage($result[$playerid]);
$this->_setPlayerDisplayName($result[$playerid]);
}
} while (($buffer != "OK") && (strtoupper(substr($buffer, 0, 5)) != "ERROR") && (!feof($socket)));
return $result;
}
function _getLimitedPlayerList($socket, $channelList) {
$playerList = $this->_getPlayerList($socket);
$result = array();
foreach($playerList as $playerInfo) {
foreach($channelList as $channelInfo) {
if ($playerInfo["channelid"] == $channelInfo["channelid"]) {
$result[$playerInfo["playerid"]] = $playerInfo;
}
}
}
return $result;
}
function _setChannelDisplayName(&$channelInfo) {
if ($channelInfo["parent"] != -1) {
$channelInfo["displayname"] = $channelInfo["channelname"];
} else {
if (($channelInfo["flags"] & 1) == 1) { $channelstatus = 'U'; } else { $channelstatus = 'R'; }
if (($channelInfo["flags"] & 2) == 2) { $channelstatus .= 'M'; }
if (($channelInfo["flags"] & 4) == 4) { $channelstatus .= 'P'; }
if (($channelInfo["flags"] & 8) == 8) { $channelstatus .= 'S'; }
if (($channelInfo["flags"] & 16) == 16) { $channelstatus .= 'D'; }
$channelInfo["displayname"] = $channelInfo["channelname"] . " (" . $channelstatus . ")";
}
}
function _getChannelList($socket) {
fputs($socket, "cl\n");
$buffer = $this->_stripEOL(fgets($socket, 4096));
$result = array();
if (strtoupper(substr($buffer, 0, 5)) == "ERROR") { return $result; }
do {
$buffer = $this->_stripEOL(fgets($socket, 4096));
if (($buffer != "OK") && (strtoupper(substr($buffer, 0, 5)) != "ERROR")) {
$channelid = $this->_stripPartFromString($buffer);
$result[$channelid] = array(
"channelid" => $channelid,
"codec" => $this->_stripPartFromString($buffer),
"parent" => $this->_stripPartFromString($buffer),
"order" => $this->_stripPartFromString($buffer),
"maxplayers" => $this->_stripPartFromString($buffer),
"channelname" => $this->_stripQuotes($this->_stripPartFromString($buffer)),
"flags" => $this->_stripPartFromString($buffer),
"password" => $this->_stripPartFromString($buffer),
"topic" => $this->_stripQuotes($this->_stripPartFromString($buffer))
);
$this->_setChannelDisplayName($result[$channelid]);
}
} while (($buffer != "OK") && (strtoupper(substr($buffer, 0, 5)) != "ERROR") && (!feof($socket)));
return $result;
}
function _getLimitedChannelList($socket, $limitChannel) {
$channelList = $this->_getChannelList($socket);
$result = array();
foreach($channelList as $channelInfo) {
if ($channelInfo["parent"] == -1) {
if ($channelInfo["channelname"] == $limitChannel) {
$result[$channelInfo["channelid"]] = $channelInfo;
foreach($channelList as $subChannelInfo) {
if ($subChannelInfo["parent"] == $channelInfo["channelid"]) {
$result[$subChannelInfo["channelid"]] = $subChannelInfo;
}
}
}
}
}
return $result;
}
function _selectServer($socket, $port) {
fputs($socket, "sel ".$port . "\n");
return ($this->_stripEOL(fgets($socket, 4096)) == "OK");
}
function queryTeamspeakServerEx($settings) {
$result = array();
if (! $this->_openConnection($socket, $settings["serveraddress"], $settings["serverqueryport"], 0.3)) {
$result["queryerror"] = 1;
} else if (! $this->_selectServer($socket, $settings["serverudpport"])) {
$result["queryerror"] = 2;
$this->_closeConnection($socket);
} else {
$result["queryerror"] = 0;
$result["serverinfo"] = $this->_getServerInfo($socket);
$result["channellist"] = ($settings["limitchannel"] == "") ? $this->_getChannelList($socket) : $this->_getLimitedChannelList($socket, $settings["limitchannel"]);
$result["playerlist"] = ($settings["limitchannel"] == "") ? $this->_getPlayerList($socket) : $this->_getLimitedPlayerList($socket, $result["channellist"]);
$this->_closeConnection($socket);
}
return $result;
}
function queryTeamspeakServer($serverAddress, $serverUDPPort, $serverQueryPort) {
$settings = $this->getDefaultSettings();
$settings["serveraddress"] = dbquery("SELECT * FROM ".$db_prefix."Team_Speak WHERE Team_Speak_ip='$ts_ip'");
$settings["serverudpport"] = dbquery("SELECT * FROM ".$db_prefix."Team_Speak WHERE Team_Speak_port='$ts_port'");
$settings["serverqueryport"] = dbquery("SELECT * FROM ".$db_prefix."Team_Speak WHERE Team_Speak_tcp='$ts_tcp'");
return $this->queryTeamspeakServerEx($settings);
}
function _orderAlphaGetString($string) {
$lowerstring = strtolower($string);
$result = "";
for ($i = 0; $i < strlen($lowerstring); $i++) {
if (strpos("0123456789abcdefghijklmnopqrstuvwxyz", substr($lowerstring, $i, 1)) !== false) {
$result .= substr($lowerstring, $i, 1);
}
}
return $result;
}
function _orderAlpha($str1, $str2) {
return strcmp($this->_orderAlphaGetString($str1), $this->_orderAlphaGetString($str2));
}
function _compareChannel($a, $b) {
if ($a["order"] != $b["order"]) { return ($a["order"] < $b["order"]) ? -1 : 1; }
else { return $this->_orderAlpha($a["displayname"], $b["displayname"]); }
}
function _comparePlayer($a, $b) {
$userlevela = $a["userstatus"] & 1;
$userlevelb = $b["userstatus"] & 1;
if ($userlevela != $userlevelb) { return ($userlevela < $userlevelb) ? 1 : -1; }
else { return $this->_orderAlpha($a["displayname"], $b["displayname"]); }
}
function sortServerInfo(&$serverInfo) {
usort($serverInfo["channellist"], array($this, "_compareChannel"));
usort($serverInfo["playerlist"], array($this, "_comparePlayer"));
}
function _formatTime($totaltime) {
$hours = floor($totaltime / 3600);
$minutes = floor(($totaltime % 3600) / 60);
return (($hours < 10) ? "0" : "") . $hours . ":" . (($minutes < 10) ? "0" : "") . $minutes;
}
function _getCodecName($codec) {
if ($codec == 0) { return "CELP 5.1 Kbit"; }
else if ($codec == 1) { return "CELP 6.3 Kbit"; }
else if ($codec == 2) { return "GSM 14.8 Kbit"; }
else if ($codec == 3) { return "GSM 16.4 Kbit"; }
else if ($codec == 4) { return "CELP Windows 5.2 Kbit"; }
else if ($codec == 5) { return "Speex 3.4 Kbit"; }
else if ($codec == 6) { return "Speex 5.2 Kbit"; }
else if ($codec == 7) { return "Speex 7.2 Kbit"; }
else if ($codec == 8) { return "Speex 9.3 Kbit"; }
else if ($codec == 9) { return "Speex 12.3 Kbit"; }
else if ($codec == 10) { return "Speex 16.3 Kbit"; }
else if ($codec == 11) { return "Speex 19.5 Kbit"; }
else if ($codec == 12) { return "Speex 25.9 Kbit"; }
else { return "Unknown (" . $codec . ")"; }
}
function displayTeamspeakEx($settings) {
$serverInfo = $this->queryTeamspeakServerEx($settings);
echo("<div id=".BASEDIR."/infusions/Team_Speak_panel/ts_image\">\n");
if ($serverInfo["queryerror"] != 0) {
$popupInfo = "Server address: " . $settings["serveraddress"] . (($settings["serverudpport"]!="")?(":" . $settings["serverudpport"]): "");
if ($serverInfo["queryerror"] == 1) {
$popupInfo .= ", Blad: nie moge polaczyc sie z portem serwerquery";
} else {
$popupInfo .= ", Blad: na podanym porcie brak serwerow TS " . $settings["serverudpport"];
}
echo("<table><tr><td>");
echo("<img src=".BASEDIR."infusions/Team_Speak_panel/ts_image/teamspeak_offline.png \" alt=\"\" title=\"".$popupInfo."\">");
echo("</td><td class=\"teamspeakserver\" title=\"" . $popupInfo . "\">");
echo("Server offline");
echo("</td></tr></table>\n");
} else {
$this->sortServerInfo($serverInfo);
$jsTeamspeakId = md5($settings["serveraddress"] . ":" . $settings["serverudpport"]);
echo("<script type=\"text/javascript\"><!--\n");
echo("function stringOk_" . $jsTeamspeakId . "(string, forbiddenChars) {\n");
echo(" for(var i = 0; i < string.length; i++) {\n");
echo(" if (forbiddenChars.indexOf(string.charAt(i)) > -1) {\n");
echo(" return false;\n");
echo(" }\n");
echo(" }\n");
echo(" return true;\n");
echo("}\n");
echo("function enterServer_" . $jsTeamspeakId . "() {\n");
echo(" enterSubChannel_" . $jsTeamspeakId . "(null, false, null);\n");
echo("}\n");
echo("function enterChannel_" . $jsTeamspeakId . "(channelName, channelPassworded) {\n");
echo(" enterSubChannel_" . $jsTeamspeakId . "(channelName, channelPassworded, null);\n");
echo("}\n");
echo("function enterSubChannel_" . $jsTeamspeakId . "(channelName, channelPassworded, subChannelName) {\n");
echo(" var serveraddress = 'teamspeak://" . $settings["serveraddress"] . ":" . $settings["serverudpport"] . "';\n");
echo(" var nickname=window.prompt('Enter your nickname', '');\n");
echo(" if (nickname == null) {\n");
echo(" return;\n");
echo(" } else if (! stringOk_" . $jsTeamspeakId . "(nickname, '" . str_replace("'", "\\'", $settings["forbiddennicknamechars"]) . "')) {\n");
echo(" window.alert('Blad: Podany nick zawiera niedozwolone znaki: " . str_replace("'", "\\'", $settings["forbiddennicknamechars"]) . "');\n");
echo(" return;\n");
echo(" } else if (nickname == \"\") {\n");
echo(" window.alert('Blad: Nie podano nicku');\n");
echo(" return;\n");
echo(" }\n");
echo(" serveraddress = serveraddress + \"/nickname=\" + escape(nickname);\n");
if ($serverInfo["serverinfo"]["server_password"] == "1") {
echo(" var password=window.prompt('Enter the teamspeak server password for " . $serverInfo["serverinfo"]["server_name"] . "', '');\n");
echo(" if (password == null) {\n");
echo(" return;\n");
echo(" } else if (password == \"\") {\n");
echo(" window.alert('Blad: Nie podano hasla');\n");
echo(" return;\n");
echo(" }\n");
echo(" serveraddress = serveraddress + \"?password=\" + escape(password);\n");
}
echo(" if (channelName != null) { serveraddress = serveraddress + \"?channel=\" + escape(channelName); }\n");
echo(" if (channelPassworded) {\n");
echo(" var channelpassword=window.prompt('Enter the channel password for channel ' + channelName, '');\n");
echo(" if (channelpassword == null) {\n");
echo(" return;\n");
echo(" } else if (channelpassword == \"\") {\n");
echo(" window.alert('Blad: Nie podano hasla kanalu');\n");
echo(" return;\n");
echo(" }\n");
echo(" serveraddress = serveraddress + \"?channelpassword=\" + escape(channelpassword);\n");
echo(" }\n");
echo(" if (subChannelName != null) { serveraddress = serveraddress + \"?subchannel=\" + escape(subChannelName); }\n");
echo(" window.location=serveraddress;\n");
echo("}\n");
echo("//--></script>\n");
$popupInfo = "Server address: " . $settings["serveraddress"] . (($settings["serverudpport"] != 8767) ? (":" . $settings["serverudpport"]): "") . ", Max players: " . $serverInfo["serverinfo"]["server_maxusers"] . ", Uptime: " . $this->_formatTime($serverInfo["serverinfo"]["server_uptime"]);
echo("<table><tr><td>");
echo("<img src=".BASEDIR."infusions/Team_Speak_panel/ts_image/teamspeak_online.png \" alt=\"\" title=\"" . $popupInfo . "\">");
echo("</td><td class=\"teamspeakserver\" title=\"" . $popupInfo . "\">");
echo("<a class=\"teamspeakserver\" href=\"javascript:enterServer_" . $jsTeamspeakId . "();\">");
echo(str_replace(" ", " ", htmlspecialchars($serverInfo["serverinfo"]["server_name"])));
echo("</a>");
echo("</td></tr></table>\n");
$currentchannels = 0;
foreach($serverInfo["channellist"] as $channelInfo) {
if ($channelInfo["parent"] == -1) {
$currentchannels++;
}
}
$counter = 0;
foreach($serverInfo["channellist"] as $channelInfo) { if ($channelInfo["parent"] == -1) {
$currentplayers = 0;
foreach($serverInfo["playerlist"] as $playerInfo) {
if($playerInfo["channelid"] == $channelInfo["channelid"]) $currentplayers++;
}
$currentplayersandsubchannels = $currentplayers;
foreach($serverInfo["channellist"] as $subchannelInfo) {
if ($subchannelInfo["parent"] == $channelInfo["channelid"]) {
$currentplayersandsubchannels++;
}
}
$popupInfo = "Max players: " . $channelInfo["maxplayers"] . ", Codec: " . $this->_getCodecName($channelInfo["codec"]);
if ($channelInfo["topic"] != "") { $popupInfo = $popupInfo . ", Topic: " . $channelInfo["topic"]; }
echo("<table><tr><td>");
echo("<img src=".BASEDIR."infusions/Team_Speak_panel/ts_image/treeimage" . ((($counter + 1) == $currentchannels) ? "3" : "2") . ".png \" alt=\"\">");
echo("<img src=".BASEDIR."infusions/Team_Speak_panel/ts_image/channel.png \" alt=\"\" title=\"" . $popupInfo . "\">");
echo("</td><td class=\"teamspeakchannel\" title=\"" . $popupInfo . "\">");
echo("<a class=\"teamspeakchannel\" href=\"javascript:enterChannel_" . $jsTeamspeakId . "('" . str_replace("'", "\'", $channelInfo["channelname"]) . "', " . (($channelInfo["password"]) == "1" ? "true" : "false") . ");\">");
echo(str_replace(" ", " ", htmlspecialchars($channelInfo["displayname"])));
echo("</a>");
echo("</td></tr></table>\n");
$counter_playerandsubchannels = 0;
foreach($serverInfo["playerlist"] as $playerInfo) {
if ($playerInfo["channelid"] == $channelInfo["channelid"]) {
$popupInfo = "Time online: " . $this->_formatTime($playerInfo["totaltime"]) . ", Time idle: " . $this->_formatTime($playerInfo["idletime"]) . ", Ping: " . $playerInfo["pingtime"] . "ms";
echo("<table><tr><td>");
echo("<img src=".BASEDIR."infusions/Team_Speak_panel/ts_image/treeimage" . ((($counter + 1) == $currentchannels) ? "4" : "1") . ".png \" alt=\"\">");
echo("<img src=".BASEDIR."infusions/Team_Speak_panel/ts_image/treeimage" . ((($counter_playerandsubchannels + 1) == $currentplayersandsubchannels) ? "3" : "2") . ".png \" alt=\"\">");
echo("<img src=".BASEDIR."infusions/Team_Speak_panel/ts_image/player_" . $playerInfo["displayimage"] . ".png \" alt=\"" . $playerInfo["displayimage"] . "\" title=\"" . $popupInfo . "\">");
echo("</td><td class=\"teamspeakplayer\" title=\"" . $popupInfo . "\">");
echo(str_replace(" ", " ", htmlspecialchars($playerInfo["displayname"])));
echo("</td></tr></table>\n");
$counter_playerandsubchannels++;
}
}
foreach($serverInfo["channellist"] as $subchannelInfo) { if ($subchannelInfo["parent"] == $channelInfo["channelid"]) {
$currentplayers = 0;
foreach($serverInfo["playerlist"] as $playerInfo) {
if($playerInfo["channelid"] == $subchannelInfo["channelid"]) $currentplayers++;
}
$popupInfo = "Max players: " . $subchannelInfo["maxplayers"] . ", Codec: " . $this->_getCodecName($subchannelInfo["codec"]);
if ($subchannelInfo["topic"] != "") { $popupInfo = $popupInfo . ", Topic: " . $subchannelInfo["topic"]; }
echo("<table><tr><td>");
echo("<img src=".BASEDIR."infusions/Team_Speak_panel/ts_image/treeimage" . ((($counter + 1) == $currentchannels) ? "4" : "1") . ".png \" alt=\"\">");
echo("<img src=".BASEDIR."infusions/Team_Speak_panel/ts_image/treeimage" . ((($counter_playerandsubchannels + 1) == $currentplayersandsubchannels) ? "3" : "2") . ".png \" alt=\"\">");
echo("<img src=".BASEDIR."infusions/Team_Speak_panel/ts_image/channel.png \" alt=\"\" title=\"" . $popupInfo . "\">");
echo("</td><td class=\"teamspeaksubchannel\" title=\"" . $popupInfo . "\">");
echo("<a class=\"teamspeaksubchannel\" href=\"javascript:enterSubChannel_" . $jsTeamspeakId . "('" . str_replace("'", "\'", $channelInfo["channelname"]) . "', " . (($channelInfo["password"]) == "1" ? "true" : "false") . ", '" . str_replace("'", "\'", $subchannelInfo["channelname"]) . "');\">");
echo(str_replace(" ", " ", htmlspecialchars($subchannelInfo["displayname"])));
echo("</a>");
echo("</td></tr></table>\n");
$counter_player = 0;
foreach($serverInfo["playerlist"] as $playerInfo) {
if ($playerInfo["channelid"] == $subchannelInfo["channelid"]) {
$popupInfo = "Time online: " . $this->_formatTime($playerInfo["totaltime"]) . ", Time idle: " . $this->_formatTime($playerInfo["idletime"]) . ", Ping: " . $playerInfo["pingtime"] . "ms";
echo("<table><tr><td>");
echo("<img src=".BASEDIR."infusions/Team_Speak_panel/ts_image/treeimage" . ((($counter + 1) == $currentchannels) ? "4" : "1") . ".png \" alt=\"\">");
echo("<img src=".BASEDIR."infusions/Team_Speak_panel/ts_image/treeimage" . ((($counter_playerandsubchannels + 1) == $currentplayersandsubchannels) ? "4" : "1") . ".png \" alt=\"\">");
echo("<img src=".BASEDIR."infusions/Team_Speak_panel/ts_image/treeimage" . ((($counter_player + 1) == $currentplayers) ? "3" : "2") . ".png\" alt=\"\">");
echo("<img src=".BASEDIR."infusions/Team_Speak_panel/ts_image/player_" . $playerInfo["displayimage"] . ".png \" alt=\"" . $playerInfo["displayimage"] . "\" title=\"" . $popupInfo . "\">");
echo("</td><td class=\"teamspeakplayer\" title=\"" . $popupInfo . "\">");
echo(str_replace(" ", " ", htmlspecialchars($playerInfo["displayname"])));
echo("</td></tr></table>\n");
$counter_player++;
}
}
$counter_playerandsubchannels++;
}
}
$counter++;
} }
}
echo("</div>\n");
}
function displayTeamspeak($serverAddress, $serverUDPPort, $serverQueryPort) {
$settings = $this->getDefaultSettings();
$settings["serveraddress"] = $serverAddress;
$settings["serverudpport"] = $serverUDPPort;
$settings["serverqueryport"] = $serverQueryPort;
$this->displayTeamspeakEx($settings);
}
}
$teamspeakDisplay = new teamspeakDisplayClass;
$teamspeakDisplay->displayTeamspeakEx($settings);
?>
Przenioslem/Pieka
Edytowane przez Pieka dnia 19.10.2009 20:15:53
zielony jak szczypiorek na wiosne
|