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

📄 post_info.asp

📁 此程序是一个个人主页创造程序,该程序无插件,无任何恶意程序.
💻 ASP
📖 第 1 页 / 共 4 页
字号:
<%
'#############################################################
'#      中国在线--极酷论坛 ver.2001 3.0
'#
'#  版权所有: 中国在线 (ChinaXP.Net)
'#
'#  制作人  : 周周 (SeeYa!)
'#
'#
'#  主页地址: http://www.ChinaXP.net/    中国在线
'#	      http://www.ChinaXP.Net/bbs/    中国在线--极酷论坛
'#
'#############################################################
%>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_functions.asp" -->
<!--#INCLUDE FILE="inc_top.asp" -->
<%
Dim strEditedBy_AUTHOR, strReferBy_AUTHOR
strReferBy_AUTHOR = trim(Request.Form("refer"))
If strReferBy_AUTHOR = "" Then strReferBy_AUTHOR = "./"

if strAuthType = "db" then
	strDBNTUserName = Request.Form("UserName")
end if

set rs = Server.CreateObject("ADODB.RecordSet")

err_Msg = ""
ok = ""

'##################################################################
if (strAuthType = "nt") then
	set my_Conn = Server.CreateObject("ADODB.Connection")
	my_Conn.Open strConnString
	call NTauthenticate()
	if (ChkAccountReg() = "1") then
		call NTUser()
	end if
end if

'################ 获得 Forum Title & Topic Title ####################

strRqMethod = Request.Form("Method_Type")

if strRqMethod = "Edit" or _
     strRqMethod = "EditTopic" or _
     strRqMethod = "Reply" or _
     strRqMethod = "ReplyQuote" or _
     strRqMethod = "Topic" or _
     strRqMethod = "TopicQuote" then

	if Request.Form("FORUM_ID") <> "" then
		set rs_forum = Server.CreateObject("ADODB.RecordSet")
		'## Forum_SQL - Get the Forum Title
		strSql = "SELECT " & strTablePrefix & "FORUM.F_SUBJECT  "
		strSql = strSql & " FROM " & strTablePrefix & "FORUM "
		strSql = strSql & " WHERE " & strTablePrefix & "FORUM.FORUM_ID = " & Request.Form("FORUM_ID")

		set rs_forum = my_Conn.Execute (strSql)
		strSubForumTitle = rs_forum("F_SUBJECT")
		rs_forum.close
		set rs_forum = nothing
	end if

	if Request.Form("TOPIC_ID") <> "" then
		set rs_topic = Server.CreateObject("ADODB.RecordSet")
		'## Forum_SQL - Get the Topic Title
		strSql = "SELECT " & strTablePrefix & "TOPICS.T_SUBJECT "
		strSql = strSql & " FROM " & strTablePrefix & "TOPICS "
		strSql = strSql & " WHERE " & strTablePrefix & "TOPICS.TOPIC_ID = " & Request.Form("TOPIC_ID")

		set rs_topic = my_Conn.Execute (strSql)
		strTopicTitle = rs_topic("T_SUBJECT")
		rs_topic.close
		set rs_topic = nothing
	end if
end if

'##################################################################

if Request.Form("Method_Type") = "Edit" then
	member = cint(ChkUser(strDBNTUserName, Request.Form("Password")))
	Select Case Member
		case 0 '## Invalid Pword
			Go_Result "错误的用户名跟密码", 0
%>
<!--#INCLUDE FILE="inc_footer.asp" -->
<%
			Response.End
		case 1 '## Author of Post so OK
			'## Do Nothing
		case 2 '## Normal User - Not Authorised
			Go_Result "只有管理员、版主或作者才能修改此文章", 0
%>
<!--#INCLUDE FILE="inc_footer.asp" -->
<%
			Response.End
		case 3 '## Moderator so OK - check the Moderator of this forum
			if chkForumModerator(Request.Form("FORUM_ID"), STRdbntUserName) = "0" then
				Go_Result "只有管理员、版主或作者才能修改此文章", 0
			end if
		case 4 '## Admin so OK
			'## Do Nothing
		case else
			Go_Result cstr(Member), 0
%>
<!--#INCLUDE FILE="inc_footer.asp" -->
<%
			Response.End
	end select

	txtMessage = ChkString(Request.Form("Message"),"message")
	Err_Msg = ""

