$memberData = false;
$memberName = false;
$membersList = false;
- $contactsList = false;
- $haveContacts = false;
$contactID = false;
$contactInfo = false;
$filterArchived = false;
$filterText = false;
$countySearch = false;
- $countyList = array();
$haveCounties = false;
$haveFilter = false;
$contactMembers = array();
- $order = false;
$textSearch = '';
$blankStart = false;
- $membersFound = false;
// Paging Parameters
$paging = true;
$nextStart = false;
$start = 1;
$limit = 20; // Set to the number of listings per page
- $namesList = false;
$where = '';
-
- $validOptions = array(
- 'create',
- 'addNew',
- 'edit',
- 'submit',
- 'delete',
- 'list'
- );
if (isset($_REQUEST['textSearch'])) {
$memberName = $memberData['name'];
}
- // Make sure option is set to list
- $option = 'list';
-
$where = ' TRUE ';
// Only list member contacts for the selected member
// Get full list of names matching this where clause for search box
$namesList = $this->getIdName($where);
-
-
// If doing alpha list
$alphaList = false;
$alphaWhere = '';
}
// Get a list of counties
- $countyList = $this->wpdb->get_col("SELECT DISTINCT county FROM ".GLM_MEMBERS_CONTACTS_PLUGIN_DB_PREFIX . "contacts WHERE active = true ORDER BY county ASC;");
- if ($countyList[0]) {
+ $countyList = array_filter($this->wpdb->get_col("SELECT DISTINCT county FROM ".GLM_MEMBERS_CONTACTS_PLUGIN_DB_PREFIX . "contacts WHERE active = true ORDER BY county ASC;"));
+
+ if ($countyList) {
$haveCounties = true;
}