--- /dev/null
+<?php
+
+/**
+ * Gaslight Media Members Database
+ * Front Featured Members
+ *
+ * PHP version 5.5
+ *
+ * @category glmWordPressPlugin
+ * @package glmMembersDatabase
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @version 0.1
+ */
+
+
+// Load Members data abstract
+require_once GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataMemberInfo.php';
+
+/*
+ * This class performs the work for the default action of the "Members" menu
+ * option, which is to display the members dashboard.
+ *
+ */
+class GlmMembersFront_members_featured extends GlmDataMemberInfo
+{
+
+ /**
+ * WordPress Database Object
+ *
+ * @var $wpdb
+ * @access public
+ */
+ public $wpdb;
+ /**
+ * Plugin Configuration Data
+ *
+ * @var $config
+ * @access public
+ */
+ public $config;
+
+ /*
+ * Constructor
+ *
+ * This contructor sets up this model. At this time that only includes
+ * storing away the WordPress data object.
+ *
+ * @return object Class object
+ *
+ */
+ public function __construct ($wpdb, $config)
+ {
+
+ // Save WordPress Database object
+ $this->wpdb = $wpdb;
+
+ // Save plugin configuration object
+ $this->config = $config;
+
+ // Run constructor for members data class
+ parent::__construct(false, false);
+
+ }
+
+ /*
+ * Perform Model Action
+ *
+ * This method does the work for this model and returns any resulting data
+ *
+ * @return array Status and data array
+ *
+ * 'status'
+ *
+ * True if successfull and false if there was a fatal failure.
+ *
+ * 'menuItemRedirect'
+ *
+ * If not false, provides a menu item the controller should
+ * execute after this one. Normally if this is used, there would also be a
+ * modelRedirect value supplied as well.
+ *
+ * 'modelRedirect'
+ *
+ * If not false, provides an action the controller should execute after
+ * this one.
+ *
+ * '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.
+ *
+ */
+ public function modelAction ($actionData = false)
+ {
+ $settings = array();
+
+ /*
+ * Check for which view file to use, else default to list
+ */
+ $view = "featured";
+ $sql = "
+ SELECT id
+ FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX. "members
+ WHERE featured
+
+ ;";
+ $id = $this->wpdb->get_var($sql);
+ $memberData = $this->getActiveInfoForMember($id);
+ if (count($memberData) > 0) {
+ $success = true;
+ }
+
+ // Compile template data
+
+// echo "<pre>".print_r($memberData,true)."</pre>";
+
+ $templateData = array(
+ 'view' => $view,
+ 'member' => $memberData,
+ );
+
+ // Return status, suggested view, and data to controller - also return any modified settings
+ return array(
+ 'status' => $success,
+ 'menuItemRedirect' => false,
+ 'modelRedirect' => false,
+ 'view' => "front/members/featured.html",
+ 'data' => $templateData,
+ 'settings' => $settings
+ );
+
+ }
+
+
+}
+
+?>
--- /dev/null
+{include file='front/members/header.html'}
+
+<h5>Featured Business</h5>
+{if $member.logo}
+ <div class="glm-featured-member-image-container">
+ <img class="glm-featured-member-image" src="{$glmPluginMediaUrl}/images/grid/{$member.logo}" alt="{$member.member_name}">
+ </div>
+{/if}
+<div class="glm-featured-member-text">
+ <h6 class="glm-featured-member-title">{$member.member_name}</h6>
+ <p class="glm-featured-member-excerpt">{$member.short_descr}</p>
+ <a class="glm-featured-member-morelink" href="{$siteBaseUrl}{$settings.canonical_member_page}/{$member.member_slug}/">
+ find out more...
+ </a>
+</div>
+{include file='front/footer.html'}
\ No newline at end of file