📄 showdomainusers.asp
字号:
<!--#include file="passinc.asp" -->
<%
dim cdomain
cdomain = trim(request("cdomain"))
dim ed
set ed = server.createobject("easymail.domain")
ed.Load
dim wem_user
wem_user = Session("wem")
if ed.GetUserManagerDomainCount(wem_user) < 1 then
set ed = nothing
response.redirect "noadmin.asp"
end if
searchtext = trim(request("searchtext"))
if request("page") = "" then
page = 0
else
page = CInt(request("page"))
end if
if page < 0 then
page = 0
end if
%>
<%
dim ei
set ei = Application("em")
'-----------------------------------------
%>
<HTML>
<HEAD>
<title>Corp.Email</title>
<LINK href="images\hwem.css" rel=stylesheet>
</HEAD>
<SCRIPT LANGUAGE=javascript>
<!--
function mdel() {
if (ischeck() == true)
{
f1.mode.value = "del";
f1.submit();
}
}
function mforbid() {
if (ischeck() == true)
{
f1.mode.value = "forbid";
f1.submit();
}
}
function mclear() {
if (ischeck() == true)
{
f1.mode.value = "clear";
f1.submit();
}
}
//-->
</SCRIPT>
<BODY>
<br>
<FORM ACTION="savedomainusers.asp" METHOD="POST" NAME="f1">
<table width="98%" nowrap align="center" cellspacing="0">
<tr bgcolor="#EFF7FF" style='border:1px #8CA5B5 solid;font-size: 9pt;'>
<td width="62%" colspan="8" height="28" nowrap style="border-left:1px #8CA5B5 solid; border-top:1px #8CA5B5 solid; border-right:1px #8CA5B5 solid; border-bottom:1px #8CA5B5 solid;">
Account: <input type="text" name="searchtext" class='textbox' value="<%=searchtext %>">
<input type="button" onclick="javascript:usersearch()" value="Search" class="sbttn">
</td>
</tr>
</table><br>
<input type="hidden" name="page" value="<%=page %>">
<input type="hidden" name="mode">
<table width="98%" border="0" align="center" cellspacing="0">
<tr bgcolor="#dbeaf5">
<td align="center" 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>Domain(s)</b></font></td>
</tr>
<tr>
<td bgcolor="#EFF7FF" height="22" align="center" style="border-left:1px #8CA5B5 solid; border-right:1px #8CA5B5 solid; border-bottom:1px #8CA5B5 solid;">
<div align="center"><%
i = 0
allnum = ed.GetUserManagerDomainCount(wem_user)
dim isok
isok = false
if cdomain = "" then
cdomain = ed.GetUserManagerDomain(wem_user, 0)
end if
do while i < allnum
cdomainstr = ed.GetUserManagerDomain(wem_user, i)
if cdomainstr = cdomain then
isok = true
end if
response.write "<a href=""showdomainusers.asp?" & getGRSN() & "&cdomain=" & cdomainstr & """>" & cdomainstr & "</a> "
cdomainstr = NULL
i = i + 1
loop
%></div>
</td>
</tr>
</table><br>
<%
if isok = true then
ed.GetControlMsgEx cdomain, dc_isshow, dc_maxuser, dc_dmanager, dc_maxsize, dc_allsize
%>
<input type="hidden" name="cdomain" value="<%=cdomain %>">
<table width="98%" border="0" align="center" cellspacing="0" bgcolor="#EFF7FF">
<tr bgcolor="#dbeaf5">
<td colspan="9" height="28" nowrap style="border-left:1px #8CA5B5 solid; border-top:1px #8CA5B5 solid; border-right:1px #8CA5B5 solid; border-bottom:1px #8CA5B5 solid;">
<div align="center"><font class="s" color="#104A7B"><b>User management of domain <font class="s" color="#FF3333"><%=cdomain %></font> (<%=ed.GetUserNumberInDomain(cdomain) %>)</b></font></div><br>
<div align="center"><%
Response.Write "Maximum number of users allowed: <font class='s' color='#FF3333'><b>" & dc_maxuser & "</b></font> Total space allocable in this domain: <font class='s' color='#FF3333'><b>"
if dc_maxsize = 0 then
Response.Write "Unlimited</b></font>"
else
Response.Write dc_maxsize
Response.Write "</b></font>(K)"
end if
%></div>
</td>
</tr>
<tr bgcolor="#dbeaf5">
<td width="4%" nowrap style="border-left:1px #8CA5B5 solid; border-bottom:1px #8CA5B5 solid;">
<div align="center"> </div>
</td>
<td width="4%" nowrap style="border-left:1px #8CA5B5 solid; border-bottom:1px #8CA5B5 solid;">
<div align="center">No.</div>
</td>
<td width="14%" nowrap style="border-left:1px #8CA5B5 solid; border-bottom:1px #8CA5B5 solid;">
<div align="center">Account</div>
</td>
<td width="15%" height="22" nowrap style="border-left:1px #8CA5B5 solid; border-bottom:1px #8CA5B5 solid;">
<div align="center">Domain</div>
</td>
<td width="5%" nowrap style="border-left:1px #8CA5B5 solid; border-bottom:1px #8CA5B5 solid;">
<div align="center">Status</div>
</td>
<td width="13%" style="border-left:1px #8CA5B5 solid; border-bottom:1px #8CA5B5 solid;">
<div align="center" nowrap>Last Login Date</div>
</td>
<td width="19%" style="border-left:1px #8CA5B5 solid; border-bottom:1px #8CA5B5 solid;">
<div align="center" nowrap>Comment</div>
</td>
<td width="12%" style="border-left:1px #8CA5B5 solid; border-bottom:1px #8CA5B5 solid;">
<div align="center" nowrap>Access</div>
</td>
<td width="4%" align="center" nowrap style="border-left:1px #8CA5B5 solid; border-right:1px #8CA5B5 solid; border-bottom:1px #8CA5B5 solid;">Edit
</td>
</tr>
<%
dc_isshow = NULL
dc_maxuser = NULL
dc_dmanager = NULL
dc_maxsize = NULL
dc_allsize = NULL
dim isshow
allnum = ei.GetUsersCount
i = 0
showline = 0
li = 0
do while i < allnum
ei.GetUserByIndex2 i, name, domain, comment, forbid, lasttime, accessmode
isshow = false
if domain = cdomain then
if searchtext <> "" then
if InStr(name, searchtext) <> 0 then
isshow = true
end if
else
isshow = true
end if
end if
if isshow = true then
if showline >= page * pageline and li < pageline then
response.write "<tr><td align='center' height='24' style='border-bottom:1px #8CA5B5 solid;'><input type='checkbox' name='check" & i & "'>"
response.write "</td><td align='center' style='border-bottom:1px #8CA5B5 solid;'>" & showline + 1
response.write "</td><td align='center' style='border-bottom:1px #8CA5B5 solid;'>" & name
response.write " </td><td align='center' style='border-bottom:1px #8CA5B5 solid;'>" & domain
if forbid = TRUE then
response.write " </td><td align='center' nowrap style='border-bottom:1px #8CA5B5 solid;'>Disabled"
else
response.write " </td><td align='center' style='border-bottom:1px #8CA5B5 solid;'>"
end if
response.write " </td><td align='center' style='border-bottom:1px #8CA5B5 solid;'>" & lasttime
response.write " </td><td align='center' style='border-bottom:1px #8CA5B5 solid;'>" & comment
response.write " </td><td align='center' style='border-bottom:1px #8CA5B5 solid;'>" & getaccessmode(accessmode)
response.write "</td><td align='center' style='border-bottom:1px #8CA5B5 solid;'><a href='changepw.asp?" & getGRSN() & "&id=" & i & "&gourl=" & Server.URLEncode("showdomainusers.asp?" & getGRSN() & "&cdomain=" & cdomain & "&page=" & page & "&searchtext=" & searchtext) & "'><img src='images\edit.gif' border='0'></a>"
response.write "</td></tr>"
li = li + 1
end if
showline = showline + 1
end if
name = NULL
domain = NULL
comment = NULL
forbid = NULL
lasttime = NULL
accessmode = NULL
i = i + 1
loop
%>
<tr>
<td colspan="9" align="right" bgcolor="#ffffff"><br>
<input type="button" value=" Add " onClick="javascript:location.href='domaincreate.asp?<%=getGRSN() %>'" class="sbttn">
<input type="button" value="Delete" onclick="javascript:mdel()" class="sbttn">
<input type="button" value="Disable" onclick="javascript:mforbid()" class="sbttn">
<input type="button" value="Enable" onclick="javascript:mclear()" class="sbttn">
</td>
</tr>
</table>
<%
allnum = showline
allpage = CInt((allnum - (allnum mod pageline))/ pageline)
if allnum mod pageline <> 0 then
allpage = allpage + 1
end if
if allpage = 0 then
allpage = 1
end if
response.write "<br><table width='98%' border='0'><tr><td align='right'>(<font color='#FF3333'>" & page + 1 & "</font>/" & allpage & ") "
if page - 1 < 0 then
response.write "<font face='Webdings' style='font-size:13px'>9</font> "
response.write "<font face='Webdings' style='font-size:13px'>7</font> "
else
response.write "<a href=""showdomainusers.asp?" & getGRSN() & "&cdomain=" & cdomain & "&page=" & 0 & "&searchtext=" & searchtext & """><font face='Webdings' style='font-size:13px'>9</font></a> "
response.write "<a href=""showdomainusers.asp?" & getGRSN() & "&cdomain=" & cdomain & "&page=" & page - 1 & "&searchtext=" & searchtext & """><font face='Webdings' style='font-size:13px'>7</font></a> "
end if
response.write "<select name='selectpage' class='drpdwn' size='1' LANGUAGE=javascript onchange='selectpage_onchange()'>"
i = 0
do while i < allpage
if i <> page then
response.write "<option value=""" & i & """>" & i + 1 & "</option>"
else
response.write "<option value=""" & i & """ selected>" & i + 1 & "</option>"
end if
i = i + 1
loop
response.write "</select> "
if ((page+1) * pageline) => allnum then
response.write "<font face='Webdings' style='font-size:13px'>8</font> "
else
response.write "<a href=""showdomainusers.asp?" & getGRSN() & "&cdomain=" & cdomain & "&page=" & page + 1 & "&searchtext=" & searchtext & """><font face='Webdings' style='font-size:13px'>8</font></a> "
end if
if page + 1 = allpage then
response.write "<font face='Webdings' style='font-size:13px'>:</font> "
else
response.write "<a href=""showdomainusers.asp?" & getGRSN() & "&cdomain=" & cdomain & "&page=" & allpage - 1 & "&searchtext=" & searchtext & """><font face='Webdings' style='font-size:13px'>:</font></a>"
end if
response.write "</td></tr></table>"
end if
%>
</FORM>
</BODY>
<SCRIPT LANGUAGE=javascript>
<!--
function ischeck() {
var i = 0;
var theObj;
for(; i<<%=ei.GetUsersCount %>; i++)
{
theObj = eval("f1.check" + i);
if (theObj != null)
if (theObj.checked == true)
return true;
}
return false;
}
function usersearch(){
location.href = "showdomainusers.asp?<%=getGRSN() %>&cdomain=<%=cdomain %>&searchtext=" + f1.searchtext.value;
}
function selectpage_onchange()
{
location.href = "showdomainusers.asp?<%=getGRSN() & "&cdomain=" & cdomain & "&searchtext=" & searchtext %>&page=" + f1.selectpage.value;
}
//-->
</SCRIPT>
</HTML>
<%
set ei = nothing
set ed = nothing
function getaccessmode(amode)
if amode = 0 then
getaccessmode = "http/smtp/pop"
elseif amode = 1 then
getaccessmode = "smtp/pop"
elseif amode = 2 then
getaccessmode = "http/smtp"
elseif amode = 3 then
getaccessmode = "http/pop"
elseif amode = 4 then
getaccessmode = "http"
elseif amode = 5 then
getaccessmode = "smtp"
elseif amode = 6 then
getaccessmode = "pop"
end if
end function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -