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
 Private Messages Members' List
 New Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 27 January 2016 :  00:39:34  Show Profile  Reply with Quote
I am populating the SendTo field of "privatesend.asp" using a hyperlink from a drop-down list of members; however, I would like it to APPEND the value separated with a comma if the field already contains data.

"privatesend.asp"

<%
'#################################################################################
'## Snitz Forums 2000 v3.4.07
'#################################################################################
'## 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 (at your option) any later version.
'##
'## All copyright notices regarding Snitz Forums 2000 must remain
'## intact in the scripts and in the HTML output.  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 Free Software Foundation, Inc.
'## 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
'##
'## Support can be obtained from our support forums at:
'## http://forum.snitz.com
'##
'## Correspondence and marketing questions can be sent to:
'## manderson@snitz.com
'##
'#################################################################################
'##       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)
strRqMethod = Request.QueryString("method")
strCkPassWord = Request.Cookies(strUniqueID & "User")("Pword")
strPMID = CLng(Request.QueryString("id"))
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)
If Not rsPM.EOF Then
	pmtotal = rsPM("pmtotal")
	rsPM.Close
End If
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"
	If strRqMethod = "Reply" Or strRqMethod = "ReplyQuote" Or strRqMethod = "Forward" Then
		strSql = "SELECT * FROM " & strTablePrefix & "PM WHERE " & strTablePrefix & "PM.M_ID = " & strPMID
		Set rs = my_Conn.Execute (strSql)
		If Not rs.EOF Then
			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 End If Set rs = Nothing End If Response.Write " <script language=""JavaScript"" type=""text/javascript"" src=""inc_code.js""></script>" & vbNewLine & _ " <script language=""JavaScript"" type=""text/javascript"" src=""js/selectbox.js""></script>" & vbNewLine & _ " <table border=""0"" width=""100%"" align=""center"" bgColor=""" & strPageBGColor & """>" & 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>" & vbNewLine & _ " </td>" & vbNewLine & _ " </tr>" & vbNewLine & _ " </table>" & vbNewLine & _ " <table border=""0"" width=""800px;"" align=""center"" cellspacing=""0"" cellpadding=""1"" bgcolor=""" & strPageBGColor & """>" & vbNewLine & _ " <tr>" & vbNewLine & _ " <td width=""100%"" bgcolor=""" & strTableBorderColor & """>" & 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"" target=""_blank"">" & 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>" & vbNewLine & _ " </td>" & vbNewLine & _ " </tr>" & vbNewLine & _ " </table>" & vbNewLine & _ " </td>" & vbNewLine & _ " </tr>" & vbNewLine & _ " </table>" & vbNewLine & _ " <table border=""0"" align=""center"" bgcolor=""" & strPageBGColor & """>" & vbNewLine & _ " <tr>" & vbNewLine & _ " <td style=""line-height:50%;""> </td>" & vbNewLine & _ " </tr>" & vbNewLine & _ " </table>" & vbNewLine & _ " <form id=""f1"" 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 border=""0"" width=""800px;"" cellspacing=""0"" cellpadding=""0"" bgcolor=""" & strPageBGColor & """ align=center>" & vbNewLine & _ " <tr>" & vbNewLine & _ " <td bgcolor=""" & strPopUpBorderColor & """>" & 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"">" & vbNewLine & _ " <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Send to:</b>" & vbNewLine & _ " </font>" & vbNewLine & _ " </td>" & vbNewLine & _ " <td bgColor=""" & strPopUpTableColor & """><input id=""m1"" maxLength=""50"" name=""sendto"" value=""" & Request.Querystring("mname") & """ size=""50"">" & vbNewLine & _ " <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" For i = 65 to 90 strLink = "pop_members.asp?M_NAME="& Chr(i) Response.Write "<a title=""Members starting with letter " & Chr(i) & """ style=""text-decoration:none;"" href=""Javascript:openWindow3('" & strLink & "')"">" & Chr(i) & "</a> " Next If strRqMethod <> "Forward" Then Response.Write "<br />(Separate member names with commas 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>" & vbNewLine & _ " </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>" & _ " </tr>" & vbNewLine End If Response.Write " <tr valign=""middle"">" & vbNewLine & _ " <td bgColor=""" & strPopUpTableColor & """ noWrap vAlign=""top"" align=""right"">" & vbNewLine & _ " <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Message:</b><br /></font>" & vbNewLine & _ " <table border=""0"">" & vbNewLine & _ " <tr>" & vbNewLine & _ " <td align=""left"" nowrap>" & vbNewLine & _ " <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>" & vbNewLine & _ " </td>" & vbNewLine & _ " </tr>" & vbNewLine & _ " </table>" & vbNewLine & _ " </td>" & vbNewLine & _ " <td align=""center"" bgColor=""" & strPopUpTableColor & """><textarea " ' ## Google Spell Below If intMod58 = "1" Then Response.Write "id=""Message"" class=""textarea""" End If ' ## Google Spell Above Response.Write " 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 bgColor=""" & strPageBGColor & """ align=""center"" style=""line-height:50%;""><br />" If intMod152 = "1" Then Response.Write " <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; font-weight:bold; text-decoration:none; border-radius:25px; -webkit-border-radius:25px; background-image:url(" & strImageURL & strHeadCellImage & "); background-size:100% 100%;"" type=""Submit"" class=""button2"" name=""submit"" value=""Send"" /> " & vbNewLine & _ " <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; font-weight:bold; text-decoration:none; border-radius:25px; -webkit-border-radius:25px; background-image:url(" & strImageURL & strHeadCellImage & "); background-size:100% 100%;"" type=""Button"" class=""button2"" name=""Preview"" value=""Preview"" onclick=""OpenPreview()"" /> " & vbNewLine & _ " <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; font-weight:bold; text-decoration:none; border-radius:25px; -webkit-border-radius:25px; background-image:url(" & strImageURL & strHeadCellImage & "); background-size:100% 100%;"" type=""Reset"" class=""button2"" name=""reset"" value=""Reset"" />" & vbNewLine ElseIf intMod67 = "1" Then Response.Write " <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; font-weight:bold; text-decoration:none; border-radius:25px; -webkit-border-radius:25px; background:linear-gradient("&strHColor&",white,"&strHColor&","&strHColor&","&strHColor&");"" type=""Submit"" class=""button2"" name=""submit"" value=""Send"" /> " & vbNewLine & _ " <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; font-weight:bold; text-decoration:none; border-radius:25px; -webkit-border-radius:25px; background:linear-gradient("&strHColor&",white,"&strHColor&","&strHColor&","&strHColor&");"" type=""Button"" class=""button2"" name=""Preview"" value=""Preview"" onclick=""OpenPreview()"" /> " & vbNewLine & _ " <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; font-weight:bold; text-decoration:none; border-radius:25px; -webkit-border-radius:25px; background:linear-gradient("&strHColor&",white,"&strHColor&","&strHColor&","&strHColor&");"" type=""Reset"" class=""button2"" name=""reset"" value=""Reset"" />" & vbNewLine Else Response.Write " <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; font-weight:bold; text-decoration:none; border-radius:25px; -webkit-border-radius:25px; background:"&strHColor&";"" type=""Submit"" class=""button2"" name=""submit"" value=""Send"" /> " & vbNewLine & _ " <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; font-weight:bold; text-decoration:none; border-radius:25px; -webkit-border-radius:25px; background:"&strHColor&";"" type=""Button"" class=""button2"" name=""Preview"" value=""Preview"" onclick=""OpenPreview()"" /> " & vbNewLine & _ " <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; font-weight:bold; text-decoration:none; border-radius:25px; -webkit-border-radius:25px; background:"&strHColor&";"" type=""Reset"" class=""button2"" name=""reset"" value=""Reset"" />" & vbNewLine End If Response.Write " </td>" & vbNewLine & _ " </tr>" & vbNewLine & _ " </table>" & vbNewLine & _ " </form><script type=""text/javascript""> var googie1 = new GoogieSpell(""googiespell/"", ""./googiespell/googie.asp?lang=""); googie1.decorateTextarea(""Message"");</script>" & vbNewLine If strRqMethod = "Reply" Or trRqMethod = "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 strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.M_NAME, " & strTablePrefix & "PM.M_MESSAGE, " & strTablePrefix & "PM.M_SUBJECT FROM " & strMemberTablePrefix & "MEMBERS, " & strTablePrefix & "PM WHERE " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strTablePrefix & "PM.M_FROM AND " & strTablePrefix & "PM.M_ID = " & strPMID Set rs = my_Conn.Execute (strSql) If Not rs.EOF Then 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 End If Set rs = Nothing End If End If Response.Write "<br />" & vbNewLine WriteFooter %>


"pop_members.asp"

<%
'#################################################################################
'## Snitz Forums 2000 v3.4.07
'#################################################################################
'## 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 (at your option) any later version.
'##
'## All copyright notices regarding Snitz Forums 2000 must remain
'## intact in the scripts and in the HTML output.  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 Free Software Foundation, Inc.
'## 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
'##
'## Support can be obtained from our support forums at:
'## http://forum.snitz.com
'##
'## Correspondence and marketing questions can be sent to:
'## manderson@snitz.com
'##
'#################################################################################
%>
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="includes/inc_header_short.asp" -->
<!--#INCLUDE FILE="includes/inc_func_member.asp" -->
<script type='text/javascript'>
	function loadParent() {
		pWindow = opener.window;
		pWindow.document.getElementById("m1").value = document.getElementById("mem1").value;
		window.close();
	}
</script>
<%
Response.Buffer = True
On Error Resume Next
If strDBNTUserName = "" Then Go_Result "Log in to view this page."
Response.Write	"      <script language=""JavaScript"" type=""text/javascript"">" & vbNewLine & _
	"      function ChangePage(fnum){" & vbNewLine & _
	"				document.PageNum1.submit();" & vbNewLine & _
	"				}" & vbNewLine & _
	"      </script>" & vbNewLine
mypage = Trim(chkString(Request("whichpage")))
If ((mypage = "") Or (IsNumeric(mypage) = False)) Then
	mypage = 1
End If
mypage = CLng(mypage)
If Len(Request("M_NAME")) = 1 Then
	strLike = "LEFT(M_NAME, 1)"
	SearchName = ChkString(Request("M_NAME"), "SQLString")
ElseIf Request("M_NAME") > "" Then
	strLike = "M_NAME"
	SearchName = ChkString(Request("M_NAME"), "SQLString")
Else
	strLike = "M_NAME"
	SearchName = ChkString(Request("M_NAME"), "SQLString")
	SearchNameDisplay = Server.HTMLEncode(SearchName)
	If SearchName <> "" Then
		If Not IsValidString(SearchName) Then Go_Result "Invalid Name"
	End If
End If
Response.Write	"						<table align=""center"" width=""100%"" bgColor=""" & strPageBGColor & """ border=""0"" cellpadding=""0"" cellspacing=""0"">" & vbNewLine & _
	"							<tr>" & vbNewLine & _
	"								<td width=""100%"" bgColor=""" & strTableBorderColor & """>" & vbNewLine & _
	"									<table align=""center"" width=""100%"" border=""1"" cellpadding=""4"" cellspacing=""0"" style=""border-collapse:collapse;"">" & vbNewLine & _
	"										<tr>" & vbNewLine & _
	"											<td align=""center"" colspan=""2"" width=""100%"" bgColor=""" & strHeadCellColor & """>" & vbNewLine & _
	"												<font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHeadFontColor & """><b>Member List</b></font>" & vbNewLine & _
	"											</td>" & vbNewLine & _
	"										</tr>" & vbNewLine & _
	"										<tr>" & vbNewLine & _
	"											<td align=""right"" width=""10%"" bgColor=""" & strForumCellColor & """>" & vbNewLine & _
	"												<font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strForumFontColor & """><b>Name:</b></font>" & vbNewLine & _
	"											</td>" & vbNewLine & _
	"											<td align=""left"" width=""90%"" bgColor=""" & strForumCellColor & """>" & vbNewLine & _
	"												<font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & vbNewLine & _
	"												<form id=""f0"" action=""pop_members.asp"" method=""post"">" & vbNewLine & _
	"													<input type=""text"" name=""M_NAME"" value=""" & Request("M_NAME") & """ /> "
If intMod152 = "1" Then
	Response.Write	"													<input style=""color:" & strHeadFontColor & "; font-family:" & strDefaultFontFace & "; padding:3px 6px 3px 6px; border:1px solid " & strTableBorderColor & "; text-shadow:0px 1px 1px #000; font-weight:bold; text-decoration:none; border-radius:25px; -webkit-border-radius:25px; background-image:url(" & strImageURL & strHeadCellImage & "); background-size:100% 100%;"" type=""Submit"" class=""button2"" name=""Search"" value=""Search"" />" & vbNewLine
ElseIf intMod67 = "1" Then
	Response.Write	"													<input style=""color:" & strHeadFontColor & "; font-family:" & strDefaultFontFace & "; padding:3px 6px 3px 6px; border:1px solid " & strTableBorderColor & "; text-shadow:0px 1px 1px #000; font-weight:bold; text-decoration:none; border-radius:25px; -webkit-border-radius:25px; background:linear-gradient("&strHColor&",white,"&strHColor&","&strHColor&","&strHColor&");"" type=""Submit"" class=""button2"" name=""Search"" value=""Search"" />" & vbNewLine
Else
	Response.Write	"													<input style=""color:" & strHeadFontColor & "; font-family:" & strDefaultFontFace & "; padding:3px 6px 3px 6px; border:1px solid " & strTableBorderColor & "; text-shadow:0px 1px 1px #000; font-weight:bold; text-decoration:none; border-radius:25px; -webkit-border-radius:25px; background:"&strHColor&";"" type=""Submit"" class=""button2"" name=""Search"" value=""Search"" />" & vbNewLine
End If
Response.Write	"												</form>" & vbNewLine & _
	"											</td>" & vbNewLine & _
	"										</tr>" & vbNewLine
strSql = "SELECT COUNT(M_ID) AS CNT FROM " & strMemberTablePrefix & "MEMBERS WHERE M_STATUS <> -1"
Set rsMC = my_Conn.Execute(strSql)
If Not rsMC.EOF Then
	intCount = rsMC("CNT")
	MaxPages = Int(intCount / 25)
	rsMC.Close
End If
Set rsMC = Nothing
strSql = "SELECT M_NAME FROM " & strMemberTablePrefix & "MEMBERS WHERE " & strLike & " LIKE '%" & SearchName & "%' ORDER BY M_NAME ASC"
Set rsName = my_Conn.Execute(strSql)
If Not rsName.EOF Then
	rsName.Move(myPage - 1) * 25
	intI = 0 : intR = 0
	Do While Not rsName.EOF
		If intI = 0 Then CColor = strForumFirstCellColor Else CColor = strForumCellColor
		intR = intR + 1
		If Not rsName.EOF Then
			Response.Write	"										<tr>" & vbNewLine & _
				"											<form id=""f1"" action=""pop_members.asp"" method=""post"">" & vbNewLine & _
				"												<td colspan=""2"" align=""left"" width=""100%"" bgColor=""" & CColor & """>" & vbNewLine
			If strLike = "M_NAME" Then
				Response.Write	"<a href=""#"" OnClick=""loadParent();"">"
			Else
				Response.Write	"<a href=""pop_members.asp?M_NAME=" & rsName("M_NAME")&""" OnClick=""this.form.submit();"">"
			End If
			If intMod152 = "1" Then
				Response.Write	"													<input id=""mem1"" style=""color:" & strHeadFontColor & "; font-family:" & strDefaultFontFace & "; padding:3px 6px 3px 6px; border:1px solid " & strTableBorderColor & "; text-shadow:0px 1px 1px #000; font-weight:bold; text-decoration:none; border-radius:25px; -webkit-border-radius:25px; background-image:url(" & strImageURL & strHeadCellImage & "); background-size:100% 100%;"" type=""Button"" class=""button2"" name=""M_NAME"" value=""" & rsName("M_NAME") & """ />" & vbNewLine
			ElseIf intMod67 = "1" Then
				Response.Write	"													<input id=""mem1"" style=""color:" & strHeadFontColor & "; font-family:" & strDefaultFontFace & "; padding:3px 6px 3px 6px; border:1px solid " & strTableBorderColor & "; text-shadow:0px 1px 1px #000; font-weight:bold; text-decoration:none; border-radius:25px; -webkit-border-radius:25px; background:linear-gradient("&strHColor&",white,"&strHColor&","&strHColor&","&strHColor&");"" type=""Button"" class=""button2"" name=""M_NAME"" value=""" & rsName("M_NAME") & """ />" & vbNewLine
			Else
				Response.Write	"													<input id=""mem1"" style=""color:" & strHeadFontColor & "; font-family:" & strDefaultFontFace & "; padding:3px 6px 3px 6px; border:1px solid " & strTableBorderColor & "; text-shadow:0px 1px 1px #000; font-weight:bold; text-decoration:none; border-radius:25px; -webkit-border-radius:25px; background:"&strHColor&";"" type=""Button"" class=""button2"" name=""M_NAME"" value=""" & rsName("M_NAME") & """ />" & vbNewLine
			End If
		Response.Write	"												</td>" & vbNewLine & _
				"											</form>" & vbNewLine & _
				"										</tr>" & vbNewLine
		Else
			Exit Do
		End If
		If intR = 25 Then Exit Do
		intI = 1 - intI
		rsName.MoveNext
	Loop
	rsName.Close
End If
Set rsName = Nothing
Response.Write	"									</table>" & vbNewLine & _
	"								</tr>" & vbNewLine & _
	"							</td>" & vbNewLine & _
	"						</table>" & vbNewLine & _
	"					</form>" & vbNewLine
If MaxPages > 1 Then Call Paging2()
WriteFooterShort

Sub Paging2()
	If maxpages > 1 Then
		If mypage = "" Then
			sPageNumber = 1
		Else
			sPageNumber = mypage
		End If
		Response.Write	"              <form name=""PageNum" & fnum & """ action=""pop_members.asp"">" & vbNewLine
		If fnum = 1 Then
			Response.Write	"                <td align=""right"" valign=""bottom""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine
		Else
			Response.Write	"                <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine
		End If
		Response.Write	"                <b>Page: </b><select name=""whichpage"" size=""1"" onchange=""ChangePage(" & fnum & ");"">" & vbNewLine
		For counter = 1 To maxpages
			If counter <> CLng(sPageNumber) Then
				Response.Write "                <option value=""" & counter &  """>" & counter & "</option>" & vbNewLine
			Else
				Response.Write "                <option selected value=""" & counter &  """>" & counter & "</option>" & vbNewLine
			End If
		Next
		If fnum = 1 Then
			Response.Write	"                </select><b> of " & maxPages & "</b>" & vbNewLine
		Else
			Response.Write	"                </select>" & vbNewLine
		End If
		Response.Write	"                </font></td>" & vbNewLine
		Response.Write	"              </form>" & vbNewLine
	End If
End Sub

Function Go_Result
	Response.Write	"      <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """><b>" & strErr & "</b></font></p>" & vbNewLine
	WriteFooterShort
	Response.End
End Function

Function IsValidString(sValidate)
	Dim sInvalidChars, bTemp, i
	sInvalidChars = "!#$%^&*()=+{}[]|\.;:/?>,<@'"
	For i = 1 To Len(sInvalidChars)
		If InStr(sValidate, Mid(sInvalidChars, i, 1)) > 0 Then
			bTemp = True
			Exit For
		End If
	Next
	For i = 1 To Len(sValidate)
		If Asc(Mid(sValidate, i, 1)) = 160 Then
			bTemp = True
			Exit For
		End If
	Next
	If Not bTemp Then bTemp = InStr(sValidate, "..") > 0
	If Not bTemp Then bTemp = InStr(sValidate, "  ") > 0
	If Not bTemp Then bTemp = (Len(sValidate) <> Len(Trim(sValidate)))
	IsValidString = Not bTemp
End Function
%>

Edited by - Carefree on 27 January 2016 01:47:37

HuwR
Forum Admin

United Kingdom
20579 Posts

Posted - 27 January 2016 :  13:01:42  Show Profile  Visit HuwR's Homepage
Try changing the javascript in pop_member to something along these lines

<script type='text/javascript'>
	function loadParent() {
		pWindow = opener.window;
		var sendto = pWindow.document.getElementById("m1").value;
		if(sendto.length>0){
			pWindow.document.getElementById("m1").value = sendto + ',' + document.getElementById("mem1").value;
		}else{
			pWindow.document.getElementById("m1").value = document.getElementById("mem1").value;
		}
		window.close();
	}
</script>

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

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 27 January 2016 :  14:08:51  Show Profile
That's got it! Thanks.
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.44 seconds. Powered By: Snitz Forums 2000 Version 3.4.07