From 0a94f97a752c58bac65b45af0f1d9311e3d6fc58 Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Mon, 6 Feb 2017 16:34:16 -0500 Subject: [PATCH] Completed the dataMisc.php file. --- classes/data/dataMisc.php | 254 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 254 insertions(+) create mode 100644 classes/data/dataMisc.php diff --git a/classes/data/dataMisc.php b/classes/data/dataMisc.php new file mode 100644 index 0000000..00cee5a --- /dev/null +++ b/classes/data/dataMisc.php @@ -0,0 +1,254 @@ + + * @license http://www.gaslightmedia.com Gaslightmedia + * @release SVN: $Id: dataMisc.php,v 1.0 2011/01/25 19:31:47 cscott Exp $ + */ + +/** + * GlmDataRegistrationsMisc class + * + * PHP version 5 + * + * @category Data + * @package GLM Member DB + * @author Chuck Scott + * @license http://www.gaslightmedia.com Gaslightmedia + * @release SVN: $Id: dataMisc.php,v 1.0 2011/01/25 19:31:47 cscott + * Exp $ + */ +class GlmDataRegistrationsMisc 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 . 'misc'; + + /* + * Table Data Fields + */ + + $this->fields = array ( + + // Registration Bulletin + 'reg_bulletin' => array ( + 'field' => 'reg_bulletin', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // Text for top of Cart Page + 'cart_page_text' => array ( + 'field' => 'cart_page_text', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // Text for top of checkout page + 'checkout_page_text' => array ( + 'field' => 'checkout_page_text', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // Text for top of summary page (after checkout) + 'summary_page_text' => array ( + 'field' => 'summary_page_text', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // Terms and Conditions + 'reg_terms' => array ( + 'field' => 'reg_terms', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // Subject of notification E-Mail to site owner + 'notify_subject' => array ( + 'field' => 'notify_subject', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // Notification E-Mail text for site owner + 'notify_text' => array ( + 'field' => 'notify_text', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // Subject of notification E-Mail to instructor + 'instr_notify_subject' => array ( + 'field' => 'instr_notify_subject', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // Notification E-Mail text for instructor + 'instr_notify_text' => array ( + 'field' => 'instr_notify_text', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // Subject of notification E-Mail to person submitting the registrations + 'submission_notify_subject' => array ( + 'field' => 'submission_notify_subject', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // Notification E-Mail text to person submitting the registrations + 'submission_notify_text' => array ( + 'field' => 'submission_notify_text', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // Subject of notification E-Mail to registrant + 'registrant_notify_subject' => array ( + 'field' => 'registrant_notify_subject', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // Text of notification E-Mail to registrant + 'registrant_notify_text' => array ( + 'field' => 'registrant_notify_text', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // Subject of acknowledgement E-Mail to person submitting the registrations + 'submission_ack_subject' => array ( + 'field' => 'submission_ack_subject', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // Text of acknowledgement E-Mail text to person submitting the registrations + 'submission_ack_text' => array ( + 'field' => 'submission_ack_text', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // Subject of acknowledgement E-Mail to registrant + 'registrant_ack_subject' => array ( + 'field' => 'registrant_ack_subject', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // Text of acknowledgement E-Mail to registrant + 'registrant_ack_text' => array ( + 'field' => 'registrant_ack_text', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ) + + ); + + } + + +} + +?> \ No newline at end of file -- 2.17.1