if (!check_perms('users_view_invites')) { error(403); } View::show_header('Invite Pool'); define('INVITES_PER_PAGE', 50); list($Page, $Limit) = Format::page_limit(INVITES_PER_PAGE); if (!empty($_POST['invitekey']) && check_perms('users_edit_invites')) { authorize(); $DB->query("DELETE FROM invites WHERE InviteKey='".db_string($_POST['invitekey'])."'"); } if (!empty($_GET['search'])) { $Search = db_string($_GET['search']); } else { $Search = ''; } $sql = " SELECT SQL_CALC_FOUND_ROWS um.ID, um.IP, i.InviteKey, i.Expires, i.Email FROM invites as i JOIN users_main AS um ON um.ID = i.InviterID "; if ($Search) { $sql .= "WHERE i.Email LIKE '%$Search%' "; } $sql .= "ORDER BY i.Expires DESC LIMIT $Limit"; $RS = $DB->query($sql); $DB->query("SELECT FOUND_ROWS()"); list($Results) = $DB->next_record(); $DB->set_query_id($RS); ?>
=number_format($Results)?> unused invites have been sent.
Inviter | IP | InviteCode | Expires | if (check_perms('users_edit_invites')) { ?>Controls | } ?>|
=Users::format_username($UserID, true, true, true, true)?> | =display_str($Email)?> | =Tools::display_ip($IP)?> | =display_str($InviteKey)?> | =time_diff($Expires)?> | if (check_perms('users_edit_invites')) { ?>} ?> |