<% @ Language=VBScript codepage=1255 %> <% Option Explicit %> <% '**************************************************************************************** '** Copyright Notice '** '** Web Wiz Guide - Web Wiz Forums '** '** Copyright 2001-2003 Bruce Corkhill All Rights Reserved. '** '** This program is free software; you can modify (at your own risk) any part of it '** under the terms of the License that accompanies this software and use it both '** privately and commercially. '** '** All copyright notices must remain in tacked in the scripts and the '** outputted HTML. '** '** You may use parts of this program in your own private work, but you may NOT '** redistribute, repackage, or sell the whole or any part of this program even '** if it is modified or reverse engineered in whole or in part without express '** permission from the author. '** '** You may not pass the whole or any part of this application off as your own work. '** '** All links to Web Wiz Guide and powered by logo's must remain unchanged and in place '** and must remain visible when the pages are viewed unless permission is first granted '** by the copyright holder. '** '** This program is distributed in the hope that it will be useful, '** but WITHOUT ANY WARRANTY; without even the implied warranty of '** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR ANY OTHER '** WARRANTIES WHETHER EXPRESSED OR IMPLIED. '** '** You should have received a copy of the License along with this program; '** if not, write to:- Web Wiz Guide, PO Box 4982, Bournemouth, BH8 8XP, United Kingdom. '** '** '** No official support is available for this program but you may post support questions at: - '** http://www.webwizguide.info/forum '** '** Support questions are NOT answered by e-mail ever! '** '** For correspondence or non support questions contact: - '** info@webwizguide.info '** '** or at: - '** '** Web Wiz Guide, PO Box 4982, Bournemouth, BH8 8XP, United Kingdom '** '**************************************************************************************** 'Set the buffer to true Response.Buffer = True 'Make sure this page is not cached Response.Expires = -1 Response.ExpiresAbsolute = Now() - 2 Response.AddHeader "pragma","no-cache" Response.AddHeader "cache-control","private" Response.CacheControl = "No-Store" 'Declare variables Dim rsPmMessage 'ADO recordset object holding the users private messages Dim lngPmMessageID 'Private message id Dim strPmSubject 'Holds the subject of the private message Dim strMessage 'Holds the message body of the thread Dim lngMessageID 'Holds the message ID number Dim lngFromUserID 'Holds the from user ID Dim lngToUserID 'Holds the to user ID Dim dtmTopicDate 'Holds the date the thread was made Dim strUsername 'Holds the Username of the thread Dim strAuthorHomepage 'Holds the homepage of the Username if it is given Dim strAuthorLocation 'Holds the location of the user if given Dim strAuthorAvatar 'Holds the authors avatar Dim lngAuthorNumOfPosts 'Holds the number of posts the user has made to the forum Dim dtmAuthorRegistration 'Holds the registration date of the user Dim intRecordLoopCounter 'Holds the loop counter numeber Dim intTopicPageLoopCounter 'Holds the number of pages there are of pm messages Dim strEmailBody 'Holds the body of the e-mail message Dim strEmailSubject 'Holds the subject of the e-mail Dim blnEmailSent 'set to true if an e-mail is sent Dim intForumID 'Holds the forum ID Dim strGroupName 'Holds the authors group name Dim intRankStars 'Holds the number of stars for the group Dim strMemberTitle 'Holds the members title Dim strRankCustomStars 'Holds custom stars for the user group 'Raed in the pm mesage number to display lngPmMessageID = CLng(Request.QueryString("ID")) 'If Priavte messages are not on then send them away If blnPrivateMessages = False Then Response.Redirect("default.asp") 'If the user is not allowed then send them away If intGroupID = 2 OR blnActiveMember = False Then Response.Redirect("insufficient_permission.asp") 'Intialise the ADO recordset object Set rsPmMessage = Server.CreateObject("ADODB.Recordset") 'Initlise the sql statement strSQL = "SELECT " & strDbTable & "PMMessage.*, " & strDbTable & "Author.Username, " & strDbTable & "Author.Homepage, " & strDbTable & "Author.Location, " & strDbTable & "Author.Author_email, " & strDbTable & "Author.No_of_posts, " & strDbTable & "Author.Join_date, " & strDbTable & "Author.Signature, " & strDbTable & "Author.Active, " & strDbTable & "Author.Avatar, " & strDbTable & "Author.Avatar_title, " & strDbTable & "Group.Name, " & strDbTable & "Group.Stars, " & strDbTable & "Group.Custom_stars " strSQL = strSQL & "FROM " & strDbTable & "Author, " & strDbTable & "PMMessage, " & strDbTable & "Group " strSQL = strSQL & "WHERE " & strDbTable & "Author.Author_ID = " & strDbTable & "PMMessage.From_ID AND " & strDbTable & "Author.Group_ID = " & strDbTable & "Group.Group_ID AND " & strDbTable & "PMMessage.PM_ID=" & lngPmMessageID & " " 'If this is a link from the out box then check the from author ID to check the user can view the message If Request.QueryString("M") = "OB" Then strSQL = strSQL & " AND " & strDbTable & "PMMessage.From_ID=" & lngLoggedInUserID & ";" 'Else use the to author ID to check the user can view the message Else strSQL = strSQL & " AND " & strDbTable & "PMMessage.Author_ID=" & lngLoggedInUserID & ";" End If 'Query the database rsPmMessage.Open strSQL, adoCon 'If a mesage is found then send a mail if the sender wants notifying If NOT rsPmMessage.EOF Then 'Read in some of the details strPmSubject = rsPmMessage("PM_Tittle") strUsername = rsPmMessage("Username") 'If the sender wants notifying then send a mail as long as e-mail notify is on and the message hasn't already been read If CBool(rsPmMessage("Email_notify")) AND rsPmMessage("Author_email") <> "" AND blnEmail AND CBool(rsPmMessage("Read_Post")) = False Then 'Set the subject strEmailSubject = strMainForumName & " " & strTxtNotificationPM 'Initailise the e-mail body variable with the body of the e-mail strEmailBody = strTxtHi & " " & decodeString(strUsername) & "," strEmailBody = strEmailBody & vbCrLf & vbCrLf & strTxtThisIsToNotifyYouThat & " " & strLoggedInUsername & " " & strTxtHasReadPM & ", '" & decodeString(strPmSubject) & "', " & strTxtYouSentToThemOn & " " & strMainForumName & "." 'Call the function to send the e-mail blnEmailSent = SendMail(strEmailBody, decodeString(strUsername), decodeString(rsPmMessage("Author_email")), strMainForumName, decodeString(strForumEmailAddress), strEmailSubject, strMailComponent, false) End If End If 'If this is not from the outbox then update the read field If Request.QueryString("M") <> "OB" Then 'Inittilise the sql veriable to update the database strSQL = "UPDATE " & strDbTable & "PMMessage SET " & strDbTable & "PMMessage.Read_Post = 1 WHERE " & strDbTable & "PMMessage.PM_ID=" & lngPmMessageID & ";" 'Execute the sql statement to set the pm to read adoCon.Execute(strSQL) End If %> הודעות פרטיות: <% = strPmSubject %>
<% = strTxtPrivateMessenger %>
 <% = strMainForumName %><% = strNavSpacer %><% = strTxtPrivateMessenger %>
