From: Steve Sutton Date: Mon, 15 Feb 2016 16:25:19 +0000 (-0500) Subject: Move files to the correct name X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=a4f81ea80a446fcef62a3ebf71f543d45cfe8c85;p=user%2Fsteve%2Fglm-member-db-events.git Move files to the correct name update from sample to events --- diff --git a/classes/data/dataEvents.php b/classes/data/dataEvents.php new file mode 100644 index 0000000..648e2d6 --- /dev/null +++ b/classes/data/dataEvents.php @@ -0,0 +1,161 @@ + + * @license http://www.gaslightmedia.com Gaslightmedia + * @release SVN: $Id: dataEvents.php,v 1.0 2011/01/25 19:31:47 cscott Exp $ + */ + +// Member Info Data required +require_once(GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataMemberInfo.php'); + +/** + * GlmDataEvents class + * + * PHP version 5 + * + * @category Data + * @package GLM Member DB + * @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 GlmDataEvents 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; + /** + * MemberInfo DB object + * + * @var $MemberInfo + * @access public + */ + public $MemberInfo; + + /** + * 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_EVENTS_PLUGIN_DB_PREFIX . 'eventstable'; + + /* + * Table Data Fields + */ + + $this->fields = array ( + + 'id' => array ( + 'field' => 'id', + 'type' => 'integer', + 'view_only' => true, + 'use' => 'a' + ), + + // Active flag + 'active' => array ( + 'field' => 'active', + 'type' => 'checkbox', + 'default' => true, + 'use' => 'a' + ) + + ); + + } + + /* + * Entry Post Processing Call-Back Method + * + * Perform post-processing for all result entries. + * + * In this case we're using it to append an array of category + * data to each member result and also sort by member name. + * + * @param array $r Array of field result data for a single entry + * @param string $a Action being performed (l, i, g, ...) + * + * @return object Class object + * + */ + public function entryPostProcessing($r, $a) + { + return $r; + } + +} + +?> diff --git a/classes/data/dataSample.php b/classes/data/dataSample.php deleted file mode 100644 index 648e2d6..0000000 --- a/classes/data/dataSample.php +++ /dev/null @@ -1,161 +0,0 @@ - - * @license http://www.gaslightmedia.com Gaslightmedia - * @release SVN: $Id: dataEvents.php,v 1.0 2011/01/25 19:31:47 cscott Exp $ - */ - -// Member Info Data required -require_once(GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataMemberInfo.php'); - -/** - * GlmDataEvents class - * - * PHP version 5 - * - * @category Data - * @package GLM Member DB - * @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 GlmDataEvents 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; - /** - * MemberInfo DB object - * - * @var $MemberInfo - * @access public - */ - public $MemberInfo; - - /** - * 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_EVENTS_PLUGIN_DB_PREFIX . 'eventstable'; - - /* - * Table Data Fields - */ - - $this->fields = array ( - - 'id' => array ( - 'field' => 'id', - 'type' => 'integer', - 'view_only' => true, - 'use' => 'a' - ), - - // Active flag - 'active' => array ( - 'field' => 'active', - 'type' => 'checkbox', - 'default' => true, - 'use' => 'a' - ) - - ); - - } - - /* - * Entry Post Processing Call-Back Method - * - * Perform post-processing for all result entries. - * - * In this case we're using it to append an array of category - * data to each member result and also sort by member name. - * - * @param array $r Array of field result data for a single entry - * @param string $a Action being performed (l, i, g, ...) - * - * @return object Class object - * - */ - public function entryPostProcessing($r, $a) - { - return $r; - } - -} - -?> diff --git a/models/admin/events/index.php b/models/admin/events/index.php new file mode 100644 index 0000000..5c43a53 --- /dev/null +++ b/models/admin/events/index.php @@ -0,0 +1,125 @@ + + * @license http://www.gaslightmedia.com Gaslightmedia + * @release index.php,v 1.0 2014/10/31 19:31:47 cscott Exp $ + * @link http://dev.gaslightmedia.com/ + */ + +// Load Contacts data abstract +//require_once(GLM_MEMBERS_CONTACTS_PLUGIN_CLASS_PATH.'/data/dataContacts.php'); + +class GlmMembersAdmin_events_index // extends GlmDataContacts +{ + + /** + * WordPress Database Object + * + * @var $wpdb + * @access public + */ + public $wpdb; + /** + * Plugin Configuration Data + * + * @var $config + * @access public + */ + public $config; + /** + * Contact Info + * + * @var $contactInfo + * @access public + */ + public $contactInfo = false; + /** + * Member ID + * + * @var $memberID + * @access public + */ + public $memberID = false; + /** + * Contact ID + * + * @var $contactID + * @access public + */ + public $contactID = false; + + + /* + * Constructor + * + * This contructor performs the work for this model. This model returns + * an array containing the following. + * + * 'status' + * + * True if successfull and false if there was a fatal failure. + * + * 'view' + * + * A suggested view name that the contoller should use instead of the + * default view for this model or false to indicate that the default view + * should be used. + * + * 'data' + * + * Data that the model is returning for use in merging with the view to + * produce output. + * + * @wpdb object WordPress database object + * + * @return array Array containing status, suggested view, and any data + */ + public function __construct ($wpdb, $config) + { + + // Save WordPress Database object + $this->wpdb = $wpdb; + + // Save plugin configuration object + $this->config = $config; + + /* + * Run constructor for the Contacts data class + * + * Note, the third parameter is a flag that indicates to the Contacts + * data class that it should flag a group of fields as 'view_only'. + */ +// parent::__construct(false, false, true); + + + } + + public function modelAction($actionData = false) + { + + $displayData = 'Hello, World! This is the Events Add-On "events" model talking to you from inside WordPress.'; + + // Compile template data + $templateData = array( + 'displayData' => $displayData + ); + + // Return status, any suggested view, and any data to controller + return array( + 'status' => true, + 'modelRedirect' => false, + 'view' => 'admin/events/index.html', + 'data' => $templateData + ); + + } + + +} diff --git a/models/admin/events/more.php b/models/admin/events/more.php new file mode 100644 index 0000000..07de2ea --- /dev/null +++ b/models/admin/events/more.php @@ -0,0 +1,125 @@ + + * @license http://www.gaslightmedia.com Gaslightmedia + * @release index.php,v 1.0 2014/10/31 19:31:47 cscott Exp $ + * @link http://dev.gaslightmedia.com/ + */ + +// Load Contacts data abstract +//require_once(GLM_MEMBERS_CONTACTS_PLUGIN_CLASS_PATH.'/data/dataContacts.php'); + +class GlmMembersAdmin_events_more // extends GlmDataContacts +{ + + /** + * WordPress Database Object + * + * @var $wpdb + * @access public + */ + public $wpdb; + /** + * Plugin Configuration Data + * + * @var $config + * @access public + */ + public $config; + /** + * Contact Info + * + * @var $contactInfo + * @access public + */ + public $contactInfo = false; + /** + * Member ID + * + * @var $memberID + * @access public + */ + public $memberID = false; + /** + * Contact ID + * + * @var $contactID + * @access public + */ + public $contactID = false; + + + /* + * Constructor + * + * This contructor performs the work for this model. This model returns + * an array containing the following. + * + * 'status' + * + * True if successfull and false if there was a fatal failure. + * + * 'view' + * + * A suggested view name that the contoller should use instead of the + * default view for this model or false to indicate that the default view + * should be used. + * + * 'data' + * + * Data that the model is returning for use in merging with the view to + * produce output. + * + * @wpdb object WordPress database object + * + * @return array Array containing status, suggested view, and any data + */ + public function __construct ($wpdb, $config) + { + + // Save WordPress Database object + $this->wpdb = $wpdb; + + // Save plugin configuration object + $this->config = $config; + + /* + * Run constructor for the Contacts data class + * + * Note, the third parameter is a flag that indicates to the Contacts + * data class that it should flag a group of fields as 'view_only'. + */ +// parent::__construct(false, false, true); + + + } + + public function modelAction($actionData = false) + { + + $displayData = 'Welcome to more information!
This is the Events Add-On "events" model with action "more" talking to you from inside WordPress.'; + + // Compile template data + $templateData = array( + 'displayData' => $displayData + ); + + // Return status, any suggested view, and any data to controller + return array( + 'status' => true, + 'modelRedirect' => false, + 'view' => 'admin/events/more.html', + 'data' => $templateData + ); + + } + + +} diff --git a/models/admin/members/events.php b/models/admin/members/events.php new file mode 100644 index 0000000..9f69514 --- /dev/null +++ b/models/admin/members/events.php @@ -0,0 +1,125 @@ + + * @license http://www.gaslightmedia.com Gaslightmedia + * @release index.php,v 1.0 2014/10/31 19:31:47 cscott Exp $ + * @link http://dev.gaslightmedia.com/ + */ + +// Load Contacts data abstract +//require_once(GLM_MEMBERS_CONTACTS_PLUGIN_CLASS_PATH.'/data/dataContacts.php'); + +class GlmMembersAdmin_members_events // extends GlmDataContacts +{ + + /** + * WordPress Database Object + * + * @var $wpdb + * @access public + */ + public $wpdb; + /** + * Plugin Configuration Data + * + * @var $config + * @access public + */ + public $config; + /** + * Contact Info + * + * @var $contactInfo + * @access public + */ + public $contactInfo = false; + /** + * Member ID + * + * @var $memberID + * @access public + */ + public $memberID = false; + /** + * Contact ID + * + * @var $contactID + * @access public + */ + public $contactID = false; + + + /* + * Constructor + * + * This contructor performs the work for this model. This model returns + * an array containing the following. + * + * 'status' + * + * True if successfull and false if there was a fatal failure. + * + * 'view' + * + * A suggested view name that the contoller should use instead of the + * default view for this model or false to indicate that the default view + * should be used. + * + * 'data' + * + * Data that the model is returning for use in merging with the view to + * produce output. + * + * @wpdb object WordPress database object + * + * @return array Array containing status, suggested view, and any data + */ + public function __construct ($wpdb, $config) + { + + // Save WordPress Database object + $this->wpdb = $wpdb; + + // Save plugin configuration object + $this->config = $config; + + /* + * Run constructor for the Contacts data class + * + * Note, the third parameter is a flag that indicates to the Contacts + * data class that it should flag a group of fields as 'view_only'. + */ +// parent::__construct(false, false, true); + + + } + + public function modelAction($actionData = false) + { + + $displayData = 'This is the Events "Members" "Events" model talking to you from inside WordPress.'; + + // Compile template data + $templateData = array( + 'displayData' => $displayData + ); + + // Return status, any suggested view, and any data to controller + return array( + 'status' => true, + 'modelRedirect' => false, + 'view' => 'admin/members/events.html', + 'data' => $templateData + ); + + } + + +} diff --git a/models/admin/members/sample.php b/models/admin/members/sample.php deleted file mode 100644 index 9f69514..0000000 --- a/models/admin/members/sample.php +++ /dev/null @@ -1,125 +0,0 @@ - - * @license http://www.gaslightmedia.com Gaslightmedia - * @release index.php,v 1.0 2014/10/31 19:31:47 cscott Exp $ - * @link http://dev.gaslightmedia.com/ - */ - -// Load Contacts data abstract -//require_once(GLM_MEMBERS_CONTACTS_PLUGIN_CLASS_PATH.'/data/dataContacts.php'); - -class GlmMembersAdmin_members_events // extends GlmDataContacts -{ - - /** - * WordPress Database Object - * - * @var $wpdb - * @access public - */ - public $wpdb; - /** - * Plugin Configuration Data - * - * @var $config - * @access public - */ - public $config; - /** - * Contact Info - * - * @var $contactInfo - * @access public - */ - public $contactInfo = false; - /** - * Member ID - * - * @var $memberID - * @access public - */ - public $memberID = false; - /** - * Contact ID - * - * @var $contactID - * @access public - */ - public $contactID = false; - - - /* - * Constructor - * - * This contructor performs the work for this model. This model returns - * an array containing the following. - * - * 'status' - * - * True if successfull and false if there was a fatal failure. - * - * 'view' - * - * A suggested view name that the contoller should use instead of the - * default view for this model or false to indicate that the default view - * should be used. - * - * 'data' - * - * Data that the model is returning for use in merging with the view to - * produce output. - * - * @wpdb object WordPress database object - * - * @return array Array containing status, suggested view, and any data - */ - public function __construct ($wpdb, $config) - { - - // Save WordPress Database object - $this->wpdb = $wpdb; - - // Save plugin configuration object - $this->config = $config; - - /* - * Run constructor for the Contacts data class - * - * Note, the third parameter is a flag that indicates to the Contacts - * data class that it should flag a group of fields as 'view_only'. - */ -// parent::__construct(false, false, true); - - - } - - public function modelAction($actionData = false) - { - - $displayData = 'This is the Events "Members" "Events" model talking to you from inside WordPress.'; - - // Compile template data - $templateData = array( - 'displayData' => $displayData - ); - - // Return status, any suggested view, and any data to controller - return array( - 'status' => true, - 'modelRedirect' => false, - 'view' => 'admin/members/events.html', - 'data' => $templateData - ); - - } - - -} diff --git a/models/admin/sample/index.php b/models/admin/sample/index.php deleted file mode 100644 index 5c43a53..0000000 --- a/models/admin/sample/index.php +++ /dev/null @@ -1,125 +0,0 @@ - - * @license http://www.gaslightmedia.com Gaslightmedia - * @release index.php,v 1.0 2014/10/31 19:31:47 cscott Exp $ - * @link http://dev.gaslightmedia.com/ - */ - -// Load Contacts data abstract -//require_once(GLM_MEMBERS_CONTACTS_PLUGIN_CLASS_PATH.'/data/dataContacts.php'); - -class GlmMembersAdmin_events_index // extends GlmDataContacts -{ - - /** - * WordPress Database Object - * - * @var $wpdb - * @access public - */ - public $wpdb; - /** - * Plugin Configuration Data - * - * @var $config - * @access public - */ - public $config; - /** - * Contact Info - * - * @var $contactInfo - * @access public - */ - public $contactInfo = false; - /** - * Member ID - * - * @var $memberID - * @access public - */ - public $memberID = false; - /** - * Contact ID - * - * @var $contactID - * @access public - */ - public $contactID = false; - - - /* - * Constructor - * - * This contructor performs the work for this model. This model returns - * an array containing the following. - * - * 'status' - * - * True if successfull and false if there was a fatal failure. - * - * 'view' - * - * A suggested view name that the contoller should use instead of the - * default view for this model or false to indicate that the default view - * should be used. - * - * 'data' - * - * Data that the model is returning for use in merging with the view to - * produce output. - * - * @wpdb object WordPress database object - * - * @return array Array containing status, suggested view, and any data - */ - public function __construct ($wpdb, $config) - { - - // Save WordPress Database object - $this->wpdb = $wpdb; - - // Save plugin configuration object - $this->config = $config; - - /* - * Run constructor for the Contacts data class - * - * Note, the third parameter is a flag that indicates to the Contacts - * data class that it should flag a group of fields as 'view_only'. - */ -// parent::__construct(false, false, true); - - - } - - public function modelAction($actionData = false) - { - - $displayData = 'Hello, World! This is the Events Add-On "events" model talking to you from inside WordPress.'; - - // Compile template data - $templateData = array( - 'displayData' => $displayData - ); - - // Return status, any suggested view, and any data to controller - return array( - 'status' => true, - 'modelRedirect' => false, - 'view' => 'admin/events/index.html', - 'data' => $templateData - ); - - } - - -} diff --git a/models/admin/sample/more.php b/models/admin/sample/more.php deleted file mode 100644 index 07de2ea..0000000 --- a/models/admin/sample/more.php +++ /dev/null @@ -1,125 +0,0 @@ - - * @license http://www.gaslightmedia.com Gaslightmedia - * @release index.php,v 1.0 2014/10/31 19:31:47 cscott Exp $ - * @link http://dev.gaslightmedia.com/ - */ - -// Load Contacts data abstract -//require_once(GLM_MEMBERS_CONTACTS_PLUGIN_CLASS_PATH.'/data/dataContacts.php'); - -class GlmMembersAdmin_events_more // extends GlmDataContacts -{ - - /** - * WordPress Database Object - * - * @var $wpdb - * @access public - */ - public $wpdb; - /** - * Plugin Configuration Data - * - * @var $config - * @access public - */ - public $config; - /** - * Contact Info - * - * @var $contactInfo - * @access public - */ - public $contactInfo = false; - /** - * Member ID - * - * @var $memberID - * @access public - */ - public $memberID = false; - /** - * Contact ID - * - * @var $contactID - * @access public - */ - public $contactID = false; - - - /* - * Constructor - * - * This contructor performs the work for this model. This model returns - * an array containing the following. - * - * 'status' - * - * True if successfull and false if there was a fatal failure. - * - * 'view' - * - * A suggested view name that the contoller should use instead of the - * default view for this model or false to indicate that the default view - * should be used. - * - * 'data' - * - * Data that the model is returning for use in merging with the view to - * produce output. - * - * @wpdb object WordPress database object - * - * @return array Array containing status, suggested view, and any data - */ - public function __construct ($wpdb, $config) - { - - // Save WordPress Database object - $this->wpdb = $wpdb; - - // Save plugin configuration object - $this->config = $config; - - /* - * Run constructor for the Contacts data class - * - * Note, the third parameter is a flag that indicates to the Contacts - * data class that it should flag a group of fields as 'view_only'. - */ -// parent::__construct(false, false, true); - - - } - - public function modelAction($actionData = false) - { - - $displayData = 'Welcome to more information!
This is the Events Add-On "events" model with action "more" talking to you from inside WordPress.'; - - // Compile template data - $templateData = array( - 'displayData' => $displayData - ); - - // Return status, any suggested view, and any data to controller - return array( - 'status' => true, - 'modelRedirect' => false, - 'view' => 'admin/events/more.html', - 'data' => $templateData - ); - - } - - -} diff --git a/views/admin/events/index.html b/views/admin/events/index.html new file mode 100644 index 0000000..4588ef0 --- /dev/null +++ b/views/admin/events/index.html @@ -0,0 +1,7 @@ +
+
+

