display error messages with least dependencies

This commit is contained in:
Claude 2013-03-25 22:01:45 +01:00
parent 848cef28c5
commit 05564833f3
3 changed files with 118 additions and 96 deletions

101
htdocs/application/errors/error_db.php Executable file → Normal file
View File

@ -1,51 +1,62 @@
<?php <!DOCTYPE html>
$CI =& get_instance(); <html lang="en">
header("HTTP/1.1 404 Not Found"); <head>
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" <title>Database Error</title>
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <style type="text/css">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> ::selection{ background-color: #E13300; color: white; }
::moz-selection{ background-color: #E13300; color: white; }
::webkit-selection{ background-color: #E13300; color: white; }
<head> body {
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> background-color: #fff;
<title>Stikked</title> margin: 40px;
<link rel="stylesheet" href="<?php echo base_url(); ?>static/styles/reset.css" type="text/css" /> font: 13px/20px normal Helvetica, Arial, sans-serif;
<link rel="stylesheet" href="<?php echo base_url(); ?>static/styles/fonts.css" type="text/css" /> color: #4F5155;
<link rel="stylesheet" href="<?php echo base_url(); ?>static/styles/main.css" type="text/css" media="screen" title="main" charset="utf-8" /> }
</head>
<body> a {
<div id="container"> color: #003399;
<div class="container"> background-color: transparent;
<div class="header"> font-weight: normal;
<h1><a href="<?php echo base_url(); ?>" class="title"><?php echo $CI->config->item('site_name'); ?></a></h1> }
<div class="tabs">
<ul>
<li><a href="<?php echo site_url(''); ?>">Paste</a></li>
<li><a href="<?php echo site_url('lists'); ?>">Recent</a></li>
<li><a href="<?php echo site_url('api'); ?>">API</a></li>
<li><a href="<?php echo site_url('about'); ?>">About</a></li>
</ul>
</div>
</div>
<div class="page"> h1 {
<div class="content"> color: #444;
<div class="container"> background-color: transparent;
<h1><?php echo $heading; ?></h1> border-bottom: 1px solid #D0D0D0;
<div class="about"> font-size: 19px;
<?php echo $message; ?> font-weight: normal;
<p><a href="<?php echo base_url(); ?>">Go Home</a></p> margin: 0 0 14px 0;
</div> padding: 14px 15px 10px 15px;
</div> }
</div>
</div>
<div class="footer"> code {
<?php $CI->load->view('defaults/footer_message'); ?> font-family: Consolas, Monaco, Courier New, Courier, monospace;
<?php $CI->load->view('defaults/stats'); ?> font-size: 12px;
</div> background-color: #f9f9f9;
</div> border: 1px solid #D0D0D0;
</div> color: #002166;
</body> display: block;
margin: 14px 0 14px 0;
padding: 12px 10px 12px 10px;
}
#container {
margin: 10px;
border: 1px solid #D0D0D0;
-webkit-box-shadow: 0 0 8px #D0D0D0;
}
p {
margin: 12px 15px 12px 15px;
}
</style>
</head>
<body>
<div id="container">
<h1><?php echo $heading; ?></h1>
<?php echo $message; ?>
</div>
</body>
</html> </html>

101
htdocs/application/errors/error_general.php Executable file → Normal file
View File

@ -1,51 +1,62 @@
<?php <!DOCTYPE html>
$CI =& get_instance(); <html lang="en">
header("HTTP/1.1 404 Not Found"); <head>
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" <title>Error</title>
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <style type="text/css">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> ::selection{ background-color: #E13300; color: white; }
::moz-selection{ background-color: #E13300; color: white; }
::webkit-selection{ background-color: #E13300; color: white; }
<head> body {
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> background-color: #fff;
<title>Stikked</title> margin: 40px;
<link rel="stylesheet" href="<?php echo base_url(); ?>static/styles/reset.css" type="text/css" /> font: 13px/20px normal Helvetica, Arial, sans-serif;
<link rel="stylesheet" href="<?php echo base_url(); ?>static/styles/fonts.css" type="text/css" /> color: #4F5155;
<link rel="stylesheet" href="<?php echo base_url(); ?>static/styles/main.css" type="text/css" media="screen" title="main" charset="utf-8" /> }
</head>
<body> a {
<div id="container"> color: #003399;
<div class="container"> background-color: transparent;
<div class="header"> font-weight: normal;
<h1><a href="<?php echo base_url(); ?>" class="title"><?php echo $CI->config->item('site_name'); ?></a></h1> }
<div class="tabs">
<ul>
<li><a href="<?php echo site_url(''); ?>">Paste</a></li>
<li><a href="<?php echo site_url('lists'); ?>">Recent</a></li>
<li><a href="<?php echo site_url('api'); ?>">API</a></li>
<li><a href="<?php echo site_url('about'); ?>">About</a></li>
</ul>
</div>
</div>
<div class="page"> h1 {
<div class="content"> color: #444;
<div class="container"> background-color: transparent;
<h1><?php echo $heading; ?></h1> border-bottom: 1px solid #D0D0D0;
<div class="about"> font-size: 19px;
<?php echo $message; ?> font-weight: normal;
<p><a href="<?php echo base_url(); ?>">Go Home</a></p> margin: 0 0 14px 0;
</div> padding: 14px 15px 10px 15px;
</div> }
</div>
</div>
<div class="footer"> code {
<?php $CI->load->view('defaults/footer_message'); ?> font-family: Consolas, Monaco, Courier New, Courier, monospace;
<?php $CI->load->view('defaults/stats'); ?> font-size: 12px;
</div> background-color: #f9f9f9;
</div> border: 1px solid #D0D0D0;
</div> color: #002166;
</body> display: block;
margin: 14px 0 14px 0;
padding: 12px 10px 12px 10px;
}
#container {
margin: 10px;
border: 1px solid #D0D0D0;
-webkit-box-shadow: 0 0 8px #D0D0D0;
}
p {
margin: 12px 15px 12px 15px;
}
</style>
</head>
<body>
<div id="container">
<h1><?php echo $heading; ?></h1>
<?php echo $message; ?>
</div>
</body>
</html> </html>

0
htdocs/application/errors/error_php.php Executable file → Normal file
View File