<%@ page language="C#" autoeventwireup="true" inherits="Admin_Ad_Operate, ShopNum1Deploy" %>

<%@ Register src="UserControl/MessageShow.ascx" tagname="MessageShow" tagprefix="uc1" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="ShopNum1" %>
<!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 id="Head1" runat="server">
    <title>Untitled Page</title>
     <link type="text/css" rel="Stylesheet" href="css/index.css" /> 
        <script type="text/javascript">
    //选择单图
   function openSingleChild()
    { 
        var k = window.showModalDialog("Image_List_Select.aspx",window,"dialogWidth:820px;status:no;dialogHeight:650px"); 
        if(k != null) 
        {
          var strLen=k.length;
          var lastIndex=k.lastIndexOf('/');
          document.getElementById("TextBoxOriginalImge").value = k.substring(lastIndex+1,strLen); 
         document.getElementById("ImageOriginalImge").src = k; 
        }
    } 
  
    </script>
</head>
<body style="padding:0; background-image: url(images/Bg_right.gif); background-repeat:repeat;">
    <form id="form1" runat="server">
       <div class="navigator">
           <asp:Label ID="LabelPageTitle" runat="server" Text="【 新增广告 】"></asp:Label>
       </div>
        <table cellpadding="0" cellspacing="0" border="0" style="width:100%">
      
            <tr>
                <td align="right" width="20%">
                    <asp:Label ID="LabelName" runat="server" Text="广告名称："></asp:Label>
                </td>
                <td align="left" >
                    <asp:TextBox ID="TextBoxName" runat="server" CssClass="input2"></asp:TextBox>
                            <asp:Label ID="Label1" runat="server" Text="*" ForeColor="red"></asp:Label>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidatorName" 
                            runat="server" ControlToValidate="TextBoxName" Display="Dynamic" 
                            ErrorMessage="该值不能为空"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td align="right" >
    
                    <asp:Label ID="LabelType" runat="server" Text="广告类型："></asp:Label>
                </td>
                <td align="left" >
                    <asp:DropDownList ID="DropDownListType" runat="server" AutoPostBack="True" 
                        onselectedindexchanged="DropDownListType_SelectedIndexChanged" CssClass="select2">
                        <asp:ListItem Value="0">图片</asp:ListItem>
                        <asp:ListItem Value="1">Flash</asp:ListItem>
                        <asp:ListItem Value="2">代码</asp:ListItem>
                        <asp:ListItem Value="3">文字</asp:ListItem>
                    </asp:DropDownList>
                            <asp:Label ID="Label2" runat="server" Text="*" ForeColor="red"></asp:Label>
                </td>
            </tr>
            <tr>
                <td align="right" >
    
                    <asp:Label ID="LabelAdPositionGuid" runat="server" Text="广告位置："></asp:Label>
                </td>
                <td align="left" >
                    <asp:DropDownList ID="DropDownListAdPositionGuid" runat="server" CssClass="select2">
                    </asp:DropDownList>
                            <asp:Label ID="Label3" runat="server" Text="*" ForeColor="red"></asp:Label>
                </td>
            </tr>
            <tr>
                <td align="right" >
    
                    <asp:Label ID="LabelStartTime" runat="server" Text="开始日期："></asp:Label>
                </td>
                <td align="left" >
                    <asp:TextBox ID="TextBoxStartTime" runat="server" CssClass="input2"></asp:TextBox>
                        <img id="imgCalendarStartTime" alt="" src="../images/Calendar.png" 
                                    style="width: 16px; height: 18px;" />
                                    <font color="red">
                                    <asp:Label ID="LabelStartTime1" runat="server" Text="*"></asp:Label>
                                    </font>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidatorStartTime" 
                            runat="server" ControlToValidate="TextBoxStartTime" Display="Dynamic" 
                            ErrorMessage="时间格式不正确" 
                            
                            ValidationExpression="^\d{4}-(\d{2}|\d{1})-(\d{2}|\d{1})( (\d{2}|\d{1}):(\d{2}|\d{1}):(\d{2}|\d{1}))*"></asp:RegularExpressionValidator>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidatorStartTime" 
                            runat="server" ControlToValidate="TextBoxStartTime" Display="Dynamic" 
                            ErrorMessage="该值不能为空"></asp:RequiredFieldValidator>
                            <ShopNum1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" 
                                        EnableScriptGlobalization="True" EnableScriptLocalization="True">
                            </ShopNum1:ToolkitScriptManager>
                            &nbsp;<ShopNum1:CalendarExtender 
                                      ID="CalendarExtender1" runat="server" TargetControlID="TextBoxStartTime" 
                                      PopupButtonID="imgCalendarStartTime" CssClass="ajax__calendar">
                            </ShopNum1:CalendarExtender></td>
            </tr>
            <tr>
                <td align="right" >
    
                    <asp:Label ID="LabelEndTime" runat="server" Text="结束日期："></asp:Label>
                </td>
                <td align="left" >
                    <asp:TextBox ID="TextBoxEndTime" runat="server" CssClass="input2"></asp:TextBox>
                        <img id="imgCalendarEndTime" alt="" src="../images/Calendar.png" 
                                    style="width: 16px; height: 18px;" />
                                    <font color="red">
                                    <asp:Label ID="LabelEndTime1" runat="server" Text="*"></asp:Label>
                                    </font>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidatorEndTime" 
                            runat="server" ControlToValidate="TextBoxEndTime" Display="Dynamic" 
                            ErrorMessage="时间格式不正确" 
                            
                            ValidationExpression="^\d{4}-(\d{2}|\d{1})-(\d{2}|\d{1})( (\d{2}|\d{1}):(\d{2}|\d{1}):(\d{2}|\d{1}))*"></asp:RegularExpressionValidator>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidatorEndTime" 
                            runat="server" ControlToValidate="TextBoxEndTime" Display="Dynamic" 
                            ErrorMessage="该值不能为空"></asp:RequiredFieldValidator>
                    <ShopNum1:CalendarExtender 
                                     ID="CalendarExtender2" runat="server" TargetControlID="TextBoxEndTime" 
                         PopupButtonID="imgCalendarEndTime" CssClass="ajax__calendar">
                        </ShopNum1:CalendarExtender>
                </td>
            </tr>
            <tr  style="display:<%=(Type03)?"":"none"%>">
                <td align="right" >
    
                    <asp:Label ID="LabelLink" runat="server" Text="广告链接："></asp:Label>
                </td>
                <td align="left" >
                    <asp:TextBox ID="TextBoxLink" runat="server" CssClass="input2"></asp:TextBox>
                </td>
            </tr>
            <tr style="display:<%=(Type0)?"":"none"%>">
                <td align="right" >
    
                    <asp:Label ID="LabelOriginalImge" runat="server" Text="广告图片："></asp:Label>
                </td>
                <td align="left" >
                    <asp:TextBox ID="TextBoxOriginalImge" runat="server" CssClass="input2"></asp:TextBox>
                    <input id="ButtonSelectSingleImage" type="button" value="选择图片" onclick= "openSingleChild()" />
                      <img id="ImageOriginalImge" alt="" src="~/images/noImage.gif"  
                        runat="server"/>
                      <font color="red">
                            <asp:Label ID="Label4" runat="server" Text="*"></asp:Label></font>
                    </td>
                    
            </tr>
            <tr style="display:<%=(Type0)?"":"none"%>">
                <td align="right" >
    
                    <asp:Label ID="LabelOriginalImgeUrl" runat="server" Text="广告图片地址："></asp:Label>
                </td>
                <td align="left" >
                    <asp:TextBox ID="TextBoxOriginalImgeUrl" runat="server" CssClass="input2"></asp:TextBox>
                                <font color="red">
                            <asp:Label ID="Label5" runat="server" Text="*"></asp:Label></font>
                </td>
            </tr>
            <tr  style="display:<%=(Type1)?"":"none"%>">
                <td align="right" >
    
                    <asp:Label ID="LabelFlash" runat="server" Text="上传Flash文件："></asp:Label>
                </td>
                <td align="left" >
                    <asp:FileUpload ID="FileUploadFlash" runat="server"  CssClass="input2"/>
                    <asp:Label ID="Label6" runat="server" 
                        Text="*" ForeColor="Red"></asp:Label>
                            </td>
            </tr>
            <tr  style="display:<%=(Type1)?"":"none"%>">
                <td align="right" >
    
                    <asp:Label ID="LabelFlashUrl" runat="server" Text="Flash文件地址："></asp:Label>
                </td>
                <td align="left" >
                    <asp:TextBox ID="TextBoxFlashUrl" runat="server" CssClass="input2"></asp:TextBox>
                           <font color="red">
                            <asp:Label ID="Label7" runat="server" Text="*"></asp:Label></font>
                </td>
            </tr>
            <tr style="display:<%=(Type2)?"":"none"%>">
                <td align="right" >
    
                    <asp:Label ID="LabelCode" runat="server" Text="输入广告代码："></asp:Label>
                </td>
                <td align="left" >
                    <asp:TextBox ID="TextBoxCode" runat="server" 
                        TextMode="MultiLine" width="440px" Height="246px"></asp:TextBox>
                </td>
            </tr>
            <tr style="display:<%=(Type3)?"":"none"%>">
                <td align="right" >
    
                    <asp:Label ID="LabelContent" runat="server" Text="广告内容："></asp:Label>
                </td>
                <td align="left" >
                    <asp:TextBox ID="TextBoxContent" runat="server" 
                        TextMode="MultiLine" Width="440px" Height="60px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td align="right" >
    
                    <asp:Label ID="LabelIsOpen" runat="server" Text="是否开启："></asp:Label>
                </td>
                <td align="left" >
                    <asp:DropDownList ID="DropDownListIsOpen" runat="server" CssClass="select2">
                        <asp:ListItem Value="1">是</asp:ListItem>
                        <asp:ListItem Value="0">否</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td align="right" >
    
                    <asp:Label ID="LabelLinkMan" runat="server" Text="广告联系人："></asp:Label>
                </td>
                <td align="left" >
                    <asp:TextBox ID="TextBoxLinkMan" runat="server" CssClass="input2"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td align="right" >
    
                    <asp:Label ID="LabelEmail" runat="server" Text="联系人Email："></asp:Label>
                </td>
                <td align="left" > 
                    <asp:TextBox ID="TextBoxEmail" runat="server" CssClass="input2"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td align="right" >
    
                    <asp:Label ID="LabelTel" runat="server" Text="联系电话："></asp:Label>
                </td>
                <td align="left" >
                    <asp:TextBox ID="TextBoxTel" runat="server" CssClass="input2"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td align="right" >
    
                    &nbsp;</td>
                <td align="left" >
                    &nbsp;</td>
            </tr>
            <tr style="background-color:#EEEEEE;" class="btconfig">
             <td align="right" >
                
                </td>
                <td align="left" >
                     <div>
        <asp:Button ID="ButtonConfirm" runat="server" onclick="ButtonConfirm_Click" Text="确定" 
                             ToolTip="Submit"  CssClass="bt2"/>
                         <input ID="inputReset" runat="server"  type="reset" value="重置" class="bt2"/>
                         <a href="Ad_List.aspx"><img src="images/back.png" border="0" align="top" /></a>
                         <uc1:MessageShow ID="MessageShow" runat="server" Visible="False" /></div>
                </td>  
            </tr>
        </table>
   
    <asp:HiddenField ID="hiddenGuid" runat="server" Value="0" />
            <asp:HiddenField ID="HiddenFieldType0" runat="server" Value="true" />
            <asp:HiddenField ID="HiddenFieldType1" runat="server" />
            <asp:HiddenField ID="HiddenFieldType2" runat="server" />
            <asp:HiddenField ID="HiddenFieldType3" runat="server" />
            <asp:HiddenField ID="HiddenFieldType03" runat="server" Value="true" />
       <asp:HiddenField ID="HiddenFieldCodeName" runat="server" />
       <asp:HiddenField ID="HiddenFieldJsName" runat="server" Value="0" />
    </form>
</body>
</html>