⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 privatesend_info.asp

📁 此程序是一个个人主页创造程序,该程序无插件,无任何恶意程序.
💻 ASP
字号:
<%
'#############################################################
'#      中国在线--极酷论坛 ver.2001 3.0
'#
'#  版权所有: 中国在线 (ChinaXP.Net)
'#
'#  制作人  : 周周 (SeeYa!)
'#
'#
'#  主页地址: http://www.ChinaXP.net/    中国在线
'#	       http://bbs.ChinaXP.Net    中国在线--极酷论坛
'#
'#############################################################
%>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_functions.asp" -->
<!--#INCLUDE FILE="inc_top.asp" -->
<%
set rs = Server.CreateObject("ADODB.RecordSet")

err_Msg = ""
ok = ""

if Request.Form("Method_Type") = "Topic" then

	'## Forum_SQL
	strSql = "SELECT MEMBER_ID, M_LEVEL, M_EMAIL, M_NAME"
	if strAuthType = "nt" then
		strSql = strSql & ", M_USERNAME "
	end if
	strSql = strSql & ", M_PASSWORD "
	strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
	if strAuthType = "nt" then
		strSql = strSql & " WHERE M_USERNAME = '" & session("userid") & "'"
	else
		if strAuthType = "db" then
			strSql = strSql & " WHERE M_NAME = '" & Request.Form("UserName") & "' "
			strSql = strSql & " AND   M_PASSWORD = '" & Request.Form("Password") &"'"
		end if
	end if

	set rs = my_Conn.Execute (strSql)
	
	if rs.BOF or rs.EOF then '##  Invalid Password
		Go_Result "无效的会员名或登录密码!", 0
%>
<!--#INCLUDE FILE="inc_footer.asp" -->
<%
		Response.End
	Else
	
	
strSql = "SELECT MEMBER_ID, M_NAME, M_PMRECEIVE, M_PMEMAIL"
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE M_NAME = '" & Request.Form("sendto") & "' "
set rsName = my_Conn.Execute (strSql)

if rsName.BOF or rs.EOF then '##  no one registered
Go_Result "抱歉!查无此人!", 0

%>
<!--#INCLUDE FILE="inc_footer.asp" -->

<% else

if rsName("M_PMRECEIVE") = "0" then
Go_Result "抱歉!该名会员不希望收到悄悄话讯息...", 0

%>
<!--#INCLUDE FILE="inc_footer.asp" -->
<% end if
end if

		txtMessage = ChkString(Request.Form("Message"),"message")
		txtSubject = ChkString(Request.Form("Subject"),"title")
		FILEZ = Request.Form("FILEZ")

		if txtMessage = " " then
			Go_Result "你必须填写内容", 0
%>
<!--#INCLUDE FILE="inc_footer.asp" -->
<%
			Response.End
		end if
		if Request.Form("sendto") = "" then
			Go_Result "你必须填写收件人!", 0
%>
<!--#INCLUDE FILE="inc_footer.asp" -->
<%
			Response.End
		end if
		if txtSubject = " " then
			Go_Result "你必须填写标题!", 0
%>
<!--#INCLUDE FILE="inc_footer.asp" -->
<%
			Response.End
		end if
		' ### Modify By http://www.wormcn.net 原程序如下: ###
		if Request.Form("sig") = "yes" and GetSig(Request.Form("UserName")) <> "" then
			txtMessage = txtMessage & vbCrLf & vbCrLf & ChkString(GetSig(Request.Form("UserName")), "signature" )
		end if
		
				
		if Request.Form("rmail") <> "1" then
			TF = "0"
		Else
			TF = "1"
		end if
		
		'## Forum_SQL - Add new private message
		
		strSql = "INSERT INTO " & strTablePrefix & "PM ("
		strSql = strSql & " M_SUBJECT"
		strSql = strSql & ", M_MESSAGE"
		strSql = strSql & ", M_TO"
		strSql = strSql & ", M_FROM"
		strSql = strSql & ", M_SENT"
		strSql = strSql & ", M_MAIL"
   		strSql = strSql & ", M_READ"
		strSql = strSql & ", M_OUTBOX"
		strSql = strSql & ") VALUES ("
		strSql = strSql & " '" & txtSubject & "'"
		strSql = strSql & ", '" & txtMessage & "'"
		strSql = strSql & ", " & rsName("MEMBER_ID")
		strSql = strSql & ", " & rs("MEMBER_ID")
		strSql = strSql & ", '" & DateToStr(strForumTimeAdjust) & "'"
		strSql = strSql & ", " & TF
		strSql = strSql & ", " & "0"
		if request.cookies("paging")("outbox") = "double" or request.cookies("paging")("outbox") = "single" then
			strSql = strSql & ", " & 1 & ")"
		else
			strSql = strSql & ", " & 0 & ")"
		end if

		my_Conn.Execute (strSql)

		if strEmail = "1" then
			if rsName("M_PMEMAIL") = "1" then
				DoReplyEmail Request.Form("sendto")
                	end if
		end if

		if Err.description <> "" then
			err_Msg = "发生一个错误 →  " & Err.description
		Else
			err_Msg = "更新完成"
		end if


		Go_Result err_Msg, 1
