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

📄 list.asp

📁 大家好
💻 ASP
字号:
<%@ language="vbscript" %>
<% Response.Expires=0%>
<%
dim page,boardid

if isempty(request("boardid")) then
	response.write "boardid error!"
	response.end
else
	boardid=request("boardid")
end if

page=request("page")
if isempty(page) then
	page=1
end if 

set conn=server.createObject("ADODB.Connection")
	dbpath=server.mappath("club.mdb")
	conn.open "driver={Microsoft Access Driver (*.mdb)};dbq="&dbpath
	set rs=server.createobject("ADODB.Recordset")



sql="select boardname,boardgg,boardmm,aboutboard from board_info where boardid="&boardid
rs.open sql,conn

if rs.bof and rs.eof then
	response.write "no board!"
	rs.close
	set rs=nothing
	conn.close
	set conn=nothing
	response.end
else
	boardname=rs("boardname")
	set rs1=server.createobject("ADODB.RecordSet")
	sqltext="select id,guestname,title,whattime,[textsize],clicknum,renum,feeling from mainboard where fatherid=0 and boardid="&boardid&" order by whattime desc"
	rs1.open sqltext,conn,3
	if rs1.recordcount>0 then
		If page<1 or (page-1)*rs.pagesize>=rs1.recordcount then
   			page=1
 		End If
 	rs1.pagesize=30
 	rs1.absolutepage=cint(page)
	end if
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<style type="text/css">
<!--
.12{font-size:14.5px;font-family:宋体,sans-serif}
.botton {  font-size: 12px; color: #000000; background-color: #FFFFF0}
.color {  color: #880000}
-->
</style>
<title>main board</title>
<link rel="stylesheet" href="club.css">
<script language="javascript">
<!--
	function check(page)
	{
	if(document.form1.page.value>page)
	{
	alert("请在有效页次内跳转!");
	return false;
	}
	return true;
	}
//-->
</script>
</head>

<body bgcolor="#FFFFF0">
    <table border="0" width="90%" cellpadding="0" cellspacing="0" align="center">
      <tr align="center"> 
        <td width="12%" bgcolor="#CCCCFF"><%=boardname%></td>
        <td width="42%">斑竹 〖<%=rs("boardgg")%>〗 副斑竹 〖<%=rs("boardmm")%>〗</td>
        <td width="46%"><%=rs("aboutboard")%></td>
      </tr>
      <tr align="center"> 
        <td height="1" bgcolor="006600" colspan="3"></td>
      </tr>
    </table>
<form method="POST" action="list.asp" name="form1" onsubmit="return check(<%=rs1.pagecount%>)">
  <input type="hidden" name="boardid" value="<% =boardid %>">
  <table border="1" borderColorDark="#FFFFFF" borderColorLight="#000000" cellspacing="0" height="22" width="100%">
    <tr bgcolor="#FFEBAD" align="center"> 
      <td height="1" width="691"><a href="list.asp?page=<%=page%>&amp;boardid=<%=boardid%>">刷新浏览</a> 
<%
if rs1.pagecount>1 then
	if page=1 then
		response.write "<a href='list.asp?page="&page+1&"&boardid="&boardid&"'>后页</a> <a href='list.asp?page="&rs1.pagecount&"&boardid="&boardid&"'>未页</a>"
	elseif  page>1 and page<rs1.pagecount then
		response.write "<a href='list.asp?page=1&boardid="&boardid&"'>首页</a> <a href='list.asp?page="&page-1&"&boardid="&boardid&"'>前页</a>  <a href='list.asp?page="&page+1&"&boardid="&boardid&"'>后页</a> <a href='list.asp?page="&rs1.pagecount&"&boardid="&boardid&"'>未页</a>"
	elseif page=rs1.pagecount then
		response.write "<a href='list.asp?page=1&boardid="&boardid&"'>首页</a> <a href='list.asp?page="&page-1&"&boardid="&boardid&"'>前页</a>"
	end if
end if
%>
页次:〖<%=page%>/<%=rs1.pagecount%>页〗 共 〖<%=rs1.recordcount%>〗 条记录!第<input type="text" name="page" size="3" value="<%=page%>" class="botton">页
        <input type="submit" value="go" name="B1" tabindex="2" class="botton">
      </td>
    </tr>
  </table>
</form>

<table border="1" width="100%" cellspacing="0" bordercolorlight="#000000" bordercolordark="#FFFFFF">
  <tr bgcolor="#FFEBAD"> 
    <td width="48%" bgcolor="#FFEBAD" align="center"> 主题</td>
    <td width="13%" align="center"> 发言 </td>
    <td width="5%" align="center"> 回复 </td>
    <td width="29%" align="center"> 发表时间 </td>
    <td width="5%" align="center"> 人气 </td>
  </tr>
  <%                                                                                                                                                              
     if rs1.recordcount>0 then                                 
      for j=1 to rs1.pagesize                                       
     if len(trim(rs1("title")))>15 then                                       
     title=left(rs1("title"),15)&"..."                                
     else                                
     title=rs1("title")                                      
     end if  %> 
  <tr bgcolor="#FFEBAD"> 
    <td width="48%"> <img src="browimage\<%=trim(rs1("feeling"))%>.gif">&nbsp;<a href="comment.asp?id=<%=rs1("id")%>&amp;boardname=<%=boardname%>"><%=title%></a> (<%=rs1("textsize")%>)</td>
    <td width="13%"> <a href="userdet.asp?username=<%=rs1("guestname")%>"><%=rs1("guestname")%></a> 
    </td>
    <td width="5%"> 
     <%=rs1("renum")%>
    </td>
    <td width="29%"> 
      <%=rs1("whattime")%>
    </td>
    <td width="5%"> 
     <%=rs1("clicknum")%>
    </td>
  </tr>
<%
Rs1.MoveNext                                                               
	if rs1.eof then                                                               
		exit for                                                               
	end if                                                               
next        
rs.close        
rs1.close        
set rs=nothing        
set rs1=nothing        
conn.close        
set conn=nothing                                                               
end if                                                               
end if                                                                                                                                                              
%> 
</table>
<br>
<%if session("username")="" then
  response.write "超时操作,不能发言,请重新登录"
else               
%> 
<table border="1" width="100%" bordercolordark="#FFFFFF" bordercolor="#006600" cellpadding="0" cellspacing="0">
  <tr align="center"> 
    <td width="100%"> 
      <form method="POST" action="newarticle.asp">
      <input type="hidden" name="username" value="<%=session("username")%>">
        <input type="hidden" name="boardid" value="<%=boardid%>">
        <table width="60%" bordercolordark="#FFFFFF" cellpadding="0" cellspacing="0" border="0">
          <tbody> 
          <tr> 
            <td colspan="2" width="745"><font color="#800000">我</font><font color="#FF0000"><%=session("username")%></font><font color="#800000">来发表文章:</font></td>
          </tr>
          <tr> 
            <td nowrap width="15%" align="right" class="color">〖话题〗</td>
            <td width="85%"><font color="#008040"> 
              <input maxlength="255" name="Title" size="40" style="BACKGROUND-COLOR: rgb(252,252,241); COLOR: rgb(0,0,255)" class="botton">
              </font></td>
          </tr>
          <tr> 
            <td nowrap width="15%" align="right"><font color="#800000">〖选择表情〗</font></td>
            <td valign="center" width="85%"></td>
          </tr>
          <tr> 
            <td colspan="2" nowrap width="100%"> 
              <table border="0" width="396" cellspacing="0" cellpadding="0" align="center">
                <tr> 
                  <td nowrap width="53" height="26"> 
                    <input type="radio" value="0" name="feeling" checked tabindex="7">
                    <img src="browimage/0.gif" width="20" height="20"></td>
                  <td nowrap width="51" height="26"> 
                    <input type="radio" value="1" name="feeling">
                    <img src="browimage/1.gif" width="20" height="20"></td>
                  <td nowrap width="52" height="26"> 
                    <input type="radio" value="2" name="feeling">
                    <img src="browimage/2.gif" width="20" height="20"></td>
                  <td nowrap width="52" height="26"> 
                    <input type="radio" value="3" name="feeling">
                    <img src="browimage/3.gif" width="20" height="20"></td>
                  <td nowrap width="52" height="26"> 
                    <input type="radio" value="8" name="feeling">
                    <img src="browimage/8.gif" width="20" height="20"> </td>
                  <td nowrap width="55" height="26"> 
                    <input type="radio" value="9" name="feeling">
                    <img src="browimage/9.gif" width="20" height="20"> </td>
                </tr>
                <tr> 
                  <td nowrap width="53" height="27"> 
                    <input type="radio" value="4" name="feeling">
                    <img src="browimage/4.gif" width="20" height="20"></td>
                  <td nowrap width="51" height="27"> 
                    <input type="radio" value="5" name="feeling">
                    <img src="browimage/5.gif" width="20" height="20"></td>
                  <td nowrap width="52" height="27"> 
                    <input type="radio" value="6" name="feeling">
                    <img src="browimage/6.gif" width="20" height="20"></td>
                  <td nowrap width="52" height="27"> 
                    <input type="radio" value="7" name="feeling">
                    <img src="browimage/7.gif" width="20" height="20"></td>
                  <td nowrap width="52" height="27"> 
                    <input type="radio" value="11" name="feeling">
                    <img src="browimage/11.gif" width="20" height="20"> </td>
                  <td nowrap width="55" height="27"> 
                    <input type="radio" value="10" name="feeling">
                    <img src="browimage/10.gif" width="20" height="20"> </td>
                </tr>
              </table>
            </td>
          </tr>
          <tr> 
            <td colspan="2" nowrap width="100%"> 
              <hr color="#f3f3cb">
            </td>
          </tr>
          <tr> 
            <td width="15%" align="right"><font color="#800000">〖内容〗</font></td>
            <td width="85%"></td>
          </tr>
          <tr> 
            <td colspan="2" width="745"> 
              <textarea cols="71" name="Content" rows="5" style="BACKGROUND-COLOR: rgb(252,252,241); COLOR: rgb(0,0,0)" class="botton"></textarea>
            </td>
          </tr>
          <tr> 
            <td colspan="2" width="100%"> 
              <hr color="#f3f3cb">
            </td>
          </tr>
          <tr> 
            <td width="15%"><font color="#0080c0">链接主题:<br>
              链接URL :<br>
              链接图象:</font></td>
            <td width="85%"><font color="#800000"> 
              <input name="httptitle" size="40" class="botton">
              <br>
              <input name="httpadd" size="40" value="http://" class="botton">
              <br>
              </font> 
              <input name="imgadd" size="40" value="http://" class="botton">
            </td>
          </tr>
          </tbody> 
        </table>
        <p> 
          <input name="btSubmit" type="submit" value="发表文章" class="botton">
          <input name="btClear" onclick="OnClearClick();" type="button" value="清除内容" class="botton">
        </p>
    </form>
    </td>
  </tr>
</table>
<%end if%>
</body>
</html>

⌨️ 快捷键说明

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