From: Chuck Scott Date: Wed, 8 Feb 2017 02:53:13 +0000 (-0500) Subject: Added 3 more data classes (roughed in) X-Git-Tag: v1.0.0^2~512 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=76d364d482cf0223c9b790f69f932861697a09c1;p=WP-Plugins%2Fglm-member-db-registrations.git Added 3 more data classes (roughed in) --- diff --git a/classes/data/dataAddedInfoData.php b/classes/data/dataAddedInfoData.php new file mode 100644 index 0000000..67981da --- /dev/null +++ b/classes/data/dataAddedInfoData.php @@ -0,0 +1,150 @@ + + * @license http://www.gaslightmedia.com Gaslightmedia + * @release SVN: $Id: dataAddedInfoData.php,v 1.0 2011/01/25 19:31:47 cscott Exp $ + */ + +/** + * GlmDataRegistrationsAddedInfoData class + * + * PHP version 5 + * + * @category Data + * @package GLM Member DB + * @author Chuck Scott + * @license http://www.gaslightmedia.com Gaslightmedia + * @release SVN: $Id: dataAddedInfoData.php,v 1.0 2011/01/25 19:31:47 cscott + * Exp $ + */ +class GlmDataRegistrationsAddedInfoData 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 . 'added_info_data'; + + /* + * Table Data Fields + */ + + $this->fields = array ( + + // Pointer to Added Info Field + 'added_info_field' => array ( + 'field' => 'added_info_field', + 'type' => 'integer', + 'required' => true, + 'use' => 'a' + ), + + // Ref Type + 'ref_type' => array ( + 'field' => 'ref_type', + 'type' => 'list', + 'list' => $this->config['data_ref_type'], + 'required' => true, + 'use' => 'a' + ), + + // Ref Destination - Pointer to entry of type Ref Type + 'ref_dest' => array ( + 'field' => 'ref_dest', + 'type' => 'integer', + 'required' => true, + 'use' => 'a' + ), + + // Text value of field + 'field_value' => array ( + 'field' => 'field_value', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ) + + ); + + } + +} + +?> \ No newline at end of file diff --git a/classes/data/dataAddedInfoFields.php b/classes/data/dataAddedInfoFields.php new file mode 100644 index 0000000..fb9110c --- /dev/null +++ b/classes/data/dataAddedInfoFields.php @@ -0,0 +1,150 @@ + + * @license http://www.gaslightmedia.com Gaslightmedia + * @release SVN: $Id: dataAddedInfoFields.php,v 1.0 2011/01/25 19:31:47 cscott Exp $ + */ + +/** + * GlmDataRegistrationsAddedInfoFields class + * + * PHP version 5 + * + * @category Data + * @package GLM Member DB + * @author Chuck Scott + * @license http://www.gaslightmedia.com Gaslightmedia + * @release SVN: $Id: dataAddedInfoFields.php,v 1.0 2011/01/25 19:31:47 cscott + * Exp $ + */ +class GlmDataRegistrationsAddedInfoFields 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 . 'added_info_fields'; + + /* + * Table Data Fields + */ + + $this->fields = array ( + + // Ref Type + 'ref_type' => array ( + 'field' => 'ref_type', + 'type' => 'list', + 'list' => $this->config['data_ref_type'], + 'required' => true, + 'use' => 'a' + ), + + // Ref Destination - Pointer to entry of type Ref Type + 'ref_dest' => array ( + 'field' => 'ref_dest', + 'type' => 'integer', + 'required' => true, + 'use' => 'a' + ), + + // Name of field / prompt + 'name' => array ( + 'field' => 'name', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // Field description / explantion + 'description' => array ( + 'field' => 'description', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ) + + ); + + } + +} + +?> \ No newline at end of file diff --git a/classes/data/dataPaymentCode.php b/classes/data/dataPaymentCode.php new file mode 100644 index 0000000..219c2b3 --- /dev/null +++ b/classes/data/dataPaymentCode.php @@ -0,0 +1,159 @@ + + * @license http://www.gaslightmedia.com Gaslightmedia + * @release SVN: $Id: dataPaymentCode.php,v 1.0 2011/01/25 19:31:47 cscott Exp $ + */ + +/** + * GlmDataRegistrationsPaymentCode class + * + * PHP version 5 + * + * @category Data + * @package GLM Member DB + * @author Chuck Scott + * @license http://www.gaslightmedia.com Gaslightmedia + * @release SVN: $Id: dataAddedInfoFields.php,v 1.0 2011/01/25 19:31:47 cscott + * Exp $ + */ +class GlmDataRegistrationsPaymentCode 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 . 'payment_code'; + + /* + * Table Data Fields + */ + + $this->fields = array ( + + // Payment Code Type + 'code_type' => array ( + 'field' => 'code_type', + 'type' => 'list', + 'list' => $this->config['pay_code_type'], + 'required' => true, + 'use' => 'a' + ), + + // Ref Type + 'ref_type' => array ( + 'field' => 'ref_type', + 'type' => 'list', + 'list' => $this->config['payment_ref_type'], + 'required' => true, + 'use' => 'a' + ), + + // Payment Code + 'code' => array ( + 'field' => 'code', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // Name of field / prompt + 'amount' => array ( + 'field' => 'amount', + 'type' => 'money', + 'required' => true, + 'use' => 'a' + ), + + // Field description / explantion + 'descr' => array ( + 'field' => 'descr', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ) + + ); + + } + +} + +?> \ No newline at end of file