Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Javascript Not Working
 New Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 27 April 2015 :  00:14:22  Show Profile  Reply with Quote
In the first file, neither the edit buttons nor the preview functions. In the second file (using the same includes), they do. Anyone have a clue?


<%
'#################################################################################
'## Copyright (C) 2000-15 Michael Anderson, Pierre Gorissen
'##                       Huw Reddick and Richard Kinser
'##
'## This program is free software; you can redistribute it and/or
'## modify it under the terms of the GNU General Public License
'## as published by the Free Software Foundation; either version 2
'## of the License, or any later version.
'##
'## All copyright notices regarding Snitz Forums 2000
'## must remain intact in the scripts and in the outputted HTML
'## The "powered by" text/logo with a link back to
'## http://forum.snitz.com in the footer of the pages MUST
'## remain visible when the pages are viewed on the internet or intranet.
'##
'## This program is distributed in the hope that it will be useful,
'## but WITHOUT ANY WARRANTY; without even the implied warranty of
'## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
'## GNU General Public License for more details.
'##
'## You should have received a copy of the GNU General Public License
'## along with this program; if not, write to the Free Software
'## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
'##
'## Support can be obtained from support forums at:
'## http://forum.snitz.com 
'##
'## Correspondence and Marketing Questions can be sent to:
'## reinhold@bigfoot.com
'##
'## or
'##
'## Snitz Communications
'## C/O: Michael Anderson
'## PO Box 200
'## Harpswell, ME 04079
'#################################################################################
%>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="includes/inc_header.asp" -->
<!--#INCLUDE FILE="includes/inc_func_member.asp" -->
<!--#INCLUDE FILE="includes/inc_func_posting.asp" -->
<!--#INCLUDE FILE="includes/inc_func_secure.asp" -->
<!--#INCLUDE FILE="includes/inc_sha256.asp"-->
<%
'	##	Google Spell Below
If intMod58	=	"1"	Then
	%>
	<!--#INCLUDE FILE="googiespell/inc_googie.asp" -->
	<%
End	If
'	##	Google Spell Above
Call ModCheck(intMod196)
If Session(strCookieURL & "Approval") <> "15916941253" Then
	scriptname = Split(Request.ServerVariables("SCRIPT_NAME"),"/")
	Response.Redirect "admin_login.asp?target=" & scriptname(ubound(scriptname)) & "?" & Request.ServerVariables("Query_String")
End If
If Request("SelectSize") > "" Then
	strSelectSize = Request("strSelectSize")
	Select Case strSelectSize
		Case "1"
			intCols = 50
			intRows = 12
		Case "2"
			intCols = 80
			intRows = 14
		Case "3"
			intCols = 90
			intRows = 16
		Case "4"
			intCols = 130
			intRows = 18
		Case Else
			intCols = 90
			intRows = 12
	End Select
Else
	intCols = 90
	intRows =12
End If
%>
<script language="JavaScript">
	<!--
	function OpenPreview()
		{
		var curCookie = "strMessagePreview=" + escape(document.PostTopic.Message.value);
		document.cookie = curCookie;
		popupWin = window.open('pop_preview.asp', 'preview_page', 'scrollbars=yes,width=750,height=450')
		}
	function openWindowHelp(url) {
		popupWin = window.open(url,'new_page','width=430,height=200')
		}
	function autoReload(objform)
		{
		var tmpCookieURL = '<%=strCookieURL%>';
		If (objform.SelectSize.value == 1)
			{
			document.PostTopic.Message.cols = 45;
			document.PostTopic.Message.rows = 6;
			}
		If (objform.SelectSize.value == 2)
			{
			document.PostTopic.Message.cols = 90;
			document.PostTopic.Message.rows = 14;
			}
		If (objform.SelectSize.value == 3)
			{
			document.PostTopic.Message.cols = 110;
			document.PostTopic.Message.rows = 16;
			}
		If (objform.SelectSize.value == 4)
			{
			document.PostTopic.Message.cols = 130;
			document.PostTopic.Message.rows = 18;
			}
		document.cookie = tmpCookieURL + "strSelectSize=" + objform.SelectSize.value
		}
	//-->
