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

📄 create.asp

📁 蓝芒3.0A最新所有功能完整破解版
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%
if IsEmpty(Application("em_MaxFolders")) and IsEmpty(Application("em_MaxMPOP3")) and IsEmpty(Application("em_MaxSigns")) then
	TimeDelaySeconds(3)

	dim mam
	set mam = server.createobject("easymail.AdminManager")
	mam.Load

	if mam.IsLoadOK = true then
		Application("em_MaxFolders") = mam.MaxFolders
		Application("em_MaxMPOP3") = mam.MaxMPOP3
		Application("em_MaxSigns") = mam.MaxSigns
		Application("em_SystemAdmin") = mam.SystemAdmin
		Application("em_EnableBBS") = mam.EnableBBS
		Application("em_Enable_SignHold") = mam.Enable_SignHold
		Application("em_Enable_FreeSign") = mam.Enable_FreeSign
		Application("em_Enable_SignWithDomainUser") = mam.Enable_SignWithDomainUser
		Application("em_Enable_SignNumberLimit") = mam.Enable_SignNumberLimit
		Application("em_SignNumberLimitDays") = mam.SignNumberLimitDays
		Application("em_Enable_ShareFolder") = mam.Enable_ShareFolder
		Application("em_Enable_SignEnglishName") = mam.Enable_SignEnglishName
		Application("em_LogPageKSize") = mam.LogPageKSize
		Application("em_TestAccounts") = mam.TestAccounts
		Application("em_SignMode") = mam.SignMode
		Application("em_SignWaitDays") = mam.SignWaitDays
		Application("em_am_Name") = mam.am_Name
		Application("em_am_Accounts") = mam.am_Accounts

		set mam = nothing
	else
		set mam = nothing
		Response.Redirect "default.asp?errstr=" & Server.URLEncode("Error: WebEasyMail service may not have started.") & "&" & getGRSN()
	end if
end if

if Application("em_Enable_FreeSign") = false then
	Response.Redirect "default.asp?errstr=" & Server.URLEncode("Mailbox application forbidden.") & "&" & getGRSN()
end if

if Application("em_Enable_SignNumberLimit") = true and Request.Cookies("SignOk") = "1" then
	Response.Redirect "default.asp?errstr=" & Server.URLEncode("You have already applied for a mailbox.") & "&" & getGRSN()
end if

if Application("em_Enable_SignNumberLimit") = false then
	Response.Cookies("SignOk") = ""
end if


dim webkill
set webkill = server.createobject("easymail.WebKill")
webkill.Load

rip = Request.ServerVariables("REMOTE_ADDR")

if webkill.IsKill(rip) = true then
	set webkill = nothing
	Response.Redirect "err.asp?errstr=" & Server.URLEncode("Access from IP address " & rip & " denied") & "&" & getGRSN()
end if

set webkill = nothing



dim errstr

if trim(request("errstr")) <> "" then
	errstr = trim(request("errstr"))
else
	errstr = "Please enter your desired user name and password, and select a domain name."
end if


username = LCase(trim(request("username")))
domain = LCase(trim(request("domain")))
pw = LCase(trim(request("pw")))
pw1 = LCase(trim(request("pw1")))
regemail = LCase(trim(request("regemail")))

if pw <> pw1 then
	errstr = "Your new password entries did not match."
end if

if username <> "" and domain <> "" then
	if pw = "" or pw1 = "" then
		errstr = "Please enter password."
	end if
end if


'-----------------------------------------
dim ei
set ei = server.createobject("easymail.domain")
ei.Load

dim comeinadd
comeinadd = false

