<%@ Page Inherits="Dvbbs.bbs.UI.Admin.admin_friendlink" %>
<%@ 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.text.value == '')
	{
		alert('请填写名称');
		f.text.focus();
		return false;
	}
	if (isNaN(f.sortid.value))
	{
		alert("序号必须是数字，越小越靠前");
		f.sortid.focus();
		return false;
	}
	if (f.sortid.value > 100000)
	{
		alert("序号必须是数字，并且小于100000");
		f.sortid.focus();
		return false;
	}
	if (f.url.value == '' || f.url.value.toLowerCase() == 'http://')
	{
		alert('请填写HTTP地址');
		f.url.focus();
		return false;
	}
	return true;
}
</script>
<table width="100%" class="maintable" cellpadding="0" cellspacing="1" border="0">
	<tr>
		<td class="title" colspan="5">友情链接管理</td>
	</tr>
	<tr align="center">
		<td width="14%">操作</td>
		<td width="6%">排序</td>
		<td width="20%">名称</td>
		<td width="20%">logo</td>
		<td>网址</td>
	</tr>
	<asp:Repeater enableviewstate="false" id="list" runat="server">
		<ItemTemplate>
			<tr onMouseOver="this.bgColor='#ffffff'" onMouseOut="this.bgColor=''">
				<td align="center"><Dvbbs:Anchor id="alter" text="修改" runat="server" />
					<span style="padding-left:6px;padding-right:6px">|</span>
					<Dvbbs:Anchor id="remove" text="删除" runat="server" /></td>
				<td align="center"><Dvbbs:Span id="sortid" runat="server" /></td>
				<td><Dvbbs:Span id="text" runat="server" /></td>
				<td align="center"><Dvbbs:Img id="logo" width="88" height="31" runat="server" /></td>
				<td><Dvbbs:Anchor id="url" target="_blank" runat="server" /></td>
			</tr>
		</ItemTemplate>
	</asp:Repeater>
</table>
<br />
<form id="addnew" runat="server">
	<table width="100%" class="maintable" cellpadding="0" cellspacing="1" border="0">
		<tr>
			<td class="title" colspan="2">新添友情链接项目</td>
		</tr>
		<tr>
			<td class="left" width="30%">友情链接名称</td>
			<td class="right"><asp:TextBox id="text" maxlength="300" style="width:150px" runat="server" onFocus="IEvent('focus',this)" onBlur="IEvent('blur',this)" onMouseOver="IEvent('mouseover',this)" onMouseOut="IEvent('mouseout',this)" /></td>
		</tr>
		<tr>
			<td class="left">Logo地址</td>
			<td class="right"><asp:TextBox id="logo" value="http://" maxlength="100" style="width:300px" runat="server" onFocus="IEvent('focus',this)" onBlur="IEvent('blur',this)" onMouseOver="IEvent('mouseover',this)" onMouseOut="IEvent('mouseout',this)" />
				<span>最好以http://开头</span></td>
		</tr>
		<tr>
			<td class="left">网址</td>
			<td class="right"><asp:TextBox id="url" value="http://" maxlength="100" style="width:300px" runat="server" onFocus="IEvent('focus',this)" onBlur="IEvent('blur',this)" onMouseOver="IEvent('mouseover',this)" onMouseOut="IEvent('mouseout',this)" />
				<span>必须以http://开头</span></td>
		</tr>
		<tr>
			<td class="left">序号</td>
			<td class="right"><asp:TextBox id="sortid" value="0" maxlength="4" style="width:50px" runat="server" onFocus="IEvent('focus',this)" onBlur="IEvent('blur',this)" onMouseOver="IEvent('mouseover',this)" onMouseOut="IEvent('mouseout',this)" />
				<span>0-255, 越小越靠前</span></td>
		</tr>
		<tr>
			<td class="left">宽度</td>
			<td class="right"><asp:TextBox id="mwidth" value="88" maxlength="4" style="width:50px" 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="mheight" value="31" maxlength="4" style="width:50px" 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" class="bottom">
				<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" />
