<% @ Language=VBScript %> <% Option Explicit %> <% '**************************************************************************************** '** 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 '** '**************************************************************************************** '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 sarryPmMessage 'Holds the recordset in an array Dim intRecordPositionPageNum 'Holds the recorset page number to show the other pm message Dim intTotalRecordsPages 'Holds the total number of pages in the recordset Dim intRecordLoopCounter 'Holds the loop counter numeber Dim intPageLoopCounter 'Holds the number of pages there are of pm messages Dim intNumOfPMs 'Holds the number of private messages the user has Dim intPageSize 'Holds the number of memebrs shown per page Dim intStartPosition 'Holds the start poition for records to be shown Dim intEndPosition 'Holds the end poition for records to be shown Dim intCurrentRecord 'Holds the current record position Dim intPageLinkLoopCounter 'Holds the loop counter for mutiple page links 'Initilise varaibles intPageSize = 10 intNumOfPMs = 0 intNumOfPMs = 0 'If Priavte messages are not on then send them away If blnPrivateMessages = False Then 'Clean up Call closeDatabase() 'Redirect Response.Redirect("default.asp" & strQsSID1) End If 'If the user is not allowed then send them away If intGroupID = 2 OR blnActiveMember = False OR blnBanned Then 'Clean up Call closeDatabase() 'Redirect Response.Redirect("insufficient_permission.asp" & strQsSID1) End If 'If this is the first time the page is displayed then the pm message record position is set to page 1 If Request.QueryString("PN") = 0 Then intRecordPositionPageNum = 1 'Else the page has been displayed before so the pm message record postion is set to the Record Position number Else intRecordPositionPageNum = CInt(Request.QueryString("PN")) End If 'Initlise the sql statement strSQL = "SELECT " & strDbTable & "PMMessage.PM_ID, " & strDbTable & "PMMessage.Author_ID, " & strDbTable & "PMMessage.PM_Tittle, " & strDbTable & "PMMessage.PM_Message_Date," & strDbTable & "PMMessage.Read_Post, " & strDbTable & "Author.Username " & _ "FROM " & strDbTable & "Author" & strDBNoLock & ", " & strDbTable & "PMMessage" & strDBNoLock & " " & _ "WHERE " & strDbTable & "Author.Author_ID=" & strDbTable & "PMMessage.Author_ID " & _ "AND " & strDbTable & "PMMessage.From_ID=" & lngLoggedInUserID & " " & _ "ORDER BY " & strDbTable & "PMMessage.PM_Message_date DESC;" 'Query the database rsCommon.Open strSQL, adoCon 'If not eof then get some details If NOT rsCommon.EOF Then 'Read in the row from the db using getrows for better performance sarryPmMessage = rsCommon.GetRows() 'Close rs rsCommon.Close 'Count the number of records intNumOfPMs = Ubound(sarryPmMessage,2) + 1 'Count the number of pages for the topics using '\' so that any fraction is omitted intTotalRecordsPages = intNumOfPMs \ intPageSize 'If there is a remainder or the result is 0 then add 1 to the total num of pages If intNumOfPMs Mod intPageSize > 0 OR intTotalRecordsPages = 0 Then intTotalRecordsPages = intTotalRecordsPages + 1 'Start position intStartPosition = ((intRecordPositionPageNum - 1) * intPageSize) 'End Position intEndPosition = intStartPosition + intPageSize 'Get the start position intCurrentRecord = intStartPosition Else 'Close rs rsCommon.Close End If 'If there are no records on this page and it's above the frist page then set the page position to 1 If intNumOfPMs = 0 AND intRecordPositionPageNum > 1 Then Response.Redirect("pm_outbox.asp?PN=1" & strQsSID3) 'If active users is enabled update the active users application array If blnActiveUsers Then 'Call active users function saryActiveUsers = activeUsers(strTxtPrivateMessenger & " " & strTxtOutbox, "", "", 0) End If 'SQL Query Array Look Up table '0 = PM_ID '1 = Author_ID '2 = PM_Tittle '3 = PM_Message_Date '4 = Read_Post '5 = Username 'Page to link to for mutiple page (with querystrings if required) strLinkPage = "pm_outbox.asp?" 'Set bread crumb trail strBreadCrumbTrail = strBreadCrumbTrail & strNavSpacer & "" & strTxtPrivateMessenger & "" & strNavSpacer & strTxtOutbox %> <% = strTxtPrivateMessenger & ": " & strTxtOutbox %> <% '***** START WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ****** Response.Write("") '***** END WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ****** %>

<% = strTxtPrivateMessenger & ": " & strTxtOutbox %>


 <% = strTxtPrivateMessenger %> <% = strTxtMessenger %> " class="tabButton"> <% = strTxtPrivateMessenger & " /> <% = strTxtInbox %> " class="tabButtonActive"> <% = strTxtPrivateMessenger & " /> <% = strTxtOutbox %>  <% = strTxtNewPrivateMessage %> <% = strTxtNewMessage %>
 
<% 'Check there are PM messages to display If intNumOfPMs = 0 Then 'If there are no pm messages to display then display the appropriate error message Response.Write(vbCrLf & " ") 'Else there the are topic's so write the HTML to display the topic names and a discription Else 'Do....While Loop to loop through the recorset to display the forum members Do While intCurrentRecord < intEndPosition 'If there are no member's records left to display then exit loop If intCurrentRecord >= intNumOfPMs Then Exit Do 'SQL Query Array Look Up table '0 = PM_ID '1 = Author_ID '2 = PM_Tittle '3 = PM_Message_Date '4 = Read_Post '5 = Username %> "> <% 'Move to the next record intCurrentRecord = intCurrentRecord + 1 'Loop back round Loop End If %>
<% = strTxtRead %> <% = strTxtMessageTitle %> <% = strTxtMessageTo %> <% = strTxtDate %>

" & strTxtNoPrivateMessages & " " & strTxtOutbox & "

<% If CBool(sarryPmMessage(4,intCurrentRecord)) = False Then Response.Write("") Else Response.Write("") End If %> <% Response.Write("" & formatInput(sarryPmMessage(2,intCurrentRecord)) & "") %> <% = sarryPmMessage(5,intCurrentRecord) %> <% Response.Write(DateFormat(sarryPmMessage(3,intCurrentRecord)) & " " & strTxtAt & " " & TimeFormat(sarryPmMessage(3,intCurrentRecord))) %>
<% Response.Write(strTxtMessagesInOutBox) %>
<% = strTxtUnreadMessage %> <% = strTxtUnreadMessage %>  <% = strTxtReadMessage %> <% = strTxtReadMessage %>


<% 'Clear server objects Call closeDatabase() '***** START WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ****** If blnLCode = True Then If blnTextLinks = True Then Response.Write("Bulletin Board Software by Web Wiz Forums® version " & strVersion & "") If blnACode Then Response.Write(" [Free Express Edition]") Else Response.Write("") If blnACode Then Response.Write("
Powered by Web Wiz Forums Free Express Edition") End If Response.Write("
Copyright ©2001-2008 Web Wiz") 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, 3) & " " & strTxtSeconds & "
" %>