<!--#include virtual="/incs/config.asp" -->
<!--#include virtual="/incs/top.asp" -->
<SCRIPT language=JavaScript type=text/javascript>
  var current = "登入";
  var help     = "获得当前信息的帮助: " + current;
  var headerMessage = "";
  function statusBarMsg(message)
  {
    window.status = message;
  }

  function getCookie(name)
  {
    var cookieFound = false;
    var start = 0;
	var end = 0;
	var cookieString = document.cookie;
	var cookieValue;
	var i = 0;

	//scan the Cookie for the name
	while (i <= cookieString.length)
	{
	  start = i;
	  end = start + name.length;
	  if(cookieString.substring(start, end) == name)
	  {
	    cookieFound = true;
		break;
	  }
	  i++;
	}

	//is name found/
	if(cookieFound)
	{
	  start = end+1;
	  end = document.cookie.indexOf(";",start);
	  if(end < start)
	  end = document.cookie.length;

	  cookieValue = document.cookie.substring(start, end);
	  start = 0;
	  end = cookieValue.indexOf(" ", start);

	  if(end < start)
	  end = cookieValue.length;

	  return cookieValue.substring(start, end);
	}
	return "";
  }

  function initFields()
  {
    document.logon.userid.value = getCookie("IMail_UserId");
	document.logon.passwd.value = getCookie("IMail_password");
  }

  function deleteCookie(name, path, domain)
  {
    if(getCookie(name))
	{
	  document.cookie = name+ "=" +
	  ((path) ? "; path=" + path : "") +
	  ((domain) ? "; domain=" + domain: "") +
	  "; expires=Thu, 01-Jan-70 00:00:01 GMT";
	}
  }
function ifok()
{
if (confirm("请再次确认是否更换域名！"))
document.mail_modi.submit();
}
  function formSubmit()
  {
    document.logon.userid.value = document.logon.userid1.value + "@" + document.logon.useridX.value;
    deleteCookie("IMail_UserId", "/", null);
	deleteCookie("IMail_password", "/", null);
	deleteCookie("IMail_UserKey", "/", null);
  }

  // Begin cs_help.cgi
  function openHelp(sHelp)
  {
    url = '/' + sHelp + '.html';
	helpWin=window.open("",sHelp,"width=400,height=400,status=no,toolbar=no,menubar=no,scrollbars=yes,resizable=yes");
	helpWin.document.write('<HTML><HEAD><TITLE>Online Help</TITLE></HEAD><FRAMESET BORDER=0 ROWS="24, *">');
	helpWin.document.write('<FRAME MARGINWIDTH="0" MARGINHEIGHT="0" SCROLLING="no" NAME="toolbar" NORESIZE SRC="helptoolbar.html">');
	helpWin.document.write('<FRAME MARGINWIDTH="0" MARGINHEIGHT="0" SCROLLING="auto" NAME="mainPage" src="' + url + '">');
	helpWin.document.write('<NOFRAMES>对不起，您的浏览器好像不支持框架结构，建议你安装微软IE6.0</NOFRAMES>');
	helpWin.document.write('</FRAMESET></HTML>');
  }

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"))
m_id=trim(rs("m_id"))

