errors.php 1.4 KB

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