<%@ Language=VBScript %>
<!--#include virtual="/inc-freehost-function/FreeHostFunctionMain.asp"-->
<!--#include virtual="/inc-freehost-function/FreeHostFunction.asp"-->
<%response.write "本页面已不再使用，如果您看到了本页面，表明您没有升级到最新版本"
response.end
domain=trim(LCASE(Request("domain")))
emailname="webmaster@"&domain
If session("agentusername")="" Then
	ef=True
	ec="授权非法，有可能是超时造成的。"
ElseIf Request.QueryString ("username")<>"" and RegExpTest("[^A-Za-z0-9]",Request.QueryString ("username")) Then
	ef=True
	ec="用户名中有非法字符！"
ElseIf Request("id")<>""  and not IsNumeric(Request("id")) Then
	ef=True
	ec="请输入正常的ID！"
elseif Request("domain")<>"" and IsValidEmail(emailname)=false then
	ef=True
	ec="存在无效邮箱名称！请检查域名是否正确。"
end if
if not ef then
Set conn=Server.CreateObject("ADODB.Connection")
	conn.Open Application("FreeHostDBlink")
if Request("domain")<>"" then	
	Set dspdallemail = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_Product_ALLEmail where (agent1='"&session("agentusername")&"' or agent2='"&session("agentusername")&"') and emailname like '%"&Request("domain")&"'"
'		response.write sql
'		response.end
			if Instr(1,sql, ";", 1)>0 or Instr(1,sql, "--", 1)>0 then
Response.Write "非法字符！"
Response.End
end if
		dspdallemail.Open Sql,conn,1,1
		if  not dspdallemail.eof then
		havefind=true
		else
			ef=True
	ec="没找到相关的内容。"
end if
end if
end if

if not ef then
	Set dsph = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_Product_Email where (agent1='"&session("agentusername")&"' or agent2='"&session("agentusername")&"') and username='"&Request.QueryString ("username")&"'"
if Request.QueryString ("id") <>"" then 	Sql="Select * from FreeHost.FreeHost_Product_Email where (agent1='"&session("agentusername")&"' or agent2='"&session("agentusername")&"') and id='"&Request.QueryString ("id")&"'"
if Request("domain")<>"" and havefind then Sql="Select * from FreeHost.FreeHost_Product_Email where id="&dspdallemail("PdEID")&""
		if Instr(1,sql, ";", 1)>0 or Instr(1,sql, "--", 1)>0 then
Response.Write "非法字符！"
Response.End
end if
	dsph.Open Sql,conn,1,1
if dsph.Eof then
	ef=True
	ec="此用户并没有开通邮箱产品！"
end if
end if

if not ef then
	Set ds = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_USER where  (agent1='"&session("agentusername")&"' or agent2='"&session("agentusername")&"') and username='"&dsph ("username")&"'"
				if Instr(1,sql, ";", 1)>0 or Instr(1,sql, "--", 1)>0 then
Response.Write "非法字符！"
Response.End
end if
		ds.Open Sql,conn,1,1
if ds.eof then
	ef=True
	ec="用户不存在!"
end if
end if


if not ef then
%>
<!--#include virtual="/inc-freehost-function/htmlwrite.asp"--><%=htmlwrite("html5")%>
 　用户邮箱管理
 <%=htmlwrite("html6")%>
<br>用户名：<%=ds("username")%>
<br>金额：<%=ds("usermoney")%>
<br>电子邮件：<a href=mailto:<%=ds("email")%>><%=ds("email")%></a>
<br>QQ：<%=ds("qq")%>
<br>中文名：<%=ds("truename")%>
<br>联系地址：<%=ds("address")%>
<br>电话：<%=ds("tel")%>
<br>注册ip：<%=ds("regip")%>
<br>注册时间：<%=ds("regtime")%>

              <form action="handemail2.asp" method="post" name="form1">
<%while not dsph.Eof%>	
<%=dsph("id")%>.
<input type="radio" name="id" value="<%=dsph("id")%>" <%if dsph.RecordCount=1 then%>checked<%end if%>>
产品类型：<%=dsph("Emailtype")%> 所在服务器:<%=dsph("ServerlistID")%> 状态：<%if dsph("endtime")>NOW then%>
<%if dsph("istest")="y" then%>
      <strong><font color=red>目前处于试用期!</font></strong>
      <%else%>
	  <%=dsph("status")%>
	  <%end if%>  
  <%else%>
	  <font color=red><strong>已过期！</strong></font>
<%if dsph("status")="暂停" then%><font color=blue>并且已暂停!</font><%end if%>
 	  <%end if%> 开通时间:<%=dsph("starttime")%> 到期时间:<%=dsph("endtime")%>　<%if not isnull(dsph("byhost")) then%>购买了<a href="hostadm2.asp?id=<%=dsph("id")%>&go=a" target="_blank"><font color="red">虚拟主机(<%=dsph("byhost")%>)</font></a>所赠送<%end if%>　<%if not isnull(dsph("bydomain")) then%>购买了<a href="listmydomain.asp?username=<%=dsph("username")%>&id=<%=dsph("byhost")%>" target="_blank"><font color="red">域名(<%=dsph("bydomain")%>)</font></a>所赠送<%end if%>
<br>
<%
dsph.movenext
wend
%>
<input name="username" type="hidden" value="<%=ds("username")%>">
<input type="submit" name="Submit" value="暂停">
<input type="submit" name="Submit" value="恢复">
<input type="submit" name="Submit" value="修改">　　　
<input type="submit" name="Submit" value="删除">
              
              </form>
<%=htmlwrite("html7")%><%end if
if ef then
Response.Redirect "e.asp?e="&ec
end if%>
