📄 hostedit_ftp.asp
字号:
<!--#include file="../conn.asp"-->
<%
If (isnull(Session("WebID"))) or Session("WebID")="" or (isnull(Session("FtpName"))) or Session("FtpName")="" Then
response.redirect "index.asp"
End If
%>
<%
'此模块提交服务器修改密码用
if (Trim(Request.form("OldPassword"))="" or Trim(Request.form("NewPassword"))="" or Trim(Request.form("VerifyPassword"))="") then Response.Redirect ("error.asp?id=004")
if (Trim(Request.form("NewPassword"))<>Trim(Request.form("VerifyPassword"))) then Response.Redirect ("error.asp?id=005")
if inChinese(Trim(Request.Form("NewPassword"))) then Response.Redirect "error.asp?ID=022"
if isValidstring(Trim(Request.Form("NewPassword")))<>"" then Response.Redirect "error.asp?ID=022"
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select FtpPass from [Host_OK] where WebID="&Session("WebID")
rs.open sql,conn,1,3
if rs.bof and rs.eof then Response.Redirect("error.asp?id=003")
Set Autohost = Server.CreateObject("autohost.Createhost")
if left(rs("FtpPass"),2)&UCase(autohost.md5(left(rs("FtpPass"),2)&Trim(Request.Form("OldPassword"))))<>rs("FtpPass") then Response.Redirect("error.asp?id=021")
Autohost.Hostip=Session("HostIP")
Autohost.HostPort=Port
Autohost.Guid=Guid
Autohost.Hostuser = session("FtpName")'FTP用户名
Autohost.Hostpass = Request.form("NewPassword")'密码
Autohost.HostAction="chgftppass"'动作,修改密码命令
ReturnValue=Autohost.send'传递给服务器
'以下是检查服务器的返回值,因为服务器返回值里有控制符,所以这个只对返回值进行查找过滤处理
if instr(ReturnValue,"失败") then
Response.Redirect("error.asp?ID=012")
elseif instr(ReturnValue,"BUSING") then
Response.Redirect("error.asp?ID=016")
elseif instr(ReturnValue,"CLOSE") or ReturnValue="" then
Response.Redirect("error.asp?ID=017")
elseif instr(ReturnValue,"非法命令") then
Response.Redirect("error.asp?ID=019")
elseif instr(ReturnValue,"非法用户") then
Response.Redirect("error.asp?ID=020")
elseif instr(ReturnValue,"成功") then
rs("FtpPass")=autohost.PassServU(Request.form("NewPassword"))
rs.update
rs.close
set rs = nothing
set Autohost=nothing
else
Response.Redirect("error.asp?ID="&ReturnValue)
end if
Response.Redirect("manage.asp")
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -