<%@ Page Inherits="Dvbbs.bbs.UI.Admin.admin_board_alter" %>
<%@ Register tagPrefix="Dvbbs" namespace="Dvbbs.Controls" assembly="Dvbbs.Web"%>
<%@ Register tagPrefix="bbs" tagName="AdminHeader" src="controls/admin_header.ascx"%>
<%@ Register tagPrefix="bbs" tagName="AdminFooter" src="controls/admin_footer.ascx"%>
<link rel="stylesheet" href="templates/<%=Dvbbs.Utils.Fetch.CurrentTemplateName%>/scripts/thickbox.css" type="text/css" media="screen" />
<script type="text/javascript" src="templates/<%=Dvbbs.Utils.Fetch.CurrentTemplateName%>/scripts/jquery.js"></script>
<script type="text/javascript" src="templates/<%=Dvbbs.Utils.Fetch.CurrentTemplateName%>/scripts/thickbox.js"></script>
<bbs:AdminHeader title="修改版面属性" runat="server" ID="Adminheader1" />
<script language="javascript">
//--- board array ------------------
var boards = [];
<Dvbbs:Span id='boardarray' runat='server'/>
function initSubList(categoryid)
{
	var obj = document.getElementById('parentboard');
	obj.length = 0;
	obj.options[0] = new Option('不作为子版面 (默认)', 0);
	if (categoryid < 1)
	{
		return;
	}
	var max = boards.length;
	for (var i=0; i<max; i++)
	{
		if (boards[i][2] == categoryid)
		{
			obj.options[obj.length] = new Option(boards[i][0], boards[i][1]);
		}
	}
}
//----------------------------------

function chkPost()
{
	var f = document.forms[0];
	if (f.boardtype.value.replace(/(^\s*)|(\s*$)/g, '') == '')
	{
		alert("没有填写版面名称");
		f.boardtype.focus();
		return false;
	}
	else if (f.readme.value.length > 250)
	{
		alert("说明内容长度不能大于250字节，请截去一部分再试");
		f.readme.focus();
		return false;
	}
	else
	{
		return true;
	}
}
</script>
<form runat="server" ID="Form1">
	<table width="100%" class="maintable" cellpadding="0" cellspacing="1" border="0" ID="Table1">
		<tr>
			<td colspan="2" class="title">修改版面属性 (带<font class="nf1">*</font>为必填)</td>
		</tr>
		<tr>
			<td class="left" width="30%">被操作的版面</td>
			<td class="right" width="70%"><Dvbbs:Anchor id="boardlink" runat="server" /></td>
		</tr>
		<tr>
			<td class="left">版面名称</td>
			<td class="right"><asp:TextBox id="boardtype" maxlength="255" style="width:300px" runat="server" onFocus="IEvent('focus',this);"
					onBlur="IEvent('blur',this)" onMouseOver="IEvent('mouseover',this)" onMouseOut="IEvent('mouseout',this)" />
				<font class="nf1">*</font></td>
		</tr>
		<tr>
			<td class="left">所属版面
			</td>
			<td class="right"><asp:DropDownList id="parentboard" style="width:180px" onmousewheel="return false" runat="server"
					onFocus="IEvent('focus',this);" onBlur="IEvent('blur',this)" onMouseOver="IEvent('mouseover',this)" onMouseOut="IEvent('mouseout',this)" />
				<br />
				<span>若自身包含子版面，则不能再成为其他版面的子版面</span>
			</td>
		</tr>
		<tr>
			<td class="left">广告设置方案</td>
			<td class="right"><asp:DropDownList id="adsList" style="width:180px" onmousewheel="return false" runat="server" onFocus="IEvent('focus',this);"
					onBlur="IEvent('blur',this)" onMouseOver="IEvent('mouseover',this)" onMouseOut="IEvent('mouseout',this)" />
				<script type="text/javascript" language="javascript">
