<%@ Page Inherits="Dvbbs.bbs.UI.Admin.admin_data_move" %>
<%@ Register tagPrefix="bbs" tagName="AdminHeader" src="controls/admin_header.ascx"%>
<%@ Register tagPrefix="bbs" tagName="AdminFooter" src="controls/admin_footer.ascx"%>
<bbs:AdminHeader title="合并论坛数据" runat="server" />
<script language="javascript">
function chkPost()
{
	var f = document.forms[0];
	if (f.source.value.indexOf(",") != -1 || f.target.value.indexOf(",") != -1)
	{
		alert('请选择具体的版面，不要选择分类');
		return false;
	}
	else
	{
		return confirm('此操作无法恢复，请判断仔细后再按确定，最好做好数据备份，确定吗？');
	}
}
</script>
<form runat="server">
	<table width="100%" class="maintable" cellpadding="0" cellspacing="1" border="0" ID="Table1">
		<tr>
			<td colspan="2" class="title">版面名称</td>
		</tr>
		<tr>
			<td>数据源版面</td>
			<td><select id="source" name="source" onmousewheel="return false">
					<option value="-1,-1">选择数据源版面 ...</option>
					<%
Dvbbs.bbs.Entity.BoardJumpList bjl = Dvbbs.bbs.Entity.ForumCaching.GetBoardJumpList();
if (null != bjl)
{
	foreach (Dvbbs.bbs.Entity.BoardJumpList.BoardInfo bi in bjl)
	{
		Response.Write("<option value=\"" + bi.BoardId + "\" " + ((bjl.SelectedBoardId == bi.BoardId) ? " selected=\"selected\"" : "") + ">" + RepeatString("&nbsp;&nbsp;&nbsp;&nbsp;", bi.Depth) + (0 == bi.Depth ? "╋" : "├") + bi.BoardType + "</option>");
	}
}
%>
				</select></td>
		</tr>
		<tr>
			<td>合并到</td>
			<td><span class="bf1">↓</span></td>
		</tr>
		<tr>
			<td>目标版面</td>
			<td><select id="target" name="target" onmousewheel="return false">
					<option value="-1,-1">选择目标版面 ...</option>
					<%
if (null != bjl)
{
	foreach (Dvbbs.bbs.Entity.BoardJumpList.BoardInfo bi in bjl)
	{
		Response.Write("<option value=\"" + bi.BoardId + "\" " + ((bjl.SelectedBoardId == bi.BoardId) ? " selected=\"selected\"" : "") + ">" + RepeatString("&nbsp;&nbsp;&nbsp;&nbsp;", bi.Depth) + (0 == bi.Depth ? "╋" : "├") + bi.BoardType + "</option>");
	}
}
%>
				</select></td>
		</tr>
		<tr>
			<td colspan="2" align="center" class="bottom"><input type="submit" class="button" value="开始合并数据" onclick="return chkPost()" onFocus="IEvent('focus',this);"
					onBlur="IEvent('blur',this)" onMouseOver="IEvent('mouseover',this)" onMouseOut="IEvent('mouseout',this)" /></td>
		</tr>
		<tr>
			<td class="t2" colspan="2" class="bottom"><span class="bf1">注意:</span>
				<span>本操作无法恢复，请务必小心，并且作好数据备份工作。</span></td>
		</tr>
	</table>
</form>
<bbs:AdminFooter runat="server" />
