Bladeren bron

Error pages reworked.

Iñigo Valentin 8 jaren geleden
bovenliggende
commit
baebec86a0
7 gewijzigde bestanden met toevoegingen van 199 en 173 verwijderingen
  1. 120 0
      sql/02_DATA.SQL
  2. 5 3
      www/.htaccess
  3. 43 0
      www/css/error.css
  4. 0 0
      www/css/m/error.css
  5. 31 18
      www/error.php
  6. 0 76
      www/error/404.php
  7. 0 76
      www/error/500.php

+ 120 - 0
sql/02_DATA.SQL

@@ -288,6 +288,126 @@ INSERT INTO text VALUES ('PROFILE_DOWNLOAD_OTHER',   'en', 'PROFILE', 'Download
 INSERT INTO text VALUES ('PROFILE_DOWNLOAD_OTHER',   'eu', 'PROFILE', 'Beste hizkuntzetan deskargatu', null);
 
 
+-- PAGE error
+INSERT INTO text VALUES ('ERROR_TITLE',           'es', 'ERROR', 'Error', null);
+INSERT INTO text VALUES ('ERROR_TITLE',           'en', 'ERROR', 'Error', null);
+INSERT INTO text VALUES ('ERROR_TITLE',           'eu', 'ERROR', 'Errorea', null);
+INSERT INTO text VALUES ('ERROR_ERROR',           'es', 'ERROR', 'ERROR', null);
+INSERT INTO text VALUES ('ERROR_ERROR',           'en', 'ERROR', 'ERROR', null);
+INSERT INTO text VALUES ('ERROR_ERROR',           'eu', 'ERROR', 'ERROR', null);
+INSERT INTO text VALUES ('ERROR_CODE',            'es', 'ERROR', 'CODE', null);
+INSERT INTO text VALUES ('ERROR_CODE',            'en', 'ERROR', 'CODE', null);
+INSERT INTO text VALUES ('ERROR_CODE',            'eu', 'ERROR', 'CODE', null);
+INSERT INTO text VALUES ('ERROR_400_TITLE',       'es', 'ERROR', 'Bad request', null);
+INSERT INTO text VALUES ('ERROR_400_TITLE',       'en', 'ERROR', 'Bad request', null);
+INSERT INTO text VALUES ('ERROR_400_TITLE',       'eu', 'ERROR', 'Bad request', null);
+INSERT INTO text VALUES ('ERROR_400_DESCRIPTION', 'es', 'ERROR', 'La solicitud se ha recibido con errores... y no se como responder.', null);
+INSERT INTO text VALUES ('ERROR_400_DESCRIPTION', 'en', 'ERROR', 'This server doesnt understand your request.', null);
+INSERT INTO text VALUES ('ERROR_400_DESCRIPTION', 'eu', 'ERROR', 'La solicitud se ha recibido con errores... y no se como responder.', null);
+INSERT INTO text VALUES ('ERROR_400_SOLUTION',    'es', 'ERROR', 'Prueba una solución:', null);
+INSERT INTO text VALUES ('ERROR_400_SOLUTION',    'en', 'ERROR', 'Try a solution:', null);
+INSERT INTO text VALUES ('ERROR_400_SOLUTION',    'eu', 'ERROR', 'Prueba una solución:', null);
+INSERT INTO text VALUES ('ERROR_400_SOLUTION_0',  'es', 'ERROR', 'Volver a la página anterior', null);
+INSERT INTO text VALUES ('ERROR_400_SOLUTION_0',  'en', 'ERROR', 'Go to the previous page', null);
+INSERT INTO text VALUES ('ERROR_400_SOLUTION_0',  'eu', 'ERROR', 'Volver a la página anterior', null);
+INSERT INTO text VALUES ('ERROR_400_SOLUTION_1',  'es', 'ERROR', 'Ir a la pá principal', null);
+INSERT INTO text VALUES ('ERROR_400_SOLUTION_1',  'en', 'ERROR', 'Go to the main page', null);
+INSERT INTO text VALUES ('ERROR_400_SOLUTION_1',  'eu', 'ERROR', 'Ir a la pá principal', null);
+INSERT INTO text VALUES ('ERROR_400_SOLUTION_2',  'es', 'ERROR', 'Ver vídeos de gatitos en Youtube', null);
+INSERT INTO text VALUES ('ERROR_400_SOLUTION_2',  'en', 'ERROR', 'Watch cute cat videos in Youtube', null);
+INSERT INTO text VALUES ('ERROR_400_SOLUTION_2',  'eu', 'ERROR', 'Ver vídeos de gatitos en Youtube', null);
+INSERT INTO text VALUES ('ERROR_401_TITLE',       'es', 'ERROR', 'Sin autorización', null);
+INSERT INTO text VALUES ('ERROR_401_TITLE',       'en', 'ERROR', 'Unauthorized', null);
+INSERT INTO text VALUES ('ERROR_401_TITLE',       'eu', 'ERROR', 'Sin autorización', null);
+INSERT INTO text VALUES ('ERROR_401_DESCRIPTION', 'es', 'ERROR', 'Estás intentando ver algo que no debes. No soy muy de prohibir, así que lo m&aacutes probable es que sea algo momentaneo.', null);
+INSERT INTO text VALUES ('ERROR_401_DESCRIPTION', 'en', 'ERROR', 'You are trying to see something you are not supposed to.', null);
+INSERT INTO text VALUES ('ERROR_401_DESCRIPTION', 'eu', 'ERROR', 'Estás intentando ver algo que no debes. No soy muy de prohibir, así que lo m&aacutes probable es que sea algo momentaneo.', null);
+INSERT INTO text VALUES ('ERROR_401_SOLUTION',    'es', 'ERROR', 'Prueba una solución:', null);
+INSERT INTO text VALUES ('ERROR_401_SOLUTION',    'en', 'ERROR', 'Try a solution:', null);
+INSERT INTO text VALUES ('ERROR_401_SOLUTION',    'eu', 'ERROR', 'Prueba una solución:', null);
+INSERT INTO text VALUES ('ERROR_401_SOLUTION_0',  'es', 'ERROR', 'Volver a la página anterior', null);
+INSERT INTO text VALUES ('ERROR_401_SOLUTION_0',  'en', 'ERROR', 'Go to the previous page', null);
+INSERT INTO text VALUES ('ERROR_401_SOLUTION_0',  'eu', 'ERROR', 'Volver a la página anterior', null);
+INSERT INTO text VALUES ('ERROR_401_SOLUTION_1',  'es', 'ERROR', 'Ir a la pá principal', null);
+INSERT INTO text VALUES ('ERROR_401_SOLUTION_1',  'en', 'ERROR', 'Go to the main page', null);
+INSERT INTO text VALUES ('ERROR_401_SOLUTION_1',  'eu', 'ERROR', 'Ir a la pá principal', null);
+INSERT INTO text VALUES ('ERROR_401_SOLUTION_2',  'es', 'ERROR', 'Ver vídeos de gatitos en Youtube', null);
+INSERT INTO text VALUES ('ERROR_401_SOLUTION_2',  'en', 'ERROR', 'Watch cute cat videos in Youtube', null);
+INSERT INTO text VALUES ('ERROR_401_SOLUTION_2',  'eu', 'ERROR', 'Ver vídeos de gatitos en Youtube', null);
+INSERT INTO text VALUES ('ERROR_403_TITLE',       'es', 'ERROR', 'Prohibido', null);
+INSERT INTO text VALUES ('ERROR_403_TITLE',       'en', 'ERROR', 'Forbidden', null);
+INSERT INTO text VALUES ('ERROR_403_TITLE',       'eu', 'ERROR', 'Debekatuta', null);
+INSERT INTO text VALUES ('ERROR_403_DESCRIPTION', 'es', 'ERROR', 'Estás intentando ver algo que no debes. No soy muy de prohibir, así que lo m&aacutes probable es que sea algo momentaneo.', null);
+INSERT INTO text VALUES ('ERROR_403_DESCRIPTION', 'en', 'ERROR', 'You are trying to see something you are not supposed to.', null);
+INSERT INTO text VALUES ('ERROR_403_DESCRIPTION', 'eu', 'ERROR', 'Estás intentando ver algo que no debes. No soy muy de prohibir, así que lo m&aacutes probable es que sea algo momentaneo.', null);
+INSERT INTO text VALUES ('ERROR_403_SOLUTION',    'es', 'ERROR', 'Prueba una solución:', null);
+INSERT INTO text VALUES ('ERROR_403_SOLUTION',    'en', 'ERROR', 'Try a solution:', null);
+INSERT INTO text VALUES ('ERROR_403_SOLUTION',    'eu', 'ERROR', 'Prueba una solución:', null);
+INSERT INTO text VALUES ('ERROR_403_SOLUTION_0',  'es', 'ERROR', 'Volver a la página anterior', null);
+INSERT INTO text VALUES ('ERROR_403_SOLUTION_0',  'en', 'ERROR', 'Go to the previous page', null);
+INSERT INTO text VALUES ('ERROR_403_SOLUTION_0',  'eu', 'ERROR', 'Volver a la página anterior', null);
+INSERT INTO text VALUES ('ERROR_403_SOLUTION_1',  'es', 'ERROR', 'Ir a la pá principal', null);
+INSERT INTO text VALUES ('ERROR_403_SOLUTION_1',  'en', 'ERROR', 'Go to the main page', null);
+INSERT INTO text VALUES ('ERROR_403_SOLUTION_1',  'eu', 'ERROR', 'Ir a la pá principal', null);
+INSERT INTO text VALUES ('ERROR_403_SOLUTION_2',  'es', 'ERROR', 'Ver vídeos de gatitos en Youtube', null);
+INSERT INTO text VALUES ('ERROR_403_SOLUTION_2',  'en', 'ERROR', 'Watch cute cat videos in Youtube', null);
+INSERT INTO text VALUES ('ERROR_403_SOLUTION_2',  'eu', 'ERROR', 'Ver vídeos de gatitos en Youtube', null);
+INSERT INTO text VALUES ('ERROR_404_TITLE',       'es', 'ERROR', 'No enconrtado', null);
+INSERT INTO text VALUES ('ERROR_404_TITLE',       'en', 'ERROR', 'Not found', null);
+INSERT INTO text VALUES ('ERROR_404_TITLE',       'eu', 'ERROR', 'No enconrtado', null);
+INSERT INTO text VALUES ('ERROR_404_DESCRIPTION', 'es', 'ERROR', 'La página que buscas no existe en este universo. Inténtalo en uno diferente.', null);
+INSERT INTO text VALUES ('ERROR_404_DESCRIPTION', 'en', 'ERROR', 'Sorry. The page you are looking for doesn't exist in this universe. Try in an alternate one.', null);
+INSERT INTO text VALUES ('ERROR_404_DESCRIPTION', 'eu', 'ERROR', 'La página que buscas no existe en este universo. Inténtalo en uno diferente.', null);
+INSERT INTO text VALUES ('ERROR_404_SOLUTION',    'es', 'ERROR', 'Prueba una solución:', null);
+INSERT INTO text VALUES ('ERROR_404_SOLUTION',    'en', 'ERROR', 'Try a solution:', null);
+INSERT INTO text VALUES ('ERROR_404_SOLUTION',    'eu', 'ERROR', 'Prueba una solución:', null);
+INSERT INTO text VALUES ('ERROR_404_SOLUTION_0',  'es', 'ERROR', 'Volver a la página anterior', null);
+INSERT INTO text VALUES ('ERROR_404_SOLUTION_0',  'en', 'ERROR', 'Go to the previous page', null);
+INSERT INTO text VALUES ('ERROR_404_SOLUTION_0',  'eu', 'ERROR', 'Volver a la página anterior', null);
+INSERT INTO text VALUES ('ERROR_404_SOLUTION_1',  'es', 'ERROR', 'Ir a la pá principal', null);
+INSERT INTO text VALUES ('ERROR_404_SOLUTION_1',  'en', 'ERROR', 'Go to the main page', null);
+INSERT INTO text VALUES ('ERROR_404_SOLUTION_1',  'eu', 'ERROR', 'Ir a la pá principal', null);
+INSERT INTO text VALUES ('ERROR_404_SOLUTION_2',  'es', 'ERROR', 'Ver vídeos de gatitos en Youtube', null);
+INSERT INTO text VALUES ('ERROR_404_SOLUTION_2',  'en', 'ERROR', 'Watch cute cat videos in Youtube', null);
+INSERT INTO text VALUES ('ERROR_404_SOLUTION_2',  'eu', 'ERROR', 'Ver vídeos de gatitos en Youtube', null);
+INSERT INTO text VALUES ('ERROR_500_TITLE',       'es', 'ERROR', 'Error del servidor', null);
+INSERT INTO text VALUES ('ERROR_500_TITLE',       'en', 'ERROR', 'Server error', null);
+INSERT INTO text VALUES ('ERROR_500_TITLE',       'eu', 'ERROR', 'Errorea serbidorean', null);
+INSERT INTO text VALUES ('ERROR_500_DESCRIPTION', 'es', 'ERROR', 'La he liado parda. El fallo está en mi lado, pero no te preocupes, ahorá mismo el informático estará sudando tinta gorda para arreglarlo.', null);
+INSERT INTO text VALUES ('ERROR_500_DESCRIPTION', 'en', 'ERROR', 'This one is on me: I've messed something up. Sorry! I'm probably trying to fix it right now.', null);
+INSERT INTO text VALUES ('ERROR_500_DESCRIPTION', 'eu', 'ERROR', 'La he liado parda. El fallo está en mi lado, pero no te preocupes, ahorá mismo el informático estará sudando tinta gorda para arreglarlo.', null);
+INSERT INTO text VALUES ('ERROR_500_SOLUTION',    'es', 'ERROR', 'Prueba una solución:', null);
+INSERT INTO text VALUES ('ERROR_500_SOLUTION',    'en', 'ERROR', 'Try a solution:', null);
+INSERT INTO text VALUES ('ERROR_500_SOLUTION',    'eu', 'ERROR', 'Prueba una solución:', null);
+INSERT INTO text VALUES ('ERROR_500_SOLUTION_0',  'es', 'ERROR', 'Volver a la página anterior', null);
+INSERT INTO text VALUES ('ERROR_500_SOLUTION_0',  'en', 'ERROR', 'Go to the previous page', null);
+INSERT INTO text VALUES ('ERROR_500_SOLUTION_0',  'eu', 'ERROR', 'Volver a la página anterior', null);
+INSERT INTO text VALUES ('ERROR_500_SOLUTION_1',  'es', 'ERROR', 'Ir a la pá principal', null);
+INSERT INTO text VALUES ('ERROR_500_SOLUTION_1',  'en', 'ERROR', 'Go to the main page', null);
+INSERT INTO text VALUES ('ERROR_500_SOLUTION_1',  'eu', 'ERROR', 'Ir a la pá principal', null);
+INSERT INTO text VALUES ('ERROR_500_SOLUTION_2',  'es', 'ERROR', 'Ver vídeos de gatitos en Youtube', null);
+INSERT INTO text VALUES ('ERROR_500_SOLUTION_2',  'en', 'ERROR', 'Watch cute cat videos in Youtube', null);
+INSERT INTO text VALUES ('ERROR_500_SOLUTION_2',  'eu', 'ERROR', 'Ver vídeos de gatitos en Youtube', null);
+INSERT INTO text VALUES ('ERROR_XXX_TITLE',       'es', 'ERROR', 'Error inesperado', null);
+INSERT INTO text VALUES ('ERROR_XXX_TITLE',       'en', 'ERROR', 'Unexpected error', null);
+INSERT INTO text VALUES ('ERROR_XXX_TITLE',       'eu', 'ERROR', 'Error inesperado', null);
+INSERT INTO text VALUES ('ERROR_XXX_DESCRIPTION', 'es', 'ERROR', 'Algo ha ido mal...', null);
+INSERT INTO text VALUES ('ERROR_XXX_DESCRIPTION', 'en', 'ERROR', 'Something went wrong...', null);
+INSERT INTO text VALUES ('ERROR_XXX_DESCRIPTION', 'eu', 'ERROR', 'Algo ha ido mal...', null);
+INSERT INTO text VALUES ('ERROR_XXX_SOLUTION',    'es', 'ERROR', 'Prueba una solución:', null);
+INSERT INTO text VALUES ('ERROR_XXX_SOLUTION',    'en', 'ERROR', 'Try a solution:', null);
+INSERT INTO text VALUES ('ERROR_XXX_SOLUTION',    'eu', 'ERROR', 'Prueba una solución:', null);
+INSERT INTO text VALUES ('ERROR_XXX_SOLUTION_0',  'es', 'ERROR', 'Volver a la página anterior', null);
+INSERT INTO text VALUES ('ERROR_XXX_SOLUTION_0',  'en', 'ERROR', 'Go to the previous page', null);
+INSERT INTO text VALUES ('ERROR_XXX_SOLUTION_0',  'eu', 'ERROR', 'Volver a la página anterior', null);
+INSERT INTO text VALUES ('ERROR_XXX_SOLUTION_1',  'es', 'ERROR', 'Ir a la pá principal', null);
+INSERT INTO text VALUES ('ERROR_XXX_SOLUTION_1',  'en', 'ERROR', 'Go to the main page', null);
+INSERT INTO text VALUES ('ERROR_XXX_SOLUTION_1',  'eu', 'ERROR', 'Ir a la pá principal', null);
+INSERT INTO text VALUES ('ERROR_XXX_SOLUTION_2',  'es', 'ERROR', 'Ver vídeos de gatitos en Youtube', null);
+INSERT INTO text VALUES ('ERROR_XXX_SOLUTION_2',  'en', 'ERROR', 'Watch cute cat videos in Youtube', null);
+INSERT INTO text VALUES ('ERROR_XXX_SOLUTION_2',  'eu', 'ERROR', 'Ver vídeos de gatitos en Youtube', null);
+
+
 -- TABLE project_type
 INSERT INTO text VALUES ('PROJECT_TYPE_D',         'es', 'DB_PROJECT_TYPE', 'Desarrollo', null);
 INSERT INTO text VALUES ('PROJECT_TYPE_D',         'en', 'DB_PROJECT_TYPE', 'Development', null);

+ 5 - 3
www/.htaccess

@@ -118,8 +118,10 @@ Options -MultiViews
 #
 # Used to: redirect to nice error pages.
 #
-ErrorDocument 403 /error/403.php
-ErrorDocument 404 /error/404.php
-ErrorDocument 500 /error/500.php
+ErrorDocument 400 /error.php
+ErrorDocument 401 /error.php
+ErrorDocument 403 /error.php
+ErrorDocument 404 /error.php
+ErrorDocument 500 /error.php
 
 

+ 43 - 0
www/css/error.css

@@ -0,0 +1,43 @@
+div.section{
+    width: 60%;
+    min-width: 20em;
+    max-width: 80em;
+    margin: auto;
+}
+
+table#error_header{
+    width: 80%;
+    margin: 2em auto 2em auto;
+}
+
+table#error_header td{
+    width: 50%;
+}
+
+table#error_code{
+    display: inline-block;
+    margin-left: 10%;
+    border: 0.1em solid #000011;
+    border-radius: 1em;
+    padding: 0.5em 0 0.5em 0;
+    background-color: #1e9957;
+    filter: drop-shadow(0 0 0.4em #002200);
+    color: #ffffff;
+}
+
+td#error_number{
+    font-size: 300%;
+    border-right: 0.063em solid #000000;
+    padding-right: 0.5em;
+    padding-left: 0.2em;
+}
+td#error_tag{
+    font-size: 110%;
+    padding-left: 1.2em;
+    padding-right: 1em;
+}
+div#error_message{
+    width: 80%;
+    margin: 0 10% 1em 10%;
+    margin-bottom: 4em;
+}