if Session("Reg") = "next" and username <> "" and domain <> "" and pw <> "" and pw1 <> "" and pw = pw1 and Request.ServerVariables("REQUEST_METHOD") = "POST" then
	dim isok
	isok = true

	if regemail = "" and Application("em_SignMode") = 2 then
		isok = false
		errstr = "Email address for the confirmation letter should not be empty."
	end if

	dim isdomain
	isdomain = false

	ei.GetControlMsg domain, isshow, maxuser, manager
	mdn = ei.GetUserNumberInDomain(domain)
	isdomain = ei.IsDomain(domain)

	if mdn >= maxuser then
		errstr="Maximum number of user reached in the current domain."
		isok = false
	end if

	if isdomain = false then
		errstr="Invalidation domain name."
		isok = false
	end if


	if InStr(username, "!") or InStr(username, """") or InStr(username, "#") or InStr(username, "$") or InStr(username, "%") then
		errstr="Your Email Name contains Invalid characters."
		isok = false
	end if

	if InStr(username, "&") or InStr(username, "`") or InStr(username, "(") or InStr(username, ")") or InStr(username, "*") then
		errstr="Your Email Name contains Invalid characters."
		isok = false
	end if

	if InStr(username, "+") or InStr(username, ",") or InStr(username, "/") or InStr(username, ":") then
		errstr="Your Email Name contains Invalid characters."
		isok = false
	end if

	if InStr(username, ";") or InStr(username, "<") or InStr(username, "=") or InStr(username, ">") or InStr(username, "?") then
		errstr="Your Email Name contains Invalid characters."
		isok = false
	end if

	if InStr(username, "@") or InStr(username, "[") or InStr(username, "\") or InStr(username, "]") or InStr(username, "^") then
		errstr="Your Email Name contains Invalid characters."
		isok = false
	end if

	if InStr(username, "'") or InStr(username, "{") or InStr(username, "|") or InStr(username, "}") or InStr(username, "~") then
		errstr="Your Email Name contains Invalid characters."
		isok = false
	end if

	if InStr(username, " ") or InStr(username, Chr(9)) then
		errstr="Your Email Name contains Invalid characters."
		isok = false
	end if



	'-----
	Set easymail = Application("em")
	if Application("em_Enable_SignWithDomainUser") = true then
		if easymail.isUser(username & "@" & domain) = true then
			errstr="User already exists."
			isok = false
		end if
	else
		if easymail.isUser(username) = true then
			errstr="User already exists."
			isok = false
		end if
	end if
	Set easymail = nothing


	'-----
	if Application("em_Enable_SignHold") = true then
		dim sh
		Set sh = server.createobject("easymail.SignHold")
		sh.Load()

		if sh.IsHold(username) = true then
			errstr="User already exists."
			isok = false
		end if

		Set sh = nothing
	end if
	'-----


	if isok = true then
		comeinadd = true
	end if

end if

Session("Reg") = ""


'------------------------------------------------
if comeinadd = true and Request.ServerVariables("REQUEST_METHOD") = "POST" and isshow = true then
	if Application("em_SignMode") > 0 then
		errstr = ""

		dim pr
		set pr = server.createobject("easymail.PendRegister")
		pr.Load Application("em_SignWaitDays")

		if Application("em_Enable_SignWithDomainUser") = true then
			if Application("em_SignMode") = 1 then
				accode = pr.SignPend(username & "@" & domain, pw, domain, Request.ServerVariables("REMOTE_ADDR"), username & " (" & CStr(createGRSN()) & ")")
			else
				accode = pr.SignPend(username & "@" & domain, pw, domain, Request.ServerVariables("REMOTE_ADDR"), regemail)
			end if
		else
			if Application("em_SignMode") = 1 then
				accode = pr.SignPend(username, pw, domain, Request.ServerVariables("REMOTE_ADDR"), username & " (" & CStr(createGRSN()) & ")")
			else
				accode = pr.SignPend(username, pw, domain, Request.ServerVariables("REMOTE_ADDR"), regemail)
			end if
		end if

		if accode <> "" then
			if Application("em_SignMode") = 2 then
				if Application("em_Enable_SignWithDomainUser") = true then
					amText = pr.GetActionMailText(username & "@" & domain, username & "@" & domain, Request.ServerVariables("REMOTE_ADDR"), accode)
				else
					amText = pr.GetActionMailText(username, username & "@" & domain, Request.ServerVariables("REMOTE_ADDR"), accode)
				end if

				Dim mailsend
				Dim sender
				sender = Application("em_am_Accounts")

				Set mailsend = Server.CreateObject("easymail.MailSend")
				mailsend.CreateNew sender, "temp"

				mailsend.MailName = Application("em_am_Name")

				mailsend.EM_To = regemail

				mailsend.EM_Subject = pr.acSubject
				mailsend.EM_Text = amText

				if mailsend.Send() = false then
					errstr = "Sending confirmation mail failed."
				end if

				Set mailsend = Nothing
			end if

			pr.Save
		else
			if Application("em_SignMode") = 1 then
				errstr = "Mailbox registration failed: the user name is occupied"
			else
				errstr = "Mailbox registration failed: possibly the user name is occupied or the external mailbox is already in use"
			end if
		end if

		set pr = nothing
		set ei = nothing

		if accode = "" then
			response.redirect "err.asp?gourl=default.asp&errstr=" & Server.URLEncode(errstr) & "&" & getGRSN()
		else
			if errstr = "" then
				if Application("em_Enable_SignNumberLimit") = true then
					Response.Cookies("SignOk") = "1"
					Response.Cookies("SignOk").Expires = DateAdd("d", Application("em_SignNumberLimitDays"), Now())
				end if

				if Application("em_SignMode") = 1 then
					response.redirect "ok.asp?gourl=default.asp&errstr=" & Server.URLEncode("<b>Congratulations</b>, please wait for approval from the administrator") & "&" & getGRSN()
				end if

				if Application("em_SignMode") = 2 then
					response.redirect "ok.asp?gourl=default.asp&errstr=" & Server.URLEncode("<b>Congratulations</b>, please find confirmation mail at <b>" & regemail & "</b>") & "&" & getGRSN()
				end if
			else
				response.redirect "err.asp?gourl=default.asp&errstr=" & Server.URLEncode(errstr) & "&" & getGRSN()
			end if

			response.redirect "ok.asp?gourl=default.asp&" & getGRSN()
		end if

	else
		Set easymail = Application("em")
		if Application("em_Enable_SignWithDomainUser") = true then
			easymail.adduser username & "@" & domain, pw, domain, "From: " & Request.ServerVariables("REMOTE_ADDR")
		else
			easymail.adduser username, pw, domain, "From: " & Request.ServerVariables("REMOTE_ADDR")
		end if
		Set easymail = nothing

		if Application("em_Enable_SignNumberLimit") = true then
			Response.Cookies("SignOk") = "1"
			Response.Cookies("SignOk").Expires = DateAdd("d", Application("em_SignNumberLimitDays"), Now())
		end if
	end if
%>
<html>
<head>
<title>Corp.Email</title>
<LINK href="images\hwem.css" rel=stylesheet>
</head>

<body>
<br><br>
<div align="center">
<form name="fc">
  <table width="450"  border="0" align="center" cellspacing="0" bgcolor="#EFF7FF" height="210">
    <tr>
      <td height="28" align="center" bgcolor="#dbeaf5" nowrap height="28" style="border-left:1px #8CA5B5 solid; border-top:1px #8CA5B5 solid; border-right:1px #8CA5B5 solid; border-bottom:1px #8CA5B5 solid;"><font class="s" color="#104A7B"><b>Congratulations</b></font></td>
    </tr>
    <tr bgcolor="#EFF7FF" align="center">
      <td><br>
        <div align="center">
          <table width="90%" border="0">
            <tr>
              <td>
                <div align="center"></div>
              </td>
            </tr>
            <tr>

⌨️ 快捷键说明

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