From: Steve Sutton Date: Mon, 25 Jun 2018 18:23:13 +0000 (-0400) Subject: New data class for the email notification table. X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=5f336e7066f9840ad58185719645c3add944497e;p=WP-Plugins%2Fglm-member-db.git New data class for the email notification table. This is for the new table for email notifications. --- diff --git a/classes/data/settings/dataSettingsNotifications.php b/classes/data/settings/dataSettingsNotifications.php new file mode 100644 index 00000000..0c93ea09 --- /dev/null +++ b/classes/data/settings/dataSettingsNotifications.php @@ -0,0 +1,158 @@ + + * @license http://www.gaslightmedia.com Gaslightmedia + * @release SVN: $Id: dataSettingsGeneral.php,v 1.0 2011/01/25 19:31:47 cscott Exp $ + */ + +/** + * GlmDataSettingsGeneral class + * + * PHP version 5 + * + * @category Data + * @package EventManagement + * @author Chuck Scott + * @license http://www.gaslightmedia.com Gaslightmedia + * @release SVN: $Id: dataMembers.php,v 1.0 2011/01/25 19:31:47 cscott + * Exp $ + */ +class GlmDataSettingsNotifications extends GlmDataAbstract +{ + + /** + * WordPress Database Object + * + * @var $wpdb + * @access public + */ + public $wpdb; + /** + * Plugin Configuration Data + * + * @var $config + * @access public + */ + public $config; + /** + * Field definitions + * + * @var $ini + * @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 + * + * @return void + * @access public + */ + function __construct ($wpdb, $config) + { + + // 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_PLUGIN_DB_PREFIX . 'email_notifications'; + + /* + * Table Data Fields + */ + $this->fields = array( + + 'id' => array( + 'field' => 'id', + 'type' => 'integer', + 'view_only' => true, + 'use' => 'a' + ), + + // To Email + 'to_email' => array( + 'field' => 'to_email', + 'type' => 'text', + 'use' => 'a' + ), + + // From Email + 'from_email' => array( + 'field' => 'from_email', + 'type' => 'text', + 'use' => 'a' + ), + + // Approved Message + 'approved_message' => array( + 'field' => 'approved_message', + 'type' => 'text', + 'use' => 'a' + ), + + // Declined Message + 'declined_message' => array( + 'field' => 'declined_message', + 'type' => 'text', + 'use' => 'a' + ), + + // Notification Message + 'notification_message' => array( + 'field' => 'notification_message', + 'type' => 'text', + 'use' => 'a' + ), + + ); + + } +} + +?>