Update myaccount.php (#436)

This commit is contained in:
Evil Puncker 2020-07-06 21:38:09 -03:00 committed by GitHub
parent 26af5066db
commit 5d9b0f3d00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,7 +8,7 @@ if($undelete_id) {
$undelete_q1 = mysql_select_single('SELECT `character_name` FROM `znote_deleted_characters` WHERE `done` = 0 AND `id` = ' . $undelete_id . ' AND `original_account_id` = ' . $session_user_id . ' AND NOW() < `time`'); $undelete_q1 = mysql_select_single('SELECT `character_name` FROM `znote_deleted_characters` WHERE `done` = 0 AND `id` = ' . $undelete_id . ' AND `original_account_id` = ' . $session_user_id . ' AND NOW() < `time`');
if($undelete_q1) { if($undelete_q1) {
mysql_delete('DELETE FROM `znote_deleted_characters` WHERE `id` = ' . $undelete_id); mysql_delete('DELETE FROM `znote_deleted_characters` WHERE `id` = ' . $undelete_id);
echo 'Pending delete of ' . $undelete_q1['character_name'] . ' has been successfully cancelled.<br/>'; echo 'Pending delete of ' . $undelete_q1['character_name'] . ' has been successfully canceled.<br/>';
} }
} }
#endregion #endregion
@ -70,7 +70,7 @@ if (isset($_GET['authenticate']) && $config['mailserver']['myaccount_verify_emai
?> ?>
<h1>Email authentication sent</h1> <h1>Email authentication sent</h1>
<p>We have sent you an email with a verification link to your email address: <strong><?php echo $user_data['email']; ?></strong></p> <p>We have sent you an email with a verification link to your email address: <strong><?php echo $user_data['email']; ?></strong></p>
<p>If you can't find the email within 5 minutes, check your <strong>junk/trash inbox (spam filter)</strong> as it may be mislocated there.</p> <p>If you can't find the email within 5 minutes, check your <strong>junk/trash inbox (spam filter)</strong> as it may be misplaced there.</p>
<?php <?php
} else { } else {
echo '<h1>Authentication failed</h1> <p>Failed to verify user when trying to send a verification email.</p>'; echo '<h1>Authentication failed</h1> <p>Failed to verify user when trying to send a verification email.</p>';
@ -305,7 +305,11 @@ if ($render_page) {
<h1>My account</h1> <h1>My account</h1>
<p>Welcome to your account page, <?php if ($config['ServerEngine'] !== 'OTHIRE') echo $user_data['name']; else echo $user_data['id']; ?><br> <p>Welcome to your account page, <?php if ($config['ServerEngine'] !== 'OTHIRE') echo $user_data['name']; else echo $user_data['id']; ?><br>
<?php if ($config['ServerEngine'] !== 'OTHIRE') { <?php if ($config['ServerEngine'] !== 'OTHIRE') {
echo 'You have ' .$user_data['premdays']. ' days remaining premium account.'; if ($user_data['premdays'] != 0) {
echo 'You have ' .$user_data['premdays']. ' remaining premium account days.';
} else {
echo 'You are free account.';
}
} else { } else {
if ($user_data['premend'] != 0) { if ($user_data['premend'] != 0) {
echo 'Your premium account will last till '; echo 'Your premium account will last till ';
@ -325,7 +329,6 @@ if ($render_page) {
</p> </p>
<?php <?php
if ($config['ServerEngine'] === 'TFS_10' && $config['twoFactorAuthenticator']) { if ($config['ServerEngine'] === 'TFS_10' && $config['twoFactorAuthenticator']) {
$query = mysql_select_single("SELECT `secret` FROM `accounts` WHERE `id`='".(int)$session_user_id."' LIMIT 1;"); $query = mysql_select_single("SELECT `secret` FROM `accounts` WHERE `id`='".(int)$session_user_id."' LIMIT 1;");
$status = ($query['secret'] === NULL) ? false : true; $status = ($query['secret'] === NULL) ? false : true;
?><p>Account security with Two-factor Authentication: <a href="twofa.php"><?php echo ($status) ? 'Enabled' : 'Disabled'; ?></a></p><?php ?><p>Account security with Two-factor Authentication: <a href="twofa.php"><?php echo ($status) ? 'Enabled' : 'Disabled'; ?></a></p><?php