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

📄 message_form_inc.asp

📁 简单的asp论坛源码系统,很适用于初学者!界面简洁,功能齐全
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%
'****************************************************************************************
'**  Copyright Notice    
'**
'**  Web Wiz Forums(TM)
'**  http://www.webwizforums.com
'**                            
'**  Copyright (C)2001-2008 Web Wiz(TM). All Rights Reserved.
'**  
'**  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS UNDER LICENSE FROM 'WEB WIZ'.
'**  
'**  IF YOU DO NOT AGREE TO THE LICENSE AGREEMENT THEN 'WEB WIZ' IS UNWILLING TO LICENSE 
'**  THE SOFTWARE TO YOU, AND YOU SHOULD DESTROY ALL COPIES YOU HOLD OF 'WEB WIZ' SOFTWARE
'**  AND DERIVATIVE WORKS IMMEDIATELY.
'**  
'**  If you have not received a copy of the license with this work then a copy of the latest
'**  license contract can be found at:-
'**
'**  http://www.webwizguide.com/license
'**
'**  For more information about this software and for licensing information please contact
'**  'Web Wiz' at the address and website below:-
'**
'**  Web Wiz, Unit 10E, Dawkins Road Industrial Estate, Poole, Dorset, BH15 4JD, England
'**  http://www.webwizguide.com
'**
'**  Removal or modification of this copyright notice will violate the license contract.
'**
'****************************************************************************************



'*************************** SOFTWARE AND CODE MODIFICATIONS **************************** 
'**
'** MODIFICATION OF THE FREE EDITIONS OF THIS SOFTWARE IS A VIOLATION OF THE LICENSE  
'** AGREEMENT AND IS STRICTLY PROHIBITED
'**
'** If you wish to modify any part of this software a license must be purchased
'**
'****************************************************************************************



'If a private message go to pm post message page otherwise goto post message page
If strMode = "PM" Then
	strPostPage = "pm_new_message.asp" & strQsSID1

'If this is new post or poll post to new_post.asp page
ElseIf strMode = "new" OR  strMode = "poll" OR strMode = "reply" OR strMode = "QuickToFull" OR strMode = "quote" Then
	strPostPage = "new_post.asp?PN=" & Trim(Mid(Request.Querystring("PN"), 1, 3)) & strQsSID2

'Else this must be an edit
Else
	strPostPage = "edit_post.asp?PN=" & Trim(Mid(Request.Querystring("PN"), 1, 3)) & strQsSID2
End If

%>
<form method="post" name="frmMessageForm" id="frmMessageForm" action="<% = strPostPage %>" onSubmit="return CheckForm();" onReset="return clearForm();">
 <table cellspacing="0" cellpadding="2" align="center"><%


'If the poster is in a guest then get them to enter a name
If lngLoggedInUserID = 2 AND (strMode <> "edit" AND strMode <> "editTopic" AND strMode <> "editPoll") Then
%>
  <tr>
   <td align="right" width="15%"><% = strTxtName %>:</td>
   <td align="left" width="70%">
    <input type="text" name="Gname" id="Gname" size="20" maxlength="20" tabindex="1" />
   </td>
  </tr><%

End If




'If this is a private message display the username box
If strMode = "PM" Then
%>
  <tr>
   <td align="right" width="15%"><% = strTxtToUsername %>:</td>
   <td align="left"  width="70%"><%


         'Get the users buddy list if they have one

	'Initlise the sql statement
	strSQL = "SELECT " & strDbTable & "Author.Username " & _
	"FROM " & strDbTable & "Author" & strDBNoLock & ", " & strDbTable & "BuddyList" & strDBNoLock & " " & _
	"WHERE " & strDbTable & "Author.Author_ID=" & strDbTable & "BuddyList.Buddy_ID " & _
		"AND " & strDbTable & "BuddyList.Author_ID=" & lngLoggedInUserID & " AND " & strDbTable & "BuddyList.Buddy_ID <> 2 " & _
	"ORDER BY " & strDbTable & "Author.Username ASC;"

	'Query the database
	rsCommon.Open strSQL, adoCon