'	if txtMessage = " " then
'		Err_Msg = Err_Msg & "<li>不是吧你?内容都不写?</li>"
'	end if

	if ChkBadWords2(txtSubject) or ChkBadWords2(txtMessage) then
		Err_Msg = Err_Msg & "<FONT color=red>你填写的标题或内容包含不良词语,请注意!</FONT>"
	end if

	if Err_Msg = "" then
		if strEditedByDate = "1" and mlev < 4 then
			'#### Edited By - 下午 6:25 2001-09-28 - By Guozi [www.xhsoft.net] ####
			txtMessage = txtMessage & vbCrLf & vbCrLf & "<font size=""" & strFooterFontSize & """ color=""#000066"">[这个贴子最后由"
			txtMessage = txtMessage & ChkString(STRdbntUserName, "display") & "在 " & ChkDate(DateToStr(strForumTimeAdjust)) & " " & ChkTime(DateToStr(strForumTimeAdjust)) & " 编辑]</font>"
		end if

		'## Forum_SQL - Do DB Update
		strSql = "UPDATE " & strTablePrefix & "REPLY "
		strSql = strSql & " SET R_MESSAGE = '" & txtMessage & "'"
		if lcase(strEmail) = "1" then '**
			if Request.Form("rmail") <> "1" then
				TF = "0"
			else
				TF = "1"
			end if
			strSql = strSql & ", R_MAIL = " & TF
		end if
		if Request.Form("usericon")<>"" then
			strSql = strSql & ",     R_FACE = " & Request.Form("usericon")
		else
			strSql = strSql & ",     R_FACE = 0 "
		end if
		strSql = strSql & " WHERE REPLY_ID=" & Request.Form("REPLY_ID")

		my_Conn.Execute (strSql)

		if mLev <> 4 then
			'## Forum_SQL - Update Last Post
			strSql = " UPDATE " & strTablePrefix & "FORUM"
			strSql = strSql & " SET F_LAST_POST = '" & DateToStr(strForumTimeAdjust) & "'"
			strSql = strSql & ",    F_LAST_POST_AUTHOR = " & getMemberID(STRdbntUserName)
			strSql = strSql & " WHERE FORUM_ID = " & Request.Form("FORUM_ID")

			my_Conn.Execute (strSql)
			
			'## Forum_SQL - Update Last Post
			strSql = " UPDATE " & strTablePrefix & "TOPICS"
			strSql = strSql & " SET T_LAST_POST = '" & DateToStr(strForumTimeAdjust) & "'"
			strSql = strSql & ",    T_LAST_POST_AUTHOR = " & getMemberID(STRdbntUserName)
			strSql = strSql & " WHERE TOPIC_ID = " & Request.Form("TOPIC_ID")

			my_Conn.Execute (strSql)
		
		end if

		err_Msg = ""
		if Err.description <> "" then
			Go_Result "发生一个错误 →  " & Err.description, 0
%>
<!--#INCLUDE FILE="inc_footer.asp" -->
<%
			Response.End
		else
			Go_Result "更新完成", 1
		end if

		'## Forum_SQL
		strSql = "UPDATE " & strTablePrefix & "TOPICS "
		strSql = strSql & " SET T_LAST_POST = '" & DateToStr(strForumTimeAdjust) & "'"
		strSql = strSql & ",    T_LAST_POST_AUTHOR = " & getMemberID(STRdbntUserName)
		strSql = strSql & " WHERE TOPIC_ID = " & Request.Form("TOPIC_ID")

		my_Conn.Execute (strSql)

		err_Msg = ""
		if Err.description <> "" then
			Go_Result "发生一个错误 →  " & Err.description, 0
%>
<!--#INCLUDE FILE="inc_footer.asp" -->
<%
			Response.End
		else
			Go_Result  "更新完成", 1
%>
<!--#INCLUDE FILE="inc_footer.asp" -->
<%
			Response.End
		end if
	else
		Go_Result Err_Msg, 0
	end if
end if

if Request.Form("Method_Type") = "EditTopic" then
	member = cint(ChkUser(STRdbntUserName, Request.Form("Password")))
	select case Member
		case 0 '## Invalid Pword
			Go_Result "错误的用户名跟密码", 0
%>
<!--#INCLUDE FILE="inc_footer.asp" -->
<%
			Response.End
		case 1 '## Author of Post so OK
			'## Do Nothing
		case 2 '## Normal User - Not Authorised
			Go_Result "只有管理员、版主或作者才能修改此文章", 0
%>
<!--#INCLUDE FILE="inc_footer.asp" -->
<%
			Response.End
		case 3 '## Moderator so
			if chkForumModerator(Request.Form("FORUM_ID"), STRdbntUserName) = "0" then
				Go_Result "只有管理员、版主或作者才能修改此文章", 0
			end if
		case 4 '## Admin so OK
			'## Do Nothing
		case else
			Go_Result cstr(Member), 0
%>
<!--#INCLUDE FILE="inc_footer.asp" -->
<%
			Response.End
	end select

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

	if txtSubject = " " then
		Err_Msg = Err_Msg & "<li>你必须输入文章标题</li>"
	end if
'	if txtMessage = " " then
'		Err_Msg = Err_Msg & "<li>你必须输入文章内容</li>"
'	end if
	if ChkBadWords2(txtSubject) or ChkBadWords2(txtMessage) then
		Err_Msg = Err_Msg & "<FONT color=red>你填写的标题或内容包含不良词语,请注意!</FONT>"
	end if

	if Err_Msg = "" then
		if strEditedByDate = "1" and mlev < 4 then
			'#### Edited By - 下午 6:25 2001-09-28 - By Guozi [www.xhsoft.net] ####
			txtMessage = txtMessage & vbCrLf & vbCrLf & "<font size=""" & strFooterFontSize & """ color=""#000066"">[这个贴子最后由"
			txtMessage = txtMessage & Chkstring(STRdbntUserName, "display") & "在 " & ChkDate(DateToStr(strForumTimeAdjust)) & " " & ChkTime(DateToStr(strForumTimeAdjust)) & " 编辑]</font>"
		end if

		'## Set array to pull out CAT_ID and FORUM_ID from dropdown values in post.asp
		aryForum = split(Request.Form("Forum"), "|")

		'## Forum_SQL
		strSql = "UPDATE " & strTablePrefix & "TOPICS "
		strSql = strSql & " SET T_MESSAGE = '" & txtMessage & "'"
		strSql = strSql & ",     T_SUBJECT = '" & txtSubject & "'"
		if Request.Form("usericon")<>"" then
			strSql = strSql & ",     T_FACE = " & Request.Form("usericon")
		else
			strSql = strSql & ",     T_FACE = 0 "
		end if
		if Request.Form("FORUM_ID") <> "" and Request.Form("FORUM_ID") <> aryForum(1) then
			strSql = strSql & ",     CAT_ID = " & aryForum(0)
			strSql = strSql & ",     FORUM_ID = " & aryForum(1)
		end if
		if lcase(strEmail) = "1" then '**
			if Request.Form("rmail") <> "1" then
				TF = "0"
			else
				TF = "1"
			end if
			strSql = strSql & ",     T_MAIL = " & TF
		end if
		strSql = strSql & " WHERE TOPIC_ID = " & Request.Form("TOPIC_ID")

		my_Conn.Execute(strSql)

		if Request.Form("FORUM_ID") <> aryForum(1) then
			'## Forum_SQL
			strSql = "UPDATE " & strTablePrefix & "REPLY "
			strSql = strSql & " SET CAT_ID = " & aryForum(0)
			strSql = strSql & ",     FORUM_ID = " & aryForum(1)
			strSql = strSql & " WHERE TOPIC_ID = " & Request.Form("TOPIC_ID")

			my_Conn.Execute(strSql)
			
			set rs = Server.CreateObject("ADODB.Recordset")
			
			'## Forum_SQL - count total number of replies in Topics table
			strSql = "SELECT T_REPLIES, T_LAST_POST, T_LAST_POST_AUTHOR "
			strSql = strSql & " FROM " & strTablePrefix & "TOPICS "
			strSql = strSql & " WHERE TOPIC_ID = " & Request.Form("TOPIC_ID")

			set rs = my_Conn.Execute (strSql)
			
			intResetCount = rs("T_REPLIES") + 1
			strT_Last_Post = rs("T_LAST_POST")
			strT_Last_Post_Author = rs("T_LAST_POST_AUTHOR")
			
			rs.Close
			set rs = nothing

			'## Forum_SQL - Get last_post and last_post_author for MoveFrom-Forum
			strSql = "SELECT T_LAST_POST, T_LAST_POST_AUTHOR, TOPIC_ID "
			strSql = strSql & " FROM " & strTablePrefix & "TOPICS "
			strSql = strSql & " WHERE FORUM_ID = " & Request.Form("FORUM_ID") & " "
			strSql = strSql & " ORDER BY T_LAST_POST DESC;"

			set rs = my_Conn.Execute (strSql)
			
			if not rs.eof then
				strLast_Post = rs("T_LAST_POST")
				strLast_Reply = rs("TOPIC_ID")
				strLast_Post_Author = rs("T_LAST_POST_AUTHOR")
			else
				strLast_Post = ""
				strLast_Reply = ""
				strLast_Post_Author = ""
			end if
			
			rs.Close
			set rs = nothing

			'## Forum_SQL - Update count of replies to a topic in Forum table
			strSql = "UPDATE " & strTablePrefix & "FORUM SET "
			strSql = strSql & " F_COUNT = F_COUNT - " & intResetCount
			if strLast_Post <> "" then
				strSql = strSql & ", F_LAST_POST = '" & strLast_Post & "'"
				if strLast_Reply <> "" then
					strSql = strSql & ", F_LAST_REPLY = " & strLast_Reply
				end if
				if strLast_Post_Author <> "" then
					strSql = strSql & ", F_LAST_POST_AUTHOR = " & strLast_Post_Author
				end if
			end if
			strSql = strSql & " WHERE FORUM_ID = " & Request.Form("FORUM_ID")
			my_Conn.Execute(strSql)

			'## Forum_SQL
			strSql =  "UPDATE " & strTablePrefix & "FORUM SET "
			strSql = strSql & " F_TOPICS = F_TOPICS - 1 "
			strSql = strSql & " WHERE FORUM_ID = " & Request.Form("FORUM_ID")
			my_Conn.Execute(strSql)

			'## Forum_SQL - Get last_post and last_post_author for Forum
			strSql = "SELECT T_LAST_POST, T_LAST_POST_AUTHOR, TOPIC_ID "
			strSql = strSql & " FROM " & strTablePrefix & "TOPICS "
			strSql = strSql & " WHERE FORUM_ID = " & aryForum(1) & " "
			strSql = strSql & " ORDER BY T_LAST_POST DESC;"

			set rs = my_Conn.Execute (strSql)
			
			if not rs.eof then
				strLast_Post = rs("T_LAST_POST")
				strLast_Reply = rs("TOPIC_ID")
				strLast_Post_Author = rs("T_LAST_POST_AUTHOR")
			else
				strLast_Post = ""
				strLast_Reply = ""
				strLast_Post_Author = ""
			end if
			
			rs.Close
			set rs = nothing

			'## Forum_SQL - Update count of replies to a topic in Forum table
			strSql = "UPDATE " & strTablePrefix & "FORUM SET "
			strSql = strSql & " F_COUNT = (F_COUNT + " & intResetCount & ")"
			if strLast_Post <> "" then
				strSql = strSql & ", F_LAST_POST = '" & strLast_Post & "'"
				if strLast_Reply <> "" then
					strSql = strSql & ", F_LAST_REPLY = " & strLast_Reply
				end if
				if strLast_Post_Author <> "" then
					strSql = strSql & ", F_LAST_POST_AUTHOR = " & strLast_Post_Author
				end if
			end if
			strSql = strSql & " WHERE FORUM_ID = " & aryForum(1)
			my_Conn.Execute(strSql)

			'## Forum_SQL
			strSql =  "UPDATE " & strTablePrefix & "FORUM SET "
			strSql = strSql & " F_TOPICS = F_TOPICS + 1 "
			strSql = strSql & " WHERE FORUM_ID = " & aryForum(1)
			my_Conn.Execute(strSql)

		end if
		err_Msg = ""
		aryForum = ""
		if Err.description <> "" then
			Go_Result "发生一个错误 →  " & Err.description, 0
%>
<!--#INCLUDE FILE="inc_footer.asp" -->
<%
			Response.End
		else
			Go_Result  "更新完成", 1
		end if
	else
		Go_Result Err_Msg, 0
	end if
end if

if Request.Form("Method_Type") = "Topic" then
	'## Forum_SQL
	strSql = "SELECT MEMBER_ID, M_LEVEL, M_EMAIL, "&Strdbntsqlname
	if strAuthType = "db" then
		strSql = strSql & ", M_PASSWORD "
	end if
	strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
	strSql = strSql & " WHERE "&Strdbntsqlname&" = '" & STRdbntUserName & "'"
	strSql = strSql & " AND " & strMemberTablePrefix & "MEMBERS.M_STATUS = " & 1
	if strAuthType = "db" then
		strSql = strSql & " AND   M_PASSWORD = '" & Request.Form("Password") &"'"
		QuoteOk = (ChkQuoteOk(STRdbntUserName) and ChkQuoteOk(Request.Form("Password")))
	else

⌨️ 快捷键说明

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