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

📄 list_notice.asp

📁 我的课程设计
💻 ASP
字号:
<meta http-equiv="content-type" content="text/html;charset=gb2312">
<!--#include file = "conn.asp"-->
<!--#include file="ADOFunctions.asp"-->
<!--#include file="ExportPageInfo.asp"-->
<%
	if  (session("username")="") then 	
		response.Redirect("index.asp")
	end if
%>
<LINK href="css/admin.css" rel=stylesheet>
 <%
  ' 从新闻库中取出所有新闻,按ID倒排序
   strsql="SELECT * FROM notice ORDER BY id DESC"
   set rs=GetSQLRecordset(strsql,"book.mdb","notice")
    If Not rs.Eof Then
     rs.pagesize=15 
	 result_num=rs.recordcount
	 maxpage=rs.pagecount
	 page=request("page")
	 if not isnumeric(page) or page="" then 
	    page=1 
	 else 
	    page=cint(page)
	 end if 
	 if page<1 then 
	   page=1 
	 elseif  page>maxpage  then 
	   page=maxpage
	 end if 
	 rs.absolutepage=page
  else 
     result_num=0 
	 page=0 
	 maxpage=0
  end if 	 	   
	   		
 %>
 
<table width="100%"   border="0" align="center" cellpadding="0" cellspacing="1">
 
 <% 
 if  not rs.eof  then 
   for i=1 to rs.pagesize 
   %>
              <tr>
                
    <td  width="80%"  height="25"> 
      <div align="left"><a href="noticeInfo.asp?id=<%=rs("id")%>" target='_blank' title="<%=rs("title")%>" > 
        </a>
        <table width="327" border="0">
          <tr>
            <td width="10"><img src="images/news.jpg" width="10" height="11"></td>
            <td width="307"><a href="noticeInfo.asp?id=<%=rs("id")%>" target='_blank' title="<%=rs("title")%>" ><%=rs("title")%></a> 
             </td>
          </tr>
        </table>
        
      </div></td>
<td align="center" width="20%">
<font style="font-size:9pt;color:#666666"><%=rs("createtime")%>
</font></td>
</tr>
<%   rs.movenext
   if rs.eof then
	 exit for
   END IF 	 
  next 
end if 		  
 %>
 <TR>
    <TD colspan="2"  height="30"> <div align="left">
     <% call LastNextPage(maxpage,page,result_num) %>
      </div></TD></TR>
</table>

⌨️ 快捷键说明

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