
<%
    /**
     * **********************************************************@@ Program Name
     * : popup_copy_form.jsp Description	: /집계자/내문서함/등록함/복사양식 첨부 Author	: 강원중
     * Create Date	: 2004-11-05 History	:
     * @@***********************************************************
     */
%>
<%@ page contentType="text/html; charset=UTF-8"
         import="kr.co.kihyun.lang.MString"
         import="kr.co.kihyun.lang.MLong"
         import="kr.co.kihyun.text.html.TagFilter"
         import="kr.co.kihyun.lang.StringConverter"
         import="kr.co.kihyun.moumi.Moumi"
         import="java.net.URLEncoder"%>

<%
    try {

        String reportType = request.getParameter("reportType");
        if (reportType == null) {
            reportType = "";
        }
//          System.out.println("reporttype==========================================================================>"+reportType);
%>
<!DOCTYPE html>
<html lang="ko">
	<head>
		<meta charset="UTF-8">
		<title>표복사입력</title>
        <link rel="stylesheet" href="/totsys/common/css/text.css" type="text/css">
        <link rel="stylesheet" href="/totsys/common/css/kecttep.css" type="text/css">
    	<link rel="stylesheet" href="/totsys/common/css/popup.css" type="text/css">
		<link rel="stylesheet" href="/totsys/common/css/basic.css" type="text/css">
        <script src="/totsys/common/js/rollover.js"></script>
        <script src="/totsys/common/js/encode.js"></script>
        <script src="/totsys/common/js/jquery-1.12.4.min.js"></script>
        <script>
            function copyForm() {
                var rtype = '<%=reportType%>';
                var innerHTML = EditCtrl.document.body.innerHTML.replace(/&nbsp;/g," ");
				//td 안닫힌 태그 닫기
				var temp=$('<div>'+innerHTML+'</div>');
				temp.find('td').each(function(i,o){
					try{
						if(o.outerHTML.toLowerCase().indexOf('</td>')==-1){
							o.outerHTML+='</td>';
						}
					}catch(e){}
				});
				innerHTML=temp.html();
                opener.inputExcel.copyForm.value = encodeURL(innerHTML);
                if (rtype != '')
                {
                    opener.inputExcel.reportType.value = "<%=reportType%>";
                }
                opener.inputExcel.submit();
                window.close();
            }
			function initEditCtrl(){
				//html 인코딩된 주석제거,포커스 문제 해결
		        try{
	              EditCtrl.document.body.onpaste=function(){
	                setTimeout(function(){
	                 var html=EditCtrl.document.body.innerHTML;
	                 if(html.search(/\&lt;!--[\s\S]*?--\&gt;/g,'')>-1){
		          html=html.replace(/\&lt;!--[\s\S]*?--\&gt;/g,'');
		          $(EditCtrl.document.body).html(html);
	       		}
	                 $(EditCtrl.document.body).append('<br/>');
	                 try{
	                	 var range=EditCtrl.document.body.createTextRange();
	                	 range.collapse(false);
	                	 range.select();
	                 }catch(e){}
	                },0);
	              };
	             }catch(e){}
			}
//            $(document).ready(function() {
////                var documentW = $(document).width();
////                var documentH = $(document).height();
////
////                alert("documentW : " + documentW + "\n\rdocumentH : " + documentH);
////
////                resizeTo(documentW, documentH);
//                    resizeTo(970, 712);
//            });
        </script>
    </head>

    <body class="mp_0">
        <table  style="width: 100vw; height: 100vh;">
            <tr>
                <td style="width: 29px;">
                    <img alt="테두리" style="width: 29px; height: 19px;" src="/totsys/common/images/popupt_top_left.gif"></td>
                <td style="height: 19px; background-image: url('/totsys/common/images/popupt_top_center.gif');">&nbsp;</td>
                <td style="width: 30px;">
                    <img src="/totsys/common/images/popupt_top_right.gif" style="height: 19px; width: 30px;" ></td>
            </tr>
            <tr>
                <td rowspan="2" style="background-image: url('/totsys/common/images/popupt_center_left.gif');">&nbsp;</td>
                <td class="vTop">
                    <table style="vertical-align: top; width: 100%; height: 100%;">
                        <jsp:include page="/totsys/common/inc/title/title.jsp" flush="true" />
                        <tr>
                            <td style="padding-top: 5px; padding-bottom: 15px;">
                                <table>
                                    <tr>
                                      <!--  <td><font size="2">1) 엑셀에서 입력한 자료를 복사합니다.<br>
                                            &nbsp;&nbsp;&nbsp;- 복사한 엑셀자료와 자료입력 화면에 보이는 자료의 행수가 일치해야 하며 반드시 타이틀도 복사하여야 합니다.<br>
                                            &nbsp;&nbsp;&nbsp;- 행의 갯수가 다른 경우 자료입력화면에서 행추가 및 행삭제를 실행하여 엑셀자료와 맞춰야 합니다.<br>
                                            &nbsp;&nbsp;&nbsp;- 타이틀의 행수가 일치하지 않는 경우에도 엑셀에서 병합된 행을 삭제하여 맞춰야 합니다.<br>
                                            2) 아래 [표 넣기 창]에 붙여넣기 하여 "확인"을 클릭하면 자료가 입력됩니다. <br>
                                            &nbsp;&nbsp;&nbsp;* 날짜형식은 "YYYY-MM-DD" 이어야 합니다.<br></font>
                                        </td>-->
                                        <td> 표복사입력 방법<br>
                                        1. 복사한 엑셀자료 표의 행수와 자료입력 화면 표의 행수가 일치해야 하며 반드시 필드명이 입력된 행도 복사해야 합니다.<br>
										2. 엑셀자료 표의 행수와 자료입력 화면 표의 행수가 다를 경우 자료입력 화면에서 행추가 ＆ 행삭제로 행수를 일치시켜야 합니다.<br>
										3. 표가 여러개일 경우 제출할 표와 제출할 내용이 없는 표 모두 순서대로 각각 입력하셔야 합니다.<br><br>

										예) 5개의 표 중 3번째 표만 제출할 내용이 있는 경우 표복사 방법<br>
											① 자료입력 화면에 ＂3번표＂ 선택 후 행추가 ＆ 행삭제로 엑셀자료 표의 행수와 맞춥니다.<br>
											② ＂표복사입력＂ 버튼을 클릭합니다.<br>
											③ 1, 2번 표를 행추가 없이 집계자가 만든 기본표(필드명이 입력된 행 ＋ 입력 행)로 복사 ＆ 붙여넣기 합니다.<br>
											④ 3번표를 복사 ＆ 붙여넣기 합니다. 단, 필드명이 입력된 행도 같이 복사하셔야 합니다.<br>
											⑤ 4, 5번 표를 행추가 없이 집계자가 만든 기본표(필드명이 입력된 행 ＋ 입력 행)로 복사 ＆ 붙여넣기 합니다.<br>

                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <table class=llist1>
                                                <form name="gocomp0" action="/Mail-bin/send_mail.frame" method=post>
                                                    <input type="hidden" name=What value=0>
                                                    <input type="hidden" name=BODY>
                                                    <input type="hidden" name=CMD value=''>
                                                    <input type="hidden" name=MSGID value=''>
                                                    <input type="hidden" name=TO>
                                                    <input type="hidden" name=CC>
                                                    <input type="hidden" name=BCC>
                                                    <input type="hidden" name=SUBJECT>
                                                    <input type="hidden" name=XSUBJECT value=''>
                                                    <input type="hidden" name=PID value='11295'>
                                                </form>
                                                <FORM name=Mail_Form target=_parent method=post action="/Mail-bin/start_mail/simplehtml">
                                                    <input type="hidden" name=SENDACTION value="">
                                                    <input type="hidden" name=RESV_Y value="">
                                                    <input type="hidden" name=RESV_M value="">
                                                    <input type="hidden" name=RESV_D value="">
                                                    <input type="hidden" name=RESV_H value="">
                                                    <input type="hidden" name=ISLINEANS value="">
                                                    <input type="hidden" name=PID value="11295">
                                                    <input type="hidden" name=MSGID value=>
                                                    <input type="hidden" name=LINKURL value="">
                                                    <input type="hidden" name=LINKCOMMENT value="">
                                                    <input type="hidden" name=KEYWORD value="">
                                                    <input type="hidden" name=KEYTYPE value="">
                                                    <input type="hidden" name=FOLDER value="">
                                                    <input type="hidden" name=mpage value="">
                                                    <input type="hidden" name=UseCompose value="">
                                                    <SCRIPT LANGUAGE='javascript' src='/totsys/common/js/editor.js'></SCRIPT>
                                                    <tr class="bgw1">
                                                        <td colspan=3>
                                                            <iframe
                                                                id='i_fontcolor'
                                                                style='background-color: #ffffff; border: 1px double #BFBFBF; cursor: hand; position: absolute; visibility: hidden;'
                                                                scrolling=no frameborder=0 width=120 height=120></iframe>
                                                            <iframe
                                                                id='i_backcolor'
                                                                style='background-color: #ffffff; border: 1px double #BFBFBF; cursor: hand; position: absolute; visibility: hidden;'
                                                                scrolling=no frameborder=0 width=120 height=120></iframe>
                                                            <iframe
                                                                id='i_image'
                                                                style='color: #000000; background-color: #efefef; border: 1px double #BFBFBF; cursor: default; position: absolute; visibility: hidden;'
                                                                scrolling=no frameborder=0 width=325 height=85></iframe>
                                                            <iframe
                                                                id='i_link'
                                                                style='color: #000000; background-color: #efefef; border: 1px double #BFBFBF; cursor: default; position: absolute; visibility: hidden;'
                                                                scrolling=no frameborder=0 width=325 height=70></iframe>
                                                            <iframe
                                                                id='i_emoticon'
                                                                style='background-color: #efefef; border: 1px double #BFBFBF; cursor: hand; position: absolute; visibility: hidden;'
                                                                scrolling=no frameborder=0 width=125 height=125></iframe>
                                                            <br>
                                                            <table cellpadding=0 cellspacing=0 border=0>
                                                                <tr>
                                                                    <td><font color="FF6600"><b>&nbsp;&nbsp;[ 표넣기창 ] </b></font></td>
                                                                </tr>
                                                                <tr>
                                                                    <td height=10></td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        <div id='editctrl' style='display: show; width: 890px; height: 400px;'>
                                                                            <iframe
                                                                                name='EditCtrl' id="ifrm_EditCtrl" width='100%' height='100%' scrolling='YES' frameborder=0 style="border: 1px solid #BFBFBF;"
                                                                                onfocus='layeroff();' onblur='nowkong.SaveSelection();' onload="initEditCtrl();"></iframe>
                                                                        </div>
                                                                        <input type="hidden" name=FORSAVE value="&lt;HEAD&gt;
                                                                               &lt;STYLE&gt;
                                                                               P {margin-top:2px;margin-bottom:2px;}
                                                                               &lt;/STYLE&gt;
                                                                               &lt;/HEAD&gt;
                                                                               &lt;BODY oncontextmenu='return false;' style='background-color: ; background-image: url(); ' topmargin=11 leftmargin=11&gt;
                                                                               &lt;/BODY&gt;">
                                                                        <input type="hidden" name=BODY value="">
                                                                        <input type="hidden" name=BODYBG value="">
                                                                        <input type="hidden" name=BODYBGC value="">
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </td>
                                                    </tr>
                                                </FORM>
                                            </table>
                                            <br>
                                            <SCRIPT FOR=window EVENT=onbeforeunload>
                                                document.Mail_Form.FORSAVE.value = EditCtrl.document.documentElement.innerHTML;
                                            </SCRIPT>
                                            <SCRIPT FOR=window EVENT=onload> init();</SCRIPT>
                                            <table style="text-align: center; width: 100%;">
                                                <tr>
                                                    <td>
	                                                    <!-- 확인, 취소 버튼 -->
										                <div class="center mt_10">
										                    <div class="mt_15">
										                        <a href="#" onclick="javascript:copyForm();"><img alt="확인" src="/totsys/common/images/bt_ok.gif"></a>
										                        <a href="#" onClick="javascript:window.close();"><img class="ml_5" alt="취소" src="/totsys/common/images/bt_cancle.gif"></a>
										                    </div>
					           						    </div>
                                                    </td>
                                                </tr>
                                            </table>
                                            </form>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <!-----  내용 들어갈 부분  끝 ---->
                    </table>
                </td>
                <td rowspan="2" style="background-image: url('/totsys/common/images/popupt_center_right.gif');">&nbsp;</td>
            </tr>
            <tr>
                <td style="height: 1px; text-align: center;"></td>
            </tr>
            <tr>
                <td><img alt="테두리" style="width: 29px; height: 24px;" src="/totsys/common/images/popupt_bottom_left.gif"></td>
                <td style="background-image: url('/totsys/common/images/popupt_bottom_center.gif'); height: 24px;">&nbsp;</td>
                <td><img alt="테두리" style="width: 30px; height: 24px;" src="/totsys/common/images/popupt_bottom_right.gif"></td>
            </tr>
        </table>
    </body>
</html>
<%
    } catch (Exception ex) {
        //38.오류메세지를 통한 정보 노출(getMessage)_CWE-209 : Update by YOUNGJUN,CHO
        //out.println(ex);
        ex.printStackTrace();
        //out.println("<html><body style='overflow=auto' bgcolor='white'><h1>Can't contact servlet runner</h1><br><br>Message : " + ex.getMessage() + "</body></html>");
        //out.println("<META HTTP-EQUIV='refresh' CONTENT='0.1; URL=/error/exception.jsp'>");
        //================================================
    } finally {
    }
%>
