<?php
// Обновляем вычисления для связи с пользователями
$result = run_query("SELECT * FROM `" . $config['table_prefix'] . "tables`");
while ($row = sql_fetch_assoc($result)) {
    if ($row['user_table_link']) {
        $user_table_link = unserialize($row['user_table_link']);
        if ($user_table_link['calcs']['add']) {
            run_query("UPDATE `" . $config['table_prefix'] . "calc` SET `calculate` = REPLACE(`calculate`, 'array(\'{program_link}', 'array(\'{program}\',\'{program_link}') WHERE id = " . $user_table_link['calcs']['add']);
            run_query("UPDATE `" . $config['table_prefix'] . "calc` SET `calculate` = REPLACE(`calculate`, 'array(\$config[\'site_url\']', 'array(\$config[\'application\'], \$config[\'site_url\']') WHERE id = " . $user_table_link['calcs']['add']);
        }
    }
}