define('EMAILS_PER_PAGE', 25); if (!check_perms('users_view_email')) { error(403); } list ($Page, $Limit) = Format::page_limit(EMAILS_PER_PAGE); View::show_header('Manage email blacklist'); $Where = ""; if (!empty($_POST['email'])) { $Email = db_string($_POST['email']); $Where .= " WHERE Email LIKE '%$Email%'"; } if (!empty($_POST['comment'])) { $Comment = db_string($_POST['comment']); if (!empty($Where)) { $Where .= " AND"; } else { $Where .= " WHERE"; } $Where .= " Comment LIKE '%$Comment%'"; } $DB->query(" SELECT SQL_CALC_FOUND_ROWS ID, UserID, Time, Email, Comment FROM email_blacklist $Where ORDER BY Time DESC LIMIT $Limit"); $Results = $DB->to_array(false, MYSQLI_ASSOC, false); $DB->query('SELECT FOUND_ROWS()'); list ($NumResults) = $DB->next_record(); ?>
Comment | Added | Submit | |
Add email address or domain to blacklist | |||