From: bochard Date: Mon, 28 Apr 2025 01:53:11 +0000 (+0800) Subject: added multiple error pages X-Git-Url: https://git.bochard.net/?a=commitdiff_plain;h=81fd53dc6b0fe32aa494a1cd43010a409b171243;p=mysite.git added multiple error pages --- diff --git a/.htaccess b/.htaccess index a9e3f3d..a3f4092 100644 --- a/.htaccess +++ b/.htaccess @@ -5,6 +5,10 @@ RewriteCond %{HTTP_HOST} ^www\.tenkyuu\.dev [NC] RewriteRule ^(.*)$ http://tenkyuu.dev/$1 [R=301,L] #error pages -ErrorDocument 404 /error_docs/404.html +ErrorDocument 401 /error_docs/401.html ErrorDocument 403 /error_docs/403.html -ErrorDocument 500 /error_docs/500.html \ No newline at end of file +ErrorDocument 404 /error_docs/404.html +ErrorDocument 500 /error_docs/500.html +ErrorDocument 502 /error_docs/502.html +ErrorDocument 503 /error_docs/503.html +ErrorDocument 504 /error_docs/504.html \ No newline at end of file diff --git a/error_docs/401.html b/error_docs/401.html new file mode 100644 index 0000000..204546b --- /dev/null +++ b/error_docs/401.html @@ -0,0 +1,17 @@ + + + + + + + + page doesn't exist!! + + +

This page requires authenticaion!

+

Are you just trying to access this page? Smells fishy, huh?!

+ + back to home + + + \ No newline at end of file diff --git a/error_docs/502.html b/error_docs/502.html new file mode 100644 index 0000000..e8e701d --- /dev/null +++ b/error_docs/502.html @@ -0,0 +1,17 @@ + + + + + + + + page doesn't exist!! + + +

The Gateway is BADASS.

+

There's a gate problem, it won't budge. It might been stuck.

+ + back to home + + + \ No newline at end of file diff --git a/error_docs/503.html b/error_docs/503.html new file mode 100644 index 0000000..38b5d52 --- /dev/null +++ b/error_docs/503.html @@ -0,0 +1,17 @@ + + + + + + + + page doesn't exist!! + + +

Service is unavailable for some reason...

+

Wait, the waiter is still serving other people. Give some time to him, he's doing his best.

+ + back to home + + + \ No newline at end of file diff --git a/error_docs/504.html b/error_docs/504.html new file mode 100644 index 0000000..2a1129b --- /dev/null +++ b/error_docs/504.html @@ -0,0 +1,17 @@ + + + + + + + + page doesn't exist!! + + +

You're too slow.

+

The gate has a timer, you didn't reached it.

+ + back to home + + + \ No newline at end of file diff --git a/files/bg_music/another_folder/index.php b/files/bg_music/another_folder/index.php deleted file mode 100644 index 1067e45..0000000 --- a/files/bg_music/another_folder/index.php +++ /dev/null @@ -1,42 +0,0 @@ -"; - echo "Index of $fullPath"; - echo ""; - echo "

Index of $fullPath


";
-    echo '../' . PHP_EOL;
-
-    $items = [];
-    while (false !== ($entry = readdir($handle))) {
-        if ($entry != "." && $entry != ".." && $entry != "index.php") {
-            $items[] = $entry;
-        }
-    }
-    closedir($handle);
-
-    sort($items);
-
-    foreach ($items as $entry) {
-        $filePath = "./" . $entry;
-        $lastModified = date("d-M-Y H:i", filemtime($filePath));
-        $size = is_dir($filePath) ? "-" : filesize($filePath);
-        $link = htmlspecialchars($entry);
-
-        if (is_dir($filePath)) {
-            $link .= '/';
-        }
-
-        echo "$link" . str_repeat(" ", 50 - strlen($link)) . "$lastModified" . str_repeat(" ", 10 - strlen($size)) . "$size" . PHP_EOL;
-    }
-
-    echo "

"; - echo ""; - echo ""; -} else { - echo "Unable to open directory."; -} -?> \ No newline at end of file diff --git a/files/bg_music/childhood2.mp3 b/files/bg_music/childhood2.mp3 deleted file mode 100755 index 068a74e..0000000 Binary files a/files/bg_music/childhood2.mp3 and /dev/null differ diff --git a/files/bg_music/index.php b/files/bg_music/index.php deleted file mode 100644 index 1067e45..0000000 --- a/files/bg_music/index.php +++ /dev/null @@ -1,42 +0,0 @@ -"; - echo "Index of $fullPath"; - echo ""; - echo "

Index of $fullPath


";
-    echo '../' . PHP_EOL;
-
-    $items = [];
-    while (false !== ($entry = readdir($handle))) {
-        if ($entry != "." && $entry != ".." && $entry != "index.php") {
-            $items[] = $entry;
-        }
-    }
-    closedir($handle);
-
-    sort($items);
-
-    foreach ($items as $entry) {
-        $filePath = "./" . $entry;
-        $lastModified = date("d-M-Y H:i", filemtime($filePath));
-        $size = is_dir($filePath) ? "-" : filesize($filePath);
-        $link = htmlspecialchars($entry);
-
-        if (is_dir($filePath)) {
-            $link .= '/';
-        }
-
-        echo "$link" . str_repeat(" ", 50 - strlen($link)) . "$lastModified" . str_repeat(" ", 10 - strlen($size)) . "$size" . PHP_EOL;
-    }
-
-    echo "

