<%@ Page Inherits="Dvbbs.bbs.UI.Admin.admin_medal_add" %>
<%@ 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"%>
<bbs:AdminHeader title="授予勋章" runat="server" ID="Adminheader1" />
<script language="javascript">
function chkPost()
{
	var f = document.forms[0];
	if (f.username.value == "")
	{
		alert("请输入授予用户名");
		f.username.focus();
		return false;
	}
	else if (f.medal.value == "")
	{
		alert("请选择勋章");
		f.medal.focus();
		return false;
	}	
	else
	{
		return true;
	}
}
function onselectmedal()
{
	document.getElementById("selectmedal").style.display = "";
	document.getElementById("inputMedal").style.display = "none";
}
function oncancelmedal()
{
	document.getElementById("selectmedal").style.display = "none";
	document.getElementById("inputMedal").style.display = "";
}
function onclicktr(icon, remark)
{
	var f = document.forms[0];
	f.medal.value	= icon;
	f.remark.value	= remark;
	oncancelmedal();
}
</script>
<form runat="server" ID="Form1">
	<table width="100%" class="maintable" cellpadding="0" cellspacing="1" border="0">
		<tr>
			<th colspan="2">授予勋章</th>
		</tr>
		<tr>
			<td class="left">授予用户名</td>
			<td class="right"><asp:TextBox id="username" maxlength="16" style="width:160px" 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"><span id="inputMedal"><asp:TextBox id="medal" maxlength="16" style="width:140px" runat="server" onFocus="IEvent('focus',this)" onBlur="IEvent('blur',this)" onMouseOver="IEvent('mouseover',this)" onMouseOut="IEvent('mouseout',this)" />
					<a href="javascript:///" onClick="onselectmedal()">选择勋章...</a></span>
				<table id="selectmedal" style="display:none;" align="center" cellpadding="4" cellspacing="1"
					border="1" class="toptable grid fixed">
					<tr style="font-weight:bold">
						<td width="150">勋章名称</td>
						<td>勋章颁发理由</td>
						<td width="80"></td>
						<td width="50" align="center"></td>
					</tr>
					<asp:Repeater enableviewstate="false" id="list" runat="server">
						<ItemTemplate>
							<tr onMouseOver="this.bgColor='#ffffff'" onMouseOut="this.bgColor=''" id="row" runat="server">
								<td width="150"><Dvbbs:Span id="name" runat="server" /></td>
								<td><Dvbbs:Span id="remark" runat="server" /></td>
								<td width="80"><Dvbbs:Span id="icon" runat="server" /></td>
								<td width="50" align="center"><Dvbbs:Img id="iconshow" runat="server" /></td>
							</tr>
						</ItemTemplate>
					</asp:Repeater>
					<tr>
						<td align="center" colspan="4"><a href="javascript:///" onClick="oncancelmedal()">取消</a></td>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td class="left">授予理由</td>
			<td class="right"><asp:TextBox id="Textbox1" maxlength="16" style="width:60%" runat="server" onFocus="IEvent('focus',this)" onBlur="IEvent('blur',this)" onMouseOver="IEvent('mouseover',this)" onMouseOut="IEvent('mouseout',this)" /></td>
		</tr>
		<tr>
			<td colspan="2" align="center"><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" />
