<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NavBarManager.aspx.cs" Inherits="XpShop.Manage.NavBarManager" %>
<%@ Register TagPrefix="uc1" TagName="Commond" Src="Modules/Commond.ascx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML>
	<HEAD>
		<title>NavBarManager</title> 
		<!--#include file="inc/head.inc"-->
		<script type="text/javascript" src="inc/jquery.easydrag.handler.beta2.js"></script>
		<script type="text/javascript" src="inc/multi_popup.js"></script>
		<link type="text/css" rel="stylesheet" href="style/multi_popup.css" />
		<script language="javascript">
			function CheckSort(obj)
			{
				document.getElementById(obj).value = document.getElementById(obj).value.replace(/\D/g,"");
				if(Number(document.getElementById(obj).value)<1 || document.getElementById(obj).value=="")
				{
					document.getElementById(obj).value = "";
				}
			}
		</script>
	</HEAD>
	<body>
	    <uc1:Commond id="Commond1" runat="server"></uc1:Commond>
		<div class="container">
			<div class="sub_container">
				<div class="sub_container_title"><a href="<%=AdminDefault%>" target="_top">桌面</a><img src="images/admin_title.jpg" height="9" width="8" align="absMiddle">导航栏列表</div>
				<div class="sub_container_content">
					<form id="Form1" method="post" runat="server">
						<div class="frame">
							<div class="frame_title">导航栏管理</div>
							<div class="frame_content">
								<table class="tableBorder" cellSpacing="0" cellPadding="0" width="98%" align="center" border="0">
									<tr>
										<td>
											<asp:Button ID="btnAddNavBar" Runat="server" Text="添加导航项" onclick="btnAddNavBar_Click"></asp:Button>
											<asp:Button ID="btnSaveSort" onclick="btnSaveSort_Click" Runat="server" Text="修改排序"></asp:Button>
										</td>
									</tr>
									<tr>
										<td class="forumRowHighlight" height="23"><asp:datagrid id="dgNavBar" runat="server" Width="100%" HeaderStyle-CssClass="summary-title" HorizontalAlign="Center"
												DataKeyField="NavBarID" AutoGenerateColumns="False" PagerStyle-Mode="NumericPages" PageSize="20" AllowPaging="True">
												<HeaderStyle Font-Bold="True" CssClass="summary-title"></HeaderStyle>
												<Columns>
													<asp:TemplateColumn HeaderText="导航栏名称">
														<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
														<ItemStyle HorizontalAlign="Center"></ItemStyle>
														<ItemTemplate>
															<%#DataBinder.Eval(Container.DataItem,"NavBarName")%>
														</ItemTemplate>
													</asp:TemplateColumn>
													<asp:TemplateColumn HeaderText="链接地址">
														<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
														<ItemStyle HorizontalAlign="Center"></ItemStyle>
														<ItemTemplate>
															<%#DataBinder.Eval(Container.DataItem,"Link")%>
														</ItemTemplate>
													</asp:TemplateColumn>
													<asp:TemplateColumn HeaderText="目标">
														<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
														<ItemStyle HorizontalAlign="Center"></ItemStyle>
														<ItemTemplate>
															<%#DataBinder.Eval(Container.DataItem,"Target")%>
														</ItemTemplate>
													</asp:TemplateColumn>
													<asp:TemplateColumn HeaderText="站内链接">
														<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
														<ItemStyle HorizontalAlign="Center"></ItemStyle>
														<ItemTemplate>
															<%#DataBinder.Eval(Container.DataItem,"Inside").ToString()=="1"?"是":"否"%>
														</ItemTemplate>
													</asp:TemplateColumn>
													<asp:TemplateColumn HeaderText="排序">
														<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
														<ItemStyle HorizontalAlign="Center" Width="70px"></ItemStyle>
														<ItemTemplate>
															<input name="sort<%# Container.ItemIndex+1%>" type="text" class="inputstyle" id="sort<%# Container.ItemIndex+1%>" value='<%# DataBinder.Eval(Container.DataItem, "Sort") %>' size="9" maxlength="10" onkeyup="CheckSort('sort<%# Container.ItemIndex+1%>')"/>
														</ItemTemplate>
													</asp:TemplateColumn>
													<asp:TemplateColumn>
														<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
														<ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
														<ItemTemplate>
															<a href='NavBarAdd.aspx?NavBarID=<%# DataBinder.Eval(Container.DataItem, "NavBarID") %>'>
																修改</a>
														</ItemTemplate>
													</asp:TemplateColumn>
													<asp:ButtonColumn Text="&lt;div id=&quot;de&quot; onclick=&quot;javascript:return confirm('确认删除吗？')&quot;&gt;删除&lt;/div&gt;" CommandName="Delete">
														<ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
													</asp:ButtonColumn>
												</Columns>
												<PagerStyle Mode="NumericPages"></PagerStyle>
											</asp:datagrid>
										</td>
									</tr>
								</table>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
	</body>
</HTML>
