<?php
if (!isset($url_form) && empty($update_parent)) {
	return;
}
?>

<script type="text/javascript">
	if (window.opener && !window.opener.closed) {
		if (window.opener.document.forms[0]) {
			window.opener.document.forms[0].submit();
		}
	}

	<?php if (isset($url_form) && $url_form) { ?>
		window.location.href = <?= json_encode($url_form) ?>;
	<?php } ?>
</script>