<!--#include virtual="/incs/config.asp" -->
<!--#include virtual="/incs/top.asp" -->
<SCRIPT language=JavaScript type=text/javascript>

function ifok()
{
if (confirm("请再次确认是否更换域名！"))
document.mail_modi.submit();
}
function chk_edt()
{
if(confirm("请确认是否更改!"))
return true;
else
return false;
}
function chk_del()
{
if(confirm("如果确认，将删除该别名，但不会删除邮箱内的信件!"))
return true;
else
return false;
}
  </SCRIPT>
<%
chk_log()
chk_newpwr 1,1,1
conn.open constr
	bnme=SafeRequest("bnme")
	mailname=SafeRequest("mailname")
	mnme=mailname
	m_sst=SafeRequest("mtpe")
	If   (bnme="" or mailname="" ) Then
	call errorpage(-2,"对不起，参数错误！")
	End If
	
	if  m_sst<>2 then
	query="select * from mbxlst where b_usrnme='"&bnme&"' and b_emldme='"&mnme&"'"
	rs.open query,conn,1,1
	if rs.eof then
	call errorpage(-2,"对不起，该邮箱不存在！")
	end if
	b_emldme=rs("b_emldme")
	b_usrnme=trim(rs("b_usrnme"))
	b_regstt=cint(rs("b_regstt"))
	b_ownnme=trim(rs("b_ownnme"))
	b_sze=rs("b_sze")
	rs.close
 
				
if session("sysclass")>=5 then
query="select * from v_emllst   where m_dme ='"&b_emldme&"'"
elseif session("sysclass")>=4 then
query="select * from v_emllst  where m_dme ='"&b_emldme&"'  and  ((("&session("sysarestr")&" or u_myare=0) and u_rotnme='') or u_rotnme='"&session("usrname")&"')"
else
query="select * from v_emllst   where m_dme ='"&b_emldme&"' m_unme='"&session("usrname")&"'"
end if
else
'''''''''''''''''''''''''''''''''''''''''''''''
substrContent = "entryclass:eml_mng"&Vend
substrContent =substrContent& "entrytype:eml_mbx_lst"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent = substrContent & "mailname:" & mailname & Vend
   substrContent = substrContent & "username:" & bnme & Vend
   substrContent = substrContent & "." & Vend
   doresult = hzsocket(substrContent)
   left5=left(doresult,5)
If left5<>"10000" Then
	call errorpage(-2,"对不起，读取邮箱信息失败！")
end if
	doresult=right(doresult,len(doresult)-5)		  
	if instr(doresult,";")<=0 then
	call errorpage(-2,"对不起，读取邮箱信息失败！")
	end if
	usrdtl=split(doresult,";")
	b_usrnme=bnme
	b_regstt=usrdtl(2)
	if lcase(b_regstt)="true" then
	b_regstt=2
	else
	b_regstt=1
	end if
	b_ownnme=usrdtl(3)
	b_sze=usrdtl(1)
'''''''''''''''''''''''''''''''''''''''''''''''
	 
if session("sysclass")>=5 then
query="select * from v_emllst   where m_dme ='"&mailname&"'"
elseif session("sysclass")>=4 then
query="select * from v_emllst  where m_dme ='"&mailname&"'  and  ((("&session("sysarestr")&" or u_myare=0) and u_rotnme='') or u_rotnme='"&session("usrname")&"')"
else
query="select * from v_emllst   where m_dme ='"&mailname&"' m_unme='"&session("usrname")&"'"
end if

end if

	rs.open query,conn,1,1
    if rs.recordcount<>1 then
	rs.close
	conn.close
	call errorpage(-2,"对不起，该邮局不存在或者您无权操作！")
	response.end
	end if
	mailname=trim(rs("m_dme"))
	m_regtpe=cint(rs("m_regtpe"))
	m_svrip=trim(rs("m_svrip"))
	m_id=rs("m_id")
	g_sst=cint(rs("m_sst"))
u_nme=trim(rs("m_unme"))
proid=trim(rs("m_prd"))
rs.close
%>
<%
			    

		%>
<script language=javascript>
		function expl()
		{
		if (identity.style.display=="none")
		identity.style.display="block";
		else
		identity.style.display="none";
		}
		
		function b_regstt_chg()
		{
		if(confirm("是否确认更改邮箱状态?"))
		return true;
		else
		return false;
		
		}
		</script>