%>
<!--#INCLUDE FILE="inc_footer.asp" -->

<%
		Response.End
	end if	
end if

if Request.Form("Method_Type") = "Reply" or Request.Form("Method_Type") = "ReplyQuote" or Request.Form("Method_Type") = "Forward" then

if Request.Form("Method_Type") = "Forward" then
'## Forum_SQL Convert MemberName
strSql = "SELECT MEMBER_ID, M_Name,M_PMEMAIL"
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE M_NAME = '" & Request.Form("sendto") & "' "

set rsName = my_Conn.Execute (strSql)

end if

	'## Forum_SQL
	strSql = "SELECT MEMBER_ID, M_LEVEL, M_EMAIL, M_NAME, M_PMEMAIL"
	if strAuthType = "nt" then
		strSql = strSql & ", M_USERNAME "
	end if
	strSql = strSql & ", M_PASSWORD "
	strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
	if strAuthType = "nt" then
		strSql = strSql & " WHERE M_USERNAME = '" & session("userid") & "'"
	else
		if strAuthType = "db" then
			strSql = strSql & " WHERE M_NAME = '" & Request.Form("UserName") & "' "
			strSql = strSql & " AND   M_PASSWORD = '" & Request.Form("Password") &"'"
		end if
	end if

	set rsReply = my_Conn.Execute (strSql)

	if rsReply.BOF or rsReply.EOF then '##  Invalid Password
		Go_Result "无效的会员名或登录密码!", 0
%>
<!--#INCLUDE FILE="inc_footer.asp" -->
<%
		Response.End
	Else

	    if Request.Form("Method_Type") = "Forward" then
		txtRE = "Fwd: "
	    else 	
	    	txtRE = "Re: "	
	    end if
		txtMessage = ChkString(Request.Form("Message"),"message")
		txtSubject = ChkString(Request.Form("R_SUBJECT"),"title")
		if InStr(txtSubject, "Re:")>0 Or InStr(txtSubject, "RE:")>0 then
			txtRE =""
		elseif InStr(txtSubject, "Fwd:")>0 or InStr(txtSubject, "FWD:")>0 then
			
		end if
		FILEZ = Request.Form("FILEZ")

		if txtMessage = " " then
			Go_Result "你必须填写内容", 0
%>
<!--#INCLUDE FILE="inc_footer.asp" -->
<%
			Response.End
		end if

		' ### Modify By http://www.wormcn.net 原程序如下: ###
		if Request.Form("sig") = "yes" and GetSig(Request.Form("UserName")) <> "" then
			txtMessage = txtMessage & vbCrLf & vbCrLf & ChkString(GetSig(Request.Form("UserName")), "signature" )
		end if
		if Request.Form("rmail") <> "1" then
			TF = "0"
		Else
			TF = "1"
		end if

		'## Forum_SQL - Add new private message

		strSql = "INSERT INTO " & strTablePrefix & "PM ("
		strSql = strSql & " M_SUBJECT"
		strSql = strSql & ", M_MESSAGE"
		strSql = strSql & ", M_TO"
		strSql = strSql & ", M_FROM"
		strSql = strSql & ", M_SENT"
		strSql = strSql & ", M_MAIL"
   		strSql = strSql & ", M_READ"
		strSql = strSql & ", M_OUTBOX"
		strSql = strSql & ") VALUES ("
		strSql = strSql & " '" & txtRE + txtSubject & "'"
		strSql = strSql & ", '" & txtMessage & "'"
	If Request.Form("Method_Type") = "Forward" then
		strSql = strSql & ", " & rsName("MEMBER_ID")
	else	
		strSql = strSql & ", " & Request.Form("REPLY_ID")
	end if			
		strSql = strSql & ", " & rsReply("MEMBER_ID")
		strSql = strSql & ", '" & DateToStr(strForumTimeAdjust) & "'"
		strSql = strSql & ", " & TF
		strSql = strSql & ", " & "0"
		if request.cookies("paging")("outbox") = "double" or request.cookies("paging")("outbox") = "single" then
			strSql = strSql & ", " & 1 & ")"
		else
			strSql = strSql & ", " & 0 & ")"
		end if

		my_Conn.Execute (strSql)

		if strEmail = "1" then
			If Request.Form("Method_Type") = "Forward" then
				if rsName("M_PMEMAIL") = "1" then
					DoReplyEmail Request.Form("sendto")
                		end if
			else
				if rsReply("M_PMEMAIL") = "1" then
				DoReplyEmail Request.Form("sendto")
                	end if
		end if
		end if

		if Err.description <> "" then
			err_Msg = "发生一个错误 →  " & Err.description
		Else
			err_Msg = "更新完成"
		end if

		Go_Result err_Msg, 1
%>
<!--#INCLUDE FILE="inc_footer.asp" -->
<%
		Response.End
	end if	
end if

sub Go_Result(str_err_Msg, boolOk)
%>
<% '################################## %>
	<TD width="70%" align="left" valign="top">
