295 lines
14 KiB
Plaintext
295 lines
14 KiB
Plaintext
@model NP.Model.VMUser
|
|
@{
|
|
ViewData["Title"] = "로그인";
|
|
Layout = null;
|
|
}
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="en" class="bg-black">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
<meta http-equiv="Expires" content="-1" />
|
|
<meta http-equiv="Pragma" content="no-cache" />
|
|
<meta http-equiv="Cache-Control" content="No-Cache" />
|
|
<title>@ViewData["Title"] - 영남건설기술교육원</title>
|
|
@*<link rel="shortcut icon" href="/images/nptech.ico" />*@
|
|
<meta name="description" content="ntest" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
|
|
@Styles.Render("~/Content/css")
|
|
@Scripts.Render("~/bundles/jquery")
|
|
@Scripts.Render("~/bundles/scripts")
|
|
<!--[if lt IE 9]>
|
|
<script src="js/ie/html5shiv.js"></script>
|
|
<script src="js/ie/respond.min.js"></script>
|
|
<script src="js/ie/excanvas.js"></script>
|
|
<![endif]-->
|
|
<script type="text/javascript" src="/js/site.js"></script>
|
|
</head>
|
|
<body>
|
|
<section id="content" class="m-t-lg wrapper-md animated fadeInUp">
|
|
<div class="container aside-xxl">
|
|
@*<a class="navbar-brand block" href="#">YOU & PARTNERS</a>
|
|
<a class="navbar-brand block" href="#" style="font-size: 11px; line-height: 20px;">(Career Consulting Group)</a>*@
|
|
<div class="text-center"><img src="~/Img/gnb_logo.png" style="max-width: 200px;" alt="YNP" /></div>
|
|
<br />
|
|
<section class="panel panel-default bg-white m-t-lg" style="margin-top: 0px;">
|
|
<header class="panel-heading text-center">
|
|
<strong>Sign in</strong>
|
|
</header>
|
|
<form action="#" class="panel-body wrapper-lg" id="fmlogin" method="post">
|
|
<div class="form-group">
|
|
<label class="control-label">ID</label>
|
|
<input type="email" name="user.UserId" id="user_UserId" placeholder="ID" class="form-control input-lg" value="@Model.SavedId">
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="control-label">Password</label>
|
|
<input type="password" name="user.UserPass" id="pw" placeholder="PASSWORD" class="form-control input-lg">
|
|
</div>
|
|
<div class="text-center">
|
|
<label><input type="checkbox" id="SavedId2" @(string.IsNullOrEmpty(Model.SavedId) ? "" : "checked") />Remember ID</label>
|
|
<input type="hidden" name="SavedId" id="SavedId" value="@Model.SavedId" />
|
|
</div>
|
|
<a href="#" id="btn_login" class="btn btn-facebook btn-block m-b-sm">Login to Your Account</a>
|
|
@*<div style="font-size: 11px;">
|
|
- 본 시스템은 <span style="color: red;">구글 크롬</span></b>에 최적화되어있습니다.<br />
|
|
- 타 브라우저로 접근 시 일부 기능이 제한될 수 있습니다.(<a style="text-decoration: underline;" href="https://www.google.com/intl/ko_ALL/chrome/" target="_blank" title="크롬다운로드">크롬 다운로드</a>)
|
|
</div>*@
|
|
|
|
|
|
<input type="hidden" id="logincnt" name="logincnt" value="0"/>
|
|
</form>
|
|
</section>
|
|
</div>
|
|
</section>
|
|
<!-- footer -->
|
|
<footer id="footer"><div class="text-center padder"><p><small style="color: #fff;">CTE framework base on Bootstrap<br>© @DateTime.Now.Year</small></p></div></footer>
|
|
<!-- / footer -->
|
|
@*<script src="/js/jquery.min.js"></script>
|
|
<!-- Bootstrap -->
|
|
<script src="/js/bootstrap.js"></script>
|
|
<!-- App -->
|
|
<script src="/js/app.js"></script>
|
|
<script src="/js/app.plugin.js"></script>
|
|
<script src="/js/slimscroll/jquery.slimscroll.min.js"></script>*@
|
|
<script>
|
|
window.onunload=function(){
|
|
window.location.replace(self.location);
|
|
}
|
|
$(window).on("load", function () {
|
|
if (navigator.appName.indexOf("Internet Explorer") != -1) { //yeah, he's using IE
|
|
if (navigator.appVersion.indexOf("MSIE 9") > -1 || navigator.appVersion.indexOf("MSIE 8") > -1) {
|
|
alert("인터넷익스플로러9 이하는 서비스이용이 원활하지 않습니다. 익스플로러를 업그레이드하거나 크롬브라우저 사용을 권장합니다.");
|
|
}
|
|
}
|
|
});
|
|
|
|
// 로그인 실패 카운트
|
|
var login_cnt = @Model.logincnt;
|
|
|
|
$(document).ready(function () {
|
|
$("input").on("keydown", function (e) {
|
|
if (e.keyCode == 13) {
|
|
if ($(this).attr("id") === "user_UserId") {
|
|
$("#pw").focus();
|
|
}
|
|
else if ($(this).attr("id") === "pw") {
|
|
$("#btn_login").click();
|
|
}
|
|
}
|
|
});
|
|
|
|
$("#user_UserId").focus();
|
|
if ($("#user_UserId").val() !== "") {
|
|
$("#pw").focus();
|
|
}
|
|
|
|
if ('@(Model.IsLoginFailed ? 1 : 0)' == '1') {
|
|
switch ('@Model.LoginFailedId') {
|
|
case "2":
|
|
case "3":
|
|
// 로그인 비밀번호 5번 실패시
|
|
if (@Model.logincnt > 4) {
|
|
$('#xxx').html("비밀 번호가 5회 틀렸습니다. 관리자에게 문의해주세요.");
|
|
$(".xxx").show();
|
|
break;
|
|
}
|
|
|
|
$('#xxx').html("계정을 확인 후 다시 로그인하세요.");
|
|
$(".xxx").show();
|
|
break;
|
|
case "4":
|
|
$('#xxx').html("외부접근이 차단된 상태입니다.");
|
|
$(".xxx").show();
|
|
break;
|
|
case "8":
|
|
$('#xxx').html("해당 계정은 잠금상태입니다. 관리자에게 문의해주세요");
|
|
$(".xxx").show();
|
|
break;
|
|
case "5":
|
|
case "6":
|
|
case "7":
|
|
default:
|
|
$('#xxx').html("관리자에게 문의해주세요.");
|
|
$(".xxx").show();
|
|
break;
|
|
}
|
|
}
|
|
$("#user_UserId").focus();
|
|
if ($("#user_UserId").val() != "") {
|
|
$("#pw").focus();
|
|
}
|
|
var istimeout = '@((ViewBag.IsTimeOut ?? false) ? "true" : "false")';
|
|
if (ispop()) {
|
|
parent.location.href = '/Account/Index?istimeout=' + istimeout;
|
|
}
|
|
else if ((parent.ismainlayout || 0) == 1) {
|
|
parent.location.href = '/Account/Index?istimeout=' + istimeout;
|
|
}
|
|
else if (opener != null) {
|
|
opener.location.href = '/Account/Index?istimeout=' + istimeout;
|
|
self.close();
|
|
}
|
|
else if (istimeout == 'true') {
|
|
$('#xxx').html("인증시간이 초과되어 로그아웃되었습니다.");
|
|
$(".xxx").show();
|
|
}
|
|
|
|
@* @custom@ : 본인인증추가 *@
|
|
$("#btn_login").on("click", function () {
|
|
capp("/aocommon/CheckLoginIp", { loginid: $("#user_UserId").val(), pw: $("#pw").val() }, "checkloginip");
|
|
});
|
|
$("#user_UserId").on("change", function () {
|
|
cnt = 5;
|
|
});
|
|
|
|
});
|
|
//function ispop() {
|
|
// try {
|
|
// return parent.ismainlayout == 1;
|
|
// }
|
|
// catch (e) { }
|
|
// return false;
|
|
//}
|
|
@* @custom@ : 본인인증검증(before 인증문자발송) callback *@
|
|
var cnt = 5;
|
|
var id = "";
|
|
function checkloginip() {
|
|
debugger;
|
|
if (cnt > 0) {
|
|
if (capResult.obj.code == 1) {
|
|
/*//20210707 특정ip, 개발서버 제외요청*/
|
|
@{
|
|
bool isSkip = Helpers.IsSkipIPorHost(NP.Base.ENUM.IpHostSkipGb.SmsAuth, Request.ServerVariables["REMOTE_ADDR"], Request.ServerVariables["HTTP_HOST"]);
|
|
}
|
|
@if (isSkip)
|
|
{
|
|
@: login();
|
|
}
|
|
}
|
|
else if (capResult.obj.code == 1000) {
|
|
$("#ipaddress").html(capResult.obj.ip);
|
|
$("#boxmobile").html(capResult.obj.mobile);
|
|
capp("/aocommon/sendlakey", { mobile: capResult.obj.mobile, no : capResult.obj.no }, "sendkey");
|
|
}
|
|
else if (capResult.obj.code == -1) {
|
|
cnt--;
|
|
$('#xxx').html("계정을 확인 후 다시 로그인하세요.");
|
|
$(".xxx").show();
|
|
}
|
|
else if (capResult.obj.code == -2) {
|
|
$('#xxx').html("입력하신 계정에 해당하는 휴대폰 정보가 없습니다. 관리자에게 문의하세요.");
|
|
$(".xxx").show();
|
|
}
|
|
else if (capResult.obj.code == -3) {
|
|
$('#xxx').html("입력하신 계정이 존재하지 않습니다. 관리자에게 문의하세요.");
|
|
$(".xxx").show();
|
|
}
|
|
else if (capResult.obj.code == -4) {
|
|
$('#xxx').html("해당 계정은 잠금상태입니다. 관리자에게 문의하세요.");
|
|
$(".xxx").show();
|
|
}
|
|
else {
|
|
$('#xxx').html("계정을 확인 후 다시 로그인하세요.");
|
|
$(".xxx").show();
|
|
}
|
|
} else {
|
|
capp("/aocommon/disableaccount", { loginid: $("#user_UserId").val() }, "cbdisableaccount");
|
|
}
|
|
}
|
|
function login() {
|
|
if ($.trim($("#user_UserId").val()) === "") {
|
|
_focus = $("#user_UserId");
|
|
$('#xxx').html("아이디를 입력하세요.");
|
|
$(".xxx").show();
|
|
}
|
|
else if ($.trim($("#pw").val()) === "") {
|
|
_focus = $("#pw");
|
|
$('#xxx').html("비밀번호를 입력하세요.");
|
|
$(".xxx").show();
|
|
}
|
|
else {
|
|
$("#SavedId").val("");
|
|
if ($("#SavedId2").prop("checked")) {
|
|
$("#SavedId").val($.trim($("#user_UserId").val()));
|
|
}
|
|
|
|
setv("logincnt", login_cnt)
|
|
|
|
$("#fmlogin").submit();
|
|
}
|
|
}
|
|
var _focus;
|
|
|
|
@* @custom@ : 본인인증처리 callback *@
|
|
function cbchkmobile() {
|
|
if (capResult.code == 1000) {
|
|
$('#xxxlogin').html("인증이 완료되었습니다. 로그인합니다.");
|
|
$(".xxxlogin").show();
|
|
mobilechkclose();
|
|
|
|
setTimeout(function () {
|
|
$("#fmlogin").submit();
|
|
}, 500);
|
|
|
|
} else if (capResult.code == 1) {
|
|
$('#xxx').html("유효시간이 만료되었습니다.\n 창을 닫고 인증을 다시 진행해주세요.");
|
|
$(".xxx").show();
|
|
hidebox();
|
|
} else {
|
|
$('#xxx').html("인증이 실패하였습니다.\n 다시 확인해주세요.");
|
|
$(".xxx").show();
|
|
}
|
|
}
|
|
function cbdisableaccount() {
|
|
if (capResult.code == 1000) {
|
|
$('#xxx').html("해당 계정은 잠금상태입니다. 관리자에게 문의하세요.");
|
|
$(".xxx").show();
|
|
} else {
|
|
msgdev();
|
|
}
|
|
}
|
|
function hidebox() {
|
|
$('.divIpcheck').slideUp('fast');
|
|
}
|
|
function showbox() {
|
|
$(".divIpcheck").slideDown("fast");
|
|
}
|
|
</script>
|
|
|
|
<div class="xxx" style="position: fixed; z-index: 10; background-color: #555; opacity: 0.7; left: 0; top: 0; right: 0; bottom: 0; display: none;"></div>
|
|
<div class="xxx" id="msginfo" style="position: fixed; z-index: 11; background-color: #ddd; left: 50%; width: 50%; text-align: center; margin-left: -25%; top: 30%; padding: 30px 30px; border-radius: 5px; font-size: 18px; display: none;">
|
|
<span id="xxx">인증시간이 초과되어 로그아웃되었습니다.</span>
|
|
<br />
|
|
<br />
|
|
<a class="btn btn-lg btn-info" onclick="$('.xxx').hide(); $(_focus).focus();">확인</a>
|
|
</div>
|
|
|
|
@* @custom@ : 본인인증처리 layer form*@
|
|
<div class="xxxlogin" style="position: fixed; z-index: 10; background-color: #555; opacity: 0.7; left: 0; top: 0; right: 0; bottom: 0; display: none;"></div>
|
|
<div class="xxxlogin" id="msginfo" style="position: fixed; z-index: 11; background-color: #ddd; left: 50%; width: 50%; text-align: center; margin-left: -25%; top: 30%; padding: 30px 30px; border-radius: 5px; font-size: 18px; display: none;">
|
|
<span id="xxxlogin"></span>
|
|
</div>
|
|
@Html.Partial("./Partial/MobileChk", null, new ViewDataDictionary { { "bindmethod", "cbchkmobile" } })
|
|
</body>
|
|
</html> |