public
Description: The ultra-lightweight ultra-flexible blogging engine with a fetish for birds and misspellings.
Homepage: http://chyrp.net/
Clone URL: git://github.com/vito/chyrp.git
Click here to lend your support to: chyrp and make a donation at www.pledgie.com !
chyrp / includes / error.php
100755 151 lines (148 sloc) 5.245 kb
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
<?php
    if (defined('AJAX') and AJAX or isset($_POST['ajax'])) {
        foreach ($backtrace as $trace)
            $body.= "\n"._f("%s on line %d", array($trace["file"], fallback($trace["line"], 0)));
        exit($body."HEY_JAVASCRIPT_THIS_IS_AN_ERROR_JUST_SO_YOU_KNOW");
    }
 
    $jquery = is_callable(array("Config", "current")) ?
                  Config::current()->url."/includes/lib/gz.php?file=jquery.js" :
                  "http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js" ;
 
    Route::current(MainController::current());
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Chyrp: <?php echo $title; ?></title>
<script src="<?php echo $jquery; ?>" type="text/javascript" charset="utf-8"></script>
<style type="text/css">
html, body, ul, ol, li,
h1, h2, h3, h4, h5, h6,
form, fieldset, a, p {
margin: 0;
padding: 0;
border: 0;
}
html {
font-size: 62.5%;
}
body {
font: 1.25em/1.5em normal "Verdana", Helvetica, Arial, sans-serif;
color: #626262;
background: #e8e8e8;
padding: 0 0 5em;
}
.window {
width: 30em;
background: #fff;
padding: 2em;
margin: 5em auto 0;
-webkit-border-radius: 2em;
-moz-border-radius: 2em;
}
h1 {
color: #ccc;
font-size: 3em;
margin: .25em 0 .5em;
text-align: center;
}
h2 {
font-size: 1.25em;
margin: 1em 0 0;
}
code {
color: #06B;
font-family: Monaco, monospace;
}
ul, ol {
margin: 1em 3em;
}
ol.backtrace {
margin-top: .5em;
}
.footer {
color: #777;
margin-top: 1em;
font-size: .9em;
text-align: center;
}
.error {
color: #F22;
font-size: 12px;
}
a:link, a:visited {
color: #6B0;
}
a:hover {
text-decoration: underline;
}
a.big {
background: #eee;
margin-top: 2em;
display: block;
padding: .75em 1em;
color: #777;
text-shadow: #fff 1px 1px 0;
font: 1em normal "Lucida Grande", "Verdana", Helvetica, Arial, sans-serif;
text-decoration: none;
-webkit-border-radius: .5em;
-moz-border-radius: .5em;
}
a.big:hover {
background: #f5f5f5;
}
a.big:active {
background: #e0e0e0;
}
<?php if (!logged_in()): ?>
a.big.back {
-webkit-border-top-right-radius: 0 !important;
-webkit-border-bottom-right-radius: 0 !important;
width: 43.625%;
float: left;
}
a.big.login {
float: right;
text-align: right;
-webkit-border-top-left-radius: 0 !important;
-webkit-border-bottom-left-radius: 0 !important;
background: #f5f5f5;
width: 43.625%;
}
<?php endif; ?>
.clear {
clear: both;
}
</style>
<script type="text/javascript" charset="utf-8">
$(function(){
$('<a class="big back" href="javascript:history.back()">&larr; <?php echo __("Back"); ?></a>').insertBefore(".clear.last")
})
</script>
</head>
<body>
<div class="window">
<h1><?php echo $title; ?></h1>
<div class="message">
<?php echo $body; ?>
<?php if (!empty($backtrace)): ?>
<h2><?php echo __("Backtrace"); ?></h2>
<ol class="backtrace">
<?php foreach ($backtrace as $trace): ?>
<li><code><?php echo _f("%s on line %d", array($trace["file"], fallback($trace["line"], 0))); ?></code></li>
<?php endforeach; ?>
</ol>
<?php endif; ?>
<div class="clear"></div>
<?php if (!logged_in() and $body != __("Route was initiated without a Controller.")): ?>
<a href="<?php echo url("login"); ?>" class="big login"><?php echo __("Log In"); ?> &rarr;</a>
<?php endif; ?>
<div class="clear last"></div>
</div>
</div>
<?php if (defined("CHYRP_VERSION")): ?>
<p class="footer">Chyrp <?php echo CHYRP_VERSION; ?> &copy; 2008 Alex Suraci</p>
<?php endif; ?>
</body>
</html>