📄 new_reply_form.asp
字号:
'Read in the contents of the quick reply form
strMessage = Request.Form("message")
'Run some filters to make sure the content is OK, and no dodgy HTML is trying to sneek through
strMessage = HTMLsafe(strMessage)
End If
'If the forum level for the user on this forum is read only set the forum to be locked
If (blnRead = False AND blnModerator = False AND blnAdmin = False) Then blnForumLocked = True
'If the message has been edited remove who edited the post
If InStr(1, strMessage, "<edited>", 1) Then strMessage = removeEditorAuthor(strMessage)
'Setup reply bottom of page
If InStr(1, strReplyMessage, "[QUOTE=", 1) > 0 AND InStr(1, strReplyMessage, "[/QUOTE]", 1) > 0 Then strReplyMessage = formatUserQuote(strReplyMessage)
If InStr(1, strReplyMessage, "[QUOTE]", 1) > 0 AND InStr(1, strReplyMessage, "[/QUOTE]", 1) > 0 Then strReplyMessage = formatQuote(strReplyMessage)
If InStr(1, strReplyMessage, "[CODE]", 1) > 0 AND InStr(1, strReplyMessage, "[/CODE]", 1) > 0 Then strReplyMessage = formatCode(strReplyMessage)
'If the post contains a flash link then format it
If blnFlashFiles Then
If InStr(1, strReplyMessage, "[FLASH", 1) > 0 AND InStr(1, strReplyMessage, "[/FLASH]", 1) > 0 Then strReplyMessage = formatFlash(strReplyMessage)
End If
'If the message has been edited parse the 'edited by' XML into HTML for the post
If InStr(1, strReplyMessage, "<edited>", 1) Then strReplyMessage = editedXMLParser(strReplyMessage)
'Use the application session to pass around what forum this user is within
Call saveSessionItem("FID", intForumID)
'Set bread crumb trail
'Display the category name
strBreadCrumbTrail = strBreadCrumbTrail & strNavSpacer & "<a href=""default.asp?C=" & intCatID & strQsSID2 & """>" & strCatName & "</a>" & strNavSpacer
'Display if there is a main forum to the sub forums name
If intMasterForumID <> 0 Then strBreadCrumbTrail = strBreadCrumbTrail & "<a href=""forum_topics.asp?FID=" & intMasterForumID & strQsSID2 & """>" & strMasterForumName & "</a>" & strNavSpacer
'Display forum name
If strForumName = "" Then strBreadCrumbTrail = strBreadCrumbTrail & strTxtNoForums Else strBreadCrumbTrail = strBreadCrumbTrail & "<a href=""forum_topics.asp?FID=" & intForumID & strQsSID2 & """>" & strForumName & "</a>"
strBreadCrumbTrail = strBreadCrumbTrail & strNavSpacer & strTxtPostReply
%>
<!-- #include file="includes/browser_page_encoding_inc.asp" -->
<title><% = strTxtPostReply %></title>
<meta name="generator" content="Web Wiz Forums" />
<%
'***** START WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ******
Response.Write("<!--//" & _
vbCrLf & "/* *******************************************************" & _
vbCrLf & "Software: Web Wiz Forums(TM) ver. " & strVersion & "" & _
vbCrLf & "Info: http://www.webwizforums.com" & _
vbCrLf & "Copyright: (C)2001-2008 Web Wiz(TM). All rights reserved" & _
vbCrLf & "******************************************************* */" & _
vbCrLf & "//-->")
'***** END WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ******
%>
<!-- Check the from is filled in correctly before submitting -->
<script language="JavaScript">
//Function to check form is filled in correctly before submitting
function CheckForm () {
var errorMsg = "";
var formArea = document.getElementById('frmMessageForm');
<%
'If Gecko Madis API (RTE) need to strip default input from the API
If RTEenabled = "Gecko" Then Response.Write(" //For Gecko Madis API (RTE)" & vbCrLf & " if (formArea.message.value.indexOf('<br>') > -1 && formArea.message.value.length==5) formArea.message.value = '';" & vbCrLf)
'If this is a guest posting check that they have entered their name
If lngLoggedInUserID = 2 Then
%>
//Check for a name
if (formArea.Gname.value==""){
errorMsg += "\n\t<% = strTxtNoNameError %>";
}<%
End If
'If CAPTCHA is displayed check it's been entered
If blnGuestPostingCAPTCHA AND lngLoggedInUserID = 2 Then
%>
//Check for a security code
if (formArea.securityCode.value == ''){
errorMsg += "\n\t<% = strTxtErrorSecurityCode %>";
}<%
End If
%>
//Check for message
if (formArea.message.value==""){
errorMsg += "\n\t<% = strTxtNoMessageError %>";
}
//If there is aproblem with the form then display an error
if (errorMsg != ""){
msg = "<% = strTxtErrorDisplayLine %>\n\n";
msg += "<% = strTxtErrorDisplayLine1 %>\n";
msg += "<% = strTxtErrorDisplayLine2 %>\n";
msg += "<% = strTxtErrorDisplayLine %>\n\n";
msg += "<% = strTxtErrorDisplayLine3 %>\n";
errorMsg += alert(msg + errorMsg + "\n\n");
return false;
}
return true;
}
</script>
<link href="<% = strCSSfile %>default_style.css" rel="stylesheet" type="text/css" />
<!-- #include file="includes/header.asp" -->
<!-- #include file="includes/status_bar_header_inc.asp" -->
<table class="basicTable" cellspacing="0" cellpadding="3" align="center">
<tr>
<td><h1><% = strTxtPostReply & ": " & strTopicSubject %></h1></td>
</tr>
</table>
<br /><%
'If the Post is by the logged in user or the adminstrator/moderator then display a form to reply
If (blnReply OR blnAdmin) AND blnActiveMember AND blnPollNoReply = false AND (blnForumLocked = False OR blnAdmin = True) AND (blnTopicLocked = False Or blnAdmin) Then
'Update active users table
If blnActiveUsers Then saryActiveUsers = activeUsers(strTxtWritingReply, strTopicSubject, "forum_posts.asp?TID=" & lngTopicID, intForumID)
%>
<table cellspacing="1" cellpadding="3" class="tableBorder" align="center">
<tr class="tableLedger">
<td align="left"><% = strTxtPostReply %></td>
</tr>
<tr class="tableRow">
<td align="left">
<!--#include file="includes/message_form_inc.asp" -->
</td>
</tr>
</table>
<br />
<table class="tableBorder" align="center" cellspacing="1" cellpadding="3" style="table-layout: fixed;">
<tr class="tableLedger">
<td><% = strTxtMessage %></td>
</tr>
<tr class="msgEvenTableTop">
<td valign="top"><%
'If display topic title
Response.Write("<strong>")
'If a calendar event then display so
If isDate(dtmEventDate) Then
Response.Write(strTxtCalendarEvent & ": " & strTopicSubject & " - " & strTxtEventDate & ": " & DateFormat(dtmEventDate))
Else
Response.Write(strTxtTopic & ": " & strTopicSubject)
End If
Response.Write("</strong><br />")
'Display message post date and time
Response.Write(strTxtPosted & " " & DateFormat(dtmPostDate) & " " & strTxtAt & " " & TimeFormat(dtmPostDate) & " " & strTxtBy & " " & strReplyUsername)
%>
</td>
</tr>
<tr class="msgEvenTableRow" style="height:150px;min-height:150px;">
<td valign="top" class="msgLineDevider">
<!-- Start Member Post -->
<div class="msgBody">
<% = strReplyMessage %>
</div>
<!-- End Member Post -->
</td>
</tr>
</table><%
'Else there is an error so show error table
Else
'Update active users table
If blnActiveUsers Then saryActiveUsers = activeUsers(strTxtWritingReply & " [" & strTxtAccessDenied & "]", strTopicSubject, "forum_posts.asp?TID=" & lngTopicID, intForumID)
%>
<table class="errorTable" cellspacing="1" cellpadding="3" align="center">
<tr>
<td><img src="<% = strImagePath %>error.png" alt="<% = strTxtError %>" /> <strong><% = strTxtError %></strong></td>
</tr>
<tr>
<td><%
'If the users account is suspended then let them know
If blnActiveMember = False OR blnBanned Then
'If mem suspended display message
If blnBanned Then
Response.Write(strTxtForumMemberSuspended)
'Else account not yet active
Else
Response.Write("<br />" & strTxtForumMembershipNotAct)
If blnMemberApprove = False Then Response.Write("<br /><br />" & strTxtToActivateYourForumMem)
'If admin activation is enabled let the user know
If blnMemberApprove Then
Response.Write("<br />" & strTxtYouAdminNeedsToActivateYourMembership)
'If email is on then place a re-send activation email link
ElseIf blnEmailActivation AND blnLoggedInUserEmail Then
Response.Write("<br /><br /><a href=""javascript:winOpener('resend_email_activation.asp" & strQsSID1 & "','actMail',1,1,475,300)"">" & strTxtResendActivationEmail & "</a>")
End If
End If
'Else if the forum is locked display a message telling the user so
ElseIf blnForumLocked Then
Response.Write(strTxtForumLockedByAdmim)
'Display message if the topic is locked
ElseIf blnTopicLocked Then
Response.Write(strTxtSorryNoReply & "<br />" & strTxtThisTopicIsLocked)
'Else if the user does not have permision to reply in this forum
ElseIf blnReply = False AND intGroupID <> 2 Then
Response.Write(strTxtSorryYouDoNotHavePerimssionToReplyToPostsInThisForum & "<br /><br />")
Response.Write("<a href=""javascript:history.back(1)"">" & strTxtReturnForumTopic & "</a>")
'Display message if this is a poll only
ElseIf blnPollNoReply Then
Response.Write(strTxtThisIsAPollOnlyYouCanNotReply & "<br /><br />")
Response.Write("<a href=""javascript:history.back(1)"">" & strTxtReturnForumTopic & "</a>")
'Else the user doesn't have permission to reply in this forum
Else
Response.Write(strTxtSorryYouDoNotHavePerimssionToReplyToPostsInThisForum )
End If
%></td>
</tr>
</table><%
'If the user can needs to login display login box
If blnReply = False AND intGroupID = 2 AND blnActiveMember AND blnForumLocked = false AND blnTopicLocked = false AND blnBanned = False Then
%><!--#include file="includes/login_form_inc.asp" --><%
End If
End If
'Clean up
Call closeDatabase()
%>
<br />
<div align="center"><%
'***** START WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ******
If blnLCode = True Then
If blnTextLinks = True Then
Response.Write("<span class=""text"" style=""font-size:10px"">Bulletin Board Software by <a href=""http://www.webwizforums.com"" target=""_blank"" style=""font-size:10px"">Web Wiz Forums®</a> version " & strVersion & "</span>")
Else
Response.Write("<a href=""http://www.webwizforums.com"" target=""_blank""><img src=""webwizforums_image.asp"" border=""0"" title=""Bulletin Board Software by Web Wiz Forums® version " & strVersion& """ alt=""Bulletin Board Software by Web Wiz Forums® version " & strVersion& """ /></a>")
End If
Response.Write("<br /><span class=""text"" style=""font-size:10px"">Copyright ©2001-2008 <a href=""http://www.webwizguide.com"" target=""_blank"" style=""font-size:10px"">Web Wiz</a></span>")
End If
'***** END WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ******
'Display the process time
If blnShowProcessTime Then Response.Write "<span class=""smText""><br /><br />" & strTxtThisPageWasGeneratedIn & " " & FormatNumber(Timer() - dblStartTime, 3) & " " & strTxtSeconds & "</span>"
%>
</div>
<!-- #include file="includes/footer.asp" -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -