<!--#include virtual="/incs/config.asp" -->


<%chk_log_usr()%>
<%
Dim strContents
module=lcase(SafeRequest("module"))
mailname=trim(SafeRequestform("mailname"))
if mailname="" then
call errorpage(-2,"对不起，请选择所需操作的邮局")
end if
mnme=mailname
conn.open constr
query="select * from v_emllst  where m_unme='"&session("usrname")&"'  and   m_dme='"&mailname&"'"
rs.open query,conn,1,1
if  rs.recordcount<=0 then
call errorpage(-2,"对不起，请选择所需操作的邮局")
response.end
else
m_id=trim(rs("m_id"))
m_regstt=rs("m_regstt")
m_exptme=rs("m_exptme")
m_sst=rs("m_sst")
end if
rs.close
if session("sysclass")<4 then

if m_regstt<>1 and m_regstt<>2  then
call errorpage(-2,"对不起，该邮局没有正式开通，不能操作！")
response.end
end if
if  m_exptme<now() then
call errorpage(-2,"对不起，该邮局已经到期，请先办理续费！")
end if
end if
if  m_sst=1 then
bnme=saferequest("mailuser")
end if
'''''''''''''''''''''''''''''''''''''''''''''''''''
turnurl= "/control/eml_mng/eml_usr.asp?mnme="&mnme
Select Case  module
   Case "eml_grp_add"
      substrContent = "entryclass:eml_mng"&Vend
   substrContent =substrContent& "entrytype:eml_grp_add"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "mailname:" & mailname & Vend
   substrContent = substrContent & "mailgroup:" & trim(SafeRequestform("mailgroup")) & Vend
   substrContent = substrContent & "mailcontent:" & trim(SafeRequestform("mailcontent")) & Vend
   substrContent = substrContent & "." & Vend
turnurl= "/control/eml_mng/eml_grp_edt.asp?mg_nme="&trim(SafeRequestform("mailgroup")) &"&mnme="&mnme
   Case "eml_grp_edt"
   groupmember=trim(SafeRequestform("groupmember"))
   groupmember=replace(groupmember," ","")
   groupmember=replace(groupmember,",",";")
   substrContent = "entryclass:eml_mng"&Vend
   substrContent =substrContent& "entrytype:eml_grp_edt"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "mailname:" & mailname & Vend
   substrContent = substrContent & "mailgroup:" & trim(SafeRequestform("mailgroup")) & Vend
   substrContent = substrContent & "mailcontent:" & trim(SafeRequestform("mailcontent")) & Vend
   substrContent = substrContent & "groupmember:" & groupmember & Vend
   substrContent = substrContent & "." & Vend
turnurl= "/control/eml_mng/eml_grp_edt.asp?mg_nme="&trim(SafeRequestform("mailgroup")) &"&mnme="&mnme
   Case "eml_grp_del"
      substrContent = "entryclass:eml_mng"&Vend
   substrContent =substrContent& "entrytype:eml_grp_del"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "mailname:" & mailname & Vend
   substrContent = substrContent & "mailgroup:" & trim(SafeRequestform("mailgroup")) & Vend
   substrContent = substrContent & "." & Vend
turnurl= "/control/eml_mng/eml_grp.asp?mnme="&mnme
 Case "mbx_als_add"
      substrContent = "entryclass:eml_mng"&Vend
   substrContent =substrContent& "entrytype:mbx_als_add"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "mailname:" & mailname & Vend
   substrContent = substrContent & "mailuser:" & trim(SafeRequestform("mailuser")) & Vend
   substrContent = substrContent & "mbxalias:" & trim(SafeRequestform("mbxalias")) & Vend
   substrContent = substrContent & "." & Vend
turnurl= "/control/eml_mng/eml_mbx.asp?bnme="&trim(SafeRequestform("mailuser"))&"&mailname="&mailname&"&mtpe="&m_sst
   Case "mbx_als_del"
      substrContent = "entryclass:eml_mng"&Vend
   substrContent =substrContent& "entrytype:mbx_als_del"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "mailname:" & mailname & Vend
   substrContent = substrContent & "mailuser:" & trim(SafeRequestform("mailuser")) & Vend
   substrContent = substrContent & "mbxalias:" & trim(SafeRequestform("mbxalias")) & Vend
   substrContent = substrContent & "." & Vend
turnurl= "/control/eml_mng/eml_mbx.asp?bnme="&trim(SafeRequestform("mailuser"))&"&mailname="&mailname&"&mtpe="&m_sst
   Case "eml_als_add"
      substrContent = "entryclass:eml_mng"&Vend
   substrContent =substrContent& "entrytype:eml_als_add"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "mailname:" & mailname & Vend
   substrContent = substrContent & "maildomain:" & trim(SafeRequestform("maildomain")) & Vend
   substrContent = substrContent & "." & Vend
turnurl= "/control/eml_mng/eml_dme.asp?mnme="&mnme
   Case "eml_als_del"
      substrContent = "entryclass:eml_mng"&Vend
   substrContent =substrContent& "entrytype:eml_als_del"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "mailname:" & mailname & Vend
   substrContent = substrContent & "maildomain:" & trim(SafeRequestform("maildomain")) & Vend
   substrContent = substrContent & "." & Vend
turnurl= "/control/eml_mng/eml_dme.asp?mnme="&mnme
 Case "eml_mbx_add"
   substrContent = "entryclass:eml_mng"&Vend
   substrContent =substrContent& "entrytype:eml_mbx_add"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "mailname:" & mailname & Vend
   substrContent = substrContent & "mailuser:" & trim(SafeRequestform("mailuser")) & Vend
   substrContent = substrContent & "mailownname:" & trim(SafeRequestform("mailownname")) & Vend
   substrContent = substrContent & "mailpassword:" & trim(SafeRequestform("mailpassword")) & Vend
   substrContent = substrContent & "mailmaxsize:" & trim(SafeRequestform("mailmaxsize")) & Vend
   substrContent = substrContent & "." & Vend
  Case "eml_mbx_del"
      substrContent = "entryclass:eml_mng"&Vend

   substrContent =substrContent& "entrytype:eml_mbx_del"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "mailname:" & mailname & Vend
   substrContent = substrContent & "mailuser:" & trim(SafeRequestform("mailuser")) & Vend
   substrContent = substrContent & "." & Vend
  Case "eml_mbx_ctt"
      substrContent = "entryclass:eml_mng"&Vend
   substrContent =substrContent& "entrytype:eml_mbx_ctt"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "mailname:" & mailname & Vend
   substrContent = substrContent & "mailuser:" & trim(SafeRequestform("mailuser")) & Vend
   substrContent = substrContent & "." & Vend
 turnurl= "/control/eml_mng/eml_mbx.asp?bnme="&trim(SafeRequestform("mailuser"))&"&mailname="&mailname&"&mtpe="&m_sst
  Case "eml_mng_pss"
      substrContent = "entryclass:eml_mng"&Vend

   substrContent =substrContent& "entrytype:eml_mng_pss"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "mailname:" & mailname & Vend
   substrContent = substrContent & "newpass1:" & trim(SafeRequestform("newpass1")) & Vend
   substrContent = substrContent & "newpass2:" & trim(SafeRequestform("newpass2")) & Vend
   substrContent = substrContent & "." & Vend
 turnurl= "/control/eml_mng/eml_usr.asp?mnme="&mnme
 case "eml_mbx_edt"
      substrContent = "entryclass:eml_mng"&Vend

   substrContent =substrContent& "entrytype:eml_mbx_edt"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "mailname:" & mailname & Vend
   substrContent = substrContent & "mailmaxsize:" & trim(SafeRequestform("mailmaxsize")) & Vend
   substrContent = substrContent & "mailpassword:" & trim(SafeRequestform("mailpassword")) & Vend
   substrContent = substrContent & "mailuser:" & trim(SafeRequestform("mailuser")) & Vend
   substrContent = substrContent & "." & Vend
turnurl= "/control/eml_mng/eml_mbx.asp?bnme="&trim(SafeRequestform("mailuser"))&"&mailname="&mailname&"&mtpe="&m_sst
case "eml_dme_chg"
      substrContent = "entryclass:eml_mng"&Vend

   substrContent =substrContent& "entrytype:eml_dme_chg"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "mailname:" & mailname & Vend
   substrContent = substrContent & "newmaildomain:" & trim(SafeRequestform("newmaildomain")) & Vend
   substrContent = substrContent & "newmailpassword:" & trim(SafeRequestform("newmailpassword")) & Vend
   substrContent = substrContent & "." & Vend
turnurl= "/control/eml_mng/eml_dme.asp?mnme="&trim(SafeRequestform("newmaildomain"))
case "eml_ctr_wem"
   substrContent = "entryclass:eml_mng"&Vend
   substrContent =substrContent& "entrytype:eml_ctr_wem"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "mailname:" & mailname & Vend
   substrContent = substrContent & "mailuser:" & trim(SafeRequestform("mailuser")) & Vend
   substrContent = substrContent & "." & Vend
turnurl= "/control/eml_mng/eml_usr.asp?mnme="&mnme
  case "eml_mbx_pss"
   substrContent = "entryclass:eml_mng"&Vend
   substrContent =substrContent& "entrytype:eml_mbx_pss"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "mailname:" & mailname & Vend
   substrContent = substrContent & "mailpassword:" & trim(SafeRequestform("mailpassword")) & Vend
   substrContent = substrContent & "mailuser:" & trim(SafeRequestform("mailuser")) & Vend
   substrContent = substrContent & "." & Vend
turnurl= "/control/eml_mng/eml_mbx.asp?bnme="&trim(SafeRequestform("mailuser"))&"&mailname="&mailname&"&mtpe="&m_sst
  case "eml_mbx_cnt"
   substrContent = "entryclass:eml_mng"&Vend
   substrContent =substrContent& "entrytype:eml_mbx_cnt"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "mailname:" & mailname & Vend
   substrContent = substrContent & "mailownname:" & trim(SafeRequestform("mailownname")) & Vend
   substrContent = substrContent & "mailuser:" & trim(SafeRequestform("mailuser")) & Vend
   substrContent = substrContent & "." & Vend
turnurl= "/control/eml_mng/eml_mbx.asp?bnme="&trim(SafeRequestform("mailuser"))&"&mailname="&mailname&"&mtpe="&m_sst
  case "eml_mbx_sze"
   substrContent = "entryclass:eml_mng"&Vend
   substrContent =substrContent& "entrytype:eml_mbx_sze"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "mailname:" & mailname & Vend
   substrContent = substrContent & "mailmaxsize:" & trim(SafeRequestform("mailmaxsize")) & Vend
   substrContent = substrContent & "mailuser:" & trim(SafeRequestform("mailuser")) & Vend
   substrContent = substrContent & "." & Vend
turnurl= "/control/eml_mng/eml_mbx.asp?bnme="&trim(SafeRequestform("mailuser"))&"&mailname="&mailname &"&mtpe="&m_sst
'''''''''''''''''''''''''''''''''''''''''
end select
   doresult = hzsocket(substrContent)
   left5=left(doresult,5)
   If left5= "10000" Then
      call okpage( turnurl)
   Else
      call errorpage(-2,doresult)
   end if

%>
