Fix: trial maestro account
This commit is contained in:
@@ -47,7 +47,7 @@ function extension_maestro($maestro_id, $new_available_date) {
|
||||
// ";
|
||||
$query = "
|
||||
UPDATE maestro
|
||||
SET ActivateStatus = 1, AvailableActivateDateTime = DATE_FORMAT(?, '%Y-%m-%d')
|
||||
SET ActivateStatus = 2, AvailableActivateDateTime = DATE_FORMAT(?, '%Y-%m-%d')
|
||||
WHERE MaestroID = ?;
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
|
||||
@@ -29,7 +29,7 @@ function get_maestro_upgrade_list() {
|
||||
global $db_conn;
|
||||
|
||||
$query = "
|
||||
SELECT U.MaestroUpgradeID, U.MaestroID, M.Name, U.RegisteredAccountType, U.RequestedAccountType, U.RequestedDateTime, M.AvailableActivateDateTime, U.Status
|
||||
SELECT U.MaestroUpgradeID, U.MaestroID, M.Name, U.RegisteredActivateStatus, U.RegisteredAccountType, U.RequestedAccountType, U.RequestedDateTime, M.AvailableActivateDateTime, U.Status
|
||||
FROM maestro_upgrade U, maestro M
|
||||
WHERE U.Status < 2 AND U.MaestroID = M.MaestroID
|
||||
ORDER BY U.MaestroUpgradeID DESC
|
||||
@@ -38,13 +38,14 @@ function get_maestro_upgrade_list() {
|
||||
// $stmt->bind_param("iii", $maestroID, $startNo, $endNo);
|
||||
// $stmt->bind_param("ii", $maestroName, $startNo);
|
||||
$stmt->execute();
|
||||
$stmt->bind_result($maestroUpgradeID, $maestroID, $maestroName, $registeredAccountType, $requestedAccountType, $requestedDateTime, $availableActivateDateTime, $status);
|
||||
$stmt->bind_result($maestroUpgradeID, $maestroID, $maestroName, $registeredActivateStatus, $registeredAccountType, $requestedAccountType, $requestedDateTime, $availableActivateDateTime, $status);
|
||||
|
||||
$maestroUpgradeList = array();
|
||||
while($stmt->fetch()) {
|
||||
$maestro["maestroUpgradeID"] = $maestroUpgradeID;
|
||||
$maestro["maestroID"] = $maestroID;
|
||||
$maestro["maestroName"] = $maestroName;
|
||||
$maestro["registeredActivateStatus"] = $registeredActivateStatus;
|
||||
$maestro["registeredAccountType"] = $registeredAccountType;
|
||||
$maestro["requestedAccountType"] = $requestedAccountType;
|
||||
$maestro["requestedDateTime"] = $requestedDateTime;
|
||||
@@ -60,7 +61,7 @@ function get_maestro_update_list_by_name($searchMaestroName) {
|
||||
global $db_conn;
|
||||
|
||||
$query = "
|
||||
SELECT U.MaestroUpgradeID, U.MaestroID, M.Name, U.RegisteredAccountType, U.RequestedAccountType, U.RequestedDateTime, M.AvailableActivateDateTime, U.Status
|
||||
SELECT U.MaestroUpgradeID, U.MaestroID, M.Name, U.RegisteredActivateStatus, U.RegisteredAccountType, U.RequestedAccountType, U.RequestedDateTime, M.AvailableActivateDateTime, U.Status
|
||||
FROM maestro_upgrade U, maestro M
|
||||
WHERE M.Name LIKE CONCAT('%', ?, '%') AND U.MaestroID = M.MaestroID
|
||||
ORDER BY U.MaestroUpgradeID DESC
|
||||
@@ -68,13 +69,14 @@ function get_maestro_update_list_by_name($searchMaestroName) {
|
||||
$stmt = $db_conn->prepare($query);
|
||||
$stmt->bind_param("s", $searchMaestroName);
|
||||
$stmt->execute();
|
||||
$stmt->bind_result($maestroUpgradeID, $maestroID, $maestroName, $registeredAccountType, $requestedAccountType, $requestedDateTime, $availableActivateDateTime, $status);
|
||||
$stmt->bind_result($maestroUpgradeID, $maestroID, $maestroName, $registeredActivateStatus, $registeredAccountType, $requestedAccountType, $requestedDateTime, $availableActivateDateTime, $status);
|
||||
|
||||
$maestroUpgradeList = array();
|
||||
while($stmt->fetch()) {
|
||||
$maestro["maestroUpgradeID"] = $maestroUpgradeID;
|
||||
$maestro["maestroID"] = $maestroID;
|
||||
$maestro["maestroName"] = $maestroName;
|
||||
$maestro["registeredActivateStatus"] = $registeredActivateStatus;
|
||||
$maestro["registeredAccountType"] = $registeredAccountType;
|
||||
$maestro["requestedAccountType"] = $requestedAccountType;
|
||||
$maestro["requestedDateTime"] = $requestedDateTime;
|
||||
|
||||
@@ -61,12 +61,20 @@ function register_maestro($maestroID) {
|
||||
// SET ActivateStatus = 1, AvailableActivateDateTime = DATE_ADD(NOW(), INTERVAL 1 YEAR)
|
||||
// WHERE MaestroID = ?
|
||||
// ";
|
||||
|
||||
// closed beta
|
||||
$query = "
|
||||
UPDATE maestro
|
||||
SET ActivateStatus = 1, AvailableActivateDateTime = '2022-07-31 23:59:59'
|
||||
WHERE MaestroID = ?
|
||||
";
|
||||
|
||||
// (07/17) before 2 weeks from closing beta service
|
||||
// $query = "
|
||||
// UPDATE maestro
|
||||
// SET ActivateStatus = 1, AvailableActivateDateTime = DATE_ADD(NOW(), INTERVAL 14 DAY)
|
||||
// WHERE MaestroID = ?
|
||||
// ";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
$stmt->bind_param("i", $maestroID);
|
||||
$stmt->execute();
|
||||
|
||||
@@ -14,6 +14,7 @@ include "./../mail/send_naver_mail.php";
|
||||
|
||||
$maestro_upgrade_id = $_POST["maestro_upgrade_id"];
|
||||
$maestro_id = $_POST["maestro_id"];
|
||||
$registered_activate_status = $_POST["registered_activate_status"];
|
||||
$registered_account_type = $_POST["registered_account_type"];
|
||||
$upgrade_account_type = $_POST["upgrade_account_type"];
|
||||
|
||||
@@ -23,7 +24,11 @@ change_upgrade_request_status_to_close($maestro_id);
|
||||
change_upgrade_request_status_to_applied($maestro_upgrade_id);
|
||||
|
||||
$maestro_data = get_maestro_data($maestro_id);
|
||||
sendMailUpgradeDone($maestro_data["name"], $maestro_data["email"], $registered_account_type, $upgrade_account_type);
|
||||
if($registered_activate_status == 1) { // 체험
|
||||
sendMailTrialMaestroUpgradeDone($maestro_data["name"], $maestro_data["email"], $registered_account_type, $upgrade_account_type);
|
||||
} else { // 0: 미승인, 2: 활성화, 3: 환불
|
||||
sendMailUpgradeDone($maestro_data["name"], $maestro_data["email"], $registered_account_type, $upgrade_account_type);
|
||||
}
|
||||
insertMaestroLog("upgrade_maestro", $maestro_id, $registered_account_type." -> ".$upgrade_account_type);
|
||||
|
||||
// set_data("maestro_upgrade_id", $maestro_upgrade_id);
|
||||
@@ -39,7 +44,7 @@ function upgrade_maestro($maestro_id, $upgrade_account_type) {
|
||||
|
||||
$query = "
|
||||
UPDATE maestro
|
||||
SET AccountType = ?, ActivateStatus = 1, AvailableActivateDateTime = DATE_ADD(NOW(), INTERVAL 1 YEAR)
|
||||
SET AccountType = ?, ActivateStatus = 2, AvailableActivateDateTime = DATE_ADD(NOW(), INTERVAL 1 YEAR)
|
||||
WHERE MaestroID = ?;
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
|
||||
Reference in New Issue
Block a user