<%@ Page Language="C#" AutoEventWireup="true" CodeFile="default.aspx.cs" Inherits="WebXabara_Link_list" %>

<!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 id="Head1" runat="server">
    <title>管理友情链接列表</title>
    <link href="../InClude/StyleSheet.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        <!--
        body {
            margin-left: 0px;
            margin-top: 15px;
            margin-right: 10px;
            margin-bottom: 10px;
        }
        -->
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <div class="divWidth">
            <div class="titleBg">
                友情链接
            <asp:DropDownList ID="linkType" runat="server" CssClass="inputTextIME" AutoPostBack="True"
                OnSelectedIndexChanged="linkType_SelectedIndexChanged">
                <asp:ListItem Value="">== 分类 ==</asp:ListItem>
            </asp:DropDownList>
            </div>
            <div class="height10px">
            </div>
            <asp:Repeater ID="RepeaterList" runat="server">
                <HeaderTemplate>
                    <table width="100%" class="tableLine">
                        <tr>
                            <td class="trTitleBG">链接名称
                            </td>
                            <td class="trTitleBG">预览图
                            </td>
                            <td class="trTitleBG">链接分类
                            </td>
                            <td class="trTitleBG">发布者
                            </td>
                            <td class="trTitleBG">发布时间
                            </td>
                            <td class="trTitleBG">操作
                            </td>
                        </tr>
                </HeaderTemplate>
                <ItemTemplate>
                    <tr>
                        <td>
                            <asp:HyperLink ID="linkName" runat="server" NavigateUrl='<%# Eval("linkURL").ToString().Trim()%>'
                                Text='<%# Eval("linkName").ToString().Trim()%>' Target="_blank"></asp:HyperLink>
                        </td>
                        <td>
                            <asp:Image ID="preImage" runat="server" onerror="style.display='none'" ImageUrl='<%# getPre(Eval("uploadFile").ToString().Trim()) %>'
                                Width="120px" Height="60px" />
                        </td>
                        <td>
                            <asp:Label ID="linkType" runat="server" Text='<%# getClass(Convert.ToInt32(Eval("classID")))%>'></asp:Label>
                        </td>
                        <td style="text-align: center;">
                            <asp:Label ID="ip" runat="server" Text='<%# Eval("AdminID").ToString().Trim()%>'></asp:Label>
                        </td>
                        <td style="text-align: center;">
                            <asp:Label ID="lgNum" runat="server" Text='<%# Convert.ToDateTime(Eval("postDate").ToString().Trim()).ToString("yyyy-MM-dd HH:mm:ss")%>'></asp:Label>
                        </td>
                        <td style="text-align: center;">
                            <asp:HyperLink ID="del" runat="server" NavigateUrl='<%# Eval("lid","Del.aspx?id={0}").ToString().Trim()+"&cid="+Request.QueryString["cid"]+"&page="+Request.QueryString["page"] %>'
                                Font-Bold="True"><span onclick="return confirm('确定删除吗？');">删除</span></asp:HyperLink>
                            <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("lid","edit.aspx?id={0}").ToString().Trim()+"&cid="+Request.QueryString["cid"]+"&page="+Request.QueryString["page"] %>'
                                Font-Bold="True">修改</asp:HyperLink>
                        </td>
                    </tr>
                </ItemTemplate>
                <AlternatingItemTemplate>
                    <tr>
                        <td style="background-color: #E9F8FC;">
                            <asp:HyperLink ID="linkName" runat="server" NavigateUrl='<%# Eval("linkURL").ToString().Trim()%>'
                                Text='<%# Eval("linkName").ToString().Trim()%>' Target="_blank"></asp:HyperLink>
                        </td>
                        <td style="background-color: #E9F8FC;">
                            <asp:Image ID="preImage" runat="server" onerror="style.display='none'" ImageUrl='<%# getPre(Eval("uploadFile").ToString().Trim()) %>'
                                Width="120px" Height="60px" />
                        </td>
                        <td style="background-color: #E9F8FC;">
                            <asp:Label ID="linkType" runat="server" Text='<%# getClass(Convert.ToInt32(Eval("classID")))%>'></asp:Label>
                        </td>
                        <td style="background-color: #E9F8FC; text-align: center;">
                            <asp:Label ID="ip" runat="server" Text='<%# Eval("AdminID").ToString().Trim()%>'></asp:Label>
                        </td>
                        <td style="background-color: #E9F8FC; text-align: center;">
                            <asp:Label ID="lgNum" runat="server" Text='<%# Convert.ToDateTime(Eval("postDate").ToString().Trim()).ToString("yyyy-MM-dd HH:mm:ss")%>'></asp:Label>
                        </td>
                        <td style="background-color: #E9F8FC; text-align: center;">
                            <asp:HyperLink ID="del" runat="server" NavigateUrl='<%# Eval("lid","Del.aspx?id={0}").ToString().Trim()+"&cid="+Request.QueryString["cid"]+"&page="+Request.QueryString["page"] %>'
                                Font-Bold="True"><span onclick="return confirm('确定删除吗？');">删除</span></asp:HyperLink>
                            <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("lid","edit.aspx?id={0}").ToString().Trim()+"&cid="+Request.QueryString["cid"]+"&page="+Request.QueryString["page"] %>'
                                Font-Bold="True">修改</asp:HyperLink>
                        </td>
                    </tr>
                </AlternatingItemTemplate>
                <FooterTemplate>
                    </table>
                </FooterTemplate>
            </asp:Repeater>
            <div class="height10px">
            </div>
            <div>
                <asp:Literal ID="lblCurrentPage" runat="server"></asp:Literal>
            </div>
        </div>
    </form>
</body>
</html>
