summaryrefslogtreecommitdiff
path: root/www/httperror.php
blob: 69a512213568467ae3c0cf9d099af4fdb03c4932 (plain)
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
<?php
/*
	Displays the error pages. Implemented error provided via $_GET["e"] are: 
	401
	403
	500
	502
	504

	ban -- user is banned and not allowed to log in
	
	404 is displayed if $_GET["e"] is not set. 
	
	The element that wasn't found is provided in $wrong_folder.
	
	$working_path contains the parent of the requested element.
	
	==================================================================================================================================================
*/
?>


<?php include("static/header.html");?>
	<link rel="stylesheet" type="text/css" href="/static/httperror.css">
<div id="Error-Page-content">
	<?php if(!isset($_GET['e'])){
		echo '<h1 id="Error-Page-head" >404</h1>';
		echo '<h2 id="Error-Page-description" >Wow! I didn&#39;t see that coming...Well, I&#39;m sorry...</h2></br></br>';
		echo '<h3 id="Error-Page-detail">"'.$wrong_folder.'" wasn&#39;t found in "'. implode("/", $working_path)."/". '"</h3>';
	
	}elseif($_GET['e']==401){
		echo '<h1 id="Error-Page-head" >'.$_GET['e'].'</h1>';
		echo '<h2 id="Error-Page-description" >Restricted Area | Authorized Personnel only</h2>';
	
	}elseif($_GET['e']==403){
		echo '<h1 id="Error-Page-head" >'.$_GET['e'].'</h1>';
		echo '<h2 id="Error-Page-description" >I could do that. I choose not to...</h2>';
	
	}elseif($_GET['e']==404){
		echo '<h1 id="Error-Page-head" >'.$_GET['e'].'</h1>';
		echo '<h2 id="Error-Page-description" >Wow! I didn&#39;t see that coming...Well, I&#39;m sorry...</h2></br></br>';

	}elseif($_GET['e']==500){
		echo '<h1 id="Error-Page-head" >'.$_GET['e'].'</h1>';
		echo '<h2 id="Error-Page-description" >Oops! No that didn&#39;t just happen. NO....</br> Fine, it&#39;s my fault and i feel bad. </h2>';
	
	}elseif($_GET['e']==502){
		echo '<h1 id="Error-Page-head" >'.$_GET['e'].'</h1>';
		echo '<h2 id="Error-Page-description" >A server i&#39;m trying to contact is acting stupid. </br>It&#39s not my fault. I swear.</h2>';
	
	}elseif($_GET['e']==504){
		echo '<h1 id="Error-Page-head" >'.$_GET['e'].'</h1>';
		echo '<h2 id="Error-Page-description" >A server i&#39;m trying to contact is insanely slow. </br>I can&#39;t wait forever. I&#39;m sorry!</h2>';

	 }elseif($_GET['e']=='ban'){
		echo '<h1 id="Error-Page-head" >You are banned!</h1>';
		echo '<h2 id="Error-Page-description" >Too many authentication failures.</h2>';
	 }elseif($_GET['e']=='user'){
		echo '<h2 id="Error-Page-description" >Could not find the user <u><i>'.htmlentities($_GET["name"]).'</i></u>. <br>Please make sure you typed their name correctly.</h2>';
	 }elseif($_GET['e']=='database'){
		echo '<h1 id="Error-Page-head" >Database!</h1>';
		echo '<h2 id="Error-Page-description" >Oh, there is something wrong with the backend. Refresh the page and if this doesn&#39;t help, we will fix this soon.</h2>';
	}?>
</div>
<?php include("static/footer.html");?>