From 17308334b0ffabd11133e35a2e89e2e87d4a0575 Mon Sep 17 00:00:00 2001 From: NaysKutzu Date: Sat, 9 Dec 2023 14:35:34 +0000 Subject: [PATCH] PUSH -> Snow UPDATE -> Fixed tickets bug -> Updated register to show the eror -> Fixed the mysql connection alr close -> And bug fixes --- migrate/47.sql | 1 + migrate/48.sql | 1 + view/admin/settings/general.php | 10 ++++++- view/admin/settings/main.php | 25 ++++++++++++++++- view/auth/forgot-password.php | 9 +++++-- view/auth/login.php | 5 ++++ view/auth/register.php | 7 ++++- view/auth/reset-password.php | 7 ++++- view/blank.php | 7 +++++ view/components/snow.php | 48 +++++++++++++++++++++++++++++++++ view/dashboard.php | 5 ++++ view/earn/afk.php | 14 +++++++--- view/earn/linkvertise.php | 5 ++++ view/earn/redeem.php | 25 ++++++++++------- view/errors/401.php | 6 +++++ view/errors/404.php | 6 +++++ view/errors/adblock.php | 9 ++++++- view/errors/maintenance.php | 5 ++++ view/help-center.php | 5 ++++ view/leaderboard.php | 5 ++++ view/legal/privacypolicy.php | 5 ++++ view/legal/termsofservice.php | 5 ++++ view/server/create.php | 5 ++++ view/server/edit.php | 5 ++++ view/store.php | 5 ++++ view/stripe/buy_coins.php | 7 ++++- view/stripe/cancel.php | 1 - view/tickets/chat.php | 5 ++++ view/tickets/list.php | 5 ++++ view/user/connections.php | 5 ++++ view/user/edit.php | 5 ++++ view/user/list.php | 5 ++++ view/user/payments.php | 5 ++++ view/user/profile.php | 5 ++++ 34 files changed, 250 insertions(+), 23 deletions(-) create mode 100644 migrate/47.sql create mode 100644 migrate/48.sql create mode 100644 view/components/snow.php diff --git a/migrate/47.sql b/migrate/47.sql new file mode 100644 index 0000000..0c9514d --- /dev/null +++ b/migrate/47.sql @@ -0,0 +1 @@ +ALTER TABLE `mythicaldash_settings` ADD `show_snow` ENUM('true','false') NOT NULL DEFAULT 'true' AFTER `maintenance`; \ No newline at end of file diff --git a/migrate/48.sql b/migrate/48.sql new file mode 100644 index 0000000..962e791 --- /dev/null +++ b/migrate/48.sql @@ -0,0 +1 @@ +UPDATE `mythicaldash_settings` SET `version` = '3.1.1' WHERE `mythicaldash_settings`.`id` = 1; diff --git a/view/admin/settings/general.php b/view/admin/settings/general.php index 58223ae..2affa37 100644 --- a/view/admin/settings/general.php +++ b/view/admin/settings/general.php @@ -6,9 +6,17 @@ if (isset($_GET['update_settings'])) { $name = mysqli_real_escape_string($conn, $_GET['app:name']); $logo = mysqli_real_escape_string($conn, $_GET['app:logo']); + $snow = mysqli_real_escape_string($conn, $_GET['app:snow']); + mysqli_query($conn, "UPDATE `mythicaldash_settings` SET `name` = '" . $name . "' WHERE `mythicaldash_settings`.`id` = 1;"); mysqli_query($conn, "UPDATE `mythicaldash_settings` SET `logo` = '" . $logo . "' WHERE `mythicaldash_settings`.`id` = 1;"); - header('location: /admin/settings?s=We updated the settings inside the database'); + mysqli_query($conn, "UPDATE `mythicaldash_settings` SET `show_snow` = '" . $snow . "' WHERE `mythicaldash_settings`.`id` = 1;"); + + if ($snow == "false") { + header('location: /admin/settings?e=Well it looks like you are grinch!'); + } else { + header('location: /admin/settings?s=We updated the settings inside the database'); + } $conn->close(); die(); } else { diff --git a/view/admin/settings/main.php b/view/admin/settings/main.php index 9768d09..c2caa75 100644 --- a/view/admin/settings/main.php +++ b/view/admin/settings/main.php @@ -42,7 +42,7 @@
-
+
" @@ -53,6 +53,29 @@ " autofocus="">
+
+ +
+ + + + + + +
+