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

function ifok()
{
if (confirm("请再次确认是否更换域名！"))
document.mail_modi.submit();
}


  // Begin cs_help.cgi

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

	mnme=SafeRequest("mnme")
	If mnme="" Then
	call errorpage(-2,"对不起，参数错误！")
	End If
if session("sysclass")>=5 then
query="select * from v_emllst   where m_dme ='"&mnme&"'"
elseif session("sysclass")>=4 then
query="select * from v_emllst  where m_dme ='"&mnme&"'  and  ((("&session("sysarestr")&" or u_myare=0) and u_rotnme='') or u_rotnme='"&session("usrname")&"')"
else
query="select * from v_emllst   where m_dme ='"&mnme&"' m_unme='"&session("usrname")&"'"
end if
	conn.open constr

	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"))
	g_sst=rs("m_sst")
u_nme=trim(rs("m_unme"))

%>
<%
			    proid=trim(rs("m_prd"))

		%>
<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 valign="top"  height="50"> 
            <table align="center" border="0" cellpadding="0" cellspacing="0" width="100%" class=datalist>
              <tr align="center"> 
                <th colspan="6" class=datalistheader> <b><a name="m_usr"></a>用户添加</b> 
                </th>
              </tr>
              <tr align="middle" > 
                <td width="25%" height="22" valign="bottom"  class=datalistgrida > 
                  <p align="center">邮箱用户 
                </td>
                <td width="15%" height="22" valign="bottom" class=datalistgrida > 
                  <p align="center">邮箱密码(6-16位) 
                </td>
                <td valign="bottom" width="15%" class=datalistgrida > 
                  <div align="center">邮箱大小</div>
                </td>
                <td valign="bottom" align="center" width="25%" class=datalistgrida >备注</td>
                <td colspan=2  valign="bottom" class=datalistgrida > 
                  <div align="center">添加</div>
                </td>
              </tr>
              <form action="eml_mng.asp" method="post" name=form1>
                <tr> 
                  <td  height="20" class=datalistgrida align="center" > 
                    <input name="mailuser"   tabindex=1  style="FONT-SIZE: 9pt ;border: 1px solid #C0C0C0 ; height:16px ;width:60px;">
                    @<%=mailname%> </td>
                  <td   height="20"   class=datalistgrida > 
                    <div align="center"> 
                      <input name="mailpassword"   tabindex=1 size=20 style="FONT-SIZE: 9pt ;border: 1px solid #C0C0C0 ; height:16px ;width:90px;" type="password">
                      <input name="mailname" type="hidden" value="<%=mailname%>">
                      <input name="module" type=hidden value="eml_mbx_add" >
                    </div>
                  </td>
                  <td   height="20" align="center"  class=datalistgrida  > 
                    <input name="mailmaxsize" style="FONT-SIZE: 9pt ;border: 1px solid #C0C0C0 ; height:16px ;width=60px" tabindex=1 >
                    M </td>
                  <td   height="20" align="center"  class=datalistgrida  > 
                    <input name="mailownname" style="FONT-SIZE: 9pt ;border: 1px solid #C0C0C0 ; height:16px;width=200px" tabindex=1>
                  </td>
                  <td height="20" colspan="2"  align="center" class=datalistgrida > 
                    <input type=submit value="添 加" name=adfadf class=btxx>
                  </td>
                </tr>
              </form>
            </table>			
            <br>
			<% if g_sst<>2 then %>
            <table width="100%" class=datalist cellspacing="0" cellpadding="0" border="0">
              <tr > 
                <th    align="center" colspan="6" class=datalistheader ><b><a name="m_usr"></a>用户列表</b></th>
              </tr>
              <tr > 
                <td height="22" class=datalistgrida  width=25% align="center">邮箱用户</td>
                <td height="22" class=datalistgrida   width=7% align="center">状态</td>
                <td height="22"  class=datalistgrida  width=15% align="center">使用者</td>
                <td height="22"  class=datalistgrida  width=15% align="center">邮箱大小</td>
                <td height="22" class=datalistgrida   width=15% align="center">改变状态</td>
                <td height="22" class=datalistgrida align="center" >邮箱管理</td>
              </tr>
              <%
