%
'///////////////////////////////////////////////////////////////////////////////
'// Z-Blog
'// 作 者: 朱煊(zx.asd)
'// 版权所有: RainbowSoft Studio
'// 技术支持: rainbowsoft@163.com
'// 程序名称:
'// 程序版本:
'// 单元名称: c_system_manage.asp
'// 开始时间: 2005.02.11
'// 最后修改:
'// 备 注:
'///////////////////////////////////////////////////////////////////////////////
'*********************************************************
' 目的: Manager Articles
'*********************************************************
Function ExportArticleList(intPage,intCate,intLevel,intTitle)
Dim i
Dim objRS
Dim strSQL
Dim strPage
Call CheckParameter(intPage,"int",1)
Call CheckParameter(intCate,"int",-1)
Call CheckParameter(intLevel,"int",-1)
Call CheckParameter(intTitle,"sql",-1)
intTitle=vbsunescape(intTitle)
intTitle=FilterSQL(intTitle)
Response.Write "
" & ZC_MSG067 & "
"
Response.Write "
"
Call GetBlogHint()
Response.Write ""
Set objRS=Server.CreateObject("ADODB.Recordset")
objRS.CursorType = adOpenKeyset
objRS.LockType = adLockReadOnly
objRS.ActiveConnection=objConn
objRS.Source=""
strSQL="WHERE ([log_Level]>0) AND (true=true) "
If CheckRights("Root")=False Then strSQL= strSQL & "AND [log_AuthorID] = " & BlogUser.ID
If intCate<>-1 Then
strSQL= strSQL & " AND [log_CateID] = " & intCate
End If
If intLevel<>-1 Then
strSQL= strSQL & " AND [log_Level] = " & intLevel
End If
If intTitle<>"-1" Then
strSQL = strSQL & "AND ( ([log_Title] LIKE '%" & intTitle & "%') OR ([log_Intro] LIKE '%" & intTitle & "%') OR ([log_Content] LIKE '%" & intTitle & "%') )"
End If
Response.Write "
"
Response.Write "
"& ZC_MSG076 &"
"& ZC_MSG012 &"
"& ZC_MSG003 &"
"& ZC_MSG075 &"
"& ZC_MSG060 &"
"
objRS.Open("SELECT * FROM [blog_Article] "& strSQL &" ORDER BY [log_PostTime] DESC")
objRS.PageSize=ZC_MANAGE_COUNT
If objRS.PageCount>0 Then objRS.AbsolutePage = intPage
If (Not objRS.bof) And (Not objRS.eof) Then
For i=1 to objRS.PageSize
Response.Write "
"
Response.Write "
" & objRS("log_ID") & "
"
Dim Cate
For Each Cate in Categorys
If IsObject(Cate) Then
If Cate.ID=objRS("log_CateID") Then
Response.Write "
" & Left(Cate.Name,6) & "
"
End If
End If
Next
Dim User
For Each User in Users
If IsObject(User) Then
If User.ID=objRS("log_AuthorID") Then
Response.Write "
"
objRS.MoveNext
If objRS.eof Then Exit For
Next
End If
Response.Write "
"
For i=1 to objRS.PageCount
strPage=strPage &"["& Replace(ZC_MSG036,"%s",i) &"] "
Next
Response.Write "" & ZC_MSG042 & ": " & strPage
Response.Write "
"
objRS.Close
Set objRS=Nothing
ExportArticleList=True
End Function
'*********************************************************
'*********************************************************
' 目的: Manager Categorys
'*********************************************************
Function ExportCategoryList(intPage)
Dim i
Dim objRS
Dim strPage
Response.Write "
" & ZC_MSG066 & "
"
Response.Write "
"
Call GetBlogHint()
Response.Write ""
Call CheckParameter(intPage,"int",1)
Set objRS=Server.CreateObject("ADODB.Recordset")
objRS.CursorType = adOpenKeyset
objRS.LockType = adLockReadOnly
objRS.ActiveConnection=objConn
objRS.Source=""
objRS.Open("SELECT * FROM [blog_Category] ORDER BY [cate_Order] ASC,[cate_ID] ASC")
objRS.PageSize=ZC_MANAGE_COUNT
If objRS.PageCount>0 Then objRS.AbsolutePage = intPage
Response.Write "
"
Response.Write "
"& ZC_MSG076 &"
"& ZC_MSG001 &"
"& ZC_MSG079 &"
"& ZC_MSG016 &"
"
If (Not objRS.bof) And (Not objRS.eof) Then
For i=1 to objRS.PageSize
Response.Write "
"
objRS.MoveNext
If objRS.eof Then Exit For
Next
End If
Response.Write "
"
For i=1 to objRS.PageCount
strPage=strPage &"["& Replace(ZC_MSG036,"%s",i) &"] "
Next
Response.Write "" & ZC_MSG042 & ": " & strPage
Response.Write "
"
objRS.Close
Set objRS=Nothing
ExportCategoryList=True
End Function
'*********************************************************
'*********************************************************
' 目的: Manager Comments
'*********************************************************
Function ExportCommentList(intPage,intContent)
Dim i
Dim objRS
Dim strSQL
Dim strPage
Call CheckParameter(intPage,"int",1)
intContent=FilterSQL(intContent)
Set objRS=Server.CreateObject("ADODB.Recordset")
objRS.CursorType = adOpenKeyset
objRS.LockType = adLockReadOnly
objRS.ActiveConnection=objConn
objRS.Source=""
If CheckRights("GuestBookMng")=True Then
strSQL=strSQL & " WHERE ( ([log_ID]>0) OR ([log_ID] = 0 ) ) "
Else
strSQL=strSQL&" WHERE ([log_ID]>0) "
End If
If CheckRights("Root")=False Then strSQL=strSQL & "AND( ([comm_AuthorID] = " & BlogUser.ID & " ) OR ((SELECT [log_AuthorID] FROM [blog_Article] WHERE [blog_Article].[log_ID]=[blog_Comment].[log_ID])=" & BlogUser.ID & " )) "
If Trim(intContent)<>"" Then strSQL=strSQL & " AND ( ([comm_Author] LIKE '%" & intContent & "%') OR ([comm_Content] LIKE '%" & intContent & "%') OR ([comm_HomePage] LIKE '%" & intContent & "%') ) "
Response.Write "
"'
objRS.Open("SELECT * FROM [blog_Comment] "& strSQL &" ORDER BY [comm_ID] DESC")
objRS.PageSize=ZC_MANAGE_COUNT
If objRS.PageCount>0 Then objRS.AbsolutePage = intPage
If (Not objRS.bof) And (Not objRS.eof) Then
For i=1 to objRS.PageSize
Response.Write "
"
Response.Write "
" & objRS("comm_ID") & "
"
If Trim(objRS("comm_Email"))="" Then
Response.Write "
"
objRS.Close
Set objRS=Nothing
ExportCommentList=True
End Function
'*********************************************************
'*********************************************************
' 目的: Manager TrackBacks
'*********************************************************
Function ExportTrackBackList(intPage)
Dim i
Dim objRS
Dim strSQL
Dim strPage
Call CheckParameter(intPage,"int",1)
Set objRS=Server.CreateObject("ADODB.Recordset")
objRS.CursorType = adOpenKeyset
objRS.LockType = adLockReadOnly
objRS.ActiveConnection=objConn
objRS.Source=""
strSQL="WHERE ([log_ID]>0) "
If CheckRights("Root")=False Then strSQL=strSQL & "AND( (SELECT [log_AuthorID] FROM [blog_Article] WHERE [blog_Article].[log_ID] =[blog_TrackBack].[log_ID] ) =" & BlogUser.ID & ")"
Response.Write "
"
objRS.Open("SELECT * FROM [blog_TrackBack] "& strSQL &" ORDER BY [tb_ID] DESC")
objRS.PageSize=ZC_MANAGE_COUNT
If objRS.PageCount>0 Then objRS.AbsolutePage = intPage
If (Not objRS.bof) And (Not objRS.eof) Then
For i=1 to objRS.PageSize
Response.Write "
"
objRS.Close
Set objRS=Nothing
ExportTrackBackList=True
End Function
'*********************************************************
'*********************************************************
' 目的: Manager Users
'*********************************************************
Function ExportUserList(intPage)
Dim i
Dim objRS
Dim strSQL
Dim strPage
Call CheckParameter(intPage,"int",1)
Response.Write "
" & ZC_MSG070 & "
"
Response.Write "
"
Call GetBlogHint()
If CheckRights("UserCrt")=True Then
Response.Write ""
End If
Set objRS=Server.CreateObject("ADODB.Recordset")
objRS.CursorType = adOpenKeyset
objRS.LockType = adLockReadOnly
objRS.ActiveConnection=objConn
objRS.Source=""
If CheckRights("Root")=False Then strSQL="WHERE [mem_ID] = " & BlogUser.ID
objRS.Open("SELECT * FROM [blog_Member] " & strSQL & " ORDER BY [mem_ID] ASC")
objRS.PageSize=ZC_MANAGE_COUNT
If objRS.PageCount>0 Then objRS.AbsolutePage = intPage
If (Not objRS.bof) And (Not objRS.eof) Then
Response.Write "
"
objRS.MoveNext
If objRS.eof Then Exit For
Next
Response.Write "
"
End If
For i=1 to objRS.PageCount
strPage=strPage &"["& Replace(ZC_MSG036,"%s",i) &"] "
Next
Response.Write "" & ZC_MSG042 & ": " & strPage
Response.Write "
"
objRS.Close
Set objRS=Nothing
ExportUserList=True
End Function
'*********************************************************
'*********************************************************
' 目的: Manager Files
'*********************************************************
Function ExportFileList(intPage)
Dim i
Dim objRS
Dim strSQL
Dim strPage
Call CheckParameter(intPage,"int",1)
Response.Write "
" & ZC_MSG071 & "
"
Response.Write "
"
Call GetBlogHint()
Response.Write ""
Set objRS=Server.CreateObject("ADODB.Recordset")
objRS.CursorType = adOpenKeyset
objRS.LockType = adLockReadOnly
objRS.ActiveConnection=objConn
objRS.Source=""
If CheckRights("Root")=False Then strSQL="WHERE [ul_AuthorID] = " & BlogUser.ID
Response.Write "
"
objRS.Open("SELECT * FROM [blog_UpLoad] " & strSQL & " ORDER BY [ul_PostTime] DESC")
objRS.PageSize=ZC_MANAGE_COUNT
If objRS.PageCount>0 Then objRS.AbsolutePage = intPage
If (Not objRS.bof) And (Not objRS.eof) Then
For i=1 to objRS.PageSize
Response.Write "
"&objRS("ul_ID")&"
"
Dim User:For Each User in Users:If IsObject(User) Then:If User.ID=objRS("ul_AuthorID") Then:Response.Write "
"
objRS.MoveNext
If objRS.eof Then Exit For
Next
End If
Response.Write "
"
Response.Write "
"
objRS.Close
Set objRS=Nothing
ExportFileList=True
End Function
'*********************************************************
'*********************************************************
' 目的: Manage Setting
'*********************************************************
Function ExportManageList()
ExportManageList=True
End Function
'*********************************************************
'*********************************************************
' 目的: Manager KeyWord
'*********************************************************
Function ExportKeyWordList(intPage)
ExportKeyWordList=True
End Function
'*********************************************************
'*********************************************************
' 目的: Manager Tag
'*********************************************************
Function ExportTagList(intPage)
Dim i
Dim objRS
Dim strPage
Response.Write "
" & ZC_MSG141 & "
"
Response.Write "
"
Call GetBlogHint()
Response.Write ""
Call CheckParameter(intPage,"int",1)
Set objRS=Server.CreateObject("ADODB.Recordset")
objRS.CursorType = adOpenKeyset
objRS.LockType = adLockReadOnly
objRS.ActiveConnection=objConn
objRS.Source=""
objRS.Open("SELECT * FROM [blog_Tag] ORDER BY [tag_Order] DESC,[tag_Count] DESC,[tag_ID] ASC")
objRS.PageSize=ZC_MANAGE_COUNT
If objRS.PageCount>0 Then objRS.AbsolutePage = intPage
Response.Write "
"
Response.Write "
"& ZC_MSG076 &"
"& ZC_MSG001 &"
"& ZC_MSG016 &"
"
If (Not objRS.bof) And (Not objRS.eof) Then
For i=1 to objRS.PageSize
Response.Write "
"
objRS.MoveNext
If objRS.eof Then Exit For
Next
End If
Response.Write "
"
For i=1 to objRS.PageCount
strPage=strPage &"["& Replace(ZC_MSG036,"%s",i) &"] "
Next
Response.Write "" & ZC_MSG042 & ": " & strPage
Response.Write "
"
objRS.Close
Set objRS=Nothing
ExportTagList=True
End Function
'*********************************************************
'*********************************************************
' 目的: Manager Plugin
'*********************************************************
Function ExportPluginList()
On Error Resume Next
Response.Write "
"
Err.Clear
ExportPluginList=True
End Function
'*********************************************************
'*********************************************************
' 目的:
'*********************************************************
Function ExportSiteInfo()
On Error Resume Next
Dim FoundFso
FoundFso = False
FoundFso = IsObjInstalled("Scripting.FileSystemObject")
Dim objRS
Set objRS=Server.CreateObject("ADODB.Recordset")
objRS.CursorType = adOpenKeyset
objRS.LockType = adLockReadOnly
objRS.ActiveConnection=objConn
objRS.Source=""
Dim allArticle,allCommNums,allTrackBackNums,allViewNums,allUserNums,allCateNums,allTagsNums
objRS.Open("SELECT COUNT([log_ID])AS allArticle,SUM([log_CommNums]) AS allCommNums,SUM([log_ViewNums]) AS allViewNums,SUM([log_TrackBackNums]) AS allTrackBackNums FROM [blog_Article]")
If (Not objRS.bof) And (Not objRS.eof) Then
allArticle=objRS("allArticle")
allCommNums=objRS("allCommNums")
allTrackBackNums=objRS("allTrackBackNums")
allViewNums=objRS("allViewNums")
End If
objRS.Close
objRS.Open("SELECT COUNT([tag_ID])AS allTagsNums FROM [blog_Tag]")
If (Not objRS.bof) And (Not objRS.eof) Then
allTagsNums=objRS("allTagsNums")
End If
objRS.Close
objRS.Open("SELECT COUNT([mem_ID])AS allUserNums FROM [blog_Member]")
If (Not objRS.bof) And (Not objRS.eof) Then
allUserNums=objRS("allUserNums")
End If
objRS.Close
objRS.Open("SELECT COUNT([cate_ID])AS allCateNums FROM [blog_Category]")
If (Not objRS.bof) And (Not objRS.eof) Then
allCateNums=objRS("allCateNums")
End If
objRS.Close
Call CheckParameter(allArticle,"int",0)
Call CheckParameter(allCommNums,"int",0)
Call CheckParameter(allTrackBackNums,"int",0)
Call CheckParameter(allViewNums,"int",0)
Call CheckParameter(allUserNums,"int",0)
Call CheckParameter(allCateNums,"int",0)
Call CheckParameter(allTagsNums,"int",0)
Response.Write "
"
ExportSiteInfo=True
Err.Clear
End Function
'*********************************************************
'*********************************************************
' 目的: 目录下文件列表
'*********************************************************
Function ExportSiteFileList(path,opath)
Response.Write "
" & ZC_MSG210 & "
"
Response.Write "
"
Call GetBlogHint()
Response.Write ""
dim f,fold,item,fpath,jpath
set f=server.createobject("scripting.filesystemobject")
if path<>"" then
if instr(path,":")>0 then
path=path
else
path=server.mappath(path)
end if
else
path=blogpath
end if
response.write " "&ZC_MSG240&":"&path
set fold=f.getfolder(path)
response.write"
"
ExportSiteFileList=True
End Function
'*********************************************************
'*********************************************************
' 目的: 编辑文件
'*********************************************************
Function ExportSiteFileEdit(tpath)
Dim Del,txaContent
Response.Write "
" & ZC_MSG246 & "
"
Response.Write "
"
Call GetBlogHint()
If IsEmpty(txaContent) Then txaContent=Null
If Not IsNull(tpath) Then
Response.Write "" & vbCrlf
End If
Response.Write "
"
ExportSiteFileEdit=True
End Function
'*********************************************************
'*********************************************************
' 目的:
'*********************************************************
Function ExportFileReBuildAsk()
Response.Write "