<%
'on error resume  next
%>
<!--#include virtual="/incs/config.asp" -->
<!--#include virtual="/incs/present.asp" -->

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

conn.open constr
hostname=trim(SafeRequestform("hostname"))
module=trim(SafeRequestform("module"))
if hostname="" then
call errorpage(-2,"对不起，请选择需要操作的主机！")
end if
if module="" or  isnull(module) then
call errorpage(-2,"对不起，请选择需要操作的类型！")
end if
module=lcase(module)
query="select * from hstlst where h_ftpusr='"&hostname&"'"
rs.open query,conn,1,1
if rs.recordcount<>1 then
call errorpage(-2,"对不起，该虚拟主机不存在！")
end if
hid=rs("h_id")
rs.close
   turnurl="/master/pdtmng/hst_mng/hst_adm.asp?hnme="&hostname
select case module
case "hst_ctt"
   substrContent = "entryclass:hst_mng"&Vend
   substrContent =substrContent& "entrytype:hst_ctt"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent = substrContent & "hostname:" & hostname & Vend
   substrContent = substrContent & "h_icp:" & trim(SafeRequestform("h_icp")) & Vend
   substrContent = substrContent & "h_icpstt:" & trim(SafeRequestform("h_icpstt")) & Vend
   substrContent = substrContent & "h_copnme_cn:" & trim(SafeRequestform("h_copnme_cn")) & Vend
   substrContent = substrContent & "h_ctt_cn:" & trim(SafeRequestform("h_ctt_cn")) & Vend
   substrContent = substrContent & "h_prv_cn:" & trim(SafeRequestform("h_prv_cn")) & Vend
   substrContent = substrContent & "h_adr_cn:" & trim(SafeRequestform("h_adr_cn")) & Vend
   substrContent = substrContent & "h_cde:" & trim(SafeRequestform("h_cde")) & Vend
   substrContent = substrContent & "h_tel:" & trim(SafeRequestform("h_tel")) & Vend
   substrContent = substrContent & "h_fax:" & trim(SafeRequestform("h_fax")) & Vend
   substrContent = substrContent & "h_eml:" & trim(SafeRequestform("h_eml")) & Vend
   substrContent = substrContent & "." & Vend
case "hst_edta"
   substrContent = "entryclass:hst_mng"&Vend
   substrContent =substrContent& "entrytype:hst_edta"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent = substrContent & "hostname:" & hostname & Vend
   substrContent = substrContent & "h_prd:" & trim(SafeRequestform("h_prd")) & Vend
   substrContent = substrContent & "h_regtpe:" & trim(SafeRequestform("h_regtpe")) & Vend
      substrContent = substrContent & "h_regstt:" & trim(SafeRequestform("h_regstt")) & Vend
      substrContent = substrContent & "h_ftpstt:" & trim(SafeRequestform("h_ftpstt")) & Vend
   substrContent = substrContent & "h_yarcnt:" & trim(SafeRequestform("h_yarcnt")) & Vend
   substrContent = substrContent & "years:" & trim(SafeRequestform("years")) & Vend
   substrContent = substrContent & "h_prcstr:" & trim(SafeRequestform("h_prcstr")) & Vend
   substrContent = substrContent & "h_addtme:" & trim(SafeRequestform("h_addtme")) & Vend
   substrContent = substrContent & "h_svrnme:" & trim(SafeRequestform("h_svrnme")) & Vend
   substrContent = substrContent & "h_exptme:" & trim(SafeRequestform("h_exptme")) & Vend
   substrContent = substrContent & "h_svrip:" & trim(SafeRequestform("h_svrip")) & Vend
   substrContent = substrContent & "content:" & trim(SafeRequestform("content")) & Vend
   substrContent = substrContent & "h_cprnme:" & trim(SafeRequestform("h_cprnme")) & Vend
   substrContent = substrContent & "." & Vend