rs1.open "select * from mbxlst where b_emldme='"& mnme & "' order by b_usrnme desc",conn,1,1
If not(rs1.eof And rs1.bof) Then
	%>
              <%

	Do While Not rs1.eof
	%>
              <tr > 
                <td height="22"  class=datalistgrida  align=center>&nbsp;<b><%=trim(rs1("b_usrnme"))%></b>&nbsp;<b><font color="#FF0000">@</font></b>&nbsp;<%=mailname%></td>
                <td height="22" class=datalistgrida  align="center" ><%= showstatus_usr(rs1("b_regstt"),rs("m_regtpe"))%></td>
                <td height="22" class=datalistgrida  align="center" ><%=trim(rs1("b_ownnme"))%></td>
                <td height="22" class=datalistgrida  align="center" ><%=trim(rs1("b_sze"))%>&nbsp;M</td>
                <form action="eml_mng.asp" method="post" name=form1>
                  <td height="22" align="center"  class=datalistgrida > 
                    <% if rs1("b_regstt")="1" then
							response.write "<input type=submit name=ifok value='停止' onclick=""javascript:b_regstt_chg();"" class=btxx>"
							elseif rs1("b_regstt")="2" then
							response.write "<input type=submit name=ifok value='启用' onclick=""javascript:b_regstt_chg();""  class=btxx>"					
							else
							response.write "不可用"
							end if
							
							%>
                    <input name="mailname" type="hidden" value="<%=mailname%>">
                    <input name="mailuser" type="hidden" value="<%=rs1("b_usrnme")%>">
                    <input name="module" type=hidden value="eml_mbx_ctt" >
                  </td>
                </form>
                <form action="eml_mng.asp" method="post" name=form1>
                  <td  height="20" align="center"  class=datalistgrida > 
                    <div align="center"><img src="/imgs/edit.gif" width="23" height="17"  onclick="javascript:location.href='eml_mbx.asp?bnme=<%=rs1("b_usrnme")%>&mailname=<%=mailname%>&mtpe=<%=g_sst%>';" title="管理邮箱" style="cursor:hand;"> 
                      <input name="mailname" type="hidden" value="<%=mailname%>">
                      <input name="mailuser" type="hidden" value="<%=rs1("b_usrnme")%>">
                      <input name="module" type=hidden value="eml_mbx_del" >
                      <input type=image src="/imgs/del.gif" width="17" height="17" title="删除信箱" name="image"  onclick="javascript:return chk_del();">
                    </div>
                  </td>
                </form>
              </tr>
              <%
	rs1.movenext
	Loop
End If
%>
            </table>
       <% else %>
	   <table width="100%" class=datalist cellspacing="0" cellpadding="0" border="0">
              <tr > 
                <th    align="center" colspan="6" class=datalistheader ><b><a name="m_usr"></a>用户列表</b></th>
              </tr>
              <tr > 
                <td height="22" class=datalistgrida  width=23% align="center">邮箱用户</td>
                <td height="22" class=datalistgrida   width=7% align="center">状态</td>
                <td height="22"  class=datalistgrida  width=27% align="center">备注</td>
                <td height="22"  class=datalistgrida  width=12% align="center">邮箱大小</td>
                <td height="22" class=datalistgrida   width=12% align="center">改变状态</td>
                <td height="22" class=datalistgrida align="center" >邮箱管理</td>
              </tr>
              <%
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 & "." & Vend
   doresult = hzsocket(substrContent)
   left5=left(doresult,5)
If left5="10000" Then
	%>
              <%
	doresult=right(doresult,len(doresult)-5)		  
