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"); } ?>

Your email history

Email history for

$Encs) { ?>
Email Expunge