
<%
/************************************************************@@
  * Program Name	: popup_doc_write.jsp
  * Description		: 보고자/보고완료/문서 번호 입력
  * Author				:
  * Create Date		:
  * History				:
@@************************************************************/
%>

<%@ page contentType="text/html; charset=UTF-8"
	import="java.net.URLEncoder"
	import="kr.co.kihyun.beans.user.HttpSSOLogin"
	import="kr.co.kihyun.moumi.Moumi"
	import="kr.co.kihyun.beans.totsys.report.ReportView"
	import="kr.co.kihyun.lang.MString" import="kr.co.kihyun.lang.MLong"%>
<%
try{
	/********** session내의 userId **********/
	String usID = HttpSSOLogin.getLoginID(request);
	String deptID = HttpSSOLogin.getDeptID(request);
	String deptName = HttpSSOLogin.getDeptName(request);

	/********** Parameter **********/
	Long docID = MLong.parseLong(request.getParameter("docID"), null);

	/********** report view ***********/
	ReportView repoView = new ReportView();
        //v2. 13.SQL 삽입 : repoView.executeQuery()에서 prepare SQL 문으로 되어 있다.
	repoView.executeQuery(docID,deptID,usID);
        //=================
        
	String repDocID = repoView.getRepDocID();
%>

<html>
<head>
<title><%=Moumi.getTitle()%></title>
<link rel="stylesheet"
	href="http://doeun.moumidev.net/totsys/common/css/text.css"
	type="text/css">
<script src="/totsys/common/js/rollover.js"></script>

<script language="javascript">
			function putNum(cog){
				var frm = opener.compForm;
				var docNum = form1.repDocID.value;
				if(docNum == "" || docNum == null){
					alert("결재문서번호를 입력하세요");
					return;
				}

				if(!confirm("제출완료하면 집계자에게 자료가 제출됩니다.\n 계속 하시겠습니까..?")){
						return;
				}
				frm.repDocID.value=docNum;
				frm.submit();
				opener.focus();
				window.close();
			}
		</script>
</head>

<body style='' bgcolor="#FFFFFF" text="#000000" leftmargin="0"
	topmargin="0" marginwidth="0" marginheight="0">
<table width="370" border="0" cellspacing="0" cellpadding="0"
	height="21">
	<tr>
		<td width="29"><img
			src="/totsys/common/images/popupt_top_left.gif" width="29"
			height="19"></td>
		<td background="/totsys/common/images/popupt_top_center.gif"
			height="19">&nbsp;</td>
		<td width="30"><img
			src="/totsys/common/images/popupt_top_right.gif" width="30"
			height="19"></td>
	</tr>
	<tr>
		<td background="/totsys/common/images/popupt_center_left.gif">&nbsp;</td>
		<td valign="top">
		<table width="100%" height="100%" border="0" cellpadding="0"
			cellspacing="0">


			<!--스타일시트-->
			<link rel="stylesheet" href="/totsys/common/css/kecttep.css"
				type="text/css">

			<!-- 뉴타이틀 -->
			<jsp:include page="/totsys/common/inc/title/title.jsp" flush="true" />
			<!-- 뉴타이틀 -->

			<tr>
				<td align="center" valign="top">
				<form name="form1" onsubmit="putNum('1');" method="post">
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td align="center">&nbsp;</td>
					</tr>
					<!---- 메세지 ---->
					<tr>
						<td align="left"><font color="6891cb" size="2">&nbsp;&nbsp;※
						결재문서 번호를 입력하세요.</font></td>
					</tr>
					<!---- 결재문서번호 입력 ---->
					<tr>
						<td height="30" align="center" size="2"><font size="2"><b>결재문서번호
						: </b></font> <%	if(MString.isNull(repDocID)){	%> <INPUT type="text"
							name="repDocID" align="absmiddle" size=27 class="inputtxt"
							value=""> <%	}else{	%> <INPUT type="text" name="repDocID"
							align="absmiddle" size=27 class="inputtxt"
							value="<%= repDocID %>"> <%	}	%>
						</td>
					</tr>
					<tr>
						<td align="left">
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font
							size="2">예)관리과-1234</font></td>
					</tr>
					<tr>
						<td height="15" align="center">&nbsp;</td>
					</tr>
					<tr>
						<td align="center">
						<table border="0" cellspacing="0" cellpadding="0" align="center">
							<!----  버튼 (확인, 취소) 시작 ---->
							<tr>
								<td><a href="#" onclick="javascript:putNum('1');"
									onMouseOut="MM_swapImgRestore()"
									onMouseOver="MM_swapImage('bt_enter','','images/bt_enter.gif',1)"><img
									name="bt_enter" border="0"
									src="/totsys/common/images/bt_enter.gif"></a></td>
								<td width="5"></td>
								<td><a href="#" onclick="self.close();"
									onMouseOut="MM_swapImgRestore()"
									onMouseOver="MM_swapImage('bt_cancel3','','images/bt_cancel3.gif',1)"><img
									name="bt_cancel3" border="0"
									src="/totsys/common/images/bt_cancel3.gif"></a></td>
							</tr>
							<!----  버튼 (확인, 취소) 끝 ---->
						</table>
						</td>
					</tr>
				</table>
				</form>
				</td>
			</tr>
			<tr>
				<td align="center"></td>
			</tr>
		</table>
		</td>
		<td background="/totsys/common/images/popupt_center_right.gif">&nbsp;</td>
	</tr>
	<tr>
		<td><img src="/totsys/common/images/popupt_bottom_left.gif"
			width="29" height="24"></td>
		<td background="/totsys/common/images/popupt_bottom_center.gif"
			height="24">&nbsp;</td>
		<td><img src="/totsys/common/images/popupt_bottom_right.gif"
			width="30" height="24"></td>
	</tr>
</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{
}
%>
