if(!check_perms('users_view_invites')) { error(403); } show_header('Invite Pool'); define('INVITES_PER_PAGE', 50); list($Page,$Limit) = 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.Username, um.PermissionID, um.Enabled, ui.Donor, ui.Warned, i.InviteKey, i.Expires, i.Email FROM invites as i JOIN users_main AS um ON um.ID=i.InviterID JOIN users_info AS ui ON ui.UserID=um.ID "; 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 | InviteCode | Expires | if(check_perms('users_edit_invites')){ ?>Controls | } ?>|
=format_username($UserID, $Username, $Donor, $Warned, $Enabled, $PermissionID)?> | =display_str($Email)?> | =display_str($InviteKey)?> | =time_diff($Expires)?> | if(check_perms('users_edit_invites')){ ?>} ?> |