<%@ page import="java.net.InetAddress" %>
<%@ 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="s" uri="http://www.springframework.org/tags"%>
<script type="text/javascript" src="<c:url value="/resources/js/mobile/login.js?version=" /><s:message code="mp.version"/>"></script>
<script src="<c:url value="/resources/plugins/crypto/sha256.js" /> "></script>
<script src="<c:url value="/resources/plugins/crypto/jsencrypt.js" /> "></script>

<div class="login_wrap">
	<div class="inner">
		<div class="logo_wrap" id="logo_login">
			<img src="<c:url value='/resources/css/images/mcarePlus.png' />" alt="M-Care Plus">
		</div>
		<div style="height: 50px;"></div>
		<div class="input_wrap">
			<span class="input_line"><label for="txtUserId">아이디</label> <input type="text" name="txtUserId" value="" id="txtUserId"> </span> 
			<span class="input_line"><label for="txtPasswd">비밀번호</label> <input type="password" name="txtPasswd" id="txtPasswd"> </span>
			<div class="checkbox_wrap" style="height: 50px;">
				<!-- <div class="custom-control custom-checkbox">
					<input type="checkbox" id="rememberMe" name="rememberMe" class="custom-control-input"> 
					<label class="cst-control-label" for="rememberMe">아이디 기억하기</label>
				</div> -->
				<div class="custom-control custom-checkbox right">
					<input type="checkbox" id="loginAuto" name="loginAuto" class="custom-control-input"> 
					<label class="cst-control-label" for="loginAuto">자동로그인</label>
				</div>
			</div>
			<button type="submit" name="loginBtn" class="login" id="loginBtn">로그인</button>

			<div>
				<span id="appVersion"> App Version. </span>
			</div>

			<!-- <button type="button" name="fidoBtn" class="fido">지문인증(FIDO)</button> -->
			<p class="footer">ⓒ2019 M-Care Plus, Hospital Medical Center</p>
		</div>

	</div>
</div>

<div id="page" class="back" style="display: none;">	
	<h1 class="logo text-center"><img src="<c:url value='/resources/css/images/logo.png' />" width="180" alt="한양대학교구리병원"></h1>
	<div class="login-box">         
		<div class="form-horizontal">
			<!-- <div class="col-xs-12 text-center switchwrap" id="switchHospital">
				<span class="sel1 select" id="seoul">한양대병원</span>
				<input type="checkbox" id="cb" checked>
				<label for="cb" class="switch"></label>
				<span class="sel2" id="guri">구리한양대병원</span>
			</div> -->
              
			<!-- <div class="form-group mt10">
                   <div class="col-xs-12">
                       <input class="form-control" type="text" placeholder="아이디" id="txtUserId">
                   </div>
               </div>

               <div class="form-group">
                   <div class="col-xs-12">
                       <input class="form-control" type="password" placeholder="패스워드" id="txtPasswd">
                   </div>
               </div>

               <div class="form-group ">
                   <div class="col-xs-12">
                       <div class="checkbox3  checkbox-check checkbox-light">
                              <input type="checkbox" id="rememberMe" >
                               <label for="rememberMe">자동 로그인</label>
                         </div>                        
                   </div>
               </div>
               
               <div class="form-group text-center mt40">
                   <div class="col-xs-12">
                       <button class="btn btn-info btn-block " type="submit" id="loginBtn" >로그인</button>
                   </div>
               </div> -->               
           </div>
       </div>
</div>
<!-- #page 종료 -->


<script type="text/javascript">
//autoLogin
var lKData = "MIICXQIBAAKBgQDlOJu6TyygqxfWT7eLtGDwajtNFOb9I5XRb6khyfD1Yt3YiCgQWMNW649887VGJiGr/L5i2osbl8C9+WJTeucF+S76xFxdU6jE0NQ+Z+zEdhUTooNRaY5nZiu5PgDB0ED/ZKBUSLKL7eibMxZtMlUDHjm4gwQco1KRMDSmXSMkDwIDAQABAoGAfY9LpnuWK5Bs50UVep5c93SJdUi82u7yMx4iHFMc/Z2hfenfYEzu+57fI4fvxTQ//5DbzRR/XKb8ulNv6+CHyPF31xk7YOBfkGI8qjLoq06V+FyBfDSwL8KbLyeHm7KUZnLNQbk8yGLzB3iYKkRHlmUanQGaNMIJziWOkN+N9dECQQD0ONYRNZeuM8zd8XJTSdcIX4a3gy3GGCJxOzv16XHxD03GW6UNLmfPwenKu+cdrQeaqEixrCejXdAFz/7+BSMpAkEA8EaSOeP5Xr3ZrbiKzi6TGMwHMvC7HdJxaBJbVRfApFrE0/mPwmP5rN7QwjrMY+0+AbXcm8mRQyQ1+IGEembsdwJBAN6az8Rv7QnD/YBvi52POIlRSSIMV7SwWvSK4WSMnGb1ZBbhgdg57DXaspcwHsFV7hByQ5BvMtIduHcT14ECfcECQATeaTgjFnqE/lQ22Rk0eGaYO80cc643BXVGafNfd9fcvwBMnk0iGX0XRsOozVt5AzilpsLBYuApa66NcVHJpCECQQDTjI2AQhFc1yRnCU/YgDnSpJVm1nASoRUnU8Jfm3Ozuku7JUXcVpt08DFSceCEX9unCuMcT72rAQlLpdZir876";

//다국어 사용
/* var i18n = function(){
	var message = {
		"common006" : "<s:message code='mobile.message.common006'/>"
	};
	
	this.getMessage = function( code ){
		return message[code];
	};
};
 */
$(document).ready(function() {

	//20190528 dkchoi75 백병원 별 로고 변경 처리
	//console.log(gClientIp);
/*
	if (gClientIp == "14.40.2.60") {
		$("#logo_login").append("<img src=\"<c:url value='/resources/css/images/seoulPaik.png' />\" alt=\"M-Care Plus\">");
	} else if (gClientIp == "14.40.0.113") {
		$("#logo_login").append("<img src=\"<c:url value='/resources/css/images/sanggyePaik.png' />\" alt=\"M-Care Plus\">");
	} else if (gClientIp == "14.40.4.137") {
		$("#logo_login").append("<img src=\"<c:url value='/resources/css/images/ilsanPaik.png' />\" alt=\"M-Care Plus\">");
	} else if (gClientIp == "100.100.251.251") {
		$("#logo_login").append("<img src=\"<c:url value='/resources/css/images/busanPaik.png' />\" alt=\"M-Care Plus\">");
	} else if (gClientIp == "10.10.10.36") {
		$("#logo_login").append("<img src=\"<c:url value='/resources/css/images/haeundaePaik.png' />\" alt=\"M-Care Plus\">");
	} else {
		$("#logo_login").append("<img src=\"<c:url value='/resources/css/images/mcarePlus.png' />\" alt=\"M-Care Plus\">");
	}
*/
	var mplusLogin = new mplus_mobile_login();
	// native 호출 뒤에 callback으로 script를 호출하기 위해 객체를 global로 설정
	// window.activeObj. + {function_name} 적용
	mplusLogin.setGlobal(mplusLogin);
	mplusLogin.init();

	curPage = mplusLogin;
});

this.nfctagCallback = function(data){
	curPage.nfctagCallback(data);
};

var curPage;
</script>