Skip to content

Commit

Permalink
PUSH
Browse files Browse the repository at this point in the history
-> Removed due to problems
  • Loading branch information
NaysKutzu committed Nov 4, 2023
1 parent 7a63c33 commit d512465
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 9 deletions.
2 changes: 1 addition & 1 deletion app/DiscordWebHookHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use Atakde\DiscordWebhook\DiscordWebhook;
use Atakde\DiscordWebhook\Message\MessageFactory;

class DiscordWebhookHandler
class DiscordWebHookHandler
{
public static function NewAccount($appURL, $username, $avatar, $first_name, $last_name, $email, $ip)
{
Expand Down
2 changes: 0 additions & 2 deletions crons/server.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php echo "====== MythicalDash queue ======\n\n";
use MythicalDash\DiscordWebhookHandler;
use MythicalDash\SettingsManager;

echo "[INFO/loader] Loading files...\n";
Expand Down Expand Up @@ -96,7 +95,6 @@
$environment[$settingName] = $settingValue;
}
}
DiscordWebhookHandler::NewServer($appURL,$server['name']);
$panelcurl = curl_init(SettingsManager::getSetting("PterodactylURL") . "/api/application/servers");
$postfields = array(
'name' => $server['name'],
Expand Down
2 changes: 0 additions & 2 deletions view/auth/login.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php
use MythicalDash\CloudFlare\Captcha;
use MythicalDash\DiscordWebhookHandler;
use MythicalDash\ErrorHandler;
use MythicalDash\SettingsManager;
use MythicalDash\SessionManager;
Expand Down Expand Up @@ -76,7 +75,6 @@
$cookie_name = 'token';
$cookie_value = $token;
setcookie($cookie_name, $cookie_value, time() + (10 * 365 * 24 * 60 * 60), '/');
DiscordWebhookHandler::NewLogin($appURL,$row['username'],$row['email'], $row['avatar'],$session->getIP());
$conn->query("UPDATE `mythicaldash_users` SET `last_ip` = '" . $session->getIP() . "' WHERE `mythicaldash_users`.`api_key` = '" . $usr_id . "';");
if (isset($_GET['r'])) {
header('location: ' . $_GET['r']);
Expand Down
2 changes: 0 additions & 2 deletions view/auth/register.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php
use MythicalDash\CloudFlare\Captcha;
use MythicalDash\DiscordWebhookHandler;
use MythicalDash\ErrorHandler;
use MythicalDash\SettingsManager;
use MythicalDash\Encryption;
Expand Down Expand Up @@ -182,7 +181,6 @@
unlink("FIRST_USER");
}
Telemetry::NewUser();
DiscordWebhookHandler::NewAccount($appURL, $grav_url ,$username, $first_name, $last_name, $email, $session->getIP());
header('location: /auth/login');
die();
} else {
Expand Down
2 changes: 0 additions & 2 deletions view/tickets/new.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php
use MythicalDash\DiscordWebhookHandler;
use MythicalDash\Encryption;

include(__DIR__ . '/../requirements/page.php');
Expand All @@ -10,7 +9,6 @@
$description = mysqli_real_escape_string($conn, $_GET['description']);
$attachment = mysqli_real_escape_string($conn, $_GET['attachment']);
$api_key = mysqli_real_escape_string($conn, $_COOKIE['token']);
DiscordWebhookHandler::NewTicket($appURL, $subject, $priority, $description, $attachment);
$conn->query("INSERT INTO `mythicaldash_tickets` (`ownerkey`, `ticketuuid`, `subject`, `priority`, `description`, `attachment`) VALUES ('" . $api_key . "', '" . Encryption::generate_keynoinfo() . "', '" . $subject . "', '" . $priority . "', '" . $description . "', '" . $attachment . "');");
$conn->close();
header('location: /help-center/tickets');
Expand Down

0 comments on commit d512465

Please sign in to comment.