-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-> Linkvertise method added -> Added the preloader back
- Loading branch information
Showing
9 changed files
with
264 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE `mythicaldash_settings` ADD `linkvertise_coins` TEXT NOT NULL DEFAULT '5' AFTER `linkvertise_code`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
include(__DIR__ . '/../../requirements/page.php'); | ||
include(__DIR__ . '/../../requirements/admin.php'); | ||
|
||
if (isset($_GET['update_settings'])) { | ||
$enable_ads = mysqli_real_escape_string($conn,$_GET['ads:enabled']); | ||
$ads_code = mysqli_real_escape_string($conn,$_GET['ads:code']); | ||
mysqli_query($conn, "UPDATE `mythicaldash_settings` SET `linkvertise_enabled` = '" . $enable_ads . "' WHERE `mythicaldash_settings`.`id` = 1;"); | ||
mysqli_query($conn, "UPDATE `mythicaldash_settings` SET `linkvertise_code` = '" . $ads_code . "' WHERE `mythicaldash_settings`.`id` = 1;"); | ||
header('location: /admin/settings'); | ||
$conn->close(); | ||
die(); | ||
} else { | ||
header('location: /admin/settings'); | ||
die(); | ||
} | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
<?php | ||
include(__DIR__ . '/../requirements/page.php'); | ||
if ($settings['linkvertise_enabled'] == "false") { | ||
header('location: /'); | ||
} | ||
if (isset($_GET['key'])) { | ||
$key = mysqli_escape_string($conn, $_GET['key']); | ||
$result = mysqli_query($conn, "SELECT * FROM mythicaldash_linkvertise WHERE skey='$key'"); | ||
if (mysqli_num_rows($result) > 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.'); | ||
} | ||
} | ||
?> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title> | ||
<?= $settings['name'] ?> | Linkvertise | ||
</title> | ||
<link rel="icon" href="<?= $settings['logo'] ?>" type="image/png"> | ||
<style> | ||
* { | ||
font-family: Google sans, Arial; | ||
} | ||
|
||
html, | ||
body { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
.flex-container { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100vh; | ||
color: white; | ||
animation: colorSlide 15s cubic-bezier(0.075, 0.82, 0.165, 1) infinite; | ||
} | ||
|
||
.flex-container .text-center { | ||
text-align: center; | ||
} | ||
|
||
.flex-container .text-center h1, | ||
.flex-container .text-center h3 { | ||
margin: 10px; | ||
cursor: default; | ||
} | ||
|
||
.flex-container .text-center h1 .fade-in, | ||
.flex-container .text-center h3 .fade-in { | ||
animation: fadeIn 2s ease infinite; | ||
} | ||
|
||
.flex-container .text-center h1 { | ||
font-size: 8em; | ||
transition: font-size 200ms ease-in-out; | ||
border-bottom: 1px dashed white; | ||
} | ||
|
||
.flex-container .text-center h1 span#digit1 { | ||
animation-delay: 200ms; | ||
} | ||
|
||
.flex-container .text-center h1 span#digit2 { | ||
animation-delay: 300ms; | ||
} | ||
|
||
.flex-container .text-center h1 span#digit3 { | ||
animation-delay: 400ms; | ||
} | ||
|
||
.flex-container .text-center button { | ||
border: 1px solid white; | ||
background: transparent; | ||
outline: none; | ||
padding: 10px 20px; | ||
font-size: 1.1rem; | ||
font-weight: bold; | ||
color: white; | ||
text-transform: uppercase; | ||
transition: background-color 200ms ease-in; | ||
margin: 20px 0; | ||
} | ||
|
||
.flex-container .text-center button:hover { | ||
background-color: white; | ||
color: #555; | ||
cursor: pointer; | ||
} | ||
|
||
@keyframes colorSlide { | ||
0% { | ||
background-color: #152a68; | ||
} | ||
|
||
25% { | ||
background-color: royalblue; | ||
} | ||
|
||
50% { | ||
background-color: seagreen; | ||
} | ||
|
||
75% { | ||
background-color: tomato; | ||
} | ||
|
||
100% { | ||
background-color: #152a68; | ||
} | ||
} | ||
|
||
@keyframes fadeIn { | ||
from { | ||
opacity: 0; | ||
} | ||
|
||
100% { | ||
opacity: 1; | ||
} | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<div class="flex-container"> | ||
<div class="text-center"> | ||
<h1> | ||
<span class="fade-in" id="digit1">Link</span> | ||
<span class="fade-in" id="digit2">ready</span> | ||
</h1> | ||
<h3 class="fadeIn">Please click the continue button to continue</h3> | ||
<?php | ||
$genid = mt_rand(100000000000000, 999999999999999); | ||
$linkid = $genid; | ||
mysqli_query($conn, "INSERT INTO `mythicaldash_linkvertise` (`skey`) VALUES ('" . $linkid . "');"); | ||
$url = "/earn/linkvertise?key=" . $linkid; | ||
echo ' | ||
<a href="' . $url . '"><button type="button" name="button">Continue</button></a> | ||
'; | ||
?> | ||
</div> | ||
</div> | ||
</body> | ||
|
||
</html> | ||
<script src="https://publisher.linkvertise.com/cdn/linkvertise.js"></script> | ||
<script>linkvertise(<?= $settings['linkvertise_code'] ?>, { whitelist: ["<?= $appURL ?>"], blacklist: [] });</script> |