コード例 #1
0
ファイル: restore.php プロジェクト: ASDAFF/open_bx
	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 = "" ');
				$strWarning .= '<div style="color:red">'.getMsg('DOC_ROOT_WARN').'</div><br>';
			}
		}
		else
			$strWarning .= '<div style="color:red">Mysql Query Error: '.mysql_error().'</div><br>';
	}

	$text = getMsg("FINISH_MSG", LANG).
	$strWarning.
	'<input type="hidden" name="arc_name" value="'.htmlspecialcharsbx($_REQUEST['arc_name']).'">
コード例 #2
0
ファイル: restore.php プロジェクト: nProfessor/Mytb
	else
	{
		$d_pos = (double) $_REQUEST["d_pos"];
		if ($d_pos < 0)
			$d_pos = 0;

		if ($_REQUEST['db_settings']=='default' || $_REQUEST['db_settings'] == 'env')
		{
			$_REQUEST['db_host'] = 'localhost'.($_REQUEST['db_settings'] == 'env' ? ':31006' : '');
			$_REQUEST['db_name'] = 'bitrix';
			$_REQUEST['db_user'] = '******';
			$_REQUEST['db_pass'] = '';
			$_REQUEST['create_db'] = 'Y';
		}

		$oDB = new CDBRestore($_REQUEST["db_host"], $_REQUEST["db_name"], $_REQUEST["db_user"], $_REQUEST["db_pass"], $_REQUEST["dump_name"], $d_pos);
		$oDB->LocalCloud = $_REQUEST['LocalCloud'];

		if(!$oDB->Connect())
		{
			$strErrMsg = $oDB->getError();
			$Step = 2;
			$bSelectDumpStep = true;
		}
	}
}




コード例 #3
0
ファイル: restore.php プロジェクト: ASDAFF/entask.ru
	}
	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 .= 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())
		{
			if ($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 = "" ');
					$strWarning .= '<li>'.getMsg('DOC_ROOT_WARN');
				}
			}

			$rs = $oDB->Query('SHOW TABLES LIKE "b_bitrixcloud_option"');
			if (mysql_fetch_assoc($rs))
			{
				$rs = $oDB->Query('SELECT * FROM b_bitrixcloud_option WHERE NAME="cdn_config_active" AND PARAM_VALUE=1');
コード例 #4
0
ファイル: restore.php プロジェクト: rawork/colors-life
	}
</script>
<?

$Step = IntVal(@$_REQUEST["Step"]);
if ($Step <= 0)
	$Step = 1;

if($Step == 3)
{
	$max_exec_time = @$_REQUEST["time"];
	$d_pos = intVal(@$_REQUEST["d_pos"]);
	if ($d_pos < 0)
		$d_pos = 0;
	
	$oDB = new CDBRestore(@$_REQUEST["db_host"], @$_REQUEST["db_name"], @$_REQUEST["db_user"], @$_REQUEST["db_pass"], @$_REQUEST["dump_name"], START_EXEC_TIME, $max_exec_time, $d_pos);

	if(!$oDB->Connect())
	{
		echo showMsg(getMsg("ERR_DB_CONNECT", $lang), $oDB->getError());
		$Step = 2;
	}
}

if($Step == 1)
{
	?>
		<table width="500"  border="0" cellspacing="0" cellpadding="0">
		<tr><td colspan="6" class="tabletitle1" align="Left" nowrap="nowrap" valign="center"><?php 
echo getMsg("TITLE1", $lang);
?>
コード例 #5
0
	}
	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 .= 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())
		{
			if ($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 != ""'))
			{
				if (mysql_fetch_assoc($rs))
				{
					$oDB->Query('UPDATE b_lang SET DOC_ROOT = "" ');
					$strWarning .= '<li>'.getMsg('DOC_ROOT_WARN');
				}
			}

			$rs = $oDB->Query('SHOW TABLES LIKE "b_bitrixcloud_option"');
			if (mysql_fetch_assoc($rs))
			{
				$rs = $oDB->Query('SELECT * FROM b_bitrixcloud_option WHERE NAME="cdn_config_active" AND PARAM_VALUE=1');
コード例 #6
0
ファイル: restore.php プロジェクト: k-kalashnikov/geekcon_new
            die;
        } else {
            $ar = array('TITLE' => getMsg('ERR_EXTRACT'), 'TEXT' => getMsg('ERR_UPLOAD'), 'BOTTOM' => '<input type="button" value="' . getMsg('BUT_TEXT_BACK') . '" onClick="document.location=\'/restore.php?Step=1&lang=' . LANG . '\'"> ');
            html($ar);
            die;
        }
    }
} elseif ($Step == 3) {
    if ($_REQUEST['db_settings'] == 'skip') {
        $Step++;
    } else {
        $d_pos = (double) $_REQUEST["d_pos"];
        if ($d_pos < 0) {
            $d_pos = 0;
        }
        $oDB = new CDBRestore($_REQUEST["DBHost"], $_REQUEST["DBName"], $_REQUEST["DBLogin"], $_REQUEST["DBPassword"], $_REQUEST["dump_name"], $d_pos);
        $oDB->LocalCloud = $_REQUEST['LocalCloud'];
        if (!$oDB->Connect()) {
            $strErrMsg = $oDB->getError();
            $Step = 2;
            $bSelectDumpStep = true;
        }
    }
}
if (!$Step) {
    $ar = array('TITLE' => getMsg("TITLE0", LANG), 'TEXT' => ($strErrMsg ? '<div style="color:red;padding:10px;border:1px solid red">' . $strErrMsg . '</div>' : '') . getMsg('BEGIN') . '<br>' . (file_exists($img = 'images/dump' . (LANG == 'ru' ? '_ru' : '') . '.png') ? '<img src="' . $img . '">' : ''), 'BOTTOM' => (defined('VMBITRIX') ? '<input type=button value="' . getMsg('BUT_TEXT_BACK') . '" onClick="document.location=\'/\'"> ' : '') . '<input type="button" value="' . getMsg("BUT_TEXT1", LANG) . '" onClick="reloadPage(1,\'' . LANG . '\')">');
    html($ar);
} elseif ($Step == 1) {
    $arc_down_url = $_REQUEST['arc_down_url'] ? $_REQUEST['arc_down_url'] : 'http://example.com/bitrix/backup/2012-05-02.18-27-04.s1.368e07e6.tar.gz';
    $local_arc_name = htmlspecialcharsbx(ltrim($_REQUEST['local_arc_name'], '/'));
    if ($_REQUEST['bitrixcloud_backup']) {