Source for file bluescreen.phtml
Documentation is available at bluescreen.phtml
- 1: <?php
- 3: /**
- 4: * Nette Framework - Debugger bluescreen template.
- 5: *
- 6: * Copyright (c) 2004, 2009 David Grudl (http://davidgrudl.com)
- 7: *
- 8: * This source file is subject to the "Nette license" that is bundled
- 9: * with this package in the file license.txt.
- 10: *
- 11: * For more information please see https://nette.org
- 12: *
- 20: *
- 26: */
- 32: /**
- 33: * Prints source code.
- 38: */
- 40: {
- 47: }
- 61: }
- 62: }
- 79: }
- 80: }
- 82: }
- 86: /**
- 87: * Opens panel.
- 91: */
- 93: {
- 96: ?>
- 97: <div class="panel">
- 98: <h2><a href="#" onclick="return !netteToggle(this, 'pnl<?php echo $id ?>')"><?php echo htmlSpecialChars($name) ?> <span><?php echo $collapsed ? '►' : '▼' ?></span></a></h2>
- 101: <?php
- 102: }
- 106: /**
- 107: * Closes panel.
- 109: */
- 111: {
- 112: ?>
- 113: </div>
- 114: </div>
- 115: <?php
- 116: }
- 118: }
- 121: /**
- 122: * Page title.
- 123: */
- 132: $title = ($exception instanceof FatalErrorException && isset($errorTypes[$exception->getSeverity()])) ? $errorTypes[$exception->getSeverity()] : get_class($exception);
- 137: }
- 139: ?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- 140: <html lang="en">
- 141: <head>
- 142: <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- 143: <meta name="robots" content="noindex,noarchive">
- 144: <meta name="generator" content="Nette Framework">
- 148: <style type="text/css">
- 149: /* <![CDATA[ */
- 150: body {
- 151: margin: 0 0 2em;
- 152: padding: 0;
- 153: }
- 155: #netteBluescreen {
- 156: font: 9pt/1.5 Verdana, sans-serif;
- 157: background: white;
- 158: color: #333;
- 159: position: absolute;
- 160: left: 0;
- 161: top: 0;
- 162: width: 100%;
- 163: z-index: 23178;
- 164: text-align: left;
- 165: }
- 167: #netteBluescreen * {
- 168: color: inherit;
- 169: background: inherit;
- 170: text-align: inherit;
- 171: }
- 173: #netteBluescreenIcon {
- 174: position: absolute;
- 175: right: .5em;
- 176: top: .5em;
- 177: z-index: 23179;
- 178: color: black;
- 179: text-decoration: none;
- 180: background: red;
- 181: padding: 3px;
- 182: }
- 184: #netteBluescreen h1 {
- 185: font: 18pt/1.5 Verdana, sans-serif !important;
- 186: margin: .6em 0;
- 187: }
- 189: #netteBluescreen h2 {
- 190: font: 14pt/1.5 sans-serif !important;
- 191: color: #888;
- 192: margin: .6em 0;
- 193: }
- 195: #netteBluescreen a {
- 196: text-decoration: none;
- 197: color: #4197E3;
- 198: }
- 200: #netteBluescreen a span {
- 201: font-family: sans-serif;
- 202: color: #999;
- 203: }
- 205: #netteBluescreen h3 {
- 206: font: bold 10pt/1.5 Verdana, sans-serif !important;
- 207: margin: 1em 0;
- 208: padding: 0;
- 209: }
- 211: #netteBluescreen p {
- 212: margin: .8em 0
- 213: }
- 215: #netteBluescreen pre, #netteBluescreen code, #netteBluescreen table {
- 216: font: 9pt/1.5 Consolas, monospace !important;
- 217: }
- 219: #netteBluescreen pre, #netteBluescreen table {
- 220: background: #ffffcc;
- 221: padding: .4em .7em;
- 222: border: 1px dotted silver;
- 223: }
- 225: #netteBluescreen table pre {
- 226: padding: 0;
- 227: margin: 0;
- 228: border: none;
- 229: }
- 231: #netteBluescreen pre.dump span {
- 232: color: #c16549;
- 233: }
- 235: #netteBluescreen div.panel {
- 236: border-bottom: 1px solid #eee;
- 237: padding: 1px 2em;
- 238: }
- 240: #netteBluescreen div.inner {
- 241: padding: 0.1em 1em 1em;
- 242: background: #f5f5f5;
- 243: }
- 245: #netteBluescreen table {
- 246: border-collapse: collapse;
- 247: width: 100%;
- 248: }
- 250: #netteBluescreen td, #netteBluescreen th {
- 251: vertical-align: top;
- 252: padding: 2px 3px;
- 253: border: 1px solid #eeeebb;
- 254: }
- 256: #netteBluescreen ul {
- 257: font: 7pt/1.5 Verdana, sans-serif !important;
- 258: padding: 1em 2em 50px;
- 259: }
- 261: #netteBluescreen .highlight, #netteBluescreenError {
- 262: background: red;
- 263: color: white;
- 264: font-weight: bold;
- 265: font-style: normal;
- 266: display: block;
- 267: }
- 269: #netteBluescreen .line {
- 270: color: #9e9e7e;
- 271: font-weight: normal;
- 272: font-style: normal;
- 273: }
- 275: /* ]]> */
- 276: </style>
- 279: <script type="text/javascript">
- 280: /* <![CDATA[ */
- 281: document.write('<style> .collapsed { display: none; } </style>');
- 283: function netteToggle(link, panelId)
- 284: {
- 285: var span = link.getElementsByTagName('span')[0];
- 286: var panel = document.getElementById(panelId);
- 287: var collapsed = panel.currentStyle ? panel.currentStyle.display == 'none' : getComputedStyle(panel, null).display == 'none';
- 289: span.innerHTML = String.fromCharCode(collapsed ? 0x25bc : 0x25ba);
- 290: panel.style.display = collapsed ? 'block' : 'none';
- 292: return true;
- 293: }
- 294: /* ]]> */
- 295: </script>
- 296: </head>
- 300: <body>
- 301: <div>
- 302: <a id="netteBluescreenIcon" href="#" onclick="return !netteToggle(this, 'netteBluescreen')"><span>▼</span></a>
- 303: </div>
- 305: <div id="netteBluescreen">
- 306: <div id="netteBluescreenError" class="panel">
- 307: <h1><?php echo htmlspecialchars($title), ($exception->getCode() ? ' #' . $exception->getCode() : '') ?></h1>
- 310: </div>
- 319: <div class="panel">
- 320: <h1><?php echo htmlspecialchars(get_class($ex)), ($ex->getCode() ? ' #' . $ex->getCode() : '') ?></h1>
- 323: </div>
- 329: <p><strong>File:</strong> <?php echo htmlspecialchars($ex->getFile()) ?> <strong>Line:</strong> <?php echo $ex->getLine() ?></p>
- 337: <ol>
- 339: <li><p>
- 344: <PHP inner-code>
- 352: (<?php if (!empty($row['args'])): ?><a href="#" onclick="return !netteToggle(this, 'args<?php echo "$level-$key" ?>')">arguments <span>►</span></a><?php endif ?>)
- 353: </p>
- 357: <table>
- 358: <?php
- 360: $r = isset($row['class']) ? new ReflectionMethod($row['class'], $row['function']) : new ReflectionFunction($row['function']);
- 364: }
- 371: }
- 373: }
- 374: ?>
- 375: </table>
- 376: </div>
- 381: <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>
- 384: </li>
- 388: <li><i>empty</i></li>
- 390: </ol>
- 407: <table>
- 408: <?php
- 411: echo '<td>', (isset($keyFilter[strtolower($k)]) ? '<i>*** hidden ***</i>' : Debug::dump($v, TRUE)), "</td></tr>\n";
- 412: }
- 413: ?>
- 414: </table>
- 418: <?php } while ((method_exists($ex, 'getPrevious') && $ex = $ex->getPrevious()) || (isset($ex->previous) && $ex = $ex->previous)); ?>
- 424: <?php
- 427: <h3><a href="#" onclick="return !netteToggle(this, 'pnl-env-const')">Constants <span>▼</span></a></h3>
- 428: <table id="pnl-env-const">
- 429: <?php
- 432: echo '<td>', (isset($keyFilter[strtolower($k)]) ? '<i>*** hidden ***</i>' : Debug::dump($v, TRUE)), "</td></tr>\n";
- 433: }
- 434: ?>
- 435: </table>
- 439: <h3><a href="#" onclick="return !netteToggle(this, 'pnl-env-files')">Included files <span>►</span></a> (<?php echo count(get_included_files()) ?>)</h3>
- 440: <table id="pnl-env-files" class="collapsed">
- 441: <?php
- 444: }
- 445: ?>
- 446: </table>
- 449: <h3>$_SERVER</h3>
- 451: <p><i>empty</i></p>
- 453: <table>
- 454: <?php
- 455: foreach ($_SERVER as $k => $v) echo '<tr><td>', htmlspecialchars($k), '</td><td>', Debug::dump($v, TRUE), "</td></tr>\n";
- 456: ?>
- 457: </table>
- 465: <h3>Headers</h3>
- 466: <table>
- 467: <?php
- 468: foreach (apache_request_headers() as $k => $v) echo '<tr><td>', htmlspecialchars($k), '</td><td>', htmlspecialchars($v), "</td></tr>\n";
- 469: ?>
- 470: </table>
- 477: <p><i>empty</i></p>
- 479: <table>
- 480: <?php
- 481: foreach ($GLOBALS[$name] as $k => $v) echo '<tr><td>', htmlspecialchars($k), '</td><td>', Debug::dump($v, TRUE), "</td></tr>\n";
- 482: ?>
- 483: </table>
- 491: <h3>Headers</h3>
- 493: <pre><?php
- 495: ?></pre>
- 497: <p><i>no headers</i></p>
- 502: <ul>
- 504: <?php foreach ((array) call_user_func($callback, 'bluescreen') as $line): ?><li><?php echo $line, "\n" ?></li><?php endforeach ?>
- 506: </ul>
- 507: </div>
- 508: </body>
- 509: </html>