<%@ Language=VBScript %>
<!--#include virtual="/inc-freehost-function/FreeHostFunction.asp"-->
<!--#include virtual="/inc-freehost-function/FreeHostFunctionMain.asp"-->
<%server.ScriptTimeout =240
If session("admau")="" Then
	ef=True
	ec="授权非法，有可能是超时造成的。"
elseIf Request("Submit")="马上转移" And session("canadmemailch")="" Then
	ef=True
	ec="您没有此操作的权限。"
elseIf Request("Submit")="单独设置续费价格" And session("canadmemailreapy")="" Then
	ef=True
	ec="您没有此操作的权限。"
elseIf Request("Submit")="取消单独价格" And session("canadmemailreapy")="" Then
	ef=True
	ec="您没有此操作的权限。"
elseIf (Request("Submit")="暂停" Or Request("Submit")="恢复" Or Request("Submit")="修改" Or Request("Submit")="删除旧邮箱并更换服务器")And session("canadmemailset")="" Then
	ef=True
	ec="您没有此操作的权限。"
elseIf Request("dodel")="删除" And session("canadmemaildel")="" Then
	ef=True
	ec="您没有此操作的权限。"
ElseIf Request.Form ("id")="" Then
	ef=True
	ec="请输入产品ID！"
ElseIf not IsNumeric(Request.Form ("id"))  Then
	ef=True
	ec="产品ID有非法字符！"
ElseIf Request.Form ("username")="" Then
	ef=True
	ec="请输入用户名！"
ElseIf RegExpTest("[^A-Za-z0-9]",Request.Form ("username")) Then
	ef=True
	ec="用户名中有非法字符！"
end if
if not ef then
Set conn=Server.CreateObject("ADODB.Connection")
	conn.Open Application("FreeHostDBlink")
	Set ds = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_USER where username='"&Request.Form ("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
If Request.Form ("newusername")<>"" then
	Set dsNew = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_USER where username='"&Request.Form ("newusername")&"'"
		if Instr(1,sql, ";", 1)>0 or Instr(1,sql, "--", 1)>0 then
Response.Write "非法字符！"
Response.End
end if
		dsNew.Open Sql,conn,1,1
if dsNew.eof then
	ef=True
	ec="要转移的用户不存在!"
end if
end if
end if

if not ef then
	Set dsphemail = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_Product_Email where id='"&Request.Form ("id")&"'"
	if Instr(1,sql, ";", 1)>0 or Instr(1,sql, "--", 1)>0 then
Response.Write "非法字符！"

Response.End

end if
	dsphemail.Open Sql,conn,1,3
if dsphemail.Eof then
	ef=True
	ec="不存在的邮箱产品ID！"
end if
end if

if not ef then
	Set dspdl = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_EmailProductlist where Emailtype='"&dsphemail ("Emailtype")&"'"
		dspdl.Open Sql,conn,1,1
If dspdl.Eof Then
	ef=True
	ec="不存在的邮箱产品类型！"
Else
'读取月付
PAY_Month=dspdl("PAY_Month")
PAY_Season=dspdl("PAY_Season")
PAY_halfyear=dspdl("PAY_halfyear")
PAY_Nextyear=dspdl("PAY_Nextyear")
PAY_2year=dspdl("PAY_2year")
PAY_3year=dspdl("PAY_3year")
PAY_4year=dspdl("PAY_4year")
PAY_5year=dspdl("PAY_5year")
end if
end if

if not ef then
	Set dsserver = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_ServerEmaillist where id='"&dsphemail ("ServerlistID")&"'"
	dsserver.Open Sql,conn,1,1
if dsserver.Eof then
	ef=True
	ec="服务器不存在！"
end if
end if

if not ef then
Set dspdallemail = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_Product_ALLEmail where PdEID='"&dsphemail ("id")&"' and emailname is not null order by emailname"
		dspdallemail.Open Sql,conn,1,3
