add localizatin, fix bugs

This commit is contained in:
2023-01-31 16:08:04 +01:00
parent aa3bdecd08
commit 18360eb63e
10 changed files with 433 additions and 220 deletions

View File

@@ -3,6 +3,7 @@
<head>
<script src=assets/jquery.js> </script>
<script>
__LOCALIZATION_LANGSELECT_SCRIPT__
function deleteit(indexik){
$.post("index.php?admin=1&delete=1",
{
@@ -20,20 +21,15 @@
Ping();
setInterval(function(){ Ping(); }, 60000);
function updateTable(){
$.get("index.php?admin=1&onlytable=1", function(data, status){
$("#chattablicka").html(data);
function updateDashboard(){
$.get("index.php?admin=1&admin_dash_api=1", function(data, status){
var parsedData = JSON.parse(data);
$("#chattablicka").html(parsedData.chatadm);
$("#connections").html(parsedData.connadm);
});
}
setInterval(updateTable, 5000);
updateTable();
function updateConns(){
$.get("index.php?admin=1&onlyconns=1", function(data, status){
$("#connections").html(data);
});
}
setInterval(updateConns, 30000);
updateConns();
setInterval(updateDashboard, 5000);
updateDashboard();
$("#send").click(function(){
data = $("#ins").val();
@@ -57,7 +53,7 @@
</script>
<meta charset="UTF-8">
<link rel="stylesheet" href="assets/pico.css">
<title>Administration</title>
<title>__LOCALIZATION_ADMIN_LINK__</title>
<style>
table, th, td {
border: 2px solid;
@@ -69,28 +65,29 @@
</style>
</head>
<body>
<p class="headingac">Streaming</p>
__LOCALIZATION_LANGSELECT__
<p class="headingac">__LOCALIZATION_PLAYER_TITLE__</p>
<audio controls src="__VLOZ_URL_AUDIA__" id="audioplayer" type="__VLOZ_TYP_AUDIA__" preload="none"></audio>
<br>
<a href="index.php?logout=1">
<p>Log out</p>
<p>__LOCALIZATION_LOGOUT__</p>
</a>
<a href="__VLOZ_URL_AUDIA__.m3u" download target="_blank">
<p>Playlist download</p>
<p>__LOCALIZATION_PLAYLIST_DOWNLOAD__</p>
</a>
<a href="index.php">
<p>Normal player</p>
<p>__LOCALIZATION_NORMAL_LINK__</p>
</a>
<p class="headingac">Connections:</p>
<p class="headingac">__LOCALIZATION_CONNECTIONS__</p>
<div id="connections"></div>
<br>
<p class="headingac">Chat admin:</p>
<button onclick="deleteit('*')">Delete all</button>
<p class="headingac">__LOCALIZATION_CHAT_ADMIN__</p>
<button onclick="deleteit('*')">__LOCALIZATION_CHAT_ADMIN_DELETE_ALL__</button>
<br>
<div id="chattablicka"></div><br>
<input id="ins"></input>
<button id="send">Send</button>
<button id="send">__LOCALIZATION_CHAT_SEND__</button>
<br>
<p>© BRN Systems __VLOZ_ROK__</p>
</body>