From 89985bf715e20d53ec0ec1cb698e9655e8d5d9c1 Mon Sep 17 00:00:00 2001 From: Laury GvR Date: Mon, 13 Feb 2017 17:01:41 -0500 Subject: [PATCH] Most of the db tables made into data classes. Most of the db tables now have a data class set up. --- classes/data/dataAccount.php | 448 ++++++++++++++++++++++++++- classes/data/dataAddedInfoData.php | 52 ++-- classes/data/dataAddedInfoFields.php | 47 +-- classes/data/dataMagicform.php | 147 ++++++++- classes/data/dataMfData.php | 122 +++++++- classes/data/dataRegClass.php | 39 ++- classes/data/dataRegEvent.php | 153 ++++++++- classes/data/dataRegRates.php | 76 ++++- classes/data/dataRegRequest.php | 235 +++++++++++++- classes/data/dataRegRequestClass.php | 80 ++++- classes/data/dataRegRequestEvent.php | 75 +++++ 11 files changed, 1423 insertions(+), 51 deletions(-) diff --git a/classes/data/dataAccount.php b/classes/data/dataAccount.php index 2cdcd5f..0fe20ed 100644 --- a/classes/data/dataAccount.php +++ b/classes/data/dataAccount.php @@ -24,7 +24,7 @@ * @release SVN: $Id: dataAddedInfoFields.php,v 1.0 2011/01/25 19:31:47 cscott * Exp $ */ -class GlmDataRegistrationsAddedInfoFields extends GlmDataAbstract +class GlmDataRegistrationsAccount extends GlmDataAbstract { /** @@ -100,14 +100,456 @@ class GlmDataRegistrationsAddedInfoFields extends GlmDataAbstract /* * Table Name */ - $this->table = GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . 'TABLE_NAME_HERE'; + $this->table = GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . 'account'; /* * Table Data Fields */ $this->fields = array ( - + + // ID + 'id' => array ( + 'field' => 'id', + 'type' => 'integer', + 'view_only' => true, + 'use' => 'a' + ), + + // Is active flag (may be accessed or used) - default is true + 'active' => array ( + 'field' => 'active', + 'type' => 'checkbox', + 'use' => 'a', + 'default' => 1 + ), + + // Account + 'registered_by' => array ( + 'field' => 'registered_by', + 'type' => 'integer', + 'required' => true, + 'use' => 'a' + ), + + // Account Primary Address + 'member_id' => array ( + 'field' => 'member_id', + 'type' => 'text', + 'required' => false, + 'use' => 'a' + ), + + // First Name + 'fname' => array ( + 'field' => 'fname', + 'type' => 'text', + 'required' => false, + 'use' => 'a' + ), + + // Last Name + 'lname' => array ( + 'field' => 'lname', + 'type' => 'text', + 'required' => false, + 'use' => 'a' + ), + + // Organization + 'org' => array ( + 'field' => 'org', + 'type' => 'text', + 'required' => false, + 'use' => 'a' + ), + + // Title + 'title' => array ( + 'field' => 'title', + 'type' => 'text', + 'required' => false, + 'use' => 'a' + ), + + // Address 1 + 'addr1' => array ( + 'field' => 'addr1', + 'type' => 'text', + 'required' => false, + 'use' => 'a' + ), + + // Address 2 + 'addr2' => array ( + 'field' => 'addr2', + 'type' => 'text', + 'required' => false, + 'use' => 'a' + ), + + // City + 'city' => array ( + 'field' => 'city', + 'type' => 'text', + 'required' => false, + 'use' => 'a' + ), + + // State + 'state' => array ( + 'field' => 'state', + 'type' => 'text', + 'required' => false, + 'use' => 'a' + ), + + // + 'zip' => array ( + 'field' => 'zip', + 'type' => 'text', + 'required' => false, + 'use' => 'a' + ), + + // + 'country' => array ( + 'field' => 'country', + 'type' => 'text', + 'required' => false, + 'use' => 'a' + ), + + // + 'phone' => array ( + 'field' => 'phone', + 'type' => 'text', + 'required' => false, + 'use' => 'a' + ), + + // + 'fax' => array ( + 'field' => 'fax', + 'type' => 'text', + 'required' => false, + 'use' => 'a' + ), + + // Last used billing information - Also stored in each registration request + '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' + ), + + // + 'bill_phone' => array ( + 'field' => 'bill_phone', + 'type' => 'text', + 'required' => false, + 'use' => 'a' + ), + + // + 'bill_fax' => array ( + 'field' => 'bill_fax', + 'type' => 'text', + 'required' => false, + 'use' => 'a' + ), + + // + 'email' => array ( + 'field' => 'email', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // Cryped password for login back into this account + 'password' => array ( + 'field' => 'password', + 'type' => 'text', + 'required' => 'true', + 'use' => 'a' + ), + + // + 'email_ok' => array ( + 'field' => 'email_ok', + 'type' => 'checkbox', + 'use' => 'a', + 'default' => 0 + ), + + // Is a member of the entity that owns the site + 'is_member' => array ( + 'field' => 'is_member', + 'type' => 'checkbox', + 'use' => 'a', + 'default' => 0 + ), + + // Pointer to GLM Associate member contact record if account is for a member contact + 'contact_id' => array ( + 'field' => 'contact_id', + 'type' => 'pointer', + 'p_table' => GLM_MEMBERS_CONTACTS_PLUGIN_DB_PREFIX . 'contacts', + 'p_field' => 'id', + 'p_static' => true, + 'required' => true, + 'use' => 'lgneud' + ), + + // + 'contact_fname' => array ( + 'field' => 'contact_fname', + 'type' => 'text', + 'required' => false, + 'use' => 'a' + ), + + // + 'contact_lname' => array ( + 'field' => 'contact_lname', + 'type' => 'text', + 'required' => false, + 'use' => 'a' + ), + + // + 'contact_org' => array ( + 'field' => 'contact_org', + 'type' => 'text', + 'required' => false, + 'use' => 'a' + ), + + // + 'contact_title' => array ( + 'field' => 'contact_title', + 'type' => 'text', + 'required' => false, + 'use' => 'a' + ), + + // + 'contact_addr1' => array ( + 'field' => 'contact_addr1', + 'type' => 'text', + 'required' => false, + 'use' => 'a' + ), + + // + 'contact_addr2' => array ( + 'field' => 'contact_addr2', + 'type' => 'text', + 'required' => false, + 'use' => 'a' + ), + + // + 'contact_city' => array ( + 'field' => 'contact_city', + 'type' => 'text', + 'required' => false, + 'use' => 'a' + ), + + // + 'contact_state' => array ( + 'field' => 'contact_state', + 'type' => 'text', + 'required' => '', + 'use' => 'a' + ), + + // + 'contact_zip' => array ( + 'field' => 'contact_zip', + 'type' => 'text', + 'required' => '', + 'use' => 'a' + ), + + // + 'contact_country' => array ( + 'field' => 'contact_country', + 'type' => 'text', + 'required' => false, + 'use' => 'a' + ), + + // + 'contact_phone' => array ( + 'field' => 'contact_phone', + 'type' => 'text', + 'required' => false, + 'use' => 'a' + ), + + // + 'contact_fax' => array ( + 'field' => 'contact_fax', + 'type' => 'text', + 'required' => false, + 'use' => 'a' + ), + + // + 'contact_email' => array ( + 'field' => 'contact_email', + 'type' => 'text', + 'required' => false, + 'use' => 'a' + ), + + // + 'contact_email_ok' => array ( + 'field' => 'contact_email_ok', + 'type' => 'checkbox', + 'use' => 'a', + 'default' => 0 + ), + + // + 'guardian' => array ( + 'field' => 'guardian', + 'type' => 'text', + 'required' => false, + 'use' => 'a' + ), + + // + 'emer_contact' => array ( + 'field' => 'emer_contact', + 'type' => 'text', + 'required' => false, + 'use' => 'a' + ), + + // + 'emer_phone' => array ( + 'field' => 'emer_phone', + 'type' => 'text', + 'required' => false, + 'use' => 'a' + ), + + // + 'med_history' => array ( + 'field' => 'med_history', + 'type' => 'text', + 'required' => false, + 'use' => 'a' + ), + + // + 'allergy_med' => array ( + 'field' => 'allergy_med', + 'type' => 'text', + 'required' => false, + 'use' => 'a' + ), + + // + 'date_created' => array ( + 'field' => 'date_created', + 'type' => 'datetime', + 'use' => 'a' + ), + + // + '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' + ), + ); } diff --git a/classes/data/dataAddedInfoData.php b/classes/data/dataAddedInfoData.php index 67981da..3829252 100644 --- a/classes/data/dataAddedInfoData.php +++ b/classes/data/dataAddedInfoData.php @@ -108,37 +108,51 @@ class GlmDataRegistrationsAddedInfoData extends GlmDataAbstract $this->fields = array ( - // Pointer to Added Info Field + // ID + 'id' => array ( + 'field' => 'id', + 'type' => 'integer', + 'view_only' => true, + 'use' => 'a' + ), + + // Pointer to added_info_field Table 'added_info_field' => array ( - 'field' => 'added_info_field', - 'type' => 'integer', - 'required' => true, - 'use' => 'a' + 'field' => 'added_info_field', + 'type' => 'pointer', + 'p_table' => GLM_MEMBERS_CONTACTS_PLUGIN_DB_PREFIX . 'added_info_field', + 'p_field' => 'id', + 'p_static' => true, + 'required' => true, + 'use' => 'lgneud' ), // Ref Type 'ref_type' => array ( - 'field' => 'ref_type', - 'type' => 'list', - 'list' => $this->config['data_ref_type'], - 'required' => true, - 'use' => 'a' + 'field' => 'ref_type', + 'type' => 'list', + 'list' => $this->config['data_ref_type'], + 'required' => true, + 'use' => 'a' ), - - // Ref Destination - Pointer to entry of type Ref Type + + // Pointer to specific entryt of the correct type (user submitted data record) 'ref_dest' => array ( - 'field' => 'ref_dest', - 'type' => 'integer', - 'required' => true, + 'field' => 'ref_dest', + 'type' => 'pointer', + 'p_table' => GLM_MEMBERS_PLUGIN_DB_PREFIX . 'members', + 'p_field' => 'name', + 'p_orderby' => 'name', + 'p_blank' => true, 'use' => 'a' ), // Text value of field 'field_value' => array ( - 'field' => 'field_value', - 'type' => 'text', - 'required' => true, - 'use' => 'a' + 'field' => 'field_value', + 'type' => 'text', + 'required' => true, + 'use' => 'a' ) ); diff --git a/classes/data/dataAddedInfoFields.php b/classes/data/dataAddedInfoFields.php index fb9110c..21db293 100644 --- a/classes/data/dataAddedInfoFields.php +++ b/classes/data/dataAddedInfoFields.php @@ -107,38 +107,49 @@ class GlmDataRegistrationsAddedInfoFields extends GlmDataAbstract */ $this->fields = array ( - + + // ID + 'id' => array ( + 'field' => 'id', + 'type' => 'integer', + 'view_only' => true, + 'use' => 'a' + ), + // Ref Type 'ref_type' => array ( - 'field' => 'ref_type', - 'type' => 'list', - 'list' => $this->config['data_ref_type'], - 'required' => true, - 'use' => 'a' + 'field' => 'ref_type', + 'type' => 'list', + 'list' => $this->config['data_ref_type'], + 'required' => true, + 'use' => 'a' ), - // Ref Destination - Pointer to entry of type Ref Type + // Pointer to specific entryt of the correct type (user submitted data record) 'ref_dest' => array ( - 'field' => 'ref_dest', - 'type' => 'integer', - 'required' => true, + 'field' => 'ref_dest', + 'type' => 'pointer', + 'p_table' => GLM_MEMBERS_PLUGIN_DB_PREFIX . 'members', + 'p_field' => 'name', + 'p_orderby' => 'name', + 'p_blank' => true, 'use' => 'a' ), // Name of field / prompt 'name' => array ( - 'field' => 'name', - 'type' => 'text', - 'required' => true, - 'use' => 'a' + 'field' => 'name', + 'type' => 'text', + 'required' => true, + 'use' => 'a' ), // Field description / explantion 'description' => array ( - 'field' => 'description', - 'type' => 'text', - 'required' => true, - 'use' => 'a' + 'field' => 'description', + 'type' => 'text', + 'required' => true, + 'use' => 'a' ) ); diff --git a/classes/data/dataMagicform.php b/classes/data/dataMagicform.php index a88c8c9..b8abf9f 100644 --- a/classes/data/dataMagicform.php +++ b/classes/data/dataMagicform.php @@ -24,7 +24,7 @@ * @release SVN: $Id: dataAddedInfoFields.php,v 1.0 2011/01/25 19:31:47 cscott * Exp $ */ -class GlmDataRegistrationsAddedInfoFields extends GlmDataAbstract +class GlmDataRegistrationsMagicform extends GlmDataAbstract { /** @@ -108,6 +108,151 @@ class GlmDataRegistrationsAddedInfoFields extends GlmDataAbstract $this->fields = array ( + // ID + 'id' => array ( + 'field' => 'id', + 'type' => 'integer', + 'view_only' => true, + 'use' => 'a' + ), + + // Form ID + 'form_id' => array ( + 'field' => 'form_id', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // Custom ID + 'custom_id' => array ( + 'field' => 'custom_id', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // Form Title + 'title' => array ( + 'field' => 'title', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // Form Title + 'type' => array ( + 'field' => 'type', + 'type' => 'integer', + 'required' => true, + 'use' => 'a' + ), + + // Form Description + 'descr' => array ( + 'field' => 'descr', + 'type' => 'text', + 'required' => false, + 'use' => 'a' + ), + + // Active + 'active' => array ( + 'field' => 'active', + 'type' => 'checkbox', + 'use' => 'a', + 'default' => '0' + ), + + // Required + 'required' => array ( + 'field' => 'required', + 'type' => 'checkox', + 'use' => 'a', + 'default' => '0' + ), + + // Data 1 + 'data1' => array ( + 'field' => 'data1', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // Sort + 'sort' => array ( + 'field' => 'sort', + 'type' => 'integer', + 'required' => true, + 'use' => 'a' + ), + + // Expanded + 'expanded' => array ( + 'field' => 'expanded', + 'type' => 'checkbox', + 'use' => 'a', + 'default' => '0' + ), + + // Style + 'style' => array ( + 'field' => 'style', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // File + 'file' => array ( + 'field' => 'file', + 'type' => 'text', + 'required' => '', + 'use' => 'a' + ), + + // Columns + 'cols' => array ( + 'field' => 'cols', + 'type' => 'integer', + 'required' => true, + 'use' => 'a' + ), + + // Rows + 'rows' => array ( + 'field' => 'rows', + 'type' => 'integer', + 'required' => true, + 'use' => 'a' + ), + + // Size + 'size' => array ( + 'field' => 'size', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // Format + 'format' => array ( + 'field' => 'format', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // Default Value + 'default_val' => array ( + 'field' => 'default_val', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + ); } diff --git a/classes/data/dataMfData.php b/classes/data/dataMfData.php index d127a82..d5f8e67 100644 --- a/classes/data/dataMfData.php +++ b/classes/data/dataMfData.php @@ -24,7 +24,7 @@ * @release SVN: $Id: dataAddedInfoFields.php,v 1.0 2011/01/25 19:31:47 cscott * Exp $ */ -class GlmDataRegistrationsAddedInfoFields extends GlmDataAbstract +class GlmDataRegistrationsMfData extends GlmDataAbstract { /** @@ -108,6 +108,126 @@ class GlmDataRegistrationsAddedInfoFields extends GlmDataAbstract $this->fields = array ( + + 'id' => array ( + 'field' => 'id', + 'type' => 'integer', + 'view_only' => true, + 'use' => 'a' + ), + + // FIID + 'fiid' => array ( + 'field' => 'fiid', + 'type' => 'integer', + 'required' => true, + 'use' => 'a' + ), + + // Form ID + 'form_id' => array ( + 'field' => 'form_id', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // Field ID + 'field_id' => array ( + 'field' => 'field_id', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // Level + 'level' => array ( + 'field' => 'level', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // Form Title + 'title' => array ( + 'field' => 'title', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // Form Type + 'type' => array ( + 'field' => 'type', + 'type' => 'integer', + 'required' => true, + 'use' => 'a' + ), + + // Text Type + 'txt_type' => array ( + 'field' => 'txt_type', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // Value + 'value' => array ( + 'field' => 'value', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // Number Value + 'numb_value' => array ( + 'field' => 'numb_value', + 'type' => 'float', + 'required' => true, + 'use' => 'a' + ), + + // Text Value + 'txt_value' => array ( + 'field' => 'txt_value', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // Option Number + 'opt_num' => array ( + 'field' => 'opt_num', + 'type' => 'integer', + 'required' => true, + 'use' => 'a' + ), + + // Valid + 'valid' => array ( + 'field' => 'valid', + 'type' => 'checkbox', + 'use' => 'a', + 'default' => 0 + ), + + // Required + 'required' => array ( + 'field' => 'required', + 'type' => 'checkbox', + 'use' => 'a', + 'default' => 0 + ), + + // Failure + 'failure' => array ( + 'field' => 'failure', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + ); } diff --git a/classes/data/dataRegClass.php b/classes/data/dataRegClass.php index 8a0ad2d..8993ba8 100644 --- a/classes/data/dataRegClass.php +++ b/classes/data/dataRegClass.php @@ -24,7 +24,7 @@ * @release SVN: $Id: dataAddedInfoFields.php,v 1.0 2011/01/25 19:31:47 cscott * Exp $ */ -class GlmDataRegistrationsAddedInfoFields extends GlmDataAbstract +class GlmDataRegistrationsRegClass extends GlmDataAbstract { /** @@ -107,7 +107,42 @@ class GlmDataRegistrationsAddedInfoFields extends GlmDataAbstract */ $this->fields = array ( - + + // ID + 'id' => array ( + 'field' => 'id', + 'type' => 'integer', + 'view_only' => true, + 'use' => 'a' + ), + + // Pointer to reg_event table + 'reg_event' => array ( + 'field' => 'reg_event', + 'type' => 'pointer', + 'p_table' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . 'reg_event', + 'p_field' => 'id', + 'p_static' => true, + 'required' => true, + 'use' => 'lgneud' + ), + + // Name of this registration type + 'name' => array ( + 'field' => 'name', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // Registration Description + 'descr' => array ( + 'field' => 'descr', + 'type' => 'text', + 'required' => false, + 'use' => 'a' + ), + ); } diff --git a/classes/data/dataRegEvent.php b/classes/data/dataRegEvent.php index a8683fb..bb2f9ec 100644 --- a/classes/data/dataRegEvent.php +++ b/classes/data/dataRegEvent.php @@ -24,7 +24,7 @@ * @release SVN: $Id: dataAddedInfoFields.php,v 1.0 2011/01/25 19:31:47 cscott * Exp $ */ -class GlmDataRegistrationsAddedInfoFields extends GlmDataAbstract +class GlmDataRegistrationsRegEvent extends GlmDataAbstract { /** @@ -108,6 +108,157 @@ class GlmDataRegistrationsAddedInfoFields extends GlmDataAbstract $this->fields = array ( + // ID + 'id' => array ( + 'field' => 'id', + 'type' => 'integer', + 'view_only' => true, + 'use' => 'a' + ), + + // Pointer to event in Events add-on + 'event' => array ( + 'field' => 'event', + 'type' => 'pointer', + 'p_table' => GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX . 'events', + 'p_field' => 'id', + 'p_static' => true, + 'required' => true, + 'use' => 'lgneud' + ), + + // A short code used to reference this event + 'event_code' => array ( + 'field' => 'event_code', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // E-Mail addresses to recieve notification of a registration other than org_internal_email in management, comma separated + 'notify_email' => array ( + 'field' => 'notify_email', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // Active flag for admin from Events - If false, then does not show as a link from events to manage event. Still shows in registrations admin + 'admin_active' => array ( + 'field' => 'admin_active', + 'type' => 'checkbox', + 'use' => 'a', + 'default' => 0 + ), + + // Active flag to indicate that this event is available for registrations + 'active' => array ( + 'field' => 'active', + 'type' => 'checkbox', + 'use' => 'a', + 'default' => 0 + ), + + // Registration requires attendees - Otherwise the person submitting the registration is the registrant + 'attendees' => array ( + 'field' => 'attendees', + 'type' => 'checkbox', + 'use' => 'a', + 'default' => 0 + ), + + // Attendee limit - 0 = unlimited + 'attendee_max' => array ( + 'field' => 'attendee_max', + 'type' => 'integer', + 'required' => false, + 'use' => 'a' + ), + + // Maximum attendees per registration submission - 0 = unlimited + 'attendee_max_per_reg' => array ( + 'field' => 'attendee_max_per_reg', + 'type' => 'integer', + 'required' => false, + 'use' => 'a' + ), + + // Last calculated attendee count + 'attendee_count' => array ( + 'field' => 'attendee_count', + 'type' => 'integer', + 'required' => false, + 'use' => 'a' + ), + + // Bitmap of how user accounts may be used for this event - See registration_account_option in plugin.ini + 'registration_account_options' => array ( + 'field' => 'registration_account_options', + 'type' => 'bitmap', + 'bitmap' => $this->config['registration_account_option'], + 'default' => 0, // none selected + 'use' => 'a' + ), + + // Bitmap of payment methods available to users for this event - See payment_method in plugin.ini + 'payment_methods' => array ( + 'field' => 'payment_methods', + 'type' => 'bitmap', + 'bitmap' => $this->config['payment_methods'], + 'default' => 0, // none selected + 'use' => 'a' + ), + + + // Bitmap of restricted (admin use only) payment methods for this event - see payment_method + 'restricted_payment_methods' => array ( + 'field' => 'restricted_payment_methods', + 'type' => 'bitmap', + 'bitmap' => $this->config['restricted_payment_methods'], + 'default' => 0, // none selected + 'use' => 'a' + ), + + // Terms and Conditions for registration + 'terms' => array ( + 'field' => 'terms', + 'type' => 'text', + 'required' => false, + 'use' => 'a' + ), + + // Name of a downloadable file + 'reg_file' => array ( + 'field' => 'reg_file', + 'type' => 'text', + 'required' => false, + 'use' => 'a' + ), + + // Title for downloadable file + 'reg_file_title' => array ( + 'field' => 'reg_file_title', + 'type' => 'text', + 'required' => false, + 'use' => 'a' + ), + + // Current MagicForm form revision + 'form_revision' => array ( + 'field' => 'form_revision', + 'type' => 'integer', + 'required' => false, + 'use' => 'a' + ), + + // System operator's notes for this event - Not visible to users + 'notes' => array ( + 'field' => 'notes', + 'type' => 'text', + 'required' => false, + 'use' => 'a' + ), + ); } diff --git a/classes/data/dataRegRates.php b/classes/data/dataRegRates.php index d22a42e..5aa128a 100644 --- a/classes/data/dataRegRates.php +++ b/classes/data/dataRegRates.php @@ -24,7 +24,7 @@ * @release SVN: $Id: dataAddedInfoFields.php,v 1.0 2011/01/25 19:31:47 cscott * Exp $ */ -class GlmDataRegistrationsAddedInfoFields extends GlmDataAbstract +class GlmDataRegistrationsRegRates extends GlmDataAbstract { /** @@ -107,7 +107,79 @@ class GlmDataRegistrationsAddedInfoFields extends GlmDataAbstract */ $this->fields = array ( - + + // ID + 'id' => array ( + 'field' => 'id', + 'type' => 'integer', + 'view_only' => true, + 'use' => 'a' + ), + + // Pointer to reg_event table + 'reg_event' => array ( + 'field' => 'id', + 'as' => 'reg_event', + 'type' => 'pointer', + 'p_table' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . 'reg_event', + 'p_field' => 'id', + 'p_static' => true, + 'required' => true, + 'use' => 'lgneud' + ), + + // Pointer to reg_class table + 'reg_class' => array ( + 'field' => 'id', + 'as' => 'reg_class', + 'type' => 'pointer', + 'p_table' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . 'reg_class', + 'p_field' => 'id', + 'p_static' => true, + 'required' => true, + 'use' => 'lgneud' + ), + + // # of days before event time rate becomes available - may be entered as a date then coverted for storage + 'start_days' => array ( + 'field' => 'start_days', + 'type' => 'integer', + 'required' => false, + 'use' => 'a' + ), + + // # of days before event time rate becomes available - may be entered as a date then coverted for storage + 'end_days' => array ( + 'field' => 'end_days', + 'type' => 'integer', + 'required' => false, + 'use' => 'a' + ), + + // Base rate to register + 'base_rate' => array ( + 'field' => 'base_rate', + 'type' => 'money', + 'required' => false, + 'use' => 'a' + ), + + // Rate per registrant + 'per_registrant' => array ( + 'field' => 'per_registrant', + 'type' => 'money', + 'required' => false, + 'use' => 'a' + ), + + // Number of registrants included in base rate + 'registrant_credits' => array ( + 'field' => 'registrant_credits', + 'type' => 'integer', + 'required' => false, + 'use' => 'a' + ), + ); } diff --git a/classes/data/dataRegRequest.php b/classes/data/dataRegRequest.php index 8159185..b685f14 100644 --- a/classes/data/dataRegRequest.php +++ b/classes/data/dataRegRequest.php @@ -24,7 +24,7 @@ * @release SVN: $Id: dataAddedInfoFields.php,v 1.0 2011/01/25 19:31:47 cscott * Exp $ */ -class GlmDataRegistrationsAddedInfoFields extends GlmDataAbstract +class GlmDataRegistrationsRequest extends GlmDataAbstract { /** @@ -107,7 +107,238 @@ class GlmDataRegistrationsAddedInfoFields extends GlmDataAbstract */ $this->fields = array ( - + + // ID + 'id' => array ( + 'field' => 'id', + 'type' => 'integer', + 'view_only' => true, + 'use' => 'a' + ), + + // Pointer to user account (table: account) who submitted the registrations + 'account' => array ( + 'field' => 'contact_id', + 'type' => 'pointer', + 'p_table' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . 'account', + 'p_field' => 'id', + 'p_static' => true, + '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 + 'pay_method' => array ( + 'field' => 'pay_method', + 'type' => 'bitmap', + 'bitmap' => $this->config['payment_methods'], + 'default' => 0, // none selected + '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, + 'use' => 'lgneud' + ), + + // See submission_status in plugin.ini + 'status' => array ( + 'field' => 'status', + 'type' => 'bitmap', + 'bitmap' => $this->config['submission_status'], + 'default' => 0, // none selected + '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', + 'type' => 'bitmap', + 'bitmap' => $this->config['credit_card'], + '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' + ), + ); } diff --git a/classes/data/dataRegRequestClass.php b/classes/data/dataRegRequestClass.php index 61c22f0..cb3b16b 100644 --- a/classes/data/dataRegRequestClass.php +++ b/classes/data/dataRegRequestClass.php @@ -24,7 +24,7 @@ * @release SVN: $Id: dataAddedInfoFields.php,v 1.0 2011/01/25 19:31:47 cscott * Exp $ */ -class GlmDataRegistrationsAddedInfoFields extends GlmDataAbstract +class GlmDataRegistrationsRequestClass extends GlmDataAbstract { /** @@ -107,7 +107,83 @@ class GlmDataRegistrationsAddedInfoFields extends GlmDataAbstract */ $this->fields = array ( - + + // ID + 'id' => array ( + 'field' => 'id', + 'type' => 'integer', + 'view_only' => true, + 'use' => 'a' + ), + + // Pointer to account (person submitting the registration) + 'account' => array ( + 'field' => 'contact_id', + 'type' => 'pointer', + 'p_table' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . 'account', + 'p_field' => 'id', + 'p_static' => true, + 'required' => true, + 'use' => 'lgneud' + ), + + // Pointer to reg_event + 'event' => array ( + 'field' => 'event', + 'type' => 'pointer', + 'p_table' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . 'reg_event', + 'p_field' => 'id', + 'p_static' => true, + 'required' => true, + 'use' => 'lgneud' + ), + + // Pointer to event_times table entry in Events add-on + 'event_time' => array ( + 'field' => 'event_time', + 'type' => 'pointer', + 'p_table' => GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX . 'event_times', + 'p_field' => 'id', + 'p_static' => true, + 'required' => true, + 'use' => 'lgneud' + ), + + // Pointer to reg_request_event table + 'reg_request_event' => array ( + 'field' => 'reg_request_event', + 'type' => 'pointer', + 'p_table' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . 'reg_request_event', + 'p_field' => 'id', + 'p_static' => true, + 'required' => true, + 'use' => 'lgneud' + ), + + // Last calculated total of all charges for registration to this event for all registrants + 'total_class_charge' => array ( + 'field' => 'total_class_charge', + 'type' => 'money', + 'required' => false, + 'use' => 'a' + ), + + // Any MagicForm data associated with requested event + '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' + ), + ); } diff --git a/classes/data/dataRegRequestEvent.php b/classes/data/dataRegRequestEvent.php index 6ea4d2c..d87ff4e 100644 --- a/classes/data/dataRegRequestEvent.php +++ b/classes/data/dataRegRequestEvent.php @@ -108,6 +108,81 @@ class GlmDataRegistrationsAddedInfoFields extends GlmDataAbstract $this->fields = array ( + // ID + 'id' => array ( + 'field' => 'id', + 'type' => 'integer', + 'view_only' => true, + 'use' => 'a' + ), + + // Pointer to account (person submitting the registration) + 'account' => array ( + 'field' => 'contact_id', + 'type' => 'pointer', + 'p_table' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . 'account', + 'p_field' => 'id', + 'p_static' => true, + 'required' => true, + 'use' => 'lgneud' + ), + + // Pointer to reg_request table + 'reg_request' => array ( + 'field' => 'reg_request', + 'type' => 'pointer', + 'p_table' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . 'reg_request', + 'p_field' => 'id', + 'p_static' => true, + 'required' => true, + 'use' => 'lgneud' + ), + + // Pointer to reg_event + 'event' => array ( + 'field' => 'event', + 'type' => 'pointer', + 'p_table' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . 'reg_event', + 'p_field' => 'id', + 'p_static' => true, + 'required' => true, + 'use' => 'lgneud' + ), + + // Pointer to event_times table entry in Events add-on + 'event_time' => array ( + 'field' => 'event_time', + 'type' => 'pointer', + 'p_table' => GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX . 'event_times', + 'p_field' => 'id', + 'p_static' => true, + 'required' => true, + 'use' => 'lgneud' + ), + + // Last calculated total of all charges for registration to this event for all registrants + 'total_charge' => array ( + 'field' => 'total_charge', + 'type' => 'money', + 'required' => false, + 'use' => 'a' + ), + + // System operator's notes for this registration request + 'notes' => array ( + 'field' => 'notes', + 'type' => 'text', + 'required' => false, + 'use' => 'a' + ), + // Any MagicForm data associated with requested event + 'mf_data' => array ( + 'field' => 'mf_data', + 'type' => 'text', + 'required' => false, + 'use' => 'a' + ), + ); } -- 2.17.1