if  not dspdallemail.eof then
emailarryX=split(dspdallemail("emailname"),"@")
if ubound(emailarryX)>0 then domainhaveset=emailarryX(1)
end if

%>

<!--#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="admemail.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"><table width="98%" border="0" cellpadding="2" cellspacing="1" bgcolor="#C8DAFF" id="t1">
        <tr height="24">
          <td width="13%" align="right" bgcolor="#ECF2FF"> 用户名：</td>
          <td width="87%" align="left" bgcolor="#FAFAFA">　<a href="searchuser.asp?username=<%=ds("username")%>" target="_blank"><%=ds("username")%></a> 　 <a href="javascript:document.formTop.action='/user/changeuser.asp';document.formTop.username.value='<%=ds("username")%>';document.formTop.submit();"><font color="#000000">切换成此用户角色>>>(用户区点注销会自动退回管理区)</font></a>　 <a href="#"  onClick="t1.style.display='none';"><font color="#6595D6">X</font></a></td>
        </tr>
        <tr height="24">
          <td bgcolor="#ECF2FF" align="right"> 金额：</td>
          <td align="left" bgcolor="#FAFAFA">　<%=ds("usermoney")%> </td>
        </tr>
        <tr height="24">
          <td bgcolor="#ECF2FF" align="right"> 电子邮件：</td>
          <td align="left" bgcolor="#FAFAFA">　<a href=mailto:<%=ds("email")%>><font color="#000000"><%=ds("email")%></font></a> </td>
        </tr>
        <tr height="24">
          <td bgcolor="#ECF2FF" align="right"> QQ：</td>
          <td align="left" bgcolor="#FAFAFA">　<%=ds("qq")%> </td>
        </tr>
        <tr height="24">
          <td bgcolor="#ECF2FF" align="right">代理名：</td>
          <td align="left" bgcolor="#FAFAFA">　
              <%if ds("agent1")<>"n" then%>
              <a href="searchagent.asp?username=<%=ds("agent1")%>" target="_blank"><font color="blue"><%=ds("agent1")%></font></a>
              <%end if%></td>
        </tr>
        <tr height="24">
          <td bgcolor="#ECF2FF" align="right"><div align="right">中文名:</div></td>
          <td align="left" bgcolor="#FAFAFA">　<%=ds("truename")%> </td>
        </tr>
        <tr height="24">
          <td bgcolor="#ECF2FF" align="right"> 联系地址：</td>
          <td align="left" bgcolor="#FAFAFA">　<%=ds("address")%> 　邮编：<%=ds("postid")%> </td>
        </tr>
        <tr height="24">
          <td bgcolor="#ECF2FF" align="right"> 电话：</td>
          <td align="left" bgcolor="#FAFAFA">　<%=ds("tel")%> 　传真：<%=ds("fax")%> </td>
        </tr>
        <tr height="24">
          <td bgcolor="#ECF2FF" align="right"> 备注：</td>
          <td align="left" bgcolor="#FAFAFA">　<%=ds("coreinfo")%></td>
        </tr>
        <tr height="24">
          <td bgcolor="#ECF2FF" align="right"> 身份证号码：</td>
          <td align="left" bgcolor="#FAFAFA">　<%=ds("perid")%></td>
        </tr>
        <tr height="24">
          <td bgcolor="#ECF2FF" align="right"> 注册ip：</td>
          <td align="left" bgcolor="#FAFAFA">　<%=ds("regip")%> </td>
        </tr>
        <tr height="24">
          <td bgcolor="#ECF2FF" align="right"> 注册时间：</td>
          <td align="left" bgcolor="#FAFAFA">　<%=ds("regtime")%> </td>
        </tr>
      </table>