function gourl(actiontype)
{
  if(actiontype=='' || actiontype=='reset')
  {
    var adsid=document.getElementById('adslist').options[document.getElementById('adsList').selectedIndex].value;
    location.href='admin_update_ads.aspx?action=edit&boardid=<%=_boardid%>&adsid='+adsid;
  }
  else if(actiontype=='delreset')
  {
    location.href='admin_update_ads.aspx?action=deletereset&boardid=<%=_boardid%>&adsid='+adsid;    
  }
}
				</script>
				<input type="button" id="c" name="c" onclick="javascript:gourl('reset')" class="button_off" value="重新设置此版面广告方案" onFocus="IEvent('focus',this);"
					onBlur="IEvent('blur',this)" onMouseOver="IEvent('mouseover',this)" onMouseOut="IEvent('mouseout',this)">
			    <%
			      if(IsAlterAds)
			      {
			    %>			 
			    <input type="button" id="cd" name="cd" onclick="javascript:gourl('delreset')" class="button_off" value="取消此前所做的重新设置" onFocus="IEvent('focus',this);"
					onBlur="IEvent('blur',this)" onMouseOver="IEvent('mouseover',this)" onMouseOut="IEvent('mouseout',this)">
			    
			    <%}%>
			</td>
		</tr>
		<tr>
			<td class="left">版面设置方案</td>
			<td class="right"><asp:DropDownList id="BoardList" style="width:180px" onmousewheel="return false" runat="server" onFocus="IEvent('focus',this);"
					onBlur="IEvent('blur',this)" onMouseOver="IEvent('mouseover',this)" onMouseOut="IEvent('mouseout',this)" />
			</td>
		</tr>
		<tr>
			<td class="left">审核设置方案</td>
			<td class="right"><asp:DropDownList id="boardckeck" style="width:180px" onmousewheel="return false" runat="server" onFocus="IEvent('focus',this);"
					onBlur="IEvent('blur',this)" onMouseOver="IEvent('mouseover',this)" onMouseOut="IEvent('mouseout',this)" />
			</td>
		</tr>
		<tr>
			<td class="left">论坛别名
			</td>
			<td class="right"><asp:textbox id="aliasname" runat="server" width="300px" onFocus="IEvent('focus',this);" onBlur="IEvent('blur',this)"
					onMouseOver="IEvent('mouseover',this)" onMouseOut="IEvent('mouseout',this)"></asp:textbox>
				<br />
				<span>目录模式伪静态时用到</span>
			</td>
		</tr>
		<tr>
			<td class="left">版面说明
			</td>
			<td class="right"><asp:textbox id="readme" runat="server" Width="400px" rows="5" textmode="multiline" onFocus="IEvent('focus',this);"
					onBlur="IEvent('blur',this)" onMouseOver="IEvent('mouseover',this)" onMouseOut="IEvent('mouseout',this)"></asp:textbox>
				<br />
				<span>250字以内</span>
			</td>
		</tr>
		<tr>
			<td class="left">版主</td>
			<td class="right"><asp:textbox id="boardmaster" runat="server" Width="300" maxlength="100" onFocus="IEvent('focus',this);"
					onBlur="IEvent('blur',this)" onMouseOver="IEvent('mouseover',this)" onMouseOut="IEvent('mouseout',this)"></asp:textbox>
				<br />
				<span>多个版主用“,”分隔，同时需修改其会员身份</span>
			</td>
		</tr>
		<tr>
			<td class="left">版面logo图片</td>
			<td class="right"><asp:textbox id="indeximg" runat="server" Width="300" maxlength="100" onFocus="IEvent('focus',this);"
					onBlur="IEvent('blur',this)" onMouseOver="IEvent('mouseover',this)" onMouseOut="IEvent('mouseout',this)"></asp:textbox>
				<br />
				<span>出现在首页论坛版面介绍左边,请直接填写图片URL</span>
			</td>
		</tr>
		<tr>
			<td class="left">版面规则
			</td>
			<td class="right"><asp:textbox id="rules" runat="server" Width="400px" rows="5" textmode="multiline" onFocus="IEvent('focus',this);"
					onBlur="IEvent('blur',this)" onMouseOver="IEvent('mouseover',this)" onMouseOut="IEvent('mouseout',this)"></asp:textbox>
				<br />
				<span>支持HTML语法</span>
			</td>
		</tr>
		<tr>
			<td class="left">浏览角色限制</td>
			<td class="right"><Dvbbs:Anchor id="rolerequire" text="查看/修改/添加" runat="server" /></td>
		</tr>
		<tr>
			<td class="left">版面专题</td>
			<td class="right"><Dvbbs:Anchor id="boardclass" text="查看/修改/添加" runat="server" /></td>
		</tr>
		<tr>
			<td class="left">其它属性</td>
			<td class="right"><input type="checkbox" id="IsHidden" runat="server" class="smallbox" name="IsHidden" style="vertical-align:middle;" /><label for="IsHidden">是否为隐藏版面</label></td>
		</tr>
		<tr>
			<td class="bottom" align="center" colspan="2"><input type="submit" id="save" class="button" value="保存修改" onclick="return chkPost()" onFocus="IEvent('focus',this);"
					onBlur="IEvent('blur',this)" onMouseOver="IEvent('mouseover',this)" onMouseOut="IEvent('mouseout',this)" /></td>
		</tr>
	</table>
</form>
<bbs:AdminFooter runat="server" ID="Adminfooter1" />
