<%@ Page Language="VB" AutoEventWireup="false" ContentType="text/html" ResponseEncoding="gb2312" AspCompat="true" Inherits="b2bNet.Admin_Member_send_email" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="inc/admin_style.css" rel="stylesheet" type="text/css" /><link href="inc/style.css" rel="stylesheet" type="text/css" />
<title><%=AppConst.SiteName%></title>
<script language="javascript" type="Text/JavaScript">
 function htmlsubmit(action){
if (action=="sendmail"){
 if (document.TheForm.emailto.value==""){
		alert("Email地址不能为空！");
		document.TheForm.emailto.focus();
		return false
	}
if (document.TheForm.title.value==""){
		alert("邮件标题不能为空！");
		document.TheForm.title.focus();
		return false
	}
}
if (document.TheForm.bodymail.value==""){
		alert("邮件内容模板不能为空！");
		document.TheForm.bodymail.focus();
		return false
	}
if (confirm("你确定要这样操作吗?")){
 	TheForm.action="Member_send_email.aspx?action="+action+"";
	TheForm.submit();
	}
}
function UType(n){
	var ToUserGroup = document.getElementById("ToUserGroup");
	if (n==0&&TheForm.emailto.disabled==true){
		TheForm.emailto.disabled = false;
		ToUserGroup.style.display = "none";
	}
	else{
		TheForm.emailto.disabled=true;
		if (n==1){
			ToUserGroup.style.display = "";
		}else{
			ToUserGroup.style.display = "none";
		}
	}
}
</script>
</head>
<body style="margin-top:0; margin-left:0" marginwidth="0" marginheight="0">
<table style="width:100%" border="0" cellpadding="0" cellspacing="1">
  <tr class="topbg">
    <td style="height:22; padding-left:10px;" class="topbg"><div align="center"><strong>邮件群发系统</strong></div></td>
  </tr>
</table>
<table style="width:100%"  border="0" align="center" cellpadding="0" cellspacing="0">
	  <form name="form1" method="get" action="Member_manage.aspx">
          
        <tr>
          <td style="height:27; width:25" align="center"><img src="<%=AppConst.SiteUrl%>/<%=AppConst.Skinpath%>/gojump01.gif" width="16" height="16" /></td>
          <td><a href="Member_manage.aspx?usertype=0">未验证会员</a> | <a href="Member_manage.aspx?usertype=3">免费会员</a> | <a href="Member_manage.aspx?usertype=6"><%=AppConst.SiteNamefw%>会员</a> | <a href="Member_manage.aspx?usertype=11">金牌供应商</a> | <a href="Member_add.aspx">添加会员</a> | <a href="Member_send_email.aspx">邮件群发</a> | <a href="Member_jifeng.aspx">充积分点</a></td>
          <td align="right">在<b>免费会员</b>里搜索:</td>
          <td style="width:100"><div align="center">
            <input name="keyword" type="text" id="keyword" style="width:80" />
          </div></td>
          <td style="width:60"><div align="center">
		    <input name="usertype" type="hidden" id="usertype" value="3" />
		    <input type="submit" name="Submit" value="搜 索" style="width:50" />
          </div></td>
        </tr>
  </form>
</table>
<table style="width:100%"  border="0" cellpadding="0" cellspacing="1" class="border">
  <tr>
    <td style="height:25; padding-left:10px; font-weight: bold;" class="Title">邮件发送</td>
  </tr>
  <tr>
    <td style="height:22"><table style="width:100%"  border="0" cellpadding="2" cellspacing="1">
	        <form method="post" name="TheForm">
      <tr class='tdbg' onmouseout="this.className='tdbg'" onmouseover="this.className='tdbgmouseover'">
        <td style="height:28"><div align="right">Email地址：</div></td>
        <td><textarea name="emailto" style="width:530px; height:100px"></textarea>
          *(多个email请以英文逗号“,”分隔,注意区分大小写;)</td>
      </tr>
      <tr class='tdbg' onmouseout="this.className='tdbg'" onmouseover="this.className='tdbgmouseover'">
        <td style="height:28"><div align="right">用户类别：</div></td>
        <td><input name="mailtype" type="radio" value="0" checked="checked" style="border:0" onclick="UType(this.value)" />
          用户名单
            <input type="radio" name="mailtype" value="1" style="border:0" onclick="UType(this.value)" />
            会员类型
			<div id="ToUserGroup" style="display:none;">
	<table style="width:100%" border="0" cellspacing="1" cellpadding="3" align="center">
	<tr class='tdbg' onmouseout="this.className='tdbg'" onmouseover="this.className='tdbgmouseover'"><td height=20>指定会员类型</td></tr>
	<tr class='tdbg' onmouseout="this.className='tdbg'" onmouseover="this.className='tdbgmouseover'"><td>

