errors.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. $ERRORS[15] = __("Encoding data as JSON failed");
  24. if ($_REQUEST['mode'] == 'js') {
  25. header("Content-Type: text/javascript; charset=UTF-8");
  26. print "var ERRORS = [];\n";
  27. foreach ($ERRORS as $id => $error) {
  28. $error = preg_replace("/\n/", "", $error);
  29. $error = preg_replace("/\"/", "\\\"", $error);
  30. print "ERRORS[$id] = \"$error\";\n";
  31. }
  32. }
  33. ?>