);
- if ( is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE ) {
- glmMembersAdmin::addNotice( $this->fields, 'DataBlock', 'Table Fields: '.$this->table );
- }
-
}
/**
// Check input for sanity - Refernce type first
if ( $ref_type === false
|| ( $ref_type - 0 ) <= 0
- || !in_array( $ref_type, $this->config['ref_type_numb'] )
+ || !in_array( $ref_type, $this->config['ref_type_numb'] )
) {
return false;
}
public function updateAmenityRef( $ref_type = false, $ref_dest = false, $amenities = false ) {
// Check input for sanity - Refernce type first
- if ( $ref_type == false
- || ( $ref_type - 0 ) <= 0
+ if ( $ref_type == false
+ || ( $ref_type - 0 ) <= 0
|| !in_array( $ref_type, $this->config['ref_type_numb'] ) ) {
return false;
}
// Start by deleting all amenities for this destination
$sql = "
- DELETE
+ DELETE
FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX."amenity_ref
WHERE ref_type = $ref_type
AND ref_dest = $ref_dest";
);
- if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
- glmMembersAdmin::addNotice($this->fields, 'DataBlock', 'Table Fields: '.$this->table);
- }
-
}
/**
}
- if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
- glmMembersAdmin::addNotice("Category added: name = $name, parent = $parent, ID = $categoryID", 'DataBlock', "addCategory()");
- }
-
return $categoryID;
}
);
- if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
- glmMembersAdmin::addNotice($this->fields, 'DataBlock', 'Table Fields: '.$this->table);
- }
-
}
/**
;";
$list = $this->wpdb->get_results($sql, ARRAY_A);
- if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
- glmMembersAdmin::addNotice($sql, 'DataBlock', "DataAbstract - getListWithParents() query");
- glmMembersAdmin::addNotice($list, 'DataBlock', 'getListWithParents() data');
- }
-
return $list;
}
// Get new list and return it
$current = $this->getList($memberInfoID);
- if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
- glmMembersAdmin::addNotice($current, 'DataBlock', 'Currently Selected Member Categories');
- }
-
return $current;
}
);
- if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
- glmMembersAdmin::addNotice($this->fields, 'DataBlock', 'Table Fields: '.$this->table);
- }
-
}
/**
);
- if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
- glmMembersAdmin::addNotice($this->fields, 'DataBlock', 'Table Fields: '.$this->table);
- }
-
}
);
- if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
- glmMembersAdmin::addNotice($this->fields, 'DataBlock', 'Table Fields: '.$this->table);
- }
-
}
// Check for a valid reference type
if (!isset($this->config['ref_type'][$refType])) {
- if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
- glmMembersAdmin::addNotice("<b>dataFiles.php - getFiles()</b><br> Specified reference type ($refType) is invalid.", 'Alert');
- }
-
return false;
}
$refID = $refID -0;
if ($refID <= 0) {
- if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
- glmMembersAdmin::addNotice("<b>dataFiles.php - getFiles()</b><br> Specified reference destination ($refID) is invalid.", 'Alert');
- }
-
return false;
}
// Check for and retrieve the order field name
if (isset($_REQUEST[$orderField]) && trim($_REQUEST[$orderField]) == '') {
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- glmMembersAdmin::addNotice('<b>dataFiles: </b>filePositionOrder() unable to find '.$orderField.' data. Perhaps there\'s no files at this time.', 'Process');
- }
-
return false;
}
return false;
}
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- glmMembersAdmin::addNotice($order, 'DataBlock', 'File Sort Order');
- }
-
// Update image entries with new sort order;
$pos = 0;
foreach($order as $i) {
$queryError = $this->wpdb->last_error;
if ($queryError) {
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- glmMembersAdmin::addNotice("<b> Error setting position order for files.</b><br>$queryError<br>$sql", 'Alert');
- }
-
return false;
}
}
),
);
- if ( is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE ) {
- glmMembersAdmin::addNotice( $this->fields, 'DataBlock', 'Table Fields: '.$this->table );
- }
}
}
);
- if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
- glmMembersAdmin::addNotice($this->fields, 'DataBlock', 'Table Fields: '.$this->table);
- }
-
}
// Check for a valid reference type
if (!isset($this->config['ref_type'][$refType])) {
- if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
- glmMembersAdmin::addNotice("<b>dataImages.php - getGallery()</b><br> Specified reference type ($refType) is invalid.", 'Alert');
- }
-
return false;
}
$refID = $refID -0;
if ($refID <= 0) {
- if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
- glmMembersAdmin::addNotice("<b>dataImages.php - getGallery()</b><br> Specified reference destination ($refID) is invalid.", 'Alert');
- }
-
return false;
}
// Check for and retrieve the order field name
if (isset($_REQUEST[$orderField]) && trim($_REQUEST[$orderField]) == '') {
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- glmMembersAdmin::addNotice('<b>dataImages: </b>galleryPositionOrder() unable to find '.$orderField.' data. Perhaps there\'s no images at this time.', 'Process');
- }
-
return false;
}
return false;
}
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- glmMembersAdmin::addNotice($order, 'DataBlock', 'Image Gallery Sort Order');
- }
-
// Update image entries with new sort order;
$pos = 0;
foreach($order as $i) {
$queryError = $this->wpdb->last_error;
if ($queryError) {
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- glmMembersAdmin::addNotice("<b> Error setting position order for images.</b><br>$queryError<br>$sql", 'Alert');
- }
-
return false;
}
}
reset($this->config['imageSizes']);
while (list($k, $v) = each($this->config['imageSizes'])) {
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
- glmMembersAdmin::addNotice(" Deleting size $k.", 'Process');
- }
-
// Check if the image actually exists - May not if we're doing development
if (is_file(GLM_MEMBERS_PLUGIN_IMAGES_PATH.'/'.$k.'/'.$imgData['file_name'])) {
unset($this->fields['county']);
}
- if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
- glmMembersAdmin::addNotice($this->fields, 'DataBlock', 'Table Fields: '.$this->table);
- }
-
}
/*
);
- if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
- glmMembersAdmin::addNotice($this->fields, 'DataBlock', 'Table Fields: '.$this->table);
- }
}
}
'use' => 'gl'
)
-
- );
- if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
- glmMembersAdmin::addNotice($this->fields, 'DataBlock', 'Table Fields: '.$this->table);
- }
+ );
}
}
-
+
/*
* Get Alpha list of first characters in member name
* for those members that have active info.
);
- if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
- glmMembersAdmin::addNotice($this->fields, 'DataBlock', 'Table Fields: '.$this->table);
- }
-
}
);
- if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
- glmMembersAdmin::addNotice($this->fields, 'DataBlock', 'Table Fields: '.$this->table);
- }
}
}
);
- if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
- glmMembersAdmin::addNotice($this->fields, 'DataBlock', 'Table Fields: '.$this->table);
- }
}
}
$membTypeID = $this->wpdb->insert_id;
$queryError = $this->wpdb->last_error;
if ($queryError) {
- glmMembersAdmin::addNotice('<b>Error when adding the default member type: Check following message.</b><br><pre>'.$queryError.'<p>'.$sql.'</p></pre>', 'AdminError');
return false;
}
$regionID = $this->wpdb->insert_id;
$queryError = $this->wpdb->last_error;
if ($queryError) {
- glmMembersAdmin::addNotice('<b>Error when adding the default region: Check following message.</b><br><pre>'.$queryError.'<p>'.$sql.'</p></pre>', 'AdminError');
return false;
}
$rawCats = $this->wpdb->get_results($sql, ARRAY_A);
$queryError = $this->wpdb->last_error;
if ($queryError) {
- glmMembersAdmin::addNotice('<b>Error when reading cateory data from Connections.</b><br><pre>'.$queryError.'<p>'.$sql.'</p></pre>', 'AdminError');
return false;
}
$rawTerms = $this->wpdb->get_results($sql, ARRAY_A);
$queryError = $this->wpdb->last_error;
if ($queryError) {
- glmMembersAdmin::addNotice('<b>Error when reading cateory terms from Connections.</b><br><pre>'.$queryError.'<p>'.$sql.'</p></pre>', 'AdminError');
return false;
}
$catID = $this->wpdb->insert_id;
$queryError = $this->wpdb->last_error;
if ($queryError) {
- glmMembersAdmin::addNotice('<b>Error when creating member: Check following message.</b><br><pre>'.$queryError.'<p>'.$sql.'</p></pre>', 'AdminError');
+ // not doing anything right now
}
$cats[$k]['new_id'] = $catID;
}
$this->wpdb->query($sql);
$queryError = $this->wpdb->last_error;
if ($queryError) {
- glmMembersAdmin::addNotice('<b>Error when creating member: Check following message.</b><br><pre>'.$queryError.'<p>'.$sql.'</p></pre>', 'AdminError');
+ // not doing anything right now
}
}
}
$memberCats = $this->wpdb->get_results($sql, ARRAY_A);
$queryError = $this->wpdb->last_error;
if ($queryError) {
- glmMembersAdmin::addNotice('<b>Error when reading term relationships from Connections.</b><br><pre>'.$queryError.'<p>'.$sql.'</p></pre>', 'AdminError');
return false;
}
$membID = $this->wpdb->insert_id;
$queryError = $this->wpdb->last_error;
if ($queryError) {
- glmMembersAdmin::addNotice('<b>Error when creating member: Check following message.</b><br><pre>'.$queryError.'<p>'.$sql.'</p></pre>', 'AdminError');
+ // Not doing anything right now
}
/*
$cityID = $this->wpdb->insert_id;
$queryError = $this->wpdb->last_error;
if ($queryError) {
- glmMembersAdmin::addNotice('<b>Error when adding the default region: Check following message.</b><br><pre>'.$queryError.'<p>'.$sql.'</p></pre>', 'AdminError');
+ // Not doing anything right now
}
$cities[$addr['city']] = $cityID;
$membID = $this->wpdb->insert_id;
$queryError = $this->wpdb->last_error;
if ($queryError) {
- glmMembersAdmin::addNotice('<b>Error when creating member: Check following message.</b><br><pre>'.$queryError.'<p>'.$sql.'</p></pre>', 'AdminError');
+ // Not doing anything right now
}
// Scan member/category mapping array for any for this member
$this->wpdb->query($sql);
$queryError = $this->wpdb->last_error;
if ($queryError) {
- glmMembersAdmin::addNotice('<b>Error when creating member/category entry: Check following message.</b><br><pre>'.$queryError.'<p>'.$sql.'</p></pre>', 'AdminError');
+ // Not doing anything right now
}
}
}
* @return void
* @access public
*/
- public static function addNotice ($message, $type = false, $title = false)
+ public function addNotice ($message, $type = false, $title = false)
{
// Depreciating debug system - Make sure all notices are cleared
// Will delete this method after all references are purged.
-
+
$this->clearNotices();
-
+
return;
}
* @return void
* @access public
*/
- public static function clearNotices ()
+ function clearNotices ()
{
- delete_option('glmMembersAdminNoticeAlerts');
- delete_option('glmMembersAdminNoticeProcess');
- delete_option('glmMembersAdminNoticeDataBlocks');
- delete_option('glmMembersAdminNotices');
-
}
/*
*/
public function controller ($menuItem, $action = false, $actionData = false)
{
+
// Enque admin scripts and css here so that only happens when we're doing something
$this->glmMembersAdminScripts();
// If debug is VERBOSE
$consts = get_defined_constants(true);
if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
- $this->addNotice("<pre>".print_r($_SERVER,1).'</pre>', 'DataBlock', 'Server Defines');
- $this->addNotice('<pre>'.print_r($consts,1).'</pre>', 'DataBlock', 'Defined Parameters');
+ // Not doing anything right now
// Not verbose
} else {
$ourConsts = array();
$ourConsts[$k] = $v;
}
}
- $this->addNotice('<pre>'.print_r($ourConsts,1).'</pre>', 'DataBlock', 'Defined Parameters');
}
- $this->addNotice('<pre>'.print_r($this->config,1).'</pre>', 'DataBlock', 'Configuration Settings');
- $this->addNotice("<pre>".print_r($_REQUEST,1)."</pre>", 'DataBlock', "Request Data");
if (isset($_FILES)) {
- $this->addNotice("<pre>".print_r($_FILES,1)."</pre>", 'DataBlock', "Request Files Data");
+ // Not doing anything right now
}
} else {
$this->clearNotices();
if (isset($_REQUEST['option'])) {
$option = ', Option = '.$_REQUEST['option'];
}
- $this->addNotice("<b>Requested Action:</b> Menu item = $menuItem, Action = $action".$option, 'Process');
}
$modelRedirect = false;
// Verify that we have the requested menu item in the valid actions
if (!isset($this->config['validActions']['adminActions'][$menuItem])) {
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- $this->addNotice('<b>Error in Admin Controller:</b> Menu Item not included in validActions.php!', 'Alert');
- }
-
trigger_error('Error in Admin Controller: Menu Item not included in validActions.php!', E_USER_NOTICE);
-
+
$modelRedirect = true;
$menuItem = 'error';
$action = 'index';
if (! isset($this->config['validActions']['adminActions'][$menuItem]) ||
! isset($this->config['validActions']['adminActions'][$menuItem][$action])) {
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- $this->addNotice('<b>Error in Admin Controller:</b> Requested Menu Item is invalid! - '.$menuItem, 'Alert');
- }
-
trigger_error('Error in Admin Controller: Requested Menu Item is invalid! - '.$menuItem, E_USER_NOTICE);
-
+
$menuItem = 'error';
$action = 'badAction';
// If model file doesn't exist - we have an error
if (!file_exists($modelName)) {
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- $this->addNotice("<b>Error in Admin Controller:</b> Model file doesn't exist - ".$modelName, 'Alert');
- }
-
trigger_error("Error in Admin Controller: Model file doesn't exist - ".$modelName, E_USER_NOTICE);
-
+
$modelRedirect = true;
$menuItem = 'error';
$action = 'index';
// check for an invalid model class name
if (!class_exists($className)) {
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- $this->addNotice("<b>Error in Admin Controller:</b> Invalid Model Class Name - ".$className, 'Alert');
- }
-
trigger_error("Error in Admin Controller: Invalid Model Class Name - ".$className, E_USER_NOTICE);
-
+
$modelRedirect = true;
$menuItem = 'error';
$action = 'index';
// Check if there's been a model redirect request
if ($results['modelRedirect']) {
- $this->addNotice('<pre>'.print_r($results,1).'</pre>', 'DataBlock', 'Model Redirect');
-
// Set the new model action
$action = $results['modelRedirect'];
if (!is_file($viewPath.'/'.$viewFile)) {
trigger_error("Bad or missing view file: $viewPath/$view", E_USER_NOTICE);
-
+
// No matching view file found
$errorMsg .= "<b>Bad or missing view file:</b> $viewPath/$view";
$badView = true;
// If we don't have a good view file
if ($badView) {
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- $this->addNotice("<b>Error in Admin Controller:</b> Requested View file doesn't exist - ".$viewPath.'/'.$viewFile, 'Alert');
- }
-
trigger_error("Error in Admin Controller: Requested View file doesn't exist - ".$viewPath.'/'.$viewFile, E_USER_NOTICE);
-
+
$modelRedirect = true;
$menuItem = 'error';
$action = 'index';
// This is just a sanity check on this loop to keep it from getting out of control
if (++$loopCheck > 5) {
-
+
trigger_error('Serious failure looping on model load!', E_USER_NOTICE);
-
+
die('
<h1>Serious failure looping on model load in "controllers/admin.php".</h1>
<div class="glm-item-container">
);
}
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG && $modelRedirect) {
- $this->addNotice('<b>Redirecting...</b>', 'Process');
- }
-
// Loop again if there's a model redirect
} while ($modelRedirect);
// If view debug has been requested
if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- glmMembersAdmin::addNotice("<b>Template Path:</b> $viewPath", 'Process');
- glmMembersAdmin::addNotice("<b>Template File:</b> $viewFile", 'Process');
-
$x = $smarty->template->getTemplateVars();
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- glmMembersAdmin::addNotice($x, 'DataBlock', 'Template Parameters');
- }
-
}
// Update the Smarty view path - *** NEEED TO FIX THIS TO SUPPORT THEME VIEWS SOMEHOW ****
$consts = $consts['user'];
}
- $this->addNotice("<pre>".print_r($consts,1)."</pre>", 'DataBlock', "Defined Parameters");
- $this->addNotice("<pre>".print_r($_REQUEST,1)."</pre>", 'DataBlock', "Request Data");
-
} else {
$this->clearNotices();
}
$loopCheck = 0;
do {
- if (GLM_MEMBERS_PLUGIN_FRONT_DEBUG) {
- glmMembersFront::addNotice("<b>Requested Action:</b> Menu item = $menuItem, Action = $action", 'Process');
- }
-
// If the menu item is "error" reset the view path
if ($menuItem == 'error') {
$viewPath = GLM_MEMBERS_PLUGIN_PATH . '/views';
// Otherwise, load and run the model
} else {
+// trigger_error("Front Controller: Loading ... Model = $modelName, Action = $action, Class = $className");
+
// Load the model file, if it hasn't already
if (!class_exists($className)) {
require_once $modelName;
die('<h1>Serious failure looping on model load in "controllers/front.php".</h1>');
}
- if (GLM_MEMBERS_PLUGIN_FRONT_DEBUG && $modelRedirect) {
- $this->addNotice('<b>Redirecting...</b>', 'Process');
- }
-
// Loop again if there's a model redirect
} while ($modelRedirect);
}
}
- // If view debug has been requested
- if (GLM_MEMBERS_PLUGIN_FRONT_DEBUG) {
-
- glmMembersFront::addNotice("<b>Template Path:</b> $viewPath", 'Process');
- glmMembersFront::addNotice("<b>Template File:</b> $viewFile", 'Process');
-
- $x = $smarty->template->getTemplateVars();
- $templateVars = '<pre>' . print_r($x, 1) . '</pre>';
- glmMembersFront::addNotice($templateVars, 'DataBlock', 'Template Parameters');
- }
-
// Update the Smarty view path
$smarty->template->setTemplateDir($viewPath);
";
$res = $this->wpdb->get_row($sql, ARRAY_A);
- if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE && class_exists('glmMembersAdmin')) {
- $this->addDataAbstractNotice($sql, 'DataBlock', "pointerOutput() value data query ".$f['field'].(isset($f['as']) ? ' as '.$f['as'] : ''));
- }
-
return $res['p_sum'];
} else {
";
$p_list = $this->wpdb->get_results($sql, ARRAY_A);
- if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE && class_exists('glmMembersAdmin')) {
- $this->addDataAbstractNotice($sql, 'DataBlock', "pointerOutput() value data query ".$f['field'].(isset($f['as']) ? ' as '.$f['as'] : ''));
- }
-
// Build pick select table
$pick_select = false;
$selected_name = '';
";
$res = $this->wpdb->get_row($sql, ARRAY_A);
-
- if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE && class_exists('glmMembersAdmin')) {
- $this->addDataAbstractNotice($sql, 'DataBlock', "pointerOutput() value data query ".$f['field'].(isset($f['as']) ? ' as '.$f['as'] : ''));
- }
-
return $res[$f['p_field']];
}
// Check for a list data
if (!isset($f['list']) || !is_array($f['list'])) {
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- glmMembersAdmin::addNotice(
- "Field '".$f['name']."' is type list but does not have supplied 'list' data.",
- 'Alert',
- ''
- );
- }
return false;
}
// Check for a list data
if (!isset($f['list']) || !is_array($f['list'])) {
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- glmMembersAdmin::addNotice(
- "Field '".$f['name']."' is type list but does not have supplied 'list' data.",
- 'Alert',
- ''
- );
- }
return false;
}
{
// Check for a bitmap data
if (!isset($f['bitmap']) || !is_array($f['bitmap'])) {
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- glmMembersAdmin::addNotice(
- "Field '".$f['name']."' is type bitmap but does not have supplied 'bitmap' data.",
- 'Alert',
- ''
- );
- }
return false;
}
// Check for a bitmap data
if (!isset($f['bitmap']) || !is_array($f['bitmap'])) {
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- glmMembersAdmin::addNotice(
- "Field '".$f['name']."' is type bitmap but does not have supplied 'bitmap' data.",
- 'Alert',
- ''
- );
- }
return false;
}
$filter = FILTER_SANITIZE_STRING;
if (isset($f['filter'])) {
if (!is_numeric($f['filter'])) {
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- glmMembersAdmin::addNotice(
- "<P> </p><strong>ERROR:</strong> Supplied value for option 'filter' in fields array not a defined filter for PHP filter_input();",
- 'Alert',
- ''
- );
- }
return false;
}
$filter = $f['filter'];
$filter_options = 0; //FILTER_FLAG_NO_ENCODE_QUOTES;
if (isset($f['filter_options'])) {
if (!is_numeric($f['filter_options']) && !is_array($f['filter_options'])) {
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- glmMembersAdmin::addNotice(
- "<P> </p><strong>ERROR:</strong> Supplied value for 'filter_options' is not valid;",
- 'Alert',
- ''
- );
- }
return false;
}
$filter_options = $f['filter_options'];
$current_img = $newFilename;
- } else {
-
- if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE && class_exists('glmMembersAdmin')) {
- $this->addDataAbstractNotice($newImage, 'DataBlock', "DataAbstract - imageInput() wp_get_image_editor($tmpFile) Error");
- }
-
}
-
}
return $current_img;
// Check that we have a fields list
if (!is_array($this->fields) || count($this->fields) == 0) {
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- glmMembersAdmin::addNotice(
- "ALERT: Empty Fields List in data abstract buildFieldsList()! Likely programming error.",
- 'Alert',
- 'Member Types Data'
- );
- }
}
// For each possible field
// Check for good field type
if (!in_array($v['type'], $this->knownFieldTypes)) {
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- glmMembersAdmin::addNotice(
- "CONFIGURATION ERROR: Unknown field type - ".$v['type'],
- 'Alert',
- ''
- );
- }
return false;
}
}
- if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE && class_exists('glmMembersAdmin')) {
- $this->addDataAbstractNotice($this->fieldData, 'DataBlock', "buildFieldsList() data");
- }
-
return;
}
// Check for good field type
if (!in_array($type, $this->knownFieldTypes)) {
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- glmMembersAdmin::addNotice(
- "CONFIGURATION ERROR: Unknown field type - ".$v['type'],
- 'Alert',
- ''
- );
- }
return false;
}
// Check for good field type
if (!in_array($v['type'], $this->knownFieldTypes)) {
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- glmMembersAdmin::addNotice(
- "CONFIGURATION ERROR: Unknown field type - ".$v['type'],
- 'Alert',
- ''
- );
- }
return false;
}
WHERE $where;";
$stats = $this->wpdb->get_row($sql, ARRAY_A);
- if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE && class_exists('glmMembersAdmin')) {
- $this->addDataAbstractNotice($sql, 'DataBlock', "DataAbstract - getStats() query");
- $this->addDataAbstractNotice($stats, 'DataBlock', "Stats Data");
- }
-
return $stats['count'];
}
$paging = true;
}
- if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE && class_exists('glmMembersAdmin')) {
- $this->addDataAbstractNotice($sql, 'DataBlock', "DataAbstract - getList() query");
- }
-
$list = $this->wpdb->get_results($sql, ARRAY_A);
if (count($list) == 0) {
$this->pseudoRandDataSort($prList, $newList);
}
- if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE && class_exists('glmMembersAdmin')) {
- $this->addDataAbstractNotice($newList, 'DataBlock', "getList() data");
- }
-
// If we're doing paging, return that data along with the list
if ($paging) {
$c = count($list);
;";
$detail = $this->wpdb->get_row($sql, ARRAY_A);
- $this->addDataAbstractNotice($sql, 'DataBlock', "DataAbstract - getEntry() query");
-
// If nothing was found, simply return false
if ($detail == false) {
return false;
// Process individual fields
$detail = $this->processOutputData($detail, 'g', $fieldVals);
- $this->addDataAbstractNotice($detail, 'DataBlock', "getEntry() data");
-
return $detail;
}
{
if ($id-0 == 0) {
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- glmMembersAdmin::addNotice(
- "DataAbstract.php - getEntry() called with invalid ID",
- 'Alert',
- ''
- );
- }
return false;
}
// Check if there's a function to do other checks
$r = $this->checkOther($r, 'n');
- if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE && class_exists('glmMembersAdmin')) {
- $this->addDataAbstractNotice($r, 'DataBlock', "newEntry() data");
- }
-
return $r;
}
( $fields ) VALUES ( $vals );
";
- if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE && class_exists('glmMembersAdmin')) {
- $this->addDataAbstractNotice($sql, 'DataBlock', "insertEntry() Query");
- }
-
// Now store the field data
$this->wpdb->query($sql);
- // Check for query errors
- if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE && class_exists('glmMembersAdmin')) {
- $queryError = $this->wpdb->last_error;
- if (trim($queryError) != '') {
- $this->addDataAbstractNotice(
- '<b>insertEntry() Query Failure</b><br>'
- .' Error Message: '.$queryError.'<br>'
- .' Table: '.$this->table, 'Alert');
- }
- }
-
// Get the current ID value and set that in the session
$r['fieldData']['id'] = $this->wpdb->insert_id;
- } else {
- if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE && class_exists('glmMembersAdmin')) {
- $this->addDataAbstractNotice(' insertEntry() requested to NOT store new entry!', 'Process');
- }
- }
-
- } else {
- if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE && class_exists('glmMembersAdmin')) {
- $this->addDataAbstractNotice('  checkOther() returned bad status.', 'Process');
}
- }
- if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE && class_exists('glmMembersAdmin')) {
- $this->addDataAbstractNotice($r, 'DataBlock', "DataAbstract - insertEntry() data");
}
return $r;
;";
$detail = $this->wpdb->get_row($sql, ARRAY_A);
- // Check for Errors
- if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE && class_exists('glmMembersAdmin')) {
- $queryError = $this->wpdb->last_error;
- if (trim($queryError) != '') {
- $this->addDataAbstractNotice(
- '<b>editEntry() Query Failure</b><br>'
- .' Error Message: '.$queryError.'<br>'
- .' Table: '.$this->table, 'Alert');
- }
- }
-
// Check for failure retrieving data
if (!$detail) {
return false;
// Process individual fields
$detail = $this->processOutputData($detail, 'e', true, $id, $idField);
- if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE && class_exists('glmMembersAdmin')) {
- $this->addDataAbstractNotice($sql, 'DataBlock', "DataAbstract - editEntry() query");
- $this->addDataAbstractNotice($detail, 'DataBlock', "editEntry() data");
- }
-
-
return $detail;
}
// Now store the field data
$this->wpdb->query($sql, ARRAY_A);
- // Check for Errors
- if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE && class_exists('glmMembersAdmin')) {
- $queryError = $this->wpdb->last_error;
- if (trim($queryError) != '') {
- $this->addDataAbstractNotice(
- '<b>updateEntry() Query Failure</b><br>'
- .' Error Message: '.$queryError.'<br>'
- .' Table: '.$this->table, 'Alert');
- }
- }
-
// Get the data again for output
$r['fieldData'] = $this->getEntry($id, $idField);
}
- if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE && class_exists('glmMembersAdmin')) {
- $this->addDataAbstractNotice($r, 'DataBlock', "updateEntry() data");
- }
-
return $r;
}
WHERE $idField = $id;
";
- if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE && class_exists('glmMembersAdmin')) {
- $this->addDataAbstractNotice($sql, 'DataBlock', "DataAbstract - deleteEntry() query");
- }
-
// Assume things will go fine
try {
$this->wpdb->query($sql, ARRAY_A);
}
}
- if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE && class_exists('glmMembersAdmin')) {
- $this->addDataAbstractNotice($detail, 'DataBlock', "deleteEntry() data");
- }
-
return $detail;
}
return $date_list;
}
- /*
- * Send notices to Admin or Front addNotice()
- *
- * @param (variable) $d1
- * @param (variable) $d2
- * @param (variable) $d3
- *
- * @return object Class object
- *
- */
- private function addDataAbstractNotice ( $d1, $d2 = false, $d3 = false)
- {
-
- if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE ) {
- glmMembersAdmin::addNotice($d1, $d2, $d3);
- } elseif (!is_admin() && GLM_MEMBERS_PLUGIN_FRONT_DEBUG_VERBOSE) {
- glmMembersFront::addNotice($d1, $d2, $d3);
- }
- }
-
/**
* The following two functions are used to build pseudo-random list results with optional paging
*/
}
}
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
- glmMembersAdmin::addNotice($list, 'DataBlock', 'Member Data');
- }
-
// Compile template data
$templateData = array(
'category_data' => $category_data,
if (isset($_REQUEST['import']) && $_REQUEST['import'] == 'now') {
// Reset the database
- if (!$this->deleteDataTables($dbVersion)) {
- glmMembersAdmin::addNotice('<b>Unable to delete the database tables while resetting the database.</b><br>', 'AdminError');
- break;
- }
- if (!$this->createDataTables($dbVersion)) {
- glmMembersAdmin::addNotice('<b>Unable to create the database tables while resetting the database.</b><br>', 'AdminError');
- break;
- }
- glmMembersAdmin::addNotice('<b>Database tables have been reset in preparation importing members.</b><br>', 'AdminNotice');
+ $this->deleteDataTables($dbVersion);
+ $this->createDataTables($dbVersion);
// Delete Images
foreach( new RecursiveIteratorIterator(
// Check if Connections is not installed or not active. If active, gets count of entries.
$c = $Connections->checkConnections();
- if ($c === false) {
- glmMembersAdmin::addNotice('<b>Connections Business Directory plugin is not installed or not active!</b><br>'.print_r($c,1), 'AdminError');
- break;
- }
$templateData['numbEntries'] = $c;
$importNotice .= 'Connections Business Directory plugin is active.<br>Number of businesses listed: '.$c.'<br>';
$templateData['haveMembers'] = true;
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- glmMembersAdmin::addNotice($templateData['members'], 'DataBlock', 'Base Members Data');
- }
-
}
break;
$del = $this->deleteDataTables($dbVersion);
if ($del) {
- glmMembersAdmin::addNotice('Database tables for the '.GLM_MEMBERS_PLUGIN_NAME.' plugin have been deleted.', 'AdminNotice');
} else {
break;
}
// If there were no errors
if ($create) {
- // Notify the user that the database has been installed
- glmMembersAdmin::addNotice('New database tables installed for the '.GLM_MEMBERS_PLUGIN_NAME.' plugin.', 'AdminNotice');
-
// Save the version of the installed database
update_option('glmMembersDatabaseDbVersion', $dbVersion);
// Read in Database deletion script - assumes the current db version.
$dropSQL = GLM_MEMBERS_PLUGIN_DB_SCRIPTS.'/drop_database_V'.$dbVersion.'.sql';
if (!is_file($dropSQL)) {
- glmMembersAdmin::addNotice('<b>Error when deleting database: Database deletion SQL script not found:<br>'.$dropSQL, 'AdminError');
return false;
}
$sqlFile = GLM_MEMBERS_PLUGIN_DB_SCRIPTS.'/drop_database_V'.$dbVersion.'.sql';
// Replace {prefix} with table name prefix
$sql = str_replace('{prefix}', GLM_MEMBERS_PLUGIN_DB_PREFIX, $sql);
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- glmMembersAdmin::addNotice('Dropping all database tables', 'Process');
- glmMembersAdmin::addNotice($sql, 'DataBlock', 'Drop Tables SQL');
- }
-
// Removing the tables using the script
$this->wpdb->query($sql);
// If there's been an error, display in debug Alert
$queryError = $this->wpdb->last_error;
if ($queryError) {
- glmMembersAdmin::addNotice('<b>Error when deleting database: Database tables may not have existed.</b><br>Check following message.<br>'.$queryError, 'AdminError');
return false;
}
// Read in Database creation script
$createSQL = GLM_MEMBERS_PLUGIN_DB_SCRIPTS.'/create_database_V'.$dbVersion.'.sql';
if (!is_file($createSQL)) {
- glmMembersAdmin::addNotice('<b>Error when creating database: Database creation SQL script not found:<br>'.$createSQL, 'AdminError');
return false;
}
$queryError = $this->wpdb->last_error;
if ($queryError) {
- glmMembersAdmin::addNotice('<b>Error when creating database: Database tables may already exist.</b><br>Check following message.<br>'.$queryError, 'AdminError');
return false;
}
$qForDebug .= $queryError.$q;
} while ($queryError == '' && next($queries));
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- glmMembersAdmin::addNotice('Creating database tables', 'Process');
- glmMembersAdmin::addNotice($qForDebug, 'DataBlock', 'Create Tables SQL');
- }
-
return true;
}
// Replace {prefix} with table name prefix
$sql = str_replace('{prefix}', GLM_MEMBERS_PLUGIN_DB_PREFIX, $sql);
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- glmMembersAdmin::addNotice('Dropping all database tables', 'Process');
- glmMembersAdmin::addNotice($sql, 'DataBlock', 'Drop Tables SQL');
- }
-
// Removing the tables using the script
$this->wpdb->query($sql);
// If there's been an error, display in debug Alert
$queryError = $this->wpdb->last_error;
- if ($queryError) {
- glmMembersAdmin::addNotice('<b>Error when deleting database: Database tables may not have existed.</b><br>Check following message.<br>'.$queryError, 'AdminError');
- }
return true;
$queryError = $this->wpdb->last_error;
if ($queryError) {
- glmMembersAdmin::addNotice('<b>Error when creating database: Database tables may already exist.</b><br>Check following message.<br>'.$queryError, 'AdminError');
return false;
}
$qForDebug .= $queryError.$q;
} while ($queryError == '' && next($queries));
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- glmMembersAdmin::addNotice('Creating database tables', 'Process');
- glmMembersAdmin::addNotice($qForDebug, 'DataBlock', 'Create Tables SQL');
- }
-
return true;
}
// Reset the database
if (!$this->deleteDataTables($dbVersion)) {
- glmMembersAdmin::addNotice('<b>Unable to delete the database tables while resetting the database.</b><br>', 'AdminError');
break;
}
if (!$this->createDataTables($dbVersion)) {
- glmMembersAdmin::addNotice('<b>Unable to create the database tables while resetting the database.</b><br>', 'AdminError');
break;
}
- glmMembersAdmin::addNotice('<b>Database tables have been reset in preparation importing members.</b><br>', 'AdminNotice');
-
// Delete Images
foreach( new RecursiveIteratorIterator(
// Replace {prefix} with table name prefix
$sql = str_replace('{prefix}', GLM_MEMBERS_PLUGIN_DB_PREFIX, $sql);
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- glmMembersAdmin::addNotice('Dropping all database tables', 'Process');
- glmMembersAdmin::addNotice($sql, 'DataBlock', 'Drop Tables SQL');
- }
-
// Removing the tables using the script
$this->wpdb->query($sql);
// If there's been an error, display in debug Alert
$queryError = $this->wpdb->last_error;
- if ($queryError) {
- glmMembersAdmin::addNotice('<b>Error when deleting database: Database tables may not have existed.</b><br>Check following message.<br>'.$queryError, 'AdminError');
- }
return true;
$queryError = $this->wpdb->last_error;
if ($queryError) {
- glmMembersAdmin::addNotice('<b>Error when creating database: Database tables may already exist.</b><br>Check following message.<br>'.$queryError, 'AdminError');
return false;
}
$qForDebug .= $queryError.$q;
} while ($queryError == '' && next($queries));
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- glmMembersAdmin::addNotice('Creating database tables', 'Process');
- glmMembersAdmin::addNotice($qForDebug, 'DataBlock', 'Create Tables SQL');
- }
-
return true;
}
$dbVersion = GLM_MEMBERS_PLUGIN_DB_VERSION;
// Reset the database
- if (!$this->deleteDataTables($dbVersion)) {
- glmMembersAdmin::addNotice('<b>Unable to delete the database tables while resetting the database.</b><br>', 'AdminError');
- //break;
- }
- if (!$this->createDataTables($dbVersion)) {
- glmMembersAdmin::addNotice('<b>Unable to create the database tables while resetting the database.</b><br>', 'AdminError');
- //break;
- }
-
- glmMembersAdmin::addNotice('<b>Database tables have been reset in preparation importing members.</b><br>', 'AdminNotice');
+ $this->deleteDataTables($dbVersion);
+ $this->createDataTables($dbVersion);
// Delete Images
foreach( new RecursiveIteratorIterator(
// Try to get the first (should be only) entry for general settings.
$generalSettings = $this->editEntry( $id );
- if ( $generalSettings === false ) {
-
- if ( GLM_MEMBERS_PLUGIN_ADMIN_DEBUG ) {
- glmMembersAdmin::addNotice("<b> /models/admin/settings/index.php: Unable to load General Settings.", 'Alert');
- }
- }
-
break;
}
if( $settings_update_error ){
// Update the general settings
$termsSettings = $this->updateEntry(1);
- // Display admin message that the data has been updated
- glmMembersAdmin::addNotice('Terms Settings for the '.GLM_MEMBERS_PLUGIN_NAME.' plugin have been updated.', 'AdminNotice');
-
break;
// Default is to get the current settings and display the form
// Check that we actually have the terms
if ($termsSettings === false) {
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- glmMembersAdmin::addNotice("<b>/models/admin/settings/terms.php:</b> Unable to load Terms Settings.", 'Alert');
- }
-
return array(
'status' => false,
'menuItemRedirect' => 'error',
// Update the general settings
$themeSettings = $this->updateEntry(1);
- // Display admin message that the data has been updated
- glmMembersAdmin::addNotice('Theme Settings for the '.GLM_MEMBERS_PLUGIN_NAME.' plugin have been updated.', 'AdminNotice');
-
break;
// Default is to get the current settings and display the form
// Check that we actually have the theme
if ($themeSettings === false) {
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- glmMembersAdmin::addNotice("<b>/models/admin/settings/theme.php:</b> Unable to load Theme Settings.", 'Alert');
- }
-
return array(
'status' => false,
'menuItemRedirect' => 'error',
}
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- glmMembersAdmin::addNotice(' Added new member: ID = '.$memberID, 'Process');
- glmMembersAdmin::addNotice($memberData, 'DataBlock', 'Member Data');
- }
-
// Otherwise setup to get new mmember data
} else {
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- glmMembersAdmin::addNotice(' No member ID supplied.', 'Process');
- }
-
// Setup to add a new member
$memberData = $this->newEntry();
$addingMember = true;
$memberData = $this->updateEntry($memberID);
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- glmMembersAdmin::addNotice("<b> Member Update:</b> $memberID", 'Process');
- }
-
// If update was successful then use editEntry() to setup for the edit again.
if ($memberData['status']) {
*/
} elseif ($memberID > 0) {
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- glmMembersAdmin::addNotice("<b> Member ID specified:</b> $memberID", 'Process');
- }
-
// Try to get existing member data
$memberData = $this->editEntry($memberID);
if ($memberData) {
}
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
- glmMembersAdmin::addNotice($memberData, 'DataBlock', 'Member Data');
- }
-
/*
*
* Other actions that may be required
// If member ID not supplied and we're not adding a new member - we shouldn't be here, so redirect to an error page
if ($this->memberID <= 0 && $option != 'add' && $option != 'addNew') {
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- glmMembersAdmin::addNotice("<b> Member ID expected but no ID was supplied.", 'Alert');
- }
-
return array(
'status' => true,
'menuItemRedirect' => 'error',
$memberData = $this->updateEntry($this->memberID);
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- glmMembersAdmin::addNotice("<b> Member Update:</b> $this->memberID", 'Process');
- }
-
// If update was successful then use editEntry() to setup for the edit again.
if ($memberData['status']) {
// If member ID not supplied or someone is tampering with a member id for a locked member - we shouldn't be here, so redirect to an error page
if ($this->memberID <= 0 || ($lockedToMember && $this->memberID != $lockedToMember)) {
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- glmMembersAdmin::addNotice("<b> Member ID expected but no ID was supplied.", 'Alert');
- }
-
return array(
'status' => true,
'menuItemRedirect' => 'error',
$option = 'create';
}
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- glmMembersAdmin::addNotice("<b> Option specified:</b> $option", 'Process');
- }
-
/*
* Get a sorted list of categories to use for picklists.
* These will be sorted so sub-categories fall under their
} else {
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- glmMembersAdmin::addNotice("<b> No member information exists, assuming this is a new submission.", 'Process');
- }
-
}
glmClearShortcodeCache();
// Otherwise
} else {
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- glmMembersAdmin::addNotice("<b> Member ID is invalid or Status not success:</b> Member ID = $this->memberInfoID", 'Alert');
- }
-
$this->error = true;
}
}
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
- glmMembersAdmin::addNotice($this->memberInfo, 'DataBlock', 'Member Data');
- }
-
// Compile template data
$templateData = array(
'haveMember' => $this->haveMember,
$nextStart = $start + $limit;
}
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
- glmMembersAdmin::addNotice($list, 'DataBlock', 'Member Data');
- }
-
// since we're doing paging, we have to break out just the member data
$list = $listResult['list'];
unset($listResult);
$amenities = $this->getList();
//echo '<pre>$amenities: ' . print_r($amenities, true) . '</pre>';
- if ( GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE ) {
- glmMembersAdmin::addNotice( $amenities, 'DataBlock', 'Amenities Data' );
- }
-
// If we have list entries - even if it's an empty list
$success = true;
$haveAmenities = false;
$groups = $groupData->getList();
- if ( GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE ) {
- glmMembersAdmin::addNotice( $groups, 'DataBlock', 'Amenity Groups Data' );
- }
-
if ( $groups !== false ) {
$success = true;
);
}
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
- glmMembersAdmin::addNotice( $amenities, 'DataBlock', 'Amenities Data' );
- }
-
// Compile template data
$templateData = array(
'enable_members' => $enable_members,
// Get a current list of categories
$categories = $this->getList();
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
- glmMembersAdmin::addNotice($categories, 'DataBlock', 'Category Data');
- }
-
// If we have list entries - even if it's an empty list
$success = true;
$haveCategories = false;
// Sort results by higherarchy (Parent/Child and Alpha)
$categories = $this->sortParentChild($categories);
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
- glmMembersAdmin::addNotice($categories, 'DataBlock', 'Categories Data');
- }
-
// Compile template data
$templateData = array(
'enable_members' => $enable_members,
// Get a current list of members
$cities = $this->getList( '', 'name' );
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
- glmMembersAdmin::addNotice($cities, 'DataBlock', 'City Data');
- }
-
// If we have list entries - even if it's an empty list
$success = true;
$haveCities = false;
);
}
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
- glmMembersAdmin::addNotice($cities, 'DataBlock', 'Cities Data');
- }
-
// Compile template data
$templateData = array(
'enable_members' => $enable_members,
// Get a current list of members
$counties = $this->getList('', 'name');
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
- glmMembersAdmin::addNotice($counties, 'DataBlock', 'County Data');
- }
-
// If we have list entries - even if it's an empty list
$success = true;
$haveCounties = false;
);
}
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
- glmMembersAdmin::addNotice($counties, 'DataBlock', 'Counties Data');
- }
-
// Compile template data
$templateData = array(
'enable_members' => $enable_members,
// Get a current list of member types
$memberTypes = $this->getList();
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
- glmMembersAdmin::addNotice($memberTypes, 'DataBlock', 'Member Type Data');
- }
-
// If we have list entries - even if it's an empty list
$success = true;
$haveMemberTypes = false;
);
}
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
- glmMembersAdmin::addNotice($memberTypes, 'DataBlock', 'Member Types Data');
- }
-
// Compile template data
$templateData = array(
'enable_members' => $enable_members,
// Get a current list of members
$regions = $this->getList('', 'name');
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
- glmMembersAdmin::addNotice($regions, 'DataBlock', 'Region Data');
- }
-
// If we have list entries - even if it's an empty list
$success = true;
$haveRegions = false;
);
}
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
- glmMembersAdmin::addNotice($regions, 'DataBlock', 'Regions Data');
- }
-
// Compile template data
$templateData = array(
'enable_members' => $enable_members,
}
// Find the active member info record and get it with main member data
- if (GLM_MEMBERS_PLUGIN_FRONT_DEBUG) {
- glmMembersFront::addNotice($memberData, 'DataBlock', 'Member Info with Member Data');
- }
-
// If we did get member Info
if ($memberData) {
}
- if (GLM_MEMBERS_PLUGIN_FRONT_DEBUG) {
- glmMembersFront::addNotice($list, 'DataBlock', 'Member Data');
- }
-
}
if ($paging) {