Sources for file plugins/error/debug.tpl in version 4.0 Beta 1
Click on a comment to hide it. Click here to show all comments.
{**
* Project: Xnyo 4: Bubbles
* File: plugins/error/debug.tpl
*
* Version: 4.0-dev
* SVN Id: $Id$
* SVN URL: $HeadURL$
* Authors: Robert Amos <bok[at]odynia.org>
*
* Copyright (c) 2001-2007 Robert Amos <bok[at]odynia.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
**}
<xnyo::debug::console::template>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C/DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Xnyo Debug Console</title>
<style type="text/css">{literal}
body
{
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
}
h1
{
color: #1d7eff;
}
tr
{
line-height: 16px;
}
th, td
{
text-align: left;
margin: 0px;
padding: 0px;
padding-left: 5px;
border: 0px;
}
th
{
font-weight: bold;
font-size: 12px;
}
td
{
font-size: 11px;
}
tr.line1
{
color: #222222;
background-color: #ffffff;
}
tr.line2
{
color: #222222;
background-color: #fafafa;
}
/* Bold Stuff */
.bold
{
font-weight: bold;
}
/* Debug Table */
#debug h2
{
color: #fdcd66;
}
#debug table
{
width: 100%;
}
#debug th
{
border-bottom: 2px solid #fdcd66;
}
/* Error Table */
#errors h2
{
color: #c9ff65;
}
#errors table
{
width: 100%;
}
#errors th
{
border-bottom: 2px solid #c9ff65;
}
/* Warnings Table */
#warnings h2
{
color: #67fdcb;
}
#warnings table
{
width: 100%;
}
#warnings th
{
border-bottom: 2px solid #67fdcb;
}
/* Notices Table */
#notices h2
{
color: #cacbff;
}
#notices table
{
width: 100%;
}
#notices th
{
border-bottom: 2px solid #cacbff;
}
/* Strict Table */
#stricts h2
{
color: #ce67ff;
}
#stricts table
{
width: 100%;
}
#stricts th
{
border-bottom: 2px solid #ce67ff;
}
/* Client Table */
#clients h2
{
color: #ff72d0;
}
#clients table
{
width: 100%;
}
#clients th
{
border-bottom: 2px solid #ff72d0;
}
/* Unknowns */
#unknowns h2
{
color: #fe6a67;
}
#unknowns table
{
width: 100%;
}
#unknowns th
{
border-bottom: 2px solid #fe6a67;
}
{/literal}</style>
</head>
<body>
<h1>Xnyo Debug Console</h1>
<div id="debug">
<h2>Debug Log</h2>
<table cellspacing=0 cellpadding=0>
<tr>
<th style="width: 70px;">Time Taken</th>
<th>Message</th>
<th style="width: 200px;">Function</th>
<th style="width: 200px;">File</th>
<th style="width: 50px;">Line</th>
</tr>
<tr>
<td>now</td>
<td class="bold" colspan="4">Total Script Execution Time: {$exec_time} seconds (roughly)</td>
</tr>
{foreach from=$errors.debugs key="k" item="v"}
<tr class="{cycle name="debug" values="line2,line1"}">
{assign var="t" value=$v->getTrace()}
<td>{math equation="round((x - y) * 1000, 4)" x=$time y=$v->getTimestamp()} ms</td>
<td>{$v->getCleanMessage()}</td>
<td>{$t[1].class}{$t[1].type}{$t[1].function}()</td>
<td>{$v->getFile()|debug_shorten_filename}</td>
<td>{$v->getLine()}</td>
</tr>
{assign var="time" value=$v->getTimestamp()}
{/foreach}
</table>
</div>
<br />
{foreach from=$errors key="k" item="v"}
{if count($v) && $k != 'debugs'}
<div id="{$k}">
<h2>{$k|ucfirst}</h2>
<table cellspacing=0 cellpadding=0>
<tr>
<th style="width: 70px;">Time</th>
<th>Message</th>
<th style="width: 200px;">Function</th>
<th style="width: 200px;">File</th>
<th style="width: 50px;">Line</th>
</tr>
{foreach from=$v item="l"}
{assign var="t" value=$l->getTrace()}
<tr class="{cycle name=$k values="line1,line2"}">
<td>{$l->getTimestamp()|date:"H:i:s"}</td>
<td>{$l->getMessage()}</td>
<td>{$t[1].class}{$t[1].type}{$t[1].function}()</td>
<td>{$l->getFile()|debug_shorten_filename}</td>
<td>{$l->getLine()}</td>
</tr>
{/foreach}
</table>
</div>
<br />
{/if}
{/foreach}
</body>
</html>
</xnyo::debug::console::template>
