<%@Page Language="C#" Inherits="IWMS.Admin.TopicAdd" MasterPageFile="admin.master"%>
<asp:Content ContentPlaceHolderId="cphHead" runat="server">
	<!--#include file="inc/tiny_mce.inc" -->
	<script type="text/javascript" src="inc/PinYin.js"></script>
	<script type="text/javascript">
	function nameChange(o)
	{
		var o_dir = document.getElementById("<%=sDir.ClientID%>");
		if(o.value.length>0){
			o_dir.value = PinYin.getString(o.value);
		}else{
			o_dir.value = "";
		}
	}
	
	$(function(){
		spin.add({input:'<%=pagesize.ClientID%>',min:1,max:500,readonly:1});
	});
	
	</script>
</asp:Content>
<asp:Content ContentPlaceHolderId="cphMain" runat="server">

	<form id="MyForm" runat="server">
	<div class="mframe">
	<div class="tl"></div>
	<div class="rt"></div>
	<div class="tm">
		<span class="tt"><asp:Literal id="literalTitle" runat="server"/>专题</span>
	</div>
	<div class="wrapper">
	<div class="ml"></div>
	<div class="mr"></div>
	<div class="mm">
		<asp:Label id="myLabel" class="msgBar" EnableViewState="false" runat="server"/>
		<asp:ValidationSummary 
			 DisplayMode="BulletList" 
			 EnableClientScript="true"
			 ShowSummary="false"
			 ShowMessageBox="true"                        
			 HeaderText="请正确填写以下内容"
			 runat="server"/>
		<table cellpadding="3" width="95%" align="center">
		<tr><th width="100">
			专题名：
		</th><td>
			<asp:TextBox Columns="25" MaxLength="200" id="name" runat="server"/>
			<asp:RequiredFieldValidator
				ControlToValidate="name"
				ErrorMessage="专题名必须填写"
				Display="None"
				runat="server"/>
			<asp:RegularExpressionValidator
				runat="server"
				ControlToValidate="name"
				ValidationExpression="[^']+"
				ErrorMessage="专题名不能有'字符"
				Display="None" />
		</td></tr>
		<tr><th>
			上级专题：
		</th><td>
			<asp:DropDownList id="pid" runat="server"/>
		</td></tr>
		<tr><th>
			静态文件目录：
		</th><td>
			<asp:TextBox id="sDir" size="30" maxLength="50" runat="server" />
			<asp:RegularExpressionValidator
				runat="server"
				ControlToValidate="sDir"
				ValidationExpression="(([a-z0-9A-Z][\w_\-]*[a-z0-9A-Z]|\w+)/?)+"
				ErrorMessage="静态文件目录只能由字母数字_-/构成"
				Display="None" />
		</td></tr>
		<tr><th>
			每页显示新闻数：
		</th><td>
			<asp:TextBox id="pagesize" size="3" MaxLength="3" runat="server" />
			<asp:RequiredFieldValidator
				ControlToValidate="pagesize"
				ErrorMessage="每页新闻数必须填写"
				Display="None"
				runat="server"/>
			<asp:RegularExpressionValidator
				runat="server"
				ControlToValidate="pagesize"
				ValidationExpression="[1-9]\d*"
				ErrorMessage="每页新闻数只能为数字"
				Display="None" />
		</td></tr>
		<tr><th>
			网站风格：
		</th><td>
			<asp:DropDownList id="styleID" runat="server" />
		</td></tr>
		<tr><th>
			专题模板：
		</th><td>
			<asp:DropDownList id="tempID" runat="server" />
		</td></tr>
		<tr><th valign="top">
			专题介绍：
		</th><td>
			<asp:TextBox id="discription" TextMode="multiline" CssClass="mceEditor" runat="server"/>
		</td></tr>
		<tr><td align="center" colspan="2">
		   <asp:Button id="Submit" text=" 添 加 " onclick="Submit_OnClick" runat="server"/>
		</td></tr>
		</table>	
	</div>
	</div>
	<div class="bl"></div>
	<div class="br"></div>
	<div class="bm"></div>
	</div>
	
	</form>
</asp:Content>