283 if ($this->currObj instanceof
Server) {
284 return "ID: " . $this->currObj->getId() .
" | Clients: " . $this->currObj->clientCount() .
"/" . $this->currObj[
"virtualserver_maxclients"] .
" | Uptime: " . Convert::seconds($this->currObj[
"virtualserver_uptime"]);
285 } elseif ($this->currObj instanceof
Channel && !$this->currObj->
isSpacer()) {
286 return "ID: " . $this->currObj->getId() .
" | Codec: " . Convert::codec($this->currObj[
"channel_codec"]) .
" | Quality: " . $this->currObj[
"channel_codec_quality"];
287 } elseif ($this->currObj instanceof
Client) {
288 return "ID: " . $this->currObj->getId() .
" | Version: " . Convert::versionShort($this->currObj[
"client_version"]) .
" | Platform: " . $this->currObj[
"client_platform"];
290 return "ID: " . $this->currObj->getId() .
" | Type: " . Convert::groupType($this->currObj[
"type"]) .
" (" . ($this->currObj[
"savedb"] ?
"Permanent" :
"Temporary") .
")";
323 $string = $this->currObj[
"channel_name"]->section(
"]", 1, 99);
326 $string->resize(30, $string);
329 return htmlspecialchars($string);
332 if ($this->currObj instanceof
Client) {
336 if (!$this->currObj->client_is_recording) {
337 foreach ($this->currObj->memberOf() as $group) {
339 $before[] =
"[" . htmlspecialchars($group[
"name"]) .
"]";
341 $behind[] =
"[" . htmlspecialchars($group[
"name"]) .
"]";
346 $behind[] =
"*** [RECORDING]";
349 return implode(
"", $before) .
" " . htmlspecialchars($this->currObj) .
" " . implode(
"", $behind);
352 return htmlspecialchars($this->currObj);
400 if ($this->currObj[
"virtualserver_icon_id"]) {
401 if (!$this->currObj->iconIsLocal(
"virtualserver_icon_id") && $this->ftclient) {
402 if (!isset($this->cacheIcon[$this->currObj[
"virtualserver_icon_id"]])) {
403 $download = $this->currObj->transferInitDownload(rand(0x0000, 0xFFFF), 0, $this->currObj->iconGetName(
"virtualserver_icon_id"));
405 if ($this->ftclient ==
"data:image") {
406 $download =
TeamSpeak3::factory(
"filetransfer://" . (str_contains($download[
"host"],
":") ?
"[" . $download[
"host"] .
"]" : $download[
"host"]) .
":" . $download[
"port"])->download($download[
"ftkey"], $download[
"size"]);
409 $this->cacheIcon[$this->currObj[
"virtualserver_icon_id"]] = $download;
411 $download = $this->cacheIcon[$this->currObj[
"virtualserver_icon_id"]];
414 if ($this->ftclient ==
"data:image") {
415 $html .= $this->
getImage(
"data:" . Convert::imageMimeType($download) .
";base64," . base64_encode($download),
"Server Icon",
null,
false);
417 $html .= $this->
getImage($this->ftclient .
"?ftdata=" . base64_encode(serialize($download)),
"Server Icon",
null,
false);
419 } elseif (in_array($this->currObj[
"virtualserver_icon_id"], $this->cachedIcons)) {
420 $html .= $this->
getImage(
"group_icon_" . $this->currObj[
"virtualserver_icon_id"] .
".png",
"Server Icon");
444 if ($this->currObj[
"channel_flag_default"]) {
445 $html .= $this->
getImage(
"channel_flag_default.png",
"Default Channel");
448 if ($this->currObj[
"channel_flag_password"]) {
449 $html .= $this->
getImage(
"channel_flag_password.png",
"Password-protected");
453 $html .= $this->
getImage(
"channel_flag_music.png",
"Music Codec");
456 if ($this->currObj[
"channel_needed_talk_power"]) {
457 $html .= $this->
getImage(
"channel_flag_moderated.png",
"Moderated");
460 if ($this->currObj[
"channel_icon_id"]) {
461 if (!$this->currObj->iconIsLocal(
"channel_icon_id") && $this->ftclient) {
462 if (!isset($this->cacheIcon[$this->currObj[
"channel_icon_id"]])) {
463 $download = $this->currObj->getParent()->transferInitDownload(rand(0x0000, 0xFFFF), 0, $this->currObj->iconGetName(
"channel_icon_id"));
465 if ($this->ftclient ==
"data:image") {
466 $download =
TeamSpeak3::factory(
"filetransfer://" . (str_contains($download[
"host"],
":") ?
"[" . $download[
"host"] .
"]" : $download[
"host"]) .
":" . $download[
"port"])->download($download[
"ftkey"], $download[
"size"]);
469 $this->cacheIcon[$this->currObj[
"channel_icon_id"]] = $download;
471 $download = $this->cacheIcon[$this->currObj[
"channel_icon_id"]];
474 if ($this->ftclient ==
"data:image") {
475 $html .= $this->
getImage(
"data:" . Convert::imageMimeType($download) .
";base64," . base64_encode($download),
"Channel Icon",
null,
false);
477 $html .= $this->
getImage($this->ftclient .
"?ftdata=" . base64_encode(serialize($download)),
"Channel Icon",
null,
false);
479 } elseif (in_array($this->currObj[
"channel_icon_id"], $this->cachedIcons)) {
480 $html .= $this->
getImage(
"group_icon_" . $this->currObj[
"channel_icon_id"] .
".png",
"Channel Icon");
500 if ($this->currObj[
"client_is_priority_speaker"]) {
501 $html .= $this->
getImage(
"client_priority.png",
"Priority Speaker");
504 if ($this->currObj[
"client_is_channel_commander"]) {
505 $html .= $this->
getImage(
"client_cc.png",
"Channel Commander");
508 if ($this->currObj[
"client_is_talker"]) {
509 $html .= $this->
getImage(
"client_talker.png",
"Talk Power granted");
510 } elseif ($cntp = $this->currObj->getParent()->channelGetById($this->currObj[
"cid"])->channel_needed_talk_power) {
511 if ($cntp > $this->currObj[
"client_talk_power"]) {
512 $html .= $this->
getImage(
"client_mic_muted.png",
"Insufficient Talk Power");
516 foreach ($this->currObj->memberOf() as $group) {
517 if (!$group[
"iconid"]) {
521 $type = ($group instanceof
ServerGroup) ?
"Server Group" :
"Channel Group";
523 if (!$group->iconIsLocal(
"iconid") && $this->ftclient) {
524 if (!isset($this->cacheIcon[$group[
"iconid"]])) {
525 $download = $group->getParent()->transferInitDownload(rand(0x0000, 0xFFFF), 0, $group->iconGetName(
"iconid"));
527 if ($this->ftclient ==
"data:image") {
528 $download =
TeamSpeak3::factory(
"filetransfer://" . (str_contains($download[
"host"],
":") ?
"[" . $download[
"host"] .
"]" : $download[
"host"]) .
":" . $download[
"port"])->download($download[
"ftkey"], $download[
"size"]);
531 $this->cacheIcon[$group[
"iconid"]] = $download;
533 $download = $this->cacheIcon[$group[
"iconid"]];
536 if ($this->ftclient ==
"data:image") {
537 $html .= $this->
getImage(
"data:" . Convert::imageMimeType($download) .
";base64," . base64_encode($download), $group .
" [" . $type .
"]",
null,
false);
539 $html .= $this->
getImage($this->ftclient .
"?ftdata=" . base64_encode(serialize($download)), $group .
" [" . $type .
"]",
null,
false);
541 } elseif (in_array($group[
"iconid"], $this->cachedIcons)) {
542 $html .= $this->
getImage(
"group_icon_" . $group[
"iconid"] .
".png", $group .
" [" . $type .
"]");
546 if ($this->currObj[
"client_icon_id"]) {
547 if (!$this->currObj->iconIsLocal(
"client_icon_id") && $this->ftclient) {
548 if (!isset($this->cacheIcon[$this->currObj[
"client_icon_id"]])) {
549 $download = $this->currObj->getParent()->transferInitDownload(rand(0x0000, 0xFFFF), 0, $this->currObj->iconGetName(
"client_icon_id"));
551 if ($this->ftclient ==
"data:image") {
552 $download =
TeamSpeak3::factory(
"filetransfer://" . (str_contains($download[
"host"],
":") ?
"[" . $download[
"host"] .
"]" : $download[
"host"]) .
":" . $download[
"port"])->download($download[
"ftkey"], $download[
"size"]);
555 $this->cacheIcon[$this->currObj[
"client_icon_id"]] = $download;
557 $download = $this->cacheIcon[$this->currObj[
"client_icon_id"]];
560 if ($this->ftclient ==
"data:image") {
561 $html .= $this->
getImage(
"data:" . Convert::imageMimeType($download) .
";base64," . base64_encode($download),
"Client Icon",
null,
false);
563 $html .= $this->
getImage($this->ftclient .
"?ftdata=" . base64_encode(serialize($download)),
"Client Icon",
null,
false);
565 } elseif (in_array($this->currObj[
"client_icon_id"], $this->cachedIcons)) {
566 $html .= $this->
getImage(
"group_icon_" . $this->currObj[
"client_icon_id"] .
".png",
"Client Icon");