<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GetImage.aspx.cs" Inherits="TopWinCMS.WebUI.Admin.Window.GetImage" %>

<%@ Register Assembly="TopWinCMS.WebControls" Namespace="TopWinCMS.WebControls" TagPrefix="cc1" %>
<%@ Register Src="../UC_AjaxLoading.ascx" TagName="UC_AjaxLoading" TagPrefix="uc1" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
    <meta content="no-cache" http-equiv="Pragma" />

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

    <link href="../Style.css" rel="stylesheet" type="text/css" />

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

    <script language="javascript" type="text/javascript">
	function ClickRetrun( v )
	{
	    window.returnValue = v;
	    window.close();
	}
    </script>

    <style type="text/css">
        img
        {
            cursor: pointer;
        }
        .K
        {
            border-color: Black;
            border: 1px;
        }
    </style>
</head>
<body style="overflow: auto">
    <form runat="server" method="post" id="Form1">
    <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:DropDownList ID="DDL_Path" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DDL_Path_SelectedIndexChanged">
            </asp:DropDownList>
            <fieldset>
                <legend>图片浏览 </legend>
                <table width="100%" cellspacing="2" cellpadding="0" border="0" align="center">
                    <tr>
                        <td style="padding-left: 3px">下级目录：<asp:DropDownList ID="DropDownList1" 
                                runat="server" onselectedindexchanged="DropDownList1_SelectedIndexChanged" AutoPostBack="true">
                            </asp:DropDownList>
                            尺寸：<asp:DropDownList ID="cbThumbSize" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ReBind">
                                <asp:ListItem Value="40">40*40</asp:ListItem>
                                <asp:ListItem Selected="True" Value="80">80*80</asp:ListItem>
                                <asp:ListItem Value="120">120*120</asp:ListItem>
                            </asp:DropDownList>
                            &nbsp;排序：
                            <asp:DropDownList ID="cbSorts" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ReBind">
                                <asp:ListItem Value="CreationTime Desc">日期倒序</asp:ListItem>
                                <asp:ListItem Value="CreationTime Asc">日期升序</asp:ListItem>
                                <asp:ListItem Value="FileSize Desc">大小倒序</asp:ListItem>
                                <asp:ListItem Value="FileSize Asc">大小升序</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td style="padding-left: 3px">
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:DataList ID="DL_List" runat="server" RepeatColumns="5" RepeatDirection="Horizontal"
                                Width="100%" OnItemDataBound="DL_List_ItemDataBound">
                                <ItemTemplate>
                                    <div class="K">
                                        <asp:Image ID="Img" runat="server" ImageUrl='<%# ((System.Data.DataRow)Container.DataItem)["FullName"] %>'
                                            ToolTip='<%# ToolTip(
                          ((System.Data.DataRow)Container.DataItem)["FileName"],
                          ((System.Data.DataRow)Container.DataItem)["FileSize"],
                          ((System.Data.DataRow)Container.DataItem)["CreationTime"],
                          ((System.Data.DataRow)Container.DataItem)["LastWriteTime"] 
                          )%>' onclick='<%# PicURL(((System.Data.DataRow)Container.DataItem)["FullName"]) %>'></asp:Image></div>
                                </ItemTemplate>
                            </asp:DataList>
                        </td>
                    </tr>
                </table>
            </fieldset>
            <cc1:PageNavigation ID="PageNavigation1" runat="server" PageSize="25" OnPageChanging="PageNavigation1_PageChanging"
                Width="100%" SubmitButtonClass="btn" ShowCustomInfoSection="Never">
            </cc1:PageNavigation>
            <p style="text-align: center">
                <input type="button" class="btn" value="取消" onclick="window.close();" />
            </p>
        </ContentTemplate>
    </asp:UpdatePanel>
    </form>
</body>
</html>
