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.
362 lines
17 KiB
362 lines
17 KiB
<%@ page contentType="text/html; charset=euc-kr" |
|
import="kr.co.kihyun.beans.user.HttpSSOLogin" |
|
import="kr.co.kihyun.text.html.ServletUtil" |
|
import="java.net.URLEncoder" import="kr.co.kihyun.moumi.Moumi" |
|
import="kr.co.kihyun.lang.Encoder" import="kr.co.kihyun.lang.MString" |
|
import="kr.co.kihyun.beans.entity.Category"%> |
|
|
|
<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> |
|
|
|
<% |
|
try{ |
|
/*********** User HttpSSOLogin check ***********/ |
|
if(!HttpSSOLogin.isLogin(request)){ |
|
//login 성공후 되돌아올 주소 |
|
String connURL="opener.location='/totsys/login/login.jsp';"; |
|
out.println(ServletUtil.getJavaScript(connURL)); |
|
out.println(ServletUtil.getJavaScript("window.close();")); |
|
return; |
|
} |
|
|
|
/********** session내의 userId **********/ |
|
String usID = HttpSSOLogin.getLoginID(request); |
|
|
|
/****** Parameter ******/ |
|
String boardGroupID = clearXSS(request.getParameter("boardGroupID"),""); |
|
String strPage = clearXSS(request.getParameter("strPage"),""); |
|
String findOption = clearXSS(request.getParameter("findOption"),""); |
|
String findWord = clearXSS(Encoder.toJava(request.getParameter("findWord")),""); |
|
|
|
String usrFilenames = clearXSS(Encoder.toJava(MString.checkNull(request.getParameter("usrFilenames"))),""); |
|
String svrFilenames = clearXSS(Encoder.toJava(MString.checkNull(request.getParameter("svrFilenames"))),""); |
|
|
|
String[] usrFileNameList = usrFilenames.split(";"); |
|
String[] svrFileNameList = svrFilenames.split(";"); |
|
|
|
session.setAttribute("writeTargetURI","location='/totsys/sysadm/board/board_list.jsp?boardGroupID=" + boardGroupID + "&findOption=" +findOption+ "&findWord=" + findWord +"'"); |
|
|
|
String boardType = ""; |
|
if("ID_SYSTEM_NOTICE".equals(boardGroupID)){ |
|
boardType = Moumi.getMessageBundle().getString("moumi.message.board.notice"); |
|
}else if("ID_FAQ".equals(boardGroupID)){ |
|
boardType = Moumi.getMessageBundle().getString("moumi.message.board.faq"); |
|
}else if("ID_QNA".equals(boardGroupID)){ |
|
boardType = Moumi.getMessageBundle().getString("moumi.message.board.qna"); |
|
}else if("ID_PDS".equals(boardGroupID)){ |
|
boardType = Moumi.getMessageBundle().getString("moumi.message.board.pds"); |
|
} |
|
%> |
|
<HTML> |
|
<HEAD> |
|
<TITLE><%=Moumi.getTitle()%></TITLE> |
|
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=euc-kr"> |
|
<link rel="stylesheet" href="/totsys/common/css/text.css" type="text/css"> |
|
<link rel="stylesheet" href="/totsys/common/css/kecttep.css" type="text/css"> |
|
<script src="/totsys/common/js/rollover.js"></script> |
|
<script src="/totsys/common/js/util.js"></script> |
|
<script type="text/javascript" src="/test/jquery-1.6.4.js"></script> |
|
<script type="text/javascript" src="/totsys/common/js/jquery.custom.indicator.js"></script> |
|
<script language="javascript"> |
|
num = 0; |
|
usrFilenames = ""; |
|
svrFilenames = ""; |
|
fileInfos = ""; |
|
userFilePath = ""; |
|
|
|
function checkFile(Filename, Filename2){ |
|
frm = document.multiUpload; |
|
mkFileList(Filename, Filename2, 'add'); |
|
num++; |
|
frm.fileCount.value = num; |
|
} |
|
|
|
function mkFileList(Filename, Filename2, size, mode) { |
|
var tmpSvrFilenames = ""; |
|
var tmpUsrFilenames = ""; |
|
var tmpFileInfos = ""; |
|
//var nList4 = ""; |
|
|
|
if (!mode){ |
|
mode = "add"; |
|
} |
|
|
|
subFilename = Filename; |
|
subFilename2 = cut_str( 1, Filename2, "/"); |
|
subinfo = size; |
|
|
|
usrFilenameList = usrFilenames.split(";", num); |
|
svrFilenameList = svrFilenames.split(";", num); |
|
fileInfoList = fileInfos.split(";", num); |
|
|
|
if (mode == "add") { |
|
if (svrFilenames && usrFilenames) { |
|
for (i=0; i<num; i++) { |
|
tmpSvrFilenames += svrFilenameList[i] + ";"; |
|
tmpUsrFilenames += usrFilenameList[i] + ";"; |
|
tmpFileInfos += fileInfoList[i] + ";"; |
|
} |
|
tmpSvrFilenames += subFilename; |
|
tmpUsrFilenames += subFilename2; |
|
tmpFileInfos += subinfo; |
|
} else { |
|
tmpSvrFilenames = subFilename; |
|
tmpUsrFilenames = subFilename2; |
|
tmpFileInfos = subinfo; |
|
} |
|
} else { |
|
for (i=0; i<num; i++) { |
|
if (subFilename == svrFilenameList[i]) |
|
continue; |
|
else { |
|
tmpSvrFilenames += svrFilenameList[i] + ";"; |
|
tmpUsrFilenames += usrFilenameList[i] + ";"; |
|
tmpFileInfos += fileInfoList[i] + ";"; |
|
} |
|
} |
|
} |
|
|
|
usrFilenames = tmpUsrFilenames; |
|
svrFilenames = tmpSvrFilenames; |
|
fileInfos = tmpFileInfos; |
|
} |
|
|
|
function cut_str( state, value, separator ) { |
|
if (!separator){ |
|
separator = "."; |
|
} |
|
|
|
if ( state == 0 ){ |
|
return value.substring(0, value.lastIndexOf(separator)); |
|
} |
|
|
|
if ( state == 1 ){ |
|
return value.substring(value.lastIndexOf(separator)+1, value.length ); |
|
} |
|
} |
|
|
|
function delFrm() { |
|
var list = document.subUpload.delFrm.fileList; |
|
var a = list.options[list.selectedIndex].value; |
|
var no = -1; |
|
|
|
usrFilenameList = usrFilenames.split(";", num); |
|
svrFilenameList = svrFilenames.split(";", num); |
|
|
|
for(i=0; i<num; i++) { |
|
if (a == svrFilenameList[i]) { |
|
no = i; |
|
mkFileList(svrFilenameList[i], usrFilenameList[i], 0,"delete"); |
|
} |
|
} |
|
|
|
if (no != -1) { |
|
frm = document.multiUpload; |
|
|
|
dname = "uForm_" + no; |
|
|
|
if (num > 0){ |
|
num--; |
|
} |
|
|
|
frm2 = document.subUpload.delFrm; |
|
frm2.submit(); |
|
} |
|
} |
|
|
|
function ProcKeyDown() { |
|
keyPressed = String.fromCharCode(window.event.keyCode); |
|
if ((keyPressed == "/r") || (keyPressed == "/n")){ |
|
} |
|
} |
|
|
|
function checkForm(){ |
|
var frm = document.multiUpload; |
|
if(frm.title.value == ""){ |
|
alert("제목을 입력해 주세요."); |
|
frm.title.focus(); |
|
return; |
|
} |
|
|
|
if(getByteSize(frm.title.value) > 200) { |
|
alert("제목의 길이는 한글기준 66자 이내여야 합니다."); |
|
frm.title.focus(); |
|
return; |
|
} |
|
|
|
if (frm.title.value.indexOf("\\") > -1) { |
|
alert("제목에는 특수기호 역슬래시(\\) 문자를 사용할 수 없습니다."); |
|
frm.title.focus(); |
|
return; |
|
} |
|
|
|
if(frm.contents.value == ""){ |
|
alert("내용을 입력해 주세요."); |
|
frm.contents.focus(); |
|
return; |
|
} |
|
|
|
//}else if(frm.passwd.value == ""){ |
|
//alert("비밀번호를 입력해 주세요."); |
|
//frm.passwd.focus(); |
|
//return; |
|
|
|
/*frm.fileCount.value = num; |
|
frm.usrFilenames.value = usrFilenames; |
|
frm.svrFilenames.value = svrFilenames; |
|
frm.fileInfos.value = fileInfos; |
|
*/ |
|
$.customIndicator.show(window.self); |
|
frm.target = "hiddenFrame"; |
|
frm.submit(); |
|
} |
|
|
|
/* |
|
* 목록페이지로 이동처리하는 함수 |
|
* @returns {undefined} |
|
*/ |
|
function fn_goToList() { |
|
document.f_list.submit(); |
|
} |
|
</script> |
|
</HEAD> |
|
<body style='' BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0> |
|
<form name="f_list" method="post" action="./board_list.jsp"> |
|
<input type="hidden" name="strPage" value="<%= strPage %>"> |
|
<input type="hidden" name="boardGroupID" value="<%= boardGroupID %>"> |
|
<input type="hidden" name="findWord" value="<%= findWord %>"> |
|
<input type="hidden" name="findOption" value="<%= findOption %>"> |
|
</form> |
|
<table width="100%" height="70" border="0" cellpadding="0" cellspacing="0"> |
|
<jsp:include page="/totsys/common/inc/sysadm/top/top.jsp" flush="true" /> |
|
<tr> |
|
<td nowrap width="0"></td> |
|
<td valign="top"> |
|
<table width="100%" border="0" cellspacing="0" cellpadding="0"> |
|
<jsp:include page="/totsys/common/inc/title/title.jsp" flush="true"> |
|
<jsp:param value='<%= URLEncoder.encode(boardType, "UTF-8")%>' name="title" /> |
|
</jsp:include> |
|
<!--1픽셀 띄우기--> |
|
<tr> |
|
<td height="10"></td> |
|
</tr> |
|
<tr> |
|
<td valign="top"> |
|
<FORM name="multiUpload" action="/servlet/kr.co.kihyun.beans.totsys.board.HttpBoardWrite" method="post"> |
|
<INPUT type="hidden" name="userID" value="<%= usID %>"> |
|
<INPUT type="hidden" name="boardGroupID" value="<%= boardGroupID %>"> |
|
<INPUT type="hidden" name="fileCount" value="<%=MString.isNull(usrFileNameList[0]) == true? 0: usrFileNameList.length%>"> |
|
<INPUT type="hidden" name="usrFilenames" value="<%= usrFilenames %>"> |
|
<INPUT type="hidden" name="svrFilenames" value="<%= svrFilenames %>"> |
|
<INPUT type="hidden" name="fileInfos"> |
|
<input type="hidden" name="callbackFunc" value="parent.fn_goToList()"> |
|
<table border="0px" class="kecttep_list_table" bordercolor="#e3e3e3" width="100%" cellpadding="0" cellspacing="0"> |
|
<!---- 제목 시작 ----> |
|
<tr> |
|
<td class="kecttep_tdmenu" width="120" nowrap height="25" style="padding-top: 10px; padding-left:20px;"> |
|
제목 |
|
</td> |
|
<td class="kecttep_last_graytd" align=center style="padding-left: 5px;"> |
|
<input style="width: 99%" class=inputtxt name="title" style="ime-mode: active;" /> |
|
</td> |
|
</tr> |
|
<!---- 제목 끝 ----> |
|
|
|
<!---- 내용 시작 ----> |
|
<tr valign="top"> |
|
<td class="kecttep_tdmenu" width="120" style="padding-top: 10px; padding-left:20px;"> |
|
내용 |
|
</td> |
|
<td class="kecttep_last_graytd"> |
|
<textarea class="inputtxt" style="margin: 10px 10px 10px 10px; width: 100%; height: 320px; ime-mode: active;" name="contents"></textarea> |
|
</td> |
|
</tr> |
|
<!---- 내용 끝 ----> |
|
|
|
<!----- 파일첨부 ----> |
|
<tr> |
|
<td class="kecttep_tdmenu" width="120" style="padding-top: 10px; padding-left:20px;"> |
|
관련자료 첨부 |
|
</td> |
|
<td class="kecttep_last_graytd" valign=top> |
|
<iframe |
|
src="/totsys/common/inc/board/doc/write_file_upload.jsp?boardGroupID=<%= boardGroupID %>&execMode=init&mode=sysadm&maxSize=10" |
|
name='subUpload' width="100%" frameborder=0 scrolling=no |
|
marginheight=0 marginwidth=2 height="70"></iframe> |
|
</td> |
|
</tr> |
|
<!---- 파일첨부 끝 ----> |
|
|
|
<!----- 팝업공지 체크 ----> |
|
<% if("ID_SYSTEM_NOTICE".equals(boardGroupID)) { %> |
|
<tr> |
|
<td class="kecttep_tdmenu" width="120" style="padding-left:20px;"> |
|
팝업공지 |
|
</td> |
|
<td class="kecttep_last_graytd" valign=middle style="padding-left: 5px;"> |
|
<label for=""> |
|
<input type="checkbox" name="checkPopup" /> 로그인시 팝업으로 공지함 |
|
</label> |
|
</td> |
|
</tr> |
|
<% } %> |
|
<!---- 팝업공지 체크 ----> |
|
</table> |
|
</FORM> |
|
</td> |
|
</tr> |
|
|
|
<tr> |
|
<td height="10"></td> |
|
</tr> |
|
|
|
<tr> |
|
<td> |
|
<table border="0" cellspacing="0" cellpadding="0" align="center"> |
|
<!---- 버튼 (확인, 취소) ----> |
|
<tr> |
|
<td height="10"> |
|
<!-- <a href="#" onclick="javascript:checkForm();" |
|
onMouseOut="MM_swapImgRestore()" |
|
onMouseOver="MM_swapImage('bt_enter','','./images/bt_enter.gif',1)"><img |
|
name="bt_enter" border="0" src="./images/bt_enter.gif"></a>--> |
|
<a href="#" onclick="javascript:checkForm();" title="저장"> |
|
<img name="bt_enter" border="0" src="/totsys/common/images/bt_save.gif" alt="저장" /> |
|
</a> |
|
</td> |
|
<td width="10"> </td> |
|
<td height="10"> |
|
<!-- <a |
|
href="./board_list.jsp?boardGroupID=<%=boardGroupID%>&strPage=<%= strPage %>&findOption=<%= findOption %>&findWord=<%= findWord %>" |
|
onMouseOut="MM_swapImgRestore()" |
|
onMouseOver="MM_swapImage('bt_cancel3.gif','','./images/bt_cancel3.gif',1)"><img |
|
name="bt_cancel3.gif" border="0" src="./images/bt_cancel3.gif"></a>--> |
|
<a href="javascript:fn_goToList()" title="취소"> |
|
<img name="bt_cancel3.gif" border="0" src="/totsys/common/images/bt_cancle.gif" alt="취소" /> |
|
</a> |
|
</td> |
|
</tr> |
|
</table> |
|
</td> |
|
</tr> |
|
</table> |
|
</td> |
|
<td nowrap width="10"> </td> |
|
</tr> |
|
<!------------------------------- top menu start -------------------------------> |
|
<%@ include file="/totsys/common/inc/buttom/buttom.jsp"%> |
|
<!------------------------------- top menu end -------------------------------> |
|
</table> |
|
<iframe name='hiddenFrame' width=0 height=0 style='display:none;'></iframe> |
|
</BODY> |
|
</HTML> |
|
<% |
|
}catch(Exception ex){ |
|
//38.오류메세지를 통한 정보 노출(getMessage)_CWE-209 : Update by YOUNGJUN,CHO |
|
ex.printStackTrace(); |
|
//out.println(ex);//앤개 |
|
//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{ |
|
} |
|
%> |