📄 bbs.asp
字号:
<!--#include file="check.asp"-->
<!--#INCLUDE FILE="connect.asp" -->
<html>
<head>
<title>办公自动化(OA)</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="JavaScript" src="apply.js">
</script>
<link rel="stylesheet" href="apply.css" type="text/css">
</head>
<body oncontextmenu="return false" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<%
set rs=server.createobject("adodb.recordset")
set ptr=server.createobject("adodb.recordset")
if Request.ServerVariables("Request_Method")="POST" then
title=checksql(request("title"))
sql="select * from bbs where title like '%"&title&"%' or bbs like '%"&title&"%' order by id desc"
rs.open sql,conn,1,1
else
sql="select * from bbs order by id desc"
rs.open sql,conn,1,1
end if
mypage=10
PageNo=CINT(REQUEST("PageNo"))
TSUM=1
if PageNo="" or PageNo=0 then
PageNo=1
else
PageNo=PageNo+1
PageNo=PageNo-1
end if
if not rs.eof then
rs.pagesize=CINT(mypage)
TSum=INT(rs.RECORDCOUNT/Mypage*-1)*-1
rs.absolutepage=PageNo
RowCount=rs.PageSize
nowrecord=0
end if
%>
<form name="form" method="POST" action="">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="50">
<tr>
<td align="center"><img src="images/bbs.gif"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="23">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="23">
<tr>
<td width="10"><img src="images/bbsn3l.gif" width="10" height="23"></td>
<td background="images/bbsn3.gif"> <a href="addbbs.asp" class="aapply" onClick="return OpenWindows(this.href)">发表文章</a>
<a href="#" onClick="javascript:history.go(-1)" class="aapply">返
回</a> </td>
</tr>
</table>
</td>
<td width="10"><img src="images/bbsnrt.gif" width="10" height="23"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="1" cellpadding="2" bgcolor="#A7BAE4">
<tr bgcolor="E7ECF7">
<td height="24" width="7%" align="center"> 属 性</td>
<td height="24" width="41%" align="center" bgcolor="E7ECF7">主 题</td>
<td height="24" width="16%" align="center"> 作 者</td>
<td height="24" width="19%" align="center"> 发表时间</td>
<td height="24" width="8%" align="center"> 回 复</td>
<td height="24" width="9%" align="center"> 阅 读</td>
</tr>
<%if rs.eof then %>
<tr bgcolor="ffffff">
<td height="24" colspan="6" bgcolor="F3F6FA" align="center" class=f6wait>没有找到文章</td>
</tr>
<%
else
for i=1 to mypage
if rs.eof then exit for
%>
<tr bgcolor="ffffff">
<td height="24" width="7%" bgcolor="F3F6FA" align="center" >
<%if rs("uid")=session("uid") then
response.write "<img src='images/bbsadmin.gif'>"
else
sql="select id from reply where uid='"&session("uid")&"' and bbsid="&rs("id")
ptr.open sql,conn,1,1
if not ptr.eof then
response.write "<img src='images/locktop.gif'>"
else
response.write "<img src='images/closed.gif'>"
end if
ptr.close
end if
%>
</td>
<td height="24" width="41%" align="center" bgcolor="ffffff" ><a href="replybbs.asp?id=<%=rs("id")%>" class="aapply">
<%temp=""&rs("title")
if len(temp)>20 then
temp=left(temp,20)&"…"
end if
response.write(temp)
%>
</a></td>
<td height="24" width="16%" bgcolor="F3F6FA" align="center" > <a href="replybbs.asp?id=<%=rs("id")%>" class="aapply">
<%=rs("name")%></a></td>
<td height="24" width="19%" bgcolor="ffffff" align="center"> <%=rs("bbstime")%></td>
<td height="24" width="8%" bgcolor="F3F6FA" align="center">
<%if rs("reply")>5 then
response.write("<font class=numberbold>"&rs("reply")&"</font>")
else
response.write(rs("reply"))
end if
%>
</td>
<td height="24" width="9%" align="center">
<%if rs("readnum")>10 then
response.write("<font class=numberbold>"&rs("readnum")&"<font>")
else
response.write rs("readnum")
end if
%>
</td>
</tr>
<%rs.movenext
next
end if
%>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="23">
<tr>
<td width="10"><img src="images/bbsnld.gif" width="10" height="23"></td>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" background="images/bbsn4.gif">共计<%=tsum%>页,目前第<font class=numberbold><%=PageNo%></font>页
<%
if (PageNo*mypage-mypage)>0 then
PrwePage=PageNo-1
response.write "<a href='bbs.asp?PageNo="&PrwePage&"' class=aapply>上一页</a> "
else
response.write "上一页 "
end if
if (PageNO*mypage)<rs.recordcount then
NextPage=PageNo+1
response.write" <a href='bbs.asp?PageNo="&NextPage&"' class=aapply>下一页</a>"
else
response.write" 下一页"
end if
%>
<a href="#" onClick="javascript:history.go(-1)" class="aapply">返
回</a> </td>
<td width="10"><img src="images/bbsnrd.gif" width="10" height="23"></td>
</tr>
</table>
</td>
</tr>
</table>
<table width="420" border="0" cellspacing="0" cellpadding="0" height="40">
<tr>
<td width="29" align="center" > <img src='images/bbsadmin.gif'> </td>
<td width="80" class="9blue">发表的文章</td>
<td width="29" align="center" > <img src='images/closed.gif'> </td>
<td width="97" class="9blue">没有回复的文章</td>
<td width="29" align="center" ><img src='images/locktop.gif'></td>
<td class="9blue">回复过的文章</td>
</tr>
</table>
</form>
<%rs.close
set rs=nothing
set ptr=nothing
conn.close
set conn=nothing
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -