<%@ page language="C#" masterpagefile="~/HL_Admin/AdminIndexMaster.master" autoeventwireup="true" inherits="Passport_AdZone, HoWaveIMSV5.0" title="增加修改广告模板" debug="true" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <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>增加修改广告模板</legend>

    
    <table align="center" border="0" cellpadding="2" cellspacing="1" class="border" width="100%">
        <tr class="tdbg">
            <td width="200">
                <strong>所属频道分类：</strong><br />
                此分类只用于区分版位所在的位置。</td>
            <td width="600">
                &nbsp;<asp:DropDownList ID="ChannelID" runat="server" DataSourceID="ObjectDataSource1"
                    DataTextField="channelname" DataValueField="channelid" Width="112px"/>
                <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetChannels"
                    TypeName="ChannelBLL"/>
            </td>
        </tr>     
        <tr class="tdbg">
            <td width="200">
                <strong>版位名称：</strong></td>
            <td width="600">
                <input id="ZoneName" runat="server" maxlength="60" name="ZoneName" size="60" />
                <asp:RequiredFieldValidator ID="RequiredFieldValidator13" runat="server" ControlToValidate="ZoneJSName"  ErrorMessage="不能空"/></td>
        </tr>
        <tr class="tdbg">
            <td width="200" style="height: 19px">
                <strong>生成JS文件名：</strong></td>
            <td width="600" style="height: 19px">
                <input id="ZoneJSName" runat="server" maxlength="100" name="ZoneJSName" size="60" />
                <asp:RequiredFieldValidator ID="RequiredFieldValidator14" runat="server" ControlToValidate="ZoneJSName"  ErrorMessage="不能空"/>
                <asp:Label ID="Label1" runat="server" ForeColor="Red" /></td>
        </tr>
        <tr class="tdbg">
            <td width="200" style="height: 54px">
                <strong>版位描述：</strong></td>
            <td width="600" style="height: 54px">
                <textarea id="ZoneIntro" runat="server" cols="50" name="ZoneIntro" rows="3"/>
            </td>
        </tr>
        <tr class="tdbg">
            <td width="200">
                <strong>版位类型：</strong><br />
                选择放置于此版位的广告类型。</td>
            <td width="600">
                <asp:RadioButtonList ID="ZoneType" runat="server"  RepeatDirection="Horizontal" >
                    <asp:ListItem Selected="True" Value="1">矩形横幅</asp:ListItem>
                    <asp:ListItem Value="6">文字代码</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 class="tdbg">
            <td valign="top" >
                <strong>版位设置：</strong><br />
                对版位的详细参数进行设置。</td>
            <td valign="top" >                
                <table id="ZoneSetting" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td>
                            <div id="ZoneType0_Setting" style="display:none;">
                                <table bgcolor="#ffffff" border="0" cellpadding="2" cellspacing="1" width="100%">
                                    <tr align="middle" class="tdbg2">
                                        <td colspan="2" style="height: 17px">
                                            版位参数设置--<strong style="color:Red">矩形横幅</strong></td>
                                    </tr>
                                    <tr class="tdbg">
                                        <td align="middle" colspan="2" style="height: 17px">
                                            此类型无版位参数设置！</td>
                                    </tr>
                                </table>
                            </div>
                             <div id="ZoneType1_Setting" style="display:none;">
                                <table bgcolor="#ffffff" border="0" cellpadding="2" cellspacing="1" width="100%" >
                                    <tr align="middle" class="tdbg2">
                                        <td colspan="2">
                                            版位参数设置--<strong style="color:Red">文字代码</strong></td>
                                    </tr>
                                    <tr class="tdbg">
                                        <td align="middle" colspan="2">
                                            此类型无版位参数设置！</td>
                                    </tr>
                                </table>
                            </div>
                            <div id="ZoneType2_Setting" style="display:none;">                               
                                <table bgcolor="#ffffff" border="0" cellpadding="2" cellspacing="1" width="100%" >
                                    <tr align="middle" class="tdbg2">
                                        <td colspan="2">
                                            版位参数设置--<strong style="color:Red">弹出窗口</strong></td>
                                    </tr>
                                    <tr class="tdbg">
                                        <td width="200" style="height: 24px">
                                            <strong>弹出方式：</strong></td>
                                        <td style="height: 24px">
                                            &nbsp;<asp:DropDownList ID="Pop_PopType" runat="server" Width="127px">
                                                <asp:ListItem Value="1">前置</asp:ListItem>
                                                <asp:ListItem Value="2">后置</asp:ListItem>
                                                <asp:ListItem Value="3">网页对话筐</asp:ListItem>
                                                <asp:ListItem Value="4">背投广告</asp:ListItem>
                                            </asp:DropDownList></td>
                                    </tr>
                                    <tr class="tdbg">
                                        <td width="200" style="height: 26px">
                                            <strong>弹出位置（左）：</strong></td>
                                        <td style="height: 26px">
                                            <input id="Pop_Left" maxlength="4" name="Pop_Left" size="5" value="100" runat="server" />
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server" ControlToValidate="Pop_Left"
                                                ErrorMessage="不能空"></asp:RequiredFieldValidator><asp:RangeValidator ID="RangeValidator12"
                                                    runat="server" ControlToValidate="Float_Left" ErrorMessage="整数" MaximumValue="1500"
                                                    MinimumValue="0" Type="Integer"></asp:RangeValidator></td>
                                    </tr>
                                    <tr class="tdbg">
                                        <td width="200" style="height: 26px">
                                            <strong>弹出位置（上）：</strong></td>
                                        <td style="height: 26px">
                                            <input id="Pop_Top" maxlength="4" name="Pop_Top" size="5" value="100" runat="server" />
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator11" runat="server" ControlToValidate="Pop_Top"
                                                ErrorMessage="不能空"></asp:RequiredFieldValidator>
                                            <asp:RangeValidator ID="RangeValidator11" runat="server" ControlToValidate="Pop_Top"
                                                ErrorMessage="整数" MaximumValue="1500" MinimumValue="0" Type="Integer"></asp:RangeValidator></td>
                                    </tr>
                                    <tr class="tdbg">
                                        <td width="200" style="height: 30px">
                                            <strong>时间间隔：</strong><br />
                                            在时间间隔内不重复弹出。</td>
                                        <td style="height: 30px">
                                            <input id="Pop_CookieHour" maxlength="2" name="Pop_CookieHour" size="5" value="0" runat="server" />
                                            小时 <font color="blue">设为0时总是弹出</font>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" ControlToValidate="Pop_CookieHour"
                                                ErrorMessage="不能空"></asp:RequiredFieldValidator><asp:RangeValidator ID="RangeValidator10"
                                                    runat="server" ControlToValidate="Pop_CookieHour" ErrorMessage="整数" MaximumValue="24"
                                                    MinimumValue="0" Type="Integer"></asp:RangeValidator></td>
                                    </tr>
                                </table>
                           </div>
                           <div id="ZoneType3_Setting" style="display:none;">
                                <table bgcolor="#ffffff" border="0" cellpadding="2" cellspacing="1" width="100%" >
                                    <tr align="middle" class="tdbg2">
                                        <td colspan="2">
                                            版位参数设置--<strong style="color:Red">随屏移动</strong></td>
                                    </tr>
                                    <tr class="tdbg">
                                        <td width="200">
                                            <strong>广告位置（左）：</strong></td>
                                        <td>
                                            <input id="Move_Left" maxlength="4" name="Move_Left" size="5" value="15" runat="server" />距离浏览器左侧
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" ControlToValidate="Move_Left"
                                                ErrorMessage="不能空"/><asp:RangeValidator ID="RangeValidator9"
                                                    runat="server" ControlToValidate="Move_Left" ErrorMessage="整数" MaximumValue="1500"
                                                    MinimumValue="0" Type="Integer"/>
                                        </td>
                                    </tr>
                                    <tr class="tdbg">
                                        <td width="200">
                                            <strong>广告位置（上）：</strong></td>
                                        <td>
                                            <input id="Move_Top" maxlength="4" name="Move_Top" size="5" value="200" runat="server" />距离浏览器顶部
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="Move_Top"
                                                ErrorMessage="不能空"></asp:RequiredFieldValidator><asp:RangeValidator ID="RangeValidator8"
                                                    runat="server" ControlToValidate="Move_Top" ErrorMessage="整数" MaximumValue="1500"
                                                    MinimumValue="0" Type="Integer"></asp:RangeValidator></td>
                                    </tr>
                                    <tr class="tdbg">
                                        <td width="200">
                                            <strong>移动平滑度：</strong></td>
                                        <td>
                                            <input id="Move_Delta" maxlength="7" name="Move_Delta" size="7" value="0.015" runat="server" />
                                            （取值在0.001至1之间）
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="Move_Delta"
                                                ErrorMessage="不能空"></asp:RequiredFieldValidator><asp:RangeValidator ID="RangeValidator7"
                                                    runat="server" ControlToValidate="Move_Delta" ErrorMessage="0.0011~1" MaximumValue="1"
                                                    MinimumValue="0.001" Type="Double"></asp:RangeValidator></td>
                                    </tr>
                                </table>
                            </div>
                            <div id="ZoneType4_Setting" style="display:none;">
                                <table bgcolor="#ffffff" border="0" cellpadding="2" cellspacing="1" width="100%" >
                                    <tr align="middle" class="tdbg2">
                                        <td colspan="2"  >
                                            版位参数设置--<strong style="color:Red">固定位置</strong></td>
                                    </tr>
                                    <tr class="tdbg">
                                        <td width="200">
                                            <strong>广告位置（左）：</strong></td>
                                        <td>
                                            <input id="Fixed_Left" maxlength="4" name="Fixed_Left" size="5" value="100" runat="server" />距离浏览器左侧
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="Fixed_Left"
                                                ErrorMessage="不能空"></asp:RequiredFieldValidator><asp:RangeValidator ID="RangeValidator6"
                                                    runat="server" ControlToValidate="Fixed_Left" ErrorMessage="整数" MaximumValue="1500"
                                                    MinimumValue="0" Type="Integer"></asp:RangeValidator></td>
                                    </tr>
                                    <tr class="tdbg">
                                        <td width="200">
                                            <strong>广告位置（上）：</strong></td>
                                        <td>
                                            <input id="Fixed_Top" maxlength="4" name="Fixed_Top" size="5" value="100" runat="server" />距离浏览器顶部
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="Fixed_Top"
                                                ErrorMessage="不能空"></asp:RequiredFieldValidator><asp:RangeValidator ID="RangeValidator5"
                                                    runat="server" ControlToValidate="Fixed_Top" ErrorMessage="整数" MaximumValue="1500"
                                                    MinimumValue="0" Type="Integer"></asp:RangeValidator></td>
                                    </tr>
                                </table>
                            </div>
                            <div id="ZoneType5_Setting" style="display:none;">
                                <table bgcolor="#ffffff" border="0" cellpadding="2" cellspacing="1" width="100%" >
                                    <tr align="middle" class="tdbg2">
                                        <td colspan="2" style="height: 17px">
                                            版位参数设置--<strong style="color:Red">漂浮移动</strong></td>
                                    </tr>
                                    <tr class="tdbg">
                                        <td width="200" style="height: 24px">
                                            <strong>漂浮类型：</strong></td>
                                        <td style="height: 24px">
                                            &nbsp;<asp:DropDownList ID="Float_Type" runat="server">
                                                <asp:ListItem Value="1">变速</asp:ListItem>
                                                <asp:ListItem Value="2">匀速</asp:ListItem>
                                                <asp:ListItem Value="3">上下漂浮</asp:ListItem>
                                                <asp:ListItem Value="4">左右漂浮</asp:ListItem>
                                            </asp:DropDownList></td>
                                    </tr>
                                    <tr class="tdbg">
                                        <td width="200" style="height: 26px">
                                            <strong>开始位置（左）：</strong></td>
                                        <td style="height: 26px">
                                            <input id="Float_Left" maxlength="4" name="Float_Left" size="5" value="100" runat="server" />距离浏览器左侧(1~1500)像素
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="Float_Left"  ErrorMessage="不能空"/>
                                            <asp:RangeValidator ID="RangeValidator3" runat="server" ControlToValidate="Float_Left" ErrorMessage="整数" MaximumValue="1500"
                                                    MinimumValue="0" Type="Integer"/></td>
                                    </tr>
                                    <tr class="tdbg">
                                        <td width="200">
                                            <strong>开始位置（上）：</strong></td>
                                        <td>
                                            <input id="Float_Top" maxlength="4" name="Float_Top" size="5" value="100" runat="server" />距离浏览器顶部(1~1500)像素
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="Float_Top"  ErrorMessage="不能空"/>
                                            <asp:RangeValidator ID="RangeValidator2" runat="server" ControlToValidate="Float_Top" ErrorMessage="整数" MaximumValue="1500"
                                                    MinimumValue="0" Type="Integer"/></td>
                                    </tr>
                                </table>
                            </div>
                           
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr class="tdbg">
            <td width="200" style="height: 71px">
                <strong>版位尺寸：</strong><br />
                IAB：互联网广告联合会标准尺寸。<br />
                带*号的为新增加的标准广告尺寸。</td>
            <td width="600" style="height: 71px">
               <div>
                    &nbsp;宽度:
                    <input maxlength="4" name="ZoneWidth" onkeydown="Zone_EditSize()" size="5" value="468" id="ZoneWidth" runat="server" />像素px(1~1500)
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="ZoneWidth"
                        ErrorMessage="不能空"></asp:RequiredFieldValidator><asp:RangeValidator ID="RangeValidator4"
                            runat="server" ControlToValidate="ZoneWidth" ErrorMessage="整数" MaximumValue="1500"
                            MinimumValue="0" Type="Integer"></asp:RangeValidator>
                    &nbsp;&nbsp; 高度:
                    <input maxlength="4" name="ZoneHeight" onkeydown="Zone_EditSize()" size="5" value="60" id="ZoneHeight" runat="server" />像素px(1~1500)
                    <asp:RequiredFieldValidator  ID="RequiredFieldValidator1" runat="server" ControlToValidate="ZoneHeight" ErrorMessage="不能空"/>
                    <asp:RangeValidator ID="RangeValidator1" runat="server" ControlToValidate="ZoneHeight" ErrorMessage="整数"
                            MaximumValue="1500" MinimumValue="0" Type="Integer"/>
               </div>
            </td>
        </tr>
        <tr class="tdbg">
            <td width="200">
                <strong>显示方式：</strong><br />
                当版位中有多个广告时按照此设定进行显示（依据广告的权重）。</td>
            <td width="600">
                &nbsp;<asp:RadioButtonList ID="ShowType" runat="server">
                    <asp:ListItem Value="1" Selected="True">按权重随机显示  权重越大显示机会越大</asp:ListItem>
                    <asp:ListItem Value="2">按权重优先显示  显示权重值最大的广告</asp:ListItem>
                    <asp:ListItem Value="3">按顺序循环显示  此方式仅对矩形横幅有效</asp:ListItem>
                </asp:RadioButtonList></td>
        </tr>
        <tr class="tdbg">
            <td width="200">
                <strong>版位状态：</strong><br />
                设为活动的版位才能在前台显示。</td>
            <td width="600">
                &nbsp;
                <asp:CheckBox ID="Active" runat="server" Text="活动版位" /></td>
        </tr>      
    </table>
     <div style="text-align:center;">
        <input name="Submit" type="submit" value=" 添 加 " id="Submit1" runat="server" onserverclick="Submit1_ServerClick" style="width: 100px" />
                &nbsp;&nbsp;
        <input name="Submit" type="submit" value="更改" id="Submit2" runat="server" onserverclick="Submit2_ServerClick" style="width: 100px" />
                &nbsp;&nbsp; &nbsp;
        <asp:Button ID="Cancel" runat="server" OnClick="Button1_Click" Text=" 取 消 " Width="100px" />
     </div> 
    </fieldset>
    <script type="text/javascript" language="javascript">
     function SelectZone(ctlname){
        for(var i=0;i<6;i++){
          if((document.getElementById(ctlname+"_"+i)).checked){
             document.getElementById("ZoneType"+i+"_Setting").style.display="";
          }
          else{
           document.getElementById("ZoneType"+i+"_Setting").style.display="none";
          }
        }     
     }
    </script>  
</asp:Content>

