<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Ad_Add.aspx.cs" Inherits="TotCms.Web.Admin.Ad_Add" %>

<%@ Register src="UI/main_top.ascx" tagname="main_top" tagprefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>添加广告</title>
    <link href="style/global.css" rel="stylesheet" type="text/css" />
    <link href="js/calendar.css" rel="stylesheet" type="text/css" />
    <script src="js/common.js" type="text/javascript"></script>
    <script src="js/calendar.js" type="text/javascript"></script>
    <script type="text/javascript">
    function getadtype(i){
      for(var t=1;t<=3;t++){
        $('adtype'+t).style.display='none';
      }
      $('adtype'+i).style.display='block';
    }
    </script>
    <style type="text/css">
      .style1
      {
        width: 100%;
      }
    </style>
</head>
<body onload="getadtype(1)">
    <form id="form1" runat="server">
    <div>
    
      <uc1:main_top ID="main_top1" runat="server" />
    
    </div>
    
    <table style="width:100%;" border="0" cellpadding="0" cellspacing="1" 
      class="black_border">
      <tr class="suphead">
        <td colspan="2">
                                                                                添加广告</td>
    </tr>
    <tr>
      <td class="fields_text">
        选择栏目：</td>
      <td class="fields_input">
       <asp:DropDownList ID="CategoryId" runat="server">
        </asp:DropDownList>
        </td>
    </tr>
    <tr>
      <td class="fields_text">
        广告名称：</td>
      <td class="fields_input">
        <asp:TextBox ID="Title" runat="server" CssClass="input_middle"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
          ControlToValidate="Title" ErrorMessage="请填写广告名称"></asp:RequiredFieldValidator>
          </td>
    </tr>
    <tr>
      <td class="fields_text">
        广告类型：</td>
      <td class="fields_input">
        <asp:RadioButtonList ID="AdType" runat="server" 
          onselectedindexchanged="RadioButtonList1_SelectedIndexChanged" 
          RepeatDirection="Horizontal" RepeatLayout="Flow">
          <asp:ListItem Value="1" Selected="True">文本</asp:ListItem>
          <asp:ListItem Value="2">图片</asp:ListItem>
          <asp:ListItem Value="3">Flash</asp:ListItem>
        </asp:RadioButtonList>
          </td>
    </tr>
    <tr>
      <td class="fields_text">
          广告效果：</td>
      <td class="fields_input">
          <asp:RadioButtonList ID="EffectId" runat="server" RepeatDirection="Horizontal" 
              RepeatLayout="Flow">
              <asp:ListItem Selected="True" Value="0">无特效</asp:ListItem>
              <asp:ListItem Value="1">对联广告</asp:ListItem>
              <asp:ListItem Value="2">漂浮广告</asp:ListItem>
              <asp:ListItem Value="3">右下角弹出广告</asp:ListItem>
          </asp:RadioButtonList>
          </td>
    </tr>
    <tr>
      <td class="fields_text">
        广告过期：</td>
      <td class="fields_input">      
              
        <asp:TextBox ID="ExpiresTime" runat="server"></asp:TextBox>
        <input name="button" type="button" onclick="displayCalendar(document.forms[0].ExpiresTime,'yyyy-mm-dd',this)" value="..." />
          </td>
    </tr>
    <tr>
      <td class="fields_text">
        广告内容：</td>
      <td class="fields_input">      
        <div id="adtype1" style="display:none;">     
        <asp:TextBox ID="Content" runat="server" CssClass="text_content" 
            TextMode="MultiLine"></asp:TextBox></div> 
        <div id="adtype2" style="display:none;"><table align="center" cellpadding="0" cellspacing="0" class="style1">
          <tr>
            <td>
              图片地址：</td>
            <td>
              <asp:TextBox ID="ImgSrc" runat="server"></asp:TextBox>
              <input name="UpLoad" type="button" id="UpLoad" value="上传" onclick="popupWindow('Upload.aspx?rid=ImgSrc','UpLoad',420,130,1)" />
                  </td>
          </tr>
          <tr>
            <td>
              图片尺寸：</td>
            <td>
              宽度：<asp:TextBox ID="ImgW" runat="server" CssClass="input_mini"></asp:TextBox>
&nbsp;px 高度：<asp:TextBox ID="ImgH" runat="server" CssClass="input_mini"></asp:TextBox>
              px</td>
          </tr>
          
        </table>
        </div>
        <div id="adtype3" style="display:none;"><table align="center" cellpadding="0" cellspacing="0" class="style1">
          <tr>
            <td>
              Flash地址：</td>
            <td>
              <asp:TextBox ID="FlashSrc" runat="server"></asp:TextBox>
              <input name="UpLoad" type="button" id="Button3" value="上传" onclick="popupWindow('Upload.aspx?rid=FlashSrc','UpLoad',420,130,1)" />
                  </td>
          </tr>
          <tr>
            <td>
              Flash尺寸：</td>
            <td>
              宽度：<asp:TextBox ID="FlashW" runat="server" CssClass="input_mini"></asp:TextBox>
&nbsp;px 高度：<asp:TextBox ID="FlashH" runat="server" CssClass="input_mini"></asp:TextBox>
              px</td>
          </tr>
        </table></div>
      </td>
    </tr>
    <tr>
            <td>
              链接地址：</td>
            <td>
              <asp:TextBox ID="LinkUrl" runat="server" CssClass="input_middle">http://</asp:TextBox>
                  </td>
          </tr>
    <tr>
      <td colspan="2" align="center">
        <asp:Button ID="Button1" runat="server" Text="添加广告" onclick="Button1_Click" />
        <input id="Button2" type="reset" value="取 消" /></td>
    </tr>
  </table>
    </form>
</body>
</html>
