forked from Rauks/Minecraft-RCON
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
70 lines (70 loc) · 4.18 KB
/
index.php
File metadata and controls
70 lines (70 loc) · 4.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?php
require_once "auth/auth.php";
if (isset($username) && isset($pass)) {
if ($row = $auth->check_login($username, $pass)) {
$_SESSION["target_host"] = $row["target_host"];
$_SESSION["target_port"] = $row["target_port"];
$_SESSION["target_pass"] = $row["target_password"];
$isSuccess = true;
};
$auth->quit();
};
if (!$isSuccess) {header("Location: /auth/login.php");exit;}
?>
<!DOCTYPE HTML>
<html lang="en">
<head>
<?php include "head.php" ?>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap">
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="colors.css">
<script src="https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/jquery-ui/dist/jquery-ui.min.js"></script>
<script src="rcon.js" defer></script>
<title>Minecraft RCON</title>
</head>
<body>
<main class="container">
<div class="alert alert-info" id="alertMessage">Minecraft RCON</div>
<div id="consoleRow">
<div class="panel" id="consoleContent">
<div id="hidden-xs" class="panel-heading">
<h3 id="panel-title" class="panel-title"><span class="material-symbols-outlined">terminal</span> Console<span style="color:red;font-weight:bold"> v0.4.8</span></h3>
<div class="btn-group">
<a class="btn-def cmd-help" href="https://minecraft.gamepedia.com/Commands" target="_blank"><span class="material-symbols-outlined">help</span><span class="btn-xs"> Commands</span></a>
<a class="btn-def" href="https://github.com/Rauks/Minecraft-RCON"><img src="https://github.githubassets.com/favicons/favicon-dark.svg" style="width:24px"><span class="btn-xs"> Source</span></a>
<a class="btn-def" href="/auth/logout.php"><span class="material-symbols-outlined">logout</span></a>
</div>
</div>
<div class="panel-body"><ul class="list-group" id="groupConsole"></ul></div>
</div>
<div class="input-group">
<span class="settings"><span class="material-symbols-outlined">settings</span></span>
<div id="txtCommandResults"></div>
<input type="text" class="form-control" id="txtCommand">
<div class="input-group-btn">
<button class="btn-gradient" type="button" id="send"><span class="material-symbols-outlined">send</span><span class="btn-xs"> Send</span></button>
<button type="button" id="clearLog"><span class="material-symbols-outlined">delete_sweep</span><span class="btn-xs"> Clear</span></button>
</div>
</div>
</div>
</main>
<div id="settings" class="settings-popup" style="display:none">
<span class="close-popup">×</span>
<span class="logged-as">Currently signed in as <b id="current-username"><?= $username?></b></span>
<div class="settings-container center">
<h3>Settings</h3>
<span class="settings-elem"><input id="auto-scroll" class="toggle" type="checkbox"><label for="auto-scroll"> Auto-scoll console log to bottom</label></span>
<span class="settings-elem"><input id="hide-desc" class="toggle" type="checkbox"><label for="hide-desc"> Hide button description</label></span>
</div>
<div class="target-server-container center">
<h3>Target Server</h3>
<input id="target_host" type="text" value="<?= $_SESSION["target_host"];?>">
<input id="target_port" type="number" min="1" max="65535" value="<?= $_SESSION["target_port"];?>">
<input id="target_passwd" type="password" value="<?= $_SESSION["target_pass"];?>"><br>
<button type="button" class="save-db">Save to database</button>
<span id="save-db_notify" style="display:none"></span>
</div>
</div>
</body>
</html>