PJBlog3 发布版本 v2.8.3.127 里程碑

查看完整版本: 后台日志管理插件(单个批量移动,删除,查看排序) for pjblog 2.6 2.7测试通过

戒聊 2007-1-14 04:41

后台日志管理插件(单个批量移动,删除,查看排序) for pjblog 2.6 2.7测试通过

日志管理v0.1 For Pjblog3(单个日志批量移动,删除,查看排序)[url]http://bbs.pjhome.net/thread-37521-1-1.html[/url]


后台日志管理插件
演示就给不了了,给图片了...

后台按分类查看该分类下的日志,可按发表时间,评论,查看次数,引用升降排序.

单个,批量删除及移动日志..

因为编辑前台就有此功能了,所以后台在列表中点标题可以直接查看该日志,点编辑新窗口到前台编辑该日志..其他的大家自己看吧..呵呵...

[color=Red][size=4](晕.终于知道为什么老出错了.代码直接从我那PJBLOG复制过来到DZ的所见即所得模式里,某些代码被过滤掉了...已经更改,已经使用的重新修改下...在移动到另外的分类后需要更新下缓存,否则前台不会变.)[/size][/color]

[color=Purple][size=4]2007-1-15 13:00:修正一BUG,当在日志管理时没有选择任何分类,按某个条件排序会出错。如果你发现有此错误,请重新按下面的修改ConContent.asp代码。[/size][/color]

作者:戒聊

发布网站:[url=http://www.muzili.com]www.muzili.com[/url]

引用:[url=http://www.muzili.com/article.asp?id=238]http://www.muzili.com/article.asp?id=238[/url]
[url=http://www.muzili.com/attachments/month_0701/p200711442739.jpg][img]http://www.muzili.com/attachments/month_0701/p200711442739.jpg[/img][/url]

[color=Red][size=5][i]为了增加大家的动手能力.呵呵.开开玩笑,因为这些文件可能自己有修改过,所以不提供下载.只提供修改方法,如果怕出错,直接点《复制内容到剪貼板》即可,整個過程只需兩步:[/i][/size][/color]
同样适用于2.7,测试通过.只需二次复制代码即可.
1.打开ConMenu.asp,在第43或44行插入以下代码:[code]<li><a href="javascript:void(0)" class="menuA" onClick="MenuClick(this,'ConContent.asp?Fmenu=LogMg&Smenu=')"><img src="images/Control/icon/icon4.gif" alt="" border="0" class="MenuIcon"/>日志管理</a></li>[/code]2.打开ConContent.asp 找到如下代码:[code]<%
elseif Request.QueryString("Fmenu")="Categories" then '日志分类管理[/code][color=red]在其上插入如下代码:(注意符号.特别是<%)[/color][code]<%ElseIF Request.QueryString("Fmenu")="LogMg" Then%>
<table width="100%" border="0" align="center" cellpadding="6" cellspacing="1" bgcolor="#CCCCCC" class="CContent">
<tr>
<td bgcolor="#FFFFFF" class="CTitle">Pjblog日志管理BY <a href=http://www.muzili.com target=_blank>戒聊</a>                                                                             发表时间 <a href="?Fmenu=LogMg&cate_ID=<%=Request.QueryString("cate_ID")%>&Log_sort=1">↑</a> <a href="?Fmenu=LogMg&cate_ID=<%=Request.QueryString("cate_ID")%>&Log_sort=2">↓</a> | 访问 <a href="?Fmenu=LogMg&cate_ID=<%=Request.QueryString("cate_ID")%>&Log_sort=3">↑</a> <a href="?Fmenu=LogMg&cate_ID=<%=Request.QueryString("cate_ID")%>&Log_sort=4">↓</a> | 评论 <a href="?Fmenu=LogMg&cate_ID=<%=Request.QueryString("cate_ID")%>&Log_sort=5">↑</a> <a href="?Fmenu=LogMg&cate_ID=<%=Request.QueryString("cate_ID")%>&Log_sort=6">↓</a> | 引用 <a href="?Fmenu=LogMg&cate_ID=<%=Request.QueryString("cate_ID")%>&Log_sort=7">↑</a> <a href="?Fmenu=LogMg&cate_ID=<%=Request.QueryString("cate_ID")%>&Log_sort=8">↓</a> </td>
</tr>
<%IF Request.QueryString("type")="LogMG" Then%>
<tr>
<td align="center" bgcolor="#FFFFFF" height="48">
<%
    If Request.form("moveto")=1 Then
        Dim Log_Dele,Log_source_ID
        Log_Dele=split(Request.form("Log_Dele"),", ")
        for i=0 to ubound(Log_Dele)
            Log_source_ID=conn.execute("select log_CateID from blog_Content where log_ID="&Log_Dele(i))(0)
            conn.execute ("update blog_Content set log_CateID="&Request.form("source")&" where log_ID="&Log_Dele(i))
            conn.execute ("update blog_Category set cate_count=cate_count+1 where cate_ID="&Request.form("source"))
            conn.execute ("update blog_Category set cate_count=cate_count-1 where cate_ID="&Log_source_ID)
        next
    Else
        Log_Dele=split(Request.form("Log_Dele"),", ")
        for i=0 to ubound(Log_Dele)
            Log_source_ID=conn.execute("select log_CateID from blog_Content where log_ID="&Log_Dele(i))(0)
            conn.execute ("update blog_Category set cate_count=cate_count-1 where cate_ID="&Log_source_ID)
            conn.execute("Delete * from blog_Content where log_ID="&Log_Dele(i))
        next
    End If
%>
<a href="?Fmenu=LogMg&cate_ID=<%=Request.form("cate_ID")%>">操作成功,请点击返回</a>
</td>
</tr>
<%Else%>
<form action="ConContent.asp?Fmenu=LogMg&type=LogMG" method="post" name="ph_Category" id="ph_Category" style="margin:0px;">
           <input type="hidden" name="doModule" value="DelSelect"/>
           <input type="hidden" name="cate_ID" value="<%=Request.QueryString("cate_ID")%>"/>
<tr><td style="font-size:12px;border-bottom:1px #ccc solid;">
<%
    Dim Log_cate
    Set Log_cate=Server.CreateObject("ADODB.RecordSet")
    Sql="select * from blog_Category where not cate_OutLink"
    Log_cate.Open Sql,conn,1,1
    If Log_cate.eof and Log_cate.bof then
        response.write "暂未添加分类!"
    Else
        response.write "<a href=ConContent.asp?Fmenu=LogMg&Smenu=><font color=#000000>查看全部</font></a> | "
        Dim Log_cateID
        If Request.QueryString("cate_ID")<>Empty Then Log_cateID=Int(Request.QueryString("cate_ID"))
        Do While Not Log_cate.eof
            If Log_cate("cate_ID")=Log_cateID then
                response.write "<a href=ConContent.asp?Fmenu=LogMg&cate_ID="&Log_cate("cate_ID")&"&Smenu=><font color=red>"&Log_cate("cate_Name")&"</font></a>("&Log_cate("cate_Count")&") | "
            Else
                response.write "<a href=ConContent.asp?Fmenu=LogMg&cate_ID="&Log_cate("cate_ID")&"&Smenu=>"&Log_cate("cate_Name")&"</a>("&Log_cate("cate_Count")&") | "
            End If
        Log_cate.MoveNext
        Loop   
    End If
    Log_cate.Close
    Set Log_cate=Nothing
%>
</td></tr>
<tr>
<td align="center" valign="top" bgcolor="#FFFFFF" class="CPanel">
<table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#CCCCCC" class="CPanel">
<%
    If CheckStr(Request.QueryString("Page"))<>Empty Then
        Curpage=CheckStr(Request.QueryString("Page"))
        If IsInteger(Curpage)=False or Curpage<0 Then Curpage=1
    Else
        Curpage=1
    End If

Dim Log_List
Set Log_List=Server.CreateObject("ADODB.RecordSet")

If Request.QueryString("cate_ID")<>Empty Then
    Sql="select log_ID,log_CateID,log_Title,log_PostTime,log_CommNums,log_QuoteNums,log_ViewNums,cate_ID,cate_Name from blog_Content c inner join blog_Category l on c.log_CateID=l.cate_ID Where log_CateID="&Request.QueryString("cate_ID")&""
Else
    Sql="select log_ID,log_CateID,log_Title,log_PostTime,log_CommNums,log_QuoteNums,log_ViewNums,cate_ID,cate_Name from blog_Content c inner join blog_Category l on c.log_CateID=l.cate_ID"
End If
If Request.QueryString("Log_sort")<>Empty Then
    Select Case Request.QueryString("Log_sort")
        Case 1
            Sql=Sql&" order by log_PostTime"
        Case 2
            Sql=Sql&" order by log_PostTime desc"
        Case 3
            Sql=Sql&" order by log_ViewNums"
        Case 4
            Sql=Sql&" order by log_ViewNums desc"
        Case 5
            Sql=Sql&" order by log_CommNums"
        Case 6
            Sql=Sql&" order by log_CommNums desc"
        Case 7
            Sql=Sql&" order by log_QuoteNums"
        Case 8
            Sql=Sql&" order by log_QuoteNums desc"
    End Select
Else
    Sql=Sql&" order by log_ID desc"   
End If

Log_List.Open Sql,conn,1,1

If not Log_List.eof Then
    Dim Log_PageCM
    Log_PageCM=0
    Log_List.PageSize=15
    Log_List.AbsolutePage=CurPage
    Dim Log_List_nums
    Log_List_nums=Log_List.RecordCount
%>
<tr>
<td align=center bgcolor="#339999">选择</td>
<td align=center bgcolor="#339999">标题</td>
<td align=center bgcolor="#339999">发布时间</td>
<td align=center bgcolor="#339999">评论</td>
<td align=center bgcolor="#339999">引用</td>
<td align=center bgcolor="#339999">查看</td>
<td align=center bgcolor="#339999">操作</td>
</tr>
<%Do Until Log_List.EOF or Log_PageCM=Log_List.PageSize
%>
<tr bgcolor="#FFFFFF">
<td align="center"><input name="Log_Dele" type="checkbox" id="Log_Dele" value=<%=Log_List(0)%>></td>
<td>
<%
If Request.QueryString("cate_ID")=Empty Then
    response.write "【"&Log_List(8)&"】"
End If
%>
<a target="_blank" href="article.asp?id=<%=Log_List(0)%>"><%=Log_List(2)%></a></td>
<td><%=Log_List(3)%></td>
<td align="center">
<%
If Log_List(4)>0 then
%>
<a href="article.asp?id=<%=Log_List(0)%>#comm_top" target="_blank"><%=Log_List(4)%></a>
<%
Else
%>
0
<%End If
%>
</td>
<td align="center"><%=Log_List(5)%></td>
<td align="center"><%=Log_List(6)%></td>
<td align="center"><a target="_blank" href="blogedit.asp?id=<%=Log_List(0)%>">编辑</a>
</select>
</td>
</tr>
<%
Log_List.MoveNext
Log_PageCM=Log_PageCM+1
Loop
%>
<tr><td colspan="7" bgcolor="#ffffff">
                        <input type="button" value="全选" onClick="checkAll()" class="button" style="margin:0px;margin-bottom:5px;margin-right:6px"/>
                        <input type="button" value="删除所选内容" onClick="DelComment()" class="button" style="margin:0px;margin-bottom:5px;"/>
                        <input type="hidden" value="0" name="moveto">
                       <input type="submit" value="将所选内容移至" onClick="moveto.value=1" class="button" style="margin:0px;margin-bottom:5px;"/>
                       <select name="source"  style="margin:0px;margin-bottom:5px;">
<%
Dim Log_CategoryListDB,Log_CateInOpstions
        set Log_CategoryListDB=conn.execute("select * from blog_Category order by cate_local asc, cate_Order desc")
         do while not Log_CategoryListDB.eof
          if not Log_CategoryListDB("cate_OutLink") then
           Log_CateInOpstions=Log_CateInOpstions&"<option value="""&Log_CategoryListDB("cate_ID")&""">  "&Log_CategoryListDB("cate_Name")&" ["&Log_CategoryListDB("cate_count")&"]</option>"
          end if
          Log_CategoryListDB.movenext
         loop
         set Log_CategoryListDB=nothing
%>
    <%=Log_CateInOpstions%>
                        </select>
</td></tr>                  
<%
    response.write "<tr><td colspan=""7"" style=""border-bottom:1px solid #999;""><div class=""pageContent"">"&MultiPage(Log_List_nums,Log_List.PageSize,CurPage,"?Fmenu=LogMg&Log_sort="&Request.QueryString("Log_sort")&"&cate_ID="&Request.QueryString("cate_ID")&"&","","float:left")&"</div></td></tr>"
Else
   response.write ("<tr><td colspan=""7"" align=""center"" >该分类暂无日志不存在!</td></tr>")
End If
Log_List.close
Set Log_List=Nothing
%>
</table>
</td>
</tr>
</form>
<%End IF%>
</td>
</tr>
</table>[/code]这样就OK了.祝大家好运.

本站更多原创PJBLOG2.6插件:[url]http://www.muzili.com/default.asp?cateID=22[/url]

[[i] 本帖最后由 戒聊 于 2008-7-18 03:58 编辑 [/i]]

medowo 2007-1-14 11:33

额,你写的可真够多的。..

medowo 2007-1-14 11:37

我先来尝试一下有没有什么负作用吧..

cosh 2007-1-14 12:05

:L 好复杂,还是前台手动算了

戒聊 2007-1-14 12:47

我开始也这样想...但日志一多起来就不行了..

泼墨也疯狂 2007-1-14 21:04

小戒是偶的偶像:D

泼墨也疯狂 2007-1-14 21:16

我改了,在后台点击没反应:L

戒聊 2007-1-14 21:28

又学到了一点....从PJBLOG直接复制代码到DZ所见即所得模式,某些代码会被过滤.......害得我....

泼墨也疯狂 2007-1-14 21:36

嗯,现在管用了,很实用 :victory: :lol:

睡睡 2007-1-14 21:43

居然,居然有這樣美好的插件~~

戒聊 2007-1-14 21:52

呵呵......

泼墨也疯狂 2007-1-14 22:04

是代码程序:lol:

joahon 2007-1-14 22:05

功能好  喜欢

戒聊 2007-1-14 22:06

不对..应该是扩展功能...呵呵...

戒聊 2007-1-14 22:06

今晚早点睡觉,各位晚安.

睡睡 2007-1-14 22:26

修改了,使用正常中~

jogocun 2007-1-14 22:43

这功能不错,支持,回去测试下。

stanley527 2007-1-15 01:39

好东西,赞一个,个人觉得挺有用的。。。

嵘心天涯 2007-1-15 11:00

恩,很好:P

戒聊 2007-1-15 13:08

[color=Purple][size=4]2007-1-15 13:00:修正一BUG,当在日志管理时没有选择任何分类,按某个条件排序会出错。如果你发现有此错误,请重新修改ConContent.asp代码。[/size][/color]
页: [1] 2 3 4 5
查看完整版本: 后台日志管理插件(单个批量移动,删除,查看排序) for pjblog 2.6 2.7测试通过