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

📄 list.jsp

📁 一般性的内容,可以生成和修改还在有其他的好友添加等等
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%@ page import="java.util.*"%>
<%@ page import="zd.bbs.*"%>
<jsp:useBean id="dao" scope="page" class="zd.bbs.NoteDAOImpl" />
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>正大软件学院论坛</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<script type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->
</script>
</head>
<body>
<%
	session.removeAttribute("ul");
    session.removeAttribute("min_ul");
	session.setAttribute("username",(session.getAttribute("username")));
	int lid=Integer.parseInt(request.getParameter("lid"));//二级模块号
	String m_name2=new String(request.getParameter("m_name2").getBytes("iso-8859-1"));//接收模块2的名称

	int lic=Integer.parseInt(request.getParameter("lic"));//一级模块号
//接收模块2的ID号
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr style="background-image:url(images/bg_top.jpg)">
    <td align="left"><img src="images/top_01.jpg" width="347" height="101" /><img src="images/top_02.jpg" width="330" height="101" /><img src="images/top_03.jpg" width="323" height="101" /></td>
    <td align="right">&nbsp;</td>
  </tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#BED6F9" id="login">
  <tr>
    <td width="50%" height="25">
   <%@ include file="session_admin.jsp" %>
    </td>
    <td width="50%"><marquee direction="left" scrollamount="2">论坛公告&nbsp;&nbsp;&nbsp; 修改乱码帖的简单方法,并招募志愿者(2007-4-9)</marquee></td>
  </tr>
</table>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="5">
  <tr>
    <td colspan="2" id="nav">&nbsp;<img src="images/icon_nav.jpg" width="9" height="9" /> <a href="index.jsp">正大软件职业技术学院论坛</a> <img src="images/icon_barrow.jpg" width="12" height="6" /> <%=new String(m_name2.getBytes("gb2312"))%> </td>
  </tr>
  <tr>
    <td height="25"><a href="Talk.jsp?lid=<%=lid %>&m_name2=<%=m_name2 %>&lic=<%=lic %>">
    <img src="images/btn_fbht.jpg" alt="发表一个新主题" width="72" height="21" border="0" /></a></td>
    <td align="right"><img src="images/icon_bz.jpg" width="15" height="16" align="absmiddle" /> 无版主</td>
  </tr>
</table>
<table width="99%" border="0" align="center" cellpadding="5" cellspacing="0" bgcolor="#F4F9FD">
  <tr>
    <td><strong>广播:</strong></td>
    <td width="300" align="right"><span class="today"><strong><a href="jinghuatie.jsp?m_name2=<%=m_name2 %>">精华</a></strong></span><strong> | 在线 | 事件 | 权限 | 管理</strong></td>
  </tr>
</table>

<table width="99%" border="0" align="center" cellpadding="0" cellspacing="1" bordercolor="#B2D3FE" bgcolor="#B2D3FE">
  <%
      List all=null;
      int nowPages=0;//当前页
      int pages=0;//请求页数
      int countPerPage = 10 ; //每页显示条数
      int pageCount=0;//总页数
      int recordCount=0; //recordCount为总记录数
      try{
		
				recordCount=DAOFactory.getNoteDAOInstance().sum1(lid);
				pageCount = (int)Math.ceil((recordCount + countPerPage-1) / countPerPage);//算出总页数
				//得到请求页
				if(request.getParameter("pages") == null){
				  pages = 1;
				}else{
				  pages = new Integer(request.getParameter("pages")).intValue();
				 }
				//得到当前实际页面
				
				if(pages > pageCount){
				  nowPages = 1;
				}else{
				  nowPages = pages;
				}  
				     all=DAOFactory.getNoteDAOInstance().queryAll(lid,nowPages);
      }catch(Exception e){}
     %>
  <tr>
    <td width="40" height="25" align="center" background="images/bg_tt.gif" bgcolor="#E4F1FA"><span class="menu_tt">状态</span></td>
    <td align="center" background="images/bg_tt.gif" bgcolor="#F4F9FD"><span class="menu_tt">主题</span></td>
    <td width="80" align="center" background="images/bg_tt.gif" bgcolor="#E4F1FA" class="menu_tt">作 者</td>
    <td width="70" align="center" background="images/bg_tt.gif" bgcolor="#F4F9FD" class="menu_tt">回复</td>
    <td width="200" align="center" background="images/bg_tt.gif" bgcolor="#E4F1FA" class="menu_tt">发表时间</td>
    <td width="70" align="center" background="images/bg_tt.gif" bgcolor="#F4F9FD" class="menu_tt">修改</td>
    <td width="70" align="center" background="images/bg_tt.gif" bgcolor="#F4F9FD" class="menu_tt">删除</td>
  </tr>
  <%
			Iterator iter = all.iterator() ;
			while(iter.hasNext())
			{
				Note note = (Note)iter.next() ;
				//i++ ;
				// 进行循环打印,打印出所有的内容,以表格形式
				// 从数据库中取出内容
				int talk_id=note.getTalk_id();
				String title = note.getTitle();
				String username = note.getUsername();
				String data_time = note.getData_time();
				int model_id2= note.getModel_id2();
	%>
  <tr>
    <td height="25" align="center" bgcolor="#E4F1FA">
    <%
    //根椐j,p来选择是否是精华贴子
   String ss=null;
   String make=note.getMake();
   if(make.equals("j"))
   ss="<img src='images/tl_jh.jpg' width='17' height='16' />";
   if(make.equals("p"))
   ss="<img src='images/tl_kf.jpg' width='16' height='11'/>";
    %>
  <%=ss %>
    </td>
    <td bgcolor="#E4F1FA" id="list_zt"><a href="content.jsp?cid=<%=talk_id%>&l_m_name2=<%=m_name2%>&m_id=<%=model_id2%>"><%=title%></a> </td>
    <td align="center" bgcolor="#E4F1FA"><%=username%></td>
    <td align="center" bgcolor="#F4F9FD"><%=DAOFactory.getNoteDAOInstance().query_count(talk_id)%></td>
    <td align="center" bgcolor="#E4F1FA"><%=data_time %> </td>
    <td align="center" bgcolor="#E4F1FA"><a href="Talk_ed.jsp?talk_id=<%=talk_id %>&lid=<%=lid %>&m_name2=<%=m_name2 %>&lic=<%=lic %>">修改</a> </td>
    <td align="center" bgcolor="#E4F1FA"><a href="list_del.jsp?talk_id=<%=talk_id %>&lid=<%=lid %>&m_name2=<%=m_name2 %>&lic=<%=lic %>">删除</a> </td>
  </tr>
  <%}%>
</table>
<table width="99%" height="30" border="0" align="center" cellpadding="0" cellspacing="0">
  <form method="get">
<tr align="right">
  <td colspan="6">共有<font color=red><%= recordCount %></font>条记录&nbsp;当前<font color=red><%= nowPages %>/<%= pageCount %></font>页&nbsp;
  <% if(pageCount > 1){ %>
  <% if(pages > 1){%>
  <a href="list.jsp?&lid=<%=lid %>&m_name2=<%=m_name2 %>&lic=<%=lic %>">首页</a>
  <%}if(pages < pageCount){%>
  <a href="?pages=<%= nowPages+1 %>&lid=<%=lid %>&m_name2=<%=m_name2 %>&lic=<%=lic %>">下一页</a>
  <%}if(pages != 1){%>
  <a href="?pages=<%= nowPages - 1 %>&lid=<%=lid %>&m_name2=<%=m_name2 %>&lic=<%=lic %>">上一页</a>
  <%}%>
  <a href="?pages=<%= pageCount %>&lid=<%=lid %>&m_name2=<%=m_name2 %>&lic=<%=lic %>">尾页</a>
  <% } %>跳转到
    <select name="pages" onChange="javascript:this.form.submit();">
 <% for(int i=1;i<=pageCount;i++){%>
 <option value="<%= i %>" <% if(nowPages == i){%>selected<% } %>><%= i %></option>
 <% } %>
    </select>页</td>
  </tr>
  <input type="hidden" name="lid" value="<%=lid %>" >
  <input type="hidden" name="m_name2" value="<%=m_name2 %>" >
  <input type="hidden" name="lic" value="<%=lic %>" >
</form>
</table>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="40">
   <%@include file="select.html" %>
    </td>
    <td align="right"><br></td>
  </tr>
</table>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="24" background="images/bg_tt.gif">&nbsp;<span class="menu_tt">-=&gt; 论坛图例 </span></td>
  </tr>
  <tr>
    <td height="40" bgcolor="#F4F9FD"><table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td><img src="images/tl_kf.jpg" width="16" height="11" /> 开放的主题</td>
        <td><img src="images/tl_rt.jpg" width="16" height="17" /> 回复超过10帖</td>
        <td><img src="images/tl_sd.jpg" width="16" height="14" /> 锁定的主题</td>
        <td><img src="images/tl_gd.jpg" width="15" height="17" /> 固顶的主题</td>
        <td><img src="images/tl_zgd.gif" width="17" height="17" /> 总固顶的主题</td>
        <td><img src="images/tl_jh.jpg" width="17" height="16" /> 精华帖子</td>
        <td><img src="images/tl_tp.gif" width="13" height="15" /> 投票帖子</td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="20">&nbsp;</td>
  </tr>
</table>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0" class="bottom">
  <tr>
    <td><p>版权所有&copy;重庆正大软件职业技术学院<br />
            <br />
      技术支持:重庆正大软件职业技术学院网络技术系&nbsp; 渝ICP备07001号 </p></td>
    <td width="80"><img src="images/bg_logo.gif" width="58" height="58" /></td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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