<?php
// добавляем модуль 1С в БД
$res = run_query("SELECT id FROM " . $config['table_prefix'] . "modules WHERE `name` = 'tinkoff'");
if (!sql_num_rows($res)) {
    run_query("INSERT INTO " . $config['table_prefix'] . "modules (`name`, `version`, `status`) VALUES ('tinkoff', '0.1', '1')");
}
run_query('CREATE TABLE IF NOT EXISTS ' . $config['table_prefix'] . 'module_tinkoff_settings (`name` VARCHAR(255) NOT NULL, `value` TEXT NOT NULL) ENGINE = InnoDB DEFAULT CHARSET = utf8');