<% '################################################################################# '## Copyright (C) 2000-01 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 ## '################################################################################# %> <% if strDBNTUserName = "" then Response.Redirect "default.asp" Response.End else if trim(chkString(Request("method"),"SQLString")) <> "" then SortMethod = trim(chkString(Request("method"),"SQLString")) end if strSortIconOn = getCurrentIcon(strIconPmSortASC,"Sort Messages","hspace=""4"" align=""absmiddle""") strSortIconOff = getCurrentIcon(strIconPmSortDESC,"Sort Messages","hspace=""4"" align=""absmiddle""") select case SortMethod case "subjectinasc" strSql4 = " ORDER BY P.M_SUBJECT ASC, P.M_FROM DESC" case "subjectindesc" strSql4 = " ORDER BY P.M_SUBJECT DESC, P.M_FROM DESC" case "subjectoutasc" strSql4 = " ORDER BY P.M_SUBJECT ASC, P.M_TO DESC" case "subjectoutdesc" strSql4 = " ORDER BY P.M_SUBJECT DESC, P.M_TO DESC" case "frominasc" strSql4 = " ORDER BY P.M_FROM ASC, P.M_SENT DESC" case "fromindesc" strSql4 = " ORDER BY P.M_FROM DESC, P.M_SENT DESC" case "tooutasc" strSql4 = " ORDER BY P.M_TO ASC, P.M_SUBJECT ASC, P.M_SENT DESC" case "tooutdesc" strSql4 = " ORDER BY P.M_TO DESC, P.M_SUBJECT DESC, P.M_SENT DESC" case "sentinasc" strSql4 = " ORDER BY P.M_SENT ASC, P.M_SUBJECT ASC, P.M_TO DESC" case "sentindesc" strSql4 = " ORDER BY P.M_SENT DESC, P.M_SUBJECT DESC, P.M_TO DESC" case "sentoutasc" strSql4 = " ORDER BY P.M_SENT ASC, P.M_FROM DESC" case "sentoutdesc" strSql4 = " ORDER BY P.M_SENT DESC, P.M_FROM DESC" case else strSql4 = " ORDER BY P.M_SENT DESC" end select if Request.Cookies(strCookieURL & "paging")("outbox") = "" then if strSetCookieToForum = 1 then Response.Cookies(strCookieURL & "paging").Path = strCookieURL end if '####################################################################### '####### Right now if a user doesn't have an OUTBOX preference ####### '####### set in their cookie it will default to double ####### '####### ####### '####### If you want to change it, just change "double" below ####### '####### to either "single" or "none" ####### '####################################################################### Response.Cookies(strCookieURL & "paging")("outbox") = "double" Response.Cookies(strCookieURL & "paging").Expires = dateAdd("d", 360, strForumTimeAdjust) end if Response.Write "
" & vbNewLine & _ "
" & vbNewLine %> <% Response.Write "" & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ "
" & vbNewLine & _ " " & getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""") & " All Forums
" & vbNewLine & _ " " & getCurrentIcon(strIconBar,"","") & getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""") & " Private Messages
" & vbNewLine 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 Response.Write " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ "
" & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ "
" & vbNewLine If pmtotal = strPMLimit or pmtotal > strPMLimit then Response.Write ("
You have reached your private message limit of " & strPMLimit & ".
To send further private messages you must clean your Inbox.
") else Response.Write ("
You currently have " & pmtotal & " saved private messages.
Your Inbox limit is " & strPMLimit & ".
Please delete your messages once you have read them.
") end if Response.Write "
" & vbNewLine if Request.Cookies(strCookieURL & "paging")("OUTBOX") = "double" and Request.QueryString("view") <> "outbox" then Response.Write ("" & getCurrentIcon(strIconPmoutbox,"Outbox","hspace=""0""") & "") if Request.Cookies(strCookieURL & "paging")("OUTBOX") = "double" and Request.QueryString("view") = "outbox" then Response.Write ("" & getCurrentIcon(strIconPminbox,"Inbox","hspace=""0""") & "") If pmtotal < strPMLimit or mLev > 2 then Response.Write ("" & getCurrentIcon(strIconPmnewBig,"Write a New Message","hspace=""0""") & "") end if Response.Write "" & getCurrentIcon(strIconPmreceive,"Check for New Messages","hspace=""0""") & "" & getCurrentIcon(strIconPmmemberlist,"Browse the Memberlist","hspace=""0""") & "" & getCurrentIcon(strIconPmprivpref,"Set Your Private Message Preferences","hspace=""0""") & "" & getCurrentIcon(strIconPmblocklist,"View Your Blocked List","hspace=""0""") & "
" & vbNewLine & _ "
" & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ "
" & vbNewLine & _ "
" & vbNewLine if Request.QueryString("view") <> "outbox" then Response.Write " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine if Request.QueryString("marknew") = "1" then strSql = "UPDATE " & strTablePrefix & "PM SET " & strTablePrefix & "PM.M_READ = 0 WHERE (" & strTablePrefix & "PM.M_ID = " & cLng(Request.QueryString("id")) & ");" my_conn.Execute (strSql) end if Response.Flush strSql = "SELECT M.MEMBER_ID, M.M_NAME, P.M_ID, P.M_TO, P.M_SUBJECT, P.M_SENT, P.M_FROM, P.M_READ FROM " & strMemberTablePrefix & "MEMBERS M , " & strTablePrefix & "PM P WHERE M.M_NAME = '" & strDBNTUserName & "' AND M.MEMBER_ID = P.M_TO" Set rsMessage = my_Conn.Execute(strSql & strSql4) if rsMessage.EOF or rsMessage.BOF then '## No Private Messages found in DB InboxEmpty = "Yes" Response.Write " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine else icount = 0 i = 0 do Until rsMessage.EOF if i = 1 then CColor = strForumCellColor else CColor = strForumCellColor end if strFromMemberName = getMemberName(rsMessage("M_FROM")) strIsNew = rsMessage("M_READ") Response.Write " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine else Response.Write "" & strNewPMs & strFromMemberName & strNewPMe & "" & vbNewLine end if strDateTime = rsMessage("M_SENT") Response.Write " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine rsMessage.MoveNext icount = icount + 1 i = i + 1 if i = 2 then i = 0 loop end if rsMessage.close set rsMessage = nothing Response.Write "
 " & strSortIconOn) else Response.Write("subjectindesc" & """>" & strSortIconOff) Response.Write "" & strDBNTUserName & "'s Inbox" & strSortIconOn) else Response.Write("fromindesc" & """>" & strSortIconOff) Response.Write "From" & strSortIconOn) else Response.Write("sentindesc" & """>" & strSortIconOff) Response.Write "Date SentDelete?
 You have no Private Messages in your Inbox
