<%@ Page Language="C#" AutoEventWireup="false" CodeBehind="Adlist.aspx.cs" Inherits="web.admin.Adlist" %>

<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>AD</title><meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
		<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
		<meta name="CODE_LANGUAGE" Content="C#">
		<meta name="vs_defaultClientScript" content="JavaScript">
		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
		<LINK href="images/adminstyle.css" type="text/css" rel="stylesheet">
				<script language="JavaScript">
<!--
//By Dicky 2005-2-17 11:16:49
function Window_Load(Flag)
{

if (Flag == 0)
{

  parent.document.all['Loading'].style.display = 'block';
  parent.document.all['Loading'].style.width = '500';
   parent.document.all['Loading'].style.height = '60';
  //show the window
}
else
{
  parent.document.all['Loading'].style.display = 'none';
  
  //hide the window
}
}
//-->
</script>
	</HEAD>
	<body rightmargin="0" leftmargin="0" topmargin="0" onload="Window_Load(1);">
	
		<form id="Form2" method="post" runat="server" onsubmit="Window_Load(0);">
<% if(Request.QueryString["ADID"] == null) {%>
  <table width="100%" height="550" cellspacing="0" cellpadding="0">
    <tr>
    <td valign="top">
<div class="top">
          <table width="100%" align="center" cellpadding="0" cellspacing="0" background="img/labelbg.gif" bgcolor="#EDF6FF">
            <tr>
		      <td width="7%" height="33" class="tl"></td>
		<td width="89%" class="tm"><span class="tt">营销管理 &gt;&gt;广告管理 <span style="color: #ff3333">说明：如果供求信息相关页面广告内容有变化，请到生成HTML模块批量生成供求信息所有商家列表HTML以更新广告内容的显示</span></span></td>
		      <td width="1%" class="tm2"><span class="tt"></span></td>
		<td width="3%" class="tr"></td>
	</tr>
</table>
</div>
        <div class="mframe"> 
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
      <td class="ml"></td>
    <td  class="mm" align="left" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
                    <td bgcolor="#FFFFFF" valign="top" ><br>
                      <table width="90%" align="center" cellpadding="0"  cellspacing="0">
                        <tr>
		<td class="ml1"></td>
		<td class="mm1">
			<table cellSpacing="0" cellPadding="0" width="99%" align="center" border="0">
				<tr>
					            <td height="25" align="left"> &nbsp;<strong><font color="#FF0000">&nbsp; 
                                  固定广告管理</font></strong></td>
				</tr>
			</table>
			<table cellSpacing="0" cellPadding="0" width="100%" align="center" border="0">
				<tr>
					<td height="23" class="forumRowHighlight">
						<asp:datagrid id="dgList" runat="server" PageSize="15" PagerStyle-Mode="NumericPages" AutoGenerateColumns="False"
							DataKeyField="ADID" Width="100%" HorizontalAlign="Center" HeaderStyle-CssClass="summary-title" BorderColor="#E0E0E0" BorderWidth="1px">
							<HeaderStyle Font-Bold="False" CssClass="head" BackColor="#EDF6FF" Height="35px"></HeaderStyle>
							<Columns>
								<asp:TemplateColumn HeaderText="广告位置">
									<HeaderStyle HorizontalAlign="Left"></HeaderStyle>
									<ItemStyle HorizontalAlign="Left"></ItemStyle>
									<ItemTemplate>
										<%# DataBinder.Eval(Container.DataItem, "Name") %>
									</ItemTemplate>
								</asp:TemplateColumn>
								<asp:TemplateColumn HeaderText="开放/关闭">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemTemplate>
										<a href='Cz.aspx?Action=ChangeADInNav&ADID=<%# DataBinder.Eval(Container.DataItem, "ADID") %>&Status=<%# DataBinder.Eval(Container.DataItem, "IsOpen")%>&type=1'>
											<img src='images/publish_<%# DataBinder.Eval(Container.DataItem, "IsOpen")%>.png' border="0"></a>
									</ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" Width="60px" />
								</asp:TemplateColumn>
								<asp:TemplateColumn>
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
									<ItemTemplate>
										<a href='Adlist.aspx?ADID=<%# DataBinder.Eval(Container.DataItem, "ADID") %>'>修改</a>
									</ItemTemplate>
								</asp:TemplateColumn>
							</Columns>
							<PagerStyle Mode="NumericPages"></PagerStyle>
                            <ItemStyle Height="26px" />
						</asp:datagrid>
					</td>
				</tr>
			</table>
	
			<table cellSpacing="0" cellPadding="0" width="640" align="center" border="0">
				<tr>
					            <td align="left" style="height: 25px"> <strong><font color="#FF0000">&nbsp;&nbsp; 
                                  自定义广告管理 
                                  <br/>(说明：将广告代码放置在你想放置的模板中的位置，然后相关页面重新生成一遍HTML即可!)<br />
                                    <br />
                                    特别注意:广告代码中的SRC="../qianad.aspx &nbsp; 这个地方,如果是嵌入根目录下的页面,把../去掉,如果是嵌入根目录下的下级文件夹中的文件,请不要去掉</font></strong></td>
				</tr>
			</table>
			<table cellSpacing="0" cellPadding="0" width="100%" align="center" border="0">
				<tr>
					<td height="23" class="forumRowHighlight">
						<asp:datagrid id="dgCustomADList" runat="server" AutoGenerateColumns="False"
							DataKeyField="ADID" Width="100%" HorizontalAlign="Center" HeaderStyle-CssClass="summary-title" BorderColor="#CCCCCC" BorderWidth="1px">
							<HeaderStyle Font-Bold="False" CssClass="head" BackColor="#EDF6FF" Height="35px"></HeaderStyle>
							<Columns>
								<asp:TemplateColumn HeaderText="广告位置名称">
									<HeaderStyle HorizontalAlign="Center" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" Width="100px"></HeaderStyle>
									<ItemStyle HorizontalAlign="Center" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></ItemStyle>
									<ItemTemplate>
										<%# DataBinder.Eval(Container.DataItem, "Name") %>
									</ItemTemplate>
								</asp:TemplateColumn>
								<asp:TemplateColumn HeaderText="广告页面代码">
									<HeaderStyle HorizontalAlign="Center" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></HeaderStyle>
									<ItemStyle HorizontalAlign="Left"></ItemStyle>
									<ItemTemplate>
										 &lt;script language=&quot;JavaScript&quot; src=&quot;../qianad.aspx?qian=<%# DataBinder.Eval(Container.DataItem, "ADID") %>&quot; type=&quot;text/JavaScript&quot;&gt;&lt;/script&gt;
									</ItemTemplate>
								</asp:TemplateColumn>
								<asp:TemplateColumn HeaderText="开放/关闭">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemTemplate>
										<a href='Cz.aspx?Action=ChangeADInNav&ADID=<%# DataBinder.Eval(Container.DataItem, "ADID") %>&Status=<%# DataBinder.Eval(Container.DataItem, "IsOpen")%>&type=0'>
											<img src='images/publish_<%# DataBinder.Eval(Container.DataItem, "IsOpen")%>.png' border="0"></a>
									</ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" Width="60px" />
								</asp:TemplateColumn>
								<asp:TemplateColumn>
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
									<ItemTemplate>
										<a href='Adlist.aspx?ADID=<%# DataBinder.Eval(Container.DataItem, "ADID") %>'>修改</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>
                                    <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                        Font-Underline="False" HorizontalAlign="Center" />
								</asp:ButtonColumn>
							</Columns>
							<PagerStyle Mode="NumericPages"></PagerStyle>
                            <ItemStyle Height="26px" />
						</asp:datagrid>
					</td>
				</tr>
			</table>
		</td>
		<td class="mr1"></td>
	</tr>
</table>
                    </td>
  </tr>
</table>


<table width="100%" align="center" cellspacing="0" cellpadding="0">
	<tr>
		<td class="bl"></td>
		<td class="bm">&nbsp;</td>
		<td class="br"></td>
	</tr>
</table>
</td>
    <td  class="mr"></td>
  </tr>
</table>
<table width="100%" align="center" cellspacing="0" cellpadding="0">
	<tr>
		<td class="bl"></td>
		<td class="bm">&nbsp;</td>
		<td class="br"></td>
	</tr>
</table>

</div>
    </td>
  </tr>
</table>
<% }else{%>
<table width="100%" height="550" cellspacing="0" cellpadding="0">
  <tr>
    <td valign="top">
<div class="top">
          <table width="100%" align="center" cellpadding="0" cellspacing="0" background="img/labelbg.gif" bgcolor="#EDF6FF">
            <tr>
		      <td height="27" class="tl"></td>
		<td class="tm"><span class="tt">营销管理 &gt;&gt;  广告<asp:Literal Runat="server" ID="ltrAction" Text="修改"></asp:Literal></span></td>
		      <td class="tm2"><span class="tt"></span></td>
		<td class="tr"></td>
	</tr>
</table>
</div>
        <div class="mframe"> 
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
      <td class="ml"></td>
    <td  class="mm" align="left" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
                    <td bgcolor="#FFFFFF" valign="top" ><br>
                      <table width="90%" align="center" cellpadding="0"  cellspacing="0">
                        <tr>
		<td class="ml1"></td>
		<td class="mm1">
			<table cellSpacing="0" cellPadding="5" width="96%" align="center" border="0">
             
				<tr>
					<td class="forumRowHighlight" width="100">广告位置描述：</td>
					<td class="forumRowHighlight">
						<asp:TextBox id="txtName" CssClass="input" runat="server"></asp:TextBox><FONT face="宋体">&nbsp;所属类别：</FONT>
						<asp:DropDownList id="ddlAdType" runat="server">
							<asp:ListItem Value="1">固定广告</asp:ListItem>
						
							<asp:ListItem Value="3">自定义广告</asp:ListItem>
						</asp:DropDownList></td>
				</tr>
				<tr>
					<td class="forumRowHighlight" width="100">开放：</td>
					<td class="forumRowHighlight">
						<asp:CheckBox id="cbOpen" runat="server" Text="开放广告请打勾"></asp:CheckBox>
					</td>
				</tr>
				<% if(Request.QueryString["ADID"] == "3") {%>
				<tr>
					<td class="forumRowHighlight" width="100">广告属性：</td>
					<td class="forumRowHighlight">
						长:<asp:TextBox id="txtWidth" CssClass="input" runat="server" Width="50px"></asp:TextBox>px&nbsp;&nbsp; 
						距离浏览器顶部:<asp:TextBox id="txtTop" CssClass="input"  runat="server" Width="50px"></asp:TextBox>px&nbsp;&nbsp;
						<br>
						高:<asp:TextBox id="txtHigth" runat="server" CssClass="input"  Width="50px"></asp:TextBox>px&nbsp;&nbsp; 
						距离浏览器左边:<asp:TextBox id="txtLeft" CssClass="input"  runat="server" Width="50px"></asp:TextBox>px&nbsp;&nbsp;
					</td>
				</tr>
				<% }%>
				<tr>
					<td class="forumRowHighlight" width="100">广告内容：</td>
					<td class="forumRowHighlight">
						<FCKeditorV2:FCKeditor id="ftbContent" runat ="server" ToolbarSet="Default" Height="300px" Width="98%"></FCKeditorV2:FCKeditor>
					</td>
				</tr>
				<tr height="35">
					<td colspan="2" class="forumRowHighlight" align="center">
		<asp:Button id="btnSave" CssClass="btn" runat="server" Text="保 存"></asp:Button><FONT face="宋体">&nbsp;</FONT>&nbsp;
		<asp:Button id="btnCancel" CssClass="btn" runat="server" Text="取消"></asp:Button></td>
				</tr>
			</table>
			
		</td>
		<td class="mr1"></td>
	</tr>
</table>
                    </td>
  </tr>
</table>


<table width="100%" align="center" cellspacing="0" cellpadding="0">
	<tr>
		<td class="bl"></td>
		<td class="bm">&nbsp;</td>
		<td class="br"></td>
	</tr>
</table>
</td>
    <td  class="mr"></td>
  </tr>
</table>
<table width="100%" align="center" cellspacing="0" cellpadding="0">
	<tr>
		<td class="bl"></td>
		<td class="bm">&nbsp;</td>
		<td class="br"></td>
	</tr>
</table>

</div>
    </td>
  </tr>
</table>
<% }%>	
		</form>
	</body>
</HTML>
