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


<%chk_log()%>
<%
chk_newpwr 1,0,4

if session("agentname")<>"" and  mid(session("oldpower"),7,1)<>"1" then
call errorpage(-2,"对不起，您没有产品管理权限")
end if

conn.open constr
hostname=trim(SafeRequest("hostname"))
module=trim(SafeRequest("module"))
if hostname=""  then
call errorpage(-2,"对不起，请选择需要操作的主机！")
end if
if module="" or  isnull(module) then
call errorpage(-2,"对不起，请选择需要操作的类型！")
end if
module=lcase(module)
'$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
if module="hst_icpdel" then
   substrContent = "entryclass:hst_odr"&Vend
   substrContent =substrContent& "entrytype:hst_icpdel"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "hostname:" & hostname & Vend
   substrContent = substrContent & "." & Vend
turnurl= "/master/pdtmng/hst_mng/hst_icp.asp"

    doresult = hzsocket(substrContent)
    left5=left(doresult,5)
   If left5= "10000" Then
      call okpage( turnurl)
   Else
      call errorpage(-2,doresult)
   end if

end if
'$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
if session("sysclass")>=4 then
query="select * from hstlst where h_ftpusr='"&hostname&"'"
else
query="select * from hstlst where h_unme='"&session("usrname")&"' and h_ftpusr='"&hostname&"'"
end if
rs.open query,conn,1,1
if rs.recordcount<>1 then
call errorpage(-2,"对不起，该虚拟主机不存在！")
response.end 
else
if session("sysclass")<=4 then
if  rs("h_regstt")<>1  and rs("h_regstt")<>2 and rs("h_regstt")<>5 then
call errorpage(-2,"对不起，该虚拟主机没有开通！")
end if
end if
end if
hnme=rs("h_ftpusr")
rs.close
select case module
case "hst_regstt"
   substrContent = "entryclass:hst_mng"&Vend
   substrContent =substrContent& "entrytype:hst_regstt"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "hostname:" & hostname & Vend
   substrContent = substrContent & "hst_regstt:" & trim(SafeRequestform("hst_regstt")) & Vend
   substrContent = substrContent & "oldstatus:" & trim(SafeRequestform("oldstatus")) & Vend
   substrContent = substrContent & "." & Vend
      turnurl= "/master/pdtmng/hst_mng/hst_idx.asp?hnme=" & hnme

case "hst_ftppss"
   substrContent = "entryclass:hst_mng"&Vend
   substrContent =substrContent& "entrytype:hst_ftppss"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "hostname:" & hostname & Vend
   substrContent = substrContent & "h_ftppss:" & trim(SafeRequestform("h_ftppss")) & Vend
   substrContent = substrContent & "." & Vend
      turnurl= "/master/pdtmng/hst_mng/hst_idx.asp?hnme=" & hnme

'''''''''''''''''''''''''''''''
case "hst_dmeadd"
   substrContent = "entryclass:hst_mng"&Vend
   substrContent =substrContent& "entrytype:hst_dmeadd"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "hostname:" & hostname & Vend
   substrContent = substrContent & "h_dme_new:" & trim(SafeRequestform("h_dme_new")) & Vend
   substrContent = substrContent & "." & Vend
      turnurl= "/master/pdtmng/hst_mng/hst_idx.asp?hnme=" & hnme

case "hst_dmedel"
   substrContent = "entryclass:hst_mng"&Vend
   substrContent =substrContent& "entrytype:hst_dmedel"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "hostname:" & hostname & Vend
   substrContent = substrContent & "hst_dme_del:" & trim(SafeRequestform("hst_dme_del")) & Vend
   substrContent = substrContent & "." & Vend
      turnurl= "/master/pdtmng/hst_mng/hst_idx.asp?hnme=" & hnme

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "hst_dftdocedt"
   substrContent = "entryclass:hst_mng"&Vend
   substrContent =substrContent& "entrytype:hst_dftdocedt"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "hostname:" & hostname & Vend
   substrContent = substrContent & "hst_dftdoc_edt:" & trim(SafeRequestform("hst_dftdoc_edt")) & Vend
   substrContent = substrContent & "." & Vend
   turnurl= "/master/pdtmng/hst_mng/hst_idx.asp?hnme=" & hnme


