<%@ Page Language="c#" Inherits="TopWinCMS.WebUI.Admin.Friend_Link" ValidateRequest="False"
    CodeBehind="FriendLink.aspx.cs" %>

<%@ Register Src="../UC_AjaxLoading.ascx" TagName="UC_AjaxLoading" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>友情链接</title>
    <link href="../Style.css" type="text/css" rel="stylesheet" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Pragma" content="No-cach" />

    <script language="javascript" type="text/javascript" src="../../Images/skysoft.js"></script>

    <script>
		function GetRequest()
		{
		    document.getElementById("Img_Logo").style.display = "block";
			document.getElementById("Img_Logo").src = document.getElementById("TB_Logo").value;
		}
		function Hide()
		{
		    if(document.getElementById("Img_Logo"))
		        document.getElementById("Img_Logo").style.display = "none";
		}
    </script>

</head>
<body onload="Hide();">
    <form id="Form1" method="post" runat="server">
  
    <table id="NavigationPath" border="0" cellpadding="4" cellspacing="0" width="100%">
        <tr>
            <td>管理导航：<a href="FriendLink.aspx">链接管理</a> &nbsp;| &nbsp;<a href="FriendLink.aspx?Action=Add">
                    添加链接</a>
            </td>
        </tr>
    </table>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdateProgress ID="UpdateProgress1" runat="server">
        <ProgressTemplate>
            <uc1:UC_AjaxLoading ID="UC_AjaxLoading1" runat="server" />
        </ProgressTemplate>
    </asp:UpdateProgress>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:GridView ID="GV_List" runat="server" AutoGenerateColumns="False" DataKeyNames="ID"
                OnRowCommand="GV_List_RowCommand" OnRowDataBound="GV_List_RowDataBound" OnRowDeleting="GV_List_RowDeleting">
                <Columns>
                    <asp:BoundField DataField="ID" HeaderText="ID">
                        <ItemStyle HorizontalAlign="Center" Width="40px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="FL_Title" HeaderText="网站名字">
                        <ItemStyle Width="80px" />
                    </asp:BoundField>
                    <asp:ImageField DataImageUrlField="FL_Logo" HeaderText="网站LOGO">
                        <ItemStyle HorizontalAlign="Center" Width="88px" />
                    </asp:ImageField>
                    <asp:HyperLinkField DataTextField="FL_URL" HeaderText="网站网址" Target="_blank" Text="网站网址" />
                    <asp:ButtonField HeaderText="向上" Text="↑">
                        <ItemStyle HorizontalAlign="Center" Width="40px" />
                    </asp:ButtonField>
                    <asp:ButtonField HeaderText="向下" Text="↓">
                        <ItemStyle HorizontalAlign="Center" Width="40px" />
                    </asp:ButtonField>
                    <asp:HyperLinkField DataNavigateUrlFields="ID" DataNavigateUrlFormatString="FriendLink.aspx?Action=Edit&amp;ID={0}"
                        HeaderText="编辑" Text="编辑">
                        <ItemStyle HorizontalAlign="Center" Width="40px" />
                    </asp:HyperLinkField>
                    <asp:CommandField HeaderText="删除" ShowDeleteButton="True">
                        <ItemStyle HorizontalAlign="Center" Width="40px" />
                    </asp:CommandField>
                    <asp:BoundField DataField="Pass" HeaderText="审核状态">
                        <ItemStyle HorizontalAlign="Center" Width="60px" />
                    </asp:BoundField>
                </Columns>
                <HeaderStyle CssClass="HeaderStyle" />
            </asp:GridView>
            <asp:Panel ID="Panel1" runat="server"><br />
                <table height="135" cellspacing="0" cellpadding="0" width="400" align="center" border="0">
                    <tr class="HeaderStyle">
                        <td width="100%">
                            编 辑 链 接
                        </td>
                    </tr>
                    <tr>
                        <td class="border" colspan="3">
                            <table cellspacing="1" cellpadding="1" width="100%" align="center" border="0">
                                <tr>
                                    <td width="92" align="right">
                                        网站名称：
                                    </td>
                                    <td width="301">
                                        <asp:TextBox ID="TB_Title" runat="server" Width="147px"></asp:TextBox>
                                        <span style="color: #ff0000">*<asp:RequiredFieldValidator ID="RequiredFieldValidator1"
                                            runat="server" ControlToValidate="TB_Title" ErrorMessage="请输入网址名称"></asp:RequiredFieldValidator></span>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">
                                        网站LOGO：
                                    </td>
                                    <td><asp:TextBox ID="TB_Logo" runat="server" Width="215px"></asp:TextBox>
                                        <br>
                                        <asp:Image ID="Img_Logo" runat="server"></asp:Image><input class="btn" onclick="GetRequest();"
                                            type="button" value="测试Logo"></input>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">
                                        审核通过：
                                    </td>
                                    <td>
                                        <asp:CheckBox ID="CB_Pass" runat="server" />
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">
                                        网站网址：
                                    </td>
                                    <td>
                                        <asp:TextBox ID="TB_URL" runat="server" Width="223px"></asp:TextBox>
                                        <span style="color: #ff0000">*</span>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TB_URL"
                                            ErrorMessage="请输入网址"></asp:RequiredFieldValidator>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
                <p align="center">
                    <asp:Button ID="BT_OK" runat="server" Text="确定" OnClick="BT_OK_Click" CssClass="btn">
                    </asp:Button>
                </p>
            </asp:Panel>
        </ContentTemplate>
    </asp:UpdatePanel>
    </form>
</body>
</html>
