From: David Polakovic
+
++ +
+
diff --git a/clicky-images.js b/clicky-images.js
index 16a3f0d..1748501 100644
--- a/clicky-images.js
+++ b/clicky-images.js
@@ -32,13 +32,26 @@ const dpoImg = document.getElementById("toggleImagedpo");
// Track key state
const keysPressed = {};
-// Helper function to check for redirect
+// Determine if we're on index.php
+const isIndexPage = window.location.pathname.endsWith('index.php') ||
+ window.location.pathname.endsWith('/') ||
+ window.location.pathname === '/index.php';
+
+// Helper function to check for redirect or image change
function checkRedirect(clickedKey) {
const requiredKeys = [".", "d", " "];
const otherKeys = requiredKeys.filter(k => k !== clickedKey);
if (keysPressed[otherKeys[0]] && keysPressed[otherKeys[1]]) {
- window.location.href = "https://www.dpolakovic.space/ro";
+ if (isIndexPage) {
+ // Redirect to index2.php if on index.php
+ window.location.href = "index2.php";
+ } else {
+ // Change space image to space3.png on other pages
+ if (spaceImg) {
+ spaceImg.src = "./Pictures/space2.png";
+ }
+ }
}
}
@@ -46,31 +59,33 @@ function checkRedirect(clickedKey) {
if (dotImg) {
dotImg.addEventListener("mousedown", () => {
dotImg.src = "./Pictures/dot2.png";
+ keysPressed["."] = true;
checkRedirect(".");
});
-
dotImg.addEventListener("mouseup", () => {
dotImg.src = "./Pictures/dot.png";
+ delete keysPressed["."];
});
-
dotImg.addEventListener("mouseleave", () => {
dotImg.src = "./Pictures/dot.png";
+ delete keysPressed["."];
});
}
// Mouse behavior for space
if (spaceImg) {
spaceImg.addEventListener("mousedown", () => {
- spaceImg.src = "../Pictures/space2.png";
+ spaceImg.src = "./Pictures/space2.png";
+ keysPressed[" "] = true;
checkRedirect(" ");
});
-
spaceImg.addEventListener("mouseup", () => {
spaceImg.src = "./Pictures/space.png";
+ delete keysPressed[" "];
});
-
spaceImg.addEventListener("mouseleave", () => {
spaceImg.src = "./Pictures/space.png";
+ delete keysPressed[" "];
});
}
@@ -78,22 +93,23 @@ if (spaceImg) {
if (dpoImg) {
dpoImg.addEventListener("mousedown", () => {
dpoImg.src = "./Pictures/dpo2.png";
+ keysPressed["d"] = true;
checkRedirect("d");
});
-
dpoImg.addEventListener("mouseup", () => {
dpoImg.src = "./Pictures/dpolakovic.png";
+ delete keysPressed["d"];
});
-
dpoImg.addEventListener("mouseleave", () => {
dpoImg.src = "./Pictures/dpolakovic.png";
+ delete keysPressed["d"];
});
}
// Keyboard behavior
document.addEventListener("keydown", (event) => {
keysPressed[event.key] = true;
-
+
if (dotImg && event.key === ".") {
dotImg.src = "./Pictures/dot2.png";
}
@@ -103,16 +119,24 @@ document.addEventListener("keydown", (event) => {
if (dpoImg && event.key === "d") {
dpoImg.src = "./Pictures/dpo2.png";
}
-
+
// Check if all three keys are pressed
if (keysPressed["."] && keysPressed["d"] && keysPressed[" "]) {
- window.location.href = "https://www.dpolakovic.space/ro";
+ if (isIndexPage) {
+ // Redirect to index2.php if on index.php
+ window.location.href = "index2.php";
+ } else {
+ // Change space image to space3.png on other pages
+ if (spaceImg) {
+ spaceImg.src = "./Pictures/space2.png";
+ }
+ }
}
});
document.addEventListener("keyup", (event) => {
delete keysPressed[event.key];
-
+
if (dotImg && event.key === ".") {
dotImg.src = "./Pictures/dot.png";
}
diff --git a/dead-drop.php b/dead-drop.php
index a087261..e09d50c 100755
--- a/dead-drop.php
+++ b/dead-drop.php
@@ -74,14 +74,7 @@
- This web page uses limited JavaScript;
- read the
- source code
- for more information.
- Last update on .
+
diff --git a/dir.php b/dir.php
index b71fc55..fd7efb0 100755
--- a/dir.php
+++ b/dir.php
@@ -111,7 +111,7 @@
Floppydisk.com
- new and refurbished floppies for okay prices [3]
Starring the computer
- - all computers from silver screen
+ - all computers from the silver screen
Retrojunk.com
- center of old, forgotten and some lost media
UESP wiki
@@ -133,14 +133,7 @@
- This web page uses limited JavaScript;
- read the
- source code
- for more information.
- Last update on .
+
diff --git a/error/error.php b/error/error.php
new file mode 100644
index 0000000..4a4599f
--- /dev/null
+++ b/error/error.php
@@ -0,0 +1,308 @@
+ [
+ 'title' => '100: Continue',
+ 'message' => 'Begin you may. Ready to receive more, the server is.'
+ ],
+ '101' => [
+ 'title' => '101: Switching Protocols',
+ 'message' => 'Switch protocols, we shall. Agreed to your upgrade request, the server has.'
+ ],
+ '102' => [
+ 'title' => '102: Processing',
+ 'message' => 'Processing your request, we are. Patience you must have. Time, this will take.'
+ ],
+ '103' => [
+ 'title' => '103: Early Hints',
+ 'message' => 'Early hints, I give you. While the response prepares, preload resources you can.'
+ ],
+
+ // *******
+ // * 200 *
+ // *******
+ '200' => [
+ 'title' => '200: OK',
+ 'message' => 'What you sought, received you have.'
+ ],
+ '201' => [
+ 'title' => '201: Created',
+ 'message' => 'Created, a new resource has been.'
+ ],
+ '202' => [
+ 'title' => '202: Accepted',
+ 'message' => 'Accepted for processing, your request is. Complete yet, it is not. Patience, you must have.'
+ ],
+ '203' => [
+ 'title' => '203: Non-Authoritative Information',
+ 'message' => 'Information you receive, but from the source directly, it comes not. Trust it carefully, you should.'
+ ],
+ '204' => [
+ 'title' => '204: No Content',
+ 'message' => 'Successful, your request was. But content to show you, there is none.'
+ ],
+ '205' => [
+ 'title' => '205: Reset Content',
+ 'message' => 'Reset your view, you must. Successful the request was, but refresh your document, you should.'
+ ],
+ '206' => [
+ 'title' => '206: Partial Content',
+ 'message' => 'Only part of what you requested, delivered it is. The rest, await it does.'
+ ],
+ '207' => [
+ 'title' => '207: Multi-Status',
+ 'message' => 'Multiple operations performed, we have. Different outcomes, each one has.'
+ ],
+ '208' => [
+ 'title' => '208: Already Reported',
+ 'message' => 'Already reported in this response, these results were. Repeat them, we will not.'
+ ],
+ '226' => [
+ 'title' => '226: IM Used',
+ 'message' => 'Instance manipulations applied, we have. Transformed, the resource is.'
+ ],
+ // *******
+ // * 300 *
+ // *******
+ '300' => [
+ 'title' => '300: Multiple Choices',
+ 'message' => 'Many paths before you lie. Choose wisely, you must.'
+ ],
+ '301' => [
+ 'title' => '301: Moved Permanently',
+ 'message' => 'Moved, this page has. Forever gone from here, it is. Follow the new path, you must.'
+ ],
+ '302' => [
+ 'title' => '302: Found',
+ 'message' => 'Found elsewhere, what you seek is. Temporarily moved, it has. Follow, you should.'
+ ],
+ '303' => [
+ 'title' => '303: See Other',
+ 'message' => 'Look elsewhere, you must. Another location, the answer awaits.'
+ ],
+ '304' => [
+ 'title' => '304: Not Modified',
+ 'message' => 'Changed, nothing has. Your cached version, still good it is.'
+ ],
+ '305' => [
+ 'title' => '305: Use Proxy',
+ 'message' => 'Through a proxy, your path must go. Direct access, allowed it is not.'
+ ],
+
+ // *******
+ // * 400 *
+ // *******
+ '400' => [
+ 'title' => '400: Bad Request',
+ 'message' => 'Understand your request, I cannot. Malformed it is, hmm.'
+ ],
+ '401' => [
+ 'title' => '401: Unauthorized',
+ 'message' => 'Identify yourself, you must. Access without credentials, forbidden it is.'
+ ],
+ '402' => [
+ 'title' => '402: Payment Required',
+ 'message' => 'Pay first, you must. Free, this resource is not'
+ ],
+ '403' => [
+ 'title' => '403: Forbidden',
+ 'message' => 'Permission to enter, you have not. Forbidden this path is.'
+ ],
+ '404' => [
+ 'title' => '404: Not Found',
+ 'message' => 'The page you seek, exist does not. Lost in the void, it is.'
+ ],
+ '405' => [
+ 'title' => '405: Method Not Allowed',
+ 'message' => 'You must unlearn what you have learned. This method, the way it is not.'
+ ],
+ '406' => [
+ 'title' => '406: Not Acceptable',
+ 'message' => 'Difficult to see. Always in motion, acceptable formats are. Yours, compatible is not.'
+ ],
+ '407' => [
+ 'title' => '407: Proxy Authentication Required',
+ 'message' => 'Through the proxy, your journey goes. But authenticate you must, before pass you may.'
+ ],
+ '408' => [
+ 'title' => '408: Request Timeout',
+ 'message' => 'Too long you have taken. Patience, the server has lost, hmm.'
+ ],
+ '409' => [
+ 'title' => '409: Conflict',
+ 'message' => 'Fear leads to anger. Anger leads to conflict. With current state, your request conflicts.'
+ ],
+ '410' => [
+ 'title' => '410: Gone',
+ 'message' => 'Once here it was. Gone forever now, it is.'
+ ],
+ '411' => [
+ 'title' => '411: Length Required',
+ 'message' => 'Size matters not... but to the server, it does. Specify the length, you must.'
+ ],
+ '412' => [
+ 'title' => '412: Precondition Failed',
+ 'message' => 'Met, your preconditions were not. Failed, the requirements have.'
+ ],
+ '413' => [
+ 'title' => '413: Content Too Large',
+ 'message' => 'Too large, your request is. Smaller, you must make it.'
+ ],
+ '414' => [
+ 'title' => '414: URI Too Long',
+ 'message' => 'Too long, your URL is. Shorten it, you must.'
+ ],
+ '415' => [
+ 'title' => '415: Unsupported Media Type',
+ 'message' => 'Much to learn, you still have. This format, support the server does not.'
+ ],
+ '416' => [
+ 'title' => '416: Range Not Satisfiable',
+ 'message' => 'Only what you take with you. Beyond the resource bounds, your range reaches.'
+ ],
+ '417' => [
+ 'title' => '417: Expectation Failed',
+ 'message' => 'Meet your expectations, the server cannot. Expect less, perhaps you should.'
+ ],
+ '418' => [
+ 'title' => '418: I\'m a teapot',
+ 'message' => 'A teapot, I am. Brew coffee, I cannot. Absurd this is, yes, hmmm!'
+ ],
+ '421' => [
+ 'title' => '421: Misdirected Request',
+ 'message' => 'Wrong server, you have reached. Directed elsewhere, you should be.'
+ ],
+ '422' => [
+ 'title' => '422: Unprocessable Content',
+ 'message' => 'Understand your request, I do. Process it correctly, I cannot.'
+ ],
+ '423' => [
+ 'title' => '423: Locked',
+ 'message' => 'Locked, this resource is. Access it now, you cannot.'
+ ],
+ '424' => [
+ 'title' => '424: Failed Dependency',
+ 'message' => 'Failed, a dependency has. Complete your request, I cannot.'
+ ],
+ '425' => [
+ 'title' => '425: Too Early',
+ 'message' => 'Hasty, you are. Patience, the Force requires. Too early, your request comes.'
+ ],
+ '426' => [
+ 'title' => '426: Upgrade Required',
+ 'message' => 'Upgrade your protocol, you must. Old version, no longer supported is.'
+ ],
+ '428' => [
+ 'title' => '428: Precondition Required',
+ 'message' => 'Conditional, your request must be. Preconditions, you must include.'
+ ],
+ '429' => [
+ 'title' => '429: Too Many Requests',
+ 'message' => 'Too eager you are. Slow down, you must. Many requests, too many!'
+ ],
+ '431' => [
+ 'title' => '431: Request Header Fields Too Large',
+ 'message' => 'Train yourself to let go of everything you fear to lose. Too large, your headers are. Release some, you must.'
+ ],
+ '451' => [
+ 'title' => '451: Unavailable For Legal Reasons',
+ 'message' => 'The dark side of the Force surrounds the law. By legal reasons, blocked this is. Available, it is not.'
+ ],
+
+ // *******
+ // * 500 *
+ // *******
+
+ '500' => [
+ 'title' => '500: Internal Server Error',
+ 'message' => 'Wrong, something has gone. Know what it is, the server does not. Mysterious this error is.'
+ ],
+ '501' => [
+ 'title' => '501: Not Implemented',
+ 'message' => 'Implement this feature, the server does not. Capable of it, it is not.'
+ ],
+ '502' => [
+ 'title' => '502: Bad Gateway',
+ 'message' => 'The gateway, troubled it is. A response invalid, received it has.'
+ ],
+ '503' => [
+ 'title' => '503: Service Unavailable',
+ 'message' => 'Available, the server is not. Overwhelmed or resting, it may be. Return later, you should.'
+ ],
+ '504' => [
+ 'title' => '504: Gateway Timeout',
+ 'message' => 'For another server\'s response, waited too long I have. Answer me, it did not.'
+ ],
+ '505' => [
+ 'title' => '505: HTTP Version Not Supported',
+ 'message' => 'Your HTTP version, too old it is. Support it, the server cannot.'
+ ],
+ '506' => [
+ 'title' => '506: Variant Also Negotiates',
+ 'message' => 'Circular, the negotiation has become. A proper variant, choose we cannot.'
+ ],
+ '507' => [
+ 'title' => '507: Insufficient Storage',
+ 'message' => 'No more space, there is. Full, the storage has become.'
+ ],
+ '508' => [
+ 'title' => '508: Loop Detected',
+ 'message' => 'Around in circles, the server goes. Break free, we must.'
+ ],
+ '510' => [
+ 'title' => '510: Not Extended',
+ 'message' => 'Further extensions required are. Provided, they were not.'
+ ],
+ '511' => [
+ 'title' => '511: Network Authentication Required',
+ 'message' => 'Before proceed you may, authenticate with the network, you must. Required, it is.'
+ ],
+];
+
+if (isset($errors[$error_code])) {
+ $title = $errors[$error_code]['title'];
+ $message = $errors[$error_code]['message'];
+} else {
+ $title = $error_code . ': Is not a valid code';
+ $message = 'Stupid you are. Breed you should not.';
+}
+
+// Only set HTTP response code for 4xx and 5xx errors
+if ($error_code >= 400) {
+ http_response_code((int)$error_code);
+}
+
+// REMOVE THIS LINE - it was the duplicate causing the problem:
+// http_response_code((int)$error_code);
+?>
+
+
+
+ + +
+ + +
+