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:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
|
<?php
// retrieve server info
require("config.php");
$tss2info->getInfo();
$tss2info->userName="Guest";
?>
<html>
<head>
<title><?php echo $tss2info->sitetitle;?></title>
<style type="text/css">
<!--
body {
background-color: #ffffff; //Hintergrundfarbe
margin: 1px;
font-family: Verdana;
font-size: 10px;
SCROLLBAR-base-COLOR: #ffffff;
SCROLLBAR-ARROW-COLOR: #000000;
}
td.refresh {
font-family: Verdana;
font-size: 9px;
color: #000000;
}
a.channellink:link,
a.channellink:hover,
a.channellink:visited,
a.channellink:active {
text-decoration: none;
font: bold
font-family: Verdana;
font-size: 10px;
color: #000000;
}
a.refreshlink:link,
a.refreshlink:hover,
a.refreshlink:visited,
a.refreshlink:active {
text-decoration: none;
font-family: Verdana;
font-size: 9px;
color: #000000;
}
td.teamspeak {
font: bold
font-family: Verdana;
font-size: 10px;
color: #000000;
}
td.channel {
font: bold
font-family: Verdana;
font-size: 10px;
color: #000000;
}
td.player {
font-family: Verdana,Arial;
font-size: 9px;
color: #000000;
}
td.offline {
font: bold
font-family: Verdana;
font-size: 10px;
color: #000000;
}
//-->
</style>
<?php
if (isset($HTTP_GET_VARS["auto"])) {
$auto = $HTTP_GET_VARS["auto"];
} else {
$auto = 0;
}
if ($auto==1) {
echo '<meta http-equiv="refresh" content="'.$tss2info->refreshtime.'" URL='.$PHP_SELF.'?auto=1">';
}
?>
</head>
<body>
<?php
// display channel list
echo "<table border=\"0\" width=\"".$tss2info->tabellenbreite."\" cellpadding=\"0\" cellspacing=\"0\">\n";
echo "<tr>\n";
echo "<td>\n";
//-------------------------------------------------------------------------------------------------
//---> Refresh <---\\ Anfang
echo "<table border=\"0\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">\n";
echo "<tr>\n";
if ($auto==1) {
echo "";
} else {
echo "";
}
echo "</tr>\n";
echo "</table>\n";
//---> Refresh <---\\ Ende
//-------------------------------------------------------------------------------------------------
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td>\n";
//-------------------------------------------------------------------------------------------------
//---> TeamSpeak <---\\ Anfang
echo "<table border=\"0\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">\n";
echo "<tr>\n";
echo "<td width=\"33\"><img src=\"images/teamspeak.gif\" width=\"16\"height=\"16\" border=\"0\" alt=\"\"></td><td class=\"teamspeak\">Teamspeak 2 Server</td>\n";
echo "</tr>\n";
echo "</table>\n";
//---> TeamSpeak <---\\ Ende
$result = getSubChannel();
//-------------------------------------------------------------------------------------------------
//---> OFFLINE <---\\
if ($result != "") {
echo $result;
} else {
echo ("<tr>\n");
echo ("<td>\n");
echo (" <table border=\"0\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">\n");
echo (" <tr><td class=\"offline\" width=\"110\"align=\"center\" colspan=\"2\"><b>Offline</b></td></tr>\n");
echo ("</table>\n");
echo ("</td>\n");
echo ("</tr>\n");
}
//---> OFFLINE <---\\
//-------------------------------------------------------------------------------------------------
echo ("</table>\n");
?>
</body>
</html>
<?php
function getPlayer($chanelID, $channelID, $SubCounter) {
global $tss2info;
//$channelInfo = $tss2info->channelList[$chanelID];
$player = "";
foreach($tss2info->playerList as $playerInfo) {
if ($playerInfo[channelid] == $channelID) {
//-------------------------------------------------------------------------------------------------
$player .= ("<tr>\n");
$player .= ("<td>\n");
$player .= (" <table border=\"0\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">\n");
$width=32;
$gitter="";
for ($i=0;$i<=$SubCounter;$i++) {
$width+=16;
$gitter .= "<img src=\"images/gitter.gif\" width=\"16\"height=\"16\" border=\"0\" alt=\"\">";
}
//if ($channelInfo[parent]==-1) {
$player .= (" <tr><td width=\"$width\">$gitter<img src=\"images/gitter2.gif\" width=\"16\"height=\"16\" border=\"0\" alt=\"\"><img src=\"images/".$playerInfo[attribute]."\" width=\"16\"height=\"16\" border=\"0\" alt=\"Time [online: ".$playerInfo[totaltime]." | idle: ".$playerInfo[idletime]."] Ping:".$playerInfo[pingtime]."ms\"></td><td class=\"player\" title=\"Time [online: ".$playerInfo[totaltime]." | idle:".$playerInfo[idletime]."] Ping:".$playerInfo[pingtime]."ms\"> ".$playerInfo[playername]." ".$playerInfo[flags]."</td></tr>\n");
//} else {
// $player .= (" <tr><td width=\"64\"><img src=\"images/gitter.gif\" width=\"16\"height=\"16\" border=\"0\" alt=\"\"><img src=\"images/gitter.gif\" width=\"16\"height=\"16\" border=\"0\" alt=\"\"><img src=\"images/gitter2.gif\" width=\"16\"height=\"16\" border=\"0\" alt=\"\"><img src=\"images/".$playerInfo[attribute]."\" width=\"16\"height=\"16\" border=\"0\" alt=\"Time [online: ".$playerInfo[totaltime]." | idle: ".$playerInfo[idletime]."] Ping:".$playerInfo[pingtime]."ms\"></td><td class=\"player\" title=\"Time [online: ".$playerInfo[totaltime]." | idle:".$playerInfo[idletime]."] Ping:".$playerInfo[pingtime]."ms\"> ".$playerInfo[playername]." ".$playerInfo[flags]."</td></tr>\n");
//}
$player .= (" </table>\n");
$player .= ("</td>\n");
$player .= ("</tr>\n");
//---> Player <---\\ Ende
//-------------------------------------------------------------------------------------------------
}
}
return $player;
}
function getSubChannel($chanelID=-1,$SubCounter=0) {
global $tss2info;
$SubChannel = "";
if ($chanelID==-1) $SubCounter=0; else $SubCounter++;
foreach($tss2info->channelList as $channelInfo) {
$channelname = $channelInfo[channelname];
// determine codec (verbose)
$codec = $tss2info->getVerboseCodec($channelInfo[codec]);
if ($channelInfo[parent]==$chanelID) {
$SubChannel .= ("<tr>\n");
$SubChannel .= ("<td>\n");
//-------------------------------------------------------------------------------------------------
//---> Channel <---\\ Anfang
$SubChannel .= (" <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n");
$SubChannel .= (" <tr>\n");
$width=32;
$gitter="";
for ($i=1;$i<=$SubCounter;$i++) {
$width+=16;
$gitter .= "<img src=\"images/gitter.gif\" width=\"16\"height=\"16\" border=\"0\" alt=\"\">";
}
$SubChannel .= (" <td width=\"$width\">$gitter<img width=\"16\"height=\"16\" src=\"images/gitter2.gif\" border=\"0\" alt=\"\"><img src=\"images/channel.gif\" width=\"16\"height=\"16\" border=\"0\" alt=\"\"></td>");
$SubChannel .= (" <td class=\"channel\"> <a class=\"channellink\" href=\"teamspeak://".$tss2info->serverAddress.":".$tss2info->serverUDPPort."/?channel=".$channelname."?nickname=WebGuest?password=".$tss2info->serverPasswort."\" title=\"".$channelInfo[topic]."\">".$channelname."</a></td>\n");
if ($SubCounter==0) $SubChannel .= (" <td class=\"player\"> ".$channelInfo[attribute]."</td>\n");
$SubChannel .= (" </tr>\n");
$SubChannel .= (" </table>\n");
//---> Channel <---\\ Ende
//-------------------------------------------------------------------------------------------------
$SubChannel .= ("</td>\n");
$SubChannel .= ("</tr>\n");
if ($SubChannel!="") $SubChannel .= getSubChannel($channelInfo[channelid],$SubCounter); //Rekusiver Aufruf!!
$SubChannel .= getPlayer($channelInfo[channelid],$channelInfo[channelid],$SubCounter); //User einfügen
}
}
return $SubChannel;
}
echo ("<table>\n");
echo ("<tr>\n");
echo ("<td class=\"player\">\n");
echo ("</td>\n");
echo ("</tr>\n");
echo ("</table>\n");
?> |