功能:
1,清除所有引用
2,删除指定用户的评论
====================================================================
clear.asp
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" c />
<title>PJBLOG小工具</title>
<style>
body,td,tr,th,a{font-size:12px;}
input{border:1px solid #808080}
fieldset{padding:4 4 4 4; line-height:30px;}
</style>
</head>
<body>
<%
dim downurl,fileurl,showurl,rsid,linkclass
Const AccessFile="blogDB/数据库"
Set Conn= Server.CreateObject("ADODB.Connection")
Conn.C & Server.MapPath(AccessFile)
Conn.Open
if request.Form("btnclear")<>empty then
conn.execute("delete from blog_Trackback")
restr="所有引用已经全部清除"
end if
if request.Form("btndel")<>empty and request.Form("userid")<>"" then
conn.execute("delete from blog_Comment where comm_Author ='"&request.Form("userid")&"'")
restr="所指定的用户评论已成功删除"
end if
conn.close
set conn=nothing
%>
<form action="clear.asp" method="post">
<fieldset><legend>清除所有日志引用</legend>
<input name="btnclear" type="submit" id="btnclear" value=" 清 除 " />
</fieldset>
<fieldset><legend>批量删除指定用户的评论:</legend>
用户名:
<input name="userid" type="text" id="userid" />
<input name="btndel" type="submit" id="btndel" value=" 删 除 " />
</fieldset><br />
<span style="color:#CC0000"><%=restr%></span>
</form>
</body>
</html>
====================================================================
这个工具一直自个在用。感觉甚好。
主要是我BLOG常有垃圾引用和广告评论。只好写个工具来清理。
我的BLOG
http://www.pconcool.com
欢迎交换链接,日IP数2400左右
[
本帖最后由 pconcool 于 2007-1-4 10:37 编辑 ]