<% if CheckUserLogined()=False then response.Redirect "User_Login.asp" end if dim ArticleID,sql,rs,FoundErr,ErrMsg,PurviewChecked dim ClassID,tClass,ClassName,RootID,ParentID,ParentPath,Depth,ClassMaster ArticleID=trim(request("ArticleID")) FoundErr=False PurviewChecked=False call main() if FoundErr=True then WriteErrMsg() end if call CloseConn() sub main() if ArticleId="" then FoundErr=True ErrMsg=ErrMsg & "
  • 参数不足
  • " exit sub else ArticleID=Clng(ArticleID) end if sql="select * from article where Deleted=False and ArticleID=" & ArticleID Set rs= Server.CreateObject("ADODB.Recordset") rs.open sql,conn,1,1 if rs.bof and rs.eof then FoundErr=True ErrMsg=ErrMsg & "
  • 找不到文章
  • " else ClassID=rs("ClassID") set tClass=conn.execute("select ClassName,RootID,ParentID,Depth,ParentPath,ClassMaster From ArticleClass where ClassID=" & ClassID) if tClass.bof and tClass.eof then founderr=True ErrMsg=ErrMsg & "
  • 找不到指定的栏目
  • " else ClassName=tClass(0) RootID=tClass(1) ParentID=tClass(2) Depth=tClass(3) ParentPath=tClass(4) ClassMaster=tClass(5) end if set tClass=nothing end if if FoundErr=True then rs.close set rs=nothing exit sub end if if rs("Editor")=UserName and rs("Passed")=False then PurviewChecked=True else PurviewChecked=False end if %> <%=rs("Title")%> <% if PurviewChecked=True then%> <% end if%>
    <% response.write "您现在的位置: 文章管理 >> " if ParentID>0 then dim sqlPath,rsPath sqlPath="select ClassID,ClassName From ArticleClass where ClassID in (" & ParentPath & ") order by Depth" set rsPath=server.createobject("adodb.recordset") rsPath.open sqlPath,conn,1,1 do while not rsPath.eof response.Write "" & rsPath(1) & " >> " rsPath.movenext loop rsPath.close set rsPath=nothing end if response.write "" & ClassName & " >> " response.write "" & rs("Title") & "" %> <% if rs("OnTop")=true then response.Write(" ") else response.write("   ") end if if rs("Hits")>=HitsOfHot then response.write(" ") else response.write("   ") end if if rs("Elite")=true then response.write("") else response.write("  ") end if %>
    <%=rs("Title")%>
    <% dim Author,CopyFrom Author=rs("Author") CopyFrom=rs("CopyFrom") response.write "作者:" if instr(Author,"|")>0 then response.write "" & left(Author,instr(Author,"|")-1) & "" else response.write Author end if response.write "    转贴自:" if instr(CopyFrom,"|")>0 then response.write "" & left(CopyFrom,instr(CopyFrom,"|")-1) & "" else response.write CopyFrom end if response.write "    点击数:" & rs("Hits") & "    文章录入:" & rs("Editor") & "" %>

    <%=rs("Content")%>

  • 上一篇文章: <% dim rsPrev sql="Select Top 1 ArticleID,Title From Article Where Editor='" & UserName & "' and ArticleID<" & rs("ArticleID") & " order by ArticleID desc" Set rsPrev= Server.CreateObject("ADODB.Recordset") rsPrev.open sql,conn,1,1 if rsPrev.Eof then response.write "没有了" else response.write ""&rsPrev("Title") & "" end if rsPrev.close set rsPrev=nothing %>

  • 下一篇文章: <% dim rsNext sql="Select Top 1 ArticleID,Title From Article Where Editor='" & UserName & "' and ArticleID>" & rs("ArticleID") & " order by ArticleID" Set rsNext= Server.CreateObject("ADODB.Recordset") rsNext.open sql,conn,1,1 if rsNext.Eof then response.write "没有了" else response.write ""&rsNext("Title") & "" end if rsNext.close set rsNext=nothing %>
  • 可用操作: ">修改 ">删除
    <% rs.close set rs=nothing end sub %>