From d6e352a0ddb9090462cd5c4fe73321ad4b4f8a65 Mon Sep 17 00:00:00 2001 From: NaysKutzu Date: Wed, 18 Oct 2023 21:16:48 +0000 Subject: [PATCH] PUSH -> Linkvertise method added -> Added the preloader bage --- migrate/11.sql | 1 + migrate/12.sql | 1 + migrate/13.sql | 1 + public/index.php | 10 ++ view/admin/settings/linkvertise.php | 17 +++ view/admin/settings/main.php | 70 ++++++++++-- view/components/sidebar.php | 9 ++ view/dashboard.php | 12 +-- view/earn/linkvertise.php | 159 ++++++++++++++++++++++++++++ 9 files changed, 264 insertions(+), 16 deletions(-) create mode 100644 migrate/11.sql create mode 100644 migrate/12.sql create mode 100644 migrate/13.sql create mode 100644 view/admin/settings/linkvertise.php create mode 100644 view/earn/linkvertise.php diff --git a/migrate/11.sql b/migrate/11.sql new file mode 100644 index 00000000..e06e0781 --- /dev/null +++ b/migrate/11.sql @@ -0,0 +1 @@ +CREATE TABLE `mythicaldash`.`mythicaldash_linkvertise` (`id` INT NOT NULL AUTO_INCREMENT , `skey` TEXT NOT NULL , `date` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`)) ENGINE = InnoDB; \ No newline at end of file diff --git a/migrate/12.sql b/migrate/12.sql new file mode 100644 index 00000000..462238ed --- /dev/null +++ b/migrate/12.sql @@ -0,0 +1 @@ +ALTER TABLE `mythicaldash_settings` ADD `linkvertise_enabled` ENUM('false','true') NOT NULL DEFAULT 'false' AFTER `customhead_code`, ADD `linkvertise_code` TEXT NOT NULL AFTER `linkvertise_enabled`; \ No newline at end of file diff --git a/migrate/13.sql b/migrate/13.sql new file mode 100644 index 00000000..ba8456ef --- /dev/null +++ b/migrate/13.sql @@ -0,0 +1 @@ +ALTER TABLE `mythicaldash_settings` ADD `linkvertise_coins` TEXT NOT NULL DEFAULT '5' AFTER `linkvertise_code`; \ No newline at end of file diff --git a/public/index.php b/public/index.php index 8a097490..ecda5ee2 100644 --- a/public/index.php +++ b/public/index.php @@ -240,6 +240,11 @@ require("../view/earn/afk.php"); }); + $router->add("/earn/linkvertise", function () { + require("../include/main.php"); + require("../view/earn/linkvertise.php"); + }); + $router->add("/earn/redeem", function () { require("../include/main.php"); require("../view/earn/redeem.php"); @@ -270,6 +275,11 @@ require("../view/admin/settings/discord.php"); }); + $router->add("/admin/settings/linkvertise", function () { + require("../include/main.php"); + require("../view/admin/settings/linkvertise.php"); + }); + $router->add("/admin/settings/mail", function () { require("../include/main.php"); require("../view/admin/settings/mail.php"); diff --git a/view/admin/settings/linkvertise.php b/view/admin/settings/linkvertise.php new file mode 100644 index 00000000..4a99ad00 --- /dev/null +++ b/view/admin/settings/linkvertise.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 a1832bb3..0c81b14f 100644 --- a/view/admin/settings/main.php +++ b/view/admin/settings/main.php @@ -19,9 +19,9 @@ -
-
-
+
+
+
@@ -145,7 +145,8 @@ class="btn btn-primary me-2 waves-effect waves-light" value="true">Save
+ name="discord:client_secret" + value="">
@@ -241,12 +242,13 @@ class="btn btn-primary me-2 waves-effect waves-light" value="true">Save
- +
- +
-
ADS
+
Ads

@@ -508,11 +510,59 @@ class="btn btn-primary me-2 waves-effect waves-light" value="true">Save
- + +
+
+
+
+
+ + Cancel +
+ +
+ +
+
Linkvertise
+
+
+
+
+
+ +
+ + + + + +
+
+ +
+ +
+
+
+

diff --git a/view/components/sidebar.php b/view/components/sidebar.php index a232edc3..6d35fcac 100644 --- a/view/components/sidebar.php +++ b/view/components/sidebar.php @@ -58,6 +58,15 @@ function is_active_page($page_urls)
Redeem
+ + +
- +
@@ -212,7 +212,7 @@ function percentage($number, $total, $outof)

- Delete

- 0) { + $usr_coins = $userdb['coins']; + $newcoins = $usr_coins + $settings['linkvertise_coins']; + $conn->query("UPDATE `mythicaldash_users` SET `coins` = '" . $newcoins . "' WHERE `mythicaldash_users`.`api_key` = '" . mysqli_real_escape_string($conn, $_COOKIE["token"])."'"); + $conn->query("DELETE FROM mythicaldash_linkvertise WHERE skey='$key'"); + header('location: /'); + } else { + header('location: /dashboard?e=Error: Key not found.'); + } +} +?> + + + + + + + + <?= $settings['name'] ?> | Linkvertise + + + + + + +
+
+

+ Link + ready +

+

Please click the continue button to continue

+ + '; + ?> +
+
+ + + + + \ No newline at end of file