Hallo liebe Towner
Folgendes Problem.
Ich habe ein Radio im Client (in der Clientleiste) das Streamen etc. funktioniert ohne Probleme.
Allerdings hätte ich es gerne, dass sobald man den Client öffnet sich das Radio automatisch startet. (Autoplay-Funktion)
Momentan muss man es noch manuell einschalten indem man den Play-Button auf dem Radio klickt.
Könnte mir da wer helfen und sagen, wie ich diesen Code hier verändern muss, damit mein Clientradio sich automatisch startet sobald man den Client betritt?
Hier ist der ganze Code der Hotel.php Datei in der auch das Radioscript drin ist:
PHP
<?php
$sso_sql = $mysqli->query("SELECT * FROM users WHERE id = '" . $user->id . "' ");
$sso = $sso_sql->fetch_object();
$ssl = protect($_GET['ssl']);
if ($ssl == '0') {
$client->adresse = $client->adressenossl;
}
?>
<?php if ($_GET['swf'] == '0') { ?>
<?php } else { ?>
var habboReqPath = "";
var zindex = '9999999';
$(document).ready(function(e){
startWebsockets();
updateBar('auto');
setInterval(function() {
updateBar('auto');
}, 10000);
// loadWaitScreen();
loadClientbar();
loadClient();
loadOtherfunctions();
<?php if ($user->rank > 4) { ?>
openWindow("Modlog", "375", "210");
<?php }elseif(GetXlerInfo($user->id, 'userlog') == '1'){ ?>
openWindow("Userlog", "375", "210");
<?php } ?>
});
function loadOtherfunctions()
{
// $("#client-ui").append("<div id='WindowsFensters'></div>");
}
function loadWaitScreen()
{
$("#client-ui").append("<div id='login'></div>");
$("#login").load("<?php echo $path; ?>/public/loader/client/login.php?");
}
function loadClientbar()
{
$("#client-ui").append("<div id='bar'></div>");
$("#bar").append("<counter class='tab' onclick='updateBar()'></counter>");
$("#bar").append("<div class='add'></div>");
$("#bar").append("<div class='tab more' onClick='Naviaction()'></div>");
$("#client-ui").append("<div id='navi' class='navi'></div>");
<?php if ($user->dj > 0) { ?>
$(".navi").append("<div class='liste DJ' onclick='openWindow(\"DJPanel\", \"350\", \"260\")'>DJPanel</div>");
<?php } ?>
<?php if ($user->rank == '7' || GetXlerInfo($user->id, 'userlog') == '1'){ ?>
$(".navi").append("<div class='liste MOD' onclick='openWindow(\"Userlog\", \"375\", \"210\")'>Userlog</div>");
<?php } ?>
<?php if ($user->rank > 4) { ?>
$(".navi").append("<div class='liste MOD' onclick='openWindow(\"Modlog\", \"375\", \"210\")'>Modlog</div>");
$(".navi").append("<div class='liste MOD' onclick='openWindow(\"Staffpanel\", \"400\", \"300\")'>Staffpanel</div>");
<?php } ?>
<?php if ($user->username == 'Revue') { ?>
$(".navi").append("<div class='liste' onclick='openKamera()'>Kamera Test</div>");
<?php } ?>
$(".navi").append("<div class='liste vollbild' onclick='vollbild()'>Vollbild</div>");
$(".navi").append("<div class='liste logout bottom'>Abmelden</div>");
}
function loadClient()
{
FlashExternalInterface.loginLogEnabled = true;
FlashExternalInterface.logLoginStep("web.view.start");
if (top == self) {
FlashHabboClient.cacheCheck();
}
var flashvars = {
"client.notify.cross.domain" : "0",
"connection.info.host" : "<?php echo $client->domain; ?>",
"connection.info.port" : "<?php echo $client->port; ?>",
"site.url" : "<?php echo $path; ?>",
"url.prefix" : "<?php echo $path; ?>",
"client.reload.url" : "<?php echo $path; ?>/client",
"client.fatal.error.url" : "<?php echo $path; ?>/hotel!error",
"client.connection.failed.url" : "<?php echo $path; ?>/hotel/error",
"external.variables.txt" : "<?php echo $client->adresse; ?>/external_variables.php?<?php echo $wert; ?><?php if ($ssl == '0') { ?>&ssl=0<?php } ?>",
"external.texts.txt" : "<?php echo $client->adresse; ?>/external_flash_texts.php?<?php echo $wert; ?>",
"productdata.load.url" : "<?php echo $client->adresse; ?>/productdata.txt?<?php echo $wert; ?>",
"furnidata.load.url" : "<?php echo $client->adresse; ?>/furnidata.txt?<?php echo $wert; ?>",
"use.sso.ticket" : "1",
"sso.ticket" : "<?php echo $sso->auth_ticket; ?>",
"processlog.enabled" : "1",
"account_id" : "1",
"client.starting" : "Bitte warten! Habbo.ME wird geladen.",
"flash.client.url" : "<?php echo $client->adresse; ?>/",
"user.hash" : "31385693ae558a03d28fc720be6b41cb1ccfec02",
"has.identity" : "1",
"flash.client.origin" : "popup",
"hotelview.banner.url" : "<?php echo $client->adresse; ?>/banner.png"
};
var params = {
"base" : "<?php echo $client->adresse; ?>/",
"allowScriptAccess" : "always",
"menu" : "false",
"wmode" : "opaque"
};
FlashExternalInterface.signoutUrl = "<?php echo $path; ?>/logout";
var clientUrl = "<?php echo $client->adresse; ?>/Habbo.swf?<?php echo $wert; ?>";
swfobject.embedSWF(clientUrl, "flash-container", "100%", "100%", "10.1.0", "https://images.playboon.org/web-gallery/flash/expressInstall.swf", flashvars, params, null, FlashExternalInterface.embedSwfCallback);
window.onbeforeunload = unloading;
function unloading() {
var clientObject;
if(navigator.appName.indexOf("Microsoft") != -1){
clientObject = window["flash-container"];
} else {
clientObject = document["flash-container"];
}
try {
clientObject.unloading();
} catch (e) {}
}
FlashExternalInterface.logLoginStep = function(k, l) {
if(k == "client.init.auth.ok"){
$("#login").fadeOut().remove();
}
}
}
function htmlEntities(str) {
return String(str).replace(/&/g, '&').replace(/"/g, '"').replace('Ö', 'Ö').replace('Ü', 'Ü').replace('Ä', 'Ä').replace('ö', 'ö').replace('ü', 'ü').replace('ä', 'ä').replace('ß', 'ß').replace(' ', ' ');
}
function startWebsockets()
{
<?php if ($ssl == '1') {
?>
window.ws = new ReconnectingWebSocket('wss://<?php echo $client->ws; ?>/');
ws.reconnectInterval = 15000;
<?php } else { ?>
window.ws = new ReconnectingWebSocket('ws://<?php echo $client->ws; ?>/');
<?php } ?>
ws.onopen = function(event) {
console.log('Websocket Leitnug offen');
ws.send("1|<?php echo $sso->auth_ticket; ?>");
console.log('SSO An Websockets geschickt');
};
ws.onclose = function(event) {
console.log('Websocket CLOSED: ', event);
};
ws.onmessage = function(event) {
msg = event.data;
console.log('Socket: ' + msg);
var text = msg.split('|');
switch(text[0])
{
case '2':
var autor = text[1];
var text = text[2];
var fid = Math.floor((Math.random() * 155) + 1);
var leftpos = ($(window).width()/2)-150;
var toppos = ($(window).height()/2)-200;
$("#client-ui").append("<div id='Fenster-Alert-" + fid + "' class='alert' onClick='makezindex(\"Alert-" + fid + "\")' style='position: absolute;width: 300px;min-height: 100px;top: " + toppos +"px;left: " + leftpos + "px;'></div>");
$("#Fenster-Alert-" + fid).html('<div class="head"><div class="close" onclick="$(\'#Fenster-Alert-' + fid + '\').remove()"></div>Hotelalert</div><div style="color: #000;padding: 10px;font-size: 14px;font-family: Ubuntu;font-weight: lighter;"><img src="<?php echo $path; ?>/public/images/client/cha/icon.gif" align="left" style="margin-right: 10px;">' + htmlEntities(text) + '</div>').draggable({ containment: '#client-ui' });
break;
case '3':
var gemeldet = text[1];
var melder = text[2];
var fid = Math.floor((Math.random() * 155) + 1);
var leftpos = ($(window).width()/2)-150;
var toppos = ($(window).height()/2)-200;
$("#client-ui").append("<div id='Fenster-Alert-" + fid + "' class='alert' onClick='makezindex(\"Alert-" + fid + "\")' style='position: absolute;width: 300px;min-height: 100px;top: " + toppos +"px;left: " + leftpos + "px;'></div>");
$("#Fenster-Alert-" + fid).html('<div class="head"><div class="close" onclick="$(\'#Fenster-Alert-' + fid + '\').remove()"></div>Staffalert</div><div style="color: #000;padding: 10px;font-size: 14px;font-family: Ubuntu;font-weight: lighter;"><img src="<?php echo $path; ?>/public/images/client/cha/icon.gif" align="left" style="margin-right: 10px;"><b>' + htmlEntities(gemeldet) + '</b> wurde von <b>' + htmlEntities(melder) + '</b> gemeldet. Bitte pr�fe diese Angelegenheit.</div>').draggable({ containment: '#client-ui' });
break;
case '4':
openWindow("Bank", "450", "255");
break;
case '5':
var name = text[1];
var leiter = text[2];
var id = text[3];
var fid = Math.floor((Math.random() * 155) + 1);
var leftpos = ($(window).width()/2)-150;
var toppos = ($(window).height()/2)-200;
// $("#client-ui").append("<div id='Fenster-Alert-" + fid + "' class='alert' onClick='makezindex(\"Alert-" + fid + "\")' style='position: absolute;width: 330px;min-height: 180px;top: " + toppos +"px;left: " + leftpos + "px;'></div>");
// $("#Fenster-Alert-" + fid).html('<div class="head"><div class="close" onclick="$(\'#Fenster-Alert-' + fid + '\').remove()"></div>Eventstart</div><div style="color: #000;padding: 10px;font-size: 14px;font-family: Ubuntu;font-weight: lighter;"><img src="<?php echo $path; ?>/public/images/client/alert.gif" align="right">Es Startet nun das Event<br><b>' + htmlEntities(name) + '</b><br>im Raum von ' + leiter + '<div class="input" onClick="goRoomEvent(\'' + id + '\', \'' + fid + '\')" style="margin-top: 20px;text-align: center;width: 180px;padding: 2px 0px 3px 0px;border: 2px solid black;float: left;border-radius: 4px;font-family: Ubuntu;font-weight: bold;font-size: 14px;color: black;cursor: pointer;background: #FFFFFF;background: -moz-linear-gradient(#FFFFFF 50%, #CCCCCC 100%);background: -webkit-gradient(linear, left top, left bottom, color-stop(50%,#FFFFFF), color-stop(100%,#CCCCCC));background: -webkit-linear-gradient(#FFFFFF 50%, #CCCCCC 100%);background: -o-linear-gradient(#FFFFFF 50%, #CCCCCC 100%);background: -ms-linear-gradient(#FFFFFF 50%, #CCCCCC 100%);background: linear-gradient(to bottom, #FFFFFF 0%,#FFFFFF 50%,#CCCCCC 51%,#CCCCCC 100%);box-shadow: inset 0px 0px 0px 0.7px #FFFFFF;box-shadow: 0px 1px 0px 0px black;">Eventraum betreten</div></div>').draggable({ containment: '#client-ui' });
$("#client-ui").append("<div id='Fenster-Alert-" + fid + "' class='eventalert' onClick='makezindex(\"Alert-" + fid + "\")' style='position: absolute;top: " + toppos +"px;left: " + leftpos + "px;'></div>");
$("#Fenster-Alert-" + fid).html('<div class="head"><div class="close" onclick="$(\'#Fenster-Alert-' + fid + '\').remove()"></div>Event Alert</div><div class="inner">Es findet nun das Event <b>' + htmlEntities(name) + '</b> im Raum von <b>' + leiter + '</b> statt!</div><div class="goroom" onClick="goRoomEvent(\'' + id + '\', \'' + fid + '\')">Eventraum betreten</div><img src="<?php echo $path; ?>/public/images/frank/5.png" style="margin-top: -22px;"><div style="display: none;"><audio controls autoplay><source src="<?php echo $path; ?>/public/sounds/eventstart.mp3" type="audio/mpeg"></audio></div>').draggable({ containment: '#client-ui' });
break;
case '7':
var itemid = text[1];
var hoehe = text[2];
openStapelFelder(itemid, hoehe);
break;
case '8':
openYTPlayer();
break;
case '9':
var itemid = text[1];
var handitem = text[2];
if($("#Fenster-Wireduserhashanditem").size())
{
$("#Fenster-Wireduserhashanditem").remove();
} else {
var left = (($(window).width()/2)-(350/2));
var top = (($(window).height()/2)-(250/2));
$("#client-ui").append("<div id='Fenster-Wireduserhashanditem' class='alert' onClick='makezindex(\"Wireduserhashanditem\")' style='left: " + left + "px;top: " + top + "px;width: 350px;height: 280px;'></div>");
$("#Fenster-Wireduserhashanditem").load("<?php echo $path; ?>/public/loader/client/loadPage.php?page=Wireduserhashanditem&itemid=" + itemid + "&handitem=" + handitem).draggable({ containment: '#client-ui' });
}
break;
case '11':
var itemid = text[1];
var team = text[2];
if($("#Fenster-Wiredteammitglied").size())
{
$("#Fenster-Wiredteammitglied").remove();
} else {
var left = (($(window).width()/2)-(350/2));
var top = (($(window).height()/2)-(250/2));
$("#client-ui").append("<div id='Fenster-Wiredteammitglied' class='alert' onClick='makezindex(\"Wiredteammitglied\")' style='left: " + left + "px;top: " + top + "px;width: 350px;height: 245px;'></div>");
$("#Fenster-Wiredteammitglied").load("<?php echo $path; ?>/public/loader/client/loadPage.php?page=Wiredteammitglied&itemid=" + itemid + "&team=" + team).draggable({ containment: '#client-ui' });
}
break;
case '13':
var left = (($(window).width()/2)-(350/2));
var top = (($(window).height()/2)-(250/2));
if($("#Fenster-handitems").size())
{
$("#Fenster-handitems").remove();
} else {
$("#client-ui").append("<div id='Fenster-handitems' class='alert' onClick='makezindex(\"handitems\")' style='left: " + left + "px;top: " + top + "px;width: 350px;height: 230px;'></div>");
$("#Fenster-handitems").load("<?php echo $path; ?>/public/loader/client/loadPage.php?page=handitems").draggable({ containment: '#client-ui' });
}
break;
case '15':
var itemid = text[1];
var team = text[2];
if($("#Fenster-Wirednegativeteammitglied").size())
{
$("#Fenster-Wirednegativeteammitglied").remove();
} else {
var left = (($(window).width()/2)-(350/2));
var top = (($(window).height()/2)-(250/2));
$("#client-ui").append("<div id='Fenster-Wirednegativeteammitglied' class='alert' onClick='makezindex(\"Wirednegativeteammitglied\")' style='left: " + left + "px;top: " + top + "px;width: 350px;height: 245px;'></div>");
$("#Fenster-Wirednegativeteammitglied").load("<?php echo $path; ?>/public/loader/client/loadPage.php?page=Wirednegativeteammitglied&itemid=" + itemid + "&team=" + team).draggable({ containment: '#client-ui' });
}
break;
case '17':
var left = (($(window).width()/2)-(350/2));
var top = (($(window).height()/2)-(250/2));
var itemid = text[1];
var imageurl = text[2];
var offsetX = text[3];
var offsetY = text[4];
var offsetZ = text[5];
if($("#Fenster-Roomads-" + itemid).size())
{
$("#Fenster-Roomads-" + itemid).remove();
} else {
$("#client-ui").append("<div id='Fenster-Roomads-" + itemid + "' class='alert' onClick='makezindex(\"Roomads-" + itemid + "\")' style='left: " + left + "px;top: " + top + "px;width: 350px;height: 430px;'></div>");
$("#Fenster-Roomads-" + itemid).load("<?php echo $path; ?>/public/loader/client/loadPage.php?page=Roomads&itemid=" + itemid +"&imageurl=" + imageurl +"&offsetX=" + offsetX + "&offsetY=" + offsetY + "&offsetZ=" + offsetZ).draggable({ containment: '#client-ui' });
}
break;
case '19':
var left = (($(window).width()/2)-(350/2));
var top = (($(window).height()/2)-(250/2));
var itemid = text[1];
var badgecode = text[2];
if($("#Fenster-Badgevitrine-" + itemid).size())
{
$("#Fenster-Badgevitrine-" + itemid).remove();
} else {
$("#client-ui").append("<div id='Fenster-Badgevitrine-" + itemid + "' class='eventalert' onClick='makezindex(\"Badgevitrine-" + itemid + "\")' style='position: absolute;top: " + top +"px;left: " + left + "px;width: 270px;height: 170px;'></div>");
$("#Fenster-Badgevitrine-" + itemid).load("<?php echo $path; ?>/public/loader/client/loadPage.php?page=Badgevitrine&itemid=" + itemid + "&badgecode=" + badgecode).draggable({ containment: '#client-ui' });
}
break;
case '20':
var left = (($(window).width()/2)-(350/2));
var top = (($(window).height()/2)-(250/2));
var itemid = text[1];
var botname = text[2];
var time = text[3];
if($("#Fenster-WiredBotfolgtuser").size())
{
$("#Fenster-WiredBotfolgtuser").remove();
} else {
var left = (($(window).width()/2)-(350/2));
var top = (($(window).height()/2)-(250/2));
$("#client-ui").append("<div id='Fenster-WiredBotfolgtuser' class='alert' onClick='makezindex(\"WiredBotfolgtuser\")' style='left: " + left + "px;top: " + top + "px;width: 350px;height: 330px;'></div>");
$("#Fenster-WiredBotfolgtuser").load("<?php echo $path; ?>/public/loader/client/loadPage.php?page=WiredBotfolgtuser&itemid=" + itemid + "&botname=" + botname + "&time=" + time).draggable({ containment: '#client-ui' });
}
break;
case '22':
var left = (($(window).width()/2)-(350/2));
var top = (($(window).height()/2)-(250/2));
var itemid = text[1];
var botname = text[3];
var handitem = text[2];
if($("#Fenster-WiredBotgibthanditem").size())
{
$("#Fenster-WiredBotgibthanditem").remove();
} else {
$("#client-ui").append("<div id='Fenster-WiredBotgibthanditem' class='alert' onClick='makezindex(\"WiredBotfolgtuser\")' style='left: " + left + "px;top: " + top + "px;width: 350px;height: 410px;'></div>");
$("#Fenster-WiredBotgibthanditem").load("<?php echo $path; ?>/public/loader/client/loadPage.php?page=WiredBotgibthanditem&itemid=" + itemid + "&botname=" + botname + "&handitem=" + handitem).draggable({ containment: '#client-ui' });
}
break;
case '24':
var left = (($(window).width()/2)-(350/2));
var top = (($(window).height()/2)-(250/2));
var itemid = text[1];
var botname = text[3];
var mode = text[2];
var say = btoa(text[4]);
if($("#Fenster-WiredBotsaytoallusers").size())
{
$("#Fenster-WiredBotsaytoallusers").remove();
} else {
$("#client-ui").append("<div id='Fenster-WiredBotsaytoallusers' class='alert' onClick='makezindex(\"WiredBotsaytoallusers\")' style='left: " + left + "px;top: " + top + "px;width: 350px;height: 390px;'></div>");
$("#Fenster-WiredBotsaytoallusers").load("<?php echo $path; ?>/public/loader/client/loadPage.php?page=WiredBotsaytoallusers&itemid=" + itemid + "&botname=" + botname + "&say=" + say + "&mode=" + mode).draggable({ containment: '#client-ui' });
}
break;
case '25':
var left = (($(window).width()/2)-(350/2));
var top = (($(window).height()/2)-(250/2));
var itemid = text[1];
var type = text[2];
var botname = text[3];
var say = btoa(text[4]);
if($("#Fenster-WiredBotsaytousers").size())
{
$("#Fenster-WiredBotsaytousers").remove();
} else {
$("#client-ui").append("<div id='Fenster-WiredBotsaytousers' class='alert' onClick='makezindex(\"WiredBotsaytousers\")' style='left: " + left + "px;top: " + top + "px;width: 350px;height: 360px;'></div>");
$("#Fenster-WiredBotsaytousers").load("<?php echo $path; ?>/public/loader/client/loadPage.php?page=WiredBotsaytousers&itemid=" + itemid + "&botname=" + botname + "&say=" + say + "&type=" + type).draggable({ containment: '#client-ui' });
}
break;
case '27':
var left = (($(window).width()/2)-(350/2));
var top = (($(window).height()/2)-(250/2));
var itemid = text[1];
var botname = text[2];
var look = text[3];
var gender = text[4];
if($("#Fenster-WiredBotchangelook").size())
{
$("#Fenster-WiredBotchangelook").remove();
} else {
$("#client-ui").append("<div id='Fenster-WiredBotchangelook' class='alert' onClick='makezindex(\"WiredBotchangelook\")' style='left: " + left + "px;top: " + top + "px;width: 350px;height: 360px;'></div>");
$("#Fenster-WiredBotchangelook").load("<?php echo $path; ?>/public/loader/client/loadPage.php?page=WiredBotchangelook&itemid=" + itemid + "&botname=" + botname + "&look=" + look + "&gender=" + gender).draggable({ containment: '#client-ui' });
}
break;
case '29':
openWindow("Flappybird", "650", "450");
break;
case '30':
var left = (($(window).width()/2)-(350/2));
var top = (($(window).height()/2)-(250/2));
if($("#Fenster-Commands").size())
{
$("#Fenster-Commands").remove();
} else {
$("#client-ui").append("<div id='Fenster-Commands' class='alert' onClick='makezindex(\"Commands\")' style='left: " + left + "px;top: " + top + "px;width: 500px;height: 500px;'></div>");
$("#Fenster-Commands").load("<?php echo $path; ?>/public/loader/client/loadPage.php?page=Commands").draggable({ containment: '#client-ui' });
}
break;
case '31':
if(msg !== '31')
{
var itemid = text[1];
var youtubevideo = text[2];
var left = (($(window).width()/2)-(350/2));
var top = (($(window).height()/2)-(270/2));
if($("#Fenster-WiredYoutubeplayerSettings").size())
{
$("#Fenster-WiredYoutubeplayerSettings").remove();
} else {
$("#client-ui").append("<div id='Fenster-WiredYoutubeplayerSettings' class='alert' onClick='makezindex(\"WiredYoutubeplayerSettings\")' style='left: " + left + "px;top: " + top + "px;width: 350px;height: 270px;'></div>");
$("#Fenster-WiredYoutubeplayerSettings").load("<?php echo $path; ?>/public/loader/client/loadPage.php?page=WiredYoutubeplayerSettings&itemid=" + itemid + "&youtubevideo=" + youtubevideo).draggable({ containment: '#client-ui' });
}
} else {
var left = (($(window).width()/2)-(1210/2));
var top = (($(window).height()/2)-(700/2));
if($("#Fenster-WiredYoutubeplayerSettings").size())
{
$("#Fenster-Agario").remove();
} else {
$("#client-ui").append("<div id='Fenster-Agario' class='alert' onClick='makezindex(\"Agario\")' style='left: " + left + "px;top: " + top + "px;width: 1210px;height: 700px;'></div>");
$("#Fenster-Agario").load("<?php echo $path; ?>/public/loader/client/loadPage.php?page=Agario").draggable({ containment: '#client-ui' });
}
}
break;
case '32':
var youtubevideo = text[1];
var left = (($(window).width()/2)-(500/2));
var top = (($(window).height()/2)-(450/2));
if($("#Fenster-WiredYoutubeplayer").size())
{
$("#Fenster-WiredYoutubeplayer").remove();
} else {
$("#client-ui").append("<div id='Fenster-WiredYoutubeplayer' class='alert' onClick='makezindex(\"WiredYoutubeplayer\")' style='left: " + left + "px;top: " + top + "px;width: 500px;height: 450px;'></div>");
$("#Fenster-WiredYoutubeplayer").load("<?php echo $path; ?>/public/loader/client/loadPage.php?page=WiredYoutubeplayer&youtubevideo=" + youtubevideo).draggable({ containment: '#client-ui' });
}
break;
case '33':
var itemid = text[1];
var waehrung = text[2];
var anzahl = text[3];
var left = (($(window).width()/2)-(350/2));
var top = (($(window).height()/2)-(250/2));
if($("#Fenster-WiredWaehrung").size())
{
$("#Fenster-WiredWaehrung").remove();
} else {
$("#client-ui").append("<div id='Fenster-WiredWaehrung' class='alert' onClick='makezindex(\"WiredWaehrung\")' style='left: " + left + "px;top: " + top + "px;width: 350px;height: 360px;'></div>");
$("#Fenster-WiredWaehrung").load("<?php echo $path; ?>/public/loader/client/loadPage.php?page=WiredWaehrung&itemid=" + itemid + "&waehrung=" + waehrung + "&anzahl=" + anzahl).draggable({ containment: '#client-ui' });
}
break;
case '34':
var itemid = text[1];
var waehrung = text[2];
var anzahl = text[3];
var left = (($(window).width()/2)-(350/2));
var top = (($(window).height()/2)-(250/2));
if($("#Fenster-WiredWaehrungN").size())
{
$("#Fenster-WiredWaehrungN").remove();
} else {
$("#client-ui").append("<div id='Fenster-WiredWaehrungN' class='alert' onClick='makezindex(\"WiredWaehrungN\")' style='left: " + left + "px;top: " + top + "px;width: 350px;height: 360px;'></div>");
$("#Fenster-WiredWaehrungN").load("<?php echo $path; ?>/public/loader/client/loadPage.php?page=WiredWaehrungN&itemid=" + itemid + "&waehrung=" + waehrung + "&anzahl=" + anzahl).draggable({ containment: '#client-ui' });
}
break;
case '37':
// OPEN SETTINGS
var itemid = text[1];
var url = text[2];
var left = (($(window).width()/2)-(350/2));
var top = (($(window).height()/2)-(270/2));
if($("#Fenster-WiredImageSettings").size())
{
$("#Fenster-WiredImageSettings").remove();
} else {
$("#client-ui").append("<div id='Fenster-WiredImageSettings' class='alert' onClick='makezindex(\"WiredImageSettings\")' style='left: " + left + "px;top: " + top + "px;width: 350px;height: 270px;'></div>");
$("#Fenster-WiredImageSettings").load("<?php echo $path; ?>/public/loader/client/loadPage.php?page=WiredImageSettings&itemid=" + itemid + "&ur=" + url).draggable({ containment: '#client-ui' });
}
break;
case '39':
var url = text[1];
showimage20(url);
break;
}
};
ws.onerror = function(event) {
console.log('Websocket ERROR:', event);
};
}
function goRoomEvent(roomid, alertid)
{
var roomid = roomid;
var alertid = alertid;
$("#Fenster-Alert-" + alertid).remove();
ws.send("6|" + roomid);
}
function updateBar(type)
{
if(type !== 'auto')
{
$("counter").fadeOut(2000);
}
$.post("<?php echo $path; ?>/public/loader/client/loader.php", { username: '<?php echo $user->username; ?>' })
.done(function(done){
var done = done;
var getOnline = done.substring(0, 3);
var geteventaktuell = done.substring(3, 4);
var getradio = done.substring(4,5);
var getMitarbeiter = done.substring(5,6);
var getnewNews = done.substring(6,7);
var getownRoom = done.substring(7,8);
var newImage = done.substring(8,9);
var getReladWS = done.substring(9, 10);
// ONLINECOUNTER
if(getOnline.substring(0, 1) == '0')
{
if(getOnline.substring(0,2) == '00')
{
getOnline = getOnline.substring(2,3);
} else {
getOnline = getOnline.substring(1,3);
}
}
if(getOnline == '1')
{
$("counter").html('<b>' + getOnline + '</b> Habbo online').fadeIn();
} else {
$("counter").html('<b>' + getOnline + '</b> Habbos online').fadeIn();
}
// RADIO PLAYER
if(getradio == '1')
{
if($(".radio").size())
{
} else {
$(".add").append('<div class="tab radio"><div id="radiocont" style="float: left;"></div><div onClick="Grussbox()" style="float: left;background: url(<?php echo $path; ?>/public/images/client/radio/mail.gif);margin-left: 5px;margin-top: 3px;width: 19px;height: 17px;"></div><script type="text/javascript" src="https://www.shoutcheap.com/flashplayer/skins/swfobject.js"></script><script type="text/javascript">var s1 = new SWFObject("https://www.shoutcheap.com/flashplayer/skins/player.swf", "player", "250", "15", "9", "#FFFFFF"); s1.addParam("allowfullscreen", "true"); s1.addParam("allowscriptaccess", "always"); s1.addParam("flashvars", "skin=https://www.shoutcheap.com/flashplayer/skins/nacht.swf&title=Live Stream&type=sound&file=http://listen.shoutcast.com/Streamlink"); s1.write("radiocont");</script></div>');
$(".radio").fadeIn(5000);
}
} else {
if($(".radio").size())
{
$(".radio").fadeOut('5000', function(){
$(this).remove();
});
if($("#Fenster-Grussbox").size())
{
$("#Fenster-Grussbox").fadeOut('5000', function(){
$(this).remove();
});
}
}
}
<?php if ($user->rank == '7') { ?>
var katalogmanagement = done.substring(10, 11);
if(katalogmanagement == '1')
{
if($('.katalogmanagement').size())
{
} else {
$(".add").append("<div class='tab katalogmanagement' onClick='reloadkatalog()'>Katalog reloaden</div>");
}
} else {
if($('.katalogmanagement').size())
{
$(".katalogmanagement").remove();
}
}
var refreshsocket = done.substring(11, 12);
if(refreshsocket == '1')
{
if($('.socketmanagement').size())
{
} else {
$(".add").append("<div class='tab socketmanagement' onClick='reloadsocket()'>Websocket reloaden</div>");
}
} else {
if($('.socketmanagement').size())
{
$(".socketmanagement").remove();
}
}
<?php } ?>
if(getownRoom == '1')
{
if($('.myroomtools').size())
{
} else {
// $(".add").append("<div class='tab myroomtools' onClick='myroom()'>Raumtools</div>");
// $("#client-ui").append("<div id='navi' class='myroomnavi'></div>");
// $(".myroomnavi").append("<div class='liste umfragen' onclick='openWindow(\"Umfragen\", \"450\", \"350\")'>Umfragen</div>");
// $(".myroomnavi").append("<div class='liste raumbgs bottom' onclick='openWindow(\"Roombg\", \"450\", \"350\")'>Raumbackground</div>");
}
} else {
if($('.myroomtools').size())
{
$("#Fenster-Botpanel").remove();
$("#Fenster-Umfragen").remove();
$(".myroomtools").remove();
$(".myroomnavi").remove();
}
}
if(newImage == '1')
{
var fid = Math.floor((Math.random() * 155) + 1);
var leftpos = ($(window).width()/2);
var toppos = ($(window).height()/2);
$("#client-ui").append("<div id='Fenster-Alert-" + fid + "' class='imagee' onClick='makezindex(\"Alert-" + fid + "\")' style='position: absolute;min-width: 5px;min-height: 5px;'></div>");
$("#Fenster-Alert-" + fid).load("<?php echo $path; ?>/public/loader/client/image/load.php?id=Fenster-Alert-" + fid).draggable({ containment: '#client-ui' });
}
if(getReladWS == '0')
{
}
});
}
function Grussbox()
{
if($("#Fenster-Grussbox").size())
{
$("#Fenster-Grussbox").remove();
} else {
var left = (($(window).width()/2)-170);
var top = (($(window).height()/2)-230);
$("#client-ui").append("<div id='Fenster-Grussbox' class='alert' onClick='makezindex(\"Grussbox\")' style='left: " + left + "px;top: " + top + "px;width: 341px;height: 363px;'></div>");
$("#Fenster-Grussbox").load("<?php echo $path; ?>/public/loader/client/loadPage.php?page=Grussbox").draggable({ containment: '#client-ui' });
}
}
function openKamera()
{
if($("#Fenster-Kamera").size())
{
$("#Fenster-Kamera").remove();
} else {
var left = (($(window).width()/2)-170);
var top = (($(window).height()/2)-230);
$("#client-ui").append("<div id='Fenster-Kamera' style='left: " + left + "px;top: " + top + "px;width: 341px;height: 463px;'></div>");
$("#Fenster-Kamera").load("<?php echo $path; ?>/public/loader/client/loadPage.php?page=Kamera").draggable({ containment: '#client-ui' });
}
}
function openYTPlayer()
{
if($("#Fenster-Youtube").size())
{
$("#Fenster-Youtube").remove();
} else {
var left = (($(window).width()/2)-390);
var top = (($(window).height()/2)-168);
$("#client-ui").append('<div id="Fenster-Youtube" onClick="makezindex(\'Youtube\')" class="alert" style="left: ' + left + 'px;top: ' + top + 'px;background: #E9E9E1;width: 780px;height: 356px;"></div>');
$("#Fenster-Youtube").load("<?php echo $path; ?>/public/loader/client/Youtube/Page.php").draggable({ containment: '#client-ui' });
}
}
function openWindow(fenster, width, height)
{
if($("#Fenster-" + fenster).size())
{
$("#Fenster-" + fenster).remove();
} else {
var left = (($(window).width()/2)-(width/2));
var top = (($(window).height()/2)-(height/2));
$("#client-ui").append("<div id='Fenster-" + fenster + "' class='alert' onClick='makezindex(\"" + fenster + "\")' style='left: " + left + "px;top: " + top + "px;width: " + width + "px;height: " + height + "px;'></div>");
$("#Fenster-" + fenster).load("<?php echo $path; ?>/public/loader/client/loadPage.php?page=" + fenster).draggable({ containment: '#client-ui' });
}
}
function makezindex(fenster)
{
if($("#Fenster-" + fenster).size())
{
zindex++;
$("#Fenster-" + fenster).css('z-index', zindex);
}
}
function Naviaction()
{
if(($('#navi').css('display') == 'none'))
{
$("#navi").fadeIn();
} else {
$("#navi").fadeOut();
}
if(($('.myroomnavi').css('display') !== 'none'))
{
$(".myroomnavi").fadeOut();
}
}
function showimage20(url)
{
var url = url;
$.post("SWFPATH/swf/habbo-imaging/image.php", {url: url})
.done(function(data)
{
var data = data.split('|');
var width = data[0];
var height = data[1];
var leftpos = (($(window).width()/2)-(width/2));
var toppos = (($(window).height()/2)-(height/2));
$("#Fenster-WiredIMAGE").remove();
$("#client-ui").append("<div id='Fenster-WiredIMAGE' class='alert' onclick='$(\"#Fenster-WiredIMAGE\").remove()' style='cursor: pointer;border: 0px;position: absolute;left: " + leftpos + "px;top: " + toppos + "px;width:" + width + "px;height: " + height + "px;'></div>");
$("#Fenster-WiredIMAGE").css('background', 'url(' + url+ ') 100% 100% no-repeat').draggable({ containment: '#client-ui' });
});
}
<?php if ($user->rank == '7' || $user->username == 'RavenMT') {
?>
function reloadkatalog()
{
$.post("<?php echo $path; ?>/public/loader/admin/katalog/reload.php", {id: '<?php echo $user->id; ?>' })
.done(function(data)
{
var data = data;
switch(data)
{
case 'fail':
alert('fail');
break;
}
});
}
<?php } ?>
<?php if ($user->rank == '7') { ?>
function reloadsocket()
{
$.post("<?php echo $path; ?>/public/loader/admin/socket/reload.php", {id: '<?php echo $user->id; ?>' })
.done(function(data)
{
var data = data;
switch(data)
{
case 'fail':
alert('fail');
break;
}
});
}
function openUserProfile(id)
{
var id = id;
if($("#Fenster-user" + id).size())
{
$("#Fenster-user" + id).remove();
} else {
var left = (($(window).width()/2)-(510/2));
var top = (($(window).height()/2)-(310/2));
$("#client-ui").append("<div id='Fenster-user" + id + "' class='alert' onClick='makezindex(\"user" + id + "\")' style='left: " + left + "px;top: " + top + "px;width: 510px;height: 310px;'></div>");
$("#Fenster-user" + id).load("<?php echo $path; ?>/public/loader/client/loadPage.php?page=UserProfile&id=" + id).draggable({ containment: '#client-ui' });
}
}
<?php } ?>
function openStapelFelder(itemid, hoehe)
{
var itemid = itemid;
var hoehe = hoehe;
if($("#Fenster-Stapelfelder").size())
{
$("#Fenster-Stapelfelder").remove();
} else {
var left = (($(window).width()/2)-(350/2));
var top = (($(window).height()/2)-(250/2));
$("#client-ui").append("<div id='Fenster-Stapelfelder' class='alert' onClick='makezindex(\"Stapelfelder\")' style='left: " + left + "px;top: " + top + "px;width: 350px;height: 250px;'></div>");
$("#Fenster-Stapelfelder").load("<?php echo $path; ?>/public/loader/client/loadPage.php?page=Stapelfelder&itemid=" + itemid + "&hoehe=" + hoehe).draggable({ containment: '#client-ui' });
}
}
function myroom()
{
if(($('.myroomnavi').css('display') == 'none'))
{
$(".myroomnavi").fadeIn();
} else {
$(".myroomnavi").fadeOut();
}
if(($('#navi').css('display') !== 'none'))
{
$("#navi").fadeOut();
}
}
function vollbild() {
if ((document.fullScreenElement && document.fullScreenElement !== null) || (!document.mozFullScreen && !document.webkitIsFullScreen)){
if (document.documentElement.requestFullScreen){
document.documentElement.requestFullScreen();
} else if(document.documentElement.mozRequestFullScreen){
document.documentElement.mozRequestFullScreen();
} else if (document.documentElement.webkitRequestFullScreen){
document.documentElement.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT);
}
} else {
if (document.cancelFullScreen){
document.cancelFullScreen();
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.webkitCancelFullScreen) {
document.webkitCancelFullScreen();
}
}
}
<?php } ?>
Alles anzeigen
Und hier ist der Code mit dem direkten Abschnitt des Radioscriptes:
PHP
// RADIO PLAYER
if(getradio == '1')
{
if($(".radio").size())
{
} else {
$(".add").append('<div class="tab radio"><div id="radiocont" style="float: left;"></div><div onClick="Grussbox()" style="float: left;background: url(<?php echo $path; ?>/public/images/client/radio/mail.gif);margin-left: 5px;margin-top: 3px;width: 19px;height: 17px;"></div><script type="text/javascript" src="https://www.shoutcheap.com/flashplayer/skins/swfobject.js"></script><script type="text/javascript">var s1 = new SWFObject("https://www.shoutcheap.com/flashplayer/skins/player.swf", "player", "250", "15", "9", "#FFFFFF"); s1.addParam("allowfullscreen", "true"); s1.addParam("allowscriptaccess", "always"); s1.addParam("flashvars", "skin=https://www.shoutcheap.com/flashplayer/skins/nacht.swf&title=Live Stream&type=sound&file=http://listen.shoutcast.com/Streamlink"); s1.write("radiocont");</script></div>');
$(".radio").fadeIn(5000);
}
} else {
if($(".radio").size())
{
$(".radio").fadeOut('5000', function(){
$(this).remove();
});
if($("#Fenster-Grussbox").size())
{
$("#Fenster-Grussbox").fadeOut('5000', function(){
$(this).remove();
});
}
}
}
Alles anzeigen