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


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

conn.open constr
ftpname=trim(SafeRequestform("ftpname"))
module=trim(SafeRequestform("module"))
fnme=ftpname
if ftpname=""  then
call errorpage(-2,"对不起，请选择需要操作的FTP空间！")
end if
if module="" or  isnull(module) then
call errorpage(-2,"对不起，请选择需要操作的类型！")
end if
module=lcase(module)
if session("sysclass")>=5 then
query="select * from v_ftplst   where f_ftpnme ='"&fnme&"'"
elseif session("sysclass")>=4 then
query="select * from v_ftplst  where f_ftpnme ='"&fnme&"'  and  ((("&session("sysarestr")&" or u_myare=0) and u_rotnme='') or u_rotnme='"&session("usrname")&"')"
else
query="select * from v_ftplst   where f_ftpnme ='"&fnme&"' f_unme='"&session("usrname")&"'"
end if
rs.open query,conn,1,1
if rs.recordcount<>1 then
call errorpage(-2,"对不起，该FTP空间不存在！")
response.end 
else
if session("sysclass")<=4 then
if  rs("f_regstt")<>1  and rs("f_regstt")<>2 and rs("f_regstt")<>5 then
call errorpage(-2,"对不起，该FTP空间没有开通！")
end if
end if
end if
fid=rs("f_id")
rs.close
select case module
case "ftp_regstt"
   substrContent = "entryclass:ftp_mng"&Vend
   substrContent =substrContent& "entrytype:ftp_regstt"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent = substrContent & "ftpname:" & ftpname & Vend
   substrContent = substrContent & "ftp_regstt:" & trim(SafeRequestform("ftp_regstt")) & Vend
   substrContent = substrContent & "oldstatus:" & trim(SafeRequestform("oldstatus")) & Vend
   substrContent = substrContent & "." & Vend
      turnurl= "/master/pdtmng/ftp_mng/ftp_idx.asp?fnme="&fnme

case "ftp_ftppss"
   substrContent = "entryclass:ftp_mng"&Vend
   substrContent =substrContent& "entrytype:ftp_ftppss"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent = substrContent & "ftpname:" & ftpname & Vend
   substrContent = substrContent & "ftpsecuser:" &  trim(SafeRequestform("ftpsecuser")) & Vend
   substrContent = substrContent & "ftpsecpass:" & trim(SafeRequestform("ftpsecpass")) & Vend
   substrContent = substrContent & "." & Vend
      turnurl= "/master/pdtmng/ftp_mng/ftp_adv.asp?fnme="&fnme

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "ftp_mng_pss"
   substrContent = "entryclass:ftp_mng"&Vend
   substrContent =substrContent& "entrytype:ftp_mng_pss"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent = substrContent & "ftpname:" & ftpname & Vend
   substrContent = substrContent & "newpass1:" & trim(SafeRequestform("newpass1")) & Vend
   substrContent = substrContent & "newpass2:" & trim(SafeRequestform("newpass2")) & Vend
   substrContent = substrContent & "." & Vend
      turnurl= "/master/pdtmng/ftp_mng/ftp_pss.asp?fnme="&fnme

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "ftp_usrdel"
   substrContent = "entryclass:ftp_mng"&Vend
   substrContent =substrContent& "entrytype:ftp_usrdel"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent = substrContent & "ftpname:" & ftpname & Vend
   substrContent = substrContent & "ftpsecuser:" &  trim(SafeRequestform("ftpsecuser")) & Vend
   substrContent = substrContent & "." & Vend
      turnurl= "/master/pdtmng/ftp_mng/ftp_adv.asp?fnme="&fnme

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "ftp_diskquota"
   substrContent = "entryclass:ftp_mng"&Vend
   substrContent =substrContent& "entrytype:ftp_diskquota"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent = substrContent & "ftpname:" & ftpname & Vend
   substrContent = substrContent & "ftpsecuser:" &  trim(SafeRequestform("ftpsecuser")) & Vend
   substrContent = substrContent & "diskquota:" & trim(SafeRequestform("diskquota")) & Vend
   substrContent = substrContent & "." & Vend
   turnurl= "/master/pdtmng/ftp_mng/ftp_adv.asp?fnme="&fnme
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "ftp_ftpacs"
   substrContent = "entryclass:ftp_mng"&Vend
   substrContent =substrContent& "entrytype:ftp_ftpacs"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent = substrContent & "ftpname:" & ftpname & Vend
   substrContent = substrContent & "ftpsecuser:" &  trim(SafeRequestform("ftpsecuser")) & Vend
   substrContent = substrContent & "accessnum:" & trim(SafeRequestform("accessnum")) & Vend
   substrContent = substrContent & "." & Vend
   turnurl= "/master/pdtmng/ftp_mng/ftp_adv.asp?fnme="&fnme
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "ftp_ftpstt"
   substrContent = "entryclass:ftp_mng"&Vend
   substrContent =substrContent& "entrytype:ftp_ftpstt"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent = substrContent & "ftpname:" & ftpname & Vend
   substrContent = substrContent & "ftpsecuser:" &  trim(SafeRequestform("ftpsecuser")) & Vend
   substrContent = substrContent & "ftp_ftpstt:" & trim(SafeRequestform("ftp_ftpstt")) & Vend
   substrContent = substrContent & "." & Vend
   turnurl= "/master/pdtmng/ftp_mng/ftp_adv.asp?fnme="&fnme
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "ftp_usradd_sec"
   substrContent = "entryclass:ftp_mng"&Vend
   substrContent =substrContent& "entrytype:ftp_usradd_sec"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent = substrContent & "ftpname:" & ftpname & Vend
   substrContent = substrContent & "ftpsecuser:FTP_" & trim(SafeRequestform("ftpsecuser")) & Vend
   substrContent = substrContent & "ftpsecpass:" & trim(SafeRequestform("ftpsecpass")) & Vend
   substrContent = substrContent & "diskquota:" & trim(SafeRequestform("diskquota")) & Vend
   substrContent = substrContent & "ftppath:" & trim(SafeRequestform("ftppath")) & Vend
   substrContent = substrContent & "accessnum:" & trim(SafeRequestform("accessnum")) & Vend
   substrContent = substrContent & "." & Vend
   turnurl= "/master/pdtmng/ftp_mng/ftp_adv.asp?fnme="&fnme
 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
end select
    doresult = hzsocket(substrContent)
      left5=left(doresult,5)
   If left5= "10000" Then
      call okpage( turnurl)
   Else
      call errorpage(-2,doresult)
   end if

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

%>