</script>
<%
If Request("save")= "yes" Then
	priorValue = Request.Form("hvName")
	newValue = Request.Form("cbName")
	If newValue = "" Then
		newValue = "0"
	End If
	If newValue <> priorValue Then
		active = newValue
	Else
		active = priorvalue
	End If
	If Request("action") <> "del" Then
		If Request.Form("Message") = "" Then
			Response.Write "<br /><br /><center><b><font color=""" & strDefaultFontColor & """>Submission Error!!</font><P>You need to post your article.</b></center><br /><br />"
		ElseIf Request.Form("question") = "" Then
			Response.Write "<br /><br /><center><b><font color=""" & strDefaultFontColor & """>Submission Error!!</font><P>You need post an article title.</b></center><br /><br />"
		ElseIf Request.Form("author") = "" Then
			Response.Write "<br /><br /><center><b><font color=""" & strDefaultFontColor & """>Submission Error!!</font><P>You need to submit an author's name.</b></center><br /><br />"
		End If
	End If
	 If Request.Form("author") <> "" and Request.Form("question") <> "" and Request.Form("Message") <> "" or Request("action") = "del" Then
		MethodType = Request("action")
		Select Case MethodType
			Case "new"
				strSql = "INSERT INTO " & strTablePrefix & "QUESTION ( CHAPTER_FLDAUTO, QUESTION, AUTHOR, POST_DATE, HEADER_ID, ANSWER, ORDERINGFIELD, SHOW, ADDED_BY)"
				strSql = strSql & " VALUES ( " & Request("chapter_fldAuto") & ", '" & ChkString(Request.Form("question"),"SQLString") & "', '" & Request.Form("author") & "', '" & Request.Form("PostDate") & "', 0, '" & ChkString(Request.Form("Message"),"SQLString") & "', 'ZZZZZZ', " & CInt(active) & ", " & Request.Form("POSTED_BY") & ")"
				my_Conn.Execute(strSql)
			Case "edit"
				sID = Request("fldAuto")
				If sID = "" Then
					sID = 0
				Else
					sID = CInt( sID)
				End If
				If Request("message") > "" Then
					msgTxt = ChkString(Request("Message"),"SQLString")
				End If
				msgTxt=Replace(msgTxt,"[np]","<NEWPAGE>")
				strSql = "UPDATE " & strTablePrefix & "QUESTION SET QUESTION = '" & ChkString(Request.Form("question"),"SQLString") & "', AUTHOR = '" & ChkString(Request.Form("author"),"SQLString") & "',  UPDATE_DATE = '" & ChkString(Request.Form("UpdateDate"),"SQLString") & "',  ANSWER = '" & msgTxt & "', SHOW = " & active & "  WHERE fldAuto = " & sID
				my_Conn.Execute(strSql),,adCmdText + adExecuteNoRecords
			Case "del"
				strSql = "DELETE FROM " & strTablePrefix & "QUESTION WHERE FLDAUTO = " & chkString(Request("fldAuto"), "SQLString") & ""
				my_Conn.Execute(strSql)
		End Select
		Response.Redirect "admin_questions.asp?chapter_fldAuto=" & Request("chapter_fldAuto")
	End If
End If
strPostDate=strtodate(Now())
strUpdateDate=strtodate(Now())
If Request("action") = "edit" Then
	If Request("fldAuto") > "" Then
		If IsNumeric(Request("fldAuto")) Then
			strFldAuto = CLng(Request("fldAuto"))
			strSql = "SELECT * FROM " & strTablePrefix & "question where fldAuto = " & strfldAuto
			Set rsCatName = my_Conn.Execute(strSql)
			If Not rsCatName.EOF Then
				name = RSCatName("question")
				strAuthor = RSCatName("author")
				strPostDate = strtodate(RSCatName("POST_DATE"))
				strUpdateDate = strtodate(RSCatName("UPDATE_DATE"))
				descr = RSCatName("answer")
				strHit = RSCatName("HIT")
				strRating = RSCatName("RATING")
				strVotes = RSCatName("VOTES")
				strShow = RSCatName("SHOW")
				strAdded_By = RSCatName("ADDED_BY")
				If RSCatName("SHOW") = "1" Then
					active = "1"
					chkd = " CHECKED "
				Else
					active = "0"
					chkd = ""
				End If
				If strVotes > 0 Then
					strRating = Round(strRating/strVotes)
				End If
				name = Replace(name, "  ", " ")
				name = Replace(name, """", "")
				strModeShow = "Editing "" & name & """
				descr=Replace(descr,"<NEWPAGE>","[np]")
				RSCatName.Close
			End If
			Set RSCatName = Nothing
		End If
	End If
Else
	strModeShow = "Posting a new article"
End If
If Request("chapter_fldAuto") <> "" Then
	If IsNumeric(Request("chapter_fldAuto")) Then
		nChapterID = cLng(Request("chapter_fldAuto"))
		strSql = "SELECT * FROM " & strTablePrefix & "CHAPTER WHERE fldAuto = " & nChapterID
	Else
		strSql = "SELECT *  FROM " & strTablePrefix & "CHAPTER WHERE fldAuto = " & Request("chapter_fldAuto")
	End If
Else
	strSql = "SELECT *  FROM " & strTablePrefix & "CHAPTER WHERE fldAuto = " & Request("chapter_fldAuto")
End If
Set oRSChapter = my_Conn.Execute (strSql)
If Not oRSChapter.EOF Then
	strCatName = oRSChapter("FAQ_name")
	oRSChapter.Close
