X-Git-Url: https://git.p6c8.net/jirafeau_project.git/blobdiff_plain/3cf8b39b331dd5f80c4ac674d13a6387d01d49b9..f371f1e0c13f7120ae1e6d5de707d58f37f75ba0:/file.php diff --git a/file.php b/file.php index 32c097f..cc3f163 100644 --- a/file.php +++ b/file.php @@ -19,9 +19,10 @@ */ define ('JIRAFEAU_ROOT', dirname (__FILE__) . '/'); -require (JIRAFEAU_ROOT.'lib/config.php'); -require (JIRAFEAU_ROOT.'lib/settings.php'); -require (JIRAFEAU_ROOT.'lib/functions.php'); +require (JIRAFEAU_ROOT . 'lib/lang.php'); +require (JIRAFEAU_ROOT . 'lib/config.php'); +require (JIRAFEAU_ROOT . 'lib/settings.php'); +require (JIRAFEAU_ROOT . 'lib/functions.php'); if (isset ($_GET['h']) && !empty ($_GET['h'])) { @@ -31,12 +32,12 @@ if (isset ($_GET['h']) && !empty ($_GET['h'])) if (isset ($_GET['d']) && !empty ($_GET['d'])) $delete_code = $_GET['d']; - if (!ereg ('[0-9a-f]{32}$', $link_name)) + if (!preg_match ('/[0-9a-f]{32}$/', $link_name)) { header ("HTTP/1.0 404 Not Found"); require (JIRAFEAU_ROOT.'lib/template/header.php'); - echo '

Error 404: Not Found

'; + echo '

' . _('Error 404: Not Found') . '

'; require (JIRAFEAU_ROOT.'lib/template/footer.php'); exit; } @@ -79,8 +80,9 @@ if (isset ($_GET['h']) && !empty ($_GET['h'])) jirafeau_delete ($link_name); require (JIRAFEAU_ROOT.'lib/template/header.php'); echo '

'. - _('The time limit of this file has expired.' . - 'It has been deleted.') . '

'; + _('The time limit of this file has expired.') . ' ' . + _('File has been deleted.') . + '

'; require (JIRAFEAU_ROOT.'lib/template/footer.php'); exit; } @@ -95,9 +97,9 @@ if (isset ($_GET['h']) && !empty ($_GET['h'])) "" method = "post">
- -

Error 403: Forbidden

'; + echo '

' . _('Error 403: Forbidden') . + '

'; require (JIRAFEAU_ROOT.'lib/template/footer.php'); exit; } @@ -138,7 +141,8 @@ if (isset ($_GET['h']) && !empty ($_GET['h'])) header ("HTTP/1.0 404 Not Found"); require (JIRAFEAU_ROOT.'lib/template/header.php'); - echo '

Error 404: Not Found

'; + echo '

' . _('Error 404: Not Found') . + '

'; require (JIRAFEAU_ROOT.'lib/template/footer.php'); exit; }