"; - echo ""; - echo ""; -} else { - echo "Unable to open directory."; -} -?> \ No newline at end of file diff --git a/files/bg_music/rejectedworld.mp3 b/files/bg_music/rejectedworld.mp3 deleted file mode 100755 index 4c624ef..0000000 Binary files a/files/bg_music/rejectedworld.mp3 and /dev/null differ diff --git a/files/index.php b/files/index.php index 1067e45..3921ebc 100755 --- a/files/index.php +++ b/files/index.php @@ -4,39 +4,39 @@ $urlPath = rtrim($urlPath, "/"); $fullPath = $urlPath === "" ? "/" : $urlPath; if ($handle = opendir(".")) { - echo ""; - echo "Index of $fullPath"; - echo ""; - echo "

Index of $fullPath


";
-    echo '../' . PHP_EOL;
+  echo "";
+  echo "Index of $fullPath";
+  echo "";
+  echo "

Index of $fullPath


";
+  echo '../' . PHP_EOL;
 
-    $items = [];
-    while (false !== ($entry = readdir($handle))) {
-        if ($entry != "." && $entry != ".." && $entry != "index.php") {
-            $items[] = $entry;
-        }
+  $items = [];
+  while (false !== ($entry = readdir($handle))) {
+    if ($entry != "." && $entry != ".." && $entry != "index.php") {
+      $items[] = $entry;
     }
-    closedir($handle);
+  }
+  closedir($handle);
 
-    sort($items);
+  sort($items);
 
-    foreach ($items as $entry) {
-        $filePath = "./" . $entry;
-        $lastModified = date("d-M-Y H:i", filemtime($filePath));
-        $size = is_dir($filePath) ? "-" : filesize($filePath);
-        $link = htmlspecialchars($entry);
+  foreach ($items as $entry) {
+    $filePath = "./" . $entry;
+    $lastModified = date("d-M-Y H:i", filemtime($filePath));
+    $size = is_dir($filePath) ? "-" : filesize($filePath);
+    $link = htmlspecialchars($entry);
 
-        if (is_dir($filePath)) {
-            $link .= '/';
-        }
-
-        echo "$link" . str_repeat(" ", 50 - strlen($link)) . "$lastModified" . str_repeat(" ", 10 - strlen($size)) . "$size" . PHP_EOL;
+    if (is_dir($filePath)) {
+      $link .= '/';
     }
 
-    echo "

"; - echo ""; - echo ""; + echo "$link" . str_repeat(" ", 50 - strlen($link)) . "$lastModified" . str_repeat(" ", 10 - strlen($size)) . "$size" . PHP_EOL; + } + + echo "

"; + echo ""; + echo ""; } else { - echo "Unable to open directory."; + echo "Unable to open directory."; } ?> \ No newline at end of file diff --git a/files/musics/childhood2.mp3 b/files/musics/childhood2.mp3 new file mode 100755 index 0000000..068a74e Binary files /dev/null and b/files/musics/childhood2.mp3 differ diff --git a/files/musics/index.php b/files/musics/index.php new file mode 100644 index 0000000..59ec2e4 --- /dev/null +++ b/files/musics/index.php @@ -0,0 +1,5 @@ + + \ No newline at end of file diff --git a/files/musics/rejectedworld.mp3 b/files/musics/rejectedworld.mp3 new file mode 100755 index 0000000..4c624ef Binary files /dev/null and b/files/musics/rejectedworld.mp3 differ diff --git a/files/musics/sfx/index.php b/files/musics/sfx/index.php new file mode 100644 index 0000000..59ec2e4 --- /dev/null +++ b/files/musics/sfx/index.php @@ -0,0 +1,5 @@ + + \ No newline at end of file diff --git a/files/wallpapers/index.php b/files/wallpapers/index.php index 1067e45..59ec2e4 100644 --- a/files/wallpapers/index.php +++ b/files/wallpapers/index.php @@ -1,42 +1,5 @@ "; - echo "Index of $fullPath"; - echo ""; - echo "

Index of $fullPath


";
-    echo '../' . PHP_EOL;
-
-    $items = [];
-    while (false !== ($entry = readdir($handle))) {
-        if ($entry != "." && $entry != ".." && $entry != "index.php") {
-            $items[] = $entry;
-        }
-    }
-    closedir($handle);
-
-    sort($items);
-
-    foreach ($items as $entry) {
-        $filePath = "./" . $entry;
-        $lastModified = date("d-M-Y H:i", filemtime($filePath));
-        $size = is_dir($filePath) ? "-" : filesize($filePath);
-        $link = htmlspecialchars($entry);
-
-        if (is_dir($filePath)) {
-            $link .= '/';
-        }
-
-        echo "$link" . str_repeat(" ", 50 - strlen($link)) . "$lastModified" . str_repeat(" ", 10 - strlen($size)) . "$size" . PHP_EOL;
-    }
-
-    echo "

"; - echo ""; - echo ""; -} else { - echo "Unable to open directory."; -} -?> \ No newline at end of file + $path = $_SERVER['DOCUMENT_ROOT']; + $path .= '/files'; +?> + \ No newline at end of file