errors.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. set_include_path(get_include_path() . PATH_SEPARATOR .
  3. dirname(__FILE__) . "/include");
  4. require_once "functions.php";
  5. $ERRORS[0] = "";
  6. $ERRORS[1] = __("This program requires XmlHttpRequest " .
  7. "to function properly. Your browser doesn't seem to support it.");
  8. $ERRORS[2] = __("This program requires cookies " .
  9. "to function properly. Your browser doesn't seem to support them.");
  10. $ERRORS[3] = __("Backend sanity check failed");
  11. $ERRORS[4] = __("Frontend sanity check failed.");
  12. $ERRORS[5] = __("Incorrect database schema version. &lt;a href='db-updater.php'&gt;Please update&lt;/a&gt;.");
  13. $ERRORS[6] = __("Request not authorized.");
  14. $ERRORS[7] = __("No operation to perform.");
  15. $ERRORS[8] = __("Could not display feed: query failed. Please check label match syntax or local configuration.");
  16. $ERRORS[8] = __("Denied. Your access level is insufficient to access this page.");
  17. $ERRORS[9] = __("Configuration check failed");
  18. $ERRORS[10] = __("Your version of MySQL is not currently supported. Please see
  19. official site for more information.");
  20. $ERRORS[11] = "[This error is not returned by server]";
  21. $ERRORS[12] = __("SQL escaping test failed, check your database and PHP configuration");
  22. if ($_REQUEST['mode'] == 'js') {
  23. header("Content-Type: text/plain; charset=UTF-8");
  24. print "var ERRORS = [];\n";
  25. foreach ($ERRORS as $id => $error) {
  26. $error = preg_replace("/\n/", "", $error);
  27. $error = preg_replace("/\"/", "\\\"", $error);
  28. print "ERRORS[$id] = \"$error\";\n";
  29. }
  30. }
  31. ?>