From 371484730bb240ed67332c31c8487364c06004f7 Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Wed, 20 Apr 2016 17:13:38 -0400 Subject: [PATCH] Events nearly done, menu restructure --- classes/data/dataContacts.php | 4 +- defines.php | 3 +- index.php | 260 ++++++- models/admin/contacts/index.php | 148 ++++ models/admin/management/contacts.php | 709 ++++++++++++++++++ models/admin/member/contacts.php | 25 +- models/admin/profile/index.php | 2 +- setup/adminMenus.php | 9 + setup/adminTabs.php | 23 + .../create_database_V0.0.1.sql | 56 ++ setup/databaseScripts/dbVersions.php | 33 + .../databaseScripts/drop_database_V0.0.1.sql | 23 + setup/databaseScripts/readme.txt | 41 + setup/validActions.php | 6 + views/admin/contacts/header.html | 8 + views/admin/contacts/index.html | 75 ++ views/admin/management/contacts.html | 71 ++ 17 files changed, 1480 insertions(+), 16 deletions(-) create mode 100644 models/admin/contacts/index.php create mode 100644 models/admin/management/contacts.php create mode 100644 setup/databaseScripts/create_database_V0.0.1.sql create mode 100644 setup/databaseScripts/dbVersions.php create mode 100644 setup/databaseScripts/drop_database_V0.0.1.sql create mode 100644 setup/databaseScripts/readme.txt create mode 100644 views/admin/contacts/header.html create mode 100644 views/admin/contacts/index.html create mode 100644 views/admin/management/contacts.html diff --git a/classes/data/dataContacts.php b/classes/data/dataContacts.php index b46800d..a1acb0e 100644 --- a/classes/data/dataContacts.php +++ b/classes/data/dataContacts.php @@ -528,12 +528,12 @@ class GlmDataContacts extends GlmDataAbstract } // Check Contacts - $contact = $this->wpdb->get_row("SELECT * FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX . "contacts WHERE email = '$email';", ARRAY_A); + $contact = $this->wpdb->get_row("SELECT * FROM ".GLM_MEMBERS_CONTACTS_PLUGIN_DB_PREFIX . "contacts WHERE email = '$email';", ARRAY_A); if ($contact !== null) { $r['contactsEmail'] = true; $r['active'] = ($r['active'] > 0); } - $contact = $this->wpdb->get_row("SELECT * FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX . "contacts WHERE username = '$username';", ARRAY_A); + $contact = $this->wpdb->get_row("SELECT * FROM ".GLM_MEMBERS_CONTACTS_PLUGIN_DB_PREFIX . "contacts WHERE username = '$username';", ARRAY_A); if ($contact !== null) { $r['contactsUsername'] = true; $r['active'] = ($r['active'] > 0); diff --git a/defines.php b/defines.php index 64e8573..31d2f05 100644 --- a/defines.php +++ b/defines.php @@ -13,7 +13,8 @@ define('GLM_MEMBERS_CONTACTS_PLUGIN_SLUG', 'glm-member-db-contacts'); // Database table prefixes global $wpdb; -define('GLM_MEMBERS_CONTACTS_PLUGIN_DB_PREFIX', $wpdb->prefix.'glm_members_'); +define('GLM_MEMBERS_CONTACTS_PLUGIN_DB_PREFIX', $wpdb->prefix.'glm_membersContacts_'); +define('GLM_MEMBERS_CONTACTS_PLUGIN_ACTIVE_DB_OPTION', 'glmMembersContactsDbVersion'); // Determine which system we're running on - If not provided, assume PRODUCTION diff --git a/index.php b/index.php index 7e91415..eda15a1 100644 --- a/index.php +++ b/index.php @@ -1,2 +1,260 @@ + * @license http://www.gaslightmedia.com Gaslightmedia + * @version 1.0.4 + */ + +/* + * Plugin and Database Versions + * + * Note that the database version matches the version of the last + * plugin version where there was a change in the database. + * + * Updates to checkDatabase() in glmPluginSupport.php must be + * made together with the DB_VERSION below. ONLY bump the DB + * version when there's a change in the database!! Use the + * version nunmber of that release for the DB version. + */ +define('GLM_MEMBERS_CONTACTS_PLUGIN_VERSION', '1.0.7'); +define('GLM_MEMBERS_CONTACTS_PLUGIN_DB_VERSION', '0.0.1'); + +// This is the minimum version of the GLM Members DB plugin require for this plugin. +define('GLM_MEMBERS_CONTACTS_PLUGIN_MIN_MEMBERS_REQUIRED_VERSION', '1.0.58'); +define('REQUIRED_GLM_MEMBERS_PLUGIN_MIN_DB_VERSION', '1.0.41'); + +/* + * Copyright 2014 Charles Scott (email : cscott@gaslightmedia.com) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License, version 2, as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + +// Check that we're being called by WordPress. +if (!defined('ABSPATH')) { + die("Please do not call this code directly!"); +} + +/* +* Some initial setup and tests +*/ + +$startupNotices = ''; + +// Get standard defined parameters +require_once('defines.php'); + +// Required to be able to get user capabilities when being called as a filter from the main plugin +require_once(ABSPATH . 'wp-includes/pluggable.php'); + +/* + * Do some checks to make sure the main GLM Member DB is active and of a recceint enough version + */ + +// Function to generate message regarding main GLM Member DB plugin not installed and active +function glmMembersPluginRequired() { + echo ' +
+

The '.GLM_MEMBERS_CONTACTS_PLUGIN_NAME.' add-on requires the base GLM Member DB plugin to be installed and active!

+

The '.GLM_MEMBERS_CONTACTS_PLUGIN_NAME.' plugin has been de-activated.

