<%@ page language="C#" validaterequest="false" enableeventvalidation="false" masterpagefile="~/HL_Admin/AdminIndexMaster.master" autoeventwireup="true" inherits="Passport_updateAd, HoWaveIMSV5.0" title="增加修改广告" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
 <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"></asp:ScriptManager>
<script src="Js/getdate.js" type="text/javascript"></script> 
   <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>
<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>
      
      <div>

    <table  align="center" border="0" cellpadding="0" cellspacing="0" class="border" width="100%">
        
        <tr align="left">
            <td class="tdbg" style="width: 62px;" valign="top">
               <br />
               <b>所属版位</b>
                <asp:ListBox ID="ZoneID" runat="server"   Width="99px"  Height="401px"  SelectionMode="Multiple"></asp:ListBox>
            </td>
            <td valign="top"  >
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>
                <table border="0" cellpadding="2" cellspacing="1"  width="100%">
                    <tr class="tdbg">
                        <td align="left" width="20%" >
                            <strong>广告名称：</strong></td>
                        <td  >
                            <input id="ADName" runat="server" maxlength="255" name="ADName" size="58" />
                            <font color="red">*</font>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="ADName"
                                ErrorMessage="不能空"></asp:RequiredFieldValidator></td>
                    </tr>
                    <tr class="tdbg" style="font-weight: bold; color: #333333">
                           <td align="left" width="20%" >
                            广告类型：</td>
                        <td  >
                            <asp:RadioButtonList ID="ADType" runat="server" AutoPostBack="True" RepeatDirection="Horizontal" OnSelectedIndexChanged="RadLType_SelectedIndexChanged">
                                <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 class="tdbg">
                          <td align="left" width="20%" >
                            <strong>广告内容：</strong></td>
                        <td   valign="top" width="100%">
                            <table id="ADContent_2"  border="0" cellpadding="2" cellspacing="1"
                                  width="100%">
                                <tr align="left" class="tdbg2">
                                    <td colspan="2"  align="left"    >
                                        <asp:Panel ID="Panel1" runat="server" Width="100%" >
                            <table  align="left"  id="ADContent_1" border="0" cellpadding="2" cellspacing="1"
                                width="100%">
                                <tr align="left" class="tdbg2">
                                    <td colspan="2" style="height: 17px"  >
                                        广告内<span style="color: #ff0000">容</span><span style="background-color: #f0f0f0">设置--图片</span></td>
                                </tr>
                                <tr class="tdbg" style="background-color: #f0f0f0">
                                    <td align="left" style="width: 90px"  >
                                        图片地址：</td>
                                    <td align="left" style="width: 364px"   > 
                                        <input runat="server" id="ImgUrl"  maxlength="255" name="ImgUrl" size="58" /><span
                                                    style="color: #333333; background-color: #f0f0f0;">*</span> 
                                    </td>
                                </tr>
                                <tr class="tdbg">
                                    <td align="left" style="width: 90px" >
                                        图片上传：</td>
                                    <td align="left"  >
                                         <iframe id="file" name="file" src="Admin_attachment.aspx"  width="600px" frameborder="0" height="130px" scrolling="no"></iframe>

                                    </td>
                                </tr>
                                <tr class="tdbg">
                                    <td align="left" style="width: 90px"  >
                                        图片尺寸：</td>
                                    <td style="width: 364px"  >
                                        宽：<input id="ImgWidth" runat="server" maxlength="5" name="ImgWidth" size="6" value="100" />像素<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="ImgWidth"
                                            ErrorMessage="不能空"></asp:RequiredFieldValidator>
                                        <asp:RangeValidator ID="RangeValidator5" runat="server" ControlToValidate="ImgWidth"
                                            ErrorMessage="整数" MaximumValue="1500" MinimumValue="0" Type="Integer"></asp:RangeValidator> &nbsp; 高：<input id="ImgHeight" runat="server" maxlength="5" name="ImgHeight"
                                            size="6" value="100" />像素<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="ImgHeight"
                                            ErrorMessage="不能空"></asp:RequiredFieldValidator>
                                        <asp:RangeValidator ID="RangeValidator6" runat="server" ControlToValidate="ImgHeight"
                                            ErrorMessage="整数" MaximumValue="1500" MinimumValue="0" Type="Integer"></asp:RangeValidator></td>
                                </tr>
                                <tr class="tdbg">
                                    <td align="left" style="width: 90px" >
                                        链接地址：</td>
                                    <td style="width: 364px">
                                        <input id="LinkUrl" runat="server" maxlength="255" name="LinkUrl" size="58" value="http://" />
                                    </td>
                                </tr>
                                <tr class="tdbg">
                                    <td align="left" style="width: 90px"  >
                                        链接提示：</td>
                                    <td style="  width: 364px;">
                                        <input id="LinkAlt" runat="server" maxlength="255" name="LinkAlt" size="58" />
                                    </td>
                                </tr>
                                <tr class="tdbg">
                                    <td align="left" style="width: 90px" >
                                        链接目标：</td>
                                    <td style="width: 364px">
                                        <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="left" style="width: 90px"   >
                                        广告简介：</td>
                                    <td style="  width: 364px;">
                                        <textarea id="ADIntro" runat="server" cols="48" name="ADIntro" rows="4"></textarea>
                                    </td>
                                </tr>
                            </table>
                                        </asp:Panel>
                                        &nbsp;
                                        <asp:Panel ID="Panel2" runat="server" Width="100%" ><table id="Table1"  border="0" cellpadding="2" cellspacing="1"
                                  width="100%">
                                            <tr>
                                    <td colspan="2">
                                        <strong>广告内容设置--动画</strong></td>
                                            </tr>
                                            <tr>
                                    <td align="left" style="width: 90px"   >
                                        动画地址：</td>
                                    <td style=" width: 365px;">
                                        <input id="FlashUrl" runat="server" maxlength="255" name="FlashUrl" size="58" />
                                        </td>
                                            </tr>
                                            <tr>
                                    <td align="left" style="width: 90px"  >
                                        动画上传：</td>
                                    <td style="width: 365px; "><iframe id="Iframe1" name="file" src="Admin_attachment1.aspx" width="400px" frameborder="0" height="40px" scrolling="no">
                                    </iframe>
                                    </td>
                                            </tr>
                                            <tr>
                                    <td align="left" style="width: 90px" >
                                        动画尺寸：</td>
                                    <td style="width: 365px;  ">
                                        宽：<input id="FlashWidth" runat="server" maxlength="5" name="FlashWidth" size="6" value="120" />
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="FlashWidth"
                                            ErrorMessage="不能空"></asp:RequiredFieldValidator>
                                        <asp:RangeValidator ID="RangeValidator3" runat="server" ControlToValidate="FlashWidth"
                                            ErrorMessage="整数" MaximumValue="1500" MinimumValue="0" Type="Integer"></asp:RangeValidator>像素 &nbsp; &nbsp; 高：<input id="FlashHeight" runat="server" maxlength="5" name="FlashHeight"
                                            size="6" value="100" />
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="FlashWidth"
                                            ErrorMessage="不能空"></asp:RequiredFieldValidator>
                                        <asp:RangeValidator ID="RangeValidator4" runat="server" ControlToValidate="FlashHeight"
                                            ErrorMessage="整数" MaximumValue="1500" MinimumValue="0" Type="Integer"></asp:RangeValidator>像素
                                    </td>
                                            </tr>
                                            <tr>
                                    <td align="left" style="width: 90px" >
                                        背景透明：</td>
                                    <td style="width: 365px">
                                        &nbsp;<asp:RadioButtonList ID="FlasWmode" runat="server" RepeatDirection="Horizontal">
                                            <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="2" cellspacing="1"
                                  width="100%">
                                <tr align="left" class="tdbg2">
                                    <td colspan="2" style="width: 448px">
                                        <strong>广告内容设置--文本</strong></td>
                                </tr>
                            </table>
                                        <textarea id="ADText" runat="server" cols="64" name="ADText" rows="15"></textarea></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>
                                        &nbsp;
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr class="tdbg">
                        <td align="left" width="20%" >
                            <strong>广告权重：</strong></td>
                        <td  align="left"   >
                            <input id="Priority" runat="server" maxlength="3" name="Priority" size="4" value="0" />
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator11" runat="server" ControlToValidate="Priority"
                                ErrorMessage="不能空"></asp:RequiredFieldValidator><font color="red">*<asp:RangeValidator
                                    ID="RangeValidator7" runat="server" ControlToValidate="Priority" ErrorMessage="整数"
                                    MaximumValue="999999999" MinimumValue="0" Type="Integer"></asp:RangeValidator></font> 此项为版位广告随机显示时的优先权，权重越大显示机会越大。
                        </td>
                    </tr>
                    <tr class="tdbg">
                          <td align="left" width="20%" >
                            <strong>广告统计：</strong></td>
                        <td  align="left"   >
                            &nbsp;<asp:CheckBox ID="CountView" runat="server" Text="统计浏览数" Checked="True" />
                            浏览数：<input id="Views" runat="server" maxlength="6" name="Views" size="5" title="0" value="0" />
                            &nbsp; &nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server"
                                ControlToValidate="Views" ErrorMessage="不能空"></asp:RequiredFieldValidator>
                            &nbsp;
                            <asp:RangeValidator ID="RangeValidator1" runat="server" ControlToValidate="Views"
                                ErrorMessage="整数" MaximumValue="999999999" MinimumValue="0" Type="Integer"></asp:RangeValidator>
                            &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" ControlToValidate="Clicks"
                                ErrorMessage="整数" MaximumValue="999999999" MinimumValue="0" Type="Integer"></asp:RangeValidator>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator13" runat="server" ControlToValidate="Clicks"
                                ErrorMessage="不能空"></asp:RequiredFieldValidator></td>
                    </tr>
                    <tr class="tdbg">
                             <td align="left" width="20%" >
                            <strong>结束时间：</strong></td>
                        <td align="left"   >
                                    <asp:TextBox ID="TxtEndTime" runat="server"></asp:TextBox><asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TxtEndTime"
                                ErrorMessage="不能空"></asp:RequiredFieldValidator><asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ErrorMessage="2001-01-01"
          ControlToValidate="TxtEndTime" ValidationExpression="\d{4}-(\d){1,2}-(\d){1,2}"/></td>
                    </tr>
                    <tr class="tdbg">
                        <td align="left" width="20%" style="height: 30px" >
                            审核状态： </td>
                        <td align="left" style="height: 30px" >
                            <asp:CheckBox ID="Passed" runat="server" Text="通过审核 " Checked="True" />不通过审核则不会生成JS文件</td>
                    </tr>
                </table>
                    </ContentTemplate>
                </asp:UpdatePanel>
                <br />
                <br />
            </td>
        </tr>
    </table>
    </div>
    <div style="text-align:center">    
        <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;
        <asp:Button ID="ButBack" runat="server" OnClick="ButBack_Click" Text="返回" CausesValidation="False" />
   </div>
       
  </fieldset>  
</asp:Content>

