--- /dev/null
+<?php
+
+/**
+ * Gaslight Media Members Database
+ * Admin Data Import
+ *
+ * PHP version 5.5
+ *
+ * @category glmWordPressPlugin
+ * @package glmMembersDatabase
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @version 0.1
+ */
+
+/*
+ * This class performs the work for the default action of the "Members" menu
+ * option, which is to display the members dashboard.
+ *
+ */
+class GlmMembersAdmin_import_index
+{
+
+ /**
+ * WordPress Database Object
+ *
+ * @var $wpdb
+ * @access public
+ */
+ public $wpdb;
+ /**
+ * Plugin Configuration Data
+ *
+ * @var $config
+ * @access public
+ */
+ public $config;
+
+ /**
+ * Constructor
+ *
+ * This contractor 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;
+
+ }
+
+ /**
+ * 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 successful 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 controller 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)
+ {
+
+
+ $view = 'index.html';
+ $failure = false;
+ $option = '';
+
+ if (isset($_REQUEST['option']) && $_REQUEST['option'] != '') {
+ $option = $_REQUEST['option'];
+ }
+
+ switch($option) {
+
+ default:
+
+ break;
+
+ }
+
+ $templateData = array(
+ 'data' => false,
+ );
+ // Return status, suggested view, and data to controller
+ return array(
+ 'status' => true,
+ 'menuItemRedirect' => false,
+ 'modelRedirect' => false,
+ 'view' => 'admin/import/'.$view,
+ 'data' => $templateData
+ );
+
+ }
+
+}
function() {$this->controller('management');}
);
+// Add a submenu for the "Import" section
+add_submenu_page(
+ 'glm-members-admin-menu-members',
+ 'Import',
+ 'Import',
+ 'glm_members_management',
+ 'glm-members-admin-menu-import',
+ function() {$this->controller('import');}
+);
+
// Add a submenu for the "Shortcode Reference" section
add_submenu_page(
'glm-members-admin-menu-members',
--- /dev/null
+{include file='admin/import/header.html'}
+
+ <h2>Data Import Step 1: Upload files</h2>
+
+ <form action="{$thisUrl}?page={$thisPage}" method="post" enctype="multipart/form-data">
+ <input type="hidden" name="glm_action" value="index" />
+
+ <table class="glm-admin-table">
+ <tr>
+ <th>City Data</th>
+ <td><input type="file" name="member_city_file" /></td>
+ </tr>
+ <tr>
+ <th>State Data</th>
+ <td><input type="file" name="member_state_file" /></td>
+ </tr>
+ <tr>
+ <th>Member Profile Data</th>
+ <td><input type="file" name="member_profile_file" /></td>
+ </tr>
+ </table>
+
+ <input type="submit" value="Continue" class="button button-primary submit-import">
+
+ </form>
+
+{include file='admin/footer.html'}