📄 hostedit_doc.asp
字号:
<%
WebID = Request("WebID")
if (WebID="") then Response.Redirect ("error.asp?id=001")
if (Request.form("DefaultDoc")="") then Response.Redirect ("error.asp?id=004")
if isValidDomainstring(Trim(Request.form("DefaultDoc")))<>"" then Response.Redirect ("error.asp?id=022")
if right(Trim(Request.form("DefaultDoc")),1)="," then Response.Redirect ("error.asp?id=022")
if inchinese(trim(Request.Form("DefaultDoc")))=true then Response.Redirect("error.asp?id=022")
%>
<!--#include file="top.asp"-->
<!--#include file="checkpost.asp"-->
<%
'此模块是进行默认的文档进行修改接口
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select ServerID,DefaultDoc,HostIP from [Host_OK] where WebID=" & WebID & " and UserID=" & session("ID")
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")
Autohost.HostIp=rs("HostIP")
Autohost.HostPort=Port
Autohost.Guid=Guid
Autohost.HostAction="webdoc"'动作,修改默认文档命令
Autohost.HostIndex=rs("ServerID")'主机INDEX
Autohost.HostIndexDoc=Request.form("DefaultDoc")'默认文档,使用逗号隔开,不能有空格
ReturnValue=Autohost.send'提交服务器
set Autohost=nothing
'以下是检查服务器的返回值,因为服务器返回值里有控制符,所以这个只对返回值进行查找过滤处理
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
DefaultDoc=Split(rs("DefaultDoc"),"|")
rs("DefaultDoc")=Request.form("DefaultDoc")
rs.update
rs.close
set rs = nothing
else
Response.Redirect("error.asp?ID="&ReturnValue)
end if
Response.Redirect("HostEdit.asp?WebID=" & WebID)
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -