1.S3
This commit is contained in:
parent
abf7bbfded
commit
41642d0ddb
@ -1,20 +0,0 @@
|
|||||||
{
|
|
||||||
"Links": {
|
|
||||||
"login": "Войти",
|
|
||||||
"logout": "Выйти",
|
|
||||||
"cp": "Панель управления"
|
|
||||||
},
|
|
||||||
"Titles":{
|
|
||||||
"auth": "Авторизация"
|
|
||||||
},
|
|
||||||
"Words": {
|
|
||||||
"user": "Пользователь",
|
|
||||||
"password": "Пароль",
|
|
||||||
"Difficulty": {
|
|
||||||
"PEACEFUL": "Мирная",
|
|
||||||
"EASY": "Простая",
|
|
||||||
"NORMAL": "Нормальная",
|
|
||||||
"HARD": "Сложная"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,33 +0,0 @@
|
|||||||
function onload() {
|
|
||||||
updatePageInfo();
|
|
||||||
}
|
|
||||||
|
|
||||||
function updatePageInfo() {
|
|
||||||
let header = document.getElementById("header");
|
|
||||||
let stat = document.getElementById("stat");
|
|
||||||
header.innerText = "Идёт загрузка...";
|
|
||||||
stat.innerHTML = "";
|
|
||||||
var xhr = new XMLHttpRequest();
|
|
||||||
xhr.open('GET', '/json/mainData.json', true);
|
|
||||||
xhr.setRequestHeader("Content-Type", "text/plain;charset=UTF-8");
|
|
||||||
xhr.send();
|
|
||||||
xhr.onreadystatechange = function () {
|
|
||||||
if (xhr.readyState !== 4) return;
|
|
||||||
let data = JSON.parse(xhr.responseText);
|
|
||||||
header.innerText = "Мод запущен на сервере";
|
|
||||||
appendLine(stat, ["Версия игры", data.MineV]);
|
|
||||||
appendLine(stat, ["Игроки", data.Players]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function appendLine(table,array) {
|
|
||||||
let tr = document.createElement("tr");
|
|
||||||
for (let arrayKey in array) {
|
|
||||||
let td = document.createElement("td");
|
|
||||||
td.innerText = array[arrayKey];
|
|
||||||
tr.appendChild(td);
|
|
||||||
}
|
|
||||||
table.appendChild(tr);
|
|
||||||
}
|
|
||||||
|
|
||||||
document.addEventListener("DOMContentLoaded", onload);
|
|
@ -1,30 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="ru">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<title>WebInfo</title>
|
|
||||||
<style>
|
|
||||||
.header {
|
|
||||||
text-align: center;
|
|
||||||
font-size: 200%;
|
|
||||||
}
|
|
||||||
#stat {
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
.authLink {
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<script src="/js/index.js"></script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="header" id="header">
|
|
||||||
Идёт загрузка...
|
|
||||||
</div>
|
|
||||||
<main>
|
|
||||||
<replace id="1"/>
|
|
||||||
<table id="stat">
|
|
||||||
</table>
|
|
||||||
</main>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,19 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="ru">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<title><replace id="1"/></title>
|
|
||||||
<style>
|
|
||||||
form {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<form method="post" action="/auth/worker/">
|
|
||||||
<label for="user"><replace id="2"/>: <input name="user" id="user" type="text"></label><br>
|
|
||||||
<label for="password"><replace id="3"/>: <input name="password" id="password" type="password"></label><br>
|
|
||||||
<input type="submit">
|
|
||||||
</form>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Reference in New Issue
Block a user