<%if Request.Form ("Submit")<>"修改" then%> <DIV class="tableborder" id="t1">
	  <table width="100%" border=0 cellpadding=2 cellspacing=1>
        <tr align="center" bgcolor="#EFEFEF">
          <td height="24" colspan="2" background="img/tablebg.gif"><font color="#FFFFFF">受控服务器上的记录　　<a href="#"  onClick="t1.style.display='none';"><font color="#F7F7FF">X</font></a></font></td>
        </tr>
        <tbody>
          <tr bgcolor="#E4EAF2">
            <td width="20%" height="70" align="right" >返回信息：</td>
            <td width="80%" height="22" align="left" ><%if Request.Form ("Submit")="暂停" or Request.Form ("Submit")="恢复" then

while not dspdallemail.eof

if Request.Form ("Submit")="暂停" then
op=1
Response.Write PauseEmail(dsphemail ("ServerlistID"),dspdallemail("emailname"),op)
dspdallemail("status")="暂停"
dsphemail("status")="暂停"
end if

if Request.Form ("Submit")="恢复" then
op=0
Response.Write PauseEmail(dsphemail ("ServerlistID"),dspdallemail("emailname"),op)
dsphemail("status")="正常"
dspdallemail("status")="正常"
end if
dspdallemail.update
dspdallemail.movenext
wend

if Request.Form ("Submit")="暂停" then dsphemail("status")="暂停"
if Request.Form ("Submit")="正常" then dsphemail("status")="正常"
response.write "　处理成功"
dsphemail.update
dsphemail.close
end if

if Request.Form ("Submit")="马上转移" then

FreeHost_oplog session("admusername"),"信息","管理员转移"&dsphemail ("username")&"邮箱产品ID("&dsphemail ("id")&") 给"&Request.Form ("newusername")

Set dspdallemail = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_Product_ALLEmail where PdEID='"&dsphemail ("id")&"' order by emailname"
		dspdallemail.Open Sql,conn,1,3
		while not dspdallemail.eof
response.write "域管理员："&dspdallemail("emailname")&" 转到"&Request.Form ("newusername")&" 名下。<br>"
dspdallemail("username")=Request.Form ("newusername")
dspdallemail.update
dspdallemail.movenext
		wend

dsphemail("username")=Request.Form ("newusername")
response.write "邮箱产品已转移到用户："&Request.Form ("newusername")&" 名下。<br>"
dsphemail("agent1")=dsNEW("agent1")
if dsphemail("agent1")<>"n" then
response.write "邮箱产品已转移到代理："&dsphemail("agent1")&" 名下。<br>"
end if




dsphemail.update
dsphemail.close
end if

if Request.Form ("Submit")="删除旧邮箱并更换服务器" Then
On Error Resume next
if  not dspdallemail.eof then
email=trim(dspdallemail("emailname"))
emailarry=split(email,"@")
name1=emailarry(0)
if ubound(emailarry)>0 then
olddomain=lcase(trim(emailarry(1)))
ret=DelAdmEmail(dsphemail ("ServerlistID"),olddomain)
end if
while not dspdallemail.eof
dspdallemail.delete
dspdallemail.update
dspdallemail.movenext
wend
response.write "删除旧邮箱："&ret
FreeHost_clientlog conn,dsphemail ("username"),session("admusername"),"超级管理员换服务器删除操作","邮箱产品",dsphemail ("id"),"删除","","",ret
else
response.write "删除旧服务器上的邮箱完成。"
end if

dsphemail("ServerlistID")=Request.Form ("newServerlistID")
response.write "成功更新到新的服务器上，请您通知用户重新绑定邮箱域名。"
dsphemail.update
dsphemail.close
end if

if Request.Form ("Submit")="单独设置续费价格" and Request.Form ("repaymoney")<>"" then
if IsNumeric(Request.Form ("repaymoney")) and Request.Form ("repaymoney")>0 then
dsphemail ("repaymoney")=Request.Form ("repaymoney")
dsphemail.update
Response.Write "此产品的续费价格已单独更新为："&Request.Form ("repaymoney")&"元"
else
Response.Write "请输入大于0的价格。"
end if 
end If

