1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
| 1. / 2. / ...
<?php
$cs_lang = cs_translate('ts2panel');
// TeamSpeak2 Adresse sowie seperate Funktionen includen
include('mods/ts2panel/config.inc.php');
// Classes includen
require_once("mods/ts2panel/cyts.class.php");
$cyts = new cyts;
// Verbindung zum Server herstellen
$cyts->connect($adr, $tcp, $udp);
$players = $cyts->info_playerList();
$server = $cyts->info_serverInfo();
$count=0;
foreach ($players as $users) {
$count++;
}
// Navlist Anzeige ohne Link:
//if(!empty($server)) {
//echo $count . ' / ' . $server['server_maxusers'];
//} else {
//echo $cs_lang['offline'];
//}
// Navlist Anzeige mit Link:
if(!empty($server)) {
echo cs_html_table(1,'left',0);
echo cs_html_roco(1,'right');
echo $cs_lang['navlist_user'];
echo $count . ' / ' . $server['server_maxusers'];
echo ' ';
echo cs_html_hr();
echo cs_html_table(1,1);
$list2 = $cyts->info_playerList();
if (!empty($list2)) {
foreach ($list2 as $player) {
echo cs_html_roco(1,'left');
echo ' ';
echo cs_html_img('symbols/ts2panel/player_normal.png','14','14');
echo ' ';
echo $player[15];
echo cs_html_roco(0);
}
} else {
echo cs_html_roco(1,'left');
echo $cs_lang['navlist_pempty'];
echo cs_html_roco(0);
}
echo cs_html_table(0);
echo cs_html_hr();
echo '<center>' . cs_link('<strong>TS²-Account erstellen...</strong>','ts2panel','create_uaccount') . '</center>';
echo cs_html_roco(0);
echo cs_html_table(0);
} else {
echo $cs_lang['navlist_offline'];
}
?> |