<%@ Page language="c#" Codebehind="FlashADManager.aspx.cs" AutoEventWireup="true" Inherits="XpShop.Manage.FlashADManager" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML>
	<HEAD>
	    <!--#include file="inc/head.inc"-->
		<title>AD</title>
		<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
		<meta content="C#" name="CODE_LANGUAGE">
		<meta content="JavaScript" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
		<script language="javascript">
			function CheckSort(obj)
			{
				document.getElementById(obj).value = document.getElementById(obj).value.replace(/\D/g,"");
				if(Number(document.getElementById(obj).value)<1 || document.getElementById(obj).value=="")
				{
					document.getElementById(obj).value = "";
				}
			}
			$(document).ready(function(){
			    $('[@id=dgFlash] tr').hover(function(){
			        $(this).css('background','#edf1f8');
			    },function(){
			        $(this).css('background','#ffffff');
			    });
			})
		</script>
	</HEAD>
	<body MS_POSITIONING="GridLayout">
	    <div class="container">
		<div class="sub_container">
		<div class="sub_container_title"><a href="<%=AdminDefault%>" target="_top">桌面</a><img src="images/admin_title.jpg" height=9px width=8px align="absmiddle" />FLASH广告列表</div>
		<div class="sub_container_content">
		<form id="Form1" method="post" runat="server">
		    <div class="frame">
		        <div class="frame_title"> FLASH广告管理</div>
		        <div class="frame_content">
		            <table class="tableBorder" cellSpacing="0" cellPadding="0" width="98%" align="center" border="0">
				        <tr>
					        <td>
						        <asp:Button ID="btnSaveSort" OnClick="btnSaveSort_Click" Runat="server" Text="修改排序" CssClass="inputbtn"></asp:Button></td>
				        </tr>
				        <tr>
					        <td class="forumRowHighlight" height="23"><asp:datagrid id="dgFlash" runat="server" Width="100%" HeaderStyle-CssClass="summary-title" HorizontalAlign="Center"
							        DataKeyField="FlashID" AutoGenerateColumns="False" PagerStyle-Mode="NumericPages" PageSize="20" AllowPaging="True">
							        <HeaderStyle Font-Bold="True" CssClass="summary-title"></HeaderStyle>
							        <Columns>
								        <asp:TemplateColumn HeaderText="FLASH广告标语">
							                <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
							                <ItemStyle HorizontalAlign="Center"></ItemStyle>
							                <ItemTemplate>
								               <%#DataBinder.Eval(Container.DataItem,"FlashName")%>
							                </ItemTemplate>
						                </asp:TemplateColumn>
								        <asp:TemplateColumn HeaderText="FLASH广告图">
									        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Center"></ItemStyle>
									        <ItemTemplate>
										        <img src='../Upload/flashAD/<%#DataBinder.Eval(Container.DataItem,"FlashImg")%>' width="70">
									        </ItemTemplate>
								        </asp:TemplateColumn>
								        <asp:TemplateColumn HeaderText="链接地址">
									        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Center"></ItemStyle>
									        <ItemTemplate>
										        <%#DataBinder.Eval(Container.DataItem,"FlashLink")%>
									        </ItemTemplate>
								        </asp:TemplateColumn>
								        <asp:TemplateColumn HeaderText="广告分类">
									        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Center"></ItemStyle>
									        <ItemTemplate>
										        <%#DataBinder.Eval(Container.DataItem,"ADCategoryName")%>
									        </ItemTemplate>
								        </asp:TemplateColumn>
								        <asp:TemplateColumn HeaderText="排序">
									        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Center" Width="70px"></ItemStyle>
									        <ItemTemplate>
										        <input name="sort<%# Container.ItemIndex+1%>" type="text" class="inputstyle" id="sort<%# Container.ItemIndex+1%>" value='<%# DataBinder.Eval(Container.DataItem, "Sort") %>' size="9" maxlength="10" onkeyup="CheckSort('sort<%# Container.ItemIndex+1%>')"/>
									        </ItemTemplate>
								        </asp:TemplateColumn>
								        <asp:TemplateColumn HeaderText="开放">
                                            <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                            <ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
                                            <ItemTemplate>
                                                <a href='Actions.aspx?Action=ChangeFlashADStatus&flashID=<%# DataBinder.Eval(Container.DataItem, "FlashID") %>&Status=<%# DataBinder.Eval(Container.DataItem, "Status") %>'>
                                                	<img src='images/publish_<%# DataBinder.Eval(Container.DataItem, "Status") %>.png' border="0"></a>
                                            </ItemTemplate>
                                        </asp:TemplateColumn>
                                        <asp:TemplateColumn>
									        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
									        <ItemTemplate>
										        <a href='FlashAD.aspx?FlashID=<%# DataBinder.Eval(Container.DataItem, "FlashID") %>'>
											        修改</a>
									        </ItemTemplate>
								        </asp:TemplateColumn>
								        <asp:ButtonColumn Text="&lt;div id=&quot;de&quot; onclick=&quot;javascript:return confirm('确认删除吗？')&quot;&gt;删除&lt;/div&gt;"
									        CommandName="Delete">
									        <ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
								        </asp:ButtonColumn>
							        </Columns>
							        <PagerStyle Mode="NumericPages"></PagerStyle>
						        </asp:datagrid>
					        </td>
				        </tr>
			        </table>
		        </div>
	        </div>
		</form>
		</div>
		</div>
		</div>
	</body>
</HTML>
