-
Notifications
You must be signed in to change notification settings - Fork 0
/
exception.php
71 lines (69 loc) · 1.93 KB
/
exception.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
68
69
70
71
<?php
// Define secure access constant
define('SECURE_ACCESS', true);
session_start();
require_once 'lang.php';
require_once 'config.inc.php';
require_once 'header_warning.php';
// Get error message from session
$error_message = $_SESSION['exception_error'] ?? 'An unknown error occurred';
unset($_SESSION['exception_error']);
?>
<!DOCTYPE html>
<html lang="<?= $_SESSION['lang']; ?>">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?= __('error_occurred'); ?></title>
<link rel="stylesheet" href="chota.min.css">
<style>
body {
padding: 0;
background: var(--bg-secondary);
}
.container {
margin: 0 auto;
}
.card {
background: white;
padding: 2rem;
border-radius: 4px;
margin-top: 2rem;
}
.error-icon {
font-size: 3rem;
color: var(--color-error);
text-align: center;
margin-bottom: 1rem;
}
.error-message {
color: var(--color-error);
background: #fff5f5;
border: 1px solid #feb2b2;
padding: 1rem;
border-radius: 4px;
margin: 1rem 0;
}
.button-container {
margin-top: 2rem;
text-align: center;
}
</style>
</head>
<body>
<?php showHeader(); ?>
<div class="container">
<?php showInstallWarning(); ?>
<div class="card">
<div class="error-icon">⚠️</div>
<h2 class="text-center"><?= __('error_occurred'); ?></h2>
<div class="error-message">
<?= htmlspecialchars($error_message); ?>
</div>
<div class="button-container">
<a href="index.php" class="button primary"><?= __('return_home'); ?></a>
</div>
</div>
</div>
</body>
</html>