--- /dev/null
+<?php
+/**
+ * GLM Member-DB WordPress Add-On Plugin
+ * Registrations Event Times 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: dataRegTime.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ */
+
+/**
+ * GlmDataRegistrationsRegTime 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: dataRegTime.php,v 1.0 2011/01/25 19:31:47 cscott
+ * Exp $
+ */
+class GlmDataRegistrationsRegTime 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 . 'reg_event';
+
+ /*
+ * Table Data Fields
+ */
+
+ $this->fields = array (
+
+ // ID
+ 'id' => array (
+ 'field' => 'id',
+ 'type' => 'integer',
+ 'view_only' => true,
+ 'use' => 'a'
+ ),
+
+ // Pointer to event in Events add-on
+ 'event' => array (
+ 'field' => 'event',
+ 'type' => 'integer',
+ 'required' => true,
+ 'use' => 'lgneud'
+ ),
+
+ // Pointer to event times table entries in Events add-on
+ 'event_time' => array (
+ 'field' => 'event_time',
+ 'type' => 'integer',
+ 'required' => true,
+ 'use' => 'lgneud'
+ ),
+
+ // Starting date and time for this event - This data comes from the events plug-in tables
+ 'start_datetime' => array (
+ 'field' => 'start_datetime',
+ 'type' => 'datetime',
+ 'use' => 'lgneud'
+ ),
+
+ // Ending date and time for this event - This data comes from the events plug-in tables
+ 'end_datetime' => array (
+ 'field' => 'end_datetime',
+ 'type' => 'datetime',
+ 'use' => 'lgneud'
+ ),
+
+ // All day flag - This data comes from the events plug-in tables
+ 'all_day' => array (
+ 'field' => 'all_day',
+ 'type' => 'checkbox',
+ 'use' => 'lgneud'
+ ),
+
+ // Track Attendees for this event - This data comes from the events plug-in tables
+ 'attendees' => array (
+ 'field' => 'attendees',
+ 'type' => 'checkbox',
+ 'use' => 'lgneud'
+ ),
+
+ // Maximum number of attendees
+ 'attendee_max' => array (
+ 'field' => 'attendee_max',
+ 'type' => 'integer',
+ 'use' => 'lgneud'
+ ),
+
+ // Current attendee count - Calculated on the fly at times
+ 'attendee_count' => array (
+ 'field' => 'attendee_count',
+ 'type' => 'integer',
+ 'use' => 'lgneud'
+ ),
+
+ // Current number of attendees for this time in active pending carts (not processed)
+ 'attendees_pending' => array (
+ 'field' => 'attendees_pending',
+ 'type' => 'integer',
+ 'use' => 'lgneud'
+ ),
+
+ // Currently available attendee count
+ 'attendees_available' => array (
+ 'field' => 'attendees_available',
+ 'type' => 'integer',
+ 'use' => 'lgneud'
+ ),
+
+ // Total base charges
+ 'total_base_charge' => array (
+ 'field' => 'total_base_charge',
+ 'type' => 'money',
+ 'use' => 'lgneud'
+ ),
+
+ // Total per-attendee charges
+ 'total_per_attendee' => array (
+ 'field' => 'total_per_attendee',
+ 'type' => 'money',
+ 'use' => 'lgneud'
+ ),
+
+ // Total other charges (meals, extras, fees, ...)
+ 'total_other' => array (
+ 'field' => 'total_other',
+ 'type' => 'money',
+ 'use' => 'lgneud'
+ ),
+
+ // Total taxes charged
+ 'total_taxes' => array (
+ 'field' => 'total_taxes',
+ 'type' => 'money',
+ 'use' => 'lgneud'
+ ),
+
+ // Total charges (sum of all above)
+ 'total_charges' => array (
+ 'field' => 'total_charges',
+ 'type' => 'money',
+ 'use' => 'lgneud'
+ ),
+
+ // Total discounts of all types (applied payment codes, etc...)
+ 'total_discounts' => array (
+ 'field' => 'total_discounts',
+ 'type' => 'money',
+ 'use' => 'lgneud'
+ ),
+
+ // Total net payments (total charges - total discounts)
+ 'total_payments' => array (
+ 'field' => 'total_payments',
+ 'type' => 'money',
+ 'use' => 'lgneud'
+ )
+
+ );
+
+ }
+
+}
+
+?>
\ No newline at end of file