<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PostReminder.aspx.cs" Inherits="MTCUN.Admin.PostReminder"
    Title="发布系统提醒-系统" %>

<%@ Import Namespace="MTCUN" %>
<%@ Register Src="../UserCol/CodeBox.ascx" TagName="CodeBox" 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 id="Head1" runat="server">
    <title></title>
    <link id="linkStyle" runat="server" href="../Themes/Blue/css.css" rel="stylesheet"
        type="text/css" />
    <script type="text/javascript">
        var h1 = 150;
        function AddHeight(num) {
            var div = document.getElementById("tbxCountSql_div_HtmlBox");
            if (num < 0 && h1 < 150) {

            } else {
                h1 += num;
            }

            if (h1 > 0) {
                div.style.height = h1 + "px";
            }

            document.getElementById("tbxCountSql_codeboxheight").value = h1;
        }

        var h2 = 150;
        function AddHeight2(num) {
            var div = document.getElementById("tbxContentSql_div_HtmlBox");
            if (num < 0 && h2 < 150) {

            } else {
                h2 += num;
            }

            if (h2 > 0) {
                div.style.height = h2 + "px";
            }

            document.getElementById("tbxContentSql_codeboxheight").value = h2;
        }


        function insertText(editid, text) {

            var editor = document.getElementById(editid);
            var editorDoc = editor.contentWindow.document;
            var editorWindow = editor.contentWindow;


            if (editor != null) {
                editor.focus();
                if (editorDoc.selection && editorDoc.selection.createRange) {
                    var r = editorDoc.selection.createRange();
                    r.text = text;
                } else {
                    editorDoc.body.innerHTML += text;
                }
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="divpanel">
        <table class="table" cellspacing="0">
            <tr>
                <th colspan="2">
                    系统提醒设置
                </th>
            </tr>
            <tr>
                <td align="right">
                    标&nbsp;&nbsp;&nbsp; 题：
                </td>
                <td>
                    <asp:TextBox runat="server" ID="tbxTitle" Width="288px"></asp:TextBox>
                    <span style="color: Red">*</span>
                    <asp:RequiredFieldValidator ID="_tbxTitle" runat="server" ControlToValidate="tbxTitle"
                        ErrorMessage="请输入标题！"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td align="right">
                    提示消息：
                </td>
                <td>
                    <asp:TextBox runat="server" ID="tbxMessage" Width="288px"></asp:TextBox>
                    <span style="color: Red">*</span>
                    <asp:RequiredFieldValidator ID="_tbxMessage" runat="server" ControlToValidate="tbxMessage"
                        ErrorMessage="请输入提示消息！"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td align="right">
                    &nbsp;
                </td>
                <td class="style4">
                    <label class="lab_button">
                        <input id="btnAddHeight" onclick="AddHeight(50);" title="加高编辑器" type="button" value="+" />
                    </label>
                    <label class="lab_button">
                        <input id="btnClearHeight" onclick="AddHeight(-50);" title="减高编辑器" type="button"
                            value="-" />
                    </label>
                    <label class="lab_button">
                        <input id="Button1" type="button" unselectable="on" value="{@SchoolID}" onclick="insertText('tbxCountSql_HtmlEdit', ' in ({@SchoolID})')"
                            title="当前登录校区，全局管理显示所有校区数据" />
                    </label>
                    <label class="lab_button">
                        <input id="Button2" type="button" unselectable="on" value="{@UserID}" onclick="insertText('tbxCountSql_HtmlEdit', ' {@UserID}')"
                            title="当前登录用户工号" />
                    </label>
                </td>
            </tr>
            <tr>
                <td align="right">
                    数量查询：
                </td>
                <td class="style4">
                    <div style="float: left; width: 65%">
                        <uc1:CodeBox ID="tbxCountSql" runat="server" Width="100%" Height="150px" />
                    </div>
                    <div style="float: left">
                        <span style="color: Red; margin-left: 10px">*</span></div>
                    <div style="clear: both">
                    </div>
                </td>
            </tr>
            <tr>
                <td align="right">
                    &nbsp;
                </td>
                <td>
                    <label class="lab_button">
                        <input id="btnAddHeight2" onclick="AddHeight2(50);" title="加高编辑器" type="button" value="+" />
                    </label>
                    <label class="lab_button">
                        <input id="btnClearHeight2" onclick="AddHeight2(-50);" title="减高编辑器" type="button"
                            value="-" />
                    </label>
                    <label class="lab_button">
                        <input id="Button3" type="button" unselectable="on" value="{@SchoolID}" onclick="insertText('tbxContentSql_HtmlEdit', ' in ({@SchoolID})')"
                            title="当前登录校区，全局管理显示所有校区数据" />
                    </label>
                    <label class="lab_button">
                        <input id="Button4" type="button" unselectable="on" value="{@UserID}" onclick="insertText('tbxContentSql_HtmlEdit', ' {@UserID}')"
                            title="当前登录用户工号" />
                    </label>
                </td>
            </tr>
            <tr>
                <td align="right">
                    展开查询：
                </td>
                <td>
                    <uc1:CodeBox ID="tbxContentSql" runat="server" Width="65%" Height="150px" />
                </td>
            </tr>
            <tr>
                <td align="right">
                    重定向：
                </td>
                <td>
                    <asp:TextBox ID="tbxNavigateUrl" runat="server" Width="281px"></asp:TextBox>
                    &nbsp;目标窗口：<asp:TextBox ID="tbxTarget" runat="server" Width="82px">_blank</asp:TextBox>
                </td>
            </tr>
            <tr>
                <td align="right">
                    访问权限：
                </td>
                <td>
                    <table>
                        <tr>
                            <td>
                                已选用户/组<asp:DropDownList ID="ddlAllow" runat="server">
                                    <asp:ListItem Value="0">禁止访问</asp:ListItem>
                                    <asp:ListItem Value="1">允许访问</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                            <td>
                                &nbsp;
                            </td>
                            <td>
                                <asp:DropDownList ID="ddlGroupAndUsers" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlGroupAndUsers_SelectedIndexChanged">
                                    <asp:ListItem Value="0">所有用户组</asp:ListItem>
                                    <asp:ListItem Value="1">所有用户</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:ListBox ID="lbxSelected" runat="server" Height="129px" Width="150px" SelectionMode="Multiple">
                                </asp:ListBox>
                            </td>
                            <td>
                                <label class="lab_button">
                                    <asp:Button ID="btnAdd" runat="server" Text="&lt;加入" OnClick="btnAdd_Click" />
                                </label>
                                <br />
                                <br />
                                <label class="lab_button">
                                    <asp:Button ID="btnClear" runat="server" Text="移除&gt;" OnClick="btnClear_Click" />
                                </label>
                            </td>
                            <td>
                                <asp:ListBox ID="lbxGroupAndUsers" runat="server" Height="129px" Width="150px" SelectionMode="Multiple">
                                </asp:ListBox>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td align="right">
                    状态：
                </td>
                <td>
                    <asp:RadioButtonList ID="rblLockState" runat="server" Width="120px" RepeatDirection="Horizontal">
                        <asp:ListItem Value="0" Text="禁用"></asp:ListItem>
                        <asp:ListItem Value="1" Text="启用"></asp:ListItem>
                    </asp:RadioButtonList>
                </td>
            </tr>
            <tr>
                <td align="right">
                    备注：
                </td>
                <td>
                    <asp:TextBox ID="tbxRemark" runat="server" Width="358px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td align="right">
                </td>
                <td>
                    <label class="lab_button">
                        <asp:Button ID="btnSubmit" runat="server" Text="提交" OnClick="btnSubmit_Click"></asp:Button>
                    </label>
                    <label class="lab_button" id="__mt_labBack" runat="server">
                        <input causesvalidation="false" type="button" runat="server" onclick="back(this)" value="返回" />
                    </label>
                </td>
            </tr>
        </table>
    </div>
    <input id="tbxCountSql_codeboxheight" name="tbxContent_codeboxheight" type="hidden"
        value="150" />
    <input id="tbxContentSql_codeboxheight" name="tbxContentSql_codeboxheight" type="hidden"
        value="150" />
    </form>
</body>
</html>
