<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Model_Add.aspx.cs" Inherits="TopWinCMS.WebUI.Admin.Model.Model_Add" %>
<%@ Import Namespace="TopWinCMS.BLL" %>
<%@ Register Assembly="TopWinCMS.WebControls" Namespace="TopWinCMS.WebControls" TagPrefix="cc1" %>
<%@ Register Src="../UC_AjaxLoading.ascx" TagName="UC_AjaxLoading" 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 runat="server">
    <title>添加模型</title>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
    <meta content="no-cache" http-equiv="Pragma" />

    <script language="javascript" type="text/javascript" src="../TopWin.js"></script>

    <link rel="stylesheet" type="text/css" href="../Style.css" />

    <script language="javascript" src="../../Images/skysoft.js" type="text/javascript"></script>

    <script language="javascript" type="text/javascript">
 
   
    function HideAndDisplay(TabIndex,o)
    {
        document.getElementById("current").id="";    
        for(i=0;i<5;i++)
        {
            if( i == TabIndex)
            {
		        o.id="current";
                document.getElementById("Tab"+i).style.display = "block";
            }
            else
            {
                document.getElementById("Tab"+i).style.display = "none";
            }
        }
        return false;
    }
    </script>

    <style type="text/css">
        .style1
        {
        	color:Red;
        }
        #Tab1, #Tab2, #Tab3, #Tab4
        {
            display: none;
        }
        .RowTitle
        {
        	width:200px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
        <ProgressTemplate>
            <uc1:UC_AjaxLoading ID="UC_AjaxLoading1" runat="server" />
        </ProgressTemplate>
    </asp:UpdateProgress>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div id="tabs">
                <ul>
                    <li id="current" onclick="return HideAndDisplay(0,this);"><a href="#"><span>基本属性</span></a></li>
                    <li onclick="return HideAndDisplay(1,this);"><a href="#"><span>功能伸缩</span></a></li>
                    <li onclick="return HideAndDisplay(2,this);"><a href="#"><span>生成静态页</span></a></li>
                    <li onclick="return HideAndDisplay(3,this);"><a href="#"><span>上传属性</span></a></li>
                    <li onclick="return HideAndDisplay(4,this);"><a href="#"><span>其他属性</span></a></li>
                </ul>
            </div>
            <table style="width: 100%;" id="Tab0" class="TabelGrid">
                <tr>
                    <td class="RowTitle">
                        模型别名：
                    </td>
                    <td>
                        <asp:TextBox ID="TB_ModelName" runat="server" Width="250px"></asp:TextBox>
                        <span class="style1">*</span>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TB_ModelName"
                            ErrorMessage="请输入模型别名" Display="Dynamic"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="RowTitle" valign="top">
                        &nbsp; 数据库表：
                    </td>
                    <td>
                        <asp:TextBox ID="TB_DataTable" runat="server" Width="250px">TopWinCMS_Extend_</asp:TextBox>
                        <span class="style1">*</span>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TB_DataTable"
                            ErrorMessage="请输入数据库表"></asp:RequiredFieldValidator>
                        <br />
                        说明：扩展的模型表名必须用“TopWinCMS_Extend_”作前缀，以避免冲突。<br />
                        警告：<font color="#FF0000"><strong>保存以后该表将不能再改名，请认真填写。</strong></font>
                    </td>
                </tr>
                <tr>
                    <td class="RowTitle">
                        继承基本模型：
                    </td>
                    <td align="left">
                        <asp:DropDownList ID="DDL_BaseModel" runat="server" OnSelectedIndexChanged="DDL_BaseModel_SelectedIndexChanged"
                            AutoPostBack="True">
                            <asp:ListItem Value="Soft">下载系统 </asp:ListItem>
                            <asp:ListItem Value="Article">新闻系统</asp:ListItem>
                            <asp:ListItem Value="Product">产品展示</asp:ListItem>
                            <asp:ListItem Value="Shop">商城系统</asp:ListItem>
                            <asp:ListItem Value="Ask">问答系统 </asp:ListItem>
                            <asp:ListItem Value="Music" Enabled="false">音乐系统</asp:ListItem>
                            <asp:ListItem Value="Flash" Enabled="false">FLASH系统</asp:ListItem>
                            <asp:ListItem Value="Picture" Enabled="false">图片系统</asp:ListItem>
                            <asp:ListItem Value="Info" Enabled="false">分类信息</asp:ListItem>
                        </asp:DropDownList>
                        <br />
                        警告：<font color="#FF0000"><strong>保存以后将不能再修改，请认真填写。</strong></font>
                    </td>
                </tr>
                <tr>
                    <td class="RowTitle">
                        内容名称：
                    </td>
                    <td>
                        <asp:TextBox ID="TB_ContentName" runat="server" Width="250px"></asp:TextBox>
                        <span class="style1">*</span>
                        比如“文章”、“软件”、“产品”
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="TB_ContentName"
                            ErrorMessage="请输入内容名称"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="RowTitle">
                        内容单位：
                    </td>
                    <td>
                        <asp:TextBox ID="TB_ContentUnit" runat="server" Width="250px"></asp:TextBox>
                        <span class="style1">*</span>
                        比如“篇”、“个”
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="TB_ContentUnit"
                            ErrorMessage="请输入内容单位"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                 <tr>
                    <td class="RowTitle">
                        存放目录：
                    </td>
                    <td>
                        <asp:TextBox ID="TB_HtmlSavePath" runat="server"></asp:TextBox>比如/Article/
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="TB_HtmlSavePath"
                            ErrorMessage="请输入存放目录"></asp:RequiredFieldValidator>
                        <br />
                        警告：<font color="#FF0000"><strong>保存以后将不能再修改，请认真填写。</strong></font>
                    </td>
                </tr>
                <tr>
                    <td class="RowTitle">
                        备注：
                    </td>
                    <td>
                        <asp:TextBox ID="TB_Remark" runat="server" Height="100px" TextMode="MultiLine" Width="300px"></asp:TextBox>
                    </td>
                </tr>
            </table>
            <table style="width: 100%;" id="Tab1" class="TabelGrid">
                <tr>
                    <td class="RowTitle">
                        字段选用：<br />
                        <span style="font-weight: normal">鼠标放字段上面能显示英文字段名称</span>
                    </td>
                    <td>
                        <asp:DataList ID="DL_Filter" runat="server" RepeatColumns="4" RepeatDirection="Horizontal">
                            <ItemTemplate>
                                <asp:CheckBox ID="CheckBox1" runat="server" Text='<%# Eval("Explain") %>' ToolTip='<%# Eval("Name") %>'
                                    Checked='<%# Eval("Checked") %>' /></ItemTemplate>
                        </asp:DataList>
                    </td>
                </tr>
            </table>
            <table style="width: 100%;" id="Tab2" class="TabelGrid">
                <tr>
                    <td class="RowTitle" valign="top">
                        全模型静态设置：
                    </td>
                    <td>
                        <asp:RadioButtonList ID="RBL_EnableStatic" runat="server" RepeatDirection="Horizontal">
                            <asp:ListItem Value="1">开启</asp:ListItem>
                            <asp:ListItem Value="0" Selected="True">关闭</asp:ListItem>
                        </asp:RadioButtonList>
                        本程序支持动态、静态页混合，设置为启用生成以后在<b> 栏目管理 </b>依然可以单独为栏目设置为使用动态。
                    </td>
                </tr>
                 <tr>
                    <td class="RowTitle">
                        模型(频道)首页模板：
                    </td>
                    <td>
                        <asp:TextBox ID="TB_TemplateFileName" runat="server" Width="450px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator51" runat="server" ControlToValidate="TB_TemplateFileName"
                            ErrorMessage="请输入存放目录"></asp:RequiredFieldValidator>
                    </td>
                </tr>
               
                
                <tr>
                    <td class="RowTitle">
                        &nbsp; 栏目生成HTML的最大页数：
                    </td>
                    <td>
                        <cc1:NumericTextBox ID="NTB_MaxClassPageNo" runat="server">10</cc1:NumericTextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="NTB_MaxClassPageNo"
                            ErrorMessage="请输入栏目生成HTML的最大页数"></asp:RequiredFieldValidator>
                        <br />
                        只有选择了生成静态页的规则才生效。该 设置为选用生成静态页的用户节约硬盘，当生成的静态页大于设置数的时候就变成使用动态页。<br />
                        设置为0为生成所有的静态页面，建议设置为5-10，很少游客会访问那么后的网页，动态页本身就有很高负载能力用它就够了。
                    </td>
                </tr>
            </table>
            <table style="width: 100%;" id="Tab3" class="TabelGrid">
                <tr>
                    <td class="RowTitle">
                        后台上传目录：
                    </td>
                    <td>
                        <asp:RadioButtonList ID="RBL_AdminUploadPath" runat="server" RepeatDirection="Horizontal">
                            <asp:ListItem Selected="True" Value="1">以栏目上传目录为父目录</asp:ListItem>
                            <asp:ListItem Value="2">以CMS上传目录为父目录</asp:ListItem>
                        </asp:RadioButtonList>
                       
                        <asp:DropDownList ID="DDL_AdminUploadPath" runat="server">
                           <asp:ListItem Value="">不设置下级目录</asp:ListItem>
                            <asp:ListItem Value="yy-MM-dd">yy-MM-dd</asp:ListItem>
                            <asp:ListItem Value="yy/MM-dd">yy/MM-dd</asp:ListItem>
                            <asp:ListItem Value="yy/MM/dd">yy/MM/dd</asp:ListItem>
                            <asp:ListItem Value="yyMMdd">yyMMdd</asp:ListItem>
                        </asp:DropDownList>
                        
                    </td>
                </tr>
                <tr>
                    <td class="RowTitle">
                        后台上传大小：
                    </td>
                    <td>
                        <cc1:NumericTextBox ID="NTB_AdminUploadSize" runat="server" Text="1000"></cc1:NumericTextBox>
                        &nbsp;KB
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="NTB_AdminUploadSize"
                            ErrorMessage="请输入后台上传大小"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="RowTitle">
                        后台上传文件扩展名：
                    </td>
                    <td>
                        <asp:TextBox ID="TB_AdminFileTypes" runat="server" Width="317px">.gif|.jpg|.swf|.rar|.zip|.mp3|.wmv</asp:TextBox>
                        (多个请用“|”格开，如：.gif|.jpg)
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="TB_AdminFileTypes"
                            ErrorMessage="请输入后台上传文件扩展名"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <hr style="padding: 0px; margin: 0px; border-width: 0px" />
                    </td>
                </tr>
                <tr>
                    <td class="RowTitle">
                        前台上传文件：
                    </td>
                    <td>
                        <asp:RadioButtonList ID="RBL_EnableMemberUpload" runat="server" RepeatDirection="Horizontal">
                            <asp:ListItem Value="1">允许有权限角色</asp:ListItem>
                            <asp:ListItem Value="0" Selected="True">全部禁止</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                </tr>
                <tr>
                    <td class="RowTitle">
                        前台上传目录：
                    </td>
                    <td>
                        <asp:RadioButtonList ID="RBL_MemberUploadPath" runat="server" RepeatDirection="Horizontal">
                            <asp:ListItem Selected="True" Value="1">以栏目上传目录为父目录</asp:ListItem>
                            <asp:ListItem Value="2">以会员上传目录为父目录</asp:ListItem>
                        </asp:RadioButtonList>
                       
                        <asp:DropDownList ID="DDL_MemberUploadPath" runat="server">
                            <asp:ListItem Value="">不设置下级目录</asp:ListItem>
                            <asp:ListItem Value="yy-MM-dd">yy-MM-dd</asp:ListItem>
                            <asp:ListItem Value="yy/MM-dd">yy/MM-dd</asp:ListItem>
                            <asp:ListItem Value="yy/MM/dd">yy/MM/dd</asp:ListItem>
                            <asp:ListItem Value="yyMMdd">yyMMdd</asp:ListItem>
                        </asp:DropDownList>
                       
                    </td>
                </tr>
                <tr>
                    <td class="RowTitle">
                        前台上传文件大小：
                    </td>
                    <td>
                        <cc1:NumericTextBox ID="NTB_MemberUploadSize" runat="server" Text="1000"></cc1:NumericTextBox>
                        &nbsp;KB
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" ControlToValidate="NTB_MemberUploadSize"
                            ErrorMessage="请输入前台上传文件大小"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="RowTitle">
                        前台上传文件扩展名：
                    </td>
                    <td>
                        <asp:TextBox ID="TB_MemberFileTypes" runat="server" Width="317px">.gif|.jpg|.swf|.rar|.zip|.mp3|.wmv</asp:TextBox>
                        &nbsp;&nbsp;(多个请用“|”格开，如：.gif|.jpg) <asp:RequiredFieldValidator
                         ID="RequiredFieldValidator10" runat="server" ControlToValidate="TB_MemberFileTypes"
                            ErrorMessage="请输入前台上传文件扩展名"></asp:RequiredFieldValidator>
                    </td>
                </tr>
            </table>
            <table style="width: 100%;" id="Tab4" class="TabelGrid">
                <tr>
                    <td class="RowTitle">
                        &nbsp; 后台录入默认审核？
                    </td>
                    <td>
                        <asp:RadioButtonList ID="RBL_AdminPass" runat="server" RepeatDirection="Horizontal">
                            <asp:ListItem Selected="True" Value="1">审核</asp:ListItem>
                            <asp:ListItem Value="0">不审核</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                </tr>
                <tr>
                    <td class="RowTitle">
                        自动评论审核：
                    </td>
                    <td>
                        <asp:RadioButtonList ID="RBL_CommentAutoPass" runat="server" RepeatDirection="Horizontal">
                            <asp:ListItem Selected="True" Value="1">审核</asp:ListItem>
                            <asp:ListItem Value="0">不审核</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                </tr>
                <tr>
                    <td class="RowTitle">
                        投稿功能：
                    </td>
                    <td>
                        <asp:RadioButtonList ID="RBL_Contribution" runat="server" RepeatDirection="Horizontal">
                            <asp:ListItem Selected="True" Value="1">开启</asp:ListItem>
                            <asp:ListItem Value="0">关闭</asp:ListItem>
                        </asp:RadioButtonList><br/> 如果选择“关闭”，保存以后会把本模型下所有栏目的投稿功能的设置全部设置为关闭。
                        
                    </td>
                </tr>
                <tr>
                    <td class="RowTitle">
                        搜索选项：
                    </td>
                    <td>
                        <asp:RadioButtonList ID="RBL_SearchOption" runat="server" RepeatDirection="Horizontal">
                            <asp:ListItem Value="1">标题</asp:ListItem>
                            <asp:ListItem Selected="True" Value="2">内容</asp:ListItem>
                            <asp:ListItem Value="3">标题和内容</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                </tr>
                <tr>
                    <td class="RowTitle">
                        前台分页：
                    </td>
                    <td>
                        <cc1:NumericTextBox ID="NTB_PageSize" runat="server" Text="20"></cc1:NumericTextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator52" runat="server" 
                            ControlToValidate="NTB_PageSize" ErrorMessage="请输入前台分页"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="RowTitle">
                        后台分页：
                    </td>
                    <td>
                        <cc1:NumericTextBox ID="NTB_PageSizeBackGround" runat="server" Text="10"></cc1:NumericTextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator53" runat="server" 
                            ControlToValidate="NTB_PageSizeBackGround" ErrorMessage="请输入后台分页"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="RowTitle">
                        几天内属于新数据？
                    </td>
                    <td>
                        <cc1:NumericTextBox ID="NTB_NewSignKeep" runat="server">0</cc1:NumericTextBox>
                        <br />
                        用于显示new标志。<br />
                        如果为0将不区别新旧数据。
                    </td>
                </tr>
            </table>
            <div style="text-align: center; margin-top: 10px">
                <cc1:ButtonX ID="BT_OK" runat="server" CssClass="btn" Text="添加" ToDo="ClickOnce"
                    OnClick="BT_OK_Click" HasValidateControl="True" />
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
 
    </form>
</body>
</html>
