diff --git a/migrate/10.sql b/migrate/10.sql new file mode 100644 index 00000000..07c6ef58 --- /dev/null +++ b/migrate/10.sql @@ -0,0 +1 @@ +ALTER TABLE `mythicaldash_settings` ADD `customhead_enabled` ENUM('false','true') NOT NULL DEFAULT 'true' AFTER `customcss_code`, ADD `customhead_code` TEXT NOT NULL DEFAULT '' AFTER `customhead_enabled`; \ No newline at end of file diff --git a/migrate/8.sql b/migrate/8.sql new file mode 100644 index 00000000..9895f98e --- /dev/null +++ b/migrate/8.sql @@ -0,0 +1 @@ +ALTER TABLE `mythicaldash_settings` CHANGE `version` `version` TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '\'2.0.1\''; \ No newline at end of file diff --git a/migrate/9.sql b/migrate/9.sql new file mode 100644 index 00000000..bc945c44 --- /dev/null +++ b/migrate/9.sql @@ -0,0 +1 @@ +ALTER TABLE `mythicaldash_settings` ADD `customcss_enabled` ENUM('false','true') NOT NULL DEFAULT 'false' AFTER `ads_code`, ADD `customcss_code` TEXT NOT NULL DEFAULT '.body { height: unset; }' AFTER `customcss_enabled`; \ No newline at end of file diff --git a/public/index.php b/public/index.php index 09c9346a..8a097490 100644 --- a/public/index.php +++ b/public/index.php @@ -290,6 +290,16 @@ require("../view/admin/settings/ads.php"); }); + $router->add("/admin/settings/customcss", function () { + require("../include/main.php"); + require("../view/admin/settings/customcss.php"); + }); + + $router->add("/admin/settings/customhead", function () { + require("../include/main.php"); + require("../view/admin/settings/customhead.php"); + }); + $router->add("/admin/settings/pterodactyl", function () { require("../include/main.php"); require("../view/admin/settings/pterodactyl.php"); diff --git a/view/admin/settings/customcss.php b/view/admin/settings/customcss.php new file mode 100644 index 00000000..900e8b67 --- /dev/null +++ b/view/admin/settings/customcss.php @@ -0,0 +1,17 @@ +close(); + die(); +} else { + header('location: /admin/settings'); + die(); +} +?> \ No newline at end of file diff --git a/view/admin/settings/customhead.php b/view/admin/settings/customhead.php new file mode 100644 index 00000000..33b38203 --- /dev/null +++ b/view/admin/settings/customhead.php @@ -0,0 +1,17 @@ +close(); + die(); +} else { + header('location: /admin/settings'); + die(); +} +?> \ No newline at end of file diff --git a/view/admin/settings/main.php b/view/admin/settings/main.php index 44951be0..a1832bb3 100644 --- a/view/admin/settings/main.php +++ b/view/admin/settings/main.php @@ -524,6 +524,104 @@ class="btn btn-primary me-2 waves-effect waves-light" value="true">Save +