|
【技巧】记录用户所有的修改痕迹
昨天发了一个禁止显示编辑痕迹,今天相反地,要做记录所有编辑痕迹的修改。这可能是两个完全相反的东西,不一定要用,但很有趣,以安全性管理也很有帮助,有兴趣的帮忙测试。
演示:http://wensui.com/bbs/announce/announce.asp?boardid=128&id=64924
修改:announce/editannounce.asp,
文件开头,
def_bbs_homeurl = "../"
下面加上一行:
------------
dim form_otherinfo
--------
1100多行,找到:
--------------------------------
if supervisorflag = 0 and (form_userid <> gbl_userid or datediff("s",restoretime(form_ndatetime),def_now) > def_editannouncedelay) then sql = sql & ",otherinfo='这个贴子最后由" & replace(gbl_chk_user,"'","''") & "在" & def_now & "编辑过" & "'"
-------------------------
修改为:
-----------------------
sql = sql & ",otherinfo='这个贴子最后由" & replace(gbl_chk_user,"'","''") & "在" & def_now & "编辑过" & "<br>" & form_otherinfo & "'"
--------------------------------
1300多行找到:
--------------------------
sql = "select rootid,title,boardid,rootidbak,titlestyle,parentid,htmlflag,printcontent,content,faceicon,ndatetime,length,username,userid,underwriteflag,notreplay,topictype,needvalue,goodassort from leadbbs_announce where id=" & form_editannounceid
-------------------------
-------------------------
sql = "select rootid,title,boardid,rootidbak,titlestyle,parentid,htmlflag,printcontent,content,faceicon,ndatetime,length,username,userid,underwriteflag,notreplay,topictype,needvalue,goodassort,otherinfo from leadbbs_announce where id=" & form_editannounceid
--------------------------------
往下找到:
-----------------------------
form_htmlflag = ccur(rs("htmlflag"))
-------------------
下面加上:
------------------------
form_otherinfo = rs("otherinfo")
http://w.leadbbs.com/a/a.asp?b=200&id=1782549 |
|