+
+ '; +} + +/* + * Check installation, activation, and version of main Member DB plugin + */ +include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); +$plugin_name = 'glm-member-db/index.php'; +$is_active = is_plugin_active($plugin_name); + +// If it's not active, then warn user and deactivate this add-on plugin +if ($is_active != '1') { + add_action( 'admin_notices', 'glmMembersPluginRequired' ); + deactivate_plugins('/'.GLM_MEMBERS_CONTACTS_PLUGIN_SLUG.'/'.GLM_MEMBERS_CONTACTS_PLUGIN_SLUG.'.php'); +} + +// Function to generate message regarding main GLM Member DB plugin version is not receint enought to run this add-on +function glmMembersContactsMembersMinVerRequired() { + $curVer = get_option('glmMembersDatabasePluginVersion'); + echo ' +
+

The '.GLM_MEMBERS_CONTACTS_PLUGIN_NAME.' requires that the main GLM Member DB plugin version be no older than ' + .GLM_MEMBERS_CONTACTS_PLUGIN_MIN_MEMBERS_REQUIRED_VERSION.' but the current verssion is '.$curVer.'!

+

The '.GLM_MEMBERS_CONTACTS_PLUGIN_NAME.' plugin has been de-activated.

+
+ '; +} + +/* + * Check for Minimum DB version for main Member DB + */ +$glmMembersDatabasePluginVersion = get_option('glmMembersDatabasePluginVersion'); +if (version_compare($glmMembersDatabasePluginVersion, GLM_MEMBERS_CONTACTS_PLUGIN_MIN_MEMBERS_REQUIRED_VERSION) < 0) { + add_action( 'admin_notices', 'glmMembersContactsMembersMinVerRequired'); + deactivate_plugins('/'.GLM_MEMBERS_CONTACTS_PLUGIN_SLUG.'/'.GLM_MEMBERS_CONTACTS_PLUGIN_SLUG.'.php'); +} + +/* + * Register this add-on with the main GLM Member DB plugin and get information on all add-ons loaded. + */ +require_once(GLM_MEMBERS_CONTACTS_PLUGIN_SETUP_PATH.'/validActions.php'); +require_once(GLM_MEMBERS_CONTACTS_PLUGIN_DB_SCRIPTS.'/dbVersions.php'); +function glmMembersRegisterContacts($addOns) { + + // Add this add-on to the add-ons array + $addOns[GLM_MEMBERS_CONTACTS_PLUGIN_SLUG] = array( + 'dir' => GLM_MEMBERS_CONTACTS_PLUGIN_PATH, + 'name' => GLM_MEMBERS_CONTACTS_PLUGIN_NAME, + 'short_name' => GLM_MEMBERS_CONTACTS_PLUGIN_SHORT_NAME, + 'slug' => GLM_MEMBERS_CONTACTS_PLUGIN_SLUG, + 'actions' => $GLOBALS['glmMembersContactsAddOnValidActions'], + 'database' => array( + 'dbPrefix' => GLM_MEMBERS_CONTACTS_PLUGIN_DB_PREFIX, + 'dbCurrentVersion' => GLM_MEMBERS_CONTACTS_PLUGIN_DB_VERSION, + 'dbActiveVersionOption' => GLM_MEMBERS_CONTACTS_PLUGIN_ACTIVE_DB_OPTION, + 'dbScriptPath' => GLM_MEMBERS_CONTACTS_PLUGIN_DB_SCRIPTS, + 'dbVersions' => $GLOBALS['glmMembersContactsDbVersions'] + ) + ); + + // Return the array with our data added + return $addOns; +} +add_filter('glm-member-db-register-addon','glmMembersRegisterContacts', 10, 1); + + /* + * + * Activate and Deactivate hooks + * + */ + + // Activate + function glmMembersContactsPluginActivate () + { + global $wpdb, $config; + require_once (GLM_MEMBERS_CONTACTS_PLUGIN_PATH . '/activate.php'); + new glmMembersContactsPluginActivate($wpdb, $config); + } + register_activation_hook(__FILE__, 'glmMembersContactsPluginActivate'); + + // Deactivate + function glmMembersContactsPluginDeactivate () + { + global $wpdb, $config; + require_once (GLM_MEMBERS_CONTACTS_PLUGIN_PATH . '/deactivate.php'); + $x = new glmMembersContactsPluginDeactivate($wpdb, $config); + return false; + } + register_deactivation_hook(__FILE__, 'glmMembersContactsPluginDeactivate'); + +/* + * Hooks for testing capabilities provided by this add-on + */ +require_once(GLM_MEMBERS_CONTACTS_PLUGIN_SETUP_PATH.'/permissions.php'); + +/* + * Login Checks and Messages + */ + +$wpUserID = get_current_user_id(); + +// Message to display on Login page after a forced logout detection +function glmMembersContactsNoLoginMessage( $message ) { + $message .= " +
+

NOTE: You are trying to log into a contact account that is for informational purposes only + or has been temporarily dissabled.

+

You are not permitted to log in with that contact account at this time.

+
+ "; + return $message; +} + +// If login is from user who was logged out due to restriction or being flagged inactive - Display login message +if (isset($_COOKIE['glmMembersForcedLogout'])) { + add_filter('login_message', 'glmMembersContactsNoLoginMessage'); + setcookie ("glmMembersForcedLogout", "", time() - 3600); +} + +if ($wpUserID) { + + // Check if user's only role is as a restricted contact + $userRoles = get_userdata($wpUserID)->roles; + if (in_array('glm_members_restricted_contact', $userRoles) && count($userRoles) == 1) { + setcookie ("glmMembersForcedLogout", "Forced Logout", time() + 3600, '/'); + wp_logout(); + } + + // Check for a contact user that's inactive and send them back to login also + $contactUser = get_user_meta($wpUserID, 'glmMembersContactID', true); + $contactActive = get_user_meta($wpUserID, 'glmMembersContactActive', true); + if ($contactUser && !$contactActive) { + setcookie ("glmMembersForcedLogout", "Forced Logout", time() + 3600, '/'); + wp_logout(); + } + +} + +/* + * Add filter to redirect user to a particular destination on + * login based on their roles. + */ + +function my_login_redirect( $redirect_to, $request, $user ) { + + global $user; + + // Do we have a logged in user + if ( isset( $user->roles ) && is_array( $user->roles ) ) { + + // If this is a non-contact user or one with a pre-existing non-contact login + foreach ($user->roles as $r) { + if (substr($r,0,12) != 'glm_members_') { + // Go to normal destination for this user + return $redirect_to; + } + } + + // If we get here, this is a pure contact user, start them at their profile + + return '/wp-admin/admin.php?page=glm-members-admin-menu-member'; + + } + + // No logged in user - So why is the "login_redirect" filter triggered anyway? + return $redirect_to; + +} +add_filter( 'login_redirect', 'my_login_redirect', 10, 3 ); + + +?> \ No newline at end of file diff --git a/models/admin/contacts/index.php b/models/admin/contacts/index.php new file mode 100644 index 0000000..8a02df3 --- /dev/null +++ b/models/admin/contacts/index.php @@ -0,0 +1,148 @@ + + * @license http://www.gaslightmedia.com Gaslightmedia + * @release admin.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'); + +/* + * This model is called when the "Shortcodes" menu is selected + * + */ +class GlmMembersAdmin_contacts_index extends GlmDataContacts +{ + + /** + * WordPress Database Object + * + * @var $wpdb + * @access public + */ + public $wpdb; + /** + * Plugin Configuration Data + * + * @var $config + * @access public + */ + public $config; + /** + * Contacts List + * + * @var $contacts + * @access public + */ + public $contacts; + + /* + * 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 contacts data class + parent::__construct(false, false); + + } + + public function modelAction($actionData = false) { + + $haveContacts = false; + $filterArchived = false; + $filterText = false; + $haveFilter = false; + + // Only list member contacts for the selected member + $where = "true"; + + // Filter by text string supplied + if (isset($_REQUEST['filterText'])) { + $filterText = esc_sql($_REQUEST['filterText']); + $where .= " AND ( + T.lname LIKE '%$filterText%' OR + T.fname LIKE '%$filterText%' OR + T.org LIKE '%$filterText%' OR + T.descr LIKE '%$filterText%' + )"; + $haveFilter = true; + } + + // Check if this is a request to show archived contacts + if (!isset($_REQUEST['filterArchived'])) { + $where .= " AND T.access != ".$this->config['access_numb']['Archived']; + $filterArchived = false; + } else { + $filterArchived = true; + $haveFilter = true; + } + + // Get list of contacts + $this->contacts = $this->getList($where); + + if ($this->contacts !== false) { + if (count($this->contacts) > 0) { + $haveContacts = true; + } + } + + // Compile template data + $templateData = array( + 'haveContacts' => $haveContacts, + 'contacts' => $this->contacts, + 'filterArchived' => $filterArchived, + 'filterText' => $filterText, + 'haveFilter' => $haveFilter + ); + + // Return status, any suggested view, and any data to controller + return array( + 'status' => true, + 'modelRedirect' => false, + 'view' => 'admin/contacts/index.html', + 'data' => $templateData + ); + + } +} + +?> \ No newline at end of file diff --git a/models/admin/management/contacts.php b/models/admin/management/contacts.php new file mode 100644 index 0000000..a9b8d13 --- /dev/null +++ b/models/admin/management/contacts.php @@ -0,0 +1,709 @@ + + * @license http://www.gaslightmedia.com Gaslightmedia + * @release contacts.php,v 1.0 2014/10/31 19:31:47 cscott Exp $ + * @link http://dev.gaslightmedia.com/ + */ + +require_once(GLM_MEMBERS_CONTACTS_PLUGIN_CLASS_PATH.'/data/dataContacts.php'); + +/** + * GlmMembersAdmin_management_contacts + * + * PHP version 5 + * + * @category Model + * @package GLM Member DB + * @author Chuck Scott + * @license http://www.gaslightmedia.com Gaslightmedia + * @release SVN: $Id: packaging.php,v 1.0 2011/01/25 19:31:47 cscott + * Exp $ + */ +class GlmMembersAdmin_management_contacts extends GlmDataContacts +{ + + /** + * WordPress Database Object + * + * @var $wpdb + * @access public + */ + public $wpdb; + /** + * dbh Postgres database connection + * + * @var mixed + * @access public + */ + public $dbh; + /** + * settings used for the schema and tablenames + * + * @var mixed + * @access public + */ + public $settings = array(); + /** + * contacts + * + * @var bool + * @access public + */ + public $contacts = array(); + + /** + * 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 members data class + parent::__construct(false, false); + + } + +/* + public function importContactImages() + { + require_once(GLM_MEMBERS_PLUGIN_PATH.'/models/admin/ajax/imageUpload.php'); + $ImageUpload = new GlmMembersAdmin_ajax_imageUpload($this->wpdb, $this->config); + // get all events with images + $sql = " + SELECT id,image,old_event_id + FROM " . GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX. "events + WHERE image != '' AND image IS NOT NULL"; + $results = $this->wpdb->get_results($sql, ARRAY_A); + echo '
$results: ' . print_r($results, true) . '
'; + $imgUrl = 'http://is0.gaslightmedia.com/discoverkalamazoo/CKImage/'; + foreach ( $results as $event ) { + $imageFullUrl = $imgUrl . $event['image']; + $res = $ImageUpload->storeImage($imageFullUrl); + + if ( $res['newFileName'] ) { + $this->wpdb->update( + GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX . 'events', + array( + 'image' => $res['newFileName'] + ), + array( 'id' => $event['id'] ), + array( '%s' ), + array( '%d' ) + ); + } + } + } +*/ + + /** + * modelAction + * + * @param bool $actionData + * @access public + * @return void + */ + public function modelAction($actionData = false) + { + +/* + $option = false; + $testResult = false; + $importResult = false; + $settingsUpdated = false; + $settingsUpdateError = false; + $eventsSettings = false; + + if (isset($_REQUEST['option'])) { + $option = $_REQUEST['option']; + } + + switch ($option) { + + case 'tests': + + $test = false; + if (isset($_REQUEST['test'])) { + $test = $_REQUEST['test']; + } + + switch ($test) { + + case 'recurrence': + + $testResult = $this->testRecurrence(); + + break; + + default: + break; + } + + break; + + case 'eventImagesImport': + + $this->importEventImages(); + + break; + + case 'eventimport': + + $import = false; + if (isset($_REQUEST['import'])) { + $import = filter_var( $_REQUEST['import'], FILTER_VALIDATE_BOOLEAN ); + } + switch ($import) { + case 'true': + $importResult = '
$_REQUEST: ' . print_r( $_REQUEST, true ) . '
'; + $db_host = filter_var( $_REQUEST['db_host'], FILTER_SANITIZE_STRING ); + $db_name = filter_var( $_REQUEST['db_name'], FILTER_SANITIZE_STRING ); + $db_user = filter_var( $_REQUEST['db_user'], FILTER_SANITIZE_STRING ); + $db_password = filter_var( $_REQUEST['db_password'], FILTER_SANITIZE_STRING ); + $this->connectPostgresDb($db_host, $db_name, $db_user, $db_password); + + $this->settings = filter_var_array( + $_REQUEST, + array( + 'schema' => FILTER_SANITIZE_STRING, + 'cattablename' => FILTER_SANITIZE_STRING, + 'tablename' => FILTER_SANITIZE_STRING, + 'sdate' => array( + 'filter' => FILTER_VALIDATE_REGEXP, + 'options' => array( + 'regexp' => '%[0-9]{2}/[0-9]{2}/[0-9]{4}%' + ) + ) + + ) + ); + $importResult .= '
$this->settings: ' . print_r($this->settings, true) . '
'; + $this->addCategories(); + $importResult .= $this->addEvents(); + + $importResult .= '
$this->categories: ' . print_r($this->categories, true) . '
'; + + + break; + default: + break; + } + break; + + case 'settings': + + default: + + // Make sure option is set if default + $option = 'settings'; + + // Determine if current user can edit configurations + if (!current_user_can('glm_members_management')) { + return array( + 'status' => false, + 'menuItemRedirect' => 'error', + 'modelRedirect' => 'index', + 'view' => 'admin/error/index.html', + 'data' => array( + 'reason' => 'User does not have rights to make configuration changes.' + ) + ); + } + + // Check for submission option + $option2 = ''; + if (isset($_REQUEST['option2'])) { + $option2 = $_REQUEST['option2']; + } + + switch($option2) { + + // Update the settings and redisplay the form + case 'submit': + + // Update the event management settings + $eventsSettings = $this->updateEntry(1); + if ($eventsSettings['status']) { + $settingsUpdated = true; + } else { + $settingsUpdateError = true; + } + + break; + + // Default is to get the current settings and display the form + default: + + // Try to get the first (should be only) entry for general settings. + $eventsSettings = $this->editEntry(1); + + if ($eventsSettings === false) { + + if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) { + glmMembersAdmin::addNotice("  /models/admin/management/events.php: Unable to load events management settings.", 'Alert'); + } + + } + + break; + + } + + break; + + } +*/ + + // Compile template data + $templateData = array( +/* + 'option' => $option, + 'testResult' => $testResult, + 'importResult' => $importResult, + 'settingsUpdated' => $settingsUpdated, + 'settingsUpdateError' => $settingsUpdateError, + 'eventsSettings' => $eventsSettings +*/ + ); + + // Return status, suggested view, and data to controller + return array( + 'status' => true, + 'menuItemRedirect' => false, + 'modelRedirect' => false, + 'view' => 'admin/management/contacts.html', + 'data' => $templateData + ); + + + } + + /** + * connectPostgresDb + * + * Make a connection to the given database for the site. (postgres) + * Sets the $this->dbh with the postgers database connection + * + * @param mixed $db_host + * @param mixed $db_name + * @param mixed $db_user + * @param mixed $db_password + * @access public + * @return void + */ + public function connectPostgresDb($db_host, $db_name, $db_user, $db_password) + { + $connStr = "pgsql:"; + if ( $db_host ) { + $connPart[] = "host={$db_host}"; + } + if ( $db_name ) { + $connPart[] = "dbname={$db_name}"; + } + if ( $db_user ) { + $connPart[] = "user={$db_user}"; + } + if ( $db_password ) { + $connPart[] = "password={$db_password}"; + } + if ( !empty($connPart) ) { + $connStr .= implode( " ", $connPart ); + } + $driverOptions = array( + PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_BOTH, + ); + try { + $this->dbh = new PDO($connStr, null, null, $driverOptions); + $this->dbh->setAttribute( + PDO::ATTR_ERRMODE, + PDO::ERRMODE_EXCEPTION + ); + } catch(PDOException $e) { + echo '
$e: ' . print_r($e, true) . '
'; + wp_die(); + } + } + + /** + * addContacts + * + * Start with contacts tables. ( delete all contact data ) + * Grab all contacts + * Enter them into the new contact tables and as WordPress users as required. + * + * @access public + * @return void + */ + public function addContacts() + { + return false; + + // clear the contactss tables first + $this->wpdb->query( "DELETE FROM " . GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX . "events" ); + $this->wpdb->query( "DELETE FROM " . GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX . "recurrences" ); + $this->wpdb->query( "DELETE FROM " . GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX . "times" ); + $this->wpdb->query( "DELETE FROM " . GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX . "event_categories" ); + $this->wpdb->query( "DELETE FROM " . GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX . "locations" ); + $Recurrences = new GlmDataEventsRecurrences($this->wpdb, $this->config); + $return = ''; + $sql = " + SELECT * + FROM {$this->settings['schema']}.{$this->settings['tablename']} + WHERE edate >= '{$this->settings['sdate']}'::DATE"; + //$sql .=" AND reacur "; + try { + $events = $this->dbh->query($sql)->fetchAll(PDO::FETCH_ASSOC); + $return .= '
$events: ' . print_r($events, true) . '
'; + foreach ( $events as $event ) { + $foundMemberId = $refType = null; + if ( $event['member_id'] ) { + // get the new member id + $sql = " + SELECT id + FROM " . GLM_MEMBERS_PLUGIN_DB_PREFIX . "members + WHERE old_member_id = '" . esc_sql( trim($event['member_id']) ) . "'"; + $foundMemberId = $this->wpdb->get_row($sql, ARRAY_A); + if ( $foundMemberId ) { + $foundMemberId = $foundMemberId['id']; + $refType = $this->config['ref_type_numb']['Member']; + } + } + var_dump($foundMemberId); + // see if event is in there by old_event_id + $sql = " + SELECT id + FROM " . GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX . "events + WHERE old_event_id = '" . esc_sql( trim($event['id']) ) . "'"; + $found = $this->wpdb->get_row($sql, ARRAY_A); + //echo '
$found: ' . print_r($found, true) . '
'; + $intro = substr(strip_tags($event['descr']), 0, 250); + if ( isset($found) ) { + $this->wpdb->update( + GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX . 'events', + array( + 'status' => (($event['visable']) + ? $this->config['status_numb']['Active'] + : $this->config['status_numb']['Inactive']), + 'created' => $event['create_date'], + 'updated' => $event['create_date'], + 'approved' => $event['approved_date'], + 'name' => $event['header'], + 'intro' => $intro, + 'descr' => $event['descr'], + 'image' => $event['img'], + 'cost' => $event['cost'], + 'url' => $event['url'], + 'ref_type' => $refType, + 'ref_dest' => $foundMemberId, + 'admin_name' => $event['admin_contact_name'], + 'admin_org' => $event['admin_org_name'], + 'admin_email' => $event['admin_email'], + 'admin_phone' => $event['admin_phone'], + 'contact_email' => $event['email'], + 'contact_name' => $event['contact'], + 'contact_phone' => $event['phone'], + 'notes' => $event['notes'], + 'hide_address' => $event['notes'], + ), + array( 'old_event_id' => $event['id'] ), + array( + '%d', + '%s', + '%s', + '%s', + '%s', + '%s', + '%s', + '%s', + '%s', + '%s', + '%d', + '%d', + '%s', + '%s', + '%s', + '%s', + '%s', + '%s', + '%s', + '%s', + '%s', + ), + array( '%d' ) + ); + $eventId = $found['id']; + } else { + $eventData = array( + 'status' => (($event['visable'] == '1') + ? $this->config['status_numb']['Active'] + : $this->config['status_numb']['Inactive']), + 'created' => $event['create_date'], + 'updated' => $event['create_date'], + 'approved' => $event['approved_date'], + 'name' => $event['header'], + 'intro' => $intro, + 'descr' => $event['descr'], + 'image' => $event['img'], + 'cost' => $event['cost'], + 'url' => $event['url'], + 'old_event_id' => $event['id'], + 'ref_type' => $refType, + 'ref_dest' => $foundMemberId, + 'admin_name' => $event['admin_contact_name'], + 'admin_org' => $event['admin_org_name'], + 'admin_email' => $event['admin_email'], + 'admin_phone' => $event['admin_phone'], + 'contact_email' => $event['email'], + 'contact_name' => $event['contact'], + 'contact_phone' => $event['phone'], + 'notes' => $event['notes'], + 'hide_address' => $event['notes'], + ); + echo '
$eventData: ' . print_r($eventData, true) . '
'; + echo ''; + $this->wpdb->insert( + GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX . 'events', + $eventData, + array( + '%d', + '%s', + '%s', + '%s', + '%s', + '%s', + '%s', + '%s', + '%s', + '%s', + '%d', + '%d', + '%d', + '%s', + '%s', + '%s', + '%s', + '%s', + '%s', + '%s', + '%s', + '%s', + ) + ); + $eventId = $this->wpdb->insert_id; + //var_dump( $eventId ); + //echo '
$eventId: from insert ' . print_r($eventId, true) . '
'; + if ( !$eventId ) { + echo '
SQL Error: ' . $this->wpdb->last_error . '
'; + } + } + // checking for $eventId + //echo '
$eventId: ' . print_r($eventId, true) . '
'; + if (!$eventId) { + die('something is wrong no eventId'); + } + // generate the slug name for this new event + $eventAbstract = new GlmDataEvents($this->wpdb, $this->config); + $eventAbstract->updateSlug($eventId); + // category for event + if ( $event['topicid'] ) { + $this->wpdb->insert( + GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX . 'event_categories', + array( + 'event' => $eventId, + 'category' => $this->oldCatMap[$event['topicid']] + ), + array( + '%d', + '%d' + ) + ); + } + // recurrences for the event + $allDates = $event['reacur']; + if ( $allDates && ( $event['bdate'] == $event['edate'] ) ) { + $allDates = 0; + } + $allDay = $event['all_day']; + $dayOfWeek = + $monthOfYear = + $weekOfMonth = + $byDayOfMonth = + $lastDayOfMonth = null; + if ( $allDates ) { + if ( $event['daysow'] ) { + $dayOfWeek = $event['daysow']; + } + if ( $event['weekom'] ) { + switch ($event['weekom']) { + case '1': + $weekOfMonth = 1; + break; + case '2': + $weekOfMonth = 2; + break; + case '3': + $weekOfMonth = 4; + break; + case '4': + $weekOfMonth = 8; + break; + case '5': + $weekOfMonth = 16; + break; + } + } else { + $weekOfMonth = 63; + } + $monthOfYear = 4095; + } + $btime = $this->getTime($event['btime']); + $etime = $this->getTime($event['etime']); + $recurData =array( + 'event' => $eventId, + 'start_time' => $btime, + 'end_time' => $etime, + 'from_date' => $event['bdate'], + 'to_date' => $event['edate'], + 'all_day' => $allDay, + 'recurring' => $allDates, + 'month_of_year' => $monthOfYear, + 'week_of_month' => $weekOfMonth, + 'day_of_week' => $dayOfWeek, + 'by_day_of_month' => $byDayOfMonth, + 'last_day_of_month' => $lastDayOfMonth + ); + //echo '
' . print_r( $recurData, true) . '
'; + echo '
$recurData: ' . print_r($recurData, true) . '
'; + $this->wpdb->insert( + GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX . 'recurrences', + $recurData, + array( + '%d', + '%s', + '%s', + '%s', + '%s', + '%d', + '%d', + '%d', + '%d', + '%d', + '%d', + '%d', + ) + ); + $recurId = $this->wpdb->insert_id; + $Recurrences->createRecurrenceTimesEntries( $recurId, true, true ); + // location for the event + $hasLocation = ( + ($event['loc']) + || ($event['contact']) + || ($event['phone']) + || ($event['url']) + || ($event['email']) + ); + if ( $hasLocation ) { + $locationData = $locationFormat = array(); + $locationData['event'] = $eventId; + $locationFormat[] = '%d'; + if ($event['loc']) { + $locationData['name'] = $event['loc']; + $locationFormat[] = '%s'; + } + if ($event['address']) { + $locationData['address'] = $event['address']; + $locationFormat[] = '%s'; + } + if ($event['city']) { + $locationData['city'] = $this->getCityId( $event['city'] ); + $locationFormat[] = '%s'; + } + if ($event['state']) { + $locationData['state'] = $event['state']; + $locationFormat[] = '%s'; + } + if ($event['zip']) { + $locationData['zip'] = $event['zip']; + $locationFormat[] = '%s'; + } + if ($event['lat']) { + $locationData['lat'] = $event['lat']; + $locationFormat[] = '%s'; + } + if ($event['lon']) { + $locationData['lon'] = $event['lon']; + $locationFormat[] = '%s'; + } + if ($event['contact']) { + // break up the contact name db is expecting first and + // last name separately + list( $firstName, $lastName ) = explode( ' ', $event['contact'], 2 ); + $locationData['contact_fname'] = $firstName; + $locationFormat[] = '%s'; + $locationData['contact_lname'] = $lastName; + $locationFormat[] = '%s'; + } + if ($event['phone']) { + $locationData['contact_phone'] = $event['phone']; + $locationFormat[] = '%s'; + } + if ($event['email']) { + $locationData['contact_email'] = $event['email']; + $locationFormat[] = '%s'; + } + $this->wpdb->insert( + GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX . 'locations', + $locationData, + $locationFormat + ); + $locationId = $this->wpdb->insert_id; + if ( !$locationId ) { + echo '
$locationData: ' . print_r($locationData, true) . '
'; + die('no return id for location'); + } + } + } + } catch(PDOException $e) { + echo '
$e: ' . print_r($e, true) . '
'; + die('end here'); + } + return $return; + } + +} + +?> diff --git a/models/admin/member/contacts.php b/models/admin/member/contacts.php index eb49c3b..e016716 100644 --- a/models/admin/member/contacts.php +++ b/models/admin/member/contacts.php @@ -173,9 +173,6 @@ class GlmMembersAdmin_member_contacts extends GlmDataContacts case 'addNew': - // Check for new cities being submitted - $this->checkNewCities(); - // Check for existing contact in Wordpress and Contacts $contactCheck = $this->checkContact($_REQUEST['email'], $_REQUEST['username']); @@ -205,7 +202,7 @@ class GlmMembersAdmin_member_contacts extends GlmDataContacts // Change the contact username to match the Wordpress username $this->wpdb->query(" - UPDATE ".GLM_MEMBERS_PLUGIN_DB_PREFIX . "contacts + UPDATE ".GLM_MEMBERS_CONTACTS_PLUGIN_DB_PREFIX . "contacts SET username = '".$contactCheck['wpUserEmail']->data->user_login."' WHERE id = ".$this->contactInfo['fieldData']['id']."; "); @@ -248,12 +245,18 @@ class GlmMembersAdmin_member_contacts extends GlmDataContacts // Get the updated user information $this->contactInfo = $this->editEntry($this->contactInfo['fieldData']['id']); + // Save the contact ID + $this->contactID = $this->contactInfo['fieldData']['id']; + $newContactCreated = true; // Store the contact ID and active status into user meta data update_user_meta($userID, 'glmMembersContactID', $this->contactInfo['fieldData']['id']); update_user_meta($userID, 'glmMembersContactActive', $this->contactInfo['fieldData']['active']['value']); + // Check for new cities being submitted + $this->checkNewCities(); + break; } @@ -285,12 +288,12 @@ class GlmMembersAdmin_member_contacts extends GlmDataContacts case 'submit': - // Check for new cities being submitted - $this->checkNewCities(); - // Get current role set in the contacts record along with the matching WP role slug $this->contactID = ($_REQUEST['contact']-0); + // Check for new cities being submitted + $this->checkNewCities(); + $savedContactRole = $this->getWpRole($this->contactID); $this->contactInfo = $this->updateEntry($this->contactID); @@ -479,23 +482,23 @@ class GlmMembersAdmin_member_contacts extends GlmDataContacts public function checkNewCities() { - // If we have a member ID and this was a submission with a new city (id < 0) + // If we have a contact ID and this was a submission with a new city (id < 0) if ($this->contactID && isset($_REQUEST['city']) && $_REQUEST['city'] == -1 && isset($_REQUEST['newCityName']) && trim($_REQUEST['newCityName']) != '') { // Clean up city name $cName = trim(filter_var($_REQUEST['newCityName'])); // Try to add the city - require_once(GLM_MEMBERS_CONTACTS_PLUGIN_CLASS_PATH.'/data/dataCities.php'); + require_once(GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataCities.php'); $Cities = new GlmDataCities($this->wpdb, $this->config); $cID = $Cities->addCity($cName); // If we got a city id back if (is_int($cID) && $cID > 0) { - // Update the city selected for this memberInfo record + // Update the city selected for this contact record $sql = " - UPDATE ".GLM_MEMBERS_PLUGIN_DB_PREFIX."contacts + UPDATE ".GLM_MEMBERS_CONTACTS_PLUGIN_DB_PREFIX."contacts SET city = $cID WHERE id = ".$this->contactID." ;"; diff --git a/models/admin/profile/index.php b/models/admin/profile/index.php index 1564bfd..26ab246 100644 --- a/models/admin/profile/index.php +++ b/models/admin/profile/index.php @@ -222,7 +222,7 @@ class GlmMembersAdmin_profile_index extends GlmDataContacts // Update the city selected for this memberInfo record $sql = " - UPDATE ".GLM_MEMBERS_PLUGIN_DB_PREFIX."contacts + UPDATE ".GLM_MEMBERS_CONTACTS_PLUGIN_DB_PREFIX."contacts SET city = $cID WHERE id = ".$this->contactID." ;"; diff --git a/setup/adminMenus.php b/setup/adminMenus.php index 358802b..83d0a5f 100644 --- a/setup/adminMenus.php +++ b/setup/adminMenus.php @@ -30,6 +30,15 @@ * */ +add_submenu_page( + 'glm-members-admin-menu-members', // Parent slug + 'Contacts', // Page title + 'Contacts', // Menu Title + 'glm_members_members', // Capability required + 'glm-members-admin-menu-contacts-index', // Menu slug + function() {$this->controller('contacts');} +); + // If a contact is logged in (ownEntity isn't false), add Contact Profile menu item if ($this->config['loggedInUser']['contactUser']) { add_submenu_page( diff --git a/setup/adminTabs.php b/setup/adminTabs.php index 410389f..8bc578f 100644 --- a/setup/adminTabs.php +++ b/setup/adminTabs.php @@ -33,6 +33,8 @@ * */ +// Admin Members Contacts Tab +/* add_filter('glm-member-db-add-tab-for-members', function($addOnTabs) { $newTabs = array( @@ -46,7 +48,9 @@ add_filter('glm-member-db-add-tab-for-members', return $addOnTabs; } ); +*/ +// Admin Member Contacts Tab if (apply_filters('glm_members_permit_admin_member_contacts_tab', true)) { add_filter('glm-member-db-add-tab-for-member', function($addOnTabs) { @@ -63,4 +67,23 @@ if (apply_filters('glm_members_permit_admin_member_contacts_tab', true)) { ); } +// Admin Management Contacts Tab +if (apply_filters('glm_members_permit_admin_members_contacts_tab', true)) { + add_filter('glm-member-db-add-tab-for-management', + function($addOnTabs) { + $newTabs = array( + array( + 'text' => 'Contacts', + 'menu' => 'management', + 'action' => 'contacts' + ) + ); + $addOnTabs = array_merge($addOnTabs, $newTabs); + return $addOnTabs; + } + ); +} + + + ?> \ No newline at end of file diff --git a/setup/databaseScripts/create_database_V0.0.1.sql b/setup/databaseScripts/create_database_V0.0.1.sql new file mode 100644 index 0000000..a80e516 --- /dev/null +++ b/setup/databaseScripts/create_database_V0.0.1.sql @@ -0,0 +1,56 @@ +-- Gaslight Media Members Database +-- File Created: 12/09/14 15:27:15 +-- Database Version: 1.0.0 +-- Database Creation Script - Contacts Add-On +-- +-- To permit each query below to be executed separately, +-- all queries must be separated by a line with four dashes +-- +-- **** BE SURE TO ALSO UPDATE drop_database_Vxxx.sql FILE WHEN CHANGING TABLES **** +-- + +-- Contacts - used by various entities +CREATE TABLE {prefix}contacts ( + id INT NOT NULL AUTO_INCREMENT, + active BOOLEAN NULL, -- Contact is active flag + access INT NULL, -- Access type - See access table in plugin.ini + fname TINYTEXT NULL, -- First name of contact + lname TINYTEXT NULL, -- Last name of contact + contact_type INT NULL, -- Contact type - see contact_type table (individual, role, ...) + contact_role INT NULL, -- Contact WordPress user Role + org TINYTEXT NULL, -- Organization name + title TINYTEXT NULL, -- Title/Position + descr TEXT NULL, -- Description of position/responsibilities - Displayed + image TINYTEXT NULL, -- Image + addr1 TINYTEXT NULL, -- Address line 1 - Address is for contact, not necessarily for organization + addr2 TINYTEXT NULL, -- Address line 2 + city INT NULL, -- Pointer to city in cities table + state TINYTEXT NULL, -- Two character state code - matches states.ini entries + country TINYTEXT NULL, -- Two character country code - matches countries.ini entries + zip TINYTEXT NULL, -- ZIP/Postal Code + lat FLOAT NULL, -- Latitude of contact location + lon FLOAT NULL, -- Longitude of contact location + url TINYTEXT NULL, -- URL to information regarding this contact + office_phone TINYTEXT NULL, -- Office phone number + home_phone TINYTEXT NULL, -- Home phone number - or after-hours phone number + mobile_phone TINYTEXT NULL, -- Mobile phone number + alt_phone TINYTEXT NULL, -- An alternate phone number + fax TINYTEXT NULL, -- FAX number (do people still use these?) + email TINYTEXT NULL, -- E-Mail address + alt_email TINYTEXT NULL, -- Alternate E-Mail address - Also used to log-in + username TINYTEXT NULL, -- Optional username to use for login + password TINYTEXT NULL, -- Encrypted password + notes TEXT NULL, -- Notes - Not displayed on front-end + create_time TIMESTAMP NULL, -- Create date/time + modify_time TIMESTAMP NULL, -- Last modified date/time + ref_type INT NULL, -- Type of entity this contact is associated with + ref_dest INT NULL, -- Pointer to the specific entity of ref_type this contact is associated with + PRIMARY KEY (id), + INDEX(fname(20)), + INDEX(lname(20)), + INDEX(city), + INDEX(zip(10)), + INDEX(lat), + INDEX(lon), + INDEX(email(20)) +); diff --git a/setup/databaseScripts/dbVersions.php b/setup/databaseScripts/dbVersions.php new file mode 100644 index 0000000..7009d41 --- /dev/null +++ b/setup/databaseScripts/dbVersions.php @@ -0,0 +1,33 @@ + + * @license http://www.gaslightmedia.com Gaslightmedia + * @release dbVersions.php,v 1.0 2014/10/31 19:31:47 cscott Exp $ + * @link http://dev.gaslightmedia.com/ + */ + +/** + * Database Versions + * + * *** PLEASE NOW INCLUDE A DATE FOR EACH DATABASE VERSION *** + * '1.1.2' => array('version' => '1.1.2', 'tables' => 14, 'date' => '4/11/16') + * + * An array of past and current Member Database versions. + * + * Each entry below uses a key so code can find data on + * a specific version and in the values are the version + * again and the proper number of tables that should + * exist with that version. + */ +$glmMembersContactsDbVersions = array( + '0.0.1' => array('version' => '0.0.1', 'tables' => 1, 'date' => '4/15/2016'), +); + + diff --git a/setup/databaseScripts/drop_database_V0.0.1.sql b/setup/databaseScripts/drop_database_V0.0.1.sql new file mode 100644 index 0000000..78bacb5 --- /dev/null +++ b/setup/databaseScripts/drop_database_V0.0.1.sql @@ -0,0 +1,23 @@ +-- Gaslight Media Members Database +-- File Created: 12/09/14 15:27:15 +-- Database Version: 1.1.1 +-- Database Deletion Script +-- Note: Tables with DELETE CASCADE must appear before referenced table + +DROP TABLE IF EXISTS + {prefix}amenities, + {prefix}amenity_ref, + {prefix}category_member_info, + {prefix}cities, + {prefix}contacts, + {prefix}images, + {prefix}files, + {prefix}members, + {prefix}member_info, + {prefix}member_type, + {prefix}regions, + {prefix}settings_general, + {prefix}settings_terms, + {prefix}categories +; + diff --git a/setup/databaseScripts/readme.txt b/setup/databaseScripts/readme.txt new file mode 100644 index 0000000..141d8b5 --- /dev/null +++ b/setup/databaseScripts/readme.txt @@ -0,0 +1,41 @@ +This directory contains database creation and update scripts for this add-on. + +The files in this directory are checked by the checkDatabase() function in the +main plugin classes/glmPluginSupport.php file. + +This directory is optional. If there are no data tables that need to be created +for this add-on, there should be no files in this directory. The directory may +also be deleted. + +See the "examples" directory for a sample of what can go in this directory. +Procedure to update database +----------------------------- + +0) Make a backup copy of the site's database. + +1) Rename "create_database_Vx.x.x.sql" to new version number. + example: create_database_V0.0.9.sql -> create_database_V0.0.10.sql + +2) Edit renamed create database file and make desired changes + +3) Add a new "update_database_Vx.x.x.sql" named with the correct version #. + +4) Edit new update database files with SQL script to make the necessary changes + from the previous version to the new version. (i.e. to add new fields, + rename fields, insert records, ...) + +5) Optionally add an "update_database_Vx.x.x.php" file if PHP scripting is + needed to update database content. (i.e. to make changes to database content) + +6) Edit the "dbVersions.php" file and add a new line for the new version. + *** Now please be sure to add a date for each entry *** + i.e. '1.1.2' => array('version' => '1.1.2', 'tables' => 14, 'date' => '4/11/16') + +7) When this is all done, edit the index.php file for the plugin/add-on and + change "GLM_MEMBERS_{addon}_PLUGIN_DB_VERSION" defined parameter where + {addon} is the add-on name. + +8) Go to an admin menu item for the main member db plugin or any add-on. If all + goes well, the main plugin should have detected the change and updated the + database. If not, restore the database and try again. +9) Check the database to make sure the changes to fields and data are correct. diff --git a/setup/validActions.php b/setup/validActions.php index 8af4d47..458862c 100644 --- a/setup/validActions.php +++ b/setup/validActions.php @@ -40,6 +40,12 @@ $glmMembersContactsAddOnValidActions = array( ), 'profile' => array( 'index' => GLM_MEMBERS_CONTACTS_PLUGIN_SLUG + ), + 'contacts' => array( + 'index' => GLM_MEMBERS_CONTACTS_PLUGIN_SLUG + ), + 'management' => array( + 'contacts' => GLM_MEMBERS_CONTACTS_PLUGIN_SLUG ) ), 'frontActions' => array( diff --git a/views/admin/contacts/header.html b/views/admin/contacts/header.html new file mode 100644 index 0000000..3be1c2f --- /dev/null +++ b/views/admin/contacts/header.html @@ -0,0 +1,8 @@ +
+

