{=var-set:cancache=yPSettings=}
{=include-block:Y_Blocks.txt;management_check_top=}
{=include-block:Y_Blocks.txt;head=}
<script src="/Y_Baselib.js"></script>
<script>
function do_submit()
{
	if(document.f.filename.value != "")
	{
		show_waitbox(true);
		document.f.su.disabled=true;
		window.setTimeout("document.f.submit()",1000);
		document.f.su.disabled=false;
	}
}
function do_backup()
{
	show_waitbox(true);
	obj_disable("btBackup", true);
	window.setTimeout("do_backup2()",500);
}
function do_backup2()
{
	var _url = loadSyncURL("/control/exec?Y_Tools&settings_backup_restore&backup");
	var _down = document.getElementById("down");
	_down.href = _url;
	show_obj("down_box", true);
	show_waitbox(false);
	obj_disable("btBackup", false);
}
</script>
{=include-block:Y_Blocks.txt;head_close=}
<body>
{=var-set:wait_text=Settings=}{=include-block:Y_Blocks.txt;snip_wait=}
<div class="work_box">
	<div class="work_box_head"><div class="work_box_head_h2">
	{=var-set:menu={=L:set.menue.backup_restore=}=}{=include-block:Y_Blocks.txt;work_menu=}</div></div>
	<div class="work_box_body">
		<p><div style="border: 1px solid #cccccc; margin-top:20px; padding: 10px;">
			<img src="/images/cross.png">
			<span><font size="2" color="Red"><b>{=L:attention=}</b></font> {=L:set.settings.warning=}</span>
		</div></p>
		<table class="y_invisible_table" cellspacing="0" width="100%">
		<tr><td class="y_form_header">{=L:set.settings.backup=}</td></tr>
		<tr>
			<td>
				<input id="btBackup" type="button" value ="{=L:set.settings.backup=}" title="{=L:set.settings.backup_desc=}" onclick="do_backup()"/>
				<div id="down_box" style="visibility: hidden;">
					<br/><a id="down" href="" type="application/octet-stream"><u>Download</u></a>
				</div>
			</td>
		</tr>
		<tr><td class="y_form_header">{=L:set.settings.restore=}</td></tr>
		<tr>
			<td>
				<form name="f" method="post" enctype="multipart/form-data" action="/control/exec?Y_Tools&amp;settings_backup_restore&amp;restore">
					tar.gz-File:&nbsp;<input type="file" name="filename" size="70"/>&nbsp;<br/>
					<input type="button" name="su" value="{=L:set.settings.restore=}" title="{=L:set.settings.restore_desc=}" onclick="do_submit()"/>
					<br/><br/>
				</form>
			</td>
		</tr>
		</table>

	</div>
</div>

</body>
</html>
{=include-block:Y_Blocks.txt;management_check_bottom=}
