<%
response.buffer=false
%>
<!--#include virtual="/incs/config.asp" -->


<%
chk_log_usr()
module=trim(SafeRequest("module"))
mailname=trim(SafeRequest("mailname"))
if module="" or mailname="" then
call errorpage(-2,"对不起，请选择您需要升级的企业邮局！")
end if
conn.open constr
query="select * from v_emllst  where m_dme='"&mailname&"' and m_unme='"&session("usrname")&"'"
rs.open query,conn,1,1
if rs.recordcount<>1 then
call errorpage(-2,"对不起，您所选择的企业邮局不存在或者您无权执行此操作！")
end if

if rs("m_regtpe")=0 then
call errorpage(-2,"对不起，试用邮局无法使用升级功能！")
end if
if rs("m_regtpe")=2 then
call errorpage(-2,"对不起，赠送邮局无法使用升级功能！")
end if

if rs("m_regstt")<>1 then
call errorpage(-2,"对不起，您所选择的企业邮局不处在正常状态，无法操作！")
end if
if rs("m_exptme")<=now() then
call errorpage(-2,"对不起，您的企业邮局已过期，请先续费！")
end if
buyid=rs("m_id")
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''表单处理 
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''具体操作
select case module
case "prd"
   substrContent = "entryclass:eml_odr"&Vend
   substrContent =substrContent& "entrytype:prd"&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 & "newproid:"& trim(SafeRequest("newproid")) & Vend
   substrContent = substrContent & "." & Vend
case "sze"
   substrContent = "entryclass:eml_odr"&Vend
   substrContent =substrContent& "entrytype: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 & "m_prcstr:"& trim(SafeRequest("m_prcstr")) & Vend
   substrContent = substrContent & "m_szeaddcnt:"& trim(SafeRequest("m_szeaddcnt")) & Vend
   substrContent = substrContent & "." & Vend
case "cns"
   substrContent = "entryclass:eml_odr"&Vend
   substrContent =substrContent& "entrytype:cns"&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 & "m_prcstr:"& trim(SafeRequest("m_prcstr")) & Vend
   substrContent = substrContent & "m_cnsaddcnt:"& trim(SafeRequest("m_cnsaddcnt")) & Vend
   substrContent = substrContent & "." & Vend
end select
   doresult = hzsocket(substrContent)
   left5=left(doresult,5)
   If left5= "10000" Then
      call okpage( "/control/eml_mng/eml_upd.asp?mnme=" & mailname)
   Else
      call errorpage(-2,doresult)
   end if

''''''''''''''''''''''''
%>