All Contacts

+ +
+ + \ No newline at end of file diff --git a/views/admin/contacts/index.html b/views/admin/contacts/index.html new file mode 100644 index 0000000..78058f7 --- /dev/null +++ b/views/admin/contacts/index.html @@ -0,0 +1,75 @@ +{include file='admin/contacts/header.html'} + +
+ List Filters:   + Show Archived   +    + Search + +

Contacts

+ + + + + + + + + + + + + + + +{if $haveContacts} + {foreach $contacts as $c} + + + + + + + + + + + {/foreach} +{else} + +{/if} + +
NameActiveTypeAccessUserEntityOrganizationLocation
{$c.lname}, {$c.fname}{$c.active.name}{$c.contact_type.name}{$c.access.name}{$c.contact_role_short.name} + {$c.ref_type.name}: + {$c.ref_dest_name} + {$c.org}{$c.city.name}, {$c.state.name}
(no contacts listed)
+ + + + + +{include file='admin/footer.html'} diff --git a/views/admin/management/contacts.html b/views/admin/management/contacts.html new file mode 100644 index 0000000..7b9146f --- /dev/null +++ b/views/admin/management/contacts.html @@ -0,0 +1,71 @@ +{include file='admin/management/header.html'} + + + + + + + {if $importResult} + + + + + {else} + + + + {/if} +
Return to Import Events
+ {$importResult} +
+
+ + + + +
+
+ Database to import from: + + + + + + + + +
+ +
+
+
+ + -- 2.17.1