echo $ve_slots; ?> </td> <td> <?php echo $vent_server['descr']; ?> </td> </tr> <?php } } if (isset($ts3_servers)) { require_once PAGE_PATH . '/teamspeak3_query.php'; foreach ($ts3_servers as $ts3_server) { $tsstatus = new TSStatus($ts3_server['addr'], $ts3_server['queryPort'], $ts3_server['UDPPort']); $tsstatus->imagePath = IMAGE_PATH . "/teamspeak3/"; $tsstatus->showNicknameBox = false; $tsstatus->decodeUTF8 = false; $tsstatus->timeout = 2; //echo $tsstatus->render(); ?> <tr class="bg1"> <td class="fHeading"> <img src="<?php echo IMAGE_PATH; ?> /teamspeak3/ts3.png" alt="tsicon" /> <a href="<?php echo $g_options['scripturl'] . "?mode=teamspeak&game={$game}&tsId=" . $ts3_server['serverId'];
} } $channels = "<img src=\"" . IMAGE_PATH . "/teamspeak/channel.gif\" alt=\"\" class=\"tsicon\" /> <a style=\"font-weight:bold\" href=\"hlstats.php?mode=teamspeak&game={$game}&tsId={$tsId}&cID=" . trim($innerArr[0]) . "&type=1\">" . removeChar($innerArr[1]) . " </a><br /> " . $users . ""; $chan .= show("channel", array("channel" => $channels, "subchannels" => $subchan)); } if (isset($_GET['cID'])) { $cID = $_GET['cID']; $type = $_GET['type']; } else { $cID = 0; $type = 0; } if ($s['serverType'] == "0") { $outp_str = show("teamspeak", array("name" => $name, "os" => $os, "uptime" => time_convert($uptime), "user" => $user, "t_name" => "Server name", "t_os" => "Operating system", "uchannels" => $chan, "info" => $info, "t_uptime" => "Uptime", "t_channels" => "Channels", "t_user" => "Users", "head" => "Teamspeak Overview", "users_head" => "User Information", "player" => "User", "channel" => "Channel", "channel_head" => "Channel Information", "max" => $max, "channels" => $cAmount, "logintime" => "Login time", "idletime" => "Idle time", "channelstats" => $channelstats, "userstats" => $userstats)); } elseif ($s['serverType'] == "2") { $tsstatus = new TSStatus($uip, $tPort, $port); $tsstatus->imagePath = IMAGE_PATH . "/teamspeak3/"; $tsstatus->showNicknameBox = false; $tsstatus->decodeUTF8 = false; $tsstatus->timeout = 2; function ts3_get_data($was, $data) { global $tsstatus; $data = $tsstatus->serverdata(); return $data[$was]; } $channels = '<link rel="stylesheet" type="text/css" href="' . IMAGE_PATH . '/teamspeak3/ts3.css" />' . $tsstatus->render(); $outp_str = show("teamspeak3", array("name" => ts3_get_data('virtualserver_name'), "os" => ts3_get_data('virtualserver_platform'), "uptime" => time_convert(ts3_get_data('virtualserver_uptime')), "user" => ts3_get_data('virtualserver_clientsonline'), "t_name" => "Server name", "t_os" => "Operating system", "uchannels" => $channels, "info" => $tsstatus->info($uip), "t_uptime" => "Uptime", "t_channels" => "Channels", "t_user" => "Users", "head" => "Teamspeak Overview", "users_head" => "User Information", "player" => "User", "channel" => "Channel", "channel_head" => "Channel Information", "max" => $max, "channels" => ts3_get_data('virtualserver_channelsonline'), "logintime" => "Login time", "idletime" => "Idle time", "channelstats" => $channelstats, "userstats" => $tsstatus->userstats())); $tsstatus->disconn(); } echo $outp_str;
$query_port = $set['query_port']; $server_id = $set['server_id']; $timeout = $set['timeout']; $admin_login = $set['admin_login']; $admin_passw = $set['admin_passw']; $decode_utf = $set['decode_utf']; } $res_db_con = dbquery("SELECT * FROM " . DB_TS3_CON); while ($con = dbarray($res_db_con)) { $nick = $con['hide_nick']; $pass = $con['show_pass']; } if ($nick == "1") { $this_nick = true; } else { $this_nick = false; } if ($pass == "1") { $this_pass = true; } else { $this_pass = false; } $tsstatus = new TSStatus($host, $query_port, $server_id); $tsstatus->imagePath = INFUSIONS . "ts3_panel/images/"; $tsstatus->showNicknameBox = $this_nick; $tsstatus->showPasswordBox = $this_pass; $tsstatus->decodeUTF8 = $decode_utf; $tsstatus->timeout = $timeout; $tsstatus->setLoginPassword($admin_login, $admin_passw); echo $tsstatus->render(); echo $ts3_panel_show;
if (isset($_GET['cID'])) { $cID = $_GET['cID']; $type = $_GET['type']; } else { $cID = 0; $type = 0; } if ($type == 0) { $info = defaultInfo($uip, $tPort, $port); } elseif ($type == 1) { $info = channelInfo($uip, $tPort, $port, $cID); } $index = show($dir . "/teamspeak", array("name" => $name, "os" => $os, "uptime" => time_convert($uptime), "user" => $user, "t_name" => _ts_name, "t_os" => _ts_os, "uchannels" => $chan, "info" => $info, "t_uptime" => _ts_uptime, "t_channels" => _ts_channels, "t_user" => _ts_user, "head" => _ts_head, "users_head" => _ts_users_head, "player" => _ts_player, "channel" => _ts_channel, "channel_head" => _ts_channel_head, "max" => $max, "channels" => $cAmount, "logintime" => _ts_logintime, "idletime" => _ts_idletime, "channelstats" => $channelstats, "userstats" => $userstats)); break; case '3': $tsstatus = new TSStatus($settings['ts_ip'], $settings['ts_port'], $settings['ts_sport']); $tstree = $tsstatus->render($dir . "/subchannels"); $users = 0; foreach ($tsstatus->_userDatas as $user) { if ($user["client_type"] == 0) { $users++; $icon = "16x16_player_off.png"; if ($user["client_away"] == 1) { $icon = "16x16_away.png"; } else { if ($user["client_flag_talking"] == 1) { $icon = "16x16_player_on.png"; } else { if ($user["client_output_hardware"] == 0) { $icon = "16x16_hardware_output_muted.png"; } else {
<html><head> <link rel="shortcut icon" href="../ts/img/teamspeak.ico"> <title>TSStatus</title> <link rel="stylesheet" type="text/css" href="../ts/tsstatus.min.css" /> </head><body><br><br><br><br> <?php $firefox = strpos($_SERVER["HTTP_USER_AGENT"], 'Firefox') ? true : false; if (!$firefox) { ?> <br><?php } require_once "../ts/tsstatus.php"; $tsstatus = new TSStatus("www.au1st3in.net", 10011); $tsstatus->useServerPort(9987); $tsstatus->imagePath = "../ts/img/"; $tsstatus->timeout = 2; $tsstatus->setLoginPassword("LOGIN", "PASSWORD"); $tsstatus->setCache(2); $tsstatus->hideEmptyChannels = true; $tsstatus->hideParentChannels = false; $tsstatus->showNicknameBox = false; $tsstatus->showPasswordBox = false; echo $tsstatus->render(); ?> </body></html>
?> <tr> <td colspan="3" style="text-align: center"><input type="submit" value="Test TSStatus!"/></td> </tr> <?php } ?> </table> </form> <?php if ($enableGenerator) { if ($host != "") { echo "<h3>TSStatus result</h3>\n"; require_once $absoluteDir . "tsstatus.php"; $tsstatus = new TSStatus($host, $qport); $tsstatus->imagePath = $wwwDir . "img/"; if ($portOrId == 1) { $tsstatus->useServerPort($port); } if ($portOrId == 2) { $tsstatus->useServerId($sid); } $tsstatus->timeout = $timeout; if ($serverQueryLogin != "") { $tsstatus->setLoginPassword($serverQueryLogin, $serverQueryPassword); } if ($cacheTime > 0 && $cacheFile == "") { $tsstatus->setCache($cacheTime); } if ($cacheTime > 0 && $cacheFile != "") {
function teamspeak3($settings) { $tsstatus = new TSStatus($settings['ts_ip'], $settings['ts_port'], $settings['ts_sport']); return show("menu/teamspeak", array("hostname" => '', "channels" => $tsstatus->render())); }