WP Google Maps - Version 6.0.22

Version Description

2014-07-25 = * Fixed incorrect warning about permissions when permissions where "2755" etc. * Add classes to the Google map store locator elements

Download this release

Release Info

Developer WPGMaps
Plugin Icon 128x128 WP Google Maps
Version 6.0.22
Comparing to
See all releases

Code changes from version 6.0.21 to 6.0.22

base/includes/wp-google-maps-polylines.php CHANGED
@@ -572,7 +572,7 @@ function wpgmza_b_return_polyline_list($map_id,$admin = true,$width = "100%") {
572
  foreach ($poly_array as $poly_single) {
573
  $poly_data .= $poly_single.",";
574
  }
575
- if (isset($result->polyname) && $result->polyname != "") { $poly_name = $result->polyname; } else { $poly_name = "Polygon".$result->id; }
576
 
577
  $wpgmza_tmp .= "
578
  <tr id=\"wpgmza_poly_tr_".$result->id."\">
572
  foreach ($poly_array as $poly_single) {
573
  $poly_data .= $poly_single.",";
574
  }
575
+ if (isset($result->polyname) && $result->polyname != "") { $poly_name = $result->polyname; } else { $poly_name = "Polyline".$result->id; }
576
 
577
  $wpgmza_tmp .= "
578
  <tr id=\"wpgmza_poly_tr_".$result->id."\">
css/wpgmza_style.css CHANGED
@@ -17,7 +17,6 @@
17
  box-shadow: none !important;
18
 
19
  }
20
-
21
  .gm-style div { margin-top:0 !important; }
22
 
23
  #wpgmaps_directions_edit {
@@ -189,3 +188,71 @@
189
  background-color: #FFFFE0;
190
  border-color: #E6DB55;
191
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  box-shadow: none !important;
18
 
19
  }
 
20
  .gm-style div { margin-top:0 !important; }
21
 
22
  #wpgmaps_directions_edit {
188
  background-color: #FFFFE0;
189
  border-color: #E6DB55;
190
  }
191
+
192
+
193
+ /* store locator styling */
194
+ .wpgmza_sl_main_div {
195
+ width:100%;
196
+ }
197
+ .wpgmza_sl_query_div {
198
+ height:30px;
199
+ display:block;
200
+ }
201
+ .wpgmza_sl_query_innerdiv1 {
202
+ float:left;
203
+ display:block;
204
+ width:150px;
205
+ }
206
+ .wpgmza_sl_query_innerdiv2 {
207
+ display:block;
208
+ float:left;
209
+ width:250px;
210
+ }
211
+
212
+ .wpgmza_sl_radius_div {
213
+ display:block;
214
+ height:30px;
215
+ margin-top:10px;
216
+ clear:both;
217
+ }
218
+ .wpgmza_sl_radius_innerdiv1 {
219
+ float:left;
220
+ display:block;
221
+ width:150px;
222
+ }
223
+ .wpgmza_sl_radius_innerdiv2 {
224
+ display:block;
225
+ float:left;
226
+ width:250px;
227
+ }
228
+
229
+ .wpgmza_sl_radius_select {
230
+
231
+ }
232
+ .wpgmza_sl_select_option {
233
+
234
+ }
235
+
236
+ .wpgmza_sl_category_div {
237
+ display:block;
238
+ clear:both;
239
+ height:auto;
240
+ overflow:auto;
241
+ margin-top:10px;
242
+ margin-bottom:10px;
243
+
244
+ }
245
+ .wpgmza_sl_category_innerdiv1 {
246
+ float:left;
247
+ display:block;
248
+ width:150px;
249
+ }
250
+ .wpgmza_sl_category_innerdiv2 {
251
+
252
+ float:left;
253
+
254
+ }
255
+
256
+ .wpgmza_sl_search_button {
257
+
258
+ }
readme.txt CHANGED
@@ -34,6 +34,7 @@ The [WP Google Maps Pro Version](http://www.wpgmaps.com/purchase-professional-ve
34
  * Add Polygons to your Map
35
  * Add Polylines / Routes to your map
36
  * Create a map in less than a 30 seconds!
 
37
  * No advertising or links
38
  * Google Maps Weather Layer
39
  * Google Maps Cloud Layer
@@ -113,15 +114,15 @@ Copy and paste the shortcode into your post or page and WP Google Maps will auto
113
  To add a marker to your Google map, scroll to below the map in your admin section and enter the address or GPS location in the Address input field. Click "Add Marker" and WP Google Maps will add your marker to the address you specified.
114
 
115
  = Setting up a Google Maps Store Locator =
116
- In order to make use of WP Google Maps' Store Locator functionality, simply click on the "Store Locator" tab in the map creation page and select "Yes"
117
 
118
 
119
 
120
  == Frequently Asked Questions ==
121
 
122
- = How do I get the professional edition? =
123
 
124
- Simply visit http://www.wpgmaps.com and purchase the WP Google Maps Professional Edition for $19.99
125
 
126
  = I've installed the plugin, now what? =
127
 
@@ -148,6 +149,10 @@ This is a must for users on IIS. Older WP Google Maps versions will not be compa
148
 
149
  == Changelog ==
150
 
 
 
 
 
151
  = 6.0.21 =
152
  * Backend UI improvement
153
  * You can now right click to add a marker to the map
34
  * Add Polygons to your Map
35
  * Add Polylines / Routes to your map
36
  * Create a map in less than a 30 seconds!
37
+ * Right click to add a marker to your Google map
38
  * No advertising or links
39
  * Google Maps Weather Layer
40
  * Google Maps Cloud Layer
114
  To add a marker to your Google map, scroll to below the map in your admin section and enter the address or GPS location in the Address input field. Click "Add Marker" and WP Google Maps will add your marker to the address you specified.
115
 
116
  = Setting up a Google Maps Store Locator =
117
+ In order to make use of WP Google Maps Store Locator functionality, simply click on the "Store Locator" tab in the map creation page and select "Yes"
118
 
119
 
120
 
121
  == Frequently Asked Questions ==
122
 
123
+ = How do I get WP Google Maps Pro? =
124
 
125
+ Simply visit http://www.wpgmaps.com and purchase the WP Google Maps Professional Edition for $19.99 once off. Free updates and support included forever.
126
 
127
  = I've installed the plugin, now what? =
128
 
149
 
150
  == Changelog ==
151
 
152
+ = 6.0.22 2014-07-25 =
153
+ * Fixed incorrect warning about permissions when permissions where "2755" etc.
154
+ * Add classes to the Google map store locator elements
155
+
156
  = 6.0.21 =
157
  * Backend UI improvement
158
  * You can now right click to add a marker to the map
wpGoogleMaps.php CHANGED
@@ -3,12 +3,16 @@
3
  Plugin Name: WP Google Maps
4
  Plugin URI: http://www.wpgmaps.com
5
  Description: The easiest to use Google Maps plugin! Create custom Google Maps with high quality markers containing locations, descriptions, images and links. Add your customized map to your WordPress posts and/or pages quickly and easily with the supplied shortcode. No fuss.
6
- Version: 6.0.21
7
  Author: WP Google Maps
8
  Author URI: http://www.wpgmaps.com
9
  */
10
 
11
- /* 6.0.21
 
 
 
 
12
  * Backend UI improvement
13
  * You can now right click to add a marker to the map
14
  * New markers can be dragged
@@ -63,8 +67,8 @@ $wpgmza_tblname_poly = $wpdb->prefix . "wpgmza_polygon";
63
  $wpgmza_tblname_polylines = $wpdb->prefix . "wpgmza_polylines";
64
  $wpgmza_tblname_categories = $wpdb->prefix. "wpgmza_categories";
65
  $wpgmza_tblname_category_maps = $wpdb->prefix. "wpgmza_category_maps";
66
- $wpgmza_version = "6.0.21";
67
- $wpgmza_p_version = "6.0.21";
68
  $wpgmza_t = "basic";
69
  define("WPGMAPS", $wpgmza_version);
70
  define("WPGMAPS_DIR",plugin_dir_url(__FILE__));
@@ -127,12 +131,12 @@ function wpgmaps_activate() {
127
  "map_title" => "My first map",
128
  "map_start_lat" => "51.5081290",
129
  "map_start_lng" => "-0.1280050",
130
- "map_width" => "600",
131
  "map_height" => "400",
132
- "map_width_type" => "px",
133
  "map_height_type" => "px",
134
  "map_start_location" => "51.5081290,-0.1280050",
135
- "map_start_zoom" => "1",
136
  "directions_enabled" => '1',
137
  "default_marker" => "0",
138
  "alignment" => "0",
@@ -920,9 +924,9 @@ function wpgmaps_admin_javascript_basic() {
920
  });
921
  marker.setDraggable(true);
922
  google.maps.event.addListener(marker, 'dragend', function(event) {
923
- jQuery("#wpgmza_add_address").val(event.latLng.lat()+','+event.latLng.lng());
924
  } );
925
- jQuery("#wpgmza_add_address").val(event.latLng.lat()+','+event.latLng.lng());
926
  jQuery("#wpgm_notice_message_save_marker").show();
927
  setTimeout(function() {
928
  jQuery("#wpgm_notice_message_save_marker").fadeOut('slow')
@@ -1976,40 +1980,40 @@ function wpgmaps_sl_user_output_basic($map_id) {
1976
 
1977
  $ret_msg = "";
1978
 
1979
- $ret_msg .= "<div>";
1980
- $ret_msg .= " <div style=\"display:block; width:".$map_width.$map_width_type."; height:30px;\">";
1981
- $ret_msg .= " <div style=\"display:block; float:left; width:150px;\">".$sl_query_string."</div>";
1982
- $ret_msg .= " <div style=\"display:block; float:left; width:250px;\"><input type=\"text\" id=\"addressInput\" size=\"20\"/></div>";
1983
  $ret_msg .= " </div>";
1984
 
1985
- $ret_msg .= " <div style=\"display:block; width:".$map_width.$map_width_type."; height:30px; margin-top:10px; clear:both;\">";
1986
- $ret_msg .= " <div style=\"display:block; float:left; width:150px;\">".__("Radius","wp-google-maps").":</div>";
1987
- $ret_msg .= " <div style=\"display:block; float:left; width:250px;\">";
1988
- $ret_msg .= " <select id=\"radiusSelect\">";
1989
  $ret_msg .= " ";
1990
 
1991
  if ($map_other_settings['store_locator_distance'] == 1) {
1992
- $ret_msg .= " <option value=\"1\">".__("1mi","wp-google-maps")."</option>";
1993
- $ret_msg .= " <option value=\"5\">".__("5mi","wp-google-maps")."</option>";
1994
- $ret_msg .= " <option value=\"10\" selected>".__("10mi","wp-google-maps")."</option>";
1995
- $ret_msg .= " <option value=\"25\">".__("25mi","wp-google-maps")."</option>";
1996
- $ret_msg .= " <option value=\"50\">".__("50mi","wp-google-maps")."</option>";
1997
- $ret_msg .= " <option value=\"75\">".__("75mi","wp-google-maps")."</option>";
1998
- $ret_msg .= " <option value=\"100\">".__("100mi","wp-google-maps")."</option>";
1999
- $ret_msg .= " <option value=\"150\">".__("150mi","wp-google-maps")."</option>";
2000
- $ret_msg .= " <option value=\"200\">".__("200mi","wp-google-maps")."</option>";
2001
- $ret_msg .= " <option value=\"300\">".__("300mi","wp-google-maps")."</option>";
2002
  } else {
2003
- $ret_msg .= " <option value=\"1\">".__("1km","wp-google-maps")."</option>";
2004
- $ret_msg .= " <option value=\"5\">".__("5km","wp-google-maps")."</option>";
2005
- $ret_msg .= " <option value=\"10\" selected>".__("10km","wp-google-maps")."</option>";
2006
- $ret_msg .= " <option value=\"25\">".__("25km","wp-google-maps")."</option>";
2007
- $ret_msg .= " <option value=\"50\">".__("50km","wp-google-maps")."</option>";
2008
- $ret_msg .= " <option value=\"75\">".__("75km","wp-google-maps")."</option>";
2009
- $ret_msg .= " <option value=\"100\">".__("100km","wp-google-maps")."</option>";
2010
- $ret_msg .= " <option value=\"150\">".__("150km","wp-google-maps")."</option>";
2011
- $ret_msg .= " <option value=\"200\">".__("200km","wp-google-maps")."</option>";
2012
- $ret_msg .= " <option value=\"300\">".__("300km","wp-google-maps")."</option>";
2013
  }
2014
 
2015
  $ret_msg .= " </select><input type='hidden' value='".$map_other_settings['store_locator_distance']."' name='wpgmza_distance_type' id='wpgmza_distance_type' style='display:none;' />";
@@ -2017,15 +2021,15 @@ function wpgmaps_sl_user_output_basic($map_id) {
2017
  $ret_msg .= " </div>";
2018
 
2019
  if (function_exists("wpgmza_register_pro_version") && isset($map_other_settings['store_locator_category']) && $map_other_settings['store_locator_category'] == "1") {
2020
- $ret_msg .= " <div style=\"display:block; width:".$map_width.$map_width_type."; clear:both; height:auto; overflow:auto; margin-top:10px; margin-bottom:10px; clear:both;\">";
2021
- $ret_msg .= " <div style=\"display:block; float:left; width:150px;\">".__("Category","wp-google-maps").":</div>";
2022
- $ret_msg .= " <div style=\"display:block; float:left; \">";
2023
  $ret_msg .= " ".wpgmza_pro_return_category_checkbox_list($map_id)."";
2024
  $ret_msg .= " </div>";
2025
  $ret_msg .= " </div>";
2026
  }
2027
 
2028
- $ret_msg .= " <input type=\"button\" onclick=\"searchLocations($map_id)\" value=\"".__("Search","wp-google-maps")."\"/>";
2029
  $ret_msg .= " </div>";
2030
  $ret_msg .= " <div><select id=\"locationSelect\" style=\"width:100%;visibility:hidden\"></select></div>";
2031
 
@@ -2040,6 +2044,7 @@ function wpgmaps_get_plugin_url() {
2040
  }
2041
 
2042
  function wpgmaps_head() {
 
2043
  global $wpgmza_tblname_maps;
2044
  global $wpgmza_version;
2045
 
@@ -2355,6 +2360,9 @@ function wpgmaps_head() {
2355
 
2356
  }
2357
  function wpgmaps_feedback_head() {
 
 
 
2358
 
2359
  if (isset($_POST['wpgmza_save_feedback'])) {
2360
 
@@ -4247,10 +4255,30 @@ function wpgmza_return_category_name($cid) {
4247
 
4248
  global $wpdb;
4249
  global $wpgmza_tblname_categories;
4250
- $results = $wpdb->get_results("SELECT * FROM `$wpgmza_tblname_categories` WHERE `id` = '$cid' LIMIT 1");
4251
- foreach ( $results as $result ) {
4252
- return $result->category_name;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4253
  }
 
4254
 
4255
 
4256
  }
@@ -4413,6 +4441,20 @@ function wpgmaps_handle_db() {
4413
  if ($founded>0) { $wpdb->query("ALTER TABLE $wpgmza_tblname CHANGE `desc` `description` MEDIUMTEXT"); }
4414
  // end check
4415
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4416
 
4417
 
4418
  $sql = "
@@ -4429,7 +4471,7 @@ function wpgmaps_handle_db() {
4429
  anim varchar(3) NOT NULL,
4430
  title varchar(700) NOT NULL,
4431
  infoopen varchar(3) NOT NULL,
4432
- category int(11) NOT NULL,
4433
  PRIMARY KEY (id)
4434
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
4435
  ";
@@ -4728,7 +4770,7 @@ function wpgmaps_marker_permission_check() {
4728
  $wpgmza_file_perms = substr(sprintf('%o', fileperms($marker_location)), -4);
4729
  $fpe = false;
4730
  $fpe_error = "";
4731
- if ($wpgmza_file_perms == "0777" || $wpgmza_file_perms == "0755" || $wpgmza_file_perms == "0775" || $wpgmza_file_perms == "0705") {
4732
  $fpe = true;
4733
  $fpe_error = "";
4734
  }
3
  Plugin Name: WP Google Maps
4
  Plugin URI: http://www.wpgmaps.com
5
  Description: The easiest to use Google Maps plugin! Create custom Google Maps with high quality markers containing locations, descriptions, images and links. Add your customized map to your WordPress posts and/or pages quickly and easily with the supplied shortcode. No fuss.
6
+ Version: 6.0.22
7
  Author: WP Google Maps
8
  Author URI: http://www.wpgmaps.com
9
  */
10
 
11
+ /* 6.0.22
12
+ * Fixed incorrect warning about permissions when permissions where "2755" etc.
13
+ * Add classes to the google map store locator elements
14
+ *
15
+ * 6.0.21
16
  * Backend UI improvement
17
  * You can now right click to add a marker to the map
18
  * New markers can be dragged
67
  $wpgmza_tblname_polylines = $wpdb->prefix . "wpgmza_polylines";
68
  $wpgmza_tblname_categories = $wpdb->prefix. "wpgmza_categories";
69
  $wpgmza_tblname_category_maps = $wpdb->prefix. "wpgmza_category_maps";
70
+ $wpgmza_version = "6.0.22";
71
+ $wpgmza_p_version = "6.0.22";
72
  $wpgmza_t = "basic";
73
  define("WPGMAPS", $wpgmza_version);
74
  define("WPGMAPS_DIR",plugin_dir_url(__FILE__));
131
  "map_title" => "My first map",
132
  "map_start_lat" => "51.5081290",
133
  "map_start_lng" => "-0.1280050",
134
+ "map_width" => "100",
135
  "map_height" => "400",
136
+ "map_width_type" => "%",
137
  "map_height_type" => "px",
138
  "map_start_location" => "51.5081290,-0.1280050",
139
+ "map_start_zoom" => "2",
140
  "directions_enabled" => '1',
141
  "default_marker" => "0",
142
  "alignment" => "0",
924
  });
925
  marker.setDraggable(true);
926
  google.maps.event.addListener(marker, 'dragend', function(event) {
927
+ jQuery("#wpgmza_add_address").val(event.latLng.lat()+', '+event.latLng.lng());
928
  } );
929
+ jQuery("#wpgmza_add_address").val(event.latLng.lat()+', '+event.latLng.lng());
930
  jQuery("#wpgm_notice_message_save_marker").show();
931
  setTimeout(function() {
932
  jQuery("#wpgm_notice_message_save_marker").fadeOut('slow')
1980
 
1981
  $ret_msg = "";
1982
 
1983
+ $ret_msg .= "<div class=\"wpgmza_sl_main_div\">";
1984
+ $ret_msg .= " <div class=\"wpgmza_sl_query_div\">";
1985
+ $ret_msg .= " <div class=\"wpgmza_sl_query_innerdiv1\">".$sl_query_string."</div>";
1986
+ $ret_msg .= " <div class=\"wpgmza_sl_query_innerdiv2\"><input type=\"text\" id=\"addressInput\" size=\"20\"/></div>";
1987
  $ret_msg .= " </div>";
1988
 
1989
+ $ret_msg .= " <div class=\"wpgmza_sl_radius_div\">";
1990
+ $ret_msg .= " <div class=\"wpgmza_sl_radius_innerdiv1\">".__("Radius","wp-google-maps").":</div>";
1991
+ $ret_msg .= " <div class=\"wpgmza_sl_radius_innerdiv2\">";
1992
+ $ret_msg .= " <select class=\"wpgmza_sl_radius_select\" id=\"radiusSelect\">";
1993
  $ret_msg .= " ";
1994
 
1995
  if ($map_other_settings['store_locator_distance'] == 1) {
1996
+ $ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"1\">".__("1mi","wp-google-maps")."</option>";
1997
+ $ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"5\">".__("5mi","wp-google-maps")."</option>";
1998
+ $ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"10\" selected>".__("10mi","wp-google-maps")."</option>";
1999
+ $ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"25\">".__("25mi","wp-google-maps")."</option>";
2000
+ $ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"50\">".__("50mi","wp-google-maps")."</option>";
2001
+ $ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"75\">".__("75mi","wp-google-maps")."</option>";
2002
+ $ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"100\">".__("100mi","wp-google-maps")."</option>";
2003
+ $ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"150\">".__("150mi","wp-google-maps")."</option>";
2004
+ $ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"200\">".__("200mi","wp-google-maps")."</option>";
2005
+ $ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"300\">".__("300mi","wp-google-maps")."</option>";
2006
  } else {
2007
+ $ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"1\">".__("1km","wp-google-maps")."</option>";
2008
+ $ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"5\">".__("5km","wp-google-maps")."</option>";
2009
+ $ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"10\" selected>".__("10km","wp-google-maps")."</option>";
2010
+ $ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"25\">".__("25km","wp-google-maps")."</option>";
2011
+ $ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"50\">".__("50km","wp-google-maps")."</option>";
2012
+ $ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"75\">".__("75km","wp-google-maps")."</option>";
2013
+ $ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"100\">".__("100km","wp-google-maps")."</option>";
2014
+ $ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"150\">".__("150km","wp-google-maps")."</option>";
2015
+ $ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"200\">".__("200km","wp-google-maps")."</option>";
2016
+ $ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"300\">".__("300km","wp-google-maps")."</option>";
2017
  }
2018
 
2019
  $ret_msg .= " </select><input type='hidden' value='".$map_other_settings['store_locator_distance']."' name='wpgmza_distance_type' id='wpgmza_distance_type' style='display:none;' />";
2021
  $ret_msg .= " </div>";
2022
 
2023
  if (function_exists("wpgmza_register_pro_version") && isset($map_other_settings['store_locator_category']) && $map_other_settings['store_locator_category'] == "1") {
2024
+ $ret_msg .= " <div class=\"wpgmza_sl_category_div\">";
2025
+ $ret_msg .= " <div class=\"wpgmza_sl_category_innerdiv1\">".__("Category","wp-google-maps").":</div>";
2026
+ $ret_msg .= " <div class=\"wpgmza_sl_category_innerdiv2\">";
2027
  $ret_msg .= " ".wpgmza_pro_return_category_checkbox_list($map_id)."";
2028
  $ret_msg .= " </div>";
2029
  $ret_msg .= " </div>";
2030
  }
2031
 
2032
+ $ret_msg .= " <input class=\"wpgmza_sl_search_button\" type=\"button\" onclick=\"searchLocations($map_id)\" value=\"".__("Search","wp-google-maps")."\"/>";
2033
  $ret_msg .= " </div>";
2034
  $ret_msg .= " <div><select id=\"locationSelect\" style=\"width:100%;visibility:hidden\"></select></div>";
2035
 
2044
  }
2045
 
2046
  function wpgmaps_head() {
2047
+
2048
  global $wpgmza_tblname_maps;
2049
  global $wpgmza_version;
2050
 
2360
 
2361
  }
2362
  function wpgmaps_feedback_head() {
2363
+
2364
+
2365
+
2366
 
2367
  if (isset($_POST['wpgmza_save_feedback'])) {
2368
 
4255
 
4256
  global $wpdb;
4257
  global $wpgmza_tblname_categories;
4258
+ $pos = strpos($cid, ",");
4259
+ if ($pos === false) {
4260
+ $results = $wpdb->get_results("SELECT * FROM `$wpgmza_tblname_categories` WHERE `id` = '$cid' LIMIT 1");
4261
+ foreach ( $results as $result ) {
4262
+ return $result->category_name;
4263
+ }
4264
+ } else {
4265
+ $categories = explode(",",$cid);
4266
+ $ret_cat = "";
4267
+ $tot_cnt = count($categories);
4268
+ $countr = 0;
4269
+ foreach ($categories as $cid) {
4270
+ $countr++;
4271
+ $results = $wpdb->get_results("SELECT * FROM `$wpgmza_tblname_categories` WHERE `id` = '$cid' LIMIT 1");
4272
+ foreach ( $results as $result ) {
4273
+ if ($countr >= $tot_cnt) {
4274
+ $ret_cat .= $result->category_name;
4275
+ } else { $ret_cat .= $result->category_name.","; }
4276
+ }
4277
+
4278
+ }
4279
+ return $ret_cat;
4280
  }
4281
+
4282
 
4283
 
4284
  }
4441
  if ($founded>0) { $wpdb->query("ALTER TABLE $wpgmza_tblname CHANGE `desc` `description` MEDIUMTEXT"); }
4442
  // end check
4443
 
4444
+
4445
+ /* check for older version of "category" and change to varchar instead of int */
4446
+ $results = $wpdb->get_results("DESC $wpgmza_tblname");
4447
+ $founded = 0;
4448
+ foreach ($results as $row ) {
4449
+
4450
+ if ($row->Field == "category") {
4451
+ if ($row->Type == "int(11)") {
4452
+ $founded++;
4453
+ }
4454
+ }
4455
+ }
4456
+ if ($founded>0) { $wpdb->query("ALTER TABLE $wpgmza_tblname CHANGE `category` `category` VARCHAR(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0'"); }
4457
+ // end check
4458
 
4459
 
4460
  $sql = "
4471
  anim varchar(3) NOT NULL,
4472
  title varchar(700) NOT NULL,
4473
  infoopen varchar(3) NOT NULL,
4474
+ category varchar(500) NOT NULL,
4475
  PRIMARY KEY (id)
4476
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
4477
  ";
4770
  $wpgmza_file_perms = substr(sprintf('%o', fileperms($marker_location)), -4);
4771
  $fpe = false;
4772
  $fpe_error = "";
4773
+ if ($wpgmza_file_perms == "0777" || $wpgmza_file_perms == "0755" || $wpgmza_file_perms == "0775" || $wpgmza_file_perms == "0705" || $wpgmza_file_perms == "2705" || $wpgmza_file_perms == "2775" || $wpgmza_file_perms == "2777" ) {
4774
  $fpe = true;
4775
  $fpe_error = "";
4776
  }