if Request.Form ("Submit")="取消单独价格" then
dsphemail ("repaymoney")=null
dsphemail.update
Response.Write "此产品的续费价格已恢复为默认价格"
end if

if Request.Form ("dodel")="删除" Then
On Error Resume next
if  not dspdallemail.eof then
email=trim(dspdallemail("emailname"))
emailarry=split(email,"@")
name1=emailarry(0)
if ubound(emailarry)>0 then
olddomain=lcase(trim(emailarry(1)))
ret=DelAdmEmail(dsphemail ("ServerlistID"),olddomain)
end if
while not dspdallemail.eof
dspdallemail.delete
dspdallemail.update
dspdallemail.movenext
wend
response.write ret
FreeHost_clientlog conn,dsphemail ("username"),session("admusername"),"超级管理员操作","邮箱产品",dsphemail ("id"),"删除","","",ret
else
response.write "删除完成。"
end if
dsphemail.delete
dsphemail.update
dsphemail.close
end if%></td>
          </tr>
          <tr align="center" bgcolor="#E4EAF2">
            <td height="30" colspan="2" align="right"><a href="#top"><font color="#6B9EDE" face="Arial, Helvetica, sans-serif">Top↑</font></a></td>
          </tr>
        </tbody>
      </table>
	  </div><%end if%>
	  <br>
	  <br>
      <%if Request.Form ("Submit")="修改" then
	Set dspdallemail = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_Product_ALLEmail where username='"&ds ("username")&"' and PdEID='"&dsphemail ("id")&"' order by emailname"
		dspdallemail.Open Sql,conn,1,1
Emailtype=dsphemail("Emailtype")		
		%>
<DIV class="tableborder" id="t4"> 
	  <table width="100%" border=0 cellpadding=2 cellspacing=1>
          <tr align="center" bgcolor="#EFEFEF">
            <td height="24" background="img/tablebg.gif" ><font color="#FFFFFF">ID</font></td>
            <td height="24" background="img/tablebg.gif" ><font color="#FFFFFF">产品类型</font></td>
            <td width="10%" background="img/tablebg.gif" bgcolor="#C1BFBF"><font color="#FFFFFF">域　名</font></td>
            <td width="9%" background="img/tablebg.gif" ><font color="#FFFFFF">邮箱数量</font></td>
            <td width="12%" background="img/tablebg.gif" ><font color="#FFFFFF">单个邮箱大小</font></td>
            <td width="7%" background="img/tablebg.gif" ><font color="#FFFFFF">域大小</font></td>
            <td width="10%" background="img/tablebg.gif" ><font color="#FFFFFF">所在服务器</font></td>
            <td width="10%" background="img/tablebg.gif" ><font color="#FFFFFF">开通时间</font></td>
            <td width="10%" background="img/tablebg.gif" ><font color="#FFFFFF">到期时间</font></td>
            <td width="7%" background="img/tablebg.gif" ><font color="#FFFFFF">状态</font></td>
            <td width="9%" background="img/tablebg.gif" bgcolor="#C1BFBF"><font color="#FFFFFF">操作</font></td>
            </tr>
          <tbody>
            <tr bgcolor="#E4EAF2">
              <td width="6%" height="70" align="center" ><%=dspdl("ID")%></td>
              <td height="70" align="center" ><%=dsphemail("Emailtype")%>
      <%if dsphemail("byhost")<>"" then%><br>
附属于产品 <a href="handhost1.asp?username=<%=dsphemail("username")%>&id=<%=dsphemail("byhost")%>"><font color="#FF0000"><%=dsphemail("byhost")%></font></a>
<%end if%>
<%if not isnull(dsphemail("bydomain")) then%><br>购买了<a href="/adm/listmydomain.asp?id=<%=dsphemail("bydomain")%>" target="_blank"><font color="red">域名(<%=dsphemail("bydomain")%>)</font></a>所赠送<%end if%>
<%if not isnull(dsphemail("repaymoney")) then%><br>
此产品已设置了单独续费价格：<%=dsphemail("repaymoney")%>元/年
<%end if%>
</td>
              <td align="center">
                <%if domainhaveset<>"" then%>
