예제 #1
0
        }
        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;
    }
} else {
    echo "Error, function fopen not found";
}
예제 #2
0
파일: index.php 프로젝트: nopuls/dzcp
         $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 {
                         if ($user["client_output_muted"] == 1) {
예제 #3
0
    $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;
예제 #4
0
function teamspeak3($settings)
{
    $tsstatus = new TSStatus($settings['ts_ip'], $settings['ts_port'], $settings['ts_sport']);
    return show("menu/teamspeak", array("hostname" => '', "channels" => $tsstatus->render()));
}