$error_error
";
} elseif (!empty($input)) {
$error_error = $input;
}
}
function success_msg($input = false)
{
global $success_msg;
if (!empty($success_msg)) {
echo "$success_msg
";
} elseif (!empty($input)) {
$success_msg = $input;
}
}
function GetRaceID($race)
{
switch ($race) {
case "HUMAN":
return 1;
case "ORC":
return 2;
case "DWARF":
return 3;
case "NIGHTELF":
return 4;
case "SCOURGE":
return 5;
case "TAUREN":
return 6;
case "GNOME":
return 7;
case "TROLL":
return 8;
case "BLOODELF":
return 10;
case "DRAENEI":
return 11;
default:
exit("error");
}
}
function GetClassID($class)
{
switch ($class) {
case "WARRIOR":
return 1;
case "PALADIN":
return 2;
case "HUNTER":
return 3;
case "ROGUE":
return 4;
case "PRIEST":
return 5;
case "DEATHKNIGHT":
return 6;
case "SHAMAN":
return 7;
case "MAGE":
return 8;
case "WARLOCK":
return 9;
case "DRUID":
return 11;
default:
exit("
YOUR CHARACTER CLASS IS NOT BLIZZLIKE FOR 3.3.5a
");
}
}
function get_human_time_from_sec($seconds)
{
$interval = new DateInterval("PT{$seconds}S");
$now = new DateTimeImmutable('now', new DateTimeZone('utc'));
return $now->diff($now->add($interval))->format('%a:%h:%i');
}
function send_phpmailer($email, $subject, $message)
{
$mail = new PHPMailer(true);
if (get_config('debug_mode')) {
$mail->SMTPDebug = 2;
}
$mail->isSMTP();
$mail->Host = get_config('smtp_host');
$mail->SMTPAuth = get_config('smtp_auth');
$mail->Username = get_config('smtp_user');
$mail->Password = get_config('smtp_pass');
$mail->SMTPSecure = get_config('smtp_secure');
$mail->Port = get_config('smtp_port');
//Recipients
$mail->setFrom(get_config('smtp_mail'));
$mail->addAddress($email); // Add a recipient
$mail->addReplyTo(get_config('smtp_mail'));
// Content
$mail->isHTML(true);
$mail->Subject = $subject;
$mail->Body = $message;
$mail->send();
return true;
}