151 lines
5.7 KiB
PHP
151 lines
5.7 KiB
PHP
</div> <!-- end container-fluid -->
|
|
</div>
|
|
<!-- end wrapper -->
|
|
|
|
<!-- Footer Start -->
|
|
<footer class="footer">
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
<div class="col-md-6 <?=(MFAPPNAME == "devthetool") ? "text-danger" : ""?>">
|
|
<span title="<?=MFAPPNAME?>">the to<span class="secondO">o</span>l © <?=date('Y')?></span> <a href="https://www.xinon.at">Xinon GmbH</a>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
<!-- end Footer -->
|
|
|
|
<!--<script type="text/javascript" src="<?=self::getResourcePath()?>assets/js/vendor.min.js"></script>-->
|
|
|
|
<?php if(defined("ENABLE_VODIA_IDENTITY_SWITCHER") && ENABLE_VODIA_IDENTITY_SWITCHER && $me->is("employee")): ?>
|
|
<script type="text/javascript" src="<?=self::getResourcePath()?>assets/js/xinon-vodia-identity.js"></script>
|
|
<?php endif; ?>
|
|
|
|
<script type="text/javascript">
|
|
$(".selectpicker").selectpicker({
|
|
iconBase: "fas",
|
|
tickIcon: "check",
|
|
sanitize: false
|
|
});
|
|
$('.navbar-toggle').on('click', function (event) {
|
|
console.log('cracy');
|
|
$(this).toggleClass('open');
|
|
$('#navigation').slideToggle(400);
|
|
});
|
|
|
|
$('.navigation-menu>li').slice(-2).addClass('last-elements');
|
|
|
|
$('.navigation-menu li.has-submenu a[href="#"]').on('click', function (e) {
|
|
if ($(window).width() < 992) {
|
|
e.preventDefault();
|
|
$(this).parent('li').toggleClass('open').find('.submenu:first').toggleClass('open');
|
|
}
|
|
});
|
|
|
|
<?php if($me->can("Superexpert")): ?>
|
|
$(".secondO").addClass("pointer");
|
|
|
|
var se_to = 0;
|
|
var se_intv;
|
|
var se_notf;
|
|
$(".footer .secondO").click(function() {
|
|
if(!se_to) {
|
|
$.post("<?=self::getUrl("User", "api")?>",{
|
|
do: "sse"
|
|
},
|
|
function(success) {
|
|
if(!("status" in success)) return;
|
|
if(success.status == "OK") {
|
|
if(!("result" in success)) return;
|
|
if(!("valid_to" in success.result) || !success.result.valid_to) return;
|
|
|
|
se_to = success.result.valid_to;
|
|
addSeMark();
|
|
se_intv = setInterval(checkSe, 1000);
|
|
location.reload();
|
|
}
|
|
},
|
|
"json");
|
|
}
|
|
});
|
|
|
|
function checkSe() {
|
|
var now = Math.floor(Date.now() / 1000);
|
|
if(!se_to || se_to < 0) {
|
|
clearInterval(se_intv);
|
|
se_to = null;
|
|
$("#se_notf").remove();
|
|
removeSeMark();
|
|
return;
|
|
}
|
|
var rest_duration = se_to - now;
|
|
|
|
if(rest_duration <= 0) {
|
|
clearInterval(se_intv);
|
|
se_to = null;
|
|
$("#se_notf").remove();
|
|
removeSeMark();
|
|
return;
|
|
}
|
|
|
|
if(rest_duration < 60) {
|
|
// show notification
|
|
if($("#se_notf").length) {
|
|
$("#se_notf .time").text(rest_duration);
|
|
} else {
|
|
var notf_html = $('<div class="fixed-top alert alert-warning mx-4 mt-3" id="se_notf" style="width: 50vh;">Achtung: Noch <span class="time">' + rest_duration +'</span> Sekunden. <a href="#" onclick="extSe()">Jetzt verlängern!</a></div>');
|
|
$("body").prepend(notf_html);
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
function extSe() {
|
|
console.log("in ese");
|
|
$.post("<?=self::getUrl("User", "api")?>", {
|
|
do: "ese"
|
|
},
|
|
function(success) {
|
|
if(!("result" in success)) return;
|
|
if(!("valid_to" in success.result) || !success.result.valid_to) return;
|
|
se_to = success.result.valid_to;
|
|
},
|
|
"json"
|
|
);
|
|
}
|
|
|
|
function endSe() {
|
|
$.post("<?=self::getUrl("User", "api")?>", {
|
|
do: "endse"
|
|
},
|
|
function(success) {
|
|
if(!("result" in success)) return;
|
|
if(!("valid_to" in success.result)) return;
|
|
se_to = success.result.valid_to;
|
|
location.reload();
|
|
},
|
|
"json"
|
|
);
|
|
}
|
|
|
|
function addSeMark() {
|
|
if(!$("#se-mark").length) {
|
|
$("#topbar").append('<li id="SeMark"><a class="nav-link dropdown-toggle text-danger" href="#" role="button" aria-haspopup="false" aria-expanded="false" onclick="endSe(); return false;" title="Beenden"><i class="fas fa-crown"></i></a></li>');
|
|
}
|
|
}
|
|
|
|
function removeSeMark() {
|
|
$("#SeMark").remove();
|
|
}
|
|
|
|
<?php if($me->superexpertEnabled()): ?>
|
|
addSeMark();
|
|
if(!se_intv) {
|
|
se_to = <?=$me->flags["superexpert_lock_date"]?>;
|
|
setInterval(checkSe, 1000);
|
|
}
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
</script>
|
|
</body>
|
|
</html>
|