forked from thirtybees/thirtybees
-
Notifications
You must be signed in to change notification settings - Fork 1
/
error500.phtml
141 lines (127 loc) · 4.38 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
<!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 thirty bees." />
<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. You can try to refresh this page
</p>
<p>
If the problem persists please feel free to <a href="mailto:<?= $shopEmail ?>?subject=Server%20Error">contact us</a>.
Make sure to <a id="downloadError">download</a> encrypted error message and
attach it to your email. That will help our engineers to solve this problem quickly.
</p>
<br/>
</div>
<script type="text/javascript">
(function() {
var data = '<?= $encrypted ?>';
var date = new Date();
var year = date.getFullYear();
var month = date.getMonth() + 1;
var day = date.getDate();
var hours = date.getHours();
var minutes = date.getMinutes();
var seconds = date.getSeconds();
var fileName = 'exception_' + year + month + day + hours + minutes + seconds + '.txt';
var element = document.getElementById('downloadError');
if(window.navigator.msSaveOrOpenBlob) {
var fileData = [data];
blobObject = new Blob(fileData);
element.addEventListener('click', function(){
window.navigator.msSaveOrOpenBlob(blobObject, fileName);
});
} else {
var url = "data:text/plain;charset=utf-8," + encodeURIComponent(data);
element.setAttribute("download", fileName);
element.setAttribute("href", url);
}
}());
</script>
</body>
</html>