End If
Set oRSChapter = Nothing
strCategory = chkString(Request("cat"),"SQLString")
strCategoryID = chkString(Request("catID"),"SQLString")
Response.Write	"<script language=""JavaScript"" type=""text/javascript"" src=""includes/inc_code.js""></script>" & vbNewLine & _
	"<script language=""JavaScript"" type=""text/javascript"" src=""js/selectbox.js""></script>" & vbNewLine & _
	"<table width=""100%"" cellpadding=""2"" cellspacing=""0"" border=""0"">" & vbNewLine & _
	"	<tr>" & vbNewLine & _
	"		<td nowrap align=""left"" vAlign=""middle"" bgColor=""transparent"">" & vbNewLine & _
	"			<font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """><b><a href=""default.asp"">Home</a> | <a href=""admin_home.asp"">Admin Console</a> | <a href=""admin_articles.asp"">Article Admin</a> > <a href=""admin_chapters.asp?faq_fldAuto="&strCategoryID&""">"&strCategory&"</a> | <a href=""admin_questions.asp?chapter_fldAuto="&nChapterID&""">"&strCatName&"</a> | "&strModeShow&"</b></font>" & vbNewLine & _
	"		</td>" & vbNewLine & _
	"	</tr>" & vbNewLine & _
	"</table><br />" & vbNewLine & _
	"<form action=""admin_question.asp?save=yes&"&Request.ServerVariables("Query_String")&""" name=""PostTopic"" method=""post""  onSubmit=""return validate();"">" & vbNewLine & _
	"	<input type=""hidden"" value=""" & active & """ name=""hvName"" />" & vbNewLine & _
	"	<input type=""hidden"" value=""" & Request("action") & """ name=""Method_Type"" />" & vbNewLine & _
	"	<input type=""hidden"" value=""" & MemberID & """ name=""POSTED_BY"" />" & vbNewLine & _
	"	<input type=""hidden"" value=""" & datetostr(Now()) & """ name=""PostDate"" />" & vbNewLine & _
	"	<input type=""hidden"" value=""" & datetostr(Now()) & """ name=""UpdateDate"" />" & vbNewLine & _
	"	<table bgColor=""transparent"" align=""center"" border=""0"" cellpadding=""3"" cellspacing=""0"">" & vbNewLine & _
	"		<tr>" & vbNewLine & _
	"			<td colspan=""2"" bgColor=""" & strPopUpTableColor & """ width=""100%"">" & vbNewLine & _
	"				<table align=""center"" border=""0"" cellpadding=""0"" cellspacing=""0"" width=""100%"">" & vbNewLine & _
	"					<tr>" & vbNewLine & _
	"						<td bgColor=""" & strPopUpTableColor & """ noWrap vAlign=""middle"" align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Screensize:</b></font></td>" & vbNewLine & _
	"						<td bgColor=""" & strPopUpTableColor & """>" & vbNewLine & _
	"							<font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
	"								<select name=""SelectSize"" size=""1"" tabindex=""-1"" onchange=""resizeTextarea()"">" & vbNewLine & _
	"									<option value=""1""" & CheckSelect(strSelectSize,"1") & "> 640 x  480</option>" & vbNewLine & _
	"									<option value=""2""" & CheckSelect(strSelectSize,"2") & "> 800 x  600</option>" & vbNewLine & _
	"									<option value=""3""" & CheckSelect(strSelectSize,"3") & ">1024 x  768</option>" & vbNewLine & _
	"									<option value=""4""" & CheckSelect(strSelectSize,"4") & ">1280 x 1024</option>" & vbNewLine & _
	"								</select>" & vbNewLine & _
	"							</font>" & vbNewLine & _
	"							<font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & strModeShow & " in <font color=""" & strHiLiteFontColor & """>" & strCatName & "</font></font>  " & vbNewLine
If Request("action") <> "new" Then
	Response.Write	"							<font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """> | <b>Hits: " & strHit & ", Rating: " & strRating & ", Votes:" & strVotes & "</b></font>" & vbNewLine
