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

📄 index.asp

📁 网上答疑问,提供网上提问,解答等,方便老师同学们交流
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>:::网上答疑:::</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312"><LINK 
href="css.css" type=text/css rel=stylesheet>
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY  leftMargin=0 topMargin=0 
marginheight="0" marginwidth="0">
<TABLE cellSpacing=0 cellPadding=0 width=778 align=center border=0>
  <TBODY>
  <TR>
      <TD vAlign=top width=778 background=images/02.jpg height=138>&nbsp; 
      </TD>
    </TR>
  <TR>
    <TD vAlign=top>
      <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR vAlign=top>
          <TD width="18%">
            <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
              <TBODY>
              <TR>
                <TD background=images/07.jpg>
                  <TABLE cellSpacing=0 cellPadding=0 width=184 border=0>
                    <TBODY>
                    <TR>
                              <TD><IMG height=353 src="images/03.jpg" 
                        width=183 useMap=#Map border=0 href="bmwd.htm"> </TD>
                            </TR>
                    <TR>
                      <TD>
                        <TABLE cellSpacing=0 cellPadding=0 width=182 border=0>
                          <TBODY>
                          <TR>
                            <TD><IMG height=6 src="images/04.jpg" 
                              width=183></TD></TR>
                          <TR>
                            <TD background=images/05.jpg>
                              <TABLE cellSpacing=0 cellPadding=0 width="100%" 
                              border=0>
                                <TBODY>
                                <TR>
                                <TD width=10>&nbsp;</TD>
                                <TD>
                                <TABLE cellSpacing=0 cellPadding=0 width="100%" 
                                border=0>
                                <TBODY>
                                <TR>
                                                      <TD vAlign=top height=252>&nbsp; </TD>
                                                    </TR></TBODY></TABLE></TD>
                                <TD 
width=10>&nbsp;</TD></TR></TBODY></TABLE></TD></TR>
                          <TR>
                            <TD><IMG height=9 src="images/06.jpg" 
                              width=183></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD>
          <TD width="82%">
            <TABLE cellSpacing=0 cellPadding=0 width="98%" align=center 
border=0>
              <TBODY>
              <TR>
                <TD>
                  <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
                    <TBODY>
                    <TR>
                              <TD> <table width="100%" border="0">
                                  <tr> 
                                    <td width="87%"><div align="right"><a href="ask.asp"><font color="#FF0000">提出问题</font></a></div></td>
                                    <td width="13%"><a href="admin.asp" ><font color="ff0000">管理员登录</font></a></td>
                                  </tr>
                                </table></TD></TR>
                    <TR>
                      <TD>
                        <TABLE style="BORDER-COLLAPSE: collapse" 
                        borderColor=#efefef cellSpacing=0 cellPadding=0 
                        width="100%" border=1>
                          <TBODY>
                          <TR>
                            <TD width="100%">
							
                              <TABLE cellSpacing=0 cellPadding=0 width="100%" 
                              border=0>
                                          <TBODY>
                                            <TR> 
                                              <TD width="100%" height=15></TD>
                                            </TR>
                                            <TR> 
                                              <TD align=right height=20>
											  	<%
 on error resume next
    set rs=Server.CreateObject("ADODB.Recordset")
sql="select * from table_dayi where dayi_isreply=1 order by id desc"
rs.open sql,conn,3,1
if rs.eof then 
response.Write  "当前数据库中无记录!"
response.end
else
const maxperpage=10 '定义每一页显示的数据记录的常量
dim currentpage '定义当前页的变量
rs.pagesize=maxperpage
currentpage=request.querystring("pageid")
   if currentpage="" or currentpage<1 then
      currentpage=1
	  
    else
       currentpage=clng(currentpage)
end if
	if currentpage > rs.pagecount then
	  currentpage=rs.pagecount
	end if
'如果变量currentpage的数据类型不是数值型
'就1赋给变量currentpage
if not isnumeric(currentpage) then
currentpage=1
end if

dim totalput,n '定义变量
totalput=rs.recordcount
if totalput mod maxperpage=0 then
n=totalput\maxperpage
else
n=totalput\maxperpage+1
end if
if n=0 then
n=1
end if
rs.move(currentpage-1)*maxperpage
i=0
do while i< maxperpage and not rs.eof
%>

											   <TABLE style="TABLE-LAYOUT: fixed" cellSpacing=0 
                                cellPadding=0 width="95%" align=center border=0>
                                                  <TBODY>
                                                    <TR> 
                                                      <TD vAlign=top></TD>
                                                    </TR>
                                                    <TR> 
                                                      <TD colSpan=2 height=5></TD>
                                                    </TR>
                                                    <TR> 
                                                      <TD colSpan=2><IMG height=11 
                                src="images/026.gif" width=12> <FONT 
                                class=normalfont><A 
                                href="display.asp?id=<%=rs("id")%>"><%=rs("dayi_title")%>(<%=rs("dayi_date")%>)</A></FONT></TD>
                                                    </TR>
                                                    <TR> 
                                                      <TD colSpan=2 
                                height=5></TD>
                                                    </TR>
                                                  </TBODY>
                                                </TABLE>
												
												   <%
      i=i+1
    rs.movenext
    loop
    end if
	
    %><table border="0" width="99%" cellspacing="0" cellpadding="0" style="border-collapse: collapse"  valign="top">
        <tr> 
          <td width="560" align="center" nowrap>  页数:</font><%=currentpage%>/ 
            <% =n%>
            <%k=currentpage                    
   	if k<>1 then%>
            [<a href="index.asp?pageid=1">首页</a>] [<a href="index.asp?pageid=<%=k-1%>">上一页</a>] 
            <%else%>
            [首页]&nbsp;[上一页] 
            <%end if%>
            <%if k<>n then%>
            [<a href="index.asp?pageid=<%=k+1%>">下一页</a>] [<a href="index.asp?pageid=<%=n%>">尾页</a>] 
            <%else%>
            [下一页]&nbsp;[尾页] 
            <%end if%>
            共有<font color="red"><%=totalput%></font>条记录 </td>
        </tr>
      </table>
												</TD>
                                            </TR>
                                          </TBODY>
                                        </TABLE></TD></TR></TBODY></TABLE></TD></TR>
                    <TR>
                      <TD> </TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR>
  <TR>
      <TD background=images/bg2003.jpg height=90> 
        <DIV 
      align=center><BR>
          <BR>
          推荐用IE5.0或NS6.0以上版本浏览,最佳显示800*600<BR>
          COPYRIGHT@ 2004 <BR>
          <BR>
          <BR>
        </DIV></TD></TR></TBODY></TABLE></BODY></HTML>

⌨️ 快捷键说明

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