%
/************************************************************@@
* Program Name : tot_report_regist.jsp
* Description : /보고자/내문서함/임시보고함/보고자료 변경
* Author : 강원중
* Create Date : 2004-11-06
* History : - 연계문서의 자료입력사항 수정 못하게 막음 . 풀기 위해선 body의 onLoad 삭제 해주면 됨.
@@************************************************************/
%>
<%@ page contentType="text/html; charset=UTF-8"
import="java.net.URLEncoder"
import="kr.co.kihyun.beans.user.HttpSSOLogin" import="java.net.*"
import="java.util.Date" import="java.text.SimpleDateFormat"
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.Moumi"
import="kr.co.kihyun.moumi.report.MReport"
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.doc.Doc"
import="kr.co.kihyun.beans.totsys.report.Report"
import="kr.co.kihyun.beans.totsys.report.ReportView"
import="kr.co.kihyun.beans.totsys.report.tot.TotReportModifyer"
import="javax.jdo.PersistenceManager"
import="javax.jdo.Transaction"
import="kr.co.kihyun.beans.entity.util.*"
import="kr.co.kihyun.beans.entity.*"%>
<%@ 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);
/********* Parameter *********/
Long reportID = MLong.parseLong(request.getParameter("reportID"));
int rowCount = MInteger.parseInt(request.getParameter("rowCount"), 1);
int repoState = MInteger.parseInt(request.getParameter("repoState"), 0);
int delRowNum = MInteger.parseInt(request.getParameter("delRowNum"), 1);
String modifyMode = clearXSS(request.getParameter("modifyMode"),"");
String tables = MString.checkNull( Encoder.toJava(request.getParameter("tables")) );
String tableRows = MString.checkNull( Encoder.toJava(request.getParameter("tableRows")) );
TotReport totReport = pm.getObjectById(TotReport.class, reportID);
int sendReportCount = new Report().getSendCount(totReport.getSlaveTotDoc().getId());
if(sendReportCount < 1){
out.println("");
out.println(ServletUtil.getJavaScript("history.go(-2);"));
return;
}
if(!new Doc().isEndDate(totReport.getSlaveTotDoc().getId())){
out.println("");
}
/********* report *********/
TotReportModifyer totReportModifyManager = new TotReportModifyer(request, totReport.getSlaveTotDoc(), dtID, rowCount, tableRows);
String docName = totReportModifyManager.getDocName();
int tableType = totReportModifyManager.getTableType();
String tableTypes = totReportModifyManager.getTableTypes();
rowCount = totReportModifyManager.getRowCount();
String insertForm = totReportModifyManager.getInsertForm();
String baseInsertForm = totReportModifyManager.getInsertForm();
String putValScript = totReportModifyManager.getPutValScript();
String changeAllScript = totReportModifyManager.getChangeAllScript();
String inDataJavaScript = totReportModifyManager.getInDataJavaScript();
if(tableRows.equals("") || tableRows==null){
tableRows = totReportModifyManager.getTableRows();
}
if(tableRows.equals("") || tableRows==null){
tableRows = tableTypes.replaceAll("0","1");
}
// table들 중 하나라도 동적인 표가 존재한다면 tableType를 동적표로 바꾸어 준다.
if(tableTypes.indexOf("1")==-1){
tableType = MTable.STATIC;
}else{
tableType = MTable.DYNA;
}
String addJavaScript = "";
String hiddenData = "";
if(tableType == MTable.DYNA){
addJavaScript = totReportModifyManager.getAddJavaScript();
hiddenData = totReportModifyManager.getHiddenData();
}
session.setAttribute("modifySuccTargetURI", "/totsys/repoper/mydocbox/tempbox/report_view.jsp?reportType=TEMP&reportID="+reportID);
%>
<%=Moumi.getTitle()%>
<%}%>
|
|
|
|
|
|
|
|
 |
의견 및 관련자료 |
|
|
|
|
|
|
<%if (changeAllScript.length() > 0) {%>
 |
|
<%}%>
 |
|
 |
|
 |
|
|
|
|
|
|
|
|
|
|
|
<%
}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{
if(tx.isActive())
tx.rollback();
pm.close();
}
%>