summaryrefslogtreecommitdiff
path: root/_icons
diff options
context:
space:
mode:
authorRaindropsSys <raindrops@equestria.dev>2024-04-04 18:01:01 +0200
committerRaindropsSys <raindrops@equestria.dev>2024-04-04 18:01:01 +0200
commite40246759a367cb23cbdb5467b527f4af7a1438b (patch)
tree1cfddf03b874a08ef63316b57cfd32ab3000c0d0 /_icons
parentf16062c94d5da929be9f0c1e2eb3489ba42a7cd8 (diff)
downloaddelta-e40246759a367cb23cbdb5467b527f4af7a1438b.tar.gz
delta-e40246759a367cb23cbdb5467b527f4af7a1438b.tar.bz2
delta-e40246759a367cb23cbdb5467b527f4af7a1438b.zip
Updated 16 files and deleted 12 files (automated)
Diffstat (limited to '_icons')
-rw-r--r--_icons/index.php43
1 files changed, 8 insertions, 35 deletions
diff --git a/_icons/index.php b/_icons/index.php
index b8e6235..733aa72 100644
--- a/_icons/index.php
+++ b/_icons/index.php
@@ -8,24 +8,8 @@ $palettes = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes
$userPalette = $palettes["list"][$palettes["default"]]["light"];
-if (isset($_PROFILE) && !isset($_COOKIE["DeltaKiosk"])) {
- if (isset($_PROFILE["studio_settings"]) && isset($_PROFILE["studio_settings"]["theme"]) && isset($_PROFILE["ultra"]) && $_PROFILE["ultra"] && isset($palettes["list"][$_PROFILE["studio_settings"]["theme"]])) {
- $userPalette = $palettes["list"][$_PROFILE["studio_settings"]["theme"]][$_PROFILE["studio_settings"]["dark"] === true ? "dark" : "light"];
- }
-}
-
if (isset($_SERVER["HTTP_REFERER"]) && isset($_PROFILE)) {
$id = preg_replace("/^http(s|):\/\/.*\/(edit|profiles)\/([\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12})$/i", "$3", $_SERVER['HTTP_REFERER']);
-
- if (isset($id) && trim($id) !== "") {
- if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/profiles/" . $id . ".json")) {
- $_ = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/profiles/" . $id . ".json"), true);
-
- if (isset($_["ultra"]) && $_["ultra"] && isset($_["studio_settings"]) && isset($_["studio_settings"]["profile"]["theme"]) && $_["studio_settings"]["profile"]["theme"] !== -1 && isset($palettes["list"][$_["studio_settings"]["profile"]["theme"]])) {
- $userPalette = $palettes["list"][$_["studio_settings"]["profile"]["theme"]][!isset($_COOKIE["DeltaKiosk"]) && $_PROFILE["studio_settings"]["dark"] === true ? "dark" : "light"];
- }
- }
- }
}
if (isset($_GET["__"]) && trim($_GET["__"]) !== "") {
@@ -34,28 +18,17 @@ if (isset($_GET["__"]) && trim($_GET["__"]) !== "") {
if (str_contains("/", $name)) die();
if (!file_exists($_SERVER['DOCUMENT_ROOT'] . "/_icons/" . $name)) die();
- if (isset($_COOKIE["DeltaHandoffPalette"]) || isset($userPalette)) {
- $palette = explode(",", $_COOKIE["DeltaHandoffPalette"] ?? $userPalette);
+ if (isset($userPalette)) {
+ $palette = explode(",", $userPalette);
if (count($palette) > 0) {
- if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/_icons/_mdi/" . $name) && isset($_COOKIE["DeltaHandoffPalette"])) {
- header("Content-Type: " . mime_content_type($_SERVER['DOCUMENT_ROOT'] . "/_icons/_mdi/" . $name));
- header("Content-Length: " . filesize($_SERVER['DOCUMENT_ROOT'] . "/_icons/_mdi/" . $name));
+ header("Content-Type: " . mime_content_type($_SERVER['DOCUMENT_ROOT'] . "/_icons/" . $name));
+ header("Content-Length: " . filesize($_SERVER['DOCUMENT_ROOT'] . "/_icons/" . $name));
- if (isset($_GET['p'])) {
- echo(str_replace('fill="#084298"', 'fill="#' . $palette[0] . '"', str_replace('fill="#000000"', 'fill="#' . $palette[9] . '"', file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/_icons/_mdi/" . $name))));
- } else {
- echo(str_replace('fill="#084298"', 'fill="#' . $palette[0] . '"', str_replace('fill="#000000"', 'fill="#' . $palette[6] . '"', file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/_icons/_mdi/" . $name))));
- }
+ if (isset($_GET['p'])) {
+ echo(str_replace('fill="#084298"', 'fill="#' . $palette[0] . '"', str_replace('fill="#000000"', 'fill="#' . $palette[9] . '"', file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/_icons/" . $name))));
} else {
- header("Content-Type: " . mime_content_type($_SERVER['DOCUMENT_ROOT'] . "/_icons/" . $name));
- header("Content-Length: " . filesize($_SERVER['DOCUMENT_ROOT'] . "/_icons/" . $name));
-
- if (isset($_GET['p'])) {
- echo(str_replace('fill="#084298"', 'fill="#' . $palette[0] . '"', str_replace('fill="#000000"', 'fill="#' . $palette[9] . '"', file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/_icons/" . $name))));
- } else {
- echo(str_replace('fill="#084298"', 'fill="#' . $palette[0] . '"', str_replace('fill="#000000"', 'fill="#' . $palette[6] . '"', file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/_icons/" . $name))));
- }
+ echo(str_replace('fill="#084298"', 'fill="#' . $palette[0] . '"', str_replace('fill="#000000"', 'fill="#' . $palette[6] . '"', file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/_icons/" . $name))));
}
} else {
header("Content-Type: " . mime_content_type($_SERVER['DOCUMENT_ROOT'] . "/_icons/" . $name));
@@ -69,4 +42,4 @@ if (isset($_GET["__"]) && trim($_GET["__"]) !== "") {
readfile($_SERVER['DOCUMENT_ROOT'] . "/_icons/" . $name);
}
-} \ No newline at end of file
+}