<?php
$sql_query = 'UPDATE ' . $config['table_prefix'] . 'calc_template SET ';
$sql_query .= <<<'EOT'
calculate_tpl = '$print_tpl = {$print_tpl};\n?>\n<script>\nvar url = \'<?=$config[\"site_url\"]?>/forms.php?table=<?=$table_id?>&mode=print&form=<?=$print_tpl?>\';\nlocation.href = url;\n</script>\n<?php' WHERE id = 41
EOT;
run_query($sql_query);
$sql_query = 'UPDATE ' . $config['table_prefix'] . 'calc_template SET ';
$sql_query .= <<<'EOT'
calculate_tpl = '$print_tpl = {$print_tpl};\n?>\n<script>\nvar url = \'<?=$config[\"site_url\"]?>/forms.php?table=<?=$table_id?>&mode=print&form=<?=$print_tpl?>\';\nlocation.href = url;\n</script>\n<?php' WHERE id = 61
EOT;
run_query($sql_query);