<%@ page language="C#" autoeventwireup="true" inherits="admin_template_UploadList, DianCMS" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Import Namespace="D.Common" %>
<%@ Import Namespace="System.Globalization" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link id="CssName" rel="stylesheet" type="text/css" runat="server" />
    <script src="../../js/Common.js" type="text/javascript"></script>
    <script src="../../js/folder.js" type="text/javascript"></script>
    <script src="../../js/lhgdialog/lhgcore.lhgdialog.min.js?self=true&skin=<%=Function.GetCssNameColor()%>" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <table width="99%" align="center" cellpadding="2" cellspacing="0" border="0" class="dh">
                <tr>
                    <td height="22">
                        <asp:ImageButton ID="ImageButton1" ImageUrl="../images/folder_back.gif" runat="server"
                            ToolTip="<%$ Resources:Lang,Template_Up%>" OnClick="ImageButton1_Click" />
                        <asp:ImageButton ID="ImageButton2" ImageUrl="../images/refresh.gif" runat="server"
                            OnClick="ImageButton2_Click" ToolTip="<%$ Resources:Lang,Template_Refresh%>" />
                        <asp:HyperLink ID="HyperLink1" runat="server"></asp:HyperLink>
                    </td>
                    <td align="right">
                        <asp:Literal ID="Literal2" runat="server" Text="<%$ Resources:Lang,Template_NowPath%>"></asp:Literal>：<asp:Label
                            ID="LitPath" runat="server" Text="Label"></asp:Label>
                    </td>
                </tr>
            </table>
            <asp:Panel ID="Panel1" runat="server">
            <table cellpadding="2" cellspacing="1" border="0" class="border" width="100%" align="center">
                <asp:Repeater ID="Repeater1" runat="server" OnItemDataBound="Repeater1_ItemDataBound"
                    OnItemCommand="Repeater1_ItemCommand">
                    <HeaderTemplate>
                        <tr class="title">
                            <td align="center" class="t1">
                                <asp:Literal ID="Literal3" runat="server" Text="<%$ Resources:Lang,Template_List_Head_Type%>"></asp:Literal>
                            </td>
                            <td>
                                <asp:ImageButton ID="ImageButton4" ImageUrl="../images/up.gif" runat="server" OnClick="Up_Name_Click" />
                                <asp:Literal ID="Literal4" runat="server" Text="<%$ Resources:Lang,Template_List_Head_Name%>"></asp:Literal>
                                <asp:ImageButton ID="ImageButton3" ImageUrl="../images/down.gif" runat="server" OnClick="Down_Name_Click" />
                            </td>
                            <td>
                                <asp:ImageButton ID="ImageButton5" ImageUrl="../images/up.gif" runat="server" OnClick="Up_Time_Click" />
                                <asp:Literal ID="Literal5" runat="server" Text="<%$ Resources:Lang,Common_UpdateTime%>"></asp:Literal>
                                <asp:ImageButton ID="ImageButton6" ImageUrl="../images/down.gif" runat="server" OnClick="Down_Time_Click" />
                            </td>
                            <td>
                                <asp:Literal ID="Literal6" runat="server" Text="<%$ Resources:Lang,Common_Size%>"></asp:Literal>
                            </td>
                            <td width="35%">
                                <asp:Literal ID="Literal7" runat="server" Text="<%$ Resources:Lang,Common_Operation%>"></asp:Literal>
                            </td>
                        </tr>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <tr class="tdMoveTr" onmouseover="this.className='tdMoveTrBg'" onmouseout="this.className='tdMoveTr'">
                            <td width="25" align="center" class="t1">
                                <img src='<%#Eval("image") %>' />
                            </td>
                            <td onmousemove="Move('<%#Eval("url") %>')" onmouseout="Out()">
                                <asp:Literal ID="LiteralName" runat="server"></asp:Literal><asp:LinkButton ID="LinkButtonName"
                                    runat="server" CommandName="Next" CommandArgument='<%#Eval("Path") %>'></asp:LinkButton>
                            </td>
                            <td width="130">
                                <%#Eval("UpdateTime", "{0:yyyy-MM-dd}")%>
                            </td>
                            <td width="50">
                                <%#Eval("Size") %>
                            </td>
                            <td style="padding-left: 5px">
                                <a href="javascript:" onclick="WinOpenLhgDialog('重命名','../../admin/template/Rename.aspx?dirpath=<%#Function.UrlEncode(Eval("Path","{0}")) %>&Type=<%#Eval("Type") %>&folder=<%=Function.GetUploadFolder()%>',450,115,'<%=Function.GetCssName()%>')">
                                    <asp:Literal ID="Literal8" runat="server" Text="<%$ Resources:Lang,Common_ReName%>"></asp:Literal></a>
                                ┊
                                <asp:LinkButton ID="Delete" runat="server" CommandArgument='<%#Eval("Path") %>' CommandName="Delete">
                                    <asp:Literal ID="Literal1" runat="server" Text="<%$ Resources:Lang,Common_Delete%>"></asp:Literal></asp:LinkButton>
                                <%#getLiuLan(Function.UrlEncode(Eval("Path", "{0}")),Eval("Type","{0}"))%>
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:Repeater>
            </table>
            </asp:Panel>
            <asp:Panel ID="Panel2" runat="server">
            <table cellpadding="2" cellspacing="1" border="0" class="border" width="100%" align="center">
                <tr>
                    <td>
                        <asp:DataList ID="DataList1" runat="server" RepeatColumns="3" CellPadding="10" 
                            Width="100%" RepeatDirection="Horizontal" onitemcommand="DataList1_ItemCommand" 
                            onitemdatabound="DataList1_ItemDataBound">
                            <ItemTemplate>
                                <table cellpadding="4" cellspacing="0" width="100%" border="0">
                                    <tr>
                                        <td><%#GetShowTable(Eval("image", "{0}"), Eval("url", "{0}"), Eval("Type","{0}"))%></td>
                                    </tr>
                                    <tr>
                                        <td align="center"><asp:Literal ID="LiteralName" runat="server"></asp:Literal><asp:LinkButton ID="LinkButtonName"
                                    runat="server" CommandName="Next" CommandArgument='<%#Eval("Path") %>'></asp:LinkButton></td>
                                    </tr>
                                    <tr>
                                        <td align="center"><%#Eval("Size") %> <span style="margin-left:40px;"><asp:LinkButton ID="Delete" runat="server" CommandArgument='<%#Eval("Path") %>' CommandName="Delete">
                                    <asp:Literal ID="Literal1" runat="server" Text="<%$ Resources:Lang,Common_Delete%>"></asp:Literal></asp:LinkButton></span></td>
                                    </tr>
                                </table>
                                
                            </ItemTemplate>
                        </asp:DataList>
                   </td>
                </tr>
            </table>            
            </asp:Panel>
            <table align="center" cellpadding="0" cellspacing="0" class="dh2">
                <tr>
                    <td height="30" width="30">
                        <img src="../images/folder_add.gif" align="absmiddle" title="<%$ Resources:Lang,Common_Upload_Folder %>"
                            style="margin-left: 10px" runat="server" />
                    </td>
                    <td>
                        <asp:TextBox ID="FolderName" runat="server" Columns="20" CssClass="in1" style="height:22px;"></asp:TextBox>
                        <asp:Button ID="Button1" runat="server" Text="<%$ Resources:Lang,Common_Upload_Folder %>"
                            OnClick="Button1_Click" CssClass="btn" />
                    </td>
                    <td>
                        <iframe id="file" name="file" src="upload.aspx?folder=<%=Function.GetUploadFolder()%>" frameborder="0" width="98%"
                            marginwidth="0" height="35" scrolling="no"></iframe>
                    </td>
                </tr>
            </table>
            <div id="DivShowPic" style="position: absolute; left: 0; top: 0; display: none; margin-top: 20px">
                <table cellpadding="2" cellspacing="1" border="0" bgcolor="#cccccc" width="200" height="200">
                    <tr>
                        <td bgcolor="#ffffff" align="center" valign="middle">
                            <img id="Img" src="../images/loading.gif" /><img id="HiddenImg" onload="ShowImg(this)"
                                style="display: none" />
                        </td>
                    </tr>
                </table>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    </form>
</body>
</html>