<TABLE border="0" width="85%" align=center>
  <TR>
    <TD width="33%" align="left" nowrap><font face="<% Response.Write strDefaultFontFace %>" size="<% Response.Write strDefaultFontSize %>"><a href="default.asp"><img src="<% =strImageURL %>icon_folder_open.gif" alt="返回论坛首页" border="0">&nbsp;<% =strForumTitle %></a>
	<BR><img src="<%=strImageURL %>icon_bar.gif" border="0"><img src="<%=strImageURL %>icon_folder_open.gif" border="0">&nbsp;<a href="pm_view.asp">悄悄话收件箱</a>
<% if Request.Form("Method_Type") = "Topic" then %>
	<BR><img src="<%=strImageURL %>icon_blank.gif" border="0"><img src="<%=strImageURL %>icon_bar.gif" border="0"><img src="<%=strImageURL %>icon_folder_open_topic.gif" border="0">&nbsp;新的悄悄话信息发送成功<br>
<% end if %>
<% if Request.Form("Method_Type") = "ReplyQuote" or _
	Request.Form("Method_Type") = "Reply" then %>
	<BR><img src="<%=strImageURL %>icon_blank.gif" border="0"><img src="<%=strImageURL %>icon_bar.gif" border="0"><img src="<%=strImageURL %>icon_folder_open_topic.gif" border="0">&nbsp;<a href="<% =Request.Form("refer") %>">回复悄悄话 <% =Request.Form("Topic_Title")%></a>
<% end if %>
<% if Request.Form("Method_Type")="Forward" then %>
	<BR><img src="<%=strImageURL %>icon_blank.gif" border="0"><img src="<%=strImageURL %>icon_bar.gif" border="0"><img src="<%=strImageURL %>icon_folder_open_topic.gif" border="0">&nbsp;转发短讯 <A href="privateread.asp?id=<% =Request.Form("ID") %>"><% =ChkString(Request.Form("R_SUBJECT"),"title") %></A>
<% end if %>
</FONT></TD>
  </TR>
</TABLE>
</TD>
</TR>
</TABLE>
<% '################################## %>

<%	if boolOk = 1 then %>
<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">
<%

%>
</font></p>
<meta http-equiv="Refresh" content="1; URL=pm_view.asp">

<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">
<%
		select case Request.Form("Method_Type")

			case "Topic"
				Response.Write("你的讯息已送出")
			case "Reply"
				Response.Write("你的回复已送出")
			case "ReplyQuote"
				Response.Write("你的回复已送出")
			case "Forward"
				Response.Write("你的讯息已转送")
			case "Edit"
				Response.Write("感谢你的参与!")
			case else
				Response.Write("祝你有愉快的一天!")

		end select
%>
</font></p>

<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="pm_view.asp">返回悄悄话收件箱</font></a></p>

<!--#INCLUDE FILE="inc_footer.asp" -->
<%		Response.End %>
<%	Else %>
<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">发生问题!</font></p>

<p align="center"><font color="red" size="<% =strHeaderFontSize %>"><% =str_err_Msg %></font></p>

<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="JavaScript:history.go(-1)">返回修正问题。</a></font></p>

<!--#INCLUDE FILE="inc_footer.asp" -->
<%		Response.End %>
<%
	end if
End Sub

sub DoReplyEmail(PostedBy)
	'## Emails all users who wish to receive notification of private message
	

	'## Forum_SQL
	strSql = " SELECT " & strMemberTablePrefix & "MEMBERS.MEMBER_ID, " & strMemberTablePrefix & "MEMBERS.M_NAME, " & strMemberTablePrefix & "MEMBERS.M_EMAIL, " & strMemberTablePrefix & "MEMBERS.M_PMEMAIL, " & strMemberTablePrefix & "PM.M_SUBJECT "
	strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
	strSql = strSql & " INNER JOIN " & strTablePrefix & "PM "
	strSql = strSql & " ON         " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strTablePrefix & "PM.M_TO "
	strSql = strSql & " ORDER BY " & strTablePrefix & "PM.M_SENT  DESC"

	set rsTopicAuthor = my_Conn.Execute (strSql)
	
	
		strRecipientsName = rsTopicAuthor("M_NAME")
		strRecipients = rsTopicAuthor("M_EMAIL")
		strSubject = strForumTitle & " - 新的悄悄话讯息"
		strMessage = "Hello " & rsTopicAuthor("M_NAME") & vbCrLf & vbCrLf
	strMessage = strMessage & Request.Cookies(strUniqueID & "User")("Name") & "  从 " & strForumTitle & " 发了一条悄悄话讯息给你。" & vbCrLf
		if Request.Form("Subject") = "" then
		strMessage = strMessage & "是关於 - " & rsTopicAuthor("M_SUBJECT") & vbCrLf & vbCrLf
		else
		strMessage = strMessage & "标题是 - " & Request.Form("Subject") & vbCrLf & vbCrLf
		end if
		strMessage = strMessage & "你可以到这观看讯息 " & Left(Request.Form("refer"), InstrRev(Request.Form("refer"), "/")) & vbCrLf
%>
	<!--#INCLUDE FILE="inc_mail.asp" -->
<% end sub %>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -