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

📄 new_topic_form.asp

📁 简单的asp论坛源码系统,很适用于初学者!界面简洁,功能齐全
💻 ASP
📖 第 1 页 / 共 2 页
字号:


%>
<!-- #include file="includes/browser_page_encoding_inc.asp" -->
<title><% = strTxtPostNewTopic %></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 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 a subject
	if (formArea.subject.value==""){
		errorMsg += "\n\t<% = strTxtErrorTopicSubject %>";
	}
	
	//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><% Response.Write(strTxtPostNewTopic) %></h1></td>
 </tr>
</table><br /><%

 
 
'If the user has logged in then display the from to allow the user to post a new message
If (blnPost = True) AND blnActiveMember = True AND (blnForumLocked = False OR blnAdmin = True) Then
	
	'Update active users table array
	If blnActiveUsers Then saryActiveUsers = activeUsers(strTxtWritingNewPost, strForumName, "forum_topics.asp?FID=" & intForumID, 0)

	%>
<table cellspacing="1" cellpadding="3" class="tableBorder" align="center">
 <tr class="tableLedger">
  <td align="left"><% = strTxtPostNewTopic %></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(strTxtWritingNewPost & " [" & strTxtAccessDenied & "]", strForumName, "forum_topics.asp?FID=" & intForumID, 0)

%>
<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 = True Then
		
		Response.Write(strTxtForumLockedByAdmim)
	
	
	'Else if the user does not have permision to post in this forum
	ElseIf blnPost = False AND intGroupID <> 2 Then
		
		Response.Write(strTxtSorryYouDoNotHavePermissionToPostInTisForum & "<br /><br />")
		Response.Write("<a href=""javascript:history.back(1)"">" & strTxtReturnToDiscussionForum & "</a>")
	
	'Else the user is not logged in so let them know to login before they can post a message
	Else
		Response.Write(strTxtMustBeRegisteredToPost)
	End If


%></td>
  </tr>
</table><%

	'If the user can needs to login display login box
	If blnPost = False AND intGroupID = 2 AND blnActiveMember AND blnForumLocked = false AND blnBanned = False Then 
		%><!--#include file="includes/login_form_inc.asp" --><%
	End If

	
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 + -