<% '/////////////////////////////////////////////////////////////////////////////// '// 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 "
" Response.Write "

"&ZC_MSG158&":

" Response.Write ZC_MSG012&" " Response.Write ZC_MSG061&" " Response.Write " "&ZC_MSG224&" " Response.Write "" 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 "" 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 "" Dim Cate For Each Cate in Categorys If IsObject(Cate) Then If Cate.ID=objRS("log_CateID") Then Response.Write "" 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 "" End If End If Next 'Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" objRS.MoveNext If objRS.eof Then Exit For Next End If Response.Write "
"& ZC_MSG076 &""& ZC_MSG012 &""& ZC_MSG003 &""& ZC_MSG075 &""& ZC_MSG060 &"
" & objRS("log_ID") & "" & Left(Cate.Name,6) & "" & User.Name & "" & ZVA_Article_Level_Name(objRS("log_Level")) & "" & FormatDateTime(objRS("log_PostTime"),vbShortDate) & "" & Left(objRS("log_Title"),14) & "[" & ZC_MSG100 & "]" Response.Write "  [" & ZC_MSG101 & "][" & ZC_MSG063 & "]
" 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 "
" Response.Write "

"& ZC_MSG122 &":

" Response.Write "

["& ZC_MSG077 &"]

" 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 "" If (Not objRS.bof) And (Not objRS.eof) Then For i=1 to objRS.PageSize Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" objRS.MoveNext If objRS.eof Then Exit For Next End If Response.Write "
"& ZC_MSG076 &""& ZC_MSG001 &""& ZC_MSG079 &""& ZC_MSG016 &"
" & objRS("cate_ID") & "" & objRS("cate_Name") & "" & objRS("cate_Order") & "" & objRS("cate_Intro") & "["& ZC_MSG078 &"]["& ZC_MSG063 &"]
" 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 "
" & ZC_MSG068 & "
" Response.Write "
" Call GetBlogHint() Response.Write "
" Response.Write "

"&ZC_MSG287&":

" Response.Write " "&ZC_MSG224&" " Response.Write "" Response.Write "

" Response.Write "" 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 "" If Trim(objRS("comm_Email"))="" Then Response.Write "" Else Response.Write "" End If If objRS("log_ID")=0 Then Response.Write "" Else Response.Write "" End If Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" objRS.MoveNext If objRS.eof Then Exit For Next End If Response.Write "
"& ZC_MSG076 &""& ZC_MSG001 &""& ZC_MSG055 &""& ZC_MSG080 &""& ZC_MSG075 &""& ZC_MSG229 &"
" & objRS("comm_ID") & ""& objRS("comm_Author") & "" & objRS("comm_Author") & "" & Left(objRS("comm_Content"),20) & "..." & Left(objRS("comm_Content"),20) & "..." & objRS("comm_IP") & "" & objRS("comm_PostTime") & "["& ZC_MSG078 &"]["& ZC_MSG063 &"]
" For i=1 to objRS.PageCount strPage=strPage &"["& Replace(ZC_MSG036,"%s",i) &"] " Next Response.Write "


" & vbCrlf Response.Write "
" & ZC_MSG042 & ": " & strPage 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 "
" & ZC_MSG069 & "
" Response.Write "
" Call GetBlogHint() Response.Write "" 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 "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" objRS.MoveNext If objRS.eof Then Exit For Next End If Response.Write "
"& ZC_MSG048 & ZC_MSG076 &""& ZC_MSG014 &""& ZC_MSG060 &""& ZC_MSG055 &""& ZC_MSG229 &"
" & objRS("log_ID") & "" & Left(objRS("tb_Blog"),14) & "" & Left(objRS("tb_Title"),12) & "" & Left(objRS("tb_Excerpt"),18) & "["& ZC_MSG063 &"]
" For i=1 to objRS.PageCount strPage=strPage &"["& Replace(ZC_MSG036,"%s",i) &"] " Next Response.Write "


" & vbCrlf Response.Write "
" & ZC_MSG042 & ": " & strPage 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 "" Response.Write "

"& ZC_MSG123 &":

" Response.Write "

["& ZC_MSG127 &"]

" 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 "" Response.Write "" For i=1 to objRS.PageSize Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" objRS.MoveNext If objRS.eof Then Exit For Next Response.Write "
"& ZC_MSG076 &""& ZC_MSG079 &""& ZC_MSG001 &""& ZC_MSG082 &""& ZC_MSG124 &"
" & objRS("mem_ID") & "" & ZVA_User_Level_Name(objRS("mem_Level")) & "" & objRS("mem_Name") & "" & objRS("mem_PostLogs") & "" & objRS("mem_PostComms") & "["& ZC_MSG078 &"]["& ZC_MSG063 &"]
" 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 "
" Response.Write "

"& ZC_MSG108 &":

" Response.Write "

" 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 "" 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 "" Dim User:For Each User in Users:If IsObject(User) Then:If User.ID=objRS("ul_AuthorID") Then:Response.Write "":End If:End If:Next Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" objRS.MoveNext If objRS.eof Then Exit For Next End If Response.Write "
"& ZC_MSG076 &""& ZC_MSG003 &""& ZC_MSG001 &""& ZC_MSG041 &""& ZC_MSG075 &""& ZC_MSG229 &"
"&objRS("ul_ID")&"" & User.Name & ""&objRS("ul_FileName")&""&objRS("ul_FileSize")&""&objRS("ul_PostTime")&"["& ZC_MSG063 &"]
" Response.Write "


