} $modules = install::get_db_modules(); for ($i = 0; $i < count($modules); $i++) { if ($_POST['db_module'] == $modules[$i]['name']) { $sql_file = $modules[$i]['sql']; break; } } $sql = install::create_data($_POST['binarys'], $sql_file); if ($sql < 0) { echo '<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">Не удалось создать или заполнить таблицы в БД</head></html>'; exit; } $adm = install::create_root($_POST['admin_login'], $_POST['admin_pass']); if ($adm < 0) { echo '<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">Не удалось создать учетную запись администратора</head></html>'; exit; } $dir = install::create_directories(); if ($dir < 0) { echo '<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">Не удалось создать директории необходимые для сайта</head></html>'; exit; } $set = install::set_settings($_POST['title'], $_POST['pass_phrase']); if ($set < 0) { echo '<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">Не удалось внести изменения в настройки сайта, вы можете сделать это позднее в разделе администратора</head></html>'; //exit; } install::finish_installation(); die('<meta http-equiv="Refresh" content="0; URL=http://' . $_SERVER['HTTP_HOST'] . '">'); }