init
This commit is contained in:
1
templates/.htaccess
Executable file
1
templates/.htaccess
Executable file
@@ -0,0 +1 @@
|
||||
Require all denied
|
97
templates/admin.html
Executable file
97
templates/admin.html
Executable file
@@ -0,0 +1,97 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script src=assets/jquery.js> </script>
|
||||
<script>
|
||||
function deleteit(indexik){
|
||||
$.post("admin.php?delete=1",
|
||||
{
|
||||
delete: indexik
|
||||
},
|
||||
function(data, status){
|
||||
updateTable();
|
||||
});
|
||||
}
|
||||
$(function() {
|
||||
function Ping() {
|
||||
$.get("index.php?keepalive=1", function(data, status){
|
||||
});
|
||||
}
|
||||
|
||||
Ping();
|
||||
setInterval(function(){ Ping(); }, 60000);
|
||||
function updateTable(){
|
||||
$.get("admin.php?onlytable=1", function(data, status){
|
||||
$("#chattablicka").html(data);
|
||||
});
|
||||
}
|
||||
setInterval(updateTable, 5000);
|
||||
updateTable();
|
||||
function updateConns(){
|
||||
$.get("admin.php?onlyconns=1", function(data, status){
|
||||
$("#connections").html(data);
|
||||
});
|
||||
}
|
||||
setInterval(updateConns, 30000);
|
||||
updateConns();
|
||||
|
||||
$("#send").click(function(){
|
||||
data = $("#ins").val();
|
||||
if(data != ""){
|
||||
$.post("index.php?chat=1&send=1",
|
||||
{
|
||||
text: data
|
||||
},
|
||||
function(data2, status){
|
||||
});
|
||||
}
|
||||
$("#ins").val("");
|
||||
});
|
||||
|
||||
$("#ins").keyup(function(event) {
|
||||
if (event.keyCode === 13) {
|
||||
$("#send").click();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<meta charset="UTF-8">
|
||||
<link rel="stylesheet" href="assets/pico.css">
|
||||
<title>Administrácia</title>
|
||||
<style>
|
||||
table, th, td {
|
||||
border: 2px solid;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.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>
|
||||
<a href="index.php">
|
||||
<p>Obyčajný prehrávač</p>
|
||||
</a>
|
||||
<p class="headingac">Pripojenia:</p>
|
||||
<div id="connections"></div>
|
||||
<br>
|
||||
<p class="headingac">Chat admin:</p>
|
||||
<button onclick="deleteit('*')">Zmazať všetko</button>
|
||||
<br>
|
||||
<div id="chattablicka"></div><br>
|
||||
|
||||
<input id="ins"></input>
|
||||
<button id="send">Odoslať</button>
|
||||
<br>
|
||||
<p>© BRN Systems __VLOZ_ROK__</p>
|
||||
</body>
|
||||
</html>
|
107
templates/login.html
Executable file
107
templates/login.html
Executable file
@@ -0,0 +1,107 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Prihlásenie</title>
|
||||
<link rel="stylesheet" href="assets/pico.css">
|
||||
<meta charset="utf-8">
|
||||
</meta>
|
||||
<script src="assets/jquery.js"></script>
|
||||
<style>
|
||||
#error{
|
||||
display: none;
|
||||
color: #CC0000;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 50%;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
$(function() {
|
||||
$("#kod").focus();
|
||||
var kod = "";
|
||||
var inic = "";
|
||||
var listeners = "";
|
||||
$("#next").click(function() {
|
||||
$("#error").hide();
|
||||
kod = $("#kod").val();
|
||||
$.post("index.php?verify=1",
|
||||
{
|
||||
kod: kod
|
||||
},
|
||||
function(data, status){
|
||||
if (data == "verified"){
|
||||
$("#firstQuestion").fadeOut("slow", function(){
|
||||
$("#secondQuestion").fadeIn("slow", function(){
|
||||
$("#ini").focus();
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
else{
|
||||
$("#error").fadeIn();
|
||||
}
|
||||
});
|
||||
});
|
||||
$("#back").click(function() {
|
||||
$("#secondQuestion").fadeOut("slow", function(){
|
||||
$("#firstQuestion").fadeIn("slow", function(){
|
||||
$("#kod").focus();
|
||||
});
|
||||
});
|
||||
});
|
||||
$("#send").click(function() {
|
||||
inic = $("#ini").val();
|
||||
listeners = $("#listeners").val();
|
||||
$.post("index.php",
|
||||
{
|
||||
kod: kod,
|
||||
listeners: listeners,
|
||||
ini: inic
|
||||
},
|
||||
function(data, status){
|
||||
location.reload();
|
||||
});
|
||||
});
|
||||
$("#kod").keyup(function(event) {
|
||||
if (event.keyCode === 13) {
|
||||
$("#next").click();
|
||||
}
|
||||
});
|
||||
$("#ini").keyup(function(event) {
|
||||
if (event.keyCode === 13) {
|
||||
$("#listeners").focus();
|
||||
}
|
||||
});
|
||||
$("#listeners").keyup(function(event) {
|
||||
if (event.keyCode === 13) {
|
||||
$("#send").click();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post">
|
||||
<div id="firstQuestion">
|
||||
<p id="error">Zlý kód</p>
|
||||
<label id="kodik" for="kod">Kód:<br></label>
|
||||
<input type="text" id="kod" placeholder="Kód" name="kod" required>
|
||||
<br>
|
||||
<button id="next" type="button">Ďalej</button>
|
||||
<br>
|
||||
<p>© BRN Systems __VLOZ_ROK__</p>
|
||||
</div>
|
||||
<div id="secondQuestion" style="display: none;">
|
||||
<label for="ini">Iniciály:<br></label>
|
||||
<input type="text" id="ini" placeholder="Iniciály" name="ini" required autofocus>
|
||||
<br>
|
||||
<label for="listeners">Počet počúvajúcich:<br></label>
|
||||
<input type="text" id="listeners" placeholder="Počet počúvajúcich" name="listeners" required>
|
||||
<br>
|
||||
<button id="send" type="button">Prihlásiť sa</button><button id="back" type="button">Späť</button>
|
||||
<br>
|
||||
<p>© BRN Systems __VLOZ_ROK__</p>
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
91
templates/player.html
Executable file
91
templates/player.html
Executable file
@@ -0,0 +1,91 @@
|
||||
<!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>
|
31
templates/streamadd.html
Executable file
31
templates/streamadd.html
Executable file
@@ -0,0 +1,31 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script src=assets/jquery.js> </script>
|
||||
<meta charset="UTF-8">
|
||||
<link rel="stylesheet" href="assets/pico.css">
|
||||
<title>Pridanie streamu</title>
|
||||
<body>
|
||||
<form method="post">
|
||||
Kód:<br>
|
||||
<input type="text" name="kod">
|
||||
<br>
|
||||
Adresa zvuku:<br>
|
||||
<input type="text" name="url">
|
||||
<br>
|
||||
Typ zvuku:<br>
|
||||
<input type="radio" name="type" value="audio/mpeg">mp3
|
||||
<input type="radio" name="type" value="audio/ogg">ogg
|
||||
<br>
|
||||
<br>
|
||||
Administračné heslo streamu:<br>
|
||||
<input type="text" name="adminpwd">
|
||||
Heslo prevádzkovateľa:<br>
|
||||
<input type="text" name="heslo">
|
||||
<br>
|
||||
<input type="submit" value="pridať">
|
||||
<br>
|
||||
<p>© BRN Systems __VLOZ_ROK__</p>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user