160 lines
4.4 KiB
HTML
160 lines
4.4 KiB
HTML
<script>
|
|
|
|
$(document).ready(function() {
|
|
$("#maestro_name").focus();
|
|
|
|
$("#password").keydown(function(key) {
|
|
if(key.keyCode == 13)
|
|
login();
|
|
})
|
|
});
|
|
|
|
function togglePassword() {
|
|
var $pw = $("#password");
|
|
var show = $pw.attr("type") === "password";
|
|
$pw.attr("type", show ? "text" : "password");
|
|
$("#toggle_password").attr("aria-pressed", show)
|
|
.find("span").toggleClass("oi-eye", !show).toggleClass("oi-lock-locked", show);
|
|
}
|
|
|
|
function login() {
|
|
var name = $("#maestro_name").val();
|
|
var password = $("#password").val();
|
|
|
|
if(name.length === 0) {
|
|
showErrorMessage("아이디를 입력해 주세요.", "error");
|
|
$("#maestro_name").focus();
|
|
return;
|
|
} else if(password.length === 0) {
|
|
showErrorMessage("암호를 입력해 주세요.", "error");
|
|
$("#password").focus();
|
|
return;
|
|
}
|
|
|
|
sendRequestServer( //url, sendParams, onSuccess, onFail, isDebugMode);
|
|
"./../server/maestro/login.php",
|
|
"maestro_name=" + name + "&password=" + password,
|
|
|
|
(function(jsonData) {
|
|
sessionStorage.setItem("maestroID", jsonData["maestroID"]);
|
|
sessionStorage.setItem("maestroAccountType", jsonData["maestroAccountType"]);
|
|
|
|
location.href = './../maestro/main_menu.html';
|
|
}),
|
|
|
|
(function(errorMessage, errorCode) {
|
|
console.log("errorCode : " + errorCode);
|
|
|
|
var errorType = "error";
|
|
switch(errorCode) {
|
|
case "not_registered_id":
|
|
$("#maestro_name").val("");
|
|
$("#maestro_name").focus();
|
|
break;
|
|
|
|
case "wrong_password":
|
|
$("#password").val("");
|
|
$("#password").focus();
|
|
break;
|
|
}
|
|
|
|
showErrorMessage(errorMessage, errorType);
|
|
})
|
|
|
|
);
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
<div class="container">
|
|
|
|
<div class="border border-primary rounded px-5 py-4 my-3">
|
|
|
|
<h4 class="mb-4">로그인</h4>
|
|
|
|
<div id="message_box">
|
|
</div>
|
|
|
|
<form class="mx-4">
|
|
<div class="form-group row">
|
|
<label for="maestro_name" class="col-sm-2 col-form-label">* 아이디</label>
|
|
<div class="col-sm-4">
|
|
<input type="text" class="form-control" id="maestro_name" placeholder="아이디 입력">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group row">
|
|
<label for="password" class="col-sm-2 col-form-label">* 암호</label>
|
|
<div class="col-sm-4">
|
|
<div class="input-group">
|
|
<input type="password" class="form-control" id="password" placeholder="Password">
|
|
<div class="input-group-append">
|
|
<button type="button" class="btn btn-outline-secondary" id="toggle_password" title="암호 보기/숨기기" aria-label="암호 보기/숨기기" aria-pressed="false" onClick="togglePassword()"><span class="oi oi-eye" aria-hidden="true"></span></button>
|
|
</div>
|
|
</div>
|
|
<p><br/></p>
|
|
<button type="button" class="btn btn-primary btn-lg px-5" onClick="login()">로그인</button>
|
|
</div>
|
|
</div>
|
|
|
|
</form>
|
|
</div>
|
|
|
|
|
|
<div class="rounded px-5 py-4 my-3" style="background-color: #ffce54">
|
|
|
|
<h4 class="mb-4">마에스트로 유료 계정 가입시</h4>
|
|
|
|
<div class="row justify-content-center mb-3">
|
|
<div class="col-3">
|
|
<h5>컨텐츠</h5>
|
|
<ul>
|
|
<li>모든 앱 사용 가능</li>
|
|
<li>앱 활성화 설정 가능</li>
|
|
<li>앱 시작 전 광고 삭제</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="col-3">
|
|
<h5>학생 목록 관리</h5>
|
|
<ul>
|
|
<li>학생 등록 및 삭제</li>
|
|
<li>학생 정보 수정</li>
|
|
<li>학생 점수, 타수 서버 저장</li>
|
|
<li>학생 순위 표시</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="col-3">
|
|
<h5>계정 등록 비용 (금액 / 1년)</h5>
|
|
<ul>
|
|
<li>1만원 : 학생 20명</li>
|
|
<li>2만원 : 학생 30명</li>
|
|
<li>3만원 : 학생 100명</li>
|
|
<li>4만원 : 학생 500명</li>
|
|
<li>5만원 : 학생 1,000명</li>
|
|
</ul>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="rounded px-5 py-4 my-3" style="background-color: #99ccff">
|
|
|
|
<h4 class="mb-4">마에스트로 체험 계정</h4>
|
|
|
|
<p class="bg-dark text-light"><span class="font-weight-bold"><span class="font-weight-bold">2주</span>간 <span class="font-weight-bold text-warning">무료</span>로</span> 마에스트로 체험 계정을 사용해보세요.</p>
|
|
<p>
|
|
✓ 체험 기간 동안 유료 계정과 동일한 기능을 무료로 사용하실 수 있습니다.<br/>
|
|
✓ 마음에 들면 체험 기간이 끝나기 전에 유료 결제(유효기간 연장 / 업그레이드)를 부탁드립니다.</p>
|
|
<hr class="mt-4">
|
|
|
|
<p>
|
|
<a class="btn btn-primary btn-block btn-lg" role="button" href="./../main/register.html">마에스트로 체험 계정 가입</a>
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div> |