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

<!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>
    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 Ok()
    {
       var colid=document.getElementById("colid").value;
       var colname=document.getElementById("cl_name").value;
       var location=document.getElementsByName("Radio_attribute");
       if(colid=="")
       {
            alert("请生成或输入栏目ID!");
            return false;
       }
       else if(!/^[0-9]*$/.test(colid))
       {
           alert("栏目ID只能为数字!");
           return false;
       }
       else if(colname=="")
       {
            alert("请输入栏目名称!");
            return false;
       }
       else if(!location[3].checked)
       {
            var path=document.getElementById("cl_path").value;
            if(path=="")
            {
                alert("请输入生成文件保存目录!");
                return false;
            }
            else
            {
                if(path.substring(path.length-1)!="/")
                {
                    alert("请在保存目录结尾输入:/");
                    return false;
                }
                else
                {
                    return true;
                }
            }
       }
       else if(location[3].checked)
       {
            var url=document.getElementById("cl_url").value;
            if(url=="")
            {
                alert("请输入链接地址!");
                return false;
            }
            else
            {
                return true;
            }
       }
       else
       {
            return true;
       }
    }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table style="width: 98%" id="TABLE1" class=Ibx_gTable_Con>
            <tr>
                <td colspan="2" align="center">
                  <font size=3> <b>新栏目添加:</b><a href="art_column_list.aspx" style="color:Green">返回栏目管理</a></font></td>
            </tr>
          
            <tr>
                <td align="right" width="120">
                    栏目ID</td>
                <td style="width: 808px">
                <table>
                <tr height="15"><td><asp:TextBox ID="colid" runat="server" MaxLength="6" Width="120px" Enabled="False"></asp:TextBox></td><td> <asp:RadioButtonList ID="Radio_id" runat="server" RepeatDirection="Horizontal" AutoPostBack="True" OnSelectedIndexChanged="Radio_id_SelectedIndexChanged">
                        <asp:ListItem Value="0" Selected=True>自动生成ID</asp:ListItem>
                        <asp:ListItem Value="1">自定义ID</asp:ListItem>
                    </asp:RadioButtonList></td><td><font color=red>注明:栏目ID一经添加不可修改!</font></td></tr>
                </table>
                    
                   
                   </td>
            </tr>
            <tr>
                <td width="120" align="right">
                    栏目名称:</td>
                <td style="width: 808px">
                    <asp:TextBox ID="cl_name" runat="server" Width="200px"></asp:TextBox>
                   </td>
            </tr>
            <tr>
                <td align="right" width="120">
                    上级栏目:</td>
                <td style="width: 808px">
                    <asp:DropDownList ID="Drop_Column" runat="server">
                    </asp:DropDownList></td>
            </tr>
            <tr>
                <td align="right" width="120">
                    排序:</td>
                <td style="width: 808px">
                    <asp:TextBox ID="cl_px" runat="server">99</asp:TextBox>
                    <font color=red>数字越大,排序越后</font></td>
            </tr>
            <tr>
                <td width="120" align="right">
                    是否允许投稿:</td>
                <td style="height: 26px; width: 808px;">
                    <asp:RadioButtonList ID="Radio_tg" runat="server" BorderStyle="None" BorderWidth="0px"
                        RepeatDirection="Horizontal">
                        <asp:ListItem Value="true" Selected="True">是</asp:ListItem>
                        <asp:ListItem Value="false">否</asp:ListItem>
                    </asp:RadioButtonList></td>
            </tr>
            <tr>
                <td width="120" align="right">
                    是否显示:</td>
                <td style="width: 808px">
                    <asp:RadioButtonList ID="Radio_xs" runat="server" BorderStyle="None" BorderWidth="0px"
                        RepeatDirection="Horizontal">
                        <asp:ListItem Value="false">隐藏</asp:ListItem>
                        <asp:ListItem Value="true" Selected="True">显示</asp:ListItem>
                    </asp:RadioButtonList></td>
            </tr>
            <tr>
                <td align="right" width="120">
                    系统指定目录:</td>
                <td style="width: 808px">
                    <asp:Label ID="parentpath" runat="server" Text=""></asp:Label></td>
            </tr>
            <tr>
                <td width="120" align="right">
                    文档保存路径:</td>
                <td style="width: 808px">
                    <asp:TextBox ID="cl_path" runat="server" Width="200px"></asp:TextBox>&nbsp;<font color=red>提示：请在目录后面加上 "/" 如:news/</font> </td>
            </tr>
            <tr>
                <td align="right" width="120">
                    目录相对位置:</td>
                <td style="width: 808px">
                    <asp:RadioButtonList ID="Radio_location" runat="server" BorderStyle="None" BorderWidth="0px"
                        RepeatDirection="Horizontal">
                        <asp:ListItem Selected="True" Value="true">系统指定目录</asp:ListItem>
                        <asp:ListItem Value="false">网站根目录</asp:ListItem>
                    </asp:RadioButtonList></td>
            </tr>
            <tr>
                <td align="right" width="120">
                    列表页选项:</td>
                <td style="width: 808px">
                    <asp:RadioButtonList ID="Radio_options" runat="server" BorderStyle="None" BorderWidth="0px"
                        RepeatDirection="Horizontal">
                        <asp:ListItem Value="0">链接到封面页</asp:ListItem>
                        <asp:ListItem Value="1">链接到列表页</asp:ListItem>
                        <asp:ListItem Selected="True" Value="2">动态页</asp:ListItem>
                    </asp:RadioButtonList></td>
            </tr>
            <tr>
                <td width="120" align="right">
                    栏目属性:</td>
                <td style="width: 808px">
                    <asp:RadioButtonList ID="Radio_attribute" runat="server" BorderStyle="None" BorderWidth="0px"
                        RepeatDirection="Horizontal">
                        <asp:ListItem Value="0" Selected="True">列表栏目</asp:ListItem>
                        <asp:ListItem Value="1">封面栏目</asp:ListItem>
                        <asp:ListItem Value="2">外部链接</asp:ListItem>
                    </asp:RadioButtonList></td>
            </tr>
            <tr>
                <td width="120" align="right">
                    链接地址:</td>
                <td style="width: 808px">
                    <asp:TextBox ID="cl_url" runat="server" Width="260px"></asp:TextBox></td>
            </tr>
            <tr>
                <td class="bg" colspan="2">
                    栏目高级选项设置:</td>
            </tr>
            <tr>
                <td align="right" width="120">
                    栏目封页模版:</td>
                <td style="width: 808px">
                    <asp:TextBox ID="txt_temp_index" runat="server" Width="261px"></asp:TextBox>&nbsp;&nbsp;<a href="JavaScript:op('txt_temp_index')" class=bt_css>选择模版...</a></td>
            </tr>
            <tr>
                <td align="right" width="120">
                    栏目列表页模版:</td>
                <td style="width: 808px">
                    <asp:TextBox ID="txt_temp_list" runat="server" Width="262px"></asp:TextBox>&nbsp;&nbsp;<a href="JavaScript:op('txt_temp_list')" class=bt_css>选择模版...</a></td>
            </tr>
            <tr>
                <td align="right" width="120">
                    栏目内容页模版:</td>
                <td style="width: 808px">
                    <asp:TextBox ID="txt_temp_cont" runat="server" Width="263px"></asp:TextBox>&nbsp;&nbsp;<a href="JavaScript:op('txt_temp_cont')" class=bt_css>选择模版...</a></td>
            </tr>
            <tr>
                <td align="right" width="120">
                    封面页命名规则:</td>
                <td style="width: 808px">
                    <asp:TextBox ID="def" runat="server" Width="180px">index.html</asp:TextBox></td>
            </tr>
            <tr>
                <td align="right" width="120">
                    列表页命名规则:</td>
                <td style="width: 808px">
                    <asp:TextBox ID="txt_list" runat="server" Width="180px">list_{cid}_{page}.html</asp:TextBox>
                    说明:{cid}栏目ID,{page}页码</td>
            </tr>
            <tr>
                <td align="right" width="120">
                    内容页命名规则:</td>
                <td style="width: 808px">
                    <asp:TextBox ID="txt_content" runat="server" Width="180px">{Y}{M}{D}/{aid}.html</asp:TextBox>
                    说明:{Y}年,{M}月,{D}日,{aid}文档ID</td>
            </tr>
            <tr>
                <td width="120" align="right">
                    栏目关键字:</td>
                <td style="width: 808px">
                    <asp:TextBox ID="cl_keyword" runat="server" Height="34px" TextMode="MultiLine" Width="420px"></asp:TextBox></td>
            </tr>
            <tr>
                <td width="120" align="right">
                    栏目描述:</td>
                <td style="width: 808px">
                    <asp:TextBox ID="cl_intro" runat="server" Height="34px" TextMode="MultiLine" Width="420px"></asp:TextBox></td>
            </tr>
            <tr>
                <td colspan="2" style="height: 16px" align="center">
                    <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/Admin/skin/images/button_save.gif" OnClientClick="return Ok()" OnClick="ImageButton1_Click" /></td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
