<%@ Page Language="C#" MasterPageFile="../Admin.Master" AutoEventWireup="true"
    CodeBehind="Link.aspx.cs" Inherits="ETongJin.YM.Web.Admin.Link"  %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table class="tableBorder" border="0" cellpadding="0" cellspacing="0">
        <tr>
            <th colspan="5" class="ym12_bti">
                友情链接系统
            </th>
        </tr>
        <asp:Repeater ID="Repeater1" runat="server" OnItemCommand="Repeater1_ItemCommand">
            <HeaderTemplate>
                <tr style="text-align: center;">
                    <td width="100" class="td2">
                        网站名称
                    </td>
                    <td width="100" class="td2">
                        网站地址
                    </td>
                    <td width="100" class="td2">
                        网站LOGO
                    </td>
                    <td width="200" class="td2">
                        说明
                    </td>
                    <td class="td2" style="text-align: left">
                        相关操作
                    </td>
                </tr>
            </HeaderTemplate>
            <ItemTemplate>
                <tr style="text-align: center;">
                    <td class="td1">
                        <%#Eval("sitename") %>
                        <input id="Hidden1" type="hidden" runat="server" value='<%#Eval("SiteID") %>' />
                    </td>
                    <td class="td1">
                        <a href="<%#Eval("siteurl") %>" target="_blank">
                            <%#Eval("siteurl")%></a>
                    </td>
                    <td class="td1">
                        <%#Eval("logourl") %>
                    </td>
                    <td class="td1">
                        <%#Eval("siteintro") %>
                    </td>
                    <td class="td1" style="text-align: left">
                        <asp:LinkButton ID="LinkButton1" CommandArgument="0" runat="server" CausesValidation="false">修改</asp:LinkButton>
                        &nbsp;
                        <asp:LinkButton ID="LinkButton2" CommandArgument="1" runat="server" CausesValidation="false"
                            OnClientClick="return confirm('您将删除这个友链!!?删除后不可回复');">删除</asp:LinkButton>
                    </td>
                </tr>
                <tr>
                    <td colspan="5" class="td1" style="padding-left: 100px;">
                    </td>
                </tr>
            </ItemTemplate>
            <FooterTemplate>
                <tr style="text-align: center;">
                    <td colspan="5" class="td1" style="text-align: right; padding-left: 10px;">
                        <asp:LinkButton ID="LinkButton1" CommandArgument="2" runat="server" CausesValidation="false"
                            Font-Bold="true">添加友情链接</asp:LinkButton>
                    </td>
                </tr>
            </FooterTemplate>
        </asp:Repeater>
        <tr style="text-align: center;" runat="server" visible="false" id="trAdd">
            <td class="td1">
                <asp:TextBox ID="txtSiteName" ForeColor=" #999" runat="server" onfocus="if(this.value=='网站名称')this.value='';"
                    Text="网站名称"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" Display="Dynamic"
                    ErrorMessage="不能为空！" ControlToValidate="txtSiteName"></asp:RequiredFieldValidator>
            </td>
            <td class="td1">
                <asp:TextBox ID="txtURL" ForeColor=" #999" runat="server" onfocus="if(this.value=='网站地址')this.value='';"
                    Text="网站地址"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" Display="Dynamic"
                    ErrorMessage="不能为空！" ControlToValidate="txtURL"></asp:RequiredFieldValidator>
            </td>
            <td class="td1">
                <asp:TextBox ID="txtLogoURL" ForeColor=" #999" runat="server"></asp:TextBox>
            </td>
            <td class="td1">
             
                <asp:TextBox ID="txtSiteIntro" ForeColor=" #999" runat="server" Height="32px" 
                    TextMode="MultiLine" Width="174px"></asp:TextBox>
              
            </td>
            <td class="td1" style="text-align: left">
                <asp:Button ID="Button1" runat="server" Text=" 添 加 " OnClick="Button1_Click" />
              
            </td>
        </tr>
        <tr style="text-align: center;" runat="server" visible="false" id="trEdit">
            <td class="td1"> <input id="Hidden1" type="hidden" runat="server" value='<%#Eval("SiteID") %>' />
                <asp:TextBox ID="txtSiteName2" ForeColor=" #999" runat="server" onfocus="if(this.value=='网站名称')this.value='';"
                    Text="网站名称"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" Display="Dynamic"
                    ErrorMessage="不能为空！" ControlToValidate="txtSiteName2"></asp:RequiredFieldValidator>
            </td>
            <td class="td1">
                <asp:TextBox ID="txtURL2" ForeColor=" #999" runat="server" onfocus="if(this.value=='网站地址')this.value='';"
                    Text="网站地址"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" Display="Dynamic"
                    ErrorMessage="不能为空！" ControlToValidate="txtURL2"></asp:RequiredFieldValidator>
            </td>
            <td class="td1">
                <asp:TextBox ID="txtLogoURL2" ForeColor=" #999" runat="server"></asp:TextBox>
            </td>
            <td class="td1">
              
                <asp:TextBox ID="txtSiteIntro2" ForeColor=" #999" runat="server" Height="33px" 
                    TextMode="MultiLine" Width="172px" ></asp:TextBox>
                
            </td>
            <td class="td1" style="text-align: left">
                <asp:Button ID="Button2" runat="server" Text=" 修 改 " OnClick="Button2_Click" />
               
            </td>
        </tr>
    </table>
</asp:Content>
