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 : EgovLoginUsr.jsp
Description : 로그인화면
Modification Information
수정일 수정자 수정내용
------- -------- ---------------------------
2009.03.10 박지욱 최초 생성
2011.08.31 JJY 경량환경 버전 생성
author : 공통서비스 개발팀 박지욱
since : 2009.03.10
--%>
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="kc" uri="/WEB-INF/tlds/kcc_tld.tld"%>
<!DOCTYPE html>
<html lang="ko">
<head>
<meta http-equiv="Content-Language" content="ko">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>로그인</title>
<!-- css -->
<link rel="stylesheet" href="/publish/common/css/reset.css">
<link rel="stylesheet" href="/publish/common/css/font.css">
<link rel="stylesheet" href="/publish/common/css/style.css">
<link rel="stylesheet" href="/publish/adm/css/common.css">
<link rel="stylesheet" href="/publish/adm/css/style.css">
<link rel="stylesheet" href="/publish/adm/css/button.css">
<link rel="stylesheet" href="/publish/adm/css/tab.css">
<link rel="stylesheet" href="/publish/adm/css/table.css">
<link rel="stylesheet" href="/publish/adm/css/calendar.css">
<link rel="stylesheet" href="/publish/adm/login/login.css" />
<!-- script -->
<script src="/js/jquery-3.5.0.js"></script>
<script type="text/javascript" src="/js/new_login.js"></script>
<script type="text/javascript">
<c:if test="${!empty message}">alert("${message}");</c:if>
$( document ).ready(function(){
getid(document.loginForm);
});
<kc:profile value="local">
function login() {
if($('#devIdSelect').val()!=""){
$("#id").val($('#devIdSelect').val());
if($('#devIdSelect').val() == "seed" || $('#devIdSelect').val() == "member"){
$("#password").val('kofair001');
}
document.loginForm.action="<c:url value='/uat/uia/actionSecurityLogin.do'/>";
saveid(document.loginForm);
document.loginForm.submit();
}
}
</kc:profile>
function actionLogin() {
if (document.loginForm.id_text.value =="") {
alert("아이디를 입력하세요");
return false;
} else if (document.loginForm.password_text.value =="") {
alert("비밀번호를 입력하세요");
return false;
}
else {
var id = $("#id_text").val();
var pw = $("#password_text").val();
$("#id").val(id);
$("#password").val(pw);
$("#password2").val(pw);
document.loginForm.action="<c:url value='/uat/uia/actionSecurityLogin.do'/>";
saveid(document.loginForm);
document.loginForm.submit();
}
}
function setCookie (name, value, expires) {
document.cookie = name + "=" + escape (value) + "; path=/; expires=" + expires.toGMTString();
}
function getCookie(Name) {
var search = Name + "="
if (document.cookie.length > 0) { // 쿠키가 설정되어 있다면
offset = document.cookie.indexOf(search)
if (offset != -1) { // 쿠키가 존재하면
offset += search.length
// set index of beginning of value
end = document.cookie.indexOf(";", offset)
// 쿠키 값의 마지막 위치 인덱스 번호 설정
if (end == -1)
end = document.cookie.length
return unescape(document.cookie.substring(offset, end))
}
}
return "";
}
function saveid(form) {
var expdate = new Date();
// 기본적으로 30일동안 기억하게 함. 일수를 조절하려면 * 30에서 숫자를 조절하면 됨
if (form.checkId.checked)
expdate.setTime(expdate.getTime() + 1000 * 3600 * 24 * 30); // 30일
else
expdate.setTime(expdate.getTime() - 1); // 쿠키 삭제조건
setCookie("ncms_saveid", form.id_text.value, expdate);
}
function getid(form){
form.checkId.checked = ((form.id_text.value = getCookie("ncms_saveid")) != "");
}
</script>
</head>
<body>
<form:form id="loginForm" name="loginForm" method="post">
<input type="hidden" name="userSe" value="USR" />
<input type="hidden" id="id" name="id">
<input type="hidden" id="password" name="password">
<input type="hidden" id="password2" name="password2">
<input name="j_username" type="hidden" />
<div class="login_container">
<div class="login_content">
<div class="left">
<h1 class="logo"><img src="" alt="">logo</h1>
</div>
<div class="right">
<div class="login_form_wrap">
<h2>로그인</h2>
<ul class="login_form">
<li>
<strong>아이디</strong>
<input type="text" id="id_text" name="id_text" class="input w100per" maxlength="15" placeholder="아이디를 입력해주세요">
</li>
<li>
<strong>비밀번호</strong>
<input type="password" autocomplete="off" id="password_text" name="password_text" class="input w100per" value="<c:out value='${password}'/>" placeholder="비밀번호를 입력해주세요." onkeydown="javascript:if (event.keyCode == 13) { actionLogin();return false; }">
</li>
</ul>
<div class="form_wrap checkbox_wrap column">
<label for="checkId" class="checkbox_item">
<input type="checkbox" id="checkId" name="checkId">
<span>아이디 저장</span>
</label>
</div>
<div class="btn_wrap w100per">
<button type="button" class="btn fill primary xlarge w100per" id="login_submit" onclick="javascript:actionLogin();return false;">로그인</button>
</div>
</div>
</div>
</div>
</div>
<%-- <div class="login_all_wrap">
<div class="login_wrap">
<div class="login_left_box">
<img src="/direct/img/login/login_logo.png" alt="프레임워크">
<p class="logo_bottom">프레임워크</p>
</div>
<div class="login_right_box login_right_otp_box">
<p class="login_tit">로그인</p>
<kc:profile value="local">
아이디 선택 : <select id="devIdSelect" style="width: 100%; height: 30px;" onchange="login()">
<option value="">로그인할 아이디를 선택해주세요.</option>
<option value="seed">관리자1-ROLE_ADMIN</option>
<option value="member">관리자2-ROLE_ADMIN2</option>
</select>
<br></br>
</kc:profile>
<div class="id_box">
<p>ID</p>
<label for="id_text"></label>
<input type="text" id="id_text" name="id_text" class="input w100per" maxlength="15" placeholder="아이디를 입력해주세요" class="id">
</div>
<div class="pw_box">
<p>PASSWORD</p>
<label for="password_text"></label>
<input type="password" autocomplete="off" id="password_text" name="password_text" class="input w100per" value="<c:out value='${password}'/>" placeholder="비밀번호를 입력해주세요." onkeydown="javascript:if (event.keyCode == 13) { actionLogin();return false; }">
</div>
<div class="saveId">
<input type="checkbox" id="checkId" name="checkId">
<label for="checkId">아이디저장</label>
</div>
<div class="submit_box">
<button type="button" class="btn fill primary xlarge w100per" id="login_submit" onclick="javascript:actionLogin();return false;">로그인</button>
<!-- <input type="submit" value="로그인" class="btn btn_text blue_fill w100per submit" id="login_submit" onclick="javascript:actionLogin();return false;"> -->
</div>
</div>
</div>
</div> --%>
</form:form>
</body>
</html>