''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "hst_ftpstt"
   substrContent = "entryclass:hst_mng"&Vend
   substrContent =substrContent& "entrytype:hst_ftpstt"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "hostname:" & hostname & Vend
   substrContent = substrContent & "hst_ftpstt:" & trim(SafeRequestform("hst_ftpstt")) & Vend
   substrContent = substrContent & "." & Vend
   turnurl= "/master/pdtmng/hst_mng/hst_idx.asp?hnme=" & hnme
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "hst_log"
   substrContent = "entryclass:hst_mng"&Vend
   substrContent =substrContent& "entrytype:hst_log"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "hostname:" & hostname & Vend
   substrContent = substrContent & "hst_log:" & trim(SafeRequestform("hst_log")) & Vend
   substrContent = substrContent & "." & Vend
   turnurl= "/master/pdtmng/hst_mng/hst_adv.asp?hnme=" & hnme
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "hst_err404"
   substrContent = "entryclass:hst_mng"&Vend
   substrContent =substrContent& "entrytype:hst_err404"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "hostname:" & hostname & Vend
   substrContent = substrContent & "404file:" & trim(SafeRequestform("404file")) & Vend
   substrContent = substrContent & "." & Vend
   turnurl= "/master/pdtmng/hst_mng/hst_adv.asp?hnme=" & hnme
case "hst_ipsec"
   substrContent = "entryclass:hst_mng"&Vend
   substrContent =substrContent& "entrytype:hst_ipsec"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "hostname:" & hostname & Vend
   substrContent = substrContent & "grantvalue:" & trim(SafeRequestform("grantvalue")) & Vend
   substrContent = substrContent & "." & Vend
   turnurl= "/master/pdtmng/hst_mng/hst_adv.asp?hnme=" & hnme
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "hst_ipdenyadd"
   substrContent = "entryclass:hst_mng"&Vend
   substrContent =substrContent& "entrytype:hst_ipdenyadd"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "hostname:" & hostname & Vend
   substrContent = substrContent & "denyip:" & trim(SafeRequestform("denyip")) & Vend
   substrContent = substrContent & "denyipmask:" & trim(SafeRequestform("denyipmask")) & Vend
   substrContent = substrContent & "." & Vend
   turnurl= "/master/pdtmng/hst_mng/hst_adv.asp?hnme=" & hnme
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "hst_ipdenydel"
   substrContent = "entryclass:hst_mng"&Vend
   substrContent =substrContent& "entrytype:hst_ipdenydel"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "hostname:" & hostname & Vend
   substrContent = substrContent & "denyip:" & trim(SafeRequestform("denyip")) & Vend
   substrContent = substrContent & "." & Vend
   turnurl= "/master/pdtmng/hst_mng/hst_adv.asp?hnme=" & hnme
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "hst_ipgrantadd"
   substrContent = "entryclass:hst_mng"&Vend
   substrContent =substrContent& "entrytype:hst_ipgrantadd"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "hostname:" & hostname & Vend
   substrContent = substrContent & "grantip:" & trim(SafeRequestform("grantip")) & Vend
   substrContent = substrContent & "grantipmask:" & trim(SafeRequestform("grantipmask")) & Vend
   substrContent = substrContent & "." & Vend
   turnurl= "/master/pdtmng/hst_mng/hst_adv.asp?hnme=" & hnme
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "hst_ipgrantdel"
   substrContent = "entryclass:hst_mng"&Vend
   substrContent =substrContent& "entrytype:hst_ipgrantdel"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "hostname:" & hostname & Vend
   substrContent = substrContent & "grantip:" & trim(SafeRequestform("grantip")) & Vend
   substrContent = substrContent & "." & Vend
   turnurl= "/master/pdtmng/hst_mng/hst_adv.asp?hnme=" & hnme
case "hst_fledel"
'''''''''''''''''''''''''''''
   substrContent = "entryclass:hst_mng"&Vend
   substrContent =substrContent& "entrytype:hst_fledel"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "hostname:" & hostname & Vend
   substrContent = substrContent & "filename:" & trim(SafeRequestform("filename")) & Vend
   substrContent = substrContent & "." & Vend
turnurl= "/master/pdtmng/hst_mng/hst_adv.asp?hnme=" & hnme
end select
    doresult = hzsocket(substrContent)
    left5=left(doresult,5)
   If left5= "10000" Then
      call okpage( turnurl)
   Else
      call errorpage(-2,doresult)
   end if

 ''''''''''''''''''''''''''''''''''''''''''''''''''''

%>

