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

📄 domainbindingsdo.asp

📁 蓝芒3.0A最新所有功能完整破解版
💻 ASP
字号:
<% ModuleCode="M0410" %>
<!--#include file="../../Include/connect.asp"-->
<!--#include file="../../Include/Security.asp"-->
<!--#include file="../../Include/WEBCtrl.asp"-->
<%
Dim Bindings,NewBind(),I

VHID=Request.Form("ID")
OP=Trim(Request.Form("OP"))
BindID=Trim(Request.Form("BindID"))
NewBinding=Trim(Request.Form("NewBinding"))
strSQL="Select * from v_VHostList Where VHID='" & VHID & "'"
if Session("ISADMIN")<>"YES" then
	strSQL = strSQL & " and UserID=" & Session("UserID")
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")
	if OP="del" then
		if BindID<>"" then
			Bindings=Split(BindID,", ")
			For I=0 to UBound(Bindings)
				strSQL="Delete from T_DNS_AllBDN Where VHID='" & VHID & "' and BDNID='" & Bindings(I) & "'"
				Cn.Execute(strSQL)
			Next
			Set Rs1= Server.CreateObject("ADODB.Recordset")
			strSQL="Select BDN from T_DNS_AllBDN Where VHID='" & VHID & "'"
			Rs1.open strSQL,Cn,1,1
			Redim NewBind(Rs1.Recordcount)
			NewBind(0)=":80:" & Rs("ThiDN")
			I=1
			While Not Rs1.eof
				NewBind(I)=":80:" & Rs1("BDN")
				Rs1.movenext
				I=I+1
			WEnd
			Rs1.Close			
			if SetServerBindings(ServerIP,SiteNum,NewBind)=0 then
				Cn.Execute("SP_UserOP "& session("UserID")& ",'T_DNS_AllVH','主机绑定','" & VHID & "','删除','"& Request.ServerVariables("REMOTE_ADDR") &"'" )
			end if
		end if
	end if
	if OP="add" then
		if NewBinding<>"" then		
			if NewBinding<>rs("ServerPubIP")  then	'不是IP地址
				intLenThiDN=0
				strLenThiDN=""
				strLenThiDN=right(rs("ThiDN"),len(rs("ThiDN"))-len(Rs("VHName"))-1)
				intLenThiDN=len(strLenThiDN)-InStr(strLenThiDN,".")+1
				if (right(NewBinding,intLenThiDN)<>right(rs("ThiDN"),intLenThiDN)) and (NewBinding<>right(rs("ThiDN"),intLenThiDN-1))  then
					strSQL="Select * from T_DNS_AllBDN where BDN='" & NewBinding & "'"
					Set Rs2= Server.CreateObject("ADODB.Recordset")
					Rs2.open strSQL,Cn
					if Rs2.Eof then
						Rs2.Close
						Set RsNo= Cn.Execute("SP_PublicNObyRs 'P1080'")
						BDNID=RsNo("Result")
						RsNo.Close
						Set RsNo=Nothing
						strSQL="Insert into T_DNS_AllBDN (BDNID,VHID,BDN,APDNTime) values('" & +_
							BDNID & "','" & VHID & "','" & NewBinding & "',getdate())"
						Cn.Execute(strSQL)
						Set Rs1= Server.CreateObject("ADODB.Recordset")
						strSQL="Select BDN from T_DNS_AllBDN Where VHID='" & VHID & "'"
						Rs1.open strSQL,Cn,1,1				
						Redim NewBind(Rs1.Recordcount)
						NewBind(0)=":80:" & Rs("ThiDN")
						I=1
						While Not Rs1.eof
							NewBind(I)=":80:" & Rs1("BDN")
							Rs1.movenext
							I=I+1
						WEnd
						Rs1.Close
						if SetServerBindings(ServerIP,SiteNum,NewBind)=0 then
							Cn.Execute("SP_UserOP "& session("UserID")& ",'T_DNS_AllVH','主机绑定','" & VHID & "','添加','"& Request.ServerVariables("REMOTE_ADDR") &"'" )
						end if
					else
						Rs2.Close
					end if
				end if
			end if
		end if
	end if
end if

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

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

⌨️ 快捷键说明

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