<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="Admin_Sitelink.aspx.cs" Inherits="QiCms.Web.Admin.Admin_Sitelink" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="QBSCmsContentPlaceHolder" runat="server">
<form id="TableForm" runat="server">
    <div class="tpl-content-wrapper">
        <ol class="am-breadcrumb">
            <li><a href="Index.aspx" class="am-icon-home">首页</a></li>
            <li class="am-active">链接管理</li>
        </ol>
        <div class="tpl-portlet-components">
            <div class="portlet-title">
                <div class="caption font-green bold"><span class="am-icon-link"></span> 链接列表</div>
            </div>

            <div class="tpl-block">
                <div class="am-g">
                    <div class="am-u-sm-12 am-u-md-6">
                        <div class="am-btn-toolbar">
                            <div class="am-btn-group am-btn-group-xs">
                                <button type="button" class="am-btn am-btn-default am-btn-success" onclick="window.location.href='Admin_SiteLinkMg.Aspx?Act=Add';" ><span class="am-icon-plus"></span> 添加链接</button>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="am-g">
                    <div class="am-u-sm-12">
                                <asp:DataGrid ID="LinkGrid" runat="server" OnItemDataBound="LinkGrid_ItemDataBound" Width="100%" GridLines="None" CssClass="am-table am-table-striped am-table-hover table-main" OnItemCommand="LinkGrid_ItemCommand">
				                    <Columns>
                                        <asp:TemplateColumn ItemStyle-HorizontalAlign="Center" ItemStyle-Width="2%">
							                <HeaderTemplate>
								                <input onclick="checkFormAll(this.checked)" type="checkbox" />
							                </HeaderTemplate>
							                <ItemTemplate>
								                <asp:CheckBox ID="LinkChk" runat="server" />
							                </ItemTemplate>
						                </asp:TemplateColumn>
                                        <asp:HyperLinkColumn DataNavigateUrlField="LinkUrl" DataTextField="LinkName" HeaderText="网站名" ItemStyle-Width="15%" Target="_blank"></asp:HyperLinkColumn>
						                <asp:TemplateColumn HeaderText="链接LOGO" ItemStyle-Width="20%">
					                        <ItemTemplate>
						                        <a href='<%# Eval("LinkUrl") %>' target='_blank'><%# GetLogo(Eval("LinkLogo")) %></a>
					                        </ItemTemplate>
				                        </asp:TemplateColumn>
						                <asp:BoundColumn DataField="LinkRemark" HeaderText="网站简介" ItemStyle-Width="15%"></asp:BoundColumn>
						                <asp:BoundColumn DataField="MemberName" HeaderText="站长" ItemStyle-Width="12%"></asp:BoundColumn>
						                <asp:TemplateColumn HeaderText="审核" ItemStyle-Width="6%">
					                        <ItemTemplate>
						                        <%# (bool)Eval("LinkPassed") ? "<span style='color: Green'>YES</span>" : "<span tyle='color: Red'>NO</span>" %>
					                        </ItemTemplate>
				                        </asp:TemplateColumn>
					                    <asp:TemplateColumn ItemStyle-CssClass="am-btn-group am-btn-group-xs" HeaderText="操作" ItemStyle-Width="100%">
						                    <ItemTemplate>
                                                <asp:LinkButton ID="EditBtn" runat="server" CommandName="Edit" CssClass="am-btn am-btn-default am-btn-xs am-text-secondary"><span class="am-icon-pencil-square-o"></span>编辑</asp:LinkButton>
						                    </ItemTemplate>
					                    </asp:TemplateColumn>
				                    </Columns>
			                    </asp:DataGrid>
                    <hr>
                    </div>
                    <div class="am-text-danger" style="font-size:12px;margin-top: 10px; width: 100%; text-align: center">
                        <asp:Button ID="LinkChkBtn" CssClass="am-btn am-btn-primary tpl-btn-bg-color-success" runat="server" OnClick="LinkChkBtn_Click" Text="通过审核" />
				        <asp:Button ID="DeleteBtn" CssClass="am-btn am-btn-primary tpl-btn-bg-color-success" runat="server" Text="删除" onclick="DeleteBtn_Click" />
			        </div>
                </div>
            </div>
            <div class="tpl-alert"></div>
        </div>
    </div>
    </form>
</asp:Content>
