Source for file bluescreen.phtml
Documentation is available at bluescreen.phtml
- 1: <?php
- 3: /**
- 4: * Nette Framework - Debugger bluescreen template.
- 5: *
- 11: *
- 17: */
- 23: /**
- 24: * Prints source code.
- 29: */
- 31: {
- 38: }
- 55: }
- 56: }
- 74: }
- 75: }
- 77: }
- 81: /**
- 82: * Dumps variable.
- 85: */
- 87: {
- 88: return '<pre class="dump">' . preg_replace_callback('#(^|\s+)?(.*)\((\d+)\) <code>#', '_netteDumpCb', $dump) . '</pre>';
- 89: }
- 92: {
- 94: }
- 98: /**
- 99: * Opens panel.
- 103: */
- 105: {
- 108: ?>
- 109: <div class="panel">
- 110: <h2><a href="#" onclick="return !netteToggle(this, 'pnl<?php echo $id ?>')"><?php echo htmlSpecialChars($name) ?> <abbr><?php echo $collapsed ? '►' : '▼' ?></abbr></a></h2>
- 113: <?php
- 114: }
- 118: /**
- 119: * Closes panel.
- 121: */
- 123: {
- 124: ?>
- 125: </div>
- 126: </div>
- 127: <?php
- 128: }
- 130: }
- 133: /**
- 134: * Page title.
- 135: */
- 153: $title = ($exception instanceof FatalErrorException && isset($errorTypes[$exception->getSeverity()])) ? $errorTypes[$exception->getSeverity()] : get_class($exception);
- 158: }
- 160: ?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- 161: <html lang="en">
- 162: <head>
- 163: <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- 164: <meta name="robots" content="noindex,noarchive">
- 165: <meta name="generator" content="Nette Framework">
- 167: <title><?php echo htmlspecialchars($title) ?></title><!-- <?php echo $exception->getMessage(), ($exception->getCode() ? ' #' . $exception->getCode() : '') ?> -->
- 169: <style type="text/css">
- 170: /* <![CDATA[ */
- 171: body {
- 172: margin: 0 0 2em;
- 173: padding: 0;
- 174: }
- 176: #netteBluescreen {
- 177: font: 9pt/1.5 Verdana, sans-serif;
- 178: background: white;
- 179: color: #333;
- 180: position: absolute;
- 181: left: 0;
- 182: top: 0;
- 183: width: 100%;
- 184: z-index: 23178;
- 185: text-align: left;
- 186: }
- 188: #netteBluescreen * {
- 189: color: inherit;
- 190: background: inherit;
- 191: text-align: inherit;
- 192: }
- 194: #netteBluescreenIcon {
- 195: position: absolute;
- 196: right: .5em;
- 197: top: .5em;
- 198: z-index: 23179;
- 199: text-decoration: none;
- 200: background: red;
- 201: padding: 3px;
- 202: }
- 204: #netteBluescreenIcon abbr {
- 205: color: black !important;
- 206: }
- 208: #netteBluescreen h1 {
- 209: font: 18pt/1.5 Verdana, sans-serif !important;
- 210: margin: .6em 0;
- 211: }
- 213: #netteBluescreen h2 {
- 214: font: 14pt/1.5 sans-serif !important;
- 215: color: #888;
- 216: margin: .6em 0;
- 217: }
- 219: #netteBluescreen a {
- 220: text-decoration: none;
- 221: color: #4197E3;
- 222: }
- 224: #netteBluescreen a abbr {
- 225: font-family: sans-serif;
- 226: color: #999;
- 227: }
- 229: #netteBluescreen h3 {
- 230: font: bold 10pt/1.5 Verdana, sans-serif !important;
- 231: margin: 1em 0;
- 232: padding: 0;
- 233: }
- 235: #netteBluescreen p {
- 236: margin: .8em 0
- 237: }
- 239: #netteBluescreen pre, #netteBluescreen code, #netteBluescreen table {
- 240: font: 9pt/1.5 Consolas, monospace !important;
- 241: }
- 243: #netteBluescreen pre, #netteBluescreen table {
- 244: background: #fffbcc;
- 245: padding: .4em .7em;
- 246: border: 1px dotted silver;
- 247: }
- 249: #netteBluescreen table pre {
- 250: padding: 0;
- 251: margin: 0;
- 252: border: none;
- 253: }
- 255: #netteBluescreen pre.dump span {
- 256: color: #c16549;
- 257: }
- 259: #netteBluescreen pre.dump a {
- 260: color: #333;
- 261: }
- 263: #netteBluescreen div.panel {
- 264: border-bottom: 1px solid #eee;
- 265: padding: 1px 2em;
- 266: }
- 268: #netteBluescreen div.inner {
- 269: padding: 0.1em 1em 1em;
- 270: background: #f5f5f5;
- 271: }
- 273: #netteBluescreen table {
- 274: border-collapse: collapse;
- 275: width: 100%;
- 276: }
- 278: #netteBluescreen td, #netteBluescreen th {
- 279: vertical-align: top;
- 280: text-align: left;
- 281: padding: 2px 3px;
- 282: border: 1px solid #eeeebb;
- 283: }
- 285: #netteBluescreen th {
- 286: width: 10%;
- 287: font-weight: bold;
- 288: }
- 290: #netteBluescreen .odd, #netteBluescreen .odd pre {
- 291: background-color: #faf5c3;
- 292: }
- 294: #netteBluescreen ul {
- 295: font: 7pt/1.5 Verdana, sans-serif !important;
- 296: padding: 1em 2em 50px;
- 297: }
- 299: #netteBluescreen .highlight, #netteBluescreenError {
- 300: background: red;
- 301: color: white;
- 302: font-weight: bold;
- 303: font-style: normal;
- 304: display: block;
- 305: }
- 307: #netteBluescreen .line {
- 308: color: #9e9e7e;
- 309: font-weight: normal;
- 310: font-style: normal;
- 311: }
- 313: /* ]]> */
- 314: </style>
- 317: <script type="text/javascript">
- 318: /* <![CDATA[ */
- 319: document.write('<style> .collapsed { display: none; } <\/style>');
- 321: function netteToggle(link, panelId)
- 322: {
- 323: var arrow = link.getElementsByTagName('abbr')[0];
- 324: var panel = panelId ? document.getElementById(panelId) : link.nextSibling;
- 325: while (panel.nodeType !== 1) panel = panel.nextSibling;
- 326: var collapsed = panel.currentStyle ? panel.currentStyle.display == 'none' : getComputedStyle(panel, null).display == 'none';
- 328: arrow.innerHTML = String.fromCharCode(collapsed ? 0x25bc : 0x25ba);
- 329: panel.style.display = collapsed ? (panel.tagName.toLowerCase() === 'code' ? 'inline' : 'block') : 'none';
- 331: return true;
- 332: }
- 333: /* ]]> */
- 334: </script>
- 335: </head>
- 339: <body>
- 340: <div id="netteBluescreen">
- 341: <a id="netteBluescreenIcon" href="#" onclick="return !netteToggle(this)"><abbr>▼</abbr></a
- 343: ><div>
- 344: <div id="netteBluescreenError" class="panel">
- 345: <h1><?php echo htmlspecialchars($title), ($exception->getCode() ? ' #' . $exception->getCode() : '') ?></h1>
- 348: </div>
- 357: <div class="panel">
- 358: <h1><?php echo htmlspecialchars(get_class($ex)), ($ex->getCode() ? ' #' . $ex->getCode() : '') ?></h1>
- 361: </div>
- 367: <p><strong>File:</strong> <?php echo htmlspecialchars($ex->getFile()) ?> <strong>Line:</strong> <?php echo $ex->getLine() ?></p>
- 375: <ol>
- 377: <li><p>
- 382: <PHP inner-code>
- 390: (<?php if (!empty($row['args'])): ?><a href="#" onclick="return !netteToggle(this, 'args<?php echo "$level-$key" ?>')">arguments <abbr>►</abbr></a><?php endif ?>)
- 391: </p>
- 395: <table>
- 396: <?php
- 398: $r = isset($row['class']) ? new ReflectionMethod($row['class'], $row['function']) : new ReflectionFunction($row['function']);
- 402: }
- 407: }
- 408: ?>
- 409: </table>
- 410: </div>
- 415: <pre <?php if (!$collapsed || isset($internals[$row['file']])) echo 'class="collapsed"'; else $collapsed = FALSE ?> id="src<?php echo "$level-$key" ?>"><?php _netteDebugPrintCode($row['file'], $row['line']) ?></pre>
- 418: </li>
- 422: <li><i>empty</i></li>
- 424: </ol>
- 441: <table>
- 442: <?php
- 444: echo '<tr><th>$', htmlspecialchars($k), '</th><td>', _netteDump(self::_dump($v, 0)), "</td></tr>\n";
- 445: }
- 446: ?>
- 447: </table>
- 451: <?php } while ((method_exists($ex, 'getPrevious') && $ex = $ex->getPrevious()) || (isset($ex->previous) && $ex = $ex->previous)); ?>
- 458: <h3>Requests</h3>
- 461: <h3>Presenter</h3>
- 469: <?php
- 472: <h3><a href="#" onclick="return !netteToggle(this, 'pnl-env-const')">Constants <abbr>▼</abbr></a></h3>
- 473: <table id="pnl-env-const">
- 474: <?php
- 478: }
- 479: ?>
- 480: </table>
- 484: <h3><a href="#" onclick="return !netteToggle(this, 'pnl-env-files')">Included files <abbr>►</abbr></a>(<?php echo count(get_included_files()) ?>)</h3>
- 485: <table id="pnl-env-files" class="collapsed">
- 486: <?php
- 489: }
- 490: ?>
- 491: </table>
- 494: <h3>$_SERVER</h3>
- 496: <p><i>empty</i></p>
- 498: <table>
- 499: <?php
- 500: foreach ($_SERVER as $k => $v) echo '<tr'.($rn++%2?' class="odd"':'').'><th>', htmlspecialchars($k), '</th><td>', _netteDump(self::_dump($v, 0)), "</td></tr>\n";
- 501: ?>
- 502: </table>
- 510: <h3>Headers</h3>
- 511: <table>
- 512: <?php
- 513: foreach (apache_request_headers() as $k => $v) echo '<tr'.($rn++%2?' class="odd"':'').'><th>', htmlspecialchars($k), '</th><td>', htmlspecialchars($v), "</td></tr>\n";
- 514: ?>
- 515: </table>
- 522: <p><i>empty</i></p>
- 524: <table>
- 525: <?php
- 526: foreach ($GLOBALS[$name] as $k => $v) echo '<tr'.($rn++%2?' class="odd"':'').'><th>', htmlspecialchars($k), '</th><td>', _netteDump(self::_dump($v, 0)), "</td></tr>\n";
- 527: ?>
- 528: </table>
- 536: <h3>Headers</h3>
- 538: <pre><?php
- 540: ?></pre>
- 542: <p><i>no headers</i></p>
- 547: <ul>
- 549: <?php foreach ((array) call_user_func($callback, 'bluescreen') as $line): ?><li><?php echo $line, "\n" ?></li><?php endforeach ?>
- 551: </ul>
- 552: </div>
- 553: </div>
- 555: <script type="text/javascript">
- 556: document.body.appendChild(document.getElementById('netteBluescreen'));
- 557: </script>
- 558: </body>
- 559: </html>