" & vbCrlf 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 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 "" Response.Write "

"& ZC_MSG134 &":

" Response.Write "

["& ZC_MSG136 &"]

" 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 "" If (Not objRS.bof) And (Not objRS.eof) Then For i=1 to objRS.PageSize Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" objRS.MoveNext If objRS.eof Then Exit For Next End If Response.Write "
"& ZC_MSG076 &""& ZC_MSG001 &""& ZC_MSG016 &"
" & objRS("tag_ID") & "" & objRS("tag_Name") & "" & objRS("tag_Intro") & "["& ZC_MSG078 &"]["& ZC_MSG063 &"]
" 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 "
" & ZC_MSG107 & "
" Response.Write "
" Call GetBlogHint() Response.Write "
" Dim objXmlFile,strXmlFile Dim fso, f, f1, fc, s Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.GetFolder(BlogPath & "/plugin/") Set fc = f.SubFolders For Each f1 in fc If fso.FileExists(BlogPath & "/plugin/" & f1.name & "/" & "plugin.xml") Then strXmlFile =BlogPath & "/plugin/" & f1.name & "/" & "plugin.xml" Set objXmlFile=Server.CreateObject("Microsoft.XMLDOM") objXmlFile.async = False objXmlFile.ValidateOnParse=False objXmlFile.load(strXmlFile) If objXmlFile.readyState=4 Then If objXmlFile.parseError.errorCode <> 0 Then Else If BlogUser.Level<=CInt(objXmlFile.documentElement.selectSingleNode("level").text) Then Response.Write "

" Response.Write "[" & objXmlFile.documentElement.selectSingleNode("name").text & "]" & " " & objXmlFile.documentElement.selectSingleNode("note").text & "
" Response.Write "

"& ZC_MSG150 &":"& objXmlFile.documentElement.selectSingleNode("version").text &"    " & ZC_MSG151 & ":" & objXmlFile.documentElement.selectSingleNode("modified").text & "    " Response.Write ZC_MSG149 & ":" & ""& objXmlFile.documentElement.selectSingleNode("author/name").text &"" Response.Write "

" End If End If End If Set objXmlFile=Nothing End If Next Response.Write "
" 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 "
" & ZC_MSG159 & "
" Response.Write "
" Call GetBlogHint() %>
 <%=ZC_MSG167%>
<%=ZC_MSG160%> <%=BlogUser.Name%> (<%=ZVA_User_Level_Name(BlogUser.Level)%>) <%=ZC_MSG150%> <%=ZC_BLOG_VERSION%>
<%=ZC_MSG082%> <%=allArticle%> <%=ZC_MSG124%> <%=allCommNums%>
<%=ZC_MSG125%> <%=allTrackBackNums%> <%=ZC_MSG129%> <%=allViewNums%>
<%=ZC_MSG163%> <%=allTagsNums%> <%=ZC_MSG162%> <%=allCateNums%>
<%=ZC_MSG083%> <%=ZC_BLOG_CSS%>.css <%=ZC_MSG166%> <%=allUserNums%>
MetaWeblog API <%=ZC_BLOG_HOST%>xml-rpc/index.asp
<% If Len(ZC_UPDATE_INFO_URL)>0 Then %>
 <%=ZC_MSG164%> [<%=ZC_MSG289%>]
<% End If %>
<% Response.Write "
" ExportSiteInfo=True Err.Clear End Function '********************************************************* '********************************************************* ' 目的: 目录下文件列表 '********************************************************* Function ExportSiteFileList(path,opath) Response.Write "
" & ZC_MSG210 & "
" Response.Write "
" Call GetBlogHint() Response.Write "
" %>

<%=ZC_MSG246%>:

" target="main">[<%=ZC_MSG031%>] " target="main">[<%=ZC_MSG030%>] " target="main">[<%=ZC_MSG039%>] " target="main">[<%=ZC_MSG233%>]

<% 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"
" response.write "" for each item in fold.subfolders jpath=replace(path,"\","\\") response.write "" next for each item in fold.files fpath=replace(path&"/"&item.name,blogpath,"") fpath=replace(fpath,"\","/") response.write "
0 "&ZC_MSG239&"   
0 "&item.name&"" response.write"
2 "&item.name&"  " response.write"["&ZC_MSG078&"]  ["&ZC_MSG063&"]" next response.write"
" set fold=nothing set f=Nothing 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 Response.Write "


" & ZC_MSG170 & ":

" Response.Write "

" & vbCrlf Response.Write "
" Response.Write "

" & vbCrlf Response.Write "
" & vbCrlf End If Response.Write "
" ExportSiteFileEdit=True End Function '********************************************************* '********************************************************* ' 目的: '********************************************************* Function ExportFileReBuildAsk() Response.Write "
" & ZC_MSG073 & "
" Response.Write "
" Call GetBlogHint() Response.Write "
" & vbCrlf Response.Write "

"& ZC_MSG112 &"

" & vbCrlf Response.Write "

" & vbCrlf Response.Write "
" & vbCrlf Response.Write "
" ExportFileReBuildAsk=True End Function '********************************************************* %>