<%@ Page Language="C#" AutoEventWireup="true" Codebehind="Admin_Email.aspx.cs" Inherits="MyITJob.Admin.Admin_Email" %>

<!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 href="../images/Admin_Style.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../FTB/ckeditor.js"></script>
    <script type="text/javascript" src="../ckfinder/ckfinder.js"></script>
	<script src="../FTB/sample.js" type="text/javascript"></script>
	<link href="../FTB/sample.css" rel="stylesheet" type="text/css"/>
</head>

<script language="javascript" type="text/javascript">
// 隐藏表单
function show(n) {
	for(var i=1; i<=4; i++) {
		var box = document.getElementById("div_" + i);
		if(n != i) {
			box.style.display = 'none';
		} else {
			box.style.display = 'block';	
		}
	}
}
</script>

<body style="font-family:Verdana;">
    <form id="form1" runat="server">
        <table width="100%" border='0' align='center' cellpadding='2' cellspacing='1' class='border'>
            <tr class='topbg'>
                <td height='22' colspan='10'>
                    <table width='100%'>
                        <tr class='topbg'>
                            <td align='center'>
                                <b>网 站 邮 件 管 理</b></td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr class='tdbg'>
                <td width='70' height='30'>
                    <strong>管理导航：</strong></td>
                <td>
                    <ul>
                        <li><a href="#" onclick="show(1);">群发邮件页面</a></li>
                        <li><a href="#" onclick="show(2);">指定邮件页面</a></li>
                        <li><a href="#" onclick="show(3);">邮箱参数设置</a></li>
                        <li><a href="#" onclick="show(4);">邮箱内容设置</a></li>
                    </ul>
                </td>
            </tr>
        </table>
        <br />
        <div id="div_1">
            <table width="100%" border='0' align='center' cellpadding='4' cellspacing='1' class='border'>
                <tr class='topbg2'>
                    <td colspan="2" align='center'>
                        <strong class="Glow">群 发 邮 件 表 单</strong></td>
                </tr>
                <tr class='tdbg'>
                    <td width="14%" class="tdbg2">
                        <strong>指定发送用户群：</strong></td>
                    <td width="86%">
                        <asp:RadioButtonList ID="RadioButtonList1" runat="server" RepeatDirection="Horizontal">
                            <asp:ListItem Selected="True" Value="Email_Company">给企业发送邮件</asp:ListItem>
                            <asp:ListItem Value="Email_Person">给求职者发送邮件</asp:ListItem>
                            <asp:ListItem Value="Email_Admin">给管理员发送邮件</asp:ListItem>
                        </asp:RadioButtonList></td>
                </tr>
                <tr class='tdbg'>
                    <td class="tdbg2">
                        <strong>邮件标题： </strong>
                    </td>
                    <td>
                        <asp:TextBox ID="All_SendText" runat="server" Width="249px"></asp:TextBox></td>
                </tr>
                <tr class='tdbg'>
                    <td class="tdbg2">
                        <strong>邮件正文：</strong></td>
                    <td>
                        <textarea cols="80" id="FreeTextBox1" name="FreeTextBox1" rows="10" runat="server"></textarea>
				                    <script type="text/javascript">
				                    //<![CDATA[
					                    CKEDITOR.replace( 'FreeTextBox1',
						                    {
							                    skin : 'v2',
							                    filebrowserBrowseUrl : '/ckfinder/ckfinder.htm',
                                                filebrowserImageBrowseUrl : '/ckfinder/ckfinder.htm?Type=Images',
                                                filebrowserFlashBrowseUrl : '/ckfinder/ckfinder.htm?Type=Flash',
                                                filebrowserUploadUrl : '/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Files',
                                                filebrowserImageUploadUrl : '/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Images',
                                                filebrowserFlashUploadUrl : '/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Flash'
						                    });
				                    //]]>
				                    </script>
                    </td>
                </tr>
            </table>
            <div style="margin: 10px; text-align: center;">
                <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="发送邮件" /> 
                &nbsp;<asp:Button ID="Button2" runat="server" Text="提取邮件列表" 
                    onclick="Button2_Click" />
                <br />
            </div>
        </div>
        <div id="div_2" style="display:none;">
            <table width='100%' border='0' align='center' cellpadding='4' cellspacing='1' class='border'>
                <tr class='topbg2'>
                    <td colspan="2" align='center'>
                        <strong class="Glow">指 定 邮 件 表 单</strong></td>
                </tr>
                <tr class='tdbg'>
                    <td width="17%" class="tdbg2">
                        <strong>提取N天未修改资料的企业：</strong></td>
                    <td width="83%">
                        <asp:TextBox ID="select_time" MaxLength="3" runat="server" onkeyup="if(isNaN(value))execCommand('undo')" Width="73px"></asp:TextBox>
                        <asp:Button ID="recover_outtime" runat="server" Text="开始提取" OnClick="recover_outtime_Click1" /></td>
                </tr>                <tr class='tdbg'>
                    <td class="tdbg2">
                        <strong>指定发送用户邮箱地址：</strong></td>
                    <td width="83%">
                        <asp:TextBox ID="TextBox1" runat="server" Width="459px" Height="45px" TextMode="MultiLine"></asp:TextBox>
                        填写指定发送人的邮箱地址，支持多人群发，用英文字符<font color="red">&quot;,&quot;</font>分开。（格式：Email1@xx.com<font color="red">,</font>Email2@xx.com）</td>
                </tr>
                <tr class='tdbg'>
                    <td class="tdbg2">
                        <strong>邮件标题： </strong>
                    </td>
                    <td>
                        <asp:TextBox ID="Single_SendText" runat="server" Width="249px"></asp:TextBox></td>
                </tr>
                <tr class='tdbg'>
                    <td class="tdbg2">
                        <strong>邮件正文：</strong></td>
                    <td>
                        <textarea cols="80" id="FreeTextBox2" name="FreeTextBox2" rows="10" runat="server"></textarea>
				                    <script type="text/javascript">
				                    //<![CDATA[
					                    CKEDITOR.replace( 'FreeTextBox2',
						                    {
							                    skin : 'v2'
						                    });
				                    //]]>
				                    </script>
                    </td>
                </tr>
            </table>
            <div style="margin: 10px; text-align: center;">
                <asp:Button ID="Single_Button2" runat="server" Text="发送邮件" OnClick="Single_Button2_Click" />&nbsp;</div>
        </div>
        <div id="div_3" style="display:none">
            <table width='100%' border='0' align='center' cellpadding='4' cellspacing='1' class='border'>
                <tr class='topbg2'>
                    <td colspan="2" align='center'>
                        <strong class="Glow">邮 箱 参 数 设 置</strong></td>
                </tr>
                <tr class='tdbg'>
                    <td class="tdbg2">
                        <strong>SMTP服务器地址：<br />
                        </strong>设置用于SMTP的事务的主机名称或IP地址。</td>
                    <td width="76%">
                        <asp:TextBox ID="SMTP_IP" runat="server" Width="221px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="SMTP_IP"
                            ErrorMessage="该项不能为空"></asp:RequiredFieldValidator></td>
                </tr>
                <tr class='tdbg'>
                    <td class="tdbg2">
                        <strong>SMTP服务器端口号：<br />
                        </strong><span class="STYLE4">设置用于SMTP的事务端口。</span></td>
                    <td>
                        <asp:TextBox ID="SMTP_POST" runat="server" Width="221px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="SMTP_POST"
                            ErrorMessage="该项不能为空"></asp:RequiredFieldValidator><asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="SMTP_POST" ErrorMessage="端口地址非法" ValidationExpression="\d{2,6}"></asp:RegularExpressionValidator></td>
                </tr>
                <tr class='tdbg'>
                    <td class="tdbg2">
                        <strong>发件人邮箱地址：<br />
                        </strong><span class="STYLE4">如：xxxx@xxx.xxx。</span></td>
                    <td>
                        <asp:TextBox ID="Send_User" runat="server" Width="221px" onblur="checkemail();"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="Send_User"
                            ErrorMessage="该项不能为空"></asp:RequiredFieldValidator><asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="邮箱地址非法" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ControlToValidate="Send_User"></asp:RegularExpressionValidator></td>
                </tr>
                <tr class='tdbg'>
                    <td class="tdbg2">
                        <strong>发件人邮箱密码：<br />
                        </strong>
                    </td>
                    <td>
                        <asp:TextBox ID="Send_Pwd" runat="server" Width="221px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="Send_Pwd"
                            ErrorMessage="该项不能为空"></asp:RequiredFieldValidator></td>
                </tr>
                <tr class='tdbg'>
                    <td class="tdbg2">
                        <strong>是否使用安全套接字层(SSL)加密连接：<br />
                        </strong><span class="STYLE4">该选择项视发送方的SMTP服务器安全设置而定。</span></td>
                    <td>
                        <asp:RadioButtonList ID="CheckBoxList1" runat="server" RepeatDirection="Horizontal">
                            <asp:ListItem Selected="True" Value="1">使用SSL</asp:ListItem>
                            <asp:ListItem Value="0">禁用SSL</asp:ListItem>
                        </asp:RadioButtonList></td>
                </tr>
            </table>
            <div style="margin: 10px; text-align: center;">
                <asp:Button ID="Email_Setting" runat="server" Text="确认参数设置" OnClick="Email_Setting_Click" /></div>
        </div>
        <div id="div_4" style="display:none">
            <table width='100%' border='0' align='center' cellpadding='4' cellspacing='1' class='border'>
                <tr class='topbg2'>
                    <td colspan="2" align='center'>
                        <strong class="Glow">邮 箱 内 容 设 置</strong></td>
                </tr>
                <tr class='tdbg'>
                    <td class="tdbg2">
                        <strong>注册时发送给企业的邮件内容：</strong></td>
                    <td width="76%">
                        <asp:TextBox ID="regtoCompany" runat="server" Width="474px" Height="122px" TextMode="MultiLine"></asp:TextBox></td>
                </tr>
                <tr class='tdbg'>
                    <td class="tdbg2">
                        <strong>注册时发送给个人的邮件内容：</strong></td>
                    <td>
                        <asp:TextBox ID="regtoPerson" runat="server" Width="474px" Height="122px" TextMode="MultiLine"></asp:TextBox></td>
                </tr>
                <tr class='tdbg'>
                    <td class="tdbg2" style="height: 2px">
                        <strong>个人发送给企业的求职意向：</strong></td>
                    <td style="height: 2px">
                        <asp:TextBox ID="ptoc" runat="server" Width="474px" Height="122px" TextMode="MultiLine"></asp:TextBox></td>
                </tr>
                <tr class="tdbg">
                    <td class="tdbg2" style="height: 2px">
                        <strong>企业发送给个人的招聘意向：</strong></td>
                    <td style="height: 2px">
                        <asp:TextBox ID="ctop" runat="server" Width="474px" Height="122px" TextMode="MultiLine"></asp:TextBox></td>
                </tr>
            </table>            
            <div style="margin: 10px; text-align: center;">
                <asp:Button ID="emailtext" runat="server" Text="确认参数设置" OnClick="emailtext_Click" /></div>
            <div><span class="style4">备注各标签的解释：</span><br />
                {User}——代表个人、企业的注册名称。{Pass}——代表个人、企业的注册密码。{PageName}——网站名称。{PageUrl}——网站链接地址。{wt}——客户注册时的问题。{dn}——客户注册时的答案。{time}——当前时间。
            </div>    
        </div>
        <div style="text-align:center; color:Red">*说明：当发送邮件遇到超时(Request Timed Out)，则用“提取邮件列表”功能，复制邮件地址到QQ/163等官方邮件服务器去发送即可。</div>
        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="border">
            <tr>
                <td>
                    <table width="100%" border="0" cellspacing="1" cellpadding="3">
                        <tr>
                            <td class="topbg">
                                <div align="center">
                                    Copyright 2009-2019 
                                    <%=Application["PageTitle"] %>
                                    All Rights Reserved.</div>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </form>
</body>
</html>