%>
<%
			    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"> 
            <table align="center" class=datalist border="0" cellpadding="0" cellspacing="0" width="100%">
              <tr> 
                <th colspan="4" class=datalistheader align="middle" > 
                  <p><b>基本状态</b> 
                </th>
              </tr>
              <tr> 
                <td width="25%" class=datalistgrida align="middle" > 
                  <p align="left">域名： 
                </td>
                <td height="21" colspan="3" align=left class=datalistgrida > <b><font color=#ff0000><%= rs("m_dme")%></font>&nbsp; 
                  <%
				  query="select * from emlals where ma_emldme='"&mnme&"'"
				  rs1.open query,conn,1,1
				  if not  rs1.eof then
				  response.write trim(rs1("ma_dme"))&"&nbsp;"
				  end if
				  rs1.close
				  %>
                  </b> </td>
              </tr>
              <tr> 
                <td width="25%"  class=datalistgrida align="middle" > 
                  <p align="left">名称： 
                </td>
                <td height="21" width="25%" class=datalistgrida align="middle" > 
                  <div align="left"> 
                    <%
				  query="select * from pdtlst where g_prd='"&rs("m_prd")&"'"
				  rs1.open query,conn,1,1
				  if not  rs1.eof then
				  response.write trim(rs1("g_nme"))
				  end if
				  rs1.close
				  %>
                  </div>
                </td>
                <td width="25%" height="21" class=datalistgrida align="middle" > 
                  <p align="left">IP地址： 
                </td>
                <td height="21" class=datalistgrida align="middle" > 
                  <div align="left"><%= rs("m_svrip")%></div>
                </td>
              </tr>
              <tr> 
                <td class=datalistgrida > 
                  <div align="left">状态：</div>
                </td>
                <td  class=datalistgrida > 
                  <div align="left"><%= showstatus(rs("m_regstt"),rs("m_regtpe"),rs("m_exptme"))%></div>
                </td>
                <td class=datalistgrida > 
                  <p align="left">邮局用户数： 
                </td>
                <td class=datalistgrida > 
                  <div align="left"><%= rs("m_usrcnt")%> 
                    <%if  rs("m_usradd")>0 then
							  response.write " + "&rs("m_usradd")
							  end if %>
                    &nbsp;</div>
                </td>
              </tr>
              <tr> 
                <td height="22" class=datalistgrida > 
                  <div align="left">邮局空间：</div>
                </td>
                <td  height="22"  class=datalistgrida  > 
                  <div align="left"><%= rs("m_sze")%> 
                    <%if  rs("m_szeadd")>0 then
							  response.write " + "&rs("m_szeadd")
							  end if %>
                    M</div>
                </td>
                <td height="22" class=datalistgrida >使用期限： </td>
                <td height="22" class=datalistgrida ><%=right(left(replace(rs("m_addtme")," ","   "),10),8)%>&nbsp;<font color="#FF0000">至</font>&nbsp;<%= right(left(replace(rs("m_exptme")," ","   "),10),8)%></td>
              </tr>
			  <tr> 
                <td class=datalistgrida height="22"> 
                  <p style="margin-left: 6">相关操作:</p>
          </td>
          <td class=datalistgrida colspan=3> 
            <p style="margin-left: 6"> 
			<script>
function deleteit(proid)
{
if (confirm("确认删除此企业邮局吗？"))
{location.href="/master/pdtmng/eml_mng/eml_del.asp?mailname="+proid;
}
}
</script>
              <input type="button" name="Submit22" value="订单删除" class=btxx onclick="javascript:return deleteit('<%=rs("m_dme")%>');">
			  <% if rs("m_regstt")=0 then %>
              <input type="button" name="Submit23" value="购买" class=btxx onclick="javascript:showurl('/master/pdtbuy/eml_buy/eml_pay.asp?mnme=<%=rs("m_dme")%>');">
			  <% end if %>
            
          </td>
        </tr>
              <tr> 
                <td class=datalistgrida  height="22" > 所属会员：</td>
                <td class=datalistgrida  colspan="3"><a href="javascript:showurl('/master/memmng/mem_dtl.asp?unme=<%=u_nme%>');" class=commonface><b><%=u_nme%></b></a> 
                </td>
              </tr>
              <tr > 
                <td class=datalistgrida  height="22" > 是否为套餐：</td>
                <td class=datalistgrida  colspan="3"> 
                  <% if isnull(rs("setnme"))=false and rs("setnme")<>""  then %>
                  <a href="javascript:showurl('/master/pdtmng/set_mng/set_idx.asp?snme=<%=rs("setnme")%>');" class=commonface><u>查看套餐订单</u></a> 
                  <%else %>
                  不属于套餐购买 
                  <% end if %>
                </td>
              </tr>
              <% if isnull(rs("pstrotprd"))=false and rs("pstrotprd")<>"" then %>
              <tr > 
                <td class=datalistgrida  height="22" > 是否为赠送品：</td>
                <td class=datalistgrida  colspan="3"> <a href="javascript:showurl('/master/turn.asp?gid=<%=trim(rs("pstrotprd"))%>&pid=<%=rs("pstrotnme")%>');" class=commonface><u>本品为赠送品,点击查看获得该赠送品的产品</u></a> 
                </td>
              </tr>
              <% end if %>
            </table>
          </td>
        </tr>
        <tr> 
          <td> 
            <table width="100%" border="0" cellspacing="0" cellpadding="0"  id=identity>
              <tr> 
                <td>&nbsp;</td>
              </tr>
              <tr> 
                <td> 
                  <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="25%" class=datalistgrida height="22" > 
                        <div align="center" style="display:block;">单位名称： 
                          <input type="button" name="Submit" value="生成会员" class=btxx
			  onClick="javascript:showurl('/master/memmng/mem_add.asp?u_nme=<%=left(rs("m_dme"),instr(rs("m_dme"),".")-1)%>&u_pss=<%=pss_mak(8)%>&u_copnme_cn=<%=rs("m_copnme_cn")%>&u_ctt_cn=<%=rs("m_ctt_cn")%>&u_prv_cn=<%=rs("m_prv_cn")%>&u_adr_cn=<%=rs("m_adr_cn")%>&u_cde=<%=rs("m_cde")%>&u_eml=<%=rs("m_eml")%>&u_tel=<%=rs("m_tel")%>&u_fax=<%=rs("m_fax")%>&g_prd=<%=rs("m_prd")%>&g_pnme=<%=rs("m_dme")%>&oldunme=<%=rs("m_unme")%>');">
                        </div>
                      </td>
                      <td colspan="2" class=datalistgrida ><%=rs("m_copnme_cn")%></td>
                    </tr>
                    <tr > 
                      <td  class=datalistgrida height="22" > 
                        <div align="center">联系人：</div>
                      </td>
                      <td colspan="2" class=datalistgrida ><%=rs("m_ctt_cn")%></td>
                    </tr>
                    <tr > 
                      <td class=datalistgrida height="22"  > 
                        <div align="center">省份：</div>
                      </td>
                      <td colspan="2" class=datalistgrida ><%=rs("m_prv_cn")%></td>
                    </tr>
                    <tr > 
                      <td class=datalistgrida height="22"  > 
                        <div align="center">联系地址：</div>
                      </td>
                      <td colspan="2" class=datalistgrida ><%=rs("m_adr_cn")%></td>
                    </tr>
                    <tr > 
                      <td class=datalistgrida height="22"  > 
                        <div align="center">邮政编码：</div>
                      </td>
                      <td colspan="2" class=datalistgrida height="19" ><%=rs("m_cde")%></td>
                    </tr>
                    <tr > 
                      <td  class=datalistgrida height="22" > 
                        <div align="center">联系电话：</div>
                      </td>
                      <td colspan="2" class=datalistgrida ><%=rs("m_tel")%></td>
                    </tr>
                    <tr > 
                      <td class=datalistgrida height="22" > 
                        <div align="center">传真：</div>
                      </td>
                      <td colspan="2" class=datalistgrida ><%=rs("m_fax")%></td>
                    </tr>
                    <tr > 
                      <td  class=datalistgrida height="22" > 
                        <div align="center">电子邮件：</div>
                      </td>
                      <td colspan="2" class=datalistgrida ><%=rs("m_eml")%></td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
        <tr> 
          <td height="20" valign="top" > <br>
        <%
Function showstatus(regstt,regtpe,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)
regtitle=showtitle(regtpe_str,regstt_str)
gifstr=regtpe_str&regstt_str&".gif"
showstatus="<img src=/icons/"&gifstr&" title="&regtitle&" style='cursor:hand;'>"   

End Function
function showtitle(regtpe_str,regstt_str)
tpestr=""
sttstr=""
select case  regtpe_str
case  "00"
tpestr="购买方式为试用"
case  "01"
tpestr="购买方式为正式购买"
case "05"
tpestr="购买方式为赠送"
case else
tpestr="购买方式为未知"
end select
select case  regstt_str
case  "00"
sttstr="运行状态为未开通"
case  "01"
sttstr="运行状态为运行中"
case  "02"
sttstr="运行状态为暂停中"
case  "03"
sttstr="运行状态为处理中"
case  "04"
sttstr="运行状态为已完全删除"
case  "05"
sttstr="运行状态为禁用中"
case  "06"
sttstr="运行状态为待开通"
case  "17"
sttstr="运行状态为邮局设置被删除/邮件资料保留"
case  "18"
sttstr="运行状态为30天后过期"
case  "19"
sttstr="运行状态为7天后过期"
case  "20"
sttstr="运行状态为已过期"
case  else
sttstr="运行状态为未知"
end select
showtitle=tpestr&","&sttstr
end function
%>
            <%
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"-->






