2021-06-08 13:04:03 +09:00
|
|
|
@using NP.Model.ENUM
|
|
|
|
|
@model NP.Model.VMMy
|
2020-10-12 14:39:23 +09:00
|
|
|
@{
|
2020-10-29 17:12:47 +09:00
|
|
|
var a = Model.Assign;
|
2020-11-27 14:01:16 +09:00
|
|
|
var u = Model.User;
|
2020-11-30 14:44:19 +09:00
|
|
|
|
|
|
|
|
var naverClientId = ViewBag.naverClientID;
|
|
|
|
|
var kakaoClientId = ViewBag.kakaoClientID;
|
|
|
|
|
var googleClientId = ViewBag.googleClientID;
|
2020-10-12 14:39:23 +09:00
|
|
|
}
|
2020-11-30 14:44:19 +09:00
|
|
|
<head>
|
|
|
|
|
<script type="text/javascript" src="/js/naveridlogin_js_sdk_2.0.0.js"></script>
|
|
|
|
|
<script type="text/javascript" src="/js/kakao.js"></script>
|
|
|
|
|
</head>
|
2020-10-29 17:12:47 +09:00
|
|
|
<form id="mform" method="post" enctype="multipart/form-data">
|
2020-11-30 14:44:19 +09:00
|
|
|
<div id="naverIdLogin" style="display:none"></div>
|
2020-10-29 17:12:47 +09:00
|
|
|
<ul class="mpgTab col2">
|
2020-11-30 14:44:19 +09:00
|
|
|
<li class="current" id="liUserTab"><a href="#" onclick="selectTab('user')">회원정보수정</a></li>
|
|
|
|
|
<li id="liSnsTab"><a href="#" onclick="selectTab('sns')">SNS연동</a></li>
|
2020-10-29 17:12:47 +09:00
|
|
|
</ul>
|
2020-11-27 14:01:16 +09:00
|
|
|
<input type="hidden" name="username" id="username" value="@u.username" />
|
|
|
|
|
<input type="hidden" name="birthday" id="birthday" value="@u.birthday" />
|
2021-06-08 13:04:03 +09:00
|
|
|
<input type="hidden" name="di" id="di" value="@(u.di)" />
|
|
|
|
|
<input type="hidden" name="ci" id="ci" value="@(u.ci)" />
|
|
|
|
|
<input type="hidden" name="vssn" id="vssn" value="@(u.vssn)" />
|
2021-06-09 10:10:57 +09:00
|
|
|
<input type="hidden" name="authplatform" id="authplatform" value="@(u.authplatform.GetHashCode())" />
|
2020-10-12 14:39:23 +09:00
|
|
|
<table class="clsTable">
|
|
|
|
|
<tbody>
|
|
|
|
|
<tr><th>ID</th><td><p>@u.userid</p></td></tr>
|
|
|
|
|
<tr><th>이름(한글)</th><td><p>@u.username</p></td></tr>
|
|
|
|
|
<tr><th>비밀번호</th><td><input type="password" class="min230" id="userpass" name="userpass" /></td></tr>
|
|
|
|
|
<tr><th>비밀번호 확인</th><td><input type="password" class="min230" id="userpass2" /></td></tr>
|
|
|
|
|
<tr>
|
2020-10-29 17:12:47 +09:00
|
|
|
<th>주민등록번호</th>
|
2020-10-12 14:39:23 +09:00
|
|
|
<td>
|
2020-10-29 17:12:47 +09:00
|
|
|
<input type="hidden" name="userpno" id="userpno" value="@u.userpno" />
|
|
|
|
|
<ul class="clsMail mdfy">
|
2021-04-15 09:06:33 +09:00
|
|
|
<li><input type="text" name="userpno1" id="userpno1" maxlength="6" value="@u.userpno.Substring(0,6)" readonly="" style="background-color:#ddd;"></li>
|
2020-10-29 17:12:47 +09:00
|
|
|
<li>-</li>
|
2021-04-15 09:06:33 +09:00
|
|
|
<li><input type="text" name="userpno2" id="userpno2" maxlength="7" value="@u.userpno.Substring(6)"></li>
|
2020-10-12 14:39:23 +09:00
|
|
|
</ul>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2020-10-29 17:12:47 +09:00
|
|
|
<th>이메일</th>
|
2020-10-12 14:39:23 +09:00
|
|
|
<td>
|
|
|
|
|
<input type="hidden" name="email" id="email" value="@u.email" />
|
2020-10-29 17:12:47 +09:00
|
|
|
<input type="hidden" name="isacceptemail" id="isacceptemail" value="1" />
|
|
|
|
|
@*@Html.Hidden("isacceptemail", u.isacceptemail)*@
|
|
|
|
|
<ul class="clsMail mdfy">
|
2020-10-12 14:39:23 +09:00
|
|
|
<li><input type="text" name="email1" id="email1" value="@((u.email??"").Contains("@")?u.email.Split('@')[0] : u.email)" /></li>
|
|
|
|
|
<li>@@</li>
|
|
|
|
|
<li><input type="text" name="email2" id="email2" value="@((u.email??"").Contains("@")?u.email.Split('@')[1] : "")" /></li>
|
|
|
|
|
<li>
|
|
|
|
|
<select id="email3" onchange="setemail2()">
|
|
|
|
|
<option value="" selected>직접입력</option>
|
|
|
|
|
<option value="naver.com">naver.com</option>
|
|
|
|
|
<option value="daum.net">daum.net</option>
|
|
|
|
|
<option value="gmail.com">gmail.com</option>
|
|
|
|
|
<option value="hotmail.com">hotmail.com</option>
|
|
|
|
|
</select>
|
|
|
|
|
</li>
|
2020-10-29 17:12:47 +09:00
|
|
|
@*<li style="margin:10px;"><input type="checkbox" value="1" id="acceptemail" @(u.isacceptemail == 1 ? "checked" : "") /><label for="acceptemail">수신</label></li>*@
|
2020-10-12 14:39:23 +09:00
|
|
|
</ul>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2020-10-29 17:12:47 +09:00
|
|
|
<th>주소</th>
|
2020-10-12 14:39:23 +09:00
|
|
|
<td>
|
2020-10-29 17:12:47 +09:00
|
|
|
<ul class="mdfyAddr postbox">
|
|
|
|
|
<li><input type="text" name="post" id="post" class="postno" readonly="readonly" style="background-color: #ddd;" value="@u.post" /></li>
|
|
|
|
|
<li><a href="#" onclick="getpost2(this);">주소찾기</a></li>
|
|
|
|
|
<li><input type="text" name="address1" id="address1" class="postadr" readonly="readonly" style="background-color: #ddd;" value="@u.address1" /></li>
|
|
|
|
|
<li><input type="text" name="address2" id="address2" class="postadrsub" value="@u.address2" /></li>
|
|
|
|
|
</ul>
|
2020-10-12 14:39:23 +09:00
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2020-10-29 17:12:47 +09:00
|
|
|
<th>생년월일</th>
|
2020-11-27 14:01:16 +09:00
|
|
|
<td>
|
2021-06-25 17:10:11 +09:00
|
|
|
<p id="txtbirthday">
|
2020-11-27 14:01:16 +09:00
|
|
|
@if (!string.IsNullOrEmpty(u.birthday))
|
|
|
|
|
{
|
2021-06-25 17:10:11 +09:00
|
|
|
@(u.birthday.Replace("-", "."))
|
2020-11-27 14:01:16 +09:00
|
|
|
}
|
2021-06-25 17:10:11 +09:00
|
|
|
</p>
|
2020-11-27 14:01:16 +09:00
|
|
|
</td>
|
2020-10-12 14:39:23 +09:00
|
|
|
</tr>
|
2021-06-09 10:10:57 +09:00
|
|
|
|
2021-06-09 17:52:06 +09:00
|
|
|
<tr >
|
2021-06-09 10:10:57 +09:00
|
|
|
<th>학습인증수단</th>
|
|
|
|
|
<td>
|
2021-06-09 17:52:06 +09:00
|
|
|
<div class="mdfyBirth" id="authPlatform_IPIN" @(u.authplatform == AuthPlatform.Mobile ? "style=display:none;" : "") @(u.authplatform == AuthPlatform.None ? "style=padding-bottom:5px;" : "")>
|
|
|
|
|
<p id="authPlatform_IPIN_Name">@(u.authplatform == AuthPlatform.None ? "-" : "I-PIN 인증")</p>
|
|
|
|
|
<a href="#" onclick="certok3reqview('MOBI', 'AuthPlatformChange');" style="width:150px;">휴대폰 인증으로 변경</a>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mdfyBirth" id="authPlatform_Mobile" @(u.authplatform == AuthPlatform.IPIN ? "style=display:none;" : "")>
|
|
|
|
|
<p id="authPlatform_Mobile_Name">@(u.authplatform == AuthPlatform.None ? "-" : "휴대폰 인증")</p>
|
2021-06-09 10:10:57 +09:00
|
|
|
<a href="#" onclick="certok3reqview('IPIN', 'AuthPlatformChange');" style="width:150px;">I-PIN 인증으로 변경</a>
|
2021-06-08 13:04:03 +09:00
|
|
|
</div>
|
2021-06-09 17:52:06 +09:00
|
|
|
<br />
|
|
|
|
|
※ 인증수단 변경 시 추가 인증을 진행해야 합니다.
|
|
|
|
|
<br />
|
|
|
|
|
※ 추가 인증 후 하단의 [저장] 버튼을 클릭해야 변경이 완료됩니다.
|
2021-06-08 13:04:03 +09:00
|
|
|
</td>
|
2021-06-09 17:52:06 +09:00
|
|
|
</tr>
|
2020-10-12 14:39:23 +09:00
|
|
|
<tr>
|
2020-10-29 17:12:47 +09:00
|
|
|
<th>연락처</th>
|
2020-10-12 14:39:23 +09:00
|
|
|
<td>
|
2020-10-29 17:12:47 +09:00
|
|
|
<div class="mdfyBirth">
|
2021-06-08 13:04:03 +09:00
|
|
|
@if(u.authplatform == AuthPlatform.Mobile)
|
|
|
|
|
{
|
|
|
|
|
<input type="hidden" name="mobile" id="mobile" value="@(u.mobile)" />
|
2021-06-08 18:30:02 +09:00
|
|
|
<p id="mobilestr">@(u.mobile)</p><a href="#" onclick="certok3reqview('MOBI', 'MobileNumberChange');">수정</a>
|
2021-06-08 13:04:03 +09:00
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
<input type="text" id="mobile" class="int nocomma" name="mobile" maxlength="13" placeholder="휴대전화번호" value="@(u.mobile)" >
|
|
|
|
|
}
|
2020-10-29 17:12:47 +09:00
|
|
|
</div>
|
2020-10-12 14:39:23 +09:00
|
|
|
</td>
|
|
|
|
|
</tr>
|
2021-04-30 17:28:30 +09:00
|
|
|
<tr>
|
|
|
|
|
<th>소속</th>
|
|
|
|
|
<td>
|
|
|
|
|
<ul class="sctyRadio">
|
|
|
|
|
<li><input type="radio" name="isCompany" value="0" id="isCompany0" @(u.asno == null ? "checked" : "")><label for="isCompany0">개인</label></li>
|
|
|
|
|
<li><input type="radio" name="isCompany" value="1" id="isCompany1" @(u.asno == null ? "" : "checked")><label for="isCompany1">업체</label></li>
|
|
|
|
|
</ul>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
2020-10-12 14:39:23 +09:00
|
|
|
<tr>
|
2020-10-29 17:12:47 +09:00
|
|
|
<th>직장</th>
|
2020-10-12 14:39:23 +09:00
|
|
|
<td>
|
2020-10-29 17:12:47 +09:00
|
|
|
<div class="mdfyBirth">
|
|
|
|
|
<input type="hidden" id="asno" name="asno" value="@u.asno" />
|
|
|
|
|
<p id="asname">@(u.asname ?? "-")</p>
|
2021-04-30 17:28:30 +09:00
|
|
|
<a href="#" id="btnassign" style="background-color:@(u.asno == null ? "#ddd;" : "#fff;")">수정</a>
|
2020-10-29 17:12:47 +09:00
|
|
|
</div>
|
2020-10-12 14:39:23 +09:00
|
|
|
</td>
|
2021-04-30 17:28:30 +09:00
|
|
|
</tr>
|
2020-10-29 17:12:47 +09:00
|
|
|
<tr>
|
|
|
|
|
<th>학력</th>
|
2020-10-12 14:39:23 +09:00
|
|
|
<td>
|
2020-10-29 17:12:47 +09:00
|
|
|
<ul class="sctyRadio">
|
|
|
|
|
<li><input type="radio" name="slevel" id="slevel1" value="1" @(u.slevel == 1 ? "checked" : "")><label for="slevel1">고졸</label></li>
|
|
|
|
|
<li><input type="radio" name="slevel" id="slevel2" value="2" @(u.slevel == 2 ? "checked" : "")><label for="slevel2">학사</label></li>
|
|
|
|
|
<li><input type="radio" name="slevel" id="slevel3" value="3" @(u.slevel == 3 ? "checked" : "")><label for="slevel3">석사</label></li>
|
|
|
|
|
<li><input type="radio" name="slevel" id="slevel4" value="4" @(u.slevel == 4 ? "checked" : "")><label for="slevel4">박사</label></li>
|
|
|
|
|
<li><input type="radio" name="slevel" id="slevel0" value="0" @(u.slevel == 0 ? "checked" : "")><label for="slevel0">기타</label></li>
|
2020-10-12 14:39:23 +09:00
|
|
|
</ul>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
2020-11-30 14:44:19 +09:00
|
|
|
<div class="lgnWrap" style="display:none">
|
|
|
|
|
<ul class="lgnSns">
|
|
|
|
|
<li>
|
|
|
|
|
@if (Model.User.jointype == 2)
|
|
|
|
|
{
|
|
|
|
|
<a href="javascript:cancelSnsLink()">네이버 아이디 연동해제</a>
|
|
|
|
|
}
|
|
|
|
|
else if (Model.User.jointype != 2)
|
|
|
|
|
{
|
|
|
|
|
<a href="javascript:confirmSns(2)">네이버 아이디로 연동하기</a>
|
|
|
|
|
}
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
@if (Model.User.jointype == 3)
|
|
|
|
|
{
|
|
|
|
|
<a href="javascript:cancelSnsLink()">카카오 아이디 연동해제</a>
|
|
|
|
|
}
|
|
|
|
|
else if (Model.User.jointype != 3)
|
|
|
|
|
{
|
|
|
|
|
<a href="javascript:confirmSns(3)">카카오 아이디로 연동하기</a>
|
|
|
|
|
}
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
@if (Model.User.jointype == 1)
|
|
|
|
|
{
|
|
|
|
|
<a href="javascript:cancelSnsLink()">구글 아이디 연동해제</a>
|
|
|
|
|
}
|
|
|
|
|
else if (Model.User.jointype != 1)
|
|
|
|
|
{
|
|
|
|
|
<a href="javascript:confirmSns(1)">구글 아이디로 연동하기</a>
|
|
|
|
|
}
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
2020-10-12 14:39:23 +09:00
|
|
|
</form>
|
2020-10-29 17:12:47 +09:00
|
|
|
@Html.Partial("./Partial/OkCert3", null, new ViewDataDictionary { })
|
2020-10-12 14:39:23 +09:00
|
|
|
<ul class="lctBtn">
|
|
|
|
|
<li><a href="#" class="sm bk" onclick="save(1)">저장</a></li>
|
|
|
|
|
<li><a href="#" class="sm" onclick="save(0)">탈퇴</a></li>
|
|
|
|
|
</ul>
|
|
|
|
|
<div id="postlayer" class="daumpost"><a href="#" class="btn btn-xxs btn-select closedaumpost" onclick="closeDaumPostcode();">close</a></div>
|
|
|
|
|
<div class="mpgPop" id="pop1" style="display: none;">
|
|
|
|
|
<div>
|
|
|
|
|
<div>
|
|
|
|
|
<div class="mpgPopWrap wdth660">
|
|
|
|
|
<div class="mpgPopTitle">
|
|
|
|
|
<h5>회원탈퇴</h5>
|
|
|
|
|
<a href="#" onclick="mpgPopClose();"></a>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mpgpMdfy">
|
|
|
|
|
<dl>
|
2020-10-12 15:32:10 +09:00
|
|
|
<dd>1. 회원 탈퇴 시 영남건설기술교육원의 모든 서비스를 이용하실 수 없습니다.</dd>
|
2020-10-12 14:39:23 +09:00
|
|
|
<dd>2. 탈퇴신청된 아이디는 영구적으로 재가입이 불가능합니다.</dd>
|
|
|
|
|
<dd>5. 탈퇴시 현재 수강중인 동영상 강의를 수강하실 수 없습니다.</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
<h5>탈퇴사유</h5>
|
|
|
|
|
<textarea id="exitreason" maxlength="400" cols="30" rows="10" style="padding: 20px;"></textarea>
|
|
|
|
|
<ul class="odrPopBtn col1">
|
|
|
|
|
<li><a href="#" class="bk" onclick="save(-1)">탈퇴하기</a></li>
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
@Html.Partial("./Partial/BoxAssign", null, new ViewDataDictionary { { "bindmethod", "bindassign" } })
|
|
|
|
|
@section scriptsHeader{
|
|
|
|
|
@Html.Partial("./Partial/ScriptPost")
|
|
|
|
|
}
|
|
|
|
|
@section scripts{
|
2021-06-25 17:10:11 +09:00
|
|
|
<script src="~/js/moment.js"></script>
|
2020-10-12 14:39:23 +09:00
|
|
|
<script>
|
|
|
|
|
$(document).ready(function () {
|
|
|
|
|
$("#ccposition").on("change", function () {
|
|
|
|
|
$("#ccpositionetc").hide();
|
|
|
|
|
if ($(this).find("option:selected").text() == "기타") {
|
|
|
|
|
$("#ccpositionetc").show().focus();
|
2020-10-29 17:12:47 +09:00
|
|
|
}
|
2020-10-12 14:39:23 +09:00
|
|
|
});
|
2020-11-30 14:44:19 +09:00
|
|
|
|
|
|
|
|
snsInit();
|
2020-11-30 16:24:53 +09:00
|
|
|
|
|
|
|
|
var referrer = document.referrer;
|
|
|
|
|
if (referrer.toLowerCase().indexOf('myinfocheck') > 0 || referrer.toLowerCase().indexOf('snslinkcallback') > 0) {
|
|
|
|
|
selectTab("sns");
|
|
|
|
|
|
|
|
|
|
}
|
2021-04-30 17:28:30 +09:00
|
|
|
|
|
|
|
|
$("input:radio[name='isCompany']").on("click", function () {
|
|
|
|
|
var isCompany = $(this).val();
|
|
|
|
|
if (isCompany == "0") {
|
|
|
|
|
setv("asno", "");
|
|
|
|
|
$("#asname").text("-");
|
|
|
|
|
$("#btnassign").off("click");
|
|
|
|
|
$("#btnassign").css("background-color", "#ddd");
|
|
|
|
|
} else {
|
|
|
|
|
$("#btnassign").on("click", function () {
|
|
|
|
|
boxassignview();
|
|
|
|
|
});
|
|
|
|
|
$("#btnassign").css("background-color", "#fff");
|
|
|
|
|
}
|
|
|
|
|
});
|
2021-06-25 17:10:11 +09:00
|
|
|
|
|
|
|
|
$("#userpno2").on("keyup", function () {
|
|
|
|
|
setbirthday(val("userpno1") + val("userpno2"));
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
function setbirthday(userpno) {
|
|
|
|
|
var birthday = "";
|
|
|
|
|
if (userpno.length == 13 && moment(userpno.substr(0, 6), 'YYMMDD', true).isValid() && userpno.substr(6, 1) > 0)
|
|
|
|
|
{
|
|
|
|
|
switch (userpno.substr(6, 1))
|
|
|
|
|
{
|
|
|
|
|
case "1":
|
|
|
|
|
birthday = "19";
|
|
|
|
|
break;
|
|
|
|
|
case "2":
|
|
|
|
|
birthday = "19";
|
|
|
|
|
break;
|
|
|
|
|
case "3":
|
|
|
|
|
birthday = "20";
|
|
|
|
|
break;
|
|
|
|
|
case "4":
|
|
|
|
|
birthday = "20";
|
|
|
|
|
break;
|
|
|
|
|
case "5":
|
|
|
|
|
birthday = "19";
|
|
|
|
|
break;
|
|
|
|
|
case "6":
|
|
|
|
|
birthday = "19";
|
|
|
|
|
break;
|
|
|
|
|
case "7":
|
|
|
|
|
birthday = "20";
|
|
|
|
|
break;
|
|
|
|
|
case "8":
|
|
|
|
|
birthday = "20";
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
birthday += userpno.substr(0, 2) + "-" + userpno.substr(2, 2) + "-" + userpno.substr(4, 2);
|
|
|
|
|
}
|
|
|
|
|
if (val("birthday") == "" && birthday != "") {
|
|
|
|
|
$("#txtbirthday").text(birthday.replace(/-/gi, "."));
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-10-12 14:39:23 +09:00
|
|
|
function setemail2() {
|
|
|
|
|
setv("email2", val("email3"));
|
|
|
|
|
}
|
|
|
|
|
function bindassign(v) {
|
|
|
|
|
$("#asno").val(v.split(':')[0]);
|
|
|
|
|
$("#asname").text(v.split(':')[1]);
|
|
|
|
|
}
|
|
|
|
|
function save(idx) {
|
2021-06-25 17:10:11 +09:00
|
|
|
if (idx == 1) {
|
2020-10-12 14:39:23 +09:00
|
|
|
setv("userpass", val("userpass").replace(/ /, '').replace(/ /, ''));
|
|
|
|
|
setv("userpass2", val("userpass2").replace(/ /, '').replace(/ /, ''));
|
|
|
|
|
setv("username", val("username").replace(/ /, '').replace(/ /, ''));
|
|
|
|
|
setv("usernameeng", val("usernameeng").replace(/ /, '').replace(/ /, ''));
|
|
|
|
|
setv("email", val("email1") + "@@" + val("email2"));
|
|
|
|
|
setv("email", val("email").replace(/ /, '').replace(/ /, ''));
|
|
|
|
|
setv("isacceptemail", ($("#acceptemail").prop("checked") ? "1" : "0"));
|
|
|
|
|
setv("mobile", val("mobile").replace(/ /, '').replace(/ /, ''));
|
|
|
|
|
setv("mobile", formatmobile(val("mobile")));
|
2020-10-29 17:12:47 +09:00
|
|
|
setv("userpno", val("userpno1") + val("userpno2"));
|
2021-06-25 17:10:11 +09:00
|
|
|
if (val("birthday") == "") {
|
|
|
|
|
var birthday = $("#txtbirthday").text().replace(/./gi, "-");
|
|
|
|
|
if (birthday != "") {
|
|
|
|
|
setv("birthday", birthday);
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-10-12 14:39:23 +09:00
|
|
|
setv("ccjobs", (($("#ccjobs1").prop("checked") ? ",12" : "") + ($("#ccjobs2").prop("checked") ? ",13" : "") + ($("#ccjobs3").prop("checked") ? ",14" : "") + ($("#ccjobs4").prop("checked") ? ",15" : "") + ($("#ccjobs5").prop("checked") ? ",16" : "") + ($("#ccjobs6").prop("checked") ? ",17" : "") + ($("#ccjobs7").prop("checked") ? ",18" : "")).substring(1));
|
|
|
|
|
setv("edus", ($("#edus1").prop("checked") ? "1" : "0") + ($("#edus2").prop("checked") ? "1" : "0") + ($("#edus3").prop("checked") ? "1" : "0") + ($("#edus4").prop("checked") ? "1" : "0") + ($("#edus5").prop("checked") ? "1" : "0"));
|
|
|
|
|
if (val("userpass") != "" && check("userpass", null, "비밀번호를 입력해주세요.")) { }
|
|
|
|
|
else if (val("userpass") != "" && !ispassword(val("userpass"))) { focus("userpass"); msg("(8자 이상, 영문/숫자/특수기호 포함) 규칙으로 비밀번호를 입력해주세요."); }
|
|
|
|
|
else if (val("userpass") != "" && val("userpass") != val("userpass2")) { focus("userpass2"); msg("비밀번호 확인이 다릅니다."); }
|
|
|
|
|
else if (check("mobile", null, "휴대전화번호를 입력해주세요.")) { }
|
|
|
|
|
else if (!ismobilenumber(val("mobile"))) { focus("mobile"); msg("휴대전화번호를 확인해주세요."); }
|
|
|
|
|
else if (!isemail(val("email"))) { focus("email1"); msg("올바른 이메일주소를 입력해주세요."); }
|
2021-04-30 17:28:30 +09:00
|
|
|
else if ($("input:radio[name='isCompany']:checked").val() == "1" && check("asno", "btnassign", "직장을 선택해주세요.")) { }
|
2020-10-12 14:39:23 +09:00
|
|
|
else {
|
|
|
|
|
cap("/fcommon/usersave", "mform", "cbsave");
|
|
|
|
|
}
|
|
|
|
|
} else if (idx == 0) {
|
|
|
|
|
$('html, body').addClass('lock');
|
|
|
|
|
$("#pop1").fadeIn("fast");
|
|
|
|
|
} else if (idx == -1) {
|
|
|
|
|
confirmtoggle(true, "탈퇴를 진행하시겠습니까?", "gogo()");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
function gogo() {
|
|
|
|
|
capp("/fcommon/userexit", { exitreason: val("exitreason") }, "cbexit");
|
|
|
|
|
}
|
|
|
|
|
function cbexit() {
|
|
|
|
|
if (capResult.code == 1000) {
|
|
|
|
|
msg("탈퇴처리되었습니다.", null, null, null, "location.href='/Account/Logout';");
|
|
|
|
|
} else {
|
|
|
|
|
msgadmin();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
function cbsave() {
|
|
|
|
|
if (capResult.code == 1000) {
|
|
|
|
|
msg("저장되었습니다.");
|
|
|
|
|
} else if (capResult.obj == -2) {
|
|
|
|
|
msg("이미 사용중인 이메일주소입니다. 다른 이메일주소를 사용해주세요.");
|
|
|
|
|
} else {
|
|
|
|
|
msgadmin();
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-11-30 14:44:19 +09:00
|
|
|
|
|
|
|
|
function selectTab(type) {
|
|
|
|
|
if (type == "user") {
|
|
|
|
|
$("#liSnsTab").removeClass("current");
|
|
|
|
|
$("#liUserTab").addClass("current");
|
|
|
|
|
$(".lgnWrap").hide();
|
|
|
|
|
$(".clsTable").show();
|
|
|
|
|
$(".lctBtn").show();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
$("#liUserTab").removeClass("current");
|
|
|
|
|
$("#liSnsTab").addClass("current");
|
|
|
|
|
$(".clsTable").hide();
|
|
|
|
|
$(".lgnWrap").show();
|
|
|
|
|
$(".lctBtn").hide();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function cancelSnsLink() {
|
2020-12-01 11:10:34 +09:00
|
|
|
confirmtoggle(true, "SNS 연동을 해제 하시겠습니까?", "snsLink()");
|
2020-11-30 14:44:19 +09:00
|
|
|
}
|
|
|
|
|
function snsLink() {
|
|
|
|
|
capp("/focommon/SnsLink", { snsid: null, jointype: 0 }, "afterSnsLink");
|
|
|
|
|
}
|
|
|
|
|
function afterSnsLink() {
|
|
|
|
|
if (capResult.code > 0) {
|
2020-12-28 15:56:16 +09:00
|
|
|
msg("SNS 연동을 해제하였습니다.");
|
2020-11-30 16:24:53 +09:00
|
|
|
location.href = "/My/MyinfoCheck";
|
2020-11-30 14:44:19 +09:00
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
msg("SNS 연동해제에 실패하였습니다. \r\n관리자에게 문의하세요.");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
function confirmSns(jointype) {
|
|
|
|
|
if (jointype == 1) {
|
2020-12-01 11:10:34 +09:00
|
|
|
if (confirm("구글 아이디로 연동하시겠습니까?")) {
|
|
|
|
|
loginWithGoogle();
|
|
|
|
|
}
|
2020-11-30 14:44:19 +09:00
|
|
|
}
|
|
|
|
|
else if (jointype == 2) {
|
2020-12-01 11:10:34 +09:00
|
|
|
if (confirm("네이버 아이디로 연동하시겠습니까?")) {
|
|
|
|
|
loginWithNaver();
|
|
|
|
|
}
|
2020-11-30 14:44:19 +09:00
|
|
|
}
|
|
|
|
|
else if (jointype == 3) {
|
2020-12-01 11:10:34 +09:00
|
|
|
if (confirm("카카오 아이디로 연동하시겠습니까?")) {
|
|
|
|
|
loginWithKakao();
|
|
|
|
|
}
|
2020-11-30 14:44:19 +09:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
var gauth;
|
|
|
|
|
function googleInit() {
|
|
|
|
|
gapi.load('auth2', function () {var gauth = gapi.auth2.init({client_id: "@googleClientId", scope: 'profile'});gauth.then(function () {console.log('google init success');}, function () {console.error('google init fail');})});
|
|
|
|
|
}
|
2020-12-21 08:37:18 +09:00
|
|
|
var naverLogin = new naver.LoginWithNaverId({ clientId: "@naverClientId", callbackUrl: "https://cte.nptc.kr/Account/SNSLinkCallback?jointype=2",isPopup: true,loginButton: { color: "green", type: 3, height: 60 }});
|
2020-11-30 14:44:19 +09:00
|
|
|
|
|
|
|
|
function loginWithKakao() {
|
|
|
|
|
Kakao.Auth.login({
|
|
|
|
|
success: function (authObj) {
|
2020-12-16 13:39:57 +09:00
|
|
|
location.href = "/Account/SNSLinkCallback?jointype=3"
|
2020-11-30 14:44:19 +09:00
|
|
|
},
|
|
|
|
|
fail: function (err) {
|
2020-12-28 15:56:16 +09:00
|
|
|
msg("카카오 아이디로 로그인에 실패했습니다.");
|
2020-11-30 14:44:19 +09:00
|
|
|
console.log(JSON.stringify(err))
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function loginWithGoogle() {
|
|
|
|
|
gauth = gapi.auth2.getAuthInstance();
|
|
|
|
|
gauth.signIn().then(function () {
|
2020-12-16 13:39:57 +09:00
|
|
|
location.href = "/Account/SNSLinkCallback?jointype=1"
|
2020-11-30 14:44:19 +09:00
|
|
|
}, function () {
|
2020-12-28 15:56:16 +09:00
|
|
|
msg("구글 아이디로 로그인에 실패했습니다.");
|
2020-11-30 14:44:19 +09:00
|
|
|
return;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function loginWithNaver() {
|
|
|
|
|
$("#naverIdLogin_loginButton > img").trigger("click");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function snsInit() {
|
|
|
|
|
naverLogin.init();
|
|
|
|
|
Kakao.init("@kakaoClientId");
|
|
|
|
|
}
|
2020-10-12 14:39:23 +09:00
|
|
|
</script>
|
2020-11-30 16:24:53 +09:00
|
|
|
<script src="https://apis.google.com/js/platform.js?onload=googleInit" async defer></script> @*header가 아니라 하단에 위치해야 읽어올수있음*@
|
2020-10-12 14:39:23 +09:00
|
|
|
}
|