forked from thirtybees/thirtybees
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patherror500.phtml
163 lines (143 loc) · 5.64 KB
/
error500.phtml
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
154
155
156
157
158
159
160
161
162
163
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="This store is powered by PrestaShop" />
<style>
::-moz-selection {
background: #b3d4fc;
text-shadow: none;
}
::selection {
background: #b3d4fc;
text-shadow: none;
}
html {
padding: 30px 10px;
font-size: 16px;
line-height: 1.4;
color: #737373;
background: #f0f0f0;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
html,
input {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
body {
max-width:600px;
_width: 600px;
padding: 30px 20px 50px;
border: 1px solid #b3b3b3;
border-radius: 4px;
margin: 0 auto;
box-shadow: 0 1px 10px #a7a7a7, inset 0 1px 0 #fff;
background: #fcfcfc;
}
h1 {
margin: 0 10px;
font-size: 50px;
text-align: center;
}
h1 span {
color: #bbb;
}
h2 {
color: #fad629;
margin: 0 10px;
font-size: 40px;
text-align: center;
}
h2 span {
color: #bbb;
font-size: 60px;
}
h3 {
margin: 1.5em 0 0.5em;
}
p {
margin: 1em 0;
}
a {
color: #d8b81c;
}
ul {
padding: 0 0 0 40px;
margin: 1em 0;
}
.container {
max-width: 380px;
_width: 380px;
margin: 0 auto;
}
input::-moz-focus-inner {
padding: 0;
border: 0;
}
pre {
white-space: pre-wrap; /* Since CSS 2.1 */
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
width: 400px;
}
</style>
</head>
<body>
<div class="container">
<h2 id="errorTitle"><span>500</span> Server Error</h2>
<p id="errorMessage">Oops, something went wrong.<br /><br />Try to refresh this page or feel free to contact us if the problem persists.</p>
<pre><code id="encryptedError"><?php echo $markdown; ?></code></pre>
</div>
<script type="text/javascript">
(function() {
var encryptedError = document.getElementById('encryptedError');
var previousmessage = encryptedError.innerHTML;
var copyBtn = '<a href="javascript:copyAllText();" id="copyError" title="Copy">Copy Error</a><br/>';
window.readAll = function() {
encryptedError.innerHTML = copyBtn + '<span id="errorContent">' + previousmessage + '</span>';
};
window.copyAllText = function() {
var errorContent = document.getElementById('errorContent');
var range = document.createRange();
range.selectNodeContents(errorContent);
var sel = window.getSelection();
sel.removeAllRanges();
sel.addRange(range);
try {
succeed = document.execCommand("copy");
} catch(e) {
succeed = false;
}
if(succeed)
alert('Encrypted error copied!')
else
alert('Error, try copying manually')
}
encryptedError.innerHTML = '<a href="javascript:readAll();">' + previousmessage.substring(0, 20) + '...</a>';
var translations = {
en: {
errorTitle: '<span>500</span> Server Error',
errorMessage: 'Oops, something went wrong.<br /><br />Try to refresh this page or feel free to contact us if the problem persists.<br/>Please make sure to expand and include the following error code in your message, so we can help you better:',
},
nl: {
errorTitle: '<span>500</span> Serverfout',
errorMessage: 'Oops, er ging iets mis.<br /><br />Probeer deze pagina te vernieuwen of neem contact op als dit het probleem niet verhelpt.<br/>Om u beter te van dienst te kunnen zijn, kunt u de onderstaande foutcode uitklappen en toevoegen aan uw bericht?',
}
};
var browserLanguage = window.navigator.userLanguage || window.navigator.language;
if (typeof translations[browserLanguage] === 'undefined') {
if (typeof translations[browserLanguage.substring(0, 2)] !== 'undefined') {
browserLanguage = browserLanguage.substring(0, 2);
} else {
browserLanguage = 'en';
}
}
document.getElementById('errorTitle').innerHTML = translations[browserLanguage].errorTitle;
document.getElementById('errorMessage').innerHTML = translations[browserLanguage].errorMessage;
}());
</script>
</body>
</html>