<%@ Page Language="c#" Inherits="Web.User.forwardmessageboard" CodeBehind="forwardmessageboard.aspx.cs" %>

<!DOCTYPE html>
<!--[if lt IE 9]><html class="lte-ie8"><![endif]-->
<!--[if gt IE 8]><!-->
<html>
<!--<![endif]-->
<head>
    <title>Forward MessageBoard</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!--#include file = "../Css/userCssEdit.htm" -->


</head>
<body>
    <form id="myform" method="post" runat="server">
    <input id="selectedTxt" runat="server" type="hidden" />
    <asp:ScriptManager ID="ScriptManager1" runat="server">
        <Services>
            <asp:ServiceReference Path="~/Service/zmkm.asmx" />
            <asp:ServiceReference Path="~/Service/ForwardMessageService.asmx" />
        </Services>
    </asp:ScriptManager>
    <div class="edit-func-box func-box">
        <div class="hd">
            留言本转发</div>
        <div class="bd">
            <table class="edit-table">
                <tbody>
                    <tr>
                        <th>
                            姓&nbsp;&nbsp;&nbsp;&nbsp;名：
                        </th>
                        <td>
                            <asp:TextBox ID="AuthorTextBox" class="input-md" runat="server" ReadOnly="true"
                                Enabled="false"></asp:TextBox>
                            <asp:TextBox ID="name" runat="server" Visible="False"></asp:TextBox>
                        </td>
                        <th>
                            性 别：
                        </th>
                        <td>
                            <asp:RadioButtonList ID="Sex" runat="server" RepeatDirection="Horizontal" Enabled="false">
                                <asp:ListItem Value="男" Selected="True">男</asp:ListItem>
                                <asp:ListItem Value="女">女</asp:ListItem>
                            </asp:RadioButtonList>
                        </td>
                    </tr>
                    <tr>
                        <th>
                            联系方式：
                        </th>
                        <td>
                            <asp:TextBox ID="TelTextBox" class="input-md" runat="server" ReadOnly="true" Enabled="false"></asp:TextBox>
                        </td>
                        <th>
                            电子邮箱：
                        </th>
                        <td>
                            <asp:TextBox ID="EmailTextBox" class="input-md" runat="server" ReadOnly="true" Enabled="false"></asp:TextBox>
                        </td>
                    </tr>
                    <tr >
                        <th>
                                主&nbsp;&nbsp;&nbsp;&nbsp;页：
                        </th>
                        <td  colspan="3">
                            <asp:TextBox ID="HomePageTextBox" runat="server" class="input-md w3" ReadOnly="true" Enabled="false">Http://</asp:TextBox>
                        </td>
                    </tr>
                    <tr >
                        <th>
                                属&nbsp;&nbsp;&nbsp;&nbsp;性：
                        </th>
                        <td colspan="3" height="20">
                            &nbsp;显示等级：
                            <asp:DropDownList ID="grade" runat="server" Width="68px" DataTextField="name" DataValueField="pkId"
                                Enabled="false">
                            </asp:DropDownList>
                            &nbsp;浏览权限：
                            <asp:DropDownList ID="gate" runat="server" Width="70px" Enabled="false">
                                <asp:ListItem Value="0">无限制</asp:ListItem>
                                <asp:ListItem Value="1">仅内网可见</asp:ListItem>
                                <asp:ListItem Value="2">仅登录可见</asp:ListItem>
                                <asp:ListItem Value="3">内网或登录可见</asp:ListItem>
                            </asp:DropDownList>
                            &nbsp;
                            <asp:CheckBox ID="isTop" runat="server" Text="固顶" Enabled="false"></asp:CheckBox>&nbsp;&nbsp;&nbsp;
                            <asp:Label ID="IpLabel" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr runat="server" visible='<%# IsAskAnswer== 0 ? true : false %>'>
                        <th>
                            标&nbsp;&nbsp;&nbsp; 题：
                        </th>
                        <td colspan="3">
                            <asp:TextBox ID="TitleTextBox" class="input-md w3" runat="server" ReadOnly="true"
                                Enabled="false"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <th>
                            留言内容：
                        </th>
                        <td>
                            <asp:TextBox ID="ContentTextBox" runat="server" Width="400px" Height="150px" TextMode="MultiLine"
                                ReadOnly="true" Enabled="false"></asp:TextBox>
                        </td>
                        <td >
                            <div>
                                转发到:<br />
                                <br />
                            </div>
                        </td>
                        <td>
                            <div>
                                <input type="button" id="ListBtn" onclick="showList()" value="打开通讯录,选择转发人员" />
                                <br />
                                <br />
                            </div>
                            <div>
                                <asp:Button ID="Save" runat="server" class="btn btn-sm btn-primary" Text="发送" OnClientClick="saveSelected()"
                                    OnClick="Save_Click"></asp:Button>
                            </div>
                        </td>
                    </tr>
                    <tr runat="server" visible='<%# IsAskAnswer== 0 ? true : false %>'>
                        <th>
                            是否保密：
                        </th>
                        <td colspan="3">
                            <asp:CheckBox ID="IsSecrecy" runat="server" Text="该条信息保密" Enabled="false"></asp:CheckBox>
                        </td>
                    </tr>
                    <asp:Panel ID="RePanel" runat="server" Visible="False">
                        <tr>
                            <th>
                                回复内容：
                            </th>
                            <td colspan="3">
                                <asp:TextBox ID="ReContentTextBox" runat="server" Width="400px" TextMode="MultiLine"
                                    Height="100px" Enabled="false"></asp:TextBox>
                            </td>
                        </tr>
                    </asp:Panel>
                </tbody>
            </table>
        </div>
        <div class="ft">
            <div class="action-field text-center">
                <input class="btn btn-sm btn-primary" type="submit" value="保存" />
                <input class="btn btn-sm btn-primary" type="reset" value="重置" />
            </div>
            <!--/action-field-->
        </div>
    </div>
    </form>
     <!--#include file = "../Css/foot.htm" -->
    <script language="javascript" type="text/javascript">

        var userInArray = [];
        var userOutArray = [];
        function showList() {
            userOutArray = window.showModalDialog("../Customize/jbedu/iframe.aspx", userInArray, "dialogWidth=775px;dialogHeight=560px");
        }


        function saveSelected() {
            var selectedTxt = document.getElementById("<%=selectedTxt.ClientID %>");
            selectedTxt.value = "";

            for (var loop = 0; loop < userOutArray.length; loop++) {
                var Forward = userOutArray[loop].split('#');
                var optionName = Forward[1];
                var optionValue = Forward[3];
                debugger;
                selectedTxt.value += optionValue + "@" + optionName + "|";
            }
        }
    </script>
</body>
</html>
