Fixed error with wrong file name for database creation.
Minor database update.
Other comment and code cleanup.
* @release SVN: $Id: dataAddedInfoFields.php,v 1.0 2011/01/25 19:31:47 cscott
* Exp $
*/
-class GlmDataRegistrationsRequest extends GlmDataAbstract
+class GlmDataRegistrationRequest extends GlmDataAbstract
{
/**
*/
$this->fields = array (
-
+
// ID
'id' => array (
'field' => 'id',
'view_only' => true,
'use' => 'a'
),
-
+
// Pointer to user account (table: account) who submitted the registrations
'account' => array (
- 'field' => 'contact_id',
+ 'field' => 'account',
'type' => 'pointer',
'p_table' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . 'account',
'p_field' => 'id',
'required' => true,
'use' => 'lgneud'
),
-
+
'bill_fname' => array (
'field' => 'bill_fname',
'type' => 'text',
- 'required' => false,
'use' => 'a'
),
-
- //
+
+ //
'bill_lname' => array (
'field' => 'bill_lname',
'type' => 'text',
- 'required' => false,
'use' => 'a'
),
-
- //
+
+ //
'bill_org' => array (
'field' => 'bill_org',
'type' => 'text',
- 'required' => false,
'use' => 'a'
),
-
- //
+
+ //
'bill_title' => array (
'field' => 'bill_title',
'type' => 'text',
- 'required' => false,
'use' => 'a'
),
-
- //
+
+ //
'bill_addr1' => array (
'field' => 'bill_addr1',
'type' => 'text',
- 'required' => false,
'use' => 'a'
),
-
- //
+
+ //
'bill_addr2' => array (
'field' => 'bill_addr2',
'type' => 'text',
- 'required' => false,
'use' => 'a'
),
-
- //
+
+ //
'bill_city' => array (
'field' => 'bill_city',
'type' => 'text',
- 'required' => false,
'use' => 'a'
),
-
- //
+
+ //
'bill_state' => array (
'field' => 'bill_state',
'type' => 'text',
- 'required' => false,
'use' => 'a'
),
-
- //
+
+ //
'bill_zip' => array (
'field' => 'bill_zip',
'type' => 'text',
- 'required' => false,
'use' => 'a'
),
-
- //
+
+ //
'bill_country' => array (
'field' => 'bill_country',
'type' => 'text',
- 'required' => false,
'use' => 'a'
),
-
- //
+
+ //
'date_submitted' => array (
'field' => 'date_submitted',
'type' => 'datetime',
'use' => 'a'
),
-
- // See payment_method in plugin.ini
+
+ // See payment_method in plugin.ini - used as list
'pay_method' => array (
'field' => 'pay_method',
- 'type' => 'bitmap',
- 'bitmap' => $this->config['payment_methods'],
- 'default' => 0, // none selected
+ 'type' => 'list',
+ 'list' => $this->config['payment_method'],
+ 'default' => $this->config['payment_method_numb']['Not Yet Defined'],
'use' => 'a'
),
-
+
// Pointer to user account (table: account) who submitted the registrations
'payment_code' => array (
'field' => 'payment_code',
- 'type' => 'pointer',
- 'p_table' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . 'payment_code',
- 'p_field' => 'id',
- 'p_static' => true,
- 'required' => true,
+ 'type' => 'text',
'use' => 'lgneud'
),
-
+
// See submission_status in plugin.ini
'status' => array (
'field' => 'status',
- 'type' => 'bitmap',
- 'bitmap' => $this->config['submission_status'],
- 'default' => 0, // none selected
+ 'type' => 'list',
+ 'list' => $this->config['submission_status'],
+ 'default' => $this->config['submission_status_numb']['CART'],
'use' => 'a'
),
-
+
// Total charge including all fees and taxes
'total' => array (
'field' => 'total',
'type' => 'money',
- 'required' => false,
'use' => 'a'
),
-
+
// Credit Card type (if used) - See credit_card in plugin.ini
'cc_type' => array (
'field' => 'cc_type',
'default' => 0, // none selected
'use' => 'a'
),
-
- //
+
+ //
'cc_name' => array (
'field' => 'cc_name',
'type' => 'text',
- 'required' => false,
'use' => 'a'
),
-
- //
+
+ //
'cc_numb' => array (
'field' => 'cc_numb',
'type' => 'text',
- 'required' => false,
'use' => 'a'
),
-
- //
+
+ //
'cc_exp' => array (
'field' => 'cc_exp',
'type' => 'text',
- 'required' => false,
'use' => 'a'
),
-
- //
+
+ //
'cc_cvv' => array (
'field' => 'cc_cvv',
'type' => 'text',
- 'required' => false,
'use' => 'a'
),
-
+
// Confirmation code back from card processor
'cc_conf' => array (
'field' => 'cc_conf',
'type' => 'text',
- 'required' => false,
'use' => 'a'
),
-
+
// HTML summary of cart contents, costs and payment - Use same HTML displayed to user
'summary' => array (
'field' => 'summary',
'type' => 'text',
- 'required' => false,
'use' => 'a'
),
-
+
// Any MagicForm data associated with registrant
'mf_data' => array (
'field' => 'mf_data',
'type' => 'text',
- 'required' => false,
'use' => 'a'
),
-
+
// System operator's notes for this registration request
'notes' => array (
'field' => 'notes',
'type' => 'text',
- 'required' => false,
'use' => 'a'
),
-
+
// IP Address of user computer and timestamp
'user_trace_info' => array (
'field' => 'user_trace_info',
'type' => 'text',
- 'required' => false,
- 'use' => 'a'
- ),
-
- //
- '' => array (
- 'field' => '',
- 'type' => '',
- 'required' => '',
'use' => 'a'
- ),
-
+ )
);
}
--- /dev/null
+<?php
+
+/**
+ * Gaslight Media Associate
+ * Registrations Plugin support class
+ *
+ * PHP version 5.5
+ *
+ * @category glmWordPressPlugin
+ * @package glmMembersDatabase
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release registratiosnSupport.php,v 1.0 2014/10/31 19:31:47 cscott Exp $
+ * @link http://dev.gaslightmedia.com/
+ */
+
+/*
+ * This class provides some standard methods used by this plugin
+ */
+class GlmRegistrationsSupport
+{
+
+ /**
+ * WordPress Database Object
+ *
+ * @var $wpdb
+ * @access public
+ */
+ public $wpdb;
+ /**
+ * Plugin Configuration Data
+ *
+ * @var $config
+ * @access public
+ */
+ public $config;
+
+ /**
+ * Constructor
+ *
+ * @param object $d database connection
+ * @param array $config Configuration array
+ * @param bool $limitedEdit Flag to say indicate limited edit requested
+ *
+ * @return void
+ * @access public
+ */
+ public function __construct($wpdb, $config)
+ {
+
+ // If this class is not being extended along with existing $wpdb and $config
+ if (!$this->wpdb) {
+
+ // Save WordPress Database object
+ $this->wpdb = $wpdb;
+
+ // Save plugin configuration object
+ $this->config = $config;
+
+ }
+
+ }
+
+ /*
+ * Retrieve a complete cart
+ *
+ * @param integer $requestID
+ *
+ * @return array Array of request and all associated information or false
+ * @access public
+ */
+ public function getRegistrationCart($requestID = false)
+ {
+
+ // Create return data array
+ $cart = array(
+ 'status' => false, // Return status, default to false, true if valid request returned
+ 'errorMsg' => '', // Any applicable error message
+ 'notes' => array(), // System generated notes regarding status of request
+ 'accounts' => array(), // Accounts associated with this request - both requesting and attending (might be the same)
+ // Index in this array is the account ID as used in data below
+ 'request' => false, // Request reccord
+ 'events' => false // Array of events with 'class', 'rate', 'registrant' data under each event
+ );
+
+ // Validate request ID
+ if (!$requestID || ($requestID-0) <= 0) {
+ return false;
+ }
+
+ /*
+ * Base registration request
+ */
+
+ // Load Registration Requests data abstract
+ require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataRegRequest.php';
+ $RegRequest = new GlmDataRegistrationRequest($this->wpdb, $this->config);
+
+ // Try to get the base registration request data
+ $cart['request'] = $RegRequest->getEntry($requestID);
+
+ if (!$cart['request']) {
+ $cart['errorMsg'] = 'Unable to retrieve the requested registration request.';
+ return $cart;
+ }
+
+ /*
+ * Registration requested by
+ */
+
+ // Load Registration Requests data abstract
+ require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataAccount.php';
+ $Account = new GlmDataRegistrationsAccount($this->wpdb, $this->config);
+
+ // Try to get the account record for the person who submitted (is submitting) the request
+ if ($cart['request']['account']) {
+
+ // Get the the account ID of the person who submitted the request
+ $accountID = ($cart['request']['account'] - 0);
+
+ // Make sure it's a positive integer
+ if (is_int($accountID) && $accountID > 0) {
+
+ // Try to get account information
+ $account = $Account->getEntry($accountID);
+
+ // If we found a good account, add that to the accounts list in the cart.
+ if ($account) {
+ $cart['accounts'][$account['id']] = $account;
+ } else {
+ $cart['notes'][] = 'Registration request does not have an account for the person submitting the request. (Guest registration?)';
+ }
+
+ }
+
+ }
+
+ return $cart;
+
+ }
+
+
+ // Temporarily add test data
+ public function addTestData()
+ {
+
+ // Event
+ $sql = "
+ INSERT INTO ".GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX."reg_event
+ (
+ event,
+ event_code,
+ active
+ )
+ VALUES
+ (
+ 0,
+ 'TEST-EVENT',
+ true
+ )
+ ;";
+ $this->wpdb->query($sql);
+ $regEventID = $this->wpdb->insert_id;
+
+ // Event Registration Class
+ $sql = "
+ INSERT INTO ".GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX."reg_class
+ (
+ reg_event,
+ name,
+ descr
+ )
+ VALUES
+ (
+ $regEventID,
+ 'Admiral Class',
+ 'This is our Admiral Class registration level.'
+ )
+ ;";
+ $this->wpdb->query($sql);
+ $regClassID = $this->wpdb->insert_id;
+
+ // Event Registration Rates
+ $sql = "
+ INSERT INTO ".GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX."reg_rates
+ (
+ reg_event,
+ reg_class,
+ start_days,
+ end_days,
+ base_rate,
+ per_registrant,
+ registrant_credits
+ )
+ VALUES
+ (
+ $regEventID,
+ $regCLassID,
+ 100,
+ 50,
+ 20,
+ 10,
+ 1
+ )
+ ;";
+ $this->wpdb->query($sql);
+ $regRateID = $this->wpdb->insert_id;
+
+
+ // Account
+ $sql = "
+ INSERT INTO ".GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX."account
+ (
+ active,
+ fname
+ )
+ VALUES
+ (
+ true,
+ 'Chuck'
+ )
+ ;";
+ $this->wpdb->query($sql);
+ $accountID = $this->wpdb->insert_id;
+
+
+ // Registration Request
+ $sql = "
+ INSERT INTO ".GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX."reg_request
+ (
+ account,
+ bill_fname,
+ bill_lname,
+ bill_org,
+ bill_title,
+ bill_addr1,
+ bill_addr2,
+ bill_city,
+ bill_state,
+ bill_zip,
+ bill_country,
+ date_submitted,
+ pay_method,
+ payment_code,
+ status,
+ total,
+ cc_type,
+ cc_name,
+ cc_numb,
+ cc_exp,
+ cc_cvv,
+ cc_conf,
+ summary,
+ mf_data,
+ notes
+ )
+ VALUES
+ (
+ ".$accountID.",
+ 'Chuck',
+ 'Scott',
+ 'Gaslight Media',
+ 'Vice President',
+ '120 E. Lake St.',
+ '3rd Floor',
+ 'Petoskey',
+ 'MI',
+ '49770',
+ 'US',
+ '".date('Y-m-d')."',
+ ".$this->config['payment_method_numb']['Not Yet Defined'].",
+ 'NULL',
+ ".$this->config['submission_status_numb']['CART'].",
+ 100,
+ 'NULL',
+ 'NULL',
+ 'NULL',
+ 'NULL',
+ 'NULL',
+ 'NULL',
+ '<P>HTML SUMMARY</P>',
+ 'NULL',
+ 'Notes go here'
+ )
+ ;";
+ $this->wpdb->query($sql);
+ $requestID = $this->wpdb->insert_id;
+
+// **** NEED TO RECHECK EVERYTHING FROM HERE DOWN ****
+
+ // Registration Request Event
+ $sql = "
+ INSERT INTO ".GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX."reg_request_event
+ (
+ account,
+ reg_request,
+ event,
+ event_time,
+ total_charge,
+ notes
+ )
+ VALUES
+ (
+ $accountID,
+ $requestID,
+ $regEventID,
+ 0,
+ 100,
+ ''
+ )
+ ;";
+ $this->wpdb->query($sql);
+ $requestEventID = $this->wpdb->insert_id;
+
+ // Registration Request class
+ $sql = "
+ INSERT INTO ".GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX."reg_request_class
+ (
+ account,
+ event,
+ event_time,
+ reg_request,
+ reg_request_event,
+ total_class_charge,
+ mf_data,
+ notes
+ )
+ VALUES
+ (
+ $accountID,
+ regEventID,
+ 0,
+ $requestID,
+ $requestEventID,
+ 100,
+ '',
+ ''
+ )
+ ;";
+ $this->wpdb->query($sql);
+ $requestClassID = $this->wpdb->insert_id;
+
+
+ // Registration Request Rate
+ $sql = "
+ INSERT INTO ".GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX."reg_request_class
+ (
+ account,
+ event,
+ event_time,
+ reg_request,
+ reg_request_event,
+ total_class_charge,
+ mf_data,
+ notes
+ )
+ VALUES
+ (
+ $accountID,
+ regEventID,
+ 0,
+ $requestID,
+ $requestEventID,
+ 100,
+ '',
+ ''
+ )
+ ;";
+ $this->wpdb->query($sql);
+ $requestClassID = $this->wpdb->insert_id;
+
+
+ // Registration Request Registrant
+ $sql = "
+ INSERT INTO ".GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX."reg_request_registrant
+ (
+ account,
+ event,
+ event_time,
+ reg_request,
+ reg_request_event,
+ total_class_charge,
+ mf_data,
+ notes
+ )
+ VALUES
+ (
+ $accountID,
+ regEventID,
+ 0,
+ $requestID,
+ $requestEventID,
+ 100,
+ '',
+ ''
+ )
+ ;";
+ $this->wpdb->query($sql);
+ $requestClassID = $this->wpdb->insert_id;
+
+ return;
+
+ }
+
+ public function removeTestData($testIDs)
+ {
+
+ $this->wpdb->query("DELETE FROM ".GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX."reg_request;");
+ $this->wpdb->query("DELETE FROM ".GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX."account;");
+ $this->wpdb->query("DELETE FROM ".GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX."reg_request_event;");
+
+ }
+
+
+}
;
; Payment Method - Use as Bitmap Index or List
;
+payment_method[0] = 'Not Yet Defined'
payment_method[1] = 'No Charge'
payment_method[2] = 'Comp Code'
payment_method[3] = 'Cash'
payment_method[5] = 'Credit Card'
payment_method[6] = 'Call from Merchant'
+payment_method_numb['Not Yet Defined'] = 0
payment_method_numb['No Charge'] = 1
payment_method_numb['Comp Code'] = 2
payment_method_numb['Cash'] = 3
;
; Submission Status - Use as list only
;
+submission_status[0] = 'CART'
submission_status[10] = 'UNPAID'
submission_status[20] = 'CC_PEND'
submission_status[30] = 'CC_PAID'
submission_status[120] = 'FAILED'
submission_status[130] = 'CANCELED'
+submission_status_numb['CART'] = 0
submission_status_numb['UNPAID'] = 10
submission_status_numb['CC_PEND'] = 20
submission_status_numb['CC_PAID'] = 30
+Registration scenarios -Need to outline how this will work
+ Who can submit a registration, for who, and how they can be selected while entering a registration
+ For example, if there's an existing account that's been registered, how do we permit somone else so register that person for something?
+
+
Registrations Add-On Work Items - Preliminary
ADMIN
- Access by Managers only
* Misc
- Chuck
- - Recall and update of Misc configurable text and flags
+ Chuck
+ DONE - Recall and update of Misc configurable text and flags
- Accessed by Managers and Site owners
* Support Classes
- List registration details for specific requests
* Registration Accounts
+
- Accounts are specific persons who submit a registration requests
- Associated with one or more registration requests
- List, Edit (certain data)
- List registrations submitted by an account
-* Registrants
+* Registrants - Uses same table as "Registration Accounts" above
- People who are registered for an event
- Associated with one or more registration events
- List, Edit (certain data)
}
+ $view = 'editAccount';
+
switch ( $option ) {
case 'add':
- $view = 'edit';
$account = $this->newEntry();
break;
case 'insert':
- $view = 'edit';
$account = $this->insertEntry();
if ( $account['status'] ) {
$accountAdded = true;
break;
case 'edit':
- $view = 'edit';
$account = $this->editEntry( $this->accountID );
//echo '<pre>$account: ' . print_r( $account, true ) . '</pre>';
if ( $account['status'] ) {
$accountUpdateError = true;
}
- $view = 'edit';
break;
case 'delete':
--- /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/
+ */
+
+// Load Registrations data abstract
+// require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataRegistrations.php';
+
+class GlmMembersAdmin_registrations_events // extends GlmDataRegistrations
+{
+
+ /**
+ * 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)
+ {
+
+ // Compile template data
+ $templateData = array(
+ );
+ // Return status, any suggested view, and any data to controller
+ return array(
+ 'status' => true,
+ 'modelRedirect' => false,
+ 'view' => 'admin/registrations/events.html',
+ 'data' => $templateData
+ );
+
+ }
+
+
+}
+++ /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/
- */
-
-// Load Registrations data abstract
-// require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataRegistrations.php';
-
-class GlmMembersAdmin_registrations_list // extends GlmDataRegistrations
-{
-
- /**
- * 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)
- {
-
-
- // Compile template data
- $templateData = array(
- );
- // Return status, any suggested view, and any data to controller
- return array(
- 'status' => true,
- 'modelRedirect' => false,
- 'view' => 'admin/registrations/list.html',
- 'data' => $templateData
- );
-
- }
-
-
-}
--- /dev/null
+<?php
+/**
+ * Gaslight Media Members Database
+ * Admin Registrations Requests
+ *
+ * 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 Registration Requests data abstract
+require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataRegRequest.php';
+
+class GlmMembersAdmin_registrations_requests extends GlmDataRegistrationRequest
+{
+
+ /**
+ * WordPress Database Object
+ *
+ * @var $wpdb
+ * @access public
+ */
+ public $wpdb;
+ /**
+ * Plugin Configuration Data
+ *
+ * @var $config
+ * @access public
+ */
+ public $config;
+
+ /**
+ * 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)
+ {
+
+
+ $haveRequests = false;
+ $requests = false;
+ $haveRequest = false;
+ $requestID = false;
+ $requestCart = false;
+ $option = 'list';
+ $errorMsg = false;
+
+ // Load registrations support class
+ require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/registrationsSupport.php';
+ $regSupport = new GlmRegistrationsSupport($this->wpdb, $this->config);
+
+
+// Test data
+//$regSupport->addTestData();
+//$regSupport->removeTestData();
+
+ // Check for option submitted
+ if (isset($_REQUEST['option']) && $_REQUEST['option'] != '') {
+ $option = $_REQUEST['option'];
+ }
+
+ // Check for registration request ID submitted for edit operation
+ if (isset($_REQUEST['requestID']) && $_REQUEST['requestID'] != '') {
+ $requestID = ($_REQUEST['requestID'] - 0);
+ }
+
+ // Perform selected option
+ switch ($option) {
+
+ // Display/Edit a registration request
+ case 'edit':
+
+ // If a request ID has been supplied
+ if ($requestID) {
+
+ // Try to get the complete cart for this request
+ $requestCart = $regSupport->getRegistrationCart($requestID);
+
+ // If a valid cart was returned
+ if ($requestCart && $requestCart['status']) {
+ $haveRequest = true;
+ } else {
+ $errorMsg = $requestCart['errorMsg'];
+ }
+
+ $view = 'editRequest.html';
+
+ break;
+
+ } else {
+ $errorMsg = 'Invalid Registration Request ID supplied. Unable to view/edit selected request.';
+ }
+
+ // Fall through to list if no requestID submitted
+
+ // Default is to list requests
+ default:
+
+ // Get list of requests
+ $requests = $this->getList();
+ if ($requests) {
+ $haveRequests = true;
+ }
+
+ $view = 'requests.html';
+
+ break;
+
+ }
+
+// Temporary debug info
+$cart_r = print_r($requestCart,1);
+
+ // Compile template data
+ $templateData = array(
+ 'haveRequests' => $haveRequests,
+ 'requests' => $requests,
+ 'haveRequest' => $haveRequest,
+ 'requestCart' => $requestCart,
+ 'errorMsg' => $errorMsg,
+
+ 'cart_r' => $cart_r
+ );
+ // Return status, any suggested view, and any data to controller
+ return array(
+ 'status' => true,
+ 'modelRedirect' => false,
+ 'view' => 'admin/registrations/'.$view,
+ 'data' => $templateData
+ );
+
+
+ }
+
+}
*
* Also note that parameters will be in the context of the main admin controller constructor.
*/
+
+// Add hooksHelp.html file to admin Management hooks output
+add_filter('glm-member-db-admin-management-hooksHelp', function($content) {
+
+ // Read in this plugin/addon hook help file
+ $fname = GLM_MEMBERS_REGISTRATIONS_PLUGIN_PATH.'/setup/hooksHelp.html';
+ if (is_file($fname)) {
+ $hooksHelp = file_get_contents($fname);
+ if ($hooksHelp != false) {
+ $content .= $hooksHelp;
+ }
+ }
+ return $content;
+ },
+ 10,
+ 2
+);
'Registration Events',
' Events',
'glm_members_members',
- 'glm-members-admin-menu-registrations-list',
- function() {$this->controller('registrations', 'list');}
+ 'glm-members-admin-menu-registrations-events',
+ function() {$this->controller('registrations', 'events');}
+);
+
+add_submenu_page(
+ 'glm-members-admin-menu-members',
+ 'Registration Requests',
+ ' Requests',
+ 'glm_members_members',
+ 'glm-members-admin-menu-registrations-requests',
+ function() {$this->controller('registrations', 'requests');}
);
add_submenu_page(
'glm-members-admin-menu-members',
--- /dev/null
+-- Gaslight Media Registration Database
+-- File Created: 01/18/2017 14:40:00
+-- Database Version: 0.0.3
+-- Database Creation Script
+--
+-- To permit each query below to be executed separately,
+-- all queries must be separated by a line with four dashes
+--
+/*
+ * General Database Organization
+ * -----------------------------
+ *
+ * management - General options and configuration - Site manager access only
+ *
+ * misc - Misc settings and text - Site owner may update
+ *
+ * Magic Forms Tables
+ * magicforms - Forms
+ * --> Event, Registration, Rate Class, Account, Registrant
+ * mf_data - Data submitted to a form
+ * --> Submission, Event Registration, Rate Class selected, Account, Registrant
+ * mf_temp_file - Temporary file meta-data
+ *
+ * added_info_fields - Additional fields
+ * added_info_data - Submitted additional field data
+ * --> added_info_fields
+ *
+ * payment codes - Promotional payment codes - Used with various things
+ * --> Event, Submission, Event Registration, Event Registrant, Account or global
+ *
+ * reg_event - Describes registration for that event
+ * reg_class - Type of registration for this event (one or more)
+ * reg_rates - Date range / rate for a reg class (one or more)
+ *
+ * reg_account - Describes someone who submits / pays for a registration
+ * Make these two things the same table....
+ * registrant - A person who is registered for an event
+ *
+ * reg_request - Information on a specific request for registrations
+ * reg_request_event - Event selected (one or more)
+ * reg_request_class - Class of registration (one or more)
+ * reg_request_rate - Specific registration date/rate (one or more)
+ * reg_request_registrant - Registrant (one or more)
+ *
+ *
+ * Overall Flow
+ * ------------
+ *
+ * User selects an event
+ * If the event has available registrations
+ * User selects a date for the registration (or if only one that's selected automatically)
+ * User can log back into registrations at this point if they've been there before and have a password, create an account, or continue as guest ???
+ * User selects an available rate type and adds one or more registrants for that rate type
+ * User may loop back to select additional rate type(s) and registrants
+ * User may go back to date selection and request additional rate types and registrants for the addional dates
+ * User may go back to select additional dates and do registrations for those dates as above
+ * User may go back to select other events and do registrations for them as above
+ * User may select the "Cart" and deselect something added to it
+ * User may checkout
+ *
+ */
+
+/*
+ * NOTE: Anything below here may not be completed or accurate yet. I'm still working though this
+ * Lines commented out are selected for possible deletion.
+ * The INSERT statements are not up-to-date with the tables.
+ * The "config/plugin.ini" file in this plugin is also a work in progress.
+ */
+
+-- Management Options
+-- General configurationm parameters for the Registrations application
+-- Only one entry in this table!
+CREATE TABLE {prefix}management (
+ id INT NOT NULL AUTO_INCREMENT,
+ canonical_reg_page TINYTEXT NULL, -- Canonical page slug for registrations
+ -- System Owner Information
+ reg_org_name TINYTEXT NULL, -- Customer Information - Name of Organization
+ reg_org_short TINYTEXT NULL,
+ reg_org_address TINYTEXT NULL,
+ reg_org_city TINYTEXT NULL,
+ reg_org_state TINYTEXT NULL,
+ reg_org_zip TINYTEXT NULL,
+ reg_org_phone TINYTEXT NULL,
+ reg_org_toll_free TINYTEXT NULL,
+ reg_org_internal_email TINYTEXT NULL,
+ reg_org_from_email TINYTEXT NULL,
+ reg_payment_methods SMALLINT NULL, -- Payment methods available for all registrations - Bitmap - see payment_method in plugin.ini
+ reg_proc_methods SMALLINT NULL, -- Payment processing methods available - Bitmap - see proc_method in plugin.ini
+ reg_cc_accepts SMALLINT NULL, -- Credit Cards Accepted - Bitmap - See credit_card in plugin.ini
+ -- Authorize.net Credentials
+ reg_authorize_net_login TINYTEXT NULL,
+ reg_authorize_net_key TINYTEXT NULL,
+ reg_authorize_net_test TINYINT NULL, -- Authorize.net test mode - List - see proc_test_mode in plugin.ini
+ reg_authorize_net_conf BOOLEAN NULL, -- Flag to send payment confirmation Email from Authorize.net
+ reg_authorize_net_merchant_email TINYTEXT NULL, -- E-Mail Authorize.net will send copy of confirmation E-Mail
+ -- Merchant Solutions Credentials
+ reg_merchant_solutions_acctid TINYTEXT NULL, -- Merchant Solutions credentials
+ reg_merchant_solutions_merchantpin TINYTEXT NULL,
+ reg_merchant_solutions_test TINYINT NULL, -- Merchant Solutions test mode - List - see proc_test_mode in plugin.ini
+ -- Billing settings
+ reg_full_billing_info BOOLEAN NULL, -- Always request full billing information in checkout page regardless of the following settings
+ reg_bill_info_req_no_charge SMALLINT NULL, -- Bitmap of fields to use in checkout for these types of payments - See billing_field in plugin.conf
+ reg_bill_info_req_comp_code SMALLINT NULL,
+ reg_bill_info_req_cash SMALLINT NULL,
+ reg_bill_info_req_check SMALLINT NULL,
+ reg_bill_info_req_credit_card SMALLINT NULL,
+ reg_bill_info_req_merchant_call SMALLINT NULL,
+ -- Misc Options
+ reg_medical_info BOOLEAN NULL, -- This site can ask for "Medical Info" - set in main category of an event
+ PRIMARY KEY (id)
+);
+
+----
+
+-- Terms used in site modifiable on Management page in admin - Only 1 entry in this table
+-- Terms in this table should be all self-explanatory
+CREATE TABLE {prefix}settings_terms (
+ id INT NOT NULL AUTO_INCREMENT,
+ reg_term_registrations_name TINYTEXT NULL, -- Term "Event Registration"
+ reg_term_registration TINYTEXT NULL,
+ reg_term_registration_cap TINYTEXT NULL,
+ reg_term_registration_plur TINYTEXT NULL,
+ reg_term_registration_plur_cap TINYTEXT NULL,
+ reg_term_register TINYTEXT NULL,
+ reg_term_register_cap TINYTEXT NULL,
+ reg_term_registers TINYTEXT NULL, -- Intransitive verb of register
+ reg_term_registering TINYTEXT NULL,
+ reg_term_registering_cap TINYTEXT NULL,
+ reg_term_registered TINYTEXT NULL,
+ reg_term_registered_cap TINYTEXT NULL,
+ reg_term_attendee TINYTEXT NULL,
+ reg_term_attendee_cap TINYTEXT NULL,
+ reg_term_attendee_plur TINYTEXT NULL,
+ reg_term_attendee_plur_cap TINYTEXT NULL,
+ reg_term_attending TINYTEXT NULL,
+ reg_term_attended TINYTEXT NULL,
+ reg_term_registered_user TINYTEXT NULL,
+ reg_term_registered_user_cap TINYTEXT NULL,
+ reg_term_registered_user_plur TINYTEXT NULL,
+ reg_term_registered_user_plur_cap TINYTEXT NULL,
+ reg_term_id TINYTEXT NULL,
+ reg_term_id_cap TINYTEXT NULL,
+ reg_term_id_plur TINYTEXT NULL,
+ reg_term_id_plur_cap TINYTEXT NULL,
+ reg_term_password TINYTEXT NULL,
+ reg_term_password_cap TINYTEXT NULL,
+ reg_term_password_plur TINYTEXT NULL,
+ reg_term_password_plur_cap TINYTEXT NULL,
+ reg_term_instructor TINYTEXT NULL,
+ reg_term_instructor_cap TINYTEXT NULL,
+ reg_term_instructor_plur TINYTEXT NULL,
+ reg_term_instructor_plur_cap TINYTEXT NULL,
+ reg_term_payment_code TINYTEXT NULL,
+ reg_term_payment_code_cap TINYTEXT NULL,
+ reg_term_payment_code_plur TINYTEXT NULL,
+ reg_term_payment_code_plur_cap TINYTEXT NULL,
+ reg_term_registration_button TINYTEXT NULL,
+ reg_term_contact_information TINYTEXT NULL,
+ PRIMARY KEY (id)
+);
+
+----
+
+-- Misc system-wide customer configurable configuration
+-- Various text and flags to be configured by customer
+-- Only one entry in this table!
+CREATE TABLE {prefix}misc (
+ id INT NOT NULL AUTO_INCREMENT,
+ reg_bulletin TEXT NULL, -- Text to display at top of first registration page
+ cart_page_text TEXT NULL, -- Text to display at top of cart page
+ checkout_page_text TEXT NULL, -- Text to display at top of checkout page
+ summary_page_text TEXT NULL, -- Text to display at top of summary page (after checkout)
+ reg_terms TEXT NULL, -- Registration terms and conditions
+ notify_subject TEXT NULL, -- Subject of notification E-Mail to site owner
+ notify_text TEXT NULL, -- Notification E-Mail text for site owner
+ instr_notify_subject TEXT NULL, -- Subject of notification E-Mail to instructor
+ instr_notify_text TEXT NULL, -- Notification E-Mail text for instructor
+ submission_notify_subject TEXT NULL, -- Subject of notification E-Mail to person submitting the registrations
+ submission_notify_text TEXT NULL, -- Notification E-Mail text to person submitting the registrations
+ registrant_notify_subject TEXT NULL, -- Subject of notification E-Mail to registrant
+ registrant_notify_text TEXT NULL, -- Text of notification E-Mail to registrant
+ submission_ack_subject TEXT NULL, -- Subject of acknowledgement E-Mail to person submitting the registrations
+ submission_ack_text TEXT NULL, -- Text of acknowledgement E-Mail text to person submitting the registrations
+ registrant_ack_subject TEXT NULL, -- Subject of acknowledgement E-Mail to registrant
+ registrant_ack_text TEXT NULL, -- Text of acknowledgement E-Mail to registrant
+ PRIMARY KEY (id)
+);
+
+----
+
+-- Additional fields for collecting information for various things - submission, event registration, or registrant
+-- Related to the registration submission or specific event registration
+CREATE TABLE {prefix}added_info_fields (
+ id INT NOT NULL AUTO_INCREMENT,
+ ref_type TINYINT NULL, -- See data_ref_type table in plugin.ini
+ ref_dest INT NULL, -- Pointer to the specific entity of ref_type - (not user submitted data record)
+ name TINYTEXT NULL, -- Displayed field prompt - also used on retrieval of data
+ description TINYTEXT NULL, -- Description of field - possibly to display to user
+ PRIMARY KEY (id),
+ INDEX (ref_dest)
+);
+
+----
+
+-- Additional field data for various specific things
+CREATE TABLE {prefix}added_info_data (
+ id INT NOT NULL AUTO_INCREMENT,
+ added_info_field INT NULL, -- Pointer to added_info_field table
+ ref_type TINYINT NULL, -- See data ref_type table in plugin.ini
+ ref_dest INT NULL, -- Pointer to specific entryt of the correct type (user submitted data record)
+ field_value TINYTEXT NULL,
+ PRIMARY KEY (id),
+ INDEX (ref_dest)
+);
+
+
+----
+
+-- magicform
+CREATE TABLE {prefix}magicform (
+ id INT NOT NULL AUTO_INCREMENT,
+ form_id TINYTEXT NULL,
+ custom_id TINYTEXT NULL,
+ title TINYTEXT NULL,
+ type SMALLINT NULL,
+ descr TEXT NULL,
+ active BOOLEAN NULL,
+ required BOOLEAN NULL,
+ data1 TINYTEXT NULL,
+ sort SMALLINT NULL,
+ expanded BOOLEAN NULL,
+ style TEXT NULL,
+ file TINYTEXT NULL,
+ cols INT NULL,
+ rows INT NULL,
+ size TINYTEXT NULL,
+ format TINYTEXT NULL,
+ default_val TINYTEXT NULL,
+ PRIMARY KEY (id),
+ INDEX(form_id(20))
+);
+
+----
+
+-- mf_data
+CREATE TABLE {prefix}mf_data (
+ id INT NOT NULL AUTO_INCREMENT,
+ fiid INT NULL,
+ form_id TINYTEXT NULL,
+ field_id TINYTEXT NULL,
+ level TINYTEXT NULL,
+ title TINYTEXT NULL,
+ type INT NULL,
+ txt_type TEXT NULL,
+ value TEXT NULL,
+ numb_value DOUBLE PRECISION NULL,
+ txt_value TEXT NULL,
+ opt_num INT NULL,
+ valid BOOLEAN NULL,
+ required BOOLEAN NULL,
+ failure TEXT NULL,
+ PRIMARY KEY (id),
+ INDEX(form_id(20)),
+ INDEX(fiid)
+);
+
+----
+
+-- mf_temp_file
+CREATE TABLE {prefix}mf_temp_file (
+ id INT NOT NULL AUTO_INCREMENT,
+ file_name TINYTEXT NULL,
+ upload_time DATE NULL,
+ PRIMARY KEY (id),
+ INDEX(file_name(20)),
+ INDEX(upload_time)
+);
+
+----
+
+-- Payment Codes
+-- Promotional payment codes for free/discounted payment
+CREATE TABLE {prefix}payment_code (
+ id INT NOT NULL AUTO_INCREMENT,
+ code_type TINYINT NULL, -- Type of adjustment - Free only to start with - See pay_code_type in plugin.ini
+ ref_type TINYINT NULL, -- See payment_ref_type in plugin.ini
+ ref_dest INT NULL, -- Pointer to the specific entity of ref_type
+ code TINYTEXT NULL, -- Text code user must enter to use
+ amount FLOAT, -- Amount of discount if not type "Free" - Either $ amount or percent
+ descr TEXT NULL,
+ PRIMARY KEY (id),
+ INDEX (ref_dest),
+ INDEX (code(10))
+);
+
+----
+
+-- 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
+CREATE TABLE {prefix}reg_event (
+ id INT NOT NULL AUTO_INCREMENT,
+ event INT NULL, -- Pointer to event in Events add-on
+ 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
+ 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
+ attendee_max_per_reg TINYINT NULL, -- Maximum attendees per registration submission - 0 = unlimited
+ attendee_count MEDIUMINT NULL, -- Last calculated attendee count
+ registration_account_options SMALLINT NULL, -- Bitmap of how user accounts may be used for this event - See registration_account_option in plugin.ini
+ payment_methods SMALLINT NULL, -- Bitmap of payment methods available to users for this event - See payment_method in plugin.ini
+ restricted_payment_methods SMALLINT NULL, -- Bitmap of restricted (admin use only) payment methods for this event - see payment_method
+ terms TEXT NULL, -- Terms and Conditions for registration
+ reg_file TINYTEXT NULL, -- Name of a downloadable file
+ reg_file_title TINYTEXT NULL, -- Title for downloadable file
+ form_revision SMALLINT NULL, -- Current MagicForm form revision
+ notes TEXT NULL, -- System operator's notes for this event - Not visible to users
+ PRIMARY KEY (id),
+ INDEX (event),
+ INDEX (event_code(10))
+);
+
+----
+
+-- Registration Class - Type of registration for a specific event - Equates to "Rate Options" in the old system
+-- One or more for each event
+CREATE TABLE {prefix}reg_class (
+ id INT NOT NULL AUTO_INCREMENT,
+ reg_event INT NULL, -- Pointer to reg_event table
+ name TINYTEXT NULL, -- Name of this registration type
+ descr TEXT NULL, -- Description
+ PRIMARY KEY (id),
+ INDEX (reg_event)
+);
+
+----
+
+-- Rates and dates for a particular reg_class
+-- One or more per reg_class - **** Days should not overlap for a particular reg_class
+CREATE TABLE {prefix}reg_rates (
+ id INT NOT NULL AUTO_INCREMENT,
+ reg_event INT NULL, -- Pointer to reg_event table
+ reg_class INT NULL, -- Pointer to reg_class table
+ start_days INT NULL, -- # of days before event time rate becomes available - may be entered as a date then coverted for storage
+ end_days INT NULL, -- # of days before event time rate becomes unavailable
+ base_rate FLOAT, -- Base rate to register
+ per_registrant FLOAT, -- Rate per registrant
+ registrant_credits TINYINT NULL, -- Number of registrants included in base rate
+ PRIMARY KEY (id),
+ INDEX (reg_event),
+ INDEX (reg_class)
+);
+
+----
+
+-- An account for a person submitting a registration or a registrant for an event
+-- Depending on the use of these entries may not have all data included
+-- A single account may be referenced as a person submitting registrations and/or a person registered for an event
+CREATE TABLE {prefix}account (
+ id INT NOT NULL AUTO_INCREMENT,
+ active BOOLEAN NULL, -- Is active flag (may be accessed or used) - default is true
+ registered_by INT NULL, -- Account
+ member_id TINYTEXT NULL, -- Free-form field for a member ID (not a GLM Associate member ID)
+ fname TINYTEXT NULL, -- Account primary address
+ lname TINYTEXT NULL,
+ org TINYTEXT NULL,
+ title TINYTEXT NULL,
+ addr1 TINYTEXT NULL,
+ addr2 TINYTEXT NULL,
+ city TINYTEXT NULL,
+ state TINYTEXT NULL,
+ zip TINYTEXT NULL,
+ country TINYTEXT NULL,
+ phone TINYTEXT NULL,
+ fax TINYTEXT NULL,
+ bill_fname TINYTEXT NULL, -- Last used billing information - Also stored in each registration request
+ bill_lname TINYTEXT NULL,
+ bill_org TINYTEXT NULL,
+ bill_title TINYTEXT NULL,
+ bill_addr1 TINYTEXT NULL,
+ bill_addr2 TINYTEXT NULL,
+ bill_city TINYTEXT NULL,
+ bill_state TINYTEXT NULL,
+ bill_zip TINYTEXT NULL,
+ bill_country TINYTEXT NULL,
+ bill_phone TINYTEXT NULL,
+ bill_fax TINYTEXT NULL,
+ email TINYTEXT NULL,
+ password TINYTEXT NULL, -- Crypted password for login back into this account
+ email_ok BOOLEAN NULL,
+ is_member BOOLEAN NULL, -- Is a member of the entity that owns the site
+ contact_id INT NULL, -- Pointer to GLM Associate member contact record if account is for a member contact
+ contact_fname TINYTEXT NULL,
+ contact_lname TINYTEXT NULL,
+ contact_org TINYTEXT NULL,
+ contact_title TINYTEXT NULL,
+ contact_addr1 TINYTEXT NULL,
+ contact_addr2 TINYTEXT NULL,
+ contact_city TINYTEXT NULL,
+ contact_state TINYTEXT NULL,
+ contact_zip TINYTEXT NULL,
+ contact_country TINYTEXT NULL,
+ contact_phone TINYTEXT NULL,
+ contact_fax TINYTEXT NULL,
+ contact_email TINYTEXT NULL,
+ contact_email_ok BOOLEAN NULL,
+ guardian TINYTEXT NULL,
+ emer_contact TINYTEXT NULL,
+ emer_phone TINYTEXT NULL,
+ med_history TINYTEXT NULL,
+ allergy_med TINYTEXT NULL,
+ date_created DATE NULL,
+ notes TEXT NULL, -- System operator's notes for this account - not visible to account owner
+ user_trace_info TINYTEXT NULL, -- IP Address of user computer and timestamp of last update
+ PRIMARY KEY (id),
+ INDEX (registered_by),
+ INDEX (member_id(10)),
+ INDEX (fname(10)),
+ INDEX (lname(10)),
+ INDEX (org(10)),
+ INDEX (city(10)),
+ INDEX (state(5)),
+ INDEX (zip(5)),
+ INDEX (email(10)),
+ INDEX (contact_id)
+);
+
+----
+
+-- A request for registration
+-- Has one or more reg_detail records associated with it
+CREATE TABLE {prefix}reg_request (
+ id INT NOT NULL AUTO_INCREMENT,
+ account INT NULL, -- Pointer to user account (reg_account) who submitted the registrations
+ bill_fname TINYTEXT NULL, -- Billing information used for this registration submission - Updates account billing address - Kept here for each request
+ bill_lname TINYTEXT NULL,
+ bill_org TINYTEXT NULL,
+ bill_title TINYTEXT NULL,
+ bill_addr1 TINYTEXT NULL,
+ bill_addr2 TINYTEXT NULL,
+ bill_city TINYTEXT NULL,
+ bill_state TINYTEXT NULL,
+ bill_zip TINYTEXT NULL,
+ bill_country TINYTEXT NULL,
+ date_submitted DATE NULL,
+ pay_method INT NULL, -- See payment_method in plugin.ini
+ payment_code TINYTEXT NULL, -- Payment_code (code text) - if submitted and validated
+ status SMALLINT NULL, -- See submission_status in plugin.ini
+ total DOUBLE PRECISION NULL, -- Total charge including all fees and taxes
+ cc_type TINYINT NULL, -- Credit Card type (if used) - See credit_card in plugin.ini
+ cc_name TINYTEXT NULL,
+ cc_numb TINYTEXT NULL,
+ cc_exp TINYTEXT NULL,
+ cc_cvv TINYTEXT NULL,
+ cc_conf TINYTEXT NULL, -- Confirmation code back from card processor
+ summary TEXT NULL, -- HTML summary of cart contents, costs and payment - Use same HTML displayed to user
+ mf_data TEXT NULL, -- Any MagicForm data associated with registrant
+ notes TEXT NULL, -- System operator's notes for this registration request
+ user_trace_info TINYTEXT NULL, -- IP Address of user computer and timestamp
+ PRIMARY KEY (id),
+ INDEX (account),
+ INDEX (date_submitted)
+);
+
+----
+
+-- Registration for a specific event
+-- Has one or more reg_selected_rate records associated with it
+CREATE TABLE {prefix}reg_request_event (
+ id INT NOT NULL AUTO_INCREMENT,
+ account INT NULL, -- Pointer to account (person submitting the registration)
+ reg_request INT NULL, -- Pointer to reg_request table
+ event INT NULL, -- Pointer to reg_event
+ event_time INT NULL, -- Pointer to event_times table entry in Events add-on
+ total_charge FLOAT, -- Last calculated total of all charges for registration to this event for all registrants
+ notes TEXT NULL, -- System operator's notes for this registration request
+ mf_data TEXT NULL, -- Any MagicForm data associated with requested event
+ PRIMARY KEY (id),
+ INDEX (reg_request),
+ INDEX (account),
+ INDEX (event),
+ INDEX (event_time)
+);
+
+----
+
+-- A particular reg_class selected
+-- Has one or more reg_request_rate records associated with it
+CREATE TABLE {prefix}reg_request_class (
+ id INT NOT NULL AUTO_INCREMENT,
+ account INT NULL, -- Pointer to account (person submitting the registration)
+ event INT NULL, -- Pointer to reg_event entry
+ event_time INT NULL, -- Pointer to event_times table entry in Events add-on - To help with registrant searches
+ reg_request INT NULL, -- Pointer to the registration request record
+ reg_request_event INT NULL, -- Pointer to reg_request_event table entry
+ total_class_charge FLOAT, -- Last calculated total of all charges for this registration class for this request
+ mf_data TEXT NULL, -- Any MagicForm data associated with registrant
+ notes TEXT NULL, -- System operator's notes for this registration request
+ PRIMARY KEY (id),
+ INDEX (account),
+ INDEX (event),
+ INDEX (event_time),
+ INDEX (reg_request_event)
+);
+
+----
+
+-- A particular reg_rate selected
+-- Has one or more reg_request_registrant records associated with it
+CREATE TABLE {prefix}reg_request_rate (
+ id INT NOT NULL AUTO_INCREMENT,
+ account INT NULL, -- Pointer to account (person submitting the registration)
+ event INT NULL, -- Pointer to reg_event entry
+ event_time INT NULL, -- Pointer to event_times table entry in Events add-on - To help with registrant searches
+ reg_request INT NULL, -- Pointer to the registration request record
+ reg_request_event INT NULL, -- Pointer to reg_request_event table entry
+ reg_request_class INT NULL, -- Pointer to reg_request_class table entry
+ rate_base FLOAT, -- Base rate at time of registration
+ per_registrant FLOAT, -- Per Registrant Rate at time of registration
+ registrant_credits TINYINT NULL, -- Number of registrant credits in base rate at time of registration
+ numb_registrants TINYINT NULL, -- Last calculated number of registrants with this rate
+ total_registrant_charges FLOAT, -- Last calculation registrant charges assoicated with this selected rate
+ mf_data TEXT NULL, -- Any MagicForm data associated with registrant
+ notes TEXT NULL, -- System operator's notes for this registration request
+ PRIMARY KEY (id),
+ INDEX (account),
+ INDEX (event),
+ INDEX (event_time),
+ INDEX (reg_request_event),
+ INDEX (reg_request_class)
+);
+
+----
+
+-- A specific registrant for a selected registration rate
+CREATE TABLE {prefix}reg_request_registrant (
+ id INT NOT NULL AUTO_INCREMENT,
+ account INT NULL, -- Pointer to account for person submitting the registration
+ event INT NULL, -- Pointer to reg_event entry
+ event_time INT NULL, -- Pointer to event_times table entry in Events add-on - To help with registrant searches
+ reg_request_event INT NULL, -- Pointer to reg_request_event table entry
+ reg_request_class INT NULL, -- Pointer to reg_request_class table entry
+ reg_request_rate INT NULL, -- Pointer to reg_request_rate table entry
+ reg_request_registrant INT NULL, -- Pointer to account for registrant (person attending) - Not needed if registrants are off for the event
+ mf_data TEXT NULL, -- Any MagicForm data associated with registrant
+ notes TEXT NULL, -- System operator's notes for this registration request
+ PRIMARY KEY (id),
+ INDEX (account),
+ INDEX (event),
+ INDEX (event_time),
+ INDEX (reg_request_event),
+ INDEX (reg_request_class),
+ INDEX (reg_request_rate),
+ INDEX (reg_request_registrant)
+);
+
+----
+
+-- Insert into management table
+INSERT INTO {prefix}management
+ (
+ canonical_reg_page,
+ reg_org_name,
+ reg_org_short,
+ reg_org_address,
+ reg_org_city,
+ reg_org_state,
+ reg_org_zip,
+ reg_org_phone,
+ reg_org_toll_free,
+ reg_org_internal_email,
+ reg_org_from_email,
+ reg_payment_methods,
+ reg_proc_methods,
+ reg_cc_accepts,
+ reg_authorize_net_login,
+ reg_authorize_net_key,
+ reg_authorize_net_test,
+ reg_authorize_net_conf,
+ reg_authorize_net_merchant_email,
+ reg_merchant_solutions_acctid,
+ reg_merchant_solutions_merchantpin,
+ reg_merchant_solutions_test,
+ reg_full_billing_info,
+ reg_bill_info_req_no_charge,
+ reg_bill_info_req_comp_code,
+ reg_bill_info_req_cash,
+ reg_bill_info_req_check,
+ reg_bill_info_req_credit_card,
+ reg_bill_info_req_merchant_call,
+ reg_medical_info
+ )
+ VALUES
+ (
+ 'registrations', -- reg_canonical_reg_page,
+ 'Gaslight Media', -- reg_org_name,
+ 'GLM', -- reg_org_short,
+ '120 E. Lake St.', -- reg_org_address,
+ 'Petoskey', -- reg_org_city,
+ 'MI', -- reg_org_state,
+ '49770', -- reg_org_zip,
+ '231-487-0692', -- reg_org_phone,
+ '800-123-1234', -- reg_org_toll_free,
+ 'internal@gaslightmedia.com', -- reg_org_internal_email,
+ 'info@gaslightmedia.com', -- reg_org_from_email,
+ 0, -- reg_payment_methods,
+ 0, -- reg_proc_methods,
+ 0, -- reg_cc_accepts,
+ '', -- reg_authorize_net_login,
+ '', -- reg_authorize_net_key,
+ 1, -- reg_authorize_net_test,
+ true, -- reg_authorize_net_conf
+ '', -- reg_authorize_net_merchant_email,
+ '', -- reg_merchant_solutions_acctid,
+ '', -- reg_merchant_solutions_merchantpin,
+ 1, -- reg_merchant_solutions_test,
+ true, -- reg_full_billing_info,
+ 0, -- reg_bill_info_req_no_charge,
+ 0, -- reg_bill_info_req_comp_code,
+ 0, -- reg_bill_info_req_cash,
+ 0, -- reg_bill_info_req_check,
+ 0, -- reg_bill_info_req_credit_card,
+ 0, -- reg_bill_info_req_merchant_call,
+ true -- reg_medical_info,
+ );
+
+----
+
+-- Insert into settings_terms table
+INSERT INTO {prefix}settings_terms
+ (
+ reg_term_registrations_name,
+ reg_term_registration,
+ reg_term_registration_cap,
+ reg_term_registration_plur,
+ reg_term_registration_plur_cap,
+ reg_term_register,
+ reg_term_register_cap,
+ reg_term_registers,
+ reg_term_registering,
+ reg_term_registering_cap,
+ reg_term_registered,
+ reg_term_registered_cap,
+ reg_term_attendee,
+ reg_term_attendee_cap,
+ reg_term_attendee_plur,
+ reg_term_attendee_plur_cap,
+ reg_term_attending,
+ reg_term_attended,
+ reg_term_registered_user,
+ reg_term_registered_user_cap,
+ reg_term_registered_user_plur,
+ reg_term_registered_user_plur_cap,
+ reg_term_id,
+ reg_term_id_cap,
+ reg_term_id_plur,
+ reg_term_id_plur_cap,
+ reg_term_password,
+ reg_term_password_cap,
+ reg_term_password_plur,
+ reg_term_password_plur_cap,
+ reg_term_instructor,
+ reg_term_instructor_cap,
+ reg_term_instructor_plur,
+ reg_term_instructor_plur_cap,
+ reg_term_payment_code,
+ reg_term_payment_code_cap,
+ reg_term_payment_code_plur,
+ reg_term_payment_code_plur_cap,
+ reg_term_registration_button,
+ reg_term_contact_information
+ )
+ VALUES
+ (
+ 'Event Registrations', -- reg_term_registrations_name
+ 'registration', -- reg_term_registration
+ 'Registration', -- reg_term_registration_cap
+ 'registrations', -- reg_term_registration_plur
+ 'Registrations', -- reg_term_registration_plur_cap
+ 'register', -- reg_term_registe
+ 'Register', -- reg_term_register_cap
+ 'registers', -- reg_term_registers
+ 'registering', -- reg_term_registering
+ 'Registering', -- reg_term_registering_cap
+ 'registered', -- reg_term_registered
+ 'Registered', -- reg_term_registered_cap
+ 'attendee', -- reg_term_attendee
+ 'Attendee', -- reg_term_attendee_cap
+ 'attendees', -- reg_term_attendee_plur
+ 'Attendees', -- reg_term_attendee_plur_cap
+ 'attending', -- reg_term_attending
+ 'attended', -- reg_term_attended
+ 'user', -- reg_term_registered_user
+ 'User', -- reg_term_registered_user_cap
+ 'users', -- reg_term_registered_user_plur
+ 'Users', -- reg_term_registered_user_plur_cap
+ 'ID', -- reg_term_id
+ 'ID', -- reg_term_id_cap
+ 'IDs', -- reg_term_id_plur
+ 'IDs', -- reg_term_id_plur_cap
+ 'password', -- reg_term_password
+ 'passwords', -- reg_term_password_cap
+ 'Password', -- reg_term_password_plur
+ 'Passwords', -- reg_term_password_plur_cap
+ 'instructor', -- reg_term_instructor
+ 'Instructor', -- reg_term_instructor_cap
+ 'instructors', -- reg_term_instructor_plur
+ 'Instructors', -- reg_term_instructor_plur_cap
+ 'payment code', -- reg_term_payment_code
+ 'Payment code', -- reg_term_payment_code_cap
+ 'payment codes', -- reg_term_payment_code_plur
+ 'Payment codes', -- reg_term_payment_code_plur_cap
+ 'Register for Event', -- reg_term_registration_button
+ 'Contact Information' -- reg_term_contact_information
+ );
+
+----
+
+-- Insert into misc table
+INSERT INTO {prefix}misc
+ (
+ reg_bulletin,
+ cart_page_text,
+ checkout_page_text,
+ summary_page_text,
+ reg_terms,
+ notify_subject,
+ notify_text,
+ instr_notify_subject,
+ instr_notify_text,
+ submission_notify_subject,
+ submission_notify_text,
+ registrant_notify_subject,
+ registrant_notify_text,
+ submission_ack_subject,
+ submission_ack_text,
+ registrant_ack_subject,
+ registrant_ack_text
+ )
+ VALUES
+ (
+ 'Registration Bulletin Text',
+ 'Text for top of Cart Page',
+ 'Text for top of Checkout Page',
+ 'Text for top of Summary Page',
+ 'Terms and Conditions',
+ 'Subject of notification to site owner of a registration',
+ 'Text of notification to site owner of a registration',
+ 'Subject of notification to instructor of registration',
+ 'Text for notification to instructor of registration',
+ 'Subject of notification to person submitting registration',
+ 'Text of notification to person submitting registration',
+ 'Subject for notification to registrant',
+ 'Text for notification to registrant',
+ 'Subject of acknowledgement to person submitting registration',
+ 'Text of acknowledgement to person submitting registration',
+ 'Subject of acknowledgement to registrant',
+ 'Text of acknowledgement to registrant'
+ );
+++ /dev/null
--- Gaslight Media Registration Database
--- File Created: 01/18/2017 14:40:00
--- Database Version: 0.0.3
--- Database Creation Script
---
--- To permit each query below to be executed separately,
--- all queries must be separated by a line with four dashes
---
-/*
- * General Database Organization
- * -----------------------------
- *
- * management - General options and configuration - Site manager access only
- *
- * misc - Misc settings and text - Site owner may update
- *
- * Magic Forms Tables
- * magicforms - Forms
- * --> Event, Registration, Rate Class, Account, Registrant
- * mf_data - Data submitted to a form
- * --> Submission, Event Registration, Rate Class selected, Account, Registrant
- * mf_temp_file - Temporary file meta-data
- *
- * added_info_fields - Additional fields
- * added_info_data - Submitted additional field data
- * --> added_info_fields
- *
- * payment codes - Promotional payment codes - Used with various things
- * --> Event, Submission, Event Registration, Event Registrant, Account or global
- *
- * reg_event - Describes registration for that event
- * reg_class - Type of registration for this event (one or more)
- * reg_rates - Date range / rate for a reg class (one or more)
- *
- * reg_account - Describes someone who submits / pays for a registration
- * Make these two things the same table....
- * registrant - A person who is registered for an event
- *
- * reg_request - Information on a specific request for registrations
- * reg_request_event - Event selected (one or more)
- * reg_request_class - Class of registration (one or more)
- * reg_request_rate - Specific registration date/rate (one or more)
- * reg_request_registrant - Registrant (one or more)
- *
- *
- * Overall Flow
- * ------------
- *
- * User selects an event
- * If the event has available registrations
- * User selects a date for the registration (or if only one that's selected automatically)
- * User can log back into registrations at this point if they've been there before and have a password, create an account, or continue as guest ???
- * User selects an available rate type and adds one or more registrants for that rate type
- * User may loop back to select additional rate type(s) and registrants
- * User may go back to date selection and request additional rate types and registrants for the addional dates
- * User may go back to select additional dates and do registrations for those dates as above
- * User may go back to select other events and do registrations for them as above
- * User may select the "Cart" and deselect something added to it
- * User may checkout
- *
- */
-
-/*
- * NOTE: Anything below here may not be completed or accurate yet. I'm still working though this
- * Lines commented out are selected for possible deletion.
- * The INSERT statements are not up-to-date with the tables.
- * The "config/plugin.ini" file in this plugin is also a work in progress.
- */
-
--- Management Options
--- General configurationm parameters for the Registrations application
--- Only one entry in this table!
-CREATE TABLE {prefix}management (
- id INT NOT NULL AUTO_INCREMENT,
- canonical_reg_page TINYTEXT NULL, -- Canonical page slug for registrations
- -- System Owner Information
- reg_org_name TINYTEXT NULL, -- Customer Information - Name of Organization
- reg_org_short TINYTEXT NULL,
- reg_org_address TINYTEXT NULL,
- reg_org_city TINYTEXT NULL,
- reg_org_state TINYTEXT NULL,
- reg_org_zip TINYTEXT NULL,
- reg_org_phone TINYTEXT NULL,
- reg_org_toll_free TINYTEXT NULL,
- reg_org_internal_email TINYTEXT NULL,
- reg_org_from_email TINYTEXT NULL,
- reg_payment_methods SMALLINT NULL, -- Payment methods available for all registrations - Bitmap - see payment_method in plugin.ini
- reg_proc_methods SMALLINT NULL, -- Payment processing methods available - Bitmap - see proc_method in plugin.ini
- reg_cc_accepts SMALLINT NULL, -- Credit Cards Accepted - Bitmap - See credit_card in plugin.ini
- -- Authorize.net Credentials
- reg_authorize_net_login TINYTEXT NULL,
- reg_authorize_net_key TINYTEXT NULL,
- reg_authorize_net_test TINYINT NULL, -- Authorize.net test mode - List - see proc_test_mode in plugin.ini
- reg_authorize_net_conf BOOLEAN NULL, -- Flag to send payment confirmation Email from Authorize.net
- reg_authorize_net_merchant_email TINYTEXT NULL, -- E-Mail Authorize.net will send copy of confirmation E-Mail
- -- Merchant Solutions Credentials
- reg_merchant_solutions_acctid TINYTEXT NULL, -- Merchant Solutions credentials
- reg_merchant_solutions_merchantpin TINYTEXT NULL,
- reg_merchant_solutions_test TINYINT NULL, -- Merchant Solutions test mode - List - see proc_test_mode in plugin.ini
- -- Billing settings
- reg_full_billing_info BOOLEAN NULL, -- Always request full billing information in checkout page regardless of the following settings
- reg_bill_info_req_no_charge SMALLINT NULL, -- Bitmap of fields to use in checkout for these types of payments - See billing_field in plugin.conf
- reg_bill_info_req_comp_code SMALLINT NULL,
- reg_bill_info_req_cash SMALLINT NULL,
- reg_bill_info_req_check SMALLINT NULL,
- reg_bill_info_req_credit_card SMALLINT NULL,
- reg_bill_info_req_merchant_call SMALLINT NULL,
- -- Misc Options
- reg_medical_info BOOLEAN NULL, -- This site can ask for "Medical Info" - set in main category of an event
- PRIMARY KEY (id)
-);
-
-----
-
--- Terms used in site modifiable on Management page in admin - Only 1 entry in this table
--- Terms in this table should be all self-explanatory
-CREATE TABLE {prefix}settings_terms (
- id INT NOT NULL AUTO_INCREMENT,
- reg_term_registrations_name TINYTEXT NULL, -- Term "Event Registration"
- reg_term_registration TINYTEXT NULL,
- reg_term_registration_cap TINYTEXT NULL,
- reg_term_registration_plur TINYTEXT NULL,
- reg_term_registration_plur_cap TINYTEXT NULL,
- reg_term_register TINYTEXT NULL,
- reg_term_register_cap TINYTEXT NULL,
- reg_term_registers TINYTEXT NULL, -- Intransitive verb of register
- reg_term_registering TINYTEXT NULL,
- reg_term_registering_cap TINYTEXT NULL,
- reg_term_registered TINYTEXT NULL,
- reg_term_registered_cap TINYTEXT NULL,
- reg_term_attendee TINYTEXT NULL,
- reg_term_attendee_cap TINYTEXT NULL,
- reg_term_attendee_plur TINYTEXT NULL,
- reg_term_attendee_plur_cap TINYTEXT NULL,
- reg_term_attending TINYTEXT NULL,
- reg_term_attended TINYTEXT NULL,
- reg_term_registered_user TINYTEXT NULL,
- reg_term_registered_user_cap TINYTEXT NULL,
- reg_term_registered_user_plur TINYTEXT NULL,
- reg_term_registered_user_plur_cap TINYTEXT NULL,
- reg_term_id TINYTEXT NULL,
- reg_term_id_cap TINYTEXT NULL,
- reg_term_id_plur TINYTEXT NULL,
- reg_term_id_plur_cap TINYTEXT NULL,
- reg_term_password TINYTEXT NULL,
- reg_term_password_cap TINYTEXT NULL,
- reg_term_password_plur TINYTEXT NULL,
- reg_term_password_plur_cap TINYTEXT NULL,
- reg_term_instructor TINYTEXT NULL,
- reg_term_instructor_cap TINYTEXT NULL,
- reg_term_instructor_plur TINYTEXT NULL,
- reg_term_instructor_plur_cap TINYTEXT NULL,
- reg_term_payment_code TINYTEXT NULL,
- reg_term_payment_code_cap TINYTEXT NULL,
- reg_term_payment_code_plur TINYTEXT NULL,
- reg_term_payment_code_plur_cap TINYTEXT NULL,
- reg_term_registration_button TINYTEXT NULL,
- reg_term_contact_information TINYTEXT NULL,
- PRIMARY KEY (id)
-);
-
-----
-
--- Misc system-wide customer configurable configuration
--- Various text and flags to be configured by customer
--- Only one entry in this table!
-CREATE TABLE {prefix}misc (
- id INT NOT NULL AUTO_INCREMENT,
- reg_bulletin TEXT NULL, -- Text to display at top of first registration page
- cart_page_text TEXT NULL, -- Text to display at top of cart page
- checkout_page_text TEXT NULL, -- Text to display at top of checkout page
- summary_page_text TEXT NULL, -- Text to display at top of summary page (after checkout)
- reg_terms TEXT NULL, -- Registration terms and conditions
- notify_subject TEXT NULL, -- Subject of notification E-Mail to site owner
- notify_text TEXT NULL, -- Notification E-Mail text for site owner
- instr_notify_subject TEXT NULL, -- Subject of notification E-Mail to instructor
- instr_notify_text TEXT NULL, -- Notification E-Mail text for instructor
- submission_notify_subject TEXT NULL, -- Subject of notification E-Mail to person submitting the registrations
- submission_notify_text TEXT NULL, -- Notification E-Mail text to person submitting the registrations
- registrant_notify_subject TEXT NULL, -- Subject of notification E-Mail to registrant
- registrant_notify_text TEXT NULL, -- Text of notification E-Mail to registrant
- submission_ack_subject TEXT NULL, -- Subject of acknowledgement E-Mail to person submitting the registrations
- submission_ack_text TEXT NULL, -- Text of acknowledgement E-Mail text to person submitting the registrations
- registrant_ack_subject TEXT NULL, -- Subject of acknowledgement E-Mail to registrant
- registrant_ack_text TEXT NULL, -- Text of acknowledgement E-Mail to registrant
- PRIMARY KEY (id)
-);
-
-----
-
--- Additional fields for collecting information for various things - submission, event registration, or registrant
--- Related to the registration submission or specific event registration
-CREATE TABLE {prefix}added_info_fields (
- id INT NOT NULL AUTO_INCREMENT,
- ref_type TINYINT NULL, -- See data_ref_type table in plugin.ini
- ref_dest INT NULL, -- Pointer to the specific entity of ref_type - (not user submitted data record)
- name TINYTEXT NULL, -- Displayed field prompt - also used on retrieval of data
- description TINYTEXT NULL, -- Description of field - possibly to display to user
- PRIMARY KEY (id),
- INDEX (ref_dest)
-);
-
-----
-
--- Additional field data for various specific things
-CREATE TABLE {prefix}added_info_data (
- id INT NOT NULL AUTO_INCREMENT,
- added_info_field INT NULL, -- Pointer to added_info_field table
- ref_type TINYINT NULL, -- See data ref_type table in plugin.ini
- ref_dest INT NULL, -- Pointer to specific entryt of the correct type (user submitted data record)
- field_value TINYTEXT NULL,
- PRIMARY KEY (id),
- INDEX (ref_dest)
-);
-
-
-----
-
--- magicform
-CREATE TABLE {prefix}magicform (
- id INT NOT NULL AUTO_INCREMENT,
- form_id TINYTEXT NULL,
- custom_id TINYTEXT NULL,
- title TINYTEXT NULL,
- type SMALLINT NULL,
- descr TEXT NULL,
- active BOOLEAN NULL,
- required BOOLEAN NULL,
- data1 TINYTEXT NULL,
- sort SMALLINT NULL,
- expanded BOOLEAN NULL,
- style TEXT NULL,
- file TINYTEXT NULL,
- cols INT NULL,
- rows INT NULL,
- size TINYTEXT NULL,
- format TINYTEXT NULL,
- default_val TINYTEXT NULL,
- PRIMARY KEY (id),
- INDEX(form_id(20))
-);
-
-----
-
--- mf_data
-CREATE TABLE {prefix}mf_data (
- id INT NOT NULL AUTO_INCREMENT,
- fiid INT NULL,
- form_id TINYTEXT NULL,
- field_id TINYTEXT NULL,
- level TINYTEXT NULL,
- title TINYTEXT NULL,
- type INT NULL,
- txt_type TEXT NULL,
- value TEXT NULL,
- numb_value DOUBLE PRECISION NULL,
- txt_value TEXT NULL,
- opt_num INT NULL,
- valid BOOLEAN NULL,
- required BOOLEAN NULL,
- failure TEXT NULL,
- PRIMARY KEY (id),
- INDEX(form_id(20)),
- INDEX(fiid)
-);
-
-----
-
--- mf_temp_file
-CREATE TABLE {prefix}mf_temp_file (
- id INT NOT NULL AUTO_INCREMENT,
- file_name TINYTEXT NULL,
- upload_time DATE NULL,
- PRIMARY KEY (id),
- INDEX(file_name(20)),
- INDEX(upload_time)
-);
-
-----
-
--- Payment Codes
--- Promotional payment codes for free/discounted payment
-CREATE TABLE {prefix}payment_code (
- id INT NOT NULL AUTO_INCREMENT,
- code_type TINYINT NULL, -- Type of adjustment - Free only to start with - See pay_code_type in plugin.ini
- ref_type TINYINT NULL, -- See payment_ref_type in plugin.ini
- ref_dest INT NULL, -- Pointer to the specific entity of ref_type
- code TINYTEXT NULL, -- Text code user must enter to use
- amount FLOAT, -- Amount of discount if not type "Free" - Either $ amount or percent
- descr TEXT NULL,
- PRIMARY KEY (id),
- INDEX (ref_dest),
- INDEX (code(10))
-);
-
-----
-
--- 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
-CREATE TABLE {prefix}reg_event (
- id INT NOT NULL AUTO_INCREMENT,
- event INT NULL, -- Pointer to event in Events add-on
- 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
- 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
- attendee_max_per_reg TINYINT NULL, -- Maximum attendees per registration submission - 0 = unlimited
- attendee_count MEDIUMINT NULL, -- Last calculated attendee count
- registration_account_options SMALLINT NULL, -- Bitmap of how user accounts may be used for this event - See registration_account_option in plugin.ini
- payment_methods SMALLINT NULL, -- Bitmap of payment methods available to users for this event - See payment_method in plugin.ini
- restricted_payment_methods SMALLINT NULL, -- Bitmap of restricted (admin use only) payment methods for this event - see payment_method
- terms TEXT NULL, -- Terms and Conditions for registration
- reg_file TINYTEXT NULL, -- Name of a downloadable file
- reg_file_title TINYTEXT NULL, -- Title for downloadable file
- form_revision SMALLINT NULL, -- Current MagicForm form revision
- notes TEXT NULL, -- System operator's notes for this event - Not visible to users
- PRIMARY KEY (id),
- INDEX (event),
- INDEX (event_code(10))
-);
-
-----
-
--- Registration Class - Type of registration for a specific event - Equates to "Rate Options" in the old system
--- One or more for each event
-CREATE TABLE {prefix}reg_class (
- id INT NOT NULL AUTO_INCREMENT,
- reg_event INT NULL, -- Pointer to reg_event table
- name TINYTEXT NULL, -- Name of this registration type
- descr TEXT NULL, -- Description
- PRIMARY KEY (id),
- INDEX (reg_event)
-);
-
-----
-
--- Rates and dates for a particular reg_class
--- One or more per reg_class - **** Days should not overlap for a particular reg_class
-CREATE TABLE {prefix}reg_rates (
- id INT NOT NULL AUTO_INCREMENT,
- reg_event INT NULL, -- Pointer to reg_event table
- reg_class INT NULL, -- Pointer to reg_class table
- start_days INT NULL, -- # of days before event time rate becomes available - may be entered as a date then coverted for storage
- end_days INT NULL, -- # of days before event time rate becomes unavailable
- base_rate FLOAT, -- Base rate to register
- per_registrant FLOAT, -- Rate per registrant
- registrant_credits TINYINT NULL, -- Number of registrants included in base rate
- PRIMARY KEY (id),
- INDEX (reg_event),
- INDEX (reg_class)
-);
-
-----
-
--- An account for a person submitting a registration or a registrant for an event
--- Depending on the use of these entries may not have all data included
--- A single account may be referenced as a person submitting registrations and/or a person registered for an event
-CREATE TABLE {prefix}account (
- id INT NOT NULL AUTO_INCREMENT,
- active BOOLEAN NULL, -- Is active flag (may be accessed or used) - default is true
- registered_by INT NULL, -- Account
- member_id TINYTEXT NULL, -- Free-form field for a member ID (not a GLM Associate member ID)
- fname TINYTEXT NULL, -- Account primary address
- lname TINYTEXT NULL,
- org TINYTEXT NULL,
- title TINYTEXT NULL,
- addr1 TINYTEXT NULL,
- addr2 TINYTEXT NULL,
- city TINYTEXT NULL,
- state TINYTEXT NULL,
- zip TINYTEXT NULL,
- country TINYTEXT NULL,
- phone TINYTEXT NULL,
- fax TINYTEXT NULL,
- bill_fname TINYTEXT NULL, -- Last used billing information - Also stored in each registration request
- bill_lname TINYTEXT NULL,
- bill_org TINYTEXT NULL,
- bill_title TINYTEXT NULL,
- bill_addr1 TINYTEXT NULL,
- bill_addr2 TINYTEXT NULL,
- bill_city TINYTEXT NULL,
- bill_state TINYTEXT NULL,
- bill_zip TINYTEXT NULL,
- bill_country TINYTEXT NULL,
- bill_phone TINYTEXT NULL,
- bill_fax TINYTEXT NULL,
- email TINYTEXT NULL,
- password TINYTEXT NULL, -- Crypted password for login back into this account
- email_ok BOOLEAN NULL,
- is_member BOOLEAN NULL, -- Is a member of the entity that owns the site
- contact_id INT NULL, -- Pointer to GLM Associate member contact record if account is for a member contact
- contact_fname TINYTEXT NULL,
- contact_lname TINYTEXT NULL,
- contact_org TINYTEXT NULL,
- contact_title TINYTEXT NULL,
- contact_addr1 TINYTEXT NULL,
- contact_addr2 TINYTEXT NULL,
- contact_city TINYTEXT NULL,
- contact_state TINYTEXT NULL,
- contact_zip TINYTEXT NULL,
- contact_country TINYTEXT NULL,
- contact_phone TINYTEXT NULL,
- contact_fax TINYTEXT NULL,
- contact_email TINYTEXT NULL,
- contact_email_ok BOOLEAN NULL,
- guardian TINYTEXT NULL,
- emer_contact TINYTEXT NULL,
- emer_phone TINYTEXT NULL,
- med_history TINYTEXT NULL,
- allergy_med TINYTEXT NULL,
- date_created DATE NULL,
- notes TEXT NULL, -- System operator's notes for this account - not visible to account owner
- user_trace_info TINYTEXT NULL, -- IP Address of user computer and timestamp of last update
- PRIMARY KEY (id),
- INDEX (registered_by),
- INDEX (member_id(10)),
- INDEX (fname(10)),
- INDEX (lname(10)),
- INDEX (org(10)),
- INDEX (city(10)),
- INDEX (state(5)),
- INDEX (zip(5)),
- INDEX (email(10)),
- INDEX (contact_id)
-);
-
-----
-
--- A request for registration
--- Has one or more reg_detail records associated with it
-CREATE TABLE {prefix}reg_request (
- id INT NOT NULL AUTO_INCREMENT,
- account INT NULL, -- Pointer to user account (reg_account) who submitted the registrations
- bill_fname TINYTEXT NULL, -- Billing information used for this registration submission - Updates account billing address - Kept here for each request
- bill_lname TINYTEXT NULL,
- bill_org TINYTEXT NULL,
- bill_title TINYTEXT NULL,
- bill_addr1 TINYTEXT NULL,
- bill_addr2 TINYTEXT NULL,
- bill_city TINYTEXT NULL,
- bill_state TINYTEXT NULL,
- bill_zip TINYTEXT NULL,
- bill_country TINYTEXT NULL,
- date_submitted DATE NULL,
- pay_method INT NULL, -- See payment_method in plugin.ini
- payment_code INT NULL, -- Pointer to payment_code - if submitted and validated
- status SMALLINT NULL, -- See submission_status in plugin.ini
- total DOUBLE PRECISION NULL, -- Total charge including all fees and taxes
- cc_type TINYINT NULL, -- Credit Card type (if used) - See credit_card in plugin.ini
- cc_name TINYTEXT NULL,
- cc_numb TINYTEXT NULL,
- cc_exp TINYTEXT NULL,
- cc_cvv TINYTEXT NULL,
- cc_conf TINYTEXT NULL, -- Confirmation code back from card processor
- summary TEXT NULL, -- HTML summary of cart contents, costs and payment - Use same HTML displayed to user
- mf_data TEXT NULL, -- Any MagicForm data associated with registrant
- notes TEXT NULL, -- System operator's notes for this registration request
- user_trace_info TINYTEXT NULL, -- IP Address of user computer and timestamp
- PRIMARY KEY (id),
- INDEX (account),
- INDEX (date_submitted)
-);
-
-----
-
--- Registration for a specific event
--- Has one or more reg_selected_rate records associated with it
-CREATE TABLE {prefix}reg_request_event (
- id INT NOT NULL AUTO_INCREMENT,
- account INT NULL, -- Pointer to account (person submitting the registration)
- reg_request INT NULL, -- Pointer to reg_request table
- event INT NULL, -- Pointer to reg_event
- event_time INT NULL, -- Pointer to event_times table entry in Events add-on
- total_charge FLOAT, -- Last calculated total of all charges for registration to this event for all registrants
- notes TEXT NULL, -- System operator's notes for this registration request
- mf_data TEXT NULL, -- Any MagicForm data associated with requested event
- PRIMARY KEY (id),
- INDEX (reg_request),
- INDEX (account),
- INDEX (event),
- INDEX (event_time)
-);
-
-----
-
--- A particular reg_class selected
--- Has one or more reg_request_rate records associated with it
-CREATE TABLE {prefix}reg_request_class (
- id INT NOT NULL AUTO_INCREMENT,
- account INT NULL, -- Pointer to account (person submitting the registration)
- event INT NULL, -- Pointer to reg_event entry
- event_time INT NULL, -- Pointer to event_times table entry in Events add-on - To help with registrant searches
- reg_request_event INT NULL, -- Pointer to reg_request_event table entry
- total_class_charge FLOAT, -- Last calculated total of all charges for this registration class for this request
- mf_data TEXT NULL, -- Any MagicForm data associated with registrant
- notes TEXT NULL, -- System operator's notes for this registration request
- PRIMARY KEY (id),
- INDEX (account),
- INDEX (event),
- INDEX (event_time),
- INDEX (reg_request_event)
-);
-
-----
-
--- A particular reg_rate selected
--- Has one or more reg_request_registrant records associated with it
-CREATE TABLE {prefix}reg_request_rate (
- id INT NOT NULL AUTO_INCREMENT,
- account INT NULL, -- Pointer to account (person submitting the registration)
- event INT NULL, -- Pointer to reg_event entry
- event_time INT NULL, -- Pointer to event_times table entry in Events add-on - To help with registrant searches
- reg_request_event INT NULL, -- Pointer to reg_request_event table entry
- reg_request_class INT NULL, -- Pointer to reg_request_class table entry
- rate_base FLOAT, -- Base rate at time of registration
- per_registrant FLOAT, -- Per Registrant Rate at time of registration
- registrant_credits TINYINT NULL, -- Number of registrant credits in base rate at time of registration
- numb_registrants TINYINT NULL, -- Last calculated number of registrants with this rate
- total_registrant_charges FLOAT, -- Last calculation registrant charges assoicated with this selected rate
- mf_data TEXT NULL, -- Any MagicForm data associated with registrant
- notes TEXT NULL, -- System operator's notes for this registration request
- PRIMARY KEY (id),
- INDEX (account),
- INDEX (event),
- INDEX (event_time),
- INDEX (reg_request_event),
- INDEX (reg_request_class)
-);
-
-----
-
--- A specific registrant for a selected registration rate
-CREATE TABLE {prefix}reg_request_registrant (
- id INT NOT NULL AUTO_INCREMENT,
- account INT NULL, -- Pointer to account for person submitting the registration
- event INT NULL, -- Pointer to reg_event entry
- event_time INT NULL, -- Pointer to event_times table entry in Events add-on - To help with registrant searches
- reg_request_event INT NULL, -- Pointer to reg_request_event table entry
- reg_request_class INT NULL, -- Pointer to reg_request_class table entry
- reg_request_rate INT NULL, -- Pointer to reg_request_rate table entry
- reg_request_registrant INT NULL, -- Pointer to account for registrant (person attending) - Not needed if registrants are off for the event
- mf_data TEXT NULL, -- Any MagicForm data associated with registrant
- notes TEXT NULL, -- System operator's notes for this registration request
- PRIMARY KEY (id),
- INDEX (account),
- INDEX (event),
- INDEX (event_time),
- INDEX (reg_request_event),
- INDEX (reg_request_class),
- INDEX (reg_request_rate),
- INDEX (reg_request_registrant)
-);
-
-----
-
--- Insert into management table
-INSERT INTO {prefix}management
- (
- canonical_reg_page,
- reg_org_name,
- reg_org_short,
- reg_org_address,
- reg_org_city,
- reg_org_state,
- reg_org_zip,
- reg_org_phone,
- reg_org_toll_free,
- reg_org_internal_email,
- reg_org_from_email,
- reg_payment_methods,
- reg_proc_methods,
- reg_cc_accepts,
- reg_authorize_net_login,
- reg_authorize_net_key,
- reg_authorize_net_test,
- reg_authorize_net_conf,
- reg_authorize_net_merchant_email,
- reg_merchant_solutions_acctid,
- reg_merchant_solutions_merchantpin,
- reg_merchant_solutions_test,
- reg_full_billing_info,
- reg_bill_info_req_no_charge,
- reg_bill_info_req_comp_code,
- reg_bill_info_req_cash,
- reg_bill_info_req_check,
- reg_bill_info_req_credit_card,
- reg_bill_info_req_merchant_call,
- reg_medical_info
- )
- VALUES
- (
- 'registrations', -- reg_canonical_reg_page,
- 'Gaslight Media', -- reg_org_name,
- 'GLM', -- reg_org_short,
- '120 E. Lake St.', -- reg_org_address,
- 'Petoskey', -- reg_org_city,
- 'MI', -- reg_org_state,
- '49770', -- reg_org_zip,
- '231-487-0692', -- reg_org_phone,
- '800-123-1234', -- reg_org_toll_free,
- 'internal@gaslightmedia.com', -- reg_org_internal_email,
- 'info@gaslightmedia.com', -- reg_org_from_email,
- 0, -- reg_payment_methods,
- 0, -- reg_proc_methods,
- 0, -- reg_cc_accepts,
- '', -- reg_authorize_net_login,
- '', -- reg_authorize_net_key,
- 1, -- reg_authorize_net_test,
- true, -- reg_authorize_net_conf
- '', -- reg_authorize_net_merchant_email,
- '', -- reg_merchant_solutions_acctid,
- '', -- reg_merchant_solutions_merchantpin,
- 1, -- reg_merchant_solutions_test,
- true, -- reg_full_billing_info,
- 0, -- reg_bill_info_req_no_charge,
- 0, -- reg_bill_info_req_comp_code,
- 0, -- reg_bill_info_req_cash,
- 0, -- reg_bill_info_req_check,
- 0, -- reg_bill_info_req_credit_card,
- 0, -- reg_bill_info_req_merchant_call,
- true -- reg_medical_info,
- );
-
-----
-
--- Insert into settings_terms table
-INSERT INTO {prefix}settings_terms
- (
- reg_term_registrations_name,
- reg_term_registration,
- reg_term_registration_cap,
- reg_term_registration_plur,
- reg_term_registration_plur_cap,
- reg_term_register,
- reg_term_register_cap,
- reg_term_registers,
- reg_term_registering,
- reg_term_registering_cap,
- reg_term_registered,
- reg_term_registered_cap,
- reg_term_attendee,
- reg_term_attendee_cap,
- reg_term_attendee_plur,
- reg_term_attendee_plur_cap,
- reg_term_attending,
- reg_term_attended,
- reg_term_registered_user,
- reg_term_registered_user_cap,
- reg_term_registered_user_plur,
- reg_term_registered_user_plur_cap,
- reg_term_id,
- reg_term_id_cap,
- reg_term_id_plur,
- reg_term_id_plur_cap,
- reg_term_password,
- reg_term_password_cap,
- reg_term_password_plur,
- reg_term_password_plur_cap,
- reg_term_instructor,
- reg_term_instructor_cap,
- reg_term_instructor_plur,
- reg_term_instructor_plur_cap,
- reg_term_payment_code,
- reg_term_payment_code_cap,
- reg_term_payment_code_plur,
- reg_term_payment_code_plur_cap,
- reg_term_registration_button,
- reg_term_contact_information
- )
- VALUES
- (
- 'Event Registrations', -- reg_term_registrations_name
- 'registration', -- reg_term_registration
- 'Registration', -- reg_term_registration_cap
- 'registrations', -- reg_term_registration_plur
- 'Registrations', -- reg_term_registration_plur_cap
- 'register', -- reg_term_registe
- 'Register', -- reg_term_register_cap
- 'registers', -- reg_term_registers
- 'registering', -- reg_term_registering
- 'Registering', -- reg_term_registering_cap
- 'registered', -- reg_term_registered
- 'Registered', -- reg_term_registered_cap
- 'attendee', -- reg_term_attendee
- 'Attendee', -- reg_term_attendee_cap
- 'attendees', -- reg_term_attendee_plur
- 'Attendees', -- reg_term_attendee_plur_cap
- 'attending', -- reg_term_attending
- 'attended', -- reg_term_attended
- 'user', -- reg_term_registered_user
- 'User', -- reg_term_registered_user_cap
- 'users', -- reg_term_registered_user_plur
- 'Users', -- reg_term_registered_user_plur_cap
- 'ID', -- reg_term_id
- 'ID', -- reg_term_id_cap
- 'IDs', -- reg_term_id_plur
- 'IDs', -- reg_term_id_plur_cap
- 'password', -- reg_term_password
- 'passwords', -- reg_term_password_cap
- 'Password', -- reg_term_password_plur
- 'Passwords', -- reg_term_password_plur_cap
- 'instructor', -- reg_term_instructor
- 'Instructor', -- reg_term_instructor_cap
- 'instructors', -- reg_term_instructor_plur
- 'Instructors', -- reg_term_instructor_plur_cap
- 'payment code', -- reg_term_payment_code
- 'Payment code', -- reg_term_payment_code_cap
- 'payment codes', -- reg_term_payment_code_plur
- 'Payment codes', -- reg_term_payment_code_plur_cap
- 'Register for Event', -- reg_term_registration_button
- 'Contact Information' -- reg_term_contact_information
- );
-
-----
-
--- Insert into misc table
-INSERT INTO {prefix}misc
- (
- reg_bulletin,
- cart_page_text,
- checkout_page_text,
- summary_page_text,
- reg_terms,
- notify_subject,
- notify_text,
- instr_notify_subject,
- instr_notify_text,
- submission_notify_subject,
- submission_notify_text,
- registrant_notify_subject,
- registrant_notify_text,
- submission_ack_subject,
- submission_ack_text,
- registrant_ack_subject,
- registrant_ack_text
- )
- VALUES
- (
- 'Registration Bulletin Text',
- 'Text for top of Cart Page',
- 'Text for top of Checkout Page',
- 'Text for top of Summary Page',
- 'Terms and Conditions',
- 'Subject of notification to site owner of a registration',
- 'Text of notification to site owner of a registration',
- 'Subject of notification to instructor of registration',
- 'Text for notification to instructor of registration',
- 'Subject of notification to person submitting registration',
- 'Text of notification to person submitting registration',
- 'Subject for notification to registrant',
- 'Text for notification to registrant',
- 'Subject of acknowledgement to person submitting registration',
- 'Text of acknowledgement to person submitting registration',
- 'Subject of acknowledgement to registrant',
- 'Text of acknowledgement to registrant'
- );
*/
$glmMembersRegistrationsDbVersions = array(
- '0.0.1' => array('version' => '0.0.1', 'tables' => 18, 'date' => '02/6/2017'),
- '0.0.2' => array('version' => '0.0.2', 'tables' => 18, 'date' => '02/17/2017'),
- '0.0.3' => array('version' => '0.0.3', 'tables' => 18, 'date' => '03/2/2017')
+ '0.0.1' => array('version' => '0.0.1', 'tables' => 18, 'date' => '03/2/2017')
);
+++ /dev/null
--- Gaslight Media Members Database - Events Add-On
--- File Created: 12/09/14 15:27:15
--- Database Version: 0.0.9
--- Database Update From Previous Version Script
---
--- To permit each query below to be executed separately,
--- all queries must be separated by a line with four dashses
-
-
--- Change size of integer for bitmapped field.
-ALTER TABLE {prefix}management MODIFY reg_payment_methods SMALLINT;
-
-----
-
--- Change size of integer for bitmapped field.
-ALTER TABLE {prefix}management MODIFY reg_proc_methods SMALLINT;
-
-----
-
--- Change size of integer for bitmapped field.
-ALTER TABLE {prefix}management MODIFY reg_cc_accepts SMALLINT;
-
-----
-
--- Change size of integer for bitmapped field.
-ALTER TABLE {prefix}management MODIFY reg_bill_info_req_no_charge SMALLINT;
-
-----
-
--- Change size of integer for bitmapped field.
-ALTER TABLE {prefix}management MODIFY reg_bill_info_req_comp_code SMALLINT;
-
-----
-
--- Change size of integer for bitmapped field.
-ALTER TABLE {prefix}management MODIFY reg_bill_info_req_cash SMALLINT;
-
-----
-
--- Change size of integer for bitmapped field.
-ALTER TABLE {prefix}management MODIFY reg_bill_info_req_check SMALLINT;
-
-----
-
--- Change size of integer for bitmapped field.
-ALTER TABLE {prefix}management MODIFY reg_bill_info_req_credit_card SMALLINT;
-
-----
-
--- Change size of integer for bitmapped field.
-ALTER TABLE {prefix}management MODIFY reg_bill_info_req_merchant_call SMALLINT;
-
-----
-
--- Change size of integer for bitmapped field.
-ALTER TABLE {prefix}reg_event MODIFY registration_account_options SMALLINT;
-
-----
-
--- Change size of integer for bitmapped field.
-ALTER TABLE {prefix}reg_event MODIFY payment_methods SMALLINT;
-
-----
-
--- Change size of integer for bitmapped field.
-ALTER TABLE {prefix}reg_event MODIFY restricted_payment_methods SMALLINT;
-
+++ /dev/null
--- Gaslight Media Members Database - Events Add-On
--- File Created: 3/01/17 10:01:16
--- Database Version: 0.0.3
--- Database Update From Previous Version Script
---
--- To permit each query below to be executed separately,
--- all queries must be separated by a line with four dashses
-
-
--- Change size of integer for bitmapped field.
-ALTER TABLE {prefix}management MODIFY numb_registrants TINYINT;
-<!-- Hooks Help for {descrName} with Example
+<!-- Hooks Help from glm-member-db-registrations Add-On -->
- <tr><th colspan="3" class="glm-notice"><p>Sample Add-On</p></th></tr>
-
- <tr><th colspan="3">User Permission Hooks</td></tr>
-
- <tr>
- <td>some_hook_name</td>
- <td>FILTER or ACTION</td>
- <td></td>
- <td>
- What this hook does.
- </td>
- </tr>
-
--->
\ No newline at end of file
+ <tr><th colspan="3" class="glm-notice"><p>Registrations Add-On</p></th></tr>
$glmMembersRegistrationsAddOnValidActions = array(
'adminActions' => array(
'registrations' => array(
- 'index' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG,
- 'list' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG,
- 'accounts' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG,
+ 'index' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG,
+ 'list' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG,
+ 'events' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG,
+ 'accounts' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG,
+ 'requests' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG
),
'management' => array(
- 'registrations' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG,
- 'regterms' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG,
+ 'registrations' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG,
+ 'regterms' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG,
),
'settings' => array(
- 'registrationsPaymentCode' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG,
- 'registrationsMisc' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG,
+ 'registrationsPaymentCode' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG,
+ 'registrationsMisc' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG,
),
),
'frontActions' => array(
+++ /dev/null
-{include file='admin/registrations/header.html'}
-
- <a href="{$thisUrl}?page={$thisPage}&glm_action=accounts"
- class="button button-secondary glm-button glm-right">Return to Account List</a>
-
- {if $option == 'edit' || $option == 'update'}
- <a id="deleteAccountButton" class="button button-secondary glm-button glm-right">Delete this Account</a>
- <div id="deleteAccountDialog" class="glm-dialog-box" title="Delete Account">
- <center>
- <p><a id="deleteAccountCancel" class="button button-primary">Cancel</a></p>
- <p><input id="deleteAccountSubmit" type="submit" value="Delete this contact"></p>
- </center>
- <div class="glm-item-container">
- <p><center><span class="glm-error">WARNING:</span></center></p>
- <p>
- <span class="glm-warning">Clicking the "Delete this Account" button above will
- delete all of the data and images associated with this contact.
- </span>
- </p>
- <p>
- <span class="glm-error">Once deleted, this information will no longer be available and cannot be retrieved!</span>
- </p>
- </div>
- </div>
- <h2>Edit Account
- {else}
- <h2>Add new Account
- {/if}
-
- {if $accountUpdated}<span class="glm-notice glm-flash-updated">Account Updated</span>{/if}
- {if $accountUpdateError}<span class="glm-error glm-flash-updated">Account Update Error</span>{/if}
- {if $accountAdded}<span class="glm-notice glm-flash-updated">Account Added</span>{/if}
- {if $accountAddError}<span class="glm-error glm-flash-updated">Account Add Error</span>{/if}
- </h2>
-
-
- <form action="{$thisUrl}?page={$thisPage}" method="post" id="searchForm">
- <input type="hidden" name="glm_action" value="accounts">
- {if $haveAccount}
- <input type="hidden" name="option" value="update">
- <input type="hidden" name="account" value="{$accountID}">
- {else}
- <input type="hidden" name="option" value="insert">
- {/if}
- <input type="hidden" name="contact_id" value="0">
- <table id="glm-table-account" class="glm-admin-table glm-account-table">
-
- <tr>
- <th {if $account.fieldRequired.date_created} class="glm-required"}{/if}>Date Created</th>
- <td {if $account.fieldFail.date_created}class="glm-form-bad-input" data-tabid="glm-date-created"{/if}>
- {$account.fieldData.date_created.timestamp|date_format:"%D"}
- <input type="hidden" name="date_created" value="{$account.fieldData.date_created.timestamp|date_format:"%D"}">
- {if $account.fieldFail.date_created}<p>{$account.fieldFail.date_created}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.user_trace_info} class="glm-required"}{/if}>User Trace Info</th>
- <td {if $account.fieldFail.user_trace_info}class="glm-form-bad-input" data-tabid="glm-user-trace-info"{/if}>
- {$account.fieldData.user_trace_info}
- {if $account.fieldFail.user_trace_info}<p>{$account.fieldFail.user_trace_info}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.member_id} class="glm-required"}{/if}>Member ID</th>
- <td {if $account.fieldFail.member_id}class="glm-form-bad-input" data-tabid="glm-member-id"{/if}>
- <input type="text" name="member_id" value="{$account.fieldData.member_id}" class="glm-form-text-input-short">
- {if $account.fieldFail.member_id}<p>{$account.fieldFail.member_id}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.active} class="glm-required"}{/if}>Active</th>
- <td {if $account.fieldFail.active}class="glm-form-bad-input" data-tabid="glm-active"{/if}>
- <input type="checkbox" name="active" {if $account.fieldData.active.value} checked{/if}>
- {if $account.fieldFail.active}<p>{$account.fieldFail.active}</p>{/if}<br>
- </td>
- </tr>
-
- <tr><th colspan="2">Information</th></tr>
-
- <tr>
- <th {if $account.fieldRequired.fname} class="glm-required"}{/if}>First Name</th>
- <td {if $account.fieldFail.fname}class="glm-form-bad-input" data-tabid="glm-fname"{/if}>
- <input type="text" name="fname" value="{$account.fieldData.fname}" class="glm-form-text-input-medium">
- {if $account.fieldFail.fname}<p>{$account.fieldFail.fname}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.lname} class="glm-required"}{/if}>Last Name</th>
- <td {if $account.fieldFail.lname}class="glm-form-bad-input" data-tabid="glm-lname"{/if}>
- <input type="text" name="lname" value="{$account.fieldData.lname}" class="glm-form-text-input-medium">
- {if $account.fieldFail.lname}<p>{$account.fieldFail.lname}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.org} class="glm-required"}{/if}>Organization</th>
- <td {if $account.fieldFail.org}class="glm-form-bad-input" data-tabid="glm-org"{/if}>
- <input type="text" name="org" value="{$account.fieldData.org}" class="glm-form-text-input-medium">
- {if $account.fieldFail.org}<p>{$account.fieldFail.org}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.title} class="glm-required"}{/if}>Title</th>
- <td {if $account.fieldFail.title}class="glm-form-bad-input" data-tabid="glm-title"{/if}>
- <input type="text" name="title" value="{$account.fieldData.title}" class="glm-form-text-input-medium">
- {if $account.fieldFail.title}<p>{$account.fieldFail.title}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.addr1} class="glm-required"}{/if}>Address 1</th>
- <td {if $account.fieldFail.addr1}class="glm-form-bad-input" data-tabid="glm-addr1"{/if}>
- <input type="text" name="addr1" value="{$account.fieldData.addr1}" class="glm-form-text-input-medium">
- {if $account.fieldFail.addr1}<p>{$account.fieldFail.addr1}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.addr2} class="glm-required"}{/if}>Address 2</th>
- <td {if $account.fieldFail.addr2}class="glm-form-bad-input" data-tabid="glm-addr2"{/if}>
- <input type="text" name="addr2" value="{$account.fieldData.addr2}" class="glm-form-text-input-medium">
- {if $account.fieldFail.addr2}<p>{$account.fieldFail.addr2}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.city} class="glm-required"}{/if}>City</th>
- <td {if $account.fieldFail.city}class="glm-form-bad-input" data-tabid="glm-city"{/if}>
- <input type="text" name="city" value="{$account.fieldData.city}" class="glm-form-text-input-medium">
- {if $account.fieldFail.city}<p>{$account.fieldFail.city}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.state} class="glm-required"}{/if}>State</th>
- <td {if $account.fieldFail.state}class="glm-form-bad-input" data-tabid="glm-state"{/if}>
- <input type="text" name="state" value="{$account.fieldData.state}" class="glm-form-text-input-medium">
- {if $account.fieldFail.state}<p>{$account.fieldFail.state}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.zip} class="glm-required"}{/if}>ZIP</th>
- <td {if $account.fieldFail.zip}class="glm-form-bad-input" data-tabid="glm-zip"{/if}>
- <input type="text" name="zip" value="{$account.fieldData.zip}" class="glm-form-text-input-medium">
- {if $account.fieldFail.zip}<p>{$account.fieldFail.zip}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.country} class="glm-required"}{/if}>Country</th>
- <td {if $account.fieldFail.country}class="glm-form-bad-input" data-tabid="glm-country"{/if}>
- <input type="text" name="country" value="{$account.fieldData.country}" class="glm-form-text-input-medium">
- {if $account.fieldFail.country}<p>{$account.fieldFail.country}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.phone} class="glm-required"}{/if}>Phone</th>
- <td {if $account.fieldFail.phone}class="glm-form-bad-input" data-tabid="glm-phone"{/if}>
- <input type="text" name="phone" value="{$account.fieldData.phone}" class="glm-form-text-input-medium">
- {if $account.fieldFail.phone}<p>{$account.fieldFail.phone}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.fax} class="glm-required"}{/if}>Fax</th>
- <td {if $account.fieldFail.fax}class="glm-form-bad-input" data-tabid="glm-fax"{/if}>
- <input type="text" name="fax" value="{$account.fieldData.fax}" class="glm-form-text-input-medium">
- {if $account.fieldFail.fax}<p>{$account.fieldFail.fax}</p>{/if}<br>
- </td>
- </tr>
-
- <tr><th colspan="2">Billing Information</th></tr>
-
- <tr>
- <th {if $account.fieldRequired.bill_fname} class="glm-required"}{/if}>First Name</th>
- <td {if $account.fieldFail.bill_fname}class="glm-form-bad-input" data-tabid="glm-bill-fname"{/if}>
- <input type="text" name="bill_fname" value="{$account.fieldData.bill_fname}" class="glm-form-text-input-medium">
- {if $account.fieldFail.bill_fname}<p>{$account.fieldFail.bill_fname}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.bill_lname} class="glm-required"}{/if}>Last Name</th>
- <td {if $account.fieldFail.bill_lname}class="glm-form-bad-input" data-tabid="glm-bill-lname"{/if}>
- <input type="text" name="bill_lname" value="{$account.fieldData.bill_lname}" class="glm-form-text-input-medium">
- {if $account.fieldFail.bill_lname}<p>{$account.fieldFail.bill_lname}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.bill_org} class="glm-required"}{/if}>Organization</th>
- <td {if $account.fieldFail.bill_org}class="glm-form-bad-input" data-tabid="glm-bill-org"{/if}>
- <input type="text" name="bill_org" value="{$account.fieldData.bill_org}" class="glm-form-text-input-medium">
- {if $account.fieldFail.bill_org}<p>{$account.fieldFail.bill_org}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.bill_title} class="glm-required"}{/if}>Title</th>
- <td {if $account.fieldFail.bill_title}class="glm-form-bad-input" data-tabid="glm-bill-title"{/if}>
- <input type="text" name="bill_title" value="{$account.fieldData.bill_title}" class="glm-form-text-input-medium">
- {if $account.fieldFail.bill_title}<p>{$account.fieldFail.bill_title}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.bill_addr1} class="glm-required"}{/if}>Address 1</th>
- <td {if $account.fieldFail.bill_addr1}class="glm-form-bad-input" data-tabid="glm-bill-addr1"{/if}>
- <input type="text" name="bill_addr1" value="{$account.fieldData.bill_addr1}" class="glm-form-text-input-medium">
- {if $account.fieldFail.bill_addr1}<p>{$account.fieldFail.bill_addr1}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.bill_addr2} class="glm-required"}{/if}>Address 2</th>
- <td {if $account.fieldFail.bill_addr2}class="glm-form-bad-input" data-tabid="glm-bill-addr2"{/if}>
- <input type="text" name="bill_addr2" value="{$account.fieldData.bill_addr2}" class="glm-form-text-input-medium">
- {if $account.fieldFail.bill_addr2}<p>{$account.fieldFail.bill_addr2}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.bill_city} class="glm-required"}{/if}>City</th>
- <td {if $account.fieldFail.bill_city}class="glm-form-bad-input" data-tabid="glm-bill-city"{/if}>
- <input type="text" name="bill_city" value="{$account.fieldData.bill_city}" class="glm-form-text-input-medium">
- {if $account.fieldFail.bill_city}<p>{$account.fieldFail.bill_city}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.bill_state} class="glm-required"}{/if}>State</th>
- <td {if $account.fieldFail.bill_state}class="glm-form-bad-input" data-tabid="glm-bill-state"{/if}>
- <input type="text" name="bill_state" value="{$account.fieldData.bill_state}" class="glm-form-text-input-medium">
- {if $account.fieldFail.bill_state}<p>{$account.fieldFail.bill_state}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.bill_zip} class="glm-required"}{/if}>ZIP</th>
- <td {if $account.fieldFail.bill_zip}class="glm-form-bad-input" data-tabid="glm-bill-zip"{/if}>
- <input type="text" name="bill_zip" value="{$account.fieldData.bill_zip}" class="glm-form-text-input-medium">
- {if $account.fieldFail.bill_zip}<p>{$account.fieldFail.bill_zip}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.bill_country} class="glm-required"}{/if}>Country</th>
- <td {if $account.fieldFail.bill_country}class="glm-form-bad-input" data-tabid="glm-bill-country"{/if}>
- <input type="text" name="bill_country" value="{$account.fieldData.bill_country}" class="glm-form-text-input-medium">
- {if $account.fieldFail.bill_country}<p>{$account.fieldFail.bill_country}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.bill_phone} class="glm-required"}{/if}>Phone</th>
- <td {if $account.fieldFail.bill_phone}class="glm-form-bad-input" data-tabid="glm-bill-phone"{/if}>
- <input type="text" name="bill_phone" value="{$account.fieldData.bill_phone}" class="glm-form-text-input-medium">
- {if $account.fieldFail.bill_phone}<p>{$account.fieldFail.bill_phone}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.bill_fax} class="glm-required"}{/if}>Fax</th>
- <td {if $account.fieldFail.bill_fax}class="glm-form-bad-input" data-tabid="glm-bill-fax"{/if}>
- <input type="text" name="bill_fax" value="{$account.fieldData.bill_fax}" class="glm-form-text-input-medium">
- {if $account.fieldFail.bill_fax}<p>{$account.fieldFail.bill_fax}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.email} class="glm-required"}{/if}>Email</th>
- <td {if $account.fieldFail.email}class="glm-form-bad-input" data-tabid="glm-email"{/if}>
- <input type="text" name="email" value="{$account.fieldData.email}" class="glm-form-text-input-medium">
- {if $account.fieldFail.email}<p>{$account.fieldFail.email}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.password} class="glm-required"}{/if}>Login Password</th>
- <td {if $account.fieldFail.password}class="glm-form-bad-input" data-tabid="glm-password"{/if}>
- <input type="text" name="password" value="{$account.fieldData.password}" class="glm-form-text-input-medium" placeholder="{if $option=='create'}(no spaces permitted){else}(Password does not show, only enter to change password.){/if}">
- {if $option == 'create'}
- <span class="glm-notice">Save this password.</span>
- <br>A randomly generated password has been supplied. You may change this as desired.
- There is no way to view a password once it's set. However, a user may recover a password using their
- Email address at the login page.
- {else}
- <br>NOTE: Enter a password here <b><i>only</i></b> if you need to change it.
- {/if}
- <br>The password must be at least 8 characters and include at least one number, one letter, and at least one
- special character. (# . - _ , $ % & !)</b>
- {if $account.fieldFail.password}<p>{$account.fieldFail.password}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.email_ok} class="glm-required"}{/if}>Email OK?</th>
- <td {if $account.fieldFail.email_ok}class="glm-form-bad-input" data-tabid="glm-email-ok"{/if}>
- <input type="checkbox" name="email_ok" {if $account.fieldData.email_ok.value} checked{/if}>
- {if $account.fieldFail.email_ok}<p>{$account.fieldFail.email_ok}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.is_member} class="glm-required"}{/if}>Is Member?</th>
- <td {if $account.fieldFail.is_member}class="glm-form-bad-input" data-tabid="glm-is-member"{/if}>
- <input type="checkbox" name="is_member" {if $account.fieldData.is_member.value} checked{/if}>
- {if $account.fieldFail.is_member}<p>{$account.fieldFail.is_member}</p>{/if}<br>
- </td>
- </tr>
-
- <tr><th colspan="2">Contact Information</th></tr>
-
- <tr>
- <th {if $account.fieldRequired.contact_fname} class="glm-required"}{/if}>First Name</th>
- <td {if $account.fieldFail.contact_fname}class="glm-form-bad-input" data-tabid="glm-contact-fname"{/if}>
- <input type="text" name="contact_fname" value="{$account.fieldData.contact_fname}" class="glm-form-text-input-medium">
- {if $account.fieldFail.contact_fname}<p>{$account.fieldFail.contact_fname}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.contact_lname} class="glm-required"}{/if}>Last Name</th>
- <td {if $account.fieldFail.contact_lname}class="glm-form-bad-input" data-tabid="glm-contact-lname"{/if}>
- <input type="text" name="contact_lname" value="{$account.fieldData.contact_lname}" class="glm-form-text-input-medium">
- {if $account.fieldFail.contact_lname}<p>{$account.fieldFail.contact_lname}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.contact_org} class="glm-required"}{/if}>Organization</th>
- <td {if $account.fieldFail.contact_org}class="glm-form-bad-input" data-tabid="glm-contact-org"{/if}>
- <input type="text" name="contact_org" value="{$account.fieldData.contact_org}" class="glm-form-text-input-medium">
- {if $account.fieldFail.contact_org}<p>{$account.fieldFail.contact_org}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.contact_title} class="glm-required"}{/if}>Title</th>
- <td {if $account.fieldFail.contact_title}class="glm-form-bad-input" data-tabid="glm-contact-title"{/if}>
- <input type="text" name="contact_title" value="{$account.fieldData.contact_title}" class="glm-form-text-input-medium">
- {if $account.fieldFail.contact_title}<p>{$account.fieldFail.contact_title}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.contact_addr1} class="glm-required"}{/if}>Address 1</th>
- <td {if $account.fieldFail.contact_addr1}class="glm-form-bad-input" data-tabid="glm-contact-addr1"{/if}>
- <input type="text" name="contact_addr1" value="{$account.fieldData.contact_addr1}" class="glm-form-text-input-medium">
- {if $account.fieldFail.contact_addr1}<p>{$account.fieldFail.contact_addr1}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.contact_addr2} class="glm-required"}{/if}>Address 2</th>
- <td {if $account.fieldFail.contact_addr2}class="glm-form-bad-input" data-tabid="glm-contact-addr2"{/if}>
- <input type="text" name="contact_addr2" value="{$account.fieldData.contact_addr2}" class="glm-form-text-input-medium">
- {if $account.fieldFail.contact_addr2}<p>{$account.fieldFail.contact_addr2}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.contact_city} class="glm-required"}{/if}>City</th>
- <td {if $account.fieldFail.contact_city}class="glm-form-bad-input" data-tabid="glm-contact-cite"{/if}>
- <input type="text" name="contact_city" value="{$account.fieldData.contact_city}" class="glm-form-text-input-medium">
- {if $account.fieldFail.contact_city}<p>{$account.fieldFail.contact_city}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.contact_state} class="glm-required"}{/if}>State</th>
- <td {if $account.fieldFail.contact_state}class="glm-form-bad-input" data-tabid="glm-contact-state"{/if}>
- <input type="text" name="contact_state" value="{$account.fieldData.contact_state}" class="glm-form-text-input-medium">
- {if $account.fieldFail.contact_state}<p>{$account.fieldFail.contact_state}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.contact_zip} class="glm-required"}{/if}>ZIP</th>
- <td {if $account.fieldFail.contact_zip}class="glm-form-bad-input" data-tabid="glm-contact-zip"{/if}>
- <input type="text" name="contact_zip" value="{$account.fieldData.contact_zip}" class="glm-form-text-input-medium">
- {if $account.fieldFail.contact_zip}<p>{$account.fieldFail.contact_zip}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.contact_country} class="glm-required"}{/if}>Country</th>
- <td {if $account.fieldFail.contact_country}class="glm-form-bad-input" data-tabid="glm-contact-country"{/if}>
- <input type="text" name="contact_country" value="{$account.fieldData.contact_country}" class="glm-form-text-input-medium">
- {if $account.fieldFail.contact_country}<p>{$account.fieldFail.contact_country}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.contact_phone} class="glm-required"}{/if}>Contact Phone</th>
- <td {if $account.fieldFail.contact_phone}class="glm-form-bad-input" data-tabid="glm-contact-phone"{/if}>
- <input type="text" name="contact_phone" value="{$account.fieldData.contact_phone}" class="glm-form-text-input-medium">
- {if $account.fieldFail.contact_phone}<p>{$account.fieldFail.contact_phone}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.contact_fax} class="glm-required"}{/if}>Contact Fax</th>
- <td {if $account.fieldFail.contact_fax}class="glm-form-bad-input" data-tabid="glm-contact-fax"{/if}>
- <input type="text" name="contact_fax" value="{$account.fieldData.contact_fax}" class="glm-form-text-input-medium">
- {if $account.fieldFail.contact_fax}<p>{$account.fieldFail.contact_fax}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.contact_email} class="glm-required"}{/if}>Contact Email</th>
- <td {if $account.fieldFail.contact_email}class="glm-form-bad-input" data-tabid="glm-contact-email"{/if}>
- <input type="text" name="contact_email" value="{$account.fieldData.contact_email}" class="glm-form-text-input-medium">
- {if $account.fieldFail.contact_email}<p>{$account.fieldFail.contact_email}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.contact_email_ok} class="glm-required"}{/if}>Contact Email OK?</th>
- <td {if $account.fieldFail.contact_email_ok}class="glm-form-bad-input" data-tabid="glm-contact-email-ok"{/if}>
- <input type="checkbox" name="contact_email_ok" {if $account.fieldData.contact_email_ok.value} checked{/if}>
- {if $account.fieldFail.contact_email_ok}<p>{$account.fieldFail.contact_email_ok}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.guardian} class="glm-required"}{/if}>Guardian</th>
- <td {if $account.fieldFail.guardian}class="glm-form-bad-input" data-tabid="glm-guardian"{/if}>
- <input type="text" name="guardian" value="{$account.fieldData.guardian}" class="glm-form-text-input-medium">
- {if $account.fieldFail.guardian}<p>{$account.fieldFail.guardian}</p>{/if}<br>
- </td>
- </tr>
-
- <tr><th colspan="2">Emergency Contact Information</th></tr>
-
-
- <tr>
- <th {if $account.fieldRequired.emer_contact} class="glm-required"}{/if}>Emergency Contact</th>
- <td {if $account.fieldFail.emer_contact}class="glm-form-bad-input" data-tabid="glm-emer-contact"{/if}>
- <input type="text" name="emer_contact" value="{$account.fieldData.emer_contact}" class="glm-form-text-input-medium">
- {if $account.fieldFail.emer_contact}<p>{$account.fieldFail.emer_contact}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.emer_phone} class="glm-required"}{/if}>Emergency Phone</th>
- <td {if $account.fieldFail.emer_phone}class="glm-form-bad-input" data-tabid="glm-emer-phone"{/if}>
- <input type="text" name="emer_phone" value="{$account.fieldData.emer_phone}" class="glm-form-text-input-medium">
- {if $account.fieldFail.emer_phone}<p>{$account.fieldFail.emer_phone}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.med_history} class="glm-required"}{/if}>Medical History</th>
- <td {if $account.fieldFail.med_history}class="glm-form-bad-input" data-tabid="glm-med-history"{/if}>
- <input type="text" name="med_history" value="{$account.fieldData.med_history}" class="glm-form-text-input-medium">
- {if $account.fieldFail.med_history}<p>{$account.fieldFail.med_history}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.allergy_med} class="glm-required"}{/if}>Allergy Medication</th>
- <td {if $account.fieldFail.allergy_med}class="glm-form-bad-input" data-tabid="glm-allergy-med"{/if}>
- <input type="text" name="allergy_med" value="{$account.fieldData.allergy_med}" class="glm-form-text-input-medium">
- {if $account.fieldFail.allergy_med}<p>{$account.fieldFail.allergy_med}</p>{/if}<br>
- </td>
- </tr>
-
- <tr>
- <th {if $account.fieldRequired.notes} class="glm-required"}{/if}>Notes</th>
- <td {if $account.fieldFail.notes}class="glm-form-bad-input" data-tabid="glm-notes"{/if}>
- <textarea name="notes" class="glm-form-textarea">{$account.fieldData.notes}</textarea>
- {if $account.fieldFail.notes}
- <p>{$account.fieldFail.notes}</p>
- {/if}<br>
- </td>
- </tr>
-
- </table>
-
- <input id="updateAccount" type="submit" value="{if $haveAccount}Update Account{else}Save New Account{/if}">
-
- </form>
- <script>
- jQuery(document).ready(function($) {
-
- // Delete Account dialog
- $("#deleteAccountDialog").dialog({
- autoOpen: false,
- minWidth: 400,
- dialogClass: "glm-dialog-no-close"
- });
- $('#deleteAccountButton').click( function() {
- $('#deleteAccountDialog').dialog('open');
- });
- $('#deleteAccountCancel').click( function() {
- $("#deleteAccountDialog").dialog("close");
- });
- $('#deleteAccountSubmit').click( function() {
- window.location.replace("{$thisUrl}?page={$thisPage}&glm_action=accounts&option=delete&account={$account.fieldData.id}");
- });
-
- $(".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'}
+
+ <a href="{$thisUrl}?page={$thisPage}&glm_action=accounts"
+ class="button button-secondary glm-button glm-right">Return to Account List</a>
+
+ {if $option == 'edit' || $option == 'update'}
+ <a id="deleteAccountButton" class="button button-secondary glm-button glm-right">Delete this Account</a>
+ <div id="deleteAccountDialog" class="glm-dialog-box" title="Delete Account">
+ <center>
+ <p><a id="deleteAccountCancel" class="button button-primary">Cancel</a></p>
+ <p><input id="deleteAccountSubmit" type="submit" value="Delete this contact"></p>
+ </center>
+ <div class="glm-item-container">
+ <p><center><span class="glm-error">WARNING:</span></center></p>
+ <p>
+ <span class="glm-warning">Clicking the "Delete this Account" button above will
+ delete all of the data and images associated with this contact.
+ </span>
+ </p>
+ <p>
+ <span class="glm-error">Once deleted, this information will no longer be available and cannot be retrieved!</span>
+ </p>
+ </div>
+ </div>
+ <h2>Edit Account
+ {else}
+ <h2>Add new Account
+ {/if}
+
+ {if $accountUpdated}<span class="glm-notice glm-flash-updated">Account Updated</span>{/if}
+ {if $accountUpdateError}<span class="glm-error glm-flash-updated">Account Update Error</span>{/if}
+ {if $accountAdded}<span class="glm-notice glm-flash-updated">Account Added</span>{/if}
+ {if $accountAddError}<span class="glm-error glm-flash-updated">Account Add Error</span>{/if}
+ </h2>
+
+
+ <form action="{$thisUrl}?page={$thisPage}" method="post" id="searchForm">
+ <input type="hidden" name="glm_action" value="accounts">
+ {if $haveAccount}
+ <input type="hidden" name="option" value="update">
+ <input type="hidden" name="account" value="{$accountID}">
+ {else}
+ <input type="hidden" name="option" value="insert">
+ {/if}
+ <input type="hidden" name="contact_id" value="0">
+ <table id="glm-table-account" class="glm-admin-table glm-account-table">
+
+ <tr>
+ <th {if $account.fieldRequired.date_created} class="glm-required"}{/if}>Date Created</th>
+ <td {if $account.fieldFail.date_created}class="glm-form-bad-input" data-tabid="glm-date-created"{/if}>
+ {$account.fieldData.date_created.timestamp|date_format:"%D"}
+ <input type="hidden" name="date_created" value="{$account.fieldData.date_created.timestamp|date_format:"%D"}">
+ {if $account.fieldFail.date_created}<p>{$account.fieldFail.date_created}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.user_trace_info} class="glm-required"}{/if}>User Trace Info</th>
+ <td {if $account.fieldFail.user_trace_info}class="glm-form-bad-input" data-tabid="glm-user-trace-info"{/if}>
+ {$account.fieldData.user_trace_info}
+ {if $account.fieldFail.user_trace_info}<p>{$account.fieldFail.user_trace_info}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.member_id} class="glm-required"}{/if}>Member ID</th>
+ <td {if $account.fieldFail.member_id}class="glm-form-bad-input" data-tabid="glm-member-id"{/if}>
+ <input type="text" name="member_id" value="{$account.fieldData.member_id}" class="glm-form-text-input-short">
+ {if $account.fieldFail.member_id}<p>{$account.fieldFail.member_id}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.active} class="glm-required"}{/if}>Active</th>
+ <td {if $account.fieldFail.active}class="glm-form-bad-input" data-tabid="glm-active"{/if}>
+ <input type="checkbox" name="active" {if $account.fieldData.active.value} checked{/if}>
+ {if $account.fieldFail.active}<p>{$account.fieldFail.active}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr><th colspan="2">Information</th></tr>
+
+ <tr>
+ <th {if $account.fieldRequired.fname} class="glm-required"}{/if}>First Name</th>
+ <td {if $account.fieldFail.fname}class="glm-form-bad-input" data-tabid="glm-fname"{/if}>
+ <input type="text" name="fname" value="{$account.fieldData.fname}" class="glm-form-text-input-medium">
+ {if $account.fieldFail.fname}<p>{$account.fieldFail.fname}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.lname} class="glm-required"}{/if}>Last Name</th>
+ <td {if $account.fieldFail.lname}class="glm-form-bad-input" data-tabid="glm-lname"{/if}>
+ <input type="text" name="lname" value="{$account.fieldData.lname}" class="glm-form-text-input-medium">
+ {if $account.fieldFail.lname}<p>{$account.fieldFail.lname}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.org} class="glm-required"}{/if}>Organization</th>
+ <td {if $account.fieldFail.org}class="glm-form-bad-input" data-tabid="glm-org"{/if}>
+ <input type="text" name="org" value="{$account.fieldData.org}" class="glm-form-text-input-medium">
+ {if $account.fieldFail.org}<p>{$account.fieldFail.org}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.title} class="glm-required"}{/if}>Title</th>
+ <td {if $account.fieldFail.title}class="glm-form-bad-input" data-tabid="glm-title"{/if}>
+ <input type="text" name="title" value="{$account.fieldData.title}" class="glm-form-text-input-medium">
+ {if $account.fieldFail.title}<p>{$account.fieldFail.title}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.addr1} class="glm-required"}{/if}>Address 1</th>
+ <td {if $account.fieldFail.addr1}class="glm-form-bad-input" data-tabid="glm-addr1"{/if}>
+ <input type="text" name="addr1" value="{$account.fieldData.addr1}" class="glm-form-text-input-medium">
+ {if $account.fieldFail.addr1}<p>{$account.fieldFail.addr1}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.addr2} class="glm-required"}{/if}>Address 2</th>
+ <td {if $account.fieldFail.addr2}class="glm-form-bad-input" data-tabid="glm-addr2"{/if}>
+ <input type="text" name="addr2" value="{$account.fieldData.addr2}" class="glm-form-text-input-medium">
+ {if $account.fieldFail.addr2}<p>{$account.fieldFail.addr2}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.city} class="glm-required"}{/if}>City</th>
+ <td {if $account.fieldFail.city}class="glm-form-bad-input" data-tabid="glm-city"{/if}>
+ <input type="text" name="city" value="{$account.fieldData.city}" class="glm-form-text-input-medium">
+ {if $account.fieldFail.city}<p>{$account.fieldFail.city}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.state} class="glm-required"}{/if}>State</th>
+ <td {if $account.fieldFail.state}class="glm-form-bad-input" data-tabid="glm-state"{/if}>
+ <input type="text" name="state" value="{$account.fieldData.state}" class="glm-form-text-input-medium">
+ {if $account.fieldFail.state}<p>{$account.fieldFail.state}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.zip} class="glm-required"}{/if}>ZIP</th>
+ <td {if $account.fieldFail.zip}class="glm-form-bad-input" data-tabid="glm-zip"{/if}>
+ <input type="text" name="zip" value="{$account.fieldData.zip}" class="glm-form-text-input-medium">
+ {if $account.fieldFail.zip}<p>{$account.fieldFail.zip}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.country} class="glm-required"}{/if}>Country</th>
+ <td {if $account.fieldFail.country}class="glm-form-bad-input" data-tabid="glm-country"{/if}>
+ <input type="text" name="country" value="{$account.fieldData.country}" class="glm-form-text-input-medium">
+ {if $account.fieldFail.country}<p>{$account.fieldFail.country}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.phone} class="glm-required"}{/if}>Phone</th>
+ <td {if $account.fieldFail.phone}class="glm-form-bad-input" data-tabid="glm-phone"{/if}>
+ <input type="text" name="phone" value="{$account.fieldData.phone}" class="glm-form-text-input-medium">
+ {if $account.fieldFail.phone}<p>{$account.fieldFail.phone}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.fax} class="glm-required"}{/if}>Fax</th>
+ <td {if $account.fieldFail.fax}class="glm-form-bad-input" data-tabid="glm-fax"{/if}>
+ <input type="text" name="fax" value="{$account.fieldData.fax}" class="glm-form-text-input-medium">
+ {if $account.fieldFail.fax}<p>{$account.fieldFail.fax}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr><th colspan="2">Billing Information</th></tr>
+
+ <tr>
+ <th {if $account.fieldRequired.bill_fname} class="glm-required"}{/if}>First Name</th>
+ <td {if $account.fieldFail.bill_fname}class="glm-form-bad-input" data-tabid="glm-bill-fname"{/if}>
+ <input type="text" name="bill_fname" value="{$account.fieldData.bill_fname}" class="glm-form-text-input-medium">
+ {if $account.fieldFail.bill_fname}<p>{$account.fieldFail.bill_fname}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.bill_lname} class="glm-required"}{/if}>Last Name</th>
+ <td {if $account.fieldFail.bill_lname}class="glm-form-bad-input" data-tabid="glm-bill-lname"{/if}>
+ <input type="text" name="bill_lname" value="{$account.fieldData.bill_lname}" class="glm-form-text-input-medium">
+ {if $account.fieldFail.bill_lname}<p>{$account.fieldFail.bill_lname}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.bill_org} class="glm-required"}{/if}>Organization</th>
+ <td {if $account.fieldFail.bill_org}class="glm-form-bad-input" data-tabid="glm-bill-org"{/if}>
+ <input type="text" name="bill_org" value="{$account.fieldData.bill_org}" class="glm-form-text-input-medium">
+ {if $account.fieldFail.bill_org}<p>{$account.fieldFail.bill_org}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.bill_title} class="glm-required"}{/if}>Title</th>
+ <td {if $account.fieldFail.bill_title}class="glm-form-bad-input" data-tabid="glm-bill-title"{/if}>
+ <input type="text" name="bill_title" value="{$account.fieldData.bill_title}" class="glm-form-text-input-medium">
+ {if $account.fieldFail.bill_title}<p>{$account.fieldFail.bill_title}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.bill_addr1} class="glm-required"}{/if}>Address 1</th>
+ <td {if $account.fieldFail.bill_addr1}class="glm-form-bad-input" data-tabid="glm-bill-addr1"{/if}>
+ <input type="text" name="bill_addr1" value="{$account.fieldData.bill_addr1}" class="glm-form-text-input-medium">
+ {if $account.fieldFail.bill_addr1}<p>{$account.fieldFail.bill_addr1}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.bill_addr2} class="glm-required"}{/if}>Address 2</th>
+ <td {if $account.fieldFail.bill_addr2}class="glm-form-bad-input" data-tabid="glm-bill-addr2"{/if}>
+ <input type="text" name="bill_addr2" value="{$account.fieldData.bill_addr2}" class="glm-form-text-input-medium">
+ {if $account.fieldFail.bill_addr2}<p>{$account.fieldFail.bill_addr2}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.bill_city} class="glm-required"}{/if}>City</th>
+ <td {if $account.fieldFail.bill_city}class="glm-form-bad-input" data-tabid="glm-bill-city"{/if}>
+ <input type="text" name="bill_city" value="{$account.fieldData.bill_city}" class="glm-form-text-input-medium">
+ {if $account.fieldFail.bill_city}<p>{$account.fieldFail.bill_city}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.bill_state} class="glm-required"}{/if}>State</th>
+ <td {if $account.fieldFail.bill_state}class="glm-form-bad-input" data-tabid="glm-bill-state"{/if}>
+ <input type="text" name="bill_state" value="{$account.fieldData.bill_state}" class="glm-form-text-input-medium">
+ {if $account.fieldFail.bill_state}<p>{$account.fieldFail.bill_state}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.bill_zip} class="glm-required"}{/if}>ZIP</th>
+ <td {if $account.fieldFail.bill_zip}class="glm-form-bad-input" data-tabid="glm-bill-zip"{/if}>
+ <input type="text" name="bill_zip" value="{$account.fieldData.bill_zip}" class="glm-form-text-input-medium">
+ {if $account.fieldFail.bill_zip}<p>{$account.fieldFail.bill_zip}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.bill_country} class="glm-required"}{/if}>Country</th>
+ <td {if $account.fieldFail.bill_country}class="glm-form-bad-input" data-tabid="glm-bill-country"{/if}>
+ <input type="text" name="bill_country" value="{$account.fieldData.bill_country}" class="glm-form-text-input-medium">
+ {if $account.fieldFail.bill_country}<p>{$account.fieldFail.bill_country}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.bill_phone} class="glm-required"}{/if}>Phone</th>
+ <td {if $account.fieldFail.bill_phone}class="glm-form-bad-input" data-tabid="glm-bill-phone"{/if}>
+ <input type="text" name="bill_phone" value="{$account.fieldData.bill_phone}" class="glm-form-text-input-medium">
+ {if $account.fieldFail.bill_phone}<p>{$account.fieldFail.bill_phone}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.bill_fax} class="glm-required"}{/if}>Fax</th>
+ <td {if $account.fieldFail.bill_fax}class="glm-form-bad-input" data-tabid="glm-bill-fax"{/if}>
+ <input type="text" name="bill_fax" value="{$account.fieldData.bill_fax}" class="glm-form-text-input-medium">
+ {if $account.fieldFail.bill_fax}<p>{$account.fieldFail.bill_fax}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.email} class="glm-required"}{/if}>Email</th>
+ <td {if $account.fieldFail.email}class="glm-form-bad-input" data-tabid="glm-email"{/if}>
+ <input type="text" name="email" value="{$account.fieldData.email}" class="glm-form-text-input-medium">
+ {if $account.fieldFail.email}<p>{$account.fieldFail.email}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.password} class="glm-required"}{/if}>Login Password</th>
+ <td {if $account.fieldFail.password}class="glm-form-bad-input" data-tabid="glm-password"{/if}>
+ <input type="text" name="password" value="{$account.fieldData.password}" class="glm-form-text-input-medium" placeholder="{if $option=='create'}(no spaces permitted){else}(Password does not show, only enter to change password.){/if}">
+ {if $option == 'create'}
+ <span class="glm-notice">Save this password.</span>
+ <br>A randomly generated password has been supplied. You may change this as desired.
+ There is no way to view a password once it's set. However, a user may recover a password using their
+ Email address at the login page.
+ {else}
+ <br>NOTE: Enter a password here <b><i>only</i></b> if you need to change it.
+ {/if}
+ <br>The password must be at least 8 characters and include at least one number, one letter, and at least one
+ special character. (# . - _ , $ % & !)</b>
+ {if $account.fieldFail.password}<p>{$account.fieldFail.password}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.email_ok} class="glm-required"}{/if}>Email OK?</th>
+ <td {if $account.fieldFail.email_ok}class="glm-form-bad-input" data-tabid="glm-email-ok"{/if}>
+ <input type="checkbox" name="email_ok" {if $account.fieldData.email_ok.value} checked{/if}>
+ {if $account.fieldFail.email_ok}<p>{$account.fieldFail.email_ok}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.is_member} class="glm-required"}{/if}>Is Member?</th>
+ <td {if $account.fieldFail.is_member}class="glm-form-bad-input" data-tabid="glm-is-member"{/if}>
+ <input type="checkbox" name="is_member" {if $account.fieldData.is_member.value} checked{/if}>
+ {if $account.fieldFail.is_member}<p>{$account.fieldFail.is_member}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr><th colspan="2">Contact Information</th></tr>
+
+ <tr>
+ <th {if $account.fieldRequired.contact_fname} class="glm-required"}{/if}>First Name</th>
+ <td {if $account.fieldFail.contact_fname}class="glm-form-bad-input" data-tabid="glm-contact-fname"{/if}>
+ <input type="text" name="contact_fname" value="{$account.fieldData.contact_fname}" class="glm-form-text-input-medium">
+ {if $account.fieldFail.contact_fname}<p>{$account.fieldFail.contact_fname}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.contact_lname} class="glm-required"}{/if}>Last Name</th>
+ <td {if $account.fieldFail.contact_lname}class="glm-form-bad-input" data-tabid="glm-contact-lname"{/if}>
+ <input type="text" name="contact_lname" value="{$account.fieldData.contact_lname}" class="glm-form-text-input-medium">
+ {if $account.fieldFail.contact_lname}<p>{$account.fieldFail.contact_lname}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.contact_org} class="glm-required"}{/if}>Organization</th>
+ <td {if $account.fieldFail.contact_org}class="glm-form-bad-input" data-tabid="glm-contact-org"{/if}>
+ <input type="text" name="contact_org" value="{$account.fieldData.contact_org}" class="glm-form-text-input-medium">
+ {if $account.fieldFail.contact_org}<p>{$account.fieldFail.contact_org}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.contact_title} class="glm-required"}{/if}>Title</th>
+ <td {if $account.fieldFail.contact_title}class="glm-form-bad-input" data-tabid="glm-contact-title"{/if}>
+ <input type="text" name="contact_title" value="{$account.fieldData.contact_title}" class="glm-form-text-input-medium">
+ {if $account.fieldFail.contact_title}<p>{$account.fieldFail.contact_title}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.contact_addr1} class="glm-required"}{/if}>Address 1</th>
+ <td {if $account.fieldFail.contact_addr1}class="glm-form-bad-input" data-tabid="glm-contact-addr1"{/if}>
+ <input type="text" name="contact_addr1" value="{$account.fieldData.contact_addr1}" class="glm-form-text-input-medium">
+ {if $account.fieldFail.contact_addr1}<p>{$account.fieldFail.contact_addr1}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.contact_addr2} class="glm-required"}{/if}>Address 2</th>
+ <td {if $account.fieldFail.contact_addr2}class="glm-form-bad-input" data-tabid="glm-contact-addr2"{/if}>
+ <input type="text" name="contact_addr2" value="{$account.fieldData.contact_addr2}" class="glm-form-text-input-medium">
+ {if $account.fieldFail.contact_addr2}<p>{$account.fieldFail.contact_addr2}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.contact_city} class="glm-required"}{/if}>City</th>
+ <td {if $account.fieldFail.contact_city}class="glm-form-bad-input" data-tabid="glm-contact-cite"{/if}>
+ <input type="text" name="contact_city" value="{$account.fieldData.contact_city}" class="glm-form-text-input-medium">
+ {if $account.fieldFail.contact_city}<p>{$account.fieldFail.contact_city}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.contact_state} class="glm-required"}{/if}>State</th>
+ <td {if $account.fieldFail.contact_state}class="glm-form-bad-input" data-tabid="glm-contact-state"{/if}>
+ <input type="text" name="contact_state" value="{$account.fieldData.contact_state}" class="glm-form-text-input-medium">
+ {if $account.fieldFail.contact_state}<p>{$account.fieldFail.contact_state}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.contact_zip} class="glm-required"}{/if}>ZIP</th>
+ <td {if $account.fieldFail.contact_zip}class="glm-form-bad-input" data-tabid="glm-contact-zip"{/if}>
+ <input type="text" name="contact_zip" value="{$account.fieldData.contact_zip}" class="glm-form-text-input-medium">
+ {if $account.fieldFail.contact_zip}<p>{$account.fieldFail.contact_zip}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.contact_country} class="glm-required"}{/if}>Country</th>
+ <td {if $account.fieldFail.contact_country}class="glm-form-bad-input" data-tabid="glm-contact-country"{/if}>
+ <input type="text" name="contact_country" value="{$account.fieldData.contact_country}" class="glm-form-text-input-medium">
+ {if $account.fieldFail.contact_country}<p>{$account.fieldFail.contact_country}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.contact_phone} class="glm-required"}{/if}>Contact Phone</th>
+ <td {if $account.fieldFail.contact_phone}class="glm-form-bad-input" data-tabid="glm-contact-phone"{/if}>
+ <input type="text" name="contact_phone" value="{$account.fieldData.contact_phone}" class="glm-form-text-input-medium">
+ {if $account.fieldFail.contact_phone}<p>{$account.fieldFail.contact_phone}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.contact_fax} class="glm-required"}{/if}>Contact Fax</th>
+ <td {if $account.fieldFail.contact_fax}class="glm-form-bad-input" data-tabid="glm-contact-fax"{/if}>
+ <input type="text" name="contact_fax" value="{$account.fieldData.contact_fax}" class="glm-form-text-input-medium">
+ {if $account.fieldFail.contact_fax}<p>{$account.fieldFail.contact_fax}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.contact_email} class="glm-required"}{/if}>Contact Email</th>
+ <td {if $account.fieldFail.contact_email}class="glm-form-bad-input" data-tabid="glm-contact-email"{/if}>
+ <input type="text" name="contact_email" value="{$account.fieldData.contact_email}" class="glm-form-text-input-medium">
+ {if $account.fieldFail.contact_email}<p>{$account.fieldFail.contact_email}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.contact_email_ok} class="glm-required"}{/if}>Contact Email OK?</th>
+ <td {if $account.fieldFail.contact_email_ok}class="glm-form-bad-input" data-tabid="glm-contact-email-ok"{/if}>
+ <input type="checkbox" name="contact_email_ok" {if $account.fieldData.contact_email_ok.value} checked{/if}>
+ {if $account.fieldFail.contact_email_ok}<p>{$account.fieldFail.contact_email_ok}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.guardian} class="glm-required"}{/if}>Guardian</th>
+ <td {if $account.fieldFail.guardian}class="glm-form-bad-input" data-tabid="glm-guardian"{/if}>
+ <input type="text" name="guardian" value="{$account.fieldData.guardian}" class="glm-form-text-input-medium">
+ {if $account.fieldFail.guardian}<p>{$account.fieldFail.guardian}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr><th colspan="2">Emergency Contact Information</th></tr>
+
+
+ <tr>
+ <th {if $account.fieldRequired.emer_contact} class="glm-required"}{/if}>Emergency Contact</th>
+ <td {if $account.fieldFail.emer_contact}class="glm-form-bad-input" data-tabid="glm-emer-contact"{/if}>
+ <input type="text" name="emer_contact" value="{$account.fieldData.emer_contact}" class="glm-form-text-input-medium">
+ {if $account.fieldFail.emer_contact}<p>{$account.fieldFail.emer_contact}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.emer_phone} class="glm-required"}{/if}>Emergency Phone</th>
+ <td {if $account.fieldFail.emer_phone}class="glm-form-bad-input" data-tabid="glm-emer-phone"{/if}>
+ <input type="text" name="emer_phone" value="{$account.fieldData.emer_phone}" class="glm-form-text-input-medium">
+ {if $account.fieldFail.emer_phone}<p>{$account.fieldFail.emer_phone}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.med_history} class="glm-required"}{/if}>Medical History</th>
+ <td {if $account.fieldFail.med_history}class="glm-form-bad-input" data-tabid="glm-med-history"{/if}>
+ <input type="text" name="med_history" value="{$account.fieldData.med_history}" class="glm-form-text-input-medium">
+ {if $account.fieldFail.med_history}<p>{$account.fieldFail.med_history}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.allergy_med} class="glm-required"}{/if}>Allergy Medication</th>
+ <td {if $account.fieldFail.allergy_med}class="glm-form-bad-input" data-tabid="glm-allergy-med"{/if}>
+ <input type="text" name="allergy_med" value="{$account.fieldData.allergy_med}" class="glm-form-text-input-medium">
+ {if $account.fieldFail.allergy_med}<p>{$account.fieldFail.allergy_med}</p>{/if}<br>
+ </td>
+ </tr>
+
+ <tr>
+ <th {if $account.fieldRequired.notes} class="glm-required"}{/if}>Notes</th>
+ <td {if $account.fieldFail.notes}class="glm-form-bad-input" data-tabid="glm-notes"{/if}>
+ <textarea name="notes" class="glm-form-textarea">{$account.fieldData.notes}</textarea>
+ {if $account.fieldFail.notes}
+ <p>{$account.fieldFail.notes}</p>
+ {/if}<br>
+ </td>
+ </tr>
+
+ </table>
+
+ <input id="updateAccount" type="submit" value="{if $haveAccount}Update Account{else}Save New Account{/if}">
+
+ </form>
+ <script>
+ jQuery(document).ready(function($) {
+
+ // Delete Account dialog
+ $("#deleteAccountDialog").dialog({
+ autoOpen: false,
+ minWidth: 400,
+ dialogClass: "glm-dialog-no-close"
+ });
+ $('#deleteAccountButton').click( function() {
+ $('#deleteAccountDialog').dialog('open');
+ });
+ $('#deleteAccountCancel').click( function() {
+ $("#deleteAccountDialog").dialog("close");
+ });
+ $('#deleteAccountSubmit').click( function() {
+ window.location.replace("{$thisUrl}?page={$thisPage}&glm_action=accounts&option=delete&account={$account.fieldData.id}");
+ });
+
+ $(".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
+
+<h3>Registration Request</h3>
+
+<p>Person submitting the registration: {$requestCart.request.bill_fname} (ID = {$requestCart.request.id})</p>
+
+<p>
+Info in registration request:
+{if $requestCart.request.account}
+ {$requestCart.accounts.{$requestCart.request.account}.fname}
+{else}
+ (No account)
+{/if}
+
+
+</p>
+
+<p>Info from account of person who submitted the registration</p>
+
+<p>Events selected:</p>
+
+
+
+{include file='admin/footer.html'}
+
+<pre>{$cart_r}</pre>
--- /dev/null
+{include file='admin/registrations/header.html'}
+
+<h3>Registrations Events List</h3>
+
+{include file='admin/footer.html'}
+
<div class="wrap">
- <h2>All Events</h2>
+ <h2>Event Registrations</h2>
<h2 class="nav-tab-wrapper">
- <a href="{$thisUrl}?page={$thisPage}&glm_action=index" class="nav-tab{if $thisAction==index} nav-tab-active{/if}">Dashboard</a>
- <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-list&aoption=list" class="nav-tab{if $thisAction==list} nav-tab-active{/if}">Registration Events List</a>
+ <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-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">
{include file='admin/registrations/header.html'}
-<h3>Registrations Index Page</h3>
+<h3>Registrations Dashboard</h3>
{include file='admin/footer.html'}
+++ /dev/null
-{include file='admin/registrations/header.html'}
-
-<h3>Registrations List Page</h3>
-
-{include file='admin/footer.html'}
-
--- /dev/null
+{include file='admin/registrations/header.html'}
+
+{if $errorMsg}
+ <h3 class="glm-error">{$errorMsg}</h3>
+{/if}
+
+<h3>Registrations Requests List</h3>
+
+ <table class="wp-list-table striped glm-admin-table">
+ <thead>
+ <tr>
+ <th>ID</th>
+ <th>First Name</th>
+ <th>Last Name</th>
+ <th>Org</th>
+ <th>City</th>
+ <th>State</th>
+ </tr>
+ </thead>
+ <tbody>
+ {if $haveRequests}
+ {foreach $requests as $r}
+ <tr>
+ <td><a href="{$thisUrl}?page=glm-members-admin-menu-registrations-requests&option=edit&requestID={$r.id}">{$r.id}</a></td>
+ <td>{$r.bill_fname}</td>
+ <td>{$r.bill_lname}</td>
+ <td>{$r.bill_org}</td>
+ <td>{$r.bill_city}</td>
+ <td>{$r.bill_state}</td>
+ </tr>
+ {/foreach}
+ {else}
+ <tr class="alternate"><td colspan="2">(no requests listed)</td></tr>
+ {/if}
+ </tbody>
+ </table>
+
+
+{include file='admin/footer.html'}
+