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

📄 list.jsp

📁 挺好的东东
💻 JSP
字号:
<%@ include file="../checklogin.jsp" %>
<%@ page contentType="text/html; charset=gb2312"%>
<%@ page language="java"%>
<%@ page import="java.util.ArrayList" %>
<%@ page import="com.know.*" %><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
<script language="javascript">
function sel(a){ 
o=document.getElementsByName(a) 
for(i=0;i<o.length;i++) 
o[i].checked=event.srcElement.checked 
}
var  ctimer;

function  init(){
if  (document.all){
tim2.style.left=tim1.style.posLeft;
tim2.style.top=tim1.style.posTop+tim1.offsetHeight-6;
settimes();
}
}

function  settimes(){
var  time=  new  Date();
years=time.getYear();
months=time.getMonth();
days=time.getDay();
hours=  time.getHours();
mins=  time.getMinutes();
secs=  time.getSeconds();
if  (hours<10)
hours="0"+hours;
if(mins<10)
mins="0"+mins;
if  (secs<10)
secs="0"+secs;
tim1.innerHTML=years+"-"+months+"-"+days+" "+hours+":"+mins+":"+secs
tim2.innerHTML=years+"-"+months+"-"+days+" "+hours+":"+mins+":"+secs
ctimer=setTimeout('settimes()',960);}


</script> 
<style type="text/css">
<!--
.STYLE6 {
	font-size: 12px;
	font-weight: bold;
}
.STYLE7 {font-size: 12px}
.STYLE8 {
	color: #6666FF;
	font-weight: bold;
}
.STYLE4 {	color:#FF9900;
	font-weight: bold;
	font-size:12px;
}
body {
	background-image: url(../images/aa.gif);
}
-->
</style>
</head>
<html>
 

<link href="../css/left.css" rel="stylesheet" type="text/css">
<body onLoad="init()">
<div  align="center"  Id="tim1"  Style="position:absolute;  width:102px;  height:11px;  top:19px;  left:180px"
class="time"></div>
<div  Id="tim2"
Style="position:absolute;  filter:flipv()  alpha(opacity=20);  font-style:italic"
class="time"></div>

<form id="form1" name="form1" method="post" action="del.jsp">
    <br />
  <table width="731" border="0" align="center" >
    <tr>
      <td width="43">&nbsp;</td>
      <td width="559" class="STYLE7">当前时间:</td>
      <td width="115"><a href="../../index.jsp" target="_blank" class="STYLE7">网站首页</a></td>
    </tr>
  </table>

  <br />
  <table width="73%" border="0" align="center" class="tableBorder">
  <% 
  	    Module art=new Module();
		ArrayList result=art.selModules();

      int   pagesize=15;//每页显示记录数   
      int   recordcount=0;//记录总数   
      int   pagecount=0;//总页数  
      int pageid=1;//待显页码
  	  int   recordbegin;
	  int   recordend;
	  
       if(request.getParameter("pageid")!=null){ 
        pageid=Integer.parseInt(request.getParameter("pageid"));
      }

 
			recordcount=result.size();
    	   pagecount=(recordcount%pagesize==0?(recordcount/pagesize):(recordcount/pagesize)+1);//取得总页数   
		   
            recordbegin=pageid*pagesize-pagesize;
			recordend=pageid*pagesize-1;		
  %>
  <tr >
    <td colspan="4"><span class="STYLE7">·</span><span class="STYLE6">版块列表</span></td>
    </tr>
  <tr bgcolor="#EFEFEF">
    <td width="7%"><div align="center" class="STYLE7">编号</div></td>
    <td width="35%"><div align="center" class="STYLE7">版块名称</div></td>
    <td><div align="center" class="STYLE7">版主</div></td>
    <td width="9%"><div align="center">
      <input type="submit" name="Submit" value="删除" class="btn"/>
    </div></td>
  </tr>
  <%if (result.size()==0){%>
  <tr class="STYLE7"><td colspan="4"><div align="center" class="STYLE8">暂无版块!</div></td></tr>
  <%}else{%>
  <%
			for(int i=recordbegin;i<=recordend & i<recordcount;i++){
			  art= (Module)result.get(i);  
  %>
  <tr class="STYLE7" onMouseOver="this.style.background='#eeeeee';" onMouseOut="this.style.background='#FFFFFF'">
    <td><div align="center"><%=i+1%></div></td>
    <td><div align="center"><a href="editModule.jsp?id=<%=art.id%>"><%=art.name%></a></div></td>
    <td><div align="center"><%=art.adminid%></div></td>
    <td ><div align="center">
      <input name="selAnnounce" type="checkbox" id="selAnnounce" value="<%=art.id%>">
    </div></td>
  </tr>
  <%
      }
  }
  %>
  <tr>
    <td colspan="4" class="STYLE7">
   
                   共有<span class="STYLE4"><%=recordcount%></span>条记录, 每页显示<span class="STYLE4"><%=pagesize%></span>条, 第<span class="STYLE4"><%=pageid%></span>页/共<span class="STYLE4"><%=pagecount%></span>页
        <% if (pageid==1){%>
首页
<%} else{ %>
<a href="../list.jsp?pageid=1">首页</a>
<%}%>
<% if (pageid==1){%>
前页
<%} else{ %>
<a href="../list.jsp?pageid=<%=pageid-1%>">前页</a>
<%}%>
<% if(pageid==pagecount){%>
后页
<%} else {%>
<a href="../list.jsp?pageid=<%=pageid+1%>">后页</a>
<%}%>
<% if (pageid==pagecount){%>
尾页
<%} else{ %>
<a href="../list.jsp?pageid=<%=pagecount%>">尾页</a>
<%}%>
   
<input type=checkbox onclick=sel('selAnnounce')>
全选</td>
    </tr>
</table>
</form>
</body>
</html>

⌨️ 快捷键说明

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