diff --git a/archived.php b/archived.php deleted file mode 100644 index 57539fbb..00000000 --- a/archived.php +++ /dev/null @@ -1,42 +0,0 @@ -'.' '. -'.__archived__content__, .__archived__content__ p, .__archived__content__ h2 { background-color: #007bff; color: #fff; font-family: "Saira Extra Condensed", Verdana, Arial, sans-serif; text-align: center; }'.' '. -'.__archived__content__ { padding: 0.5rem; }'.' '. -'.__archived__content__:first-of-type { margin-top: 0rem; margin-bottom: 1rem; }'.' '. -'.__archived__content__:last-of-type { margin-top: 1rem; margin-bottom: 0; }'.' '. -'.__archived__content__, .__archived__content__ p { font-size: 1.2rem; }'.' '. -'.__archived__content__, .__archived__content__ h2 { font-size: 2rem; }'.' '. -'.__archived__content__ a:link, .__archived__content__ a:visited { color: #fff; }'.' '. -'.__archived__content__ a:hover, .__archived__content__ a:active { text-decoration: none; }'. -''; -$headFooterContent = ''; -$bodyHeaderContent = '

Archived Web Site

This is an archived version of the original website. Some features may not be functional. Do not submit any personal information to this archived website.

Current Working Directory List | Back to Archive Index

'; -$bodyFooterContent = '

This is an archived version of the original website. Some features may not be functional. Do not submit any personal information to this archived website.

Current Working Directory Listing | Back to Archive Index

'; - -// Get the requested HTML file -$requestedFile = $_SERVER['REQUEST_URI']; - -// Validate and sanitize the requested file path to ensure it's within the intended directory. -$filePath = realpath($htmlDir . DIRECTORY_SEPARATOR . $requestedFile); - -if (strpos($filePath, $htmlDir) === 0 && is_file($filePath)) { - - // Read the HTML file - $htmlContent = file_get_contents($filePath); - - // Add archive branding - $maxReplacements = 1; // do not replace more than one - $htmlContent = preg_replace('/]*>/i', '$0' . $headHeaderContent, $htmlContent, $maxReplacements); - $htmlContent = str_replace('', $headFooterContent . '', $htmlContent); - $htmlContent = preg_replace('/]*>/i', '$0' . $bodyHeaderContent, $htmlContent, $maxReplacements); - $htmlContent = str_replace('', $bodyFooterContent . '', $htmlContent); - - // Output the modified HTML content - echo $htmlContent; -} -