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

📄 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")
conn.open Application("DBCon_ConnectionString")
set rs=server.createobject("adodb.recordset")
a=request("class")
str1="ABCDEF"
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 upper(classfication)="&a&"order by newsdate desc"
rs.open sqltext,conn,adOpenStatic
rs.pagesize=30
   If rs.RecordCount=0 Then
		Emptyyn=true
		Conn.close
        Set rs=nothing	
        response.write"当前无记录"
        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="../html/3508.css">
<style type="text/css">
<!--
.yj {  font-size: 11px; color: #000000; font-style: italic}
.red {  color: #FF0000}
.botton {  font-size: 12px; background-color: #FFFFF8}
-->
</style>
</head>
<body bgcolor="#FFFFFF">
<table width="740" border="0" cellspacing="0" cellpadding="0" align="center" height="40">
  <tr> 
    <td width="198" height="39" align="center" valign="bottom"><img src="../images/smallmark.gif" width="120" height="25"></td>
    <td width="379" valign="bottom" height="39"><a href="../default.asp">本站首页</a> 
      &gt;&gt; 精品生活</td>
    <td width="163" valign="bottom" height="39"><%=formatdatetime(date,vblongdate)%></td>
  </tr>
  <tr> 
    <td colspan="3" height="1" bgcolor="006600"></td>
  </tr>
</table>
<table width="688" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr valign="bottom"> 
    <td class="red" height="76">【<%=session("classfication")%> 】</td>
  </tr>
  <tr>
    <td bgcolor="006600" height="1"></td>
  </tr>
<%
     if not rs.recordcount=0 then
       for j=1 to rs.pagesize
%>
  <tr> 
    <td><a href="comment.asp?newsid=<%=rs("newsid")%>" target="_blank"><%=rs("title")%></a>   (<span class="yj"><%=formatdatetime(rs("newsdate"),vblongdate)%></span>)</td>
  </tr>
<%    rs.MoveNext
         if rs.eof then
            exit for
         end if
      next
   end if
%> 
</table>
<form action="more.asp" name="mjj" method="post">
  <table width="740" 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>
<!-- #include file="../include/end.htm" -->
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -