<%@ Page Title="广告编辑" StylesheetTheme="AdminSkin" ValidateRequest="false" Language="C#" MasterPageFile="~/Others/AdminMasterPage.Master"
    AutoEventWireup="true" CodeBehind="AdvertisementEdit.aspx.cs" Inherits="Solution.Admin.Contents.AdvertisementEdit" %>

<%@ Register Src="../Controls/FocusAdvertisement.ascx" TagName="FocusAdvertisement" TagPrefix="uc2" %>
<%@ Register Src="../Controls/ImageAdvertisment.ascx" TagName="ImageAdvertisment" TagPrefix="uc3" %>
<%@ Register Src="../Controls/ExtendedEditor.ascx" TagName="ExtendedEditor" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="AdminContentHead" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="AdminContentCenter" runat="server">
    <form id="form1" runat="server" method="post" enctype="multipart/form-data">
        <div class="DivRightCenter">
            <div class="formtextfield">
                <div class="title">
                    <h4><span>广告编辑</span></h4>
                </div>
                <div class="content">
                    <table width="100%" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                            <td class="fieldname">广告名称:
                            </td>
                            <td class="fieldvalue">
                                <asp:TextBox ID="txtADName" MaxLength="50" runat="server" Width="451px" CssClass="text form-validate"></asp:TextBox>
                                <asp:CustomValidator ControlToValidate="txtADName" ClientValidationFunction="Validator.NonEmpty" ErrorMessage="不能为空" ValidateEmptyText="true" CssClass="fielderror"  runat="server"></asp:CustomValidator>
                            </td>
                            <td class="fielddescription"></td>
                        </tr>
                        <tr>
                            <td class="fieldname">别名:</td>
                            <td class="fieldvalue">
                                <asp:TextBox ID="txtADEnglishName" MaxLength="50" runat="server" Width="451px" CssClass="text form-validate"></asp:TextBox>
                                <asp:CustomValidator ControlToValidate="txtADEnglishName" ClientValidationFunction="Validator.NonEmpty" ErrorMessage="不能为空" ValidateEmptyText="true" CssClass="fielderror"  runat="server"></asp:CustomValidator>
                            </td>
                            <td class="fielddescription">建议使用拼音或英文字母(调用广告时使用)</td>
                        </tr>
                        <tr>
                            <td class="fieldname">广告类型:
                            </td>
                            <td class="fieldvalue">
                                <asp:RadioButtonList ID="rblADType" runat="server" RepeatDirection="Horizontal"
                                    AutoPostBack="True" OnSelectedIndexChanged="rblADType_SelectedIndexChanged">
                                    <asp:ListItem Value="1" Selected="True">图片</asp:ListItem>
                                    <asp:ListItem Value="2">代码</asp:ListItem>
                                    <asp:ListItem Enabled="False" Value="3">Flash</asp:ListItem>
                                    <asp:ListItem Enabled="False" Value="4">文字</asp:ListItem>
                                    <asp:ListItem Value="5">文件</asp:ListItem>
                                    <asp:ListItem Value="6">焦点广告</asp:ListItem>
                                </asp:RadioButtonList>
                            </td>
                            <td class="fielddescription"></td>
                        </tr>
                        <tr>
                            <td class="fieldname">广告内容:
                            </td>
                            <td class="fieldvalue">
                                <div>
                                    <!--图片广告-->
                                    <div id="TableImageAD" runat="server">

                                        <uc3:ImageAdvertisment ID="ImgAD" runat="server" />

                                    </div>
                                    <!--代码广告-->
                                    <table id="TableCodeAD" runat="server" style="display: none;">
                                        <tr>
                                            <td>
                                                <uc1:ExtendedEditor ID="txtADCode" runat="server" EditorFileName="xheditor" EditorUploadUrl="../ajax/FileUpload.ashx?cmd=adimg2&name=imgFile&source=xheditor" />
                                            </td>
                                        </tr>
                                    </table>
                                    <!--文件型广告-->
                                    <table id="TableFileAD" runat="server" style="display: none;">
                                        <tr class="tdbg">
                                            <td class="tablelefttd">相对路径</td>
                                            <td>
                                                <asp:TextBox ID="txtFilePath" Width="300" runat="server"></asp:TextBox></td>
                                        </tr>
                                        <tr class="tdbg">
                                            <td class="tablelefttd">文件内容</td>
                                            <td>
                                                <asp:TextBox ID="txtFileContent" Width="600" Height="200" TextMode="MultiLine" runat="server"></asp:TextBox></td>
                                        </tr>
                                    </table>
                                    <!--焦点广告-->
                                    <div id="DivFocusAD" runat="server" style="display: none;">
                                        <uc2:FocusAdvertisement ID="FocusAD" runat="server" />
                                    </div>
                                </div>
                            </td>
                            <td class="fielddescription"></td>
                        </tr>
                        <tr>
                            <td class="fieldname">备注:
                            </td>
                            <td class="fieldvalue">
                                <asp:TextBox ID="txtADIntroduce" runat="server" TextMode="MultiLine"
                                    Height="56px" Width="451px"></asp:TextBox>
                            </td>
                            <td class="fielddescription"></td>
                        </tr>
                        <tr>
                            <td class="fieldname">显示状态:
                            </td>
                            <td class="fieldvalue">
                                <asp:CheckBox ID="ckbADIsShow" Text="显示" Checked="true" runat="server" />
                            </td>
                            <td class="fielddescription"></td>
                        </tr>
                    </table>
                </div>
                <table width="100%" border="0" cellpadding="2" cellspacing="1">
                    <tr>
                        <td colspan="2" align="center">
                            <asp:Button ID="btnSaveADInfo" runat="server" Text="保存" OnClick="btnSaveADInfo_Click" SkinID="ButtonSave" />&nbsp;&nbsp;
                    <asp:Button ID="btnCancel" runat="server" Text="取消" SkinID="ButtonCancel" CausesValidation="false" OnClick="Cancel_Click" />
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </form>
</asp:Content>
