--- src/main/java/kcc/let/sym/log/clg/service/EgovLoginLogService.java
+++ src/main/java/kcc/let/sym/log/clg/service/EgovLoginLogService.java
... | ... | @@ -74,6 +74,8 @@ |
| 74 | 74 |
|
| 75 | 75 |
public void deleteLogMethod(String id) throws Exception; |
| 76 | 76 |
|
| 77 |
+ public void logInsertAdminSecurityLogin(LoginLog loginLog) throws Exception; |
|
| 78 |
+ |
|
| 77 | 79 |
public LoginLog selectBeforeAmdinLog(LoginLog loginLog) throws Exception; |
| 78 | 80 |
|
| 79 | 81 |
public List<LoginLog> selectWebLogList(LoginLog loginLog) throws Exception; |
--- src/main/java/kcc/let/sym/log/clg/service/impl/EgovLoginLogServiceImpl.java
+++ src/main/java/kcc/let/sym/log/clg/service/impl/EgovLoginLogServiceImpl.java
... | ... | @@ -223,6 +223,12 @@ |
| 223 | 223 |
} |
| 224 | 224 |
|
| 225 | 225 |
@Override |
| 226 |
+ public void logInsertAdminSecurityLogin(LoginLog loginLog) throws Exception {
|
|
| 227 |
+ loginLog.setLogId(egovAdminLogIdGnrService.getNextStringId()); |
|
| 228 |
+ loginLogDAO.logInsertAdminSecurityLogin(loginLog); |
|
| 229 |
+ } |
|
| 230 |
+ |
|
| 231 |
+ @Override |
|
| 226 | 232 |
public LoginLog selectBeforeAmdinLog(LoginLog loginLog) throws Exception {
|
| 227 | 233 |
return loginLogDAO.selectBeforeAmdinLog(loginLog); |
| 228 | 234 |
} |
--- src/main/java/kcc/let/sym/log/clg/service/impl/LoginLogDAO.java
+++ src/main/java/kcc/let/sym/log/clg/service/impl/LoginLogDAO.java
... | ... | @@ -135,6 +135,10 @@ |
| 135 | 135 |
delete("LoginLogDAO.deleteLogMethod", id);
|
| 136 | 136 |
} |
| 137 | 137 |
|
| 138 |
+ public void logInsertAdminSecurityLogin(LoginLog loginLog) throws Exception{
|
|
| 139 |
+ insert("LoginLogDAO.logInsertAdminSecurityLogin", loginLog);
|
|
| 140 |
+ } |
|
| 141 |
+ |
|
| 138 | 142 |
public LoginLog selectBeforeAmdinLog(LoginLog loginLog) throws Exception{
|
| 139 | 143 |
return (LoginLog)select("LoginLogDAO.selectBeforeAmdinLog", loginLog);
|
| 140 | 144 |
} |
--- src/main/java/kcc/let/uat/uia/web/EgovLoginController.java
+++ src/main/java/kcc/let/uat/uia/web/EgovLoginController.java
... | ... | @@ -634,6 +634,11 @@ |
| 634 | 634 |
httpSession.setAttribute("loginId", user.getId()); // 자동완성 공통으로 쓰기위해
|
| 635 | 635 |
httpSession.setAttribute("esntlId", user.getPassword());
|
| 636 | 636 |
} |
| 637 |
+ // 최종접속일시 조회용 로그 |
|
| 638 |
+ loginLog.setLoginId(uniqId); |
|
| 639 |
+ loginLog.setLoginIp(ip); |
|
| 640 |
+ loginLog.setUrl(request.getRequestURI()); |
|
| 641 |
+ loginLogService.logInsertAdminSecurityLogin(loginLog); |
|
| 637 | 642 |
} |
| 638 | 643 |
|
| 639 | 644 |
/* |
--- src/main/resources/egovframework/sqlmap/let/sym/log/clg/EgovLoginLog_SQL_Mysql.xml
+++ src/main/resources/egovframework/sqlmap/let/sym/log/clg/EgovLoginLog_SQL_Mysql.xml
... | ... | @@ -487,13 +487,32 @@ |
| 487 | 487 |
</delete> |
| 488 | 488 |
|
| 489 | 489 |
<!-- 이전 관리자 로그인 로그 상세 조회 --> |
| 490 |
+ <!-- 관리자 로그인 로그 등록 (최종접속일시 조회용) --> |
|
| 491 |
+ <insert id="LoginLogDAO.logInsertAdminSecurityLogin" parameterClass="loginLog"> |
|
| 492 |
+ INSERT INTO LETTNADMINLOG |
|
| 493 |
+ ( ADMINLOG_ID |
|
| 494 |
+ , CONECT_ID |
|
| 495 |
+ , CONECT_IP |
|
| 496 |
+ , PROGRM_FILE_NM |
|
| 497 |
+ , MENU_NM |
|
| 498 |
+ , URL |
|
| 499 |
+ , CREAT_DT ) |
|
| 500 |
+ VALUES ( #logId# |
|
| 501 |
+ , #loginId# |
|
| 502 |
+ , #loginIp# |
|
| 503 |
+ , 'selectActionSecurityLogin' |
|
| 504 |
+ , '관리자로그인' |
|
| 505 |
+ , #url# |
|
| 506 |
+ , now()) |
|
| 507 |
+ </insert> |
|
| 508 |
+ |
|
| 490 | 509 |
<select id="LoginLogDAO.selectBeforeAmdinLog" parameterClass="loginLog" resultClass="loginLog"> |
| 491 | 510 |
/* 임시.*NOT_SQL_LOG.* */ |
| 492 | 511 |
SELECT DATE_FORMAT(A.CREAT_DT, '%Y-%m-%d %H:%i' ) creatDt FROM LETTNADMINLOG A |
| 493 | 512 |
WHERE A.CONECT_ID = #conectId# |
| 494 | 513 |
AND A.PROGRM_FILE_NM = 'selectActionSecurityLogin' |
| 495 | 514 |
ORDER BY A.CREAT_DT DESC |
| 496 |
- LIMIT 1 |
|
| 515 |
+ LIMIT 1, 1 |
|
| 497 | 516 |
</select> |
| 498 | 517 |
|
| 499 | 518 |
|
--- src/main/webapp/WEB-INF/jsp/cmm/uss/umt/EgovUserSelectUpdt.jsp
+++ src/main/webapp/WEB-INF/jsp/cmm/uss/umt/EgovUserSelectUpdt.jsp
... | ... | @@ -183,6 +183,32 @@ |
| 183 | 183 |
//} |
| 184 | 184 |
} |
| 185 | 185 |
|
| 186 |
+// 서명이미지 미리보기 (저장된 파일) |
|
| 187 |
+function fn_sign_preview(atchFileId, fileSn) {
|
|
| 188 |
+ var src = "<c:url value='/cmm/fms/getImage.do'/>?atchFileId=" + encodeURIComponent(atchFileId) + "&fileSn=" + encodeURIComponent(fileSn); |
|
| 189 |
+ fn_open_image_popup(src); |
|
| 190 |
+} |
|
| 191 |
+ |
|
| 192 |
+// 이미지 미리보기 팝업 (새로 첨부한 파일은 ncms_common.js 의 previewNewFile 에서 호출) |
|
| 193 |
+// 화면 중앙 레이어로 표시. 바깥 영역 클릭, 닫기 버튼, ESC 로 닫힘 |
|
| 194 |
+function fn_open_image_popup(src) {
|
|
| 195 |
+ fn_close_image_popup(); |
|
| 196 |
+ var $layer = $('<div id="signPreviewLayer" style="position:fixed;top:0;left:0;right:0;bottom:0;z-index:10000;background:rgba(0,0,0,0.6);display:flex;align-items:center;justify-content:center;"></div>');
|
|
| 197 |
+ var $box = $('<div style="position:relative;background:#fff;padding:20px;border-radius:8px;max-width:90vw;max-height:90vh;box-shadow:0 4px 20px rgba(0,0,0,0.3);"></div>');
|
|
| 198 |
+ var $close = $('<button type="button" title="닫기" style="position:absolute;top:-14px;right:-14px;width:32px;height:32px;border-radius:50%;border:none;background:#333;color:#fff;font-size:18px;line-height:32px;cursor:pointer;">×</button>');
|
|
| 199 |
+ var $img = $('<img alt="서명이미지" style="display:block;max-width:calc(90vw - 40px);max-height:calc(90vh - 40px);">').attr('src', src);
|
|
| 200 |
+ $box.append($close).append($img).on('click', function(e){ e.stopPropagation(); });
|
|
| 201 |
+ $close.on('click', fn_close_image_popup);
|
|
| 202 |
+ $layer.append($box).on('click', fn_close_image_popup);
|
|
| 203 |
+ $('body').append($layer);
|
|
| 204 |
+ $(document).on('keydown.signPreview', function(e){ if (e.keyCode == 27) fn_close_image_popup(); });
|
|
| 205 |
+} |
|
| 206 |
+ |
|
| 207 |
+function fn_close_image_popup() {
|
|
| 208 |
+ $('#signPreviewLayer').remove();
|
|
| 209 |
+ $(document).off('keydown.signPreview');
|
|
| 210 |
+} |
|
| 211 |
+ |
|
| 186 | 212 |
function updateMemberAjax(){
|
| 187 | 213 |
var url = "/uss/umt/user/EgovUserSelectUpdtAjax.do"; |
| 188 | 214 |
var data = new FormData(document.userManageVO); |
... | ... | @@ -410,6 +436,8 @@ |
| 410 | 436 |
<input type="hidden" name="userTyForPassword" value="<c:out value='${userManageVO.userTy}'/>" />
|
| 411 | 437 |
|
| 412 | 438 |
<input type="hidden" name="limitcount" value="1" /><!-- 최대 업로드 파일갯수 --> |
| 439 |
+ <input type="hidden" name="allrowFileExtsn" value="jpg,jpeg,png,gif" /><!-- 서명이미지 허용 확장자 --> |
|
| 440 |
+ <input type="hidden" name="filePreviewYn" value="Y" /><!-- 첨부 시 이미지 미리보기 버튼 노출 --> |
|
| 413 | 441 |
|
| 414 | 442 |
<div class="content_title"> |
| 415 | 443 |
<h3>관리자수정</h3> |
... | ... | @@ -529,10 +557,10 @@ |
| 529 | 557 |
</tr> |
| 530 | 558 |
<tr> |
| 531 | 559 |
<th><span class="">서명이미지</span></th> |
| 532 |
- <td> |
|
| 560 |
+ <td class="upload_area"> |
|
| 533 | 561 |
<div class="file_upload_wrap"> |
| 534 | 562 |
<div class="file_top"> |
| 535 |
- <input type="file" id="file_temp" name="file_temp" class="uploadFile" style="display:none"/> |
|
| 563 |
+ <input type="file" id="file_temp" name="file_temp" class="uploadFile" accept=".jpg,.jpeg,.png,.gif" style="display:none"/> |
|
| 536 | 564 |
<button type="button" id="filebutton" class="btn medium line primary btn_add_file">파일 첨부하기</button> |
| 537 | 565 |
</div> |
| 538 | 566 |
|
... | ... | @@ -587,8 +615,11 @@ |
| 587 | 615 |
<tr class="item_<c:out value='${fileList.atchFileId}' />_<c:out value='${fileList.fileSn}' /> uploaded_obj">
|
| 588 | 616 |
<input type="hidden" name="fileSize" class="item_file_size" value="${fileList.fileSize}">
|
| 589 | 617 |
<td class="td_filename"> |
| 590 |
- <!-- <img src="/direct/img/upload_hwp_img.png" alt="" /> --> |
|
| 591 | 618 |
<span class="file_name_text"><c:out value='${fileList.orignlFileNm}' /></span>
|
| 619 |
+ <c:set var="signExt" value="${fn:toLowerCase(fileList.fileExtsn)}"/>
|
|
| 620 |
+ <c:if test="${signExt eq 'jpg' or signExt eq 'jpeg' or signExt eq 'png' or signExt eq 'gif'}">
|
|
| 621 |
+ <button type="button" class="btn line primary ssmall" style="margin-left:10px;" onclick="fn_sign_preview('<c:out value='${fileList.atchFileId}'/>', '<c:out value='${fileList.fileSn}'/>'); return false;">미리보기</button>
|
|
| 622 |
+ </c:if> |
|
| 592 | 623 |
</td> |
| 593 | 624 |
<td class="td_filesort"> |
| 594 | 625 |
<span class="file_filesort_text" value="<c:out value="${fileList.fileExtsn}"/>"><c:out value="${fileList.fileExtsn}"/></span>
|
--- src/main/webapp/js/ncms_common.js
+++ src/main/webapp/js/ncms_common.js
... | ... | @@ -228,7 +228,7 @@ |
| 228 | 228 |
} |
| 229 | 229 |
|
| 230 | 230 |
if(allrowFileExtsn != undefined && allrowFileExtsn != ""){
|
| 231 |
- if(allrowFileExtsn.toLowerCase().indexOf(files[i].name.split(".")[1].toLowerCase()) < 0 ){
|
|
| 231 |
+ if(allrowFileExtsn.toLowerCase().indexOf(files[i].name.split(".").pop().toLowerCase()) < 0 ){
|
|
| 232 | 232 |
alert(allrowFileExtsn.toUpperCase() +" 파일 형식만 업로드 가능합니다."); |
| 233 | 233 |
return ; |
| 234 | 234 |
} |
... | ... | @@ -256,6 +256,18 @@ |
| 256 | 256 |
} |
| 257 | 257 |
} |
| 258 | 258 |
|
| 259 |
+/* 새로 첨부한 이미지 미리보기 (저장 전, 브라우저 메모리의 파일을 띄움) */ |
|
| 260 |
+var _previewUrls = {};
|
|
| 261 |
+function previewNewFile(idx){
|
|
| 262 |
+ var url = _previewUrls[idx]; |
|
| 263 |
+ if (!url) return; |
|
| 264 |
+ if (typeof fn_open_image_popup === 'function') {
|
|
| 265 |
+ fn_open_image_popup(url); |
|
| 266 |
+ } else {
|
|
| 267 |
+ window.open(url, "filePreview", "width=600,height=400,resizable=yes,scrollbars=yes"); |
|
| 268 |
+ } |
|
| 269 |
+} |
|
| 270 |
+ |
|
| 259 | 271 |
function sendFileToServer(formData, obj , fileObj, _fileIdx) |
| 260 | 272 |
{
|
| 261 | 273 |
$('.no_img_box').hide(); //list 박스 형식 변경
|
... | ... | @@ -264,7 +276,13 @@ |
| 264 | 276 |
var tt = ""; |
| 265 | 277 |
list_html += '<tr class="item_'+tt+' uploaded_obj">'; |
| 266 | 278 |
|
| 267 |
- list_html += '<td class="td_filename file_name"><img src="'+getfile_img(fileObj.name)+'" alt="파일 이미지"><span class="file_name_text">'+fileObj.name+'</span></td>'; |
|
| 279 |
+ list_html += '<td class="td_filename file_name"><span class="file_name_text">'+fileObj.name+'</span>'; |
|
| 280 |
+ //이미지 미리보기 버튼 (페이지에 filePreviewYn=Y 인 경우만) |
|
| 281 |
+ if ($("input[name=filePreviewYn]").val() == "Y" && /\.(jpe?g|png|gif)$/i.test(fileObj.name) && window.URL) {
|
|
| 282 |
+ _previewUrls[_fileIdx] = URL.createObjectURL(fileObj); |
|
| 283 |
+ list_html += '<button type="button" class="btn line primary ssmall" style="margin-left:10px;" onclick="previewNewFile('+_fileIdx+'); return false;">미리보기</button>';
|
|
| 284 |
+ } |
|
| 285 |
+ list_html += '</td>'; |
|
| 268 | 286 |
//파일 확장자 추가 |
| 269 | 287 |
list_html += '<td class="td_filesort file_extension">'+getFileExtension(fileObj.name)+'</td>'; |
| 270 | 288 |
list_html += '<td class="td_filesize file_size"><p class="file_size_text" value='+fileObj.size+'>'+getStrFileSize(fileObj.size)+'</p></td>'; |
... | ... | @@ -344,9 +362,6 @@ |
| 344 | 362 |
$('.no_img_box').hide(); //list 박스 형식 변경
|
| 345 | 363 |
$('.file_list_div').show();
|
| 346 | 364 |
|
| 347 |
- $('.file_name_text').each(function(index, item){
|
|
| 348 |
- $(this).parent().find('img').attr('src', getfile_img($(this).text())) ; //이미지 변경
|
|
| 349 |
- }); |
|
| 350 | 365 |
$('.file_size_text').each(function(index, item){
|
| 351 | 366 |
$(this).text(getStrFileSize($(this).attr('value')))
|
| 352 | 367 |
}); |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?