<%@ page language="C#" autoeventwireup="true" inherits="GroupFlyProduce_ProduceAdmin_ProduceNews_Operate, GroupTGWeb_deploy" %>

<%@ Register Src="UserControl/MessageShow.ascx" TagName="MessageShow" TagPrefix="China315" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<!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">
    <title>新闻添加</title>
    <link rel="stylesheet" type="text/css" href="style/index.css" />

    <script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>

    <script type="text/javascript" language="javascript" src="../../js/CommonJS.js"></script>

    <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 oEditor = FCKeditorAPI.GetInstance("FCKeditorContent"); 
            var content = oEditor.GetXHTML(true);
            var imgvalue = new Array();
            imgvalue = k.split(",");
            oEditor.SetHTML(content + "<img src='" + imgvalue[1] + "' />");
        }
    }
    
    //附件
    function openSingleAttachMent()
    {
        var k = window.showModalDialog("AttachMent_List_Select.aspx",window,"dialogWidth:820px;status:no;dialogHeight:650px"); 
        if(k != null) 
        {
            var oEditor = FCKeditorAPI.GetInstance("FCKeditorContent"); 
            var content = oEditor.GetXHTML(true);
            var strs = new Array();
            strs = k.split(",");
            oEditor.SetHTML(content + "<a href='"+ strs[0] +"'>"+ strs[1] +"</a>");
        }
    }
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div class="main">
     
            <div class="title">
                <asp:Label ID="LabelTitle" runat="server" Text="新闻添加"></asp:Label></div>
           
                <table width="100%" cellpadding="0" cellspacing="1" border="0">
                    <tr>
                        <td style="text-align: right" width="20%">
                            <asp:Localize ID="LocalizeTitle" runat="server" Text="新闻标题："></asp:Localize>
                        </td>
                        <td>
                            <asp:TextBox ID="TextBoxTitle" runat="server" CssClass="allinput2"></asp:TextBox>
                            <asp:Label ID="Label1" runat="server" ForeColor="red" Text="*"></asp:Label>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidatorTextBoxTitle" runat="server"
                                ControlToValidate="TextBoxTitle" ErrorMessage="该值不能为空 "></asp:RequiredFieldValidator>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidatorTextBoxTitle" runat="server"
                                ControlToValidate="TextBoxTitle" Display="Dynamic" ErrorMessage="最多50个字符" ValidationExpression="^[\s\S]{0,50}$"></asp:RegularExpressionValidator>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: right" width="20%">
                            <asp:Localize ID="LocalizeArticleCategory" runat="server" Text="所属分类："></asp:Localize>
                        </td>
                        <td>
                            <asp:DropDownList ID="DropDownListArticleCategory" runat="server" CssClass="allinput2">
                            </asp:DropDownList>
                            <asp:Label ID="Label5" runat="server" ForeColor="red" Text="*"></asp:Label>
                            <asp:CompareValidator ID="CompareDropDownListArticleCategory" runat="server" ControlToValidate="DropDownListArticleCategory"
                                Display="Dynamic" ErrorMessage="该值必需选择" Operator="NotEqual" ValueToCompare="0"></asp:CompareValidator>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: right" width="20%">
                            <asp:Localize ID="LocalizePublisher" runat="server" Text="作者/发布人："></asp:Localize>
                        </td>
                        <td>
                            <asp:TextBox ID="TextBoxPublisher" runat="server" CssClass="allinput2"></asp:TextBox>
                            <asp:Label ID="Label2" runat="server" ForeColor="red" Text="*"></asp:Label>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidatorTextBoxPublisher" runat="server"
                                ErrorMessage="该值不能为空 " ControlToValidate="TextBoxPublisher"></asp:RequiredFieldValidator>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidatorTextBoxPublisher" runat="server"
                                ControlToValidate="TextBoxPublisher" Display="Dynamic" ErrorMessage="最多50个字符"
                                ValidationExpression="^[\s\S]{0,50}$"></asp:RegularExpressionValidator>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: right" width="20%">
                            <asp:Localize ID="LocalizeSource" runat="server" Text="新闻来源："></asp:Localize>
                        </td>
                        <td>
                            <asp:TextBox ID="TextBoxSource" runat="server" CssClass="allinput2"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: right">
                            <asp:Localize ID="LocalizeKeywords" runat="server" Text="关键字："></asp:Localize>
                        </td>
                        <td>
                            <asp:TextBox ID="TextBoxKeywords" runat="server" CssClass="allinput2"></asp:TextBox>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidatorTextBoxKeywords" runat="server"
                                ControlToValidate="TextBoxKeywords" Display="Dynamic" ErrorMessage="最多200个字符"
                                ValidationExpression="^[\s\S]{0,200}$"></asp:RegularExpressionValidator>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: right">
                            <asp:Localize ID="Localize6" runat="server" Text="新闻描述："></asp:Localize>
                        </td>
                        <td>
                            <asp:TextBox ID="TextBoxDescription" runat="server" CssClass="allinput1" TextMode="MultiLine"></asp:TextBox>
                            <asp:Label ID="Warning" runat="server" Text="请认真填写，以便于被搜索引擎收录；"></asp:Label>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidatorTextBoxDescription"
                                runat="server" ControlToValidate="TextBoxDescription" Display="Dynamic" ErrorMessage="最多150个字符"
                                ValidationExpression="^[\s\S]{0,200}$"></asp:RegularExpressionValidator>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: right">
                            <asp:Localize ID="LocalizeOrderID" runat="server" Text="排序号："></asp:Localize>
                        </td>
                        <td>
                            <asp:TextBox ID="TextBoxOrderID" runat="server" CssClass="allinput2" ></asp:TextBox>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidatorTextBoxOrderID" runat="server"
                                ControlToValidate="TextBoxOrderID" Display="Dynamic" ErrorMessage="只能输入数字" ValidationExpression="^[0-9]*$"></asp:RegularExpressionValidator>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidatorTextBoxOrderID" runat="server"
                                ErrorMessage="该值不能为空 " ControlToValidate="TextBoxOrderID"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: right; vertical-align: top;">
                            <asp:Localize ID="LocalizeSingleImage" runat="server" Text="新闻内容："></asp:Localize>
                        </td>
                        <td>
                            <input id="ButtonSelectSingleImage" onclick="openSingleChild()" class="bt3 cancel"
                                type="button" value="插入图片" />
                            <input id="ButtonSelectAttachMent" onclick="openSingleAttachMent()" class="bt3 cancel"
                                type="button" value="导入附件" /><br />
                            <FCKeditorV2:FCKeditor ID="FCKeditorContent" runat="server" Height="300" Width="80%">
                            </FCKeditorV2:FCKeditor>
                            <asp:Label ID="Label3" runat="server" ForeColor="red" Text="*"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: right;">
                            <asp:Localize ID="Localize5" runat="server" Text="是否前台显示："></asp:Localize>
                        </td>
                        <td>
                            <asp:CheckBox ID="CheckBoxIsShow" runat="server" Checked="True" Text="是" />
                        </td>
                    </tr><tr style="background-color: rgb(238, 238, 238);">
<td align="right">  </td><td> 
    <div class="bottomLine">
        <asp:Button ID="ButtonConfirm" runat="server" Text="确定" CssClass="bnt1" OnClick="ButtonConfirm_Click"
            ToolTip="Submit" />
        <input id="Reset1" type="reset" value="重置" class="bnt1 cancel" />
        <asp:Button ID="btnConfirm" runat="server" Text="返回列表" CssClass="bt3 " OnClick="btnConfirm_Click"
            CausesValidation="false" />
        <China315:MessageShow ID="MessageShow" Visible="false" runat="server" />
        <br />
        <asp:HiddenField ID="hiddenFieldGuid" runat="server" Value="0" />
    </div></td></tr>
                </table>
          
        </div>

    </form>
</body>
</html>