usrstr=split(doresult,"|")
	for i=0 to ubound(usrstr)
	if instr(usrstr(i),";")>0 then
	usrstr2=lcase(usrstr(i))
	usrdtl=split(usrstr2,";")
	if usrdtl(8)=1 then
	ctreml=usrdtl(0)
	end if
	%>
              <tr > 
                <td height="22"  class=datalistgrida  align=center>&nbsp;<b><%=usrdtl(0)%></b>&nbsp;<b><font color="#FF0000">@</font></b>&nbsp;<%=mailname%></td>
                <td height="22" class=datalistgrida  align="center" ><%= showstatus_usr_wem(usrdtl(2),rs("m_regtpe"))%></td>
                <td height="22" class=datalistgrida  align="center" ><%=usrdtl(3)%></td>
                <td height="22" class=datalistgrida  align="center" ><%=clng(usrdtl(1))%>&nbsp;M</td>
                <form action="eml_mng.asp" method="post" name=form1>
                  <td height="22" align="center"  class=datalistgrida > 
                    <%
					 if usrdtl(2)="false"  then
							response.write "<input type=submit name=ifok value='停止' onclick=""javascript:b_regstt_chg();"" class=btxx>"
							elseif usrdtl(2)="true" then
							response.write "<input type=submit name=ifok value='启用' onclick=""javascript:b_regstt_chg();""  class=btxx>"					
							else
							response.write "不可用"
							end if
							
							%>
                    <input name="mailname" type="hidden" value="<%=mailname%>">
                    <input name="mailuser" type="hidden" value="<%=usrdtl(0)%>">
                    <input name="module" type=hidden value="eml_mbx_ctt" >
                  </td>
                </form>
                <form action="eml_mng.asp" method="post" name=form1>
                  <td  height="20" align="center"  class=datalistgrida > 
                    <div align="center"><img src="/imgs/edit.gif" width="23" height="17"  onclick="javascript:location.href='eml_mbx.asp?mtpe=<%=g_sst%>&mailname=<%=mailname%>&bnme=<%=usrdtl(0)%>';" title="管理邮箱" style="cursor:hand;"> 
                      <input name="mailname" type="hidden" value="<%=mailname%>">
                      <input name="mailuser" type="hidden" value="<%=usrdtl(0)%>">
                      <input name="module" type=hidden value="eml_mbx_del" >
                      <input type=image src="/imgs/del.gif" width="17" height="17" title="删除信箱" name="image"  onclick="javascript:return chk_del();">
                    </div>
                  </td>
                </form>
              </tr>
              <%
			  end if 
	next
End If
%>
            </table><br>
			
			<table width="100%" class=datalist cellspacing="0" cellpadding="0" border="0">
              <tr > 
                <th    align="center" class=datalistheader ><b>管理邮箱</b></th>
              </tr>
              <tr > 
                <td height="22" class=datalistgrida  width=23% align="center">注：登录管理邮箱可以设置相关邮局操作，以及开通和管理其它邮箱。当前管理邮箱为：<b><%if ctreml <>"" then
				response.write ctreml&"@"&mailname
				else
				response.write "无"
				end if%></b></td>
              </tr>
			  <form action=eml_mng.asp method=post>
              <tr > 
                <td height="22"  class=datalistgrida  align=center>
				<select name="mailuser">
				<option value="">无</option>
              <%
	for i=0 to ubound(usrstr)
	if instr(usrstr(i),";")>0 then
	usrstr2=lcase(usrstr(i))
	usrdtl=split(usrstr2,";")
	if  ctreml=usrdtl(0) then
            response.write "<option  selected value='"&usrdtl(0)&"'>"&usrdtl(0)&"@"&mailname&"</option>"
			else
            response.write "<option value='"&usrdtl(0)&"'>"&usrdtl(0)&"@"&mailname&"</option>"
			end if
end if
	next
%>
				</select>
                  <input type=submit value="设  定" name=adfadf2 class=btxx>
                       <input name="mailname" type="hidden" value="<%=mailname%>">
                      <input name="module" type="hidden" value="eml_ctr_wem">
               </td>
           
              </tr></form>
            </table>
          <% end if %>
	      </td>
        </tr>
        <tr> 
          <td height="175" valign="top" > <br>
          </td>
        </tr>
        <tr> 
          <td height="20" valign="top" > <br>
            <%
Function showstatus(byval regstt,byval regtpe,byval exptme)
if cdate(exptme)-date()<0 then
regstt=20
elseif cdate(exptme)-date()<7 and regtpe<>0 then
regstt=19
elseif cdate(exptme)-date()<30 and regtpe<>0 then
regstt=18
end if
regtpe_str=right("000"&cstr(regtpe),2)
regstt_str=right("000"&cstr(regstt),2)
gifstr=regtpe_str&regstt_str&".gif"
showstatus="<img src=/icons/"&gifstr&">"   

End Function
%>
            <%
Function showstatus_usr(byval regstt,byval 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
%>
            <%
Function showstatus_usr_wem(byval regstt,byval regtpe)
if regstt="false" then
regstt=1
else
regstt=2
end if
regtpe_str=right("000"&cstr(regtpe),2)
regstt_str=right("000"&cstr(regstt),2)
gifstr=regtpe_str&regstt_str&".gif"
showstatus_usr_wem="<img src=/icons/"&gifstr&">"   

End Function
%>

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






