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

<%
chk_log()
chk_newpwr 1,1,2
mailname=trim(SafeRequest("mailname"))
if mailname="" then
		      call errorpage(-2,"对不起,参数错误!")
end if
conn.open constr
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
rs.open query,conn,1,1
if rs.recordcount<>1 then
     call errorpage(-2,"对不起，该邮局不存在或者您无权操作！...")
elseif cint(rs("m_regstt"))=0 then
     call errorpage(-2,"对不起，该邮局还没有开通！...")
elseif rs("m_regtpe")=0 then
     call errorpage(-2,"对不起，试用邮局请执行购买操作！....")
end if
if trim(lcase(rs("m_unme")))<>trim(lcase(session("usrname"))) then
query="select * from memlst where u_nme='"&rs("m_unme")&"'"
rs1.open query,conn,1,1
entryuser=rs("m_unme")
entrypass=trim(rs1("u_pss"))
agentname=session("usrname")
agentpass=session("usrpass")
rs1.close
end if
proid=trim(rs("m_prd"))
rs.close
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''表单处理 
   substrContent = "entryclass:pdtrnw"&Vend
   substrContent =substrContent& "entrytype:pdtrnw"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "proid:" &proid& Vend
   substrContent = substrContent & "pdtname:" &mailname& Vend
   substrContent = substrContent & "years:"& SafeRequest("years") & Vend
   substrContent = substrContent & "pdtprcstr:"& SafeRequest("m_prcstr") & Vend
   substrContent = substrContent & "newprice:"& SafeRequest("newprice") & Vend
   substrContent = substrContent & "." & Vend
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''表单处理 
   doresult = hzsocket(substrContent)
 
   left5=left(doresult,5)
   If left5= "10000" Then
      call okpage( "/master/pdtmng/eml_mng/eml_rnw.asp?mnme=" & mailname)
   Else
      call errorpage(-2,doresult)
   end if



%>