📄 editpf.asp
字号:
<!--#include file="passinc.asp" -->
<%
fileid = trim(request("fileid"))
dim pf
set pf = server.createobject("easymail.PubFolderManager")
pf.load fileid
if pf.admin <> Session("wem") then
if isadmin() = false then
set pf = nothing
response.redirect "noadmin.asp"
end if
end if
dim eu
set eu = Application("em")
if trim(request("save")) = "1" and Request.ServerVariables("REQUEST_METHOD") = "POST" then
pfname = trim(request("pfname"))
pfadmin = trim(request("pfadmin"))
mpermission = trim(request("mpermission"))
pfmaxitems = trim(request("pfmaxitems"))
pfmaxlength = trim(request("pfmaxlength"))
if IsNumeric(mpermission) = true and IsNumeric(pfmaxitems) = true and IsNumeric(pfmaxlength) = true then
pf.admin = pfadmin
pf.foldername = pfname
pf.permission = CInt(mpermission)
pf.MaxItems = CInt(pfmaxitems)
pf.itemmaxsize = CLng(pfmaxlength)
pf.save
set pf = nothing
Response.Redirect "showallpf.asp?" & getGRSN()
end if
end if
dim filename
dim ownID
dim step
dim nextstep
dim postuser
dim subject
dim time
dim length
dim state
dim searchkey
dim readcount
pf.GetFolderInfo filename, admin, permission, name, createtime, count, maxid, maxitem, itemmaxsize
%>
<HTML>
<HEAD>
<title>Corp.Email</title>
<LINK href="images\hwem.css" rel=stylesheet>
</HEAD>
<script LANGUAGE=javascript>
<!--
function gosub()
{
if (f1.pfname.value != "" && f1.pfadmin.value != "" && f1.pfmaxitems.value != "" && f1.pfmaxitems.value >= 0 && f1.pfmaxlength.value != "" && f1.pfmaxlength.value > 0)
f1.submit();
}
//-->
</script>
<body>
<form name="f1" method="post" action="editpf.asp">
<input type="hidden" name="save" value="1">
<input type="hidden" name="fileid" value="<%=fileid %>">
<br><br><br>
<table width="90%" border="0" align="center" cellspacing="0" bgcolor="#EFF7FF">
<tr bgcolor="#dbeaf5">
<td colspan="2" height="28" nowrap style="border:1px #8CA5B5 solid;"><p align="center"><font class="s" color="#104A7B"><b>Modify The Attributes of The Public Folder: <%=server.htmlencode(name) %></b></font></td>
</tr>
<tr>
<td width="35%" align="right" bgcolor="#dbeaf5" height='28' style='border-bottom:1px #8CA5B5 solid;'><font class="s" color="#104A7B">Public Folder Name : </font></td>
<td width="65%" style='border-bottom:1px #8CA5B5 solid;'><input type="text" name="pfname" class="textbox" value="<%=name %>"></td>
</tr>
<tr>
<td width="35%" align="right" bgcolor="#dbeaf5" height='28' style='border-bottom:1px #8CA5B5 solid;'><font class="s" color="#104A7B">Administrator : </font></td>
<td width="65%" style='border-bottom:1px #8CA5B5 solid;'>
<select name="pfadmin" class="drpdwn" size="1">
<%
i = 0
allnum = eu.GetUsersCount
do while i < allnum
eu.GetUserByIndex i, name, domain, comment
if name <> admin 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 width="35%" align="right" bgcolor="#dbeaf5" height='28' style='border-bottom:1px #8CA5B5 solid;'><font class="s" color="#104A7B">Permission : </font></td>
<td width="65%" style='border-bottom:1px #8CA5B5 solid;'>
<select name="mpermission" class="drpdwn" size="1">
<%
i = 0
do while i < 5
if permission <> i then
response.write "<option value='" & i & "'>" & getPermissionStr(i) & "</option>"
else
response.write "<option value='" & i & "' selected>" & getPermissionStr(i) & "</option>"
end if
i = i + 1
loop
%>
</select>
</td>
</tr>
<tr>
<td width="35%" align="right" bgcolor="#dbeaf5" height='28' style='border-bottom:1px #8CA5B5 solid;'><font class="s" color="#104A7B">Number of articles : </font></td>
<td width="65%" style='border-bottom:1px #8CA5B5 solid;'><%=count %></td>
</tr>
<tr>
<td width="35%" align="right" bgcolor="#dbeaf5" height='28' style='border-bottom:1px #8CA5B5 solid;'><font class="s" color="#104A7B">Max. number : </font></td>
<td width="65%" style='border-bottom:1px #8CA5B5 solid;'><input type="text" name="pfmaxitems" maxlength="4" class="textbox" value="<%=maxitem %>"></td>
</tr>
<tr>
<td width="35%" align="right" bgcolor="#dbeaf5" height='28' style='border-bottom:1px #8CA5B5 solid;'><font class="s" color="#104A7B">Max. length for a single article : </font></td>
<td width="65%" style='border-bottom:1px #8CA5B5 solid;'><input type="text" name="pfmaxlength" maxlength="9" class="textbox" value="<%=itemmaxsize %>"> Byte</td>
</tr>
<tr>
<td colspan="7" align="right" bgcolor="#ffffff"><br>
<input type="button" value=" Save " onclick="javascript:gosub();" class="Bsbttn">
<input type="button" value="Cancel" onclick="javascript:location.href='showallpf.asp?<%=getGRSN() %>';" class="Bsbttn">
</td>
</tr>
</table>
<%
filename = NULL
ownID = NULL
step = NULL
postuser = NULL
subject = NULL
time = NULL
length = NULL
state = NULL
searchkey = NULL
readcount = NULL
%>
</table>
</form>
</BODY>
</HTML>
<%
set pf = nothing
set eu = nothing
function getTimeStr(otime)
getTimeStr = mid(otime, 1, 4) & "-"
getTimeStr = getTimeStr & mid(otime, 5, 2) & "-"
getTimeStr = getTimeStr & mid(otime, 7, 2) & " "
getTimeStr = getTimeStr & mid(otime, 9, 2) & ":"
getTimeStr = getTimeStr & mid(otime, 11, 2) & ":"
getTimeStr = getTimeStr & mid(otime, 13, 2)
end function
function getShowSize(bytesize)
if bytesize < 1000 then
getShowSize = bytesize & "B"
else
getShowSize = CLng(bytesize/1000) & "K"
end if
end function
function getSortStr(sortnum)
if sortnum = 0 then
getSortStr = "Posted at"
elseif sortnum = 1 then
getSortStr = "Posted by"
elseif sortnum = 2 then
getSortStr = "Subject"
elseif sortnum = 3 then
getSortStr = "Size"
elseif sortnum = 4 then
getSortStr = "Times viewed"
end if
end function
function getPermissionStr(pm)
if pm = 0 then
getPermissionStr = "Modifiable by the author"
elseif pm = 1 then
getPermissionStr = "Modifiable and deletable by the author"
elseif pm = 2 then
getPermissionStr = "Modifiable or deletable only by administrators"
elseif pm = 3 then
getPermissionStr = "No follow-ups allowed"
elseif pm = 4 then
getPermissionStr = "Completely locked up (no follow-ups or modification allowed)"
end if
end function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -