From fb4528079e2db173d19d7dc65d8e25958b99ac4e Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Tue, 30 Jun 2015 10:50:09 -0400 Subject: [PATCH] In mid development for image upload handling --- classes/data/dataAccommodationTypes.php | 2 +- classes/data/dataAmenities.php | 2 +- classes/data/dataCategories.php | 4 +- classes/data/dataCategoryMemberInfo.php | 6 +- classes/data/dataCities.php | 8 +- classes/data/dataImages.php | 240 ++++++++++ classes/data/dataMemberInfo.php | 2 +- classes/data/dataMemberTypes.php | 2 +- classes/data/dataMembers.php | 2 +- classes/data/dataRegions.php | 2 +- classes/data/settings/dataSettingsGeneral.php | 167 ++++++- classes/data/settings/dataSettingsTerms.php | 448 ++++++++++++++++++ config/plugin.ini | 1 + controllers/admin.php | 107 ++++- glm-member-db.php | 9 +- js/imageUpload/OLD_SAVE_imageUpload.js | 88 ++++ js/imageUpload/imageUpload.css | 132 ++++++ js/imageUpload/imageUpload.js | 314 ++++++++++++ .../.editorconfig | 11 + .../.gitignore | 5 + .../.travis.yml | 8 + js/jqueryDragAndDrop-ForReferenceOnly/README | 70 +++ .../jquery.ezdz.css | 126 +++++ .../jquery.ezdz.js | 422 +++++++++++++++++ lib/GlmDataAbstract/DataAbstract.php | 70 ++- lib/html5-File-Upload/assets/css/styles.css | 256 ++++++++++ .../assets/img/background_tile_1.jpg | Bin 0 -> 2394 bytes .../assets/img/background_tile_2.jpg | Bin 0 -> 2418 bytes .../assets/img/background_tile_3.jpg | Bin 0 -> 2347 bytes .../assets/img/blue_line.jpg | Bin 0 -> 1283 bytes lib/html5-File-Upload/assets/img/done.png | Bin 0 -> 3399 bytes lib/html5-File-Upload/assets/img/logo.jpg | Bin 0 -> 11044 bytes lib/html5-File-Upload/assets/img/tzine.png | Bin 0 -> 1263 bytes .../assets/js/jquery.filedrop.js | 315 ++++++++++++ .../assets/js/upload-script.js | 102 ++++ lib/html5-File-Upload/post_file.php | 59 +++ lib/html5-File-Upload/sample-index.html | 41 ++ misc/databaseScripts/create_database_V0.1.sql | 298 +++++++++--- misc/notes.txt | 11 + ...a1e104c26a275acc180da0.file.index.html.php | 41 +- ...645f3c977b0b1dc2a9e718.file.index.html.php | 6 +- ...bca4d9344f2fd4a4152f52.file.index.html.php | 6 +- models/admin/dashboardWidget/index.php | 28 +- models/admin/member/memberImage.php | 137 ++++++ models/admin/member/memberInfo.php | 44 +- models/admin/members/index.php | 28 +- models/admin/settings/index.php | 75 ++- models/admin/settings/terms.php | 184 +++++++ views/admin/configure/accommodationTypes.html | 2 +- views/admin/configure/amenities.html | 2 +- views/admin/configure/categories.html | 2 +- views/admin/configure/cities.html | 2 +- views/admin/configure/index.html | 2 +- views/admin/configure/regions.html | 2 +- views/admin/dashboardWidget/index.html | 24 +- views/admin/member/memberInfo.html | 132 +++++- views/admin/members/index.html | 27 +- views/admin/settings/header.html | 1 + views/admin/settings/index.html | 295 +++++++++++- views/admin/settings/terms.html | 376 +++++++++++++++ .../index.html | 0 61 files changed, 4521 insertions(+), 225 deletions(-) create mode 100644 classes/data/dataImages.php create mode 100644 classes/data/settings/dataSettingsTerms.php create mode 100644 js/imageUpload/OLD_SAVE_imageUpload.js create mode 100644 js/imageUpload/imageUpload.css create mode 100644 js/imageUpload/imageUpload.js create mode 100644 js/jqueryDragAndDrop-ForReferenceOnly/.editorconfig create mode 100644 js/jqueryDragAndDrop-ForReferenceOnly/.gitignore create mode 100644 js/jqueryDragAndDrop-ForReferenceOnly/.travis.yml create mode 100644 js/jqueryDragAndDrop-ForReferenceOnly/README create mode 100644 js/jqueryDragAndDrop-ForReferenceOnly/jquery.ezdz.css create mode 100644 js/jqueryDragAndDrop-ForReferenceOnly/jquery.ezdz.js create mode 100644 lib/html5-File-Upload/assets/css/styles.css create mode 100644 lib/html5-File-Upload/assets/img/background_tile_1.jpg create mode 100644 lib/html5-File-Upload/assets/img/background_tile_2.jpg create mode 100644 lib/html5-File-Upload/assets/img/background_tile_3.jpg create mode 100644 lib/html5-File-Upload/assets/img/blue_line.jpg create mode 100644 lib/html5-File-Upload/assets/img/done.png create mode 100644 lib/html5-File-Upload/assets/img/logo.jpg create mode 100644 lib/html5-File-Upload/assets/img/tzine.png create mode 100644 lib/html5-File-Upload/assets/js/jquery.filedrop.js create mode 100644 lib/html5-File-Upload/assets/js/upload-script.js create mode 100644 lib/html5-File-Upload/post_file.php create mode 100644 lib/html5-File-Upload/sample-index.html create mode 100644 models/admin/member/memberImage.php create mode 100644 models/admin/settings/terms.php create mode 100644 views/admin/settings/terms.html rename views/admin/{settingsPage => settingsPage-ISTHISNEEDED}/index.html (100%) diff --git a/classes/data/dataAccommodationTypes.php b/classes/data/dataAccommodationTypes.php index c87ab977..ef803e5b 100644 --- a/classes/data/dataAccommodationTypes.php +++ b/classes/data/dataAccommodationTypes.php @@ -141,7 +141,7 @@ class GlmDataAccommodationTypes extends GlmDataAbstract ); - if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { + if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { glmMembersAdmin::addNotice($this->fields, 'DataBlock', 'Table Fields: '.$this->table); } diff --git a/classes/data/dataAmenities.php b/classes/data/dataAmenities.php index ee49098c..ce8d06c0 100644 --- a/classes/data/dataAmenities.php +++ b/classes/data/dataAmenities.php @@ -157,7 +157,7 @@ class GlmDataAmenities extends GlmDataAbstract ); - if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { + if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { glmMembersAdmin::addNotice($this->fields, 'DataBlock', 'Table Fields: '.$this->table); } diff --git a/classes/data/dataCategories.php b/classes/data/dataCategories.php index 5f1062e3..599f72ff 100644 --- a/classes/data/dataCategories.php +++ b/classes/data/dataCategories.php @@ -154,7 +154,7 @@ class GlmDataCategories extends GlmDataAbstract ); - if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { + if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { glmMembersAdmin::addNotice($this->fields, 'DataBlock', 'Table Fields: '.$this->table); } @@ -283,7 +283,7 @@ class GlmDataCategories extends GlmDataAbstract } - if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { + if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { glmMembersAdmin::addNotice("Category added: name = $name, parent = $parent, ID = $categoryID", 'DataBlock', "addCategory()"); } diff --git a/classes/data/dataCategoryMemberInfo.php b/classes/data/dataCategoryMemberInfo.php index 447d0ee4..23b30fc0 100644 --- a/classes/data/dataCategoryMemberInfo.php +++ b/classes/data/dataCategoryMemberInfo.php @@ -143,7 +143,7 @@ class GlmDataCategoryMemberInfo extends GlmDataAbstract ); - if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { + if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { glmMembersAdmin::addNotice($this->fields, 'DataBlock', 'Table Fields: '.$this->table); } @@ -200,7 +200,7 @@ class GlmDataCategoryMemberInfo extends GlmDataAbstract ;"; $list = $this->wpdb->get_results($sql, ARRAY_A); - if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { + if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { glmMembersAdmin::addNotice($sql, 'DataBlock', "DataAbstract - getListWithParents() query"); glmMembersAdmin::addNotice($list, 'DataBlock', 'getListWithParents() data'); } @@ -289,7 +289,7 @@ class GlmDataCategoryMemberInfo extends GlmDataAbstract // Get new list and return it $current = $this->getList($memberInfoID); - if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { + if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { glmMembersAdmin::addNotice($current, 'DataBlock', 'Currently Selected Member Categories'); } diff --git a/classes/data/dataCities.php b/classes/data/dataCities.php index 35396aaf..8b4156c4 100644 --- a/classes/data/dataCities.php +++ b/classes/data/dataCities.php @@ -10,7 +10,7 @@ * @package GLM Member-DB * @author Chuck Scott * @license http://www.gaslightmedia.com Gaslightmedia - * @release SVN: $Id: dataMemberType.php,v 1.0 2011/01/25 19:31:47 cscott Exp $ + * @release SVN: $Id: dataCities.php,v 1.0 2011/01/25 19:31:47 cscott Exp $ */ /** @@ -22,8 +22,8 @@ * @package EventManagement * @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 $ + * @release SVN: $Id: dataCities.php,v 1.0 2011/01/25 19:31:47 cscott + * Exp $ */ class GlmDataCities extends GlmDataAbstract { @@ -126,7 +126,7 @@ class GlmDataCities extends GlmDataAbstract ); - if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { + if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { glmMembersAdmin::addNotice($this->fields, 'DataBlock', 'Table Fields: '.$this->table); } diff --git a/classes/data/dataImages.php b/classes/data/dataImages.php new file mode 100644 index 00000000..a5e66e33 --- /dev/null +++ b/classes/data/dataImages.php @@ -0,0 +1,240 @@ + + * @license http://www.gaslightmedia.com Gaslightmedia + * @release SVN: $Id: dataImages.php,v 1.0 2011/01/25 19:31:47 cscott Exp $ + */ + +/** + * EventManagementDataImages class + * + * PHP version 5 + * + * @category Data + * @package EventManagement + * @author Chuck Scott + * @license http://www.gaslightmedia.com Gaslightmedia + * @release SVN: $Id: dataImages.php,v 1.0 2011/01/25 19:31:47 cscott + * Exp $ + */ +class GlmDataImages extends GlmDataAbstract +{ + + /** + * WordPress Database Object + * + * @var $wpdb + * @access public + */ + public $wpdb; + /** + * Plugin Configuration Data + * + * @var $config + * @access public + */ + public $config; + /** + * Field definitions + * + * @var $ini + * @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; + + /** + * Constructor + * + * @param object $d + * database connection + * + * @return void + * @access public + */ + function __construct ($wpdb, $config) + { + + // 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_PLUGIN_DB_PREFIX . 'images'; + + /* + * Table Data Fields + */ + $this->fields = array( + + 'id' => array( + 'field' => 'id', + 'type' => 'integer', + 'view_only' => true, + 'use' => 'a' + ), + + // Status + 'status' => array ( + 'field' => 'status', + 'type' => 'list', + 'list' => $this->config['status'], + 'required' => true, + 'default' => $this->config['status_numb']['Pending'], + 'force_list' => true, + 'use' => 'a' + ), + + // File Name + 'file_name' => array( + 'field' => 'file_name', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // Description + 'descr' => array( + 'field' => 'descr', + 'type' => 'text', + 'use' => 'a' + ), + + // Caption + 'caption' => array( + 'field' => 'caption', + 'type' => 'text', + 'use' => 'a' + ), + + // Position + 'position' => array( + 'field' => 'position', + 'type' => 'integer', + 'use' => 'a' + ), + + // Reference Type - Which table this entry is associated with + 'ref_type' => array ( + 'field' => 'ref_type', + 'type' => 'list', + 'list' => $this->config['ref_type'], + 'required' => true, + 'default' => $this->config['ref_type_numb']['None'], + 'force_list' => true, + 'use' => 'a' + ), + + // Reference Destination - Which entry in the table is it associated with + 'position' => array( + 'field' => 'position', + 'type' => 'integer', + 'use' => 'a' + ) + + ); + + if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { + glmMembersAdmin::addNotice($this->fields, 'DataBlock', 'Table Fields: '.$this->table); + } + + } + + + /* + * Get an Image Gallery + * + * Retrieves all images for a specific refernce type and ID + * + * Reference types point to a particuarl table of data, such as + * the member_info table. The ID points to a particular entry, + * such as a specific member information record (Reference + * Destination). + * + * @param int $refType Reference Type + * @param int $refID Reference entry ID + * + * @return object Class object + * + */ + public function getGallery($refType, $refID ) + { + + // Check for a valid reference type + if (!isset($this->config['ref_type'][$refType])) { + + if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { + glmMembersAdmin::addNotice("dataImages.php - getGallery()
  Specified reference type ($refType) is invalid.", 'Alert'); + } + + return false; + } + + // Make sure $refID is a positive integer - If it's not a valid reference, nothing will be returned anyway. + $refID = $refID -0; + if ($refID <= 0) { + + if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { + glmMembersAdmin::addNotice("dataImages.php - getGallery()
  Specified reference destination ($refID) is invalid.", 'Alert'); + } + + return false; + } + + + // Get all images matching $refType and $refID ordered by "position" number + $where = "T.ref_type = $refType AND T.ref_dest = $refID"; + $imageGallery = $this->getList($where, 'T.position'); + + // Check if we found anything + if (!is_array($imageGallery) || count($imageGallery) == 0) { + return false; + } + + return $imageGallery; + + } +} + +?> \ No newline at end of file diff --git a/classes/data/dataMemberInfo.php b/classes/data/dataMemberInfo.php index ced7e2ec..5ff5ea2d 100644 --- a/classes/data/dataMemberInfo.php +++ b/classes/data/dataMemberInfo.php @@ -314,7 +314,7 @@ class GlmDataMemberInfo extends GlmDataAbstract ); - if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { + if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { glmMembersAdmin::addNotice($this->fields, 'DataBlock', 'Table Fields: '.$this->table); } diff --git a/classes/data/dataMemberTypes.php b/classes/data/dataMemberTypes.php index 92cd7976..887f3bbe 100644 --- a/classes/data/dataMemberTypes.php +++ b/classes/data/dataMemberTypes.php @@ -134,7 +134,7 @@ class GlmDataMemberTypes extends GlmDataAbstract ); - if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { + if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { glmMembersAdmin::addNotice($this->fields, 'DataBlock', 'Table Fields: '.$this->table); } diff --git a/classes/data/dataMembers.php b/classes/data/dataMembers.php index 753c5728..409102ed 100644 --- a/classes/data/dataMembers.php +++ b/classes/data/dataMembers.php @@ -179,7 +179,7 @@ class GlmDataMembers extends GlmDataAbstract { ); - if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { + if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { glmMembersAdmin::addNotice($this->fields, 'DataBlock', 'Table Fields: '.$this->table); } diff --git a/classes/data/dataRegions.php b/classes/data/dataRegions.php index 571df300..09ccaefd 100644 --- a/classes/data/dataRegions.php +++ b/classes/data/dataRegions.php @@ -141,7 +141,7 @@ class GlmDataRegions extends GlmDataAbstract ); - if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { + if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { glmMembersAdmin::addNotice($this->fields, 'DataBlock', 'Table Fields: '.$this->table); } diff --git a/classes/data/settings/dataSettingsGeneral.php b/classes/data/settings/dataSettingsGeneral.php index dc7ea0ae..ad6fc345 100644 --- a/classes/data/settings/dataSettingsGeneral.php +++ b/classes/data/settings/dataSettingsGeneral.php @@ -122,21 +122,21 @@ class GlmDataSettingsGeneral extends GlmDataAbstract // Adming Debug 'admin_debug' => array( 'field' => 'admin_debug', - 'type' => 'boolean', + 'type' => 'checkbox', 'use' => 'a' ), // Adming Debug Verbose 'admin_debug_verbose' => array( 'field' => 'admin_debug_verbose', - 'type' => 'boolean', + 'type' => 'checkbox', 'use' => 'a' ), // Front-end Debug 'front_debug' => array( 'field' => 'front_debug', - 'type' => 'boolean', + 'type' => 'checkbox', 'use' => 'a' ), @@ -266,7 +266,7 @@ class GlmDataSettingsGeneral extends GlmDataAbstract 'field' => 'list_logo_size', 'type' => 'list', 'list' => $this->config['image_sizes'], - 'required' => true, + 'force_list' => true, 'use' => 'a' ), @@ -280,7 +280,7 @@ class GlmDataSettingsGeneral extends GlmDataAbstract // Front-end Listings - Show Street 'list_show_street' => array( - 'field' => 'list_show_Street', + 'field' => 'list_show_street', 'type' => 'checkbox', 'use' => 'a' ), @@ -366,7 +366,7 @@ class GlmDataSettingsGeneral extends GlmDataAbstract ), // Front-end Listings - Show Credit Cards - 'list_show_logo' => array( + 'list_show_creditcards' => array( 'field' => 'list_show_creditcards', 'type' => 'checkbox', 'default' => true, @@ -406,13 +406,13 @@ class GlmDataSettingsGeneral extends GlmDataAbstract 'field' => 'list_map_logo_size', 'type' => 'list', 'list' => $this->config['image_sizes'], - 'required' => true, + 'force_list' => true, 'use' => 'a' ), // Front-end Listings - Map Show Description - 'list_map_show_description' => array( - 'field' => 'list_map_show_description', + 'list_map_show_descr' => array( + 'field' => 'list_map_show_descr', 'type' => 'checkbox', 'default' => false, 'use' => 'a' @@ -435,7 +435,7 @@ class GlmDataSettingsGeneral extends GlmDataAbstract ), // Front-end Listings - Map Show Street - 'list_map_show_Street' => array( + 'list_map_show_street' => array( 'field' => 'list_map_show_street', 'type' => 'checkbox', 'default' => false, @@ -555,13 +555,13 @@ class GlmDataSettingsGeneral extends GlmDataAbstract 'field' => 'detail_logo_size', 'type' => 'list', 'list' => $this->config['image_sizes'], - 'required' => true, + 'force_list' => true, 'use' => 'a' ), // Front-end Member Detail - Show Description - 'detail_show_description' => array( - 'field' => 'detail_show_description', + 'detail_show_descr' => array( + 'field' => 'detail_show_descr', 'type' => 'checkbox', 'default' => false, 'use' => 'a' @@ -669,11 +669,148 @@ class GlmDataSettingsGeneral extends GlmDataAbstract 'type' => 'checkbox', 'default' => false, 'use' => 'a' - ) + ), + + /* + * Front-end Member Detail Map Options + */ + + // Front-end Detail - Map Show Logo + 'detail_map_show_logo' => array( + 'field' => 'detail_map_show_logo', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Detail - Map Logo Size + 'detail_map_logo_size' => array( + 'field' => 'detail_map_logo_size', + 'type' => 'list', + 'list' => $this->config['image_sizes'], + 'force_list' => true, + 'use' => 'a' + ), + + // Front-end Detail - Map Show Description + 'detail_map_show_descr' => array( + 'field' => 'detail_map_show_descr', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Detail - Map Show Short Description + 'detail_map_show_short_descr' => array( + 'field' => 'detail_map_show_short_descr', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Detail - Map Show Address + 'detail_map_show_address' => array( + 'field' => 'detail_map_show_address', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Detail - Map Show Street + 'detail_map_show_street' => array( + 'field' => 'detail_map_show_street', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Detail - Map Show City, State, ZIP + 'detail_map_show_citystatezip' => array( + 'field' => 'detail_map_show_citystatezip', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Detail - Map Show Country + 'detail_map_show_country' => array( + 'field' => 'detail_map_show_country', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Detail - Map Show Region + 'detail_map_show_region' => array( + 'field' => 'detail_map_show_region', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Detail - Map Show Phone + 'detail_map_show_phon' => array( + 'field' => 'detail_map_show_phone', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Detail - Map Show Toll Free + 'detail_map_show_tollfree' => array( + 'field' => 'detail_map_show_tollfree', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Detail - Map Show URL + 'detail_map_show_url' => array( + 'field' => 'detail_map_show_url', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Detail - Map Show URL With New Target + 'detail_map_show_url_newtarget' => array( + 'field' => 'detail_map_show_url_newtarget', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Detail - Map Show Categories + 'detail_map_show_categories' => array( + 'field' => 'detail_map_show_categories', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Detail - Map Show Credit Cards + 'detail_map_show_creditcards' => array( + 'field' => 'detail_map_show_creditcards', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + // Front-end Detail - Map Show amenities + 'detail_map_show_amenities' => array( + 'field' => 'detail_map_show_amenities', + 'type' => 'checkbox', + 'default' => false, + 'use' => 'a' + ), + + + + ); - if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { + if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { glmMembersAdmin::addNotice($this->fields, 'DataBlock', 'Table Fields: '.$this->table); } diff --git a/classes/data/settings/dataSettingsTerms.php b/classes/data/settings/dataSettingsTerms.php new file mode 100644 index 00000000..4a05295d --- /dev/null +++ b/classes/data/settings/dataSettingsTerms.php @@ -0,0 +1,448 @@ + + * @license http://www.gaslightmedia.com Gaslightmedia + * @release SVN: $Id: dataSettingsTerms.php,v 1.0 2011/01/25 19:31:47 cscott Exp $ + */ + +/** + * EventManagementDataSettingsGeneral class + * + * PHP version 5 + * + * @category Data + * @package EventManagement + * @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 GlmDataSettingsTerms extends GlmDataAbstract +{ + + /** + * WordPress Database Object + * + * @var $wpdb + * @access public + */ + public $wpdb; + /** + * Plugin Configuration Data + * + * @var $config + * @access public + */ + public $config; + /** + * Field definitions + * + * @var $ini + * @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; + + /** + * Constructor + * + * @param object $d + * database connection + * + * @return void + * @access public + */ + function __construct ($wpdb, $config) + { + + // 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_PLUGIN_DB_PREFIX . 'settings_terms'; + + /* + * Table Data Fields + */ + $this->fields = array( + + 'id' => array( + 'field' => 'id', + 'type' => 'integer', + 'view_only' => true, + 'use' => 'a' + ), + + /* + * Admin Menu Names + */ + + // Menu Members + 'term_admin_menu_members' => array( + 'field' => 'term_admin_menu_members', + 'type' => 'text', + 'use' => 'a' + ), + + // Sub Menu Member List + 'term_admin_menu_members_list' => array( + 'field' => 'term_admin_menu_member_list', + 'type' => 'text', + 'use' => 'a' + ), + + // Menu Member + 'term_admin_menu_member' => array( + 'field' => 'term_admin_menu_member', + 'type' => 'text', + 'use' => 'a' + ), + + // Menu Configure + 'term_admin_menu_configure' => array( + 'field' => 'term_admin_menu_configure', + 'type' => 'text', + 'use' => 'a' + ), + + // Menu Settings + 'term_admin_menu_settings' => array( + 'field' => 'term_admin_menu_settings', + 'type' => 'text', + 'use' => 'a' + ), + + // Menu Shortcodes + 'term_admin_menu_shortcodes' => array( + 'field' => 'term_admin_menu_shortcodes', + 'type' => 'text', + 'use' => 'a' + ), + + /* + * Admin Page Tabs + */ + + // Tab Members/Main Dashboard + 'term_admin_menu_members_dashboard' => array( + 'field' => 'term_admin_menu_members_dashboard', + 'type' => 'text', + 'use' => 'a' + ), + + // Tab Members/List of Members + 'term_admin_menu_members_list' => array( + 'field' => 'term_admin_menu_members_list', + 'type' => 'text', + 'use' => 'a' + ), + + // Tab Members/Reports + 'term_admin_menu_members_reports' => array( + 'field' => 'term_admin_menu_members_reports', + 'type' => 'text', + 'use' => 'a' + ), + + // Tab Member/Member Dashboard + 'term_admin_menu_member_dashboard' => array( + 'field' => 'term_admin_menu_member_dashboard', + 'type' => 'text', + 'use' => 'a' + ), + + // Tab Member/Member Info + 'term_admin_menu_member_info' => array( + 'field' => 'term_admin_menu_member_info', + 'type' => 'text', + 'use' => 'a' + ), + + // Tab Member/Locations + 'term_admin_menu_member_locations' => array( + 'field' => 'term_admin_menu_member_locations', + 'type' => 'text', + 'use' => 'a' + ), + + // Tab Member/Facilities + 'term_admin_menu_member_facilities' => array( + 'field' => 'term_admin_menu_member_facilities', + 'type' => 'text', + 'use' => 'a' + ), + + // Tab Member/Attractions + 'term_admin_menu_member_attractions' => array( + 'field' => 'term_admin_menu_member_attractions', + 'type' => 'text', + 'use' => 'a' + ), + + // Tab Member/Contacts + 'term_admin_menu_member_contacts' => array( + 'field' => 'term_admin_menu_member_contacts', + 'type' => 'text', + 'use' => 'a' + ), + + // Tab Configure/Member Types + 'term_admin_menu_configure_member_types' => array( + 'field' => 'term_admin_menu_configure_member_types', + 'type' => 'text', + 'use' => 'a' + ), + + // Tab Configure/Member Categories + 'term_admin_menu_configure_member_cats' => array( + 'field' => 'term_admin_menu_configure_member_cats', + 'type' => 'text', + 'use' => 'a' + ), + + // Tab Configure/Accommodation Types + 'term_admin_menu_configure_accom_types' => array( + 'field' => 'term_admin_menu_configure_accom_types', + 'type' => 'text', + 'use' => 'a' + ), + + // Tab Configure/Amenities + 'term_admin_menu_configure_amenities' => array( + 'field' => 'term_admin_menu_configure_amenities', + 'type' => 'text', + 'use' => 'a' + ), + + // Tab Configure/Cities + 'term_admin_menu_configure_cities' => array( + 'field' => 'term_admin_menu_configure_cities', + 'type' => 'text', + 'use' => 'a' + ), + + // Tab Configure/Regions + 'term_admin_menu_configure_regions' => array( + 'field' => 'term_admin_menu_configure_regions', + 'type' => 'text', + 'use' => 'a' + ), + + // Tab Settings/General Settings + 'term_admin_menu_settings_general' => array( + 'field' => 'term_admin_menu_settings_general', + 'type' => 'text', + 'use' => 'a' + ), + + // Tab Settings/Terms and Phrases + 'term_admin_menu_settings_terms' => array( + 'field' => 'term_admin_menu_settings_terms', + 'type' => 'text', + 'use' => 'a' + ), + + // Tab Settings/Development + 'term_admin_menu_settings_development' => array( + 'field' => 'term_admin_menu_settings_development', + 'type' => 'text', + 'use' => 'a' + ), + + /* + * General Terms + */ + + // Member + 'term_member' => array( + 'field' => 'term_member', + 'type' => 'text', + 'use' => 'a' + ), + + // Member Cap + 'term_member_cap' => array( + 'field' => 'term_member_cap', + 'type' => 'text', + 'use' => 'a' + ), + + // Member Plural + 'term_member_plur' => array( + 'field' => 'term_member_plur', + 'type' => 'text', + 'use' => 'a' + ), + + // Member Plural Cap + 'term_member_plur_cap' => array( + 'field' => 'term_member_plur_cap', + 'type' => 'text', + 'use' => 'a' + ), + + // Location + 'term_location' => array( + 'field' => 'term_location', + 'type' => 'text', + 'use' => 'a' + ), + + // Location Cap + 'term_location_cap' => array( + 'field' => 'term_location_cap', + 'type' => 'text', + 'use' => 'a' + ), + + // Location Plur + 'term_location_plur' => array( + 'field' => 'term_location_plur', + 'type' => 'text', + 'use' => 'a' + ), + + // Location Plur Cap + 'term_location_plur_cap' => array( + 'field' => 'term_location_plur_cap', + 'type' => 'text', + 'use' => 'a' + ), + + // Facility + 'term_facility' => array( + 'field' => 'term_facility', + 'type' => 'text', + 'use' => 'a' + ), + + // Facility Cap + 'term_facility_cap' => array( + 'field' => 'term_facility_cap', + 'type' => 'text', + 'use' => 'a' + ), + + // Facility Plur + 'term_facility_plur' => array( + 'field' => 'term_facility_plur', + 'type' => 'text', + 'use' => 'a' + ), + + // Facility Plur Cap + 'term_facility_plur_cap' => array( + 'field' => 'term_facility_plur_cap', + 'type' => 'text', + 'use' => 'a' + ), + + // Attraction + 'term_attraction' => array( + 'field' => 'term_attraction', + 'type' => 'text', + 'use' => 'a' + ), + + // Attraction Cap + 'term_attraction_cap' => array( + 'field' => 'term_attraction_cap', + 'type' => 'text', + 'use' => 'a' + ), + + // Attraction Plur + 'term_attraction_plur' => array( + 'field' => 'term_attraction_plur', + 'type' => 'text', + 'use' => 'a' + ), + + // Attraction Plur Cap + 'term_attraction_plur_cap' => array( + 'field' => 'term_attraction_plur_cap', + 'type' => 'text', + 'use' => 'a' + ), + + // Contact + 'term_contact' => array( + 'field' => 'term_contact', + 'type' => 'text', + 'use' => 'a' + ), + + // Contact Cap + 'term_contact_cap' => array( + 'field' => 'term_contact_cap', + 'type' => 'text', + 'use' => 'a' + ), + + // Contact Plur + 'term_contact_plur' => array( + 'field' => 'term_contact_plur', + 'type' => 'text', + 'use' => 'a' + ), + + // Contact Plur Cap + 'term_contact_plur_cap' => array( + 'field' => 'term_contact_plur_cap', + 'type' => 'text', + 'use' => 'a' + ) + + + ); + + if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { + glmMembersAdmin::addNotice($this->fields, 'DataBlock', 'Table Fields: '.$this->table); + } + + } +} + +?> \ No newline at end of file diff --git a/config/plugin.ini b/config/plugin.ini index 4263698b..fad26a1f 100644 --- a/config/plugin.ini +++ b/config/plugin.ini @@ -323,6 +323,7 @@ phrase['phrase_test'] = 'test' [chuck:common] admin_debug = true +admin_debug_verbose = true front_debug = true googleMapsApiKey = '' diff --git a/controllers/admin.php b/controllers/admin.php index 1868820b..064bc736 100644 --- a/controllers/admin.php +++ b/controllers/admin.php @@ -41,7 +41,8 @@ $GLOBALS['glmMembersAdminValidActions'] = array( 'locations', 'facilities', 'activities', - 'accommodations' + 'accommodations', + 'memberImage', // Member Image Processing via AJAX ) , 'configure' => array( @@ -54,6 +55,7 @@ $GLOBALS['glmMembersAdminValidActions'] = array( ), 'settings' => array( 'index', // General Options + 'terms', // Terms and Phrases 'development' ), 'shortcodes' => array( @@ -219,20 +221,95 @@ class glmMembersAdmin extends GlmPluginSupport )); -/* - add_action( 'admin_init', - array( - $this, - 'glmMembersAdminSettingsInit' - )); -*/ + // Add AJAX image upload action + add_action( 'wp_ajax_glm_members_image_upload', + array( + $this, + 'glmMembersImageUpload' + ) + ); + + + } + + /** + * Image Upload AJAX Target + * + * Acccepts image uploads and routes them to the appropriate + * model file. + * + * @return void + * @access public + */ + public function glmMembersImageUpload() + { + // Get the model menu + if (isset($_REQUEST['glm_menu']) && $_REQUEST['glm_menu'] != '') { + $a = sanitize_text_field($_REQUEST['glm_menu']); + if ($a != '') { + $menuItem = $a; + } else { + // No menu provided - terminating + trigger_error ( 'ERROR: No "glm_menu" string provided in POST array.', E_USER_ERROR); + } + } else { + // Missing glm_menu Item in post array. + trigger_error ( 'ERROR: No "glm_menu" item in POST array.', E_USER_ERROR); + } + + // Get the model action + if (isset($_REQUEST['glm_action']) && $_REQUEST['glm_action'] != '') { + $a = sanitize_text_field($_REQUEST['glm_action']); + if ($a != '') { + $Action = $a; + } else { + // No menu provided - terminating + trigger_error ( 'ERROR: No "glm_action" string provided in POST array.', E_USER_ERROR); + } + + } else { + trigger_error ( 'ERROR: No "glm_action" itme in POST array.', E_USER_ERROR); + } + + // If menu item and action aren't valid, quit now. + if (! isset($GLOBALS['glmMembersAdminValidActions'][$menuItem]) || + ! in_array($Action, $GLOBALS['glmMembersAdminValidActions'][$menuItem])) { + + // Menu item/Action not in valid actions array + trigger_error ( 'ERROR: The specified menu item and action are not valid.', E_USER_ERROR); + } + + // Build model and path and class names + $modelName = GLM_MEMBERS_PLUGIN_PATH . '/models/admin/' . $menuItem . + '/' . $Action . '.php'; + $className = 'GlmMembersAdmin_' . $menuItem . '_' . $Action; + + // If model file doesn't exist - we have an error + if (!file_exists($modelName)) { + trigger_error ( "ERROR: The specified model file doesn't exist. ($modelName)", E_USER_ERROR); + } + + // Load the model file + require_once ($modelName); + + // check for an invalid model class name + if (!class_exists($className)) { + trigger_error ( "ERROR: The specified class naeme doesn't exist. ($className)", E_USER_ERROR); + } + + // Instantiate the model and ask it to perform the work + $model = new $className($this->wpdb, $this->config); + $model->modelAction(); + + wp_die(); + } /** * Setup inclusion of admin scripts and css * * This method is called by an add_action() hook setup in the contructor. - * + *FormData * (no prameters) * * @return void @@ -252,6 +329,8 @@ class glmMembersAdmin extends GlmPluginSupport wp_enqueue_style('wp-jquery-ui-dialog'); wp_enqueue_media(); + + // Scripts included with this plugin wp_register_script('glm-members-admin-js', GLM_MEMBERS_PLUGIN_URL . 'js/admin.js', array( @@ -265,6 +344,16 @@ class glmMembersAdmin extends GlmPluginSupport GLM_MEMBERS_PLUGIN_URL . 'css/admin.css'); wp_enqueue_style('glmMembersAdminStyle'); + // Image Upload scripts and css for Member DB and perhaps other + wp_register_script('glm-members-admin-image-upload', + GLM_MEMBERS_PLUGIN_URL . 'js/imageUpload/imageUpload.js', + array( + 'jquery' + )); + wp_enqueue_script('glm-members-admin-image-upload'); + wp_register_style('glm-members-admin-image-upload-css', + GLM_MEMBERS_PLUGIN_URL . 'js/imageUpload/imageUpload.css'); + wp_enqueue_style('glm-members-admin-image-upload-css'); } diff --git a/glm-member-db.php b/glm-member-db.php index c89d96d9..a45a1dbd 100644 --- a/glm-member-db.php +++ b/glm-member-db.php @@ -352,8 +352,6 @@ function glmMembersAdminNotices($windowed = true) } } - delete_option('glmMembersAdminNoticeDataBlocks'); - echo $output.' @@ -383,11 +381,14 @@ function glmMembersAdminNotices($windowed = true) echo $output.'

'; - // Delete the option containing the notices to indicate they have been sent - delete_option('glmMembersAdminNotices'); } + delete_option('glmMembersAdminNoticeAlerts'); + delete_option('glmMembersAdminNotices'); + delete_option('glmMembersAdminNoticeProcess'); + delete_option('glmMembersAdminNoticeDataBlocks'); + } /* diff --git a/js/imageUpload/OLD_SAVE_imageUpload.js b/js/imageUpload/OLD_SAVE_imageUpload.js new file mode 100644 index 00000000..61d26885 --- /dev/null +++ b/js/imageUpload/OLD_SAVE_imageUpload.js @@ -0,0 +1,88 @@ +/* + * HTML5 Image Upload Support + * + * Developed from information in http://www.sitepoint.com/html5-file-drag-and-drop/ + */ + +jQuery(document).ready(function($) { + + // output information + function Output(msg) { + var m = $id("imageDragMessages"); + m.innerHTML = msg + m.innerHTML; + } + + // Setup Drag and Drop when Add and + $('#newImageButton').click( function() { + //call initialization function if drag/drop supported by browser + if (window.File && window.FileList && window.FileReader) { + ImageDragInit(); + } + }); + + //initialize + function ImageDragInit() { + + // is XHR2 available? + var xhr = new XMLHttpRequest(); + if (xhr.upload) { + + // Change from Drag/Drop not supported to drop here display + $('#noImageDrop').css('display', 'none'); + $('#noImageDrop').css('display', 'none'); + $('#imageDrop').css('display', 'block'); + + // file drop +// imageDrop.addEventListener("dragover", FileDragHover, false); +// imageDrop.addEventListener("dragleave", FileDragHover, false); +// imageDrop.addEventListener("drop", FileSelectHandler, false); + + // remove submit button + newImageSubmit.style.display = "none"; + + } + + } + + /* + $(window).on('dragenter', function(){ + $(this).preventDefault(); + }); +*/ + + // Change drop destination appearance only when dragging over a file. + $('#imageDrop').on('dragenter', function(){ + $('#imageDropText').css('display', 'none'); + $('#imageDrop').addClass('imageDropDragOver'); + }); + + $('#imageDrop').on('dragleave', function(){ + $('#imageDropText').css('display', 'block'); + $('#imageDrop').removeClass('imageDropDragOver'); + }); + + // file drag hover + $('#imageDrop').mouseover( function(e) { + e.stopPropagation(); +// e.preventDefault(); +// $('#imageDrop').css('display', 'block'); + e.target.className = (e.type == "dragover" ? "hover" : ""); + }); + + // file selection + $('#newImage').change( function() { + + // cancel event and hover styling + FileDragHover(e); + + // fetch FileList object + var files = e.target.files || e.dataTransfer.files; + + // process all File objects + for (var i = 0, f; f = files[i]; i++) { + ParseFile(f); + } + + }); + +}); diff --git a/js/imageUpload/imageUpload.css b/js/imageUpload/imageUpload.css new file mode 100644 index 00000000..660dd1e6 --- /dev/null +++ b/js/imageUpload/imageUpload.css @@ -0,0 +1,132 @@ +.glm-imageGalleryContainer +{ + margin: .5em 1em 1em 1em; + padding: .5em; + border: 2px solid #ccc; + text-align: center; +} + +.glm-imageDropContainer +{ + position: relative; + text-align: center; + padding: 0 1em 1em 1em; + background-color: #eee; + border: 2px solid #ccc; + border-radius: 7px; + cursor: default; + margin-left: auto; + margin-right: auto; + width: 75%; + height: 5em; +} +.glm-imageDrop +{ + position: absolute; + width: 100%; + height: 100%; + top: 0; + left: 0; + z-index: 10; + border-radius: 7px; + height: 100%; + background-color: #000; + opacity: .0; + filter: alpha(opacity=0); /* For IE8 and earlier */ + +} +.glm-imageDropText +{ + color: #666; + z-index: 9; +} +.glm-noImageDropText +{ + color: #666; +} +.glm-imageItemHidden +{ + display: none; + z-index: 9; +} +.glm-imageDropDragOver +{ + border: 2px solid #000 important; + background-color: #fff; +} +.glm-imageUploadStatus +{ + position: absolute; + width: 100%; + height: 100%; + top: 20px; + left: 10px; + z-index: 11; + border: 2px solid black; + border-radius: 7px; + height: 8em; + background-color: #fff; + box-shadow: 10px 10px 5px grey; +} + +.glm-imageGalleryImages +{ +} + +.glm-statusTable +{ + width: 100%; +/* table-layout: fixed; */ + line-height: 80%; +} +.glm-statusImageTD +{ +/* width: 25%; */ + max-width: 100%; + overflow: hidden; + padding: 3px; + display: table-cell; + vertical-align: middle; +} +.glm-statusPrompt +{ + width: 10%; + padding: 0px; + font-weight: bold; + text-align: right; +} +.glm-statusValue +{ + width: 65%; + padding: 0px; + text-align: left; +} +.glm-statusImageContainer +{ + display: block; + width: 100px; +} +.glm-statusImage +{ + height: 5.1em; + width: auto; + display: block; + margin-left: auto; + margin-right: auto; +} + +.glm-progressBarContainer +{ + height: 100%; + width: 95%; + background-color: #ccc; + border: 1px solid black; + line-height: 1em; +} +.glm-progressBar +{ + height: 1em; + background-color: blue; + width: 0%; +} + diff --git a/js/imageUpload/imageUpload.js b/js/imageUpload/imageUpload.js new file mode 100644 index 00000000..5a644194 --- /dev/null +++ b/js/imageUpload/imageUpload.js @@ -0,0 +1,314 @@ +/* + * HTML5 Image Upload Support + * + * Developed from information in + * http://www.sitepoint.com/html5-file-drag-and-drop/ + * http://hayageek.com/drag-and-drop-file-upload-jquery/ + */ + + +/****** NEED TO ADD FILE SIZE TEST AND USER NOTICE ALERT *******/ + +jQuery(document).ready(function($) { + + + var drop; + var recordID; + var menuItem; + var action; + var files; + + // Setup Drag and Drop when Add and + if (window.File && window.FileList && window.FileReader) { + + // is XHR2 available? + var xhr = new XMLHttpRequest(); + if (xhr.upload) { + + // Change from Drag/Drop not supported to drop here text + $('.glm-imageBrowseButton').addClass('glm-imageItemHidden'); + $('.glm-imageDropText').removeClass('glm-imageItemHidden'); + $('.glm-imageDrop').removeClass('glm-imageItemHidden'); + + // Prevent dropping on the document + $(document).on('dragenter', function (e) { + e.stopPropagation(); + e.preventDefault(); + }); + $(document).on('dragover', function (e) { + e.stopPropagation(); + e.preventDefault(); + }); + $(document).on('drop', function (e) { + e.preventDefault(); + }); + + // For each image drop area + $('.glm-imageDrop').each(function() { + drop = $(this); + initDrop(); + + // **** NEED TO DEAL WITH DELAY TILL THE PRIOR DROP AREA HAS BEEN PROCESSED *** + + }); + + } else { + $('.glm-noImageDropText').removeClass('glm-imageItemHidden'); + } + + } + + // Setup a single drop area + function initDrop() { + + // Get ID for the record number to which these images belong. + recordID = drop.attr("data-id"); + menuItem = drop.attr("data-menuItem"); + action = drop.attr("data-action"); + + // Change drop destination appearance only when dragging over a file. + drop.on('dragenter', function(e){ + e.stopPropagation(); + e.preventDefault(); + drop.parent().addClass('glm-imageDropDragOver'); + }); + drop.on('dragover', function(e){ + e.stopPropagation(); + e.preventDefault(); + }); + drop.on('dragleave', function(e){ + e.stopPropagation(); + e.preventDefault(); + drop.parent().removeClass('glm-imageDropDragOver'); + }); + + // File drop action + $('.glm-imageDrop').on('drop', function (e) { + e.preventDefault(); + files = e.originalEvent.dataTransfer.files; + handleFileDrop(); + drop.parent().removeClass('glm-imageDropDragOver'); + }); + + } + + /* + * This function sets up AJAX processing of the list of files. + * It then fires off the processFile() function to do the first + * file. When the AJAX call in sendFileToServer() completes, + * the complete: function will call processFile() again to + * do the next file, if one exists. + */ + var thisFile = 0; + var numbFiles = 0; + + function handleFileDrop() { + + // Reset file pointer and set number of last file + thisFile = 0; + numbFiles = files.length; + + // Start with the first file + processFile(); + +/* var fd = new FormData(); + fd.append('file', file); + + var status = new createStatusbar(file, drop); + statusArea.fadeIn( function() { + sendFileToServer(fd,status); + }); +*/ +// statusArea.addClass('glm-imageItemHidden'); + + } + + /* + * Process the current file - AJAX complete: will call back to this + * function for the next file + */ + function processFile() { + + // If we still have files to process + if (thisFile < numbFiles) { + + file = files[thisFile]; + + // Setup field pairs for sending in request + var fd = new FormData(); + fd.append('file', file); + + // Setup status display area + var status = new createStatusbar(file, thisFile, numbFiles); + statusArea.fadeIn( function() { + + // When status has faded in, Send the files + sendFileToServer(fd, status, recordID); + + }); + + thisFile++; + + } else { + + // done + + } + + } + + function createStatusbar(file, thisFile, numbFiles) + { + var statusDone = false; + + /* + * We need to redefine these values inside this function + * so the reader.onload function can see them. + */ + var curFile = thisFile + 1; + var lastFile = numbFiles; + + // Get status area for this drop area + statusArea = drop.siblings('.glm-imageUploadStatus'); + + // Make status area visible (overlay) and clear contents + statusArea.html(''); + + // If file is an image + var regex = /^([a-zA-Z0-9\s_\\.\-:])+(.jpg|.jpeg|.gif|.png|.bmp)$/; + + if (regex.test(file.name.toLowerCase())) { + + // Create HTML5 file reader and load image + var reader = new FileReader(); + reader.onload = function (e) { + + // Add file information to status area + statusbar = + 'Uploading Image {thisFile} of {numbFiles}' + + '' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '
Name: {fileName}
Type: {fileType}
Size: {fileSize}
Progress:
' + ; + statusbar = statusbar.replace('{thisFile}', curFile); + statusbar = statusbar.replace('{numbFiles}', lastFile); + statusbar = statusbar.replace('{fileImage}', e.target.result); + statusbar = statusbar.replace('{fileName}', file.name); + statusbar = statusbar.replace('{fileType}', file.type); + + // Fix up file size string and replace that + var sizeStr=""; + var sizeKB = file.size/1024; + if(parseInt(sizeKB) > 1024) + { + var sizeMB = sizeKB/1024; + sizeStr = sizeMB.toFixed(2)+" MB"; + } + else + { + sizeStr = sizeKB.toFixed(2)+" KB"; + } + statusbar = statusbar.replace('{fileSize}', sizeStr); + + // Assign the HTML to the status area + statusArea.html(statusbar); + + } + reader.readAsDataURL(file); + } else { + alert(file.name + " is not a valid image file."); + statusArea.addClass('glm-imageItemHidden'); + return false; + } + + this.setProgress = function(progress) + { + statusArea.find('.glm-progressBar').css('width', progress + '%'); + +/* + var progressBarWidth =progress*this.progressBar.width()/ 100; + this.progressBar.find('div').animate({ width: progressBarWidth }, 10).html(progress + "% "); + if(parseInt(progress) >= 100) + { + this.abort.hide(); + } +*/ + } + + this.setAbort = function(jqxhr) + { + var sb = this.statusbar; + this.abort.click(function() + { + jqxhr.abort(); + sb.hide(); + }); + } + } + + /* + * Sends file to image plugin via AJAX submission targeting + * WordPress AJAX handling. An image upload processor has been + * declared with an add_action() in the admin controller + * specifying the function containing that processor. We tell + * WordPress how to route the submission using the "action" + * post parameter. This matches everything after "wp_ajax_" + * in the action name. + */ + function sendFileToServer(fd, status, recordID) + { + + fd.append( 'action', 'glm_members_image_upload' ); + + var jqXHR=$.ajax({ + xhr: function() { + var xhrobj = $.ajaxSettings.xhr(); + if (xhrobj.upload) { + xhrobj.upload.addEventListener('progress', function(event) { + var percent = 0; + var position = event.loaded || event.position; + var total = event.total; + if (event.lengthComputable) { + percent = Math.ceil(position / total * 100); + } + status.setProgress(percent); + }, false); + + } + return xhrobj; + }, + url: ajaxurl + '?glm_menu=' + menuItem + '&glm_action=' + action + '&memberInfoID=' + recordID, // WordPress admin AJAX url + type: "POST", + contentType:false, + processData: false, + cache: false, + data: fd, + success: function(data){ +alert(data); +// status.clearStatus(); +// status.setProgress(100); + +// $("#status1").append("File upload Done
"); + }, + complete: function() { + + // When status area has faded + statusArea.fadeOut( function() { + + // Process the next file, if one exists. + processFile(); + + }); + + } + }); + + return jqXHR; +// status.setAbort(jqXHR); + } + +}); diff --git a/js/jqueryDragAndDrop-ForReferenceOnly/.editorconfig b/js/jqueryDragAndDrop-ForReferenceOnly/.editorconfig new file mode 100644 index 00000000..ad446fa0 --- /dev/null +++ b/js/jqueryDragAndDrop-ForReferenceOnly/.editorconfig @@ -0,0 +1,11 @@ +; http://editorconfig.org + +root = true + +[*] +indent_style = space +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true \ No newline at end of file diff --git a/js/jqueryDragAndDrop-ForReferenceOnly/.gitignore b/js/jqueryDragAndDrop-ForReferenceOnly/.gitignore new file mode 100644 index 00000000..14fe67f0 --- /dev/null +++ b/js/jqueryDragAndDrop-ForReferenceOnly/.gitignore @@ -0,0 +1,5 @@ +node_modules +tmp + +.DS_Store +._* \ No newline at end of file diff --git a/js/jqueryDragAndDrop-ForReferenceOnly/.travis.yml b/js/jqueryDragAndDrop-ForReferenceOnly/.travis.yml new file mode 100644 index 00000000..7f22ed18 --- /dev/null +++ b/js/jqueryDragAndDrop-ForReferenceOnly/.travis.yml @@ -0,0 +1,8 @@ +language: node_js +node_js: + - 0.10 + +before_script: + - npm install -g grunt-cli + +script: "grunt test" diff --git a/js/jqueryDragAndDrop-ForReferenceOnly/README b/js/jqueryDragAndDrop-ForReferenceOnly/README new file mode 100644 index 00000000..f3ac9e54 --- /dev/null +++ b/js/jqueryDragAndDrop-ForReferenceOnly/README @@ -0,0 +1,70 @@ +ezdz-multiple + +jQuery File Input plugin ezdz multiple files and grid preview + +It is based on Ezdz jQuery File Input plugin. new features have been added as follows. + + support multiple file upload. + support grid preview of image. + +All other settings pls refer to ezdz documentation https://github.com/jaysalvat/ezdz + +index.html file demostrates multiple file upload features and preview of image features. + +remember add multiple attribute to input tag. +Sample Usage + +in the html head section + + + + + +in the body section, simply add normal input tag, the plugin will automatically convert it into dropzone. + + + +add javascript pointing to input tag, add customize configuration. + +$('input[type="file"]').ezdz({ + text: 'drop cover photos', + validators: { + maxWidth: 2000, + maxHeight: 2000, + maxNumber: 6 + }, + reject: function(file, errors) { + if (errors.mimeType) { + alert(file.name + ' must be an image.'); + return; + } + + if (errors.maxWidth) { + alert(file.name + ' must be width:2000px max.'); + return; + } + + if (errors.maxHeight) { + alert(file.name + ' must be height:2000px max.'); + return; + } + + if (errors.maxNumber) { + alert('you can upload maximum of 6 images'); + return; + } + } + }); + +if you looking for modify preview image grid, editing jquery.ezdz.css, for example, the code represent 3 columns grid. + +.image-g li { + float: left; + max-width: 32%; + max-height: 48%; + padding: 0.10em; +} + +.image-g li:nth-child(3n+1) { + clear: left; +} diff --git a/js/jqueryDragAndDrop-ForReferenceOnly/jquery.ezdz.css b/js/jqueryDragAndDrop-ForReferenceOnly/jquery.ezdz.css new file mode 100644 index 00000000..b2607eb3 --- /dev/null +++ b/js/jqueryDragAndDrop-ForReferenceOnly/jquery.ezdz.css @@ -0,0 +1,126 @@ +/* ---------------------------------------------------------------------------- +// Ezdz [izy-dizy] +// Licensed under the MIT license. +// http://github.com/jaysalvat/ezdz/ +// ---------------------------------------------------------------------------- +// Copyright (C) 2014 Jay Salvat +// http://jaysalvat.com/ +// --------------------------------------------------------------------------*/ + +.ezdz-dropzone { + position: relative; +/* font: bold 24px arial; */ + text-align: center; + width: 100%; + height: 400px; /* Width of entire drop area */ + line-height: 100px; + color: #; + overflow: hidden; +} + +.ezdz-dropzone div { + color: lightgray; +/* font: bold 24px arial; */ + line-height: 100px; + /* */ +} + +.ezdz-dropzone span { + border-radius: 20px; + background: black; + background: rgba(0,0,0,0.7); + color: white; + font-size: 13px; + font-weight: normal; + max-width: 90%; + vertical-align: middle; + padding: 4%; + line-height: 10px; + display: inline-block; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; +} + +.ezdz-dropzone img { + border-radius: 5px; + +} + +.ezdz-dropzone [type="file"] { + cursor: pointer; + position: absolute; + width: 100%; + height: 100%; + opacity: 0; + margin: 0; + padding: 0; + top: 0; + right: 0; + bottom: 0; + left: 0; +} + +.ezdz-focus { +/* border: 10px dotted darkgray; */ + color: darkgray; +} + +.ezdz-focus div { + color: darkgray; + +} + +.ezdz-enter { +/* border: 10px solid black; */ + color: black; +} + +.ezdz-enter div { + color: black; + +} +.ezdz-accept { +/* border: 10px solid gray; */ + color: gray; +} + +.ezdz-accept div { + color: gray; +} + +.ezdz-reject { +/* border: 10px solid darkred; */ + color: darkred; +} + +.ezdz-reject div { + color: darkred; +} + +.image-g { + list-style-type: none; + padding: 0.25em; + overflow: hidden; + white-space: nowrap; +} + +.image-g li { + float: left; + width: 360px; +/* max-width: 32%; + max-height: 48%; */ + padding: 0.10em; +} + +.image-g img { + display: block; + width: 40%; + height: auto; + border: 2px solid black; +} + +.image-g li:nth-child(3n+1) { + clear: left; +} + \ No newline at end of file diff --git a/js/jqueryDragAndDrop-ForReferenceOnly/jquery.ezdz.js b/js/jqueryDragAndDrop-ForReferenceOnly/jquery.ezdz.js new file mode 100644 index 00000000..e30ab877 --- /dev/null +++ b/js/jqueryDragAndDrop-ForReferenceOnly/jquery.ezdz.js @@ -0,0 +1,422 @@ +/* ---------------------------------------------------------------------------- +// Ezdz [izy-dizy] +// Licensed under the MIT license. +// http://github.com/jaysalvat/ezdz/ +// ---------------------------------------------------------------------------- +// Copyright (C) 2014 Jay Salvat +// http://jaysalvat.com/ +// --------------------------------------------------------------------------*/ + +/* global define: true, require: true, jQuery */ + +(function (factory) { + "use strict"; + + if (typeof define === 'function' && define.amd) { + define(['jquery'], factory); + } else if (typeof exports === 'object') { + factory(require('jquery')); + } else { + factory(jQuery); + } +}(function ($) { + "use strict"; + + // Default settings + var defaults = { + className: '', + text: 'Drop a file', + previewImage: true, + value: null, + classes: { + main: 'ezdz-dropzone', + enter: 'ezdz-enter', + reject: 'ezdz-reject', + accept: 'ezdz-accept', + focus: 'ezdz-focus' + }, + validators: { + maxSize: null, + width: null, + maxWidth: null, + minWidth: null, + height: null, + maxHeight: null, + minHeight: null, + maxNumber: null + }, + init: function() {}, + enter: function() {}, + leave: function() {}, + reject: function() {}, + accept: function() {}, + format: function(filename) { + return filename; + } + }; + + // Main plugin + $.ezdz = function(element, options) { + this.settings = $.extend(true, {}, defaults, $.ezdz.defaults, options); + this.$input = $(element); + + var self = this, + settings = self.settings, + $input = self.$input; + + if (!$input.is('input[type="file"]')) { + return; + } + + // Stop if not compatible with HTML5 file API + if (!$.ezdz.isBrowserCompatible()) { + return; + } + + // private: Init the plugin + var init = function() { + var $ezdz, $container, value; + + // Build the container + $container = $('
') + + .on('dragover.ezdz', function() { + $(this).addClass(settings.classes.enter); + + if ($.isFunction(settings.enter)) { + settings.enter.apply(this); + } + }) + + .on('dragleave.ezdz', function() { + $(this).removeClass(settings.classes.enter); + + if ($.isFunction(settings.leaved)) { + settings.leaved.apply(this); + } + }) + + .addClass(settings.className); + + // Build the whole dropzone + $input + .wrap($container) + .before('
' + settings.text + '
'); + + $ezdz = $input.parent('.' + settings.classes.main); + + // Preview a file at start if it's defined + value = settings.value || $input.data('value'); + + if (value) { + self.preview(value); + } + + // Trigger the init callback + if ($.isFunction(settings.init)) { + settings.init.apply($input, [ value ]); + } + + // Events on the input + $input + + .on('focus.ezdz', function() { + $ezdz.addClass(settings.classes.focus); + }) + + .on('blur.ezdz', function() { + $ezdz.removeClass(settings.classes.focus); + }) + + .on('change.ezdz', function() { + + + // No file, so user has cancelled + if (this.files.length == 0) { + return; + } + + // Mime-Types + var allowed = $input.attr('accept'), + accepted = false, + valid = true, + errors = { + 'mimeType': false, + 'maxSize': false, + 'width': false, + 'minWidth': false, + 'maxWidth': false, + 'height': false, + 'minHeight': false, + 'maxHeight': false, + 'maxNumber': false + }; + + //Check the maximum number of files + + if (settings.validators.maxNumber && this.files.length > settings.validators.maxNumber) { + valid = false; + errors.maxNumber = true; + } + + var imgArr = new Array(); + var isImage = true; + + var i=0; + for(i=0;i settings.validators.maxSize) { + valid = false; + errors.maxSize = true; + } + + if (isImage) { + file.width = img.width; + file.height = img.height; + + if (settings.validators.width && img.width !== settings.validators.width) { + valid = false; + errors.width = true; + } + + if (settings.validators.maxWidth && img.width > settings.validators.maxWidth) { + valid = false; + errors.maxWidth = true; + } + + if (settings.validators.minWidth && img.width < settings.validators.minWidth) { + valid = false; + errors.minWidth = true; + } + + if (settings.validators.height && img.height !== settings.validators.height) { + valid = false; + errors.height = true; + } + + if (settings.validators.maxHeight && img.height > settings.validators.maxHeight) { + valid = false; + errors.maxHeight = true; + } + + if (settings.validators.minHeight && img.height < settings.validators.minHeight) { + valid = false; + errors.minHeight = true; + } + } + + + }, 100); + }; + } + + setTimeout(function() { + + // The file is validated, so added to input + if (valid === true) { + $ezdz.find('img').remove(); + + if (isImage && settings.previewImage === true) { + var $image_wrapper = $("
    "); + $image_wrapper.addClass("image-g"); + var i; + for (i=0;i").append(img_obj); + $image_wrapper.append($image_item); + } + $ezdz.find('div').html($image_wrapper.fadeIn()); + } else { + $ezdz.find('div').html('' + formatted + ''); + } + + $ezdz.addClass(settings.classes.accept); + + // Trigger the accept callback + if ($.isFunction(settings.accept)) { + settings.accept.apply($input, [ file ]); + } + + // The file is invalidated, so rejected + } else { + $input.val(''); + + $ezdz.addClass(settings.classes.reject); + + // Trigger the reject callback + if ($.isFunction(settings.reject)) { + settings.reject.apply($input, [ file, errors ]); + } + } + + }, 1000); + + + }); + }; + + init(); + }; + + // Inject a file or image in the preview + $.ezdz.prototype.preview = function(path, callback) { + var settings = this.settings, + $input = this.$input, + $ezdz = $input.parent('.' + settings.classes.main), + basename = path.replace(/\\/g,'/').replace( /.*\//, ''), + formatted = settings.format(basename); + + var img = new Image(); + img.src = path; + + // Is an image + img.onload = function() { + $ezdz.find('div').html($(img).fadeIn()); + + if ($.isFunction(callback)) { + callback.apply(this); + } + }; + + // Is not an image + img.onerror = function() { + $ezdz.find('div').html('' + formatted + ''); + + if ($.isFunction(callback)) { + callback.apply(this); + } + }; + + $ezdz.addClass(settings.classes.accept); + }; + + // Destroy ezdz + $.ezdz.prototype.destroy = function() { + var settings = this.settings, + $input = this.$input; + + $input.parent('.' + settings.classes.main).replaceWith($input); + $input.off('*.ezdz'); + $input.removeData('ezdz'); + }; + + // Extend settings + $.ezdz.prototype.options = function(options) { + var settings = this.settings; + + if (!options) { + return settings; + } + + $.extend(true, this.settings, options); + }; + + // Get input container + $.ezdz.prototype.container = function() { + var settings = this.settings, + $input = this.$input; + + return $input.parent('.' + settings.classes.main); + }; + + // Is browser compatible + $.ezdz.isBrowserCompatible = function() { + return !!(window.File && window.FileList && window.FileReader); + }; + + // Default options + $.ezdz.defaults = defaults; + + // jQuery plugin + $.fn.ezdz = function(options) { + var args = arguments, + plugin = $(this).data('ezdz'); + + if (!plugin) { + return $(this).data('ezdz', new $.ezdz(this, options)); + } if (plugin[options]) { + return plugin[options].apply(plugin, Array.prototype.slice.call(args, 1)); + } else { + $.error('Ezdz error - Method ' + options + ' does not exist.'); + } + }; +})); diff --git a/lib/GlmDataAbstract/DataAbstract.php b/lib/GlmDataAbstract/DataAbstract.php index 07955ed9..c99a4c19 100755 --- a/lib/GlmDataAbstract/DataAbstract.php +++ b/lib/GlmDataAbstract/DataAbstract.php @@ -2360,7 +2360,7 @@ abstract class GlmDataAbstract } else { - if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { + if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { glmMembersAdmin::addNotice($newImage, 'DataBlock', "DataAbstract - imageInput() wp_get_image_editor($tmpFile) Error"); } @@ -2645,6 +2645,12 @@ abstract class GlmDataAbstract $this->select = ''; $sep = ''; // Used as separator for $select list + // Check that we have a fields list + if (!is_array($this->fields) || count($this->fields) == 0) { + echo "ALERT: Empty Fields List in data abstract buildFieldsList()! Likely programming error."; + return false; + } + // For each possible field reset($this->fields); while (list($k, $v) = each($this->fields )) { @@ -2701,7 +2707,7 @@ abstract class GlmDataAbstract } - if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { + if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { glmMembersAdmin::addNotice($this->fieldData, 'DataBlock', "buildFieldsList() data"); } @@ -2895,7 +2901,7 @@ abstract class GlmDataAbstract $stats = $this->wpdb->get_row($sql, ARRAY_A); - if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { + if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { glmMembersAdmin::addNotice($sql, 'DataBlock', "DataAbstract - getStats() query"); glmMembersAdmin::addNotice($stats, 'DataBlock', "Stats Data"); } @@ -2942,7 +2948,7 @@ abstract class GlmDataAbstract "; } - if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { + if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { glmMembersAdmin::addNotice($sql, 'DataBlock', "DataAbstract - getList() query"); } @@ -2958,7 +2964,7 @@ abstract class GlmDataAbstract $newList[$v['id']] = $this->processOutputData($v, 'l'); } - if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { + if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { glmMembersAdmin::addNotice($newList, 'DataBlock', "getList() data"); } @@ -2997,7 +3003,7 @@ abstract class GlmDataAbstract $detail = $this->processOutputData($detail, 'g', $fieldVals); - if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { + if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { glmMembersAdmin::addNotice($sql, 'DataBlock', "DataAbstract - getEntry() query"); glmMembersAdmin::addNotice($detail, 'DataBlock', "getEntry() data"); } @@ -3128,7 +3134,7 @@ abstract class GlmDataAbstract // Check if there's a function to do other checks $r = $this->checkOther($r, 'n'); - if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { + if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { glmMembersAdmin::addNotice($r, 'DataBlock', "newEntry() data"); } @@ -3206,42 +3212,40 @@ abstract class GlmDataAbstract ( $fields ) VALUES ( $vals ); "; - if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { + if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { glmMembersAdmin::addNotice($sql, 'DataBlock', "insertEntry() Query"); } // Now store the field data $this->wpdb->query($sql); - $queryError = $this->wpdb->last_error; - - // If there were no errors - if (trim($queryError) != '') { - if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { + // Check for query errors + if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { + $queryError = $this->wpdb->last_error; + if (trim($queryError) != '') { glmMembersAdmin::addNotice( - 'insertEntry() Query Failure
    ' + 'insertEntry() Query Failure
    ' .'  Error Message: '.$queryError.'
    ' .'  Table: '.$this->table, 'Alert'); } } - // Get the current ID value and set that in the session $r['fieldData']['id'] = $this->wpdb->insert_id; } else { - if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { + if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { glmMembersAdmin::addNotice('  insertEntry() requested to NOT store new entry!', 'Process'); } } } else { - if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { + if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { glmMembersAdmin::addNotice('  checkOther() returned bad status.', 'Process'); } } - if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { + if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { glmMembersAdmin::addNotice($r, 'DataBlock', "DataAbstract - insertEntry() data"); } @@ -3264,6 +3268,17 @@ abstract class GlmDataAbstract ;"; $detail = $this->wpdb->get_row($sql, ARRAY_A); + // Check for Errors + if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { + $queryError = $this->wpdb->last_error; + if (trim($queryError) != '') { + glmMembersAdmin::addNotice( + 'editEntry() Query Failure
    ' + .'  Error Message: '.$queryError.'
    ' + .'  Table: '.$this->table, 'Alert'); + } + } + // Check for failure retrieving data if (!$detail) { return false; @@ -3272,7 +3287,7 @@ abstract class GlmDataAbstract // Process individual fields $detail = $this->processOutputData($detail, 'e', true, $id, $idField); - if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { + if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { glmMembersAdmin::addNotice($sql, 'DataBlock', "DataAbstract - editEntry() query"); glmMembersAdmin::addNotice($detail, 'DataBlock', "editEntry() data"); } @@ -3346,12 +3361,23 @@ abstract class GlmDataAbstract // Now store the field data $this->wpdb->query($sql, ARRAY_A); + // Check for Errors + if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { + $queryError = $this->wpdb->last_error; + if (trim($queryError) != '') { + glmMembersAdmin::addNotice( + 'updateEntry() Query Failure
    ' + .'  Error Message: '.$queryError.'
    ' + .'  Table: '.$this->table, 'Alert'); + } + } + // Get the data again for output $r['fieldData'] = $this->getEntry($id, $idField); } - if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { + if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { glmMembersAdmin::addNotice($r, 'DataBlock', "updateEntry() data"); } @@ -3406,7 +3432,7 @@ abstract class GlmDataAbstract WHERE $idField = $id; "; - if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { + if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { glmMembersAdmin::addNotice($sql, 'DataBlock', "DataAbstract - deleteEntry() query"); } @@ -3421,7 +3447,7 @@ abstract class GlmDataAbstract } } - if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { + if (is_admin() && GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) { glmMembersAdmin::addNotice($detail, 'DataBlock', "deleteEntry() data"); } diff --git a/lib/html5-File-Upload/assets/css/styles.css b/lib/html5-File-Upload/assets/css/styles.css new file mode 100644 index 00000000..5f2545d4 --- /dev/null +++ b/lib/html5-File-Upload/assets/css/styles.css @@ -0,0 +1,256 @@ +/*------------------------- + Simple reset +--------------------------*/ + + +/* +*{ + margin:0; + padding:0; +} +*/ + + +/*------------------------- + General Styles +--------------------------*/ + +/* + +html{ + background:url('../img/background_tile_2.jpg'); + min-height:100%; + position:relative; + +} + +body{ + color:#fff; + min-height:600px; + font:14px/1.3 'Segoe UI',Arial, sans-serif; +} + +a, a:visited { + text-decoration:none; + outline:none; + color:#54a6de; +} + +a:hover{ + text-decoration:underline; +} + +header, footer{ + display:block; +} + +*/ + +/*------------------------- + Header Styles +--------------------------*/ + +/* + +header{ + background:url('../img/background_tile_1.jpg'); + padding:75px; + position: relative; +} + +header:before, +#dropbox:before{ + display: block; + content:''; + height:4px; + width:100%; + background:url('../img/blue_line.jpg'); + position: absolute; + top:0; + left:0; + box-shadow:0 2px 2px rgba(0,0,0,0.4); +} + + +h1{ + background:url('../img/logo.jpg') no-repeat top center; + height:92px; + overflow: hidden; + text-indent: -99999px; + text-align: center; +} + +*/ + +/*------------------------- + Dropbox Element +--------------------------*/ + + + +#dropbox{ +/* + background:url('../img/background_tile_3.jpg'); + + border-radius:3px; + position: relative; + margin:80px auto 90px; + min-height: 290px; + overflow: hidden; + padding-bottom: 40px; + width: 990px; + + box-shadow:0 0 4px rgba(0,0,0,0.3) inset,0 -3px 2px rgba(0,0,0,0.1); +*/ +} + + +#dropbox .message{ + font-size: 11px; + text-align: center; + padding-top:160px; + display: block; +} + +#dropbox .message i{ + color:#ccc; + font-size:10px; +} + +#dropbox:before{ + border-radius:3px 3px 0 0; +} + + + +/*------------------------- + Image Previews +--------------------------*/ + + + +#dropbox .preview{ + width:245px; + height: 215px; + float:left; + margin: 55px 0 0 60px; + position: relative; + text-align: center; +} + +#dropbox .preview img{ + max-width: 240px; + max-height:180px; + border:3px solid #fff; + display: block; + + box-shadow:0 0 2px #000; +} + +#dropbox .imageHolder{ + display: inline-block; + position:relative; +} + +#dropbox .uploaded{ + position: absolute; + top:0; + left:0; + height:100%; + width:100%; + background: url('../img/done.png') no-repeat center center rgba(255,255,255,0.5); + display: none; +} + +#dropbox .preview.done .uploaded{ + display: block; +} + + + +/*------------------------- + Progress Bars +--------------------------*/ + + + +#dropbox .progressHolder{ + position: absolute; + background-color:#252f38; + height:12px; + width:100%; + left:0; + bottom: 0; + + box-shadow:0 0 2px #000; +} + +#dropbox .progress{ + background-color:#2586d0; + position: absolute; + height:100%; + left:0; + width:0; + + box-shadow: 0 0 1px rgba(255, 255, 255, 0.4) inset; + + -moz-transition:0.25s; + -webkit-transition:0.25s; + -o-transition:0.25s; + transition:0.25s; +} + +#dropbox .preview.done .progress{ + width:100% !important; +} + + + +/*---------------------------- + The Footer +-----------------------------*/ + +/* + +footer{ + display:block; + background-color: #151517; + + position:fixed; + width:100%; + height:70px; + bottom:0; + left:0; + z-index: 100000; + + box-shadow: 0 -1px 2px #171717; + -webkit-box-shadow: 0 -1px 2px #171717; + -moz-box-shadow: 0 -1px 2px #171717; +} + +footer h2{ + font-size:20px; + font-weight:normal; + left:50%; + margin-left:-400px; + padding:22px 0; + position:absolute; + width: 540px; + color:#eee; +} + +footer a.tzine,a.tzine:visited{ + background:url("../img/tzine.png") no-repeat right top; + border:none; + text-decoration:none; + color:#FCFCFC; + font-size:12px; + height:70px; + left:50%; + line-height:31px; + margin:23px 0 0 110px; + position:absolute; + top:0; + width:290px; +} +*/ \ No newline at end of file diff --git a/lib/html5-File-Upload/assets/img/background_tile_1.jpg b/lib/html5-File-Upload/assets/img/background_tile_1.jpg new file mode 100644 index 0000000000000000000000000000000000000000..ad83d30aa677d304e57339cfcb158209148dec34 GIT binary patch literal 2394 zcmbVMdsGu=7N0yIB!))JTG*rn&DvEuqrfbr4?7p2XO|kHgTp4K93frgiV7}FP6H)~0S0*t zW~7Qaodr(kGFV(DpUaN`*-RD_VzD7+R3wWj;6(|TEN}#LG@3!3DNsn|Be76PNFOOG zFE5Xg$6+9b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@}4l}$xYlP8X?AhK(HSKjIl3(Wy_!M4ok?)eSs(DWMl);t#S&NG(@qas7 z(E8o+u`>g>W=+&~&cm9qOR-s144fC3{HN&RnKGxoRG;Y&Bg2#2`?3@Q%`fsd!yxY& zEmttC6XkWeaDElXb?S4-?UiJ^yGv`rN1iQktD;r+8ax9}X0JZiE|PwoQ+9_bZ9CEK zSIG2xgKIuy-dENAP%_5~kiXnag1n$&YGP~FgBR&1KYRXMr7)*_ZdpUV zQMa=-(^Pk8sG&sae8BS_Wo{b%$%T1Y>(f@>H7bdvQjs+5CU}f3zfk?>`5f8C#`TWT WCHhnS*_OtdmIiTnW>K#7_P+uBi*Q!} literal 0 HcmV?d00001 diff --git a/lib/html5-File-Upload/assets/img/background_tile_3.jpg b/lib/html5-File-Upload/assets/img/background_tile_3.jpg new file mode 100644 index 0000000000000000000000000000000000000000..ac39d60eaa390a0ba280ceaacbda34e741719e6e GIT binary patch literal 2347 zcmbVMc~nzp7XOl$0AUGr60)n<6Ff7)J zxKs{xNoCO%YAslWDY8jBv}YNY)IDZ z$(uvW9-)jS59#}e=at6&a`&0?}SOjblVnNft8~3)4jO zxuUYNvKU!h25Q>DWD5iWCX2)5aKbS}xH-pQQD=u6%mMQrWQbW~(itr})Brm?s?$)b zMMTFkoh?CcR45i4zpz_+y`!!fwAqq`JWu0=XmfIo5n(1FX4GoZAQ(Jgo{aVGj{`Y? zST@3qCLMMu>RmEaW7Q)DOPowZ$G$MMI;~I=A(OHrxO@&r&X=>;YzbG)6U$gKX^fP| z6>uZxeY}Xv=X1q!4o@oQb0loGoE6Ds38YeilrM>i;Im@*^V~Rt*`hXRkomYeEbbgv z@`qfZ)P$%ls3{pmcg;^gLONKk;1>kKP7ncmLIfhgAw(zQj5s+tJG(eLJCR7Pt|XHC?*#`z5RpJ6IXRI$ z+(>R7o@7isJ!e33FZWsP_q+wo-VUfP;4P2_;iv#l#X(e@y&D(-4wL8q4=i1PC;hh# zv*IZLN5ErQ5b)3}9tWr^*y2QWX8xI}3j9YMeT#-959w((s)LPrnS(hxKxMBGXR7ln z7TIqBcg&8bLR1h1MuYP?(@j?WsGp?tuy##R{Cj~R(Viu565Qi2z4tn2BJ|K#D?36@ zAM9eBO>KRRn3&Rak(+r$2Dx;|OFxz0mr=&9ZL@yRKcK#O zC3b1-8^Lb(+-=>`u5ZFS&m2$Caw|qcYN-#G)X0%<7ZY>Fm%+6`E%~F!A#Ph(aKXkq zuv^)Zt*2|+m;FVq5K1Py5+iMhhIt}ZSm_3u{HTSdML^$S+t-I?F`K<-J2d- z@@R`#DsKF;T=_#i!cE+FXSt`#<*gxyeyV)bQ+La66&NwqoRK+c&2QeOFB*o60vV2leN1+gqZ23!ZU2 za*dw{Xo7aax1IkPUwUzGW$kdmAi3GI^ZZ3?GXx^-AULlfjD4_e!Q3FJvk^$4|4KVCH(p~|JJ(1Wd)zb){Xww zbqDq*4|reAh=+6e%X|M^I7$gVU-gD^s504ycxm#T*iC&!E^a3#>T`4yFQ}c^bn{g< z(B2lJ#+Q$*icme-LVE4vKT_28Vd+76|7Qk zrR;4@EiVsjNT?#`)>{vKKU$PM6BDV61H^>(*1VGO!`0vz?lyS8;239m+V_a`lfrB3d*R_*eF`J1 z%IBpa*$vK3*J?6!LF(gk;e7RHdG*fOq3Wk7?m zeq-QNE#>j*4{JZXmuT~~Q*joPX~JR%(Z{bS9B zmD@r`LU4+;wi6FZXiJ?1HL88;#pA~_8|cM%59B6sn_szZd}}9jb8aGCXd=fmy&{|B zAGZXnzWiDZA){&^Xf5rymQMSblyvgbzV+2!vg>kx>gH!T{pX(U>MvT<^VAMPyeX5y zUa&^`$?E!=hdoEAhF@ZR%g;^K2QEKuh2HMXD_D1+zSeK5>}_5}#dm(4VfLH<2FS@W A-T(jq literal 0 HcmV?d00001 diff --git a/lib/html5-File-Upload/assets/img/blue_line.jpg b/lib/html5-File-Upload/assets/img/blue_line.jpg new file mode 100644 index 0000000000000000000000000000000000000000..2af2c9f745accf14acd7da239470efb9914ec91e GIT binary patch literal 1283 zcmbVMy>HV%6hFuLXlP68Rz--(a$!NlJ|{7$4WVl6L}Un5Z4rpgv9H8x?Xzr`xD^v( zV1WU_(hU~=0hmw)0|R1WLQn=&i2;dk35gAJPMfq9Rgrj-?f0I4@AKZf=uNZ%4p&2K z9)NoNIOqf06nzGawqz_U0}3RGdK!RegT}2Oa1}vtd|o$k6Y&PNg-~||k%s~}JsG;X zv48@$iLO{qnfvzSDaTr7nY$=8V8c~W%R0N_q1lylbH>VoA)DOf8TNFjgtlv=KxadH z(eahA%ypbAgpbt%$95pWLYbS2qq3J8)2xa;#7aEO8StdYo-FcW5z0mR1e=E<6vVs$ zOF0oLQb~a#yG0y{=9%-#j8@xkxVyBu-!(Z=XlR<*>+r42ki$lXgiHP(f-`Bi-Z~E z<0a2P1U}w1CcWD~Pz)s5DCa$k9E!fEVPnZgPEgm%9QnhWmZ?-qnktqGQa)dms!$Xw zg{k6{1~s*&77KD=qU&QXTS*dOwNjd@O8JT?R^dbe%Bm`>Ql(asU`^`U)*V049Rqda zS|qMitjZIr2KTj9R1fI^_U15N>`uUR3kTS5VV6~BC0=ANT8@d^etbNe)oRGIt|GJM zVVmvrSF!epU#a}7?oC_se|jd6WQ2G)b_`2bMJ6z2d!tW;-tr)aY>Y=%Bl-#sb_O1p z&&Uc=(K~PhBzi;>j!u#{olGTTN~KdBN~bfKzDy>a%^oTy(?{-v8Jc21f}v=Jik^cexhLrD>m%k;=?wLkl1^oY zL4rzx%ntDVW6Vg?NQ}>>#?ptF*ofNk7jV=_ax_{814Nx*Xa-Dz)!VOctzLS}tiQT* z^GmC)U43-)!Kuq5vzcF$qd(VPesVs%zWed}*xC_%@8Ox>;f0MK+VJX&Ytz?vKJTNq Fe*ix~S*rj5 literal 0 HcmV?d00001 diff --git a/lib/html5-File-Upload/assets/img/done.png b/lib/html5-File-Upload/assets/img/done.png new file mode 100644 index 0000000000000000000000000000000000000000..22a14109ab18aaf8452e2acadfba1ab43e8624c9 GIT binary patch literal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td$Z-Nlo!kghhCLGZ@`lc5`-xUH`X+L- zoK$0EKBNcklPejy>i251S%@-r_yv0$G!tdAD}Du9txH>q}&Fm3JEhD0FauepaL{SS#;#;yPW literal 0 HcmV?d00001 diff --git a/lib/html5-File-Upload/assets/img/logo.jpg b/lib/html5-File-Upload/assets/img/logo.jpg new file mode 100644 index 0000000000000000000000000000000000000000..5c8325231aa738dc9b7986bcf3583e9777e456bc GIT binary patch literal 11044 zcmbVybyOTpm-pcA0TKufK?m2t8Qd8l1P=~_yGsZ`g9eA-gN7j?xQ5`G;0}R7f(;Pd zm*;t9ch7mxe&>9@Kf3EyU#+^;UDZ_&a}R5PrwV=!wg7;N3I_li@ZWgY2aw2nTRHjz zPypzU)!G2S!y1~ay_c68h=<3;liR}D)zXIB%GH_2&%%v|kDHeVAR+DNW?|)M<3(?2 zW9Q%^$#~e>$w=>DEy-vgq`|A<2DY(xP!900(GAelvkGvu60>HMmZF#N1Nk|-Ioo(y z(EB+%xp;#7BpLr!4tgyARn5al|2K=5qa>s3UsmZ~X=u}fT|I2*g}8ZvR=mP|^umJN ze1g1Uf?{0s{Jea;Jbe5-ydpq8UXYLoh?kH4pJ05n=3#9Mg2*fW)7B#;$@tHpe0_bn zeFeB(J?wb+#KgpSc=>tw`GJodKu>=cFAG1Qizm~+G|1a{T6s9Qc{#Yc(Ep{;!qU~- zOOo-?(|?5E?53gdZ^i$ywVa**itBG~PcMkgf4lJ?xjps#-E4RuHlD8D9#%Gw>`ea> zer&t{+t6Q(kKTZ^JRBZ7#llJ6)ymu1#>GoTUXtFDe#K%3o6R;3xoL|NkK&c z-hauexOjS5xLDcz%dW$t-G9o0|4&&E*u%!c%hf~A)z#@=8K7gDQb@9IVm))nIB zqc?DHv3B+K{HuHZ5v{z9hl7uewW5csGyUJ~3v&1m_T?1*Uvd9K*82aa&3GQ2;rS~$ z{ztO>tLiZW|0@1F^&g3U4;~wr#}VW4I5ZxR0K&f$9$@|LaR{P3ECM0`sQ(7qV+jrY z@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oz_TVFZPOXKO3=)-tvLDAa8T~Iqqt>f` zvmYUAG7^f?r!Rk=&z42yCDD2v9G978cb1z;N!CfflLq4Tnt8z_q-RgY?a7M*ZUdkg zo0>VZ#}ft8R0g*qWv1G6lYJ$T$TfVk7qk?BQ_`HAyR?|muC~PokR&m3R1!C Rp+BMe2A%x|Q=t#@{{^+Lu$%w@ literal 0 HcmV?d00001 diff --git a/lib/html5-File-Upload/assets/img/tzine.png b/lib/html5-File-Upload/assets/img/tzine.png new file mode 100644 index 0000000000000000000000000000000000000000..df4abaf944a746a797b2dd06caeeaa4639234dc6 GIT binary patch literal 1263 zcmV-K+4@dn=-n+0Moc)Rk$+IpR;K)CG&5w)ecopTGYp*|zwZ zL-t38}*-$a{uL??@8C)u#Cn4f4G1is7AzQ%KJOVk?byM>rw1hIrh=fRo3d*ltH-`8D}1maDQ=k8aH>C`8kF@) z9Ik7Ud1E3PtbAZO{;nli1GJ+lHoYsNDz}QHZLS?!@`MepHq_kTf+c-3%_@2pq+V6b zT~`kBTFB5g-keh#^9D;(n{2dz+Ke-dJA?c>aX3jMZPTf>%{BQ}nj3H9O(J$(nf0F@ z-J(W%j7HqpGQumXIA>Y#nOKNTjRAhS3FtF-kU?EDw~)aZhzmn420b_qcdiPQ*W)uW zl#$B0CweT4jg%QG4>Rsf=vvQGmp11;PS#Ik^RVkKH>`$Sv1S#@cmS zxYDqu^rUC{+dhbDkRhr`)SO>rK_U`rNlbPFqGtMf8$7^Zcp6|~7i&W|am_5uRcXnl zZdp^7Q3To3xB<6f)buAiNln7zf>H)`>n( z_E?=F--| zfuxfzA;W-VosI13!eyN{>05^0%TplWtiqBdAWz(Jj#bSZG3HndMAGxa0TlHYh8ws= zzsnm= opts.refresh) { + var diffData = e.loaded - this.startData; + var speed = diffData / diffTime; // KB per second + opts.speedUpdated(this.index, this.file, speed); + this.startData = e.loaded; + this.currentStart = elapsed; + } + } + } + } + + + + function upload() { + stop_loop = false; + if (!files) { + opts.error(errors[0]); + return false; + } + var filesDone = 0, + filesRejected = 0; + + if (files_count > opts.maxfiles) { + opts.error(errors[1]); + return false; + } + + for (var i=0; i max_file_size) { + opts.error(errors[2], files[i], i); + filesRejected++; + continue; + } + + reader.onloadend = send; + reader.readAsBinaryString(files[i]); + } else { + filesRejected++; + } + } catch(err) { + opts.error(errors[0]); + return false; + } + } + + function send(e) { + // Sometimes the index is not attached to the + // event object. Find it by size. Hack for sure. + if (e.target.index == undefined) { + e.target.index = getIndexBySize(e.total); + } + + var xhr = new XMLHttpRequest(), + upload = xhr.upload, + file = files[e.target.index], + index = e.target.index, + start_time = new Date().getTime(), + boundary = '------multipartformboundary' + (new Date).getTime(), + builder; + + newName = rename(file.name); + if (typeof newName === "string") { + builder = getBuilder(newName, e.target.result, boundary); + } else { + builder = getBuilder(file.name, e.target.result, boundary); + } + + upload.index = index; + upload.file = file; + upload.downloadStartTime = start_time; + upload.currentStart = start_time; + upload.currentProgress = 0; + upload.startData = 0; + upload.addEventListener("progress", progress, false); + + xhr.open("POST", opts.url, true); + xhr.setRequestHeader('content-type', 'multipart/form-data; boundary=' + + boundary); + + xhr.sendAsBinary(builder); + + opts.uploadStarted(index, file, files_count); + + xhr.onload = function() { + if (xhr.responseText) { + var now = new Date().getTime(), + timeDiff = now - start_time, + result = opts.uploadFinished(index, file, jQuery.parseJSON(xhr.responseText), timeDiff); + filesDone++; + if (filesDone == files_count - filesRejected) { + afterAll(); + } + if (result === false) stop_loop = true; + } + }; + } + } + + function getIndexBySize(size) { + for (var i=0; i < files_count; i++) { + if (files[i].size == size) { + return i; + } + } + + return undefined; + } + + function rename(name) { + return opts.rename(name); + } + + function beforeEach(file) { + return opts.beforeEach(file); + } + + function afterAll() { + return opts.afterAll(); + } + + function dragEnter(e) { + clearTimeout(doc_leave_timer); + e.preventDefault(); + opts.dragEnter(e); + } + + function dragOver(e) { + clearTimeout(doc_leave_timer); + e.preventDefault(); + opts.docOver(e); + opts.dragOver(e); + } + + function dragLeave(e) { + clearTimeout(doc_leave_timer); + opts.dragLeave(e); + e.stopPropagation(); + } + + function docDrop(e) { + e.preventDefault(); + opts.docLeave(e); + return false; + } + + function docEnter(e) { + clearTimeout(doc_leave_timer); + e.preventDefault(); + opts.docEnter(e); + return false; + } + + function docOver(e) { + clearTimeout(doc_leave_timer); + e.preventDefault(); + opts.docOver(e); + return false; + } + + function docLeave(e) { + doc_leave_timer = setTimeout(function(){ + opts.docLeave(e); + }, 200); + } + + function empty(){} + + try { + if (XMLHttpRequest.prototype.sendAsBinary) return; + XMLHttpRequest.prototype.sendAsBinary = function(datastr) { + function byteValue(x) { + return x.charCodeAt(0) & 0xff; + } + var ords = Array.prototype.map.call(datastr, byteValue); + var ui8a = new Uint8Array(ords); + this.send(ui8a.buffer); + } + } catch(e) {} + +})(jQuery); \ No newline at end of file diff --git a/lib/html5-File-Upload/assets/js/upload-script.js b/lib/html5-File-Upload/assets/js/upload-script.js new file mode 100644 index 00000000..33410863 --- /dev/null +++ b/lib/html5-File-Upload/assets/js/upload-script.js @@ -0,0 +1,102 @@ +$(function(){ + + var dropbox = $('#dropbox'), + message = $('.message', dropbox); + + dropbox.filedrop({ + // The name of the $_FILES entry: + paramname:'pic', + + maxfiles: 5, + maxfilesize: 2, + url: 'post_file.php', + + uploadFinished:function(i,file,response){ + $.data(file).addClass('done'); + // response is the JSON object that post_file.php returns + }, + + error: function(err, file) { + switch(err) { + case 'BrowserNotSupported': + showMessage('Your browser does not support HTML5 file uploads!'); + break; + case 'TooManyFiles': + alert('Too many files! Please select 5 at most! (configurable)'); + break; + case 'FileTooLarge': + alert(file.name+' is too large! Please upload files up to 2mb (configurable).'); + break; + default: + break; + } + }, + + // Called before each upload is started + beforeEach: function(file){ + if(!file.type.match(/^image\//)){ + alert('Only images are allowed!'); + + // Returning false will cause the + // file to be rejected + return false; + } + }, + + uploadStarted:function(i, file, len){ + createImage(file); + }, + + progressUpdated: function(i, file, progress) { + $.data(file).find('.progress').width(progress); + } + + }); + + var template = '
    '+ + ''+ + ''+ + ''+ + ''+ + '
    '+ + '
    '+ + '
    '+ + '
    '; + + + function createImage(file){ + + var preview = $(template), + image = $('img', preview); + + var reader = new FileReader(); + + image.width = 100; + image.height = 100; + + reader.onload = function(e){ + + // e.target.result holds the DataURL which + // can be used as a source of the image: + + image.attr('src',e.target.result); + }; + + // Reading the file as a DataURL. When finished, + // this will trigger the onload function above: + reader.readAsDataURL(file); + + message.hide(); + preview.appendTo(dropbox); + + // Associating a preview container + // with the file, using jQuery's $.data(): + + $.data(file,preview); + } + + function showMessage(msg){ + message.html(msg); + } + +}); \ No newline at end of file diff --git a/lib/html5-File-Upload/post_file.php b/lib/html5-File-Upload/post_file.php new file mode 100644 index 00000000..c364f940 --- /dev/null +++ b/lib/html5-File-Upload/post_file.php @@ -0,0 +1,59 @@ +$str)); + exit; +} + +function get_extension($file_name){ + $ext = explode('.', $file_name); + $ext = array_pop($ext); + return strtolower($ext); +} +?> \ No newline at end of file diff --git a/lib/html5-File-Upload/sample-index.html b/lib/html5-File-Upload/sample-index.html new file mode 100644 index 00000000..50aa0319 --- /dev/null +++ b/lib/html5-File-Upload/sample-index.html @@ -0,0 +1,41 @@ + + + + + HTML5 File Drag and Drop Upload with jQuery and PHP | Tutorialzine Demo + + + + + + + + + +
    +

    HTML5 File Upload with jQuery and PHP

    +
    + +
    + Drop images here to upload.
    (they will only be visible to you)
    +
    + + + + + + + + + + + + + + + diff --git a/misc/databaseScripts/create_database_V0.1.sql b/misc/databaseScripts/create_database_V0.1.sql index 885865dc..89de3ff5 100644 --- a/misc/databaseScripts/create_database_V0.1.sql +++ b/misc/databaseScripts/create_database_V0.1.sql @@ -259,10 +259,10 @@ CREATE TABLE {prefix}golf ( CREATE TABLE {prefix}images ( id INT NOT NULL AUTO_INCREMENT, name TINYTEXT NULL, + status TINYINT(1) NULL, file_name TINYTEXT NULL, descr TEXT NULL, caption TINYTEXT NULL, - pending TINYINT(1) NULL, position INT NULL, ref_type INT NULL, ref_dest INT NULL, @@ -475,85 +475,253 @@ CREATE TABLE {prefix}restaurants ( CREATE TABLE {prefix}settings_general ( id INT NOT NULL AUTO_INCREMENT, - admin_debug BOOLEAN NULL, - admin_debug_verbose BOOLEAN NULL, - front_debug BOOLEAN NULL, - front_debug_verbose BOOLEAN NULL, - google_maps_api_key TINYTEXT NULL, - maps_default_lat FLOAT NULL, - maps_default_lon FLOAT NULL, + admin_debug BOOLEAN DEFAULT true, + admin_debug_verbose BOOLEAN DEFAULT false, + front_debug BOOLEAN DEFAULT false, + front_debug_verbose BOOLEAN DEFAULT false, + google_maps_api_key TINYTEXT DEFAULT '', + maps_default_lat FLOAT DEFAULT 45.3749, + maps_default_lon FLOAT DEFAULT -84.9592, time_zone TINYTEXT NULL, - list_show_map BOOLEAN NULL, - list_show_list BOOLEAN NULL, - list_show_search BOOLEAN NULL, - list_show_search_text BOOLEAN NULL, - list_show_search_category BOOLEAN NULL, - list_show_search_amenities BOOLEAN NULL, - list_show_search_alphja BOOLEAN NULL, - list_show_detail_link BOOLEAN NULL, - list_show_logo BOOLEAN NULL, + list_show_map BOOLEAN DEFAULT true, + list_show_list BOOLEAN DEFAULT true, + list_show_search BOOLEAN DEFAULT true, + list_show_search_text BOOLEAN DEFAULT true, + list_show_search_category BOOLEAN DEFAULT true, + list_show_search_amenities BOOLEAN DEFAULT true, + list_show_search_alpha BOOLEAN DEFAULT true, + list_show_detail_link BOOLEAN DEFAULT true, + list_show_logo BOOLEAN DEFAULT true, list_logo_size TINYTEXT NULL, - list_show_address BOOLEAN NULL, - list_show_street BOOLEAN NULL, - list_show_citystatezip BOOLEAN NULL, - list_show_country BOOLEAN NULL, - list_show_region BOOLEAN NULL, - list_show_descr BOOLEAN NULL, - list_show_short_descr BOOLEAN NULL, - list_show_phone BOOLEAN NULL, - list_show_tollfree BOOLEAN NULL, - list_show_url BOOLEAN NULL, - list_show_url_newtarget BOOLEAN NULL, - list_show_categories BOOLEAN NULL, - list_show_creditcards BOOLEAN NULL, - list_show_amenities BOOLEAN NULL, - list_map_show_detaillink BOOLEAN NULL, - list_map_show_logo BOOLEAN NULL, + list_show_address BOOLEAN DEFAULT true, + list_show_street BOOLEAN DEFAULT true, + list_show_citystatezip BOOLEAN DEFAULT true, + list_show_country BOOLEAN DEFAULT true, + list_show_region BOOLEAN DEFAULT true, + list_show_descr BOOLEAN DEFAULT false, + list_show_short_descr BOOLEAN DEFAULT true, + list_show_phone BOOLEAN DEFAULT true, + list_show_tollfree BOOLEAN DEFAULT true, + list_show_url BOOLEAN DEFAULT true, + list_show_url_newtarget BOOLEAN DEFAULT true, + list_show_categories BOOLEAN DEFAULT true, + list_show_creditcards BOOLEAN DEFAULT true, + list_show_amenities BOOLEAN DEFAULT false, + list_map_show_detaillink BOOLEAN DEFAULT true, + list_map_show_logo BOOLEAN DEFAULT false, list_map_logo_size TINYTEXT NULL, - list_map_show_description BOOLEAN NULL, - list_map_show_short_description BOOLEAN NULL, - list_map_show_address BOOLEAN NULL, - list_map_show_street BOOLEAN NULL, - list_map_show_citystatezip BOOLEAN NULL, - list_map_show_country BOOLEAN NULL, - list_map_show_region BOOLEAN NULL, - list_map_show_phone BOOLEAN NULL, - list_map_show_tollfree BOOLEAN NULL, - list_map_show_url BOOLEAN NULL, - list_map_show_url_newtarget BOOLEAN NULL, - list_map_show_categories BOOLEAN NULL, - list_map_show_creditcards BOOLEAN NULL, - list_map_show_amenities BOOLEAN NULL, - detail_show_map BOOLEAN NULL, - detail_show_directions BOOLEAN NULL, - detail_show_logo BOOLEAN NULL, - detail_show_logo_size TINYTEXT NULL, - detail_show_description BOOLEAN NULL, - detail_show_short_description BOOLEAN NULL, - detail_show_address BOOLEAN NULL, - detail_show_street BOOLEAN NULL, - detail_show_citystatezip BOOLEAN NULL, - detail_show_country BOOLEAN NULL, - detail_show_region BOOLEAN NULL, - detail_show_phone BOOLEAN NULL, - detail_show_tollfree BOOLEAN NULL, - detail_show_url BOOLEAN NULL, - detail_show_url_newtarget BOOLEAN NULL, - detail_show_categories BOOLEAN NULL, - detail_show_creditcards BOOLEAN NULL, - detail_show_amenities BOOLEAN NULL, + list_map_show_descr BOOLEAN DEFAULT false, + list_map_show_short_descr BOOLEAN DEFAULT true, + list_map_show_address BOOLEAN DEFAULT true, + list_map_show_street BOOLEAN DEFAULT true, + list_map_show_citystatezip BOOLEAN DEFAULT true, + list_map_show_country BOOLEAN DEFAULT true, + list_map_show_region BOOLEAN DEFAULT true, + list_map_show_phone BOOLEAN DEFAULT true, + list_map_show_tollfree BOOLEAN DEFAULT true, + list_map_show_url BOOLEAN DEFAULT true, + list_map_show_url_newtarget BOOLEAN DEFAULT true, + list_map_show_categories BOOLEAN DEFAULT false, + list_map_show_creditcards BOOLEAN DEFAULT false, + list_map_show_amenities BOOLEAN DEFAULT false, + detail_show_map BOOLEAN DEFAULT true, + detail_show_directions BOOLEAN DEFAULT true, + detail_show_logo BOOLEAN DEFAULT true, + detail_logo_size TINYTEXT NULL, + detail_show_descr BOOLEAN DEFAULT true, + detail_show_short_descr BOOLEAN DEFAULT false, + detail_show_address BOOLEAN DEFAULT true, + detail_show_street BOOLEAN DEFAULT true, + detail_show_citystatezip BOOLEAN DEFAULT true, + detail_show_country BOOLEAN DEFAULT true, + detail_show_region BOOLEAN DEFAULT true, + detail_show_phone BOOLEAN DEFAULT true, + detail_show_tollfree BOOLEAN DEFAULT true, + detail_show_url BOOLEAN DEFAULT true, + detail_show_url_newtarget BOOLEAN DEFAULT true, + detail_show_categories BOOLEAN DEFAULT true, + detail_show_creditcards BOOLEAN DEFAULT true, + detail_show_amenities BOOLEAN DEFAULT true, + detail_map_show_logo BOOLEAN DEFAULT false, + detail_map_logo_size TINYTEXT NULL, + detail_map_show_descr BOOLEAN DEFAULT false, + detail_map_show_short_descr BOOLEAN DEFAULT true, + detail_map_show_address BOOLEAN DEFAULT true, + detail_map_show_street BOOLEAN DEFAULT true, + detail_map_show_citystatezip BOOLEAN DEFAULT true, + detail_map_show_country BOOLEAN DEFAULT true, + detail_map_show_region BOOLEAN DEFAULT true, + detail_map_show_phone BOOLEAN DEFAULT true, + detail_map_show_tollfree BOOLEAN DEFAULT true, + detail_map_show_url BOOLEAN DEFAULT true, + detail_map_show_url_newtarget BOOLEAN DEFAULT true, + detail_map_show_categories BOOLEAN DEFAULT false, + detail_map_show_creditcards BOOLEAN DEFAULT false, + detail_map_show_amenities BOOLEAN DEFAULT false, PRIMARY KEY (id) ); ---- +INSERT INTO {prefix}settings_general + ( id, time_zone ) + VALUES + ( 1, 'America/Detroit' ) +; + +---- + CREATE TABLE {prefix}settings_terms ( id INT NOT NULL AUTO_INCREMENT, + term_admin_menu_members TINYTEXT NULL, + term_admin_menu_member_list TINYTEXT NULL, + term_admin_menu_member TINYTEXT NULL, + term_admin_menu_configure TINYTEXT NULL, + term_admin_menu_settings TINYTEXT NULL, + term_admin_menu_shortcodes TINYTEXT NULL, + term_admin_menu_members_dashboard TINYTEXT NULL, + term_admin_menu_members_list TINYTEXT NULL, + term_admin_menu_members_reports TINYTEXT NULL, + term_admin_menu_member_dashboard TINYTEXT NULL, + term_admin_menu_member_info TINYTEXT NULL, + term_admin_menu_member_locations TINYTEXT NULL, + term_admin_menu_member_facilities TINYTEXT NULL, + term_admin_menu_member_attractions TINYTEXT NULL, + term_admin_menu_member_contacts TINYTEXT NULL, + term_admin_menu_configure_member_types TINYTEXT NULL, + term_admin_menu_configure_member_cats TINYTEXT NULL, + term_admin_menu_configure_accom_types TINYTEXT NULL, + term_admin_menu_configure_amenities TINYTEXT NULL, + term_admin_menu_configure_cities TINYTEXT NULL, + term_admin_menu_configure_regions TINYTEXT NULL, + term_admin_menu_settings_general TINYTEXT NULL, + term_admin_menu_settings_terms TINYTEXT NULL, + term_admin_menu_settings_development TINYTEXT NULL, + term_member TINYTEXT NULL, + term_member_cap TINYTEXT NULL, + term_member_plur TINYTEXT NULL, + term_member_plur_cap TINYTEXT NULL, + term_location TINYTEXT NULL, + term_location_cap TINYTEXT NULL, + term_location_plur TINYTEXT NULL, + term_location_plur_cap TINYTEXT NULL, + term_facility TINYTEXT NULL, + term_facility_cap TINYTEXT NULL, + term_facility_plur TINYTEXT NULL, + term_facility_plur_cap TINYTEXT NULL, + term_attraction TINYTEXT NULL, + term_attraction_cap TINYTEXT NULL, + term_attraction_plur TINYTEXT NULL, + term_attraction_plur_cap TINYTEXT NULL, + term_contact TINYTEXT NULL, + term_contact_cap TINYTEXT NULL, + term_contact_plur TINYTEXT NULL, + term_contact_plur_cap TINYTEXT NULL, PRIMARY KEY (id) ); ---- +INSERT INTO {prefix}settings_terms + ( + id, + term_admin_menu_members, + term_admin_menu_member_list, + term_admin_menu_member, + term_admin_menu_configure, + term_admin_menu_settings, + term_admin_menu_shortcodes, + term_admin_menu_members_dashboard, + term_admin_menu_members_list, + term_admin_menu_members_reports, + term_admin_menu_member_dashboard, + term_admin_menu_member_info, + term_admin_menu_member_locations, + term_admin_menu_member_facilities, + term_admin_menu_member_attractions, + term_admin_menu_member_contacts, + term_admin_menu_configure_member_types, + term_admin_menu_configure_member_cats, + term_admin_menu_configure_accom_types, + term_admin_menu_configure_amenities, + term_admin_menu_configure_cities, + term_admin_menu_configure_regions, + term_admin_menu_settings_general, + term_admin_menu_settings_terms, + term_admin_menu_settings_development, + term_member, + term_member_cap, + term_member_plur, + term_member_plur_cap, + term_location, + term_location_cap, + term_location_plur, + term_location_plur_cap, + term_facility, + term_facility_cap, + term_facility_plur, + term_facility_plur_cap, + term_attraction, + term_attraction_cap, + term_attraction_plur, + term_attraction_plur_cap, + term_contact, + term_contact_cap, + term_contact_plur, + term_contact_plur_cap + ) + VALUES + ( + 1, + 'Members', + 'Member', + 'Add Member', + 'Configure', + 'Settings', + 'Shortcodes', + 'Dashboard', + 'Member List', + 'Reports', + 'Member Dashboard', + 'Member Info', + 'Locations', + 'Facilities', + 'Attractions', + 'Contacts', + 'Member Types', + 'Member Categories', + 'Accommodation Types', + 'Amenities', + 'Cities', + 'Regions', + 'General Settings', + 'Terms & Phrases', + 'Development', + 'member', + 'Member', + 'members', + 'Members', + 'location', + 'Location', + 'locations', + 'Locations', + 'facility', + 'Facility', + 'facilities', + 'Facilities', + 'attraction', + 'Attraction', + 'attractions', + 'Attractions', + 'contact', + 'Contact', + 'contacts', + 'Contacts' + ) +; + +---- + CREATE TABLE {prefix}social_media ( id INT NOT NULL AUTO_INCREMENT, name TINYTEXT NULL, diff --git a/misc/notes.txt b/misc/notes.txt index 968827cb..703863df 100644 --- a/misc/notes.txt +++ b/misc/notes.txt @@ -1,6 +1,17 @@ Development Notes ----------------- +Database Updates + +* Added table settings_general +* Added table settings_terms +* ALTER TABLE wp_glm_members_images CHANGE pending status tinyint; + + +TO-DO + +* Check all current_user_can() calls to make sure they're for the right capability. + ADMIN AREA * Consider paginating certain lists diff --git a/misc/smarty/templates_c/081a36d97cdf30d438a1e104c26a275acc180da0.file.index.html.php b/misc/smarty/templates_c/081a36d97cdf30d438a1e104c26a275acc180da0.file.index.html.php index d206596e..f2747bd7 100644 --- a/misc/smarty/templates_c/081a36d97cdf30d438a1e104c26a275acc180da0.file.index.html.php +++ b/misc/smarty/templates_c/081a36d97cdf30d438a1e104c26a275acc180da0.file.index.html.php @@ -1,4 +1,4 @@ - decodeProperties(array ( @@ -7,7 +7,7 @@ $_valid = $_smarty_tpl->decodeProperties(array ( '081a36d97cdf30d438a1e104c26a275acc180da0' => array ( 0 => '/var/www/server/wordpress/wp-content/plugins/glm-member-db/views/admin/members/index.html', - 1 => 1426001139, + 1 => 1434727132, 2 => 'file', ), ), @@ -22,8 +22,10 @@ $_valid = $_smarty_tpl->decodeProperties(array ( 'haveMemberTypes' => 0, 'thisURL' => 0, 'haveCategories' => 0, - 'haveRegions' => 0, 'haveAccommodationTypes' => 0, + 'haveAmenities' => 0, + 'haveCities' => 0, + 'haveRegions' => 0, 'numbMembers' => 0, 'membersPending' => 0, 'pendingList' => 0, @@ -42,7 +44,7 @@ $_valid = $_smarty_tpl->decodeProperties(array ( You do not have any Member Types setup. Click here to add Member Types. +?page=glm-members-admin-menu-configure&glm_action=index">Click here to add Member Types. tpl_vars['haveCategories']->value) {?> @@ -52,21 +54,36 @@ $_valid = $_smarty_tpl->decodeProperties(array ( ?page=glm-members-admin-menu-configure&glm_action=categories">Click here to add Member Categories. -tpl_vars['haveRegions']->value) {?> +tpl_vars['haveAccommodationTypes']->value) {?> - You do not have any Regions setup. + You do not have any Accommodation Types setup. Click here to add Regions. +?page=glm-members-admin-menu-configure&glm_action=accommodationTypes">Click here to add Accommodation Types. -tpl_vars['haveAccommodationTypes']->value) {?> +tpl_vars['haveAmenities']->value) {?> + + You do not have any Amenities setup. + Click here to add Amenities. + + +tpl_vars['haveCities']->value) {?> - You do not have any AccommodationTypes setup. + You do not have any Cities setup. Click here to add AccommodationTypes. +?page=glm-members-admin-menu-configure&glm_action=cities">Click here to add Cities. + + +tpl_vars['haveRegions']->value) {?> + + You do not have any Regions setup. + Click here to add Regions. tpl_vars['numbMembers']->value==0) {?> +   You do not have any members listed. + tpl_vars["i"])) {$_smarty_tpl->tpl_vars["i"] = clone $_smarty_tpl->tpl_vars["i"]; +$_smarty_tpl->tpl_vars["i"]->value = "0"; $_smarty_tpl->tpl_vars["i"]->nocache = null; $_smarty_tpl->tpl_vars["i"]->scope = 0; +} else $_smarty_tpl->tpl_vars["i"] = new Smarty_variable("0", null, 0);?> tpl_vars['p'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['p']->_loop = false; $_from = $_smarty_tpl->tpl_vars['pendingList']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');} foreach ($_from as $_smarty_tpl->tpl_vars['p']->key => $_smarty_tpl->tpl_vars['p']->value) { diff --git a/misc/smarty/templates_c/47fb9b803e7138d215645f3c977b0b1dc2a9e718.file.index.html.php b/misc/smarty/templates_c/47fb9b803e7138d215645f3c977b0b1dc2a9e718.file.index.html.php index 8c5bfbf3..1a982780 100644 --- a/misc/smarty/templates_c/47fb9b803e7138d215645f3c977b0b1dc2a9e718.file.index.html.php +++ b/misc/smarty/templates_c/47fb9b803e7138d215645f3c977b0b1dc2a9e718.file.index.html.php @@ -1,4 +1,4 @@ - decodeProperties(array ( @@ -7,7 +7,7 @@ $_valid = $_smarty_tpl->decodeProperties(array ( '47fb9b803e7138d215645f3c977b0b1dc2a9e718' => array ( 0 => '/var/www/server/wordpress/wp-content/plugins/glm-member-db/views/admin/configure/index.html', - 1 => 1433354735, + 1 => 1434554103, 2 => 'file', ), ), @@ -56,7 +56,7 @@ $_valid = $_smarty_tpl->decodeProperties(array (

    * Required

    Cancel - +
    diff --git a/misc/smarty/templates_c/60cbe99d19bbec013cbca4d9344f2fd4a4152f52.file.index.html.php b/misc/smarty/templates_c/60cbe99d19bbec013cbca4d9344f2fd4a4152f52.file.index.html.php index b511d05f..9a2aeee7 100644 --- a/misc/smarty/templates_c/60cbe99d19bbec013cbca4d9344f2fd4a4152f52.file.index.html.php +++ b/misc/smarty/templates_c/60cbe99d19bbec013cbca4d9344f2fd4a4152f52.file.index.html.php @@ -1,4 +1,4 @@ - decodeProperties(array ( @@ -7,7 +7,7 @@ $_valid = $_smarty_tpl->decodeProperties(array ( '60cbe99d19bbec013cbca4d9344f2fd4a4152f52' => array ( 0 => '/var/www/server/wordpress/wp-content/plugins/glm-member-db/views/admin/error/index.html', - 1 => 1421691086, + 1 => 1434209562, 2 => 'file', ), ), @@ -15,9 +15,9 @@ $_valid = $_smarty_tpl->decodeProperties(array ( 'function' => array ( ), - 'has_nocache_code' => false, 'version' => 'Smarty-3.1.21-dev', 'unifunc' => 'content_54c086b3b1dd65_92948708', + 'has_nocache_code' => false, ),false); /*/%%SmartyHeaderCode%%*/?> getSubTemplate ('admin/error/header.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?> diff --git a/models/admin/dashboardWidget/index.php b/models/admin/dashboardWidget/index.php index 3aec7c43..d7840282 100644 --- a/models/admin/dashboardWidget/index.php +++ b/models/admin/dashboardWidget/index.php @@ -119,18 +119,30 @@ class GlmMembersAdmin_dashboardWidget_index extends GlmDataMembers $categoriesStats = $Categories->getStats(); $haveCategories = ($categoriesStats > 0); - // Check for required Regions - require_once(GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataRegions.php'); - $Regions = new GlmDataRegions($this->wpdb, $this->config); - $regionsStats = $Regions->getStats(); - $haveRegions = ($regionsStats > 0); - // Check for required Accommodation Types require_once(GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataAccommodationTypes.php'); $AccommodationTypes = new GlmDataAccommodationTypes($this->wpdb, $this->config); $accommodationTypesStats = $AccommodationTypes->getStats(); $haveAccommodationTypes = ($accommodationTypesStats > 0); + // Check for required Amenities + require_once(GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataAmenities.php'); + $Amenities = new GlmDataAmenities($this->wpdb, $this->config); + $amenitiesStats = $Amenities->getStats(); + $haveAmenities = ($amenitiesStats > 0); + + // Check for required Cities + require_once(GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataCities.php'); + $Cities = new GlmDataCities($this->wpdb, $this->config); + $citiesStats = $Cities->getStats(); + $haveCities = ($citiesStats > 0); + + // Check for required Regions + require_once(GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataRegions.php'); + $Regions = new GlmDataRegions($this->wpdb, $this->config); + $regionsStats = $Regions->getStats(); + $haveRegions = ($regionsStats > 0); + // Get number of member information records with pending updates require_once(GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataMemberInfo.php'); $MemberInfo = new GlmDataMemberInfo($this->wpdb, $this->config); @@ -149,8 +161,10 @@ class GlmMembersAdmin_dashboardWidget_index extends GlmDataMembers 'membersPending' => $membersPending, 'haveMemberTypes' => $haveMemberTypes, 'haveCategories' => $haveCategories, - 'haveRegions' => $haveRegions, 'haveAccommodationTypes' => $haveAccommodationTypes, + 'haveAmenities' => $haveAmenities, + 'haveRegions' => $haveRegions, + 'haveCities' => $haveCities, 'pendingList' => $pendingList ); diff --git a/models/admin/member/memberImage.php b/models/admin/member/memberImage.php new file mode 100644 index 00000000..668cc511 --- /dev/null +++ b/models/admin/member/memberImage.php @@ -0,0 +1,137 @@ + + * @license http://www.gaslightmedia.com Gaslightmedia + * @version 0.1 + */ + +// Load Members data abstract +require_once(GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataImages.php'); + +/* + * This class performs the work of handling images passed to it via + * an AJAX call that goes through the WorPress AJAX Handler. + * + */ +class GlmMembersAdmin_member_memberImage extends GlmDataImages +{ + + /** + * 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) + { + + $return = array( + 'status' => false, // Assume we didn't get files or nothing works + 'files' => false, // Provide submitted data along with stored image data + 'message' => false + ); + + + // Check for uploaded files + if (!isset($_FILES) || count($_FILES) == 0) { + $return['message'] = 'No image file provided!'; + echo json_encode($return); + die(); + } + + // Include the incoming files data + $files = $_FILES; + + // Check for Member Info record ID + if (!isset($_REQUEST['memberInfoID']) || trim($_REQUEST['memberInfoID']) == '') { + $return['message'] = 'No Member Info Record ID provided!'; + echo json_encode($return); + die(); + } +echo "memberInfoID = ".$_REQUEST['memberInfoID']."\n\n"; + // Store each file away + + // Add stored image to return data + + // Return stored image data + echo json_encode($return); + die(); + } + + +} +?> diff --git a/models/admin/member/memberInfo.php b/models/admin/member/memberInfo.php index 95735c3b..19cdeb85 100644 --- a/models/admin/member/memberInfo.php +++ b/models/admin/member/memberInfo.php @@ -60,39 +60,6 @@ class GlmMembersAdmin_member_memberInfo extends GlmDataMemberInfo // Run constructor for members data class parent::__construct(false, false); - // Add scrips and css - add_action('glm_members_memberInfo_enqueue_scripts', - array( - $this, - 'glmMembersMemberInfoScripts' - ) - ); - - - } - - /** - * Setup inclusion of needed scripts - * - * This method is called by an add_action() hook setup in the contructor. - * - * (no prameters) - * - * @return void - * @access public - */ - public function glmMembersMemberInfoScripts () - { -/* Not working at this time - // Enqueue Geolocation Edit Script - wp_register_script('glm-members-geo-js', - GLM_MEMBERS_PLUGIN_URL . 'js/geolocation-edit/jquery.geolocation.edit.0.0.11.js', - array( - 'jquery' - ) - ); - wp_enqueue_script('glm-members-geo-js'); -*/ } /* @@ -137,6 +104,7 @@ class GlmMembersAdmin_member_memberInfo extends GlmDataMemberInfo $haveMember = false; $memberInfoID = 0; $haveMemberInfo = false; + $haveImageGallery = false; $isActive = false; $noActive = false; $categories = false; @@ -296,11 +264,19 @@ class GlmMembersAdmin_member_memberInfo extends GlmDataMemberInfo // Edit the existing member $memberInfo = $this->editEntry($memberInfoID); - // If we have member data, say so + // If we have member data if (is_array($memberInfo) && $memberInfo['status']) { + // Say we do $haveMemberInfo = true; + // Also get any image gallery images + require_once(GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataImages.php'); + $Images = new GlmDataImages($this->wpdb, $this->config); + $imageGallery = $Images->getGallery($this->config['ref_type_numb']['Member'], $memberInfoID); + + $haveImageGallery = ($imageGallery != false); + // Otherwise } else { diff --git a/models/admin/members/index.php b/models/admin/members/index.php index caee4bdc..73ca9ca9 100644 --- a/models/admin/members/index.php +++ b/models/admin/members/index.php @@ -115,18 +115,30 @@ class GlmMembersAdmin_members_index extends GlmDataMembers $categoriesStats = $Categories->getStats(); $haveCategories = ($categoriesStats > 0); - // Check for required Regions - require_once(GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataRegions.php'); - $Regions = new GlmDataRegions($this->wpdb, $this->config); - $regionsStats = $Regions->getStats(); - $haveRegions = ($regionsStats > 0); - // Check for required Accommodation Types require_once(GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataAccommodationTypes.php'); $AccommodationTypes = new GlmDataAccommodationTypes($this->wpdb, $this->config); $accommodationTypesStats = $AccommodationTypes->getStats(); $haveAccommodationTypes = ($accommodationTypesStats > 0); + // Check for required Amenities + require_once(GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataAmenities.php'); + $Amenities = new GlmDataAmenities($this->wpdb, $this->config); + $amenitiesStats = $Amenities->getStats(); + $haveAmenities = ($amenitiesStats > 0); + + // Check for required Cities + require_once(GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataCities.php'); + $Cities = new GlmDataCities($this->wpdb, $this->config); + $citiesStats = $Cities->getStats(); + $haveCities = ($citiesStats > 0); + + // Check for required Regions + require_once(GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataRegions.php'); + $Regions = new GlmDataRegions($this->wpdb, $this->config); + $regionsStats = $Regions->getStats(); + $haveRegions = ($regionsStats > 0); + // Get number of member information records with pending updates require_once(GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataMemberInfo.php'); $MemberInfo = new GlmDataMemberInfo($this->wpdb, $this->config); @@ -145,8 +157,10 @@ class GlmMembersAdmin_members_index extends GlmDataMembers 'membersPending' => $membersPending, 'haveMemberTypes' => $haveMemberTypes, 'haveCategories' => $haveCategories, - 'haveRegions' => $haveRegions, 'haveAccommodationTypes' => $haveAccommodationTypes, + 'haveAmenities' => $haveAmenities, + 'haveRegions' => $haveRegions, + 'haveCities' => $haveCities, 'pendingList' => $pendingList ); diff --git a/models/admin/settings/index.php b/models/admin/settings/index.php index e5645f52..e0bb79d5 100644 --- a/models/admin/settings/index.php +++ b/models/admin/settings/index.php @@ -13,12 +13,15 @@ * @version 0.1 */ +// Load Members data abstract +require_once(GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/settings/dataSettingsGeneral.php'); + /* * This class performs the work for the default action of the "Members" menu * option, which is to display the members dashboard. * */ -class GlmMembersAdmin_settings_index +class GlmMembersAdmin_settings_index extends GlmDataSettingsGeneral { /** @@ -54,6 +57,9 @@ class GlmMembersAdmin_settings_index // Save plugin configuration object $this->config = $config; + // Run constructor for members data class + parent::__construct(false, false); + } /* @@ -92,13 +98,74 @@ class GlmMembersAdmin_settings_index */ public function modelAction ($actionData = false) { + // General settings are always stored in a record with ID=1. + $id = 1; + + // Determine if current user can edit configurations + if (!current_user_can('glm_members_configure')) { + 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 + $option = ''; + if (isset($_REQUEST['option']) && $_REQUEST['option'] == 'submit') { + $option = $_REQUEST['option']; + } + + switch($option) { + + // Update the settings and redisplay the form + case 'submit': + + // Update the general settings + $generalSettings = $this->updateEntry(1); + + // Display admin message that the data has been updated + glmMembersAdmin::addNotice('General Settings for the '.GLM_MEMBERS_PLUGIN_NAME.' plugin have been updated.', 'AdminNotice'); + + 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. + $generalSettings = $this->editEntry($id); + + if ($generalSettings === false) { + + if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) { + glmMembersAdmin::addNotice("  /modesl/admin/settings/index.php: Unable to load General Settings.", 'Alert'); + } + + return array( + 'status' => false, + 'menuItemRedirect' => 'error', + 'modelRedirect' => 'index', + 'view' => 'admin/error/index.html', + 'data' => array( + 'reason' => 'Unable to create general settings entry in database.' + ) + ); + } + + break; - // Determine if current user can add, edit, delete member data - $canEdit = current_user_can('glm_members_edit'); + } // Compile template data $templateData = array( - 'canEdit' => $canEdit + 'reason' => '', + 'settings' => $generalSettings, + 'timezones' => DateTimeZone::listIdentifiers() +// 'canEdit' => $canEdit ); // Return status, suggested view, and data to controller diff --git a/models/admin/settings/terms.php b/models/admin/settings/terms.php new file mode 100644 index 00000000..9db4ce66 --- /dev/null +++ b/models/admin/settings/terms.php @@ -0,0 +1,184 @@ + + * @license http://www.gaslightmedia.com Gaslightmedia + * @version 0.1 + */ + +// Load Members data abstract +require_once(GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/settings/dataSettingsTerms.php'); + +/* + * This class performs the work for the default action of the "Members" menu + * option, which is to display the members dashboard. + * + */ +class GlmMembersAdmin_settings_terms extends GlmDataSettingsTerms +{ + + /** + * 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) + { + // General settings are always stored in a record with ID=1. + $id = 1; + + // Determine if current user can edit configurations + if (!current_user_can('glm_members_configure')) { + 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 + $option = ''; + if (isset($_REQUEST['option']) && $_REQUEST['option'] == 'submit') { + $option = $_REQUEST['option']; + } + + switch($option) { + + // Update the settings and redisplay the form + case 'submit': + + // Update the general settings + $termsSettings = $this->updateEntry(1); + + // Display admin message that the data has been updated + glmMembersAdmin::addNotice('Terms Settings for the '.GLM_MEMBERS_PLUGIN_NAME.' plugin have been updated.', 'AdminNotice'); + + 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. + $termsSettings = $this->editEntry($id); + + // Check that we actually have the terms + if ($termsSettings === false) { + + if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) { + glmMembersAdmin::addNotice("/modesl/admin/settings/terms.php: Unable to load Terms Settings.", 'Alert'); + } + + return array( + 'status' => false, + 'menuItemRedirect' => 'error', + 'modelRedirect' => 'index', + 'view' => 'admin/error/index.html', + 'data' => array( + 'reason' => 'Unable to create terms settings entry in database.' + ) + ); + } + + break; + + } + + // Compile template data + $templateData = array( + 'reason' => '', + 'settings' => $termsSettings, +// 'canEdit' => $canEdit + ); + + // Return status, suggested view, and data to controller + return array( + 'status' => true, + 'menuItemRedirect' => false, + 'modelRedirect' => false, + 'view' => 'admin/settings/terms.html', + 'data' => $templateData + ); + + } + +} + +?> \ No newline at end of file diff --git a/views/admin/configure/accommodationTypes.html b/views/admin/configure/accommodationTypes.html index 8e78a956..0f1839db 100644 --- a/views/admin/configure/accommodationTypes.html +++ b/views/admin/configure/accommodationTypes.html @@ -28,7 +28,7 @@

    * Required

    Cancel - + diff --git a/views/admin/configure/amenities.html b/views/admin/configure/amenities.html index 4e765618..ea5088c0 100644 --- a/views/admin/configure/amenities.html +++ b/views/admin/configure/amenities.html @@ -43,7 +43,7 @@

    * Required

    Cancel - + diff --git a/views/admin/configure/categories.html b/views/admin/configure/categories.html index c816db0d..7ede7f0b 100644 --- a/views/admin/configure/categories.html +++ b/views/admin/configure/categories.html @@ -44,7 +44,7 @@

    * Required

    Cancel - + diff --git a/views/admin/configure/cities.html b/views/admin/configure/cities.html index 789f0361..892fca5e 100644 --- a/views/admin/configure/cities.html +++ b/views/admin/configure/cities.html @@ -45,7 +45,7 @@

    * Required

    Cancel - + diff --git a/views/admin/configure/index.html b/views/admin/configure/index.html index 0cbedb6d..b188b6d2 100644 --- a/views/admin/configure/index.html +++ b/views/admin/configure/index.html @@ -23,7 +23,7 @@

    * Required

    Cancel - + diff --git a/views/admin/configure/regions.html b/views/admin/configure/regions.html index c4cb6e85..0475d072 100644 --- a/views/admin/configure/regions.html +++ b/views/admin/configure/regions.html @@ -28,7 +28,7 @@

    * Required

    Cancel - + diff --git a/views/admin/dashboardWidget/index.html b/views/admin/dashboardWidget/index.html index 2b927590..953e5f60 100644 --- a/views/admin/dashboardWidget/index.html +++ b/views/admin/dashboardWidget/index.html @@ -20,18 +20,30 @@ Add {/if} -{if !$haveRegions} - - No Regions - Add - -{/if} {if !$haveAccommodationTypes} No Accommodation Types Add {/if} +{if !$haveAmenities} + + No Amenities + Add + +{/if} +{if !$haveCities} + + No Cities + Add + +{/if} +{if !$haveRegions} + + No Regions + Add + +{/if} {if $numbMembers == 0} No Members diff --git a/views/admin/member/memberInfo.html b/views/admin/member/memberInfo.html index de2d17b2..eaa60c0e 100644 --- a/views/admin/member/memberInfo.html +++ b/views/admin/member/memberInfo.html @@ -2,6 +2,10 @@ + + {if $haveMemberInfo}
    Archive this Member Information
    @@ -95,7 +99,8 @@ // 'media_buttons' => true, // 'quicktags' => false, 'wpautop' => false, - 'textarea_name' => 'descr', + 'textarea_name' => 'descr', + 'editor_height' => 200, // Height in px, overrides editor_rows // 'textarea_rows' => 8 )); @@ -359,11 +364,66 @@ {if $memberInfo.fieldFail.notes}

    {$memberInfo.fieldFail.notes}

    {/if} + + Image Gallery + + +
    +
    +
    + +
    Drag and drop new images here
    +
    HTML5 file drag-and-drop not supported by your browser.
    Use "Browse" button above to upload an image.
    +
    + +

    * Required

    + - + + + + + + + diff --git a/views/admin/members/index.html b/views/admin/members/index.html index 7279dd65..0e4a33d4 100644 --- a/views/admin/members/index.html +++ b/views/admin/members/index.html @@ -6,7 +6,7 @@ {if !$haveMemberTypes} You do not have any Member Types setup. - Click here to add Member Types. + Click here to add Member Types. {/if} {if !$haveCategories} @@ -15,19 +15,32 @@ Click here to add Member Categories. {/if} -{if !$haveRegions} +{if !$haveAccommodationTypes} - You do not have any Regions setup. - Click here to add Regions. + You do not have any Accommodation Types setup. + Click here to add Accommodation Types. {/if} -{if !$haveAccommodationTypes} +{if !$haveAmenities} + + You do not have any Amenities setup. + Click here to add Amenities. + +{/if} +{if !$haveCities} - You do not have any AccommodationTypes setup. - Click here to add AccommodationTypes. + You do not have any Cities setup. + Click here to add Cities. + +{/if} +{if !$haveRegions} + + You do not have any Regions setup. + Click here to add Regions. {/if} {if $numbMembers == 0} +   You do not have any members listed. Click here to create your first member. diff --git a/views/admin/settings/header.html b/views/admin/settings/header.html index a2ac3396..fdf136d4 100644 --- a/views/admin/settings/header.html +++ b/views/admin/settings/header.html @@ -4,6 +4,7 @@
    diff --git a/views/admin/settings/index.html b/views/admin/settings/index.html index 27995976..5e55233a 100644 --- a/views/admin/settings/index.html +++ b/views/admin/settings/index.html @@ -1,7 +1,296 @@ {include file='admin/settings/header.html'} -

    General Settings

    - -

    General settings go here.

    +

    *** Not using these settings yet! ***

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Debug Settings

    Admin Debug Information: + +
    Admin Debug Verbose: + +
    Front-End Debug Information: + +
    Front-End Debug Verbose: + +

    Misc. Settings

    Google Maps API Key: + + {if $settings.fieldFail.google_maps_api_key}

    {$settings.fieldFail.google_maps_api_key}

    {/if} +
    Optional: See Google Maps JAVAscript API V3 documentation for information. +
    Default Map Location: + +
    + + +
    Please enter values in decimal degrees. + {if $settings.fieldFail.maps_default_lat}

    {$settings.fieldFail.maps_default_lat}

    {/if} + {if $settings.fieldFail.maps_default_lon}

    {$settings.fieldFail.maps_default_lon}

    {/if} +
    Time Zone: + + {if $settings.fieldFail.time_zone}

    {$settings.fieldFail.time_zone}

    {/if} +

    Member List Page Options

    Show Map: + +
    Map Options: + + + + + + + + + + + + + + + + + + + + + + + + + +
    Show Member Name as Link to Detail:
    Show Logo:
    Logo Size: + +
    Show Description:
    Show Short Description:
    Show Address:
    Show Street:
    Show City, State, ZIP:
    Show Country:
    Show Region:
    Show Phone:
    Show Toll Free:
    Show URL: + + Display URL as a link: +
    Show Categories:
    Show Credit Cards:
    Show Amenitiies:
    +
    Show Search Form: + +
    Search Form Options: + + + + + + +
    Text Search:
    Category Search:
    Amenities Search:
    Show Alpha Index:
    +
    Show Member List: + +
    Member List Options + + + + + + + + + + + + + + + + + + + + + + + + + +
    Show Member Name as Link to Detail:
    Show Member Logo:
    Logo Size: + + {if $settings.fieldFail.list_logo_size}

    {$settings.fieldFail.list_logo_size}

    {/if} +
    Show Address:
    Address Options: + + + + +
    Show Street:
    Show City, State, ZIP:
    Show Country:
    +
    Show Region:
    Show Description:
    Show Short Description:
    Show Phone Number:
    Show Toll Free Phone Number:
    Show URL: + + Display URL as a link: +
    Show Categories:
    Show Credit Cards Accepted:
    Show Amenities:
    +

    Member Detail Page Options

    Show Map: + +
    Map Options: + + + + + + + + + + + + + + + + + + + + + + +
    Show Logo:
    Logo Size: + +
    Show Description:
    Show Short Description:
    Show Address:
    Show Street:
    Show City, State, ZIP:
    Show Country:
    Show Region:
    Show Phone:
    Show Toll Free:
    Show URL: + + Display URL as a link: +
    Show Categories:
    Show Credit Cards:
    Show Amenitiies:
    +
    Show Directions: + +
    Member Detail Options: + + + + + + + + + + + + + + + + + + + + + + + + +
    Show Member Logo:
    Logo Size: + + {if $settings.fieldFail.detail_logo_size}

    {$settings.fieldFail.detail_logo_size}

    {/if} +
    Show Address:
    Address Options: + + + + +
    Show Street:
    Show City, State, ZIP:
    Show Country:
    +
    Show Region:
    Show Description:
    Show Short Description:
    Show Phone Number:
    Show Toll Free Phone Number:
    Show URL: + + Display URL as a link: +
    Show Categories:
    Show Credit Cards Accepted:
    Show Amenities:
    +
    + +
    {include file='admin/footer.html'} diff --git a/views/admin/settings/terms.html b/views/admin/settings/terms.html new file mode 100644 index 00000000..5b239b0f --- /dev/null +++ b/views/admin/settings/terms.html @@ -0,0 +1,376 @@ +{include file='admin/settings/header.html'} + +

    *** Not using these settings yet! ***

    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Admin Menu and Tab Names

    Members Menu: + + {if $settings.fieldFail.term_admin_menu_members}

    {$settings.fieldFail.term_admin_menu_members}

    {/if} +
    Members Menu Tabs: + + + + + + + + + + + + + +
    Main Dashboard: + + {if $settings.fieldFail.term_admin_menu_members_dashboard}

    {$settings.fieldFail.term_admin_menu_members_dashboard}

    {/if} +
    Member List: + + {if $settings.fieldFail.term_admin_menu_members_list}

    {$settings.fieldFail.term_admin_menu_members_list}

    {/if} +
    Reports: + + {if $settings.fieldFail.term_admin_menu_members_reports}

    {$settings.fieldFail.term_admin_menu_members_reports}

    {/if} +
    +
    Member Menu: + + {if $settings.fieldFail.term_admin_menu_member}

    {$settings.fieldFail.term_admin_menu_member}

    {/if} +
    Member Menu Tabs: + + + + + + + + + + + + + + + + + + + + + + + + + +
    Member Dashboard: + + {if $settings.fieldFail.term_admin_menu_member_dashboard}

    {$settings.fieldFail.term_admin_menu_member_dashboard}

    {/if} +
    Member Info: + + {if $settings.fieldFail.term_admin_menu_member_info}

    {$settings.fieldFail.term_admin_menu_member_info}

    {/if} +
    Locations: + + {if $settings.fieldFail.term_admin_menu_member_locations}

    {$settings.fieldFail.term_admin_menu_member_locations}

    {/if} +
    Facilities: + + {if $settings.fieldFail.term_admin_menu_member_facilities}

    {$settings.fieldFail.term_admin_menu_member_facilities}

    {/if} +
    Attractions: + + {if $settings.fieldFail.term_admin_menu_member_attractions}

    {$settings.fieldFail.term_admin_menu_member_attractions}

    {/if} +
    Contacts: + + {if $settings.fieldFail.term_admin_menu_member_contacts}

    {$settings.fieldFail.term_admin_menu_member_contacts}

    {/if} +
    +
    Configure Menu: + + {if $settings.fieldFail.term_admin_menu_configure}

    {$settings.fieldFail.term_admin_menu_configure}

    {/if} +
    Configure Menu Tabs: + + + + + + + + + + + + + + + + + + + + + + + + + +
    Member Types: + + {if $settings.fieldFail.term_admin_menu_configure_member_types}

    {$settings.fieldFail.term_admin_menu_configure_member_types}

    {/if} +
    Member Categories: + + {if $settings.fieldFail.term_admin_menu_configure_member_cats}

    {$settings.fieldFail.term_admin_menu_configure_member_cats}

    {/if} +
    Accommodation Types: + + {if $settings.fieldFail.term_admin_menu_configure_accom_types}

    {$settings.fieldFail.term_admin_menu_configure_accom_types}

    {/if} +
    Amenities: + + {if $settings.fieldFail.term_admin_menu_configure_amenities}

    {$settings.fieldFail.term_admin_menu_configure_amenities}

    {/if} +
    Cities: + + {if $settings.fieldFail.term_admin_menu_configure_cities}

    {$settings.fieldFail.term_admin_menu_configure_cities}

    {/if} +
    Regions: + + {if $settings.fieldFail.term_admin_menu_configure_regions}

    {$settings.fieldFail.term_admin_menu_configure_regions}

    {/if} +
    +
    Settings Menu: + + {if $settings.fieldFail.term_admin_menu_settings}

    {$settings.fieldFail.term_admin_menu_settings}

    {/if} +
    Settings Menu Tabs: + + + + + + + + + + + + + +
    General Settings: + + {if $settings.fieldFail.term_admin_menu_settings_general}

    {$settings.fieldFail.term_admin_menu_settings_general}

    {/if} +
    Terms & Phrases: + + {if $settings.fieldFail.term_admin_menu_settings_terms}

    {$settings.fieldFail.term_admin_menu_settings_terms}

    {/if} +
    Development: + + {if $settings.fieldFail.term_admin_menu_settings_development}

    {$settings.fieldFail.term_admin_menu_settings_development}

    {/if} +
    +

    Terms

    Member: + + + + + + + + + + + + + + + + + +
    Normal: + + {if $settings.fieldFail.term_member}

    {$settings.fieldFail.term_member}

    {/if} +
    Capitalized: + + {if $settings.fieldFail.term_member_cap}

    {$settings.fieldFail.term_member_cap}

    {/if} +
    Plural: + + {if $settings.fieldFail.term_member_plur}

    {$settings.fieldFail.term_member_plur}

    {/if} +
    Plural Capitalized: + + {if $settings.fieldFail.term_member_plur_cap}

    {$settings.fieldFail.term_member_plur_cap}

    {/if} +
    +
    Location: + + + + + + + + + + + + + + + + + +
    Normal: + + {if $settings.fieldFail.term_location}

    {$settings.fieldFail.term_location}

    {/if} +
    Capitalized: + + {if $settings.fieldFail.term_location_cap}

    {$settings.fieldFail.term_location_cap}

    {/if} +
    Plural: + + {if $settings.fieldFail.term_location_plur}

    {$settings.fieldFail.term_location_plur}

    {/if} +
    Plural Capitalized: + + {if $settings.fieldFail.term_location_plur_cap}

    {$settings.fieldFail.term_location_plur_cap}

    {/if} +
    +
    Facility: + + + + + + + + + + + + + + + + + +
    Normal: + + {if $settings.fieldFail.term_facility}

    {$settings.fieldFail.term_facility}

    {/if} +
    Capitalized: + + {if $settings.fieldFail.term_facility_cap}

    {$settings.fieldFail.term_facility_cap}

    {/if} +
    Plural: + + {if $settings.fieldFail.term_facility_plur}

    {$settings.fieldFail.term_facility_plur}

    {/if} +
    Plural Capitalized: + + {if $settings.fieldFail.term_facility_plur_cap}

    {$settings.fieldFail.term_facility_plur_cap}

    {/if} +
    +
    Attraction: + + + + + + + + + + + + + + + + + +
    Normal: + + {if $settings.fieldFail.term_attraction}

    {$settings.fieldFail.term_attraction}

    {/if} +
    Capitalized: + + {if $settings.fieldFail.term_attraction_cap}

    {$settings.fieldFail.term_attraction_cap}

    {/if} +
    Plural: + + {if $settings.fieldFail.term_attraction_plur}

    {$settings.fieldFail.term_attraction_plur}

    {/if} +
    Plural Capitalized: + + {if $settings.fieldFail.term_attraction_plur_cap}

    {$settings.fieldFail.term_attraction_plur_cap}

    {/if} +
    +
    Contact: + + + + + + + + + + + + + + + + + +
    Normal: + + {if $settings.fieldFail.term_contact}

    {$settings.fieldFail.term_contact}

    {/if} +
    Capitalized: + + {if $settings.fieldFail.term_contact_cap}

    {$settings.fieldFail.term_contact_cap}

    {/if} +
    Plural: + + {if $settings.fieldFail.term_contact_plur}

    {$settings.fieldFail.term_contact_plur}

    {/if} +
    Plural Capitalized: + + {if $settings.fieldFail.term_contact_plur_cap}

    {$settings.fieldFail.term_contact_plur_cap}

    {/if} +
    +
    + +
    +{include file='admin/footer.html'} diff --git a/views/admin/settingsPage/index.html b/views/admin/settingsPage-ISTHISNEEDED/index.html similarity index 100% rename from views/admin/settingsPage/index.html rename to views/admin/settingsPage-ISTHISNEEDED/index.html -- 2.17.1