<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DeepSoonLinks.aspx.cs" Inherits="Security.DeepSoonLinks" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
		<link rel="stylesheet" href="css/common.css" type="text/css" />
		<title>友情链接设置</title>
	</head>

	<body style="padding-right:30px;overflow:hidden;">
		<form runat="server" style="margin:0px;padding:0px;">
		<div id="man_zone">
			<span class="adminTitle">添加链接</span> <asp:Label ID="labelAddInfor" runat="server" Text="" class="labelInforStyle"/>
			<br>
			<div class="adminGuid">
				[操作说明] 请注意填写完整的网址。
			</div>
			<table cellpadding=0 cellspacing=1>
				<tr><td class="colorTd">链接名称</td>
					<td><asp:TextBox ID="txtLinkName" runat="server" MaxLength="20"></asp:TextBox> <span class="adminHelp">必填项，汉字或字母，不超过20个字符</span></td>
				</tr>
				<tr><td class="colorTd">链接地址</td>
					<td><asp:TextBox ID="txtLinkHref" runat="server"  Text="http://" MaxLength="150"></asp:TextBox> <span class="adminHelp">必填项，请输入正确完整的网址</span></td>
				</tr>
				<tr><td class="colorTd">操 作</td>
					<td><asp:Button ID="btnAdd" runat="server" OnClick="btnAdd_Click" Text="添加友情链接" class="adminButton"/></td>
				</tr>
			</table><br>

			<span class="adminTitle">链接列表</span><br>
			<div class="adminGuid">
				[操作说明] 系统当前已有的友情链接列表。
			</div>
			<asp:GridView ID="myGridView"  DataKeyNames="ID" PageSize="6" OnPageIndexChanging="myGridView_PageIndexChanging" OnRowDeleting="myGridView_RowDeleting" runat="server" AutoGenerateColumns="false" AllowPaging="true" CellPadding="4" GridLines="None" BackColor="#DBE6E3" CellSpacing="1" Font-Bold="false"> 
				<FooterStyle BackColor="#FFFFFF" ForeColor="Black" />
				<RowStyle BackColor="#FFFFFF" ForeColor="Black" />
				<PagerStyle HorizontalAlign="Left"/>
				<HeaderStyle BackColor="#F7F7F7" Font-Bold="True" ForeColor="#404040" BorderColor="#A6CBEF" />
				<Columns> 
					<asp:TemplateField HeaderText=""> 
						<ItemTemplate> 
							<asp:CheckBox id="cbxId" runat="Server" /> 
						</ItemTemplate> 
					</asp:TemplateField> 			
					<asp:BoundField DataField="ID" HeaderText="ID" />
					<asp:BoundField DataField="LinkName" HeaderText="链接名称"/>
					<asp:BoundField DataField="LinkHref" HeaderText="链接地址" />		
					<asp:TemplateField HeaderText="操作">
						<ItemTemplate> 
							<asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Delete" Text="[删除]" OnClientClick='<%#  "if (!confirm(\"删除一旦删除无法恢复，您确定删除吗？\")) return false;"%>'></asp:LinkButton> 
						</ItemTemplate> 
					</asp:TemplateField> 
				</Columns>		
				<PagerTemplate>
					<asp:LinkButton ID="cmdFirstPage" runat="server" CommandName="Page" CommandArgument="First" Enabled="<%# ((GridView)Container.Parent.Parent).PageIndex!=0 %>">首页</asp:LinkButton>
					<asp:LinkButton ID="cmdPreview" runat="server" CommandArgument="Prev" CommandName="Page" Enabled="<%# ((GridView)Container.Parent.Parent).PageIndex!=0 %>">上页</asp:LinkButton>
					第<asp:Label ID="lblcurPage" runat="server" Text='<%# ((GridView)Container.Parent.Parent).PageIndex+1  %>'></asp:Label>页/共<asp:Label ID="lblPageCount" runat="server" Text='<%# ((GridView)Container.Parent.Parent).PageCount %>'></asp:Label>页
					<asp:LinkButton ID="cmdNext" runat="server" CommandName="Page" CommandArgument="Next" Enabled="<%# ((GridView)Container.Parent.Parent).PageIndex!=((GridView)Container.Parent.Parent).PageCount-1 %>">下页</asp:LinkButton>
					<asp:LinkButton ID="cmdLastPage" runat="server" CommandArgument="Last" CommandName="Page" Enabled="<%# ((GridView)Container.Parent.Parent).PageIndex!=((GridView)Container.Parent.Parent).PageCount-1 %>">尾页</asp:LinkButton>&nbsp;			
					<asp:TextBox ID="txtGoPage" runat="server"  Width="40" value="1" MaxLength="6" onkeyup="value=value.replace(/[^\d]/g,'');" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''));"></asp:TextBox>
					<asp:Button ID="btnGo" runat="server" Text="GO"  onclick="btnGo_Click"></asp:Button>			
				</PagerTemplate>
			</asp:GridView>	
			<asp:LinkButton ID="btnDelAll" runat="server" Text="删除选中" OnClick="btnDelAll_Click"/>
		</div>
		</form>
	</body>
</html>