<%@ Page Language="C#" AutoEventWireup="true" CodeFile="single_add.aspx.cs" Inherits="admin_single_add" %>

<%@ 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 href="../Admin/skin/css.css" rel="stylesheet" type="text/css" />
    <link href="../images/css/inbox.css" rel="stylesheet" type="text/css" />
     <script language=javascript>
    function op(id)
    {
       window.open("temp_list.aspx?id="+id,"","width=500,height=450,top=200,left=200");
    }
    function setValue(temp,id)
    {
       temp=temp.replace("templates/","");
       document.getElementById(id).value=temp;
    }
    function PostCheck()
    {
        var stitle=document.getElementById("stitle").value;
        var stemplates=document.getElementById("stemplates").value;
        var spath=document.getElementById("spath").value;
        var Editor =FCKeditorAPI.GetInstance("FCKeditor1");
        var scontent=Editor.GetXHTML();
        if(stitle=="")
        {
            alert("请输入标题!");
            return false;
        }
        else if(stemplates=="")
        {
            alert("请输入模板路径!");
            return false;
        }
        else if(spath=="")
        {
            alert("请输入生成存放路径!");
            return false;
        }
        else if(scontent=="")
        {
            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="center" colspan="2">
                    单页添加&nbsp;&nbsp;<a href="singlepage.aspx" class="bt_css">单页管理</a></td>
            </tr>
            <tr>
                <td width="20%">
                    标题:</td>
                <td>
                    <asp:TextBox ID="stitle" runat="server" Width="300px"></asp:TextBox></td>
            </tr>
            <tr>
                <td width="20%">
                    关键字:</td>
                <td>
                    <asp:TextBox ID="skeywords" runat="server" Width="300px"></asp:TextBox></td>
            </tr>
            <tr>
                <td width="20%">
                    描述:</td>
                <td>
                    <asp:TextBox ID="sintro" runat="server" Rows="2" TextMode="MultiLine" Width="300px"></asp:TextBox></td>
            </tr>
            <tr>
                <td width="20%">
                    模板路径:</td>
                <td>
                    <asp:TextBox ID="stemplates" runat="server" Width="300px"></asp:TextBox>&nbsp;&nbsp;<a href="JavaScript:op('stemplates')" class=bt_css>选择模版...</a></td>
            </tr>
            <tr>
                <td width="20%">
                    生成存放路径:</td>
                <td>
                    <asp:TextBox ID="spath" runat="server" Width="300px"></asp:TextBox>
                    <span style="color: #ff0000">注释:目录前请加上 "/",如/1.html(存放在根目录);/html/danye/2.html(存放在指定目录下)</span></td>
            </tr>
            <tr style="color: #000000">
                <td width="20%">
                    内容:</td>
                <td>
                    <FCKeditorV2:FCKeditor ID="FCKeditor1" runat="server" Height="400px">
                    </FCKeditorV2:FCKeditor>
                </td>
            </tr>
            <tr style="color: #000000">
                <td>
                </td>
                <td>
                    <asp:ImageButton ID="ImageButton1" runat="server" OnClientClick="return PostCheck()" ImageUrl="~/admin/skin/images/button_save.gif" OnClick="ImageButton1_Click" /></td>
            </tr>
        </table>
    
    </div>
    </form>
</body>
</html>
