modimaildomaindo.asp
来自「蓝芒3.0A最新所有功能完整破解版」· ASP 代码 · 共 111 行
ASP
111 行
<% ModuleCode="M0510" %>
<!--#include file="../../Include/Reference.asp"-->
<%
Call PrintPageHead
PostID=Request.Form("ID")
%>
<!--#include file="../../Include/connect.asp"-->
<!--#include file="../../Include/WEBCtrl.asp"-->
<%
strSQL="Select * from v_MailList Where PostID='" & PostID & "'"
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 Rs.Eof Then
Rs.Close
Set Rs=Nothing
Cn.Close
Set Cn=Nothing
Response.Write "<br><br><P align='center' class='titletext'>对不起, 找不到此邮局或者您没有权限!</p>"
Call PrintPageBottom
Response.End
End if
MailSize=Cstr(Clng(Rs("MaxSize"))*1000)
MailUser=Rs("MaxUser")
ServerIP=Rs("ServerIP")
MailSiteNum=Rs("ServerPara")
OldMailDomain=Rs("BPostDN")
Rs.Close
%>
<!--#include file="MailMenu.asp"-->
<!------------------------------------------------------------------------------------->
<%
MailDomain = Request.Form("domain")
MailPassword = Request.Form("password")
strSQL="Select * from T_DNS_AllPost where BPostDN='" & MailDomain & "'"
Rs.open strSQL,Cn
if not Rs.eof then
Rs.Close
Response.Write "此邮局域名重复了,请重新输入邮局域名!"
Call PrintPageBottom
Response.End
end if
Rs.Close
MailDomainList=GetMailDomainList(ServerIP)
if InStr(MailDomainList,MailDomain)>0 then
Response.Write "此虚拟主机名重复了,请重新输入邮局域名!"
Call PrintPageBottom
Response.End
end if
if CreateMailDomain(ServerIP,MailDomain)<>0 then
Response.Write "建立邮局失败, 请重新尝试! 错误码: 1"
Call PrintPageBottom
Response.End
end if
if CreateMailUser(ServerIP,MailDomain,Opt_System_MailManager,MailPassword,"0")<>0 then
Response.Write "建立邮局失败, 请重新尝试! 错误码: 2"
Call PrintPageBottom
Response.End
end if
if ChangeMailDomainProp(ServerIP,MailDomain,Opt_System_MailManager & "@" & MailDomain, MailUser, MailSize)<>0 then
Response.Write "建立邮局失败, 请重新尝试! 错误码: 3"
Call PrintPageBottom
Response.End
end if
Dim Bindings,I,OldBind
if GetServerBindings(ServerIP,MailSiteNum,Bindings)<>0 then
Response.Write "建立邮局失败, 请重新尝试! 错误码: 4"
Call PrintPageBottom
Response.End
end if
OldBind=":80:" & OldMailDomain
For I = 0 To UBound(Bindings)
if Trim(Bindings(I))=OldBind then
Bindings(I)= ":80:" & MailDomain
end if
Next
if SetServerBindings(ServerIP,MailSiteNum,Bindings)<>0 then
Response.Write "建立邮局失败, 请重新尝试! 错误码: 5"
Call PrintPageBottom
Response.End
end if
if DeleteMailDomain(ServerIP,OldMailDomain)<>0 then
Response.Write "建立邮局失败, 请重新尝试! 错误码: 6"
Call PrintPageBottom
Response.End
end if
strSQL="Update T_DNS_AllPost Set BPostDN='" & MailDomain & "', PSW='" & MailPassword & "' Where PostID='" & PostID & "'"
Cn.Execute(strSQL)
Cn.Execute("SP_UserOP "& session("UserID")& ",'T_DNS_AllPost','域名修改','" & PostID & "','修改','"& Request.ServerVariables("REMOTE_ADDR") &"'" )
Response.Write "<br><br><br><P align='center' class='titletext'>域名修改成功!</p>"
Set Rs=Nothing
Cn.Close
Set Cn=Nothing
Call PrintPageBottom
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?