<%@ Page Language="C#" MasterPageFile="../Admin.master" AutoEventWireup="true" Inherits="Ruiao.WebSite.Public.Admin.LinkManage" Codebehind="LinkManage.aspx.cs" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<asp:Content ID="MyContent" ContentPlaceHolderID="cphMain" Runat="Server">

    <fieldset class="ContentBox">
    <div class="Head" onclick="BoxSwitch('mc_MemberNotice','si_MemberNotice')"><div class="Title"><%=MyTitle %></div><div id="si_MemberNotice" class="SwitchIcon_Up"></div></div>
    <div class="Body" id="mc_MemberNotice">
        <div class="ContentItem_03"><div class="ContentItem_03a" style="width:120px"><strong>注意事项：</strong></div><div class="ContentItem_03b" style="width:649px">
        <ul class="NotesMessage">
        <li>您可以批量删除链接，但删除操作是不可逆的，请谨慎操作。</li>
        <li>$AppUrl代表了该系统根目录的URL，可以在链接地址中使用该变量以使其自动适应。</li>
        
        </ul>
        </div></div>
        
        <div class="ContentItem_03"><div class="ContentItem_03a" style="width:120px"><strong>快捷操作：</strong></div><div class="ContentItem_03b" style="width:649px">
        <input type="button" class="LinkButton" value="添加链接" onclick="location='LinkAdd<%=ExtensionName %>'" />
        <input type="button" class="LinkButton" value="链接分类管理" onclick="location='LinkCategoryManage<%=ExtensionName %>'" />
        </div></div>
    </div>
    <div class="Bottom"></div>
	</fieldset>
	<div class="ContentBox_Separator"></div>
    
	<fieldset class="ContentBox">
    <div class="Head" onclick="BoxSwitch('mc_DataSelect','si_DataSelect')"><div class="Title">链接筛选：</div><div id="si_DataSelect" class="SwitchIcon_Down"></div></div>
    <div class="Body" id="mc_DataSelect" style="display:none;">
        <div class="ContentItem_03"><div class="ContentItem_03a" style="width:120px">链接分类：</div><div class="ContentItem_03b" style="width:649px"><asp:DropDownList ID="ddlLinkCategory" runat="server"></asp:DropDownList></div></div>
        
        <div class="ContentItem">        
        <asp:Button ID="btSelectData" runat="server" Text="筛选链接" OnClick="btSelectData_Click" CssClass="LinkButton" />
        </div>
    </div>
    <div class="Bottom"></div>
	</fieldset>
	<div class="ContentBox_Separator"></div>
    
    <table id="MemberList" class="MainContentTable" cellspacing="1">
	<tr class="HeadTR">
		<td class="HeadTD" style="width:0px;display:none;">ID</td>
		<td class="HeadTD" style="width:200px;">名称</td>
		<td class="HeadTD" style="width:200px;">路径</td>
		<td class="HeadTD" style="width:120px;">关系</td>
		<td class="HeadTD" style="width:80px;">分类</td>
		<td class="HeadTD" style="width:40px;">图片</td>
		<td class="HeadTD" style="width:40px;">可见</td>
		<td class="HeadTD" style="width:30px;">操作</td>
		<td class="HeadTD" style="width:30px;">选择</td>
	</tr>
    <asp:Repeater ID="rpLink" runat="server" OnItemCreated="rpLink_ItemCreated">
    <ItemTemplate>
    	<tr class="ItemTR" onmouseover="this.className='onItemTR';" onmouseout="this.className='ItemTR';">
        <td class="ItemTD" style="display:none;"><asp:Label ID="lbID" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.ID")%>' /></td>
		<td class="ItemTD" style="text-align:left;"><%# DataBinder.Eval(Container, "DataItem.Name")%><br><span class="Text_Notes">描述：<%# DataBinder.Eval(Container, "DataItem.Description")%></span></td>
		<td class="ItemTD" style="text-align:left;"><%# DataBinder.Eval(Container, "DataItem.Url")%></td>
		<td class="ItemTD" style="text-align:left;"><%# DataBinder.Eval(Container, "DataItem.Rel")%></td>
		<td class="ItemTD"><%# MyCategoryData.Name%></td>
		<td class="ItemTD"><%# (String.IsNullOrEmpty(DataBinder.Eval(Container, "DataItem.Image").ToString())) ? "否" : "是"%></td>
		<td class="ItemTD"><%# ((bool)DataBinder.Eval(Container, "DataItem.Visible"))?"是":"否"%></td>
		<td class="ItemTD"><a href="LinkEdit<%=ExtensionName %>?LinkID=<%# DataBinder.Eval(Container, "DataItem.ID")%>">编辑</a></td>
		<td class="ItemTD"><asp:CheckBox ID="cbxSelect" runat="server" /></td>
	</tr>
    </ItemTemplate>
    </asp:Repeater>
    
    <tr class="ItemTR">
    <td class="ItemTD" colspan="8" style="text-align:left;">
    <div style="float:left;">
    <webdiyer:AspNetPager ID="Pager" runat="server" OnPageChanged="Pager_PageChanged" AlwaysShow="True" UrlPaging="False" />
    </div>
    <div style="float:right;">
    <input id="CheckAll" type="button" value="反转选择项" class="LinkButton" onclick="checkAll(this.form); return false;" />
    <asp:Button ID="btDelete" runat="server" OnClick="btDelete_Click" Text="删除所选链接" CssClass="LinkButton" />
    </div>
    </td>
    </tr>
    
    </table>
</asp:Content>

