|
|
@@ -4,15 +4,20 @@ error_reporting(E_ALL);
|
|
|
require_once 'action.php';
|
|
|
require_once 'db.php';
|
|
|
require_once 'token.php';
|
|
|
+require_once 'stats.php';
|
|
|
|
|
|
$ip = ip2long(substr(trim($_GET['ip']),0,15));
|
|
|
$token = substr(trim($_GET['token']),0,25);
|
|
|
$action = substr(trim($_GET['action']),0,9);
|
|
|
+$stats = true;
|
|
|
|
|
|
if (!(new token)->isAdmin($token)) {
|
|
|
echo "admin access denied";
|
|
|
exit;
|
|
|
}
|
|
|
+if($stats == true) {
|
|
|
+ (new stats)->log($ip,$action,$token);
|
|
|
+}
|
|
|
switch($action) {
|
|
|
case 'blacklist':
|
|
|
if((new action)->blackList($ip)){
|