<%=domainhaveset%>
<%end if%>
</td>
              <td height="70" align="center" ><%=dsphemail("emailcount")%></td>
              <td height="70" align="center" ><%=dsphemail("userspacelimt")%>M</td>
              <td height="70" align="center" ><%=dsphemail("domainspacelimt")%>M</td>
              <td width="10%" height="70" align="center" ><%=dsserver("ip")%> </td>
              <td width="10%" height="70" align="center" ><%=dsphemail("starttime")%></td>
              <td width="10%" height="70" align="center" ><%=dsphemail("endtime")%></td>
              <td align="center" ><%if dsphemail("istest")="y" then%>
                  <strong><font color=#000099>试用</font></strong>
                  <%else%>
                  <%=dsphemail("status")%>
                  <%end if%></td>
              <td align="center"><a href="emailadm2.asp?id=<%=dsphemail("id")%>&go=a" target="_blank">用户区面板</a></td>
              </tr>
          </tbody>
        </table>
</div>		
      <br>
      <form name="form4" method="post" action="handemailsetdomainadm.asp">
        <DIV class="tableborder" id="t3"> 
	  <table width="100%" border=0 cellpadding=2 cellspacing=1>
          <tr align="center" bgcolor="#EFEFEF">
            <td height="24" colspan="2" background="img/tablebg.gif" ><font color="#FFFFFF">绑定域名　　<a href="#"  onClick="t3.style.display='none';"><font color="#F7F7FF">X</font></a></font></td>
          </tr>
          <tbody>
            <tr bgcolor="#E4EAF2">
              <td width="20%" height="70" align="right" >域名：</td>
              <td width="80%" height="22" align="left" ><%if domainhaveset<>"" then%>
                <br>
　 已绑定的域名为：<%=domainhaveset%><br>

<%end if%> 　
<input name="domain" type="text" id="domain" size="25" maxlength="50">
                <input name="id" type="hidden" value="<%=Request("id")%>">
                <input type="submit" name="Submit" value="马上绑定">
                <br>
　 首次绑定后，默认的管理邮箱为 <%=Application("admmailname")%>@域名 (注意更改域名绑定会删除原域名中的所有邮件.)</td>
            </tr>
            <tr align="center" bgcolor="#E4EAF2">
              <td height="30" colspan="2" align="right"><a href="#top"><font color="#6B9EDE" face="Arial, Helvetica, sans-serif">Top↑</font></a></td>
            </tr>
          </tbody>
        </table>
</div>
      </form>
      <form name="form1" method="post" action="handemail3.asp"><DIV class="tableborder" id="t4"> 
	  <table width="100%" border=0 cellpadding=2 cellspacing=1>
          <tr align="center" bgcolor="#EFEFEF">
            <td height="24" colspan="2" background="img/tablebg.gif" ><font color="#FFFFFF">设置域管理员密码　　<a href="#"  onClick="t4.style.display='none';"><font color="#F7F7FF">X</font></a></font></td>
          </tr>
          <tbody>
            <tr bgcolor="#E4EAF2">
              <td width="20%" height="70" align="right" >修改密码：</td>
              <td width="80%" height="22" align="left" ><%if domainhaveset<>"" then%>
                <br>
　 已绑定的域名为：<%=domainhaveset%><br>

<%end if%> 　
新密码：
        <input name="password" type="password" id="password" size="14">
重复密码：
<input name="repassword" type="password" id="repassword" size="14">
<input name="id" type="hidden" value="<%=Request("id")%>">
<input type="submit" name="Submit" value="保存修改">
</td>
            </tr>
            <tr align="center" bgcolor="#E4EAF2">
              <td height="30" colspan="2" align="right"><a href="#top"><font color="#6B9EDE" face="Arial, Helvetica, sans-serif">Top↑</font></a></td>
            </tr>
          </tbody>
        </table>
