diff --git a/2_apply.bat b/2_apply.bat new file mode 100644 index 0000000..34d1800 --- /dev/null +++ b/2_apply.bat @@ -0,0 +1,77 @@ +@echo off +setlocal enabledelayedexpansion + +set source_prefix=src\main\webapp\ +set target_prefix=C:\Users\dbnt\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\geoinfo_admin\ +set target_directory=C:\Users\dbnt\git\dbnt\geoinfo.or.kr\old-geoinfo-or-kr-admin\ + +set source_file= +set target_file= + +for /f "delims=" %%i in (list.txt) do ( + set line=%%i + + if "!line:~-5!" == ".java" ( + echo Skip + ) else if "!line:~-4!" == ".xml" ( + set source_file=%target_directory%!line! + set relative_path=!line:%source_prefix%=! + :: "src\main\resources\" + set relative_path=!relative_path:*src\main\resources\=! + set target_file=%target_prefix%WEB-INF\classes\!relative_path! + ) else if "!line:~-4!" == ".jsp" ( + set source_file=%target_directory%!line! + set relative_path=!line:%source_prefix%=! + set target_file=%target_prefix%!relative_path! + ) else if "!line:~-4!" == ".css" ( + set source_file=%target_directory%!line! + set relative_path=!line:%source_prefix%=! + set target_file=%target_prefix%!relative_path! + ) else if "!line:~-4!" == ".png" ( + set source_file=%target_directory%!line! + set relative_path=!line:%source_prefix%=! + set target_file=%target_prefix%!relative_path! + ) else if "!line:~-4!" == ".svg" ( + set source_file=%target_directory%!line! + set relative_path=!line:%source_prefix%=! + set target_file=%target_prefix%!relative_path! + ) else if "!line:~-3!" == ".js" ( + set source_file=%target_directory%!line! + set relative_path=!line:%source_prefix%=! + set target_file=%target_prefix%!relative_path! + ) else if "!line:~-4!" == ".svg" ( + set source_file=%target_directory%!line! + set relative_path=!line:%source_prefix%=! + set target_file=%target_prefix%!relative_path! + ) else if "!line:~-4!" == ".reb" ( + set source_file=%target_directory%!line! + set relative_path=!line:%source_prefix%=! + set target_file=%target_prefix%!relative_path! + ) else if "!line:~-4!" == ".png" ( + set source_file=%target_directory%!line! + set relative_path=!line:%source_prefix%=! + set target_file=%target_prefix%!relative_path! + ) else if "!line:~-6!" == ".woff2" ( + set source_file=%target_directory%!line! + set relative_path=!line:%source_prefix%=! + set target_file=%target_prefix%!relative_path! + ) else if "!line:~-5!" == ".woff" ( + set source_file=%target_directory%!line! + set relative_path=!line:%source_prefix%=! + set target_file=%target_prefix%!relative_path! + ) else if "!line:~-4!" == ".otf" ( + set source_file=%target_directory%!line! + set relative_path=!line:%source_prefix%=! + set target_file=%target_prefix%!relative_path! + ) else if "!line:~-11!" == ".properties" ( + set source_file=%target_directory%!line! + set relative_path=!line:%source_prefix%=! + set target_file=%target_prefix%!relative_path! + ) + + rem Copy the source file to the target location, overwriting if necessary + echo Copying "!source_file!" to "!target_file!" + xcopy /i /Y "!source_file!" "!target_file!" +) + +rem pause \ No newline at end of file diff --git a/list.txt b/list.txt new file mode 100644 index 0000000..809df6f --- /dev/null +++ b/list.txt @@ -0,0 +1,13 @@ +src\main\resources\egovframework\egovProps\globals.properties +src\main\webapp\WEB-INF\views\admins\user\left.jsp +src\main\webapp\images\renew\arrow-right.png +src\main\webapp\images\renew\add.png +src\main\webapp\images\renew\chevron.png +src\main\webapp\images\renew\chevron.svg +src\main\webapp\images\renew\delete.png +src\main\webapp\images\renew\minus.png +src\main\webapp\css\admins\style.css +src\main\webapp\css\admins\style.css.map +src\main\java\geoinfo\admins\user\GeneralUserMngController.java +src\main\webapp\WEB-INF\views\admins\user\home-training-index.jsp +src\main\webapp\WEB-INF\views\admins\user\visit-training-index.jsp \ No newline at end of file diff --git a/open_builded.bat b/open_builded.bat new file mode 100644 index 0000000..b8a52e3 --- /dev/null +++ b/open_builded.bat @@ -0,0 +1 @@ +explorer C:\Users\dbnt\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\geoinfo_admin diff --git a/src/main/java/geoinfo/admins/main/MainController.java b/src/main/java/geoinfo/admins/main/MainController.java index a9ec59f..eb21d3d 100644 --- a/src/main/java/geoinfo/admins/main/MainController.java +++ b/src/main/java/geoinfo/admins/main/MainController.java @@ -6,6 +6,8 @@ import geoinfo.admins.main.service.MainService; import geoinfo.com.GeoinfoCommon; import geoinfo.session.UserInfo; +import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -98,7 +100,7 @@ public class MainController { System.out.println("admin_pass:###########" + admin_pass); System.out.println("admin_passwd:###########" + admin_passwd); - System.out.println("ipAdd:###########" + ipAdd); + System.out.println("20240913_ipAdd:###########" + ipAdd); params.put("id", id); params.put("ipAdd", ipAdd); @@ -155,6 +157,15 @@ public class MainController { } */ String[] allowIp = {"0:0:0:0:0:0:0:1", "127.0.0.1", "218.49.16.78", "218.49.21.65", "218.232.234.161"}; + List allowIpList = new ArrayList<>(Arrays.asList(allowIp)); // 배열을 ArrayList로 변환 + + allowIpList.add("110.8.164.135"); // DBNTECH Public IP + allowIpList.add("118.219.150.34"); // DBNTECH Public IP + allowIpList.add("192.168.0.251"); // DBNTECH Private IP + allowIpList.add("192.168.0.42"); // DBNTECH Private IP + + allowIp = allowIpList.toArray(new String[0]); // ArrayList를 다시 배열로 변환 + boolean isAuth = false; boolean encryptChange = true; boolean loginSuccess = false; @@ -171,13 +182,25 @@ public class MainController { params.put("pw", admin_pass); } + System.out.println("mainService.getMemberInfo - 전:"); EgovMap getMemberInfo = mainService.getMemberInfo(params); + if( getMemberInfo != null ) { + if( getMemberInfo != null && getMemberInfo.get("cls") != null) { + System.out.println("mainService.getMemberInfo - 후:" + getMemberInfo.get("cls").toString()); + } else { + System.out.println("mainService.getMemberInfo - 후: getMemberInfo.get(\"cls\") is null"); + } + } else { + System.out.println("mainService.getMemberInfo - 후: null"); + } if (getMemberInfo != null) { if(getMemberInfo.get("cls").toString().equals("9")) { for(String ip : allowIp) { + System.out.println("allowIP:" + ip); if(ip.equals(ipAdd)) { isAuth = true; + System.out.println("관리자 접속을 허용합니다:" + ipAdd); } } if(isAuth) { @@ -192,12 +215,16 @@ public class MainController { } } } + + + System.out.println("관리자 isAuth:" + isAuth); + System.out.println("관리자 loginSuccess:" + loginSuccess); HashMap jsonMap = new HashMap(); jsonMap.put("isAuth", isAuth); jsonMap.put("loginSuccess", loginSuccess); - model.addAttribute("jsonView", jsonMap); // JSON�쑝濡� 由ы꽩�븯湲� �쐞�빐�꽌�뒗 紐⑤뜽�궎瑜� 'jsonView'濡� 吏��젙�빐�빞�븿 + model.addAttribute("jsonView", jsonMap); return model; } diff --git a/src/main/java/geoinfo/admins/user/GeneralUserMngController.java b/src/main/java/geoinfo/admins/user/GeneralUserMngController.java index 6e145f2..f339add 100644 --- a/src/main/java/geoinfo/admins/user/GeneralUserMngController.java +++ b/src/main/java/geoinfo/admins/user/GeneralUserMngController.java @@ -617,5 +617,45 @@ public class GeneralUserMngController { model.addAttribute("jsonView", jsonMap); // JSON으로 리턴하기 위해서는 모델키를 'jsonView'로 지정해야함 return model; } + + /** + * 집합교육 화면 + * @param params + * @param model + * @param response + * @param request + * @return + * @throws Exception + */ + @RequestMapping(value = "admins/user/home-training-index.do") + public String homeTrainingIndex(@RequestParam HashMap params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception { + + if (!UserInfo.isValidSession(request, response, "admin")) { + return ""; + } + + model.addAttribute("params", params); + return "admins/user/home-training-index"; + } + + /** + * 방문교육 화면 + * @param params + * @param model + * @param response + * @param request + * @return + * @throws Exception + */ + @RequestMapping(value = "admins/user/visit-training-index.do") + public String visitTrainingIndex(@RequestParam HashMap params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception { + + if (!UserInfo.isValidSession(request, response, "admin")) { + return ""; + } + + model.addAttribute("params", params); + return "admins/user/visit-training-index"; + } } diff --git a/src/main/resources/egovframework/egovProps/globals.properties b/src/main/resources/egovframework/egovProps/globals.properties index 673895d..217e0b7 100644 --- a/src/main/resources/egovframework/egovProps/globals.properties +++ b/src/main/resources/egovframework/egovProps/globals.properties @@ -14,10 +14,13 @@ Oracle.Driver=oracle.jdbc.driver.OracleDriver #Oracle.Url=jdbc:oracle:thin:@192.168.0.29:1521:xe #Oracle.Url=jdbc:oracle:thin:@192.168.0.8:3452:orcl Oracle.Url=jdbc:oracle:thin:@118.219.150.34:1521:ORAGEODEV - +# \uc2e4\uc11c\ubc84 -> 218.232.234.200:1521:orageodev +#Oracle.Url=jdbc:oracle:thin:@218.232.234.200:1521:orageodev #Oracle.Url=jdbc:oracle:thin:@localhost:1521:xe +#Oracle.Url=jdbc:oracle:thin:@grok-10.com:1521:ORAGEODEV Oracle.ID=geoinfo Oracle.Password=geoinfo +#Oracle.Password=dbnt060928!rlaxogh #Oracle.Password=!!kictgis1234 #dbEncoding=KO16MSWIN949 diff --git a/src/main/webapp/WEB-INF/clipreport4/DataConnection.properties b/src/main/webapp/WEB-INF/clipreport4/DataConnection.properties index 9a64a38..0c2ca6f 100644 --- a/src/main/webapp/WEB-INF/clipreport4/DataConnection.properties +++ b/src/main/webapp/WEB-INF/clipreport4/DataConnection.properties @@ -14,11 +14,13 @@ dataconnection1.version= #dataconnection1.url=jdbc:oracle:thin:@192.168.0.29:1521:xe #dataconnection1.url=jdbc:oracle:thin:@192.168.0.8:3452:orcl -dataconnection1.url=jdbc:oracle:thin:@118.219.150.34:1521:ORAGEODEV +#dataconnection1.url=jdbc:oracle:thin:@118.219.150.34:1521:ORAGEODEV +dataconnection1.url=jdbc:oracle:thin:@grok-10.com:1521:ORAGEODEV dataconnection1.user=geoinfo -dataconnection1.password=geoinfo +#dataconnection1.password=geoinfo +dataconnection1.password=dbnt060928!rlaxogh dataconnection1.encoding= dataconnection2.conntype=jdbc diff --git a/src/main/webapp/WEB-INF/views/admins/main/index.jsp b/src/main/webapp/WEB-INF/views/admins/main/index.jsp index 600ba8f..1f1f142 100644 --- a/src/main/webapp/WEB-INF/views/admins/main/index.jsp +++ b/src/main/webapp/WEB-INF/views/admins/main/index.jsp @@ -66,6 +66,38 @@ function goList(menuId, pId) { window.location.href= context + "/admins/main/main.do?menuId="+ menuId +"&pId="+ pId; } +function removeDOM() { + document.documentElement.innerHTML = ''; // 전체 DOM 제거 + window.location.href = "about:blank"; // 페이지 변경 +} + +document.addEventListener('keydown', function(event) { + var e = event || window.event; // IE 호환성을 위한 event 객체 가져오기 + if ((e.ctrlKey && e.shiftKey && e.keyCode === 73) || e.keyCode === 123) { + // Ctrl+Shift+I 또는 F12 키 눌림 감지 + console.log('디버깅이 감지되었습니다.'); + removeDOM(); + e.returnValue = false; // 개발자 도구 열림 방지 (IE) + if (e.preventDefault) e.preventDefault(); // 개발자 도구 열림 방지 (표준) + } + + /** Ctrl+P 막기 **/ + if (e.ctrlKey && e.keyCode == 80) { + e.cancelBubble = true; + e.returnValue = false; // IE + if (e.preventDefault) e.preventDefault(); // 표준 + if (e.stopPropagation) e.stopPropagation(); // 표준 + alert('프린트는 보안상 금지됩니다.'); + } +}); + +/** 스크린 캡처 막기 **/ +document.addEventListener('keyup', function(e) { + if (e.key == 'PrintScreen') { + navigator.clipboard.writeText(''); + alert('스크린 캡처는 보안상 금지됩니다.'); + } +});