📄 forum_posts.asp
字号:
'If Gecko Madis API (RTE) need to strip default input from the API
If RTEenabled = "Gecko" Then Response.Write(vbCrLf & " //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 blnPost And 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><%
End If
%>
<link href="<% = strCSSfile %>default_style.css" rel="stylesheet" type="text/css" />
<!-- #include file="includes/header.asp" -->
<!-- #include file="includes/status_bar_header_inc.asp" -->
<a name="top"></a>
<table class="basicTable" cellspacing="0" cellpadding="5" align="center">
<tr>
<td><h1><%
'If the forum is locked show a locked pad lock icon
If blnForumLocked Then
Response.Write ("<img src=""" & strImagePath & "forum_lock." & strForumImageType & """ alt=""" & strTxtForumLocked & """ title=""" & strTxtForumLocked & """ style=""vertical-align: text-bottom"" />")
'If the topic is locked then have a locked icon
ElseIf blnTopicLocked Then
Response.Write ("<img src=""" & strImagePath & "topic_lock." & strForumImageType & """ alt=""" & strTxtTopicLocked & """ title=""" & strTxtTopicLocked & """ style=""vertical-align: text-bottom"" />")
End If
'If a calendar event then display so
If isDate(dtmEventDate) Then
Response.Write(strSubject & " - " & strTxtEventDate & ": " & stdDateFormat(dtmEventDate, False))
'If over multiple dates
If isDate(dtmEventDateEnd) Then Response.Write(" - " & stdDateFormat(dtmEventDateEnd, False))
Else
Response.Write(strSubject)
End If
%></h1></td>
</tr>
</table>
<table class="basicTable" cellspacing="0" cellpadding="3" align="center">
<tr>
<td>
<a href="new_reply_form.asp?TID=<% = lngTopicID %>&PN=<% = intTotalRecordsPages %>&TR=<% = intTotalRecords & strQsSID2 %>" title="<% = strTxtPostReply %>" class="largeButton" rel="nofollow"> <% = strTxtPostReply %> <img src="<% = strImagePath %>reply.<% = strForumImageType %>" border="0" alt="<% = strTxtPostReply %>" /></a>
</td>
<td align="right"><!-- #include file="includes/page_link_inc.asp" --></td>
</tr>
</table><%
'If there is a poll then display the poll include
If lngPollID > 0 Then
%><!--#include file="includes/poll_display_inc.asp" --><%
End If
'If there are posts display them
If intTotalRecords > 0 Then
%>
<table class="tableBorder" align="center" cellspacing="1" cellpadding="3" style="table-layout: fixed;">
<tr class="tableLedger">
<td style="width:140px;"><% = strTxtAuthor %></td>
<td>
<div style="float:left;"><a href="forum_posts.asp?TID=<% = lngTopicID %>&OB=DESC<% = strQsSID2 %>" title="<% = strTxtReverseSortOrder %>"><% = strTxtMessage %></a><% If strSortBy = "DESC" Then Response.Write(" <a href=""forum_posts.asp?TID=" & lngTopicID & "&OB=ASC" & strQsSID2 & """><img src=""" & strImagePath & strSortBy & "." & strForumImageType & """ title=""" & strTxtReverseSortOrder & """ alt=""" & strTxtReverseSortOrder & """ /></a>") %></div>
<div style="float:right;" class="downDropParent"><%
'Topic Search Link
Response.Write (" <span id=""SearchTopicLink"" onclick=""showDropDown('SearchTopicLink', 'dropDownTopicSearch', 230, 135);"" class=""dropDownPointer""><img src=""" & strImagePath & "search." & strForumImageType & """ alt=""" & strTxtTopic & " " & strTxtSearch & """ title=""" & strTxtTopic & " " & strTxtSearch & """ style=""vertical-align: text-bottom;"" /> " & strTxtTopic & " " & strTxtSearch & "</span>")
'Modertor Tools
If blnAdmin OR blnModerator Then
Response.Write(" <span id=""modTools"" onclick=""showDropDown('modTools', 'modToolsMenu', 120, 0);"" class=""dropDownPointer""><img src=""" & strImagePath & "moderator_tools." & strForumImageType & """ alt=""" & strTxtModeratorTools & """ title=""" & strTxtModeratorTools & """ style=""vertical-align: text-bottom"" /> " & strTxtModeratorTools & "</span>" & _
"<div id=""modToolsMenu"" class=""dropDownMenu"">" & _
"<a href=""pre_approved_topics.asp" & strQsSID1 & """><div>" & strTxtHiddenTopics & "</div></a>" & _
"<a href=""javascript:winOpener('pop_up_topic_admin.asp?TID=" & lngTopicID & strQsSID2 & "','admin',1,1,600,285)""><div>" & strTxtTopicAdmin & "</div></a>")
'Lock or un-lock forum if admin
If blnTopicLocked Then
Response.Write("<a href=""lock_topic.asp?mode=UnLock&TID=" & lngTopicID & strQsSID2 & """><div>" & strTxtUnLockTopic & "</div></a>")
Else
Response.Write("<a href=""lock_topic.asp?mode=Lock&TID=" & lngTopicID & strQsSID2 & """><div>" & strTxtLockTopic & "</div></a>")
End If
'Hide or show topic
If blnHideTopic = false Then
Response.Write("<a href=""lock_topic.asp?mode=Hide&TID=" & lngTopicID & strQsSID2 & """><div>" & strTxtHideTopic & "</div></a>")
Else
Response.Write("<a href=""lock_topic.asp?mode=Show&TID=" & lngTopicID & strQsSID2 & """><div>" & strTxtShowTopic & "</div></a>")
End If
Response.Write("<a href=""delete_topic.asp?TID=" & lngTopicID & "&PN=" & intRecordPositionPageNum & strQsSID2 & """ onclick=""return confirm('" & strTxtDeleteTopicAlert & "')""><div>" & strTxtDeleteTopic & "</div></a>")
Response.Write("</div>")
End If
'Topic Options drop down
Response.Write(" <span id=""topicOptions"" onclick=""")
'If we need a subscription link then include a call to the ajax function
If intGroupID <> 2 AND blnEmail AND blnLoggedInUserEmail AND blnActiveMember Then Response.Write("getAjaxData('ajax_email_notify.asp?TID=" & lngTopicID & "&PN=" & intRecordPositionPageNum & strQsSID2 & "', 'ajaxEmailSub');")
Response.Write("showDropDown('topicOptions', 'optionsMenu', 122, 26);"" class=""dropDownPointer""><img src=""" & strImagePath & "topic_options." & strForumImageType & """ alt=""" & strTxtTopicOptions & """ title=""" & strTxtTopicOptions & """ style=""vertical-align: text-bottom;"" /> " & strTxtTopicOptions & "</span>" & _
"<div id=""optionsMenu"" class=""dropDownMenu"">" & _
"<a href=""new_reply_form.asp?TID=" & lngTopicID & "&PN=" & intTotalRecordsPages & "&TR=" & intTotalRecords & strQsSID2 & """ rel=""nofollow""><div>" & strTxtPostReply & "</div></a>" & _
"<a href=""new_topic_form.asp?FID=" & intForumID & strQsSID2 & """ rel=""nofollow""><div>" & strTxtCreateNewTopic & "</div></a>")
If blnPollCreate Then Response.Write("<a href=""new_poll_form.asp?FID=" & intForumID & strQsSID2 & """ rel=""nofollow""><div>" & strTxtCreateNewPoll & "</div></a>")
Response.Write("<a href=""printer_friendly_posts.asp?TID=" & lngTopicID & strQsSID2 & """ target=""_blank"" rel=""nofollow""><div>" & strTxtPrintVersion & "</div></a>")
'Email Topic Option
If intGroupID <> 2 AND blnEmail AND blnActiveMember Then Response.Write("<a href=""javascript:winOpener('email_topic.asp?TID=" & lngTopicID & strQsSID2 & "','email_friend',0,1,440,480)""><div>" & strTxtEmailTopic & "</div></a>")
'Display option to subscribe or un-subscribe to topic
If intGroupID <> 2 AND blnEmail AND blnLoggedInUserEmail AND blnActiveMember Then Response.Write("<span id=""ajaxEmailSub""></span>")
%></div>
</td>
</tr><%
'Calculate the post number
intThreadNo = (intRecordPositionPageNum - 1) * intThreadsPerPage
'Do....While Loop to loop through the recorset to display the topic posts
Do While intCurrentRecord < intEndPosition
'If there are no post records left to display then exit loop
If intCurrentRecord >= intTotalRecords Then Exit Do
'Calculate the thread number
intThreadNo = intThreadNo + 1
'Initliase the unread post variable
blnUnreadPost = False
'SQL Query Array Look Up table
'0 = tblThread.Thread_ID,
'1 = tblThread.Message,
'2 = tblThread.Message_date,
'3 = tblThread.Show_signature,
'4 = tblThread.IP_addr,
'5 = tblThread.Hide,
'6 = tblAuthor.Author_ID,
'7 = tblAuthor.Username,
'8 = tblAuthor.Homepage,
'9 = tblAuthor.Location,
'10 = tblAuthor.No_of_posts,
'11 = tblAuthor.Join_date,
'12 = tblAuthor.Signature,
'13 = tblAuthor.Active,
'14 = tblAuthor.Avatar,
'15 = tblAuthor.Avatar_title,
'16 = tblGroup.Name,
'17 = tblGroup.Stars,
'18 = tblGroup.Custom_stars
'19 = tblGuestName.Name
'Read in threads details for the topic from the database
lngMessageID = CLng(sarryPosts(0,intCurrentRecord))
strMessage = sarryPosts(1,intCurrentRecord)
dtmPostDate = CDate(sarryPosts(2,intCurrentRecord))
strAuthorIP = sarryPosts(4,intCurrentRecord)
blnHidePost = CBool(sarryPosts(5,intCurrentRecord))
lngUserID = CLng(sarryPosts(6,intCurrentRecord))
strUsername = sarryPosts(7,intCurrentRecord)
strAuthorHomepage = sarryPosts(8,intCurrentRecord)
strAuthorLocation = sarryPosts(9,intCurrentRecord)
lngAuthorNumOfPosts = CLng(sarryPosts(10,intCurrentRecord))
dtmAuthorRegistration = CDate(sarryPosts(11,intCurrentRecord))
strAuthorSignature = sarryPosts(12,intCurrentRecord)
strAuthorAvatar = sarryPosts(14,intCurrentRecord)
strMemberTitle = sarryPosts(15,intCurrentRecord)
strGroupName = sarryPosts(16,intCurrentRecord)
intRankStars = CInt(sarryPosts(17,intCurrentRecord))
strRankCustomStars = sarryPosts(18,intCurrentRecord)
strGuestUsername = sarryPosts(19,intCurrentRecord)
'If there is a newer post than the last time the unread posts array was initilised run it again
If dtmPostDate > CDate(Session("dtmUnReadPostCheck")) Then Call UnreadPosts()
'Mark if this post has been read, if the unread posts array exists
If isArray(sarryUnReadPosts) AND dtmPostDate > dtmLastVisitDate Then
'Loop through the unread posts array
For intUnReadForumPostsLoop = 0 to UBound(sarryUnReadPosts,2)
'Mark the post as read
If CLng(sarryUnReadPosts(0,intUnReadForumPostsLoop)) = lngMessageID Then
If sarryUnReadPosts(3,intUnReadForumPostsLoop) = "1" Then blnUnreadPost = True
'mark post as read
sarryUnReadPosts(3,intUnReadForumPostsLoop) = "0"
'save back to session
'Save the array at applicion level
If isArray(Application("sarryUnReadPosts" & strSessionID)) Then
Application.Lock
Application("sarryUnReadPosts" & strSessionID) = sarryUnReadPosts
Application.UnLock
'save the array at session level
ElseIf isArray(Session("sarryUnReadPosts")) Then
Session("sarryUnReadPosts") = sarryUnReadPosts
End If
'Exit for to save some processing time
Exit For
End If
Next
End If
'Calculate the row colour
If intCurrentRecord MOD 2 = 0 Then
strPostTableRowClass = "msgEvenTableRow"
strPostTableSideClass = "msgEvenTableSide"
strPostTableTopClass = "msgEvenTableTop"
Else
strPostTableRowClass = "msgOddTableRow"
strPostTableSideClass = "msgOddTableSide"
strPostTableTopClass = "msgOddTableTop"
End If
'If this is a hidden post then change the row colour to highlight it
If blnHidePost Then strPostTableRowClass = "msgHiddenTableRow"
'If the poster is a guest see if they have entered their name in the GuestName table and get it
If lngUserID = 2 AND strGuestUsername <> "" Then strUsername = strGuestUsername
'If the post contains a quote or code block then format it
If InStr(1, strMessage, "[QUOTE=", 1) > 0 AND InStr(1, strMessage, "[/QUOTE]", 1) > 0 Then strMessage = formatUserQuote(strMessage)
If InStr(1, strMessage, "[QUOTE]", 1) > 0 AND InStr(1, strMessage, "[/QUOTE]", 1) > 0 Then strMessage = formatQuote(strMessage)
If InStr(1, strMessage, "[CODE]", 1) > 0 AND InStr(1, strMessage, "[/CODE]", 1) > 0 Then strMessage = formatCode(strMessage)
'If the Post or signature contains Flash or YouTube BBcodes then display them
If blnFlashFiles Then
'Flash
If InStr(1, strMessage, "[FLASH", 1) > 0 AND InStr(1, strMessage, "[/FLASH]", 1) > 0 Then strMessage = formatFlash(strMessage)
If InStr(1, strAuthorSignature, "[FLASH", 1) > 0 AND InStr(1, strAuthorSignature, "[/FLASH]", 1) > 0 Then strAuthorSignature = formatFlash(strAuthorSignature)
'YouTube
If InStr(1, strMessage, "[TUBE]", 1) > 0 AND InStr(1, strMessage, "[/TUBE]", 1) > 0 Then strMessage = formatYouTube(strMessage)
If InStr(1, strAuthorSignature, "[TUBE]", 1) > 0 AND InStr(1, strAuthorSignature, "[/TUBE]", 1) > 0 Then strMessage = formatYouTube(strAuthorSignature)
End If
'If the message has been edited parse the 'edited by' XML into HTML for the post
If InStr(1, strMessage, "<edited>", 1) Then strMessage = editedXMLParser(strMessage)
'Call the function to highlight search words if coming froma search page
If strSearchKeywords <> "" Then strMessage = searchHighlighter(strMessage, sarySearchWord)
'Calulate rowspan amount for table below side bar
If CBool(sarryPosts(3,intCurrentRecord)) AND strAuthorSignature <> "" Then
intPostRowsSpan = 3
Else
intPostRowsSpan = 2
End If
'If we are showing ads increase by 1
If intCurrentRecord = 0 AND (blnACode OR strMyGoogleAdSenseID <> "pub-9026955576675812") Then intPostRowsSpan = intPostRowsSpan + 1
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -