92 lines
2.9 KiB
HTML
Executable File
92 lines
2.9 KiB
HTML
Executable File
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<script src=assets/jquery.js> </script>
|
|
<meta charset="UTF-8">
|
|
<link rel="stylesheet" href="assets/pico.css">
|
|
<title>Vysielanie</title>
|
|
<script>
|
|
function getCookie(cname) {
|
|
let name = cname + "=";
|
|
let decodedCookie = decodeURIComponent(document.cookie);
|
|
let ca = decodedCookie.split(';');
|
|
for(let i = 0; i <ca.length; i++) {
|
|
let c = ca[i];
|
|
while (c.charAt(0) == ' ') {
|
|
c = c.substring(1);
|
|
}
|
|
if (c.indexOf(name) == 0) {
|
|
return c.substring(name.length, c.length);
|
|
}
|
|
}
|
|
return "";
|
|
}
|
|
|
|
$(document).ready(function(){
|
|
function Getc() {
|
|
$.get("index.php?chat=1", function(data, status){
|
|
$("#chatbox").val(data);
|
|
});
|
|
}
|
|
|
|
Getc();
|
|
setInterval(function(){ Getc(); }, 5000);
|
|
|
|
function Ping() {
|
|
$.get("index.php?keepalive=1", function(data, status){
|
|
});
|
|
}
|
|
|
|
Ping();
|
|
setInterval(function(){ Ping(); }, 60000);
|
|
|
|
$("#send").click(function(){
|
|
data = $("#ins").val();
|
|
Getc();
|
|
if(data != ""){
|
|
$.post("index.php?chat=1&send=1",
|
|
{
|
|
text: data
|
|
},
|
|
function(data2, status){
|
|
var chatmsgs = $("#chatbox").val();
|
|
chatmsgs = chatmsgs + '• ' + getCookie("inicialy") + ':' + data + "\n";
|
|
$("#chatbox").val(chatmsgs);
|
|
});
|
|
}
|
|
$("#ins").val("");
|
|
});
|
|
|
|
$("#ins").keyup(function(event) {
|
|
if (event.keyCode === 13) {
|
|
$("#send").click();
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
<style>
|
|
.headingac {
|
|
font-size: 64px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<p class="headingac">Vysielanie</p>
|
|
<audio controls src="__VLOZ_URL_AUDIA__" id="audioplayer" type="__VLOZ_TYP_AUDIA__" preload="none"></audio>
|
|
<br>
|
|
<a href="index.php?logout=1">
|
|
<p>Odhlásiť sa</p>
|
|
</a>
|
|
<a href="__VLOZ_URL_AUDIA__.m3u" download target="_blank">
|
|
<p>Playlist na stiahnutie</p>
|
|
</a>
|
|
__VLOZ_ADMIN_LINK__
|
|
<div id="chat">
|
|
<textarea rows=5 id="chatbox" readonly></textarea><br>
|
|
<input id="ins"></input>
|
|
<button id="send">Odoslať</button>
|
|
</div>
|
|
<p>© BRN Systems __VLOZ_ROK__</p>
|
|
</body>
|
|
</html>
|