<input type="radio" name="GetGroupID" value="11" style="border:0" onclick="javascript:location.href='Member_sendmail.aspx?groupid=11'" />金牌供应商
<input type="radio" name="GetGroupID" value="6"  style="border:0" onclick="javascript:location.href='Member_sendmail.aspx?groupid=6'" /><%=AppConst.SiteNamefw%>
<input type="radio" name="GetGroupID" value="3"  style="border:0" onclick="javascript:location.href='Member_sendmail.aspx?groupid=3'" />免费会员
	</td></tr>
	<tr><td style="height:20; display:NONE" id="UpSetting">
	</td></tr>
	</table>
</div>			</td>
      </tr>
      <tr class='tdbg' onmouseout="this.className='tdbg'" onmouseover="this.className='tdbgmouseover'">
<td style="height:22"><div align="right">邮件标题：</div></td>
        <td><input name="title" type="text" id="title" value="<%=rs("T_emailtitle").Value%>" size="40" maxlength="100" />          
          *</td>
      </tr>
      <tr class='tdbg' onmouseout="this.className='tdbg'" onmouseover="this.className='tdbgmouseover'">
        <td style="height:22; width:13%"><div align="right">邮箱内容模板：</div></td>
        <td style="width:87%"><span class="tdbg">
		
          <textarea name="bodymail"  style="width:530px; height:230px"><%=rs("T_email").Value%></textarea>
*        </span></td>
      </tr>
        <tr class='tdbg' onmouseout="this.className='tdbg'" onmouseover="this.className='tdbgmouseover'">
          <td style="height:34"><div align="center"></div></td>
          <td><input type="button" name="Submit" value="发送邮件" onclick="htmlsubmit('sendmail')" />
            <input type="button" name="Submit" value="修改模板"  onclick="htmlsubmit('savemailbody')" />
        </td>
        </tr>
        <tr class='tdbg' onmouseout="this.className='tdbg'" onmouseover="this.className='tdbgmouseover'">
          <td style="height:22" colspan="2"><table style="width:76%"  border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td style="height:53"><p>⑴ 每次发送邮件请不要设置过多，要根据服务器的情况而定; <br>
                  ⑵ 批量发送邮件，将会占用服务器资源，请尽量在访问量少的时间进行批量操作。</p></td>
            </tr>
          </table></td>
        </tr>
      </form>
    </table></td>
  </tr>
</table>
<table style="width:100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<table style="height:53; width:100%" border="0" cellpadding="0" cellspacing="1" class="border">
  <tr>
    <td style="height:25; padding-left:10px;" class="Title"><strong>邮件服务器</strong></td>
  </tr>
  <tr>
    <td style="height:25"><table style="width:100%"  border="0" cellpadding="2" cellspacing="1">
  <form name="emailserver" method="post">
<tr class='tdbg' onmouseout="this.className='tdbg'" onmouseover="this.className='tdbgmouseover'">
      <td style="height:22; width:13%" align="right">服务器名称：</td>
      <td style="width:87%"><input name="C_emailserver" type="text" id="C_emailserver" size="30" value="<%=ers("C_emailserver").Value%>" maxlength="40" /></td>
    </tr>
    <tr class='tdbg' onmouseout="this.className='tdbg'" onmouseover="this.className='tdbgmouseover'">
      <td style="height:22" align="right">帐 户：</td>
      <td><input name="C_emailuser" type="text" id="C_emailuser" size="30" value="<%=ers("C_emailuser").Value%>" maxlength="40" /></td>
    </tr>
    <tr class='tdbg' onmouseout="this.className='tdbg'" onmouseover="this.className='tdbgmouseover'">
      <td style="height:22" align="right">密 码：</td>
      <td><input name="C_emailpass" type="password" id="C_emailpass" value="<%=ers("C_emailpass").Value%>" maxlength="30" /></td>
    </tr>
    <tr class='tdbg' onmouseout="this.className='tdbg'" onmouseover="this.className='tdbgmouseover'">
      <td style="height:22">&nbsp;</td>
      <td><input type="submit" name="Submit2" value=" 修 改 " />
      <input name="strsend" type="hidden" id="strsend" value="isok" /></td>
    </tr></form>
</table></td>
  </tr>
</table>
</body><%Page_Loaded()%>
</html>
