?? more.asp
字號:
<%@ language="vbscript"%>
<!-- #include file="adovbs.inc" -->
<%
strAction=Request.Form("cmdMove")
if not(straction="前一頁" or straction="后一頁") then
set conn=server.createObject("ADODB.Connection")
dbpath=server.mappath("news.mdb")
conn.open "driver={Microsoft Access Driver (*.mdb)};dbq="&dbpath
set rs=server.createobject("adodb.recordset")
a=request("class")
str1="ABCDEFGHIJKL"
str2="職業(yè)旅游奇聞明星健康性愛美食電器美麗汽車家居理財"
s=instr(1,str1,mid(a,2,1),1)
titleyj=midb(str2,(s-1)*4+1,4)
session("classfication")=titleyj
sqltext="Select * from news where classfication="&a&" order by newsdate desc"
'response.write sqltext
rs.open sqltext,conn,adOpenStatic
rs.pagesize=60
If rs.RecordCount=0 Then
Emptyyn=true
Conn.close
Set rs=nothing
response.write"當前無記錄,<a href='index.asp'>返回</a>"
response.end
Else
rs.AbsolutePage=1
Set Session("rs")=rs
Session("pg")=1
End If
Else
Set rs=Session("rs")
Select Case strAction
Case "前一頁"
If Session("pg")>1 Then
Session("pg")=Session("pg")-1
Else
Session("pg")=1
End if
rs.AbsolutePage=Session("pg")
Case "后一頁"
If rs.AbsolutePage<rs.PageCount Then
Session("pg")=Session("pg")+1
Else
Session("pg")=rs.PageCount
End if
rs.AbsolutePage=Session("pg")
case Else
Session("pg")=1
rs.AbsolutePage=Session("pg")
End Select
End If
%>
<html>
<head>
<title>新聞</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="3508.css">
<style type="text/css">
<!--
.bottom { font-size: 12px; color: #000000; background-color: #E8E277; cursor: hand}
.textarea { font-size: 12px; color: #006600; background-color: #FFFFE8}
.dateyj { font-size: 11px; color: #000000; font-style: italic}
.big1 { font-size: 14px; color: #003366}
.white { color: #FFFFFF}
.new1 { font-size: 13pt; font-weight: bold; color: #FF0000}
.yjtitle { line-height: 50px}
.darkred { color: #FF0000}
.botton { font-size: 12px; line-height: 14px; color: #FFFFFF; background-color: #669900}
-->
</style>
</head>
<body bgcolor="#FFFFFF">
<table width="740" border="0" cellspacing="0" cellpadding="0" align="center" height="18" bgcolor="#FFCC99">
<tr>
<td width="260">【本站導航】 <a href="default.asp">新聞</a>>><%=titleyj%></td>
<td width="40">◆<a href="more.asp?class='A'">職業(yè)</a> </td>
<td width="40">◆<a href="more.asp?class='B'">旅游</a></td>
<td width="40">◆<a href="more.asp?class='C'">奇聞</a></td>
<td width="40">◆<a href="more.asp?class='D'">明星</a></td>
<td width="40">◆<a href="more.asp?class='E'">健康</a></td>
<td width="40">◆<a href="more.asp?class='F'">性愛</a></td>
<td width="40">◆<a href="more.asp?class='G'">美食</a></td>
<td width="40">◆<a href="more.asp?class='H'">電器</a></td>
<td width="40">◆<a href="more.asp?class='I'">美麗</a></td>
<td width="40">◆<a href="more.asp?class='J'">汽車</a></td>
<td width="40">◆<a href="more.asp?class='K'">家居</a></td>
<td width="40">◆<a href="more.asp?class='L'">理財</a></td>
</tr>
</table>
<table width="740" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td> </td>
</tr>
</table>
<table border="0" align="center" cellpadding="0" cellspacing="0" width="740">
<tr>
<td width="163" valign="top" align="center" rowspan="2" bgcolor="#CCCCFF">
</td>
<td rowspan="2" align="center" valign="top" height="105">
<table border="0" cellspacing="0" cellpadding="0" align="center" width="500">
<tr valign="bottom">
<td class="red" colspan="2">【<%=session("classfication")%> 】</td>
</tr>
<tr>
<td bgcolor="006600" colspan="2"></td>
</tr>
<%
do while not rs.eof
%>
<tr>
<td width="50%"> ◎<a href="comment.asp?newsid=<%=rs("newsid")%>" target="_blank"><%=rs("title")%></a></td>
<%
rs.movenext
if rs.eof then
response.write "<td width='50%'> </td>"
exit do
else
%>
<td width="50%"> ◎<a href="comment.asp?newsid=<%=rs("newsid")%>" target="_blank"><%=rs("title")%></a></td>
</tr>
<%
rs.movenext
end if
loop
%>
</table>
<form action="more.asp" name="mjj" method="post">
<table width="400" align="center" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="center"> <% If Session("pg")>1 Then %>
<input type="submit" name="cmdMove" value="前一頁" class="botton">
<%
End If
If Session("pg")<rs.PageCount Then
%>
<input type="submit" name="cmdMove" value="后一頁" class="botton">
<%End If%> </td>
</tr>
</table>
</form>
</td>
</tr>
<tr> </tr>
</table>
新聞</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -