From 896fa7c96856142f844d958b049d5432f511641c Mon Sep 17 00:00:00 2001 From: Minteck Date: Wed, 4 Aug 2021 16:56:12 +0200 Subject: v2.0 --- _site/includes/modules/admin.php | 17 ++++ _site/includes/modules/desktop.php | 40 ++++++++ _site/includes/modules/errors.php | 182 +++++++++++++++++++++++++++++++++++++ _site/includes/modules/github.php | 22 +++++ _site/includes/modules/mobile.php | 38 ++++++++ _site/includes/modules/search.php | 16 ++++ 6 files changed, 315 insertions(+) create mode 100644 _site/includes/modules/admin.php create mode 100644 _site/includes/modules/desktop.php create mode 100644 _site/includes/modules/errors.php create mode 100644 _site/includes/modules/github.php create mode 100644 _site/includes/modules/mobile.php create mode 100644 _site/includes/modules/search.php (limited to '_site/includes/modules') diff --git a/_site/includes/modules/admin.php b/_site/includes/modules/admin.php new file mode 100644 index 0000000..099ea00 --- /dev/null +++ b/_site/includes/modules/admin.php @@ -0,0 +1,17 @@ + +
+ ♥ (Un)Tech + + +
+ \ No newline at end of file diff --git a/_site/includes/modules/errors.php b/_site/includes/modules/errors.php new file mode 100644 index 0000000..ecb640f --- /dev/null +++ b/_site/includes/modules/errors.php @@ -0,0 +1,182 @@ + + + + Something went wrong on UnchainedTech 🌙 + + + +
+

Something went wrong (like, for real!)

+

An error occured and UnchainedTech cannot load right now. Even us can make mistakes sometimes, and because you are really nice you will report this bug.

+

For you, really tech-savvy people, here is that alien language thing you're probably looking for:

+
+#99{$d["type"]}: ";
+
+        $pparts = explode(": ", $d["message"]);
+        array_shift($pparts);
+
+        $parts = explode(" in ", implode(": ", $pparts));
+        echo($parts[0]);
+
+        $stp = explode("\nStack trace:", $parts[1]);
+        echo("\n    at " . $stp[0]);
+
+        $stlines = explode("\n", $stp[1]);
+        array_shift($stlines);
+
+        foreach ($stlines as $stline) {
+            $stpparts = explode(" ", $stline);
+            array_shift($stpparts);
+            $stline = implode(" ", $stpparts);
+
+            if ($stline !== " thrown" && $stline !== "{main}") {
+                $pp2 = explode("(", $stline);
+                $pp2n = explode(")", $pp2[1]);
+
+                echo("\n    at " . $pp2[0] . ":" . $pp2n[0]);
+            } else if ($stline === "{main}") {
+                echo("\n    at UnchainedTech.\$Core (UCT Core " . file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/../version.txt") . ", PHP " . PHP_VERSION . ")");
+            }
+        }
+
+        echo "
+
+
+ + + "; + die(); + } +} + +function customError($errno, $errstr, $errfile = "<unknown file>", $errline = "<unknown line>") { + global $debug; + + ob_clean(); + echo " + + + + Something went wrong on UnchainedTech 🌙 + + + +
+

Something went wrong (like, for real!)

+

An error occured and UnchainedTech cannot load right now. Even us can make mistakes sometimes, and because you are really nice you will report this bug.

+

For you, really tech-savvy people, here is that alien language thing you're probably looking for:

+
+#{$errno}: {$errstr}
+    at {$errfile}:{$errline}
+    at UnchainedTech.\$Core (UCT Core " . file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/../version.txt") . ", PHP " . PHP_VERSION . ")
+
+
+ + + "; + die(); +} +set_error_handler("customError", E_ALL); +register_shutdown_function("customShutdown"); \ No newline at end of file diff --git a/_site/includes/modules/github.php b/_site/includes/modules/github.php new file mode 100644 index 0000000..596d984 --- /dev/null +++ b/_site/includes/modules/github.php @@ -0,0 +1,22 @@ + + UnchainedTech + + + \ No newline at end of file diff --git a/_site/includes/modules/search.php b/_site/includes/modules/search.php new file mode 100644 index 0000000..fe37786 --- /dev/null +++ b/_site/includes/modules/search.php @@ -0,0 +1,16 @@ + \ No newline at end of file -- cgit