From: Steve Sutton Date: Mon, 10 Oct 2016 19:11:47 +0000 (-0400) Subject: now is runs X-Git-Tag: v1.0.0^2~10 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=c27b3a5578674a82e023a634d85187ec92f5620c;p=WP-Plugins%2Fglm-member-db-conditions.git now is runs --- diff --git a/models/admin/conditions/index.php b/models/admin/conditions/index.php new file mode 100644 index 0000000..dddc03e --- /dev/null +++ b/models/admin/conditions/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_conditions_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 Conditions Add-On "conditions" 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/conditions/index.html', + 'data' => $templateData + ); + + } + + +} diff --git a/models/admin/conditions/more.php b/models/admin/conditions/more.php new file mode 100644 index 0000000..40c5719 --- /dev/null +++ b/models/admin/conditions/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_conditions_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 Conditions Add-On "conditions" 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/conditions/more.html', + 'data' => $templateData + ); + + } + + +} diff --git a/models/admin/members/conditions.php b/models/admin/members/conditions.php new file mode 100644 index 0000000..ab48059 --- /dev/null +++ b/models/admin/members/conditions.php @@ -0,0 +1,103 @@ + + * @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 Conditions data abstract +require_once GLM_MEMBERS_CONDITIONS_PLUGIN_CLASS_PATH.'/data/dataConditions.php'; + +class GlmMembersAdmin_members_conditions extends GlmDataConditions +{ + + /** + * WordPress Database Object + * + * @var $wpdb + * @access public + */ + public $wpdb; + /** + * Plugin Configuration Data + * + * @var $config + * @access public + */ + public $config; + + /* + * 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 Conditions 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/conditions.html', + 'data' => $templateData + ); + + } + + +} diff --git a/models/admin/members/sample.php b/models/admin/members/sample.php deleted file mode 100644 index ab48059..0000000 --- a/models/admin/members/sample.php +++ /dev/null @@ -1,103 +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 Conditions data abstract -require_once GLM_MEMBERS_CONDITIONS_PLUGIN_CLASS_PATH.'/data/dataConditions.php'; - -class GlmMembersAdmin_members_conditions extends GlmDataConditions -{ - - /** - * WordPress Database Object - * - * @var $wpdb - * @access public - */ - public $wpdb; - /** - * Plugin Configuration Data - * - * @var $config - * @access public - */ - public $config; - - /* - * 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 Conditions 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/conditions.html', - 'data' => $templateData - ); - - } - - -} diff --git a/models/admin/sample/index.php b/models/admin/sample/index.php deleted file mode 100644 index dddc03e..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_conditions_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 Conditions Add-On "conditions" 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/conditions/index.html', - 'data' => $templateData - ); - - } - - -} diff --git a/models/admin/sample/more.php b/models/admin/sample/more.php deleted file mode 100644 index 40c5719..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_conditions_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 Conditions Add-On "conditions" 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/conditions/more.html', - 'data' => $templateData - ); - - } - - -} diff --git a/setup/adminMenus.php b/setup/adminMenus.php index b770c60..56edf35 100644 --- a/setup/adminMenus.php +++ b/setup/adminMenus.php @@ -78,7 +78,7 @@ add_menu_page( 'glm-members-admin-menu-conditions', // Menu Slug function() {$this->controller('conditions');}, // Called function false, // Icon URL - '92' // Menu Position + '4' // Menu Position ); add_submenu_page( diff --git a/views/admin/conditions/index.html b/views/admin/conditions/index.html new file mode 100644 index 0000000..f1b78d1 --- /dev/null +++ b/views/admin/conditions/index.html @@ -0,0 +1,7 @@ +
+
+

Conditions Model

+

{$displayData}

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

Conditions Model - More Information

+

{$displayData}

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

{$terms.term_member_plur_cap} Conditions 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 c959204..0000000 --- a/views/admin/members/sample.html +++ /dev/null @@ -1,6 +0,0 @@ -{include file='admin/members/header.html'} - -

{$terms.term_member_plur_cap} Conditions 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 f1b78d1..0000000 --- a/views/admin/sample/index.html +++ /dev/null @@ -1,7 +0,0 @@ -
-
-

Conditions 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 c768b5d..0000000 --- a/views/admin/sample/more.html +++ /dev/null @@ -1,6 +0,0 @@ -
-
-

Conditions Model - More Information

-

{$displayData}

-
-
\ No newline at end of file