<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head><title><!--{$UUDEV_PAGE_TITLE}--></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!--{include file=elements/header.css.html}-->
<!--{include file=elements/header.js.html type=common}-->
<!--{include file=elements/header.js.html type=valid}-->
</head>
<body>
<div id="outside">
	<!--{include file=frame/top.html}-->
	<div id="mainareaContent">
		<!--{include file=frame/left.html}-->
		<div id="rightContent">
			<div id="topContent">
				<div class="sitmap">
					<span class="r"><!--{include file="elements/uuadvad.html"}--></span>互动社区&nbsp;&gt;&nbsp;会员管理&nbsp;&gt;&nbsp;会员头衔&nbsp;&gt;&nbsp;新增头衔
				</div>
			</div>
			<div class="tabcontent">
				<a href="index.php?r=User.userlist" class="link">会员列表</a>
				<a href="index.php?r=SiteSet.userset" class="link">属性设置</a>
				<a href="index.php?r=User.honourlist" class="nolink">会员头衔</a>
				<a href="index.php?r=SiteSet.experienceset" class="link">会员经验</a>
				<a href="index.php?r=User.forumroleimg" class="link">管理员身份勋章</a>
				<a href="index.php?r=User.albumlist" class="link">会员相册</a>
				<a href="index.php?r=User.listphotoframe" class="link">会员相框</a>
				<a href="index.php?r=User.msglist" class="link">会员消息</a>
				<a href="index.php?r=SiteSet.msgboxset" class="link">信箱设置</a>
			</div>
			<div id="secrightContent">
				<div class="tableContent">
					<form id="AdForm" action="index.php?r=User.addhonour" method="post" enctype="multipart/form-data">
						<input type="hidden" name="action" value="do"/>
						<table class="tbl_edit" width="100%">
							<tr>
								<td class="td_name">头衔名称<span class="red">*</span></td>
								<td class="td_content"><input type="text" class="text" id="honour_name" name="data[UserHonour][honour_name]" value="<!--{$userHonour.honour_name}-->" maxlength='64'/><span id="span_honour_name"></span></td>
							</tr>
							<tr>
								<td class="td_name">等级<span class="red">*</span></td>
								<td class="td_content"><input type="text" class="text" id="level" name="data[UserHonour][level]" value="<!--{$userHonour.level}-->" maxlength='64'/><span id="span_level"></span></td>
							</tr>
							<tr>
								<td class="td_name">所需经验值<span class="red">*</span></td>
								<td class="td_content"><input type="text" class="number" id="experience" name="data[UserHonour][experience]" value="<!--{$userHonour.experience}-->" maxlength='11'/><span id="span_experience"><!--{$errorMsg}--></span></td>
							</tr>
							<tr>
								<td class="td_name">勋章头衔</td>
								<td class="td_content"><input type="file" class="text" id="honour_img" name="honour_img"/><span id="span_honour_img"><!--{$uploadErrorMsg}--></span></td>
								
							</tr>
							<tr>
								<td class="noborder"></td>
								<td class="noborder"><button type="submit" class="butsubmit">提交</button>&nbsp;&nbsp;<button type="button" class="but2font" onClick="window.location.href='index.php?r=User.honourlist'">返回</button></td>
							</tr>
						</table>
					</form>
				</div>
			</div>
		</div>
	</div>
</div>
</body>
<script>
$().ready(function(){
	$("#AdForm").validate({
		rules: {
			'data[UserHonour][honour_name]': 'required',
			'data[UserHonour][level]': {
				required:true,
				number: true,
				digits:true
			},
			'data[UserHonour][experience]': {
				required:true,
				number: true,
				digits:true
			}
		},
		messages: {
			'data[UserHonour][honour_name]': '请输入头衔名称',
			'data[UserHonour][level]': {
				required:'请输入等级值',
				number: "等级值必须为正整数",
				digits:'等级值必须为正整数'
			},
			'data[UserHonour][experience]': {
				required:'请输入所需经验值',
				number: "经验值必须为正整数",
				digits:"经验值必须为正整数"
			}
		},
		errorPlacement: function(error, element){
			$("#span_" + element.attr("id")).html(error).attr("class", "error");
		},
		submitHandler: function(form){
			setDisabled(":button",window.document);
			form.submit();
		},
		errorClass: "invalid",
		success: function(label){
			label.parent().html("&nbsp;").attr("class", "valid");
		},
		onkeyup:false
	});
});
</script>
</html>