<%@ page language="C#" autoeventwireup="true" inherits="admin_model_SetInsertWeb, DianCMS" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Import Namespace="D.BLL" %>
<%@ Import Namespace="D.Common" %>
<!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 id="CssName" rel="stylesheet" type="text/css" runat="server" />

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

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

    <script src="../../js/lhgdialog/lhgcore.lhgdialog.min.js?self=true&skin=<%=Function.GetCssNameColor()%>" type="text/javascript"></script>

    <script type="text/javascript" src="../../js/<%=B_Lang.getLang() %>/Copy.js"></script>

    <script type="text/javascript">
        function Show(obj) {
            var TypeCount = document.getElementsByName(obj.id);
            var p = 0;
            if (navigator.appName == "Microsoft Internet Explorer") {
                p = 1;
            }
            for (var i = p; i < TypeCount.length; i++) {
                if (TypeCount[i].checked) {
                    if (TypeCount[i].value == "2") {
                        DianCMS_$("txtTemplate").value = "/系统模板/用户后台模型_表单通用录入界面.html";
                    }
                    else {
                        DianCMS_$("txtTemplate").value = "/系统模板/管理员后台模型_表单通用录入界面.html";
                    }
                }
            }
        }
    </script>

</head>
<body>
    <form id="form1" runat="server" onkeydown="Save()">
    <table class="dh" cellpadding="0" cellspacing="0" border="0" align="center">
        <tr>
            <td>
                <asp:Image ID="P_Go" runat="server" ImageAlign="AbsMiddle" />
                您现在的位置：<a href="../info.aspx">后台管理</a> >> <a href="InsertWeb.aspx">录入界面列表</a> >>
                录入界面
            </td>
        </tr>
    </table>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <table class="border" cellspacing="1" cellpadding="0" border="0" align="center">
                <tr>
                    <td class="bqleft">
                        录入界面名称：
                    </td>
                    <td class="bqright">
                        <asp:TextBox ID="txtName" runat="server" CssClass="in1"></asp:TextBox>
                        在添加信息或用户投稿显示的文字（如：发布信息）
                    </td>
                </tr>
                <tr>
                    <td class="bqleft">
                        录入界面别名：
                    </td>
                    <td class="bqright">
                        <asp:TextBox ID="txtAlias" runat="server" CssClass="in1"></asp:TextBox>
                        主要用于区别多个相同录入界面名称（如： 个人会员发布信息，企业会员发布信息）
                    </td>
                </tr>
                <tr>
                    <td class="bqleft">
                        选择模型：
                    </td>
                    <td class="bqright">
                        <asp:DropDownList ID="dropModelName" runat="server" AutoPostBack="True" OnSelectedIndexChanged="dropModelName_SelectedIndexChanged">
                            <asp:ListItem Value="0">选择模型</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="bqleft">
                        是否启用：
                    </td>
                    <td class="bqright">
                        <asp:CheckBoxList ID="IsEnabled" runat="server" RepeatDirection="Horizontal">
                            <asp:ListItem Value="1" Selected="True">启用</asp:ListItem>
                        </asp:CheckBoxList>
                    </td>
                </tr>
                <tr>
                    <td class="bqleft">
                        使用性质：
                    </td>
                    <td class="bqright">
                        <asp:RadioButtonList ID="IsUse" runat="server" RepeatDirection="Horizontal" onclick="Show(this)">
                            <asp:ListItem Value="1" Selected="True">管理员后台</asp:ListItem>
                            <asp:ListItem Value="2">用户投稿</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                </tr>
                <tr>
                    <td class="bqleft">
                        游客投稿：
                    </td>
                    <td class="bqright">
                        <asp:CheckBox ID="IsGuest" runat="server" Text="允许" />
                        <font color="red">注：使用性质为用户投稿时生效</font>
                    </td>
                </tr>
                <tr>
                    <td class="bqleft">
                        默认用户投稿：
                    </td>
                    <td class="bqright">
                        <table cellpadding="0" cellspacing="0" border="0">
                            <tr>
                                <td>
                                    <asp:RadioButtonList ID="IsDefault" runat="server" RepeatDirection="Horizontal">
                                        <asp:ListItem Value="True">是</asp:ListItem>
                                        <asp:ListItem Selected="True" Value="False">否</asp:ListItem>
                                    </asp:RadioButtonList>
                                </td>
                                <td>
                                    <font color="red">注：同一个模型只允许一个默认用户投稿</font>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td class="bqleft">
                        读入模板：
                    </td>
                    <td class="bqright">
                        <asp:TextBox ID="txtTemplate" runat="server" Columns="60" CssClass="in1" Style="float: left"></asp:TextBox>
                        <input id="Button7" type="button" value="选择模板" class="btn" onclick="WinOpenLhgDialog('选择模板','../template/SelectTemplate.aspx?ControlId=txtTemplate',650,450,'')"
                            style="float: left" /><font color="#ff0066">*</font>
                    </td>
                </tr>
                <tr>
                    <td class="bqleft">
                        模型字段：
                    </td>
                    <td class="bqright">
                        <asp:DataList ID="DataList1" runat="server" RepeatColumns="6" RepeatDirection="Horizontal"
                            Width="100%">
                            <ItemTemplate>
                                <div onclick="CreateRange('txtHtml','{D_F_<%# Eval("Name") %>}')" class="fieldstyle" title="点击选择该字段到录入界面">
                                    <%# Eval("Alias")%>
                                </div>
                            </ItemTemplate>
                        </asp:DataList>
                    </td>
                </tr>
                <tr>
                    <td class="bqleft">
                        备用代码：
                    </td>
                    <td class="bqright">
                        <input id="Button1" type="button" value="<table>" class="btn" onclick="Win_Open('../common/table.aspx?Control=txtHtml','','550','415')" />
                        <input id="Button2" type="button" value="<tr></tr>" class="btn" onclick="CreateRange('txtHtml','<tr></tr>')" />
                        <input id="Button3" type="button" value="<td></td>" class="btn" onclick="CreateRange('txtHtml','<td></td>')" />
                        <input id="Button4" type="button" value="<div>" class="btn" onclick="Win_Open('../common/div.aspx?Control=txtHtml','','550','150')" />
                    </td>
                </tr>
                <tr>
                    <td class="bqleft">
                        录入HTML：
                        <br />
                        {D_C_Html}
                    </td>
                    <td class="bqright">
                        <asp:TextBox ID="txtHtml" runat="server" Width="99%" Height="300" TextMode="MultiLine"></asp:TextBox><br />
                        <table width="99%" cellpadding="0" cellspacing="0" border="0">
                            <tr>
                                <td bgcolor="#e0dfe3" align="right">
                                    <a href="javascript:" onclick="runEx('txtHtml')">
                                        <img src="../images/PreView.gif" border="0" title="预览录入界面" /></a> <a href="javascript:"
                                            onclick="copyToClipboard(document.form1.txtHtml.value)">
                                            <img src="../images/copy.gif" border="0" title="复制录入界面" style="margin-left: 20px" /></a>
                                    <a href="javascript:" onclick="SizePlus('txtHtml')" title="增加编辑高度">
                                        <img src="../images/sizeplus.gif" border="0" style="margin-left: 20px;" /></a>
                                    <a href="javascript:" onclick="SizeMinus('txtHtml')">
                                        <img src="../images/sizeminus.gif" border="0" title="减少编辑高度" style="margin-left: 20px;
                                            margin-right: 20px" /></a>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td class="bqleft">
                        生成Aspx.cs方式：
                    </td>
                    <td class="bqright">
                        <asp:RadioButtonList ID="RadAspxcs" runat="server" RepeatDirection="Horizontal">
                            <asp:ListItem Value="0" Selected="True">系统默认</asp:ListItem>
                            <asp:ListItem Value="1">手动输入</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                </tr>
                <tr>
                    <td class="bqleft">
                    </td>
                    <td class="bqright" height="50">
                        <asp:Button ID="DianCMS_Submit" runat="server" Text=" 提交(Ctrl+s) " CssClass="btn radius30 pad_0_30"
                            OnClick="Button5_Click" />&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:Button ID="Button8" runat="server" Text="提交并生成" CssClass="btn radius30 pad_0_30" OnClick="Button5_Click" />
                        &nbsp;&nbsp;&nbsp;&nbsp;<input id="Button6" type="button" value=" 返回列表 " onclick="window.location.href='insertweb.aspx'"
                            class="btn radius30 pad_0_30" />
                    </td>
                </tr>
            </table>
        </ContentTemplate>
    </asp:UpdatePanel>
    </form>
</body>
</html>