End If
Response.Write	"						</td>" & vbNewLine & _
	"					</tr>" & vbNewLine & _
	"					<tr>" & vbNewLine & _
	"						<td align=""right"">" & vbNewLine & _
	"							<font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Title:</b></font></td><td align=""left""><input type=""text"" name=""question"" size=""40"" value=""" & name & """ />  <b>Publish:</b><input type=""checkbox"" name=""cbName"" value=""1""" & ChkSelect(chkd,"1") & "> |"  & vbNewLine & _
	"					</tr>" & vbNewLine & _
	"					<tr>" & vbNewLine & _
	"						<td align=""right"">" & vbNewLine & _
	"							<font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Author:</b></font></td><td align=""left""><input type=""text"" name=""author"" size=""40"" value="""&strAuthor& """ />  <b>Date Posted:</b>" & formatdatetime(strPostDate, 2) & "   |   <b>Last Updated:</b> " & formatdatetime(strUpdateDate, 2) & vbNewLine
If Request("action") <> "new" Then
	Response.Write	" <b>Posted by:</b> " & GetMemberName(strAdded_By)
End If
Response.Write	"							</font>" & vbNewLine & _
	"						</td>" & vbNewLine & _
	"					</tr>" & vbNewLine
	%>
	<!--#INCLUDE FILE="includes/inc_post_buttons.asp" -->
	<%
	'	##	Crash's Callouts Below
	If intMod29 = "1" Then
		%>
		<!--#INCLUDE FILE="includes/inc_callouts_functions.asp" -->
		<%
	end if
	'	##	Crash's Callouts Above
Response.Write "								<tr>" & vbNewLine & _
	"									<td align=""left"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine
if strAllowHTML = "1" then
	Response.Write	"                * HTML is ON<br>" & vbNewLine
else
	Response.Write	"                * HTML is OFF<br>" & vbNewLine
end if
if strAllowForumCode = "1" then
	Response.Write	"                * <a href=""JavaScript:openWindow3('pop_forum_code.asp')"">Forum Code</a> is ON<br>" & vbNewLine
else
	Response.Write	"                * Forum Code is OFF<br>" & vbNewLine
end if
If strIcons = "1" and strShowSmiliesTable = "1" Then
	%>
	<!--#INCLUDE FILE="includes/inc_smilies.asp" -->
	<%
End If
Response.Write	"							</font>" & vbNewLine & _
	"						</td>" & vbNewLine & _
	"						<td bgColor=""" & strPopUpTableColor & """ width=""100%""><textarea cols=""" & intCols & """ name=""Message"" rows=""" & intRows & """ wrap=""VIRTUAL"" onselect=""storeCaret(this);"" onclick=""storeCaret(this);"" onkeyup=""storeCaret(this);"" onchange=""storeCaret(this);"">" & Trim(CleanCode(descr)) & "</textarea><br /></td>" & vbNewLine & _
	"					</tr>" & vbNewLine & _
	"				</table>" & vbNewLine & _
	"				<font face=""" & strDefaultFontFace & """ size=""1""><b>Note 1:  You can create multi-page articles by clicking the new page button where you want a page break.<br />Note 2:  If you only write an URL in the articletext, it will redirect  to that page.</b></font>" & vbNewLine & _
	"				<p align=""center""><input style=""color:" & strHeadFontColor & "; font-weight:bold; font-family:" & strDefaultFontFace & "; padding:3px 6px 3px 6px; border:1px solid " & strTableBorderColor & "; text-shadow:0px 1px 1px #000; text-decoration none; border-radius:25px; -moz-border-radius:25px; -webkit-border-radius:25px; background:" & strHeadCellColor & ";"" type=""Submit"" class=""button2"" name=""B1"" value=""Submit"" /> <input style=""color:" & strHeadFontColor & "; font-weight:bold; font-family:" & strDefaultFontFace & "; padding:3px 6px 3px 6px; border:1px solid " & strTableBorderColor & "; text-shadow:0px 1px 1px #000; text-decoration none; border-radius:25px; -moz-border-radius:25px; -webkit-border-radius:25px; background:" & strHeadCellColor & ";"" type=""Reset"" class=""button2"" name=""reset"" value=""Reset"" /> <input style=""color:" & strHeadFontColor & "; font-weight:bold; font-family:" & strDefaultFontFace & "; padding:3px 6px 3px 6px; border:1px solid " & strTableBorderColor & "; text-shadow:0px 1px 1px #000; text-decoration none; border-radius:25px; -moz-border-radius:25px; -webkit-border-radius:25px; background:" & strHeadCellColor & ";"" type=""Button"" name=""Preview"" value=""Preview"" onclick=""OpenPreview()"" /></font>" & vbNewLine & _
	"				 <a style=""text-decoration:none;"" href=""JavaScript:openWindow3('pop_Articleupload.asp')""><input style=""color:" & strHeadFontColor & "; font-weight:bold; font-family:" & strDefaultFontFace & "; padding:3px 6px 3px 6px; border:1px solid " & strTableBorderColor & "; text-shadow:0px 1px 1px #000; text-decoration none; border-radius:25px; -moz-border-radius:25px; -webkit-border-radius:25px; background:" & strHeadCellColor & ";"" type=""Button"" class=""button2"" name=""upload"" value=""Upload Image"" /></A></font></td></p>" & vbNewLine & _
	"			</td>" & vbNewLine & _
	"		</tr>" & vbNewLine & _
	"	</table>" & vbNewLine & _
	"	<center><b>Back to <a href=""admin_questions.asp?chapter_fldAuto=" & nChapterID & """>( " & strCatName & " )</a> | <a href=""admin_chapters.asp?faq_fldAuto=" & strCategoryID & """>(" & strCategory & ")</a> | <a href=""admin_articles.asp"">Article Admin</a></b></center>" & vbNewLine & _
	"</form><br />" & vbNewLine
WriteFooter
%>





