Adding in all new and updated files from preveious incarnation of this add-on.
authorChuck Scott <cscott@gaslightmedia.com>
Thu, 2 Feb 2017 20:41:14 +0000 (15:41 -0500)
committerChuck Scott <cscott@gaslightmedia.com>
Thu, 2 Feb 2017 20:41:14 +0000 (15:41 -0500)
Old add-on was glm-member-db-event-registrations, now glm-member-db-registrations

config/plugin.ini
misc/documentation/DevelopmentOutline.txt [new file with mode: 0644]
misc/documentation/STEVE_NOTES.md [new file with mode: 0644]
models/admin/registrations/index.php [new file with mode: 0644]
setup/adminMenus.php
setup/databaseScripts/create_database_V0.0.1.sql [new file with mode: 0644]
setup/databaseScripts/dbVersions.php [new file with mode: 0644]
setup/databaseScripts/readme.txt [new file with mode: 0644]
setup/validActions.php
views/admin/registrations/header.html [new file with mode: 0644]
views/admin/registrations/index.html [new file with mode: 0644]

index 9222f7e..300c8b9 100644 (file)
@@ -6,3 +6,194 @@
 ;
 
 [common]
+
+;
+; Show Rate type (how it rates will be displayed in lists) - Use as List
+;
+show_rate_type[10]                              = 'Detailed'
+show_rate_type[20]                              = 'From (lowest cost)'
+
+show_rate_type_numb['Detailed']                 = 10
+show_rate_type_numb['From']                     = 20
+
+;
+; Data Reference Types (for MagicForm or ?) - List only
+; Used to point to something submitted that requires additional data
+;
+data_ref_type[10]                               = 'Registration Request'
+data_ref_type[20]                               = 'Event Registration'
+data_ref_type[30]                               = 'Rate Class Selected'
+data_ref_type[40]                               = 'Submission Account'
+data_ref_type[50]                               = 'Registrant'
+
+data_ref_type_numb['Registration Request']      = 10
+data_ref_type_numb['Event Registration']        = 20
+data_ref_type_numb['Rate Class Selected']       = 30
+data_ref_type_numb['Submission Account']        = 40
+data_ref_type_numb['Registrant']                = 50
+
+;
+; Payment Reference Types - List only
+;
+data_ref_type[20]                               = 'All'
+data_ref_type[30]                               = 'Event'
+data_ref_type[40]                               = 'Event Rate'
+data_ref_type[50]                               = 'Event Date/Time'
+
+data_ref_type_numb['All']                       = 20
+data_ref_type_numb['Event']                     = 30
+data_ref_type_numb['Event Rate']                = 40
+data_ref_type_numb['Event Date/Time']           = 50
+
+;
+; Registration Account Options - Use as Bitmap only
+;
+registration_account_option[1]                 = 'Guest Registration'
+registration_account_option[2]                 = 'Saved Registration Accounts'
+registration_account_option[3]                 = 'Member Contact Registrations'
+
+registration_account_option['Guest']           = 1
+registration_account_option['Saved']           = 2
+registration_account_option['Member']          = 3
+
+;
+; Payment Method - Use as Bitmap Index or List
+;
+payment_method[1]                               = 'No Charge'
+payment_method[2]                               = 'Comp Code'
+payment_method[3]                               = 'Cash'
+payment_method[4]                               = 'Check'
+payment_method[5]                               = 'Credit Card'
+payment_method[6]                               = 'Call from Merchant' 
+
+payment_method_numb['No Charge']                = 1
+payment_method_numb['Comp Code']                = 2
+payment_method_numb['Cash']                     = 3
+payment_method_numb['Check']                    = 4
+payment_method_numb['Credit Card']              = 5
+payment_method_numb['Call from Merchant']       = 6
+
+;
+; Payment Code Types - List only
+;
+pay_code_type[10]                               = 'Free'
+pay_code_type[20]                               = 'Amount'
+pay_code_type[30]                               = 'Percent'
+
+pay_code_type_numb['Free']                      = 10
+pay_code_type_numb['Amount']                    = 20
+pay_code_type_numb['Percent']                   = 30
+
+;
+; Credit Cards - Use as Bitmap Index or List
+;
+credit_card[0]                                  = 'Visa'
+credit_card[1]                                  = 'MasterCard'
+credit_card[2]                                  = 'American Express'
+credit_card[3]                                  = 'Discover'
+credit_card[4]                                  = 'Diners Club'
+
+credit_card_numb['Visa']                        = 0
+credit_card_numb['MasterCard']                  = 1
+credit_card_numb['American Express']            = 2
+credit_card_numb['Discover']                    = 3
+credit_card_numb['Diners Club']                 = 4
+
+;
+; Card Processing Methods - Use as Bitmap Index or List
+;
+proc_method[1]                                  = 'By Merchant'
+proc_method[2]                                  = 'Authorize.net'
+proc_method[3]                                  = 'Merchant Solutions'
+
+proc_method_numb['Merchant']                    = 1
+proc_method_numb['Authorize.net']               = 2
+proc_method_numb['Merchant Solutions']          = 3
+
+;
+; Card processing test modes
+;
+proc_test_mode[1]                               = 'Local Transaction Approval Test'
+proc_test_mode[2]                               = 'Local Transaction Decline Test'
+proc_test_mode[3]                               = 'On-Line Transaction Test'
+proc_test_mode[99]                              = 'Production Mode'
+
+proc_test_mode_numb['Local Approval Test']      =  1
+proc_test_mode_numb['Local Decline Test']       =  2
+proc_test_mode_numb['On-Line Test']             =  3
+proc_test_mode_numb['Production Mode']          =  0
+
+;
+; Billing Field - Use as Bitmap Index only
+;
+billing_field[1]                                = 'First Name'
+billing_field[2]                                = 'Last Name'
+billing_field[3]                                = 'Organization'
+billing_field[4]                                = 'Title/Department'
+billing_field[5]                                = 'Address Line 1'
+billing_field[6]                                = 'Address Line 2'
+billing_field[7]                                = 'City'
+billing_field[8]                                = 'State'
+billing_field[9]                                = 'ZIP/Postal Code'
+billing_field[10]                               = 'Country'
+billing_field[11]                               = 'Phone'
+billing_field[12]                               = 'FAX'
+
+billing_field_numb['First Name']                = 1 
+billing_field_numb['Last Name']                 = 2 
+billing_field_numb['Organization']              = 3 
+billing_field_numb['Title/Department']          = 4 
+billing_field_numb['Address Line 1']            = 5 
+billing_field_numb['Address Line 2']            = 6 
+billing_field_numb['City']                      = 7 
+billing_field_numb['State']                     = 8 
+billing_field_numb['ZIP/Postal Code']           = 9 
+billing_field_numb['Country']                   = 10
+billing_field_numb['Phone']                     = 11
+billing_field_numb['FAX']                       = 12
+
+;
+; Submission Status - Use as list only
+;
+submission_status[10]                           = 'UNPAID'
+submission_status[20]                           = 'CC_PEND'
+submission_status[30]                           = 'CC_PAID'
+submission_status[40]                           = 'CC_DECL'
+submission_status[50]                           = 'CHECK_PEND'
+submission_status[60]                           = 'CHECK_PAID'
+submission_status[70]                           = 'COMP'
+submission_status[80]                           = 'AT_EVENT'
+submission_status[90]                           = 'CASH_PAID'
+submission_status[100]                          = 'NO_CHARGE'
+submission_status[110]                          = 'OTHER_ADMIN'
+submission_status[120]                          = 'FAILED'
+submission_status[130]                          = 'CANCELED'
+
+submission_status_numb['UNPAID']                = 10
+submission_status_numb['CC_PEND']               = 20
+submission_status_numb['CC_PAID']               = 30
+submission_status_numb['CC_DECL']               = 40
+submission_status_numb['CHECK_PEND']            = 50
+submission_status_numb['CHECK_PAID']            = 60
+submission_status_numb['COMP']                  = 70
+submission_status_numb['AT_EVENT']              = 80
+submission_status_numb['CASH_PAID']             = 90
+submission_status_numb['NO_CHARGE']             = 100
+submission_status_numb['OTHER_ADMIN']           = 110
+submission_status_numb['FAILED']                = 120
+submission_status_numb['CANCELED']              = 130
+
+;
+; Additional Information Field Types
+;
+added_info_field_type[10]                       = 'Request - A request for registration(s)'
+added_info_field_type[20]                       = 'Event - Registration for an Event'
+added_info_field_type[30]                       = 'Account - Person who submits registrations'
+added_info_field_type[40]                       = 'Registrant - Person who registers for events'
+added_info_field_type[50]                       = 'Registration - Registration of a specific registrant to a specific event'
+
+added_info_field_type_numb['Request']           = 10 
+added_info_field_type_numb['Event']             = 20
+added_info_field_type_numb['Account']           = 30
+added_info_field_type_numb['Registrant']        = 40
+added_info_field_type_numb['Registration']      = 50
diff --git a/misc/documentation/DevelopmentOutline.txt b/misc/documentation/DevelopmentOutline.txt
new file mode 100644 (file)
index 0000000..5d8575f
--- /dev/null
@@ -0,0 +1,124 @@
+Registrations Add-On Work Items - Preliminary
+
+ADMIN
+
+* General
+    - Activation/Deactivation
+    - Database table installation / updates
+    - Generasl Configuration
+
+* Management
+    - Recall and update of management data
+    - Access by Managers only
+
+* Misc
+    - Recall and update of Misc configurable text and flags
+    - Accessed by Managers and Site owners
+
+* Support Classes
+    - Searches for and organizes various groups of data
+        - Assemble all data for a particular registration request
+
+* Additional Information fields 
+    - May be used in association with various types of data (see data_ref_type in plugin.ini)
+    - Add, Update, Delete list of added info records
+    - Accessible by anyone configuring registration for an event
+    - Possibly common code used while editing various things that can have additional information fields
+
+* Payment Codes 
+    - May be used in associatin with various types of data (see data_ref_type in plugin.ini) or as "Global" payment codes
+    - Add, Update, Delete list of Payment Codes 
+    - Possibly common code used while editing various things that can have payment codes
+
+* Registration configuration for a specific event
+    - Passed an Event add-on event ID that matches the ID of the event it the Event add-on
+    - Add (when first used for an event), edit, update, delete
+
+* Registration Class 
+    - Associated with a specific Event
+    - Add, Update, Delete list of registration classes for an event
+
+* Rgistration Rates
+    - Associated with a specific registration class
+    - Add, Update, Delete list of rates
+        - Sets a range of dates over which a particular registration class may be selected and the rates for that date range
+
+* Registration Requests
+    - Requests for event registration
+    - List, Edit (certain data)
+    - List registration details for specfic 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
+    - People who are registered for an event
+    - Associated with one or more registration events
+    - List, Edit (certain data)
+    - List events registrant has been registered for
+
+* Reports
+    (Still need to put together list of reports)
+
+FRONT-END
+
+* Support Class
+    - Assemble all data for a particular registration request
+        Possibly same class used by admin. Only difference is that it's pending data until checkout
+`   - Summarize possible costs for an event for use in displaying to the user before devciding to register for the event
+
+* Registration Steps
+
+    - All Registration selections come from selection of an event flagged as having registration in the Events add-on.
+
+    - Step 1 - Event
+        - Display information on registration for an event
+        - Optionally let user log in if they have an existing registration account 
+            - If returning registration accounts are permitted - ask for returning account login
+            - If member registration is permitted and member is logged in - get information from member login data
+            - Say if guest registrations are permitted for this event
+        - Enter information required for the selected event
+        - Select a "class of registration"
+
+    - Step 2 - Registration Class
+        - If only one class and no information requested for that class then continue to step 3
+        - Display information summarizing Event and selected class
+        - Enter information required in association with the selected class
+        - Determine current registration rate for this class based on date range
+            - If no rate record matches the selected event class for the current date then not able to register at this time
+
+    - Step 3 - Registrants
+        - If event does not require registrants (configured only to register the person submitting the requet) continue to step 4
+        - Display information summarizing the selected event, selected rate cloass, and selected rate
+        - Add registrants up to the registrant limit
+            Collect information for each registrant (or search for previous registrant      
+
+    - Step 4 - Cart
+        - May get here either from another step or site-wide registration cart link
+        - Display information summarizing the selected event, selected rate classes, rates and registrants
+        - Permit user to deselect a specific registrant, registration class, event, or entire cart
+            - If one is deselected, require "Update" button and block "Checkout" 
+            - If "Update" is selected, remove selected data and refresh page
+        - Permit user to enter a payment code - If entered and validated, redisplay page so payment code adjustments are shown
+        - Permit user to return to Step 2 or 3 by clicking a certain event or Registration class in the cart
+        - If user wants to add another event they need to go back to the Events add-on to select the event
+
+    - Step 5 - Checkout Page
+        - Can only get here from Cart
+        - Display quick summary of selected Events, Registration classes and Registrants with totals
+        - Display Checkout form
+            - If using a returning registration account or member, populate fields with available data
+        - Display Payment form unless no payment is required
+
+    - Step 6 - Checkout submission and summary
+        - Validate all submitted data and required fields
+            - If not all valid, return to Checkout Page
+        - Process any payment required
+            - If payment not accepted, return to Checkout Page
+        - Update registration submission status to some paid status or delayed payment if permitted 
+        - Display detaled review of registrations submitted and summary of payment and any authorization codes (permit printing)
+
+        
\ No newline at end of file
diff --git a/misc/documentation/STEVE_NOTES.md b/misc/documentation/STEVE_NOTES.md
new file mode 100644 (file)
index 0000000..22ed1fe
--- /dev/null
@@ -0,0 +1,115 @@
+# Event Registration
+
+## Registrations_V3
+
+Dash board displayed
+- List of configurable options
+- Recent Updates
+
+## Admin Area
+
+### Misc Settings
+- Payment Codes (dynamic)
+#### Text for Various Pages
+- Text for top of first page
+- Text for top of Category page
+- Text for top of Event selection page
+- Text for top of Event detail page
+- Text for top of Shopping Card page
+- Text for top of Checkout page
+- Text for Summary page
+####Terms and Conditions
+- Event Terms and Conditions
+#### Notification E-Mail to Instructor
+- E-Mail Subject line
+- Notification E-Mail Message
+#### Acknowledgement E-Mail to Registrant
+- E-Mail Subject line
+- Acknowledgement E-Mail Message
+
+### Categories
+- ID
+- Name
+- Image
+- Description
+- Order
+
+### Events
+- Rate options and dates
+- Payment Options
+- Registrant Options
+- Terms and Conditions
+
+-- Edit form (Magic forms)
+
+### Submissions
+Search submissions by
+- Reg#
+- Date Submitted
+- First Name
+- Last Name
+- Company/Organization
+- Business Name
+- Status
+- Credit Card Confirmation #
+
+### Reports
+Generate reports by
+- Event(s)
+- Status
+- Report by
+- Sort by
+- Output Type
+- Filter by Activity Date
+- Filter by Registration Date
+- Filter by Desired Date
+- Entered by Admin User
+- Include Dynamic Field Data
+
+### Enter New Registration
+- Link to the page on front end with the Event Registration
+
+# Models & Views
+- models
+    - admin
+        - dashboard
+            - registrations.php
+        - registrations
+            - index.php
+        - management
+            - registrations.php
+        - settings
+            - registrations.php
+        - event
+            - rates.php
+            - payment-options.php
+            - registration.php
+            - terms.php
+    - front
+        - registrations
+            - list.php
+            - detail.php
+            - cart.php
+            - checkout.php
+- views
+    - admin
+        - dashboard
+            - registrations.html
+        - registrations
+            - index.html
+        - event
+            - rates.html
+            - payment-options.html
+            - registration.html
+            - terms.html
+        - management
+            - registrations.html
+        - settings
+            - registrations.html
+    - front
+        - registrations
+            - list.html
+            - detail.html
+            - cart.html
+            - checkout.html
+
diff --git a/models/admin/registrations/index.php b/models/admin/registrations/index.php
new file mode 100644 (file)
index 0000000..571c4f4
--- /dev/null
@@ -0,0 +1,106 @@
+<?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_index // 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/registratrions/index.html',
+            'data'          => $templateData
+        );
+
+    }
+
+
+}
index 3722891..7345dc0 100644 (file)
  *
  */
 
+add_submenu_page(
+    'glm-members-admin-menu-members',
+    'Registrations',
+    'Registrations',
+    'glm_members_members',
+    'glm-members-admin-menu-registrations-index',
+    function() {$this->controller('registrations');}
+);
+
+add_submenu_page(
+    'glm-members-admin-menu-members',
+    'Registration Events',
+    '&nbsp;&nbsp;&nbsp;&nbsp;Events',
+    'glm_members_members',
+    'glm-members-admin-menu-registrations-list',
+    function() {$this->controller('registrations', 'list');}
+);
+
diff --git a/setup/databaseScripts/create_database_V0.0.1.sql b/setup/databaseScripts/create_database_V0.0.1.sql
new file mode 100644 (file)
index 0000000..03e0b48
--- /dev/null
@@ -0,0 +1,632 @@
+-- Gaslight Media Registration Database
+-- File Created: 01/18/2017 14:40:00
+-- Database Version: 0.0.1
+-- 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 - Additional fields
+ *      added_info - Submitted additional field data 
+ *          --> added_info
+ * 
+ * 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
+ * 
+ * registrant - A person who is registered for an event
+ * 
+ * reg_request - Information on a specific request for registrations
+ *      reg_request_detail - 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_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
+CREATE TABLE {prefix}management (
+    id INT NOT NULL AUTO_INCREMENT,
+    -- System Owner Information
+    org_name TINYTEXT NULL,                                     -- Customer Information - Name of Organization
+    org_short TINYTEXT NULL,
+    org_address TINYTEXT NULL,
+    org_city TINYTEXT NULL,
+    org_state TINYTEXT NULL,
+    org_zip TINYTEXT NULL,
+    org_phone TINYTEXT NULL,
+    org_toll_free TINYTEXT NULL,
+    org_internal_email TINYTEXT NULL,
+    org_from_email TINYTEXT NULL,
+    payment_methods TINYINT NULL,                               -- Payment methods available for all registrations - Bitmap - see payment_method in plugin.ini
+    proc_methods TINYINT NULL,                                  -- Payment processing methods available - Bitmap - see proc_method in plugin.ini
+    cc_accepts SMALLINT NULL,                                   -- Credit Cards Accepted - Bitmap - See credit_card in plugin.ini
+    -- Authorize.net Credentials
+    authorize_net_login TINYTEXT NULL,
+    authorize_net_key TINYTEXT NULL,
+    authorize_net_test TINYINT NULL,                            -- Authorize.net test mode - List - see proc_test_mode in plugin.ini
+    authorize_net_conf BOOLEAN NULL,                            -- Flag to send payment confirmation Email from Authorize.net            
+    authorize_net_merchant_email TINYTEXT NULL,                 -- E-Mail Authorize.net will send copy of confirmation E-Mail
+    -- Merchant Solutions Credentials
+    merchant_solutions_acctid TINYTEXT NULL,                    -- Merchant Solutions credentials
+    merchant_solutions_merchantpin TINYTEXT NULL,
+    merchant_solutions_test TINYINT NULL,                       -- Merchant Solutions test mode - List - see proc_test_mode in plugin.ini
+    -- Billing settings    
+    full_billing_info BOOLEAN NULL,                             -- Always request full billing information in checkout page regardless of the following settings
+    bill_info_req_no_charge TINYINT NULL,                       -- Bitmap of fields to use in checkout for these types of payments - See billing_field in plugin.conf
+    bill_info_req_comp_code TINYINT NULL,     
+    bill_info_req_cash TINYINT NULL,          
+    bill_info_req_check TINYINT NULL,         
+    bill_info_req_credit_card TINYINT NULL,   
+    bill_info_req_merchant_call TINYINT NULL, 
+    -- Misc Options
+    medical_info BOOLEAN NULL,                                  -- This site can ask for "Medical Info" - set in main category of an event
+    -- System Wide Terms 
+    term_registrations_name TINYTEXT NULL,                      -- Term "Event Registration"
+    term_registration TINYTEXT NULL,                            -- Various terms
+    term_registrations TINYTEXT NULL,
+    term_register TINYTEXT NULL,
+    term_registering TINYTEXT NULL,
+    term_registered TINYTEXT NULL,
+    term_attendee TINYTEXT NULL,
+    term_attendees TINYTEXT NULL,
+    term_attending TINYTEXT NULL,
+    term_attended TINYTEXT NULL,
+    term_member TINYTEXT NULL,
+    term_members TINYTEXT NULL,
+    term_user_id TINYTEXT NULL,
+    term_password TINYTEXT NULL,
+    term_instructor TINYTEXT NULL,
+    term_instructors TINYTEXT NULL,
+    -- Titles for various sections
+    title_payment_comp_code TINYTEXT NULL,
+    title_registration_button TINYTEXT NULL,
+    title_contact_information TINYTEXT NULL,
+    PRIMARY KEY (id)
+);
+
+----
+
+-- Additional fields for collecting information at checkout
+-- Related to the registration submission or specific event registration
+CREATE TABLE {prefix}added_info (
+    id INT NOT NULL AUTO_INCREMENT,
+    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)
+);
+
+----
+
+-- Additional field data for a specific submission, event registration, or registrant
+CREATE TABLE {prefix}added_info (
+    id INT NOT NULL AUTO_INCREMENT,
+    added_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 the specific entity of ref_type
+    field_value TINYTEXT NULL,
+    PRIMARY KEY (id)
+);
+
+
+----
+
+-- 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)
+);
+
+----
+
+-- Misc system-wide customer configurable configuration
+-- Various text and flags to be configured by customer
+CREATE TABLE {prefix}misc (
+    id INT NOT NULL AUTO_INCREMENT,
+    regbulletin 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)
+    regterms TEXT NULL,                                         -- Registration terms and conditions
+    instr_notify_subject TEXT NULL,                             -- Subject of notification E-Mail to instructor
+    instr_notify_text TEXT NULL,                                -- Notification E-Mail text for instructor
+    notify_subject TEXT NULL,                                   -- Subject of notification E-Mail to site owner
+    notify_text TEXT NULL,                                      -- Notification E-Mail text for site owner
+    req_ack_subject TEXT NULL,                                  -- Subject of registration acknowledgement E-Mail to customer
+    req_ack_text TEXT NULL,                                     -- Text of registration acknowledgement E-Mail to customer
+    PRIMARY KEY (id)
+);
+
+----
+
+-- 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)
+);
+
+----
+
+-- 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
+    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 TINYINT NULL,                  -- Bitmap of how user accounts may be used for this event - See registration_account_option in plugin.ini
+    member_contact INT NULL,                                    -- Pointer to member contact ID if logged in member submitting registration
+    payment_methods TINYINT NULL,                               -- Bitmap of payment methods available to users for this event - See payment_method in plugin.ini
+    restricted_payment_methods TINYINT 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)
+);
+
+----
+
+-- Rate 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)
+);
+
+----
+
+-- 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)
+);
+
+----
+
+-- 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
+    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
+    member_id TINYTEXT NULL,                                -- Free-form field for a member ID
+    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)
+);
+
+----
+
+-- Aperson who is registered for one or more events
+-- Depending on the use of these entries may not have all data included
+CREATE TABLE {prefix}registrant (
+    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
+    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,
+    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
+    member_id TINYTEXT NULL,                                -- Free-form field for a member ID
+    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)
+);
+
+----
+
+-- 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(cart_serial(20))
+);
+
+----
+
+-- Registration for a specific event
+-- Has one or more reg_selected_rate records associated with it
+CREATE TABLE {prefix}reg_request_detail (
+    id INT NOT NULL AUTO_INCREMENT,
+    reg_request INT NULL,                                       -- Pointer to reg_request table
+    account INT NULL                                            -- Pointer to account (person submitting the registration)
+    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)
+);
+
+----
+
+--  A particular reg_request_rate selected
+--  Has one or more reg_registrant records associated with it
+CREATE TABLE {prefix}reg_request_rate (
+    id INT NOT NULL AUTO_INCREMENT,
+    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_detail INT NULL,                                -- Pointer to reg_request_detail table entry
+    reg_detail INT NULL,                                        -- Pointer to reg_detail 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 FLOAT,                                     -- Last calculated number of registrants with this rate
+    total_registrant_charges FLOAT,                             -- Last calculation registrant charges assoicated with this selected rate
+    notes TEXT NULL,                                            -- System operator's notes for this registration request
+    PRIMARY KEY (id)
+);
+
+----
+
+--  A specific registrant for a selected registration rate
+CREATE TABLE {prefix}reg_registrant (
+    id INT NOT NULL AUTO_INCREMENT,
+    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_detail INT NULL,                                -- Pointer to reg_request_detail table entry
+    reg_detail INT NULL,                                        -- Pointer to reg_detail table entry
+    account INT NULL,                                           -- Pointer to account (person submitting the registration)
+    registrant INT NULL,                                        -- Pointer to registrant (person attending) - Not needed if registrants are off for the event
+    reg_selected_rate INT NULL,                                 -- Pointer to reg_selected_rate table entry
+    mf_data TEXT NULL,                                          -- Any MagicForm data associated with registrant
+    notes TEXT NULL,                                            -- System operator's notes for this registration request
+    PRIMARY KEY (id)
+);
+
+----
+
+-- Insert into management table
+INSERT INTO {prefix}management
+    (
+    org_name,
+    org_short,
+    org_address,
+    org_city,
+    org_state,
+    org_zip,
+    org_phone,
+    org_toll_free,
+    org_internal_email,
+    org_from_email,
+    payment_methods,
+    proc_methods,
+    cc_accepts,
+    authorize_net_login,
+    authorize_net_key,
+    authorize_net_test,
+    authorize_net_conf,
+    authorize_net_merchant_email,
+    merchant_solutions_acctid,
+    merchant_solutions_merchantpin,
+    merchant_solutions_test,
+    full_billing_info,
+    bill_info_req_no_charge,
+    bill_info_req_comp_code,
+    bill_info_req_cash,
+    bill_info_req_check,
+    bill_info_req_credit_card,
+    bill_info_req_merchant_call,
+    medical_info,
+    term_registrations_name,
+    term_registration,
+    term_registrations,
+    term_register,
+    term_registering,
+    term_registered,
+    term_attendee,
+    term_attendees,
+    term_attending,
+    term_attended,
+    term_member,
+    term_members,
+    term_user_id,
+    term_password,
+    term_instructor,
+    term_instructors,
+    title_payment_comp_code,
+    title_registration_button,
+    title_contact_information
+    )
+    VALUES
+    (
+    'Gaslight Media',                                           -- org_name,
+    'GLM',                                                      -- org_short,
+    '120 E. Lake St.',                                          -- org_address,
+    'Petoskey',                                                 -- org_city,
+    'MI',                                                       -- org_state,
+    '49770',                                                    -- org_zip,
+    '231-487-0692',                                             -- org_phone,
+    '800-123-1234',                                             -- org_toll_free,
+    'internal@gaslightmedia.com',                               -- org_internal_email,
+    'info@gaslightmedia.com',                                   -- org_from_email,
+    0,                                                          -- payment_methods,
+    0,                                                          -- proc_methods,
+    0,                                                          -- cc_accepts,
+    '',                                                         -- authorize_net_login,
+    '',                                                         -- authorize_net_key,
+    1,                                                          -- authorize_net_test,
+    true,                                                       -- authorize_net_conf
+    '',                                                         -- authorize_net_merchant_email,
+    '',                                                         -- merchant_solutions_acctid,
+    '',                                                         -- merchant_solutions_merchantpin,
+    1,                                                          -- merchant_solutions_test, 
+    true,                                                       -- full_billing_info,
+    0,                                                          -- bill_info_req_no_charge,
+    0,                                                          -- bill_info_req_comp_code,
+    0,                                                          -- bill_info_req_cash,
+    0,                                                          -- bill_info_req_check,
+    0,                                                          -- bill_info_req_credit_card,
+    0,                                                          -- bill_info_req_merchant_call,
+    true,                                                       -- medical_info,
+    'Event Registrations',                                      -- term_registrations_name,
+    'registration',                                             -- term_registration,
+    'registrations',                                            -- term_registrations,
+    'register',                                                 -- term_register,
+    'registering',                                              -- term_registering,
+    'registered',                                               -- term_registered,
+    'attendee',                                                 -- term_attendee,
+    'attendees',                                                -- term_attendees,
+    'attending',                                                -- term_attending,
+    'attended',                                                 -- term_attended,
+    'member',                                                   -- term_member,
+    'members',                                                  -- term_members,
+    'user ID',                                                  -- term_user_id,
+    'password',                                                 -- term_password,
+    'instructor',                                               -- term_instructor,
+    'instructors',                                              -- term_instructors,
+    'comp code',                                                -- title_payment_comp_code,
+    'Complete Registration',                                    -- title_registration_button,
+    'Contact Information'                                      -- title_contact_information
+    );
+
+
+----
+
+-- Insert into misc table
+INSERT INTO {prefix}misc
+    (
+    regbulletin,
+    cart_page_text,
+    checkout_page_text,
+    summary_page_text,
+    regterms,
+    instr_notify_subject,
+    instr_notify_text,
+    notify_subject,
+    notify_text,
+    req_ack_subject,
+    req_ack_text
+    )
+    VALUES
+    (
+    '',
+    '',
+    '',
+    '',
+    'Terms and Conditions',
+    'Notification of a Registration',
+    '',
+    'Notification of a Registration'
+    'You have a new Registration.',
+    'Acknowledgement of your Registration',
+    'Thank You for registering for this event. You will also receive a reminder email 1-2 days before the event. If your plans, change please call or email to cancel your reservation so those on the wait list can attend.  We look forward to seeing you soon.'
+    );
diff --git a/setup/databaseScripts/dbVersions.php b/setup/databaseScripts/dbVersions.php
new file mode 100644 (file)
index 0000000..9393fac
--- /dev/null
@@ -0,0 +1,20 @@
+<?php
+/**
+ * Gaslight Media Members Database
+ * GLM Members Registrations DB Versions
+ *
+ * PHP version 5.5
+ *
+ * @category glmWordPressPlugin
+ * @package  glmMemberEventRegistrationDatabase
+ * @author   Steve Sutton <steve@gaslightmedia.com>
+ * @license  http://www.gaslightmedia.com Gaslightmedia
+ * @release  dbVersions.php $
+ * @link     http://dev.gaslightmedia.com/
+ */
+/*
+$glmMembersRegistrationDbVersions = array(
+    '0.0.1' => array('version' => '0.0.1', 'tables' => 17, 'date' => '02/2/2017'),
+);
+*/
+
diff --git a/setup/databaseScripts/readme.txt b/setup/databaseScripts/readme.txt
new file mode 100644 (file)
index 0000000..f1c238e
--- /dev/null
@@ -0,0 +1,44 @@
+This directory contains database creation and update scripts for this add-on.
+
+The files in this directory are checked by the glmCheckDatabase() function in the
+main plugin classes/glmPluginSupport.php file.
+
+This directory is optional. If there are no data tables that need to be created
+for this add-on, there should be no files in this directory. The directory may
+also be deleted. 
+
+See the "examples" directory for a sample of what can go in this directory.
+Procedure to update database
+-----------------------------
+
+0) Make a backup copy of the site's database.
+
+1) Rename "create_database_Vx.x.x.sql" to new version number.
+    example: create_database_V0.0.9.sql -> create_database_V0.0.10.sql
+
+2) Edit renamed create database file and make desired changes
+
+3) Add a new "update_database_Vx.x.x.sql" named with the correct version #.
+
+4) Edit new update database files with SQL script to make the necessary changes
+   from the previous version to the new version. (i.e. to add new fields,
+   rename fields, insert records, ...)
+
+5) Optionally add an "update_database_Vx.x.x.php" file if PHP scripting is
+   needed to update database content. (i.e. to make changes to database content)
+
+6) Edit the "dbVersions.php" file and add a new line for the new version.
+   *** Now please be sure to add a date for each entry ***
+   i.e. '1.1.2' => array('version' => '1.1.2', 'tables' => 14, 'date' => '4/11/16')
+
+7) When this is all done, edit the index.php file for the plugin/add-on and 
+   change "GLM_MEMBERS_{addon}_PLUGIN_DB_VERSION" defined parameter where
+   {addon} is the add-on name.
+
+8) Go to an admin menu item for the main member db plugin or any add-on. If all
+   goes well, the main plugin should have detected the change and updated the
+   database. If not, restore the database and try again.
+
+9) Check the database to make sure the changes to fields and data are correct.
+
+10) Rename the drop_database_Vx.x.x.sql to new version number (same as create)
index 4bff872..1eb4eac 100644 (file)
 
 $glmMembersRegistrationsAddOnValidActions = array(
     'adminActions' => array(
+        'registrations' => array(
+            'index' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG,
+            'list'  => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG,
+        ),
     ),
     'frontActions' => array(
     )
diff --git a/views/admin/registrations/header.html b/views/admin/registrations/header.html
new file mode 100644 (file)
index 0000000..f5dfdbe
--- /dev/null
@@ -0,0 +1,9 @@
+<div class="wrap">
+    <h2>All Events</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>
+    </h2>
+    <div id="glm-admin-content-container">
+    
+    
\ No newline at end of file
diff --git a/views/admin/registrations/index.html b/views/admin/registrations/index.html
new file mode 100644 (file)
index 0000000..da6c8f9
--- /dev/null
@@ -0,0 +1,6 @@
+{include file='admin/registrations/header.html'}
+    
+<h3>Registrations Index Page</h3>
+    
+{include file='admin/footer.html'}
+