This repository was archived by the owner on May 31, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathhome.php
More file actions
executable file
·209 lines (177 loc) · 7.09 KB
/
home.php
File metadata and controls
executable file
·209 lines (177 loc) · 7.09 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
<?php
session_start();
ob_start();
if (!isset($_SESSION['logged'])) {
header('Location: index.php');
die();
}
$staffPerms = $_SESSION['perms'];
$user = $_SESSION['user'];
$conecG = 'work';
$_SESSION['conecFail'] = $conecG;
include 'verifyPanel.php';
masterconnect();
$players = 0;
$money = 0;
$sqlget = 'SELECT * FROM players';
$sqldata = mysqli_query($dbcon, $sqlget) or die('Connection could not be established');
while ($row = mysqli_fetch_array($sqldata, MYSQLI_ASSOC)) {
++$players;
$money = $money + $row['cash'] + $row['bankacc'];
}
$sqlgetVeh = 'SELECT * FROM vehicles';
$sqldataVeh = mysqli_query($dbcon, $sqlgetVeh) or die('Connection could not be established');
$vehicles = mysqli_num_rows($sqldataVeh);
include 'header/header.php';
?>
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
<h1 style = "margin-top: 70px">Dashboard</h1>
<p class="page-header">Dashboard of the panel.</p>
<?php
//Max players
echo '
<div class="row">
<div class="col-md-4">
';
echo "<div id='rcorners1'>";
echo "<div class='box-top'><center><h1>Players</h1></div>";
echo "<div class='box-panel'><p></p>";
echo '<p><br><center>There are currently '.$players.' players signed up on the server.</p>';
echo '</div>';
echo '</div>';
echo '</div>';
echo '<div class="col-md-4">';
//Vehicles
echo "<div id='rcorners2'>";
echo "<div class='box-top'><center><h1>Vehicles</h1></div>";
echo "<div class='box-panel'><p></p>";
echo '<p><br><center>There are currently '.$vehicles.' vehicles.</p>';
echo '</div>';
echo '</div>';
echo '</div>';
echo '<div class="col-md-4">';
//?
$money = '$'.number_format($money, 2);
echo "<div id='rcorners3'>";
echo "<div class='box-top'><center><h1>Total Money</h1></div>";
echo "<div class='box-panel'><p></p>";
echo '<p><br><center>There is a total of '.$money.' on the server.</p>';
echo '</div>';
echo '</div>';
echo '</div>';
echo '</div>';
echo '<div class="row">';
echo '<div class="col-lg-4">';
echo "<div id='rcorners5'>";
echo "<div class='box-top'><center><h1>Restart Server</h1></div>";
echo "<div class='box-panel'><p></p>";
echo '<form action=home.php method=post>';
echo "<div class = 'textSend'><td>"."<center><input class='btn btn-primary btn-outline' type=submit name=restart value=Restart".' </td></div>';
echo '</div>';
echo '</div>';
echo '</form>';
echo '</div>';
echo '<div class="col-lg-4">';
echo "<div id='rcorners4'>";
echo "<div class='box-top'><center><h1>Global Message</h1></div>";
echo "<div class='box-panel'><p></p>";
echo '<form action=home.php method=post>';
echo "<div class = 'textInput'><td>"."<center><input class='form-control' type=text name=global value='' < /td></div><br>";
echo "<div class = 'textSend'><td>"."<center><input class='btn btn-primary btn-outline' type=submit name=send value=Send".' </td></div>';
echo '</div>';
echo '</div>';
echo '</form>';
echo '</div>';
echo '<div class="col-lg-4">';
echo "<div id='rcorners6'>";
echo "<div class='box-top'><center><h1>Stop Server</h1></div>";
echo "<div class='box-panel'><p></p>";
echo '<form action=home.php method=post>';
echo "<div class = 'textSend'><td>"."<center><input class='btn btn-primary btn-outline' type=submit name=stop value=Stop".' </td></div>';
echo '</div>';
echo '</div>';
echo '</form>';
echo '</div>';
echo '</div>';
echo '<div class="row">';
echo '<div class="col-md-2">';
echo '</div>';
echo '<div class="col-lg-4">';
echo "<div id='rcorners8'>";
echo "<div class='box-top'><center><h1>Help</h1></div>";
echo "<div class='box-top'><center><h4>For general help on the panel!</h4></div>";
echo "<div class='box-panel'><p></p>";
echo '<form action=home.php method=post>';
echo "<div class = 'textSend'><td>"."<center><input class='btn btn-primary btn-outline' type=submit name=help value=Help".' </td></div>';
echo '</div>';
echo '</div>';
echo '</form>';
echo '</div>';
echo '<div class="col-lg-4">';
if (isset($_POST['send'])) {
if ($staffPerms['globalMessage'] == '1') {
$send = $_POST['global'];
$_SESSION['send'] = $send;
header('Location: rCon/rcon-mess.php');
$message = 'Admin '.$user.' has sent a global message ('.$send.')';
logIt($user, $message, $dbcon);
} else {
header('Location: lvlError.php');
die();
}
}
if (isset($_POST['restart'])) {
if ($staffPerms['restartServer'] == '1') {
$message = 'Admin '.$user.' has restarted the server.';
logIt($user, $message, $dbcon);
header('Location: rCon/rcon-restart.php');
} else {
header('Location: lvlError.php');
die();
}
}
if (isset($_POST['stop'])) {
if ($staffPerms['stopServer'] == '1') {
$message = 'Admin '.$user.' has stopped the server.';
logIt($user, $message, $dbcon);
header('Location: rCon/rcon-stop.php');
} else {
header('Location: lvlError.php');
die();
}
}
if (isset($_POST['help'])) {
header('Location: help.php');
die();
}
ob_end_flush();
?>
<div class = "donate">
<div class ="headD"><center><h3>Donate to see further updates!<h3></center></div>
<div class ="donateB"><form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_donations">
<input type="hidden" name="business" value="jasonhall96686@yahoo.com">
<input type="hidden" name="lc" value="GB">
<input type="hidden" name="item_name" value="AdminPanel">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="currency_code" value="GBP">
<input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHostedGuest">
<input type="image" src="https://www.paypalobjects.com/en_US/GB/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal – The safer, easier way to pay online.">
<img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1">
</form></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="../../assets/js/vendor/jquery.min.js"><\/script>')</script>
<script src="dist/js/bootstrap.min.js"></script>
<!-- Just to make our placeholder images work. Don't actually copy the next line! -->
<script src="../../assets/js/vendor/holder.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="../../assets/js/ie10-viewport-bug-workaround.js"></script>
</body>
</html>