Fix: revised php code to admin
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
header('Content-Type: application/json');
|
||||
header("Content-Type: application/json");
|
||||
|
||||
include "./../lib/send_reply_json.php";
|
||||
include "./../setup/connect_db.php";
|
||||
@@ -8,10 +8,10 @@ $maestro_name = $_POST["maestro_name"];
|
||||
$password = $_POST["password"];
|
||||
/*
|
||||
if(!is_numeric($enterCode)) {
|
||||
send_error_code('생년월일이 숫자가 아닙니다. : '.$enterCode);
|
||||
send_error_code("생년월일이 숫자가 아닙니다. : ".$enterCode);
|
||||
exit;
|
||||
} else if(strlen($enterCode) != 6) {
|
||||
send_error_code('6자리 숫자값을 정확히 입력하세요 : YYMMDD (예 : 120131) : '.$enterCode);
|
||||
send_error_code("6자리 숫자값을 정확히 입력하세요 : YYMMDD (예 : 120131) : ".$enterCode);
|
||||
exit;
|
||||
}
|
||||
*/
|
||||
@@ -30,7 +30,7 @@ if($login_data === null || $login_data[maestroID] === null) {
|
||||
exit;
|
||||
}
|
||||
|
||||
set_data("maestroId", $login_data[maestroID]);
|
||||
set_data("maestroID", $login_data[maestroID]);
|
||||
send_result_success();
|
||||
exit;
|
||||
|
||||
@@ -41,7 +41,7 @@ function get_maestro_id($maestro_name) {
|
||||
|
||||
$query = "SELECT MaestroID FROM moty_maestro WHERE Name=?";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
$stmt->bind_param('s', $maestro_name);
|
||||
$stmt->bind_param("s", $maestro_name);
|
||||
$stmt->execute();
|
||||
$stmt->bind_result($maestro_id);
|
||||
// while($stmt->fetch()) {
|
||||
@@ -58,7 +58,7 @@ function login($maestro_name, $password) {
|
||||
|
||||
$query = "SELECT MaestroID FROM moty_maestro WHERE Name=? AND Password=PASSWORD(?)";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
$stmt->bind_param('ss', $maestro_name, $password);
|
||||
$stmt->bind_param("ss", $maestro_name, $password);
|
||||
$stmt->execute();
|
||||
$stmt->bind_result($maestro_id);
|
||||
// while($stmt->fetch())
|
||||
|
||||
Reference in New Issue
Block a user