<%@ Language=VBScript %>
<!--#include virtual="/inc-freehost-function/FreeHostEmail.asp"-->
<!--#include virtual="/inc-freehost-function/FreeHostFunctionMain.asp"-->
<%
server.ScriptTimeout =3600
If session("admau")="" Then
	ef=True
	ec="授权非法，有可能是超时造成的。"
elseIf session("canmailuser")="" Then
	ef=True
	ec="您没有此操作的权限。"
ElseIf not IsNumeric(Request("serverlistid")) Then
	ef=True
	ec="编号必须是数字！"
end if
if not ef then
Set conn=Server.CreateObject("ADODB.Connection")
	conn.Open Application("FreeHostDBlink")

	Set dsph = Server.CreateObject("ADODB.Recordset")	
if Request.QueryString ("davps") ="server" then Sql="Select distinct username from FreeHost.FreeHost_Product_vps where serverlistid='"&request("serverlistidvps")&"'"
'response.write sql
	dsph.Open Sql,conn,1,1
if dsph.Eof then
	ef=True
	ec="此类内容不存在！"
end if
end if

if not ef then
%>
<!--#include virtual="/inc-freehost-function/htmlwrite.asp"--><%=htmlwrite("html8")%>
<%=htmlwrite("html9")%>
<TABLE width="100%" border=0 cellPadding=0 cellSpacing=0 background="img/midtop4.gif">
  <TBODY>
    <TR>
      <TD width=53 align="left" background="img/midtop1.gif"><strong> 　 </strong><font color="#FFFFFF">─<strong>&gt;</strong></font> </TD>
      <TD align="left"><table height="59"  border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="7" background="img/midtop.gif">&nbsp;</td>
          <td width="90" align="center" valign="middle" background="img/r3.jpg" id="tableTop1" style="Cursor:hand"><a href="gmail.asp"><font color="#FFFFFF"><strong>群发邮箱</strong></font></a></td>
          <td width="5" background="img/midtop2.gif">&nbsp;</td>
        </tr>
      </table></TD>
      <TD width="83">&nbsp;</TD>
      <TD width="83" align="left">&nbsp;</TD>
      <TD align="left">&nbsp;</TD>
      <TD width=23 align="right"><IMG height=59 
                  src="img/rtop4.jpg" 
                  width=19></TD>
    </TR>
  </TBODY>
</TABLE>
<TABLE width="100%" border=0 cellPadding=0 cellSpacing=0>
  <TBODY>
    <TR>
      <TD width=19 background="img/midlef.gif" id=rightid>&nbsp;</TD>
      <TD height="300" align="center" vAlign=top bgcolor="#FFFFFF">
	<div id="truecon">  

<table width="65%"  border="0" cellspacing="1" cellpadding="2">
  <tr>
    <td>
	
	
	<br><DIV class="tableborder">
<table width="100%"  border="0" align="center" cellpadding="2" cellspacing="1">
  <tr align="center" bordercolor="#000000" bgcolor="#999999">
    <td height="24" colspan="4" background="img/tablebg.gif"><font color="#990000"><font color="#FFFFFF">返回信息</font></font></td>
  </tr>
  <tr bordercolor="#000000" bgcolor="#E4EAF2">
    <td width="14%"><font color="#000000">&nbsp; </font></td>
    <td width="86%" colspan="3" align="left">
	
	
   <br>
   <br>
   提取邮箱成功<br>
   <br>

<%

session("gemail")=""
session("gemailcount")=dsph.recordcount
session("gemailsubject")=Request.Form ("suject")
session("gemailbody")=Request.Form ("body")
m=""
while not dsph.eof

'response.write dsph("serverlistid")&" - "&request.QueryString("ServerlistID")&" <br> "
'if Cstr(dsph("serverlistid"))=Cstr(request.QueryString("ServerlistID")) then
	Set ds = Server.CreateObject("ADODB.Recordset")
Sql="Select * from FreeHost.FreeHost_USER where username='"&dsph("username")&"'"
if Request.QueryString ("userfor") ="main" then  Sql="Select * from FreeHost.FreeHost_USER where username='"&dsph("username")&"' and agent1='n'"
if Request.QueryString ("userfor") ="agn" then  Sql="Select * from FreeHost.FreeHost_USER where username='"&dsph("username")&"' and agent1<>'n'"
	ds.Open Sql,conn,1,1
if not ds.Eof then

'body =Request.Form ("body")
if instr(m,ds("email"))<1 then
m=m&ds("email")&";"'&vbcrlf
end if


'session("gemail")=session("gemail")&ds ("email")&";"

ds.close
end if
'end if
dsph.movenext
Wend

session("gemail")=m
%>  


 <a href="gemaildoing.asp" target="_blank">需要发送的邮箱已从数据库中提取，点这儿马上发送>>>>>>>>>>>>></a></p>
 <p><a href="gemailto.asp" target="_blank">点这儿查看目标邮箱列表>>>>>>>>>>>>></a></p>
 <p>
    

</td>
  </tr>


  <tr bordercolor="#000000" bgcolor="#E4EAF2">
    <td height="37" colspan="4" align="right" bgcolor="#E4EAF2"><font color="#000000"> 　　　</font><a href="#top"><font color="#6B9EDE" face="Arial, Helvetica, sans-serif">Top↑</font></a>	</td>
    </tr>


</table>
	</div>

	
	
	</td>
  </tr>
</table>

</div>

      </TD>
      <TD width=18 background="img/midri.gif">&nbsp;</TD>
    </TR>
  </TBODY>
</TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
    <TR>
      <TD width=30><IMG height=19 
                  src="img/rb1.jpg" 
                  width=30></TD>
      <TD 
                background=img/rb2.jpg>&nbsp;</TD>
      <TD width=30><IMG height=19 
                  src="img/rb3.jpg" 
                  width=30></TD>
    </TR>
  </TBODY>
</TABLE>
<%=htmlwrite("html10")%>
<%end if
if ef then%>
<%=ec%>
<%end if%>
<script>
var partable=parent.document.getElementById("table0");
if (partable!=null)
partable.style.display='';

partable=parent.document.getElementById("outconM");
if (partable!=null)
{partable.innerHTML = truecon.innerHTML;
document.body.innerHTML=partable.innerHTML;}
</script>
