<%@language=vbscript codepage=936 %> <% option explicit response.buffer=true %> <% if CheckUserLogined()=False then response.Redirect "User_Login.asp" end if dim strFileName,FileName const MaxPerPage=20 dim totalPut,CurrentPage,TotalPages dim i,j dim keyword,strField dim sql,rsArticleList dim ClassID dim ManageType dim PurviewChecked dim strAdmin,arrAdmin dim AdminPurview,AdminPurview_Article dim tClass,ClassName,RootID,ParentID,Depth,ParentPath,Child,ChildID,tID,tChild,ClassMaster FileName="User_ArticleManage.asp" ClassID=Trim(request("ClassID")) keyword=trim(request("keyword")) if keyword<>"" then keyword=ReplaceBadChar(keyword) end if strField=trim(request("Field")) UserName=Trim(Request.Cookies("asp163")("UserName")) if ClassID="" then ClassID=0 else ClassID=CLng(ClassID) end if if ClassID>0 then set tClass=conn.execute("select ClassName,RootID,ParentID,Depth,ParentPath,Child,ClassMaster From ArticleClass where ClassID=" & ClassID) if tClass.bof and tClass.eof then founderr=True ErrMsg=ErrMsg & "
  • 找不到指定的栏目
  • " Call WriteErrMsg() response.end else ClassName=tClass(0) RootID=tClass(1) ParentID=tClass(2) Depth=tClass(3) ParentPath=tClass(4) Child=tClass(5) end if end if strFileName=FileName & "?ClassID=" & ClassID & "&strField=" & strField & "&keyword=" & keyword if request("page")<>"" then currentPage=cint(request("page")) else currentPage=1 end if %> 文章管理
    文 章 管 理 (<%=UserName%>的文章)
    管理导航: 文章管理首页 | 添加文章

    <%call Admin_ShowRootClass()%>

    <%call Admin_ShowPath("文章管理")%>
    <% sql="select A.ArticleID,A.ClassID,C.ClassName,A.Title,A.Key,A.Author,A.CopyFrom,A.UpdateTime,A.Editor," sql=sql & "A.Hits,A.OnTop,A.Hot,A.Elite,A.Passed,A.IncludePic,A.Stars,A.PaginationType,A.ReadLevel,A.ReadPoint from Article A" sql=sql & " inner join ArticleClass C on A.ClassID=C.ClassID where A.Deleted=False and A.Editor='" & UserName & "' " if ClassID>0 then if Child>0 then ChildID="" if Depth<=0 then set tClass=conn.execute("select ClassID from ArticleClass where ParentID=" & ClassID & " or ParentPath like '" & ClassID & ",%'") else set tClass=conn.execute("select ClassID from ArticleClass where ParentID=" & ClassID & " or ParentPath like '" & ParentPath & "," & ClassID & ",%'") end if do while not tClass.eof if ChildID="" then ChildID=tClass(0) else ChildID=ChildID & "," & tClass(0) end if tClass.movenext loop sql=sql & " and A.ClassID in (" & ChildID & ")" else sql=sql & " and A.ClassID=" & ClassID end if end if if keyword<>"" then select case strField case "Title" sql=sql & " and A.Title like '%" & keyword & "%' " case "Content" sql=sql & " and A.Content like '%" & keyword & "%' " case "Author" sql=sql & " and A.Author like '%" & keyword & "%' " case else sql=sql & " and A.Title like '%" & keyword & "%' " end select end if sql=sql & " order by A.ArticleID desc" Set rsArticleList= Server.CreateObject("ADODB.Recordset") rsArticleList.open sql,conn,1,1 Set rsArticleList= Server.CreateObject("ADODB.Recordset") rsArticleList.open sql,conn,1,1 if rsArticleList.eof and rsArticleList.bof then totalPut=0 if Child=0 then response.write "


    没有任何文章!

    " else response.write "


    此栏目的下一级子栏目中没有任何文章!

    " end if else totalPut=rsArticleList.recordcount if currentpage<1 then currentpage=1 end if if (currentpage-1)*MaxPerPage>totalput then if (totalPut mod MaxPerPage)=0 then currentpage= totalPut \ MaxPerPage else currentpage= totalPut \ MaxPerPage + 1 end if end if if currentPage=1 then showContent showpage strFileName,totalput,MaxPerPage,true,true,"篇文章" else if (currentPage-1)*MaxPerPage
    <%do while not rsArticleList.eof%> <% ArticleNum=ArticleNum+1 if ArticleNum>=MaxPerPage then exit do rsArticleList.movenext loop %>
    选中 ID 文章标题 作者 加入时间 已审核 操作
    > <%=rsArticleList("articleid")%> <% if rsArticleList("ClassID")<>ClassID then response.write "[" & rsArticleList("ClassName") & "] " end if if rsArticleList("IncludePic")=true then response.write "[图文]" end if response.write "" & rsArticleList("title") & "" %> <%= rsArticleList("Author") %> <%= FormatDateTime(rsArticleList("UpdateTime"),2) %> <%if rsArticleList("Passed")=true then response.write "是" else response.write "否" end if%> <%if rsArticleList("Passed")=False then%> ">修改 &Action=Del" onclick="return ConfirmDel();">删除 <%end if%>
    选中本页显示的所有文章
    <% end sub if ClassID>0 and Child>0 then %>
    【<%response.write "" & ClassName & ""%>】子栏目导航: <%call Admin_ShowChild()%>
    <% end if %>
    文章搜索: <%call Admin_ShowSearchForm(FileName,2)%>
    <% call CloseConn() %>