<%@ page language="C#" masterpagefile="~/HL_Admin/AdminIndexMaster.master" autoeventwireup="true" inherits="HL_Admin_Admin_ManageUploadFile, HoWaveVGO" title="广告上传文件管理" enableEventValidation="false" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script src="Js/Function.js" type="text/javascript"></script> 
  <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"/>
   <table class="adminheading">
         <tr>
            <th>网站广告模板管理</th>                  
            <td align="right">
            <div style="width:590px">
                <a href="Admin_manageadzone.aspx">管理广告版位</a>&nbsp;|&nbsp;
                <a href="Admin_updateadzone.aspx?add=1">增加广告版位</a>&nbsp;|&nbsp;
                <a href="Admin_managead.aspx">管理广告</a>&nbsp;|&nbsp;
                <a href="Admin_updateAd.aspx">添加新广告</a>&nbsp;|&nbsp;
                <a  href="Admin_Managejs.aspx">js模板管理</a>&nbsp;|&nbsp;
                <a href="Admin_ManageUploadFile.aspx">广告上传文件管理</a>
             </div>
             </td>
             <td class="rtdw"></td> 
         </tr>
   </table> 
      
    <table class="nick">
        <tr>
            <td colspan="4" class="tit">广告上传文件管理</td>
        </tr>
        <tr>
            <td class="ltd">
                文件目录路径：
            </td>
            <td class="rtd" style="width: 35%;">
                <asp:TextBox ID="TxtDir" runat="server" AutoPostBack="True" Width="300px"></asp:TextBox>
            </td>
           <td class="ltd">
                最后访问日期：
            </td>
            <td class="rtd" style="width: 35%;">
                <asp:TextBox ID="TxtLastAccess" runat="server" AutoPostBack="True" Width="91px"></asp:TextBox>
                <cc1:CalendarExtender  Format="yyyy-MM-d" ID="CalendarExtender1" runat="server" TargetControlID="TxtLastAccess">
                </cc1:CalendarExtender>
                &nbsp;&nbsp;
            </td>
        </tr>
    </table>
    <br />
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
              <ContentTemplate>
    <asp:GridView  class="adminlist"  ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="ObjectDataSource1"
        Width="100%" AllowPaging="True" OnRowDataBound="GridView1_RowDataBound" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" OnDataBound="GridView1_DataBound" PageSize="10">
        <Columns>
            <asp:TemplateField HeaderText="选择">
                <ItemTemplate>
                    <asp:CheckBox ID="CheckBox1" runat="server" Text="选择" />
                </ItemTemplate>
                 <HeaderTemplate>
                      <input id="chkAll" onclick="SelectAllCheckboxes(this);" runat="server" type="checkbox" />
                 </HeaderTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="FileName" HeaderText="文件名" />
            <asp:BoundField DataField="FileSize" HeaderText="文件大小" />
            <asp:BoundField DataField="LastAccess" HeaderText="最后访问时间" HeaderStyle-Width="10%"/>
            <asp:BoundField DataField="FileLoacl" HeaderText="文件路径" />
            <asp:BoundField DataField="FileType" HeaderText="文件类型" />
            <asp:BoundField DataField="IsWasteFile" HeaderText="是否垃圾文件" HeaderStyle-Width="10%"/>
            <asp:TemplateField HeaderText="缩略图">
                <EditItemTemplate>
                    &nbsp;
                </EditItemTemplate>
                <ItemTemplate>
                   <a href="Admin_AdUploadFileBit.ASPX?FileName=<%#Eval("FileName") %>&FileType=<%#Eval("FileType") %>" target="_blank" > <asp:Image ID="Image1" runat="server"  ImageUrl='<%#"../IMS_AD/UploadAdPic/"+Eval("FileName") %>' Height="50px" Width="50px" /></a>&nbsp;<br />
  
                     <asp:Panel ID="Panel1" runat="server" Height="50px" Width="50px">
                			<FONT face="宋体">
					<OBJECT id="FlashObject" style="WIDTH: 50px; HEIGHT: 40px" codeBase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"
						height="600" width="400" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" VIEWASTEXT>
						<param name="_cx" value="15875">
						<param name="_cy" value="10583">
						<param name="FlashVars" value="">
						<param name="Movie" value="../IMS_AD/UploadAdPic/<%#Eval("FileName") %>" >
						<param name="Src" value="../IMS_AD/UploadAdPic/<%#Eval("FileName") %>" >
						<param name="WMode" value="Window">
						<param name="Play" value="-1">
						<param name="Loop" value="-1">
						<param name="Quality" value="High">
						<param name="SAlign" value="">
						<param name="Menu" value="-1">
						<param name="Base" value="">
						<param name="AllowScriptAccess" value="">
						<param name="Scale" value="ShowAll">
						<param name="DeviceFont" value="0">
						<param name="EmbedMovie" value="0">
						<param name="BGColor" value="">
						<param name="SWRemote" value="">
						<param name="MovieData" value="">
						<param name="SeamlessTabbing" value="1">
						<param name="Profile" value="0">
						<param name="ProfileAddress" value="">
						<param name="ProfilePort" value="0">
						<param name="AllowNetworking" value="all">
						<embed src="../IMS_AD/UploadAdPic/<%#Eval("FileName") %>" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer"
							type="application/x-shockwave-flash" width="50" height="50"> </embed>
					</OBJECT>
				</FONT>
				<a href="Admin_AdUploadFileBit.ASPX?FileName=<%#Eval("FileName") %>&FileType=<%#Eval("FileType") %>" target="_blank" >看不清楚？</a>
                </asp:Panel>
                <asp:Label ID="Label1" runat="server" />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="删除">
               <ItemTemplate>
                   <asp:LinkButton ID="cl" runat="server" OnClientClick="if(confirm('确定删除吗？'))return true; return false;" Text="删除" CommandName="Select"  />
               </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <EmptyDataTemplate>
                    <tr>
                      <th>全选</th><th>文件名</th><th>文件大小</th><th>最后访问时间</th><th scope="col">文件路径</th><th>文件类型</th><th>是否垃圾文件</th><th>删除</th>
		            </tr>
		            <tr>
		              <td colspan="8">暂无文件！</td>
		            </tr>
        </EmptyDataTemplate>
    </asp:GridView> 
</ContentTemplate>
                 <Triggers>
<asp:AsyncPostBackTrigger ControlID="Button3" EventName="Click"></asp:AsyncPostBackTrigger>
<asp:AsyncPostBackTrigger ControlID="TxtDir" EventName="TextChanged"></asp:AsyncPostBackTrigger>
<asp:AsyncPostBackTrigger ControlID="TxtLastAccess" EventName="TextChanged"></asp:AsyncPostBackTrigger>
</Triggers>
                </asp:UpdatePanel>
   <div style="width:100%">
      <asp:Button ID="Button3" runat="server" Text="删除" OnClick="Button3_Click" CausesValidation="False" />
   </div>
    <br />
    <br />
    &nbsp;&nbsp;
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetAdUploadFileByLastAccess"
        TypeName="AdUploadFileComponent" UpdateMethod="GetAdUploadFileByLastAccess" DeleteMethod="DelecteFile" OldValuesParameterFormatString="{0}">
        <UpdateParameters>
            <asp:Parameter Name="DirFileLocal" Type="String" />
            <asp:Parameter Name="LastAccess" Type="DateTime" />
            <asp:Parameter Name="SortExpression" Type="String" />
        </UpdateParameters>
        <SelectParameters>
            <asp:ControlParameter ControlID="TxtDir" Name="DirFileLocal" PropertyName="Text"
                Type="String" />
            <asp:ControlParameter ControlID="TxtLastAccess" Name="LastAccess" PropertyName="Text"
                Type="DateTime" />
            <asp:Parameter DefaultValue="LastAccess" Name="SortExpression" Type="String" />
        </SelectParameters>
        <DeleteParameters>
            <asp:Parameter Name="FileLoacl" Type="String" />
        </DeleteParameters>
    </asp:ObjectDataSource>
    &nbsp;
</asp:Content>

