Fix: button classes revised
This commit is contained in:
@@ -15,9 +15,9 @@
|
||||
|
||||
<!-- library source files -->
|
||||
<script src="../../game/lib/input_type_text.js"></script>
|
||||
<script src="../../game/lib/round_rect_button.js"></script>
|
||||
<script src="../../game/lib/back_button.js"></script>
|
||||
<script src="../../game/lib/fullscreen_button.js"></script>
|
||||
<script src="../../game/lib/button/round_rect_button.js"></script>
|
||||
<script src="../../game/lib/button/back_button.js"></script>
|
||||
<script src="../../game/lib/button/fullscreen_button.js"></script>
|
||||
<script src="../../game/lib/db_connect_manager.js"></script>
|
||||
|
||||
<!-- source files -->
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
|
||||
<!-- library source files -->
|
||||
<script src="../../game/lib/input_type_text.js"></script>
|
||||
<script src="../../game/lib/round_rect_button.js"></script>
|
||||
<script src="../../game/lib/back_button.js"></script>
|
||||
<script src="../../game/lib/fullscreen_button.js"></script>
|
||||
<script src="../../game/lib/app_button.js"></script>
|
||||
<script src="../../game/lib/game_app_button.js"></script>
|
||||
<script src="../../game/lib/button/round_rect_button.js"></script>
|
||||
<script src="../../game/lib/button/back_button.js"></script>
|
||||
<script src="../../game/lib/button/fullscreen_button.js"></script>
|
||||
<script src="../../game/lib/button/game_app_button.js"></script>
|
||||
<script src="../../game/lib/button/typing_tab_button.js"></script>
|
||||
<script src="../../game/lib/screen_bottom.js"></script>
|
||||
<script src="../../game/lib/db_connect_manager.js"></script>
|
||||
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
|
||||
<!-- library source files -->
|
||||
<script src="../../game/lib/input_type_text.js"></script>
|
||||
<script src="../../game/lib/round_rect_button.js"></script>
|
||||
<script src="../../game/lib/back_button.js"></script>
|
||||
<script src="../../game/lib/fullscreen_button.js"></script>
|
||||
<script src="../../game/lib/app_button.js"></script>
|
||||
<script src="../../game/lib/game_app_button.js"></script>
|
||||
<script src="../../game/lib/button/round_rect_button.js"></script>
|
||||
<script src="../../game/lib/button/back_button.js"></script>
|
||||
<script src="../../game/lib/button/fullscreen_button.js"></script>
|
||||
<script src="../../game/lib/button/app_button.js"></script>
|
||||
<script src="../../game/lib/button/game_app_button.js"></script>
|
||||
<script src="../../game/lib/screen_bottom.js"></script>
|
||||
<script src="../../game/lib/db_connect_manager.js"></script>
|
||||
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
|
||||
<!-- library source files -->
|
||||
<script src="../../game/lib/input_type_text.js"></script>
|
||||
<script src="../../game/lib/round_rect_button.js"></script>
|
||||
<script src="../../game/lib/back_button.js"></script>
|
||||
<script src="../../game/lib/fullscreen_button.js"></script>
|
||||
<script src="../../game/lib/app_button.js"></script>
|
||||
<script src="../../game/lib/typing_practice_button.js"></script>
|
||||
<script src="../../game/lib/button/round_rect_button.js"></script>
|
||||
<script src="../../game/lib/button/back_button.js"></script>
|
||||
<script src="../../game/lib/button/fullscreen_button.js"></script>
|
||||
<script src="../../game/lib/button/typing_practice_button.js"></script>
|
||||
<script src="../../game/lib/button/typing_tab_button.js"></script>
|
||||
<script src="../../game/lib/screen_bottom.js"></script>
|
||||
<script src="../../game/lib/db_connect_manager.js"></script>
|
||||
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
|
||||
<!-- library source files -->
|
||||
<script src="../../game/lib/input_type_text.js"></script>
|
||||
<script src="../../game/lib/round_rect_button.js"></script>
|
||||
<script src="../../game/lib/back_button.js"></script>
|
||||
<script src="../../game/lib/fullscreen_button.js"></script>
|
||||
<script src="../../game/lib/app_button.js"></script>
|
||||
<script src="../../game/lib/typing_practice_button.js"></script>
|
||||
<script src="../../game/lib/button/round_rect_button.js"></script>
|
||||
<script src="../../game/lib/button/back_button.js"></script>
|
||||
<script src="../../game/lib/button/fullscreen_button.js"></script>
|
||||
<script src="../../game/lib/button/typing_practice_button.js"></script>
|
||||
<script src="../../game/lib/button/typing_tab_button.js"></script>
|
||||
<script src="../../game/lib/screen_bottom.js"></script>
|
||||
<script src="../../game/lib/db_connect_manager.js"></script>
|
||||
|
||||
|
||||
@@ -21,9 +21,9 @@
|
||||
<script src="../../game/lib/ranking_record_manager.js"></script>
|
||||
<script src="../../game/lib/db_connect_manager.js"></script>
|
||||
<script src="../../game/lib/input_type_text.js"></script>
|
||||
<script src="../../game/lib/round_rect_button.js"></script>
|
||||
<script src="../../game/lib/back_button.js"></script>
|
||||
<script src="../../game/lib/fullscreen_button.js"></script>
|
||||
<script src="../../game/lib/button/round_rect_button.js"></script>
|
||||
<script src="../../game/lib/button/back_button.js"></script>
|
||||
<script src="../../game/lib/button/fullscreen_button.js"></script>
|
||||
<script src="../../game/lib/screen_bottom.js"></script>
|
||||
<script src="../../game/lib/announce_box.js"></script>
|
||||
<script src="../../game/lib/animal.js"></script>
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
<script src="../../game/lib/score_board.js"></script>
|
||||
<script src="../../game/lib/score_text.js"></script>
|
||||
<script src="../../game/lib/heart_gauge.js"></script>
|
||||
<script src="../../game/lib/round_rect_button.js"></script>
|
||||
<script src="../../game/lib/back_button.js"></script>
|
||||
<script src="../../game/lib/fullscreen_button.js"></script>
|
||||
<script src="../../game/lib/button/round_rect_button.js"></script>
|
||||
<script src="../../game/lib/button/back_button.js"></script>
|
||||
<script src="../../game/lib/button/fullscreen_button.js"></script>
|
||||
<script src="../../game/lib/db_connect_manager.js"></script>
|
||||
<script src="../../game/lib/screen_bottom.js"></script>
|
||||
<script src="../../game/lib/game_over_text.js"></script>
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
<script src="../../game/lib/history_record_manager.js"></script>
|
||||
<script src="../../game/lib/db_connect_manager.js"></script>
|
||||
<script src="../../game/lib/input_type_text.js"></script>
|
||||
<script src="../../game/lib/round_rect_button.js"></script>
|
||||
<script src="../../game/lib/back_button.js"></script>
|
||||
<script src="../../game/lib/fullscreen_button.js"></script>
|
||||
<script src="../../game/lib/button/round_rect_button.js"></script>
|
||||
<script src="../../game/lib/button/back_button.js"></script>
|
||||
<script src="../../game/lib/button/fullscreen_button.js"></script>
|
||||
<script src="../../game/lib/screen_bottom.js"></script>
|
||||
<script src="../../game/lib/how_to_play.js"></script>
|
||||
<script src="../../game/lib/chart.js"></script>
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
<script src="../../game/lib/number_util.js"></script>
|
||||
<script src="../../game/lib/history_record_manager.js"></script>
|
||||
<script src="../../game/lib/input_type_text.js"></script>
|
||||
<script src="../../game/lib/round_rect_button.js"></script>
|
||||
<script src="../../game/lib/back_button.js"></script>
|
||||
<script src="../../game/lib/fullscreen_button.js"></script>
|
||||
<script src="../../game/lib/button/round_rect_button.js"></script>
|
||||
<script src="../../game/lib/button/back_button.js"></script>
|
||||
<script src="../../game/lib/button/fullscreen_button.js"></script>
|
||||
<script src="../../game/lib/db_connect_manager.js"></script>
|
||||
<script src="../../game/lib/screen_bottom.js"></script>
|
||||
<script src="../../game/lib/game_over_text.js"></script>
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
<script src="../../game/lib/number_util.js"></script>
|
||||
<script src="../../game/lib/history_record_manager.js"></script>
|
||||
<script src="../../game/lib/input_type_text.js"></script>
|
||||
<script src="../../game/lib/round_rect_button.js"></script>
|
||||
<script src="../../game/lib/back_button.js"></script>
|
||||
<script src="../../game/lib/fullscreen_button.js"></script>
|
||||
<script src="../../game/lib/button/round_rect_button.js"></script>
|
||||
<script src="../../game/lib/button/back_button.js"></script>
|
||||
<script src="../../game/lib/button/fullscreen_button.js"></script>
|
||||
<script src="../../game/lib/db_connect_manager.js"></script>
|
||||
<script src="../../game/lib/screen_bottom.js"></script>
|
||||
<script src="../../game/lib/game_over_text.js"></script>
|
||||
|
||||
@@ -1,27 +1,64 @@
|
||||
<?php
|
||||
header('Content-Type: application/json');
|
||||
header("Content-Type: application/json");
|
||||
|
||||
$maestro_id = $_POST["maestro_id"];
|
||||
|
||||
include "./../lib/send_reply_json.php";
|
||||
include "./../setup/connect_db.php";
|
||||
|
||||
|
||||
$replyJSON["Korean"] = get_active_typing_practice_app_list($maestro_id, 1);
|
||||
$replyJSON["English"] = get_active_typing_practice_app_list($maestro_id, 2);
|
||||
$db_conn->close();
|
||||
|
||||
if($replyJSON.length === 0) {
|
||||
send_error_message($replyJSON, "앱 목록 가져오기 실패");
|
||||
$db_conn->close();
|
||||
$koreanAppList = get_typing_practice_app_list(1);
|
||||
if($koreanAppList === null) {
|
||||
set_error_code("no_app_list");
|
||||
set_error_message("앱 목록을 가져오지 못했습니다.");
|
||||
send_result_fail();
|
||||
exit;
|
||||
}
|
||||
$englishAppList = get_typing_practice_app_list(2);
|
||||
if($englishAppList === null) {
|
||||
set_error_code("no_app_list");
|
||||
set_error_message("앱 목록을 가져오지 못했습니다.");
|
||||
send_result_fail();
|
||||
exit;
|
||||
}
|
||||
$koreanActiveAppList = get_active_typing_practice_app_list($maestro_id, 1);
|
||||
$englishActiveAppList = get_active_typing_practice_app_list($maestro_id, 2);
|
||||
|
||||
echo json_encode($replyJSON, JSON_UNESCAPED_UNICODE);
|
||||
$db_conn->close();
|
||||
set_data("KoreanAppList", $koreanAppList);
|
||||
set_data("EnglishAppList", $englishAppList);
|
||||
set_data("KoreanActiveAppList", $koreanActiveAppList);
|
||||
set_data("EnglishActiveAppList", $englishActiveAppList);
|
||||
send_result_success();
|
||||
exit;
|
||||
|
||||
|
||||
|
||||
function get_active_typing_practice_app_list($maestro_id, $type) {
|
||||
function get_typing_practice_app_list($appType) {
|
||||
global $db_conn;
|
||||
|
||||
$query = "
|
||||
SELECT AppID, AppName, KoreanName
|
||||
FROM app
|
||||
WHERE AppType = ? AND Status = 1
|
||||
ORDER BY AppID ASC";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
$stmt->bind_param('i', $appType);
|
||||
$stmt->execute();
|
||||
$stmt->bind_result($app_id, $app_name, $korean_name);
|
||||
|
||||
$return_array = array();
|
||||
while($stmt->fetch()) {
|
||||
$row_array['AppID'] = $app_id;
|
||||
$row_array['AppName'] = $app_name;
|
||||
$row_array['KoreanName'] = $korean_name;
|
||||
array_push($return_array, $row_array);
|
||||
}
|
||||
$stmt->close();
|
||||
|
||||
return $return_array;
|
||||
}
|
||||
|
||||
function get_active_typing_practice_app_list($maestro_id, $appType) {
|
||||
global $db_conn;
|
||||
|
||||
$query = "
|
||||
@@ -31,7 +68,7 @@ function get_active_typing_practice_app_list($maestro_id, $type) {
|
||||
ON A.AppID = AA.AppID AND AA.MaestroID = ? AND A.AppType = ?
|
||||
ORDER BY A.AppID ASC";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
$stmt->bind_param('ii', $maestro_id, $type);
|
||||
$stmt->bind_param('ii', $maestro_id, $appType);
|
||||
$stmt->execute();
|
||||
$stmt->bind_result($app_id, $app_name, $korean_name);
|
||||
|
||||
|
||||
@@ -3,25 +3,62 @@ header('Content-Type: application/json');
|
||||
|
||||
$maestro_id = $_POST["maestro_id"];
|
||||
|
||||
include "./../lib/send_reply_json.php";
|
||||
include "./../setup/connect_db.php";
|
||||
|
||||
|
||||
$replyJSON["Korean"] = get_active_typing_practice_app_list($maestro_id, 11);
|
||||
$replyJSON["English"] = get_active_typing_practice_app_list($maestro_id, 12);
|
||||
$db_conn->close();
|
||||
|
||||
if($replyJSON.length === 0) {
|
||||
send_error_message($replyJSON, "앱 목록 가져오기 실패");
|
||||
$db_conn->close();
|
||||
$koreanAppList = get_typing_practice_app_list(11);
|
||||
if($koreanAppList === null) {
|
||||
set_error_code("no_app_list");
|
||||
set_error_message("앱 목록을 가져오지 못했습니다.");
|
||||
send_result_fail();
|
||||
exit;
|
||||
}
|
||||
$englishAppList = get_typing_practice_app_list(12);
|
||||
if($englishAppList === null) {
|
||||
set_error_code("no_app_list");
|
||||
set_error_message("앱 목록을 가져오지 못했습니다.");
|
||||
send_result_fail();
|
||||
exit;
|
||||
}
|
||||
$koreanActiveAppList = get_active_typing_practice_app_list($maestro_id, 11);
|
||||
$englishActiveAppList = get_active_typing_practice_app_list($maestro_id, 12);
|
||||
|
||||
echo json_encode($replyJSON, JSON_UNESCAPED_UNICODE);
|
||||
$db_conn->close();
|
||||
set_data("KoreanAppList", $koreanAppList);
|
||||
set_data("EnglishAppList", $englishAppList);
|
||||
set_data("KoreanActiveAppList", $koreanActiveAppList);
|
||||
set_data("EnglishActiveAppList", $englishActiveAppList);
|
||||
send_result_success();
|
||||
exit;
|
||||
|
||||
|
||||
|
||||
function get_active_typing_practice_app_list($maestro_id, $type) {
|
||||
function get_typing_practice_app_list($appType) {
|
||||
global $db_conn;
|
||||
|
||||
$query = "
|
||||
SELECT AppID, AppName, KoreanName
|
||||
FROM app
|
||||
WHERE AppType = ? AND Status = 1
|
||||
ORDER BY AppID ASC";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
$stmt->bind_param('i', $appType);
|
||||
$stmt->execute();
|
||||
$stmt->bind_result($app_id, $app_name, $korean_name);
|
||||
|
||||
$return_array = array();
|
||||
while($stmt->fetch()) {
|
||||
$row_array['AppID'] = $app_id;
|
||||
$row_array['AppName'] = $app_name;
|
||||
$row_array['KoreanName'] = $korean_name;
|
||||
array_push($return_array, $row_array);
|
||||
}
|
||||
$stmt->close();
|
||||
|
||||
return $return_array;
|
||||
}
|
||||
|
||||
function get_active_typing_practice_app_list($maestro_id, $appType) {
|
||||
global $db_conn;
|
||||
|
||||
$query = "
|
||||
@@ -31,7 +68,7 @@ function get_active_typing_practice_app_list($maestro_id, $type) {
|
||||
ON A.AppID = AA.AppID AND AA.MaestroID = ? AND A.AppType = ?
|
||||
ORDER BY A.AppID ASC";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
$stmt->bind_param('ii', $maestro_id, $type);
|
||||
$stmt->bind_param('ii', $maestro_id, $appType);
|
||||
$stmt->execute();
|
||||
$stmt->bind_result($app_id, $app_name, $korean_name);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user