📄 dnsromtemanage.asp
字号:
<%
on error resume next
set lqsm_dns= server.CreateObject("lqsm.dns")
set lqsm_config= server.CreateObject("lqsm.config")
domain=request("domain")
action = request("action")
OwnerName = request("host")
Param1 = request("Param1")
Param2 = request("Param2")
ClassType = request("ClassType")
datee = request("datee")
ochecksum = request("ochecksum")
strTmp = Domain & action & ClassType & OwnerName & Param1 & Param2 & datee
ret = lqsm_config.CfgCheckRemoteData(strTmp,ochecksum2,ErrMsg)
if ochecksum2 <> ochecksum then
OK = "-1"
Msg = "对不起,数字签名出错,请重新登录再试" & err.description & ErrMsg
response.write OK & vbcrlf & Msg
response.end
end if
if OwnerName="" then
OwnerName = Domain
else
OwnerName = OwnerName&"."&Domain
end if
ret = -3
Select Case action
case "query"
ret = lqsm_dns.DnsZoneList(DnsZoneList,ErrMsg)
ret = -1
DnsZoneArray = split(DnsZoneList,",")
for each DnsObj in DnsZoneArray
if DnsObj = domain then
ret = 0
end if
next
if ret <> 0 then
Msg = "域名不存在"
else
Msg = ""
Msg = Msg & GetRecord(domain,"MX")
Msg = Msg & GetRecord(domain,"A")
Msg = Msg & GetRecord(domain,"CNAME")
end if
case "del_R"
ret = lqsm_dns.RDelete(Domain,OwnerName,ClassType,ErrMsg)
case "edit_R"
ret = lqsm_dns.REdit(Domain, OwnerName, ClassType, Param1, Param2, ErrMsg)
case "add_R"
ret = lqsm_dns.RCreate(Domain, OwnerName, ClassType, Param1, Param2, strErrMsg)
Case Else
ret = -1
Msg = "未定义动作"
end select
if ret = 0 then
OK = "0"
else
OK = "-1"
if Msg = "" then
Msg = "远程调用出错"
end if
end if
response.write OK & vbcrlf & Msg
Function GetRecord(Domain,ClassType)
ret = lqsm_dns.RList(Domain,ClassType,DnsList,ErrMsg)
if ret <>0 or ErrMsg <> "" then
GetRecord = ErrMsg
else
DnsArray = split(DnsList,",")
for each DnsObj in DnsArray
if DnsObj <> "" then
OwnerName=DnsObj
ret = lqsm_dns.RDetail(Domain,OwnerName,ClassType,Param1,Param2,ErrMsg)
if ret = 0 and ErrMsg = "" then
if instr(OwnerName,"." & Domain)>0 then OwnerName = replace(OwnerName,"." & Domain,"")
if instr(OwnerName,Domain)>0 then OwnerName = replace(OwnerName,Domain,"")
GetRecord = GetRecord + Domain &"|"&OwnerName&"|"&ClassType&"|"&Param1&"|"&Param2 & "|" & vbcrlf
End if
end if
next
end if
GetRecord = GetRecord
end Function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -