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


<%
chk_log()
chk_newpwr 1,0,2
module=trim(SafeRequestform("module"))
hostname=trim(SafeRequestform("hostname"))
if module="" or hostname="" then
call errorpage(-2,"对不起，请选择您需要升级的虚拟主机！")
end if
conn.open constr
if session("sysclass")>=5 then
query="select * from v_hstlst   where h_ftpusr ='"&hostname&"'"
elseif session("sysclass")>=4 then
query="select * from v_hstlst  where h_ftpusr ='"&hostname&"'  and  ((("&session("sysarestr")&" or u_myare=0) and u_rotnme='') or u_rotnme='"&session("usrname")&"')"
else
query="select * from v_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,"对不起，您所选择的虚拟主机不存在或者不可操作！")
end if

if rs("h_regstt")<>1 then
call errorpage(-2,"对不起，您所选择的虚拟主机不处在正常状态，无法操作！")
end if
if rs("h_exptme")<=now() then
call errorpage(-2,"对不起，您的虚拟主机已过期，请先续费！")
end if
if trim(lcase(rs("h_unme")))<>trim(lcase(session("usrname"))) then
query="select * from memlst where u_nme='"&rs("h_unme")&"'"
rs1.open query,conn,1,1
entryuser=rs("h_unme")
entrypass=trim(rs1("u_pss"))
agentname=session("usrname")
agentpass=session("usrpass")
rs1.close
end if
rs.close
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''表单处理 
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''具体操作
select case module
case "prd"

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''表单处理 
   substrContent = "entryclass:hst_upd"&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 & "hostname:" &hostname& Vend
   substrContent = substrContent & "newproid:"& trim(SafeRequestform("newproid")) & Vend
   substrContent = substrContent & "newprice:"& trim(SafeRequestform("newprice")) & Vend
   substrContent = substrContent & "." & Vend
case "sze"
   substrContent = "entryclass:hst_upd"&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 & "hostname:" &hostname& Vend
   substrContent = substrContent & "h_prcstr:"& trim(SafeRequestform("h_prcstr")) & Vend
   substrContent = substrContent & "h_szeaddcnt:"& trim(SafeRequestform("h_szeaddcnt")) & Vend
   substrContent = substrContent & "newprice:"& trim(SafeRequestform("newprice")) & Vend
   substrContent = substrContent & "." & Vend

case "cns"
   substrContent = "entryclass:hst_upd"&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 & "hostname:" &hostname& Vend
   substrContent = substrContent & "h_prcstr:"& trim(SafeRequestform("h_prcstr")) & Vend
   substrContent = substrContent & "h_maxcnsaddcnt:"& trim(SafeRequestform("h_maxcnsaddcnt")) & Vend
   substrContent = substrContent & "newprice:"& trim(SafeRequestform("newprice")) & Vend
   substrContent = substrContent & "." & Vend

end select

   doresult = hzsocket(substrContent)
   left5=left(doresult,5)
   If left5= "10000" Then
      call okpage( "/master/pdtmng/hst_mng/hst_upd.asp?hnme=" & hostname)
   Else
      call errorpage(-2,doresult)
   end if

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