+ 0 - 0
www/css/m/error.css


+ 31 - 18
www/error/403.php → www/error.php

@@ -9,7 +9,11 @@
     $lang = select_language($con);
     $lserver = $server . "/" . $lang;
     $cur_section = "error";
-    $cur_entry = "403";
+    $cur_entry = http_response_code();
+    $error = $cur_entry;
+    if (!in-array($error, array("400", "401", "403", "404", "500")){
+        $error = "XXX";
+    }
 ?>
 <!DOCTYPE html>
 <html>
@@ -18,8 +22,6 @@
         <meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1'>
         <title><?=text($con, "ERROR_TITLE", $lang);?> - <?=text($con, "USER_NAME", $lang);?></title>
         <link rel='shortcut icon' href='<?=$lserver?>/img/logo/favicon.ico'>
-        <!-- CSS files -->
-        <link rel='stylesheet' type='text/css' href='/css/ui.css'/>
                 <!-- CSS files -->
         <style>
 <?php
@@ -40,32 +42,42 @@
 <?php
         include $doc_root . "header.php";
 ?>
-        <div class='section section_no_title' >
-            <table id='error-code' class='entry'>
+        <div class='section' >
+            <h3 class='section_title'><?=text($con, "ERROR_ERROR", $lang)?></h3>
+            <table id='error_header'>
                 <tr>
-                    <td id='error-number'>
-                        403
+                    <td>
+                        <table id='error_code' class='entry'>
+                            <tr>
+                                <td id='error_number'>
+                                    404
+                                </td>
+                                <td id='error_tag'>
+                                    <?=text($con, "ERROR_ERROR", $lang);?>
+                                    <br/>
+                                    <?=text($con, "ERROR_CODE", $lang);?>
+                                </td>
+                            <tr>
+                        </table>
                     </td>
-                    <td id='error-tag'>
-                        <?=text($con, "ERROR_DISPLAY", $lang);?>
+                    <td>
+                        <h2><?=text($con, "ERROR_" . $error . "_TITLE", $lang);?></h2>
                     </td>
-                <tr>
+                </tr>
             </table>
-            <br/><br/><br/><br/>
-            <div id='error-message' class='entry'>
-                <h2><?=text($con, "ERROR_403", $lang);?></h2>
-                <?=text($con, "ERROR_403_DESC", $lang);?>
+            <div id='error_message' class='entry'>
+                <?=text($con, "ERROR_" . $error . "_DESCRIPTION", $lang);?>
                 <br/><br/>
-                <?=text($con, "ERROR_TRY", $lang);?>
+                <?=text($con, "ERROR_" . $error . "_SOLUTION", $lang);?>
                 <ul>
                     <li>
-                        <a href='javascript: location.reload();'><?=text($con, "ERROR_SOLUTION_0", $lang);?></a>
+                        <a href='javascript: location.reload();'><?=text($con, "ERROR_" . $error . "_SOLUTION_0", $lang);?></a>
                     </li>
                     <li>
-                        <a href='javascript: history.go(-1);'><?=text($con, "ERROR_SOLUTION_1", $lang);?></a>
+                        <a href='javascript: history.go(-1);'><?=text($con, "ERROR_" . $error . "_SOLUTION_1", $lang);?></a>
                     </li>
                     <li>
-                        <a href='<?=$lserver?>/'><?=text($con, "ERROR_SOLUTION_2", $lang);?></a>
+                        <a href='<?=$lserver?>/'><?=text($con, "ERROR_" . $error . "_SOLUTION_2", $lang);?></a>
                     </li>
                 </ul>
             </div> <!-- #error_message -->
@@ -73,6 +85,7 @@
 <?php
         include $doc_root . "footer.php";
         stats($con, $cur_section, $cur_entry);
+        http_response_code($cur_entry);
 ?>
     </body>
 </html>

+ 0 - 76
www/error/404.php

@@ -1,76 +0,0 @@
-<?php
-    session_start();
-    $http_host = $_SERVER["HTTP_HOST"];
-    $doc_root = $_SERVER["DOCUMENT_ROOT"] . "/";
-    include $doc_root . "functions.php";
-    $proto = get_protocol();
-    $con = start_db();
-    $server = $proto . $http_host;
-    $lang = select_language($con);
-    $lserver = $server . "/" . $lang;
-    $cur_section = "error";
-    $cur_entry = "404";
-?>
-<!DOCTYPE html>
-<html>
-    <head>
-        <meta content='text/html; charset=windows-1252' http-equiv='content-type'/>
-        <meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1'>
-        <title><?=text($con, "ERROR_TITLE", $lang);?> - <?=text($con, "USER_NAME", $lang);?></title>
-        <link rel='shortcut icon' href='<?=$lserver?>/img/logo/favicon.ico'>
-                <!-- CSS files -->
-        <style>
-<?php
-            include $doc_root . "css/ui.css";
-            include $doc_root . "css/error.css";
-?>
-        </style>
-        <!-- CSS for mobile version -->
-        <style media="(max-width : 990px)">
-<?php
-            include $doc_root . "css/m/ui.css";
-            include $doc_root . "css/m/error.css";
-?>
-        </style>
-        <meta name="robots" content="noindex follow"/>
-    </head>
-    <body>
-<?php
-        include $doc_root . "header.php";
-?>
-        <div class='section section_no_title' >
-            <table id='error-code' class='entry'>
-                <tr>
-                    <td id='error-number'>
-                        404
-                    </td>
-                    <td id='error-tag'>
-                        <?=text($con, "ERROR_DISPLAY", $lang);?>
-                    </td>
-                <tr>
-            </table>
-            <br/><br/><br/><br/>
-            <div id='error-message' class='entry'>
-                <h2><?=text($con, "ERROR_404", $lang);?></h2>
-                <?=text($con, "ERROR_404_DESC", $lang);?>
-                <br/><br/>
-                <?=text($con, "ERROR_TRY", $lang);?>
-                <ul>
-                    <li>
-                        <a href='javascript: location.reload();'><?=text($con, "ERROR_SOLUTION_0", $lang);?></a>
-                    </li>
-                    <li>
-                        <a href='javascript: history.go(-1);'><?=text($con, "ERROR_SOLUTION_1", $lang);?></a>
-                    </li>
-                    <li>
-                        <a href='<?=$lserver?>/'><?=text($con, "ERROR_SOLUTION_2", $lang);?></a>
-                    </li>
-                </ul>
-            </div> <!-- #error_message -->
-        </div> <!-- .section -->
-<?php
-        include $doc_root . "footer.php";
-        stats($con, $cur_section, $cur_entry);
-?>
-    </body>
-</html>

+ 0 - 76
www/error/500.php

@@ -1,76 +0,0 @@
-<?php
-    session_start();
-    $http_host = $_SERVER["HTTP_HOST"];
-    $doc_root = $_SERVER["DOCUMENT_ROOT"] . "/";
-    include $doc_root . "functions.php";
-    $proto = get_protocol();
-    $con = start_db();
-    $server = $proto . $http_host;
-    $lang = select_language($con);
-    $lserver = $server . "/" . $lang;
-    $cur_section = "error";
-    $cur_entry = "500";
-?>
-<!DOCTYPE html>
-<html>
-    <head>
-        <meta content='text/html; charset=windows-1252' http-equiv='content-type'/>
-        <meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1'>
-        <title><?=text($con, "ERROR_TITLE", $lang);?> - <?=text($con, "USER_NAME", $lang);?></title>
-        <link rel='shortcut icon' href='<?=$lserver?>/img/logo/favicon.ico'>
-        <!-- CSS files -->
-        <style>
-<?php
-            include $doc_root . "css/ui.css";
-            include $doc_root . "css/error.css";
-?>
-        </style>
-        <!-- CSS for mobile version -->
-        <style media="(max-width : 990px)">
-<?php
-            include $doc_root . "css/m/ui.css";
-            include $doc_root . "css/m/error.css";
-?>
-        </style>
-        <meta name="robots" content="noindex follow"/>
-    </head>
-    <body>
-<?php
-        include $doc_root . "header.php";
-?>
-        <div class='section section_no_title' >
-            <table id='error-code' class='entry'>
-                <tr>
-                    <td id='error-number'>
-                        500
-                    </td>
-                    <td id='error-tag'>
-                        <?=text($con, "ERROR_DISPLAY", $lang);?>
-                    </td>
-                <tr>
-            </table>
-            <br/><br/><br/><br/>
-            <div id='error-message' class='entry'>
-               <h2><?=text($con, "ERROR_500", $lang);?></h2>
-                <?=text($con, "ERROR_500_DESC", $lang);?>
-                <br/><br/>
-                <?=text($con, "ERROR_TRY", $lang);?>
-                <ul>
-                    <li>
-                        <a href='javascript: location.reload();'><?=text($con, "ERROR_SOLUTION_0", $lang);?></a>
-                    </li>
-                    <li>
-                        <a href='javascript: history.go(-1);'><?=text($con, "ERROR_SOLUTION_1", $lang);?></a>
-                    </li>
-                    <li>
-                        <a href='<?=$lserver?>/'><?=text($con, "ERROR_SOLUTION_2", $lang);?></a>
-                    </li>
-                </ul>
-            </div> <!-- #error_message -->
-        </div> <!-- .section -->
-<?php
-        include $doc_root . "footer.php";
-        stats($con, $cur_section, $cur_entry);
-?>
-    </body>
-</html>