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

📄 default.asp

📁 大家好
💻 ASP
字号:
<%@ LANGUAGE="VBSCRIPT" %>
<!--#include file="ADOVBS.INC"-->
<%
strAction=Request.Form("cmdMove")
If Not (strAction="前一页" or strAction="后一页") Then
DbPath = SERVER.MapPath("forum.mdb")
   Set conn = Server.CreateObject("ADODB.Connection")
   conn.open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DbPath
  set rs=server.createobject("adodb.recordset")
  sqltext="select * from forum order by xl,regtime desc"
  rs.open sqltext,conn,adOpenkeyset,adlockoptimistic,adcmdtext
  rs.PageSize=20
   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">
<style type="text/css">
<!--
.link1 {  color: #FFFFFF}
.link2 {  color: #FF0000}
.link3 {  color: #006600}
.big1 {  font-size: 14px; text-align: justify; vertical-align: 1%; line-height: 18px}
.title {  font-size: 14px; background-color: #CCFFCC; font-weight: bold}
.botton {  color: #000066; background-color: #FFCC99; font-size: 12px; cursor: hand;}
-->
</style>
<link rel="stylesheet" href="3508.css">
</head>

<body bgcolor="#FFFFdf" background="../images/bg1.gif">
<table width="740" border="0" cellspacing="0" cellpadding="0" align="center" height="15">
  <tr> 
    <td width="176" align="center" background="../images/coner.gif" height="19"><%=formatdatetime(now,vblongdate)%></td>
    <td width="564" height="19">&nbsp; </td>
  </tr>
</table>
<table width="740" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr> 
    <td>&nbsp;</td>
  </tr>
</table>
<table width="740" border="0" cellspacing="0" cellpadding="0" align="center" height="17">
  <tr> 
    <td width="71">&nbsp;</td>
    <td>&gt;&gt;论坛</td>
  </tr>
</table>
<table width="740" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr> 
    <td width="20" align="left">&nbsp;</td>
    <td width="720" valign="top"> 
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="97%"> 
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td height="1" bgcolor="#006600"></td>
              </tr>
              <tr>
                <td height="19">&nbsp;</td>
              </tr>
            </table>
              </td>
          <td width="3%">&nbsp;</td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table width="740" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr> 
    <td height="329" valign="top" width="1" bgcolor="#006600"></td>
    <td height="329" valign="top" width="739"> 
      <div align="center"> 
        <center>
          <table width="50%" border="0" cellspacing="0" cellpadding="0">
            <tr align="center"> 
              <td>| <a href="newtitle.asp">发表新文章 </a> | <a href="mailto:sales@tianshi.com.cn">站长信箱</a> 
                 |</td>
            </tr>
          </table>
        </center>
      </div>
      <div align="center"> 
        <table border="0" width="636">
          <tbody> 
          <tr bgcolor="#00FF00"> 
            <td width="288"><font color="#000080">标题</font> </td>
            <td width="58" align="center"><font color="#000080">发表人</font> </td>
            <td noWrap width="156" align="center"><font color="#000080">发表时间</font> 
            </td>
            <td noWrap width="54" align="center"><font color="#000080">阅读次数</font> 
            </td>
            <td noWrap width="58" align="center"><font color="#000080">跟读次数</font> 
            </td>
          </tr>
          <%
     if not rs.recordcount=0 then
       for j=1 to rs.pagesize%> <% if len(trim(rs("xl")))=5 then %> <%if j<>1 then%> 
          <tr> 
            <td height="1" width="100%" bgcolor="#00FF00" colspan="5"></td>
          </tr>
          <%end if%> 
          <tr bgcolor="#00FF00"> 
            <td width="288"><img src="browimage\<% =trim(rs("brow")) %>.gif"><a href="comment.asp?id=<% =rs("id") %>"><%=rs("title")%></a> 
            </td>
            <td width="58"><%=rs("username")%> </td>
            <td width="156"><%
mjj=formatdatetime(rs("regtime"),vblongdate)&" "&formatdatetime(rs("regtime"),vblongtime)
response.write mjj
%> </td>
            <td width="54"><%=rs("hitnumber")%> </td>
            <td width="58"><%=rs("child")%> </td>
          </tr>
          <% end if %> <% if len(trim(rs("xl")))=8 then %> 
          <tr bgcolor="#00FF00"> 
            <td width="288">&nbsp;&nbsp;<img src="browimage\<% =trim(rs("brow")) %>.gif"> 
              <a href="comment.asp?id=<% =rs("id") %>"><%=rs("title")%></a> </td>
            <td width="58"><%=rs("username")%> </td>
            <td width="156"><%
mjj=formatdatetime(rs("regtime"),vblongdate)&" "&formatdatetime(rs("regtime"),vblongtime)
response.write mjj
%> </td>
            <td width="54"><%=rs("hitnumber")%> </td>
            <td width="58"><%=rs("child")%> </td>
          </tr>
          <% end if %> <% if len(trim(rs("xl")))=11 then %> 
          <tr bgcolor="#00FF00"> 
            <td width="288">&nbsp;&nbsp;&nbsp;&nbsp;<img src="browimage\<% =trim(rs("brow")) %>.gif"><a href="comment.asp?id=<% =rs("id") %>"><%=rs("title")%></a> 
            </td>
            <td width="58"><%=rs("username")%> </td>
            <td width="156"><%
mjj=formatdatetime(rs("regtime"),vblongdate)&" "&formatdatetime(rs("regtime"),vblongtime)
response.write mjj
%> </td>
            <td width="54"><%=rs("hitnumber")%> </td>
            <td width="58"><%=rs("child")%> </td>
          </tr>
          <% end if %> <% if len(trim(rs("xl")))=14 then %> 
          <tr bgcolor="#00FF00"> 
            <td width="288">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="browimage\<% =trim(rs("brow")) %>.gif"><a href="comment.asp?id=<% =rs("id") %>"><%=rs("title")%></a> 
            </td>
            <td width="58"><%=rs("username")%> </td>
            <td width="156"><%
mjj=formatdatetime(rs("regtime"),vblongdate)&" "&formatdatetime(rs("regtime"),vblongtime)
response.write mjj
%> </td>
            <td width="54"><%=rs("hitnumber")%> </td>
            <td width="58"><%=rs("child")%> </td>
          </tr>
          <% end if %> <% if len(trim(rs("xl")))=17 then %> 
          <tr bgcolor="#00FF00"> 
            <td width="288"><img src="browimage\<% =trim(rs("brow")) %>.gif"> 
              <a href="comment.asp?id=<% =rs("id") %>"><%=rs("title")%></a> </td>
            <td width="58"><%=rs("username")%> </td>
            <td width="156"><%
mjj=formatdatetime(rs("regtime"),vblongdate)&" "&formatdatetime(rs("regtime"),vblongtime)
response.write mjj
%> </td>
            <td width="54"><%=rs("hitnumber")%> </td>
            <td width="58"><%=rs("child")%> </td>
          </tr>
          <% end if %> <%
     rs.MoveNext
         if rs.eof then
            exit for
         end if
      next
   end if

%> </tbody> 
          <tr> 
            <td height="1" width="100%" bgcolor="#006600" colspan="5"></td>
          </tr>
        </table>
        <p align="center">共有<% =rs.RecordCount %>条符合条件的信息,本页是第<% =Session("pg") %>页</p>
        <form action="default.asp" name="查询" method="post">
          <% If Session("pg")>1 Then %> 
          <p> 
            <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%> </p>
        </form>
        <table height="1" width="396" cellpadding="0" cellspacing="0" border="0">
          <tr align="center"> 
            <td height="19" width="392">| <a href="newtitle.asp">发表新文章 </a> | <a href="mailto:sales@tianshi.com.cn">站长信箱</a> 
               |</td>
          </tr>
        </table>
      </div>
    </td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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