?? reply_mod.asp
字號:
<!--插入html頭部分以及數(shù)據(jù)庫接口-->
<!--#include file="in_conn.asp"-->
<!--插入時(shí)間id的函數(shù)-->
<!--#include file="in_idtime.asp"-->
<!--獲取發(fā)布內(nèi)容字?jǐn)?shù)限制-->
<!--#include file="in_talksize.asp"-->
<body>
<!--插入網(wǎng)站置頂-->
<% 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)
'找出該版面的相關(guān)信息
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
'處理時(shí)間
dim vidfre
dim vtdate
vtdate=now()
vidfre=idtime(vtdate)
'找出相應(yīng)記錄
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
'檢查原主題,這時(shí)候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
%>
恭喜:編輯回復(fù)成功!
<table align="center" width="400" height="25" border="0">
<tr><td>
請選擇接下來的操作:<font color="red">(系統(tǒng)在3秒后將自動(dòng)轉(zhuǎn)向您所回復(fù)的主題)</font>
<br><a href="<% =vttype %>?id=<% =vtbelong %>"><img src="img/icn_go.gif" border="0">返回您所回復(fù)的主題</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">返回[班級討論區(qū)]</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>
<!--插入在線統(tǒng)計(jì)-->
<!--#include file="in_online.asp"-->
<!--插入網(wǎng)站置底-->
<!--#include file="in_bottom.asp"-->
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -