📄 update.asp
字号:
<!--#include file="connbbs.asp"-->
<% if session("user")="" then
response.redirect "../err.asp"
end if
articleid=trim(request("articleid"))
articleid=replace(articleid,"'","")
rootid=trim(request("rootid"))
rootid=replace(rootid,"'","")
bbsid=trim(request("bbsid"))
bbsid=replace(bbsid,"'","")
user=trim(request("user"))
user=replace(user,"'","")
title=trim(request("title"))
title=replace(title,"'","")
if title="" then%>
<script language=vbscript>
MsgBox "对不起,标题不能为空!"
location.href = "javascript:history.back()"
</script>
<%end if
expression=trim(request("Expression"))
titleimg="images/"&expression&".gif"
if not isnumeric(rootid) then
response.redirect "../err.asp"
end if
if not isnumeric(bbsid) then
response.redirect "../err.asp"
end if
contents=trim(request("body"))
contents=replace(contents,"'","")
if request("signflag")="yes" then
signflag=1
else signflag=0
end if
if request("emailflag")="yes" then
emailflag=1
else emailflag=0
end if
lasttime=year(now())&"-"&month(now())&"-"&day(now())&" "&hour(now())&":"&minute(now())&":"&second(now())
set rs=server.createobject("ADODB.recordset")
sql="select * from bbs where id="&articleid&" order by id desc"
rs.open sql,conn,1,1
if rs.bof and rs.eof then%>
<% if rs("locktitle")=1 then%>
<script language=vbscript>
MsgBox "对不起,本贴已被管理员锁定,请与管理员联系!"
location.href = "javascript:history.back()"
</script>
<% end if%>
<%else
conn.execute"update bbs set user='"&user&"',titleimg='"&titleimg&"',title='"&title&"',contents='"&contents&"',lasttime=#"&lasttime&"#,signflag="&signflag&",emailflag="&emailflag&" where id="&articleid&" and bbsid="&bbsid&" and rootid="&rootid
end if
rs.close
conn.close
set conn=nothing
response.redirect "main.asp?bbsid="&bbsid
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -