Add: sendMailRegistered, mail php

This commit is contained in:
2018-09-19 11:22:36 +09:00
parent 697265ee29
commit bffc63996a
11 changed files with 300 additions and 175 deletions
+31
View File
@@ -0,0 +1,31 @@
<?php
function get_maestro_data($maestro_id) {
global $db_conn;
$query = "
SELECT Name, Email, AccountType, ActivateStatus, AvailableActivateDateTime, PlayerCount, AcceptClausesDateTime, MaestroTestID
FROM maestro
WHERE MaestroID = ?
";
$stmt = $db_conn->prepare($query);
$stmt->bind_param("i", $maestro_id);
$stmt->execute();
$stmt->bind_result($name, $email, $accountType, $activateStatus, $availableActivateDateTime, $playerCount, $acceptClausesDateTime, $maestroTestID);
$stmt->fetch();
$stmt->close();
$maestro_data = array();
$maestro_data['name'] = $name;
$maestro_data['email'] = $email;
$maestro_data['accountType'] = $accountType;
$maestro_data['activateStatus'] = $activateStatus;
$maestro_data['availableActivateDateTime'] = $availableActivateDateTime;
$maestro_data['playerCount'] = $playerCount;
$maestro_data['acceptClausesDateTime'] = $acceptClausesDateTime;
$maestro_data['maestroTestID'] = $maestroTestID;
return $maestro_data;
}
?>
@@ -1,23 +0,0 @@
<?php
function get_max_player_count($accountType) {
switch($accountType) {
case 0:
case 1:
case 100:
case 101:
return 20;
case 2:
return 50;
case 3:
return 100;
case 4:
return 500;
case 5:
return 1000;
}
return 0;
}
?>