%>
    <input type="text" name="member" id="member" size="15" maxlength="25" value="<% = Server.HTMLEncode(strBuddyName) %>"<% If NOT rsCommon.EOF Then Response.Write(" onchange=""document.frmMessageForm.selectMember.options[0].selected = true;""") %> tabindex="2" />
    <a href="javascript:winOpener('pop_up_member_search.asp<% = strQsSID1 %>','memSearch',0,1,440,255)"><img src="<% = strImagePath %>member_search.<% = strForumImageType %>" alt="<% = strTxtMemberSearch %>" title="<% = strTxtMemberSearch %>" border="0" align="absmiddle"></a><%

	'If there are records returned then display the users buddy list
        If NOT rsCommon.EOF Then

	Response.Write(vbCrLf & "    " & strSelectFormBuddyList & ":" & _
	vbCrLf & "    <select name=""selectMember"" onchange=""member.value=''"" tabindex=""3"">" & _
	vbCrLf & "     <option value="""">-- " & strTxtNoneSelected & " --</option>")

          	'Loop throuhgn and display the buddy list
          	Do While NOT rsCommon.EOF

          		Response.Write(vbCrLf & "     <option value=""" & rsCommon("Username") & """>" & rsCommon("Username") & "</option>")

           		'Move to next record in rs
           		rsCommon.MoveNext
           	Loop

	Response.Write(vbCrLf & "    </select>")

	Else
		Response.Write(vbCrLf & "    <input type=""hidden"" name=""selectMember"" id=""selectMember"" value="""" />")
        End If

        'Reset server variables
	rsCommon.Close
%>
   </td>
  </tr><%

End If




'If this is a new post or editing the first thread then display the subject text box
If strMode = "new" OR strMode="editTopic" OR strMode = "editPoll" OR strMode = "PM" OR strMode = "poll" Then
%>
  <tr>
   <td align="right"><% = strTxtSubjectFolder %>:</td>
   <td align="left" width="70%">
    <input type="text" name="subject" id="subject" size="30" maxlength="50"<% If strMode="editTopic" OR strMode = "editPoll" OR strMode="PM" Then Response.Write(" value=""" & strTopicSubject & """") %> tabindex="2" /><%

        'If this is the forums moderator or forum admim then let them slect the priority level of the post
	If (blnAdmin OR blnPriority) AND (strMode = "new" or strMode="editTopic" OR strMode = "editPoll" OR strMode = "poll" or strMode = "editPoll") Then

		Response.Write("&nbsp;" & strTxtPinnedTopic & ":" & _
		vbCrLf & "    <select name=""priority"" id=""priority"" tabindex=""3""")
		If blnDemoMode Then Response.Write(" disabled=""disabled""")
		Response.Write(">" & _
		vbCrLf & "     <option value=""0""")
		If intTopicPriority = 0 Then Response.Write(" selected")
		Response.Write(">" & strTxtNormal & "</option>" & _
		vbCrLf & "     <option value=""1""")
		If intTopicPriority = 1 Then Response.Write(" selected")
		Response.Write(">" & strTxtPinnedTopic & "</option>")

         	'If this is the forum admin or moderator let them post an annoucment to this forum
         	If blnAdmin = True OR blnModerator Then

			Response.Write(vbCrLf & "     <option value=""2""")
			If intTopicPriority = 2 Then Response.Write(" selected")
			Response.Write(">" & strTopThisForum & "</option>")

        	End If

         	'If this is the forum admin let them post a priority post to all forums
         	If blnAdmin = True Then

			Response.Write(vbCrLf & "     <option value=""3""")
			If intTopicPriority = 3 Then Response.Write(" selected")
			Response.Write(">" & strTxtTopAllForums & "</option>")

		End If

		Response.Write("    </select>")

	End If
