-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathadmin.php
More file actions
71 lines (64 loc) · 1.71 KB
/
admin.php
File metadata and controls
71 lines (64 loc) · 1.71 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
71
<?php require "includes/rmi-functions.php"; ?>
<?php require "includes/header.php"; ?>
<?php require "includes/navigation.php"; ?>
<div id="page-wrapper">
<br>
<div class="row">
<?php
if ($wurmPower >= $view_admin) {
if (isset($_GET["steamlookup"])) {
?>
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="panel panel-default">
<div class="panel-heading">SteamID Lookup - <?php echo($_GET["steamlookup"]); ?></div>
<div class="panel-body">
Players linked to this SteamID:<br><br>
<?php
$steamPlayers = findPlayersWithSteamID($_GET["steamlookup"]);
foreach ($steamPlayers as $v) {
echo($v[0] . "<br>");
}
?>
</div>
</div>
</div>
<?php } ?>
<div class="col-xs-12">
<div class="panel panel-default">
<div class="panel-heading">Admin Logs</div>
<div class="panel-body">
<?php
$getLogs = getLogs();
if (!empty($getLogs)) {
foreach($getLogs as $k => $v) {
echo("<a href='?load=" . $v . "'>" . $v . "</a><br>");
}
if (isset($_GET["load"])) {
echo("<br><pre>");
$fh = fopen('logs/'.$_GET["load"],'r');
while ($line = fgets($fh)) {
$steamIDfound = get_string_between($line, "{", "}");
if ($steamIDfound != "") {
echo("<a href='?load=" . $_GET["load"] . "&steamlookup=" . $steamIDfound . "'>" . $line . "</a>");
} else {
echo($line);
}
}
echo("</pre>");
fclose($fh);
}
} else {
echo("No log files have been created!");
}
?>
</div>
</div>
</div>
<?php
} else {
echo("<b>Sorry, you do not have access to view admin.php</b>");
}
?>
</div>
</div>
<?php require "includes/footer.php"; ?>