<%@ page language="C#" autoeventwireup="true" inherits="Admin_Article_Operate, ShopNum1Deploy" %>
<%@ Register assembly="FredCK.FCKeditorV2" namespace="FredCK.FCKeditorV2" tagprefix="FCKeditorV2" %>
<%@ Register src="UserControl/MessageShow.ascx" tagname="MessageShow" tagprefix="ShopNum1" %>
<%@ Register src="UserControl/ArticleRelateArticleSelect.ascx" tagname="ArticleRelateArticleSelect" tagprefix="uc2" %>
<%@ Register src="UserControl/ArticleRelateProductSelect.ascx" tagname="ArticleRelateProductSelect" 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 id="Head1" runat="server">
    <title>Untitled Page</title>
     <link type="text/css" rel="Stylesheet" href="css/index.css" /> 
<style type="text/css">
 .hidden  {
 	 display:none;
  }   
   

.content {
 
}
.content .contentHeader {
  background-color:#BCC7E0;
  border:solid 1px #4B66A5;
  font-weight:bold;
}

.content .contentMain {
 border-left:solid 1px #4B66A5;
 border-top:solid 0px #4B66A5;
 border-right:solid 1px #4B66A5;
 border-bottom:solid 1px #4B66A5;
} 
       
        </style> 
    <script type="text/javascript">
        //选择单图
   function openSingleChild1()
    { 
        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('/');
           var editor = FCKeditorAPI.GetInstance('FCKeditorRemark'); 
           {
             editor.InsertHtml("<img src='/" + k + "'>");
           }
        }
    } 
    function changeTab(count,index)
    {
        for (var i = 1; i <= count; i++)
        {
          document.getElementById('current' + i).className = '';
          document.getElementById('content' + i).style.display = 'none';
        }
        document.getElementById('current' + index).className = 'current';
        document.getElementById('content' + index).style.display = 'block';
    } 
    
    //选择多图
    function openChild()
    { 
        var k = window.showModalDialog("Image_List_Select.aspx",window,"dialogWidth:600px;status:no;dialogHeight:400px"); 
        if(k != null) 
        {
          var strLen=k.length;
          var lastIndex=k.lastIndexOf('/');
          document.getElementById("TextBoxMultiImage").value = k.substring(lastIndex+1,strLen); 
         //document.getElementById("img1").v 
        }
    } 
    //选择单图
   function openSingleChild()
    { 
        var k = window.showModalDialog("Image_List_Select.aspx",window,"dialogWidth:600px;status:no;dialogHeight:400px"); 
        if(k != null) 
        {
          var strLen=k.length;
          var lastIndex=k.lastIndexOf('/');
          document.getElementById("TextBoxThumbImage").value = k.substring(lastIndex+1,strLen); 
         document.getElementById("ImageThumbImage").src = k; 
        }
    } 
  
    </script>
</head>
<body style="padding:0; background-image: url(images/Bg_right.gif); background-repeat:repeat;font-size:12px">
    <form id="form1" runat="server">
        <div style="text-align: center;">
        <div class="navigator" style="border-bottom:none;height:32px">
        <div id="header" style="border-bottom:1px solid #6699cc;padding-left:20px; width">
                <ul style=" float:left">
                    <li id="current1" class="current"><a style="cursor: pointer;" onclick="changeTab(3,1);">
                        <asp:Label runat="server" ID="tab01" Text="文章详细"  /></a></li>
                    <li id="current2"><a style="cursor: pointer;" onclick="changeTab(3,2);">
                        <asp:Label runat="server" ID="tab02" Text="关联文章"  /></a></li>
                    <li id="current3"><a style="cursor: pointer;" onclick="changeTab(3,3);">
                        <asp:Label runat="server" ID="tab03" Text="相关商品" /></a></li>
                </ul>
               
            </div></div>
