You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1238 lines
50 KiB

<%
/************************************************************@@
* Program Name : doc_regist.jsp
* Description : /집계자/내문서함/등록함/문서 등록
* Author : 강원중
* Create Date : 2004.10.11
* History :
@@************************************************************/
%>
<%@ page contentType="text/html; charset=euc-kr"
import="java.net.URLEncoder"
import="kr.co.kihyun.beans.user.HttpSSOLogin" import="java.util.*"
import="java.net.URLDecoder" import="java.io.StringReader"
import="javax.swing.text.html.parser.ParserDelegator"
import="kr.co.kihyun.lang.MString" import="kr.co.kihyun.lang.MInteger"
import="kr.co.kihyun.lang.Encoder" import="kr.co.kihyun.util.Stopwatch"
import="kr.co.kihyun.text.html.HtmlUtil"
import="kr.co.kihyun.text.excel.CalculationForm"
import="kr.co.kihyun.text.html.TagFilter"
import="kr.co.kihyun.text.html.ServletUtil"
import="kr.co.kihyun.text.html.CallbackHandler"
import="kr.co.kihyun.moumi.Moumi" import="kr.co.kihyun.moumi.doc.MDoc"
import="kr.co.kihyun.moumi.doc.table.MTable"
import="kr.co.kihyun.moumi.doc.table.MTableType"
import="kr.co.kihyun.moumi.doc.table.TableDefine"
import="kr.co.kihyun.moumi.doc.table.TableCreation"
import="kr.co.kihyun.moumi.doc.table.item.MItem"
import="kr.co.kihyun.moumi.doc.table.item.MItemInfo"
import="kr.co.kihyun.lang.MInteger" import="kr.co.kihyun.lang.MLong"
import="kr.co.kihyun.beans.totsys.doc.table.item.ItemList"%>
<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%>
<%
try{
/*********** 소요시간 체크 ***********/
Stopwatch stopwatch = new Stopwatch();
long startTime = stopwatch.start();
/********** session내의 userId **********/
String usID = HttpSSOLogin.getLoginID(request);
/********** parameter **********/
Long docID = MLong.parseLong(request.getParameter("docID"),null);
String docName = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("docName")), "UTF-8"),"");
String accAuth = clearXSS(request.getParameter("accAuth"),"");
String stDate = clearXSS(request.getParameter("stDate"),"");
String edDate = clearXSS(request.getParameter("edDate"),"");
String deptIDs = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("deptIDs")), "UTF-8"),"");
String deptCount = clearXSS(request.getParameter("deptCount"),"");
String userIDs = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("userIDs")), "UTF-8"),"");
String userCount = clearXSS(request.getParameter("userCount"),"");
Long repDocID = MLong.parseLong(request.getParameter("repDocID"),null);
String docGroupID = clearXSS(request.getParameter("docGroupID"),"");
String isFromFormBox = request.getParameter("isFromFormBox");
String choice = clearXSS(request.getParameter("choice"),"");
String deptNames = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("deptNames")), "UTF-8"),"");
String userNames = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("userNames")), "UTF-8"),"");
//String tableCount = clearXSS(request.getParameter("tableCount"),"");
String confirmDynaTable = clearXSS(request.getParameter("isDynaTable"),"");
String mode = clearXSS(request.getParameter("mode"),"");
String tableDefines = clearXSS(request.getParameter("tableDefines"),"");
String tableTypes = clearXSS(request.getParameter("tableTypes"),"");
String itemNames = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("itemNames")), "UTF-8"),"");
String tableNums = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("tableNums")), "UTF-8"),"");
String colNums = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("colNums")), "UTF-8"),"");
String rowNums = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("rowNums")), "UTF-8"),"");
String itemSizes = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("itemSizes")), "UTF-8"),"");
String itemDescs = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("itemDescs")), "UTF-8"),"");
String itemExprs = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("itemExprs")), "UTF-8"),"");
String itemTypes = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("itemTypes")), "UTF-8"),"");
String backDash = clearXSS(request.getParameter("backDash"),"");
String docForm = HtmlUtil.toLowerCase((String)session.getAttribute("docForm"));
String origTableForm = MTable.getTables(docForm); //대문자 살림
String tableForm = docForm;
tableForm = tableForm.replaceAll("<p>&nbsp;","");
/********** 파싱 **********/
//올린 파일을 String Reader를 이용해서 읽는다.
StringReader strReader = new StringReader(origTableForm);
CallbackHandler cbHandler = new CallbackHandler();
new ParserDelegator().parse(strReader, cbHandler, true);
List<Hashtable<String, String>> tdList = cbHandler.getTDs();
int tdCount = tdList.size();
//표가 존재 하지 않을때..
if(tdCount < 1 ){
out.println("<script language=javascript>\n");
out.println(" alert('올린 파일에 표가 없습니다.');\n");
out.println(" document.location.replace('./doc_list.jsp');\n");
out.println("</script>");
return;
}
//생성할 배열의 사이즈 계산
int allRowCount = 0;
int allColCount = 0;
int rowCount = 0;
int colCount = 0;
for(int i=0; i < tdCount; i++){
rowCount = Integer.parseInt(tdList.get(i).get("row"));
colCount = Integer.parseInt(tdList.get(i).get("col"));
if(allRowCount < rowCount) allRowCount = rowCount;
if(allColCount < colCount) allColCount = colCount;
}
++ allRowCount; //배열이라 0부터 시작 한다.
++ allColCount; //배열이라 0부터 시작 한다.
//각각의 셀에 있는 Text 를 tdTextList 라는 배열에 저장한다.
boolean isDynaTable = true;
String tdName = "";
String tableNumList = "";
String tdText = "";
String tdTextList[][] = new String[allRowCount][allColCount];
StringBuffer itemValueListBuff = new StringBuffer();
MTableType tableType = new MTableType(allRowCount); //table type value
Long reuseDocID = (Long)session.getAttribute("reuseDocID");
//int[] itemTypeList = null;
//String[] itemExprList = null;
int[] itemNumList = null;
String[] itemNameList = null;
String[] itemExprList = null;
int[] itemSizeList = null;
String[] itemDescList = null;
//String[] tempTypeList = null;
int[] itemTypeList = null;
int[] intTableNumList = null;
int[] rowNumList = null;
int[] colNumList = null;
if(!MString.isNull(itemTypes) && !itemTypes.equals("")) {
if(confirmDynaTable.equals("false")){
isDynaTable = false;
}else{
isDynaTable = true;
}
MItemInfo itemInfo = new MItemInfo();
itemInfo.itemInfo(itemNames, itemSizes, itemExprs, itemDescs, itemTypes, tableNums, colNums, rowNums, 10);
itemNumList = itemInfo.getItemNumList();
itemNameList = itemInfo.getItemNameList();
itemExprList = itemInfo.getItemExprList();
itemSizeList = itemInfo.getItemSizeList();
itemDescList = itemInfo.getItemDescList();
itemTypeList = itemInfo.getItemTypeList();
intTableNumList = itemInfo.getTableNumList();
rowNumList = itemInfo.getRowNumList();
colNumList = itemInfo.getColNumList();
if(backDash.equals("back")){ //make by 구경모 #이전단계로 이동시 수식값 변환내용을 유지
itemExprs = clearXSS(URLDecoder.decode(request.getParameter("itemExprs"), "UTF-8"),"");
//step 1. 앞글자 0: 를 없앤다.
itemExprs = itemExprs.substring(2,itemExprs.length());
//step 2. 번호: 를 없앤다. (step 1,2를 하는이유는 0: 과 100: 에서 0:가 공통으로 들어가는문제가 있기때문.)
for(int i=0; i< itemNameList.length; i++){
itemExprs = itemExprs.replaceAll(MItem.LIST_DELIM+i+":",MItem.LIST_DELIM);
}
//step 3. 특수문자 MItem.LIST_DELIM 기준으로 배열에 넣는다. 이때, itemTypeNameList 배열을 사용한다는것에 주의.
itemExprList = itemExprs.split(MItem.LIST_DELIM);
//step 4. 마지막 수식적용한 번지~배열끝까지 사이가 모두 null일때 배열이 중간에 끊기는현상 보완
String[] itemExprList_temp = itemExprList;
itemExprList = new String[itemNameList.length];
for(int i=0; i< itemNameList.length; i++){
if(i<itemExprList_temp.length){
itemExprList[i]=itemExprList_temp[i];
}else{
itemExprList[i]="";
}
}
}
for(int i=0; i < itemNameList.length; i++){
itemValueListBuff.append("itemNameList["+i+"] = '"+itemNameList[i]+"';\n");
//itemValueListBuff.append("itemSizeList["+i+"] = '"+itemSizeList[i]+"';\n");
itemValueListBuff.append("itemSizeList["+i+"] = '';\n");
itemValueListBuff.append("tableNumList["+i+"] = '"+Integer.toString(intTableNumList[i])+"';\n");
itemValueListBuff.append("rowNumList["+i+"] = '"+rowNumList[i]+"';\n");
itemValueListBuff.append("colNumList["+i+"] = '"+colNumList[i]+"';\n");
itemValueListBuff.append("itemDescList["+i+"] = '"+itemDescList[i]+"';\n");
if(itemTypeList[i]==1)
itemValueListBuff.append("itemTypeList["+i+"] = '문자';\n");
else if(itemTypeList[i]==2)
itemValueListBuff.append("itemTypeList["+i+"] = '숫자';\n");
else if(itemTypeList[i]==3)
itemValueListBuff.append("itemTypeList["+i+"] = '날짜';\n");
else if(itemTypeList[i]==4)
itemValueListBuff.append("itemTypeList["+i+"] = '타이틀';\n");
else
itemValueListBuff.append("itemTypeList["+i+"] = '"+itemTypeList[i]+"';\n");
itemValueListBuff.append("itemExprList["+i+"] = '"+itemExprList[i]+"';\n");
}
}else{
if(reuseDocID != null) {
ItemList itemList = new ItemList();
itemList.executeQuery(reuseDocID);
itemTypeList = itemList.getTypeList();
itemExprList = itemList.getExprList();
}
if(backDash.equals("back")){ //make by 구경모 #이전단계로 이동시 수식값 변환내용을 유지
itemExprs = clearXSS(URLDecoder.decode(request.getParameter("itemExprs"), "UTF-8"),"");
//step 1. 앞글자 0: 를 없앤다.
itemExprs = itemExprs.substring(2,itemExprs.length());
//step 2. 번호: 를 없앤다. (step 1,2를 하는이유는 0: 과 100: 에서 0:가 공통으로 들어가는문제가 있기때문.)
for(int i=0; i< itemNameList.length; i++){
itemExprs = itemExprs.replaceAll(MItem.LIST_DELIM+i+":",MItem.LIST_DELIM);
}
//step 3. 특수문자 MItem.LIST_DELIM 기준으로 배열에 넣는다. 이때, itemTypeNameList 배열을 사용한다는것에 주의.
itemExprList = itemExprs.split(MItem.LIST_DELIM);
//step 4. 마지막 수식적용한 번지~배열끝까지 사이가 모두 null일때 배열이 중간에 끊기는현상 보완
String[] itemExprList_temp = itemExprList;
itemExprList = new String[itemNameList.length];
for(int i=0; i< itemNameList.length; i++){
if(i<itemExprList_temp.length){
itemExprList[i]=itemExprList_temp[i];
}else{
itemExprList[i]="";
}
}
}
for(int i=0; i < tdCount; i++){
tdName = tdList.get(i).get("name");
tableNumList = tdList.get(i).get("table");
tdText = tdList.get(i).get("text");
// 어떤 이유에선지, 첫번째 셀이 " empty" 형식으로 넘어오기 때문...
if(tdText.equals("empty")){
tdText= "empty";
}
// 복사양식일때..
// 어떤 이유에선지, 첫번째 셀이 "emptyempty" 형식으로 넘어오기 때문...
int colNum = Integer.parseInt(tdList.get(i).get("col"));
int rowNum = Integer.parseInt(tdList.get(i).get("row"));
tdTextList[rowNum][colNum] = tdText;
//Item정보를 저장할때 Excel과 같이 1부터 시작 하기 위해 1씩 추가
++colNum;
++rowNum;
itemValueListBuff.append("itemNameList["+i+"] = '"+tdName+"';\n");
itemValueListBuff.append("itemSizeList["+i+"] = '';\n");
itemValueListBuff.append("tableNumList["+i+"] = '"+tableNumList+"';\n");
itemValueListBuff.append("rowNumList["+i+"] = '"+rowNum+"';\n");
itemValueListBuff.append("colNumList["+i+"] = '"+colNum+"';\n");
//// 공백인것을 empty 문자로 바꾼다.
if(tdText != null && tdText.trim().equals("")){
itemValueListBuff.append("itemDescList["+i+"] = 'empty';\n");
tableType.setStartTRNum(rowNum);
}else if(tdText != null && tdText.trim().equals("0")){
itemValueListBuff.append("itemDescList["+i+"] = 'empty';\n");
tableType.setStartTRNum(rowNum);
}else{
tdText = tdText.replaceAll("\'", "\"");
if( tdText.indexOf("<") >0 || tdText.indexOf("/>") >0 ){
itemValueListBuff.append("itemDescList["+i+"] = 'empty';\n");
}else{
itemValueListBuff.append("itemDescList["+i+"] = '"+tdText+"';\n");
}
}
//itemValueListBuff.append("itemTypeList["+i+"] = '"+MItem.getTypeName(MItem.CHAR)+"';\n");
itemValueListBuff.append("itemTypeList["+i+"] = '"+ (reuseDocID == null ? MItem.getTypeName(MItem.INT) : MItem.getTypeName(itemTypeList[i]))+"';\n");
itemValueListBuff.append("itemExprList["+i+"] = '"+ (reuseDocID == null ? "" : itemExprList[i].replaceAll("'","\\'"))+"';\n");
}
//양식이 동적인 표인지 정적인 표인지 파악
isDynaTable = tableType.isDynaTable();
}
/********** form 필터링 **********/
int sumSusig = TagFilter.getSumSusig(tableForm);
int comboBox = TagFilter.getComboBox(tableForm);
if(!backDash.equals("back")){//이전단계 돌아온것 아닐때만 실행함.
if(sumSusig != -1 ) itemValueListBuff.append(CalculationForm.getCalculationForms(tableForm));
}
if(comboBox != -1) itemValueListBuff.append(TagFilter.excelComboBoxImport(tableForm));
int tableCount = HtmlUtil.getTableCount(tableForm);
tableForm = TagFilter.tdTextToSpace(tableForm);
byte[] formBytes = docForm.getBytes();
session.setAttribute("docForm", tableForm);
TableDefine tableDefine = new TableDefine();
String strTableInfo = tableDefine.insertDiv(tableForm, tdList, cbHandler.getTRCount());
//out.print(itemValueListBuff.toString()); //최종점검
session.setAttribute("modifySuccTargetURI", "/totsys/totper/mydocbox/prssbox/doc_form_view.jsp");
%>
<script src="/totsys/common/js/rollover.js"></script>
<script src="/totsys/common/js/popup.js"></script>
<script language='JavaScript'>
var itemCount = <%= tdList.size() %>;
var dataItemList = new Array();
var setWinList = new Array();
var itemNameList = new Array();
var itemSizeList = new Array();
var itemDescList = new Array();
var itemExprList = new Array();
var itemTypeList = new Array();
var colNumList = new Array();
var rowNumList = new Array();
var tableNumList = new Array();
var tableTypeList = new Array();
for (i=0;i<itemCount;i++){
dataItemList[i] = false;
setWinList[i] = false;
itemSizeList[i] = '';
itemDescList[i] = '';
itemExprList[i] = '';
itemTypeList[i] = '';
}
<%= itemValueListBuff.toString() %>
for(var j=1; j <= <%=tableCount%> && <%=tableCount%> > 0 ; j++){
tableTypeList[j]=1;
}
<%
if(!tableTypes.equals("") && tableTypes!=null){
String[] typeList=tableTypes.split(",");
for(int k=0; k<typeList.length; k++){
%>
tableTypeList[<%=k+1%>]=<%=typeList[k]%>;
<%
}
}
%>
//on load시 자동 실행
//function exprSetup(){//itemExprList 변경
if(<%= tableCount %> > 1){//itemExprList 변경
var rowNum = 1;
var addRowNum = 0; //첫번째 table의 더할 행의 수가 0부터 시작하기 때문
for(var i=0; i < itemCount; i++){
if(i > 0){
if(tableNumList[i] > tableNumList[i-1]){ //다음 테이블로 넘어갔다면 현재 이전의 레코드 번호가 이전 테이블까지의 레코스 수임
addRowNum = (rowNumList[i]-1);
}
}
if(itemExprList[i].length > 0 && itemExprList[i].indexOf("^") < 0){ //숫짜일때
itemExprList[i] = getCalculationForm(itemExprList[i], addRowNum, "add");
}
}
}
function getCalculationForm(str, rowNum, type){
//필요없는 EXPR ^
if(isSearch(str, "^")) return str;
//"SUM", "(", ")", ":", ",", "+", "-", "*", "/"
//SUM(B9:F99)
var alphabet = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
var integer = '0123456789';
var charCount = str.length;
var charList = new Array(charCount);
var numList = new Array(charCount);
var befoChar = "";
var currChar = "";
var afterChar = "";
if(charCount < 1) return str;
//String array analysis
//expr의 item name의 number add
var exprbuf = "";
var isItemNum = false;
var tmpNum = "";
for(var i=0; i < charCount; i++){
currChar = str.substring(i, i+1);
if(isSearch(alphabet, currChar)){ //문자 일때~~~~
if(currChar == 's' || currChar == 'S'){
sumNum = 1;
isItemNum = true;
}else if(i > 0 && (currChar == 'u' || currChar == 'U')){
sumNum = 2;
isItemNum = true;
}else if(i > 1 && (currChar == 'm' || currChar == 'M')){
sumNum = 3;
isItemNum = false;
}else{
isItemNum = true;
}
exprbuf += currChar;
}else if(isSearch(integer, currChar)){ //숫자 일때~~~~
if(i > 0 && isSearch(alphabet, befoChar) && isItemNum == true){ //Item name의 첫번째 숫자라면
tmpNum = currChar;
isItemNum = true;
}else if(i > 0 && isSearch(integer, befoChar) && isItemNum == true){ //Item name의 두번째 이상의 숫자라면
tmpNum += currChar;
isItemNum = true;
}else{ //나머지
exprbuf += currChar;
isItemNum = false;
}
afterChar = str.substring(i+1, i+2);
if((i == (charCount-1) || !isSearch(integer, afterChar)) && isItemNum){ //Item name의 숫자 끝이라면
if(type == "add"){ //동적표에서 보가자료 보기시 보고한 행에 따라 수식을 변경해줌
exprbuf += (parseInt(tmpNum)+parseInt(rowNum));
isItemNum = false;
}else if(type == "sub"){ //두개의 표를 등록할때 Form에 적용되는 수식사용
exprbuf += (parseInt(tmpNum)-parseInt(rowNum));
isItemNum = false;
}
}
}else{
exprbuf += currChar;
isItemNum = false;//수식 일때~~~
}
befoChar = currChar;
}
return exprbuf;
}
function isSearch(strs, str){
var count = strs.length;
var strList = new Array(count);
for(var i=0; i < count; i++){
if(strs.substring(i, i+1) == str){
return true;
}
}
return false;
}
function changeCell(object,index){
if(dataItemList[index] == false){
dataItemList[index] = true;
showValue(index);
} else if(setWinList[index]==false){
dataItemList[index] = false;
eval('cell_'+index).innerHTML="<img src='/totsys/common/inc/documents/tot_doc/images/blank.gif' width='0' height='0' border='0'>";
}else{
setWinList[index] = false;
}
}
function strreplace(oldS, newS, fullS){
var tmpS='';
for(i=0; i < fullS.length; i++){
if(fullS.substring(i, i + oldS.length) == oldS){
tmpS = tmpS + newS;
i= i + oldS.length - 1;
}else{
tmpS = tmpS + fullS.substring(i, i + 1);
}
}
return tmpS;
}
function showValue(index) {
eval('cell_'+index).innerHTML=
"<table width=100% border=0 cellspacing=0 cellspacing=0 >"+
" <tr>"+
" <td>"+
" <table width=100% border=0 cellpadding=0 cellspacing=1>"+
" <tr>"+
" <td colspan=3 align=left>"+
" <a href=\"javascript:inExp('"+ itemNameList[index]+"');\"><b><font face='Courier' color='brown'>"+itemNameList[index] +"</font></a></b><br>";
if(itemTypeList[index]== '타이틀'){
if(itemExprList[index] == '' || itemExprList[index] == null){
eval('cell_'+index).innerHTML+=" <img src=\"/totsys/common/inc/documents/tot_doc/images/set4.gif\" border=0 align=center onclick=\"showSetWin("+index+");\" alt='"+itemExprList[index]+"'>";
}else{
var exprTmp = false;
if(itemExprList[index].indexOf('^') == -1){
exprTmp = false;
}else{
exprTmp = true;
}
if(exprTmp){
eval('cell_'+index).innerHTML+=" <img src=\"/totsys/common/inc/documents/tot_doc/images/set_on5.gif\" border=0 align=center onclick=\"showSetWin("+index+");\" alt='"+itemExprList[index]+"'>";
}else{
eval('cell_'+index).innerHTML+=" <img src=\"/totsys/common/inc/documents/tot_doc/images/set_on4.gif\" border=0 align=center onclick=\"showSetWin("+index+");\" alt='"+itemExprList[index]+"'>";
}
}
}else if(itemTypeList[index]== '문자'){
if(itemExprList[index] == '' || itemExprList[index] == null){
eval('cell_'+index).innerHTML+=" <img src=\"/totsys/common/inc/documents/tot_doc/images/set2.gif\" border=0 align=center onclick=\"showSetWin("+index+");\" alt='"+itemExprList[index]+"'>";
}else{
var exprTmp = false;
if(itemExprList[index].indexOf('^') == -1){
exprTmp = false;
}else{
exprTmp = true;
}
if(exprTmp){
eval('cell_'+index).innerHTML+=" <img src=\"/totsys/common/inc/documents/tot_doc/images/set_on5.gif\" border=0 align=center onclick=\"showSetWin("+index+");\" alt='"+itemExprList[index]+"'>";
}else{
eval('cell_'+index).innerHTML+=" <img src=\"/totsys/common/inc/documents/tot_doc/images/set_on2.gif\" border=0 align=center onclick=\"showSetWin("+index+");\" alt='"+itemExprList[index]+"'>";
}
}
}else if(itemTypeList[index]== '숫자'){
if(itemExprList[index] == '' || itemExprList[index] == null){
eval('cell_'+index).innerHTML+=" <img src=\"/totsys/common/inc/documents/tot_doc/images/set1.gif\" border=0 align=center onclick=\"showSetWin("+index+");\" alt='"+itemExprList[index]+"'>";
}else{
var exprTmp = false;
if(itemExprList[index].indexOf('^') == -1){
exprTmp = false;
}else{
exprTmp = true;
}
if(exprTmp){
eval('cell_'+index).innerHTML+=" <img src=\"/totsys/common/inc/documents/tot_doc/images/set_on5.gif\" border=0 align=center onclick=\"showSetWin("+index+");\" alt='"+itemExprList[index]+"'>";
}else{
eval('cell_'+index).innerHTML+=" <img src=\"/totsys/common/inc/documents/tot_doc/images/set_on1.gif\" border=0 align=center onclick=\"showSetWin("+index+");\" alt='"+itemExprList[index]+"'>";
}
}
}else if(itemTypeList[index]== '날짜'){
if(itemExprList[index] == '' || itemExprList[index] == null){
eval('cell_'+index).innerHTML+=" <img src=\"/totsys/common/inc/documents/tot_doc/images/set3.gif\" border=0 align=center onclick=\"showSetWin("+index+");\" alt='"+itemExprList[index]+"'>";
}else{
var exprTmp = false;
if(itemExprList[index].indexOf('^') == -1){
exprTmp = false;
}else{
exprTmp = true;
}
if(exprTmp){
eval('cell_'+index).innerHTML+=" <img src=\"/totsys/common/inc/documents/tot_doc/images/set_on5.gif\" border=0 align=center onclick=\"showSetWin("+index+");\" alt='"+itemExprList[index]+"'>";
}else{
eval('cell_'+index).innerHTML+=" <img src=\"/totsys/common/inc/documents/tot_doc/images/set_on3.gif\" border=0 align=center onclick=\"showSetWin("+index+");\" alt='"+itemExprList[index]+"'>";
}
}
}
eval('cell_'+index).innerHTML+=" </td>"+
" </tr>"+
"</table>";
}
function closeValue(index) {
eval('cell_'+index).innerHTML="";
}
function inExp(v1){
if(SetWin.style.visibility=='hidden'){
}else{
SetCell.itemExpr.focus();
window.document.selection.createRange().text=v1;
}
}
function showSetWin(index){
setWinList[index] = true;
SetWin.style.visibility='visible';
SetWin.style.top = window.event.y + document.body.scrollTop;
SetWin.style.left = window.event.x + document.body.scrollLeft;
SetWin.innerHTML =
"<table nowrap border=0 cellpadding=4 cellspacing=0 bgcolor=#eeeeee>"+
" <tr nowrap bgcolor='#BBBBBB' style='cursor:hand;' id='ForDrag'>"+
" <td nowrap><font color='brown'><b>"+itemNameList[index]+"</b></font></td>"+
" <td nowrap align=right><right><img src='/totsys/common/inc/documents/tot_doc/images/close.gif' onmouseDown=\"this.src='/totsys/common/inc/documents/tot_doc/images/close1.gif';\" onclick=\"SetWin.style.visibility='hidden';\"></right></td>"+
" </tr>"+
" <tr nowrap>"+
" <td nowrap colspan=2>"+
" <table nowrap border=0 cellpadding=2 cellspacing=0>"+
" <form name='SetCell'>"+
" <tr nowrap >"+
" <td nowrap>"+
" <input type='hidden' name=itemSize value='3'>"+
" <select name='itemType' onchange=\"SetCell.itemType.value=this.value;\">"+
" <option value='숫자'>숫자</option>"+
" <option value='문자'>문자</option>"+
" <option value='날짜'>날짜</option>"+
" <option value='타이틀'>표제</option>"+
" </select>"+
" <img style='cursor:hand;' src='/totsys/common/inc/documents/tot_doc/images/bt_plus.gif' onClick=\"inExp('+');\" align='absmiddle' border='0'>"+
" <img style='cursor:hand;' src='/totsys/common/inc/documents/tot_doc/images/bt_minus.gif' onClick=\"inExp('-');\" align='absmiddle' border='0'>"+
" <img style='cursor:hand;' src='/totsys/common/inc/documents/tot_doc/images/bt_gop.gif' onClick=\"inExp('*');\" align='absmiddle' border='0'>"+
" <img style='cursor:hand;' src='/totsys/common/inc/documents/tot_doc/images/bt_nanugi.gif' onClick=\"inExp('/');\" align='absmiddle' border='0'>"+
" </td>"+
" </tr>"+
" <tr nowrap>"+
" <td nowrap><input name='itemExpr' type='text' style='width:100%' class=inputtxt onkeydown='enter_catch("+index+")'></td>"+
" </tr>"+
" <input type=hidden name=itemDesc>"+
" <tr nowrap>"+
" <td nowrap colspan=10 align=center>"+
" <input type=button value='설정' onclick=\"setValue("+index+");SetWin.style.visibility='hidden';\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"+
" <input type=button value='수평' onClick=\"horApply('"+itemNameList[index]+"', "+index+");\">"+
" <input type=button value='수직' onClick=\"verApply('"+itemNameList[index]+"', "+index+");\">"+
" </td>"+
" </tr>"+
" </form>"+
" </table>"+
" </td>"+
" </tr>"+
"</table>";
SetCell.itemSize.value = itemSizeList[index];
SetCell.itemExpr.value = itemExprList[index];
SetCell.itemType.value = itemTypeList[index];
}
// 설정
function setValue(index){
if(isErrorExpr(SetCell.itemExpr.value, SetCell.itemType.value)) return; //수식 오류 check
itemTypeList[index] = SetCell.itemType.value;
itemSizeList[index] = SetCell.itemSize.value;
itemExprList[index] = SetCell.itemExpr.value;
reShowValue(index);
}
// 숫자형식 체크
function numCheck( expr ){
if( expr.match(/\d+/g) == expr ) {
return true;
}else{
return false;
}
}
// 사이값 체크
function isBig( num1, num2 ){
if( num1 > num2 ){
return true;
}else{
return false;
}
}
function setSum(index, expr){
setWinList[index] = true;
itemDescList[index] = 'AutoSum'
itemSizeList[index] = 10
itemExprList[index] = expr;
itemTypeList[index] = 0;
}
function beginDrag() {
dragThis = event.srcElement;
while (dragThis.id.indexOf("ForDrag") == -1) {
dragThis = dragThis.parentElement;
if (dragThis == null) {
return;
}
}
dragThis=SetWin;
oldX = (event.clientX + document.body.scrollLeft);
oldY = (event.clientY + document.body.scrollTop);
}
function dragIt(){
if (dragThis == null) {
return
};
newX = (event.clientX + document.body.scrollLeft);
newY = (event.clientY + document.body.scrollTop);
var distanceX = (newX - oldX);
var distanceY = (newY - oldY);
oldX = newX;
oldY = newY;
dragThis.style.pixelLeft += distanceX;
dragThis.style.pixelTop += distanceY;
event.returnValue = false;
}
function endDrag() {
dragThis = null;
}
function setDrag() {
document.onmousemove = dragIt;
document.onmousedown = beginDrag;
document.onmouseup = endDrag;
oldX=oldY=newX=newY=0, dragThis=null;
}
setDrag();
function preview(){
// 초기화
dform.itemNames.value = '';
dform.itemSizes.value = '';
dform.itemDescs.value = '';
dform.itemExprs.value = '';
dform.itemTypes.value = '';
dform.colNums.value = '';
dform.rowNums.value = '';
dform.tableNums.value = '';
var item_count = 0;
for (i=0;i<itemCount;i++){
if(itemNameList[i] != undefined){
dform.itemNames.value = dform.itemNames.value + i + ':' + itemNameList[i] + '<%= MItem.LIST_DELIM %>';
dform.itemSizes.value = dform.itemSizes.value + i + ':' + itemSizeList[i] + '<%= MItem.LIST_DELIM %>';
dform.itemDescs.value = dform.itemDescs.value + i + ':' + itemDescList[i] + '<%= MItem.LIST_DELIM %>';
dform.itemExprs.value = dform.itemExprs.value + i + ':' + itemExprList[i] + '<%= MItem.LIST_DELIM %>';
dform.itemTypes.value = dform.itemTypes.value + i + ':' + itemTypeList[i] + '<%= MItem.LIST_DELIM %>';
dform.colNums.value = dform.colNums.value + i + ':' + colNumList[i] + '<%= MItem.LIST_DELIM %>';
dform.rowNums.value = dform.rowNums.value + i + ':' + rowNumList[i] + '<%= MItem.LIST_DELIM %>';
dform.tableNums.value = dform.tableNums.value + i + ':' + tableNumList[i] + '<%= MItem.LIST_DELIM %>';
item_count ++;
}
}
dform.tableDefines.value = '';
for(i=0; i<<%= tableCount %>; i++){
dform.tableDefines.value = dform.tableDefines.value + (i+1) +':rowdiv:rowdiv<%= MItem.LIST_DELIM %>';
}
if (item_count > 0) {
var farwindow = null;
//(url, target, width, height, align, valign, scroll, resize)
farwindow = getOpener('', 'preview', 900, 600, 'center', 'middle', 'yes', 'yes');//window.open('','preview','width=800,height=600,left=0,top=0,status=no,scrollbars=yes,resizable=yes');
dform.submit();
farwindow.focus();
} else {
alert('한개 이상의 입력셀을 지정하셔야 합니다.');
}
}
function nextStep(){
// 초기화
dform.itemNames.value = '';
dform.itemSizes.value = '';
dform.itemDescs.value = '';
dform.itemExprs.value = '';
dform.itemTypes.value = '';
dform.colNums.value = '';
dform.rowNums.value = '';
dform.tableNums.value = '';
var item_count = 0;
for (i=0;i<itemCount;i++){
if(itemNameList[i] != undefined){
dform.itemNames.value = dform.itemNames.value + i + ':' + itemNameList[i] + '<%= MItem.LIST_DELIM %>';
dform.itemSizes.value = dform.itemSizes.value + i + ':' + itemSizeList[i] + '<%= MItem.LIST_DELIM %>';
dform.itemDescs.value = dform.itemDescs.value + i + ':' + itemDescList[i] + '<%= MItem.LIST_DELIM %>';
dform.itemExprs.value = dform.itemExprs.value + i + ':' + itemExprList[i] + '<%= MItem.LIST_DELIM %>';
dform.itemTypes.value = dform.itemTypes.value + i + ':' + itemTypeList[i] + '<%= MItem.LIST_DELIM %>';
dform.colNums.value = dform.colNums.value + i + ':' + colNumList[i] + '<%= MItem.LIST_DELIM %>';
dform.rowNums.value = dform.rowNums.value + i + ':' + rowNumList[i] + '<%= MItem.LIST_DELIM %>';
dform.tableNums.value = dform.tableNums.value + i + ':' + tableNumList[i] + '<%= MItem.LIST_DELIM %>';
item_count ++;
}
}
dform.tableDefines.value = '';
for(i=0; i<<%= tableCount %>; i++){
dform.tableDefines.value = dform.tableDefines.value + (i+1) +':rowdiv:rowdiv<%= MItem.LIST_DELIM %>';
}
if (item_count > 0) {
dform.submit();
} else {
alert('한개 이상의 입력셀을 지정하셔야 합니다.');
}
}
function beforeStep(){
// 초기화
dform.itemNames.value = '';
dform.itemSizes.value = '';
dform.itemDescs.value = '';
dform.itemExprs.value = '';
dform.itemTypes.value = '';
dform.colNums.value = '';
dform.rowNums.value = '';
dform.tableNums.value = '';
var item_count = 0;
for (i=0;i<itemCount;i++){
if(itemNameList[i] != undefined){
dform.itemNames.value = dform.itemNames.value + i + ':' + itemNameList[i] + '<%= MItem.LIST_DELIM %>';
dform.itemSizes.value = dform.itemSizes.value + i + ':' + itemSizeList[i] + '<%= MItem.LIST_DELIM %>';
dform.itemDescs.value = dform.itemDescs.value + i + ':' + itemDescList[i] + '<%= MItem.LIST_DELIM %>';
dform.itemExprs.value = dform.itemExprs.value + i + ':' + itemExprList[i] + '<%= MItem.LIST_DELIM %>';
dform.itemTypes.value = dform.itemTypes.value + i + ':' + itemTypeList[i] + '<%= MItem.LIST_DELIM %>';
dform.colNums.value = dform.colNums.value + i + ':' + colNumList[i] + '<%= MItem.LIST_DELIM %>';
dform.rowNums.value = dform.rowNums.value + i + ':' + rowNumList[i] + '<%= MItem.LIST_DELIM %>';
dform.tableNums.value = dform.tableNums.value + i + ':' + tableNumList[i] + '<%= MItem.LIST_DELIM %>';
item_count ++;
}
}
dform.tableDefines.value = '';
for(i=0; i<<%= tableCount %>; i++){
dform.tableDefines.value = dform.tableDefines.value + (i+1) +':rowdiv:rowdiv<%= MItem.LIST_DELIM %>';
}
dform.docName.value='<%=URLEncoder.encode(docName, "UTF-8")%>';
dform.submit();
}
function enter_catch(index){
if(event.keyCode==13){
setValue(index);
SetWin.style.visibility='hidden';
reShowValue(index);
}
}
function TotalNumberChoice(){
for (i=0;i<itemCount;i++){
if(itemNameList[i] != undefined && itemTypeList[i] != '타이틀' && itemDescList[i] == 'empty'){
itemTypeList[i] = '숫자';
reShowValue(i);
}
}
}
function TotalCharterChoice(){
for (i=0;i<itemCount;i++){
if(itemNameList[i] != undefined && itemTypeList[i] != '타이틀' && itemDescList[i] == 'empty'){
itemTypeList[i] = '문자';
reShowValue(i);
}
}
}
function TotalDateChoice(){
for (i=0;i<itemCount;i++){
if(itemNameList[i] != undefined && itemTypeList[i] != '타이틀' && itemDescList[i] == 'empty'){
itemTypeList[i] = '날짜';
reShowValue(i);
}
}
}
function NumberChoice(index){
for (i=0;i<itemCount;i++){
if(itemNameList[i] != undefined && itemDescList[i] == 'empty' && itemTypeList[i] != '타이틀' && tableNumList[i] == index){
itemTypeList[i] = '숫자';
reShowValue(i);
}
}
}
function CharterChoice(index){
for (i=0;i<itemCount;i++){
if(itemNameList[i] != undefined && itemDescList[i] == 'empty' && itemTypeList[i] != '타이틀' && tableNumList[i] == index){
itemTypeList[i] = '문자';
reShowValue(i);
}
}
}
function DateChoice(index){
for (i=0;i<itemCount;i++){
if(itemNameList[i] != undefined && itemDescList[i] == 'empty' && itemTypeList[i] != '타이틀' && tableNumList[i] == index){
itemTypeList[i] = '날짜';
reShowValue(i);
}
}
}
function StaticChoice(index){
tableTypeList[index]=0;
}
function DynaChoice(index){
tableTypeList[index]=1;
}
function Choice(index){
if(dform.all['dyna'+index].checked==true){
//if(d.checked==true){
//alert(index+" : 0");
tableTypeList[index]=0;
}else{
//alert(index+" : 1");
tableTypeList[index]=1;
}
}
function horApply(ItemName, index){
if(isErrorExpr(SetCell.itemExpr.value, SetCell.itemType.value)) return; //수식 오류 체크
var Charter = '';
var Number = ItemName.substring(1, ItemName.length);
Charter = ItemName.substring(0, 1);
var TableSu = tableNumList[index];
if(isNaN(Number)){
Number = ItemName.substring(2, ItemName.length);
Charter = ItemName.substring(0, 2);
}
for (i=0;i<itemCount;i++){
if(itemNameList[i] != undefined && itemDescList[i] == 'empty' && tableNumList[i] == TableSu && itemTypeList[i] != '타이틀'){
var ChangeNumber = itemNameList[i].substring(1, itemNameList[i].length);
var ChangeCharter = itemNameList[i].substring(0, 1);
if(isNaN(ChangeNumber)){
ChangeNumber = itemNameList[i].substring(2, itemNameList[i].length);
ChangeCharter = itemNameList[i].substring(0, 2);
}
if(Number == ChangeNumber){
var ItemExpr = (SetCell.itemExpr.value).toUpperCase();
if(ItemExpr.indexOf("^") < 0){
itemExprList[i] = ItemExpr.replace(eval('/'+Charter+'/g'), ChangeCharter);
}else{
itemExprList[i] = ItemExpr;
}
itemTypeList[i] = SetCell.itemType.value; //숫자, 문자, 날짜 수평 설정
itemSizeList[i] = SetCell.itemSize.value; //셀 크기 수평 설정
reShowValue(i);
}
}
}
SetWin.style.visibility="hidden";
}
function verApply(ItemName, index){
if(isErrorExpr(SetCell.itemExpr.value, SetCell.itemType.value)) return; //수식 오류 체크
var Charter = '';
var Number = ItemName.substring(1, ItemName.length);
Charter = ItemName.substring(0, 1);
var TableSu = tableNumList[index];
if(isNaN(Number)){
Number = ItemName.substring(2, ItemName.length);
Charter = ItemName.substring(0, 2);
}
for (i=0;i<itemCount;i++){
if(itemNameList[i] != undefined && itemDescList[i] == 'empty' && tableNumList[i] == TableSu && itemTypeList[i] != '타이틀'){
var ChangeNumber = itemNameList[i].substring(1, itemNameList[i].length);
var ChangeCharter = itemNameList[i].substring(0, 1);
if(isNaN(ChangeNumber)){
ChangeNumber = itemNameList[i].substring(2, itemNameList[i].length);
ChangeCharter = itemNameList[i].substring(0, 2);
}
if(Charter == ChangeCharter){
var ItemExpr = (SetCell.itemExpr.value).toUpperCase();
if(ItemExpr.indexOf("^") < 0){
itemExprList[i] = ItemExpr.replace(eval('/'+Number+'/g'), ChangeNumber);
}else{
itemExprList[i] = ItemExpr;
}
itemTypeList[i] = SetCell.itemType.value; //숫자, 문자, 날짜 수직 설정
itemSizeList[i] = SetCell.itemSize.value; //셀 크기 수평 설정
reShowValue(i);
}
}
}
SetWin.style.visibility="hidden";
}
</script>
<script language='JavaScript'>
function saveform() {
dform.action = '/servlet/kr.co.kihyun.beans.totsys.doc.HttpDocRegister';
dform.target = '_self';
dform.submit();
}
function formTypeSetting(){
return true;
}
var isTotDoc = false;
function formTypeCheck(){
if(!isTotDoc){
alert("입력셀이 하나이상 존재해야됩니다. \n문서등록을 더이상 진행하실수 없습니다. ");
return;
}
if(exprCheck()) return; //수식에 오류가 있다면 정지해라~~
preview();
}
function formSubmit(){
if(!isTotDoc){
alert("입력셀이 하나이상 존재해야됩니다. \n문서등록을 더이상 진행하실수 없습니다. ");
return;
}
if(exprCheck()) return; //수식에 오류가 있다면 정지해라~~
var tableType = "";
for(var i=1; i<= <%=tableCount%> && <%=tableCount%> > 0; i++){
if(i != 1 )
tableType+=",";
tableType+=tableTypeList[i];
}
//dform.action = '/servlet/kr.co.kihyun.beans.totsys.doc.HttpDocRegister';
//dform.action = '/totsys/common/web/documents/tot_doc/inform_preview.jsp';
dform.action = '/servlet/kr.co.kihyun.beans.totsys.doc.HttpDocReFormConfig';
dform.target = '_self';
dform.tableTypes.value = tableType;
//alert(dform.tableTypes.value);
nextStep();
}
function beforeSubmit(){
if(!isTotDoc){
alert("입력셀이 하나이상 존재해야됩니다. \n문서등록을 더이상 진행하실수 없습니다. ");
return;
}
if(exprCheck()) return; //수식에 오류가 있다면 정지해라~~
//dform.action = '/servlet/kr.co.kihyun.beans.totsys.doc.HttpDocRegister';
dform.action = '/totsys/totper/mydocbox/regbox/doc_regist.jsp';
dform.target = '_self';
//beforeStep();
history.go(-2);
}
//수식 오류 checker
function exprCheck(){
var exprCount = itemExprList.length;
for(var i=0; i < exprCount; i++){
if(isErrorExpr(itemExprList[i], itemTypeList[i])){
return true;
}
}
}
function isErrorExpr(expr, type){
//SUM안에 +가 있는 경우 check
if(expr != ""){
var sumIndex = expr.indexOf("SUM");
var plusIndex = 0;
plusIndex += expr.indexOf("+");
plusIndex += expr.indexOf("-");
plusIndex += expr.indexOf("*");
plusIndex += expr.indexOf("/");
plusIndex += expr.indexOf("=");
if(sumIndex > -1 && plusIndex > -1){
alert(expr+" 수식이 잘못 되었습니다. 다시확인해 주세요. \n정의한 수식중 SUM()안에 '+', '-', '*', '/', '='가 있는지 다시 확인해 주세요. ");
return true;
}
//SUM안에 아이템이 하나만 존재할때..
var roundInStr;
var alphabet = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
if(sumIndex > -1){
roundInStr = expr.substring(sumIndex+3, expr.length);
var charCount = roundInStr.length;
var isErrorExpr = false;
for(var i=0; i < charCount; i++){
if(alphabet.indexOf(roundInStr.substring(i, i+1)) > -1){
if(isErrorExpr){
isErrorExpr = false;
break;
}else{
isErrorExpr = true;
}
}
}
}
if(isErrorExpr){
alert(expr+" 수식이 잘못 되었습니다. 다시확인해 주세요. \n정의한 수식중 SUM()안에 셀 이름이 하나만 있는지 확인해 주세요. ");
return true;
}
// 셀을 '숫자'로 선택하고, 계산식을 입력할 경우 입력가능한 문자외에는 등록하지 못하도록 체크한다. 2014.11.21 by YOUNGJUN,CHO
//alert(SetCell.itemType.value);
if (type === "숫자") {
// 아래 문자가 아닌 경우(정규식 앞에 ^ 으로 아닌 경우를 체크)가 존재할 경우 true 로 리턴.
// 영문 대문자 A-Z
// 숫자 0-9
// 괄호 ( )
// 사칙연산 + - * /
// 콜론 :
var regexp = /[^A-Z|0-9|\(|\)|\+|\-|\/|\*|\:]/;
//alert(regexp.test(expr));
if (regexp.test(expr) === true) {
alert(expr+" 수식이 잘못 되었습니다.\n\n셀을 '숫자'로 선택하신 경우에는 소수점을 사용할 수 없으며\n\r수식에 아래 문자만 사용할 수 있습니다.\n\n알파벳(대문자), 숫자, 괄호, 사칙연산기호(+,-,*,/), 콜론(:)");
return true;
}
}
}
//SUM없이 ','만 사용할때 사용불가
var comaIndex;
if(sumIndex == -1){
comaIndex = expr.indexOf(",");
if(comaIndex > -1){
alert(expr+" 수식이 잘못 되었습니다. 다시확인해 주세요. \n정의한 수식중 ','가 있는지 확인해주세요. \n','를 '+'로 바꿔 사용하면 정상적으로 작동합니다.");
return true;
}
}
}
function checkFormSize(formBytes, deptCount){
var maxSize = <%= MDoc.MAX_DOC_SIZE %>;
if((formBytes * deptCount/1024/1024) > maxSize){
alert("경고! 총보고시 "+maxSize+"M가 넘습니다. \n표가 여러개라면 표를 나누어 등록하는 것이 좋습니다. ");
}
}
</script>
<body style=''
onload="formTypeSetting();checkFormSize('<%= formBytes.length %>', '<%= deptCount %>');">
<form name="dform"
action="/servlet/kr.co.kihyun.beans.totsys.doc.HttpDocReFormConfig"
method="post"><input type="hidden" name="docID"
value="<%= docID %>"> <input type="hidden" name="docName"
value="<%= docName %>"> <input type="hidden" name="stDate"
value="<%= stDate %>"> <input type="hidden" name="edDate"
value="<%= edDate %>"> <input type="hidden" name="deptIDs"
value='<%= URLEncoder.encode(deptIDs, "UTF-8") %>'> <input
type="hidden" name="deptNames"
value='<%= URLEncoder.encode(deptNames, "UTF-8") %>'> <input
type="hidden" name="userIDs"
value='<%= URLEncoder.encode(userIDs, "UTF-8") %>'> <input
type="hidden" name="userNames"
value='<%= URLEncoder.encode(userNames, "UTF-8") %>'> <input
type="hidden" name="accAuth" value="<%= accAuth %>"> <input
type="hidden" name="repDocID" value="<%= repDocID %>"> <input
type="hidden" name="docGroupID" value="<%= docGroupID %>"> <input
type="hidden" name="isFromFormBox" value="<%= isFromFormBox %>">
<input type="hidden" name="tableCount" value="<%= tableCount %>">
<input type="hidden" name="isDynaTable" value="<%= isDynaTable %>">
<input type="hidden" name="mode" value="regist"> <input
type="hidden" name="tableDefines"> <input type="hidden"
name="itemNames"> <input type="hidden" name="tableNums">
<input type="hidden" name="colNums"> <input type="hidden"
name="rowNums"> <input type="hidden" name="itemSizes">
<input type="hidden" name="itemDescs"> <input type="hidden"
name="itemExprs"> <input type="hidden" name="itemTypes">
<input type="hidden" name="tableTypes"> <input type="hidden"
name="backDash" value="back"> <input type="hidden"
name="tableType" value="0"> <input type="hidden"
name="defItemSize" value="3"></form>
<tr>
<td height="31" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr height="10">
<td height="10"></td>
<td></td>
<td width="149"></td>
<td width="331"></td>
</tr>
<tr>
<td colspan="4">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top"
style="padding-top: 10; padding-bottom: 25; padding-left: 25; padding-right: 25;">
<!-------------------------------------- 업로드한 표 보기 start -------------------------------------->
<%= TableCreation.insertChartOrNumber(strTableInfo, tableTypes) %>
<!--------------------------------------- 업로드한 표 보기 end --------------------------------------->
</td>
</tr>
</table>
</td>
</tr>
<!---- 양식 셀 정의 끝 ---->
</table>
</td>
</tr>
<!---- 버튼(미리보기/취소) 시작 ---->
<tr>
<td align="center">
<table height="25" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><a href="#"><img onclick="beforeSubmit();"
src="/totsys/common/inc/documents/tot_doc/images/bt_pre.gif"
name="bt_pre" border="0"></a></td>
<td>&nbsp;</td>
<!--td><a href="#" ><img onclick="formTypeCheck();" src="/totsys/common/inc/documents/tot_doc/images/bt_showFirst.gif" name="bt_preview" border="0"></a></td-->
<td><a href="#"><img onclick="formSubmit();"
src="/totsys/common/inc/documents/tot_doc/images/bt_preview.gif"
name="bt_next" border="0"></a></td>
</tr>
</table>
</td>
</tr>
<script language='JavaScript'>
//onload시 자동 실행
//function configStart(){
{
for(i=0; i<itemCount; i++){
reShowValue(i);
}
}
function reShowValue(i){
if(itemTypeList[i] != '타이틀' && itemDescList[i] == "empty"){
isTotDoc = true; //입력셀이 하나라도 있는지..?
showValue(i);
}else{
closeValue(i);
itemExprList[i] = '';
}
}
</script>
<%
}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{
}
%>