</div>
        </form>
      <form name="form1" method="post" action="handemailbyhost.asp"><DIV class="tableborder" id="t8"> 
	  <table width="100%" border=0 cellpadding=2 cellspacing=1>
          <tr align="center" bgcolor="#EFEFEF">
            <td height="24" colspan="2" background="img/tablebg.gif" ><font color="#FFFFFF">设置邮箱所属虚拟主机　　<a href="#"  onClick="t8.style.display='none';"><font color="#F7F7FF">X</font></a></font></td>
          </tr>
          <tbody>
            <tr bgcolor="#E4EAF2">
              <td width="20%" height="70" align="right" >修改所属虚拟主机：</td>
              <td width="80%" height="22" align="left" >　附属于
                <input name="byhost" type="text" id="byhost" value="<%=dsphemail("byhost")%>" size="8">
号虚拟主机
<%if not isnull(dsphemail("byhost")) then%>
<a href="handhost1.asp?id=<%=dsphemail("byhost")%>" target="_blank">>>>>></a>
<%end if%>
<input name="id" type="hidden" value="<%=Request("id")%>">
<input type="submit" name="Submit" value="保存修改">  

</td></tr>
            <tr align="center" bgcolor="#E4EAF2">
              <td height="30" colspan="2" align="right"><a href="#top"><font color="#6B9EDE" face="Arial, Helvetica, sans-serif">Top↑</font></a></td>
            </tr>
          </tbody>
        </table>
</div>
        </form>		
      <form name="form4" method="post" action="handemailmodifyendtime.asp"><DIV class="tableborder" id="t5"> 
	  <table width="100%" border=0 cellpadding=2 cellspacing=1>
          <tr align="center" bgcolor="#EFEFEF">
            <td height="24" colspan="2" background="img/tablebg.gif" ><font color="#FFFFFF">续费　　<a href="#"  onClick="t5.style.display='none';"><font color="#F7F7FF">X</font></a></font></td>
          </tr>
          <tbody>
            <tr bgcolor="#E4EAF2">
              <td width="20%" height="90" align="right" >延长使用期限：</td>
              <td width="80%" height="22" align="left" >　<br>
<%if not isnull(dsphemail("repaymoney")) then%>
<font color="red">此产品已设置了单独续费价格：<%=dsphemail("repaymoney")%>元/年</font>
<%end if%>

			  <input type="radio" name="year" value="<%=PAY_Month%>">
一个月
			  <input type="radio" name="year" value="<%=PAY_Season%>">一季
                <input type="radio" name="year" value="<%=PAY_halfyear%>">
半年
  <input type="radio" name="year" value="<%=PAY_Nextyear%>" checked>
一年
<input type="radio" name="year" value="<%=PAY_2year%>">
两年
<input type="radio" name="year" value="<%=PAY_3year%>">
三年
<input type="radio" name="year" value="<%=PAY_4year%>">
四年
<input type="radio" name="year" value="<%=PAY_5year%>">
五年<br>
　手工指定开通时间:
<input name="starttime" type="text" id="starttime" size="10" maxlength="10">
2005-7-24　手工指定开通时间时，必须填写到期时间及扣除金额<br>
　手工指定到期时间:
<input type="text" name="endtime" size="10" maxlength="10">
2008-7-24　手工指定必须填写扣除金额<br>
　用户金额中扣除：
<input name="usermoney" type="text" id="usermoney" size="3" value="">
元(如果不填写，将按产品默认金额扣除,也可以设成0)
<input name="id" type="hidden" value="<%=Request.Form ("id")%>">
<input type="submit" name="Submit" value="提交">
</td>
            </tr>
            <tr align="center" bgcolor="#E4EAF2">
              <td height="30" colspan="2" align="right"><a href="#top"><font color="#6B9EDE" face="Arial, Helvetica, sans-serif">Top↑</font></a></td>
            </tr>
          </tbody>
        </table>