<%
'#################################################################################
'## Copyright (C) 2000-14 Michael Anderson, Pierre Gorissen
'##                       Huw Reddick and Richard Kinser
'##
'## This program is free software; you can redistribute it and/or
'## modify it under the terms of the GNU General Public License
'## as published by the Free Software Foundation; either version 2
'## of the License, or any later version.
'##
'## All copyright notices regarding Snitz Forums 2000
'## must remain intact in the scripts and in the outputted HTML
'## The "powered by" text/logo with a link back to
'## http://forum.snitz.com in the footer of the pages MUST
'## remain visible when the pages are viewed on the internet or intranet.
'##
'## This program is distributed in the hope that it will be useful,
'## but WITHOUT ANY WARRANTY; without even the implied warranty of
'## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
'## GNU General Public License for more details.
'##
'## You should have received a copy of the GNU General Public License
'## along with this program; if not, write to the Free Software
'## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
'##
'## Support can be obtained from support forums at:
'## http://forum.snitz.com 
'##
'## Correspondence and Marketing Questions can be sent to:
'## reinhold@bigfoot.com
'##
'## or
'##
'## Snitz Communications
'## C/O: Michael Anderson
'## PO Box 200
'## Harpswell, ME 04079
'#################################################################################
'##       Part of the Private Messages MOD for Snitz Forums 2000 v3.4.04        ##
'#################################################################################
%>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="includes/inc_header.asp" -->
<!--#INCLUDE FILE="includes/inc_func_member.asp" -->
<!--#INCLUDE FILE="includes/inc_func_posting.asp" -->
<!--#INCLUDE FILE="includes/inc_func_secure.asp" -->
<!--#INCLUDE FILE="includes/inc_sha256.asp"-->
<%
'	##	Google Spell Below
If intMod58	=	"1"	Then
	%>
	<!--#INCLUDE FILE="googiespell/inc_googie.asp" -->
	<%
End	If
'	##	Google Spell Above
Call ModCheck(intMod109)
'#################################################################################
'## Initialize variables
'#################################################################################
strRqMethod = Request.QueryString("method")
strCkPassWord = Request.Cookies(strUniqueID & "User")("Pword")
strPMID = cLng(Request.QueryString("id"))
'#################################################################################
'## Page-code start
'#################################################################################
if strDBNTUserName = "" then
	Response.Redirect "default.asp"
	Response.End
end if

	if strDBType = "access" then
		strSqL = "SELECT count(M_TO) as [pmtotal] FROM " & strTablePrefix & "PM P," & strMemberTablePrefix & "MEMBERS M WHERE M.M_NAME = '" & strDBNTUserName & "' AND M.MEMBER_ID = P.M_TO"
	else
        	strSqL = "SELECT count(M_TO) as pmtotal FROM " & strTablePrefix & "PM P," & strMemberTablePrefix & "MEMBERS M WHERE M.M_NAME = '" & strDBNTUserName & "' AND M.MEMBER_ID = P.M_TO"
    end if

	
	Set rsPM = my_Conn.Execute(strSql)
	pmtotal = rsPM("pmtotal")
	
	rsPM.close
	set rsPM = nothing

If pmtotal = strPMLimit or pmtotal > strPMLimit and mlev < 3 then
		Response.Write ("<center><font face=""" & strDefaultFontFace & """ color=""" & StrHiLiteFontColor & """ size=""" & strDefaultFontSize & """>You have reached your private message limit of " & strPMLimit & ".<br>To send further private messages you must clean your Inbox.</font></center><br><br>")
		Response.Write ("<center><font face=""" & strDefaultFontFace & """ color=""" & StrDefaultFontColor & """ size=""" & strDefaultFontSize & """><a href=""pm_view.asp"">Return To Your Inbox</a></font></center>")
else

%>
<script language="JavaScript">
<!--
function OpenPreview()
{
	var curCookie = "strMessagePreview=" + escape(document.PostTopic.Message.value);
	document.cookie = curCookie;
	popupWin = window.open('pop_preview.asp', 'preview_page', 'scrollbars=yes,width=750,height=450')
}
function openWindowHelp(url) {
  popupWin = window.open(url,'new_page','width=430,height=200')
}
//-->
</script>
<% 
if strRqMethod = "" then
	strRqMethod = "Topic"
end if
if strRqMethod = "Reply" or _
strRqMethod = "ReplyQuote" or _
strRqMethod = "Forward" then
	'## Forum_SQL
	strSql = "SELECT * "
	strSql = strSql & " FROM " & strTablePrefix & "PM "
	strSql = strSql & " WHERE " & strTablePrefix & "PM.M_ID = " & strPMID

	set rs = my_Conn.Execute (strSql)

	if MemberID <> rs("M_TO") then
		rs.close
		set rs = nothing
		Response.Redirect("default.asp")
		Response.End
	end if
	if strRqMethod = "ReplyQuote" then
		TxtMsg = "quote:" & vbCrLf
		TxtMsg = TxtMsg & rs("M_MESSAGE") & vbCrLf
		TxtMsg = TxtMsg & ""
	end if
	if strRqMethod = "Forward" then
		TxtMsg = "----- Forwarded Message -----" & vbCrLf
		TxtMsg = TxtMsg & rs("M_MESSAGE") & vbCrLf
		TxtMsg = TxtMsg & "-----------------------------"
	end if
	rs.close
	set rs = nothing
end if

Response.Write	"    <script language=""JavaScript"" type=""text/javascript"" src=""includes/inc_code.js""></script>" & vbNewLine & _
				"    <script language=""JavaScript"" type=""text/javascript"" src=""javascript/selectbox.js""></script>" & vbNewLine

Response.Write	"<table border=""0"" width=""100%"" align=""center"">" & vbNewLine & _
		"  <tr>" & vbNewLine & _
		"    <td width=""33%"" align=""left"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
		"    " & getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""") & " <a href=""default.asp"">All Forums</a><br>" & vbNewLine & _
		"    " & getCurrentIcon(strIconBar,"","") & getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""") & " <a href=""pm_view.asp"">Private Messages</a><br>" & vbNewLine & _
		"    " & getCurrentIcon(strIconBlank,"","align=""absmiddle""") & getCurrentIcon(strIconBar,"","") & getCurrentIcon(strIconFolderOpenTopic,"","") & " Send Private Message<br></font></td>" & vbNewLine & _
		"  </tr>" & vbNewLine & _
		"</table>" & vbNewLine

