Пример #1
0
		<input type="hidden" name="DBName" value="'. htmlspecialcharsbx($_REQUEST["DBName"]).'">
		<input type="hidden" name="DBHost" value="'. htmlspecialcharsbx($_REQUEST["DBHost"]).'">
		<input type="hidden" name="LocalCloud" value="'. ($_REQUEST["LocalCloud"] ? 'Y' : '').'">
		';
		showMsg(getMsg('TITLE_PROCESS2'),$text,$bottom);
		?><script>reloadPage(3, '<?php 
echo LANG;
?>
', 1);</script><?
	}
	else
	{
		if($oDB->getError() != "")
			showMsg(getMsg("ERR_DUMP_RESTORE", LANG), '<div style="color:red">'.$oDB->getError().'</div>', $bottom);
		else
			showMsg(getMsg('FINISH'),GetHidden(array('DBLogin','DBPassword','DBHost','DBName','dump_name', 'arc_name', 'check_site_path')).'<script>reloadPage(4, \''.LANG.'\');</script>');
	}
}
elseif($Step == 4) // последний экран: удалять или нет? 
{
	$strWarning = '';
	$strWarning .= CheckHtaccessAndWarn();

	if ($_REQUEST['check_site_path'])
	{
		$oDB = new CDBRestore($_REQUEST["DBHost"], $_REQUEST["DBName"], $_REQUEST["DBLogin"], $_REQUEST["DBPassword"], $_REQUEST["dump_name"], $d_pos);
		if ($oDB->Connect() && $rs = $oDB->Query('SELECT * FROM b_lang WHERE DOC_ROOT != "'.mysql_real_escape_string($_SERVER['DOCUMENT_ROOT']).'" AND DOC_ROOT IS NOT NULL AND DOC_ROOT != ""', $oDB->db_Conn))
		{
			if (mysql_fetch_assoc($rs))
			{
				$oDB->Query('UPDATE b_lang SET DOC_ROOT = "" ');
Пример #2
0
						{
							$oDB->Query('DELETE FROM b_module_to_module WHERE ID='.$f['ID']);
							$strWarning .= '<li>'.getMsg('HOSTS_WARN');
						}
					}
				}
			}

		}
		else
			$strWarning .= '<li>Mysql Error: '.mysql_error();
	}

	$text = 
	($strWarning ? '<div style="color:red;padding:10px;text-align:center"><b>'.getMsg('WARNING').'</b></div> <ul style="color:red">'.$strWarning.'</ul>' : '').
	getMsg("FINISH_MSG", LANG).GetHidden(array('dump_name', 'arc_name'));
	$bottom = '<input type="button" value="'.getMsg('BUT_TEXT_BACK').'" onClick="document.location=\'/restore.php?Step=2&source=dump&lang='.LANG.'\'"> '.
		'<input type=button value="'.getMsg('DELETE_FILES').'" onClick="reloadPage(5)">';
	showMsg(getMsg("FINISH", LANG), $text, $bottom);
}
elseif($Step == 5)
{
	@unlink($_SERVER['DOCUMENT_ROOT'].'/bitrixsetup.php');
	$ok = unlink($_SERVER["DOCUMENT_ROOT"]."/restore.php");

	if ($_REQUEST['dump_name'])
	{
		$ok = unlink($_SERVER["DOCUMENT_ROOT"]."/bitrix/backup/".$_REQUEST["dump_name"]) && $ok;
		$ok = unlink($_SERVER["DOCUMENT_ROOT"]."/bitrix/backup/".str_replace('.sql','_after_connect.sql',$_REQUEST["dump_name"])) && $ok;
	}