<% IF not(Session("KEY")="1" or session("KEY")="2" or session("KEY")="3") THEN response.redirect "ArticleManage.html" response.end END IF '========================================== ' ' SuperCMS新闻文章内容管理系统 V 1.0 ' ' 官方网址:http://www.supercms.cn ' www.supercms.net ' '========================================== '程序名称: SuperCMS新闻文章内容管理系统 '英文名称:Super Content Management System '作 者: 创意小子 '联系 Q Q: 77801933 ' '程序创建时间:2005-6-10 '程序完成时间:2005-8-1 '========================================== '请尊重作者版权不要删除以上信息 ' '力争做国内最好最实用的开源网站内容管理系统 ' '特别感谢玄鸟科技提供的大力支持 ' http://www.superbtec.com '========================================== %> SUPERCMS文章管理系统--力争做国内最好最实用的文章管理系统! <% const MaxPerPage=20 dim totalPut dim CurrentPage dim TotalPages dim i,j dim sql dim rs dim rstype dim typesql dim typeid,typename1 if not isEmpty(request("typeid")) then typeid=request("typeid") else typeid=1 end if if not isempty(request("page")) then currentPage=cint(request("page")) else currentPage=1 end if %> <% sql1="select * from type where typeid="&typeid set rs1=server.createobject("adodb.recordset") rs1.open sql1,conn,1,1 %>
<% Set rst= Server.CreateObject("ADODB.Recordset") rst.open "select * from type",conn,1 if rst.EOF then response.write "没有栏目" else %> <%do while NOT rst.EOF%> "><%=rst("typename")%> <%i=i+1 if i mod 13 =0 then response.write "
" end if if i>=100 then exit do rst.MoveNext loop end if rst.close %>

<% sql="select * from article where typeid="+cstr(typeid)+" order by newsid desc" Set rs= Server.CreateObject("ADODB.Recordset") rs.open sql,conn,1,1 if rs.eof and rs.bof then response.write "

还 没 有 任 何 文 章

" else totalPut=rs.recordcount totalPut=rs.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 totalput,MaxPerPage,"ArticleManage.html" else if (currentPage-1)*MaxPerPage <%do while not rs.eof%> <% i=i+1 if i>=MaxPerPage then exit do rs.movenext loop %>
ID号 图文 文章标题 推荐 审核 修改 删除
<%=rs("newsid")%> <% if rs("picchk")=1 then %><%else%><%end if%>  /<%=rs("N_Fname")%>" target=_blank><%=rs("title")%> <% if rs("tjnews")=1 then %><%else%><%end if%> <% if rs("check")=1 then %>&action=no">已审核<%else%>&action=yes">待审核<%end if%> ">修改 &path=<%=rs1("typedir")%>&file=<%=rs("N_Fname")%>">删除
<% end sub function showpage(totalnumber,maxperpage,filename) dim n if totalnumber mod maxperpage=0 then n= totalnumber \ maxperpage else n= totalnumber \ maxperpage+1 end if response.write "
" response.write "

" if CurrentPage<2 then response.write "首页 上一页 " else response.write "首页 " response.write "上一页 " end if if n-currentpage<1 then response.write "下一页 尾页" else response.write "" response.write "下一页 尾页" end if response.write " 页次:"&CurrentPage&"/"&n&" " response.write " 转到: " response.write "" response.write ""&totalnumber&" 条记录 "&maxperpage&"篇文章/页

" end function %>
<% rs1.close set rs1=nothing conn.close set conn=nothing %>