$UserID = $_GET['userid']; if (!is_number($UserID)) { error(404); } $Self = ($UserID == $LoggedUser['ID']); if (!check_perms('users_mod') && !$Self) { error(403); } if (!apc_exists('DBKEY')) { error('The site is currently running with partial database access. Please wait for staff to fully decrypt it'); } $DB->query(" SELECT DISTINCT h.email FROM users_history_emails AS h WHERE h.UserID = '$UserID'"); $EncEmails = $DB->collect("email"); $Emails = array(); foreach ($EncEmails as $Enc) { if (!isset($Emails[DBCrypt::decrypt($Enc)])) { $Emails[DBCrypt::decrypt($Enc)] = array(); } $Emails[DBCrypt::decrypt($Enc)][] = $Enc; } $DB->query(" SELECT email FROM users_main WHERE ID = '$UserID'"); list($Curr) = $DB->next_record(); $Curr = DBCrypt::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"); } ?>
Delete | |
=display_str($Email)?> | if ($Email != $Curr) { ?> X } ?> |