⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 study.asp

📁 BBS源代码网上到处都是, 实现语言也不尽相同, 本人上传的BBSExample是自己做的, 符合课程设计的要求
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#Include file="odbc_conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#f2f8ff">
<table width="750" border="0" height="20" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><img src="images/top.gif" width="750" height="20"></td>
  </tr>
</table>
<table width="750" border="0" align="center" bgcolor="#e8f4ff" cellspacing="0" cellpadding="0" height="70">
  <tr> 
    <td width="166" rowspan="3">
      <div align="center"><img src="images/logo.gif" width="150" height="70"></div>
    </td>
    <td width="487" rowspan="3">
      <div align="center"><font size="7" face="楷体_GB2312" color="#0066FF"><b>学习论区</b></font></div>
    </td>
    <td width="97"><img src="images/zhuye.gif" width="18" height="18"> 设为首页</td>
  </tr>
  <tr>
    <td width="97"><img src="images/shoucang.gif" width="18" height="18"> 加入收藏</td>
  </tr>
  <tr>
    <td width="97"><img src="images/lianxi.gif" width="16" height="16"> 联系我们</td>
  </tr>
</table>
<table width="750" border="0" cellspacing="0" cellpadding="0" align="center" height="30">
  <tr> 
    <td rowspan="2" width="130"><img src="images/c1.gif" width="130" height="30"></td>
    <td height="12" valign="top"><img src="images/c2.gif" width="490" height="12"></td>
    <td rowspan="2" width="130"><img src="images/c3.gif" width="130" height="30"></td>
  </tr>
  <tr> 
    <td background="images/c4.gif" height="18"><marquee height="20" direction="left" width="100%">
<img src="images/dog.gif"><font>欢迎光临我的论坛,请指教~!</font>
</marquee></td>
  </tr>
</table>
<table width="750" align="center">
<tr>
<td align="left"><img src="images/edit.gif"><a href="restudy.asp"><font size="3" color="#0000FF" face="仿宋_GB2312"><b>添加新帖子</b></font></a></td>  
</tr>   
<td><hr></td>
</table>

<table width="750" border="1" align="center" cellpadding="0" cellspacing="0">
<tr bgcolor="#0033FF" height="20">
<td width="32%" height="24" align="center" bgcolor="#00CCFF"> <font size="4" color="#FFFFFF" face="宋体"><b> 主 题 </b></font></td>
<td width="15%" align="center" bgcolor="#00CCFF"><font size="4" color="#FFFFFF" face="宋体"><b> 作 者 </b></font></td>
<td width="11%" align="center" bgcolor="#00CCFF"> <font size="4" color="#FFFFFF" face="宋体"><b> 人 气 </b></font></td>
<td width="12%" align="center" bgcolor="#00CCFF"> <font size="4" color="#FFFFFF" face="宋体"><b> 回 帖 </b></font></td>
<td width="19%" align="center" bgcolor="#00CCFF"><font size="4" color="#FFFFFF" face="宋体"><b> 发表时间 </b></font></td>
</tr>
<%
 dim sql,rs
  set rs=server.CreateObject("adodb.recordset")
  sql="select * from news where type='学习论区' order by times desc"
  rs.open sql,conn,1
  if not rs.bof and not rs.eof then
    dim pageno
	 if request.QueryString("pageno")="" then
	   pageno=1
	 else  pageno=cint(request.QueryString("pageno"))
	 end if
    rs.pagesize=20
	rs.absolutepage=pageno
	dim i
	i=rs.pagesize
	
	do while not rs.eof and i>0
	  i=i-1
%>
<tr>
<td><a href="read.asp?id=<%=rs("id") %>&type1=<%=rs("type")%>"><%=rs("title")%></a></td>
<td><img src="images/edit.gif"><%=rs("author")%></td>
<td><%=rs("hits")%></td>
<td><%=rs("return")%></td>
<td><%=rs("times")%></td>
</tr>

<%
  rs.movenext
  loop
%>	
</table>  
<center>
<p>
   	
	<%
	response.Write "请选择数据页:"
	for i=1 to rs.pagecount
	   if i=pageno then
	     response.Write i&"&nbsp;"
	   else
	     response.Write "<a href='fenye.asp?pageno="&i&"'>"&i&"</a>&nbsp;"
	  end if
	 next
	else
	  response.Write "该记录集为空!"
end if 
rs.close
conn.close  
%>

</center>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -