<?php
if( !defined('ISDVBBS') ){
	header('HTTP/1.0 404 Not Found');
	printFooter();
	exit;
}
?>
<!--<?php
if ($action=='styleout') {
	$colspan = 2;
	print <<<EOT
-->
<SCRIPT LANGUAGE="JavaScript">
<!--
function doDump(form)
{
	if ('' == form.dump_file_client.value && '' == form.dump_file_server.value)
	{
		alert("{$lang['tpl.info.info1']}");
		return false;
	}
	if ('' != form.dump_file_client.value)
	{
		if (!confirm("{$lang['tpl.info.info2']}"))
		{
			return false;
		}
	} else if ('' != form.dump_file_server.value)
	{
		if (!confirm("{$lang['tpl.info.info3']}"))
		{
			return false;
		}
	}
	return true;
}
function doReadDump(form)
{
	if ('' == form.read_from_client.value && '' == form.read_from_server.value)
	{
		alert("{$lang['tpl.info.info4']}");
		return false;
	}
	if ('' != form.read_from_client.value)
	{
		if (!confirm("{$lang['tpl.info.info5']}"))
		{
			return false;
		}
	} else if ('' != form.read_from_server.value)
	{
		if (!confirm("{$lang['tpl.info.info6']}"))
		{
			return false;
		}
	}
	return true;
}
//-->
</SCRIPT>
<table border="0" cellspacing="0" cellpadding="0" align="center" class="tableborder">
<form action="?action=do_dump" name="uploadform" onsubmit="return doDump(this)" method="post">
<!--
EOT;
	$tpls =& getTemplateList();
	print <<<EOT
-->
	<tr>
		<td width="100%" class="tdtit" height="25" colspan="{$colspan}" style="text-indent:5px;">{$lang['tpl.info.info7']}</td>
	</tr>
	<tr>
		<td width="28%" class="forumrow" height="25" style="text-indent:5px;">{$lang['tpl.info.info8']}</td>
		<td class="forumrow" height="25" style="text-indent:5px;">
			<select name="styleid">
<!--
EOT;
	if (false !== $tpls) {
		foreach ($tpls AS $tplval) {
			print <<<EOT
-->
				<option value="{$tplval['styleid']}">{$tplval['name']}</option>
<!--
EOT;
		}
	}
	$dumpfilename = 'dv-style-'.gmdate('ymd', time()+getUserTimeZoneOffset()).'.xml';
	print <<<EOT
-->
				<option value="0">{$lang['tpl.info.info9']}</option>
			</select>
		</td>
	</tr>
	<tr>
		<td class="forumrow" height="25" style="text-indent:5px;">{$lang['tpl.info.info10']}</td>
		<td class="forumrow" height="25" style="text-indent:5px;"><input type="text" name="dump_file_client" value="{$dumpfilename}" size="45"></td>
	</tr>
	<tr>
		<td class="forumrow" height="25" style="text-indent:5px;">{$lang['tpl.info.info11']}</td>
		<td class="forumrow" height="25" style="text-indent:5px;"><input type="text" name="dump_file_server" value="./data_backup/{$dumpfilename}" size="45"></td>
	</tr>
	<tr>
		<td class="forumrow" height="25" valign="top" style="text-indent:5px;">{$lang['tpl.info.info12']}</td>
		<td class="forumrow" height="25"><input type="radio" name="dump_options" value="0">{$lang['tpl.info.info13']}<br /><input type="radio" name="dump_options" value="1">{$lang['tpl.info.info14']}<br /><input type="radio" name="dump_options" value="2">{$lang['tpl.info.info15']}<br /><input type="radio" name="dump_options" value="3"checked>{$lang['tpl.info.info16']}</td>
	</tr>
	<tr>
		<td class="forumrow">&nbsp;</td>
		<td align="center" class="forumrow" height="25" style="text-indent:5px;"><input type="submit" class="button" value="{$lang['tpl.info.info17']}">&nbsp;&nbsp;<input type="reset" class="button" value="{$lang['tpl.info.info18']}"></td>
	</tr>
</form>
</table>
<!--
EOT;
}elseif($action=='stylein' or $action==''){
	print<<<EOT
-->
	<table border="0" cellspacing="0" cellpadding="0" align="center" class="tableborder">
	<form action="?action=read_dump" enctype="multipart/form-data" name="uploadform" onsubmit="return doReadDump(this)" method="post">
		<tr>
			<td width="100%" colspan="2" class="tdtit" height="25" colspan="{$colspan}" style="text-indent:5px;">{$lang['tpl.info.info19']}</td>
		</tr>
		<tr>
			<td class="forumrow" width="40%">{$lang['tpl.info.info20']}</td>
			<td align="center" class="forumrow" height="25" style="text-indent:5px;"><input type="file"  class="button" name="read_from_client" size="45"></td>
		</tr>
		<tr>
			<td class="forumrow">{$lang['tpl.info.info21']}</td>
			<td align="center" class="forumrow" height="25" style="text-indent:5px;"><input type="text" name="read_from_server" value="./data_backup/{$dumpfilename}" size="45"></td>
		</tr>
		<tr>
			<td class="forumrow">{$lang['tpl.info.info22']}</td>
			<td align="center" class="forumrow" height="25" style="text-indent:5px;"><input type="radio" name="isovercast" value="1">{$lang['tpl.info.info23']}<input type="radio" name="isovercast" value="0" checked>{$lang['tpl.info.info24']}</td>
		</tr>
		<tr>
			<td class="forumrow" colspan="2" height="25" colspan="{$colspan}" style="text-align:center;text-indent:5px;"><input type="submit" class="button" value="{$lang['tpl.info.info25']}">&nbsp;&nbsp;<input type="reset" class="button" value="{$lang['tpl.info.info26']}"></td>
		</tr>
	</form>
	</table>
<!--
EOT;
} else {
}
?>-->