<%inherits "Discuz.Space.Pages.usercpspacecategoryadd"%>
<%template _header%>
<div id="nav">
	<div class="wrap s_clear">
        <a href="{config.forumurl}" class="title">{config.forumtitle}</a> &raquo; <a href="usercp.aspx">用户中心</a> &raquo; <strong>添加日志分类</strong>
	</div>
</div>
<script type="text/javascript">
function checkform()
{
	if(document.getElementById("title").value == "")
	{
		alert("分类名称为空");
		document.getElementById("title").focus();
		return false;
	}
	if(document.getElementById("categorydescription").value.length > 1000)
	{
		alert("分类描述长度最大为1000字"); 
		return false;
	}
	if(!(/^\d+$/.test(document.getElementById("displayorder").value)))
	{
		alert("分类序号必须是整数");
		document.getElementById("displayorder").focus();
		return false;
	}
	return true;
}
</script>
<div class="wrap with_side s_clear" id="wrap">
   <%template _menu%>
	<div class="cpmain">
	<div class="cpcontent">
		<h1>添加日志分类</h1>
		<%template _spacemenu%>
	<%if page_err==0%>
		<%if ispost%>
			<%template _usercpmsgbox%>
		<%else%>
			<form id="postpm" name="postpm" method="post" action="">
			<table cellspacing="0" cellpadding="0" class="formtable" summary="添加日志分类">
			<tbody>
			<tr>
				<th><label for="title">分类名称</label></th>
				<td><input name="title" type="text" id="title" value="" size="40" maxlength="50" class="txt"/></td>
			</tr>
			<tr>
				<th><label for="description">分类描述</label></th>
				<td><textarea name="description" cols="50" rows="6" id="categorydescription" class="txtarea"></textarea></td>
			</tr>
			<tr>
				<th><label for="displayorder">分类序号</label></th>
				<td><input name="displayorder" type="text" id="displayorder" value="0" size="2" maxlength="2" class="txt"/></td>
			</tr>
			<tr>
				<th></th>
				<td>
					<input type="submit" name="Submit" value="确定" onclick="return checkform();" ID="Submit1"/>
				</td>
			</tr>
			</tbody>
			</table>
			</form>
		<%/if%>
	<%else%>
		<%template _usercperrmsgbox%>
	<%/if%>
	</div>
	</div>
</div>
<%template _copyright%>
<%template _footer%>