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


<%
chk_log_usr()
module=trim(SafeRequestform("module"))
ftpname=trim(SafeRequestform("ftpname"))
if module="" or ftpname="" then
call errorpage(-2,"对不起，请选择您需要升级的FTP空间！")
end if
conn.open constr
query="select * from ftplst where f_ftpnme='"&ftpname&"' and f_unme='"&session("usrname")&"'"

rs.open query,conn,1,1
if rs.recordcount<>1 then
call errorpage(-2,"对不起，您所选择的FTP空间不存在或者您无权执行此操作！")
end if

if rs("f_regtpe")<>1 then
call errorpage(-2,"对不起，试用FTP空间无法使用升级功能！")
end if
if rs("f_regstt")<>1 then
call errorpage(-2,"对不起，您所选择的FTP空间不处在正常状态，无法操作！")
end if
if rs("f_exptme")<=now() then
call errorpage(-2,"对不起，您的FTP空间已过期，请先续费！")
end if
buyid=rs("f_id")
rs.close
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''表单处理 
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''具体操作
select case module
case "prd"

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''表单处理 
   substrContent = "entryclass:ftp_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 & "ftpname:" &ftpname& Vend
   substrContent = substrContent & "newproid:"& trim(SafeRequestform("newproid")) & Vend
   substrContent = substrContent & "." & Vend
   
case "sze"
   substrContent = "entryclass:ftp_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 & "ftpname:" &ftpname& Vend
   substrContent = substrContent & "f_prcstr:"& trim(SafeRequestform("f_prcstr")) & Vend
   substrContent = substrContent & "f_szeaddcnt:"& trim(SafeRequestform("f_szeaddcnt")) & Vend
   substrContent = substrContent & "." & Vend

case "cns"
   substrContent = "entryclass:ftp_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 & "ftpname:" &ftpname& Vend
   substrContent = substrContent & "f_prcstr:"& trim(SafeRequestform("f_prcstr")) & Vend
   substrContent = substrContent & "f_cnsaddcnt:"& trim(SafeRequestform("f_cnsaddcnt")) & Vend
   substrContent = substrContent & "." & Vend

end select

   doresult = hzsocket(substrContent)
   left5=left(doresult,5)
   If left5= "10000" Then
      call okpage( "/control/ftp_mng/ftp_upd.asp?fnme=" & ftpname)
   Else
      call errorpage(-2,doresult)
   end if

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