Source for file bluescreen.phtml

Documentation is available at bluescreen.phtml

  1. 1: <?php
  2. 2:  
  3. 3: /**
  4. 4:  * Nette Framework - Debugger bluescreen template.
  5. 5:  *
  6. 6:  * @copyright  Copyright (c) 2004, 2010 David Grudl
  7. 7:  * @license    http://nettephp.com/license  Nette license
  8. 8:  * @link       http://nettephp.com
  9. 9:  * @category   Nette
  10. 10:  * @package    Nette
  11. 11:  *
  12. 12:  * @param      array     $exception 
  13. 13:  * @param      array     $colophons 
  14. 14:  * @param      array     $internals 
  15. 15:  * @param      Application $application 
  16. 16:  * @return     void 
  17. 17:  */
  18. 18:  
  19. 19:  
  20. 20:  
  21. 21: if (!function_exists('_netteDebugPrintCode')) {
  22. 22:  
  23. 23: /**
  24. 24:  * Prints source code.
  25. 25:  * @param  string 
  26. 26:  * @param  int 
  27. 27:  * @param  int 
  28. 28:  * @return void 
  29. 29:  */
  30. 30: function _netteDebugPrintCode($file$line$count 15)
  31. 31: {
  32. 32:     if (function_exists('ini_set')) {
  33. 33:         ini_set('highlight.comment''#999; font-style: italic');
  34. 34:         ini_set('highlight.default''#000');
  35. 35:         ini_set('highlight.html''#06b');
  36. 36:         ini_set('highlight.keyword''#d24; font-weight: bold');
  37. 37:         ini_set('highlight.string''#080');
  38. 38:     }
  39. 39:  
  40. 40:     $start max(1$line floor($count 2));
  41. 41:  
  42. 42:     $source @file_get_contents($file);
  43. 43:     if (!$sourcereturn;
  44. 44:     $source explode("\n"highlight_string($sourceTRUE));
  45. 45:     $spans 1;
  46. 46:     echo $source[0]// <code><span color=highlight.html>
  47. 47:     $source explode('<br />'$source[1]);
  48. 48:     array_unshift($sourceNULL);
  49. 49:  
  50. 50:     $i $start// find last highlighted block
  51. 51:     while (--$i >= 1{
  52. 52:         if (preg_match('#.*(</?span[^>]*>)#'$source[$i]$m)) {
  53. 53:             if ($m[1!== '</span>'$spans++echo $m[1]}
  54. 54:             break;
  55. 55:         }
  56. 56:     }
  57. 57:  
  58. 58:     $source array_slice($source$start$countTRUE);
  59. 59:     end($source);
  60. 60:     $numWidth strlen((string) key($source));
  61. 61:  
  62. 62:     foreach ($source as $n => $s{
  63. 63:         $spans += substr_count($s'<span'substr_count($s'</span');
  64. 64:         $s str_replace(array("\r""\n")array('''')$s);
  65. 65:         if ($n === $line{
  66. 66:             printf(
  67. 67:                 "<span class='highlight'>Line %{$numWidth}s:    %s\n</span>%s",
  68. 68:                 $n,
  69. 69:                 strip_tags($s),
  70. 70:                 preg_replace('#[^>]*(<[^>]+>)[^<]*#''$1'$s)
  71. 71:             );
  72. 72:         else {
  73. 73:             printf("<span class='line'>Line %{$numWidth}s:</span>    %s\n"$n$s);
  74. 74:         }
  75. 75:     }
  76. 76:     echo str_repeat('</span>'$spans)'</code>';
  77. 77: }
  78. 78:  
  79. 79:  
  80. 80:  
  81. 81: /**
  82. 82:  * Dumps variable.
  83. 83:  * @param  string 
  84. 84:  * @return string 
  85. 85:  */
  86. 86: function _netteDump($dump)
  87. 87: {
  88. 88:     return '<pre class="dump">' preg_replace_callback('#(^|\s+)?(.*)\((\d+)\) <code>#''_netteDumpCb'$dump'</pre>';
  89. 89: }
  90. 90:  
  91. 91: function _netteDumpCb($m)
  92. 92: {
  93. 93:     return "$m[1]<a href='#' onclick='return !netteToggle(this)'>$m[2]($m[3](trim($m[1]|| $m[3'<abbr>&#x25bc;</abbr> </a><code>' '<abbr>&#x25ba;</abbr> </a><code class="collapsed">');
  94. 94: }
  95. 95:  
  96. 96:  
  97. 97:  
  98. 98: /**
  99. 99:  * Opens panel.
  100. 100:  * @param  string 
  101. 101:  * @param  bool 
  102. 102:  * @return void 
  103. 103:  */
  104. 104: function _netteOpenPanel($name$collapsed)
  105. 106:     static $id;
  106. 107:     $id++;
  107. 108:     ?>
  108. 109:     <div class="panel">
  109. 110:         <h2><a href="#" onclick="return !netteToggle(this, 'pnl<?php echo $id ?>')"><?php echo htmlSpecialChars($name?> <abbr><?php echo $collapsed '&#x25ba;' '&#x25bc;' ?></abbr></a></h2>
  110. 111:  
  111. 112:         <div id="pnl<?php echo $id ?>" class="<?php echo $collapsed 'collapsed ' '' ?>inner">
  112. 113:     <?php
  113. 115:  
  114. 116:  
  115. 117:  
  116. 118: /**
  117. 119:  * Closes panel.
  118. 120:  * @return void 
  119. 121:  */
  120. 122: function _netteClosePanel()
  121. 124:     ?>
  122. 125:         </div>
  123. 126:     </div>
  124. 127:     <?php
  125. 129:  
  126. 131:  
  127. 132:  
  128. 133: /**
  129. 134:  * Page title.
  130. 135:  */
  131. 136: static $errorTypes array(
  132. 137:     E_ERROR => 'Fatal Error',
  133. 138:     E_USER_ERROR => 'User Error',
  134. 139:     E_RECOVERABLE_ERROR => 'Recoverable Error',
  135. 140:     E_CORE_ERROR => 'Core Error',
  136. 141:     E_COMPILE_ERROR => 'Compile Error',
  137. 142:     E_PARSE => 'Parse Error',
  138. 143:     E_WARNING => 'Warning',
  139. 144:     E_CORE_WARNING => 'Core Warning',
  140. 145:     E_COMPILE_WARNING => 'Compile Warning',
  141. 146:     E_USER_WARNING => 'User Warning',
  142. 147:     E_NOTICE => 'Notice',
  143. 148:     E_USER_NOTICE => 'User Notice',
  144. 149:     E_STRICT => 'Strict',
  145. 150:     E_DEPRECATED => 'Deprecated',
  146. 151:     E_USER_DEPRECATED => 'User Deprecated',
  147. 152: );
  148. 153: $title ($exception instanceof FatalErrorException && isset($errorTypes[$exception->getSeverity()])) $errorTypes[$exception->getSeverity()get_class($exception);
  149. 154: $rn 0;
  150. 155:  
  151. 156: if (headers_sent()) {
  152. 157:     echo '</pre></xmp></table>';
  153. 159:  
  154. 160: ?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  155. 161: <html lang="en">
  156. 162: <head>
  157. 163:     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  158. 164:     <meta name="robots" content="noindex,noarchive">
  159. 165:     <meta name="generator" content="Nette Framework">
  160. 166:  
  161. 167:     <title><?php echo htmlspecialchars($title?></title><!-- <?php echo $exception->getMessage()($exception->getCode(' #' $exception->getCode(''?> -->
  162. 168:  
  163. 169:     <style type="text/css">
  164. 170:     /* <![CDATA[ */
  165. 171:         body {
  166. 172:             margin: 0 0 2em;
  167. 173:             padding: 0;
  168. 174:         }
  169. 175:  
  170. 176:         #netteBluescreen {
  171. 177:             font: 9pt/1.5 Verdana, sans-serif;
  172. 178:             background: white;
  173. 179:             color: #333;
  174. 180:             position: absolute;
  175. 181:             left: 0;
  176. 182:             top: 0;
  177. 183:             width: 100%;
  178. 184:             z-index: 23178;
  179. 185:             text-align: left;
  180. 186:         }
  181. 187:  
  182. 188:         #netteBluescreen * {
  183. 189:             color: inherit;
  184. 190:             background: inherit;
  185. 191:             text-align: inherit;
  186. 192:         }
  187. 193:  
  188. 194:         #netteBluescreenIcon {
  189. 195:             position: absolute;
  190. 196:             right: .5em;
  191. 197:             top: .5em;
  192. 198:             z-index: 23179;
  193. 199:             text-decoration: none;
  194. 200:             background: red;
  195. 201:             padding: 3px;
  196. 202:         }
  197. 203:  
  198. 204:         #netteBluescreenIcon abbr {
  199. 205:             color: black !important;
  200. 206:         }
  201. 207:  
  202. 208:         #netteBluescreen h1 {
  203. 209:             font: 18pt/1.5 Verdana, sans-serif !important;
  204. 210:             margin: .6em 0;
  205. 211:         }
  206. 212:  
  207. 213:         #netteBluescreen h2 {
  208. 214:             font: 14pt/1.5 sans-serif !important;
  209. 215:             color: #888;
  210. 216:             margin: .6em 0;
  211. 217:         }
  212. 218:  
  213. 219:         #netteBluescreen a {
  214. 220:             text-decoration: none;
  215. 221:             color: #4197E3;
  216. 222:         }
  217. 223:  
  218. 224:         #netteBluescreen a abbr {
  219. 225:             font-family: sans-serif;
  220. 226:             color: #999;
  221. 227:         }
  222. 228:  
  223. 229:         #netteBluescreen h3 {
  224. 230:             font: bold 10pt/1.5 Verdana, sans-serif !important;
  225. 231:             margin: 1em 0;
  226. 232:             padding: 0;
  227. 233:         }
  228. 234:  
  229. 235:         #netteBluescreen p {
  230. 236:             margin: .8em 0
  231. 237:         }
  232. 238:  
  233. 239:         #netteBluescreen pre, #netteBluescreen code, #netteBluescreen table {
  234. 240:             font: 9pt/1.5 Consolas, monospace !important;
  235. 241:         }
  236. 242:  
  237. 243:         #netteBluescreen pre, #netteBluescreen table {
  238. 244:             background: #fffbcc;
  239. 245:             padding: .4em .7em;
  240. 246:             border: 1px dotted silver;
  241. 247:         }
  242. 248:  
  243. 249:         #netteBluescreen table pre {
  244. 250:             padding: 0;
  245. 251:             margin: 0;
  246. 252:             border: none;
  247. 253:         }
  248. 254:  
  249. 255:         #netteBluescreen pre.dump span {
  250. 256:             color: #c16549;
  251. 257:         }
  252. 258:  
  253. 259:         #netteBluescreen pre.dump a {
  254. 260:             color: #333;
  255. 261:         }
  256. 262:  
  257. 263:         #netteBluescreen div.panel {
  258. 264:             border-bottom: 1px solid #eee;
  259. 265:             padding: 1px 2em;
  260. 266:         }
  261. 267:  
  262. 268:         #netteBluescreen div.inner {
  263. 269:             padding: 0.1em 1em 1em;
  264. 270:             background: #f5f5f5;
  265. 271:         }
  266. 272:  
  267. 273:         #netteBluescreen table {
  268. 274:             border-collapse: collapse;
  269. 275:             width: 100%;
  270. 276:         }
  271. 277:  
  272. 278:         #netteBluescreen td, #netteBluescreen th {
  273. 279:             vertical-align: top;
  274. 280:             text-align: left;
  275. 281:             padding: 2px 3px;
  276. 282:             border: 1px solid #eeeebb;
  277. 283:         }
  278. 284:  
  279. 285:         #netteBluescreen th {
  280. 286:             width: 10%;
  281. 287:             font-weight: bold;
  282. 288:         }
  283. 289:  
  284. 290:         #netteBluescreen .odd, #netteBluescreen .odd pre {
  285. 291:             background-color: #faf5c3;
  286. 292:         }
  287. 293:  
  288. 294:         #netteBluescreen ul {
  289. 295:             font: 7pt/1.5 Verdana, sans-serif !important;
  290. 296:             padding: 1em 2em 50px;
  291. 297:         }
  292. 298:  
  293. 299:         #netteBluescreen .highlight, #netteBluescreenError {
  294. 300:             background: red;
  295. 301:             color: white;
  296. 302:             font-weight: bold;
  297. 303:             font-style: normal;
  298. 304:             display: block;
  299. 305:         }
  300. 306:  
  301. 307:         #netteBluescreen .line {
  302. 308:             color: #9e9e7e;
  303. 309:             font-weight: normal;
  304. 310:             font-style: normal;
  305. 311:         }
  306. 312:  
  307. 313:     /* ]]> */
  308. 314:     </style>
  309. 315:  
  310. 316:  
  311. 317:     <script type="text/javascript">
  312. 318:     /* <![CDATA[ */
  313. 319:         document.write('<style> .collapsed { display: none; } <\/style>');
  314. 320:  
  315. 321:         function netteToggle(link, panelId)
  316. 322:         {
  317. 323:             var arrow = link.getElementsByTagName('abbr')[0];
  318. 324:             var panel = panelId ? document.getElementById(panelId) : link.nextSibling;
  319. 325:             while (panel.nodeType !== 1) panel = panel.nextSibling;
  320. 326:             var collapsed = panel.currentStyle ? panel.currentStyle.display == 'none' : getComputedStyle(panel, null).display == 'none';
  321. 327:  
  322. 328:             arrow.innerHTML = String.fromCharCode(collapsed ? 0x25bc : 0x25ba);
  323. 329:             panel.style.display = collapsed ? (panel.tagName.toLowerCase() === 'code' ? 'inline' : 'block') : 'none';
  324. 330:  
  325. 331:             return true;
  326. 332:         }
  327. 333:     /* ]]> */
  328. 334:     </script>
  329. 335: </head>
  330. 336:  
  331. 337:  
  332. 338:  
  333. 339: <body>
  334. 340: <div id="netteBluescreen">
  335. 341:     <a id="netteBluescreenIcon" href="#" onclick="return !netteToggle(this)"><abbr>&#x25bc;</abbr></a
  336. 342:  
  337. 343:     ><div>
  338. 344:         <div id="netteBluescreenError" class="panel">
  339. 345:             <h1><?php echo htmlspecialchars($title)($exception->getCode(' #' $exception->getCode(''?></h1>
  340. 346:  
  341. 347:             <p><?php echo htmlspecialchars($exception->getMessage()) ?></p>
  342. 348:         </div>
  343. 349:  
  344. 350:  
  345. 351:  
  346. 352:         <?php $ex $exception$level 0?>
  347. 353:         <?php do ?>
  348. 354:  
  349. 355:             <?php if ($level++)?>
  350. 356:                 <?php _netteOpenPanel('Caused by'$level 2?>
  351. 357:                 <div class="panel">
  352. 358:                     <h1><?php echo htmlspecialchars(get_class($ex))($ex->getCode(' #' $ex->getCode(''?></h1>
  353. 359:  
  354. 360:                     <p><?php echo htmlspecialchars($ex->getMessage()) ?></p>
  355. 361:                 </div>
  356. 362:             <?php endif ?>
  357. 363:  
  358. 364:             <?php $collapsed isset($internals[$ex->getFile()])?>
  359. 365:             <?php if (is_file($ex->getFile()))?>
  360. 366:             <?php _netteOpenPanel('Source file'$collapsed?>
  361. 367:                 <p><strong>File:</strong> <?php echo htmlspecialchars($ex->getFile()) ?> &nbsp; <strong>Line:</strong> <?php echo $ex->getLine(?></p>
  362. 368:                 <pre><?php _netteDebugPrintCode($ex->getFile()$ex->getLine()) ?></pre>
  363. 369:             <?php _netteClosePanel(?>
  364. 370:             <?php endif?>
  365. 371:  
  366. 372:  
  367. 373:  
  368. 374:             <?php _netteOpenPanel('Call stack'FALSE?>
  369. 375:                 <ol>
  370. 376:                     <?php foreach ($ex->getTrace(as $key => $row)?>
  371. 377:                     <li><p>
  372. 378:  
  373. 379:                     <?php if (isset($row['file']))?>
  374. 380:                         <span title="<?php echo htmlSpecialChars($row['file'])?>"><?php echo htmlSpecialChars(basename(dirname($row['file'])))'/<b>'htmlSpecialChars(basename($row['file']))'</b></span> ('$row['line']')' ?>
  375. 381:                     <?php else?>
  376. 382:                         &lt;PHP inner-code&gt;
  377. 383:                     <?php endif ?>
  378. 384:  
  379. 385:                     <?php if (isset($row['file']&& is_file($row['file']))?><a href="#" onclick="return !netteToggle(this, 'src<?php echo "$level-$key?>')">source <abbr>&#x25ba;</abbr></a>&nbsp; <?php endif ?>
  380. 386:  
  381. 387:                     <?php if (isset($row['class'])) echo $row['class'$row['type'?>
  382. 388:                     <?php echo $row['function'?>
  383. 389:  
  384. 390:                     (<?php if (!empty($row['args']))?><a href="#" onclick="return !netteToggle(this, 'args<?php echo "$level-$key?>')">arguments <abbr>&#x25ba;</abbr></a><?php endif ?>)
  385. 391:                     </p>
  386. 392:  
  387. 393:                     <?php if (!empty($row['args']))?>
  388. 394:                         <div class="collapsed" id="args<?php echo "$level-$key?>">
  389. 395:                         <table>
  390. 396:                         <?php
  391. 397:                         try {
  392. 398:                             $r isset($row['class']new ReflectionMethod($row['class']$row['function']new ReflectionFunction($row['function']);
  393. 399:                             $params $r->getParameters();
  394. 400:                         catch (Exception $e{
  395. 401:                             $params array();
  396. 402:                         }
  397. 403:                         foreach ($row['args'as $k => $v{
  398. 404:                             echo '<tr><th>'(isset($params[$k]'$' $params[$k]->name "#$k")'</th><td>';
  399. 405:                             echo _netteDump(self::_dump($v0));
  400. 406:                             echo "</td></tr>\n";
  401. 407:                         }
  402. 408:                         ?>
  403. 409:                         </table>
  404. 410:                         </div>
  405. 411:                     <?php endif ?>
  406. 412:  
  407. 413:  
  408. 414:                     <?php if (isset($row['file']&& is_file($row['file']))?>
  409. 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>
  410. 416:                     <?php endif ?>
  411. 417:  
  412. 418:                     </li>
  413. 419:                     <?php endforeach ?>
  414. 420:  
  415. 421:                     <?php if (!isset($row)):?>
  416. 422:                     <li><i>empty</i></li>
  417. 423:                     <?php endif ?>
  418. 424:                 </ol>
  419. 425:             <?php _netteClosePanel(?>
  420. 426:  
  421. 427:  
  422. 428:  
  423. 429:             <?php if ($ex instanceof IDebuggable)?>
  424. 430:             <?php foreach ($ex->getPanels(as $name => $panel)?>
  425. 431:             <?php _netteOpenPanel($nameempty($panel['expanded'])) ?>
  426. 432:                 <?php echo $panel['content'?>
  427. 433:             <?php _netteClosePanel(?>
  428. 434:             <?php endforeach ?>
  429. 435:             <?php endif ?>
  430. 436:  
  431. 437:  
  432. 438:  
  433. 439:             <?php if (isset($ex->context&& is_array($ex->context)):?>
  434. 440:             <?php _netteOpenPanel('Variables'TRUE?>
  435. 441:             <table>
  436. 442:             <?php
  437. 443:             foreach ($ex->context as $k => $v{
  438. 444:                 echo '<tr><th>$'htmlspecialchars($k)'</th><td>'_netteDump(self::_dump($v0))"</td></tr>\n";
  439. 445:             }
  440. 446:             ?>
  441. 447:             </table>
  442. 448:             <?php _netteClosePanel(?>
  443. 449:             <?php endif ?>
  444. 450:  
  445. 451:         <?php while ((method_exists($ex'getPrevious'&& $ex $ex->getPrevious()) || (isset($ex->previous&& $ex $ex->previous))?>
  446. 452:         <?php while (--$level_netteClosePanel(?>
  447. 453:  
  448. 454:  
  449. 455:  
  450. 456:         <?php if (!empty($application)):?>
  451. 457:         <?php _netteOpenPanel('Nette Application'TRUE?>
  452. 458:             <h3>Requests</h3>
  453. 459:             <?php $tmp $application->getRequests()echo _netteDump(self::_dump($tmp0)) ?>
  454. 460:  
  455. 461:             <h3>Presenter</h3>
  456. 462:             <?php $tmp $application->getPresenter()echo _netteDump(self::_dump($tmp0)) ?>
  457. 463:         <?php _netteClosePanel(?>
  458. 464:         <?php endif ?>
  459. 465:  
  460. 466:  
  461. 467:  
  462. 468:         <?php _netteOpenPanel('Environment'TRUE?>
  463. 469:             <?php
  464. 470:             $list get_defined_constants(TRUE);
  465. 471:             if (!empty($list['user'])):?>
  466. 472:             <h3><a href="#" onclick="return !netteToggle(this, 'pnl-env-const')">Constants <abbr>&#x25bc;</abbr></a></h3>
  467. 473:             <table id="pnl-env-const">
  468. 474:             <?php
  469. 475:             foreach ($list['user'as $k => $v{
  470. 476:                 echo '<tr'.($rn++%2?' class="odd"':'').'><th>'htmlspecialchars($k)'</th>';
  471. 477:                 echo '<td>'_netteDump(self::_dump($v0))"</td></tr>\n";
  472. 478:             }
  473. 479:             ?>
  474. 480:             </table>
  475. 481:             <?php endif ?>
  476. 482:  
  477. 483:  
  478. 484:             <h3><a href="#" onclick="return !netteToggle(this, 'pnl-env-files')">Included files <abbr>&#x25ba;</abbr></a>(<?php echo count(get_included_files()) ?>)</h3>
  479. 485:             <table id="pnl-env-files" class="collapsed">
  480. 486:             <?php
  481. 487:             foreach (get_included_files(as $v{
  482. 488:                 echo '<tr'.($rn++%2?' class="odd"':'').'><td>'htmlspecialchars($v)"</td></tr>\n";
  483. 489:             }
  484. 490:             ?>
  485. 491:             </table>
  486. 492:  
  487. 493:  
  488. 494:             <h3>$_SERVER</h3>
  489. 495:             <?php if (empty($_SERVER)):?>
  490. 496:             <p><i>empty</i></p>
  491. 497:             <?php else?>
  492. 498:             <table>
  493. 499:             <?php
  494. 500:             foreach ($_SERVER as $k => $vecho '<tr'.($rn++%2?' class="odd"':'').'><th>'htmlspecialchars($k)'</th><td>'_netteDump(self::_dump($v0))"</td></tr>\n";
  495. 501:             ?>
  496. 502:             </table>
  497. 503:             <?php endif ?>
  498. 504:         <?php _netteClosePanel(?>
  499. 505:  
  500. 506:  
  501. 507:  
  502. 508:         <?php _netteOpenPanel('HTTP request'TRUE?>
  503. 509:             <?php if (function_exists('apache_request_headers'))?>
  504. 510:             <h3>Headers</h3>
  505. 511:             <table>
  506. 512:             <?php
  507. 513:             foreach (apache_request_headers(as $k => $vecho '<tr'.($rn++%2?' class="odd"':'').'><th>'htmlspecialchars($k)'</th><td>'htmlspecialchars($v)"</td></tr>\n";
  508. 514:             ?>
  509. 515:             </table>
  510. 516:             <?php endif ?>
  511. 517:  
  512. 518:  
  513. 519:             <?php foreach (array('_GET''_POST''_COOKIE'as $name)?>
  514. 520:             <h3>$<?php echo $name ?></h3>
  515. 521:             <?php if (empty($GLOBALS[$name])):?>
  516. 522:             <p><i>empty</i></p>
  517. 523:             <?php else?>
  518. 524:             <table>
  519. 525:             <?php
  520. 526:             foreach ($GLOBALS[$nameas $k => $vecho '<tr'.($rn++%2?' class="odd"':'').'><th>'htmlspecialchars($k)'</th><td>'_netteDump(self::_dump($v0))"</td></tr>\n";
  521. 527:             ?>
  522. 528:             </table>
  523. 529:             <?php endif ?>
  524. 530:             <?php endforeach ?>
  525. 531:         <?php _netteClosePanel(?>
  526. 532:  
  527. 533:  
  528. 534:  
  529. 535:         <?php _netteOpenPanel('HTTP response'TRUE?>
  530. 536:             <h3>Headers</h3>
  531. 537:             <?php if (headers_list())?>
  532. 538:             <pre><?php
  533. 539:             foreach (headers_list(as $secho htmlspecialchars($s)'<br>';
  534. 540:             ?></pre>
  535. 541:             <?php else?>
  536. 542:             <p><i>no headers</i></p>
  537. 543:             <?php endif ?>
  538. 544:         <?php _netteClosePanel(?>
  539. 545:  
  540. 546:  
  541. 547:         <ul>
  542. 548:             <?php foreach ($colophons as $callback)?>
  543. 549:             <?php foreach ((array) call_user_func($callback'bluescreen'as $line)?><li><?php echo $line"\n" ?></li><?php endforeach ?>
  544. 550:             <?php endforeach ?>
  545. 551:         </ul>
  546. 552:     </div>
  547. 553: </div>
  548. 554:  
  549. 555: <script type="text/javascript">
  550. 556:     document.body.appendChild(document.getElementById('netteBluescreen'));
  551. 557: </script>
  552. 558: </body>
  553. 559: </html>