<!-- ***************************文章详细*************************** -->
        <div id="content1" runat="server">
            <!-- 文章详细-->
            <table cellpadding="0" cellspacing="0" border="0"  width="100%">
            <tr>
                <td align="right">&nbsp;
                    </td>
                <td align="left">&nbsp;
                    </td>
            </tr>
            <tr>
                <td align="right" style="width:20%">
    
                            <asp:Label ID="LabelTitle" runat="server" Text="文章标题："></asp:Label>
                </td>
                <td align="left">
                    <asp:TextBox ID="TextBoxTitle" runat="server" CssClass="input2"></asp:TextBox>
                    <font color="red">
                            <asp:Label ID="Label1" runat="server" Text="*"></asp:Label>
                            </font>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidatorTitle" 
                            runat="server" ControlToValidate="TextBoxTitle" Display="Dynamic" 
                            ErrorMessage="该值不能为空"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorTitle" 
                        runat="server" ControlToValidate="TextBoxTitle" Display="Dynamic" 
                        ErrorMessage="标题最多50个字符" ValidationExpression="^[\s\S]{0,50}$"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td align="right">
                            <asp:Label ID="LabelArticleCatogory" runat="server" Text="所属分类："></asp:Label>
                </td>
                <td align="left">
                            <asp:DropDownList ID="DropDownListArticleCategory" runat="server" CssClass="select2">
                            </asp:DropDownList> <font color="red">
                            <asp:Label ID="Label2" runat="server" Text="*"></asp:Label></font>
                    <asp:CompareValidator ID="CompareValidatorArticleCatogory" runat="server" 
                            ControlToValidate="DropDownListArticleCategory" Display="Dynamic" ErrorMessage="该值必需选择" 
                            Operator="NotEqual" ValueToCompare="-1"></asp:CompareValidator>
                </td>
            </tr>
            <tr>
                <td align="right">
    
                            <asp:Label ID="LabelPublisher" runat="server" Text="作者/发布人："></asp:Label>
                </td>
                <td align="left">
                    <asp:TextBox ID="TextBoxPublisher" runat="server" CssClass="input2"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorTitle0" 
                        runat="server" ControlToValidate="TextBoxPublisher" Display="Dynamic" 
                        ErrorMessage="发布人最多50个字符" ValidationExpression="^[\s\S]{0,50}$"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td align="right">
    
                            <asp:Label ID="LabelSource" runat="server" Text="文章来源："></asp:Label>
                </td>
                <td align="left">
                            <asp:TextBox ID="TextBoxSource" runat="server" 
                                 CssClass="input2"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorTitle1" 
                        runat="server" ControlToValidate="TextBoxSource" Display="Dynamic" 
                        ErrorMessage="文章来源最多150个字符" ValidationExpression="^[\s\S]{0,150}$"></asp:RegularExpressionValidator>
                    <br />
                </td>
            </tr>
            <tr>
                <td align="right">
    
                            <asp:Label ID="LabelKeyWord" runat="server" Text="关键字："></asp:Label>
                        </td>
                <td align="left">
                            <asp:TextBox ID="TextBoxKeyWord" runat="server" 
                                  CssClass="input2"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorTitle2" 
                        runat="server" ControlToValidate="TextBoxKeyWord" Display="Dynamic" 
                        ErrorMessage="关键字最多200个字符" ValidationExpression="^[\s\S]{0,50}$"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td align="right">
    
                            <asp:Label ID="LabelRemark" runat="server" Text="文章描述："></asp:Label>
                        </td>
                <td align="left">
                            <asp:TextBox ID="TextBoxDescription" runat="server" 
                                CssClass="input2" ></asp:TextBox>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorTitle3" 
                        runat="server" ControlToValidate="TextBoxDescription" Display="Dynamic" 
                        ErrorMessage="描述最多150个字符" ValidationExpression="^[\s\S]{0,150}$"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td align="right">
    
                            <asp:Label ID="LabelIfShow" runat="server" Text="是否显示："></asp:Label>
                        </td>
                <td align="left">
                    <asp:DropDownList ID="DropDownListIfShow" runat="server" CssClass="select2">
                    </asp:DropDownList> <font color="red">
                    <asp:Label ID="Label3" runat="server" Text="*"></asp:Label></font>
                    <asp:CompareValidator ID="CompareValidatorIfShow" runat="server" 
                            ControlToValidate="DropDownListIfShow" Display="Dynamic" ErrorMessage="该值必需选择" 
                            Operator="NotEqual" ValueToCompare="-1"></asp:CompareValidator>
                </td>
            </tr>
            <tr>
                <td align="right">
    
                            <asp:Label ID="LabelIfAllowComment" runat="server" Text="是否允许评论："></asp:Label>
                        </td>
                <td align="left">
                    <asp:DropDownList ID="DropDownListIfAllowComment" runat="server" CssClass="select2">
                    </asp:DropDownList> <font color="red">
                    <asp:Label ID="Label4" runat="server" Text="*"></asp:Label></font>
                    <asp:CompareValidator ID="CompareValidatorIfAllowComment" runat="server" 
                            ControlToValidate="DropDownListIfAllowComment" Display="Dynamic" ErrorMessage="该值必需选择" 
                            Operator="NotEqual" ValueToCompare="-1"></asp:CompareValidator>
                </td>
            </tr>
            <tr>
                <td align="right">
    
                            <asp:Label ID="LabelOrderID" runat="server" Text="排序号："></asp:Label>
                        </td>
                <td align="left">
                            <asp:TextBox ID="TextBoxOrderID" runat="server" 
                               CssClass="input2" ></asp:TextBox> <font color="red">
                            <asp:Label ID="Label5" runat="server" Text="*"></asp:Label></font>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorOrderID" 
                        runat="server" ControlToValidate="TextBoxOrderID" Display="Dynamic" 
                        ErrorMessage="只能输入数字" ValidationExpression="^[0-9]*$"></asp:RegularExpressionValidator>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidatorOrderID" 
                            runat="server" ControlToValidate="TextBoxOrderID" Display="Dynamic" 
                            ErrorMessage="该值不能为空"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td align="right">
    
                            <asp:Label ID="LabelProperty" runat="server" Text="文章属性："></asp:Label>
                        </td>
                <td align="left">
                            <asp:CheckBox ID="CheckBoxIsHot" runat="server" Text="热点" />
                            <asp:CheckBox ID="CheckBoxIsRecommend" runat="server" Text="推荐" />
                            <asp:CheckBox ID="CheckBoxIsHead" runat="server" Text="头条" />
                </td>
            </tr>
            <tr>
                <td align="right">
    
                            <asp:Label ID="LabelContent" runat="server" Text="文章内容："></asp:Label>
                        </td>
                <td align="left">   <input id="ButtonSelectSingleImage0" 
                    type="button" value="插入图片" onclick= "openSingleChild1()" class="input2"/>
                    <FCKeditorV2:FCKeditor ID="FCKeditorRemark" runat="server" Height="300px" 
                        Width="80%">
                    </FCKeditorV2:FCKeditor>
                     <font color="red">
                            <asp:Label ID="Label6" runat="server" Text="*"></asp:Label></font>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidatorContent" 
                            runat="server" ControlToValidate="FCKeditorRemark" Display="Dynamic" 
                            ErrorMessage="该值不能为空" EnableClientScript="False"></asp:RequiredFieldValidator>
                </td></tr></table>
            </div>
 <!-- ***************************添加文章*************************** -->
        <div id="content2" runat="server" style="display: none;">
       <%--     <div id="content2" runat="server">--%>
             <!-- 添加文章-->
             <uc2:ArticleRelateArticleSelect ID="ArticleRelateArticleSelect1" 
                        runat="server" />
            </div>
<!-- ***************************相关商品*************************** -->
       <div id="content3" runat="server" style="display: none;">
    <%--    <div id="content3" runat="server">         --%>
               <uc1:ArticleRelateProductSelect ID="ArticleRelateProductSelect1" 
                        runat="server" />
       <table cellpadding="0" cellspacing="0" border="0" style="width:100%">      
       </table>
        </div>    
         
           <br />                                
  <div class="btconfig"> 
        <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="Article_List.aspx"><img src="images/back.png" border="0" align="top" /></a> 
                         <ShopNum1:MessageShow ID="MessageShow" runat="server" Visible="False" />
            </div>               
                   
                   
                   
                   
                   
                   <asp:HiddenField ID="hiddenFieldGuid" runat="server" Value="0" />

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