<?php
// Добавляем шаблон рассылки отчетов
run_query("INSERT INTO `" . $config['table_prefix'] . "mail_templates` (`type`, `name`, `sender`, `subject`, `body`) VALUES (4, '" . $lang['Report'] . "', '" . $config['application'] . "', '" . $lang['Report'] . "', '<div style=\"margin:10px\"><p>{report_text}</p><p><a href=\"{report_link}\">" . $lang['Go'] . "</a></p></div>')");
$template_id = sql_insert_id();
run_query("ALTER TABLE `" . $config['table_prefix'] . "reports` ADD `mail_template` INT NOT NULL");
run_query("UPDATE `" . $config['table_prefix'] . "reports` SET `mail_template` = $template_id WHERE cron_id!=0");
?>