'field' => 'event',
'type' => 'integer',
'required' => true,
- 'use' => 'lgneud'
+ 'use' => 'lgned'
),
// Event Name
'field' => 'event_name',
'type' => 'text',
'required' => true,
- 'use' => 'lgneud'
+ 'use' => 'lgned'
),
// A short code used to reference this event
// Bitmap of how user accounts may be used for this event - See registration_account_option in plugin.ini
'registration_account_options' => array (
- 'field' => 'registration_account_options',
- 'type' => 'bitmap',
+ 'field' => 'registration_account_options',
+ 'type' => 'bitmap',
'bitmap' => $this->config['registration_account_option'],
- 'default' => 0, // none selected
- 'use' => 'a'
+ 'default' => 0, // none selected
+ 'use' => 'a'
),
// Bitmap of payment methods available to users for this event - See payment_method in plugin.ini
'payment_methods' => array (
- 'field' => 'payment_methods',
- 'type' => 'bitmap',
+ 'field' => 'payment_methods',
+ 'type' => 'bitmap',
'bitmap' => $this->config['payment_method'],
- 'default' => 0, // none selected
- 'use' => 'a'
+ 'default' => 0, // none selected
+ 'use' => 'a'
),
// Bitmap of restricted (admin use only) payment methods for this event - see payment_method
'restricted_payment_methods' => array (
- 'field' => 'restricted_payment_methods',
- 'type' => 'bitmap',
+ 'field' => 'restricted_payment_methods',
+ 'type' => 'bitmap',
'bitmap' => $this->config['payment_method'],
- 'default' => 0, // none selected
- 'use' => 'a'
+ 'default' => 0, // none selected
+ 'use' => 'a'
),
// Terms and Conditions for registration
),
);
-
+
}
+ /*
+ * Get Alpha list of first characters in event name
+ *
+ * @param string $where Where clause
+ * @param string $selected Optional selected alpha character
+ *
+ * @return object Class object
+ *
+ */
+ public function getAlphaList($where = '', $selected = '')
+ {
+
+ $sql = "
+ SELECT DISTINCT LEFT(T.event_name, 1) AS alpha
+ FROM ".GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX. "reg_event T
+ WHERE true
+ $where
+ ORDER BY alpha
+ ;";
+ $alphaData = $this->wpdb->get_results($sql, ARRAY_A);
+
+ // Set selected
+ foreach ($alphaData as $k=>$v) {
+ $alphaData[$k]['default'] = ($v['alpha'] == $selected);
+ }
+
+ return $alphaData;
+
+ }
+
+ /*
+ * Get a simple reg event list - Event Name and ID only
+ *
+ * @return array Array of Name and ID for all reg events
+ * @access public
+ */
+ public function getSimpleRegEventsList($where = '', $order = '', $fieldVals = true, $idField = 'id', $start = false, $limit = false)
+ {
+
+ // Save the current fields array and make a copy
+ $fSave = $this->fields;
+
+ // Remove what we don't want from the copy and get the list
+ $this->fields = array(
+ 'id' => $fSave['id'],
+ 'event_name' => $fSave['event_name']
+ );
+
+ $regEventsList = $this->getList($where, $order, $fieldVals, $idField, $start, $limit);
+
+ // Restore the fields list
+ $this->fields = $fSave;
+
+ return $regEventsList;
+ }
+
+ /**
+ * Get ID/Event Name list
+ *
+ * @param string $where
+ *
+ * @return array ID/Name pairs
+ */
+ public function getIdRegEvent($where = 'true')
+ {
+ $savedFields = $this->fields;
+
+ $this->fields = array(
+ 'id' => $savedFields['id'],
+ 'event_name' => $savedFields['event_name']
+ );
+
+ $r = $this->getList($where);
+
+ $this->fields = $savedFields;
+
+ return $r;
+
+ }
+
+
}
?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Gaslight Media Members Database
+ * Admin Registrations Dashboard
+ *
+ * PHP version 5.5
+ *
+ * @category glmWordPressPlugin
+ * @package glmMembersDatabase
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release index.php,v 1.0 2014/10/31 19:31:47 cscott Exp $
+ * @link http://dev.gaslightmedia.com/
+ */
+echo "NOT UPDATED";exit;
+// Load Registrations data abstract
+require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataRegEvent.php';
+
+class GlmMembersAdmin_registrations_events extends GlmDataRegistrationsRegEvent
+{
+
+ /**
+ * WordPress Database Object
+ *
+ * @var $wpdb
+ * @access public
+ */
+ public $wpdb;
+ /**
+ * Plugin Configuration Data
+ *
+ * @var $config
+ * @access public
+ */
+ public $config;
+ /**
+ * Registrations Event ID
+ *
+ * @var $eventID
+ * @access public
+ */
+ public $regEventID = false;
+
+ /**
+ * Constructor
+ *
+ * This contructor performs the work for this model. This model returns
+ * an array containing the following.
+ *
+ * 'status'
+ *
+ * True if successfull and false if there was a fatal failure.
+ *
+ * 'view'
+ *
+ * A suggested view name that the contoller should use instead of the
+ * default view for this model or false to indicate that the default view
+ * should be used.
+ *
+ * 'data'
+ *
+ * Data that the model is returning for use in merging with the view to
+ * produce output.
+ *
+ * @wpdb object WordPress database object
+ *
+ * @return array Array containing status, suggested view, and any data
+ */
+ public function __construct ($wpdb, $config)
+ {
+
+ // Save WordPress Database object
+ $this->wpdb = $wpdb;
+
+ // Save plugin configuration object
+ $this->config = $config;
+
+ /*
+ * Run constructor for the REgistrations data class
+ *
+ * Note, the third parameter is a flag that indicates to the Contacts
+ * data class that it should flag a group of fields as 'view_only'.
+ */
+ parent::__construct(false, false, true);
+
+ }
+
+ public function modelAction($actionData = false)
+ {
+
+ $option = 'list';
+ $template = 'list.html';
+ $haveEvent = false;
+ $eventID = false;
+ $haveRegEvent = false;
+ $regEventID = false;
+ $regEventUpdated = false;
+ $regEventUpdateError = false;
+ $regEventAdded = false;
+ $reason = false;
+
+ // Get any provided option
+ if (isset($_REQUEST['option'])) {
+ $option = $_REQUEST['option'];
+ }
+
+ // Check for a supplied regEvent record ID
+ if (isset($_REQUEST['regEventID']) && $_REQUEST['regEventID'] != '') {
+ $regEventID = ($_REQUEST['regEventID'] - 0);
+ if ($regEventID > 0) {
+ $regEvent = $this->getEntry($regEventID);
+ if ($regEvent) {
+ $haveRegEvent = true;
+ }
+ }
+ }
+
+ // If we don't have a reg event ID, then check for an event ID and make sure it's a positive integer
+ if (!$haveRegEvent && isset($_REQUEST['event']) && $_REQUEST['event'] != '') {
+ $eventID = ($_REQUEST['event']-0);
+ }
+
+ // If we don't have a regEvent or likely event ID, force option to a list
+ if (!$haveRegEvent && !$eventID) {
+ $option = 'list';
+ }
+
+ switch( $option ) {
+
+ case 'update':
+
+ // Try to update the reg event
+ $regEvent = $this->updateEntry($regEventID);
+
+ // If there's some type of failure, flag that for the view file
+ if ($regEvent['status']) {
+ $regEventUpdated = true;
+ } else {
+ $regEventUpdateError = true;
+ }
+
+ $template = 'eventEdit.html';
+
+ break;
+
+
+ case 'add':
+ case 'edit':
+
+ if ($option == 'add') {
+
+ // Verify that event is not already listed
+ $regEvent = $this->getEntry($eventID, 'event');
+ if (!$regEvent) {
+
+ // Get data on this event from events add-on
+ $eventData = apply_filters('glm-member-db-events-get-event', $eventID);
+
+ // Did we get event data?
+ if ($eventData) {
+
+ // Add event to registrations
+ $sql = "
+ INSERT INTO ".$this->table."
+ (
+ event,
+ event_name,
+ event_code,
+ notify_email,
+ admin_active,
+ active,
+ attendees,
+ attendee_max,
+ attendee_max_per_reg,
+ reg_hold_minutes,
+ cart_hold_days,
+ registration_account_options,
+ payment_methods,
+ restricted_payment_methods,
+ terms
+ )
+ VALUES
+ (
+ ".$eventData['id'].",
+ '".$eventData['name']."',
+ '".$eventData['name_slug']."',
+ '".$eventData['admin_email']."',
+ false,
+ false,
+ true,
+ 0,
+ 0,
+ 60,
+ 10,
+ 0,
+ 0,
+ 0,
+ ''
+ )
+ ;";
+ $this->wpdb->query($sql);
+ $regEventID = $this->wpdb->insert_id;
+
+ if ($regEventID) {
+ $regEventUpdated = true;
+ }
+
+ }
+
+ } else {
+ $reason = "Trying to add an event that is already listed in Registrations.";
+ }
+
+ }
+
+ // If there's no problem yet, try to get the regEvent data for edit
+ if ($reason == '') {
+ if ($regEventID) {
+ $regEvent = $this->editEntry($regEventID);
+ if ($regEvent) {
+ $haveRegEvent = true;
+ }
+ }
+ }
+
+ $template = 'eventEdit.html';
+ break;
+
+ case 'dashboard':
+
+ if ($regEventID) {
+ $regEvent = $this->editEntry($regEventID);
+ if ($regEvent) {
+ $haveRegEvent = true;
+ }
+ }
+
+ if (!$haveRegEvent) {
+ $reason = 'Unable to load registration event data.';
+ }
+
+ $template = 'eventDashboard.html';
+ break;
+
+ case 'list':
+ default:
+
+ $regEventList = $this->getList();
+
+ $template = 'eventList.html';
+ break;
+
+ }
+
+
+ // Compile template data
+ $templateData = array(
+ 'haveEvent' => $haveEvent,
+ 'eventID' => $eventID,
+ 'haveRegEvent' => $haveRegEvent,
+ 'regEventID' => $regEventID,
+ 'regEvent' => $regEvent,
+ 'regEventUpdated' => $regEventUpdated,
+ 'regEventUpdateError' => $regEventUpdateError,
+ 'regEventAdded' => $regEventAdded ,
+ 'reason' => $reason
+ );
+
+ // Return status, any suggested view, and any data to controller
+ return array(
+ 'status' => true,
+ 'modelRedirect' => false,
+ 'view' => 'admin/registrations/'.$template,
+ 'data' => $templateData
+ );
+
+ }
+
+
+}
--- /dev/null
+<?php
+/**
+ * Gaslight Media Members Database
+ * Admin Registrations Event Dashboard
+ *
+ * PHP version 5.5
+ *
+ * @category glmWordPressPlugin
+ * @package glmMembersDatabase
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release index.php,v 1.0 2014/10/31 19:31:47 cscott Exp $
+ * @link http://dev.gaslightmedia.com/
+ */
+
+// Load Registrations data abstract
+require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataRegEvent.php';
+
+class GlmMembersAdmin_registrations_event extends GlmDataRegistrationsRegEvent
+{
+
+ /**
+ * WordPress Database Object
+ *
+ * @var $wpdb
+ * @access public
+ */
+ public $wpdb;
+ /**
+ * Plugin Configuration Data
+ *
+ * @var $config
+ * @access public
+ */
+ public $config;
+ /**
+ * Registrations Event ID
+ *
+ * @var $eventID
+ * @access public
+ */
+ public $regEventID = false;
+
+ /**
+ * Constructor
+ *
+ * This contructor performs the work for this model. This model returns
+ * an array containing the following.
+ *
+ * 'status'
+ *
+ * True if successfull and false if there was a fatal failure.
+ *
+ * 'view'
+ *
+ * A suggested view name that the contoller should use instead of the
+ * default view for this model or false to indicate that the default view
+ * should be used.
+ *
+ * 'data'
+ *
+ * Data that the model is returning for use in merging with the view to
+ * produce output.
+ *
+ * @wpdb object WordPress database object
+ *
+ * @return array Array containing status, suggested view, and any data
+ */
+ public function __construct ($wpdb, $config)
+ {
+
+ // Save WordPress Database object
+ $this->wpdb = $wpdb;
+
+ // Save plugin configuration object
+ $this->config = $config;
+
+ /*
+ * Run constructor for the REgistrations data class
+ *
+ * Note, the third parameter is a flag that indicates to the Contacts
+ * data class that it should flag a group of fields as 'view_only'.
+ */
+ parent::__construct(false, false, true);
+
+ }
+
+ public function modelAction($actionData = false)
+ {
+
+ $option = 'list';
+ $template = 'list.html';
+ $regEvent = false;
+ $haveEvent = false;
+ $eventID = 0;
+ $haveRegEvent = false;
+ $regEventID = 0;
+ $regEventUpdated = false;
+ $regEventUpdateError = false;
+ $regEventAdded = false;
+ $reason = false;
+
+ // Get any provided option
+ if (isset($_REQUEST['option'])) {
+ $option = $_REQUEST['option'];
+ }
+
+
+ // Check for a supplied regEvent record ID
+ if (isset($_REQUEST['regEventID']) && $_REQUEST['regEventID'] != '') {
+
+ // Ensure ID is a positive integer
+ $regEventID = ($_REQUEST['regEventID'] - 0);
+
+ // If no ID was supplied try to get last used reg event ID
+ if ($regEventID <= 0) {
+ $regEventID = get_option('glmMembersDatabaseLastUsedRegEventID');
+ }
+
+ }
+
+ // If we have a positive Int reg event ID, try to get the reg event data
+ if ($regEventID > 0) {
+ $regEvent = $this->getEntry($regEventID);
+ if ($regEvent) {
+ $haveRegEvent = true;
+ }
+ }
+
+ // If we don't have a reg event ID, then check for an event ID to create new reg event
+ if (!$haveRegEvent && isset($_REQUEST['event']) && $_REQUEST['event'] != '') {
+ $eventID = ($_REQUEST['event']-0);
+ }
+
+ switch( $option ) {
+
+ case 'update':
+
+ // Try to update the reg event
+ $regEvent = $this->updateEntry($regEventID);
+
+ // If there's some type of failure, flag that for the view file
+ if ($regEvent['status']) {
+ $regEventUpdated = true;
+ } else {
+ $regEventUpdateError = true;
+ }
+
+ $template = 'eventEdit.html';
+
+ break;
+
+
+ case 'add':
+ case 'edit':
+
+ if ($option == 'add') {
+
+ // Verify that event is not already listed
+ $regEvent = $this->getEntry($eventID, 'event');
+ if (!$regEvent) {
+
+ // Get data on this event from events add-on
+ $eventData = apply_filters('glm-member-db-events-get-event', $eventID);
+
+ // Did we get event data?
+ if ($eventData) {
+
+ // Add event to registrations
+ $sql = "
+ INSERT INTO ".$this->table."
+ (
+ event,
+ event_name,
+ event_code,
+ notify_email,
+ admin_active,
+ active,
+ attendees,
+ attendee_max,
+ attendee_max_per_reg,
+ reg_hold_minutes,
+ cart_hold_days,
+ registration_account_options,
+ payment_methods,
+ restricted_payment_methods,
+ terms
+ )
+ VALUES
+ (
+ ".$eventData['id'].",
+ '".$eventData['name']."',
+ '".$eventData['name_slug']."',
+ '".$eventData['admin_email']."',
+ false,
+ false,
+ true,
+ 0,
+ 0,
+ 60,
+ 10,
+ 0,
+ 0,
+ 0,
+ ''
+ )
+ ;";
+ $this->wpdb->query($sql);
+ $regEventID = $this->wpdb->insert_id;
+
+ if ($regEventID) {
+ $regEventUpdated = true;
+ }
+
+ }
+
+ } else {
+ $reason = "Trying to add an event that is already listed in Registrations.";
+ }
+
+ }
+
+ // If there's no problem yet, try to get the regEvent data for edit
+ if ($reason == '') {
+ if ($regEventID) {
+ $regEvent = $this->editEntry($regEventID);
+ if ($regEvent) {
+ $haveRegEvent = true;
+ }
+ }
+ }
+
+ $template = 'eventEdit.html';
+ break;
+
+ case 'dashboard':
+ default:
+
+ if ($regEventID) {
+ $regEvent = $this->editEntry($regEventID);
+ if ($regEvent) {
+ $haveRegEvent = true;
+ }
+ }
+
+ if (!$haveRegEvent) {
+ $reason = 'Unable to load registration event data or registration event not selected.';
+ }
+
+ $template = 'event.html';
+ break;
+
+ } // switch
+
+ // If we have a reg event, then save it as last accessed
+ if ($haveRegEvent) {
+ update_option('glmMembersDatabaseLastUsedRegEventID', $regEventID);
+ }
+
+ // Compile template data
+ $templateData = array(
+ 'option' => $option,
+ 'haveEvent' => $haveEvent,
+ 'eventID' => $eventID,
+ 'haveRegEvent' => $haveRegEvent,
+ 'regEventID' => $regEventID,
+ 'regEvent' => $regEvent,
+ 'regEventUpdated' => $regEventUpdated,
+ 'regEventUpdateError' => $regEventUpdateError,
+ 'regEventAdded' => $regEventAdded ,
+ 'reason' => $reason
+ );
+
+ // Return status, any suggested view, and any data to controller
+ return array(
+ 'status' => true,
+ 'modelRedirect' => false,
+ 'view' => 'admin/registrations/'.$template,
+ 'data' => $templateData
+ );
+
+ }
+
+
+}
public function modelAction($actionData = false)
{
- $option = 'list';
- $template = 'list.html';
- $haveEvent = false;
- $eventID = false;
- $haveRegEvent = false;
- $regEventID = false;
- $reason = false;
+ $option = 'list';
+ $template = 'list.html';
+ $haveEvent = false;
+ $eventID = false;
+ $haveRegEvent = false;
+ $regEventID = false;
+ $regEventUpdated = false;
+ $regEventUpdateError = false;
+ $regEventAdded = false;
+ $reason = false;
// Get any provided option
if (isset($_REQUEST['option'])) {
}
// Check for a supplied regEvent record ID
- if (isset($_REQUEST['regEvent']) && $_REQUEST['regEvent'] != '') {
- $regEventID = ($_REQUEST['regEvent'] - 0);
+ if (isset($_REQUEST['regEventID']) && $_REQUEST['regEventID'] != '') {
+ $regEventID = ($_REQUEST['regEventID'] - 0);
if ($regEventID > 0) {
$regEvent = $this->getEntry($regEventID);
if ($regEvent) {
}
}
- // Check for an event ID and make sure it's a positive integer
- if (isset($_REQUEST['event']) && $_REQUEST['event'] != '') {
+ // If we don't have a reg event ID, then check for an event ID and make sure it's a positive integer
+ if (!$haveRegEvent && isset($_REQUEST['event']) && $_REQUEST['event'] != '') {
$eventID = ($_REQUEST['event']-0);
}
if (!$haveRegEvent && !$eventID) {
$option = 'list';
}
-
+
switch( $option ) {
+ case 'update':
+
+ // Try to update the reg event
+ $regEvent = $this->updateEntry($regEventID);
+
+ // If there's some type of failure, flag that for the view file
+ if ($regEvent['status']) {
+ $regEventUpdated = true;
+ } else {
+ $regEventUpdateError = true;
+ }
+
+ $template = 'eventEdit.html';
+
+ break;
+
+
case 'add':
case 'edit':
'".$eventData['name']."',
'".$eventData['name_slug']."',
'".$eventData['admin_email']."',
- true,
- ".($eventData['status']['value'] == 10 ? 'true' : 'false').",
+ false,
+ false,
true,
0,
0,
;";
$this->wpdb->query($sql);
$regEventID = $this->wpdb->insert_id;
+
+ if ($regEventID) {
+ $regEventUpdated = true;
+ }
}
$template = 'eventEdit.html';
break;
- case 'dashboard':
-
- if ($regEventID) {
- $regEvent = $this->editEntry($regEventID);
- if ($regEvent) {
- $haveRegEvent = true;
- }
- }
-
- if (!$haveRegEvent) {
- $reason = 'Unable to load registration event data.';
- }
-
- $template = 'eventDashboard.html';
- break;
-
- case 'list':
default:
+
+ echo "OOOPPPPSSSSS! Should not get here.....";
+ exit;
- $regEventList = $this->getList();
-
- $template = 'eventList.html';
break;
-
+
+
}
// Compile template data
$templateData = array(
- 'haveEvent' => $haveEvent,
- 'eventID' => $eventID,
- 'haveRegEvent' => $haveRegEvent,
- 'regEventID' => $regEventID,
- 'regEvent' => $regEvent,
- 'reason' => $reason
+ 'haveEvent' => $haveEvent,
+ 'eventID' => $eventID,
+ 'haveRegEvent' => $haveRegEvent,
+ 'regEventID' => $regEventID,
+ 'regEvent' => $regEvent,
+ 'regEventUpdated' => $regEventUpdated,
+ 'regEventUpdateError' => $regEventUpdateError,
+ 'regEventAdded' => $regEventAdded ,
+ 'reason' => $reason
);
// Return status, any suggested view, and any data to controller
public function modelAction($actionData = false)
{
-
// Compile template data
$templateData = array(
);
--- /dev/null
+<?php
+/**
+ * Gaslight Media Members Database
+ * Admin Registrations Events List
+ *
+ * PHP version 5.5
+ *
+ * @category glmWordPressPlugin
+ * @package glmMembersDatabase
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release index.php,v 1.0 2014/10/31 19:31:47 cscott Exp $
+ * @link http://dev.gaslightmedia.com/
+ */
+
+// Load Registrations data abstract
+require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataRegEvent.php';
+
+class GlmMembersAdmin_registrations_list extends GlmDataRegistrationsRegEvent
+{
+
+ /**
+ * WordPress Database Object
+ *
+ * @var $wpdb
+ * @access public
+ */
+ public $wpdb;
+ /**MEMBER
+ * Plugin Configuration Data
+ *
+ * @var $config
+ * @access public
+ */
+ public $config;
+ /**
+ * Registrations Event ID
+ *
+ * @var $eventID
+ * @access public
+ */
+ public $regEventID = false;
+
+ /**
+ * Constructor
+ *
+ * This contructor performs the work for this model. This model returns
+ * an array containing the following.
+ *
+ * 'status'
+ *
+ * True if successfull and false if there was a fatal failure.
+ *
+ * 'view'
+ *
+ * A suggested view name that the contoller should use instead of the
+ * default view for this model or false to indicate that the default view
+ * should be used.
+ *
+ * 'data'
+ *
+ * Data that the model is returning for use in merging with the view to
+ * produce output.
+ *
+ * @wpdb object WordPress database object
+ *
+ * @return array Array containing status, suggested view, and any data
+ */
+ public function __construct ($wpdb, $config)
+ {
+
+ // Save WordPress Database object
+ $this->wpdb = $wpdb;
+
+ // Save plugin configuration object
+ $this->config = $config;
+
+ /*
+ * Run constructor for the REgistrations data class
+ *
+ * Note, the third parameter is a flag that indicates to the Contacts
+ * data class that it should flag a group of fields as 'view_only'.
+ */
+ parent::__construct(false, false, true);
+
+ }
+
+ public function modelAction($actionData = false)
+ {
+
+ $where = ' true ';
+ $alphaWhere = ' true ';
+ $numbDisplayed = false;
+ $lastDisplayed = false;
+ $paging = true;
+ $prevStart = false;
+ $nextStart = false;
+ $start = 1;
+ $limit = 20; // Set to the number of listings per page
+ $textSearch = false;
+ $where = "TRUE";
+ $alphaList = false;
+ $alphaWhere = '';
+ $alphaSelected = false;
+ $haveRegEvents = false;
+ $regEventsCount = false;
+
+ // If doing alpha list
+ if (isset($_REQUEST['alpha'])) {
+ $actionData['request']['alpha'] = $_REQUEST['alpha'];
+ }
+
+ // If user clicked a page request then we need to check the savedAlpha value
+ if (isset($_REQUEST['savedAlpha']) && isset($_REQUEST['pageSelect'])) {
+ $actionData['request']['alpha'] = $_REQUEST['savedAlpha'];
+ }
+
+ if ($actionData['request']['alpha'] && strlen($actionData['request']['alpha']) == 1) {
+ $alphaSelected = strtoupper($actionData['request']['alpha']);
+ $alphaWhere .= " AND T.name LIKE '$alphaSelected%'";
+ }
+
+ // Get full list for all other filters, but not filtered by alpha (that would be silly)
+ $alphaList = $this->getAlphaList(' AND '.$where, $alphaSelected);
+
+ // Get count of reg event listed
+ $regEventsCount = $this->getStats($where);
+
+ // Get stats for number of members found matching current selection criteria (includes alpha selection)
+ $filteredRegEventsFound = $this->getStats(str_replace('T.', '', $where.$alphaWhere));
+
+ // Get a current list of reg events
+ $listResult = $this->getSimpleRegEventsList($where.$alphaWhere, 'event_name', true, 'id', $start, $limit);
+
+ // Get paging results
+ $numbDisplayed = $listResult['returned'];
+ $lastDisplayed = $listResult['last'];
+ if ($start == 1) {
+ $prevStart = false;
+ } else {
+ $prevStart = $start - $limit;
+ if ($start < 1) {
+ $start = 1;
+ }
+ }
+ if ($listResult['returned'] == $limit) {
+ $nextStart = $start + $limit;
+ }
+
+ // since we're doing paging, we have to break out just the member data
+ $list = $listResult['list'];
+ unset($listResult);
+
+ // If we have list entries - even if it's an empty list
+ $success = true;
+ $haveRegEvents = false;
+ if ($list !== false) {
+
+ $success = true;
+
+ // If we have any entries
+ if (count($list) > 0) {
+ $haveRegEvents = true;
+ }
+ }
+
+ // Add a url for each reg event
+ if ( isset( $list) && is_array( $list ) ) {
+ foreach ($list as $regEvent) {
+ $list[$regEvent['id']]['reg'] = sanitize_title($member['name']);
+ }
+ }
+
+
+
+
+
+
+
+ $template = 'list.html';
+
+/*
+
+ // Check for a text search
+ if (isset($_REQUEST['text_search']) && trim($_REQUEST['text_search']) != '') {
+
+ $textSearch = addslashes(filter_input(INPUT_POST, 'text_search', FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES));
+ $where .= " AND T.id in (
+ SELECT DISTINCT(member)
+ FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX."member_info
+ WHERE member_name like '%$textSearch%'
+ )";
+ }
+
+ // Check for "Pending Only
+ if (isset($_REQUEST['filterPending'])) {
+
+ // Refine search only to members with pending Info data
+ $where .= " AND (
+ SELECT COUNT(id)
+ FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX."member_info I
+ WHERE I.status = ".$this->config['status_numb']['Pending']."
+ AND I.member = T.id
+ )";
+
+ $filterPending = true;
+ $haveFilter = true;
+ }
+
+ // Check for "Featured Only
+ if (isset($_REQUEST['filterFeatured'])) {
+
+ // Refine search only to members with pending Info data
+ $where .= " AND (
+ SELECT COUNT(id)
+ FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX."members I
+ WHERE I.featured = 1
+ AND I.id = T.id
+
+ )";
+ $filterFeatured = true;
+ $haveFilter = true;
+ }
+
+ // If doing alpha list
+ if (isset($_REQUEST['alpha'])) {
+ $actionData['request']['alpha'] = $_REQUEST['alpha'];
+ }
+
+ $alphaList = false;
+ $alphaWhere = '';
+
+ $alphaSelected = false;
+
+ // If user clicked a page request then we need to check the savedAlpha value
+ if (isset($_REQUEST['savedAlpha']) && isset($_REQUEST['pageSelect'])) {
+ $actionData['request']['alpha'] = $_REQUEST['savedAlpha'];
+ }
+
+ if ($actionData['request']['alpha'] && strlen($actionData['request']['alpha']) == 1) {
+ $alphaSelected = strtoupper($actionData['request']['alpha']);
+ $alphaWhere .= " AND T.name LIKE '$alphaSelected%'";
+ }
+
+ // Get full list for all other filters, but not filtered by alpha (that would be silly)
+ $alphaList = $this->getAlphaList(' AND '.$where, $alphaSelected);
+
+ $whereParts = apply_filters('glm-member-db-admin-search-query', $where);
+ if ( is_array( $whereParts ) && count( $whereParts ) > 0 ) {
+ $where .= ' AND '.implode(" AND ", $whereParts);
+ $whereSep = ' AND ';
+ }
+
+ // Get count of members listed
+ $memberCount = $this->getStats($where);
+
+ // If the number of members is less than a page, don't do paging
+ if ($memberCount <= $limit) {
+ $paging = false;
+ }
+
+ // Get full list of names matching this where clause for search box
+ $namesList = $this->getIdName($where);
+
+ // Check if we're doing paging
+ if (isset($_REQUEST['pageSelect'])) {
+
+ // If request is for Next
+ if ($_REQUEST['pageSelect'][0] == 'N') {
+ $newStart = $_REQUEST['nextStart'] - 0;
+
+ // Otherwise it must be Previous
+ } else {
+ $newStart = $_REQUEST['prevStart'] - 0;
+ }
+
+ if ($newStart > 0) {
+ $start = $newStart;
+ }
+ }
+
+ // Get stats for number of members found matching current selection criteria (includes alpha selection)
+ $filteredMembersFound = $this->getStats(str_replace('T.', '', $where.$alphaWhere));
+
+ // Get a current list of members
+ $listResult = $this->getSimpleMembersList($where.$alphaWhere, 'name', true, 'id', $start, $limit);
+
+ // Get paging results
+ $numbDisplayed = $listResult['returned'];
+ $lastDisplayed = $listResult['last'];
+ if ($start == 1) {
+ $prevStart = false;
+ } else {
+ $prevStart = $start - $limit;
+ if ($start < 1) {
+ $start = 1;
+ }
+ }
+ if ($listResult['returned'] == $limit) {
+ $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);
+
+ // If we have list entries - even if it's an empty list
+ $success = true;
+ $haveMembers = false;
+ if ($list !== false) {
+
+ $success = true;
+
+ // If we have any entries
+ if (count($list) > 0) {
+ $haveMembers = true;
+ }
+ }
+
+ // Determine if current user can add, edit, delete member data
+ // $canEdit = current_user_can('glm_members_edit');
+
+ // Add a url for each member
+ if ( isset( $list) && is_array( $list ) ) {
+ foreach ($list as $member) {
+ $list[$member['id']]['member_slug'] = sanitize_title($member['name']);
+ }
+ }
+
+ // Compile template data
+ $templateData = array(
+ 'enable_members' => $enable_members,
+ 'haveMembers' => $haveMembers,
+ 'members' => $list,
+ 'memberCount' => $memberCount,
+ 'categories' => $categories,
+ 'haveFilter' => $haveFilter,
+ 'filterArchived' => $filterArchived,
+ 'filterFeatured' => $filterFeatured,
+ 'filterPending' => $filterPending,
+ 'catSelected' => $catSelected,
+ 'catSearchSelected' => $catSelectedString,
+ 'alphaList' => $alphaList,
+ 'alphaSelected' => $alphaSelected,
+ 'numbDisplayed' => $numbDisplayed,
+ 'lastDisplayed' => $lastDisplayed,
+ 'paging' => $paging,
+ 'prevStart' => $prevStart,
+ 'nextStart' => $nextStart,
+ 'start' => $start,
+ 'limit' => $limit,
+ 'namesList' => $namesList,
+ 'textSearch' => $textSearch
+ );
+*/
+
+ // Compile template data
+ $templateData = array(
+ 'regEventsCount' => $regEventsCount,
+ 'haveRegEvents' => $haveRegEvents,
+ 'regEvents' => $list,
+
+ );
+
+ // Return status, any suggested view, and any data to controller
+ return array(
+ 'status' => true,
+ 'modelRedirect' => false,
+ 'view' => 'admin/registrations/'.$template,
+ 'data' => $templateData
+ );
+
+ }
+
+
+}
add_submenu_page(
'glm-members-admin-menu-members',
- 'Registration Events',
- ' Events',
+ 'Registration Events List',
+ ' List',
'glm_members_members',
- 'glm-members-admin-menu-registrations-events',
- function() {$this->controller('registrations', 'events');}
+ 'glm-members-admin-menu-registrations-list',
+ function() {$this->controller('registrations', 'list');}
);
+add_submenu_page(
+ 'glm-members-admin-menu-members',
+ 'Selected Event',
+ ' Selected Event',
+ 'glm_members_members',
+ 'glm-members-admin-menu-registrations-event',
+ function() {$this->controller('registrations', 'event');}
+ );
+
add_submenu_page(
'glm-members-admin-menu-members',
'Registration Requests',
-- Registration event specific information
-- One record for each event in Events add-on
--- Only created when selecting registrations for a particular event in the Events add-on
+-- Only created when an event is selected to offer registrations
CREATE TABLE {prefix}reg_event (
id INT NOT NULL AUTO_INCREMENT,
event INT NULL, -- Pointer to event in Events add-on - False if event record in Events add-on no longer exists
event_name TINYTEXT NULL, -- Name of Event so it will always be in the cart data
event_code TINYTEXT NULL, -- A short code used to reference this event - can be used to directly select an event to register for
notify_email TINYTEXT NULL, -- E-Mail addresses to recieve notification of a registration other than org_internal_email in management, comma separated
- admin_active BOOLEAN NULL, -- Active flag for admin from Events - If false, then does not show as a link from events to manage event. Still shows in registrations admin
+ admin_active BOOLEAN NULL, -- Active flag for admin from Events - If logged in Admin user for this event and this is true then admin user may enter registrations even if active is off.
active BOOLEAN NULL, -- Active flag to indicate that this event is available for registrations
attendees BOOLEAN NULL, -- Registration requires attendees - Otherwise the person submitting the registration is the registrant
attendee_max MEDIUMINT NULL, -- Attendee limit - 0 = unlimited
----
-- Registration Event Time - Information and summary data for a specific event instance (relates to a perticular time record in events)
+-- A pseudo entry is created if registration is not date/time sensitive for this event. The pseudo entry does not point to an event time.
-- These are created the first time a person tries to register for an event instance (time)
-- One or more for each event
CREATE TABLE {prefix}reg_time (
id INT NOT NULL AUTO_INCREMENT,
reg_event INT NULL, -- Pointer to reg_event table
- event_time INT NULL, -- Pointer to events times table entry - False if event time record in Events add-on no longer exists
+ event_time INT NULL, -- Pointer to events times table entry - If false, then this is a pseudo entry to use for all registrations (non-date/time specific)
start_datetime DATETIME NULL, -- Date and time when event instance starts - Informational - Actual events data is definitive
end_datetime DATETIME NULL, -- Date and time when event instance ends - Informational
all_day BOOLEAN NULL, -- All Day flag - Informational
'adminActions' => array(
'registrations' => array(
'index' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG,
- 'events' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG,
+ 'list' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG,
+ 'event' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG,
'requests' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG,
'accounts' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG
),
--- /dev/null
+{include file='admin/registrations/header.html'}
+
+{if $reason}
+ <p class="glm-error">{$reason}</p>
+{/if}
+
+<div id="glm-admin-member-dashboard" class="glm-admin-table">
+ {if $haveRegEvent}
+
+ <div class="glm-row">
+ <div class="glm-small-4 glm-left">
+ <div class="glm-admin-table">
+ <div class="glm-row">
+ <div class="glm-small-12 glm-column">
+ <h4>Event Name:</h4>
+ </div>
+ <div class="glm-small-12 glm-column">
+ {$regEvent.fieldData.event_name}
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="glm-small-4 glm-left">
+ <div class="glm-admin-table">
+ <div class="glm-row">
+ <div class="glm-small-12 glm-column">
+ <h4>Event Code:</h4>
+ </div>
+ <div class="glm-small-12 glm-column">
+ {$regEvent.fieldData.event_code}
+ </div>
+ </div>
+ </div>
+ </div>
+ {if apply_filters('glm_members_menu_members', true)}
+ <div class="glm-small-4 glm-right">
+ <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-event&option=edit®EventID={$regEvent.fieldData.id}" class="button button-primary glm-button glm-right">Edit Registration Event</a>
+ </div>
+ {/if}
+ </div>
+ {else}
+ <h3></h3>
+ {/if}
+
+</div>
+ <script type="text/javascript">
+ jQuery(document).ready(function($) {
+
+ // Flash certain elements for a short time after display
+ $(".glm-flash-updated").fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500);
+
+ });
+ </script>
+
+{include file='admin/footer.html'}
+
+++ /dev/null
-{include file='admin/registrations/header.html'}
-
-<h3>Registrations Event Dashboard</h3>
-
-{include file='admin/footer.html'}
-
{include file='admin/registrations/header.html'}
- <h3>Registrations Event Edit</h3>
-
-
-{$x='event_name'}
-{$regEvent.fieldData.$x}
-
-
-{include
- 'admin/registrations/text_input.html'
- fieldName='event_name'
- fieldPrompt='Event Name'
- fieldValue=$regEvent.fieldData.event_name
- fieldFail=$regEvent.fieldFail.event_name
-}
-
+ <h2>
+ Registrations Event Edit
+
+
+ {if $regEventUpdated}<span class="glm-notice glm-flash-updated">Registration Event Updated</span>{/if}
+ {if $regEventUpdateError}<span class="glm-error glm-flash-updated">Registration Event Update Error</span>{/if}
+ {if $regEventAdded}<span class="glm-notice glm-flash-updated">Registration Event Added</span>{/if}
+
+ </h2>
{if $reason}
<p class="glm-error">{$reason}</p>
{else}
- <a href="{$thisUrl}?page={$thisPage}&glm_action=registrations&option=list"
- class="button button-secondary glm-button glm-right">Return to Account List</a>
+ <a href="{$thisUrl}?page={$thisPage}&option=dashboard®EventID={$regEventID}"
+ class="button button-secondary glm-button glm-right">Return to Dashboard</a>
+
+ <p class="glm-required">(Items in red are required)</p>
<form action="{$thisUrl}?page={$thisPage}" method="post" id="regEventForm">
- <input type="hidden" name="glm_action" value="registrations">
+ <input type="hidden" name="glm_action" value="event">
<input type="hidden" name="option" value="update">
- <input type="hidden" name="regEvent" value="{$regEventId}">
+ <input type="hidden" name="regEventID" value="{$regEventID}">
<table id="glm-table-account" class="glm-admin-table">
<tr>
- <th {if $regEvent.fieldRequired.event_name} class="glm-required"}{/if}>Event Name</th>
+ <th {if $regEvent.fieldRequired.event_name}class="glm-required-nowrap"{else}class="glm-nowrap"{/if}>Event Name</th>
<td {if $regEvent.fieldFail.event_name}class="glm-form-bad-input" data-tabid="glm-event_name"{/if}>
<input type="text" name="event_name" value="{$regEvent.fieldData.event_name}" class="glm-form-text-input-medium">
{if $regEvent.fieldFail.event_name}<p>{$regEvent.fieldFail.event_name}</p>{/if}<br>
</td>
</tr>
<tr>
- <th {if $regEvent.fieldRequired.event_code} class="glm-required"}{/if}>Event Registration Code</th>
+ <th {if $regEvent.fieldRequired.event_code}class="glm-required-nowrap"{else}class="glm-nowrap"{/if}>Event Registration Code</th>
<td {if $regEvent.fieldFail.event_code}class="glm-form-bad-input" data-tabid="glm-event_code"{/if}>
<input type="text" name="event_code" value="{$regEvent.fieldData.event_code}" class="glm-form-text-input-medium">
{if $regEvent.fieldFail.event_code}<p>{$regEvent.fieldFail.event_code}</p>{/if}<br>
</td>
</tr>
<tr>
- <th {if $regEvent.fieldRequired.notify_email} class="glm-required"}{/if}>Notify E-Mail Address</th>
+ <th {if $regEvent.fieldRequired.notify_email}class="glm-required-nowrap"{else}class="glm-nowrap"{/if}>Notify E-Mail Address</th>
<td {if $regEvent.fieldFail.notify_email}class="glm-form-bad-input" data-tabid="glm-notify_email"{/if}>
<input type="text" name="notify_email" value="{$regEvent.fieldData.notify_email}" class="glm-form-text-input-medium">
{if $regEvent.fieldFail.notify_email}<p>{$regEvent.fieldFail.notify_email}</p>{/if}<br>
</td>
</tr>
<tr>
- <th {if $regEvent.fieldRequired.admin_active} class="glm-required"}{/if}>Admin Active</th>
+ <th {if $regEvent.fieldRequired.admin_active}class="glm-required-nowrap"{else}class="glm-nowrap"{/if}>Admin Active</th>
<td {if $regEvent.fieldFail.admin_active}class="glm-form-bad-input" data-tabid="glm-admin_active"{/if}>
<input type="checkbox" name="active" {if $regEvent.fieldData.admin_active.value} checked{/if}>
{if $regEvent.fieldFail.admin_active}<p>{$regEvent.fieldFail.admin_active}</p>{/if}<br>
</td>
</tr>
<tr>
- <th {if $regEvent.fieldRequired.active} class="glm-required"}{/if}>Registrations Active</th>
+ <th {if $regEvent.fieldRequired.active}class="glm-required-nowrap"{else}class="glm-nowrap"{/if}>Registrations Active</th>
<td {if $regEvent.fieldFail.active}class="glm-form-bad-input" data-tabid="glm-active"{/if}>
<input type="checkbox" name="active" {if $regEvent.fieldData.active.value} checked{/if}>
{if $regEvent.fieldFail.active}<p>{$regEvent.fieldFail.active}</p>{/if}<br>
</td>
</tr>
<tr>
- <th {if $regEvent.fieldRequired.attendees} class="glm-required"}{/if}>Multiple Attendees per Submission</th>
+ <th {if $regEvent.fieldRequired.attendees}class="glm-required-nowrap"{else}class="glm-nowrap"{/if}>Multiple Attendees per Submission</th>
<td {if $regEvent.fieldFail.attendees}class="glm-form-bad-input" data-tabid="glm-attendees"{/if}>
<input type="checkbox" name="active" {if $regEvent.fieldData.attendees.value} checked{/if}>
{if $regEvent.fieldFail.attendees}<p>{$regEvent.fieldFail.attendees}</p>{/if}<br>
</td>
</tr>
<tr>
- <th {if $regEvent.fieldRequired.attendee_max} class="glm-required"}{/if}>Maximum # of Attendees</th>
+ <th {if $regEvent.fieldRequired.attendee_max}class="glm-required-nowrap"{else}class="glm-nowrap"{/if}>Maximum # of Attendees</th>
<td {if $regEvent.fieldFail.attendee_max}class="glm-form-bad-input" data-tabid="glm-attendee_max"{/if}>
+ Set to 0 to permit an unlimited number of attendees for this event.<br>
<input type="text" name="attendee_max" value="{$regEvent.fieldData.attendee_max}" class="glm-form-text-input-medium">
{if $regEvent.fieldFail.attendee_max}<p>{$regEvent.fieldFail.attendee_max}</p>{/if}<br>
</td>
</tr>
<tr>
- <th {if $regEvent.fieldRequired.attendee_max_per_reg} class="glm-required"}{/if}>Maximum # of Attendees Per Submission</th>
+ <th {if $regEvent.fieldRequired.attendee_max_per_reg}class="glm-required-nowrap"{else}class="glm-nowrap"{/if}>Maximum # of Attendees Per Submission</th>
<td {if $regEvent.fieldFail.attendee_max_per_reg}class="glm-form-bad-input" data-tabid="glm-attendee_max_per_reg"{/if}>
+ Set to 0 for to permit a user to register an unlimited number of attendees for this event at one time.<br>
<input type="text" name="attendee_max_per_reg" value="{$regEvent.fieldData.attendee_max_per_reg}" class="glm-form-text-input-medium">
{if $regEvent.fieldFail.attendee_max_per_reg}<p>{$regEvent.fieldFail.attendee_max_per_reg}</p>{/if}<br>
</td>
</tr>
<tr>
- <th {if $regEvent.fieldRequired.reg_hold_minutes} class="glm-required"}{/if}>Attendees in Cart Hold Time</th>
+ <th {if $regEvent.fieldRequired.reg_hold_minutes}class="glm-required-nowrap"{else}class="glm-nowrap"{/if}>Attendees Hold Time (minutes)</th>
<td {if $regEvent.fieldFail.reg_hold_minutes}class="glm-form-bad-input" data-tabid="glm-reg_hold_minutes"{/if}>
+ When an attendee is added to a registration request, the system will hold that attendee "slot" for this number of minutes
+ before releasing it for others to register. After the attendee slot is released, the slot will be requested again each
+ time the selection, cart, or checkout pages are loaded. If there is a slot available at that time, it will again be held
+ for this amount of time.<br>
<input type="text" name="reg_hold_minutes" value="{$regEvent.fieldData.reg_hold_minutes}" class="glm-form-text-input-medium">
{if $regEvent.fieldFail.reg_hold_minutes}<p>{$regEvent.fieldFail.reg_hold_minutes}</p>{/if}<br>
</td>
</tr>
<tr>
- <th {if $regEvent.fieldRequired.cart_hold_days} class="glm-required"}{/if}>Cart Hold Days Without Checkout</th>
+ <th {if $regEvent.fieldRequired.cart_hold_days}class="glm-required-nowrap"{else}class="glm-nowrap"{/if}>Cart Hold (days)</th>
<td {if $regEvent.fieldFail.cart_hold_days}class="glm-form-bad-input" data-tabid="glm-cart_hold_days"{/if}>
+ If the user has registrations entered but has not yet checked out, their "cart" will be maintained for this number of days.
+ After that time, the card will be deleted. If a user has established a registrations account (entered registrations or
+ have been registered before, the user will be able log in and continue with the cart up to this number of days.<br>
<input type="text" name="cart_hold_days" value="{$regEvent.fieldData.cart_hold_days}" class="glm-form-text-input-medium">
{if $regEvent.fieldFail.cart_hold_days}<p>{$regEvent.fieldFail.cart_hold_days}</p>{/if}<br>
</td>
</tr>
<tr>
- <th {if $regEvent.fieldRequired.registration_account_options} class="glm-required"}{/if}>Account Options</th>
+ <th {if $regEvent.fieldRequired.registration_account_options}class="glm-required-nowrap"{else}class="glm-nowrap"{/if}>Account Options</th>
<td {if $regEvent.fieldFail.registration_account_options}class="glm-form-bad-input" data-tabid="glm-registration_account_options"{/if}>
{foreach from=$regEvent.fieldData.registration_account_options.bitmap item=v}
- <input type="checkbox" name="cc_type[{$v.value}]" value="{$v.value}"{if $v.default} checked{/if}> {$v.name}<br>
+ <input type="checkbox" name="registration_account_options[{$v.value}]" value="{$v.value}"{if $v.default} checked{/if}> {$v.name}<br>
{/foreach}
{if $regEvent.fieldFail.registration_account_options}<p>{$regEvent.fieldFail.registration_account_options}</p>{/if}<br>
</td>
</tr>
<tr>
- <th {if $regEvent.fieldRequired.payment_methods} class="glm-required"}{/if}>Payment Methods</th>
+ <th {if $regEvent.fieldRequired.payment_methods}class="glm-required-nowrap"{else}class="glm-nowrap"{/if}>Payment Methods</th>
<td {if $regEvent.fieldFail.payment_methods}class="glm-form-bad-input" data-tabid="glm-payment_methods"{/if}>
+ Checking a payment method makes it available for use by regular users at checkout.<br>
{foreach from=$regEvent.fieldData.payment_methods.bitmap item=v}
- <input type="checkbox" name="cc_type[{$v.value}]" value="{$v.value}"{if $v.default} checked{/if}> {$v.name}<br>
+ <input type="checkbox" name="payment_methods[{$v.value}]" value="{$v.value}"{if $v.default} checked{/if}> {$v.name}<br>
{/foreach}
{if $regEvent.fieldFail.payment_methods}<p>{$regEvent.fieldFail.payment_methods}</p>{/if}<br>
</td>
</tr>
<tr>
- <th {if $regEvent.fieldRequired.resitricted_payment_methods} class="glm-required"}{/if}>Restricted Payment Methods (Admin use only)</th>
- <td {if $regEvent.fieldFail.resitricted_payment_methods}class="glm-form-bad-input" data-tabid="glm-resitricted_payment_methods"{/if}>
- {foreach from=$regEvent.fieldData.resitricted_payment_methods.bitmap item=v}
- <input type="checkbox" name="cc_type[{$v.value}]" value="{$v.value}"{if $v.default} checked{/if}> {$v.name}<br>
+ <th {if $regEvent.fieldRequired.restricted_payment_methods}class="glm-required-nowrap"{else}class="glm-nowrap"{/if}>Restricted Payment Methods</th>
+ <td {if $regEvent.fieldFail.restricted_payment_methods}class="glm-form-bad-input" data-tabid="glm-restricted_payment_methods"{/if}>
+ Restricted payment methods are those only available to logged in administrative users. For example, selecting "No Charge" here
+ will allow administrative users to check out without having to provide any payment information.<br>
+ {foreach from=$regEvent.fieldData.restricted_payment_methods.bitmap item=v}
+ <input type="checkbox" name="restricted_payment_methods[{$v.value}]" value="{$v.value}"{if $v.default} checked{/if}> {$v.name}<br>
{/foreach}
- {if $regEvent.fieldFail.resitricted_payment_methods}<p>{$regEvent.fieldFail.resitricted_payment_methods}</p>{/if}<br>
+ {if $regEvent.fieldFail.restricted_payment_methods}<p>{$regEvent.fieldFail.restricted_payment_methods}</p>{/if}<br>
</td>
</tr>
<tr>
- <th {if $regEvent.fieldRequired.terms} class="glm-required"}{/if}>Terms and Conditions for Registration</th>
+ <th {if $regEvent.fieldRequired.terms}class="glm-required-nowrap"{else}class="glm-nowrap"{/if}>Terms and Conditions for Registration</th>
<td {if $regEvent.fieldFail.terms}class="glm-form-bad-input" data-tabid="glm-terms"{/if}>
<textarea name="terms" class="glm-form-textarea">{$regEvent.fieldData.terms}</textarea>
{if $regEvent.fieldFail.terms}
</td>
</tr>
<tr>
- <th {if $regEvent.fieldRequired.reg_file}class="glm-required"{/if}>File</th>
+ <th {if $regEvent.fieldRequired.reg_file}class="glm-required-nowrap"{else}class="glm-nowrap"{/if}>File</th>
<td {if $regEvent.fieldFail.reg_file}class="glm-form-bad-input"{/if}>
{if $regEvent.fieldData.reg_file}
<span class="glm-right">Replace this file:</b> <input type="file" name="reg_file_new"></span>
</td>
</tr>
<tr>
- <th {if $regEvent.fieldRequired.reg_file_title} class="glm-required"}{/if}>File Title</th>
+ <th {if $regEvent.fieldRequired.reg_file_title}class="glm-required-nowrap"{else}class="glm-nowrap"{/if}>File Title</th>
<td {if $regEvent.fieldFail.reg_file_title}class="glm-form-bad-input" data-tabid="glm-reg_file_title"{/if}>
<input type="text" name="reg_file_title" value="{$regEvent.fieldData.reg_file_title}" class="glm-form-text-input-medium">
{if $regEvent.fieldFail.reg_file_title}<p>{$regEvent.fieldFail.reg_file_title}</p>{/if}<br>
</td>
</tr>
<tr>
- <th {if $regEvent.fieldRequired.notes} class="glm-required"}{/if}>Notes</th>
+ <th {if $regEvent.fieldRequired.notes}class="glm-required-nowrap"{else}class="glm-nowrap"{/if}>Notes</th>
<td {if $regEvent.fieldFail.notes}class="glm-form-bad-input" data-tabid="glm-notes"{/if}>
<textarea name="notes" class="glm-form-textarea">{$regEvent.fieldData.notes}</textarea>
{if $regEvent.fieldFail.notes}
</td>
</tr>
</table>
+
+ <input id="updateRegEvent" type="submit" value="Update Registrations for this event">
+
</form>
-
{/if} <!-- no problem reasons -->
+
+ <script type="text/javascript">
+ jQuery(document).ready(function($) {
+
+ // Flash certain elements for a short time after display
+ $(".glm-flash-updated").fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500);
+
+ });
+ </script>
{include file='admin/footer.html'}
+++ /dev/null
-{include file='admin/registrations/header.html'}
-
-<h3>Registrations Event List</h3>
-
-{include file='admin/footer.html'}
-
<div class="wrap">
<h2>Event Registrations</h2>
<h2 class="nav-tab-wrapper">
- <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-index" class="nav-tab{if $thisAction==index} nav-tab-active{/if}">Dashboard</a>
- <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-events&aoption=list" class="nav-tab{if $thisAction==events} nav-tab-active{/if}">Registration Events</a>
- <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-requests&aoption=list" class="nav-tab{if $thisAction==requests} nav-tab-active{/if}">Registration Requests</a>
+ <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-index" class="nav-tab{if $thisAction==index} nav-tab-active{/if}">Registrations Dashboard</a>
+ <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-list" class="nav-tab{if $thisAction==list} nav-tab-active{/if}">Registration Events List</a>
+ <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-event" class="nav-tab{if $thisAction==event} nav-tab-active{/if}">Selected Event Dashboard</a>
+ <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-requests" class="nav-tab{if $thisAction==requests} nav-tab-active{/if}">Registration Requests</a>
<a href="{$thisUrl}?page=glm-members-admin-menu-registrations-accounts" class="nav-tab{if $thisPage=='glm-members-admin-menu-registrations-accounts'} nav-tab-active{/if}">Account List</a>
</h2>
<div id="glm-admin-content-container">
<h3>Registrations Dashboard</h3>
+<h2>Not Built Yet</h2>
+
{include file='admin/footer.html'}
--- /dev/null
+{include file='admin/registrations/header.html'}
+
+<h3>Registrations Event List</h3>
+
+<h2>Not Built Yet</h2>
+
+{include file='admin/footer.html'}
+
--- /dev/null
+{include file='admin/registrations/header.html'}
+
+<div class="glm-admin-table-inner glm-admin-table">
+ <form action="{$thisUrl}?page={$thisPage}" method="post" id="searchForm">
+ <input type="hidden" name="glm_action" value="list">
+ <input type="hidden" name="prevStart" value="{$prevStart}">
+ <input type="hidden" name="nextStart" value="{$nextStart}">
+ <input type="hidden" name="limit" value="{$limit}">
+ <input type="hidden" name="savedAlpha" value="{$alphaSelected}">
+
+ <h2 class="glm-admin-table-header">List of Registration Events</h2>
+
+ <div class="glm-row">
+ <b>Text Search: </b><input class="glmRegEventsSearch" type="text" name="text_search" id="autoTest">
+ <input type="submit" value="Submit" style="margin-right: 2em;">
+ </div>
+
+ <p><b>Total found:</b> {$regEventsCount} </p>
+
+ <br clear="all">
+
+ <!-- Add Reg Event Type Button and Dialog Box -->
+
+ {if $paging}
+ <input type="Submit" name="pageSelect" value="Previous {$limit} Registration Events" class="button button-secondary glm-button"{if !$prevStart} disabled{/if}>
+ <input type="Submit" name="pageSelect" value="Next {$limit} Registration Events" class="button button-secondary glm-button"{if !$nextStart} disabled{/if}>
+ {/if}
+
+ <div class="glm-alpha-links">
+ <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-list&glm_action=list&textSearch={$textSearch}" class="glm-alpha-link{if !$alphaSelected} glm-alpha-link-selected{/if}">All</a>
+ {foreach $alphaList as $a}
+ <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-list&glm_action=list&alpha={$a.alpha}&textSearch={$textSearch}" class="glm-alpha-link{if $a.default} glm-alpha-link-selected{/if}">{$a.alpha}</a>
+ {/foreach}
+ </div>
+
+ <table class="wp-list-table striped glm-admin-table-single">
+ <thead>
+ <tr>
+ <th>ID</th>
+ <th>Event Name</th>
+ </tr>
+ </thead>
+ <tbody>
+ {if $haveRegEvents}
+ {assign var="i" value="0"}
+ {foreach $regEvents as $r}
+ {if $i++ is odd by 1}
+ <tr>
+ {else}
+ <tr class="alternate">
+ {/if}
+ <td style="width: 50px;">
+ {$r.id}
+ </td>
+ <td>
+ <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-event®EventID={$r.id}">{$r.event_name}</a>
+ </td>
+ </tr>
+ {/foreach}
+ {else}
+ <tr class="alternate"><td colspan="2">(no {$terms.term_member_plur} listed)</td></tr>
+ {/if}
+ </tbody>
+ </table>
+
+ {if $paging}
+ <input type="Submit" name="pageSelect" value="Previous {$limit} {$terms.term_member_plur_cap}" class="button button-secondary glm-button"{if !$prevStart} disabled{/if}>
+ <input type="Submit" name="pageSelect" value="Next {$limit} {$terms.term_member_plur_cap}" class="button button-secondary glm-button"{if !$nextStart} disabled{/if}>
+ {/if}
+
+ </form>
+
+ <div id="exportMembersDialog" class="glm-dialog-box" title="Export {$terms.term_member_cap} Profiles">
+ <form id="exportForm" action="{$ajaxUrl}" method="post" enctype="multipart/form-data">
+ <input type="hidden" name="action" value="glm_members_admin_ajax">
+ <input type="hidden" name="glm_action" value="membersListExport">
+ <table class="glm-admin-table">
+ <tr>
+ <th>Categories: </th>
+ <td>
+ <select id="exportFilterCategories" name="filterCategories[]" multiple="multiple" size="1">
+ {foreach from=$categories item=v}
+ <option value="{$v.id}" data-parent="{$v.parent}"{if $v.selected} selected{/if}>
+ {if $v.parent_id} {/if}{$v.name}
+ </option>
+ {/foreach}
+ </select>
+ </td>
+ </tr>
+ <tr><th>Show Archived: </th><td><input type="checkbox" name="filterArchived"></td></tr>
+ <tr><th>Featured Only: </th><td><input type="checkbox" name="filterFeatured"></td></tr>
+ <tr><th>Pending Only: </th><td><input type="checkbox" name="filterPending"></td></tr>
+ <tr><th>Name Search: </th><td><input class="exportMembersSearch glm-form-text-input-medium" type="text" name="text_search" id="autoTest"><br>
+ Enter any portion of a {$terms.term_member_cap} name and press enter or select any specific {$terms.term_member_cap} found.
+ </td></tr>
+ <tr>
+ <th>Fields to export</th>
+ <td>
+ <table padding="3">
+ <tr>
+ <td>
+ <input type="checkbox" name="exportId"> {$terms.term_member_cap} ID<br>
+ <input type="checkbox" name="exportOldId"> Old {$terms.term_member_cap} ID<br>
+ <input type="checkbox" name="exportMember" checked> {$terms.term_member_cap} Name<br>
+ <input type="checkbox" name="exportReferenceName"> Profile Reference Name<br>
+ <input type="checkbox" name="exportAddr1" checked> Address Line #1<br>
+ <input type="checkbox" name="exportAddr2" checked> Address Line #2<br>
+ <input type="checkbox" name="exportCity" checked> City<br>
+ <input type="checkbox" name="exportState" checked> State<br>
+ <input type="checkbox" name="exportZip" checked> ZIP/Postal Code<br>
+ <input type="checkbox" name="exportCounty" checked> County <br>
+ <input type="checkbox" name="exportRegion" checked> Region <br>
+ </td>
+ <td>
+ <input type="checkbox" name="exportPhone" checked> Phone #<br>
+ <input type="checkbox" name="exportTollFree" checked> Toll Free<br>
+ <input type="checkbox" name="exportEmail" checked> Main E-Mail<br>
+ <input type="checkbox" name="exportPriContactName" checked> Primary Contact Name<br>
+ <input type="checkbox" name="exportPriContactEmail" checked> Primary Contact E-Mail<br>
+ <input type="checkbox" name="exportUrl" checked> Web Address (URL)<br>
+ <input type="checkbox" name="exportCategories" checked> Categories<br>
+ <input type="checkbox" name="exportMailingAddr1" checked> Mailing Address Line #1<br>
+ <input type="checkbox" name="exportMailingAddr2" checked> Mailing Address Line #2<br>
+ <input type="checkbox" name="exportMailingCity" checked> Mailing City<br>
+ <input type="checkbox" name="exportMailingState" checked> Mailing State<br>
+ <input type="checkbox" name="exportMailingZip" checked> Mailing ZIP/Postal Code<br>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <th>Export to: </th>
+ <td>
+ <input type="radio" name="type" value="print" checked="checked"> Export for Print<br>
+ <input type="radio" name="type" value="csv"> Export to Spreadsheet (CSV)
+ </td>
+ </tr>
+ </table>
+ <a id="exportMembersCancel" class="button button-secondary glm-right">Cancel</a>
+ <input type="submit" value="Export" class="button button-primary">
+ </form>
+ </div>
+</div>
+ <script type="text/javascript">
+ jQuery(document).ready(function($) {
+
+
+ $("#exportMembersDialog").dialog({
+ autoOpen: false,
+ minWidth: 600,
+ dialogClass: "glm-dialog-no-close"
+ });
+ $('#exportMembersButton').click( function() {
+ $("#exportMembersDialog").dialog("open");
+ });
+ $('#exportMembersCancel').click( function() {
+ $("#exportMembersDialog").dialog("close");
+ });
+
+ // Filter triggers
+ $(".listFilter" ).change( function() {
+
+ var filter = '';
+
+ // Check for archived filter
+ if ($("#filterArchived").attr('checked')) {
+ filter += '&filterArchived=true';
+ }
+
+ // Check for pending data filter
+ if ($("#filterPending").attr('checked')) {
+ filter += '&filterPending=true';
+ }
+
+ // Check for featured data filter
+ if ($("#filterFeatured").attr('checked')) {
+ filter += '&filterFeatured=true';
+ }
+
+ window.location.href = "{$thisUrl}?page={$thisPage}&glm_action=list" + filter;
+
+ return false;
+ });
+
+ // Perform Export
+ $("#glmMembersExport").on( 'click', function() {
+ window.open("{$ajaxUrl}?action=glm_members_admin_ajax&glm_action=membersListExport&type=print", 'Member Export');
+ return false;
+ });
+
+ // Perform CSV Export
+ $("#glmMembersExportCsv").on( 'click', function() {
+ window.open("{$ajaxUrl}?action=glm_members_admin_ajax&glm_action=membersListExport&type=csv", 'Member Export CSV');
+ return false;
+ });
+
+ /*
+ * Do autocomplete search for member
+ * label: What will be searched
+ * value: What will be displayed when selected
+ * id: Member id added so we can go to the member while showing what was selected
+ * Also note that autocomplete does not properly render HTML codes, so we
+ * "unescape" them for HTML in Smarty.
+ */
+
+ var availableTags = [
+ {foreach $namesList as $m}
+ { label: "{$m.name|unescape:'html'|replace:'"':''}", value: "{$m.name|unescape:'html'|replace:'"':''}", id: '{$m.id}' },
+ {/foreach}
+ ];
+
+ // Autocomplete for list Text Search
+ $( ".glmMembersSearch" ).autocomplete({
+
+ source: availableTags,
+ html: true,
+ position: { my : "right top", at: "right bottom" },
+ select: function( event, ui ) {
+ var memberID = ui.item.id;
+ window.location.replace("{$adminUrl}?page=glm-members-admin-menu-member&glm_action=index&member=" + memberID );
+ },
+ response: function(event, ui) {
+ if (!ui.content.length) {
+ var noResult = { value:"",label:"No results found" };
+ ui.content.push(noResult);
+ }
+ }
+ });
+
+ // Autocomplete for export Text field
+ $( ".exportMembersSearch" ).autocomplete({
+
+ source: availableTags,
+ html: true,
+ position: { my : "right top", at: "right bottom" },
+ response: function(event, ui) {
+ if (!ui.content.length) {
+ var noResult = { value:"",label:"No results found" };
+ ui.content.push(noResult);
+ }
+ }
+ });
+
+ // No submit on ENTER for pop-up export form
+ jQuery.each($("#exportForm").find('input'), function(){
+ $(this).bind('keypress keydown keyup', function(e){
+ if(e.keyCode == 13) {
+ $( ".exportMembersSearch" ).autocomplete("close");
+ return false;
+ }
+ });
+ });
+
+ // Restrict autocomplete list to a certain height with scrollbar
+ $('.ui-autocomplete').css('height','200px').css('overflow-y','scroll');
+
+ // Expand multi-select on hover
+ $('#filterCategories').multiselect();
+ $('#exportFilterCategories').multiselect();
+
+
+ });
+ </script>
+
+
+{include file='admin/footer.html'}
+++ /dev/null
-
-
-
-<p>title = {$fieldPrompt}</p>
-<p>name = {$fieldName}</p>
-<p>value = {$fieldValue}</p>
-<p>fail = {$fieldFail}</p>
-