. * * err-helper.php * * JS Error helper. * * @author Daniele Bonini * @copyrights (c) 2016, 2024, 5 Mode */ require "../../Private/core/init.inc"; use OpenGallery\OpenGallery\Err; header("Content-Type: text/javascript"); // PARAMETERS VALIDATION AND NORMALIZATION ?> var ERR_NO = ""; var ERR_KEY = ""; var ERR_MSG = ""; var ERR_SCRIPT = ""; var ERR_LINE = ""; var ERR_STACK = ""; var A_ERR_NO = { $value) { if (!$start) { echo ",\n"; } else { $start=false; } echo "'$key':\"$value\""; } echo "\n"; ?> }; var A_ERR_MSG = { $value) { if (!$start) { echo ",\n"; } else { $start=false; } echo "'$key':\"$value\""; } echo "\n"; ?> }; var A_ERR_EXTDES_MSG = { $value) { if (!$start) { echo ",\n"; } else { $start=false; } echo "'$key':\"$value\""; } echo "\n"; ?> }; function clearErrors() { $(".form-error").each(function(index, Element) { $(this).hide(); }); $(".form-error-adapt").each(function(index, Element) { $(this).hide(); }); }