|
|
@ -4,6 +4,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
require_once "functions.php";
|
|
|
|
require_once "functions.php";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function get_error_types() {
|
|
|
|
$ERRORS[0] = "";
|
|
|
|
$ERRORS[0] = "";
|
|
|
|
|
|
|
|
|
|
|
|
$ERRORS[1] = __("This program requires XmlHttpRequest " .
|
|
|
|
$ERRORS[1] = __("This program requires XmlHttpRequest " .
|
|
|
@ -39,13 +40,14 @@
|
|
|
|
$ERRORS[14] = __("Plugin not found");
|
|
|
|
$ERRORS[14] = __("Plugin not found");
|
|
|
|
|
|
|
|
|
|
|
|
$ERRORS[15] = __("Encoding data as JSON failed");
|
|
|
|
$ERRORS[15] = __("Encoding data as JSON failed");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if ($_REQUEST['mode'] == 'js') {
|
|
|
|
if ($_REQUEST['mode'] == 'js') {
|
|
|
|
header("Content-Type: text/javascript; charset=UTF-8");
|
|
|
|
header("Content-Type: text/javascript; charset=UTF-8");
|
|
|
|
|
|
|
|
|
|
|
|
print "var ERRORS = [];\n";
|
|
|
|
print "var ERRORS = [];\n";
|
|
|
|
|
|
|
|
|
|
|
|
foreach ($ERRORS as $id => $error) {
|
|
|
|
foreach (get_error_types() as $id => $error) {
|
|
|
|
|
|
|
|
|
|
|
|
$error = preg_replace("/\n/", "", $error);
|
|
|
|
$error = preg_replace("/\n/", "", $error);
|
|
|
|
$error = preg_replace("/\"/", "\\\"", $error);
|
|
|
|
$error = preg_replace("/\"/", "\\\"", $error);
|
|
|
|