📄 index.asp
字号:
<!--#include file="conn.ini"-->
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="Keywords" content="盘古留言板">
<meta name="Description" content="由盘古网站制作(PGCN.NET)简洁、美观、稳定、操作容易、与网站配合更加紧密">
<title>盘古留言板</title>
<LINK href="style.css" rel=Stylesheet type=text/css>
</head>
<body leftmargin="0" topmargin="0">
<table>
<tr>
<td colspan="5"><!--#include file="top.ini"--></td>
</tr>
<tr align="center">
<td width="30">状态</td>
<td>主题</td>
<td width="100">作者</td>
<td width="50">回复</td>
<td width="120">时间</td>
</tr>
<%
If request("PageNo")="" then
PageNo=1
Else
PageNo=int(request("PageNo"))
End If
if request("search")<>"" then
select case request("select")
case "title"
sql="SELECT * from body where title like '%"&request("keyword")&"%' order by top,lasttime desc"
case "writer"
sql="SELECT * from body where writer like '%"&request("keyword")&"%' order by top,lasttime desc"
end select
else
sql="SELECT * from body order by top,lasttime desc"
end if
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
if not(rs.eof and rs.bof) then
rs.Pagesize=20
rs.absolutepage=PageNo
x = 0
For x = 1 to rs.Pagesize
if x mod 2 then
tr_color="#EBEBEB"
else
tr_color="#ffffff"
end if
If rs.eof then
Exit For
Else%>
<tr bgcolor="<%=tr_color%>">
<td align="center">
<%
if rs("top")= true then
response.write "<img src=images/top.gif width=18 height=12 alt=固顶留言>"
else
today=date
lasttime=rs("lasttime")
if lasttime <= today then
response.write "<img src=images/blue.gif width=18 height=12 alt=非今日留言>"
elseif( lasttime > today ) then
if cint(rs("recount"))=0 then
response.write "<img src=images/Green.gif width=18 height=12 alt=今日新留言>"
else
response.write "<img src=images/red.gif width=18 height=12 alt=今日回复>"
end if
end if
end if
%>
</td>
<td><a href="disp.asp?id=<%=rs("id")%>" title="<%="内容:"&server.htmlencode(left(rs("body"),100))%><%if len(rs("body"))>100 then response.write "……"%>"><%=server.htmlencode(rs("title"))%></a></td>
<td align="center"><%=server.HTMLEncode(rs("writer"))%></td>
<td align="center"><%=rs("recount")%></td>
<td><%=rs("lasttime")%></td>
</tr>
<%
rs.MoveNext
End If
Next
%>
<tr align="center">
<td colspan="5">分页:
<select name="select" onChange='location.href="?PageNo="+this.value'>
<%
for x=1 to int(rs.pagecount)
%>
<option value="<%=x%>" <%if x=int(PageNo) then response.write "selected"%>><%=x%>/<%=int(rs.pagecount)%></option>
<%
next
%>
</select>
</td>
</tr>
<%
end if
rs.close
set rs=nothing
%>
</table>
</body>
</html>
<script language = "JavaScript" src = "bottom.js"/></script>
<%call connclose%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -