<?php
// создаем таблицу logo (если ее еще нет)
$result = run_query("SHOW TABLES LIKE '" . $config["table_prefix"] . "logo'");
if (!mysqli_num_rows($result)) {
    run_query("CREATE TABLE " . $config["table_prefix"] . "logo (`logo` BLOB) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci");
    $result = run_query("SELECT * FROM " . $config["table_prefix"] . "config WHERE `key`='logo'");
    $row = mysqli_fetch_array($result);
    run_query("INSERT INTO " . $config["table_prefix"] . "logo VALUES ('" . addslashes($row['value']) . "')");
    run_query("DELETE FROM " . $config["table_prefix"] . "config WHERE `key`='logo'");
    run_query("ALTER TABLE " . $config["table_prefix"] . "config CHANGE `value` `value` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci");
}

// заменяем параметр installed на registered
run_query("UPDATE " . $config["table_prefix"] . "config SET `key` = 'registered' WHERE `key` = 'installed'");

// обновляем номер версии
run_query("UPDATE " . $config["table_prefix"] . "config SET `value` = '010700' WHERE `key` = 'version'");
?>