+++ src/main/java/itn/let/cert/ip/service/CertIpService.java
... | ... | @@ -0,0 +1,34 @@ |
| 1 | +package itn.let.cert.ip.service; | |
| 2 | + | |
| 3 | +import java.util.List; | |
| 4 | + | |
| 5 | +import itn.let.lett.service.LetterVO; | |
| 6 | +import itn.let.mail.service.StatusResponse; | |
| 7 | +import itn.let.mjo.addr.service.AddrVO; | |
| 8 | +import itn.let.mjo.msg.service.MjonMsgVO; | |
| 9 | +import itn.let.sym.site.service.JoinSettingVO; | |
| 10 | +import itn.let.uat.uia.service.MberCertPhoneVO; | |
| 11 | +import itn.let.uat.uia.web.SendLogVO; | |
| 12 | +import itn.let.uss.umt.service.MberManageVO; | |
| 13 | + | |
| 14 | +public interface CertIpService { | |
| 15 | + | |
| 16 | +// public List<MberCertPhoneVO> selectMberCertPhoneList(String userId); | |
| 17 | +// | |
| 18 | +// public StatusResponse insertMberCertPhoneInfo(MberCertPhoneVO mberCertPhoneVO); | |
| 19 | +// | |
| 20 | +// public StatusResponse deleteCertPhoneInfo(MberCertPhoneVO mberCertPhoneVO); | |
| 21 | +// | |
| 22 | +// public List<MberCertPhoneVO> selectMberCertPhoneListVO(MberCertPhoneVO mberCertPhoneVO); | |
| 23 | +// | |
| 24 | +// public StatusResponse findByCertPhoneInfo(MberCertPhoneVO mberCertPhoneVO); | |
| 25 | +// | |
| 26 | +// public StatusResponse updateMberCertPhoneInfo(MberCertPhoneVO mberCertPhoneVO); | |
| 27 | + | |
| 28 | + public StatusResponse selectMberCertIpList(MberCertIpVO mberCertPhoneVO); | |
| 29 | + | |
| 30 | + public StatusResponse insertCertIp(MberCertIpVO mberCertIpVO); | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | +} |
+++ src/main/java/itn/let/cert/ip/service/MberCertIpVO.java
... | ... | @@ -0,0 +1,71 @@ |
| 1 | +package itn.let.cert.ip.service; | |
| 2 | + | |
| 3 | +import itn.let.uss.umt.service.UserDefaultVO; | |
| 4 | + | |
| 5 | +/** | |
| 6 | + * | |
| 7 | + * @author : 이호영 | |
| 8 | + * @fileName : MberCertPhoneVO.java | |
| 9 | + * @date : 2024.11.18 | |
| 10 | + * @description : 발신번호 lettngnrlmber_cert_ip 관련 vo | |
| 11 | + * =========================================================== | |
| 12 | + * DATE AUTHOR NOTE | |
| 13 | + * ----------------------------------------------------------- * | |
| 14 | + * 2024.11.18 이호영 최초 생성 | |
| 15 | + * | |
| 16 | + * | |
| 17 | + * | |
| 18 | + */ | |
| 19 | +public class MberCertIpVO extends UserDefaultVO{ | |
| 20 | + | |
| 21 | + | |
| 22 | + /** | |
| 23 | + * @description : | |
| 24 | + */ | |
| 25 | + private static final long serialVersionUID = 1L; | |
| 26 | + | |
| 27 | + | |
| 28 | + private String mberId; | |
| 29 | + private String certIp; | |
| 30 | + private String certMemo; | |
| 31 | + private String certUseYn; | |
| 32 | + private String certMbtlnum; | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + public String getMberId() { | |
| 39 | + return mberId; | |
| 40 | + } | |
| 41 | + public void setMberId(String mberId) { | |
| 42 | + this.mberId = mberId; | |
| 43 | + } | |
| 44 | + public String getCertIp() { | |
| 45 | + return certIp; | |
| 46 | + } | |
| 47 | + public void setCertIp(String certIp) { | |
| 48 | + this.certIp = certIp; | |
| 49 | + } | |
| 50 | + public String getCertMemo() { | |
| 51 | + return certMemo; | |
| 52 | + } | |
| 53 | + public void setCertMemo(String certMemo) { | |
| 54 | + this.certMemo = certMemo; | |
| 55 | + } | |
| 56 | + public String getCertUseYn() { | |
| 57 | + return certUseYn; | |
| 58 | + } | |
| 59 | + public void setCertUseYn(String certUseYn) { | |
| 60 | + this.certUseYn = certUseYn; | |
| 61 | + } | |
| 62 | + public String getCertMbtlnum() { | |
| 63 | + return certMbtlnum; | |
| 64 | + } | |
| 65 | + public void setCertMbtlnum(String certMbtlnum) { | |
| 66 | + this.certMbtlnum = certMbtlnum; | |
| 67 | + } | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | +} |
+++ src/main/java/itn/let/cert/ip/service/impl/CertIpDAO.java
... | ... | @@ -0,0 +1,32 @@ |
| 1 | +package itn.let.cert.ip.service.impl; | |
| 2 | + | |
| 3 | +import java.util.List; | |
| 4 | + | |
| 5 | +import org.springframework.stereotype.Repository; | |
| 6 | + | |
| 7 | +import egovframework.rte.psl.dataaccess.EgovAbstractDAO; | |
| 8 | +import itn.let.cert.ip.service.MberCertIpVO; | |
| 9 | +import itn.let.lett.service.LetterVO; | |
| 10 | +import itn.let.mail.service.StatusResponse; | |
| 11 | +import itn.let.mjo.addr.service.AddrVO; | |
| 12 | +import itn.let.mjo.msg.service.MjonMsgVO; | |
| 13 | +import itn.let.mjo.msgdata.service.MjonMsgDataVO; | |
| 14 | +import itn.let.sym.site.service.JoinSettingVO; | |
| 15 | +import itn.let.uat.uia.service.MberCertPhoneVO; | |
| 16 | +import itn.let.uat.uia.web.SendLogVO; | |
| 17 | +import itn.let.uss.umt.service.MberManageVO; | |
| 18 | + | |
| 19 | +@Repository("CertIpDAO") | |
| 20 | +public class CertIpDAO extends EgovAbstractDAO { | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + public List<MberCertIpVO> selectMberCertIpList(MberCertIpVO mberCertPhoneVO) { | |
| 25 | + return (List<MberCertIpVO>) list("MberCertIpVO.selectMberCertIpList", mberCertPhoneVO); | |
| 26 | + } | |
| 27 | + | |
| 28 | + public void insertCertIp(MberCertIpVO mberCertIpVO) { | |
| 29 | + insert("MberCertIpVO.insertCertIp", mberCertIpVO); | |
| 30 | + } | |
| 31 | + | |
| 32 | +} |
+++ src/main/java/itn/let/cert/ip/service/impl/CertIpServiceImpl.java
... | ... | @@ -0,0 +1,36 @@ |
| 1 | +package itn.let.cert.ip.service.impl; | |
| 2 | + | |
| 3 | +import java.time.LocalDateTime; | |
| 4 | +import java.util.List; | |
| 5 | + | |
| 6 | +import javax.annotation.Resource; | |
| 7 | + | |
| 8 | +import org.springframework.http.HttpStatus; | |
| 9 | +import org.springframework.stereotype.Service; | |
| 10 | + | |
| 11 | +import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl; | |
| 12 | +import itn.let.cert.ip.service.CertIpService; | |
| 13 | +import itn.let.cert.ip.service.MberCertIpVO; | |
| 14 | +import itn.let.mail.service.StatusResponse; | |
| 15 | + | |
| 16 | +@Service("CertIpService") | |
| 17 | +public class CertIpServiceImpl extends EgovAbstractServiceImpl implements CertIpService { | |
| 18 | + | |
| 19 | + @Resource(name = "CertIpDAO") | |
| 20 | + private CertIpDAO certIpDAO; | |
| 21 | + | |
| 22 | + | |
| 23 | + @Override | |
| 24 | + public StatusResponse selectMberCertIpList(MberCertIpVO mberCertPhoneVO) { | |
| 25 | + List<MberCertIpVO> mberCertIpListVO = certIpDAO.selectMberCertIpList(mberCertPhoneVO); | |
| 26 | + return new StatusResponse(HttpStatus.OK, mberCertIpListVO, LocalDateTime.now()); | |
| 27 | + } | |
| 28 | + | |
| 29 | + | |
| 30 | + @Override | |
| 31 | + public StatusResponse insertCertIp(MberCertIpVO mberCertIpVO) { | |
| 32 | + certIpDAO.insertCertIp(mberCertIpVO); | |
| 33 | + return new StatusResponse(HttpStatus.OK, "등록 하였습니다.", LocalDateTime.now()); | |
| 34 | + } | |
| 35 | + | |
| 36 | +} |
+++ src/main/java/itn/let/cert/ip/web/CertIpController.java
... | ... | @@ -0,0 +1,140 @@ |
| 1 | +package itn.let.cert.ip.web; | |
| 2 | + | |
| 3 | +import java.time.LocalDateTime; | |
| 4 | + | |
| 5 | +import javax.annotation.Resource; | |
| 6 | + | |
| 7 | +import org.apache.commons.lang3.StringUtils; | |
| 8 | +import org.springframework.http.HttpStatus; | |
| 9 | +import org.springframework.http.ResponseEntity; | |
| 10 | +import org.springframework.stereotype.Controller; | |
| 11 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 12 | +import org.springframework.web.servlet.ModelAndView; | |
| 13 | + | |
| 14 | +import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper; | |
| 15 | +import itn.com.cmm.LoginVO; | |
| 16 | +import itn.com.utl.fcc.service.EgovStringUtil; | |
| 17 | +import itn.let.cert.ip.service.CertIpService; | |
| 18 | +import itn.let.cert.ip.service.MberCertIpVO; | |
| 19 | +import itn.let.mail.service.StatusResponse; | |
| 20 | + | |
| 21 | +/** | |
| 22 | + * | |
| 23 | + * @author : 이호영 | |
| 24 | + * @fileName : CertIpController.java | |
| 25 | + * @date : 2024.11.19 | |
| 26 | + * @description : 허용 IP 관련 컨트롤러 | |
| 27 | + * =========================================================== | |
| 28 | + * DATE AUTHOR NOTE | |
| 29 | + * ----------------------------------------------------------- * | |
| 30 | + * 2024.11.19 이호영 최초 생성 | |
| 31 | + * | |
| 32 | + * | |
| 33 | + * | |
| 34 | + */ | |
| 35 | +@Controller | |
| 36 | +public class CertIpController { | |
| 37 | + | |
| 38 | + | |
| 39 | + /* certIpService */ | |
| 40 | + @Resource(name = "CertIpService") | |
| 41 | + private CertIpService certIpService; | |
| 42 | + | |
| 43 | + | |
| 44 | + @RequestMapping(value = {"/cert/ip/selectMberCertIpList.do"}) | |
| 45 | + public ResponseEntity<StatusResponse> selectMberCertIpList(MberCertIpVO mberCertPhoneVO) throws Exception { | |
| 46 | + | |
| 47 | + System.out.println("????????????????????????????"); | |
| 48 | + ModelAndView modelAndView = new ModelAndView(); | |
| 49 | + modelAndView.setViewName("jsonView"); | |
| 50 | + | |
| 51 | + //로그인 권한정보 불러오기 | |
| 52 | + LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null; | |
| 53 | + String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); | |
| 54 | + | |
| 55 | + if(userId == null) { | |
| 56 | + if(StringUtils.isEmpty(userId)) return ResponseEntity.ok().body(new StatusResponse(HttpStatus.BAD_REQUEST, "로그인 후 이용해 주세요", LocalDateTime.now())); | |
| 57 | + } | |
| 58 | + mberCertPhoneVO.setMberId(userId); | |
| 59 | + return ResponseEntity.ok().body(certIpService.selectMberCertIpList(mberCertPhoneVO)); | |
| 60 | + } | |
| 61 | + | |
| 62 | + | |
| 63 | + @RequestMapping(value = {"/cert/ip/insertCertIp.do"}) | |
| 64 | + public ResponseEntity<StatusResponse> insertCertIp(MberCertIpVO mberCertIpVO) throws Exception { | |
| 65 | + | |
| 66 | + ModelAndView modelAndView = new ModelAndView(); | |
| 67 | + modelAndView.setViewName("jsonView"); | |
| 68 | + | |
| 69 | + //로그인 권한정보 불러오기 | |
| 70 | + LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null; | |
| 71 | + String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); | |
| 72 | + | |
| 73 | + if(userId == null) { | |
| 74 | + if(StringUtils.isEmpty(userId)) return ResponseEntity.ok().body(new StatusResponse(HttpStatus.BAD_REQUEST, "로그인 후 이용해 주세요", LocalDateTime.now())); | |
| 75 | + } | |
| 76 | + mberCertIpVO.setFrstRegisterId(userId); | |
| 77 | + mberCertIpVO.setMberId(userId); | |
| 78 | + | |
| 79 | + | |
| 80 | + return ResponseEntity.ok().body(certIpService.insertCertIp(mberCertIpVO)); | |
| 81 | + } | |
| 82 | + /* | |
| 83 | + | |
| 84 | + @RequestMapping(value = {"/cert/ip/findByCertIp.do"}) | |
| 85 | + public ResponseEntity<StatusResponse> findByCertIp(MberCertIpVO mberCertPhoneVO) throws Exception { | |
| 86 | + | |
| 87 | + ModelAndView modelAndView = new ModelAndView(); | |
| 88 | + modelAndView.setViewName("jsonView"); | |
| 89 | + | |
| 90 | + //로그인 권한정보 불러오기 | |
| 91 | + LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null; | |
| 92 | + String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); | |
| 93 | + | |
| 94 | + if(userId == null) { | |
| 95 | + if(StringUtils.isEmpty(userId)) return ResponseEntity.ok().body(new StatusResponse(HttpStatus.BAD_REQUEST, "로그인 후 이용해 주세요", LocalDateTime.now())); | |
| 96 | + } | |
| 97 | + return ResponseEntity.ok().body(certIpService.findByCertPhoneInfo(mberCertPhoneVO)); | |
| 98 | + } | |
| 99 | + | |
| 100 | + @RequestMapping(value = {"/uss/umt/user/updateCertPhone.do"}) | |
| 101 | + public ResponseEntity<StatusResponse> updateCertPhone(MberCertPhoneVO mberCertPhoneVO) throws Exception { | |
| 102 | + | |
| 103 | + ModelAndView modelAndView = new ModelAndView(); | |
| 104 | + modelAndView.setViewName("jsonView"); | |
| 105 | + | |
| 106 | + //로그인 권한정보 불러오기 | |
| 107 | + LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null; | |
| 108 | + String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); | |
| 109 | + | |
| 110 | + if(userId == null) { | |
| 111 | + if(StringUtils.isEmpty(userId)) return ResponseEntity.ok().body(new StatusResponse(HttpStatus.BAD_REQUEST, "로그인 후 이용해 주세요", LocalDateTime.now())); | |
| 112 | + } | |
| 113 | + mberCertPhoneVO.setFrstRegisterId(userId); | |
| 114 | + | |
| 115 | + | |
| 116 | + return ResponseEntity.ok().body(certIpService.updateMberCertPhoneInfo(mberCertPhoneVO)); | |
| 117 | + } | |
| 118 | + | |
| 119 | + @RequestMapping(value = {"/uss/umt/user/deleteCertPhone.do"}) | |
| 120 | + public ResponseEntity<StatusResponse> deleteCertPhone(MberCertPhoneVO mberCertPhoneVO) throws Exception { | |
| 121 | + | |
| 122 | + ModelAndView modelAndView = new ModelAndView(); | |
| 123 | + modelAndView.setViewName("jsonView"); | |
| 124 | + | |
| 125 | + //로그인 권한정보 불러오기 | |
| 126 | + LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null; | |
| 127 | + String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); | |
| 128 | + | |
| 129 | + if(userId == null) { | |
| 130 | + if(StringUtils.isEmpty(userId)) return ResponseEntity.ok().body(new StatusResponse(HttpStatus.BAD_REQUEST, "로그인 후 이용해 주세요", LocalDateTime.now())); | |
| 131 | + } | |
| 132 | + mberCertPhoneVO.setLastUpdusrId(userId); | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + return ResponseEntity.ok().body(certIpService.deleteCertPhoneInfo(mberCertPhoneVO)); | |
| 137 | + } | |
| 138 | + */ | |
| 139 | + | |
| 140 | +}(No newline at end of file) |
+++ src/main/resources/egovframework/sqlmap/config/mysql/sql-map-config-mysql-cert.xml
... | ... | @@ -0,0 +1,7 @@ |
| 1 | +<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN" | |
| 2 | + "http://ibatis.apache.org/dtd/sql-map-config-2.dtd"> | |
| 3 | + | |
| 4 | +<sqlMapConfig> | |
| 5 | + <settings cacheModelsEnabled="true" useStatementNamespaces="true" /> | |
| 6 | + <sqlMap resource="egovframework/sqlmap/let/cert/MjonCertIp_SQL_mysql.xml"/> <!-- 문자메세지 --> | |
| 7 | +</sqlMapConfig> |
+++ src/main/resources/egovframework/sqlmap/let/cert/MjonCertIp_SQL_mysql.xml
... | ... | @@ -0,0 +1,49 @@ |
| 1 | +<?xml version="1.0" encoding="UTF-8"?><!-- | |
| 2 | + 수정일 수정자 수정내용 | |
| 3 | + ========= ======= ================================================= | |
| 4 | + 2021.03.01 신명섭 | |
| 5 | +--> | |
| 6 | +<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> | |
| 7 | +<sqlMap namespace="MjonCert"> | |
| 8 | + <typeAlias alias="mberCertIpVO" type="itn.let.cert.ip.service.MberCertIpVO"/> | |
| 9 | + | |
| 10 | + <select id="MberCertIpVO.selectMberCertIpList" parameterClass="mberCertIpVO" resultClass="mberCertIpVO"> | |
| 11 | + SELECT | |
| 12 | + MBER_ID as mberId | |
| 13 | + , CERT_IP as certIp | |
| 14 | + , CERT_MEMO as certMemo | |
| 15 | + , CERT_USE_YN as certUseYn | |
| 16 | + , FRST_REGIST_PNTTM as frstRegistPnttm | |
| 17 | + , FRST_REGISTER_ID as frstRegisterId | |
| 18 | + , LAST_UPDT_PNTTM as lastUpdtPnttm | |
| 19 | + , LAST_UPDUSR_ID as lastUpdusrId | |
| 20 | + FROM | |
| 21 | + LETTNGNRLMBER_CERT_IP | |
| 22 | + where | |
| 23 | + MBER_ID = #mberId# | |
| 24 | + </select> | |
| 25 | + | |
| 26 | + | |
| 27 | + <insert id="MberCertIpVO.insertCertIp"> | |
| 28 | + | |
| 29 | + INSERT INTO LETTNGNRLMBER_CERT_IP | |
| 30 | + ( | |
| 31 | + MBER_ID | |
| 32 | + , CERT_IP | |
| 33 | + , CERT_MEMO | |
| 34 | + , LAST_UPDT_PNTTM | |
| 35 | + , FRST_REGISTER_ID | |
| 36 | + ) | |
| 37 | + VALUES | |
| 38 | + ( | |
| 39 | + #mberId# | |
| 40 | + , #certIp# | |
| 41 | + , #certMemo# | |
| 42 | + , now() | |
| 43 | + , #frstRegisterId# | |
| 44 | + ) | |
| 45 | + </insert> | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | +</sqlMap>(No newline at end of file) |
--- src/main/resources/egovframework/sqlmap/let/msg/MjonMsgCustom_SQL_mysql.xml
+++ src/main/resources/egovframework/sqlmap/let/msg/MjonMsgCustom_SQL_mysql.xml
... | ... | @@ -28,7 +28,7 @@ |
| 28 | 28 |
WHERE 1=1 |
| 29 | 29 |
<isNotEmpty property="searchKeyword"> |
| 30 | 30 |
<isEqual property="searchCondition" compareValue="" > |
| 31 |
- AND ( A.USER_ID LIKE CONCAT('%', #searchKeyword#, '%')
|
|
| 31 |
+ AND ( A.USER_ID LIKE CONCAT('%', #searchKeyword#, '%')MjonMsgCustom_SQL_mysql.xmlMjonMsgCustom_SQL_mysql.xmlMjonMsgCustom_SQL_mysql.xmlMjonMsgCustom_SQL_mysql.xml
|
|
| 32 | 32 |
OR CUSTOM_PHONE_NO LIKE CONCAT ('%', #searchKeyword#,'%') )
|
| 33 | 33 |
</isEqual> |
| 34 | 34 |
<isEqual property="searchCondition" compareValue="1"> |
--- src/main/webapp/WEB-INF/jsp/web/user/mberInfoIndex.jsp
+++ src/main/webapp/WEB-INF/jsp/web/user/mberInfoIndex.jsp
... | ... | @@ -51,9 +51,6 @@ |
| 51 | 51 |
|
| 52 | 52 |
|
| 53 | 53 |
|
| 54 |
- $('#showLoginBtn').on('click', function() {
|
|
| 55 |
- $('.security_login').fadeIn(); // 서서히 나타나도록 설정
|
|
| 56 |
- }); |
|
| 57 | 54 |
|
| 58 | 55 |
|
| 59 | 56 |
}); |
... | ... | @@ -64,16 +61,147 @@ |
| 64 | 61 |
|
| 65 | 62 |
$('#showLoginBtn').on('click', function() {
|
| 66 | 63 |
if ($('#securityLogin').is(':visible')) {
|
| 67 |
- $('#securityLogin').fadeOut(); // 서서히 사라짐
|
|
| 68 |
- $(this).text('보안 로그인 표시'); // 버튼 텍스트 변경
|
|
| 64 |
+ $('#securityLogin').hide();
|
|
| 69 | 65 |
} else {
|
| 70 |
- $('#securityLogin').fadeIn(); // 서서히 나타남
|
|
| 71 |
- $(this).text('보안 로그인 숨기기'); // 버튼 텍스트 변경
|
|
| 66 |
+ $('#securityLogin').show();
|
|
| 72 | 67 |
} |
| 73 | 68 |
}); |
| 74 | 69 |
|
| 75 | 70 |
|
| 71 |
+ |
|
| 72 |
+ // IP 추가 버튼 클릭 시 tr 추가 |
|
| 73 |
+ $(".btn_ip_plus").click(function () {
|
|
| 74 |
+ // 추가할 HTML 구조 |
|
| 75 |
+ const ipTr = ` |
|
| 76 |
+ <tr class="ip-new"> |
|
| 77 |
+ <td><input type="text" class="input_text"></td> |
|
| 78 |
+ <td><input type="text" class="input_text"></td> |
|
| 79 |
+ <td>-</td> |
|
| 80 |
+ <td> |
|
| 81 |
+ <button type="button" class="btnType btnType5" id="ipRegBtn">등록</button> |
|
| 82 |
+ </td> |
|
| 83 |
+ </tr> |
|
| 84 |
+ `; |
|
| 85 |
+ |
|
| 86 |
+ // 이미 추가된 `.ip-row`가 있는지 확인 |
|
| 87 |
+ if ($(".ip_table tbody .ip-new").length === 0) {
|
|
| 88 |
+ $(".ip_table tbody").prepend(ipTr); // 중복되지 않으면 추가
|
|
| 89 |
+ } else {
|
|
| 90 |
+ alert("이미 추가된 항목이 있습니다.");
|
|
| 91 |
+ } |
|
| 92 |
+ }); |
|
| 93 |
+ |
|
| 94 |
+ |
|
| 95 |
+ $(document).on('click', '#ipRegBtn', function () {
|
|
| 96 |
+ // 현재 클릭된 버튼의 부모 tr 요소 |
|
| 97 |
+ const $currentRow = $(this).closest('tr');
|
|
| 98 |
+ |
|
| 99 |
+ // 입력값 가져오기 |
|
| 100 |
+ const ipValue = $currentRow.find('td:eq(0) input').val(); // 첫 번째 열 (IP)
|
|
| 101 |
+ const memoValue = $currentRow.find('td:eq(1) input').val(); // 두 번째 열 (메모)
|
|
| 102 |
+ |
|
| 103 |
+ // 예외 처리 |
|
| 104 |
+ if (!ipValue) {
|
|
| 105 |
+ alert("등록할 IP를 입력해주세요.");
|
|
| 106 |
+ $currentRow.find('td:eq(0) input').focus();
|
|
| 107 |
+ return; |
|
| 108 |
+ } |
|
| 109 |
+ |
|
| 110 |
+ // 추가 동작 (예: 서버 전송) |
|
| 111 |
+// alert(`입력된 IP: ${ipValue}, 메모: ${memoValue}`);
|
|
| 112 |
+ |
|
| 113 |
+ |
|
| 114 |
+ var params = {
|
|
| 115 |
+ "certIp" : ipValue |
|
| 116 |
+ , "certMemo" : memoValue |
|
| 117 |
+ } |
|
| 118 |
+ console.log('params : ', params);
|
|
| 119 |
+ |
|
| 120 |
+ if(!confirm("IP를 등록 하시겠습니까?")){
|
|
| 121 |
+ return false; |
|
| 122 |
+ } |
|
| 123 |
+ $.ajax({
|
|
| 124 |
+ type: "POST", |
|
| 125 |
+ url: "/cert/ip/insertCertIp.do", |
|
| 126 |
+ data: params, |
|
| 127 |
+ dataType:'json', |
|
| 128 |
+ async: false, |
|
| 129 |
+ success: function (returnData) {
|
|
| 130 |
+ if(returnData.status == 'OK'){
|
|
| 131 |
+ const objects = returnData.object; // 배열 데이터 |
|
| 132 |
+ let rows = ""; // 추가할 행들 |
|
| 133 |
+ |
|
| 134 |
+ // 배열 데이터를 순회하며 각 행 생성 |
|
| 135 |
+ objects.forEach((obj) => {
|
|
| 136 |
+ rows += ` |
|
| 137 |
+ <tr> |
|
| 138 |
+ <td>${obj.certIp || "-"}</td>
|
|
| 139 |
+ <td>${obj.certMemo || "-"}</td>
|
|
| 140 |
+ <td>${obj.lastUpdtPnttm || "-"}</td>
|
|
| 141 |
+ <td> |
|
| 142 |
+ <button type="button" class="btnType btn_text btn_lightgray fill btn_28">삭제</button> |
|
| 143 |
+ </td> |
|
| 144 |
+ </tr> |
|
| 145 |
+ `; |
|
| 146 |
+ }); |
|
| 147 |
+ |
|
| 148 |
+ // 기존 tbody 비우고 새 행 추가 |
|
| 149 |
+ $(".ip_table tbody").html(rows);
|
|
| 150 |
+ |
|
| 151 |
+ } |
|
| 152 |
+ else |
|
| 153 |
+ {
|
|
| 154 |
+ alert("오류가 발생하였습니다.");
|
|
| 155 |
+ } |
|
| 156 |
+ }, |
|
| 157 |
+ error: function (e) { alert("오류가 발생하였습니다."); console.log("ERROR : ", e); }
|
|
| 158 |
+ }); |
|
| 159 |
+ |
|
| 160 |
+ }); |
|
| 161 |
+ |
|
| 162 |
+ |
|
| 163 |
+ findAllCertIp(); |
|
| 76 | 164 |
}); |
| 165 |
+ |
|
| 166 |
+ |
|
| 167 |
+function findAllCertIp(){
|
|
| 168 |
+ |
|
| 169 |
+ console.log('findAllCertIp : ', findAllCertIp);
|
|
| 170 |
+ |
|
| 171 |
+ $.ajax({
|
|
| 172 |
+ type: "POST", |
|
| 173 |
+ url: "/cert/ip/selectMberCertIpList.do", |
|
| 174 |
+ data: null, |
|
| 175 |
+ dataType:'json', |
|
| 176 |
+ async: false, |
|
| 177 |
+ success: function (returnData) {
|
|
| 178 |
+ if (returnData.status === "OK") {
|
|
| 179 |
+ const objects = returnData.object; // 배열 데이터 |
|
| 180 |
+ let rows = ""; // 추가할 행들 |
|
| 181 |
+ objects.forEach((obj) => {
|
|
| 182 |
+ rows += ` |
|
| 183 |
+ <tr> |
|
| 184 |
+ <td>${obj.certIp || "-"}</td> <!-- 허용 IP -->
|
|
| 185 |
+ <td>${obj.certMemo || "-"}</td> <!-- 메모 -->
|
|
| 186 |
+ <td>${obj.lastUpdtPnttm || "-"}</td> <!-- 등록일시 -->
|
|
| 187 |
+ <td> |
|
| 188 |
+ <button type="button" class="btnType btn_text btn_lightgray fill btn_28" onclick="deleteRow(this)">삭제</button> |
|
| 189 |
+ </td> |
|
| 190 |
+ </tr> |
|
| 191 |
+ `; |
|
| 192 |
+ }); |
|
| 193 |
+ |
|
| 194 |
+ // 생성된 rows를 tbody에 삽입 |
|
| 195 |
+ $(".ip_table tbody").html(rows);
|
|
| 196 |
+ } else {
|
|
| 197 |
+ alert("데이터를 불러오는 데 실패했습니다.");
|
|
| 198 |
+ } |
|
| 199 |
+ }, |
|
| 200 |
+ error: function (e) { alert("오류가 발생하였습니다."); console.log("ERROR : ", e); }
|
|
| 201 |
+ }); |
|
| 202 |
+} |
|
| 203 |
+ |
|
| 204 |
+ |
|
| 77 | 205 |
|
| 78 | 206 |
//기간 요일 지정 |
| 79 | 207 |
function setCalVal(val,targetObj){
|
... | ... | @@ -511,8 +639,8 @@ |
| 511 | 639 |
<!-- 보안로그인 --> |
| 512 | 640 |
<!-- 보안로그인 --> |
| 513 | 641 |
<!-- 보안로그인 --> |
| 514 |
-<!-- <div class="security_login" id="showLoginBtn" style="display: none;"> --> |
|
| 515 |
- <div class="security_login" id="securityLogin" style="display: none;"> |
|
| 642 |
+<!-- <div class="security_login" id="securityLogin" style="display: none;"> --> |
|
| 643 |
+ <div class="security_login" id="securityLogin"> |
|
| 516 | 644 |
|
| 517 | 645 |
<ul class="explanation_wrap box info"> |
| 518 | 646 |
<li>· 사이트 부정로그인으로 인한 피해를 방지할 수 있는 2차 로그인 인증 서비스입니다. </li> |
... | ... | @@ -564,12 +692,6 @@ |
| 564 | 692 |
</tr> |
| 565 | 693 |
</thead> |
| 566 | 694 |
<tbody> |
| 567 |
- <tr> |
|
| 568 |
- <td><input type="text" class="input_text"></td> |
|
| 569 |
- <td><input type="text" class="input_text"></td> |
|
| 570 |
- <td>-</td> |
|
| 571 |
- <td><button type="button" class="btnType btnType5">등록</button></td> |
|
| 572 |
- </tr> |
|
| 573 | 695 |
<tr> |
| 574 | 696 |
<td>192.168.0.0</td> |
| 575 | 697 |
<td>dadfadfjadkfjalkdjfajflajdlfjaldjflajd</td> |
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?