|
|
@@ -13,17 +13,23 @@ require_once 'db.php';
|
|
|
require_once 'token.php';
|
|
|
require_once 'stats.php';
|
|
|
|
|
|
+if(!isset($_POST['token'])){
|
|
|
+ echo "<form action='admin.php'><input type='text' value='token' name='token'><input type='submit' valeu='send token'></form></div></body></html>";
|
|
|
+ exit;
|
|
|
+}
|
|
|
if(isset($_POST['ip'])) {
|
|
|
$ip = ip2long(substr(trim($_POST['ip']),0,15));
|
|
|
-} else {
|
|
|
- $ip = ip2long(substr(trim($_GET['ip']),0,15));
|
|
|
}
|
|
|
-$token = substr(trim($_GET['token']),0,25);
|
|
|
-$action = substr(trim($_GET['action']),0,9);
|
|
|
+if(isset($_POST['token'])) {
|
|
|
+ $token = substr(trim($_POST['token']),0,25);
|
|
|
+}
|
|
|
+if(isset($_POST['action'])) {
|
|
|
+ $action = substr(trim($_POST['action']),0,9);
|
|
|
+}
|
|
|
$stats = true;
|
|
|
|
|
|
if (!(new token)->isAdmin($token)) {
|
|
|
- echo "admin access denied";
|
|
|
+ echo "admin access denied</div></body></html>";
|
|
|
exit;
|
|
|
}
|
|
|
if($stats == true) {
|