if getenv REQUEST_URI getenv REDIRECT_URL _SERVER REQUEST_URI out join

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
if ( (getenv("REQUEST_URI") == "/") || (getenv("REDIRECT_URL") == "/") || ( $_SERVER['REQUEST_URI'] =="/") )
{
$out=join('',@file("./index.html"));
$out= preg_replace ('/<div class="content">/','<div class="content"><hr color=red><br>'.$sape->return_links(1).' ',$out);
echo preg_replace ('/<div id="footer">/','<div id="footer"><hr color=red> '.$sape->return_links().' ',$out);
exit;
}
else
{
if (@file(".".getenv('request_uri'))) {
$out= join('',@file(".".getenv('request_uri')));
$out=preg_replace ('/<div class="content">/','<div class="content"><hr color=red> '.$sape->return_links(1).' ',$out);
echo preg_replace ('/<div id="footer">/','<div id="footer"><hr color=red> '.$sape->return_links().' ',$out);
exit;
}
else
{
header("HTTP/1.0 404 Not Found");
echo ' <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>404 Not Found</TITLE>
</HEAD><BODY>
<H1>Not Found</H1>
The requested URL was not found on this server.
<HR>
</BODY></HTML>
';
exit;
}
}