<% = strTxtSubjectFolder %> <% = strTxtPrivateMessenger %> <% = strTxtPrivateMessenger & " border="0"><% = strTxtPrivateMessenger & " border="0"><% = strTxtPrivateMessenger & " border="0"><% = strTxtNewPrivateMessage %>
<% = strTxtSubjectFolder & ": " & strPmSubject %>
<% 'If no private message display an error IF rsPmMessage.EOF Then %>
<% = strTxtYouDoNotHavePermissionViewPM %>
<% 'Else display the message Else 'Read in threads details for the topic from the database strMessage = rsPmMessage("PM_Message") lngFromUserID = CLng(rsPmMessage("From_ID")) lngToUserID = CLng(rsPmMessage("Author_ID")) dtmTopicDate = CDate(rsPmMessage("PM_Message_Date")) strAuthorHomepage = rsPmMessage("Homepage") strAuthorLocation = rsPmMessage("Location") dtmAuthorRegistration = CDate(rsPmMessage("Join_date")) lngAuthorNumOfPosts = CLng(rsPmMessage("No_of_posts")) strAuthorAvatar = rsPmMessage("Avatar") strGroupName = rsPmMessage("Name") intRankStars = CInt(rsPmMessage("Stars")) strMemberTitle = rsPmMessage("Avatar_title") strRankCustomStars = rsPmMessage("Custom_stars") 'If the pm contains a quote or code block then format it If InStr(1, strMessage, "[QUOTE=", 1) > 0 AND InStr(1, strMessage, "[/QUOTE]", 1) > 0 Then strMessage = formatUserQuote(strMessage) If InStr(1, strMessage, "[QUOTE]", 1) > 0 AND InStr(1, strMessage, "[/QUOTE]", 1) > 0 Then strMessage = formatQuote(strMessage) If InStr(1, strMessage, "[CODE]", 1) > 0 AND InStr(1, strMessage, "[/CODE]", 1) > 0 Then strMessage = formatCode(strMessage) 'If the pm contains a flash link then format it If blnFlashFiles Then If InStr(1, strMessage, "[FLASH", 1) > 0 AND InStr(1, strMessage, "[/FLASH]", 1) > 0 Then strMessage = formatFlash(strMessage) End If %>
<% = strTxtAuthor %> <% = strTxtMessage %>
<% = strUsername %>
<% = strGroupName %>
<% Response.Write(vbCrLf & " "" Then Response.Write(strRankCustomStars) Else Response.Write(strImagePath & intRankStars & "_star_rating.gif") Response.Write(""" alt=""" & strGroupName & """>
") 'If the user has an avatar then display it If blnAvatar = True AND strAuthorAvatar <> "" Then Response.Write("") End If 'If there is a title for this member then display it If strMemberTitle <> "" Then Response.Write(vbCrLf & "
" & strMemberTitle) Response.Write("

") Response.Write(strTxtJoined & ": " & DateFormat(dtmAuthorRegistration, saryDateTimeData)) Response.Write("
") Response.Write(strTxtPosts & ": " & lngAuthorNumOfPosts) 'If the is a location display it If strAuthorLocation <> "" Then Response.Write("
" & strTxtLocation & ": " & strAuthorLocation) End If %>
<% Response.Write(strTxtSent & ": " & DateFormat(dtmTopicDate, saryDateTimeData) & " " & strTxtAt & " " & TimeFormat(dtmTopicDate, saryDateTimeData)) %> <% 'If the person reading the pm is the recepient disply delete and reply buttons If lngToUserID = lngLoggedInUserID Then %> " OnClick="return confirm('<% = strTxtDeletePrivateMessageAlert %>')"><% = strTxtDelete %> "><% = strTxtReplyToPrivateMessage %><% End If %>

<% = strMessage %>
  <% = strTxtView %> <% = strUsername %>'s <% = strTxtProfile %> <% = strTxtSearchForPosts %> <% = strUsername %><% 'If the user has a hompeage put in a link button If strAuthorHomepage <> "" Then %> <% = strTxtVisit & " align="absmiddle"> <% End If 'If the private msg's are on then display a link to enable use to send them a msg If blnPrivateMessages = True Then %> <% = strTxtAddToBuddyList %> <% End If 'If the person reading the pm is the recepient disply delete and reply buttons If lngToUserID = lngLoggedInUserID Then %> " OnClick="return confirm('<% = strTxtDeletePrivateMessageAlert %>')"><% = strTxtDelete %> "><% = strTxtReplyToPrivateMessage %><% End If %>
<% 'If the user has an email address and emailing is enabled then allow user to receive this pm by email If blnLoggedInUserEmail AND blnEmail Then %>
"><% = strTxtEmailThisPMToMe %>
<% End If Response.Write("
") End If Response.Write(vbCrLf & "

") 'Clear server objects rsPmMessage.Close Set rsPmMessage = Nothing Set rsCommon = Nothing adoCon.Close Set adoCon = Nothing '***** START WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ****** If blnLCode = True Then If blnTextLinks = True Then Response.Write("Hebrew Translate By Web Wiz Hebrew Forums
Hebrew Version " & strHebrewVersion & "

") Response.Write("Powered by Web Wiz Forums version " & strVersion & "") Else Response.Write("Hebrew Translate By Web Wiz Hebrew Forums
Hebrew Version " & strHebrewVersion & "

") Response.Write("") End If Response.Write("
Copyright ©2001-2003 Web Wiz Guide") End If '***** END WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ****** 'Display the process time If blnShowProcessTime Then Response.Write "

" & strTxtThisPageWasGeneratedIn & " " & FormatNumber(Timer() - dblStartTime, 4) & " " & strTxtSeconds & "
" %>
<% 'Display a msg letting the user know they have been emailed a private message If Request.QueryString("ES") = "True" Then Response.Write("") ElseIf Request.QueryString("ES") = "False" Then Response.Write("") End If %>