approvemessages.asp
来自「一个虚拟主机代理系统」· ASP 代码 · 共 105 行
ASP
105 行
<%'=========================================
'ScriptMate User Manager Version 2.1
'Copyright 2001 (C) ScriptMate.Com
'Admin Module
'This module approves all the messages sent by the users
'For any help with modification to
'this file contact support@scriptmate.com
'=========================================
Sub Approvemessages()
dim todo, action, records, smumarray, iscolor, id,nCount
smumadminheader("Approve Messages")
if not Application("smumdebugmode") then on error resume next
action = request("action")
todo = Request("todo")
if todo = "" then
smumquery = "select * from smum_messagingtbl where messaging_approvalstatus = "&smumfalse&" order by messaging_date asc"
smumOpenrs smumquery,"smumrs",action
if smumrs.eof then
records = false
smumFormOpenTable
smumFormHeader "Approve Messages"
smumFormResponse "There are currently no messages to be approved."
smumFormCloseTable
else
records = true
smumarray = smumrs.getrows
end if
if records then
smumFormAction "<form action="""&smumadminpage&"?action=approvemessages"" method=post>"
smumFormHiddenField "todo","approve"
smumFormHiddenField "id","id"
smumFormOpenTable%>
<tr class=colorformheader>
<td colspan=5><font class=textsize9><b>Approve Messages</b></font></td>
</tr>
<tr class=colorformfields>
<td align=center width=10%><font class=textsize9><b>Date</b></font></td>
<td align=center width=10%><font class=textsize9><b>From</b></font></td>
<td align=center width=10%><font class=textsize9><b>To</b></font></td>
<td><font class=textsize9><b>Subject</b></font></td>
<td align=center width=10%><font class=textsize9><b>Options</b></font></td>
</tr>
<%dim i
For i = 0 to ubound(smumarray,2)
if iscolor = false then
response.write"<tr class=colorwhite><td align=center>"
iscolor = true
else
response.write"<tr class=colorformfields><td align=center>"
iscolor = false
end if
response.write "<font class=textsize9>"&monthname(month(smumarray(1,i)),true) & " " & day(smumarray(1,i)) &"</font></td>"
response.write "<td align=center><font class=textsize9><a href="""&smumadminpage&"?action=editmember&id="&smumarray(2,i)&""" target=""_blank"">"&smumgetusername(smumarray(2,i))&"</a></font></td>"
response.write "<td align=center><font class=textsize9><a href="""&smumadminpage&"?action=editmember&id="&smumarray(3,i)&""" target=""_blank"">"&smumgetusername(smumarray(3,i))&"</a></font></td>"
response.write "<td align=left><font class=textsize9><a href="""&smumadminpage&"?action=displaymessage&id="&smumarray(0,i)&""">"&smumarray(4,i)&"</a></font></td>"
response.write "<td align=center nowrap><a href="""&smumadminpage&"?action=editmessage&id="&smumarray(0,i)&"""><img src=/smusermanager/images/edit.gif border=0 align=absmiddle alt=Edit></a> | <a href="""&smumadminpage&"?action=deletemessage&id="&smumarray(0,i)&"""><img src=/smusermanager/images/delete.gif border=0 align=absmiddle alt=Delete></a> | <a href="""&smumadminpage&"?action=approvemessages&todo=approve&id="&smumarray(0,i)&"""><img src=/smusermanager/images/approve.gif border=0 align=absmiddle alt=Approve></a></td></tr>"
next
smumFormCloseTable
smumFormClose
end if
smumClosers(smumrs)
elseif todo = "approve" then
id = request("id")
if id = "" then
Response.Redirect smumadminpage&"?action=approvemessages"
else
smumquery = "update smum_messagingtbl set messaging_approvalstatus = "& smumtrue &" where messaging_id = "&id
smumexecutequery smumquery,action
Response.Redirect smumadminpage&"?action=approvemessages"
end if
end if
End Sub%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?