'''''''''''''''''''''''''''''''
case "hst_edtb"
   substrContent = "entryclass:hst_mng"&Vend
   substrContent =substrContent& "entrytype:hst_edtb"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent = substrContent & "hostname:" & hostname & Vend
   substrContent = substrContent & "h_dme:" & trim(SafeRequestform("h_dme")) & Vend
   substrContent = substrContent & "h_maxdns:" & trim(SafeRequestform("h_maxdns")) & Vend
   substrContent = substrContent & "h_dftdoc:" & trim(SafeRequestform("h_dftdoc")) & Vend
   substrContent = substrContent & "h_log:" & trim(SafeRequestform("h_log")) & Vend
   substrContent = substrContent & "h_errpge:" & trim(SafeRequestform("h_errpge")) & Vend
   substrContent = substrContent & "h_ipsec:" & trim(SafeRequestform("h_ipsec")) & Vend
   substrContent = substrContent & "h_ifpay:" & trim(SafeRequestform("h_ifpay")) & Vend
   substrContent = substrContent & "." & Vend
'''''''''''''''''''''''''''''''
case "hst_edtc"
   substrContent = "entryclass:hst_mng"&Vend
   substrContent =substrContent& "entrytype:hst_edtc"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent = substrContent & "hostname:" & hostname & Vend
  substrContent = substrContent & "h_appid_asp:" &trim(SafeRequest("h_appid_asp"))& Vend
   substrContent = substrContent & "h_appid_cgi:" &trim(SafeRequest("h_appid_cgi"))& Vend
   substrContent = substrContent & "h_appid_php:" &trim(SafeRequest("h_appid_php"))& Vend
   substrContent = substrContent & "h_appid_net:" &trim(SafeRequest("h_appid_net"))& Vend
   substrContent = substrContent & "h_appid_dwn:" &trim(SafeRequest("h_appid_dwn"))& Vend
   substrContent = substrContent & "h_sze:" & trim(SafeRequestform("h_sze")) & Vend
   substrContent = substrContent & "h_bnd:" & trim(SafeRequestform("h_bnd")) & Vend
   substrContent = substrContent & "h_cpu:" & trim(SafeRequestform("h_cpu")) & Vend
   substrContent = substrContent & "h_maxcns:" & trim(SafeRequestform("h_maxcns")) & Vend
   substrContent = substrContent & "h_hmedir:" & trim(SafeRequestform("h_hmedir")) & Vend
   substrContent = substrContent & "h_dskqta:" & trim(SafeRequestform("h_dskqta")) & Vend
   substrContent = substrContent & "h_apptpe:" & trim(SafeRequestform("h_apptpe")) & Vend
   substrContent = substrContent & "h_szeadd:" & trim(SafeRequestform("h_szeadd")) & Vend
   substrContent = substrContent & "h_cnsadd:" & trim(SafeRequestform("h_cnsadd")) & Vend
   substrContent = substrContent & "." & Vend
'''''''''''''''''''''''''''''''
case "hst_edtd"
   substrContent = "entryclass:hst_mng"&Vend
   substrContent =substrContent& "entrytype:hst_edtd"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent = substrContent & "hostname:" & hostname & Vend
   substrContent = substrContent & "pstprd1:" & trim(SafeRequestform("pstprd1")) & Vend
   substrContent = substrContent & "pstprd2:" & trim(SafeRequestform("pstprd2")) & Vend
   substrContent = substrContent & "pstprd3:" & trim(SafeRequestform("pstprd3")) & Vend
   substrContent = substrContent & "pstnme1:" & trim(SafeRequestform("pstnme1")) & Vend
   substrContent = substrContent & "pstnme2:" & trim(SafeRequestform("pstnme2")) & Vend
   substrContent = substrContent & "pstnme3:" & trim(SafeRequestform("pstnme3")) & Vend
   substrContent = substrContent & "setnme:" & trim(SafeRequestform("setnme")) & Vend
   substrContent = substrContent & "pstrotprd:" & trim(SafeRequestform("pstrotprd")) & Vend
   substrContent = substrContent & "pstrotnme:" & trim(SafeRequestform("pstrotnme")) & Vend
   substrContent = substrContent & "." & Vend
'''''''''''''''''''''''''''''''
case "hst_sze"

'''''''''''''''''''''''''''''
   substrContent = "entryclass:hst_mng"&Vend
   substrContent =substrContent& "entrytype:hst_sze"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent = substrContent & "hostname:" & hostname & Vend
   substrContent = substrContent & "hst_sze:" & trim(SafeRequestform("hst_sze")) & Vend
   substrContent = substrContent & "hst_szeadd:" & trim(SafeRequestform("hst_szeadd")) & Vend
   substrContent = substrContent & "." & Vend
case "hst_cns"
'''''''''''''''''''''''''''''
   substrContent = "entryclass:hst_mng"&Vend
   substrContent =substrContent& "entrytype:hst_cns"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent = substrContent & "hostname:" & hostname & Vend
   substrContent = substrContent & "h_maxcns:" & trim(SafeRequestform("h_maxcns")) & Vend
   substrContent = substrContent & "h_cnsadd:" & trim(SafeRequestform("h_cnsadd")) & Vend
   substrContent = substrContent & "." & Vend
case "hst_apptpe"
'''''''''''''''''''''''''''''
   substrContent = "entryclass:hst_mng"&Vend
   substrContent =substrContent& "entrytype:hst_apptpe"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent = substrContent & "hostname:" & hostname & Vend
   substrContent = substrContent & "h_apptpe:" & trim(SafeRequestform("h_apptpe")) & Vend
   substrContent = substrContent & "." & Vend
case "hst_appid"
'''''''''''''''''''''''''''''
   substrContent = "entryclass:hst_mng"&Vend
   substrContent =substrContent& "entrytype:hst_appid"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent = substrContent & "hostname:" & hostname & Vend
  substrContent = substrContent & "h_appid_asp:" &trim(SafeRequest("h_appid_asp"))& Vend
   substrContent = substrContent & "h_appid_cgi:" &trim(SafeRequest("h_appid_cgi"))& Vend
   substrContent = substrContent & "h_appid_php:" &trim(SafeRequest("h_appid_php"))& Vend
   substrContent = substrContent & "h_appid_net:" &trim(SafeRequest("h_appid_net"))& Vend
   substrContent = substrContent & "h_appid_dwn:" &trim(SafeRequest("h_appid_dwn"))& Vend
   substrContent = substrContent & "." & Vend
case "hst_cpu"
'''''''''''''''''''''''''''''
   substrContent = "entryclass:hst_mng"&Vend
   substrContent =substrContent& "entrytype:hst_cpu"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent = substrContent & "hostname:" & hostname & Vend
   substrContent = substrContent & "h_cpu:" & trim(SafeRequestform("h_cpu")) & Vend
   substrContent = substrContent & "." & Vend
case "hst_bnd"
'''''''''''''''''''''''''''''
   substrContent = "entryclass:hst_mng"&Vend
   substrContent =substrContent& "entrytype:hst_bnd"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent = substrContent & "hostname:" & hostname & Vend
   substrContent = substrContent & "h_bnd:" & trim(SafeRequestform("h_bnd")) & Vend
   substrContent = substrContent & "." & Vend
case "hst_dela"
   substrContent = "entryclass:hst_mng"&Vend
   substrContent =substrContent& "entrytype:hst_dela"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent = substrContent & "hostname:" & hostname & Vend
   substrContent = substrContent & "." & Vend
case "hst_delb"
   substrContent = "entryclass:hst_mng"&Vend
   substrContent =substrContent& "entrytype:hst_delb"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent = substrContent & "hostname:" & hostname & Vend
   substrContent = substrContent & "." & Vend
case "hst_delc"
   substrContent = "entryclass:hst_mng"&Vend
   substrContent =substrContent& "entrytype:hst_delc"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent = substrContent & "hostname:" & hostname & Vend
   substrContent = substrContent & "." & Vend
   turnurl="/master/pdtmng/hst_mng/hst_lst.asp"
case "hst_chgip"
   substrContent = "entryclass:hst_mng"&Vend
   substrContent =substrContent& "entrytype:hst_chgip"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent = substrContent & "hostname:" & hostname & Vend
   substrContent = substrContent & "newip:" & trim(SafeRequestform("newip")) & Vend
   substrContent = substrContent & "h_ftppss:" & trim(SafeRequestform("h_ftppss")) & Vend
   substrContent = substrContent & "h_dme:" & trim(SafeRequestform("h_dme")) & Vend
   substrContent = substrContent & "h_appid:" & trim(SafeRequestform("h_appid")) & Vend
   substrContent = substrContent & "h_sze:" & trim(SafeRequestform("h_sze")) & Vend
   substrContent = substrContent & "h_maxcns:" & trim(SafeRequestform("h_maxcns")) & Vend
   substrContent = substrContent & "h_apppol:" & trim(SafeRequestform("h_apppol")) & Vend
   substrContent = substrContent & "h_cpu:" & trim(SafeRequestform("h_cpu")) & Vend
   substrContent = substrContent & "h_bnd:" & trim(SafeRequestform("h_bnd")) & Vend
   substrContent = substrContent & "h_svrnme:" & trim(SafeRequestform("h_svrnme")) & Vend
   substrContent = substrContent & "." & Vend
case "hst_buyfree"
   substrContent = "entryclass:hst_mng"&Vend
   substrContent =substrContent& "entrytype:hst_buyfree"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent = substrContent & "hostname:" & hostname & Vend
   substrContent = substrContent & "h_svrip:" & trim(SafeRequestform("h_svrip")) & Vend
   substrContent = substrContent & "h_ftppss:" & trim(SafeRequestform("h_ftppss")) & Vend
   substrContent = substrContent & "h_dme:" & trim(SafeRequestform("h_dme")) & Vend
   substrContent = substrContent & "h_appid:" & trim(SafeRequestform("h_appid")) & Vend
   substrContent = substrContent & "h_sze:" & trim(SafeRequestform("h_sze")) & Vend
   substrContent = substrContent & "h_maxcns:" & trim(SafeRequestform("h_maxcns")) & Vend
   substrContent = substrContent & "h_apppol:" & trim(SafeRequestform("h_apppol")) & Vend
   substrContent = substrContent & "h_cpu:" & trim(SafeRequestform("h_cpu")) & Vend
   substrContent = substrContent & "h_bnd:" & trim(SafeRequestform("h_bnd")) & Vend
   substrContent = substrContent & "h_svrnme:" & trim(SafeRequestform("h_svrnme")) & Vend
   substrContent = substrContent & "." & Vend
case "own"
          substrcontent = "entryclass:sys2_mng" & Vend
          substrcontent = substrcontent & "entrytype:own" & Vend
          substrcontent = substrcontent & "entryuser:" & entryuser & Vend
          substrcontent = substrcontent & "entrypass:" & entrypass & Vend
          substrcontent = substrcontent & "agentname:" & agentname & Vend
          substrcontent = substrcontent & "g_prd:" & SafeRequest("g_prd") & Vend
          substrcontent = substrcontent & "g_pnme:" & SafeRequest("g_pnme") & Vend
          substrcontent = substrcontent & "ifall:" & SafeRequest("ifall") & Vend
          substrcontent = substrcontent & "oldunme:" & SafeRequest("oldunme") & Vend
          substrcontent = substrcontent & "newunme:" & trim(SafeRequest("newunme")) & Vend
          substrcontent = substrcontent & "." & Vend

   turnurl="/master/pdtmng/hst_mng/hst_own.asp?hnme="&hostname
case "app_chg"
   substrContent = "entryclass:hst_mng"&Vend
   substrContent =substrContent& "entrytype:app_chg"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent = substrContent & "hostname:" & hostname & Vend
   substrContent = substrContent & "appnme:" & SafeRequest("appnme") & Vend
   substrContent = substrContent & "." & Vend
end select
   doresult = hzsocket(substrContent)
   left5=left(doresult,5)
   If left5= "10000" Then
      call okpage( turnurl)
   Else
      call errorpage(-2,doresult)
   end if

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

%>

