From f81868e3a50ecc82894112a0d91808f402b01d48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8B=E1=85=A2=E1=84=91=E1=85=B3=E1=86=AF=20=E1=84=82?= =?UTF-8?q?=E1=85=A9=E1=84=90=E1=85=B3=E1=84=87=E1=85=AE=E1=86=A8?= Date: Tue, 4 Sep 2018 17:58:42 +0900 Subject: [PATCH] Fix: maestro main page player count bug --- ServerSetup.readme | 5 ++++- .../module/maestro_section_add_player.html | 20 +++++++++--------- src/web/server/maestro/maestro_info.php | 21 ++++++++++++++++++- 3 files changed, 34 insertions(+), 12 deletions(-) diff --git a/ServerSetup.readme b/ServerSetup.readme index 4e9b483..c9e48f1 100644 --- a/ServerSetup.readme +++ b/ServerSetup.readme @@ -76,8 +76,11 @@ vi /etc/httpd/conf/httpd.conf +# git 설치 및 설정 +http://morningame.tistory.com/27 - +scp id_rsa.pub jisangs@106.10.45.240:/home/jisangs/ +scp id_rsa.pub git@106.10.45.240:/home/git/ diff --git a/src/web/module/maestro_section_add_player.html b/src/web/module/maestro_section_add_player.html index d7651f6..e16540b 100644 --- a/src/web/module/maestro_section_add_player.html +++ b/src/web/module/maestro_section_add_player.html @@ -153,7 +153,7 @@ function onErrorPlayerPW(message) { - + @@ -161,7 +161,7 @@ function onErrorPlayerPW(message) { - + @@ -169,7 +169,7 @@ function onErrorPlayerPW(message) { - + @@ -177,7 +177,7 @@ function onErrorPlayerPW(message) { - + @@ -185,7 +185,7 @@ function onErrorPlayerPW(message) { - + @@ -193,7 +193,7 @@ function onErrorPlayerPW(message) { - + @@ -201,7 +201,7 @@ function onErrorPlayerPW(message) { - + @@ -209,7 +209,7 @@ function onErrorPlayerPW(message) { - + @@ -217,7 +217,7 @@ function onErrorPlayerPW(message) { - + @@ -225,7 +225,7 @@ function onErrorPlayerPW(message) { - + diff --git a/src/web/server/maestro/maestro_info.php b/src/web/server/maestro/maestro_info.php index c43d399..e297dbc 100644 --- a/src/web/server/maestro/maestro_info.php +++ b/src/web/server/maestro/maestro_info.php @@ -13,11 +13,12 @@ if($info === null) { send_result_fail(); exit; } +$playerCount = getPlayerCount($maestroID); set_data("name", $info["name"]); set_data("email", $info["email"]); set_data("accountType", $info["accountType"]); -set_data("playerCount", $info["playerCount"]); +set_data("playerCount", $playerCount); send_result_success(); exit; @@ -46,4 +47,22 @@ function get_maestro_info($maestroID) { return $info; } +function getPlayerCount($maestroID) { + global $db_conn; + + $query = " + SELECT COUNT(PlayerID) + FROM player + WHERE MaestroID = ? AND AccountType <> 1 + "; + $stmt = $db_conn->prepare($query); + $stmt->bind_param("i", $maestroID); + $stmt->execute(); + $stmt->bind_result($playerCount); + $stmt->fetch(); + $stmt->close(); + + return $playerCount; +} + ?> \ No newline at end of file