errors.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. set_include_path(dirname(__FILE__) ."/include" . PATH_SEPARATOR .
  3. get_include_path());
  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 official site for more information.");
  19. $ERRORS[11] = "[This error is not returned by server]";
  20. $ERRORS[12] = __("SQL escaping test failed, check your database and PHP configuration");
  21. $ERRORS[13] = __("Method not found");
  22. $ERRORS[14] = __("Plugin not found");
  23. if ($_REQUEST['mode'] == 'js') {
  24. header("Content-Type: text/javascript; charset=UTF-8");
  25. print "var ERRORS = [];\n";
  26. foreach ($ERRORS as $id => $error) {
  27. $error = preg_replace("/\n/", "", $error);
  28. $error = preg_replace("/\"/", "\\\"", $error);
  29. print "ERRORS[$id] = \"$error\";\n";
  30. }
  31. }
  32. ?>