<%@ Page Language="C#"  CodeBehind="usergroupsendemail.aspx.cs" Inherits="Focus.Admin.usergroupsendemail" %>
<%@ Register Assembly="Focus.Control" Namespace="Focus.Control" TagPrefix="cc1" %>
<%@ Register Assembly="YYControls" Namespace="YYControls" TagPrefix="yyc" %>
<%@ Register TagPrefix="uc1" TagName="TextareaResize" Src="UserControls/TextareaResize.ascx" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>批量邮件发送</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="styles/style.css" type="text/css" rel="stylesheet" />
    <meta content="MSHTML 6.00.3790.0" name="GENERATOR" />
</head>
<body leftmargin="5" topmargin="5" rightmargin="5" bottommargin="5" background="images/main_bg.gif">
    <form id="Form1" runat="server">
        <table class="TdBg" cellspacing="1" cellpadding="0" width="100%" border="0">
            <tbody>
                <tr valign="middle">
                    <td class="Tdimg" style="padding-left: 10px" height="28" colspan="2">
                        <img height="18" src="images/bbs_find.gif" width="18" align="absMiddle" border="0">
                        <strong>批量邮件发送</strong>
                    </td>
                </tr>
                <tr class="TdBgL">
                    <td style="padding-right: 10px; width: 150px;" height="22" align="right">
                        要邮件发送给谁?
                    </td>
                    <td style="padding-right: 3px; padding-left: 3px; padding-bottom: 3px; padding-top: 3px">
                        <input type="radio" name="sendobject" onclick="changelayer('user');" checked="checked" value="0" />&nbsp;用户&nbsp;&nbsp;&nbsp;&nbsp;
                        <input type="radio" name="sendobject" onclick="changelayer('usergroup');" value="1" />&nbsp;用户组
                    </td>
                </tr>
            </tbody>
        </table>
        <div id="user" style="width: 100%; ">
            <table class="TdBg" cellspacing="1" cellpadding="0" width="100%" border="0">
                <tbody>
                    <tr class="TdBgL">
                        <td style="padding-right: 10px; width: 150px;" height="22" align="right">
                            接收邮件用户名称：
                        </td>
                        <td style="padding-right: 3px; padding-left: 3px; padding-bottom: 3px; padding-top: 3px">
                            <cc1:TextBox ID="usernamelist" runat="server" CanBeNull="可为空" RequiredFieldType="暂无校验" Width="400" Height="40" TextMode="MultiLine"></cc1:TextBox>多个用户以逗号(,)进行分割
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div id="usergroup" style="width: 100%; display: none">
            <table class="TdBg" cellspacing="1" cellpadding="0" width="100%" border="0">
                <tbody>
                    <tr class="TdBgL">
                        <td style="padding-right: 10px; width: 150px;" height="22" align="right">
                            接收邮件的用户组：
                        </td>
                        <td style="padding-right: 3px; padding-left: 3px; padding-bottom: 3px; padding-top: 3px">
                            <yyc:SmartTreeView ID="TreeView1" runat="server" AllowCascadeCheckbox="True" ShowLines="True">
                        </yyc:SmartTreeView>
                        </td>
                    </tr>
                    <tr class="TdBgL">
                        <td style="padding-right: 10px; width: 150px;" height="22" align="right">
                            导出Email：
                        </td>
                        <td style="padding-right: 3px; padding-left: 3px; padding-bottom: 3px; padding-top: 3px">
                            <input type="hidden" name="flag" id="flag" /><a href = "#" onclick="document.getElementById('flag').value=1;Form1.submit()">导出所有选中用户组用户的Email</a>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        
        <table class="TdBg" cellspacing="1" cellpadding="0" width="100%" border="0">
            <tbody>
               <tr class="TdBgL">
                    <td style="padding-right: 10px; width: 150px;" height="22" align="right">
                        邮件标题：
                    </td>
                    <td style="padding-right: 3px; padding-left: 3px; padding-bottom: 3px; padding-top: 3px">
                        <cc1:TextBox ID="subject" runat="server" Width="300"></cc1:TextBox>
                    </td>
                </tr>
                <tr class="TdBgL">
                    <td style="padding-right: 10px; width: 150px;" height="22" align="right">
                        邮件内容：
                    </td>
                    <td style="padding-right: 3px; padding-left: 3px; padding-bottom: 3px; padding-top: 3px">
                        <uc1:TextareaResize ID="body" runat="server" controlname="TabControl1:tabPage51:body" rows="18" cols="80"></uc1:TextareaResize>
                    </td>
                </tr>
                <tr class="TdBgL">
                    <td height="35" style="width: 110px">
                        &nbsp;
                    </td>
                    <td style="padding-left: 10px">
                        &nbsp;
                        <cc1:Button ID="Button1" runat="server" OnClick="Button1_Click" Text=" 发 送 " />
                    </td>
                </tr>
            </tbody>
        </table>        
        <script type="text/javascript">
        function changelayer(objectname)
        {
            if(objectname == "user")
            {
                document.getElementById("user").style.display = 'block';
                document.getElementById("usernamelist").focus();
                document.getElementById("usergroup").style.display = 'none';
            }
            else
            {
                document.getElementById("usergroup").style.display = 'block';
                document.getElementById("usernamelist").value = "";
                document.getElementById("user").style.display = 'none';
            }
        }
    </script>
    </form>
</body>
</html>
