I have a custom form that I want to use with an mod I'm working on and I'm trying to dynamically build an SQL statement depending on the selections made in the form. Does vbulletin have anything already built-in? What would be the best way to do this?
PHP Code:
print_form_header('show_inactivemembers', 'show', 'false', 'true', 'cpform', '90%');
print_table_header('Inactive Members Viewer');
print_select_row('Entries per page', 'perpage', $perpage, 15);
print_description_row('Inactivity Grace Period', 0, 2, 'thead');
print_input_row("Show member inactivity greater than or equal to (days)", "graceperiod");
print_description_row('Email Frequency', 0, 2, 'thead');
print_input_row("Show members who have not received an email in (days)", "emailfreq");
print_description_row('Usergroups to monitor', 0, 2, 'thead');
print_membergroup_row("Usergroups", "membergroups", 1);
print_description_row('Excluded UserIds', 0, 2, 'thead');
print_input_row("<div>List the userids that you do not wish to send reminder email to here. <br/>
Separate Userids with a comma. i.e. 1,2,3,4</div>", "excludeduserids");
print_description_row('Include users who can receive email from the Administrator', 0, 2, 'thead');
print_yes_no_row("Include members who can receive email from administrator.", "canreceivemailfromadmin", '0');
print_description_row('Include users who have opted out', 0, 2, 'thead');
print_yes_no_row("Include members who have opted out", "includeoptouts", '0');
print_submit_row( "Submit");
print_table_footer();