<table cellspacing=2 cellpadding=0 width="100%" border=0>
  <tbody> 
  <tr> 
    <td  colspan=2 valign="middle"> 
      <table class=line cellspacing=0 cellpadding=0 width="100%" 
                  border=0 align="center">
        <tbody> 
        <tr> 
          <td valign=bottom width="25%" height=20><font color="#000000" class=ddropshadow><b><span class=enbold><strong>邮局<font color="#000000">列表</font></strong></span></b><span class=enbold><font color="#000000"><a class=commonface  href="index.asp"><font color="#FF0000">（查询）</font></a></font></span></font></td>
          <td valign=bottom noWrap align=right 
                        width="75%"><a href="eml_lst.asp?querytype=8" class=commonface >今天新开通</a> 
            | <a href="eml_lst.asp?querytype=9" class=commonface >本周新开通</a> | 
            <a href="eml_lst.asp?querytype=10" class=commonface >本周到期</a> | <a href="eml_lst.asp?querytype=11" class=commonface >本月到期</a></td>
        </tr>
        <tr> 
          <td align=middle width="100%" colspan=2 height=5></td>
        </tr>
        <tr> 
          <td align=middle width="100%" colspan=2 height=2 class=menuline></td>
        </tr>
        </tbody> 
      </table>
      <br>
    </td>
  </tr>
  <tr> 
    <td  colspan=2 valign="middle" height="28"> 
      <table   bordercolor="#5785B2" cellpadding="0" cellspacing="0" id="AutoNumber3" style="border-collapse: collapse" width="100%" align="center">
        <tr> 
          <td height="34" > 
            <div align="center"> 
              <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
                <tr> 
                  <td> 
                    <!--#include file="menu.asp"-->
                  </td>
                </tr>
              </table>
              <br>
            </div>
          </td>
        </tr>
        <tr> 
          <td> 
            <table width="100%" border="0" cellspacing="0" cellpadding="0"  id=identity>
              <tr> 
                <td> 
                  <% if g_sst=1 then %>
                  <table align="center" width="100%" cellpadding="0" cellspacing="0" border="0" class=datalist>
                    <tr align="middle"> 
                      <th colspan="3" class=datalistheader > 
                        <div align="center"><b>邮箱管理</b></div>
                      </th>
                    </tr>
                    <tr> 
                      <td  width="30%" class=datalistgrida height="22"  > 
                        <div align="center" style="display:block;">邮箱名称：</div>
                      </td>
                      <td width="40%"  class=datalistgrida ><b><font color=#ff0000><%=b_usrnme%></font>&nbsp;@&nbsp;<%=mailname%></b></td>
                      <td  class=datalistgrida >&nbsp;</td>
                    </tr>
                    <form action=eml_mng.asp method=post>
                      <tr> 
                        <td  class=datalistgrida height="22"  > 
                          <div align="center">邮箱状态：</div>
                        </td>
                        <td class=datalistgrida > 
                          <input type="radio" name="mailctt" value="1" <% if b_regstt="1" then
									response.write " checked"
									end if %>>
                          已启用 
                          <input type="radio" name="mailctt" value="2"  <% if b_regstt="2" then
									response.write " checked"
									end if %>>
                          已暂停 
                          <input type=hidden value="<%=mailname%>" name=mailname >
                          <input type=hidden value="eml_mbx_ctt" name=module>
                          <input type=hidden value="<%=b_usrnme%>" name=mailuser>
                        </td>
                        <td class=datalistgrida > 
                          <input type=submit   name="image22" class=btxx value="现在更改" onClick="javascript:return chk_edt();">
                        </td>
                      </tr>
                    </form>
                    <form action=eml_mng.asp method=post>
                      <tr> 
                        <td  class=datalistgrida height="22"  > 
                          <div align="center">备注更改：</div>
                        </td>
                        <td  class=datalistgrida > 
                          <input name="mailownname" style="FONT-SIZE: 9pt ;border: 1px solid #C0C0C0 ; height:16px ;width=120px" tabindex=1 value="<%=b_ownnme%>" >
                          <input type=hidden value="<%=mailname%>" name=mailname >
                          <input type=hidden value="eml_mbx_cnt" name=module>
                          <input type=hidden value="<%=b_usrnme%>" name=mailuser>
                        </td>
                        <td  class=datalistgrida > 
                          <input type=submit   name="image24" class=btxx value="现在更改" onClick="javascript:return chk_edt();">
                        </td>
                      </tr>  </form>
					                      <form action=eml_mng.asp method=post>

                      <tr> 
                        <td  class=datalistgrida height="22"  > 
                          <div align="center">容量更改：</div>
                        </td>
                        <td  class=datalistgrida > 
                          <input name="mailmaxsize" style="FONT-SIZE: 9pt ;border: 1px solid #C0C0C0 ; height:16px ;width=120px" tabindex=1 value="<%=b_sze%>" >
                          MB 
                          <input type=hidden value="<%=mailname%>" name=mailname >
                          <input type=hidden value="eml_mbx_sze" name=module>
                          <input type=hidden value="<%=b_usrnme%>" name=mailuser>
                        </td>
                        <td  class=datalistgrida > 
                          <input type=submit   name="image23" class=btxx value="现在更改" onClick="javascript:return chk_edt();">
                        </td>
                      </tr>  </form>
					                      <form action=eml_mng.asp method=post>

                      <tr> 
                        <td class=datalistgrida height="22"   > 
                          <div align="center">密码更改：</div>
                        </td>
                        <td  class=datalistgrida > 
                          <input name="mailpassword" style="FONT-SIZE: 9pt ;border: 1px solid #C0C0C0 ; height:16px ;width=120px" tabindex=1 type="password" >
                          &nbsp; 
                          <input type=hidden value="<%=mailname%>" name=mailname >
                          <input type=hidden value="eml_mbx_pss" name=module>
                          <input type=hidden value="<%=b_usrnme%>" name=mailuser>
                        </td>
                        <td  class=datalistgrida > 
                          <input type=submit   name="image2" class=btxx value="现在更改" onClick="javascript:return chk_edt();">
                        </td>
                      </tr>
                    </form>
                  </table>
                  <% else %>
                  <table align="center" width="100%" cellpadding="0" cellspacing="0" border="0" class=datalist>
                    <tr align="middle"> 
                      <th colspan="3" class=datalistheader > 
                        <div align="center"><b>邮箱管理</b></div>
                      </th>
                    </tr>
                    <tr> 
                      <td  width="30%" class=datalistgrida height="22"  > 
                        <div align="center" style="display:block;">邮箱名称：</div>
                      </td>
                      <td width="40%"  class=datalistgrida ><b><font color=#ff0000><%=b_usrnme%></font>&nbsp;@&nbsp;<%=mailname%></b></td>
                      <td  class=datalistgrida >&nbsp;</td>
                    </tr>
                    <form action=eml_mng.asp method=post>
                      <tr> 
                        <td  class=datalistgrida height="22"  > 
                          <div align="center">邮箱状态：</div>
                        </td>
                        <td class=datalistgrida > 
                          <input type="radio" name="mailctt" value="1" <% if b_regstt="1" then
									response.write " checked"
									end if %>>
                          已启用 
                          <input type="radio" name="mailctt" value="2"  <% if b_regstt="2" then
									response.write " checked"
									end if %>>
                          已暂停 
                          <input type=hidden value="<%=mailname%>" name=mailname >
                          <input type=hidden value="eml_mbx_ctt" name=module>
                          <input type=hidden value="<%=b_usrnme%>" name=mailuser>
                        </td>
                        <td class=datalistgrida > 
                          <input type=submit   name="image22" class=btxx value="现在更改" onClick="javascript:return chk_edt();">
                        </td>
                      </tr>
                    </form>
                    <form action=eml_mng.asp method=post>
                      <tr> 
                        <td  class=datalistgrida height="22"  > 
                          <div align="center">备注更改：</div>
                        </td>
                        <td  class=datalistgrida > 
                          <input name="mailownname" style="FONT-SIZE: 9pt ;border: 1px solid #C0C0C0 ; height:16px ;width=240px" tabindex=1 value="<%=b_ownnme%>" size="40" >
                        </td>
                        <td  class=datalistgrida > 
                          <input type=submit   name="image2" class=btxx value="现在更改" onClick="javascript:return chk_edt();">
                          <input type=hidden value="<%=mailname%>" name=mailname >
                          <input type=hidden value="eml_mbx_cnt" name=module>
                          <input type=hidden value="<%=b_usrnme%>" name=mailuser>
                        </td>
                      </tr>
                    </form>
                    <form action=eml_mng.asp method=post>
                      <tr> 
                        <td  class=datalistgrida height="22"  > 
                          <div align="center">容量更改：</div>
                        </td>
                        <td  class=datalistgrida > 
                          <input name="mailmaxsize" style="FONT-SIZE: 9pt ;border: 1px solid #C0C0C0 ; height:16px ;width=120px" tabindex=1 value="<%=b_sze%>" >
                          MB </td>
                        <td  class=datalistgrida > 
                          <input type=submit   name="image2" class=btxx value="现在更改" onClick="javascript:return chk_edt();">
                          <input type=hidden value="<%=mailname%>" name=mailname >
                          <input type=hidden value="eml_mbx_sze" name=module>
                          <input type=hidden value="<%=b_usrnme%>" name=mailuser>
                        </td>
                      </tr>
                    </form>
                    <form action=eml_mng.asp method=post>
                      <tr> 
                        <td class=datalistgrida height="22"   > 
                          <div align="center">密码更改：</div>
                        </td>
                        <td  class=datalistgrida > 
                          <input name="mailpassword" style="FONT-SIZE: 9pt ;border: 1px solid #C0C0C0 ; height:16px ;width=120px" tabindex=1 type="password" >
                          &nbsp; 
                          <input type=hidden value="<%=mailname%>" name=mailname >
                          <input type=hidden value="eml_mbx_pss" name=module>
                          <input type=hidden value="<%=b_usrnme%>" name=mailuser>
                        </td>
                        <td  class=datalistgrida > 
                          <input type=submit   name="image2" class=btxx value="现在更改" onClick="javascript:return chk_edt();">
                        </td>
                      </tr>
                    </form>
                  </table>
                  <% end if  %>
                </td>
              </tr>
            </table>
          </td>
        </tr>
        <% IF g_sst=1 then %>
        <tr> 
          <td valign="top"  height="50"> <br>
            <table align="center" border="0" cellpadding="0" cellspacing="0" width="100%" class=datalist>
              <tr> 
                <th colspan="3"  class=datalistheader align="center"  > <b>别名添加</b> 
                </th>
              </tr>
              <tr> 
                <td   valign="bottom"  width="30%"  class=datalistgrida height="22" align="middle" > 
                  <p align="center">邮箱别名 
                </td>
                <td  valign="bottom" class=datalistgrida width="40%" align="middle" > 
                  <div align="center">添加</div>
                </td>
                <td  valign="bottom" class=datalistgrida align="middle" >&nbsp;</td>
              </tr>
              <form action="eml_mng.asp" method="post" name=form1>
                <tr> 
                  <td   align="center" class=datalistgrida height="22" > 
                    <input name="mbxalias"   tabindex=1  style="FONT-SIZE: 9pt ;border: 1px solid #C0C0C0 ; height:16px ;width:60px;">
                    @<%=mailname%> </td>
                  <td  align="center" class=datalistgrida > 
                    <input type=submit value="添加" name=adfadf class=btxx>
                    <input type=hidden value="<%=mailname%>" name=mailname >
                    <input type=hidden value="mbx_als_add" name=module>
                    <input type=hidden value="<%=b_usrnme%>" name=mailuser>
                  </td>
                  <td class=datalistgrida >&nbsp; </td>
                </tr>
                <tr> 
                  <td   class=datalistgrida style="line-height:150%" colspan="3">说明：邮箱别名其实是一个虚拟的邮箱，发往别名的邮件其实将发送到该邮箱内，如abc@domain.com是user@domain.com的别名，那么发往abc@domain.com的邮件将发送到user@domain.com邮箱里。</td>
                </tr>
              </form>
            </table>
            <br>
            <table width="100%" cellspacing="0" cellpadding="0" border="0" class=datalist>
              <tr align="middle"> 
                <th align="center" colspan="7" class=datalistheader ><b><a name="m_usr"></a>别名列表</b></th>
              </tr>
              <tr align="center"> 
                <td   width=30% class=datalistgrida height="22" >邮箱别名</td>
                <td  class=datalistgrida width="40%"  >别名管理</td>
                <td  class=datalistgrida  >&nbsp;</td>
              </tr>
              <%
						  query="select * from mbxals where ba_bnme='"& bnme & "' order by ba_nme desc"
						 
