📄 more.asp
字号:
<%@ LANGUAGE="VBSCRIPT"%>
<%
fenlei=request("fenlei")
page=request("page")
set conn=server.createObject("ADODB.Connection")
dbpath=server.mappath("lovelife.mdb")
conn.open "driver={Microsoft Access Driver (*.mdb)};dbq="&dbpath
set rs=server.createobject("adodb.recordset")
sqltext="select id,biaoti,bm, fbriqi,cishu from loveshenghuo where fenlei="& fenlei &" order by fbriqi desc"
rs.open sqltext,conn,3
rs.pagesize=10
if rs.eof then
response.write "没有文章"
else
select case fenlei
case 1
aa="人生感悟"
case 2
aa="情感天地"
case 3
aa="故事天空"
case 4
aa="生活体验"
case 5
aa="消费心得"
case 6
aa="道听途说"
end select
%>
<html>
<head>
<title></title>
<link rel="stylesheet" href="/html/3508.css">
<style type="text/css">
<!--
.botton { font-size: 12px; color: #006600; background-color: #FFFFF4}
.red { color: #FF0000}
-->
</style>
</head>
<body bgcolor="#FFFFF4">
<table width="740" border="0" cellspacing="0" cellpadding="0" align="center" height="40">
<tr>
<td width="217" height="39" align="center" valign="bottom"> </td>
<td width="523" valign="bottom" height="39"><a href="/default.asp">本站首页</a>
>> 我爱生活</td>
<td width="523" valign="bottom" height="39" align="right"><a href="fabiaowz0.asp" target="_blank">我要发表文章</a>
</td>
</tr>
<tr>
<td colspan="3" height="1" bgcolor="006600"></td>
</tr>
<tr valign="bottom">
<td colspan="3" height="27">
<table width="437" border="1" cellpadding="0" cellspacing="0" align="right" bordercolorlight="#FFFFFF" bordercolordark="#006600">
<tr>
<td width="65" align="center" nowrap><a href=default.asp?fenlei=1>人生感悟</a></td>
<td width="76" align="center" nowrap><a href=default.asp?fenlei=2>情感天地</a></td>
<td width="66" align="center" nowrap><a href=default.asp?fenlei=3>故事天空</a></td>
<td width="65" align="center" nowrap><a href=default.asp?fenlei=4>生活体验</a></td>
<td width="65" align="center" nowrap><a href=default.asp?fenlei=5>消费心得</a></td>
<td width="80" align="center" nowrap><a href=default.asp?fenlei=6>道听途说</a></td>
</tr>
</table>
</td>
</tr>
</table>
<table width="739" border="0" cellspacing="0" cellpadding="0" align="center" height="26">
<tr valign="bottom">
<td height="30" width="452"> <span class="red">〖<%=aa%>〗</span></td>
<td height="47" width="287">本栏计〖<%=rs.pagecount%>〗页,当前为第〖<%=page%>〗页!</td>
</tr>
</table>
<br>
<table width="627" border="1" cellspacing="0" cellpadding="0" align="center" bordercolorlight="#CC0033" bordercolordark="#FFFFFF" bgcolor="#CCCCFF">
<tr>
<td width="335">文章标题</td>
<td width="99">作者</td>
<td width="110">发表日期</td>
<td width="73">浏览次数</td>
</tr>
</table>
<table width="626" border="1" cellspacing="0" cellpadding="0" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF" bgcolor="#FFCCFFv">
<%
' rs.pagesize=30
rs.AbsolutePage=page
for ipage=1 to rs.pagesize
%>
<tr>
<td width="333"><a href='wenzhangxs.asp?id=<%=rs.fields(0).value%>' target="_blank">
<%
if rs.fields(1).value="" then
response.write "无题"
else
response.write rs.fields(1).value
end if
%> </a></td>
<td width="98" nowrap> <%
if rs.fields(2).value="" then
response.write "无名氏"
else
response.write rs.fields(2).value
end if
%> </td>
<td width="108" nowrap><%=formatdatetime(rs.fields(3).value,1)%></td>
<td width="74" nowrap><%=rs.fields(4).value%></td>
</tr>
<%
rs.movenext
if rs.eof then exit for
next
%>
</table>
<br>
<%if rs.pagecount>1 then%>
<table width="700" border="0" cellspacing="0" cellpadding="0" align="center">
<tr align="center">
<td height="1" bgcolor="FF0000"></td>
</tr>
<tr align="center" valign="bottom">
<td height="47">
<%if page>1 then%>
<input type="button" name="Button" value="首页" class="botton" onclick="window.location.href='more.asp?fenlei=<%=fenlei%>&page=1'">
<input type="button" name="Botton" value="前一页" class="botton" onclick="window.location.href='more.asp?fenlei=<%=fenlei%>&page=<%=(page-1)%>'">
<%
end if
if cint(page)<rs.pagecount then
%>
<input type="button" name="Botton" value="后一页" class="botton" onclick="window.location.href='more.asp?fenlei=<%=fenlei%>&page=<%=(page+1)%>'">
<input type="button" name="Botton" value="末页" class="botton" onclick="window.location.href='more.asp?fenlei=<%=fenlei%>&page=<%=rs.pagecount%>'">
<%end if%>
</td>
</tr>
</table>
<%
end if
end if%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -