pjblog首页及全站日志纯静态插件v1.1[6月7日更新]
作者:小戒 日期:2007-05-27
整站静态FOR PJBLOG V2.6
作者:戒聊
网址:http://www.muzili.com
已在干净PJBLOG V2.6上测试成功。演示:http://www.muzili.com/pjblog,用户名:admin 密码:admin88
转载请注明来源,谢谢合作。
6月7日更新:优化查看次数调用代码,减小压力,运行更快。修改文件:cls_article.asp和cls_default.asp及压缩包中的comm.asp和view.asp。
*********************************************
改动的东西比较多,请做好备份。
解压,直接上传到BLOG目录。
.makehtml.asp(生成首页静态页面)第七行:为首页静态文件名,按你的需要修改。按本文章修改完所有过程后运行文件后可删除。
2.makehtml_cate.asp(生成所有日志页面)第三十行:,修改成你的BLOG地址。按本文章修改完所有过程后运行文件后可删除。
3.打开common\library.asp文件,在第二行开始添加以下代码(同样将其中的网址改成你的):
找到:
修改成:
4.打开blogpost.asp,找到第66行,在下面插入如下代码:
找到:
修改成:
5.打开blogedit.asp,找到第7行,在下面插入如下代码:
找到第85行,在下面插入:
6.打开blogcomm.asp,找到第67行
在其下插入如下代码:
找到:
在下面插入
找到,修改成
找到,修改成
7.打开class下的cls_article.asp文件,找到,修改成,找到,修改成
找到:
修改成:
找到:
修改成:
找到:
修改成:
8.打开class下的cls_default.asp文件,找到所有的:
批量替换成
找到
替换成:
找到:
替换成:
9.PLUGINS目录下的文件直接覆盖。完后需要到后台修复插件。
.打开ConContent.asp,找到:
找到:
在上面插入一行:
**************************************************************
如果加了我的后台日志管理插件,需要做如下修改:
找到
在后面插入一行:
找到:
修改成:
****************************************************************
找到:
在下面插入:
找到:
在下面加入一行:
找到:
在下面加入:
找到:
在下面加入:
找到:
在下面加入:
找到:
在下面加入:
找到:
在下面加入:
找到:
在下面加入:
2.打开common下的function.asp
从第二行开始插入:
3.打开header.asp
找到:
替换成:
4.用DM搜索所有的,替换成。注意要带上双引号。
5.进入后台管理,站点基本设置,取消静态日志模式。
6.进入后台管理,站点基本设置,初始化数据,刷新所有JS文件。
点击下载此文件
如果有朋友需要原版修改好的PJBLOG,请到http://bbs.pjhelp.cn/viewthread.php?tid=9053&page=&extra=page%3D下载。我的流量不够。呵呵。
作者:戒聊
网址:http://www.muzili.com
已在干净PJBLOG V2.6上测试成功。演示:http://www.muzili.com/pjblog,用户名:admin 密码:admin88
转载请注明来源,谢谢合作。
6月7日更新:优化查看次数调用代码,减小压力,运行更快。修改文件:cls_article.asp和cls_default.asp及压缩包中的comm.asp和view.asp。
*********************************************
改动的东西比较多,请做好备份。
解压,直接上传到BLOG目录。
.makehtml.asp(生成首页静态页面)第七行:
复制内容到剪贴板
程序代码
程序代码index.htm
2.makehtml_cate.asp(生成所有日志页面)第三十行:
复制内容到剪贴板
程序代码
程序代码http://www.muzili.com
3.打开common\library.asp文件,在第二行开始添加以下代码(同样将其中的网址改成你的):
复制内容到剪贴板
程序代码
程序代码function blog_makehtml(log_id)
dim strUrl,id,FileName,FilePath,Do_Url,Html_Temp
Do_Url = "http://www.muzili.com"
if log_id<0 then
FileName = "index.htm"
Do_Url = Do_Url&"/default.asp"
else
FileName = "article"&log_id&".html"
Do_Url = Do_Url&"/article.asp?id="&log_id
end if
FilePath = Server.MapPath("/")&"\"&FileName
Html_Temp = Html_Temp&FilePath
strUrl = Do_Url
dim objXmlHttp
set objXmlHttp = Server.Cr�ateObject("Microsoft.XMLHTTP")
objXmlHttp.open "GET",strUrl,false
objXmlHttp.send()
Dim binFileData
binFileData = objXmlHttp.responseBody
Dim objAdoStream
set objAdoStream = Server.Cr�ateObject("ADODB.Stream")
objAdoStream.Type =
objAdoStream.Open()
objAdoStream.Write(binFileData)
objAdoStream.SaveToFile FilePath,2
objAdoStream.Close()
end function
dim strUrl,id,FileName,FilePath,Do_Url,Html_Temp
Do_Url = "http://www.muzili.com"
if log_id<0 then
FileName = "index.htm"
Do_Url = Do_Url&"/default.asp"
else
FileName = "article"&log_id&".html"
Do_Url = Do_Url&"/article.asp?id="&log_id
end if
FilePath = Server.MapPath("/")&"\"&FileName
Html_Temp = Html_Temp&FilePath
strUrl = Do_Url
dim objXmlHttp
set objXmlHttp = Server.Cr�ateObject("Microsoft.XMLHTTP")
objXmlHttp.open "GET",strUrl,false
objXmlHttp.send()
Dim binFileData
binFileData = objXmlHttp.responseBody
Dim objAdoStream
set objAdoStream = Server.Cr�ateObject("ADODB.Stream")
objAdoStream.Type =
objAdoStream.Open()
objAdoStream.Write(binFileData)
objAdoStream.SaveToFile FilePath,2
objAdoStream.Close()
end function
找到:
复制内容到剪贴板
程序代码
程序代码'用户面板处理
Dim user_code
user_code=userPanel
side_html_default=replace(side_html_default,"$user_code$",user_code)
side_html=replace(side_html,"$user_code$",user_code)
'归档面板处理
Dim archive_code
archive_code=archive()
side_html_default=replace(side_html_default,"$archive_code$",archive_code)
side_html=replace(side_html,"$archive_code$",archive_code)
'树形分类处理
CategoryList()
side_html_default=replace(side_html_default,"$Category_code$",Category_code)
side_html=replace(side_html,"$Category_code$",Category_code)
'显示统计信息
side_html_default=info_code(side_html_default)
side_html=info_code(side_html)
'处理最新评论内容
Dim Comment_code
Comment_code=NewComment()
side_html_default=replace(side_html_default,"$comment_code$",Comment_code)
side_html=replace(side_html,"$comment_code$",Comment_code)
'处理友情链接内容
Dim Link_Code
Link_Code=Bloglinks()
side_html_default=replace(side_html_default,"$Link_Code$",Link_Code)
side_html=replace(side_html,"$Link_Code$",Link_Code)
Dim user_code
user_code=userPanel
side_html_default=replace(side_html_default,"$user_code$",user_code)
side_html=replace(side_html,"$user_code$",user_code)
'归档面板处理
Dim archive_code
archive_code=archive()
side_html_default=replace(side_html_default,"$archive_code$",archive_code)
side_html=replace(side_html,"$archive_code$",archive_code)
'树形分类处理
CategoryList()
side_html_default=replace(side_html_default,"$Category_code$",Category_code)
side_html=replace(side_html,"$Category_code$",Category_code)
'显示统计信息
side_html_default=info_code(side_html_default)
side_html=info_code(side_html)
'处理最新评论内容
Dim Comment_code
Comment_code=NewComment()
side_html_default=replace(side_html_default,"$comment_code$",Comment_code)
side_html=replace(side_html,"$comment_code$",Comment_code)
'处理友情链接内容
Dim Link_Code
Link_Code=Bloglinks()
side_html_default=replace(side_html_default,"$Link_Code$",Link_Code)
side_html=replace(side_html,"$Link_Code$",Link_Code)
修改成:
复制内容到剪贴板
程序代码
程序代码'用户面板处理
side_html_default=replace(side_html_default,"$user_code$","<SCRIPT LANGUAGE=""JavaScript"" SRC=""userPanel.asp""></SCRIPT>")
side_html=replace(side_html,"$user_code$","<SCRIPT LANGUAGE=""JavaScript"" SRC=""userPanel.asp""></SCRIPT>")
'归档面板处理
side_html_default=replace(side_html_default,"$archive_code$","<SCRIPT LANGUAGE=""JavaScript"" SRC=""js/archive.js"" charset=""gb232""></SCRIPT>")
side_html=replace(side_html,"$archive_code$","<SCRIPT LANGUAGE=""JavaScript"" SRC=""js/archive.js"" charset=""gb232""></SCRIPT>")
'树形分类处理
side_html_default=replace(side_html_default,"$Category_code$","<SCRIPT LANGUAGE=""JavaScript"" SRC=""js/Category_s.js"" charset=""gb232""></SCRIPT>")
side_html=replace(side_html,"$Category_code$","<SCRIPT LANGUAGE=""JavaScript"" SRC=""js/Category_s.js"" charset=""gb232""></SCRIPT>")
'显示统计信息
side_html_default=info_code(side_html_default)
side_html=info_code(side_html)
'处理最新评论内容
side_html_default=replace(side_html_default,"$comment_code$","<SCRIPT LANGUAGE=""JavaScript"" SRC=""js/NewComment.js"" charset=""gb232""></SCRIPT>")
side_html=replace(side_html,"$comment_code$","<SCRIPT LANGUAGE=""JavaScript"" SRC=""js/NewComment.js"" charset=""gb232""></SCRIPT>")
'处理友情链接内容
side_html_default=replace(side_html_default,"$Link_Code$","<SCRIPT LANGUAGE=""JavaScript"" SRC=""js/bloglinks.js"" charset=""gb232""></SCRIPT>")
side_html=replace(side_html,"$Link_Code$","<SCRIPT LANGUAGE=""JavaScript"" SRC=""js/bloglinks.js"" charset=""gb232""></SCRIPT>")
side_html_default=replace(side_html_default,"$user_code$","<SCRIPT LANGUAGE=""JavaScript"" SRC=""userPanel.asp""></SCRIPT>")
side_html=replace(side_html,"$user_code$","<SCRIPT LANGUAGE=""JavaScript"" SRC=""userPanel.asp""></SCRIPT>")
'归档面板处理
side_html_default=replace(side_html_default,"$archive_code$","<SCRIPT LANGUAGE=""JavaScript"" SRC=""js/archive.js"" charset=""gb232""></SCRIPT>")
side_html=replace(side_html,"$archive_code$","<SCRIPT LANGUAGE=""JavaScript"" SRC=""js/archive.js"" charset=""gb232""></SCRIPT>")
'树形分类处理
side_html_default=replace(side_html_default,"$Category_code$","<SCRIPT LANGUAGE=""JavaScript"" SRC=""js/Category_s.js"" charset=""gb232""></SCRIPT>")
side_html=replace(side_html,"$Category_code$","<SCRIPT LANGUAGE=""JavaScript"" SRC=""js/Category_s.js"" charset=""gb232""></SCRIPT>")
'显示统计信息
side_html_default=info_code(side_html_default)
side_html=info_code(side_html)
'处理最新评论内容
side_html_default=replace(side_html_default,"$comment_code$","<SCRIPT LANGUAGE=""JavaScript"" SRC=""js/NewComment.js"" charset=""gb232""></SCRIPT>")
side_html=replace(side_html,"$comment_code$","<SCRIPT LANGUAGE=""JavaScript"" SRC=""js/NewComment.js"" charset=""gb232""></SCRIPT>")
'处理友情链接内容
side_html_default=replace(side_html_default,"$Link_Code$","<SCRIPT LANGUAGE=""JavaScript"" SRC=""js/bloglinks.js"" charset=""gb232""></SCRIPT>")
side_html=replace(side_html,"$Link_Code$","<SCRIPT LANGUAGE=""JavaScript"" SRC=""js/bloglinks.js"" charset=""gb232""></SCRIPT>")
4.打开blogpost.asp,找到第66行
复制内容到剪贴板
程序代码
程序代码<%if postLog(0)>=0 then %>
复制内容到剪贴板
程序代码
程序代码<%
call Newarticle()
call blog_makehtml(postLog(2))
call blog_makehtml(-)
%>
call Newarticle()
call blog_makehtml(postLog(2))
call blog_makehtml(-)
%>
找到:
复制内容到剪贴板
程序代码
程序代码 <a href="default.asp?id=<%=postLog(2)%>">返回你所发表的日志</a><br/>
<meta http-equiv="refresh" content="3;url=default.asp?logID=<%=postLog(2)%
>"/>
<meta http-equiv="refresh" content="3;url=default.asp?logID=<%=postLog(2)%
>"/>
修改成:
复制内容到剪贴板
程序代码
程序代码<a href="article<%=postLog(2)%>.html">返回你所发表的日志</a><br/>
<meta http-equiv="refresh" content="3;url=article<%=postLog(2)%>.html"/>
<meta http-equiv="refresh" content="3;url=article<%=postLog(2)%>.html"/>
5.打开blogedit.asp,找到第7行
复制内容到剪贴板
程序代码
程序代码<%if EditLog(0)>=0 then %>
复制内容到剪贴板
程序代码
程序代码<%
call blog_makehtml(EditLog(2))
call blog_makehtml(-)
call Newarticle()
%>
call blog_makehtml(EditLog(2))
call blog_makehtml(-)
call Newarticle()
%>
找到第85行
复制内容到剪贴板
程序代码
程序代码 Del�teLog=lArticle.del�teLog(request("id"))
复制内容到剪贴板
程序代码
程序代码dim fileurl
fileurl="article"&request("id")&".html"
call delfile(fileurl)
call blog_makehtml(-)
call Newarticle()
call NewComment()
fileurl="article"&request("id")&".html"
call delfile(fileurl)
call blog_makehtml(-)
call Newarticle()
call NewComment()
6.打开blogcomm.asp,找到第67行
复制内容到剪贴板
程序代码
程序代码Conn.ExeCute("up�ate blog_Info set blog_CommNums=blog_CommNums-")
在其下插入如下代码:
复制内容到剪贴板
程序代码
程序代码 call NewComment()
call blog_makehtml(logid)
call blog_makehtml(logid)
找到:
复制内容到剪贴板
程序代码
程序代码Session(CookieName&"_LastDo")="AddComment"
postcomm=ReInfo
postcomm=ReInfo
在下面插入
复制内容到剪贴板
程序代码
程序代码call blog_makehtml(post_logID)
call NewComment()
call NewComment()
找到
复制内容到剪贴板
程序代码
程序代码"default.asp?id="&post_logID&""
复制内容到剪贴板
程序代码
程序代码"article"&post_logID&".html"
找到
复制内容到剪贴板
程序代码
程序代码"default.asp?id="&blog_Comm("blog_ID")&""
复制内容到剪贴板
程序代码
程序代码"article"&blog_Comm("blog_ID")&".html"
7.打开class下的cls_article.asp文件,找到
复制内容到剪贴板
程序代码
程序代码""?id="&preLog("log_ID")&"""
复制内容到剪贴板
程序代码
程序代码""article"&preLog("log_ID")&".html""
复制内容到剪贴板
程序代码
程序代码""?id="&nextLog("log_ID")&"""
复制内容到剪贴板
程序代码
程序代码""article"&nextLog("log_ID")&".html""
找到:
复制内容到剪贴板
程序代码
程序代码<%if stat_EditAll o (stat_Edit and log_ViewArr(5,0)=memName) then %> <a href="blogedit.asp?id=<%=log_ViewArr(0,0)%>" title="编辑该日志" accesskey="E"><img src="images/icon_edit.gif" alt="" border="0" style="margin-bottom:-2px"/></a><%end if%> <%if stat_DelAll o (stat_Del and log_ViewArr(5,0)=memName) then %> <a href="blogedit.asp?action=del&id=<%=log_ViewArr(0,0)%>" onclick="if (!window.confirm('是否要删除该日志')) return false" accesskey="K"><img src="images/icon_del.gif" alt="" border="0" style="margin-bottom:-2px"/></a><%end if%>
修改成:
复制内容到剪贴板
程序代码
程序代码 <SCRIPT language="javascript" src="editanddel.asp?ViewArr=<%=log_ViewArr(5,0)%>&id=<%=log_ViewArr(0,0)%>"></SCRIPT>
找到:
复制内容到剪贴板
程序代码
程序代码<div class="Content-bottom"><div class="ContentBLeft"></div><div class="ContentBRight"></div>评论: <%=log_ViewArr(2,0)%> | 引用: <%=log_ViewArr(3,0)%> | 查看次数: <%=log_ViewArr(4,0)%>
修改成:
复制内容到剪贴板
程序代码
程序代码<div class="Content-bottom"><div class="ContentBLeft"></div><div class="ContentBRight"></div><SCRIPT LANGUAGE="JavaScript" SRC="view.asp?id=<%=id%>"></SCRIPT>
找到:
复制内容到剪贴板
程序代码
程序代码<%if stat_Admin=true o (stat_CommentDel=true and memName=blog_CommAuthor) then response.write (" | <a href=""blogcomm.asp?action=del&commID="&blog_CommID&""" onclick=""if (!window.confirm('是否删除该评论?')) {return false}""><img src=""images/del.gif"" alt=""删除该评论"" border=""0""/></a>") end if%>
修改成:
复制内容到剪贴板
程序代码
程序代码<SCRIPT LANGUAGE="JavaScript" SRC="commdel.asp?commid=<%=blog_CommID%>&CommAuthor=<%=blog_CommAuthor%>"></SCRIPT>
8.打开class下的cls_default.asp文件,找到所有的:
复制内容到剪贴板
程序代码
程序代码"article.asp?id=<%=webLogArr(0,PageCount)%>"
批量替换成
复制内容到剪贴板
程序代码
程序代码"article<%=webLogArr(0,PageCount)%>.html"
找到
复制内容到剪贴板
程序代码
程序代码"default.asp?id=<%=webLogArr(0,PageCount)%>"
替换成:
复制内容到剪贴板
程序代码
程序代码"article<%=webLogArr(0,PageCount)%>.html"
找到:
复制内容到剪贴板
程序代码
程序代码<%if webLogArr(3,PageCount)=true then%>
禁止评论
<%Else%>
<a href="article.asp?id=<%=webLogArr(0,PageCount)%>#comm_top">评论: <%=webLogArr(6,PageCount)%></a>
<%end If%>
| 引用: <%=webLogArr(7,PageCount)%> | 查看次数: <%=webLogArr(8,PageCount)%>
<%if stat_EditAll o (stat_Edit and webLogArr(2,PageCount)=memName) then%>
| <a href="blogedit.asp?id=<%=webLogArr(0,PageCount)%>"><img src="images/icon_edit.gif" alt="" border="0" style="margin-bottom:-2px"/></a>
<%end if%>
<%if stat_DelAll o (stat_Del and webLogArr(2,PageCount)=memName) then%>
| <a href="blogedit.asp?action=del&id=<%=webLogArr(0,PageCount)%>"
onclick="if (!window.confirm('是否要删除该日志')) return false"><img src="images/icon_del.gif" alt="" border="0" style="margin-bottom:-2px"/></a>
<%end if%>
禁止评论
<%Else%>
<a href="article.asp?id=<%=webLogArr(0,PageCount)%>#comm_top">评论: <%=webLogArr(6,PageCount)%></a>
<%end If%>
| 引用: <%=webLogArr(7,PageCount)%> | 查看次数: <%=webLogArr(8,PageCount)%>
<%if stat_EditAll o (stat_Edit and webLogArr(2,PageCount)=memName) then%>
| <a href="blogedit.asp?id=<%=webLogArr(0,PageCount)%>"><img src="images/icon_edit.gif" alt="" border="0" style="margin-bottom:-2px"/></a>
<%end if%>
<%if stat_DelAll o (stat_Del and webLogArr(2,PageCount)=memName) then%>
| <a href="blogedit.asp?action=del&id=<%=webLogArr(0,PageCount)%>"
onclick="if (!window.confirm('是否要删除该日志')) return false"><img src="images/icon_del.gif" alt="" border="0" style="margin-bottom:-2px"/></a>
<%end if%>
替换成:
复制内容到剪贴板
程序代码
程序代码<SCRIPT LANGUAGE="JavaScript" SRC="comm.asp?id=<%=webLogArr(0,PageCount)%>&arr=<%=webLogArr(3,PageCount)%>&viewarr=<%=webLogArr(2,PageCount)%>"></SCRIPT>
9.PLUGINS目录下的文件直接覆盖。完后需要到后台修复插件。
.打开ConContent.asp,找到:
找到:
复制内容到剪贴板
程序代码
程序代码 <input type="checkbox" name="ReBulid" value="" id="T"/> <label for="T">重建数据缓存</label><br/>
在上面插入一行:
复制内容到剪贴板
程序代码
程序代码<input type="checkbox" name="ReJs" value="" id="T6"/> <label for="T6">刷新所有JS文件</label><br/>
**************************************************************
如果加了我的后台日志管理插件,需要做如下修改:
找到
复制内容到剪贴板
程序代码
程序代码for i=0 to ubound(Log_Dele)
Log_source_ID=conn.execute("sel�ct log_CateID from blog_Content wh�re log_ID="&Log_Dele(i))(0)
conn.execute ("up�ate blog_Content set log_CateID="&Request.form("source")&" wh�re log_ID="&Log_Dele(i))
conn.execute ("up�ate blog_Category set cate_count=cate_count+ wh�re cate_ID="&Request.form("source"))
conn.execute ("up�ate blog_Category set cate_count=cate_count- wh�re cate_ID="&Log_source_ID)
next
Log_source_ID=conn.execute("sel�ct log_CateID from blog_Content wh�re log_ID="&Log_Dele(i))(0)
conn.execute ("up�ate blog_Content set log_CateID="&Request.form("source")&" wh�re log_ID="&Log_Dele(i))
conn.execute ("up�ate blog_Category set cate_count=cate_count+ wh�re cate_ID="&Request.form("source"))
conn.execute ("up�ate blog_Category set cate_count=cate_count- wh�re cate_ID="&Log_source_ID)
next
在后面插入一行:
复制内容到剪贴板
程序代码
程序代码call blog_makehtml(-)
找到:
复制内容到剪贴板
程序代码
程序代码for i=0 to ubound(Log_Dele)
Log_source_ID=conn.execute("sel�ct log_CateID from blog_Content wh�re log_ID="&Log_Dele(i))(0)
conn.execute ("up�ate blog_Category set cate_count=cate_count- wh�re cate_ID="&Log_source_ID)
conn.execute("Del�te * from blog_Content wh�re log_ID="&Log_Dele(i))
next
Log_source_ID=conn.execute("sel�ct log_CateID from blog_Content wh�re log_ID="&Log_Dele(i))(0)
conn.execute ("up�ate blog_Category set cate_count=cate_count- wh�re cate_ID="&Log_source_ID)
conn.execute("Del�te * from blog_Content wh�re log_ID="&Log_Dele(i))
next
修改成:
复制内容到剪贴板
程序代码
程序代码for i=0 to ubound(Log_Dele)
Log_source_ID=conn.execute("sel�ct log_CateID from blog_Content wh�re log_ID="&Log_Dele(i))(0)
conn.execute ("up�ate blog_Category set cate_count=cate_count- wh�re cate_ID="&Log_source_ID)
conn.execute("Del�te * from blog_Content wh�re log_ID="&Log_Dele(i))
if fso.FileExists(server.MapPath("article"& Log_Dele(i) &".html")) then
fso.Del�teFile(server.MapPath("article"& Log_Dele(i) &".html"))
end if
next
call blog_makehtml(-)
call Newarticle()
call NewComment()
Log_source_ID=conn.execute("sel�ct log_CateID from blog_Content wh�re log_ID="&Log_Dele(i))(0)
conn.execute ("up�ate blog_Category set cate_count=cate_count- wh�re cate_ID="&Log_source_ID)
conn.execute("Del�te * from blog_Content wh�re log_ID="&Log_Dele(i))
if fso.FileExists(server.MapPath("article"& Log_Dele(i) &".html")) then
fso.Del�teFile(server.MapPath("article"& Log_Dele(i) &".html"))
end if
next
call blog_makehtml(-)
call Newarticle()
call NewComment()
****************************************************************
找到:
复制内容到剪贴板
程序代码
程序代码 if Request.form("ReBulid")= then
FreeMemory
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&"缓存重建成功! "
end If
FreeMemory
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&"缓存重建成功! "
end If
在下面插入:
复制内容到剪贴板
程序代码
程序代码if Request.form("ReJs")= then
call Categoryid(0)
call Categoryid()
call Newarticle()
call NewComment()
call NewMessage()
call HotArticle()
call Bloglinks()
call archive()
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&"JS文件刷新成功! "
end if
call Categoryid(0)
call Categoryid()
call Newarticle()
call NewComment()
call NewMessage()
call HotArticle()
call Bloglinks()
call archive()
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&"JS文件刷新成功! "
end if
找到:
复制内容到剪贴板
程序代码
程序代码conn.Execute("Up�ate blog_Info Set blog_tbNums=blog_tbNums-")
doTitle="引用通告"
doTitle="引用通告"
在下面加入一行:
复制内容到剪贴板
程序代码
程序代码call blog_makehtml(t2)
找到:
复制内容到剪贴板
程序代码
程序代码conn.execute("Del�te * from blog_Comment wh�re comm_ID="&t)
doTitle="评论"
doRedirect=""
doTitle="评论"
doRedirect=""
在下面加入:
复制内容到剪贴板
程序代码
程序代码 call NewComment()
call blog_makehtml(t2)
call blog_makehtml(t2)
找到:
复制内容到剪贴板
程序代码
程序代码 conn.execute("Del�te * from blog_book wh�re book_ID="&selCommID(i))
doTitle="留言"
doRedirect="msg"
doTitle="留言"
doRedirect="msg"
在下面加入:
复制内容到剪贴板
程序代码
程序代码call NewMessage()
找到:
复制内容到剪贴板
程序代码
程序代码conn.execute("Up�ate blog_book SET book_Content='"&checkStr(Request.form("message_"&doCommID(i)))&"',book_replyAuthor='"&memName&"',book_replyTime=#"&DateToStr(now(),"Y-m-d H:I:S")&"#,book_reply='"&checkStr(Request.form("reply_"&doCommID(i)))&"' Wh�re book_ID="&doCommID(i))
doTitle="留言"
doTitle="留言"
在下面加入:
复制内容到剪贴板
程序代码
程序代码call NewMessage()
找到:
复制内容到剪贴板
程序代码
程序代码conn.execute("Up�ate blog_Comment SET comm_Content='"&checkStr(Request.form("message_"&doCommID(i)))&"' Wh�re comm_ID="&doCommID(i))
doTitle="评论"
doRedirect=""
doTitle="评论"
doRedirect=""
在下面加入:
复制内容到剪贴板
程序代码
程序代码call NewComment()
call blog_makehtml(blogid)
call blog_makehtml(blogid)
找到:
复制内容到剪贴板
程序代码
程序代码 if LinkMain then
session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&"<span style=""color:#900"">“"&LinkName&"”</span> 置顶成功!"
else
session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&"<span style=""color:#900"">“"&LinkName&"”</span> 取消首页置顶!"
end if
session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&"<span style=""color:#900"">“"&LinkName&"”</span> 置顶成功!"
else
session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&"<span style=""color:#900"">“"&LinkName&"”</span> 取消首页置顶!"
end if
在下面加入:
复制内容到剪贴板
程序代码
程序代码call Bloglinks()
找到:
复制内容到剪贴板
程序代码
程序代码 Session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&"<span style=""color:#900"">“"&LinkName&"”</span> 删除成功!"
Bloglinks(2)
PostLink
Bloglinks(2)
PostLink
在下面加入:
复制内容到剪贴板
程序代码
程序代码call Bloglinks()
2.打开common下的function.asp
从第二行开始插入:
复制内容到剪贴板
程序代码
程序代码'*************************************
'删除静态文章
'*************************************
function delfile(fileurl)
on error resume next
dim fso
set fso=server.Cr�ateObject("Scripting.FileSystemObject")
IF fso.FileExists(FilePath) Then
fso.Del�teFile server.MapPath("/" & fileurl),true
End IF
set fso=nothing
end function
'*************************************
'生成分类
'*************************************
function Categoryid(typeid)
Dim Arr_Category,i,log_Category
TempVar=""
SQL="Sel�ct cate_ID,cate_Name,cate_Order,cate_Intro,cate_OutLink,cate_URL,cate_icon,cate_count,cate_Lock,cate_local,cate_Secret FROM blog_Category oDER BY cate_Order ASC"
Set log_Category=Conn.Execute(SQL)
SQLQueryNums=SQLQueryNums+
if log_Category.eof o log_Category.bof then
ReDim Arr_Category(0,0)
else
Arr_Category=log_Category.GetRows()
end if
Set log_Category=Nothing
Dim Category_Len,Menu_Diver
'--------------输出日志横向菜单------------------
if typeid=0 then
Menu_Diver=""
Category_code="<div id=""menu""><div id=""Left""></div><div id=""Right""></div><ul><li class=""menuL""></li>"
if ubound(Arr_Category,)=0 then
Category_code=Category_code&"<li class=""menuR""></li></ul></div>"
exit function
end if
Category_Len=ubound(Arr_Category,2)
For i=0 to Category_Len
if int(Arr_Category(9,i))=0 o int(Arr_Category(9,i))= then
Response.Write(Menu_Diver)
if Arr_Category(4,i) then
if cbool(Arr_Category(0,i)) then
if stat_ShowHiddenCate o stat_Admin then
Category_code=Category_code&"<li><a class=""menuA"" href="""&Arr_Category(5,i)&""" title="""&Arr_Category(3,i)&""">"&Arr_Category(,i)&"</a></li>"
end if
else
Category_code=Category_code&"<li><a class=""menuA"" href="""&Arr_Category(5,i)&""" title="""&Arr_Category(3,i)&""">"&Arr_Category(,i)&"</a></li>"
end if
else
if cbool(Arr_Category(0,i)) then
if stat_ShowHiddenCate o stat_Admin then
Category_code=Category_code&"<li><a class=""menuA"" href=""default.asp?cateID="&Arr_Category(0,i)&""" title="""&Arr_Category(3,i)&""">"&Arr_Category(,i)&"</a></li>"
end if
else
Category_code=Category_code&"<li><a class=""menuA"" href=""default.asp?cateID="&Arr_Category(0,i)&""" title="""&Arr_Category(3,i)&""">"&Arr_Category(,i)&"</a></li>"
end if
end if
Category_code=Category_code&"<li class=""menuDiv""></li>"
end if
Next
Category_code=Category_code&"<li class=""menuR""></li></ul></div>"
Category_code="document.write ('"&Category_code&"');"
call shengchengjs(Category_code,"Category_h.js")
end if
if typeid= then
Category_code=""
if ubound(Arr_Category,)=0 then exit function
Category_Len=ubound(Arr_Category,2)
For i=0 to Category_Len
if int(Arr_Category(9,i))=0 o int(Arr_Category(9,i))=2 then
if Arr_Category(4,i) then
if cbool(Arr_Category(0,i)) then
if stat_ShowHiddenCate o stat_Admin then Category_code=Category_code&("<img src="""&Arr_Category(6,i)&""" border=""0"" style=""margin:3px 4px -4px 0px;"" alt="""&Arr_Category(3,i)&"""/><a class=""CategoryA"" href="""&Arr_Category(5,i)&""" title="""&Arr_Category(3,i)&""">"&Arr_Category(,i)&"</a><br/>")
else
Category_code=Category_code&("<img src="""&Arr_Category(6,i)&""" border=""0"" style=""margin:3px 4px -4px 0px;"" alt="""&Arr_Category(3,i)&"""/><a class=""CategoryA"" href="""&Arr_Category(5,i)&""" title="""&Arr_Category(3,i)&""">"&Arr_Category(,i)&"</a><br/>")
end if
else
if cbool(Arr_Category(0,i)) then
if stat_ShowHiddenCate o stat_Admin then Category_code=Category_code&("<img src="""&Arr_Category(6,i)&""" border=""0"" style=""margin:3px 4px -4px 0px;"" alt="""&Arr_Category(3,i)&"""/><a class=""CategoryA"" href=""default.asp?cateID="&Arr_Category(0,i)&""" title="""&Arr_Category(3,i)&""">"&Arr_Category(,i)&" ["&Arr_Category(7,i)&"]</a> <a href=""feed.asp?cateID="&Arr_Category(0,i)&""" title=""订阅该分类内容""><img src=""images/rss.png"" border=""0"" style=""margin:3px 4px -px 0px;"" alt=""""/></a><br/>")
else
Category_code=Category_code&("<img src="""&Arr_Category(6,i)&""" border=""0"" style=""margin:3px 4px -4px 0px;"" alt="""&Arr_Category(3,i)&"""/><a class=""CategoryA"" href=""default.asp?cateID="&Arr_Category(0,i)&""" title="""&Arr_Category(3,i)&""">"&Arr_Category(,i)&" ["&Arr_Category(7,i)&"]</a> <a href=""feed.asp?cateID="&Arr_Category(0,i)&""" title=""订阅该分类内容""><img src=""images/rss.png"" border=""0"" style=""margin:3px 4px -px 0px;"" alt=""""/></a><br/>")
end if
end if
end if
Next
Category_code="document.write ('"&Category_code&"');"
call shengchengjs(Category_code,"Category_s.js")
end if
end function
'*************************************
'生成最新文章
'*************************************
function Newarticle()
Dim blog_Article
Dim book_Articles,book_Article
Set book_Articles=Conn.Execute("Sel�ct top 0 C.log_ID,C.log_Author,C.log_IsShow,C.log_PostTime,C.log_title,L.cate_ID,L.cate_Secret FROM blog_Content AS C,blog_Category AS L wh�re L.cate_ID=C.log_CateID and L.cate_Secret=false and C.log_IsDraft=false oder by log_PostTime Desc")
SQLQueryNums=SQLQueryNums+
TempVar=""
Do While Not book_Articles.EOF
if book_Articles("cate_Secret") then
book_Article=book_Article&TempVar&book_Articles("log_ID")&"|,|"&book_Articles("log_Author")&"|,|"&book_Articles("log_PostTime")&"|,|"&"[隐藏分类日志]"
elseif book_Articles("log_IsShow") then
book_Article=book_Article&TempVar&book_Articles("log_ID")&"|,|"&book_Articles("log_Author")&"|,|"&book_Articles("log_PostTime")&"|,|"&book_Articles("log_title")
else
book_Article=book_Article&TempVar&book_Articles("log_ID")&"|,|"&book_Articles("log_Author")&"|,|"&book_Articles("log_PostTime")&"|,|"&"[隐藏日志]"
end if
TempVar="|$|"
book_Articles.MoveNext
Loop
Set book_Articles=Nothing
blog_Article=Split(book_Article,"|$|")
dim Article_Items,Article_Item
For Each Article_Items IN blog_Article
Article_Item=Split(Article_Items,"|,|")
NewArticle=NewArticle&"<a class=""sideA"" href=""article"&Article_Item(0)&".html"">"&CCEncode(CutStr(Article_Item(3),25))&"</a>"
Next
NewArticle="document.write ('"&NewArticle&"');"
call shengchengjs(NewArticle,"NewArticle.js")
end function
'*************************************
'生成最新评论
'*************************************
function NewComment()
'=====================最新评论缓存=====================
Dim blog_Comment,ShowLen,i
ShowLen=0 '显示最新评论预览数量
'-----------------写入最新评论缓存--------------------
Dim log_Comments
SQL="Sel�ct top "&ShowLen&" comm_ID,blog_ID,comm_Author,comm_Content,comm_PostTime" &_
" FROM blog_Comment as C,blog_Content as T,blog_Category as A wh�re C.blog_ID=T.log_ID and T.log_IsShow=true and T.log_CateID=A.cate_ID and A.cate_Secret=false oder by C.comm_PostTime Desc"
Set log_Comments=Conn.Execute(SQL)
SQLQueryNums=SQLQueryNums+
if log_Comments.eof o log_Comments.bof then
ReDim blog_Comment(0,0)
else
blog_Comment=log_Comments.GetRows(ShowLen)
end if
Set log_Comments=Nothing
'-----------------读取最新评论缓存--------------------
dim Comment_Item_Len,NewComment
Comment_Item_Len=ubound(blog_Comment,2)
For i=0 to Comment_Item_Len
NewComment=NewComment&"<a class=""sideA"" href=""article"&blog_Comment(,i)&".html#comm_"&blog_Comment(0,i)&""" title=""评 论 人:"&blog_Comment(2,i)&"
评论时间:"&blog_Comment(4,i)&"
评论内容:"&CCEncode(CutStr(DelQuote(blog_Comment(3,i)),00))&""">"&CCEncode(CutStr(DelQuote(blog_Comment(3,i)),25))&"</a>"
Next
NewComment="document.write ('"&NewComment&"');"
call shengchengjs(NewComment,"NewComment.js")
end function
'*************************************
'生成最新留言
'*************************************
function NewMessage()
Dim blog_Message
Dim book_Messages,book_Message
Set book_Messages=Conn.Execute("Sel�ct top 0 * FROM blog_book oder by book_PostTime Desc")
SQLQueryNums=SQLQueryNums+
TempVar=""
Do While Not book_Messages.EOF
if book_Messages("book_HiddenReply") then
book_Message=book_Message&TempVar&book_Messages("book_ID")&"|,|"&book_Messages("book_Messager")&"|,|"&book_Messages("book_PostTime")&"|,|"&"[隐藏留言]"
else
book_Message=book_Message&TempVar&book_Messages("book_ID")&"|,|"&book_Messages("book_Messager")&"|,|"&book_Messages("book_PostTime")&"|,|"&book_Messages("book_Content")
end if
TempVar="|$|"
book_Messages.MoveNext
Loop
Set book_Messages=Nothing
blog_Message=Split(book_Message,"|$|")
dim Message_Items,Message_Item,NewMessage
For Each Message_Items IN blog_Message
Message_Item=Split(Message_Items,"|,|")
NewMessage=NewMessage&"<a class=""sideA"" href=""LoadMod.asp?plugins=GuestBookForPJBlog#book_"&Message_Item(0)&""" title=""留 言 人:"&Message_Item()&"
留言时间:"&Message_Item(2)&"
留言内容:"&CCEncode(CutStr(Message_Item(3),25))&""">"&CCEncode(CutStr(Message_Item(3),25))&"</a>"
Next
NewMessage="document.write ('"&NewMessage&"');"
call shengchengjs(NewMessage,"NewMessage.js")
end function
'*************************************
'生成热门日志
'*************************************
function HotArticle()
Dim blog_HotArticle
Dim book_HotArticles,book_HotArticle
Set book_HotArticles=Conn.Execute("Sel�ct top 0 C.*,L.cate_ID,L.cate_Secret FROM blog_Content AS C,blog_Category AS L wh�re L.cate_ID=C.log_CateID and L.cate_Secret=false and C.log_IsDraft=false oder by log_ViewNums Desc")
SQLQueryNums=SQLQueryNums+
TempVar=""
Do While Not book_HotArticles.EOF
if book_HotArticles("cate_Secret") then
book_HotArticle=book_HotArticle&TempVar&book_HotArticles("log_ID")&"|,|"&book_HotArticles("log_Author")&"|,|"&book_HotArticles("log_PostTime")&"|,|"&"[隐藏分类日志]"
elseif book_HotArticles("log_IsShow") then
book_HotArticle=book_HotArticle&TempVar&book_HotArticles("log_ID")&"|,|"&book_HotArticles("log_Author")&"|,|"&book_HotArticles("log_PostTime")&"|,|"&book_HotArticles("log_title")
else
book_HotArticle=book_HotArticle&TempVar&book_HotArticles("log_ID")&"|,|"&book_HotArticles("log_Author")&"|,|"&book_HotArticles("log_PostTime")&"|,|"&"[隐藏日志]"
end if
TempVar="|$|"
book_HotArticles.MoveNext
Loop
Set book_HotArticles=Nothing
blog_HotArticle=Split(book_HotArticle,"|$|")
dim HotArticle_Items,HotArticle_Item
For Each HotArticle_Items IN blog_HotArticle
HotArticle_Item=Split(HotArticle_Items,"|,|")
HotArticle=HotArticle&"<a class=""sideA"" href=""article"&HotArticle_Item(0)&".html"">"&CCEncode(CutStr(HotArticle_Item(3),25))&"</a>"
Next
HotArticle="document.write ('"&HotArticle&"');"
call shengchengjs(HotArticle,"HotArticle.js")
end function
'*************************************
'生成友情链接
'*************************************
function Bloglinks()
Dim Arr_Bloglinks,Bloglinks
Bloglinks=Bloglinks&" <div id=link_logo style=""OVERFLOW: hidden; WIDTH: 75px; HEIGHT: 200px""><div id=link_logo style=""OVERFLOW: hidden"">"
Dim log_Bloglinks,log_BloglinksList
Set log_BlogLinks=Conn.ExeCute("Sel�ct link_Name,link_URL,link_Image FROM blog_Links Wh�re link_IsMain=True oDER BY link_Order ASC")
SQLQueryNums=SQLQueryNums+
TempVar=""
Do While Not log_BlogLinks.EOF
IF log_BlogLinks("link_Image")<>Empty Then
log_BloglinksList=log_BloglinksList&TempVar&log_BlogLinks("link_Name")&"$|$"&log_BlogLinks("link_URL")&"$|$"&log_BlogLinks("link_Image")
Else
log_BloglinksList=log_BloglinksList&TempVar&log_BlogLinks("link_Name")&"$|$"&log_BlogLinks("link_URL")&"$|$None"
End IF
TempVar="|$|"
log_BlogLinks.MoveNext
Loop
Set log_BlogLinks=Nothing
Arr_Bloglinks=Split(log_BloglinksList,"|$|")
Dim Arr_Bloglink,Arr_BloglinkItem,ImgLink,TextLink
' Bloglinks=""
for each Arr_Bloglink in Arr_Bloglinks
Arr_BloglinkItem=Split(Arr_Bloglink,"$|$")
if blog_ImgLink then
if Arr_BloglinkItem(2)="None" then
TextLink=TextLink&"<a class=""sideA"" href="""&Arr_BloglinkItem()&""" target=""_blank"" title="""&Arr_BloglinkItem(0)&""">"&Arr_BloglinkItem(0)&"</a>"
else
ImgLink=ImgLink&"<a href="""&Arr_BloglinkItem()&""" target=""_blank"" title="""&Arr_BloglinkItem(0)&"""><img src="""&Arr_BloglinkItem(2)&""" border=""0"" alt="""" style=""width:85px;height:30px""/></a> "
end if
else
Bloglinks=Bloglinks&"<a class=""sideA"" href="""&Arr_BloglinkItem()&""" target=""_blank"" title="""&Arr_BloglinkItem(0)&""">"&Arr_BloglinkItem(0)&"</a>"
end if
next
if blog_ImgLink then Bloglinks=Bloglinks&ImgLink&TextLink
Bloglinks=Bloglinks&"</div><div id=link_logo2></div></div>"
Bloglinks=Bloglinks&"<script>var speed=65;"
Bloglinks=Bloglinks&"link_logo2.innerHTML=link_logo.innerHTML;"
Bloglinks=Bloglinks&" function Marquee2(){"
Bloglinks=Bloglinks&" if(link_logo2.offsetTop-link_logo.scrollTop<=0)"
Bloglinks=Bloglinks&" link_logo.scrollTop-=link_logo.offsetHeight;"
Bloglinks=Bloglinks&" else{"
Bloglinks=Bloglinks&" link_logo.scrollTop++;"
Bloglinks=Bloglinks&" }"
Bloglinks=Bloglinks&" }"
Bloglinks=Bloglinks&" var MyMar2=setInterval(Marquee2,speed);"
Bloglinks=Bloglinks&" link_logo.onmouseover=function() {clearInterval(MyMar2)};"
Bloglinks=Bloglinks&" link_logo.onmouseout=function() {MyMar2=setInterval(Marquee2,speed)}"
Bloglinks=Bloglinks&"</script>"
'=====================End Function=======================
Bloglinks="document.write ('"&Bloglinks&"');"
call shengchengjs(Bloglinks,"Bloglinks.js")
end function
'*************************************
'生成日志归档缓存
'*************************************
function archive()
Dim blog_archive,i,archive
'-----------------写入日志归档缓存--------------------
Dim log_archives
SQL="Sel�ct Count(log_ID) AS [count], Year([log_PostTime]) AS PostYear, Month([log_PostTime]) AS PostMonth " &_
"FROM blog_Content wh�re blog_Content.log_IsDraft=false "&_
"GROUP BY Year([log_PostTime]), Month([log_PostTime]) "&_
"ORDER BY Year([log_PostTime]) Desc, Month([log_PostTime]) Desc"
Set log_archives=Conn.Execute(SQL)
SQLQueryNums=SQLQueryNums+
if log_archives.eof o log_archives.bof then
ReDim blog_archive(0,0)
else
blog_archive=log_archives.GetRows()
end if
Set log_archives=Nothing
'-----------------读取日志归档缓存--------------------
Dim archive_item_Len,Month_array
Month_array=Array("0月","02月","03月","04月","05月","06月","07月","08月","09月","0月","月","2月")
archive_item_Len=ubound(blog_archive,2)
dim myear
myear=""
For i=0 to archive_item_Len
if myear=blog_archive(,i) then
archive=archive&"<a href=""default.asp?log_Year="&blog_archive(,i)&"&log_Month="&blog_archive(2,i)&""" title=""查看当前日期的日志"">"&Month_array(blog_archive(2,i)-)&"["&blog_archive(0,i)&"] </a>"
else
myear=blog_archive(,i)
archive=archive&"<a class=""sideA"" href=""#"">"&blog_archive(,i)&"年</a>"
archive=archive&"<a href=""default.asp?log_Year="&blog_archive(,i)&"&log_Month="&blog_archive(2,i)&""" title=""查看当前日期的日志"">"&Month_array(blog_archive(2,i)-)&"["&blog_archive(0,i)&"] </a>"
end if
Next
archive="document.write ('"&archive&"');"
call shengchengjs(archive,"archive.js")
end function
'*************************************
'生成JS
'*************************************
function shengchengjs(foolcat,foldername)
dim FolderPath,fso,fout
FolderPath = Server.MapPath("/pjblog/js") '请根据你的实际情况修改。
Set fso = Server.Cr�ateObject("Scripting.FileSystemObject")
If not (fso.FolderExists(FolderPath)) Then
Set f = fso.Cr�ateFolder(FolderPath)
End If
Set fout = fso.Cr�ateTextFile(FolderPath&"\"&foldername)
fout.WriteLine foolcat
fout.close
set fout = nothing
end function
'删除静态文章
'*************************************
function delfile(fileurl)
on error resume next
dim fso
set fso=server.Cr�ateObject("Scripting.FileSystemObject")
IF fso.FileExists(FilePath) Then
fso.Del�teFile server.MapPath("/" & fileurl),true
End IF
set fso=nothing
end function
'*************************************
'生成分类
'*************************************
function Categoryid(typeid)
Dim Arr_Category,i,log_Category
TempVar=""
SQL="Sel�ct cate_ID,cate_Name,cate_Order,cate_Intro,cate_OutLink,cate_URL,cate_icon,cate_count,cate_Lock,cate_local,cate_Secret FROM blog_Category oDER BY cate_Order ASC"
Set log_Category=Conn.Execute(SQL)
SQLQueryNums=SQLQueryNums+
if log_Category.eof o log_Category.bof then
ReDim Arr_Category(0,0)
else
Arr_Category=log_Category.GetRows()
end if
Set log_Category=Nothing
Dim Category_Len,Menu_Diver
'--------------输出日志横向菜单------------------
if typeid=0 then
Menu_Diver=""
Category_code="<div id=""menu""><div id=""Left""></div><div id=""Right""></div><ul><li class=""menuL""></li>"
if ubound(Arr_Category,)=0 then
Category_code=Category_code&"<li class=""menuR""></li></ul></div>"
exit function
end if
Category_Len=ubound(Arr_Category,2)
For i=0 to Category_Len
if int(Arr_Category(9,i))=0 o int(Arr_Category(9,i))= then
Response.Write(Menu_Diver)
if Arr_Category(4,i) then
if cbool(Arr_Category(0,i)) then
if stat_ShowHiddenCate o stat_Admin then
Category_code=Category_code&"<li><a class=""menuA"" href="""&Arr_Category(5,i)&""" title="""&Arr_Category(3,i)&""">"&Arr_Category(,i)&"</a></li>"
end if
else
Category_code=Category_code&"<li><a class=""menuA"" href="""&Arr_Category(5,i)&""" title="""&Arr_Category(3,i)&""">"&Arr_Category(,i)&"</a></li>"
end if
else
if cbool(Arr_Category(0,i)) then
if stat_ShowHiddenCate o stat_Admin then
Category_code=Category_code&"<li><a class=""menuA"" href=""default.asp?cateID="&Arr_Category(0,i)&""" title="""&Arr_Category(3,i)&""">"&Arr_Category(,i)&"</a></li>"
end if
else
Category_code=Category_code&"<li><a class=""menuA"" href=""default.asp?cateID="&Arr_Category(0,i)&""" title="""&Arr_Category(3,i)&""">"&Arr_Category(,i)&"</a></li>"
end if
end if
Category_code=Category_code&"<li class=""menuDiv""></li>"
end if
Next
Category_code=Category_code&"<li class=""menuR""></li></ul></div>"
Category_code="document.write ('"&Category_code&"');"
call shengchengjs(Category_code,"Category_h.js")
end if
if typeid= then
Category_code=""
if ubound(Arr_Category,)=0 then exit function
Category_Len=ubound(Arr_Category,2)
For i=0 to Category_Len
if int(Arr_Category(9,i))=0 o int(Arr_Category(9,i))=2 then
if Arr_Category(4,i) then
if cbool(Arr_Category(0,i)) then
if stat_ShowHiddenCate o stat_Admin then Category_code=Category_code&("<img src="""&Arr_Category(6,i)&""" border=""0"" style=""margin:3px 4px -4px 0px;"" alt="""&Arr_Category(3,i)&"""/><a class=""CategoryA"" href="""&Arr_Category(5,i)&""" title="""&Arr_Category(3,i)&""">"&Arr_Category(,i)&"</a><br/>")
else
Category_code=Category_code&("<img src="""&Arr_Category(6,i)&""" border=""0"" style=""margin:3px 4px -4px 0px;"" alt="""&Arr_Category(3,i)&"""/><a class=""CategoryA"" href="""&Arr_Category(5,i)&""" title="""&Arr_Category(3,i)&""">"&Arr_Category(,i)&"</a><br/>")
end if
else
if cbool(Arr_Category(0,i)) then
if stat_ShowHiddenCate o stat_Admin then Category_code=Category_code&("<img src="""&Arr_Category(6,i)&""" border=""0"" style=""margin:3px 4px -4px 0px;"" alt="""&Arr_Category(3,i)&"""/><a class=""CategoryA"" href=""default.asp?cateID="&Arr_Category(0,i)&""" title="""&Arr_Category(3,i)&""">"&Arr_Category(,i)&" ["&Arr_Category(7,i)&"]</a> <a href=""feed.asp?cateID="&Arr_Category(0,i)&""" title=""订阅该分类内容""><img src=""images/rss.png"" border=""0"" style=""margin:3px 4px -px 0px;"" alt=""""/></a><br/>")
else
Category_code=Category_code&("<img src="""&Arr_Category(6,i)&""" border=""0"" style=""margin:3px 4px -4px 0px;"" alt="""&Arr_Category(3,i)&"""/><a class=""CategoryA"" href=""default.asp?cateID="&Arr_Category(0,i)&""" title="""&Arr_Category(3,i)&""">"&Arr_Category(,i)&" ["&Arr_Category(7,i)&"]</a> <a href=""feed.asp?cateID="&Arr_Category(0,i)&""" title=""订阅该分类内容""><img src=""images/rss.png"" border=""0"" style=""margin:3px 4px -px 0px;"" alt=""""/></a><br/>")
end if
end if
end if
Next
Category_code="document.write ('"&Category_code&"');"
call shengchengjs(Category_code,"Category_s.js")
end if
end function
'*************************************
'生成最新文章
'*************************************
function Newarticle()
Dim blog_Article
Dim book_Articles,book_Article
Set book_Articles=Conn.Execute("Sel�ct top 0 C.log_ID,C.log_Author,C.log_IsShow,C.log_PostTime,C.log_title,L.cate_ID,L.cate_Secret FROM blog_Content AS C,blog_Category AS L wh�re L.cate_ID=C.log_CateID and L.cate_Secret=false and C.log_IsDraft=false oder by log_PostTime Desc")
SQLQueryNums=SQLQueryNums+
TempVar=""
Do While Not book_Articles.EOF
if book_Articles("cate_Secret") then
book_Article=book_Article&TempVar&book_Articles("log_ID")&"|,|"&book_Articles("log_Author")&"|,|"&book_Articles("log_PostTime")&"|,|"&"[隐藏分类日志]"
elseif book_Articles("log_IsShow") then
book_Article=book_Article&TempVar&book_Articles("log_ID")&"|,|"&book_Articles("log_Author")&"|,|"&book_Articles("log_PostTime")&"|,|"&book_Articles("log_title")
else
book_Article=book_Article&TempVar&book_Articles("log_ID")&"|,|"&book_Articles("log_Author")&"|,|"&book_Articles("log_PostTime")&"|,|"&"[隐藏日志]"
end if
TempVar="|$|"
book_Articles.MoveNext
Loop
Set book_Articles=Nothing
blog_Article=Split(book_Article,"|$|")
dim Article_Items,Article_Item
For Each Article_Items IN blog_Article
Article_Item=Split(Article_Items,"|,|")
NewArticle=NewArticle&"<a class=""sideA"" href=""article"&Article_Item(0)&".html"">"&CCEncode(CutStr(Article_Item(3),25))&"</a>"
Next
NewArticle="document.write ('"&NewArticle&"');"
call shengchengjs(NewArticle,"NewArticle.js")
end function
'*************************************
'生成最新评论
'*************************************
function NewComment()
'=====================最新评论缓存=====================
Dim blog_Comment,ShowLen,i
ShowLen=0 '显示最新评论预览数量
'-----------------写入最新评论缓存--------------------
Dim log_Comments
SQL="Sel�ct top "&ShowLen&" comm_ID,blog_ID,comm_Author,comm_Content,comm_PostTime" &_
" FROM blog_Comment as C,blog_Content as T,blog_Category as A wh�re C.blog_ID=T.log_ID and T.log_IsShow=true and T.log_CateID=A.cate_ID and A.cate_Secret=false oder by C.comm_PostTime Desc"
Set log_Comments=Conn.Execute(SQL)
SQLQueryNums=SQLQueryNums+
if log_Comments.eof o log_Comments.bof then
ReDim blog_Comment(0,0)
else
blog_Comment=log_Comments.GetRows(ShowLen)
end if
Set log_Comments=Nothing
'-----------------读取最新评论缓存--------------------
dim Comment_Item_Len,NewComment
Comment_Item_Len=ubound(blog_Comment,2)
For i=0 to Comment_Item_Len
NewComment=NewComment&"<a class=""sideA"" href=""article"&blog_Comment(,i)&".html#comm_"&blog_Comment(0,i)&""" title=""评 论 人:"&blog_Comment(2,i)&"
评论时间:"&blog_Comment(4,i)&"
评论内容:"&CCEncode(CutStr(DelQuote(blog_Comment(3,i)),00))&""">"&CCEncode(CutStr(DelQuote(blog_Comment(3,i)),25))&"</a>"
Next
NewComment="document.write ('"&NewComment&"');"
call shengchengjs(NewComment,"NewComment.js")
end function
'*************************************
'生成最新留言
'*************************************
function NewMessage()
Dim blog_Message
Dim book_Messages,book_Message
Set book_Messages=Conn.Execute("Sel�ct top 0 * FROM blog_book oder by book_PostTime Desc")
SQLQueryNums=SQLQueryNums+
TempVar=""
Do While Not book_Messages.EOF
if book_Messages("book_HiddenReply") then
book_Message=book_Message&TempVar&book_Messages("book_ID")&"|,|"&book_Messages("book_Messager")&"|,|"&book_Messages("book_PostTime")&"|,|"&"[隐藏留言]"
else
book_Message=book_Message&TempVar&book_Messages("book_ID")&"|,|"&book_Messages("book_Messager")&"|,|"&book_Messages("book_PostTime")&"|,|"&book_Messages("book_Content")
end if
TempVar="|$|"
book_Messages.MoveNext
Loop
Set book_Messages=Nothing
blog_Message=Split(book_Message,"|$|")
dim Message_Items,Message_Item,NewMessage
For Each Message_Items IN blog_Message
Message_Item=Split(Message_Items,"|,|")
NewMessage=NewMessage&"<a class=""sideA"" href=""LoadMod.asp?plugins=GuestBookForPJBlog#book_"&Message_Item(0)&""" title=""留 言 人:"&Message_Item()&"
留言时间:"&Message_Item(2)&"
留言内容:"&CCEncode(CutStr(Message_Item(3),25))&""">"&CCEncode(CutStr(Message_Item(3),25))&"</a>"
Next
NewMessage="document.write ('"&NewMessage&"');"
call shengchengjs(NewMessage,"NewMessage.js")
end function
'*************************************
'生成热门日志
'*************************************
function HotArticle()
Dim blog_HotArticle
Dim book_HotArticles,book_HotArticle
Set book_HotArticles=Conn.Execute("Sel�ct top 0 C.*,L.cate_ID,L.cate_Secret FROM blog_Content AS C,blog_Category AS L wh�re L.cate_ID=C.log_CateID and L.cate_Secret=false and C.log_IsDraft=false oder by log_ViewNums Desc")
SQLQueryNums=SQLQueryNums+
TempVar=""
Do While Not book_HotArticles.EOF
if book_HotArticles("cate_Secret") then
book_HotArticle=book_HotArticle&TempVar&book_HotArticles("log_ID")&"|,|"&book_HotArticles("log_Author")&"|,|"&book_HotArticles("log_PostTime")&"|,|"&"[隐藏分类日志]"
elseif book_HotArticles("log_IsShow") then
book_HotArticle=book_HotArticle&TempVar&book_HotArticles("log_ID")&"|,|"&book_HotArticles("log_Author")&"|,|"&book_HotArticles("log_PostTime")&"|,|"&book_HotArticles("log_title")
else
book_HotArticle=book_HotArticle&TempVar&book_HotArticles("log_ID")&"|,|"&book_HotArticles("log_Author")&"|,|"&book_HotArticles("log_PostTime")&"|,|"&"[隐藏日志]"
end if
TempVar="|$|"
book_HotArticles.MoveNext
Loop
Set book_HotArticles=Nothing
blog_HotArticle=Split(book_HotArticle,"|$|")
dim HotArticle_Items,HotArticle_Item
For Each HotArticle_Items IN blog_HotArticle
HotArticle_Item=Split(HotArticle_Items,"|,|")
HotArticle=HotArticle&"<a class=""sideA"" href=""article"&HotArticle_Item(0)&".html"">"&CCEncode(CutStr(HotArticle_Item(3),25))&"</a>"
Next
HotArticle="document.write ('"&HotArticle&"');"
call shengchengjs(HotArticle,"HotArticle.js")
end function
'*************************************
'生成友情链接
'*************************************
function Bloglinks()
Dim Arr_Bloglinks,Bloglinks
Bloglinks=Bloglinks&" <div id=link_logo style=""OVERFLOW: hidden; WIDTH: 75px; HEIGHT: 200px""><div id=link_logo style=""OVERFLOW: hidden"">"
Dim log_Bloglinks,log_BloglinksList
Set log_BlogLinks=Conn.ExeCute("Sel�ct link_Name,link_URL,link_Image FROM blog_Links Wh�re link_IsMain=True oDER BY link_Order ASC")
SQLQueryNums=SQLQueryNums+
TempVar=""
Do While Not log_BlogLinks.EOF
IF log_BlogLinks("link_Image")<>Empty Then
log_BloglinksList=log_BloglinksList&TempVar&log_BlogLinks("link_Name")&"$|$"&log_BlogLinks("link_URL")&"$|$"&log_BlogLinks("link_Image")
Else
log_BloglinksList=log_BloglinksList&TempVar&log_BlogLinks("link_Name")&"$|$"&log_BlogLinks("link_URL")&"$|$None"
End IF
TempVar="|$|"
log_BlogLinks.MoveNext
Loop
Set log_BlogLinks=Nothing
Arr_Bloglinks=Split(log_BloglinksList,"|$|")
Dim Arr_Bloglink,Arr_BloglinkItem,ImgLink,TextLink
' Bloglinks=""
for each Arr_Bloglink in Arr_Bloglinks
Arr_BloglinkItem=Split(Arr_Bloglink,"$|$")
if blog_ImgLink then
if Arr_BloglinkItem(2)="None" then
TextLink=TextLink&"<a class=""sideA"" href="""&Arr_BloglinkItem()&""" target=""_blank"" title="""&Arr_BloglinkItem(0)&""">"&Arr_BloglinkItem(0)&"</a>"
else
ImgLink=ImgLink&"<a href="""&Arr_BloglinkItem()&""" target=""_blank"" title="""&Arr_BloglinkItem(0)&"""><img src="""&Arr_BloglinkItem(2)&""" border=""0"" alt="""" style=""width:85px;height:30px""/></a> "
end if
else
Bloglinks=Bloglinks&"<a class=""sideA"" href="""&Arr_BloglinkItem()&""" target=""_blank"" title="""&Arr_BloglinkItem(0)&""">"&Arr_BloglinkItem(0)&"</a>"
end if
next
if blog_ImgLink then Bloglinks=Bloglinks&ImgLink&TextLink
Bloglinks=Bloglinks&"</div><div id=link_logo2></div></div>"
Bloglinks=Bloglinks&"<script>var speed=65;"
Bloglinks=Bloglinks&"link_logo2.innerHTML=link_logo.innerHTML;"
Bloglinks=Bloglinks&" function Marquee2(){"
Bloglinks=Bloglinks&" if(link_logo2.offsetTop-link_logo.scrollTop<=0)"
Bloglinks=Bloglinks&" link_logo.scrollTop-=link_logo.offsetHeight;"
Bloglinks=Bloglinks&" else{"
Bloglinks=Bloglinks&" link_logo.scrollTop++;"
Bloglinks=Bloglinks&" }"
Bloglinks=Bloglinks&" }"
Bloglinks=Bloglinks&" var MyMar2=setInterval(Marquee2,speed);"
Bloglinks=Bloglinks&" link_logo.onmouseover=function() {clearInterval(MyMar2)};"
Bloglinks=Bloglinks&" link_logo.onmouseout=function() {MyMar2=setInterval(Marquee2,speed)}"
Bloglinks=Bloglinks&"</script>"
'=====================End Function=======================
Bloglinks="document.write ('"&Bloglinks&"');"
call shengchengjs(Bloglinks,"Bloglinks.js")
end function
'*************************************
'生成日志归档缓存
'*************************************
function archive()
Dim blog_archive,i,archive
'-----------------写入日志归档缓存--------------------
Dim log_archives
SQL="Sel�ct Count(log_ID) AS [count], Year([log_PostTime]) AS PostYear, Month([log_PostTime]) AS PostMonth " &_
"FROM blog_Content wh�re blog_Content.log_IsDraft=false "&_
"GROUP BY Year([log_PostTime]), Month([log_PostTime]) "&_
"ORDER BY Year([log_PostTime]) Desc, Month([log_PostTime]) Desc"
Set log_archives=Conn.Execute(SQL)
SQLQueryNums=SQLQueryNums+
if log_archives.eof o log_archives.bof then
ReDim blog_archive(0,0)
else
blog_archive=log_archives.GetRows()
end if
Set log_archives=Nothing
'-----------------读取日志归档缓存--------------------
Dim archive_item_Len,Month_array
Month_array=Array("0月","02月","03月","04月","05月","06月","07月","08月","09月","0月","月","2月")
archive_item_Len=ubound(blog_archive,2)
dim myear
myear=""
For i=0 to archive_item_Len
if myear=blog_archive(,i) then
archive=archive&"<a href=""default.asp?log_Year="&blog_archive(,i)&"&log_Month="&blog_archive(2,i)&""" title=""查看当前日期的日志"">"&Month_array(blog_archive(2,i)-)&"["&blog_archive(0,i)&"] </a>"
else
myear=blog_archive(,i)
archive=archive&"<a class=""sideA"" href=""#"">"&blog_archive(,i)&"年</a>"
archive=archive&"<a href=""default.asp?log_Year="&blog_archive(,i)&"&log_Month="&blog_archive(2,i)&""" title=""查看当前日期的日志"">"&Month_array(blog_archive(2,i)-)&"["&blog_archive(0,i)&"] </a>"
end if
Next
archive="document.write ('"&archive&"');"
call shengchengjs(archive,"archive.js")
end function
'*************************************
'生成JS
'*************************************
function shengchengjs(foolcat,foldername)
dim FolderPath,fso,fout
FolderPath = Server.MapPath("/pjblog/js") '请根据你的实际情况修改。
Set fso = Server.Cr�ateObject("Scripting.FileSystemObject")
If not (fso.FolderExists(FolderPath)) Then
Set f = fso.Cr�ateFolder(FolderPath)
End If
Set fout = fso.Cr�ateTextFile(FolderPath&"\"&foldername)
fout.WriteLine foolcat
fout.close
set fout = nothing
end function
3.打开header.asp
找到:
复制内容到剪贴板
程序代码
程序代码<%CategoryList(0)%>
替换成:
复制内容到剪贴板
程序代码
程序代码<SCRIPT LANGUAGE="JavaScript" SRC="js/Category_h.js" charset="gb232"></SCRIPT>
4.用DM搜索所有的
复制内容到剪贴板
程序代码
程序代码"default.asp"
复制内容到剪贴板
程序代码
程序代码"index.htm"
5.进入后台管理,站点基本设置,取消静态日志模式。
6.进入后台管理,站点基本设置,初始化数据,刷新所有JS文件。
点击下载此文件如果有朋友需要原版修改好的PJBLOG,请到http://bbs.pjhelp.cn/viewthread.php?tid=9053&page=&extra=page%3D下载。我的流量不够。呵呵。
[本日志由 小戒 于 2008-05-27 08:24 AM 编辑]
上一篇: 习惯性用语--周末愉快
下一篇: 北京海淀艺术职业学校高中生欺辱年迈教师[视频录象]
文章来自: 本站原创
Tags: PJBLOG 静态 插件 日志
相关日志:
评论: 7 | 引用: 0 | 查看次数: -
回SKYII.CN,如果是新站可以直接覆盖。但我本地测试的新站删掉了。在服务器上。呆会放上去。
可以直接提供修改的文件吗?
蔷薇,你的网站我打不开。
你好啊,我完全用了你的方法已经修改过了,但是还是不行呢,为什么啊,
请看看我的地址依然是动态的,http://rose.0start.cn
请看看我的地址依然是动态的,http://rose.0start.cn
推荐你用Macromedia Dreamweaver 8
你的博客不错,请问,用什么来编辑asp文件, 
发表评论


回复


可以把修改好的原版用邮箱发给我吗?官网上面这个下载有木马,我下了好多次都不行,谢谢了。
shenshu#188.com
非病毒,纯属误报。关掉再解压就行了。生成HTML时的代码被当成病毒了。