--- /dev/null
+<?php
+/**
+ * GLM Member-DB WordPress Add-On Plugin
+ * Registrations Management data class
+ *
+ * PHP version 5.3
+ *
+ * @category Data
+ * @package GLM Member-DB
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataManagement.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ */
+
+/**
+ * GlmDataManagementRegistrations class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package GLM Member DB
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataManagement.php,v 1.0 2011/01/25 19:31:47 cscott
+ * Exp $
+ */
+class GlmDataRegistrationsManagement extends GlmDataAbstract
+{
+
+ /**
+ * WordPress Database Object
+ *
+ * @var $wpdb
+ * @access public
+ */
+ public $wpdb;
+ /**
+ * Plugin Configuration Data
+ *
+ * @var $config
+ * @access public
+ */
+ public $config;
+ /**
+ * Data Table Name
+ *
+ * @var $table
+ * @access public
+ */
+ public $table;
+ /**
+ * Field definitions
+ *
+ * 'type' is type of field as defined by the application
+ * text Regular text field
+ * pointer Pointer to an entry in another table
+ * 'filters' is the filter name for a particular filter ID in PHP filter
+ * functions
+ * See PHP filter_id()
+ *
+ * 'use' is when to use the field
+ * l = List
+ * g = Get
+ * n = New
+ * i = Insert
+ * e = Edit
+ * u = Update
+ * d = Delete
+ * a = All
+ *
+ * @var $ini
+ * @access public
+ */
+ public $fields = false;
+
+ /**
+ * Constructor
+ *
+ * @param object $d database connection
+ * @param array $config Configuration array
+ * @param bool $limitedEdit Flag to say indicate limited edit requested
+ *
+ * @return void
+ * @access public
+ */
+ public function __construct($wpdb, $config, $limitedEdit = false)
+ {
+
+ // If this class is not being extended along with existing $wpdb and $config
+ if (!$this->wpdb) {
+
+ // Save WordPress Database object
+ $this->wpdb = $wpdb;
+
+ // Save plugin configuration object
+ $this->config = $config;
+
+ }
+
+ /*
+ * Table Name
+ */
+ $this->table = GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . 'management';
+
+ /*
+ * Table Data Fields
+ */
+
+ $this->fields = array (
+
+ 'id' => array (
+ 'field' => 'id',
+ 'type' => 'integer',
+ 'view_only' => true,
+ 'use' => 'a'
+ ),
+
+ // Site Owner Organization Name
+ 'org_name' => array (
+ 'field' => 'org_name',
+ 'type' => 'text',
+ 'required' => true,
+ 'use' => 'a'
+ ),
+
+ // Site Owner Organization Short Name
+ 'org_short' => array (
+ 'field' => 'org_short',
+ 'type' => 'text',
+ 'required' => true,
+ 'use' => 'a'
+ ),
+
+ // Site Owner Organization Address
+ 'org_address' => array (
+ 'field' => 'org_address',
+ 'type' => 'text',
+ 'required' => true,
+ 'use' => 'a'
+ ),
+
+ // Site Owner Organization City
+ 'org_city' => array (
+ 'field' => 'org_city',
+ 'type' => 'text',
+ 'required' => true,
+ 'use' => 'a'
+ ),
+
+ // Site Owner Organization State
+ 'org_state' => array (
+ 'field' => 'org_state',
+ 'type' => 'text',
+ 'required' => true,
+ 'use' => 'a'
+ ),
+
+ // Site Owner Organization ZIP/Postal Code
+ 'org_zip' => array (
+ 'field' => 'org_zip',
+ 'type' => 'text',
+ 'required' => true,
+ 'use' => 'a'
+ ),
+
+ // Site Owner Organization Phone
+ 'org_phone' => array (
+ 'field' => 'org_phone',
+ 'type' => 'text',
+ 'required' => true,
+ 'use' => 'a'
+ ),
+
+ // Site Owner Organization Toll Free
+ 'org_toll_free' => array (
+ 'field' => 'org_toll_free',
+ 'type' => 'text',
+ 'required' => true,
+ 'use' => 'a'
+ ),
+
+ // Site Owner Organization Internal E-Mail Address
+ 'org_internal_email' => array (
+ 'field' => 'org_internal_email',
+ 'type' => 'text',
+ 'required' => true,
+ 'use' => 'a'
+ ),
+
+ // Site Owner Organization E-Mail From Address
+ 'org_from_email' => array (
+ 'field' => 'org_from_email',
+ 'type' => 'text',
+ 'required' => true,
+ 'use' => 'a'
+ ),
+
+ // Payment Methods Selected - Bitmap
+ 'payment_methods' => array (
+ 'field' => 'payment_methods',
+ 'type' => 'bitmap',
+ 'bitmap' => $this->config['payment_method'],
+ 'default' => 0, // none selected
+ 'use' => 'a'
+ ),
+
+ // Processing Methods Selected - Bitmap
+ 'proc_methods' => array (
+ 'field' => 'proc_methods',
+ 'type' => 'bitmap',
+ 'bitmap' => $this->config['proc_method'],
+ 'default' => 0, // none selected
+ 'use' => 'a'
+ ),
+
+ // Credit Cards Accepted Selected - Bitmap
+ 'cc_accepts' => array (
+ 'field' => 'cc_accepts',
+ 'type' => 'bitmap',
+ 'bitmap' => $this->config['credit_card'],
+ 'default' => 0, // none selected
+ 'use' => 'a'
+ ),
+
+ // Authorize.net Login
+ 'authorize_net_login' => array (
+ 'field' => 'authorize_net_login',
+ 'type' => 'text',
+ 'required' => true,
+ 'use' => 'a'
+ ),
+
+ // Authorize.net Key
+ 'authorize_net_key' => array (
+ 'field' => 'authorize_net_key',
+ 'type' => 'text',
+ 'required' => true,
+ 'use' => 'a'
+ ),
+
+ // Authorize.net Test Mode
+ 'authorize_net_test' => array (
+ 'field' => 'authorize_net_test',
+ 'type' => 'list',
+ 'list' => $this->config['proc_test_mode'],
+ 'required' => true,
+ 'default' => $this->config['proc_test_mode_numb']['Local Approval Test'],
+ 'use' => 'a'
+ ),
+
+ // Authorize.net Merchant Email
+ 'authorize_net_merchant_email' => array (
+ 'field' => 'authorize_net_merchant_email',
+ 'type' => 'text',
+ 'required' => true,
+ 'use' => 'a'
+ ),
+
+ // Merchant Solutions Account ID
+ 'merchant_solutions_acctid' => array (
+ 'field' => 'merchant_solutions_acctid',
+ 'type' => 'text',
+ 'required' => true,
+ 'use' => 'a'
+ ),
+
+ // Merchant Solutions Merchant PIN
+ 'merchant_solutions_merchantpin' => array (
+ 'field' => 'merchant_solutions_merchantpin',
+ 'type' => 'text',
+ 'required' => true,
+ 'use' => 'a'
+ ),
+
+ // Merchant Solutions Test Mode
+ 'merchant_solutions_test' => array (
+ 'field' => 'merchant_solutions_test',
+ 'type' => 'list',
+ 'list' => $this->config['proc_test_mode'],
+ 'required' => true,
+ 'default' => $this->config['proc_test_mode_numb']['Local Approval Test'],
+ 'use' => 'a'
+ ),
+
+ // Always Use Full Billing Info
+ 'full_billing_info' => array (
+ 'field' => 'full_billing_info',
+ 'type' => 'checkbox',
+ 'use' => 'a',
+ 'default' => 0,
+ ),
+
+ // Billing Info used for No Charge - Bitmap
+ 'bill_info_req_no_charge' => array (
+ 'field' => 'bill_info_req_no_charge',
+ 'type' => 'bitmap',
+ 'bitmap' => $this->config['billing_field'],
+ 'default' => 0, // none selected
+ 'use' => 'a'
+ ),
+
+ // Billing Info used for No Charge - Bitmap
+ 'bill_info_req_comp_code' => array (
+ 'field' => 'bill_info_req_comp_code',
+ 'type' => 'bitmap',
+ 'bitmap' => $this->config['billing_field'],
+ 'default' => 0, // none selected
+ 'use' => 'a'
+ ),
+
+ // Billing Info used for Comp Code - Bitmap
+ 'bill_info_req_comp_code' => array (
+ 'field' => 'bill_info_req_comp_code',
+ 'type' => 'bitmap',
+ 'bitmap' => $this->config['billing_field'],
+ 'default' => 0, // none selected
+ 'use' => 'a'
+ ),
+
+ // Billing Info used for Cash - Bitmap
+ 'bill_info_req_cash' => array (
+ 'field' => 'bill_info_req_cash',
+ 'type' => 'bitmap',
+ 'bitmap' => $this->config['billing_field'],
+ 'default' => 0, // none selected
+ 'use' => 'a'
+ ),
+
+ // Billing Info used for Check - Bitmap
+ 'bill_info_req_check' => array (
+ 'field' => 'bill_info_req_check',
+ 'type' => 'bitmap',
+ 'bitmap' => $this->config['billing_field'],
+ 'default' => 0, // none selected
+ 'use' => 'a'
+ ),
+
+ // Billing Info used for Credit Card - Bitmap
+ 'bill_info_req_credit_card' => array (
+ 'field' => 'bill_info_req_credit_card',
+ 'type' => 'bitmap',
+ 'bitmap' => $this->config['billing_field'],
+ 'default' => 0, // none selected
+ 'use' => 'a'
+ ),
+
+ // Billing Info used for Payment by Call From Merchant - Bitmap
+ 'bill_info_req_merchant_call' => array (
+ 'field' => 'bill_info_req_merchant_call',
+ 'type' => 'bitmap',
+ 'bitmap' => $this->config['billing_field'],
+ 'default' => 0, // none selected
+ 'use' => 'a'
+ ),
+
+ // Enable Request for Medical Info
+ 'medical_info' => array (
+ 'field' => 'medical_info',
+ 'type' => 'checkbox',
+ 'use' => 'a',
+ 'default' => 0,
+ ),
+
+ // Term for Registrations Name
+ 'term_registrations_name' => array (
+ 'field' => 'term_registrations_name',
+ 'type' => 'text',
+ 'required' => true,
+ 'use' => 'a'
+ ),
+
+ // Term for
+ 'term_registration' => array (
+ 'field' => 'term_registration',
+ 'type' => 'text',
+ 'required' => true,
+ 'use' => 'a'
+ ),
+
+ // Term for
+ 'term_registrations' => array (
+ 'field' => 'term_registrations',
+ 'type' => 'text',
+ 'required' => true,
+ 'use' => 'a'
+ ),
+
+ // Term for
+ 'term_register' => array (
+ 'field' => 'term_register',
+ 'type' => 'text',
+ 'required' => true,
+ 'use' => 'a'
+ ),
+
+ // Term for
+ '' => array (
+ 'field' => '',
+ 'type' => 'text',
+ 'required' => true,
+ 'use' => 'a'
+ ),
+
+ // Term for
+ '' => array (
+ 'field' => '',
+ 'type' => 'text',
+ 'required' => true,
+ 'use' => 'a'
+ ),
+
+ // Term for
+ '' => array (
+ 'field' => '',
+ 'type' => 'text',
+ 'required' => true,
+ 'use' => 'a'
+ ),
+
+ // Term for
+ '' => array (
+ 'field' => '',
+ 'type' => 'text',
+ 'required' => true,
+ 'use' => 'a'
+ ),
+
+ // Term for
+ '' => array (
+ 'field' => '',
+ 'type' => 'text',
+ 'required' => true,
+ 'use' => 'a'
+ ),
+
+ // Term for
+ '' => array (
+ 'field' => '',
+ 'type' => 'text',
+ 'required' => true,
+ 'use' => 'a'
+ ),
+
+ // Term for
+ '' => array (
+ 'field' => '',
+ 'type' => 'text',
+ 'required' => true,
+ 'use' => 'a'
+ ),
+
+ // Term for
+ '' => array (
+ 'field' => '',
+ 'type' => 'text',
+ 'required' => true,
+ 'use' => 'a'
+ ),
+
+ // Term for
+ '' => array (
+ 'field' => '',
+ 'type' => 'text',
+ 'required' => true,
+ 'use' => 'a'
+ ),
+
+ // Term for
+ '' => array (
+ 'field' => '',
+ 'type' => 'text',
+ 'required' => true,
+ 'use' => 'a'
+ ),
+
+ // Term for
+ '' => array (
+ 'field' => '',
+ 'type' => 'text',
+ 'required' => true,
+ 'use' => 'a'
+ ),
+
+ // Term for
+ '' => array (
+ 'field' => '',
+ 'type' => 'text',
+ 'required' => true,
+ 'use' => 'a'
+ ),
+
+
+
+
+
+/*
+
+ 'type' => 'list',
+ 'list' => $this->config['payment_method'],
+ 'required' => true,
+ 'default' => $this->config['status_numb']['Pending'],
+ 'use' => 'a'
+ ),
+ */
+
+
+
+
+ );
+
+ }
+
+
+}
+
+?>
\ No newline at end of file