Sample Model

+

{$displayData}

+ Click me to see more! +
+
\ No newline at end of file diff --git a/views/admin/events/more.html b/views/admin/events/more.html new file mode 100644 index 0000000..5e1c19a --- /dev/null +++ b/views/admin/events/more.html @@ -0,0 +1,6 @@ +
+
+

Sample Model - More Information

+

{$displayData}

+
+
\ No newline at end of file diff --git a/views/admin/members/events.html b/views/admin/members/events.html new file mode 100644 index 0000000..22f4d71 --- /dev/null +++ b/views/admin/members/events.html @@ -0,0 +1,6 @@ +{include file='admin/members/header.html'} + +

Members Sample Tab

+

{$displayData}

+ +{include file='admin/footer.html'} \ No newline at end of file diff --git a/views/admin/members/sample.html b/views/admin/members/sample.html deleted file mode 100644 index 22f4d71..0000000 --- a/views/admin/members/sample.html +++ /dev/null @@ -1,6 +0,0 @@ -{include file='admin/members/header.html'} - -

Members Sample Tab

-

{$displayData}

- -{include file='admin/footer.html'} \ No newline at end of file diff --git a/views/admin/sample/index.html b/views/admin/sample/index.html deleted file mode 100644 index 4588ef0..0000000 --- a/views/admin/sample/index.html +++ /dev/null @@ -1,7 +0,0 @@ -
-
-

Sample Model

-

{$displayData}

- Click me to see more! -
-
\ No newline at end of file diff --git a/views/admin/sample/more.html b/views/admin/sample/more.html deleted file mode 100644 index 5e1c19a..0000000 --- a/views/admin/sample/more.html +++ /dev/null @@ -1,6 +0,0 @@ -
-
-

Sample Model - More Information

-

{$displayData}

-
-
\ No newline at end of file