<% /************************************************************@@ * Program Name : report_regist.jsp * Description : /º¸°íÀÚ/³»¹®¼­ÇÔ/Àӽú¸°íÇÔ/º¸°íÀÚ·á º¯°æ * Author : ±âÇöÅ×Å© * Create Date : 2010-11-27 * History : @@************************************************************/ %> <%@ page contentType="text/html; charset=euc-kr" import="java.net.URLEncoder" import="kr.co.kihyun.beans.user.HttpSSOLogin" import="java.net.*" import="kr.co.kihyun.util.MUtil" import="kr.co.kihyun.lang.MString" import="kr.co.kihyun.lang.Encoder" import="kr.co.kihyun.lang.MInteger" import="kr.co.kihyun.lang.MLong" import="kr.co.kihyun.text.html.ServletUtil" import="kr.co.kihyun.moumi.MoumiConfig" import="kr.co.kihyun.moumi.report.MReport" import="kr.co.kihyun.moumi.report.MReportData" import="kr.co.kihyun.moumi.report.stat.StaticMReport" import="kr.co.kihyun.moumi.doc.table.MTable" import="kr.co.kihyun.moumi.doc.table.item.MItem" import="kr.co.kihyun.moumi.report.MReportData" import="kr.co.kihyun.beans.totsys.report.ReportModifyManager" import="kr.co.kihyun.beans.totsys.report.ReportDataSet" import="kr.co.kihyun.text.javascript.JavaScriptUtil" import="kr.co.kihyun.beans.totsys.doc.table.item.ItemList" import="kr.co.kihyun.beans.totsys.menu.MenuBean" import="kr.co.kihyun.beans.user.User" import="kr.co.kihyun.text.html.TagFilter" import="kr.co.kihyun.lang.MLong" import="javax.jdo.PersistenceManager" import="javax.jdo.Transaction" import="kr.co.kihyun.beans.entity.util.*" import="kr.co.kihyun.beans.entity.*"%> <%@ page import="java.util.Map.Entry"%> <%@ page import="java.util.List"%> <%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> <% PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); Transaction tx = pm.currentTransaction(); try{ /********** session³»ÀÇ userId **********/ String usID = HttpSSOLogin.getLoginID(request); String dtID = HttpSSOLogin.getDeptID(request); String dpName = HttpSSOLogin.getDeptName(request); String type = MString.checkNull(request.getParameter("type")); //28.Å©·Î½º»çÀÌÆ® ½ºÅ©¸³Æ®(Reflected)_CWE-80 : Add by KWON,HAN if (type !=null) { type = type.replaceAll("<","<"); type = type.replaceAll(">",">"); } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ String reportType =MString.checkNull(request.getParameter("reportType")); String totperInfo = clearXSS(MString.checkNull(request.getParameter("totperInfo")),""); /********* Parameter *********/ Long reportID = MLong.parseLong(request.getParameter("reportID"),null); int rowCount = MInteger.parseInt(request.getParameter("rowCount"), -1); int delRowNum = MInteger.parseInt(request.getParameter("delRowNum"), 1); String modifyMode = clearXSS(request.getParameter("modifyMode"),""); //String copyForm = MString.checkNull( Encoder.toJava(request.getParameter("copyForm")) ); String copyForm = URLDecoder.decode(MString.checkNull(request.getParameter("copyForm")), "UTF-8"); String tableRows = MString.checkNull( Encoder.toJava(request.getParameter("tableRows")) ); String tables = MString.checkNull( Encoder.toJava(request.getParameter("tables")) ); TotReport totReport = (TotReport)pm.getObjectById(TotReport.class, reportID); rowCount = rowCount <= 0 ? totReport.getRowCount()+1 : rowCount; if(tableRows.equals("") || tableRows==null){ String datas = JavaScriptUtil.toCRLF(totReport.getData()); int[] tableRowList = MReportData.getRowNumList(datas); for(int r=0; r <% }else{ inDataJavaScript=""; } } /*********** append file name vlaues ***********/ String[] realFileNameList = realFileName.split(";"); String[] viewFileNameList = viewFileName.split(";"); String boardGroupID = Category.ID_TOT_DOC_COMMENT; String url = clearXSS(request.getParameter("url"),""); if(url == null){ url = ""; } String boardContents = ""; String svrFilenames = ""; int visit = 0; Board totperComment = totReport.getTotDoc().getBoard(); if(totperComment != null){ // tx.begin(); boardContents=TagFilter.convertSpace(totperComment.getContents()); for (Entry> entry : totperComment.getAttachments().entrySet()) { svrFilenames += entry.getKey() + ";"; } // visit = totperComment.getVisit(); // totperComment.setVisit(visit+1); // pm.makePersistent(totperComment); // tx.commit(); } // ¿¬°è¼öÁ¤ String memo = MString.checkNull(totReport.getRecentHistory() == null ? null : totReport.getRecentHistory().getMemo()); Long docId=totReport.getTotDoc().getId(); %> <%=MoumiConfig.getTitle()%>
<%}%> <%}%>
<%if(!"returndoc".equals(type)){%> <%}%> <%if(!MString.isNull(boardContents) || !MString.isNull(svrFilenames)){%> <%}%>
<%= MoumiConfig.getMessageBundle().getString("moumi.message.button_small.totperInfo") %>
 
<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.executionCode")%> <%= totReport.getTotDoc().getExecutionCode() %>
<% if(totReport.getTotDoc().getAppendType() != TotDocAppendType.FILE) { %>
<%if(tableType == MTable.DYNA){%> <%= hiddenData %>
<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.numTable")%>          
;overflow-x: auto;">
<% out.println(insertForm); %>
<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.acceptanceCode")%> <%= HttpSSOLogin.getDeptName(request) %>_ ">
<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.acceptexplanation")%>
<%if(totReport.getSlaveTotDoc() != null){%>
<%}%>
<%if(totReport.getSlaveTotDoc() != null){%> <%}%>
[<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.subDoc")%> <%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.modify")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.reason")%>] <%= MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.input") %>
[<%= MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.add") %><%= MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.file") %>]
 
<%if (changeAllScript.length() > 0) {%> <%}%>
<% }catch(Exception ex){ if(tx.isActive()) tx.rollback(); ex.printStackTrace(); out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); }finally{ if(tx.isActive()) tx.rollback(); pm.close(); } %>