コード例 #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";
}