<%
'***********************************************************************
'** Copyright (C) 2001 - 2004 Max Yuan All Rights Reserved
'**
'** By using this program, you are agreeing to the terms of the
'** GNU General Public License.
'**
'** 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 MaxWebPortal must remain intact
'** in the scripts and in the outputted HTML.
'** The "powered by" text/logo with a link back to 
'** http://www.maxwebportal.com in the footer of the pages MUST
'** remain visible when the pages are viewed on the internet or intranet.
'**
'** Support can be obtained from support forums at:
'** http://www.maxwebportal.com
'**
'** Email: maxwebportal@hotmail.com
'** ICQ: 148111300
'***********************************************************************
'** This Page Contains source code of Snitz Forums 2000
'***********************************************************************
'#################################################################################
'## Copyright (C) 2000  Michael Anderson and Pierre Gorissen
'## 
'## 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="inc_functions.asp" -->
<!--#INCLUDE FILE="inc_top.asp" -->

<% if strDBNTUserName = "" Then
        Response.Redirect "fhome.asp"
        Response.End
   else
if Request.QueryString("id") <> "" or  Request.QueryString("id") <> " " then
	if IsNumeric(Request.QueryString("id")) = True then
		strRQid = Request.QueryString("id")
	else
		Response.Redirect("fhome.asp")
	end if
end if
	set my_Conn = Server.CreateObject("ADODB.Connection") 
	my_Conn.Open strConnString

	strSql = "SELECT "   & strMemberTablePrefix & "MEMBERS.MEMBER_ID, " & strMemberTablePrefix & "MEMBERS.M_NAME,  " & strTablePrefix & "PM.M_ID,  " & strTablePrefix & "PM.M_TO, " & strTablePrefix & "PM.M_SUBJECT, " & strTablePrefix & "PM.M_SENT, " & strTablePrefix & "PM.M_FROM, " & strTablePrefix & "PM.M_MESSAGE " 
	strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS , " & strTablePrefix & "PM "
	strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.M_NAME = '" & strDBNTUserName & "'"
	strSql = strSql & " AND " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strTablePrefix & "PM.M_FROM "
	strSql = strSql & " AND " & strTablePrefix & "PM.M_ID =  " & strRQid
	strSql = strSql & " ORDER BY " & strTablePrefix & "PM.M_SENT DESC" 

	Set rsMessage = my_Conn.Execute(strSql)

	if rsMessage.BOF or rsMessage.EOF then
	   Response.Redirect("pm_view.asp")
	end if

	strSql ="SELECT " & strMemberTablePrefix & "MEMBERS.M_NAME, " & strMemberTablePrefix & "MEMBERS.MEMBER_ID, " & strMemberTablePrefix & "MEMBERS.M_ICQ, " & strMemberTablePrefix & "MEMBERS.M_YAHOO, " & strMemberTablePrefix & "MEMBERS.M_AIM, " & strMemberTablePrefix & "MEMBERS.M_TITLE, " & strMemberTablePrefix & "MEMBERS.M_TITLE, " & strMemberTablePrefix & "MEMBERS.M_Homepage, " & strMemberTablePrefix & "MEMBERS.M_LEVEL, " & strMemberTablePrefix & "MEMBERS.M_POSTS, " & strMemberTablePrefix & "MEMBERS.M_CITY, " & strMemberTablePrefix & "MEMBERS.M_STATE, " & strMemberTablePrefix & "MEMBERS.M_COUNTRY, " & strTablePrefix & "PM.M_FROM, " & 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 =  " & strRQid

	Set rs = my_Conn.Execute(strSql)

%>
<center>
<table border="0" width="99%" align="center">
  <tr>
    <td width="33%" align="left" nowrap><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">
    <img src="icon_folder_open.gif" height=15 width=15 border="0">&nbsp;<a href="fhome.asp">All Forums</a><br>
    <img src="icon_bar.gif" height=15 width=15 border="0"><img src="icon_folder_open.gif" height=15 width=15 border="0">&nbsp;<a href="pm_view.asp">Private Messages</a><br>
    <img src="icon_blank.gif" height=15 width=15 border="0"><img src="icon_bar.gif" height=15 width=15 border="0"><img src="icon_folder_open_topic.gif" height=15 width=15 border="0">&nbsp;Sent Private Messages<br>
    </font></td>
  </tr>
