⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 managevhost.asp

📁 蓝芒3.0A最新所有功能完整破解版
💻 ASP
字号:
<% ModuleCode="M0410" %>
<!--#include file="../../Include/connect.asp"-->
<!--#include file="../../Include/Security.asp"-->
<!--#include file="../../Include/WEBCtrl.asp"-->
<%
VHID=Request.QueryString("ID")
OP=Request.QueryString("OP")
strSQL="Select * from v_VHostList Where VHID='" & VHID & "'"
if Session("ISADMIN")<>"YES" then
	strSQL = strSQL & " and UserID=" & Session("UserID")
end if

if Session("ISADMIN")<>"YES" then
	CloseID="2"
else
	CloseID="3"
end if

Set Rs= Server.CreateObject("ADODB.Recordset")
Rs.open strSQL,Cn,1,1
If not Rs.Eof Then
	ServerIP=Rs("ServerIP")
	SiteNum=Rs("DNSeq")
	FtpUser=Rs("UserName")
	'Response.Write ServerIP & " " & SiteNum & " " & FtpUser
	'Response.End
	Select Case OP
		Case "webclose"
			if StopIISServer(ServerIP,SiteNum)=0 then
			
				strSQL="Update T_DNS_AllVH Set WebStat='" & CloseID & "' Where VHID='" & VHID & "'"
				Cn.Execute(StrSQL)
				Cn.Execute("SP_UserOP "& session("UserID")& ",'T_DNS_AllVH','主机管理','" & VHID & "','WebClose','"& Request.ServerVariables("REMOTE_ADDR") &"'" )
			end if
		Case "webopen"
			if Rs("WebStat")="3" and Session("ISADMIN")<>"YES" then
				Response.Redirect "ViewVHostDetail.asp?ID=" & VHID
			end if
			if RunIISServer(ServerIP,SiteNum)=0 then
				strSQL="Update T_DNS_AllVH Set WebStat='1' Where VHID='" & VHID & "'"
				Cn.Execute(StrSQL)
				Cn.Execute("SP_UserOP "& session("UserID")& ",'T_DNS_AllVH','主机管理','" & VHID & "','WebOpen','"& Request.ServerVariables("REMOTE_ADDR") &"'" )
			end if
		Case "ftpclose"
			if DisableFtpUser(ServerIP,FtpUser)=0 then
				strSQL="Update T_DNS_AllVH Set FTPStat='" & CloseID & "' Where VHID='" & VHID & "'"
				Cn.Execute(StrSQL)
				Cn.Execute("SP_UserOP "& session("UserID")& ",'T_DNS_AllVH','主机管理','" & VHID & "','FtpClose','"& Request.ServerVariables("REMOTE_ADDR") &"'" )
			end if
		Case "ftpopen"
			if Rs("FTPStat")="3" and Session("ISADMIN")<>"YES" then
				Response.Redirect "ViewVHostDetail.asp?ID=" & VHID
			end if
			if EnableFtpUser(ServerIP,FtpUser)=0 then
				strSQL="Update T_DNS_AllVH Set FTPStat='1' Where VHID='" & VHID & "'"
				Cn.Execute(StrSQL)
				Cn.Execute("SP_UserOP "& session("UserID")& ",'T_DNS_AllVH','主机管理','" & VHID & "','FtpOpen','"& Request.ServerVariables("REMOTE_ADDR") &"'" )
			end if
	End Select
end if

Rs.Close
Set Rs=Nothing
Cn.Close
Set Cn=Nothing

Response.Redirect "ViewVHostDetail.asp?ID=" & VHID
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -