<%@ page language="C#" validaterequest="false" enableeventvalidation="false" masterpagefile="AdminIndexMaster.master" autoeventwireup="true" inherits="HL_Admin_Admin_updateAd, WebApp_deploy" title="增加修改广告" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">  
 <script type="text/javascript">
     function callBack(fileName)
     {
        document.getElementById('ctl00_ContentPlaceHolder1_ImgUrl').value=fileName;
     }
    </script>
     <script type="text/javascript">
     function callBack1(fileName)
     {
        document.getElementById('ctl00_ContentPlaceHolder1_FlashUrl').value=fileName;
     }
    </script>
    <script src="Js/getdate.js" type="text/javascript"></script> 

    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
     
    <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="2" class="tit">广告</td></tr>
        <tr align="left">
            <td valign="top" style="width:22%; background-color:#eef7fd">
                <table cellspacing="1" cellpadding="1" width="200px" border="0" >
                   <tr class="tdbg">
                      <td align="center" >
                           <b>所属版位</b>
                           <asp:ListBox ID="ZoneID" runat="server" Width="198px"  Height="500px"  SelectionMode="Multiple"/>
                      </td>
                   </tr>
                </table>
            </td>
            <td valign="top" style="width:78%;background-color:#eef7fd" >
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>
                       <table width="100%" class="nick" cellpadding="1" cellspacing="1" border="0">
                            <tr >
                                <td class="ltd">
                                    <div style="width:90px;"><strong>广告名称：</strong></div>
                                </td>
                                <td class="rtd"><input id="ADName" maxLength="255" size="58" name="ADName" runat="server" /><FONT color=red>*</FONT>
                                 <asp:RequiredFieldValidator id="RequiredFieldValidator1" runat="server" ErrorMessage="不能空" ControlToValidate="ADName"/>
                                </td>                                
                            </tr>
                            <tr>
                                <td  class="ltd">广告类型：</td>
                                <td class="rtd">
                                    <asp:RadioButtonList id="ADType" runat="server" OnSelectedIndexChanged="RadLType_SelectedIndexChanged" Repeatdirection="Horizontal" AutoPostBack="true">
                                        <asp:ListItem Value="1" Selected="true">图片</asp:ListItem>
                                        <asp:ListItem Value="2">动画</asp:ListItem>
                                        <asp:ListItem Value="3">文本</asp:ListItem>
                                        <asp:ListItem Value="4">代码</asp:ListItem>
                                        <asp:ListItem Value="5">页面</asp:ListItem>
                                    </asp:RadioButtonList>
                               </td>
                            </tr>
                            <tr>
                               <td class="ltd"><strong>广告内容：</strong></td>
                               <td class="rtd">
                                   <table id="ADContent_2" cellspacing=1 cellpadding=1 width="100%" border=0>
                                       <tr align=left>
                                           <td align=left colSpan=2>
                                               <asp:Panel id="Panel1" runat="server" Width="100%">
                                                    <table id="ADContent_1" cellspacing=1 cellpadding=1 width="100%" align=left border=0 bgcolor="#FFFFFF"><tbody>
                                                        <tr class="tdbg" align=left>
                                                            <td style="HEIGHT: 22px; background-color:#E0EEF5;" colSpan=2 align="center">广告<SPAN style="COLOR: #ff0000">内容</SPAN><SPAN style="BACKGROUND-COLOR: #f0f0f0">设置--图片</SPAN>
                                                            </td>
                                                        </tr>
                                                        <tr style="BACKGROUND-COLOR: #f0f0f0" class="tdbg">
                                                            <td align=center><div style="WIDTH: 70px">图片地址：</div></td>
                                                            <td align=left><input id="ImgUrl" maxLength=255 size=58 name="ImgUrl" runat="server" /><SPAN style="COLOR: #333333; BACKGROUND-COLOR: #f0f0f0">*</SPAN>
                                                               <asp:Image ID="UploadImgUrl" runat="server" Visible="false" />
                                                            </td>
                                                        </tr>
                                                        <tr class="tdbg">
                                                            <td align=center>图片上传：</td>
                                                            <td align=left><iframe id="file" name="file" src="Admin_attachment.aspx" frameBorder="0" width="500px" scrolling="no" height="130px"></iframe></td>
                                                        </tr>
                                                        <tr class="tdbg">
                                                            <td align=center>图片尺寸：</td>
                                                            <td>宽：<input id="ImgWidth" maxLength="5" size="6" value="0" name="ImgWidth" runat="server" />像素
                                                           &nbsp; 
                                                            高：<input id="ImgHeight" maxLength=5 size=6 value="0" name="ImgHeight" runat="server" />像素<span style="color:Blue">(注:0表示按照原图尺寸显示)</span>
                                                            </td>
                                                        </tr>
                                                        <tr class="tdbg">
                                                            <td align=center>链接地址：</td><td><input id="LinkUrl" maxLength=255 size=58 value="http://" name="LinkUrl" runat="server" /> </td></tr><tr class="tdbg"><td align=center>链接提示：</td>
                                                            <td><input id="LinkAlt" maxLength=255 size=58 name="LinkAlt" runat="server" /> </td>
                                                        </tr>
                                                        <tr class="tdbg"><td align=center>链接目标：</td><td><asp:RadioButtonList id="LinkTarget" runat="server" Repeatdirection="Horizontal">
                                                                <asp:ListItem Selected="true" Value="0">原窗口</asp:ListItem>
                                                                <asp:ListItem Value="1">新窗口</asp:ListItem>
                                                            </asp:RadioButtonList></td>
                                                        </tr>
                                                        <tr class="tdbg">
                                                            <td align=center>广告简介：</td>
                                                            <td><TEXTAREA id="ADIntro" name="ADIntro" rows=4 cols=48 runat="server"></TEXTAREA> </td>
                                                        </tr>
                                                       </table>
                                                      
                                              </asp:Panel>

                                              <asp:Panel id="Panel2" runat="server" Width="100%">
                                                 <table id="table1" cellspacing=1 cellpadding=2 width="100%" border=0>
                                                     <tr>
                                                         <td colSpan=2 align="center"><strong>广告内容设置--动画</strong></td>
                                                     </tr>
                                                     <tr>
                                                         <td align=center>动画地址：</td>
                                                         <td style="WIDTH: 365px">
                                                              <input id="FlashUrl" maxLength=255 size=58 name="FlashUrl" runat="server" /> </td>
                                                    </tr>
                                                    <tr>
                                                        <%--<td align=center>动画上传：</td>
                                                        <td style="WIDTH: 365px">
                                                             <iframe id="Iframe1" name="file" src="Admin_attachment1.aspx" frameBorder="0" width="400px" scrolling=no height="40px"></iframe>
                                                        </td>--%>
                                                    </tr>
                                                    <tr>
                                                        <td align=center>动画尺寸：</td>
                                                        <td style="WIDTH: 365px">宽：<input id="FlashWidth" maxLength=5 size=6 value="120" name="FlashWidth" runat="server" />像素
                                                        <asp:RangeValidator id="RangeValidator3" runat="server" ErrorMessage="整数" ControlToValidate="FlashWidth" Type="Integer" MinimumValue="0" MaximumValue="1500" Display="Dynamic"/> &nbsp; &nbsp; 高：<input id="FlashHeight" maxLength=5 size=6 value="100" name="FlashHeight" runat="server" />像素
                                                        <asp:RangeValidator id="RangeValidator4" runat="server" ErrorMessage="整数" ControlToValidate="FlashHeight" Type="Integer" MinimumValue="0" MaximumValue="1500" Display="Dynamic"/> </td>
                                                    </tr>
                                                    <tr>
                                                        <td align="center">背景透明：</td>
                                                        <td style="WIDTH: 365px">
                                                            <asp:RadioButtonList id="FlasWmode" runat="server" Repeatdirection="Horizontal" RepeatLayout="Flow">
                                                                <asp:ListItem Value="0" Selected="true">透明</asp:ListItem>
                                                                <asp:ListItem Value="1">不透明</asp:ListItem>
                                                            </asp:RadioButtonList>
                                                        </td>
                                                    </tr>
                                                    </table>
                                               </asp:Panel>
                                               <asp:Panel id="Panel3" runat="server" Width="100%">
                                                   <table id="table2" border="0" cellpadding="1" cellspacing="1"
                                                          width="100%">
                                                        <tr align="left" class="tdbg2">
                                                            <td colspan="2" style="width: 448px">
                                                                <strong>广告内容设置--文本</strong></td>
                                                                
                                                        </tr>
                                                         <tr align="left" class="tdbg2">
                                                            <td colspan="2" style="width: 448px">
                                                               <textarea id="ADText" runat="server" cols="64" name="ADText" rows="15"></textarea>
                                                            </td>
                                                         </tr>      
                                                    </table>
                                                                
                                                </asp:Panel>
                                                <asp:Panel id="Panel4" runat="server" Width="100%">
                                                    <table id="ADContent_4"  border="0" cellpadding="2" cellspacing="1"
                                                          width="100%">
                                                        <tr align="left" class="tdbg2">
                                                            <td colspan="2">
                                                                <strong>广告内容设置--代码</strong></td>
                                                        </tr>
                                                        <tr class="tdbg">
                                                            <td align="left" colspan="2">
                                                                <textarea id="ADCode" runat="server" cols="64" name="ADCode" rows="15"></textarea>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </asp:Panel>
                                                <asp:Panel id="Panel5" runat="server" Width="100%">
                                                    <table id="ADContent_5"  border="0" cellpadding="2" cellspacing="1"
                                                          width="100%">
                                                        <tr align="left" class="tdbg2">
                                                            <td  align="left"  colspan="2">
                                                                <strong>广告内容设置--页面</strong></td>
                                                        </tr>
                                                        <tr class="tdbg">
                                                            <td  align="left"   width="80">
                                                                页面地址：</td>
                                                            <td>
                                                                <textarea id="WebFileUrl" runat="server" cols="48" name="WebFileUrl" rows="4"  ></textarea>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </asp:Panel>
                                           </td>
                                       </tr>
                                  </table>
                               </td>
                           </tr>
                           <tr>
                               <td  class="ltd"><strong>广告权重：</strong></td>
                               <td class="rtd">
                                   <input id="Priority" maxLength=3 size=4 value="1" name="Priority" runat="server" /> <FONT color=red>*此项为版位广告随机显示时的优先权，权重越大显示机会越大。若为 0 表示不显示</FONT>
                                   <asp:RequiredFieldValidator id="RequiredFieldValidator11" runat="server" ErrorMessage="不能空" ControlToValidate="Priority" Display="Dynamic"/><asp:RangeValidator id="RangeValidator7" runat="server" ErrorMessage="整数" ControlToValidate="Priority" Type="Integer" MinimumValue="0" MaximumValue="999999999"/> </td></tr>
                           <tr>
                               <td  class="ltd"><strong>广告统计：</strong></td>
                               <td class="rtd">
                                   <asp:CheckBox id="CountView" runat="server" Text="统计浏览数" Checked="true"/>浏览数：<input id="Views" title="0" maxLength=6 size=5 value="0" name="Views" runat="server" /> &nbsp; &nbsp;
                                   <asp:RequiredFieldValidator id="RequiredFieldValidator12" runat="server" ErrorMessage="不能空" ControlToValidate="Views"/> &nbsp; 
                                   <asp:RangeValidator id="RangeValidator1" runat="server" ErrorMessage="整数" ControlToValidate="Views" Type="Integer" MinimumValue="0" MaximumValue="999999999"/> &nbsp;&nbsp;
                                   <asp:CheckBox id="CountClick" runat="server" Text="统计点击数"/>&nbsp; 统计点击数 点击数：<asp:TextBox id="Clicks" runat="server" Width="50px">0</asp:TextBox> 
                                   <asp:RangeValidator id="RangeValidator2" runat="server" ErrorMessage="整数" ControlToValidate="Clicks" Type="Integer" MinimumValue="0" MaximumValue="999999999" Display="Dynamic"/>
                                   <asp:RequiredFieldValidator id="RequiredFieldValidator13" runat="server" ErrorMessage="不能空" ControlToValidate="Clicks" Display="Dynamic"/>
                               </td>
                          </tr>
                           <tr>
                               <td  class="ltd"><strong>结束时间：</strong></td>
                               <td class="rtd">
                                   <asp:TextBox id="TxtEndTime" runat="server"/>
                                   <asp:RequiredFieldValidator id="RequiredFieldValidator2" runat="server" ErrorMessage="不能空" ControlToValidate="TxtEndTime" Display="Dynamic"/>
                                   <asp:RegularExpressionValidator id="RegularExpressionValidator3" runat="server" ErrorMessage="2001-01-01" ControlToValidate="TxtEndTime" ValidationExpression="\d{4}-(\d){1,2}-(\d){1,2}"/></td></tr>
                           <tr>
                               <td  class="ltd"><strong>审核状态：</strong> </td>
                               <td class="rtd"><asp:CheckBox id="Passed" runat="server" Text="通过审核 " Checked="true"/>不通过审核则不会生成JS文件</td>
                           </tr>
                  </table>
                     </ContentTemplate>
                </asp:UpdatePanel>

            </td>
        </tr>
	<tr>
            <td class="btm" colspan="2">
		<asp:Button ID="ButAdd" runat="server" OnClick="ButAdd_Click" Text="添加" />&nbsp; &nbsp;              
        	<asp:Button ID="ButUpdate" runat="server" OnClick="ButUpdate_Click" Text="更改" />&nbsp;&nbsp; &nbsp;
        	<input type="button" value="返回"  onclick="window.location.href='Admin_ManageAd.aspx'" />
            </td>
        </tr>
        </table>
	<table class="adminlist"></table>

   <asp:HiddenField ID="H_ZoneIDArray" runat="server" />
   <asp:HiddenField ID="H_ADID" runat="server" />
   <asp:HiddenField ID="H_ADName" runat="server" />

</asp:Content>

