📄 pop_lock.asp
字号:
strEncodedPassword = sha256("" & strPassword)
mLev = cLng(chkUser(strDBNTFUserName, strEncodedPassword,-1))
if mLev > 0 then '## is Member
if (chkForumModerator(Forum_ID, strDBNTFUserName) = "1") or (mLev = 4) then
'## Forum_SQL
strSql = "UPDATE " & strTablePrefix & "TOPICS "
strSql = strSql & " SET T_STICKY = " & 1
strSQL = strSql & ", T_ARCHIVE_FLAG = " & 0
strSql = strSql & " WHERE TOPIC_ID = " & Topic_ID
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """><b>Topic Made Sticky!</b></font></p>" & vbNewLine & _
" <script language=""javascript1.2"">self.opener.location.reload();</script>" & vbNewLine
else
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """><b>No Permissions to Make Topic Sticky!</b></font><br />" & _
"<br /><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""JavaScript:onClick=history.go(-1)"">Go Back to Re-Authenticate</a></font></p>" & vbNewLine
end if
else
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """><b>No Permissions to Make Topic Sticky!</b></font><br />" & _
"<br /><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""JavaScript:onClick=history.go(-1)"">Go Back to Re-Authenticate</a></font></p>" & vbNewLine
end if
case else
Response.Write " <p><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>"
select case Mode_Type
case "Topic"
Response.Write("Lock Topic")
case "Forum"
Response.Write("Lock Forum")
case "Category"
Response.Write("Lock Category")
case "Member"
Response.Write("Lock Member")
case "STopic"
Response.Write("Make Topic Sticky")
end select
Response.Write "</font></p>" & vbNewLine & _
" <p><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b><font color=""" & strHiLiteFontColor & """>NOTE: </font></b>"
select case Mode_Type
case "STopic"
Response.Write("Only Moderators and Administrators can make a Topic Sticky.")
case "Member"
Response.Write("Only Administrators can lock a Member.")
case "Category"
Response.Write("Only Administrators can lock a Category.")
case "Forum"
Response.Write("Only Moderators and Administrators can lock a Forum.")
case "Topic"
Response.Write("Only Moderators and Administrators can lock a Topic.")
end select
Response.Write "</font></p>" & vbNewLine & _
" <form action=""pop_lock.asp?mode="
select case Mode_Type
case "Topic"
Response.Write("CloseTopic")
case "Forum"
Response.Write("CloseForum")
case "Category"
Response.Write("CloseCategory")
case "Member"
Response.Write("LockMember")
case "STopic"
Response.Write("StickyTopic")
end select
Response.Write """ method=""post"" id=""Form1"" name=""Form1"">" & vbNewLine & _
" <input type=""hidden"" name=""Method_Type"" value="""
select case Mode_Type
case "Topic"
Response.Write("CloseTopic")
case "Forum"
Response.Write("CloseForum")
case "Category"
Response.Write("CloseCategory")
case "Member"
Response.Write("LockMember")
case "STopic"
Response.Write("StickyTopic")
end select
Response.Write """>" & vbNewLine & _
" <input type=""hidden"" name=""TOPIC_ID"" value=""" & Topic_ID & """>" & vbNewLine & _
" <input type=""hidden"" name=""FORUM_ID"" value=""" & Forum_ID & """>" & vbNewLine & _
" <input type=""hidden"" name=""CAT_ID"" value=""" & Cat_ID & """>" & vbNewLine & _
" <input type=""hidden"" name=""MEMBER_ID"" value=""" & Member_ID & """>" & vbNewLine & _
" <table border=""0"" cellspacing=""0"" cellpadding=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpBorderColor & """>" & vbNewLine & _
" <table border=""0"" width=""100%"" cellspacing=""1"" cellpadding=""1"">" & vbNewLine
if strAuthType="db" then
Response.Write " <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" nowrap><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>User Name:</font></b></td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """><input type=""text"" name=""Name"" maxLength=""25"" value=""" & chkString(strDBNTUserName,"display") & """ style=""width:150px;""></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" nowrap><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Password:</font></b></td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """><input type=""Password"" name=""Pass"" maxLength=""25"" value="""" style=""width:150px;""></td>" & vbNewLine & _
" </tr>" & vbNewLine
else
if strAuthType="nt" then
Response.Write " <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" nowrap><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>NT Account:</font></b></td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & chkString(strDBNTUserName,"display") & "</font></td>" & vbNewLine & _
" </tr>" & vbNewLine
end if
end if
if Mode_Type = "Topic" Then
response.write " <tr>" & vbNewLine
strSQL = "SELECT T_ARCHIVE_FLAG FROM " & strTablePrefix & "TOPICS "
strSql = strSQL & "WHERE TOPIC_ID = " & Topic_ID
set rs = my_conn.Execute(strSql)
response.write " <td bgColor=""" & strPopUpTableColor & """ align=""right""><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Do not Archive</font></b></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ align=""left""><input type=""Checkbox"" value=""1"" name=""noArchiveFlag"""
if rs("T_ARCHIVE_FLAG") = 0 then response.write(" checked")
response.write "></td>" & vbNewLine & _
" </tr>" & vbNewLine
rs.close
end If
Response.Write " <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ colspan=""2"" align=""center""><Input type=""Submit"" value=""Send""></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" </form>" & vbNewLine
end select
WriteFooterShort
Response.End
function chkCanLock(fAM_ID, fM_ID)
'## Forum_SQL
strSql = "SELECT MEMBER_ID, M_LEVEL "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
StrSql = strSql & " WHERE MEMBER_ID = " & fM_ID
set rsCheck = my_Conn.Execute (strSql)
if rsCheck.BOF or rsCheck.EOF then
chkCanLock = 0 '## No Members Found
else
if cLng(rsCheck("MEMBER_ID")) = cLng(fAM_ID) then
chkCanLock = 0 '## Can't lock self
else
Select case cLng(rsCheck("M_LEVEL"))
case 1
chkCanLock = 1 '## Can lock Normal User
case 2
chkCanLock = 1 '## Can lock Moderator
case 3
if fAM_ID <> intAdminMemberID then
chkCanLock = 0 '## Only the Forum Admin can lock other Administrators
else
chkCanLock = 1 '## Forum Admin is ok to lock other Administrators
end if
case else
chkCanLock = 0 '## Member doesn't have a Member Level?
End Select
end if
end if
rsCheck.close
set rsCheck = nothing
end function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -