-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
153 lines (153 loc) · 5.17 KB
/
index.php
File metadata and controls
153 lines (153 loc) · 5.17 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<?php
// BEGIN SPlatform assembly
define ("SPCOMPILE", 1);
///////////////////////////
if(file_exists("core/framework.php")){
include("core/framework.php");
}else{ die("Please place the framework.php file in the 'core' folder before accessing this page!");};
///////////////////////////
if($accesslogs=="1"){
if (empty($_GET["page"])) { $logpage=$indexpagename; }else{ $logpage=$_GET["page"]; };
if(empty($_SERVER['HTTP_USER_AGENT'])){ $logua="No user agent"; }else{ $logua=$_SERVER['HTTP_USER_AGENT']; };
if ($siteonline=="1"){ $logsiteonline="Yes"; }else{ $logsiteonline="No"; };
if(!file_exists($user."/access-logs.php")){
file_put_contents($user.'/access-logs.php', '<?php
if(!defined("SPCOMPILE"))
{
die("
<head><title>SPlatform - Protection script</title></head>
<body>
<h1>403: SPlatform -> Forbidden</h1>
<hr>
You have reached this page in error, please use your back button to return to the site.
<hr>
SPlatform");
}
?>');
};
$logstxt = "
<tr>
<td>".date('Y-m-d')." at ".date('h:i:sa')."</td>
<td>".$_SERVER['REMOTE_ADDR']."</td>
<td>".$logua."</td>
<td>".$logsiteonline."</td>
<td>".$logpage."</td>
</tr>
";
$logsfile = fopen($user.'/access-logs.php','a');
fwrite($logsfile,$logstxt);
};
if ($siteonline == 1){
if ($bansysenabled == 1){
$deny = $ip;
if (in_array ($_SERVER['REMOTE_ADDR'], $deny)) {
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>403.6 - Forbidden: IP address of the client has been rejected.</title>
<style type="text/css">
<!--
body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
fieldset{padding:0 15px 10px 15px;}
h1{font-size:2.4em;margin:0;color:#FFF;}
h2{font-size:1.7em;margin:0;color:#CC0000;}
h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;}
#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
background-color:#555555;}
#content{margin:0 0 0 2%;position:relative;}
.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
-->
</style>
</head>
<body>
<div id="header"><h1>Server Error</h1></div>
<div id="content">
<div class="content-container"><fieldset>
<h2>403.6 - Forbidden: IP address of the client has been rejected.</h2>
<h3>The Web site you are attempting to reach has a list of IP addresses that are not allowed to access the Web site, and the IP address of your browsing computer is on this list.</h3>
</fieldset></div>
</div>
</body>
</html>
<?php
exit();
} else {
// ===== Page manager 3.0 ===== //
if (!empty($_GET["page"])) {
if (file_exists($pagesdir."/" . $_GET["page"] . ".".$pgext)) {
include($themesfolder."/". $theme ."/header.theme.block.php");
echo $content;
include($themesfolder."/". $theme ."/footer.theme.block.php");
} else {
include($notfound);
}
} else {
if (file_exists($pagesdir."/".$index)) {
include($themesfolder."/". $theme ."/header.theme.block.php");
echo $content; // home page
include($themesfolder."/". $theme ."/footer.theme.block.php");
} else {
include($notfound);
}
}
///////////////////////////
}
} else {
// ===== Page manager 3.0 ===== //
if (!empty($_GET["page"])) {
if (file_exists($pagesdir."/" . $_GET["page"] . ".".$pgext)) {
include($themesfolder."/". $theme ."/header.theme.block.php");
echo $content;
include($themesfolder."/". $theme ."/footer.theme.block.php");
} else {
include($notfound);
}
} else {
if (file_exists($pagesdir."/".$index)) {
include($themesfolder."/". $theme ."/header.theme.block.php");
echo $content; // home page
include($themesfolder."/". $theme ."/footer.theme.block.php");
} else {
include($notfound);
}
}
///////////////////////////
};
} else { ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>503 - Service unavailable.</title>
<style type="text/css">
<!--
body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
fieldset{padding:0 15px 10px 15px;}
h1{font-size:2.4em;margin:0;color:#FFF;}
h2{font-size:1.7em;margin:0;color:#CC0000;}
h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;}
#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
background-color:#555555;}
#content{margin:0 0 0 2%;position:relative;}
.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
-->
</style>
</head>
<body>
<div id="header"><h1>Server Error</h1></div>
<div id="content">
<div class="content-container"><fieldset>
<h2>503 - Service unavailable.</h2>
<h3>The Web site is currently unable to handle the HTTP request due to a temporary overloading or maintenance of the server.
<?php
if(!empty($offlinemessage)){ ?>
<br>
The Web master of the Web site says: <?php echo $offlinemessage; }; ?>
</h3>
</fieldset></div>
</div>
</body>
</html>
<?php } ?>