📄 webadmin.asp
字号:
<!--#include file="passinc.asp" -->
<%
if isadmin() = false then
response.redirect "noadmin.asp"
end if
%>
<%
dim mam
set mam = server.createobject("easymail.AdminManager")
mam.Load
dim pr
set pr = server.createobject("easymail.PendRegister")
pr.Load Application("em_SignWaitDays")
if trim(request("MaxMPOP3")) <> "" and Request.ServerVariables("REQUEST_METHOD") = "POST" then
if trim(request("MaxFolders")) <> "" and IsNumeric(trim(request("MaxFolders"))) = true then
Application("em_MaxFolders") = CInt(trim(request("MaxFolders")))
if Application("em_MaxFolders") < 0 or Application("em_MaxFolders") > 99 then
Application("em_MaxFolders") = 10
end if
mam.MaxFolders = Application("em_MaxFolders")
end if
if trim(request("MaxMPOP3")) <> "" and IsNumeric(trim(request("MaxMPOP3"))) = true then
Application("em_MaxMPOP3") = CInt(trim(request("MaxMPOP3")))
if Application("em_MaxMPOP3") < 0 or Application("em_MaxMPOP3") > 99 then
Application("em_MaxMPOP3") = 10
end if
mam.MaxMPOP3 = Application("em_MaxMPOP3")
end if
if trim(request("MaxSigns")) <> "" and IsNumeric(trim(request("MaxSigns"))) = true then
Application("em_MaxSigns") = CInt(trim(request("MaxSigns")))
if Application("em_MaxSigns") < 0 or Application("em_MaxSigns") > 99 then
Application("em_MaxSigns") = 10
end if
mam.MaxSigns = Application("em_MaxSigns")
end if
if trim(request("SystemAdmin")) <> "" then
Application("em_SystemAdmin") = trim(request("SystemAdmin"))
mam.SystemAdmin = Application("em_SystemAdmin")
end if
if trim(request("EnableBBS")) = "" then
Application("em_EnableBBS") = false
mam.EnableBBS = false
else
Application("em_EnableBBS") = true
mam.EnableBBS = true
end if
if trim(request("Enable_SignHold")) = "" then
Application("em_Enable_SignHold") = false
mam.Enable_SignHold = false
else
Application("em_Enable_SignHold") = true
mam.Enable_SignHold = true
end if
if trim(request("Enable_FreeSign")) = "" then
Application("em_Enable_FreeSign") = false
mam.Enable_FreeSign = false
else
Application("em_Enable_FreeSign") = true
mam.Enable_FreeSign = true
end if
if trim(request("Enable_SignWithDomainUser")) = "" then
Application("em_Enable_SignWithDomainUser") = false
mam.Enable_SignWithDomainUser = false
else
Application("em_Enable_SignWithDomainUser") = true
mam.Enable_SignWithDomainUser = true
end if
if trim(request("Enable_SignNumberLimit")) = "" then
Application("em_Enable_SignNumberLimit") = false
mam.Enable_SignNumberLimit = false
else
Application("em_Enable_SignNumberLimit") = true
mam.Enable_SignNumberLimit = true
end if
if trim(request("SignNumberLimitDays")) <> "" and IsNumeric(trim(request("SignNumberLimitDays"))) = true then
Application("em_SignNumberLimitDays") = CInt(trim(request("SignNumberLimitDays")))
if Application("em_SignNumberLimitDays") < 0 or Application("em_SignNumberLimitDays") > 999 then
Application("em_SignNumberLimitDays") = 1
end if
mam.SignNumberLimitDays = Application("em_SignNumberLimitDays")
end if
if trim(request("Enable_ShareFolder")) = "" then
Application("em_Enable_ShareFolder") = false
mam.Enable_ShareFolder = false
else
Application("em_Enable_ShareFolder") = true
mam.Enable_ShareFolder = true
end if
if trim(request("Enable_SignEnglishName")) = "" then
Application("em_Enable_SignEnglishName") = false
mam.Enable_SignEnglishName = false
else
Application("em_Enable_SignEnglishName") = true
mam.Enable_SignEnglishName = true
end if
if trim(request("LogPageKSize")) <> "" and IsNumeric(trim(request("LogPageKSize"))) = true then
Application("em_LogPageKSize") = CInt(trim(request("LogPageKSize")))
if Application("em_LogPageKSize") < 1 or Application("em_LogPageKSize") > 999 then
Application("em_LogPageKSize") = 50
end if
mam.LogPageKSize = Application("em_LogPageKSize")
end if
if trim(request("SignMode")) <> "" and IsNumeric(trim(request("SignMode"))) = true then
Application("em_SignMode") = CInt(trim(request("SignMode")))
if Application("em_SignMode") < 0 or Application("em_SignMode") > 2 then
Application("em_SignMode") = 0
end if
mam.SignMode = Application("em_SignMode")
end if
if trim(request("SignWaitDays")) <> "" and IsNumeric(trim(request("SignWaitDays"))) = true then
Application("em_SignWaitDays") = CInt(trim(request("SignWaitDays")))
if Application("em_SignWaitDays") < 1 or Application("em_SignWaitDays") > 99 then
Application("em_SignWaitDays") = 7
end if
mam.SignWaitDays = Application("em_SignWaitDays")
else
Application("em_SignWaitDays") = 7
mam.SignWaitDays = Application("em_SignWaitDays")
end if
if trim(request("am_Name")) <> "" then
Application("em_am_Name") = trim(request("am_Name"))
mam.am_Name = Application("em_am_Name")
end if
if trim(request("am_Accounts")) <> "" then
Application("em_am_Accounts") = trim(request("am_Accounts"))
mam.am_Accounts = Application("em_am_Accounts")
end if
Application("em_TestAccounts") = trim(request("TestAccounts"))
mam.TestAccounts = Application("em_TestAccounts")
pr.acSubject = trim(request("acSubject"))
pr.acText = trim(request("acText"))
mam.save
pr.Save
set mam = nothing
set pr = nothing
if err.number = 0 then
response.redirect "ok.asp?" & getGRSN() & "&gourl=webadmin.asp"
else
response.redirect "err.asp?" & getGRSN() & "&gourl=webadmin.asp"
end if
end if
dim eu
set eu = Application("em")
%>
<HTML>
<HEAD>
<title>Corp.Email</title>
<LINK href="images\hwem.css" rel=stylesheet>
</HEAD>
<script language="JavaScript">
<!--
function ischangeAdmin() {
if ("<%=Application("em_SystemAdmin") %>" != f1.SystemAdmin.value)
{
if (confirm("Important: the current system administrator is : <%=Application("em_SystemAdmin") %>\r\n\r\nAre you sure to change the account to : " + f1.SystemAdmin.value + "\r\n\r\nNote: the current account will not be able to perform system administration after you click on \"OK\"."))
f1.submit();
}
else
f1.submit();
}
// -->
</script>
<BODY>
<br><br>
<form method="post" action="webadmin.asp" name="f1">
<table width="90%" border="0" align="center">
<tr>
<td>
<div align="center">
<table width="90%" border="0" align="center" cellspacing="0" bgcolor="#dbeaf5">
<tr>
<td valign=center width="50%" height=30 style='border-top:1px #8CA5B5 solid; border-bottom:1px #8CA5B5 solid;'>
<div>Max. personal folders: </div>
</td>
<td align=left bgcolor="#EFF7FF" style='border-top:1px #8CA5B5 solid; border-bottom:1px #8CA5B5 solid;'>
<input type="text" name="MaxFolders" class='textbox' value="<%=Application("em_MaxFolders") %>" size="10" maxlength="2">
</td>
</tr>
<tr>
<td valign=center style='border-bottom:1px #8CA5B5 solid;'
height=30>
<div>Max. multi-POP3 downloads: </div>
</td>
<td align=left bgcolor="#EFF7FF" style='border-bottom:1px #8CA5B5 solid;'>
<input type="text" name="MaxMPOP3" class='textbox' value="<%=Application("em_MaxMPOP3") %>" size="10" maxlength="2">
</td>
</tr>
<tr>
<td valign=center style='border-bottom:1px #8CA5B5 solid;'
height=30>
<div>Max. signatures: </div>
</td>
<td align=left bgcolor="#EFF7FF" style='border-bottom:1px #8CA5B5 solid;'>
<input type="text" name="MaxSigns" class='textbox' value="<%=Application("em_MaxSigns") %>" size="10" maxlength="2">
</td>
</tr>
<tr>
<td valign=center height=30 style='border-bottom:1px #8CA5B5 solid;'>
<div>Webmail system administrator: </div>
</td>
<td align=left bgcolor="#EFF7FF" style='border-bottom:1px #8CA5B5 solid;'>
<select name="SystemAdmin" class="drpdwn">
<%
i = 0
allnum = eu.GetUsersCount
do while i < allnum
eu.GetUserByIndex i, name, domain, comment
if name <> Application("em_SystemAdmin") then
response.write "<option value='" & name & "'>" & name & "</option>"
else
response.write "<option value='" & name & "' selected>" & name & "</option>"
end if
name = NULL
domain = NULL
comment = NULL
i = i + 1
loop
%>
</select>
</td>
</tr>
<tr>
<td valign=center bgcolor="#dbeaf5" style='border-bottom:1px #8CA5B5 solid;'
height=30>
<div>Enable Public folders (BBS): </div>
</td>
<td align=left bgcolor="#EFF7FF" style='border-bottom:1px #8CA5B5 solid;'>
<input type="checkbox" name="EnableBBS" value="checkbox" <% if mam.EnableBBS = true then response.write "checked"%>>
</td>
</tr>
<tr>
<td valign=center bgcolor="#dbeaf5" style='border-bottom:1px #8CA5B5 solid;'
height=30>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -