{*
 Шаблон вычисления "Распечатать шаблон печати"
*}

global $selected;
if (empty($selected)) {
    $selected = [$ID => $ID];
} else {
    $selected[$ID] = $ID;
}
if (!isset($_REQUEST['sel']) || count_cb($selected) == count_cb($_REQUEST['sel'])) {
    $_SESSION[$ses_id]['sel' . $table_id] = $selected;
?>
<script>
var url = '<?=$config["site_url"]?>/forms.php?table=<?=$table_id?>&mode=print&form=<?=get_form_id({$print_tpl})?>';
window.open(url);
</script>
<?php
}