forked from projectsend/projectsend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
error.php
67 lines (62 loc) · 2.14 KB
/
error.php
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
<?php
$allowed_levels = array(9,8,7,0);
require_once 'bootstrap.php';
$error_type = (!empty($_GET['e'])) ? $_GET['e'] : '401';
switch ($error_type) {
default:
case '401':
http_response_code(401);
$page_title = __('Access denied','cftp_admin');
$error_message = __("Your account type doesn't allow you to view this page. Please contact a system administrator if you need to access this function.",'cftp_admin');
break;
case 'csrf':
http_response_code(403);
$page_title = __('Token mismatch','cftp_admin');
$error_message = __("The security token could not be validated.",'cftp_admin');
break;
case '404':
http_response_code(404);
$page_title = __('Error 404','cftp_admin');
$error_message = __("Resource not found.",'cftp_admin');
break;
case '403':
http_response_code(403);
$page_title = __('Error 403','cftp_admin');
$error_message = __("Forbidden.",'cftp_admin');
break;
}
?>
<!doctype html>
<html lang="<?php echo SITE_LANG; ?>">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><?php echo html_output( $page_title . ' » ' . THIS_INSTALL_TITLE ); ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php meta_favicon(); ?>
<?php
require_once INCLUDES_DIR . DS . 'assets.php';
load_js_header_files();
load_css_files();
?>
</head>
<body class="backend forbidden">
<div class="container">
<div class="row">
<div class="col-xs-12">
<h2><?php echo $page_title; ?></h2>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<div class="whiteform whitebox">
<?php echo $error_message; ?>
</div>
</div>
</div>
</div>
</body>
</html>
<?php
exit;