From ed3068e29ce49d344e75dd5b152bf84a41464433 Mon Sep 17 00:00:00 2001 From: flashwave Date: Tue, 5 Jul 2022 14:03:34 +0000 Subject: [PATCH] Removed unused EEPROM management panel. --- _manage.php | 456 ----------------------------------------------- public/index.php | 3 - 2 files changed, 459 deletions(-) delete mode 100644 _manage.php diff --git a/_manage.php b/_manage.php deleted file mode 100644 index 6976685..0000000 --- a/_manage.php +++ /dev/null @@ -1,456 +0,0 @@ -verifyToken(strval(filter_input(INPUT_COOKIE, 'msz_auth'))); - if($mszUserId > 0) - User::byId($mszUserId)->setActive(); - } - - if(!User::hasActive() || User::active()->getId() !== 1) { - http_response_code(403); - header('Content-Type: text/html; charset=utf-8'); - echo << - - - - Access Denied - - - -

Access Denied

-

Access Denied

- - -HTML; - exit; - } -} - -if($reqPath === '/flash') { - mszDieIfNotAuth(); - header('Content-Type: text/html; charset=utf-8'); - - echo << - - - - - EEPROM Flash - - - - -
-
-

EEPROM Flash

- -
-
-
- - - -
- - - -HTML; - return true; -} - -if($reqPath === '/flash/stats.json') { - mszDieIfNotAuth(); - header('Content-Type: application/json; charset=utf-8'); - $getStats = DB::prepare(' - SELECT ( - SELECT COUNT(`app_id`) - FROM `prm_applications` - ) AS `applications`, ( - SELECT COUNT(`upload_id`) - FROM `prm_uploads` - ) AS `uploads`, ( - SELECT COUNT(`user_id`) - FROM `prm_users` - ) AS `users` - '); - $getStats->execute(); - echo json_encode($getStats->fetchObject()); - return true; -} - -if($reqPath === '/flash/users.json') { - mszDieIfNotAuth(); - header('Content-Type: application/json; charset=utf-8'); - echo json_encode(User::all(10, intval(filter_input(INPUT_GET, 'after', FILTER_SANITIZE_NUMBER_INT)))); - return true; -} -if($reqPath === '/flash/uploads.json') { - mszDieIfNotAuth(); - header('Content-Type: application/json; charset=utf-8'); - echo json_encode(Upload::all(20, strval(filter_input(INPUT_GET, 'after')))); - return true; -} -if($reqPath === '/flash/applications.json') { - mszDieIfNotAuth(); - header('Content-Type: application/json; charset=utf-8'); - echo json_encode(Application::all(10, intval(filter_input(INPUT_GET, 'after', FILTER_SANITIZE_NUMBER_INT)))); - return true; -} - -if($reqPath === '/flash/style.css') { - mszDieIfNotAuth(); - header('Content-Type: text/css; charset=utf-8'); - echo <<