Response.Write    " <table border=""0"" width=""800px;"" align=""center"" cellspacing=""0"" cellpadding=""1"" bgcolor=""" & strTableBorderColor & """>" & vbNewLine & _
			" <tr>" & vbNewLine & _
  			" <td width=""100%"">" & vbNewLine & _
      		" <table border=""0"" width=""100%"" bgcolor=""" & strPopUpTableColor & """ cellspacing=""0"" cellpadding=""0"">"  & vbNewLine & _
			" <tr>" & vbNewLine & _
  			" <td width=""50%"" align=""center"">" & vbNewLine
	If pmtotal = strPMLimit or pmtotal > strPMLimit then
		Response.Write ("<center><b><font face=""" & strDefaultFontFace & """ color=""" & StrHiLiteFontColor & """ size=""" & strFooterFontSize & """>You have reached your private message limit of " & strPMLimit & ".<br>To send further private messages you must clean your Inbox.</font></center>")
	else
		Response.Write ("<center><b><font face=""" & strDefaultFontFace & """ color=""" & strDefaultFontColor & """ size=""" & strFooterFontSize & """>You currently have " & pmtotal & " saved private messages.<br>Your Inbox limit is " & strPMLimit & ".<br>Please delete your messages once you have read them.</font></center>")
	end if
Response.Write 	" </td>" & vbNewLine & _
			" <td width=""50%"" align=""right"">" & vbNewLine
	if Request.Cookies(strCookieURL & "paging")("OUTBOX") = "double" and Request.QueryString("view") <> "outbox" then Response.Write ("<a href=""pm_view.asp?view=outbox"">" & getCurrentIcon(strIconPmoutbox,"Outbox","hspace=""0""") & "</a>")
	if Request.Cookies(strCookieURL & "paging")("OUTBOX") = "double" and Request.QueryString("view") = "outbox" then Response.Write ("<a href=""pm_view.asp"">" & getCurrentIcon(strIconPminbox,"Inbox","hspace=""0""") & "</a>")
	If pmtotal < strPMLimit or mLev > 2 then
	Response.Write	("<a href=""privatesend.asp?method=Topic"">" & getCurrentIcon(strIconPmnewBig,"Write a New Message","hspace=""0""") & "</a>")
	end if		
	Response.Write "<a href=""pm_view.asp"">" & getCurrentIcon(strIconPmreceive,"Check for New Messages","hspace=""0""") & "</a><a href=""members.asp"">" & getCurrentIcon(strIconPmmemberlist,"Browse the Memberlist","hspace=""0""") & "</a><a href=""pm_options.asp"">" & getCurrentIcon(strIconPmprivpref,"Set Your Private Message Preferences","hspace=""0""") & "</a><a href=""pm_blocklist.asp"">" & getCurrentIcon(strIconPmblocklist,"View Your Blocked List","hspace=""0""") & "</a></td>" & vbNewLine & _
			" </tr>" & vbNewLine & _
			" </table>" & vbNewLine & _
			" </td>" & vbNewLine & _
			" </tr>" & vbNewLine & _
			" </table>" & vbNewLine & _
			" <table border=""0"" cellspacing=""0"" cellpadding=""0"">" & vbNewLine & _
			" <tr>" & vbNewLine & _
			" <td height=""10"">" & vbNewLine & _
			" </td>" & vbNewLine & _
			" </tr>" & vbNewLine & _
			" </table>" & vbNewLine