" if strIsNew = "0" then Response.Write (getCurrentIcon(strIconPmnewSm,"New Message","hspace=""0""")) else Response.Write "" & (getCurrentIcon(strIconPmOld,"Click here to mark this message new","hspace=""0""")) & "" end if Response.Write "" & strNewPMs & rsMessage("M_SUBJECT") & strNewPMe & "" if strUseExtendedProfile then Response.Write "" & strNewPMs & strFromMemberName & strNewPMe & "" & strNewPMs & ChkDate(strDateTime, " : " ,true) & "  " & strNewPMe & "
" & vbNewLine & _ "" & vbNewLine & _ " " & vbNewLine if InboxEmpty <> "Yes" then Response.Write " " & vbNewLine & _ " " & vbNewLine & _ "
" if icount > 1 then Response.Write " " end if end if Response.Write "
" & vbNewLine & _ "
" & vbNewLine end if if Request.Cookies(strCookieURL & "paging")("OUTBOX") = "single" or Request.QueryString("view") = "outbox" then Response.Write "
" & vbNewLine & _ "
" & vbNewLine & _ "" & vbNewLine & _ "" & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine '#PM SQL get private messages strSql = "SELECT M.MEMBER_ID, M.M_NAME, P.M_ID, P.M_TO, P.M_SUBJECT, P.M_SENT, P.M_FROM, P.M_READ, P.M_OUTBOX FROM " & strMemberTablePrefix & "MEMBERS M , " & strTablePrefix & "PM P WHERE M.M_NAME = '" & strDBNTUserName & "' AND M.MEMBER_ID = P.M_FROM AND P.M_OUTBOX = 1" Set rsFMessage = my_Conn.Execute(strSql & strSql4) if rsFMessage.EOF or rsFMessage.BOF then '## No Private Messages found in DB OutBoxEmpty = "Yes" Response.Write " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine else ocount = 0 o = 0 do Until rsFMessage.EOF if o = 1 then CColor = strForumCellColor else CColor = strForumCellColor end if strTOMemberName = getMemberName(rsFMessage("M_TO")) strIsRead = rsFMessage("M_READ") Response.Write " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " else Response.Write "" & strReadPMs & strTOMemberName & strReadPMe & "" end if strDateTime = rsFMessage("M_SENT") Response.Write " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine rsFMessage.MoveNext ocount = ocount + 1 o = o + 1 if o = 2 then o = 0 loop end if rsFMessage.close set rsFMessage = nothing Response.Write "
 " & strSortIconOn) else Response.Write("subjectoutdesc" & """>" & strSortIconOff) Response.Write "" & strDBNTUserName & "'s Outbox" & strSortIconOn) else Response.Write("tooutdesc" & """>" & strSortIconOff) Response.Write "Sent To" & strSortIconOn) else Response.Write("sentoutdesc" & """>" & strSortIconOff) Response.Write "Date SentRemove?
 You have no Private Messages in your Outbox
" if strIsRead = "0" then Response.Write getCurrentIcon(strIconPmnewsm,"" & strTOMemberName & " has not read this message yet.","align=""absmiddle""") else Response.Write getCurrentIcon(strIconPmOld,"" & strTOMemberName & " has read this message yet.","align=""absmiddle""") end if Response.Write "" & strReadPMs & rsFMessage("M_SUBJECT") & strReadPMe & "" if strUseExtendedProfile then Response.Write "" & strReadPMs & strTOMemberName & strReadPMe & "" & strReadPMs & ChkDate(strDateTime, " : " ,true) & "  " & strReadPMe & "
" & vbNewLine & _ "" & vbNewLine & _ " " & vbNewLine if OutBoxEmpty <> "Yes" then Response.Write " " & vbNewLine & _ " " & vbNewLine & _ "
" if ocount > 1 then Response.Write " " end if end if Response.Write "
" & vbNewLine & _ "
" & vbNewLine & _ "
" & vbNewLine end if end if WriteFooter Response.End %>