⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 edit_post_form.asp

📁 简单的asp论坛源码系统,很适用于初学者!界面简洁,功能齐全
💻 ASP
📖 第 1 页 / 共 2 页
字号:
		Call closeDatabase()
		
		'Redirect to a page asking for the user to enter the forum password
		Response.Redirect("forum_password_form.asp?FID=" & intForumID & strQsSID3)
	End If
End If
	
'Close rs
rsCommon.close


'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 forums not locked check that the topics not locked either
If blnForumLocked = False Then blnForumLocked = blnTopicLocked


'Apply forum codes
strMessage = EditPostConvertion (strMessage)	

'If the message has been edited remove who edited the post
If InStr(1, strMessage, "<edited>", 1) Then strMessage = removeEditorAuthor(strMessage)
	




'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 & strTxtEditPost


%>
<!-- #include file="includes/browser_page_encoding_inc.asp" -->
<title><% = strTxtEditPost %></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 ******
%>

<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 we are editing the first topic then  check for a subject
If strMode = "editTopic" OR strMode = "editPoll" Then
%>	
	//Check for a subject
	if (formArea.subject.value==""){
		errorMsg += "\n\t<% = strTxtErrorTopicSubject %>";
	}<%
End If


'If we are editing a poll then check for poll question and choices
If strMode = "editPoll" Then
%>	

	//Check for poll question
	if (formArea.pollQuestion.value==""){
		errorMsg += "\n\t<% = strTxtErrorPollQuestion %>";
	}
	
	//Check for poll at least two poll choices
	if ((formArea.choice1.value=="") || (formArea.choice2.value=="")){
		errorMsg += "\n\t<% = strTxtErrorPollChoice %>";
	}<%
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 align="left"><h1><% = strTxtEditPost & ": " & strTopicSubject %></h1></td>
 </tr>
</table>
<br /><%
 
'If the Post is by the logged in user or the adminstrator/moderator then display a form to edit the post
If ((lngLoggedInUserID = lngPostUserID OR blnAdmin OR blnModerator) AND (blnEdit OR blnAdmin) AND (strMode="edit" OR strMode="editTopic" OR strMode = "editPoll")) AND blnActiveMember AND (blnForumLocked = False OR blnAdmin) AND (blnTopicLocked = False Or blnAdmin) Then

	'Update active users table array
	If blnActiveUsers Then saryActiveUsers = activeUsers(strTxtEditingPost, strTopicSubject, "forum_posts.asp?TID=" & lngTopicID, intForumID)

	%>
<table cellspacing="1" cellpadding="3" class="tableBorder" align="center">
 <tr class="tableLedger">
  <td align="left"><% = strTxtEditPost %></td>
 </tr>
 <tr class="tableRow">
  <td align="left">
   <!--#include file="includes/message_form_inc.asp" -->
  </td>
 </tr>
</table><%

'Else there is an error so show error table
Else

	'Update active users table array
	If blnActiveUsers Then saryActiveUsers = activeUsers(strTxtEditingPost & " [" & 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 /><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 /><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)
	
	'Else the user is not the person who posted the message so display an error message
	Else 
	   	Response.Write(strTxtNoPermissionToEditPost & "<br /><br />")
		Response.Write("<a href=""javascript:history.back(1)"">" & strTxtReturnForumTopic & "</a>")
	End If 
	
%></td>
  </tr>
</table>
<%
End If

'Clean up	
Call closeDatabase()


%><br />
<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&reg;</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&reg; version " & strVersion& """ alt=""Bulletin Board Software by Web Wiz Forums&reg; version " & strVersion& """ /></a>")
	End If
	
	Response.Write("<br /><span class=""text"" style=""font-size:10px"">Copyright &copy;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 + -