<%@ include file="db.jsp"%>
<%@ page contentType="text/html; charset=gb2312" %><%
//*****************分页程序开始*****************************
String strPage = request.getParameter("page");
if(strPage==null){
strPage="1";
}
int currentPage=Integer.parseInt(strPage);
   int resultNum = 100;
   int startIndex = (currentPage-1)*resultNum;
   int allSize = 0;
   int size = 0;
   int pageCount = 0;
//*****************分页程序结束*****************************
%>
<HTML>
<HEAD>
<TITLE>部 门 信 息</TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312"></HEAD><%String DEPARTMENTID=request.getParameter("DEPARTMENTID");%><BODY>
<form name="frm">
<table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="20"><div align="center">部门领导 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a 
href="leader_add.jsp?DEPARTMENTID=<%=DEPARTMENTID%>">添加</a></div></td>
  </tr>
</table>
<BR>
<table width="600" height="20" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#0033FF" id="PowerTable">
  <tr bgcolor="#FFFFFF"> 
 
  </tr>
   <%String inse="select * from XWCMLEADER where LEADER_DEP_ID="+DEPARTMENTID+" order by LEADER_ORDER";
ResultSet rs = stmt.executeQuery(inse);
//////////////////////////////////////////////
rs.last();
allSize=rs.getRow();
size = resultNum;
pageCount = (allSize%size==0)?allSize/size:allSize/size+1;
if(pageCount>0){
//将记录指针定位到待显示页的第一条记录上
rs.absolute((currentPage-1) * resultNum + 1);
/////////////////////////////////////////////////
int count=0;
while(count<resultNum &&!rs.isAfterLast()){
int LEADERID=rs.getInt("LEADERID");
String LEADER_NAME=rs.getString("LEADER_NAME");
%> <tr bgcolor="#FFFFFF"  >
    <td  height="28">
<div align="center"><a href="leader_detail.jsp?LEADERID=<%=LEADERID%>&DEPARTMENTID=<%=DEPARTMENTID%>"><%=LEADERID%>|<%=LEADER_NAME%></a></div></td>
  </tr>
     <%
rs.next();
count++;
}
}
rs.close();
%> 
</table>
<p div align="center">
 ( Move: 
<input type=button id=move value=Up    onclick=Move_up(Main_Tab)>
<input type=button id=move value=Down  onclick=Move_down(Main_Tab)>
<input type=button value="save" >
 )</p>
  
</form></BODY>
</HTML><%
stmt.close();
conn.close();
%>这是我的源程序代码,我要加一个SAVE按钮在通过UP和DOWN移动后可以按SAVE然后数据就真的可以保存在移动事的位置.JAVASCRPT我没有加上.因为加上贴子过长,各位可以到下面的网址上去看.
即路http://cgi.beijing.gov.cn/wcm/bjgov/leader_list.jsp?DEPARTMENTID=19页面中加一个SAVE按钮.!!!!!