114 lines
2.7 KiB
HTML
114 lines
2.7 KiB
HTML
<script>
|
|
|
|
function login() {
|
|
let name = $("#maestro_name").val();
|
|
let 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,
|
|
|
|
(jsonData) => {
|
|
maestroID = jsonData["maestroID"];
|
|
sessionStorage.setItem("maestroID", maestroID);
|
|
|
|
location.href = './../maestro/main_menu.html';
|
|
},
|
|
|
|
(errorMessage, errorCode) => {
|
|
console.log("errorCode : " + errorCode);
|
|
|
|
let 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="px-5 py-4 my-3" style="background-color: #99ccff">
|
|
|
|
<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">
|
|
<input type="password" class="form-control" id="password" placeholder="Password">
|
|
<p><br/></p>
|
|
<button type="button" class="btn btn-primary btn-lg px-5" onClick="login()">로그인</button>
|
|
</div>
|
|
</div>
|
|
|
|
</form>
|
|
</div>
|
|
|
|
|
|
<div class="px-5 py-4 my-3" style="background-color: #66ccff">
|
|
|
|
<h4 class="mb-4">마에스트로 계정 가입</h4>
|
|
|
|
<div class="row justify-content-center mb-3">
|
|
<div class="col-4">
|
|
<h5>마에스트로 관리 기능</h5>
|
|
<ul>
|
|
<li>학생 등록 및 삭제</li>
|
|
<li>학생 정보 수정</li>
|
|
<li>앱 활성화 / 비활성화</li>
|
|
<li class="d-none">랭킹</li>
|
|
<li class="d-none">기록</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="col-4">
|
|
<h5>계정 등록 비용 (금액 / 1년)</h5>
|
|
<ul>
|
|
<li>1만원 : 학생 20명</li>
|
|
<li>2만원 : 학생 30명</li>
|
|
<li>3만원 : 학생 100명</li>
|
|
</ul>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<p><a class="btn btn-primary btn-block btn-lg" role="button" href="./../main/register.html">마에스트로 가입</a>
|
|
|
|
</div>
|
|
|
|
</div> |