$UserID = $_GET['userid']; if (!is_number($UserID)) { error(404); } $Self = ($UserID == $LoggedUser['ID']); if (!check_perms('users_mod') && !$Self) { error(403); } if (!apcu_exists('DBKEY')) { error('The site is currently running with partial database access. Please wait for staff to fully decrypt it'); } $DB->query(" SELECT DISTINCT Email FROM users_history_emails WHERE UserID = '$UserID'"); $EncEmails = $DB->collect("Email"); $Emails = []; foreach ($EncEmails as $Enc) { if (!isset($Emails[Crypto::decrypt($Enc)])) { $Emails[Crypto::decrypt($Enc)] = []; } $Emails[Crypto::decrypt($Enc)][] = $Enc; } $DB->query(" SELECT Email FROM users_main WHERE ID = '$UserID'"); list($Curr) = $DB->next_record(); $Curr = Crypto::decrypt($Curr); if (!$Self) { $DB->query("SELECT Username FROM users_main WHERE ID = '$UserID'"); list($Username) = $DB->next_record(); View::show_header("Email history for $Username"); } else { View::show_header("Your email history"); } ?>
Expunge | |
=display_str($Email)?> | if ($Email != $Curr) { ?> X } ?> |