[enh] Bootstrap PHP interface

This commit is contained in:
kload
2014-11-08 14:31:48 +01:00
parent 2de9bf3b2c
commit 0cc34124bd
33 changed files with 13802 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
<?php if(option('env') > ENV_PRODUCTION && option('debug')): ?>
<?php if(!$is_http_error): ?>
<p>[<?php echo error_type($errno)?>]
<?php echo $errstr?> (in <strong><?php echo $errfile?></strong> line <strong><?php echo $errline?></strong>)
</p>
<?php endif; ?>
<?php if($debug_args = set('_lim_err_debug_args')): ?>
<h2 id="debug-arguments">Debug arguments</h2>
<pre><code><?php echo h(print_r($debug_args, true))?></code></pre>
<?php endif; ?>
<h2 id="limonade-options">Options</strong></h2>
<pre><code><?php echo h(print_r(option(), true))?></code></pre>
<p class="bt top"><a href="#header">[ &#x2191; ]</a></p>
<h2 id="environment">Environment</h2>
<pre><code><?php echo h(print_r(env(), true))?></code></pre>
<p class="bt top"><a href="#header">[ &#x2191; ]</a></p>
<h2 id="debug-backtrace">Backtrace</h2>
<pre><code><?php echo h(print_r(debug_backtrace(), true))?></code></pre>
<p class="bt top"><a href="#header">[ &#x2191; ]</a></p>
<div id="debug-menu">
<?php if($debug_args = set('_lim_err_debug_args')): ?>
<a href="#debug-arguments">Debug arguments</a> |
<?php endif; ?>
<a href="#limonade-options">Options</a> |
<a href="#environment">Environment</a> |
<a href="#debug-backtrace">Backtrace</a> |
<a href="#header">[ &#x2191; ]</a>
</div>
<?php endif; ?>

View File

@@ -0,0 +1,15 @@
<?php if(!empty($notices)): ?>
<div class="lim-debug lim-notices">
<h4> &#x2192; Notices and warnings</h4>
<dl>
<?php $cpt = 1; foreach($notices as $notice): ?>
<dt>[<?php echo $cpt.'. '.error_type($notice['errno'])?>]</dt>
<dd>
<?php echo $notice['errstr']?> in <strong><code><?php echo $notice['errfile']?></code></strong>
line <strong><code><?php echo $notice['errline']?></code></strong>
</dd>
<?php $cpt++; endforeach; ?>
</dl>
<hr>
</div>
<?php endif; ?>

View File

@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Limonade, the fizzy PHP micro-framework</title>
<link rel="stylesheet" href="<?php echo url_for('/_lim_css/screen.css');?>" type="text/css" media="screen">
</head>
<body>
<div id="header">
<h1>Limonade</h1>
</div>
<div id="content">
<?php echo error_notices_render(); ?>
<div id="main">
<?php echo $content;?>
<hr class="space">
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,6 @@
<h1><?php echo h(error_http_status($errno));?></h1>
<?php if($is_http_error): ?>
<p><?php echo h($errstr)?></p>
<?php endif; ?>
<?php echo render('_debug.html.php', null, $vars); ?>