127 lines
5.1 KiB
HTML
Executable File
127 lines
5.1 KiB
HTML
Executable File
<!DOCTYPE html>
|
|
<html data-theme="dark">
|
|
<head>
|
|
<title>__LOCALIZATION_LOGIN_TITLE__</title>
|
|
<link rel="stylesheet" href="assets/pico.css">
|
|
<script async defer data-website-id="ec75bcbd-29d7-471c-a1a8-c20cb688f2b6" src="https://umami.brn.systems/umami.js"></script>
|
|
<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>
|
|
__LOCALIZATION_LANGSELECT_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 if(data == "admin"){
|
|
$.post("index.php",
|
|
{
|
|
kod: kod,
|
|
listeners: 1,
|
|
ini: "admin"
|
|
},
|
|
function(data, status){
|
|
location.reload();
|
|
});
|
|
}
|
|
else{
|
|
try{
|
|
umami.trackEvent('Bad code', { type: 'badcode', code: kod });
|
|
} catch(e) {}
|
|
$("#error").fadeIn();
|
|
}
|
|
});
|
|
});
|
|
$("#back").click(function() {
|
|
try{
|
|
umami.trackEvent('Back button', { type: 'loginback' });
|
|
} catch(e) {}
|
|
$("#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>
|
|
__LOCALIZATION_LANGSELECT__
|
|
<form method="post">
|
|
<div id="firstQuestion">
|
|
<p id="error">__LOCALIZATION_LOGIN_ERROR__</p>
|
|
<label id="kodik" for="kod">__LOCALIZATION_LOGIN_CODE_LABEL__<br></label>
|
|
<input type="text" id="kod" placeholder="__LOCALIZATION_LOGIN_CODE_LABEL__" name="kod" required>
|
|
<br>
|
|
<button id="next" type="button">__LOCALIZATION_LOGIN_NEXT__</button>
|
|
<br>
|
|
<p>© BRN Systems __VLOZ_ROK__</p>
|
|
</div>
|
|
<div id="secondQuestion" style="display: none;">
|
|
<label for="ini">__LOCALIZATION_LOGIN_INITIALS_LABEL__<br></label>
|
|
<input type="text" id="ini" placeholder="__LOCALIZATION_LOGIN_INITIALS_LABEL__" name="ini" required autofocus>
|
|
<br>
|
|
<label for="listeners">__LOCALIZATION_LOGIN_LISTENERS_LABEL__<br></label>
|
|
<input type="text" id="listeners" placeholder="__LOCALIZATION_LOGIN_LISTENERS_LABEL__" name="listeners" required>
|
|
<br>
|
|
<button id="send" type="button">__LOCALIZATION_LOGIN_LOGIN__</button><button id="back" type="button">__LOCALIZATION_LOGIN_BACK__</button>
|
|
<br>
|
|
<p>© BRN Systems __VLOZ_ROK__</p>
|
|
</div>
|
|
</form>
|
|
</body>
|
|
</html>
|