if (CModule::IncludeModule('clouds')) { $obBucket = new CCloudStorageBucket($BUCKET_ID); if ($obBucket->Init()) { $url = 'arc_down_url=' . htmlspecialcharsbx($obBucket->GetFileSRC(array("URN" => $name))); } } } else { $url = 'local_arc_name=' . htmlspecialcharsbx($name); } if ($url) { echo '<script>document.location = "/restore.php?Step=1&' . $url . '";</script>'; } die; } elseif ($_REQUEST['action'] == 'restore.php') { if (CModule::IncludeModule("compression")) { Ccompress::DisableCompression(); } if ($contents = file_get_contents($f = DOCUMENT_ROOT . BX_ROOT . '/modules/main/admin/restore.php')) { header("Content-Type: application/octet-stream"); header("Content-Length: " . CTar::strlen($contents)); header("Content-Disposition: attachment; filename=\"restore.php\""); header("Expires: 0"); header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache"); echo $contents; } else { CAdminMessage::ShowMessage(array("MESSAGE" => GetMessage("MAIN_DUMP_ERROR"), "DETAILS" => GetMessage("MAIN_DUMP_ERR_COPY_FILE") . htmlspecialcharsbx($f), "TYPE" => "ERROR", "HTML" => true)); } die; } }