diff --git a/composer.json b/composer.json index 324eecd7..47c0f9b6 100644 --- a/composer.json +++ b/composer.json @@ -21,8 +21,7 @@ "mythicalsystems/php-router": "^1.0", "symfony/yaml": "^6.3", "phpseclib/phpseclib": "^3.0", - "phpmailer/phpmailer": "^6.8", - "livaco/easydiscordwebhook": "^2.0", - "mythicalsystems/aapanelapi": "^1.0" + "phpmailer/phpmailer": "^6.8" } + } diff --git a/composer.lock b/composer.lock index cd15ae65..799160ea 100644 --- a/composer.lock +++ b/composer.lock @@ -4,111 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "f138f7bf8d8527a2f12614d8e5574aed", + "content-hash": "af2ba694868bd74ee4aaab3ed5276e31", "packages": [ - { - "name": "livaco/easydiscordwebhook", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/LivacoNew/EasyDiscordWebhook.git", - "reference": "0c9ff91f7eef4994632b92a65ce772aefbd1f70c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/LivacoNew/EasyDiscordWebhook/zipball/0c9ff91f7eef4994632b92a65ce772aefbd1f70c", - "reference": "0c9ff91f7eef4994632b92a65ce772aefbd1f70c", - "shasum": "" - }, - "type": "library", - "autoload": { - "psr-4": { - "Livaco\\EasyDiscordWebhook\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Livaco", - "homepage": "https://www.livaco.dev/" - } - ], - "description": "An simple, lightweight, easy to use library to allow you to create and send discord webhooks in PHP.", - "homepage": "https://github.com/LivacoNew/EasyDiscordWebhook", - "keywords": [ - "discord", - "php", - "webhook" - ], - "support": { - "issues": "https://github.com/LivacoNew/EasyDiscordWebhook/issues", - "source": "https://github.com/LivacoNew/EasyDiscordWebhook/tree/2.0.0" - }, - "time": "2023-01-16T19:23:43+00:00" - }, - { - "name": "mythicalsystems/aapanelapi", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/MythicalLTD/AAPanel-API.git", - "reference": "a25739b9370fa4ff5c1ca597f4abc36d322e1f37" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/MythicalLTD/AAPanel-API/zipball/a25739b9370fa4ff5c1ca597f4abc36d322e1f37", - "reference": "a25739b9370fa4ff5c1ca597f4abc36d322e1f37", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Mythicalsystems\\AaPanelApi\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "NaysKutzu", - "email": "ghermancassian2008@gmail.com" - } - ], - "description": "AAPanel-PHP is a library that allows you to interact with your AAPanel account using PHP. It provides a simple and easy-to-use API that you can use to manage your AAPanel account, such as creating and managing users, domains, and websites.", - "keywords": [ - "AAPanel", - "aapanel-api", - "mythicalsystems", - "nayskutzu" - ], - "support": { - "issues": "https://github.com/MythicalLTD/AAPanel-API/issues", - "source": "https://github.com/MythicalLTD/AAPanel-API/tree/1.0.1" - }, - "funding": [ - { - "url": "https://paypal.me/mythicalsystems", - "type": "custom" - }, - { - "url": "https://github.com/nayskutzu", - "type": "github" - }, - { - "url": "https://ko-fi.com/nayskutzu", - "type": "ko_fi" - } - ], - "time": "2023-08-12T10:21:16+00:00" - }, { "name": "mythicalsystems/php-router", "version": "1.0.3", @@ -365,16 +262,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.23", + "version": "3.0.33", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "866cc78fbd82462ffd880e3f65692afe928bed50" + "reference": "33fa69b2514a61138dd48e7a49f99445711e0ad0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/866cc78fbd82462ffd880e3f65692afe928bed50", - "reference": "866cc78fbd82462ffd880e3f65692afe928bed50", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/33fa69b2514a61138dd48e7a49f99445711e0ad0", + "reference": "33fa69b2514a61138dd48e7a49f99445711e0ad0", "shasum": "" }, "require": { @@ -455,7 +352,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.23" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.33" }, "funding": [ { @@ -471,7 +368,7 @@ "type": "tidelift" } ], - "time": "2023-09-18T17:22:01+00:00" + "time": "2023-10-21T14:00:39+00:00" }, { "name": "symfony/deprecation-contracts", diff --git a/migrate/18.sql b/migrate/18.sql new file mode 100644 index 00000000..12a29101 --- /dev/null +++ b/migrate/18.sql @@ -0,0 +1 @@ +ALTER TABLE `mythicaldash_settings` ADD `terms_of_service` LONGTEXT NOT NULL DEFAULT 'Hell this looks like the host did not set up any terms of service please contact the host and if the host does not want to add any terms of service please make sure to report this here.' AFTER `linkvertise_coins`, ADD `privacy_policy` LONGTEXT NOT NULL DEFAULT 'Hell this looks like the host did not set up any privacy policy please contact the host and if the host does not want to add any privacy policy please make sure to report this here.' AFTER `terms_of_service`; \ No newline at end of file diff --git a/public/index.php b/public/index.php index bf762a20..c63c7620 100644 --- a/public/index.php +++ b/public/index.php @@ -55,6 +55,8 @@ include(__DIR__ . '/../routes/earn.php'); //Routes for /admin/api/ include(__DIR__ . '/../routes/admin/api.php'); + //Routes for /admin/servers/ + include(__DIR__ . '/../routes/admin/servers.php'); //Routes for /admin/settings/ include(__DIR__ . '/../routes/admin/settings.php'); //Routes for /admin/redeem/ diff --git a/routes/admin/index.php b/routes/admin/index.php index 72ed4985..6a400be4 100644 --- a/routes/admin/index.php +++ b/routes/admin/index.php @@ -4,4 +4,13 @@ require("../view/admin/tickets/list.php"); }); +$router->add("/admin", function () { + header('location: /admin/overview'); + die(); +}); + +$router->add("/admin/overview", function () { + require("../include/main.php"); + require("../view/admin/main.php"); +}); ?> \ No newline at end of file diff --git a/routes/admin/servers.php b/routes/admin/servers.php new file mode 100644 index 00000000..7b7b2fe6 --- /dev/null +++ b/routes/admin/servers.php @@ -0,0 +1,12 @@ +add("/admin/servers", function () { + require("../include/main.php"); + require("../view/admin/servers/list.php"); +}); + + +$router->add("/admin/server/delete", function () { + require("../include/main.php"); + require("../view/admin/servers/delete.php"); +}); +?> diff --git a/routes/admin/settings.php b/routes/admin/settings.php index 9ad89e51..7150949c 100644 --- a/routes/admin/settings.php +++ b/routes/admin/settings.php @@ -64,4 +64,14 @@ require("../include/main.php"); require("../view/admin/settings/store.php"); }); + +$router->add("/admin/settings/pp", function () { + require("../include/main.php"); + require("../view/admin/settings/pp.php"); +}); + +$router->add("/admin/settings/tos", function () { + require("../include/main.php"); + require("../view/admin/settings/tos.php"); +}); ?> \ No newline at end of file diff --git a/routes/index.php b/routes/index.php index d63ca10b..3e2e5880 100644 --- a/routes/index.php +++ b/routes/index.php @@ -43,4 +43,9 @@ require("../view/blank.php"); }); +$router->add("/leaderboard", function () { + require("../include/main.php"); + require("../view/leaderboard.php"); +}); + ?> \ No newline at end of file diff --git a/view/admin/api/main.php b/view/admin/api/main.php index d666fda5..848caf09 100644 --- a/view/admin/api/main.php +++ b/view/admin/api/main.php @@ -1,5 +1,6 @@