<% Set conn = Server.CreateObject("ADODB.Connection") conn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("data/guoxue999.mdb") Set rs9 = Server.CreateObject("ADODB.Recordset") sql9 ="SELECT * From system Order By id DESC" RS9.open sql9,Conn,3,3 on error resume next dim rs, sql set rs = server.createobject("adodb.recordset") dim curpage, curtopic, strtopic if request("topic") = "" then curtopic="-1" else curtopic = request("topic") '显示专题信息 sql = "SELECT title FROM topic WHERE id=" + cstr(curtopic) set rs=conn.execute(sql) strtopic=rs("title") rs.close %> <%= strtopic %>

本栏首页<% Set rs7 = Server.CreateObject("ADODB.Recordset") sql7 ="SELECT * From dtitle Order By id DESC" RS7.open sql7,Conn,3,3 do while not rs7.eof %>   target=_blank><%=rs7("dtitle")%> <% RS7.MoveNext Loop rs7.close %>    


搜索

专辑
<% Set rs6 = Server.CreateObject("ADODB.Recordset") sql6 ="SELECT top 5 * From topic Order By id DESC" RS6.open sql6,Conn,3,3 do while not rs6.eof %>
target=_blank><%=rs6("title")%> <% RS6.MoveNext Loop rs6.close %>

  国学网
<% dim FIRSTNO, PERPAGE PERPAGE = 15 '每页显示记录数可以随便设置 if request("page")="" then curpage = 1 else curpage = cint(request("page")) end if response.write "

" + strtopic + "

" sql = "SELECT * FROM news where topicid=" + cstr(curtopic) + " ORDER BY shijian DESC" rs.open sql,conn,1,1 if err.number <> 0 then response.write "数据库出错" else if rs.bof and rs.eof then rs.close response.write "
没有新闻" else dim i rs.pagesize = PERPAGE rs.absolutepage = curpage for i = 1 to rs.pagesize %> ><%=rs("biaoti")%>[<%=rs("SHIJIAN")%>]阅<%=rs("counter")%>次
<% rs.movenext if rs.eof then i = i + 1 exit for end if next%> 孙学堂《王世贞与十六世纪文学思想》序 [2004-7-02 10:01:59]

<% response.write "第" + cstr(curpage) + "页/总" + cstr(rs.pagecount) + "页 " response.write "本页" + cstr(i-1) + "条/总" + cstr(rs.recordcount) + "条 " if curpage = 1 then response.write "首页 前页 " else response.write "首页 前页 " end if if curpage = rs.pagecount then response.write "后页 末页" else response.write "后页 末页" end if rs.close end if 'if rs.bof and rs.eof then end if 'if err.number <> 0 then end if 'if request("topic") = "" then set rs = nothing call endconnection() %>

 
   【关闭窗口】  

国学网站,版权专有;引用转载,注明出处;肆意盗用,即为侵权。
010-68907663

<%rs9.close%>