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

📄 more.asp

📁 大家好
💻 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="职业旅游奇闻明星健康性爱美食电器美丽汽车家居理财"
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>&gt;&gt;<%=titleyj%></td>
    <td width="40">◆<a href="more.asp?class='A'">职业</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>&nbsp;</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">&nbsp; 
    </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%'>&nbsp</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 + -