File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
<%--
Class Name : addSiteIpView.jsp
Description : addSiteIpView 화면
Modification Information
수정일 수정자 수정내용
------- -------- ---------------------------
2009.02.01 lee.m.j 최초 생성
2011.08.31 JJY 경량환경 버전 생성
author : 공통서비스 개발팀 lee.m.j
since : 2009.02.01
--%>
<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Language" content="ko" >
<title>로그인정책 등록</title>
<script type="text/javascript" src="<c:url value='/js/EgovCalPopup.js' />"></script>
<script type="text/javascript" src="<c:url value='/js/EgovMultiFile.js'/>"></script>
<script type="text/javaScript" language="javascript">
$( document ).ready(function() {
//최초 팀 세팅
if("${siteIpManagerVO.team}"== ""){//등록
$("#team_dept>option").hide();
$("."+ $($("#team>option")[0]).val() ).show();
}else{//수정
$("#team_dept").val("${siteIpManagerVO.team_dept}");
$("#team_dept>option").hide();
$("."+"${siteIpManagerVO.team}").show();
}
});
function fncSelectsiteIpManagerVOList() {
var varFrom = document.getElementById("siteIpManagerVO");
varFrom.action = "<c:url value='/uat/uap/selectsiteIpManagerVOList.do'/>";
varFrom.submit();
}
function fncSiteIpInsert() {
if($('#comIp').val() == ''){
alert("컴퓨터 IP는 필수값입니다. ");
return false;
}
if(!ipValidate($('#comIp').val(), "컴퓨터")){
return false;
}
if($('#comName').val() == ''){
alert("성명은 필수값입니다. ");
return false;
}
if($('#ntceBgndeYYYMMDD').val() == '--'){
alert("시작기간은 필수값입니다. ");
return false;
}
if($('#ntceEnddeYYYMMDD').val() == '--'){
alert("종료기간은 필수값입니다. ");
return false;
}
if($('#comDesc').val() == ''){
alert("위치는 필수값입니다. ");
return false;
}
if($('#lanNum').val() == ''){
alert("랜선번호는 필수값입니다. ");
return false;
}
if(!$.isNumeric($('#lanNum').val())){
alert("랜선번호는 숫자만 가능합니다.");
return false;
}
if($('#comSubnetmask').val() == ''){
alert("서브넷마스크는 필수값입니다. ");
return false;
}
if(!ipValidate($('#comSubnetmask').val(), "서브넷마스크")){
return false;
}
if($('#comGateway').val() == ''){
alert("게이트웨이는 필수값입니다. ");
return false;
}
if(!ipValidate($('#comGateway').val(), "게이트웨이")){
return false;
}
var varFrom = document.getElementById("siteIpManagerVO");
varFrom.department.value = $("#team_dept option:selected").val().split("_")[1] ;
var ntceBgndeYYYMMDD = document.getElementById('ntceBgndeYYYMMDD').value;
var ntceEnddeYYYMMDD = document.getElementById('ntceEnddeYYYMMDD').value;
var iChkBeginDe = Number( ntceBgndeYYYMMDD.replaceAll("-","") );
var iChkEndDe = Number( ntceEnddeYYYMMDD.replaceAll("-","") );
if(iChkBeginDe > iChkEndDe || iChkEndDe < iChkBeginDe ){
alert("게시시작일자는 게시종료일자 보다 클수 없고,\n게시종료일자는 게시시작일자 보다 작을수 없습니다. ");
return;
}
varFrom.ntceBgnde.value = ntceBgndeYYYMMDD.replaceAll('-','') + fn_egov_SelectBoxValue('ntceBgndeHH') + fn_egov_SelectBoxValue('ntceBgndeMM');
varFrom.ntceEndde.value = ntceEnddeYYYMMDD.replaceAll('-','') + fn_egov_SelectBoxValue('ntceEnddeHH') + fn_egov_SelectBoxValue('ntceEnddeMM');
if(confirm("저장 하시겠습니까?")){
varFrom.action = "<c:url value='/sym/site/insertSiteIp.do'/>";
varFrom.submit();
}
}
function fncSiteIpUpdate() {
if($('#comIp').val() == ''){
alert("컴퓨터 IP는 필수값입니다. ");
return false;
}
if(!ipValidate($('#comIp').val(), "컴퓨터")){
return false;
}
if($('#comName').val() == ''){
alert("성명은 필수값입니다. ");
return false;
}
if($('#ntceBgndeYYYMMDD').val() == '--'){
alert("시작기간은 필수값입니다. ");
return false;
}
if($('#ntceEnddeYYYMMDD').val() == '--'){
alert("종료기간은 필수값입니다. ");
return false;
}
if($('#comDesc').val() == ''){
alert("위치는 필수값입니다. ");
return false;
}
if($('#lanNum').val() == ''){
alert("랜선번호는 필수값입니다. ");
return false;
}
if(!$.isNumeric($('#lanNum').val())){
alert("랜선번호는 숫자만 가능합니다.");
return false;
}
if($('#comSubnetmask').val() == ''){
alert("서브넷마스크는 필수값입니다. ");
return false;
}
if(!ipValidate($('#comSubnetmask').val(), "서브넷마스크")){
return false;
}
if($('#comGateway').val() == ''){
alert("게이트웨이는 필수값입니다. ");
return false;
}
if(!ipValidate($('#comGateway').val(), "게이트웨이")){
return false;
}
var varFrom = document.getElementById("siteIpManagerVO");
if(confirm("저장 하시겠습니까?")){
var ntceBgndeYYYMMDD = document.getElementById('ntceBgndeYYYMMDD').value;
var ntceEnddeYYYMMDD = document.getElementById('ntceEnddeYYYMMDD').value;
var iChkBeginDe = Number( ntceBgndeYYYMMDD.replaceAll("-","") );
var iChkEndDe = Number( ntceEnddeYYYMMDD.replaceAll("-","") );
if(iChkBeginDe > iChkEndDe || iChkEndDe < iChkBeginDe ){
alert("게시시작일자는 게시종료일자 보다 클수 없고,\n게시종료일자는 게시시작일자 보다 작을수 없습니다. ");
return;
}
varFrom.ntceBgnde.value = ntceBgndeYYYMMDD.replaceAll('-','') + fn_egov_SelectBoxValue('ntceBgndeHH') + fn_egov_SelectBoxValue('ntceBgndeMM');
varFrom.ntceEndde.value = ntceEnddeYYYMMDD.replaceAll('-','') + fn_egov_SelectBoxValue('ntceEnddeHH') + fn_egov_SelectBoxValue('ntceEnddeMM');
//team_dept 에서 department 세팅
varFrom.department.value = $("#team_dept option:selected").val().split("_")[1] ;
varFrom.action = "<c:url value='/sym/site/updateSiteIp.do'/>";
varFrom.submit();
}
}
function fncsiteIpManagerVODelete() {
var varFrom = document.getElementById("siteIpManagerVO");
varFrom.action = "<c:url value='/uat/uap/removesiteIpManagerVO.do'/>";
if(confirm("삭제 하시겠습니까?")){
varFrom.submit();
}
}
function ipValidate(ipValue , attrName){
var IPvalue = ipValue ;
var ipPattern = /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/;
//var ipPattern = "^[0-9\\.]*$" ;
var ipArray = IPvalue.match(ipPattern);
var result = "";
var thisSegment;
if(IPvalue == "0.0.0.0") {
alert(IPvalue + "는 예외 아이피 입니다..");
result = false;
} else if (IPvalue == "255.255.255.255") {
alert(result =IPvalue + "는 예외 아이피 입니다.");
result = false;
} else {
result = true;
}
if(ipArray == null) {
alert(attrName + "IP형식이 일치 하지않습니다. ");
result = false;
} else {
for (var i=1; i<5; i++) {
thisSegment = ipArray[i];
if (thisSegment > 255) {
alert(attrName+ "IP형식이 일치 하지않습니다. ");
result = false;
}
if ((i == 0) && (thisSegment > 255)) {
alert(attrName+ "IP형식이 일치 하지않습니다. ");
result = false;
}
}
}
return result;
}
/* ********************************************************
* SELECT BOX VALUE FUNCTION
******************************************************** */
function fn_egov_SelectBoxValue(sbName)
{
var FValue = "";
for(var i=0; i < document.getElementById(sbName).length; i++)
{
if(document.getElementById(sbName).options[i].selected == true){
FValue=document.getElementById(sbName).options[i].value;
}
}
return FValue;
}
/* ********************************************************
* PROTOTYPE JS FUNCTION
******************************************************** */
String.prototype.trim = function(){
return this.replace(/^\s+|\s+$/g, "");
}
String.prototype.replaceAll = function(src, repl){
var str = this;
if(src == repl){return str;}
while(str.indexOf(src) != -1) {
str = str.replace(src, repl);
}
return str;
}
function displayTeam(obj) {
$($("#team_dept>option."+obj.value)[0]).attr("selected", "selected");
$("#team_dept>option").hide();
$("."+obj.value).show();
}
</script>
</head>
<body>
<noscript>자바스크립트를 지원하지 않는 브라우저에서는 일부 기능을 사용하실 수 없습니다.</noscript>
<form name="siteIpManagerVO" id="siteIpManagerVO" method="post" action="${pageContext.request.contextPath}/sym/site/addsiteIpManagerVO.do">
<!-- 검색조건 유지 -->
<input type="hidden" name="comId" value="<c:out value='${siteIpManagerVO.comId}'/>" >
<input id="ntceBgnde" name="ntceBgnde" type="hidden" value="${siteIpManagerVO.ntceBgnde}">
<input id="ntceEndde" name="ntceEndde" type="hidden" value="${siteIpManagerVO.ntceEndde}">
<input type="hidden" name="department" value="<c:out value='${siteIpManagerVO.department}'/>" >
<!-- 검색조건 유지 -->
<div class="contWrap">
<div class="pageTitle">
<div class="pageIcon"><img src="/pb/img/pageTitIcon4.png" alt=""></div>
<h2 class="titType1 c_222222 fwBold">사이트 컴퓨터 IP관리</h2>
<p class="tType6 c_999999">현재 사용중인 게시판의 이용 현황을 파악할 수 있으며, 게시판을 추가 및 설정, 삭제할 수 있습니다.</p>
</div>
<div class="pageCont">
<div class="listTop resisterList">
<p class="right block fwMd"><span class="tType4 c_e40000 fwBold">*</span>는 필수입력 항목입니다.</p>
</div>
<table class="tbType2">
<colgroup>
<col style="width: 20%">
<col style="width: 80%">
</colgroup>
<c:if test="${siteId eq 'super'}">
<tr>
<th><span class="reqArea">사이트</span></th>
<td colspan="3">
<select name="siteId" title="권한">
<c:forEach var="resultList" items="${siteManageList}" varStatus="status">
<option value="<c:out value="${resultList.siteId}"/>"
<c:if test="${siteIpManagerVO.siteId eq resultList.siteId}"> selected='selected' </c:if>>
<c:out value="${resultList.siteNm}"/>
</option>
</c:forEach>
</select>
</td>
</tr>
</c:if>
<tr>
<th><span class="reqArea">컴퓨터 IP</span></th>
<td colspan="3"><input name="comIp" id="comIp" title="컴퓨터 이름" type="text" maxLength="23" value="${siteIpManagerVO.comIp}" size="50" > </td>
</tr>
<tr>
<th><span class="reqArea">부서</span></th>
<td>
<select name="team" id="team" title="소속" onchange="displayTeam(this);">
<c:forEach var="codeList" items="${teamList}" varStatus="status">
<option value="<c:out value="${codeList.codeId}"/>"
<c:if test="${siteIpManagerVO.team eq codeList.codeId}"> selected='selected' </c:if>>
<c:out value="${codeList.codeIdNm}"/>
</option>
</c:forEach>
</select>
<select name="team_dept" id="team_dept" title="하위소속">
<c:forEach var="codeList" items="${allTeamList}" varStatus="status">
<option class="${codeList.codeId}" value="<c:out value="${codeList.codeId}"/>_<c:out value="${codeList.code}"/>" >
<c:out value="${codeList.codeNm}"/>
</option>
</c:forEach>
</select>
</td>
</tr>
<tr>
<th><span class="reqArea">직위</span></th>
<td colspan="3">
<select name="grade" title="직위">
<c:forEach var="codeList" items="${gradeList}" varStatus="status">
<option value="<c:out value="${codeList.code}"/>"
<c:if test="${siteIpManagerVO.grade eq codeList.code}"> selected='selected' </c:if>>
<c:out value="${codeList.codeNm}"/>
</option>
</c:forEach>
</select>
</td>
</tr>
<tr>
<th><span class="reqArea">성명</span></th>
<td colspan="3"><input name="comName" id="comName" title="컴퓨터 이름" type="text" maxLength="23" value="<c:out value='${siteIpManagerVO.comName}'/>" size="50" >
</td>
</tr>
<tr>
<th><span class="reqArea">기간</th>
<td colspan="3">
<input type="hidden" name="cal_url" id="cal_url" value="<c:url value='/sym/cmm/EgovNormalCalPopup.do'/>" >
<input type="text" style="width: 15%;" class="date_format" name="ntceBgndeYYYMMDD" id="ntceBgndeYYYMMDD" size="10" maxlength="10" class="readOnlyClass" value="<c:out value="${fn:substring(siteIpManagerVO.ntceBgnde, 0, 4)}"/>-<c:out value="${fn:substring(siteIpManagerVO.ntceBgnde, 4, 6)}"/>-<c:out value="${fn:substring(siteIpManagerVO.ntceBgnde, 6, 8)}"/>" readonly>
<a href="#" onClick="javascript:fn_egov_NormalCalendar(document.forms.siteIpManagerVO, document.forms.siteIpManagerVO.ntceBgndeYYYMMDD);">
<img src="<c:url value='/images/egovframework/com/cmm/icon/bu_icon_carlendar.gif' />" align="middle" style="border:0px" alt="달력창팝업버튼이미지">
</a>
<select name="ntceBgndeHH" id="ntceBgndeHH" class="date_format" >
<c:forEach var="result" items="${ntceBgndeHH}" varStatus="status">
<option value="${result.code}" <c:if test="${result.code eq siteIpManagerVO.ntceBgndeMM }">selected="selected"</c:if> >${result.codeNm}</option>
</c:forEach>
</select>시
<select name="ntceBgndeMM" id="ntceBgndeMM" class="date_format" >
<c:forEach var="result" items="${ntceBgndeMM}" varStatus="status">
<option value="${result.code}" <c:if test="${result.code eq siteIpManagerVO.ntceBgndeMM }">selected="selected"</c:if>>${result.codeNm}</option>
</c:forEach>
</select>분
~
<input type="text" style="width: 15%;" class="date_format" name="ntceEnddeYYYMMDD" id="ntceEnddeYYYMMDD" size="10" maxlength="10" class="readOnlyClass" value="<c:out value="${fn:substring(siteIpManagerVO.ntceEndde, 0, 4)}"/>-<c:out value="${fn:substring(siteIpManagerVO.ntceEndde, 4, 6)}"/>-<c:out value="${fn:substring(siteIpManagerVO.ntceEndde, 6, 8)}"/>" readonly>
<a href="#" onClick="javascript:fn_egov_NormalCalendar(document.forms.siteIpManagerVO, document.forms.siteIpManagerVO.ntceEnddeYYYMMDD);">
<img src="<c:url value='/images/egovframework/com/cmm/icon/bu_icon_carlendar.gif' />" align="middle" style="border:0px" alt="달력창팝업버튼이미지">
</a>
<select name="ntceEnddeHH" id="ntceEnddeHH" class="date_format" >
<c:forEach var="result" items="${ntceEnddeHH}" varStatus="status">
<option value="${result.code}" <c:if test="${result.code eq siteIpManagerVO.ntceEnddeHH }">selected="selected"</c:if>>${result.codeNm}</option>
</c:forEach>
</select>시
<select name="ntceEnddeMM" id="ntceEnddeMM" class="date_format" >
<c:forEach var="result" items="${ntceEnddeMM}" varStatus="status">
<option value="${result.code}" <c:if test="${result.code eq siteIpManagerVO.ntceEnddeMM }">selected="selected"</c:if>>${result.codeNm}</option>
</c:forEach>
</select>분
</td>
</tr>
<tr>
<th><span class="reqArea">위치</span></th>
<td colspan="3"><input name="comDesc" id="comDesc" title="컴퓨터 이름" type="text" maxLength="23" value="<c:out value='${siteIpManagerVO.comDesc}'/>" size="50" > </td>
</tr>
<tr>
<th><span class="reqArea">랜선번호</span></th>
<td colspan="3"><input name="lanNum" id="lanNum" title="컴퓨터 이름" type="text" maxLength="23" value="<c:out value='${siteIpManagerVO.lanNum}'/>" size="50" > </td>
</tr>
<tr>
<th><span class="reqArea">서브넷마스크</span></th>
<td colspan="3"><input name="comSubnetmask" id="comSubnetmask" title="서브넷마스크" type="text" maxLength="23" value="<c:out value='${siteIpManagerVO.comSubnetmask}'/>" size="30" > </td>
</tr>
<tr>
<th><span class="reqArea">게이트웨이</span></th>
<td colspan="3"><input name="comGateway" id="comGateway" title="서브넷마스크" type="text" maxLength="23" value="<c:out value='${siteIpManagerVO.comGateway}'/>" size="30" > </td>
</tr>
<tr>
<th><span class="reqArea">사용유무</span></th>
<td>
<select name="useYn" title="사용유무">
<option value="Y"
<c:if test="${siteIpManagerVO.useYn eq 'Y'}"> selected='selected' </c:if>
>사용</option>
<option value="N"
<c:if test="${siteIpManagerVO.useYn eq 'N'}"> selected='selected' </c:if>
>미사용</option>
</select>
</td>
</tr>
<c:if test="${pageType eq 'Modify'}">
<tr>
<th><span class="reqArea">최초등록일</span></th>
<td>
${siteIpManagerVO.frstRegistPnttm}
</td>
</tr>
<tr>
<th><span class="reqArea">최종수정일</span></th>
<td>
${siteIpManagerVO.lastUpdtPnttm}
</td>
</tr>
<tr>
<th><span class="reqArea">최초작성자</span></th>
<td>
${siteIpManagerVO.frstRegisterId}
</td>
</tr>
<tr>
<th><span class="reqArea">최종수정자</span></th>
<td>
${siteIpManagerVO.lastUpdusrId}
</td>
</tr>
</c:if>
</table>
<div class="btnWrap">
<input type="button" class="btnType1 bg_888888" value="목 록" onclick="location.href='<c:url value='/sym/site/selectSiteIpList.do'/>'; return false;">
<c:if test="${empty siteIpManagerVO.comIp }">
<input type="button" class="btnType1" value="저 장" onclick="fncSiteIpInsert(); return false;">
</c:if>
<c:if test="${!empty siteIpManagerVO.comIp }">
<input type="button" class="btnType1" value="수 정" onclick="fncSiteIpUpdate(); return false;">
</c:if>
</div>
<c:if test="${!empty siteIpManagerVO.comIp }">
<iframe name="iframe_egov_ipView" id="iframe_egov_ipView" src="/sym/site/siteIpChgView.do?comId=${siteIpManagerVO.comId }"
style="margin-top: 1px;width: 100%; height: 950px; border:none;" scrolling="no" marginheight="0" marginwidth="0"></iframe>
</c:if>
</div>
<c:if test="${pageType eq 'Modify'}"><!-- 변경내역 리스트 -->
</c:if>
</div>
</form>
<form name="searchForm" id="searchForm" method="get" action="<c:url value='/sym/site/selectSiteIpList.do'/>" >
</form>
</body>
</html>