query("
SELECT
serverId,
name,
addr,
password,
descr,
queryPort,
UDPPort,
serverType
FROM
hlstats_Servers_VoiceComm
");
if ($db->num_rows($result) >= 1) {
printSectionTitle('Voice Server');
?>
Server Name |
Server Address |
Password |
Channels |
Slots used |
Notes |
fetch_array()) {
if ($row['serverType'] == TS) {
$ts_servers[$i]['serverId'] = $row['serverId'];
$ts_servers[$i]['name'] = $row['name'];
$ts_servers[$i]['addr'] = $row['addr'];
$ts_servers[$i]['password'] = $row['password'];
$ts_servers[$i]['descr'] = $row['descr'];
$ts_servers[$i]['queryPort'] = $row['queryPort'];
$ts_servers[$i]['UDPPort'] = $row['UDPPort'];
$i++;
} else if ($row['serverType'] == VENT) {
$vent_servers[$j]['serverId'] = $row['serverId'];
$vent_servers[$j]['name'] = $row['name'];
$vent_servers[$j]['addr'] = $row['addr'];
$vent_servers[$j]['password'] = $row['password'];
$vent_servers[$j]['descr'] = $row['descr'];
$vent_servers[$j]['queryPort'] = $row['queryPort'];
$j++;
}
}
if (isset($ts_servers))
{
require_once(PAGE_PATH . '/teamspeak_class.php');
foreach($ts_servers as $ts_server)
{
$settings = $teamspeakDisplay->getDefaultSettings();
$settings['serveraddress'] = $ts_server['addr'];
$settings['serverqueryport'] = $ts_server['queryPort'];
$settings['serverudpport'] = $ts_server['UDPPort'];
$ts_info = $teamspeakDisplay->queryTeamspeakServerEx($settings);
if ($ts_info['queryerror'] != 0) {
$ts_channels = 'err';
$ts_slots = $ts_info['queryerror'];
} else {
$ts_channels = count($ts_info['channellist']);
$ts_slots = count($ts_info['playerlist']).'/'.$ts_info['serverinfo']['server_maxusers'];
}
?>
">
|
|
|
|
|
|
m_cmdcode = 2; // Detail mode.
$ve_info->m_cmdhost = $vent_server['addr'];
$ve_info->m_cmdport = $vent_server['queryPort'];
/////////
$rc = $ve_info->Request();
// if ($rc) {
// echo "CVentriloStatus->Request() failed. $ve_info->m_error
\n";
// } else {
$ve_channels = $ve_info->m_channelcount;
$ve_slots = $ve_info->m_clientcount.'/'.$ve_info->m_maxclients;
// }
?>
">
|
|
|
|
|
|