%>
   </td>
  </tr><%




	'Display message icon drop down
	If blnTopicIcon AND NOT strMode = "PM" Then

		'Get the topic icon array
		%><!--#include file="topic_icon_inc.asp" -->
  <tr>
   <td align="right" width="15%"><% = strTxtMessageIcon %>:</td>
   <td align="left" width="70%">
    <select name="icon" id="icon" onchange="(T_icon.src = icon.options[icon.selectedIndex].value)" tabindex="4">
     <option value="<% = strImagePath %>blank_smiley.gif"<% If strTopicIcon = "" Then Response.Write(" selected") %>><% = strTxtNoneSelected %></option><%

		'Loop through to display topic icons
		For intLoop = 1 TO Ubound(saryTopicIcon)

			Response.Write(vbCrLf & "     <option value=""" & saryTopicIcon(intLoop,2) & """")
			If strTopicIcon = saryTopicIcon(intLoop,2) Then Response.Write(" selected")
			Response.Write(">" & saryTopicIcon(intLoop,1) & "</option>")
		Next

		'If no topic Icon the get the default one
		If strTopicIcon = "" Then strTopicIcon = strImagePath & "blank_smiley.gif"
%>
    </select>
    &nbsp;&nbsp;<img src="<% = strTopicIcon %>" border="0" id="T_icon" alt"<% = strTxtMessageIcon %>" />
   </td>
  </tr><%

	End If


	'*************** Event Start *******************

	'Display Calendar event date input
	If blnCalendar AND blnEvents AND NOT strMode = "PM" Then
%>
  <tr>
   <td align="right" valign="top"><% = strTxtCalendarEvent %>:</td>
   <td align="left">
    <% = strTxtStartDate %>:
    <br />
    &nbsp;&nbsp;&nbsp;&nbsp;<% = strTxtDay %>
    <select name="eventDay" id="eventDay" tabindex="5">
     <option value="0"<% If intEventDay = 0 Then Response.Write(" selected") %>>----</option><%

		'Create lists day's for birthdays
		For intLoop = 1 to 31
			Response.Write(vbCrLf & "     <option value=""" & intLoop & """")
			If intEventDay = intLoop Then Response.Write(" selected")
			Response.Write(">" & intLoop & "</option>")
		Next

%>
    </select>
    <% = strTxtCMonth %>
    <select name="eventMonth" id="eventMonth" tabindex="6">
     <option value="0"<% If intEventMonth = 0 Then Response.Write(" selected") %>>---</option><%

		'Create lists of days of the month for birthdays
		For intLoop = 1 to 12
			Response.Write(vbCrLf & "     <option value=""" & intLoop & """")
			If intEventMonth = intLoop Then Response.Write(" selected")
			Response.Write(">" & intLoop & "</option>")
		Next

%>
    </select>
    <% = strTxtCYear %>
    <select name="eventYear" id="eventYear" tabindex="7">
     <option value="0"<% If intEventYear = 0 Then Response.Write(" selected") %>>-----</option><%

		'If this is an old event and the date is from a previous year, display that year
		If intEventYear <> 0 AND intEventYear < CInt(Year(Now())) Then Response.Write(VbCrLf & "     <option value=""" & intEventYear & """ selected>" & intEventYear & "</option>")

		'Create lists of years for birthdays
		For intLoop = CInt(Year(Now())) to CInt(Year(Now()))+1
			Response.Write(vbCrLf & "     <option value=""" & intLoop & """")
			If intEventYear = intLoop Then Response.Write(" selected")
			Response.Write(">" & intLoop & "</option>")
		Next

%>
    </select>
    <br />
    <% = strTxtEndDate %>: 
    <br />
    &nbsp;&nbsp;&nbsp;&nbsp;<% = strTxtDay %>
    <select name="eventDayEnd" id="eventDayEnd" tabindex="8"<% If blnDemoMode Then Response.Write(" disabled=""disabled""") %>>
     <option value="0"<% If intEventDayEnd = 0 Then Response.Write(" selected") %>>----</option><%

		'Create lists day's for birthdays
		For intLoop = 1 to 31
			Response.Write(vbCrLf & "     <option value=""" & intLoop & """")
			If intEventDayEnd = intLoop Then Response.Write(" selected")
			Response.Write(">" & intLoop & "</option>")
		Next

%>
    </select>
    <% = strTxtCMonth %>
    <select name="eventMonthEnd" id="eventMonthEnd" tabindex="9"<% If blnDemoMode Then Response.Write(" disabled=""disabled""") %>>
     <option value="0"<% If intEventMonthEnd = 0 Then Response.Write(" selected") %>>---</option><%

		'Create lists of days of the month for birthdays
		For intLoop = 1 to 12
			Response.Write(vbCrLf & "     <option value=""" & intLoop & """")
			If intEventMonthEnd = intLoop Then Response.Write(" selected")
			Response.Write(">" & intLoop & "</option>")
		Next

%>
    </select>
    <% = strTxtCYear %>
    <select name="eventYearEnd" id="eventYearEnd" tabindex="10"<% If blnDemoMode Then Response.Write(" disabled=""disabled""") %>>
     <option value="0"<% If intEventYear = 0 Then Response.Write(" selected") %>>-----</option><%

		'If this is an old event and the date is from a previous year, display that year
		If intEventYearEnd <> 0 AND intEventYearEnd < CInt(Year(Now())) Then Response.Write(VbCrLf & "     <option value=""" & intEventYearEnd & """ selected>" & intEventYearEnd & "</option>")

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -