error.php 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <?php
  2. session_start();
  3. $http_host = $_SERVER["HTTP_HOST"];
  4. $doc_root = $_SERVER["DOCUMENT_ROOT"] . "/";
  5. include $doc_root . "functions.php";
  6. $proto = get_protocol();
  7. $con = start_db();
  8. $server = $proto . $http_host;
  9. $lang = select_language($con);
  10. $lserver = $server . "/" . $lang;
  11. $cur_section = "error";
  12. $cur_entry = http_response_code();
  13. $error = $cur_entry;
  14. if (!in-array($error, array("400", "401", "403", "404", "500")){
  15. $error = "XXX";
  16. }
  17. ?>
  18. <!DOCTYPE html>
  19. <html>
  20. <head>
  21. <meta content='text/html; charset=windows-1252' http-equiv='content-type'/>
  22. <meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1'>
  23. <title><?=text($con, "ERROR_TITLE", $lang);?> - <?=text($con, "USER_NAME", $lang);?></title>
  24. <link rel='shortcut icon' href='<?=$lserver?>/img/logo/favicon.ico'>
  25. <!-- CSS files -->
  26. <style>
  27. <?php
  28. include $doc_root . "css/ui.css";
  29. include $doc_root . "css/error.css";
  30. ?>
  31. </style>
  32. <!-- CSS for mobile version -->
  33. <style media="(max-width : 990px)">
  34. <?php
  35. include $doc_root . "css/m/ui.css";
  36. include $doc_root . "css/m/error.css";
  37. ?>
  38. </style>
  39. <meta name="robots" content="noindex follow"/>
  40. </head>
  41. <body>
  42. <?php
  43. include $doc_root . "header.php";
  44. ?>
  45. <div class='section' >
  46. <h3 class='section_title'><?=text($con, "ERROR_ERROR", $lang)?></h3>
  47. <table id='error_header'>
  48. <tr>
  49. <td>
  50. <table id='error_code' class='entry'>
  51. <tr>
  52. <td id='error_number'>
  53. 404
  54. </td>
  55. <td id='error_tag'>
  56. <?=text($con, "ERROR_ERROR", $lang);?>
  57. <br/>
  58. <?=text($con, "ERROR_CODE", $lang);?>
  59. </td>
  60. <tr>
  61. </table>
  62. </td>
  63. <td>
  64. <h2><?=text($con, "ERROR_" . $error . "_TITLE", $lang);?></h2>
  65. </td>
  66. </tr>
  67. </table>
  68. <div id='error_message' class='entry'>
  69. <?=text($con, "ERROR_" . $error . "_DESCRIPTION", $lang);?>
  70. <br/><br/>
  71. <?=text($con, "ERROR_" . $error . "_SOLUTION", $lang);?>
  72. <ul>
  73. <li>
  74. <a href='javascript: location.reload();'><?=text($con, "ERROR_" . $error . "_SOLUTION_0", $lang);?></a>
  75. </li>
  76. <li>
  77. <a href='javascript: history.go(-1);'><?=text($con, "ERROR_" . $error . "_SOLUTION_1", $lang);?></a>
  78. </li>
  79. <li>
  80. <a href='<?=$lserver?>/'><?=text($con, "ERROR_" . $error . "_SOLUTION_2", $lang);?></a>
  81. </li>
  82. </ul>
  83. </div> <!-- #error_message -->
  84. </div> <!-- .section -->
  85. <?php
  86. include $doc_root . "footer.php";
  87. stats($con, $cur_section, $cur_entry);
  88. http_response_code($cur_entry);
  89. ?>
  90. </body>
  91. </html>