SproutCMS

This is the code documentation for the SproutCMS project

source of /sprout/views/dbtools/exception_details.php

  1. <?php
  2. use Sprout\Helpers\Enc;
  3. use Sprout\Helpers\Form;
  4.  
  5. Form::setData([
  6. 'id' => 'SE' . $log['id'],
  7. ]);
  8. ?>
  9.  
  10. <style>
  11. pre {
  12. height: 200px;
  13. overflow: auto;
  14. resize: vertical;
  15. }
  16. </style>
  17.  
  18.  
  19. <div class="mainbar-with-right-sidebar">
  20. <?php if (!empty($log)): ?>
  21. <table class="main-list" style="margin-top: 0">
  22. <thead>
  23. <tr>
  24. <th class="header">Date</th>
  25. <th class="header">Class</th>
  26. <th class="header">Message</th>
  27. </tr>
  28. </thead>
  29. <tbody>
  30. <tr>
  31. <td><?php echo Enc::html($log['date_generated']); ?></td>
  32. <td><a href="dbtools/exceptionLog?class=<?php echo Enc::html(Enc::url($log['class_name'])); ?>"><?php echo Enc::html($log['class_name']); ?></a></td>
  33. <td><?php echo Enc::html($log['message']); ?></td>
  34. </tr>
  35. </tbody>
  36. </table>
  37.  
  38. <h3>Exception object</h3>
  39. <pre><?php echo Enc::html(print_r(json_decode($log['exception_object'], true), true)); ?></pre>
  40.  
  41. <h3>Exception trace</h3>
  42. <pre><?php echo Enc::html(print_r(json_decode($log['exception_trace'], true), true)); ?></pre>
  43.  
  44. <h3>$_SERVER</h3>
  45. <pre><?php echo Enc::html(print_r(json_decode($log['server'], true), true)); ?></pre>
  46.  
  47. <h3>$_GET</h3>
  48. <pre><?php echo Enc::html(print_r(json_decode($log['get_data'], true), true)); ?></pre>
  49.  
  50. <h3>$_POST</h3>
  51. <p><em>This is not stored for security reasons.</em></p>
  52.  
  53. <h3>$_SESSION</h3>
  54. <pre><?php echo Enc::html(print_r(json_decode($log['session'], true), true)); ?></pre>
  55.  
  56. <?php else: ?>
  57. <p><em>Exception not found</em></p>
  58. <p><a href="dbtools/exceptionLog" class="button button-blue icon-before icon-keyboard_arrow_left">Back</a></p>
  59. <?php endif; ?>
  60. </div>
  61.  
  62. <div class="right-sidebar">
  63. <div class="right-sidebar-anchor"></div>
  64. <div class="right-sidebar-inner">
  65. <div class="white-box">
  66. <h3 style="margin-top: 0">Lookup</h3>
  67. <form action="dbtools/exceptionDetail" method="get" class="-clearfix">
  68. <div class="field-group-item col col--two-third">
  69. <?php
  70. echo Form::text('id', ['placeholder' => 'SE2400']);
  71. ?>
  72. </div>
  73. <div class="field-group-item col col--one-third">
  74. <button type="submit" class="button button-block icon-after icon-keyboard_arrow_right">Lookup</button>
  75. </div>
  76. </form>
  77. </div>
  78. </div>
  79. </div>
  80.