<%@ Page Title="商家黄页文章编辑" StylesheetTheme="AdminSkin" ValidateRequest="false" Language="C#" MasterPageFile="~/Others/AdminMasterPage.Master" AutoEventWireup="true" CodeBehind="ShopArticleEdit.aspx.cs" Inherits="Web.Admin.Contents.ShopArticleEdit" %>

<%@ Register Src="../Controls/ExtendedEditor.ascx" TagName="ExtendedEditor" TagPrefix="uc1" %>
<%@ Register Src="../Controls/WebFileUpload.ascx" TagName="WebFileUpload" TagPrefix="uc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="AdminContentHead" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="AdminContentCenter" runat="server">
    <form id="form1" runat="server">
        <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="txtTitle" runat="server" Width="260" CssClass="text form-validate"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="fieldname">作者:
                        </td>
                        <td class="fieldvalue">
                            <asp:TextBox ID="txtAuthor" runat="server" Width="260" TextMode="SingleLine" CssClass="text"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="fieldname">来源:
                        </td>
                        <td class="fieldvalue">
                            <asp:TextBox ID="txtSource" runat="server" Width="260" TextMode="SingleLine" CssClass="text"></asp:TextBox>
                        </td>
                    </tr>

                    <tr>
                        <td class="fieldname">缩略图:
                        </td>
                        <td class="fieldvalue">

                            <uc2:WebFileUpload ID="txtThumbnail" PreviewRoot="/" UploadPath="../ajax/FileUpload.ashx?cmd=thumbnail" runat="server" />

                        </td>
                    </tr>
                    <tr>
                        <td class="fieldname">SEO:
                        </td>
                        <td class="fieldvalue">
                            <table>
                                <tr>
                                    <td>Keyword:
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtSEOKeyword" MaxLength="25" runat="server" Width="366px" CssClass="text"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td>Description:
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtSEODescription" MaxLength="500" runat="server" Height="40px"
                                            TextMode="MultiLine" Width="366px" CssClass="textarea"></asp:TextBox>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td class="fieldname">简介:
                        </td>
                        <td class="fieldvalue">
                            <asp:TextBox ID="txtIntroduce" runat="server" Width="520" Height="50" TextMode="MultiLine" CssClass="textarea"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="fieldname">内容:
                        </td>
                        <td class="fieldvalue">
                            <uc1:ExtendedEditor ID="txtContent" runat="server" EditorFileName="xheditor"
                                EditorUploadUrl="../ajax/FileUpload.ashx?cmd=article&name=imgFile&uploadtype=xheditor" />
                        </td>
                    </tr>
                    <tr>
                        <td class="fieldname">推荐:
                        </td>
                        <td class="fieldvalue">
                            <asp:CheckBox ID="ckbRecommend" runat="server" Text="推荐" />
                        </td>
                    </tr>
                    <tr>
                        <td class="fieldname">状态:
                        </td>
                        <td class="fieldvalue">
                            <asp:RadioButtonList ID="rblStatus" runat="server" RepeatDirection="Horizontal">
                                <asp:ListItem Value="1">草稿</asp:ListItem>
                                <asp:ListItem Value="2">待审核</asp:ListItem>
                                <asp:ListItem Selected="True" Value="3">终审</asp:ListItem>
                            </asp:RadioButtonList>
                        </td>
                    </tr>
                </table>
            </div>
            <table width="100%" border="0" cellpadding="2" cellspacing="1">
                <tr>
                    <td colspan="2" align="center">
                        <asp:Button ID="btnSaveInfo" runat="server" Text="保存" OnClientClick="extendeGetEditorContent();return checkInput();" OnClick="btnSaveADInfo_Click" CssClass="btn btngreen"/>
                        &nbsp;&nbsp;
                        <asp:Button ID="btnCancel" runat="server" Text="取消" OnClientClick="javascript:cacelPage();return false;" CssClass="btn btnred"/>
                    </td>
                </tr>
            </table>
            <br />
        </div>
         <br />
    </form>
    <script type="text/javascript">
        var titleobj = document.getElementById("<%=this.txtTitle.ClientID%>");
        function checkInput() {
            if (titleobj.value == "") {
                alert("标题不能为空!");
                return false;
            }
            return true;
        }
        function cacelPage() {
            window.location.href='ShopArticleManage.aspx?UserID=<%=Request.QueryString["UserID"]%>&CategoryID=<%=Request.QueryString["CategoryID"] %>';
        }
    </script>
</asp:Content>