rs1.open query,conn,1,1
If not(rs1.eof And rs1.bof) Then
	%>
              <%

	Do While Not rs1.eof
	%>
              <tr align="center"> 
                <td   class=datalistgrida  align=center height="22">&nbsp;<b><%=trim(rs1("ba_nme"))%></b>&nbsp;<b><font color="#FF0000">@</font></b>&nbsp;<%=mailname%></td>
                <form action="eml_mng.asp" method="post" name=form1>
                  <td  class=datalistgrida    align=center> 
                    <input type=image src="/imgs/del.gif" width="17" height="17" title="删除别名" name="image"  onclick="javascript:return chk_del();">
                    <input type=hidden value="<%=mailname%>" name=mailname >
                    <input type=hidden value="mbx_als_del" name=module>
                    <input type=hidden value="<%=b_usrnme%>" name=mailuser>
                    <input type=hidden value="<%=trim(rs1("ba_nme"))%>" name=mbxalias>
                  </td>
                  <td  class=datalistgrida    align=center>&nbsp;</td>
                </form>
              </tr>
              <%
	rs1.movenext
	Loop
End If
%>
            </table>
          </td>
        </tr>
        <% END IF %>
        <tr> 
          <td  valign="top" ><br>
            <br>
            <br>
            <%
Function showstatus_usr(regstt,regtpe)
regtpe_str=right("000"&cstr(regtpe),2)

regstt_str=right("000"&cstr(regstt),2)
gifstr=regtpe_str&regstt_str&".gif"
showstatus_usr="<img src=/icons/"&gifstr&">"   

End Function
%>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  </tbody> 
</table>
<!--#include virtual="/incs/bottom.asp"-->
