Файл: html/test_my.php
Строк: 90
<?php
<script src="/javascript/jquery-3.3.1.min.js?136.123" type="text/javascript"></script>
<body>
<table style="position: absolute;bottom: 0;left: 0;width: 100%;">
<tr><td class="time" style="text-align: center;width: 100%;height: 50px;background-color: yellow;">00:00</td></tr>
</table>
<table style="position: absolute;bottom: 0;left: 0;width: 40%;">
<tr><td onclick="showContent('');footL();" class="lm_punct" style="padding-left: 2%;text-align: left;width: 100%;height: 50px;background-color: blue;visibility: collapse;">punct2</td></tr>
<tr><td onclick="showContent('');footL();" class="lm_punct" style="padding-left: 2%;text-align: left;width: 100%;height: 50px;background-color: green;visibility: collapse;">punct1</td></tr>
<tr><td class="lm_menu" onclick="footL();" style="padding-left: 2%;text-align: left;width: 100%;height: 50px;background-color: red;">lmenu</td></tr>
</table>
<table class="rm" style="position: absolute;bottom: 0;right: 0;width: 40%;">
<tr><td onclick="showContent('');footR();" class="rm_punct" style="text-align: right;width: 100%;height: 50px;background-color: blue;visibility: collapse;">punct2</td></tr>
<tr><td onclick="showContent('');footR();" class="rm_punct" style="text-align: right;width: 100%;height: 50px;background-color: green;visibility: collapse;">punct1</td></tr>
<tr><td class="rm_menu" onclick="footR();" style="text-align: right;width: 100%;height: 50px;background-color: red;">rmenu</td></tr>
</table>
</body>
<script>
var imgLoading = "/img/loading.gif";
footL = function () {
$(".rm_punct").css("visibility", "collapse");
inverter(".lm_punct");
};
footR = function () {
$(".lm_punct").css("visibility", "collapse");
inverter(".rm_punct");
};
inverter = function (e) {
if ($(e).css("visibility") === "visible") {
$(e).css("visibility", "collapse");
} else {
$(e).css("visibility", "visible");
}
};
showContent = function (link) {
document.body.appendChild($("<img class='loading' src='/img/loading.gif' alt='loading'>").get(0));
$.ajax({
type: "POST",
url: "" + link,
dataType: "text",
data: {
glbool: 1
},
success: function (data) {
var now = new Date(Date.now());
var formatted = now.getHours() + ":" + now.getMinutes() + ":" + now.getSeconds();
$(".time").html(formatted);
$(".rm").animate({bottom:"100px"},1000);
},
error: function () {
$(".time").html("error");
}
});
};
</script>
?>