<%@Page Language="C#" Inherits="IWMS.Admin.LinkMan" MasterPageFile="admin.master"%>
<asp:Content ContentPlaceHolderId="cphHead" runat="server">
	<%BtDelete.Attributes["onclick"] = "return confirm_batch_delete()";%>
</asp:Content>
<asp:Content ContentPlaceHolderId="cphMain" runat="server">

	<div class="mframe">
	<div class="tl"></div>
	<div class="rt"></div>
	<div class="tm">
		<table width="100%" cellpadding="0" cellspacing="0">
			<tr><td>
				<span class="tt">管理友情链接</span>&nbsp;
				<a href="javascript:iwms.addLink()">添加链接</a>
			</td><td align="right">
				<form action="" method="get">
				<input type="text" size="15" name="keyword"/>
				<select name="where" >
					<option value="name">搜索站名</option>
				</select>
				<input type="submit" value="搜索"/>
				</form>
			</td>
		</tr></table>
	</div>
	<div class="wrapper">
	<div class="ml"></div>
	<div class="mr"></div>
	<div class="mm">
		<asp:Label id="myLabel" class="msgBar" EnableViewState="false" runat="server"/>
		<form id="myForm" runat="server">
		<ASP:DataGrid id="MyDataGrid" runat="server"
				Width="100%"
				align="center"
				ShowHeader="true"
				ShowFooter="false"
				AllowPaging="true"
				AutoGenerateColumns="false"
				DataKeyField="id"
				OnItemCommand="MyDataGrid_ItemCommand"
				OnPageIndexChanged="MyDataGrid_Page"
				CssClass="grid"
				BorderColor="#cccccc"
				HeaderStyle-CssClass="gridHead"
				ItemStyle-CssClass="tdbg"
				PageSize="10"
				CellPadding="6"
				CellSpacing="0" >
			
			<Columns>
				<asp:TemplateColumn
					>
					<ItemTemplate>
						<a href="admin_linkAdd.aspx?id=<%#Eval("id")%>">修改</a>
					</ItemTemplate>
					<ItemStyle HorizontalAlign="center"/>
					<HeaderStyle Width="40"/>
				</asp:TemplateColumn>
				<asp:TemplateColumn
					HeaderText="<input type=&quot;checkbox&quot; onclick=&quot;checkFormAll(this)&quot;/>"
					>
					<ItemTemplate>
						<asp:CheckBox id="chk" runat="server"/>
					</ItemTemplate>
					<ItemStyle HorizontalAlign="center" />
					<HeaderStyle Width="20"/>
				</asp:TemplateColumn>
				<asp:HyperLinkColumn
					HeaderText="网站名"
					DataNavigateUrlField="url"
					DataTextField="name"
					Target="_blank"
					>
					<ItemStyle HorizontalAlign="center"/>
					<HeaderStyle Width="120"/>
				</asp:HyperLinkColumn>
				<asp:TemplateColumn
					HeaderText="Logo"
					>
					<ItemTemplate>
						<%#DispLogo(Eval("logo")==DBNull.Value ? "" : Eval("logo").ToString() )%>
					</ItemTemplate>
					<ItemStyle HorizontalAlign="center" />
					<HeaderStyle Width="100"/>
				</asp:TemplateColumn>
				<asp:TemplateColumn
					HeaderText="分类"
					>
					<ItemTemplate>
						<%#Eval("sortName")==DBNull.Value ? "其它" : Eval("sortName")%>
					</ItemTemplate>
					<ItemStyle HorizontalAlign="center" />
					<HeaderStyle Width="100"/>
				</asp:TemplateColumn>
				<asp:BoundColumn
					HeaderText="简介"
					DataField="remark">
				</asp:BoundColumn>
				<asp:TemplateColumn
					HeaderText="首页"
					>
					<ItemTemplate>
						<%#(bool)Eval("inIndex") ? "<font color='green' face='Arial'><b>√</b></font>" : "<font color='gray' face='Arial'><b>×</b></font>"%>
					</ItemTemplate>
					<ItemStyle HorizontalAlign="center" />
					<HeaderStyle Width="30"/>
				</asp:TemplateColumn>
				<asp:ButtonColumn
					HeaderText="上升"
					ButtonType="LinkButton"
					Text="&uarr;"
					CommandName="up"
					>
					<ItemStyle HorizontalAlign="center" />
					<HeaderStyle Width="40"/>
				</asp:ButtonColumn>
				<asp:ButtonColumn
					HeaderText="下降"
					ButtonType="LinkButton"
					Text="&darr;"
					CommandName="down"
					>
					<ItemStyle HorizontalAlign="center" />
					<HeaderStyle Width="40"/>
				</asp:ButtonColumn>
			</Columns>
		</ASP:DataGrid>
		
		<table><tr><td align="right">
		<asp:Label id="PageList" runat="server"/>
		</td></tr>
		<tr><td>
			<asp:Button id="BtDelete" OnClick="BtDelete_OnClick" Text="删除" runat="server"/>
		</td></tr>
		</table>
		
		</form>
	</div>
	</div>
	<div class="bl"></div>
	<div class="br"></div>
	<div class="bm"></div>
	</div>


</asp:Content>