Completed the dataMisc.php file.
authorChuck Scott <cscott@gaslightmedia.com>
Mon, 6 Feb 2017 21:34:16 +0000 (16:34 -0500)
committerChuck Scott <cscott@gaslightmedia.com>
Mon, 6 Feb 2017 21:34:16 +0000 (16:34 -0500)
classes/data/dataMisc.php [new file with mode: 0644]

diff --git a/classes/data/dataMisc.php b/classes/data/dataMisc.php
new file mode 100644 (file)
index 0000000..00cee5a
--- /dev/null
@@ -0,0 +1,254 @@
+<?php
+/**
+ * GLM Member-DB WordPress Add-On Plugin
+ * Registrations Misc 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: 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 <cscott@gaslightmedia.com>
+ * @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