Response.Write	"<table border=""0"" width=""800px;"" cellspacing=""0"" cellpadding=""0"" align=center>" & vbNewLine & _
		"  <tr>" & vbNewLine & _
		"    <td bgcolor=""" & strPopUpBorderColor & """>" & vbNewLine
Response.Write	"<form action=""privatesend_info.asp"" method=""post"" name=""PostTopic"" onSubmit=""return validate();"">" & vbNewLine & _
		"<input name=""Method_Type"" type=""hidden"" value=""" & strRqMethod & """>" & vbNewLine & _
		"<input name=""id"" type=""hidden"" value=""" & cLng(Request.QueryString("id")) & """>" & vbNewLine & _
		"<input name=""Refer"" type=""hidden"" value=""" & Request.ServerVariables("HTTP_REFERER") & """>" & vbNewLine & _
		"<input name=""UserName"" type=""hidden"" Value=""" & strDBNTUserName & """>" & vbNewLine & _
		"<input name=""Password"" type=""hidden"" value=""" & strCkPassWord & """>" & vbNewLine & _
		"      <table width=""100%"" border=""0"" cellspacing=""1"" cellpadding=""1"">" & vbNewLine

if strRqMethod = "Topic" or strRqMethod = "Forward" then
%>
	<script language="JavaScript">
	<!-- hide from JavaScript-challenged browsers
	function pmmembers() { var MainWindow = window.open ("pm_pop_members.asp", "","toolbar=no,location=no,menubar=no,scrollbars=yes,width=250,height=500,top=100,left=100,resizeable=yes,status=no");
	}
	// done hiding -->
	</script>
<%
	Response.Write	"        <tr>" & vbNewLine & _
			"          <td bgColor=""" & strPopUpTableColor & """ noWrap vAlign=""top"" align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Send to:</b>"
	Response.Write	"</font></td>" & vbNewLine & _
			"          <td bgColor=""" & strPopUpTableColor & """><input maxLength=""50"" name=""sendto"" value=""" & Request.Querystring("mname") & """ size=""50""> <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><a href=""members.asp"">Memberlist</a> "
	if strRqMethod <> "Forward" then Response.Write ("<br>(Separate member names with a comma for multiple recipients.)")

	if (mLev > 0) and strRqMethod <> "Forward" then Response.Write ("<br><input type=""checkbox"" name=""allmods"" value=""true""><b>ALERT MODERATORS</b> (Send Message to all Moderators)<br>") '# All Moderators PM Modification
	if (mLev > 3) and strRqMethod <> "Forward" then Response.Write ("<input type=""checkbox"" name=""allmem"" value=""true"">Send Message to all Members<br>") '# All Member PM Modification
	Response.Write	"</font></td>" & vbNewLine & _
			"        </tr>" & vbNewLine
end if
 
if strAllowForumCode = 1 then
	%>
	<!--#INCLUDE FILE="includes/inc_post_buttons.asp" -->
	<%
	'	##	Crash's Callouts Below
	If intMod29 = "1" Then
		%>
		<!--#INCLUDE FILE="includes/inc_callouts_functions.asp" -->
		<%
	end if
	'	##	Crash's Callouts Above
end if
if strRqMethod = "Topic" then
	Response.Write	"        <tr>" & vbNewLine & _
			"          <td bgColor=""" & strPopUpTableColor & """ noWrap vAlign=""top"" align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Subject:</b></font></td>" & vbNewLine & _
			"          <td bgColor=""" & strPopUpTableColor & """><input maxLength=""50"" name=""Subject"" value=""" & Trim(ChkString(TxtSub,"display")) & """ size=""50""></td>" & vbNewLine & _
			"        </tr>" & vbNewLine
end if
Response.Write	"        <tr>" & vbNewLine & _
		"          <td bgColor=""" & strPopUpTableColor & """ noWrap vAlign=""top"" align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Message:</b><br>" & vbNewLine & _
		"          <br />" & vbNewLine & _
		"            <table border=""0"">" & vbNewLine & _
		"              <tr>" & vbNewLine & _
		"                <td align=""left"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine
if strAllowHTML = "1" then
	Response.Write	"                * HTML is ON<br>" & vbNewLine
else
	Response.Write	"                * HTML is OFF<br>" & vbNewLine
end if
if strAllowForumCode = "1" then
	Response.Write	"                * <a href=""JavaScript:openWindow3('pop_forum_code.asp')"">Forum Code</a> is ON<br>" & vbNewLine
else
	Response.Write	"                * Forum Code is OFF<br>" & vbNewLine
end if

	if strIcons = "1" and strShowSmiliesTable = "1" then
		if strRqMethod = "Edit" or strRqMethod = "EditTopic" or _
			strRqMethod = "Reply" or strRqMethod = "ReplyQuote" or _
			strRqMethod = "Topic" or strRqMethod = "TopicQuote" or _
			strRqMethod = "Forward" then 
%>
<!--#INCLUDE FILE="includes/inc_smilies.asp" -->
<%
		end if
	end if
Response.Write	"                </font></td>" & vbNewLine & _
		"              </tr>" & vbNewLine & _
		"            </table>" & vbNewLine & _
		"          </font></td>" & vbNewLine & _
		"          <td align=""center"" bgColor=""" & strPopUpTableColor & """><textarea style=""width:98%; align:center;"" cols=""45"" name=""Message"" rows=""12"" wrap=""VIRTUAL"" onselect=""storeCaret(this);"" onclick=""storeCaret(this);"" onkeyup=""storeCaret(this);"" onchange=""storeCaret(this);"">" & Trim(CleanCode(TxtMsg)) & "</textarea></td>" & vbNewLine & _
		"        </tr>" & vbNewLine & _
		"      </table>" & vbNewLine & _
		"    </td>" & vbNewLine & _
		"  </tr>" & vbNewLine & _
		"        <tr>" & vbNewLine & _
		"          <td align=""center""><input style=""color:" & strHeadFontColor & "; font-weight:bold; font-family:" & strDefaultFontFace & "; font-size:1; padding:3px 6px 3px 6px; border:1px solid " & strTableBorderColor & "; text-shadow:0px 1px 1px #000; text-decoration none; border-radius:25px; -moz-border-radius:25px; -webkit-border-radius:25px; background:" & strHeadCellColor & ";"" type=""Submit"" class=""button2"" name=""submit"" value=""Send"" /><input style=""color:" & strHeadFontColor & "; font-weight:bold; font-family:" & strDefaultFontFace & "; font-size:1; padding:3px 6px 3px 6px; border:1px solid " & strTableBorderColor & "; text-shadow:0px 1px 1px #000; text-decoration none; border-radius:25px; -moz-border-radius:25px; -webkit-border-radius:25px; background:" & strHeadCellColor & ";"" type=""Button"" name=""Preview"" value=""Preview"" onclick=""OpenPreview()"" /> <input style=""color:" & strHeadFontColor & "; font-weight:bold; font-family:" & strDefaultFontFace & "; font-size:1; padding:3px 6px 3px 6px; border:1px solid " & strTableBorderColor & "; text-shadow:0px 1px 1px #000; text-decoration none; border-radius:25px; -moz-border-radius:25px; -webkit-border-radius:25px; background:" & strHeadCellColor & ";"" type=""Reset"" class=""button2"" name=""reset"" value=""Reset"" /></td>" & vbNewLine & _
		"        </tr>" & vbNewLine & _
		"</table>" & vbNewLine & _
		"</form>" & vbNewLine

if strRqMethod = "Reply" or _
strRqMethod = "Forward" or _
strRqMethod = "ReplyQuote" then
	Response.Write	"<center>" & vbNewLine & _
			"<table bgcolor=""" & strPopUpBorderColor & """ border=""0"" width=""100%"" cellspacing=""1"" cellpadding=""4"">" & vbNewLine & _
			"  <tr>" & vbNewLine & _
			"    <td bgcolor=""" & strHeadCellColor & """ colspan=""2"" align=""center""><b><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strHeadFontColor & """>M E S S A G E      R E V I E W</font></b></td>" & vbNewLine & _
			"  </tr>" & vbNewLine

	'## Forum_SQL
	strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.M_NAME "
	strSql = strSql & ", " & strTablePrefix & "PM.M_MESSAGE "
	strSql = strSql & ", " & strTablePrefix & "PM.M_SUBJECT "
	strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS, " & strTablePrefix & "PM "
	strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strTablePrefix & "PM.M_FROM "
	strSql = strSql & " AND " & strTablePrefix & "PM.M_ID = " & strPMID

	set rs = my_Conn.Execute (strSql)

	Response.Write	"  <tr>" & vbNewLine & _
			"    <td bgcolor=""" & strForumFirstCellColor & """ valign=top width=""" & strTopicWidthLeft & """"
	if lcase(strTopicNoWrapLeft) = "1" then
		Response.Write " nowrap"
	end if
	Response.Write	"><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>" & ChkString(rs("M_NAME"),"display") & "</b></font></td>" & vbNewLine & _
			"    <td bgcolor=""" & strForumCellColor & """ valign=""top"" width=""" & strTopicWidthRight & """"
	if lcase(strTopicNoWrapRight) = "1" then
		Response.Write " nowrap"
	end if
	Response.Write	"><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Subject: " & chkString(rs("M_SUBJECT"),"display") & "</b><hr size=""" & strFooterFontSize & """>" & formatStr(rs("M_MESSAGE")) & "</font></td>" & vbNewLine & _
			"  </tr>" & vbNewLine & _
			"</table>" & vbNewLine
	rs.close
	set rs = nothing
end if
end if
Response.Write "<br>" & vbNewLine
WriteFooter
Response.End
%>

Edited by - Carefree on 27 April 2015 17:55:42

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 27 April 2015 :  06:06:33  Show Profile  Send ruirib a Yahoo! Message
Have you checked the javascript errors in the browser console? That should give you some clues.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 27 April 2015 :  08:23:15  Show Profile
Yeah, says document.PostTopic is undefined ... but it's using the exact same Javascript as the other that results in no errors. Driving me batty.
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 27 April 2015 :  09:40:51  Show Profile  Visit HuwR's Homepage
yes, but there doesn't appear to be a PostTopic form in your first set of code

MVC .net dev/test site | MVC .net running on Raspberry Pi
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 27 April 2015 :  09:42:10  Show Profile  Visit HuwR's Homepage
In your first block of code your form tag is not named PostTopic

MVC .net dev/test site | MVC .net running on Raspberry Pi
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 27 April 2015 :  16:21:59  Show Profile
Never saw that, HuwR - but it didn't help except it got rid of that error message. It still doesn't work with the change, no errors reported. Found it. The original author mixed the cases for the first letter of the form field "message", some upper, some lower. Making them all "Message" as well was the issue.

Edited by - Carefree on 27 April 2015 16:27:37
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.37 seconds. Powered By: Snitz Forums 2000 Version 3.4.07