<%@ page language="C#" masterpagefile="~/HL_Admin/AdminIndexMaster.master" autoeventwireup="true" inherits="Passport_ad_ManageUploadFile, HoWaveIMSV5.0" title="广告上传文件管理" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script src="Js/Function.js" type="text/javascript"></script> 
 <div style="width:100%; padding:5px;">
      <a href="Admin_Channel.aspx" >频道管理</a>&nbsp;|&nbsp;<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><br />                
 </div>
 <fieldset style="margin:5px; width:98%">
      <legend>广告JS模板管理</legend>
      
    <table>
        <tr>
            <td style="width: 351px">
                文件目录路径：</td>
            <td style="width: 350px">
                <asp:TextBox ID="TxtDir" runat="server" AutoPostBack="True" Width="291px"></asp:TextBox>
            </td>
            <td style="width: 364px">
                最后访问日期：</td>
            <td style="width: 100px">
                <asp:TextBox ID="TxtLastAccess" runat="server" AutoPostBack="True" ReadOnly="True" Width="91px"></asp:TextBox>
                </td>
            <td style="width: 100px">
                <asp:Button ID="Button1" runat="server" CausesValidation="False" OnClick="Button1_Click"
                    Text="...日期" /><br />
                <asp:Calendar ID="Calendar1" runat="server" OnSelectionChanged="Calendar1_SelectionChanged" Width="43px"></asp:Calendar>
            </td>
            <td style="width: 100px">
            </td>
        </tr>
    </table>  
    <asp:GridView  class="adminlist"  ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="ObjectDataSource1"
        Width="100%" AllowPaging="True" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" OnDataBound="GridView1_DataBound" EmptyDataText="没有找到符合你查询条件的文件">
        <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="最后访问时间" />
            <asp:BoundField DataField="FileLoacl" HeaderText="文件路径" />
            <asp:BoundField DataField="FileType" HeaderText="文件类型" />
            <asp:BoundField DataField="IsWasteFile" HeaderText="是否垃圾文件" />
            <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='<%# Eval("FileLoacl") %>' 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: 50px" 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="UploadAdPic/<%#Eval("FileName") %>" >
						<param name="Src" value="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="<%#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:CommandField HeaderText="删除" SelectText="删除" ShowSelectButton="True" />
        </Columns>
    </asp:GridView>
   <div style="width:100%">
      <asp:Button ID="Button3" runat="server" Text="删除" OnClick="Button3_Click" CausesValidation="False" />
   </div>
 </fieldset>
    <br />
    <br />
    &nbsp;&nbsp;
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetAdUploadFileByLastAccess"
        TypeName="AdUploadFileComponent" UpdateMethod="GetAdUploadFileByLastAccess" DeleteMethod="DelecteFile" OldValuesParameterFormatString="original_{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>