</table>
<br>
<%
mwpThemeTableCustomCode = "align=""center"" width=""95%"""
mwpThemeBlock_open()
%>
  <tr>
    <td align="center" <%= mwpThemeBlock_subTitleCell %> width="<% =strTopicWidthLeft %>" <% if lcase(strTopicNoWrapLeft) = "1" then Response.Write(" nowrap") %>><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">From</font></b></td>
    <td align="left" <%= mwpThemeBlock_subTitleCell %> width="<% =strTopicWidthRight %>" <% if lcase(strTopicNoWrapRight) = "1" then Response.Write(" nowrap") %>><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">Subject:&nbsp;&nbsp; <% =rsMessage("M_SUBJECT") %></font></b></td>
  </tr>
  <tr>
    <td bgcolor="<% =strForumFirstCellColor %>" valign="top">
      <font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">
      <% if strUseExtendedProfile then %>
   	<a href="pop_profile.asp?mode=display&id=<% =rs("M_FROM") %>">
      <% else %>
   	<a href="JavaScript:openWindow3('pop_profile.asp?mode=display&id=<% =rs("M_FROM") %>')">
      <% end if %>
      <font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b><% =ChkString(rs("M_NAME"),"display") %></a></b></font>
<%    if strShowRank = 1 or strShowRank = 3 then %>
        <br><font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>"><small><% = ChkString(getMember_Level(rs("M_TITLE"), rs("M_LEVEL"), rs("M_POSTS")),"display") %></small></font>
<%    end if %>
<%    if strShowRank = 2 or strShowRank = 3 then %>
        <br><% = getStar_Level(rs("M_LEVEL"), rs("M_POSTS")) %>
<%    end if %>
      <br>
      <br><font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>"><small><% =rs("M_COUNTRY") %></small></font>
      <br><font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>"><small><% =rs("M_POSTS") %> Posts</small></font>
    </td>
    <td bgcolor="<% =strForumFirstCellColor %>" valign="top">
      <img src="icon_posticon.gif" border="0" hspace="3"><font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>">Sent&nbsp;-&nbsp;<% =ChkDate(rsMessage("M_SENT")) %>&nbsp;&nbsp;<% =ChkTime(rsMessage("M_SENT")) %></font>
      <% if strUseExtendedProfile then %>
      	&nbsp;<a href="pop_profile.asp?mode=display&id=<% =rs("MEMBER_ID") %>"><img src="icon_profile.gif" height=15 width=15 alt="Show Profile" border="0" align="absmiddle" hspace="6"></a>
      <% else %>
      	&nbsp;<a href="JavaScript:openWindow3('pop_profile.asp?mode=display&id=<% =rs("MEMBER_ID") %>')"><img src="icon_profile.gif" height=15 width=15 alt="Show Profile" border="0" align="absmiddle" hspace="6"></a>
      <% end if %>
      &nbsp;<a href="JavaScript:openWindow('pop_mail.asp?id=<% =rs("M_FROM") %>')"><img src="icon_email.gif" height=15 width=15 alt="Email Poster" border="0" align="absmiddle" hspace="6"></a>
<%    if strHomepage = "1" then %>
<%    	if rs("M_Homepage") <> " " then %>
          &nbsp;<a href="<% =rs("M_Homepage") %>"><img src="icon_Homepage.gif" height=15 width=15 alt="Visit <% =rs("M_NAME") %>'s Homepage" border="0" align="absmiddle" hspace="6"></a>
<%	end if %>
<%    end if %>
<%    if strICQ = "1" then %>
<%      if rs("M_ICQ") <> " " then %>
          &nbsp;<a href="JavaScript:openWindow('pop_messengers.asp?mode=ICQ&ICQ=<% =rs("M_ICQ") %>&M_NAME=<% =ChkString(rs("M_NAME"),"urlpath") %>')"><img src="http://online.mirabilis.com/scripts/online.dll?icq=<% =rs("M_ICQ") %>&img=5" height=15 width=15 alt="Send <% =rs("M_NAME") %> an ICQ Message" border="0" align="absmiddle" hspace="6"></a>
<%	 end if %>
<%    end if %>
<%    if strYAHOO = "1" then %>
<%      if rs("M_YAHOO") <> " " then %>
          &nbsp;<a href="JavaScript:openWindow('http://edit.yahoo.com/config/send_webmesg?.target=<% =rs("M_YAHOO") %>&.src=pg')"><img src="icon_yahoo.gif" height=15 width=15 alt="Send <% =rs("M_NAME") %> a Yahoo! Message" border="0" align="absmiddle" hspace="6"></a>
<%	end if %>
<%    end if %>
<%    if (strAIM = "1") then %>
<%    	if rs("M_AIM") <> " " then %>
          &nbsp;<a href="JavaScript:openWindow('pop_messengers.asp?mode=AIM&AIM=<% =rs("M_AIM") %>&M_NAME=<% =ChkString(rs("M_NAME"),"urlpath") %>')"><img src="icon_aim.gif" height=15 width=15 alt="Send <% =rs("M_NAME") %> an instant message" border="0" align="absmiddle" hspace="6"></a>
<%	end if %>
<%    end if %>
      <hr noshade size=1>
      <font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><% =formatStr(rsMessage("M_MESSAGE")) %></font>
    </td>
  </tr>
<%
mwpThemeBlock_close()
end if %>
<br>
<!--#INCLUDE FILE="inc_footer.asp" -->