KXStudio Website https://kx.studio/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

error.php 5.4KB

9 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. <?php
  2. if (defined('AJAX') and AJAX or isset($_POST['ajax'])) {
  3. foreach ($backtrace as $trace)
  4. $body.= "\n"._f("%s on line %d", array($trace["file"], fallback($trace["line"], 0)));
  5. exit($body."HEY_JAVASCRIPT_THIS_IS_AN_ERROR_JUST_SO_YOU_KNOW");
  6. }
  7. $jquery = is_callable(array("Config", "current")) ?
  8. Config::current()->url."/includes/lib/gz.php?file=jquery.js" :
  9. "http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" ;
  10. if (!class_exists("MainController"))
  11. require INCLUDES_DIR."/controller/Main.php";
  12. if (class_exists("Route"))
  13. Route::current(MainController::current());
  14. ?>
  15. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  16. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  17. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  18. <head>
  19. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  20. <title>Chyrp: <?php echo $title; ?></title>
  21. <script src="<?php echo $jquery; ?>" type="text/javascript" charset="utf-8"></script>
  22. <style type="text/css">
  23. html, body, ul, ol, li,
  24. h1, h2, h3, h4, h5, h6,
  25. form, fieldset, a, p {
  26. margin: 0;
  27. padding: 0;
  28. border: 0;
  29. }
  30. html {
  31. font-size: 62.5%;
  32. }
  33. body {
  34. font: 1.25em/1.5em normal Verdana, Helvetica, Arial, sans-serif;
  35. color: #626262;
  36. background: #e8e8e8;
  37. padding: 0 0 5em;
  38. }
  39. .window {
  40. width: 30em;
  41. background: #fff;
  42. padding: 2em;
  43. margin: 5em auto 0;
  44. -webkit-border-radius: 2em;
  45. -moz-border-radius: 2em;
  46. }
  47. h1 {
  48. color: #ccc;
  49. font-size: 3em;
  50. margin: .25em 0 .5em;
  51. text-align: center;
  52. }
  53. h2 {
  54. font-size: 1.25em;
  55. margin: 1em 0 0;
  56. }
  57. code {
  58. color: #06B;
  59. font-family: Monaco, monospace;
  60. }
  61. ul, ol {
  62. margin: 1em 3em;
  63. }
  64. ol.backtrace {
  65. margin-top: .5em;
  66. }
  67. .footer {
  68. color: #777;
  69. margin-top: 1em;
  70. font-size: .9em;
  71. text-align: center;
  72. }
  73. .error {
  74. color: #F22;
  75. font-size: 12px;
  76. }
  77. a:link, a:visited {
  78. color: #6B0;
  79. }
  80. a:hover {
  81. text-decoration: underline;
  82. }
  83. a.big {
  84. background: #eee;
  85. margin-top: 2em;
  86. display: block;
  87. padding: .75em 1em;
  88. color: #777;
  89. text-shadow: #fff 1px 1px 0;
  90. font: 1em normal "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;
  91. text-decoration: none;
  92. -webkit-border-radius: .5em;
  93. -moz-border-radius: .5em;
  94. }
  95. a.big:hover {
  96. background: #f5f5f5;
  97. }
  98. a.big:active {
  99. background: #e0e0e0;
  100. }
  101. <?php if (!logged_in()): ?>
  102. a.big.back {
  103. -webkit-border-top-right-radius: 0 !important;
  104. -webkit-border-bottom-right-radius: 0 !important;
  105. width: 42%;
  106. float: left;
  107. }
  108. a.big.login {
  109. float: right;
  110. text-align: right;
  111. -webkit-border-top-left-radius: 0 !important;
  112. -webkit-border-bottom-left-radius: 0 !important;
  113. background: #f5f5f5;
  114. width: 42%;
  115. }
  116. <?php endif; ?>
  117. .clear {
  118. clear: both;
  119. }
  120. </style>
  121. <script type="text/javascript" charset="utf-8">
  122. $(function(){
  123. $('<a class="big back" href="javascript:history.back()">&larr; <?php echo __("Back"); ?></a>').insertBefore(".clear.last")
  124. })
  125. </script>
  126. </head>
  127. <body>
  128. <div class="window">
  129. <h1><?php echo $title; ?></h1>
  130. <div class="message">
  131. <?php echo $body; ?>
  132. <?php if (!empty($backtrace)): ?>
  133. <h2><?php echo __("Backtrace"); ?></h2>
  134. <ol class="backtrace">
  135. <?php foreach ($backtrace as $trace): ?>
  136. <li><code><?php echo _f("%s on line %d", array($trace["file"], fallback($trace["line"], 0))); ?></code></li>
  137. <?php endforeach; ?>
  138. </ol>
  139. <?php endif; ?>
  140. <div class="clear"></div>
  141. <?php if (class_exists("Route") and !logged_in() and $body != __("Route was initiated without a Controller.")): ?>
  142. <a href="<?php echo url("login", MainController::current()); ?>" class="big login"><?php echo __("Log In"); ?> &rarr;</a>
  143. <?php endif; ?>
  144. <div class="clear last"></div>
  145. </div>
  146. </div>
  147. <?php if (defined("CHYRP_VERSION")): ?>
  148. <p class="footer">Chyrp <?php echo CHYRP_VERSION; ?> &copy; 2011 Chyrp Team</p>
  149. <?php endif; ?>
  150. </body>
  151. </html>