Fix: allow korean maestro id
This commit is contained in:
@@ -30,6 +30,10 @@ class Login {
|
|||||||
this.makeMaestroNameText(textX, 200);
|
this.makeMaestroNameText(textX, 200);
|
||||||
this.makeNameText(textX, 300);
|
this.makeNameText(textX, 300);
|
||||||
this.makeEnterCodeText(textX, 360);
|
this.makeEnterCodeText(textX, 360);
|
||||||
|
|
||||||
|
if(sessionStorageManager.maestroID === null)
|
||||||
|
this.inputTextMaestroName.canvasInput.focus();
|
||||||
|
else
|
||||||
this.inputTextName.canvasInput.focus();
|
this.inputTextName.canvasInput.focus();
|
||||||
|
|
||||||
this.makeStartButton(game.world.centerX, game.world.centerY + 100);
|
this.makeStartButton(game.world.centerX, game.world.centerY + 100);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
class AccountValidator {
|
class AccountValidator {
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this.patternMaestroID = /^[A-Za-z]{1}[A-Za-z0-9]{3,19}$/;
|
this.patternMaestroID = /^[A-Za-z가-힣]{1}[A-Za-z0-9가-힣]{2,19}$/;
|
||||||
this.patternMaestroPW = /^[A-Za-z0-9]{4,16}$/;
|
this.patternMaestroPW = /^[A-Za-z0-9]{4,16}$/;
|
||||||
|
|
||||||
this.patternPlayerID = /^[A-Za-z0-9가-힣-_]{1,8}$/;
|
this.patternPlayerID = /^[A-Za-z0-9가-힣-_]{1,8}$/;
|
||||||
|
|||||||
@@ -89,6 +89,7 @@ function checkData() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
password = $("#password").val();
|
password = $("#password").val();
|
||||||
|
console.log("password : " + password);
|
||||||
if(password.length === 0) {
|
if(password.length === 0) {
|
||||||
showErrorMessage("암호를 입력해 주세요.", "error");
|
showErrorMessage("암호를 입력해 주세요.", "error");
|
||||||
$("#password").focus();
|
$("#password").focus();
|
||||||
@@ -239,7 +240,7 @@ $('#myTab a').on('click', function (e) {
|
|||||||
<label for="maestro_name" class="col-sm-2 col-form-label">* 아이디</label>
|
<label for="maestro_name" class="col-sm-2 col-form-label">* 아이디</label>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<input type="text" class="form-control" id="maestro_name" placeholder="아이디 입력">
|
<input type="text" class="form-control" id="maestro_name" placeholder="아이디 입력">
|
||||||
<small class="form-text text-muted">4~20 글자. 영문, 숫자만 사용 가능합니다.</small>
|
<small class="form-text text-muted">4~20 글자. 한글도 사용 가능합니다.</small>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
<input type="button" id="id_ckeck" class="btn btn-outline-dark" value="중복 체크" onClick="checkMaestroID()">
|
<input type="button" id="id_ckeck" class="btn btn-outline-dark" value="중복 체크" onClick="checkMaestroID()">
|
||||||
@@ -250,7 +251,7 @@ $('#myTab a').on('click', function (e) {
|
|||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label for="password" class="col-sm-2 col-form-label">* 암호</label>
|
<label for="password" class="col-sm-2 col-form-label">* 암호</label>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<input type="password" class="form-control" id="password" placeholder="Password">
|
<input type="text" class="form-control" id="password" placeholder="Password">
|
||||||
<small class="form-text text-muted">4~16 글자. 영문, 숫자만 사용 가능합니다.</small>
|
<small class="form-text text-muted">4~16 글자. 영문, 숫자만 사용 가능합니다.</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ $password = $_POST["password"];
|
|||||||
$maestroID = get_maestro_id($maestroName);
|
$maestroID = get_maestro_id($maestroName);
|
||||||
if($maestroID === null) {
|
if($maestroID === null) {
|
||||||
set_error_code("not_registered_id");
|
set_error_code("not_registered_id");
|
||||||
set_error_message("등록되지 않은 마에스트로 아이디입니다.");
|
set_error_message("등록되지 않았거나 아직 승인되지 않은 마에스트로 아이디입니다.");
|
||||||
send_result_fail();
|
send_result_fail();
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@@ -58,7 +58,7 @@ function get_maestro_id($maestroName) {
|
|||||||
$query = "
|
$query = "
|
||||||
SELECT MaestroID
|
SELECT MaestroID
|
||||||
FROM maestro
|
FROM maestro
|
||||||
WHERE Name = ?
|
WHERE Name = ? AND ActivateStatus = 1
|
||||||
";
|
";
|
||||||
$stmt = $db_conn->prepare($query);
|
$stmt = $db_conn->prepare($query);
|
||||||
$stmt->bind_param("s", $maestroName);
|
$stmt->bind_param("s", $maestroName);
|
||||||
|
|||||||
Reference in New Issue
Block a user