</div>
        </form>
      <form name="form4" method="post" action="handemailmodifyall.asp">
        <DIV class="tableborder" id="t5">
          <table width="100%" border=0 cellpadding=2 cellspacing=1>
            <tr align="center" bgcolor="#EFEFEF">
              <td height="24" colspan="2" background="img/tablebg.gif" ><font color="#FFFFFF">直接修改域大小及邮箱数量　　<a href="#"  onClick="t5.style.display='none';"><font color="#F7F7FF">X</font></a></font></td>
            </tr>
            <tbody>
              <tr bgcolor="#E4EAF2">
                <td width="20%" height="90" align="right" >手工设置：</td>
                <td width="80%" height="22" align="left" >　邮箱数量：
<input name="emailcount" type="text" id="emailcount" value="<%=dsphemail("emailcount")%>" size="8">
个<br>
　域空间大小：
<input name="domainspacelimt" type="text" id="domainspacelimt" size="8" value="<%=dsphemail("domainspacelimt")%>"><br>
　单个邮箱大小：
<input name="userspacelimt" type="text" id="userspacelimt" size="8" value="<%=dsphemail("userspacelimt")%>">
M<br>
            　用户金额中扣除：
            <input name="usermoney" type="text" id="usermoney" size="3" value="0">
            元
            <input name="id" type="hidden" value="<%=Request.Form ("id")%>">
            <input type="submit" name="Submit" value="提交">
                </td>
              </tr>
              <tr align="center" bgcolor="#E4EAF2">
                <td height="30" colspan="2" align="right"><a href="#top"><font color="#6B9EDE" face="Arial, Helvetica, sans-serif">Top↑</font></a></td>
              </tr>
            </tbody>
          </table>
        </div>
      </form>
      <br>
      <form name="form2" method="post" action="handemailupdate1.asp">

  <DIV class="tableborder" id="t4"> 
	  <table width="100%" border=0 cellpadding=2 cellspacing=1>
          <tr align="center" bgcolor="#EFEFEF">
            <td height="24" colspan="2" background="img/tablebg.gif" ><font color="#FFFFFF">升级产品　　<a href="#"  onClick="t4.style.display='none';"><font color="#F7F7FF">X</font></a></font></td>
          </tr>



    <tr align="center" bgcolor="#E4EAF2">
      <td width="20%" align="right">升级：</td>
      <td width="80%" height="30" align="left">　　更产品类型:
          <%
	Set dsX = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_EmailProductlist order by id asc"
		dsX.Open Sql,conn,1,1
If dsX.Eof Then%>
    产品列表为空.
    <%else%>
    <select name="hosttypeAuto" id="hosttypeAuto">
      <%while not dsX.Eof%>
      <option value="<%=dsX("id")%>" <%if dsX("emailtype")=Emailtype then%>selected<%end if%>><%=dsX("emailtype")%></option>
      <br>
      <%
dsX.movenext
wend%>
    </select>
    <%end if%>
    <br>
    　
    <input name="chmoneyauto" type="checkbox" id="chmoneyauto" value="checkbox">
    从用户金额中扣除(如果不选将只更改而不扣费)(产品不变不会扣)<br>
    　　 　价格：
    <input name="usermoneyauto" type="text" id="usermoneyauto" size="4" value="">
    元(不填价格将按产品差价扣除或退回)
    <input name="istestch1" type="checkbox" id="istestch1" value="y">
    将试用的用户变更成正式用户 <br><input name="id" type="hidden" value="<%=Request.Form ("id")%>">
    　
    <input name="Submit" type="submit" id="auto" value="马上升级" onClick="if (confirm('请您确认本次升级操作？')==false){return false;}">
    (注意，代理及代理名下用户请让代理或用户自己操作，这儿的操作不会返款给上级代理)</td>
    </tr>

</table>
  </div>
  
      </form>
      <%end if%>	  
	  </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
Response.Redirect "e.asp?e="&ec
end if%>
