print $GLOBALS['I18N']->get('Sorry, this page can only be used by super admins'); return; } if (!empty($_POST['unsubscribe'])) { $emails = explode("\n", $_POST['unsubscribe']); $count = 0; $unsubbed = $blacklisted = 0; foreach ($emails as $email) { $email = trim($email); ++$count; set_time_limit(30); Sql_Query(sprintf('update %s set confirmed = 0 where email = "%s"', $GLOBALS['tables']['user'], $email)); $unsubbed += Sql_Affected_Rows(); if (!empty($_POST['blacklist'])) { ++$blacklisted; addUserToBlackList($email, $GLOBALS['I18N']->get('Blacklisted by') . ' ' . $_SESSION['logindetails']['adminname']); } } printf($GLOBALS['I18N']->get('All done, %d emails processed, %d emails marked unconfirmed, %d emails blacklisted<br/>'), $count, $unsubbed, $blacklisted); print PageLinkButton('suppressionlist', s('Add more')); return; } ?> <form method="post" action=""> <h3><?php echo $GLOBALS['I18N']->get('Manage suppression list'); ?> </h3> <?php echo $GLOBALS['I18N']->get('Make suppression permanent');
<?php if (!defined('PHPLISTINIT')) { die; } verifyCsrfGetToken(); if (isset($_GET['id'])) { $userid = sprintf('%d', $_GET['id']); } if (empty($userid)) { return; } if (!empty($_GET['blacklist'])) { $email = Sql_Fetch_Row_Query(sprintf('select email from %s where id = %d', $GLOBALS['tables']['user'], $userid)); if (!empty($email[0])) { addUserToBlackList($email[0], s('Manually blacklisted by %s', $_SESSION['logindetails']['adminname'])); $status = 'OK'; } } elseif (!empty($_GET['unblacklist'])) { $email = Sql_Fetch_Row_Query(sprintf('select email from %s where id = %d', $GLOBALS['tables']['user'], $userid)); if (!empty($email[0])) { unBlackList($userid); $status = 'OK'; } }