<?php
$sql_query = 'UPDATE ' . $config['table_prefix'] . 'calc_template SET ';
$sql_query .= <<<'EOT'
calculate_tpl = '$print_tpl = get_form_id({$print_tpl});\r\n$_SESSION[$ses_id][\'sel\' . $table_id] = [$ID];\r\n?>\r\n<script>\r\nvar url = \'<?=$config[\"site_url\"]?>/forms.php?table=<?=$table_id?>&mode=print&form=<?=$print_tpl?>\';\r\nwindow.open(url);\r\n</script>\r\n<?php'
WHERE id = 61
EOT;
run_query($sql_query);