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