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

📄 reply_mod.asp

📁 一个超级漂亮的班级主页asp代码
💻 ASP
字号:
<!--插入html头部分以及数据库接口-->
<!--#include file="in_conn.asp"-->
<!--插入时间id的函数-->
<!--#include file="in_idtime.asp"-->
<!--获取发布内容字数限制-->
<!--#include file="in_talksize.asp"-->

<body>
<!--插入网站置顶-->
<% if u_name="" then
	Response.Redirect "log_err.asp"
else
%>
<!--#include file="in_topmb.asp"-->
<% end if %>


<table align="center" width="700" height="50" border="0" cellspacing="0" cellpadding="11" class="rdkuang"><tr>
	<td width="100%" height="100%" align="center">
<%
'获取传值
dim vcontent,vowner
dim vemo,vtid,vtbelong
vcontent=Request.Form("txtcontent")
vemo=CInt(Request.Form("rademotion"))
vtid=CLng(Request.Form("hidID"))

vkind=Request.Form("hid_kind")
'版面是否存在
dim kind_name
IF isNumeric(Request.Form("hid_kind")) THEN
	vkind=CLng(vkind)
	'找出该版面的相关信息
	sqlstr="SELECT kd_name FROM tblkind WHERE kd_ID="&vkind
	rs.open sqlstr,conn,1,1
		if rs.eof AND rs.bof then
			Response.Redirect "resp.asp?cmd=kindmiss"
		else
			kind_name=rs("kd_name")
		end if
	rs.close
ELSE
	Response.Redirect "resp.asp"
END IF



'检查正确性
IF vcontent="" OR LEN(vcontent)>DEF_talksize*1024 THEN
	response.Redirect "resp.asp"
END IF

'处理时间
dim vidfre
dim vtdate
vtdate=now()
vidfre=idtime(vtdate)


'找出相应记录
sqlstr="SELECT t_author,t_content,t_emotion,t_idfre,t_datefre,t_isreply,t_belong FROM tbltalk WHERE t_ID="&vtid
rs.open sqlstr,conn,1,3
	if rs.eof and rs.bof then
		response.Redirect "resp.asp?cmd=talk_idmiss"
	elseif rs("t_author")<>u_name then
		response.Redirect "resp.asp?cmd=talk_power"
	elseif rs("t_isreply")=false then
		response.Redirect "resp.asp?cmd=not_a_relpy"
	end if
	rs("t_idfre")=vidfre
	rs("t_datefre")=vtdate
	rs("t_content")=vcontent
	rs("t_emotion")=vemo
	rs.update
	'获取原主题ID
	vtbelong=rs("t_belong")
rs.close


'检查原主题,这时候vtbelong变量是原主题的id
sqlstr="SELECT t_emotion FROM tbltalk WHERE t_ID="&vtbelong
rs.open sqlstr,conn,1,1
		if rs.eof and rs.bof then
			response.Redirect "resp.asp?cmd=topic_lose"
		end if
'检查该主题是否带有投票
		IF rs("t_emotion")=0 THEN
			vttype="voteview.asp"
		ELSE
			vttype="talkview.asp"
		END IF
rs.close
%>

恭喜:编辑回复成功!
<table align="center" width="400" height="25" border="0">
<tr><td>
请选择接下来的操作:<font color="red">(系统在3秒后将自动转向您所回复的主题)</font>
<br><a href="<% =vttype %>?id=<% =vtbelong %>"><img src="img/icn_go.gif" border="0">返回您所回复的主题</a>
<br><a href='talklist.asp?kind=<% =vkind %>'><img src="img/icn_go.gif" border="0">返回到 <% =unhtml(kind_name) %></a>
<br><a href="talkbook.asp"><img src="img/icn_go.gif" border="0">返回[班级讨论区]</a>
<br><a href="index.asp"><img src="img/icn_go.gif" border="0">返回首页</a>
</td></tr>
</table>

	</td>
</tr></table>

<script defer language="javascript">
	setTimeout('location.href="<% =vttype %>?id=<% =vtbelong %>&page=end"',3000);
</script>

<br>
<!--插入在线统计-->
<!--#include file="in_online.asp"-->
<!--插入网站置底-->
<!--#include file="in_bottom.asp"-->
</body>

</html>

⌨️ 快捷键说明

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