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

107
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> h1 {
<li><a href="<?php echo site_url(''); ?>">Paste</a></li> color: #444;
<li><a href="<?php echo site_url('lists'); ?>">Recent</a></li> background-color: transparent;
<li><a href="<?php echo site_url('api'); ?>">API</a></li> border-bottom: 1px solid #D0D0D0;
<li><a href="<?php echo site_url('about'); ?>">About</a></li> font-size: 19px;
</ul> font-weight: normal;
</div> margin: 0 0 14px 0;
</div> padding: 14px 15px 10px 15px;
}
<div class="page">
<div class="content"> code {
<div class="container"> font-family: Consolas, Monaco, Courier New, Courier, monospace;
<h1><?php echo $heading; ?></h1> font-size: 12px;
<div class="about"> background-color: #f9f9f9;
<?php echo $message; ?> border: 1px solid #D0D0D0;
<p><a href="<?php echo base_url(); ?>">Go Home</a></p> color: #002166;
</div> display: block;
</div> margin: 14px 0 14px 0;
</div> padding: 12px 10px 12px 10px;
</div> }
<div class="footer"> #container {
<?php $CI->load->view('defaults/footer_message'); ?> margin: 10px;
<?php $CI->load->view('defaults/stats'); ?> border: 1px solid #D0D0D0;
</div> -webkit-box-shadow: 0 0 8px #D0D0D0;
</div> }
</div>
</body> p {
</html> margin: 12px 15px 12px 15px;
}
</style>
</head>
<body>
<div id="container">
<h1><?php echo $heading; ?></h1>
<?php echo $message; ?>
</div>
</body>
</html>

107
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> h1 {
<li><a href="<?php echo site_url(''); ?>">Paste</a></li> color: #444;
<li><a href="<?php echo site_url('lists'); ?>">Recent</a></li> background-color: transparent;
<li><a href="<?php echo site_url('api'); ?>">API</a></li> border-bottom: 1px solid #D0D0D0;
<li><a href="<?php echo site_url('about'); ?>">About</a></li> font-size: 19px;
</ul> font-weight: normal;
</div> margin: 0 0 14px 0;
</div> padding: 14px 15px 10px 15px;
}
<div class="page">
<div class="content"> code {
<div class="container"> font-family: Consolas, Monaco, Courier New, Courier, monospace;
<h1><?php echo $heading; ?></h1> font-size: 12px;
<div class="about"> background-color: #f9f9f9;
<?php echo $message; ?> border: 1px solid #D0D0D0;
<p><a href="<?php echo base_url(); ?>">Go Home</a></p> color: #002166;
</div> display: block;
</div> margin: 14px 0 14px 0;
</div> padding: 12px 10px 12px 10px;
</div> }
<div class="footer"> #container {
<?php $CI->load->view('defaults/footer_message'); ?> margin: 10px;
<?php $CI->load->view('defaults/stats'); ?> border: 1px solid #D0D0D0;
</div> -webkit-box-shadow: 0 0 8px #D0D0D0;
</div> }
</div>
</body> p {
</html> margin: 12px 15px 12px 15px;
}
</style>
</head>
<body>
<div id="container">
<h1><?php echo $heading; ?></h1>
<?php echo $message; ?>
</div>
</body>
</html>

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