Make your own free website on Tripod.com
g_AbsPath=$_D;} function _1(){unset($this->g_channels); unset($this->$_F); unset($this->$_10); $this->g_sitetitle="";$this->g_sitelink=""; $this->g_tabellenbreite=400; $this->g_Default=0;} function set_Viewer($_11="", $_12="", $_13=400, $_14=0){$this->g_sitetitle=$this->_9($_11,false); $this->g_sitelink=$_12; $this->g_tabellenbreite=$_13; $this->g_Default= $_14;} function set_Channels($_15=""){if ($_15 != "")$this->g_channels=explode (":", $_15); else unset($this->g_channels);} function show_ts_viewer($_16, $_17=8767, $_18=51234, $_19=""){$this->g_serverAddress=$_16; $this->g_serverQueryPort=$_18; $this->g_serverUDPPort=$_17; $this->g_serverPasswort=$_19; $this->_8(); $this->g_userName="Guest"; echo "g_tabellenbreite."\" cellpadding=\"0\" cellspacing=\"0\" class=\"tsviewer\">\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n");echo ("\n"); echo ("\n");} echo ("\n"); echo ("\n"); echo ("\n"); echo ("
\n"; echo "
\n"; echo "g_tabellenbreite."\" cellpadding=\"0\" cellspacing=\"0\" class=\"tsviewer\">\n"; echo "\n"; if ($this->g_sitelink=="" || $this->g_sitelink=="http://") $_1A=" ".$this->g_sitetitle.""; else $_1A="g_sitelink."\" target=\"_blank\" class=\"tsviewer\"> ".$this->g_sitetitle.""; if ($this->g_sitelink=="") $this->g_sitelink="TeamSpeak"; echo "\n"; echo "\n"; echo "
g_AbsPath."TeamSpeak/teamspeak.gif\" width=\"16\"height=\"16\" border=\"0\" alt=\"\">$_1A
\n"; $_1B=""; $_1C=count($this->g_channels); if ($_1C==0) {$_1B=@$this->_13();} else {for ($_1D=0;$_1Dg_channels);$_1D++) $_1B .= @$this->_14($this->g_channels[$_1D]);} if ($_1B != "") {echo $_1B;} else {echo ("
\n"); echo ("g_tabellenbreite."\" cellpadding=\"0\" cellspacing=\"0\" class=\"tsviewer\">\n"); echo ("\n"); echo ("
Offline
\n"); echo ("
\n
\n"); echo ("  Designed & created by Mike © 2004"); echo ("
\n");} function _5($_1E){$this->g_AbsPath=$_1E;} function _6($_1F) {if(strpos($_1F, '"')==0) $_1F=substr($_1F, 1, strlen($_1F) - 1); if(strrpos($_1F, '"')==strlen($_1F) - 1) $_1F=substr($_1F, 0, strlen($_1F) - 1); return $_1F;} function _7($_20) {if($_20==0) {$_20="CELP 5.1 Kbit"; } elseif($_20==1) {$_20="CELP 6.3 Kbit"; } elseif($_20==2) {$_20="GSM 14.8 Kbit";} elseif($_20==3) {$_20="GSM 16.4 Kbit";} elseif($_20==4) {$_20="CELP Windows 5.2 Kbit";} elseif($_20==5) {$_20="Speex 3.4 Kbit";} elseif($_20==6) {$_20="Speex 5.2 Kbit";} elseif($_20==7) {$_20="Speex 7.2 Kbit";} elseif($_20==8) {$_20="Speex 9.3 Kbit";} elseif($_20==9) {$_20="Speex 12.3 Kbit";} elseif($_20==10) {$_20="Speex 16.3 Kbit";} elseif($_20==11) {$_20="Speex 19.5 Kbit";} elseif($_20==12) {$_20="Speex 25.9 Kbit";} else {$_20="unknown (".$_20.")";} return $_20;} function _8() {$this->g_playerList=$this->_C($this->g_serverAddress, $this->g_serverQueryPort, $this->g_serverUDPPort);$this->g_channelList=$this->_A($this->g_serverAddress, $this->g_serverQueryPort, $this->g_serverUDPPort);} function _9($_21,$_22=true) {$_21=str_replace('\"','"',$_21);$_21=str_replace("\'","'",$_21); if ($_22) {if (substr($_21,0,1)=='"') $_21=substr($_21,1);if (substr($_21,-1)=='"') $_21=substr($_21,0,-1);} $_21=htmlentities("$_21"); return $_21;} function _A($_23, $_24, $_25) {$_10=array(); $_26="cl $_25\nquit\n"; $_27=@fsockopen ("$_23", $_24, &$_28, &$_29, 1); if (!$_27) {} else {$_2A=fputs($_27,$_26, strlen($_26)); if (!$_2A) {echo "Cannot read Data!
";} else {while($_2B=fgets($_27, 4096)) {$_2B=explode(" ", $_2B); $_2C=trim($_2B[0]); $_2D=trim($_2B[1]); $_2E=trim($_2B[2]); $_2F=trim($_2B[3]); $_30=trim($_2B[4]); $_31=trim("$_2B[5]"); $_31=$this->_9($_31); $_32=trim($_2B[6]); $_33=trim($_2B[7]); $_34=trim("$_2B[8]"); $_34=$this->_9($_34); $_35=$_2C; if ($_35 > 0) {$_10[$_35]=array("channelid" => $_35,"codec" => $_2D,"parent" => $_2E,"order" => $_2F,"maxplayers" => $_30,"channelname" => $_31,"attribute" => $this->_F($_32),"isdefault" => 0,"topic" => $_34);}}} fclose($_27);} usort($_10, array ($this, _B)); return $_10;} function _B ($_36, $_37) {if ($_36["order"]==$_37["order"]) {return (strcasecmp($_36["channelname"], $_37["channelname"]));}return ($_36["order"] < $_37["order"]) ? -1 : 1;} function _C($_23, $_24, $_25) {$_F=array(); $_26="pl $_25\nquit\n"; $_27=@fsockopen ("$_23", $_24, &$_28, &$_29, 1); if (!$_27) {} else {fputs($_27,$_26, strlen($_26)); while($_38=fgets($_27, 4096)) {$_38=explode(" ", $_38); $_39=trim($_38[0]); $_3A=trim($_38[1]); $_3B=trim($_38[2]); $_3C=trim($_38[3]); $_3D=trim($_38[4]); $_3E=trim($_38[5]); $_3F=trim($_38[6]); $_40=trim($_38[7]); $_41=trim($_38[8]); $_42=trim($_38[9]); $_43=trim($_38[10]); $_44=trim($_38[11]); $_45=trim($_38[12]); $_46=trim($_38[13]); $_47=trim("$_38[14]"); $_47=$this->_9($_47); $_48=trim("$_38[15]"); $_48=$this->_9($_48); $_49=$_39; $_F[$_49]=array("playerid" => $_49,"channelid" => $_3A,"receivedpackets" => $_3D,"receivedbytes" => $_3E,"sentpackets" => $_3B,"sentbytes" => $_3C,"paketlost" => $_3F / 100,"pingtime" => $_40,"totaltime" => $this->_11($_41),"idletime" => $this->_11($_42),"privileg" => $_43,"userstatus" => $_44,"attribute" => $this->_10($_45),"attribute_2" => $_45,"flags" => $this->_E($_44,$_43),"s" => $_46,"playername" => $_47);} fclose($_27);} usort($_F, array ($this, _D)); return $_F;} function _D ($_36, $_37) {return (strcasecmp(str_replace(htmlentities(" "),"",$_36["playername"]), str_replace(htmlentities(" "),"",$_37["playername"])));} function _E($_4A,$_4B) {if ($_4A=='13') {$_4C="(R SA";} else if ($_4A=='5') {$_4C="(R SA";} else if ($_4A=='4') {$_4C="(R";} else if ($_4A < '4') {$_4C="(U";} if ($_4B=='1') {$_4D=" CA)";} else {$_4D=")";} return $_4C.$_4D;} function _F($_4E) {if ($_4E=='30') {$_4F="(RMPSD)";} else if ($_4E=='28') {$_4F="(RPSD)";} else if ($_4E=='26') {$_4F="(RMSD)";} else if ($_4E=='24') {$_4F="(RSD)";} else if ($_4E=='22') {$_4F="(RMPD)";} else if ($_4E=='20') {$_4F="(RPD)";} else if ($_4E=='18') {$_4F="(RMD)";} else if ($_4E=='16') {$_4F="(RD)";} else if ($_4E=='15') {$_4F="(UMPS)";} else if ($_4E=='14') {$_4F="(RMPS)";} else if ($_4E=='13') {$_4F="(UPS)";} else if ($_4E=='12') {$_4F="(RPS)";} else if ($_50[9]=='11') {$_4F="(UMS)";} else if ($_4E=='10') {$_4F="(RMS)";} else if ($_4E=='9') {$_4F="(US)";} else if ($_4E=='8') {$_4F="(RS)";} else if ($_4E=='7') {$_4F="(UMP)";} else if ($_4E=='6') {$_4F="(RMP)";} else if ($_4E=='5') {$_4F="(UP)";} else if ($_4E=='4') {$_4F="(RP)";} else if ($_4E=='3') {$_4F="(UM)";} else if ($_4E=='2') {$_4F="(RM)";} else if ($_4E=='1') {$_4F="(U)";} else if ($_4E=='0') {$_4F="(R)";} else {$_4F="";} return $_4F;} function _10($_51) {$_52="player.gif"; if ($_51=="0") $_52="player.gif"; if (($_51=="8") or ($_51=="9") or ($_51=="12") or ($_51=="13") or ($_51=="24") or ($_51=="25") or ($_51=="28") or ($_51=="29") or ($_51=="40") or ($_51=="41") or ($_51=="44") or ($_51=="45") or ($_51=="56") or ($_51=="57")) $_52="away.gif"; if (($_51=="16") or ($_51=="17") or ($_51=="20") or ($_51=="21")) $_52="mutemicro.gif"; if (($_51=="32") or ($_51=="33") or ($_51=="36") or ($_51=="37") or ($_51=="48") or ($_51=="49") or ($_51=="52") or ($_51=="53")) $_52="mutespeakers.gif"; if ($_51 >= "64") $_52="record.gif"; if ($_51=="4") $_52="player.gif"; if (($_51=="1") or ($_51=="5")) $_52="channelcommander.gif"; return $_52;} function _11($_53) {$_54="0 seconds"; if ($_53 < 60 ) {$_54=strftime("%S seconds", $_53);} else {if ($_53 >= 3600 ) {$_54=strftime("%H:%M:%S hours", $_53 - 3600);} else {$_54=strftime("%M:%S minutes", $_53);}} return htmlentities("$_54");} function _12($_55, $_56, $_57) {$_58=""; foreach($this->g_playerList as $_59) {if ($_59[channelid]==$_56) {$_58 .= ("\n"); $_58 .= ("\n"); $_58 .= (" \n"); $_5A=32; $_5B=""; for ($_1D=0;$_1D<=$_57;$_1D++) {$_5A+=16; $_5B .= "g_AbsPath."TeamSpeak/gitter.gif\" width=\"16\"height=\"16\" border=\"0\" alt=\"\">";} $_58 .= (" \n"); $_58 .= ("
$_5Bg_AbsPath."TeamSpeak/gitter2.gif\" width=\"16\"height=\"16\" border=\"0\" alt=\"\">g_AbsPath."TeamSpeak/".$_59[attribute]."\" width=\"16\"height=\"16\" border=\"0\" alt=\"Time [online: ".$_59[totaltime]." | idle: ".$_59[idletime]."] Ping:".$_59[pingtime]."ms\"> ".$_59[playername]." ".$_59[flags]."
\n"); $_58 .= ("\n"); $_58 .= ("\n");}} return $_58;} function _13($_55=-1,$_57=0) {$_5C=""; if ($_55==-1) $_57=0; else $_57++; foreach($this->g_channelList as $_5D) {$_5E=$_5D[channelname]; $_20=$this->_7($_5D[codec]); if ($_5D[parent]==$_55) {$_5C .= ("\n"); $_5C .= ("\n"); $_5C .= (" \n"); $_5C .= (" \n"); $_5A=32; $_5B=""; for ($_1D=1;$_1D<=$_57;$_1D++) {$_5A+=16; $_5B .= "g_AbsPath."TeamSpeak/gitter.gif\" width=\"16\"height=\"16\" border=\"0\" alt=\"\">";} $_5C .= (" "); if ($this->g_Default==0 || strpos($_5D[attribute],"D") > 0) {$_5C .= ("\n");} else {$_5C .= ("\n");} if ($_57==0) $_5C .= ("\n"); $_5C .= (" \n"); $_5C .= ("
$_5Bg_AbsPath."TeamSpeak/gitter2.gif\" border=\"0\" alt=\"\">g_AbsPath."TeamSpeak/channel.gif\" width=\"16\"height=\"16\" border=\"0\" alt=\"\"> g_serverAddress.":".$this->g_serverUDPPort."/?channel=".$_5E."?password=".$this->g_serverPasswort."\" title=\"".$_5D[topic]."\" class=\"tsviewer\">".$_5E." ".$_5E." ".$_5D[attribute]."
\n"); $_5C .= ("\n"); $_5C .= ("\n"); if ($_5C!="") $_5C .= $this->_13($_5D[channelid],$_57); $_5C .= $this->_12($_5D[channelid],$_5D[channelid],$_57);}} return $_5C;} function _14($_5F,$_55=-1,$_57=0) {$_5C=""; if ($_55==-1) $_57=0; else $_57++; foreach($this->g_channelList as $_5D) {$_5E=$_5D[channelname]; $_20=$this->_7($_5D[codec]); if (($_5D[parent]==$_55) && ($_5F==$_5D[parent] || $_5F==$_5D[channelid])) {$_5C .= ("\n"); $_5C .= ("\n"); $_5C .= (" \n"); $_5C .= ("\n"); $_5A=32; $_5B=""; for ($_1D=1;$_1D<=$_57;$_1D++) {$_5A+=16; $_5B .= "g_AbsPath."TeamSpeak/gitter.gif\" width=\"16\"height=\"16\" border=\"0\" alt=\"\">";} $_5C .= (""); if ($this->g_Default==0 || strpos($_5D[attribute],"D") > 0) {$_5C .= (" \n");} else {$_5C .= (" \n");} if ($_57==0) $_5C .= ("\n"); $_5C .= ("\n"); $_5C .= ("
$_5Bg_AbsPath."TeamSpeak/gitter2.gif\" border=\"0\" alt=\"\">g_AbsPath."TeamSpeak/channel.gif\" width=\"16\"height=\"16\" border=\"0\" alt=\"\"> g_serverAddress.":".$this->g_serverUDPPort."/?channel=".$_5E."?password=".$this->g_serverPasswort."\" title=\"".$_5D[topic]."\" class=\"tsviewer\">".$_5E." ".$_5E." ".$_5D[attribute]."
\n"); $_5C .= ("\n"); $_5C .= ("\n"); if ($_5C!="") $_5C .= $this->_14($_5F,$_5D[channelid],$_57); $_5C .= $this->_12($_5D[channelid],$_5D[channelid],$_57);}}return $_5C;}} ?>