%
/**********************************************************************************
프로그램명 : part_list.jsp
프로그램설명 :
작 성 자 : 조용준
작 성 일 : 04.06.10
최신변경일 :
***********************************************************************************/
%>
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ page import="kr.co.kihyun.beans.user.HttpSSOLogin"%>
<%@ page import="kr.co.kihyun.text.html.ServletUtil"%>
<%@ page import="kr.co.kihyun.lang.Encoder"%>
<%@ page import="kr.co.kihyun.moumi.Moumi"%>
<%@ page import="java.net.URLEncoder"%>
<%@ page import="kr.co.kihyun.beans.totsys.sysadm.part.PartUtil"%>
<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%>
<%
try{
/********** session내의 userId **********/
String ptID = HttpSSOLogin.getOrganID(request);
String usID = HttpSSOLogin.getLoginID(request);
int sysAuth = HttpSSOLogin.getSysAuth(request);
/****** Parameter 1******/
String strPage = "";
String findOption = "";
String findWord = "";
String dirPath = URLEncoder.encode("기관관리", "UTF-8");
String uri = URLEncoder.encode("./part_list.jsp?findOption="+findOption+"&findWord="+findWord, "UTF-8");
strPage = clearXSS(request.getParameter("strPage"),"");
findOption = clearXSS(request.getParameter("findOption"),"");
findWord = clearXSS(Encoder.toJava(request.getParameter("findWord")),"");
/****** part list data get ******/
//v2. 13.SQL 삽입 : JDO형식이므로 해결책에 따른 prepare SQL 문으로 변경할 수 없음
if(sysAuth == Moumi.SYSADM){
partList.executeQuery(findOption, findWord);
}else{
partList.executeQuery(ptID, findOption, findWord);
}
//================
int count = partList.getCount();
String[] idList = partList.getIDList();
String[] nameList = partList.getNameList();
String[] sysAuthList = partList.getSysAuthList();
String[] desList = partList.getDesList();
String[] upperIDList = partList.getUpperIDList();
/************ 리스트 페이지 구성 2************/
int endPage = 0;
int pageSize =0 ;
int currentPage = 0;
int absolutePage = 0;
int currentPageSetUp = 0;
int recordSize = 15;
if(strPage == null || strPage.length()<=0){
currentPage = 1;
}else if(strPage.equals("null")){
currentPage = 1;
}else{
try{
currentPage=Integer.parseInt(strPage);
}catch(NumberFormatException ex){
System.err.println(ex);
}
}
if((count%recordSize) == 0){
pageSize = (int)(count/recordSize);
}else{
pageSize = (int)(count/recordSize)+1;
}
currentPageSetUp = (int)(currentPage/10)*10;
if (currentPage%10 == 0){
currentPageSetUp-=10;
}
%>
<%=Moumi.getTitle()%>
기관 ID
기관명
기관권한
<% //3
//[이전][이후]의 페이지별 이동을 위해 구해진 PAGE값에 1 값을 빼주고 10을 곱한 결과에
//1을 더해 줌으로서 10개의 레코드에 대한 부분을 리스트로 보여줍니다.
int nextCount = 0;
int index = 0;
if(currentPage > 1){
nextCount = ((currentPage-1)*recordSize);
}
//
for(int i=0; (i