<%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false" CodeFile="article.aspx.cs" Inherits="member_article" %>

<%@ 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 id="Head1" runat="server">
    <title>发布文章</title>
    <link href="/admin/skin/css.css" rel="stylesheet" type="text/css" />
     <link href="/images/css/skin_blue.css" rel="stylesheet" type="text/css" />
    <link href="/images/css/inbox.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    
    </style>
    <script language="javascript">
   
    //判断标题和内容部能为空
    function panduan()
    {
        var title=document.getElementById("doctitle").value;
        //var content=document.getElementById("FCKeditor1").value;
        var Editor =FCKeditorAPI.GetInstance("FCKeditor1");
        var content=Editor.GetXHTML();
         var col=document.getElementById("Drop_column");
        if(title=="")
        {
            alert("标题不能为空!");
            return false;
        }
         else if(col.options[col.options.selectedIndex].value=="0")
        {
            alert("请选择投稿栏目!");
            return false;
        }
        else if(content=="")
        {
            alert("文章内容不能为空!");
            return false;
        }
        else if(document.getElementById("Check_code").value=="")
        {
            alert("请输入验证码!")
            return false;
        }
        else 
        {
          return true;
        }
    }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table style="width: 100%"  class="Ibx_gTable_Con">
            <tr>
                <td align="left" class="bg" colspan="2">
                    基本属性</td>
            </tr>
            <tr>
                <td width="100" align="right">
                    文档标题:</td>
                <td>
                    <asp:TextBox ID="doctitle" runat="server" Width="500px"></asp:TextBox>
                    </td>
            </tr>
            <tr>
                <td width="100" align="right">
                    所属栏目：</td>
                <td>
                    <asp:DropDownList ID="Drop_column" runat="server">
                    </asp:DropDownList></td>
            </tr>
            <tr>
                <td width="100" align="right">
                    缩略图：</td>
                <td>
                 <script language=javascript>
                    //打开图片上传页面
                   function openurl()
                    {
                         window.open("/admin/tupian_upload.aspx","","top=100,left=220,width=520,height=560");
                    }
                    //接收缩略图URL
                    function GetPath(url)
                    {
                        document.getElementById("thumbnail").value=url;
                    }
                </script>
                <input id="thumbnail" type="text" runat="server" style="width:300px" />
                <input id="Up" type="button" onclick="openurl()" value="上 传" />&nbsp;
                </td>
            </tr>
            <tr>
                <td width="100" align="right">
                    文章描述:</td>
                <td>
                    <asp:TextBox ID="intro" runat="server" Rows="4" TextMode="MultiLine" Width="400px"></asp:TextBox></td>
            </tr>
            <tr>
                <td class="bg" colspan="2">
                    内容模型</td>
            </tr>
            <tr>
                <td width="100" align="right">
                    作者来源:</td>
                <td>
                    作者:<asp:TextBox ID="author" runat="server"></asp:TextBox>&nbsp;
                    来源:<asp:TextBox ID="source" runat="server"></asp:TextBox>
                    </td>
            </tr>
            <tr>
                <td width="100" align="right">
                    内容:</td>
                <td>
                    <fckeditorv2:fckeditor id="FCKeditor1" runat="server" height="500px" ToolbarSet="Member"></fckeditorv2:fckeditor>
                </td>
            </tr>
            <tr>
                <td width="100" align="right">
                    验证码:</td>
                <td>
                    <asp:TextBox ID="Check_code" runat="server" MaxLength="4" Width="60px"></asp:TextBox>
                <img id="Code" runat=server src="/images/Checkcode.aspx" />&nbsp;&nbsp;<A
      href="#" onclick="document.getElementById('Code').src=document.getElementById('Code').src+'?'" style="cursor:hand">看不清楚，换一张</A>
                </td>
            </tr>
            <tr>
                <td align="center" colspan="2">
                    <asp:ImageButton ID="bt_save" runat="server" OnClientClick="return panduan()" ImageUrl="/admin/skin/images/button_save.gif"
                        OnClick="bt_save_Click" /></td>
            </tr>
        </table>
    
    </div>
    </form>
</body>
</html>

