Exemplo n.º 1
0
						$text .= '<input type=hidden name=last_piece value=Y>';
					$text .= '<input type=hidden name=source value=download>';
					$text .= '<input type=hidden name=arc_down_url value="'.htmlspecialcharsbx(CTar::getNextName($strUrl)).'">';
				}
			}
		}
		elseif ($_REQUEST['try_next']) // пробовали новую часть
		{
			$text = getMsg('ARC_DOWN_OK').
			'<input type=hidden name=Step value=2>'.
			'<input type=hidden name="EncryptKey" value="'.htmlspecialcharsbx($_REQUEST['EncryptKey']).'">';

			if ($_REQUEST['freetrixcloud_backup'])
				$text .= '<input type=hidden name=arc_name value="'.htmlspecialcharsbx(CTar::getFirstName($_REQUEST['freetrixcloud_backup'])).'">';
			else
				$text .= '<input type=hidden name=arc_name value="'.htmlspecialcharsbx(CTar::getFirstName($arc_name)).'">';
		}
		else
		{
			if ($_REQUEST['source'] != 'freetrixcloud' && $replycode == 403 && count($arHeaders)) // Retry for freetrixcloud
			{
				$text = getMsg('ARC_DOWN_PROCESS').' <b>'.htmlspecialcharsbx($arc_name).'</b>' . $status .
					'<input type=hidden name=Step value=2>'.
					'<input type=hidden name=continue value=Y>'.
					'<input type=hidden name="EncryptKey" value="'.htmlspecialcharsbx($_REQUEST['EncryptKey']).'">'.
					'<input type=hidden name="license_key" value="'.htmlspecialcharsbx($_REQUEST['license_key']).'">';
				$text .= '<input type=hidden name=source value=freetrixcloud>';
				$text .= '<input type=hidden name="freetrixcloud_backup" value="'.htmlspecialcharsbx($_REQUEST['freetrixcloud_backup']).'">';

//				$text .= '<input type=hidden name=arc_down_url value="'.htmlspecialcharsbx($strUrl).'">';
			}
Exemplo n.º 2
0
        ?>
		<script>
			window.setTimeout("if(!stop)AjaxSend('?process=Y&<?php 
        echo bitrix_sessid_get();
        ?>
')",<?php 
        echo 1000 * IntOption("dump_max_exec_time_sleep");
        ?>
);
		</script>
		<?php 
    } else {
        $title = ($NS['cloud_send'] ? GetMessage("MAIN_DUMP_SUCCESS_SENT") : GetMessage("MAIN_DUMP_FILE_FINISH")) . '<br><br>';
        $status_msg = '';
        if ($NS["arc_size"]) {
            $status_msg .= GetMessage("MAIN_DUMP_ARC_NAME") . ": <b>" . basename(CTar::getFirstName($NS["arc_name"])) . "</b><br>";
            $status_msg .= GetMessage("MAIN_DUMP_ARC_SIZE") . " <b>" . CFile::FormatSize($NS["arc_size"]) . "</b><br>";
            if ($NS['BUCKET_ID'] > 0) {
                $l = '';
            } elseif ($NS['BUCKET_ID'] == -1) {
                $l = GetMessage('DUMP_MAIN_BITRIX_CLOUD');
            } else {
                $l = GetMessage("MAIN_DUMP_LOCAL");
            }
            if ($l) {
                $status_msg .= GetMessage("MAIN_DUMP_LOCATION") . ": <b>" . $l . "</b><br>";
            }
        }
        if ($FinishedTables) {
            $status_msg .= GetMessage("MAIN_DUMP_TABLE_FINISH") . " <b>" . $FinishedTables . "</b><br>";
        }
Exemplo n.º 3
0
		if (is_dir($p = DOCUMENT_ROOT.BX_ROOT.'/backup'))
		{
			if ($dir = opendir($p))
			{
				$arc_name = CTar::getFirstName(basename($NS['arc_name']));
				while(($item = readdir($dir)) !== false)
				{
					$f = $p.'/'.$item;
					if (!is_file($f))
						continue;

					if (!preg_match('#\.(sql|tar|gz|enc|[0-9]+)$#', $item))
						continue;

					$name = CTar::getFirstName($item);
					if ($name == $arc_name)
						continue;

					$s = filesize($f);
					$m = filemtime($f);

					$arFiles[$name] = $m;
					$TotalSize += $s;
				}
				closedir($dir);
			}
		}
		asort($arFiles);
		$cnt = count($arFiles) + 1;