
<%
/************************************************************@@
  * Program Name	: part_list.jsp
  * Description		: 기관 목록
  * Author				: 강원중
  * Create Date		: 2004-10-29
  * History				:
@@************************************************************/
%>

<%@ page contentType="text/html; charset=UTF-8"
	import="kr.co.kihyun.beans.user.HttpSSOLogin"
	import="kr.co.kihyun.moumi.Moumi" import="kr.co.kihyun.lang.MLong"
	import="kr.co.kihyun.beans.user.Dept"
	import="kr.co.kihyun.beans.user.DeptView"
	import="kr.co.kihyun.beans.totsys.report.Report"%>

<%
try{
	/********** session내의 userId **********/
	Long docID = MLong.parseLong(request.getParameter("docID"), null);
	int sysAuth = 0;

	/************ PartList **************/
	DeptView deptView = new DeptView();
	
	Report report = new Report();
	String[] deptIDList;

	int deptCount=0;
	/*
	String[] partIDList;
	String[] partNameList;
	String[] partUpperDeptList;
	*/
	deptIDList=report.getReportDeptList(docID);

	deptCount = deptIDList.length;
	/*
	partCount = partList.getCount();
	partIDList = partList.getIDList();
	partNameList = partList.getNameList();
	partUpperDeptList = partList.getUpperDeptList();
	*/
	/************ PartList View **************/
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="/totsys/common/css/text.css"
	type="text/css">
<script src="/totsys/common/js/rollover.js"></script>
</head>
<link rel='StyleSheet' href='/totsys/common/css/dtree.css'
	type='text/css' />
<script type='text/javascript' src='/totsys/common/js/dtree.js'></script>

<!--<body style='overflow=auto' bgcolor="#CECECE" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >-->
<body style='' text="#000000" leftmargin="0" topmargin="0"
	marginwidth="0" marginheight="0">
<TABLE width="100%" cellpadding="5" cellspacing="2" border="0">
	<TBODY>
		<TR>
			<TD>
			<div class='dtree'><script type='text/javascript'>
					d = new dTree('d');

					d.add(0,-1,'제출요청 부서');
					<%
					for(int i=0; i<deptCount; i++){ 
						deptView.executeQuery(deptIDList[i]);
					%>
						d.add('<%=deptIDList[i]%>',0,'<%=deptView.getPartName()+"-"+deptView.getName()%>');
				<%}	%>
					document.write(d);
					d.openAll();
		
	/*			
					if(selectDept != null){
						if(!selectDept.equals("")){
							d.openTo("+selectDept+",true);\n");
						}
					}
	*/	
			//-->");
					</script></div>

			</TD>
		</TR>
	</TBODY>
</TABLE>
</body>
</html>
<%
}catch(Exception ex){ex.printStackTrace();
	
	out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';"));
}finally{	
}
%>
