CVE-2015-10126 (published 2023-10-06T08:15Z)

A vulnerability classified as critical was found in Easy2Map Photos Plugin 1.0.1 on WordPress. This vulnerability affects unknown code. The manipulation leads to sql injection. The attack can be initiated remotely. Upgrading to version 1.1.0 is able to address this issue. The patch is identified as 503d9ee2482d27c065f78d9546f076a406189908. It is recommended to upgrade the affected component. VDB-241318 is the identifier assigned to this vulnerability.

CVSS v3 base score: 9.8, CRITICAL (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H)

Weakness information:
cwe_id: CWE-89
cwe_name: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
description: The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.
extended_description: 
            
            
         
         

Fix information:
repo_url: https://github.com/wp-plugins/easy2map-photos
commit_details: repo_url: https://github.com/wp-plugins/easy2map-photos
author: stevenellis
author_date: 2015-07-06 07:29:33+00:00
msg: tested up to v 4.2.2 and SQL vulnerability plugged

git-svn-id: https://plugins.svn.wordpress.org/easy2map-photos/trunk@1193098 b8457f37-d9ea-0310-8a92-e5e31aec5664
repository: repo_url: https://github.com/wp-plugins/easy2map-photos
repo_name: wp-plugins/easy2map-photos
description: WordPress.org Plugin Mirror
repo_language: JavaScript
owner: wp-plugins
file_changes: filename: mapadmin.css
change_type: ModificationType.MODIFY
diff: @@ -45,7 +45,7 @@ td .highlighted{
     -webkit-font-smoothing: antialiased;
 }
 
-#easy2mapslidertext {display:none;text-align:center;color:#FFFFFF;font-family:Arial, Helvetica, sans-serif;font-size:0.9em;position:absolute;width:100%;top:15px;font-weight:bold;z-index:999;border-color:transparent;border-radius:0px;border-style:solid;border-width:1px;text-shadow:#171717 0.1em 0.1em 0.1em;background-color:transparent;white-space:nowrap;}
+#easy2mapslidertext {display:none;text-align:center;position:absolute;width:100%;top:15px;z-index:999;border-color:transparent;border-radius:0px;border-style:solid;border-width:1px;text-shadow:#171717 0.1em 0.1em 0.1em;background-color:transparent;white-space:nowrap;}
 #easy2mapslider .easy2mapholder_cont {width: 100%; margin: 0 auto; overflow: hidden;  height:60px;}
 #easy2mapslider .easy2mapholder { vertical-align:middle; margin-left: 43px; margin-right: 37px; background-image: url("<?php echo easy2mapimg_get_plugin_url('/images/bg_grey.png') ?>"); background-repeat: repeat; }
 #easy2mapslider .easy2mapslide {cursor:pointer; vertical-align:middle; margin-top:auto;margin-bottom:auto;position: relative; margin-right: 8px; float:left; min-width: 60px; height: 60px;}

programming_language: CSS
filename: CSSEditHTML.html
change_type: ModificationType.MODIFY
diff: @@ -20,6 +20,47 @@
     </div>
 </div>
 
+<div id="div_edit_textalign" style="width:600px;" 
+     class="modal hide fade" tabindex="-1" 
+     role="dialog" aria-labelledby="winSettingsModalLabel" data-keyboard="true" aria-hidden="true">
+    <div class="modal-header">
+        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
+        <h3>Alter Style Value</h3>
+    </div>
+    <div class="modal-body" style="max-height: 300px">
+        <select class="Heading3" style="width:200px;height:28px" id="txtDefaultValue_textalign" name="txtDefaultValue_textalign">
+            <option value="left">Left</option>
+            <option value="center">Center</option> 
+            <option value="right">Right</option>
+        </select> 
+    </div>
+    <div class="modal-footer">
+        <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
+        <button class="btn btn-primary" data-dismiss="modal" onclick="easy2map_imgmap_functions.saveItemValue();" aria-hidden="true">Save changes</button>
+    </div>
+</div>
+
+<div id="div_edit_fontweight" style="width:600px;" 
+     class="modal hide fade" tabindex="-1" 
+     role="dialog" aria-labelledby="winSettingsModalLabel" data-keyboard="true" aria-hidden="true">
+    <div class="modal-header">
+        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
+        <h3>Alter Style Value</h3>
+    </div>
+    <div class="modal-body" style="max-height: 300px;font-w">
+        <select class="Heading3" style="width:200px;height:28px" id="txtDefaultValue_fontweight" name="txtDefaultValue_fontweight">
+            <option value="normal">Normal</option>
+            <option value="bold">Bold</option> 
+            <option value="bolder">Bolder</option>
+            <option value="lighter">Lighter</option>
+        </select> 
+    </div>
+    <div class="modal-footer">
+        <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
+        <button class="btn btn-primary" data-dismiss="modal" onclick="easy2map_imgmap_functions.saveItemValue();" aria-hidden="true">Save changes</button>
+    </div>
+</div>
+
 <div id="div_edit_pixel" style="width:600px" 
      class="modal hide fade" tabindex="-1" 
      role="dialog" aria-labelledby="winSettingsModalLabel" data-keyboard="true" aria-hidden="true">
@@ -89,6 +130,101 @@
     </div>
 </div>
 
+<div id="div_edit_em" style="width:600px" 
+     class="modal hide fade" tabindex="-1" 
+     role="dialog" aria-labelledby="winSettingsModalLabel" data-keyboard="true" aria-hidden="true">
+    <div class="modal-header">
+        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
+        <h3>Alter Style Value</h3>
+    </div>
+    <div class="modal-body" style="max-height: 300px">
+        <select class="Heading3" style="width:200px;height:28px" id="txtDefaultValue_em" name="txtDefaultValue_em">
+            <option value="0.1em">0.1em</option>
+            <option value="0.15em">0.15em</option>
+            <option value="0.2em">0.2em</option>
+            <option value="0.25em">0.25em</option>
+            <option value="0.3em">0.3em</option>
+            <option value="0.35em">0.35em</option>
+            <option value="0.4em">0.4em</option>
+            <option value="0.45em">0.45em</option>
+            <option value="0.5em">0.5em</option>
+            <option value="0.55em">0.55em</option>
+            <option value="0.6em">0.6em</option> 
+            <option value="0.65em">0.65em</option>
+            <option value="0.7em">0.7em</option>
+            <option value="0.75em">0.75em</option>
+            <option value="0.8em">0.8em</option>
+            <option value="0.85em">0.85em</option>
+            <option value="0.9em">0.9em</option>
+            <option value="0.95em">0.95em</option>
+            <option value="1.0em">1.0em</option>
+            <option value="1.05em">1.05em</option>
+            <option value="1.1em">1.1em</option>
+            <option value="1.15em">1.15em</option>
+            <option value="1.2em">1.2em</option>
+            <option value="1.25em">1.25em</option>
+            <option value="1.3em">1.3em</option>
+            <option value="1.35em">1.35em</option>
+            <option value="1.4em">1.4em</option>
+            <option value="1.45em">1.45em</option>
+            <option value="1.5em">1.5em</option>
+            <option value="1.55em">1.55em</option>
+            <option value="1.6em">1.6em</option> 
+            <option value="1.65em">1.65em</option>
+            <option value="1.7em">1.7em</option>
+            <option value="1.75em">1.75em</option>
+            <option value="1.8em">1.8em</option>
+            <option value="1.85em">1.85em</option>
+            <option value="1.9em">1.9em</option>
+            <option value="1.95em">1.95em</option>
+            <option value="2.0em">2.0em</option>
+            <option value="2.1em">2.1em</option>
+            <option value="2.2em">2.2em</option>
+            <option value="2.3em">2.3em</option>
+            <option value="2.4em">2.4em</option>
+            <option value="2.5em">2.5em</option>
+            <option value="2.6em">2.6em</option> 
+            <option value="2.7em">2.7em</option>
+            <option value="2.8em">2.8em</option>
+            <option value="2.9em">2.9em</option>
+            <option value="3.0em">3.0em</option>
+        </select> 
+    </div>
+    <div class="modal-footer">
+        <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
+        <button class="btn btn-primary" data-dismiss="modal" onclick="easy2map_imgmap_functions.saveItemValue();" aria-hidden="true">Save changes</button>
+    </div>
+</div>
+
+<div id="div_edit_fontfamily" style="width:600px" 
+     class="modal hide fade" tabindex="-1" 
+     role="dialog" aria-labelledby="winSettingsModalLabel" data-keyboard="true" aria-hidden="true">
+    <div class="modal-header">
+        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
+        <h3>Alter Style Value</h3>
+    </div>
+    <div class="modal-body" style="max-height: 300px">
+        <select class="Heading3" style="width:300px;height:28px" id="txtDefaultValue_fontfamily" name="txtDefaultValue_fontfamily">
+            <option value="Georgia, serif">Georgia, serif</option>
+            <option value='Palatino, serif'>Palatino, serif</option> 
+            <option value='Times, serif'>Times, serif</option>
+            <option value='Arial, Helvetica, sans-serif'>Arial, Helvetica, sans-serif</option>
+            <option value="Gadget, sans-serif">Gadget, sans-serif</option>
+            <option value="cursive, sans-serif">cursive, sans-serif</option>
+            <option value="Impact, Charcoal, sans-serif">Impact, Charcoal, sans-serif</option>
+            <option value="Tahoma, Geneva, sans-serif">Tahoma, Geneva, sans-serif</option>
+            <option value="Helvetica, sans-serif">Helvetica, sans-serif</option>
+            <option value="Verdana, Geneva, sans-serif">Verdana, Geneva, sans-serif</option>
+            <option value="Courier, monospace">Courier, monospace</option>
+            <option value="Monaco, monospace">Monaco, monospace</option>
+        </select> 
+    </div>
+    <div class="modal-footer">
+        <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
+        <button class="btn btn-primary" data-dismiss="modal" onclick="easy2map_imgmap_functions.saveItemValue();" aria-hidden="true">Save changes</button>
+    </div>
+</div>
+
 <div id="div_edit_style" style="width:600px" 
      class="modal hide fade" tabindex="-1" 
      role="dialog" aria-labelledby="winSettingsModalLabel" data-keyboard="true" aria-hidden="true">

programming_language: HTML
filename: Easy2MapImg.php
change_type: ModificationType.MODIFY
diff: @@ -5,10 +5,10 @@ class Easy2MapImg {
     const plugin_name = 'Easy2MapImg';
     const min_php_version = '5.0';
     const min_wp_version = '3.0';
-
     // Used to uniquely identify this plugin's menu page in the WP manager
     const admin_menu_slug = 'easy2mapimg';
 
+    //MERCURIAL COMMIT TEST 2
     /** Adds the necessary JavaScript and/or CSS to the pages to enable the Ajax search. */
     public static function head() {
 
@@ -193,7 +193,7 @@ class Easy2MapImg {
             VALUES
             ('Map On Bottom', '', 1,
             '<settings background-color=\"#FFFFFF\" border-style=\"solid\" border-width=\"1px\" border-color=\"#EBEBEB\" margin-left=\"auto\" margin-right=\"auto\" />',
-            '<settings width=\"520px\" height=\"390px\" border-style=\"solid\" border-radius=\"0px\" border-width=\"1px\" border-color=\"#faf9f9\" background-color=\"#faf9f9\" />',
+            '<settings font-weight=\"bold\" color=\"#FFFFFF\" font-size=\"0.9em\" font-family=\"Arial, Helvetica, sans-serif\" width=\"520px\" height=\"390px\" border-style=\"solid\" border-radius=\"0px\" border-width=\"1px\" border-color=\"#faf9f9\" background-color=\"#faf9f9\" />',
             '<settings height=\"120px\" border-radius=\"0px\" border-style=\"solid\" border-width=\"1px\" border-color=\"#faf9f9\" />',
             '<div style=\"margin:auto;\"><table cellpadding=\"1\" cellspacing=\"1\" id=\"divMapParent\"><tr><td><div align=\"center\" id=\"easy2mapmainimage\" style=\"text-align:center;border-bottom-width:0px;top:0px;left:0px;min-width:10px;margin-bottom:0px;margin-left:5px;margin-right:5px;margin-top:5px;position:relative;\"><div align=\"center\" id=\"easy2mapslidertext\"></div><a class=\"easy2maplogo\" id=\"easy2mapphotologo\" target=\"_blank\" href=\"http://easy2map.com\"><img src=\"[siteurl]images/e2mlogosmall.png\"></a><div id=\"easy2mapslider\"><a class=\"easy2mapbutton easy2mapprev\" href=\"#\" rel=\"nofollow\"><img src=\"[siteurl]images/prev.png\"></a><a class=\"easy2mapbutton easy2mapnext\" href=\"#\" rel=\"nofollow\"><img src=\"[siteurl]images/next.png\"></a><div class=\"easy2mapholder_cont\"><ul id=\"Easy2MapSliderParent\" class=\"easy2mapholder\"></ul></div><div class=\"easy2mapclear\"></div></div></div></td></tr><tr><td id=\"tdMap\" style=\"border-width:0px;vertical-align:top;\"><div id=\"divMap\" style=\"border-top-width:0px;top:0px;left:0px;min-width:10px;margin-bottom:5px;margin-left:5px;margin-right:5px;margin-top:5px;background-color:transparent;position:relative;\"></div></td></tr></table></div>', 1)";
 
@@ -215,7 +215,7 @@ class Easy2MapImg {
             VALUES
             ('Map On Top', '', 2,
             '<settings background-color=\"#FFFFFF\" border-style=\"solid\" border-width=\"1px\" border-color=\"#EBEBEB\" margin-left=\"auto\" margin-right=\"auto\" />',
-            '<settings width=\"520px\" height=\"390px\" border-style=\"solid\" border-radius=\"0px\" border-width=\"1px\" border-color=\"#faf9f9\" background-color=\"#faf9f9\" />',
+            '<settings font-weight=\"bold\" color=\"#FFFFFF\" font-size=\"0.9em\" font-family=\"Arial, Helvetica, sans-serif\" width=\"520px\" height=\"390px\" border-style=\"solid\" border-radius=\"0px\" border-width=\"1px\" border-color=\"#faf9f9\" background-color=\"#faf9f9\" />',
             '<settings height=\"120px\" border-radius=\"0px\" border-style=\"solid\" border-width=\"1px\" border-color=\"#faf9f9\" />',
             '<div style=\"margin:auto;\"><table cellpadding=\"1\" cellspacing=\"1\" id=\"divMapParent\"><tr><td id=\"tdMap\" style=\"border-width:0px;vertical-align:top;\"><div id=\"divMap\" style=\"background-color:transparent;border-style:solid;border-width:1px;border-bottom-width:0px;border-color:transparent;top:0px;left:0px;min-width:10px;margin-bottom:5px;margin-left:5px;margin-right:5px;margin-top:5px;position:relative;\"></div></td></tr><tr><td><div align=\"center\" id=\"easy2mapmainimage\" style=\"text-align:center;border-style:solid;border-width:1px;border-top-width:0px;border-color:#FFFFFF;background-color:#FFFFFF;top:0px;left:0px;min-width:10px;margin-bottom:5px;margin-left:5px;margin-right:5px;margin-top:0px;position:relative;\"><div align=\"center\" id=\"easy2mapslidertext\"></div><div id=\"easy2mapslider\"><a class=\"easy2mapbutton easy2mapprev\" href=\"#\" rel=\"nofollow\"><img src=\"[siteurl]images/prev.png\"></a><a class=\"easy2mapbutton easy2mapnext\" href=\"#\" rel=\"nofollow\"><img src=\"[siteurl]images/next.png\"></a><div class=\"easy2mapholder_cont\"><ul id=\"Easy2MapSliderParent\" class=\"easy2mapholder\"></ul></div><div class=\"easy2mapclear\"></div></div></div></td></tr></table></div>', 1)";
 
@@ -237,7 +237,7 @@ class Easy2MapImg {
             VALUES
             ('Map On Left', '', 3,
             '<settings background-color=\"#FFFFFF\" border-style=\"solid\" border-width=\"1px\" border-color=\"#EBEBEB\" margin-left=\"auto\" margin-right=\"auto\" />',
-            '<settings width=\"520px\" height=\"390px\" border-style=\"solid\" border-radius=\"0px\" border-width=\"1px\" border-color=\"#faf9f9\" background-color=\"#faf9f9\" />',
+            '<settings font-weight=\"bold\" color=\"#FFFFFF\" font-size=\"0.9em\" font-family=\"Arial, Helvetica, sans-serif\" width=\"520px\" height=\"390px\" border-style=\"solid\" border-radius=\"0px\" border-width=\"1px\" border-color=\"#faf9f9\" background-color=\"#faf9f9\" />',
             '<settings width=\"150px\" height=\"390px\" border-radius=\"0px\" border-style=\"solid\" border-width=\"1px\" border-color=\"#faf9f9\" />',
             '<div style=\"margin:auto;\"><table cellpadding=\"1\" cellspacing=\"1\" id=\"divMapParent\"><tr><td id=\"tdMap\" style=\"border-width:0px;vertical-align:top;\"><div id=\"divMap\" style=\"background-color:transparent;border-style:solid;border-width:1px;border-right-width:0px;border-color:transparent;top:0px;left:0px;min-width:10px;margin-bottom:5px;margin-left:5px;margin-right:0px;margin-top:5px;position:relative;\"></div></td><td style=\"width:100%;\"><div align=\"center\" id=\"easy2mapmainimage\" style=\"text-align:center;border-style:solid;border-width:1px;border-left-width:0px;border-color:#FFFFFF;background-color:#FFFFFF;top:0px;left:0px;min-width:10px;margin-bottom:5px;margin-left:5px;margin-right:5px;margin-top:5px;position:relative;\"><div align=\"center\" id=\"easy2mapslidertext\"></div><div id=\"easy2mapslider\"><a class=\"easy2mapbutton easy2mapprev\" href=\"#\" rel=\"nofollow\"><img src=\"[siteurl]images/prev.png\"></a><a class=\"easy2mapbutton easy2mapnext\" href=\"#\" rel=\"nofollow\"><img src=\"[siteurl]images/next.png\"></a><div class=\"easy2mapholder_cont\"><ul id=\"Easy2MapSliderParent\" class=\"easy2mapholder\"></ul></div><div class=\"easy2mapclear\"></div></div></div></td></tr></table></div>', 1)";
 
@@ -259,7 +259,7 @@ class Easy2MapImg {
             VALUES
             ('Map On Right', '', 4,
             '<settings background-color=\"#FFFFFF\" border-style=\"solid\" border-width=\"1px\" border-color=\"#EBEBEB\" margin-left=\"auto\" margin-right=\"auto\" />',
-            '<settings width=\"520px\" height=\"390px\" border-style=\"solid\" border-radius=\"0px\" border-width=\"1px\" border-color=\"#faf9f9\" background-color=\"#faf9f9\" />',
+            '<settings font-weight=\"bold\" color=\"#FFFFFF\" font-size=\"0.9em\" font-family=\"Arial, Helvetica, sans-serif\" width=\"520px\" height=\"390px\" border-style=\"solid\" border-radius=\"0px\" border-width=\"1px\" border-color=\"#faf9f9\" background-color=\"#faf9f9\" />',
             '<settings width=\"150px\" height=\"390px\" border-radius=\"0px\" border-style=\"solid\" border-width=\"1px\" border-color=\"#faf9f9\" />',
             '<div style=\"margin:auto;\"><table cellpadding=\"1\" cellspacing=\"1\" id=\"divMapParent\"><tr><td style=\"width:100%;\"><div align=\"center\" id=\"easy2mapmainimage\" style=\"text-align:center;border-style:solid;border-width:1px;border-right-width:0px;border-color:#FFFFFF;background-color:#FFFFFF;top:0px;left:0px;min-width:10px;margin-bottom:5px;margin-left:5px;margin-right:5px;margin-top:5px;position:relative;\"><div align=\"center\" id=\"easy2mapslidertext\"></div><div id=\"easy2mapslider\"><a class=\"easy2mapbutton easy2mapprev\" href=\"#\" rel=\"nofollow\"><img src=\"[siteurl]images/prev.png\"></a><a class=\"easy2mapbutton easy2mapnext\" href=\"#\" rel=\"nofollow\"><img src=\"[siteurl]images/next.png\"></a><div class=\"easy2mapholder_cont\"><ul id=\"Easy2MapSliderParent\" class=\"easy2mapholder\"></ul></div><div class=\"easy2mapclear\"></div></div></div></td><td id=\"tdMap\" style=\"border-width:0px;vertical-align:top;\"><div id=\"divMap\" style=\"background-color:transparent;border-style:solid;border-width:1px;border-left-width:0px;border-color:transparent;top:0px;left:0px;min-width:10px;margin-bottom:5px;margin-right:5px;margin-left:0px;margin-top:5px;position:relative;\"></div></td></tr></table></div>', 1)";
 
@@ -281,7 +281,7 @@ class Easy2MapImg {
             VALUES
             ('Map In Photo On Top Left - Style 1', '', 5,
             '<settings background-color=\"#FFFFFF\" border-style=\"solid\" border-width=\"1px\" border-color=\"#EBEBEB\" margin-left=\"auto\" margin-right=\"auto\" />',
-            '<settings width=\"520px\" height=\"390px\" border-style=\"solid\" border-radius=\"0px\" border-width=\"1px\" border-color=\"#faf9f9\" background-color=\"#faf9f9\" />',
+            '<settings font-weight=\"bold\" color=\"#FFFFFF\" font-size=\"0.9em\" font-family=\"Arial, Helvetica, sans-serif\" width=\"520px\" height=\"390px\" border-style=\"solid\" border-radius=\"0px\" border-width=\"1px\" border-color=\"#faf9f9\" background-color=\"#faf9f9\" />',
             '<settings box-shadow=\"none\" width=\"120px\" height=\"120px\" border-radius=\"0px\" border-style=\"solid\" border-width=\"1px\" border-color=\"#faf9f9\" margin-left=\"0px\" margin-top=\"0px\" />',
             '<div style=\"margin:auto;\"><table cellpadding=\"1\" cellspacing=\"1\" id=\"divMapParent\"><tr><td><div align=\"center\" id=\"easy2mapmainimage\" style=\"text-align:center;border-style:solid;border-width:1px;border-color:#FFFFFF;background-color:#FFFFFF;top:0px;left:0px;min-width:10px;margin-bottom:5px;margin-left:5px;margin-right:5px;margin-top:5px;position:relative;\"><div id=\"divMap\" style=\"position:absolute;background-color:transparent;border-style:solid;border-width:1px;border-color:transparent;top:0px;left:0px;min-width:10px;\"></div><div align=\"center\" id=\"easy2mapslidertext\"></div><div id=\"easy2mapslider\"><a class=\"easy2mapbutton easy2mapprev\" href=\"#\" rel=\"nofollow\"><img src=\"[siteurl]images/prev.png\"></a><a class=\"easy2mapbutton easy2mapnext\" href=\"#\" rel=\"nofollow\"><img src=\"[siteurl]images/next.png\"></a><div class=\"easy2mapholder_cont\"><ul id=\"Easy2MapSliderParent\" class=\"easy2mapholder\"></ul></div><div class=\"easy2mapclear\"></div></div></div></td></tr></table></div>', 1)";
 
@@ -303,7 +303,7 @@ class Easy2MapImg {
             VALUES
             ('Map In Photo On Top Right - Style 1', '', 6,
             '<settings background-color=\"#FFFFFF\" border-style=\"solid\" border-width=\"1px\" border-color=\"#EBEBEB\" margin-left=\"auto\" margin-right=\"auto\" />',
-            '<settings width=\"520px\" height=\"390px\" border-style=\"solid\" border-radius=\"0px\" border-width=\"1px\" border-color=\"#faf9f9\" background-color=\"#faf9f9\" />',
+            '<settings font-weight=\"bold\" color=\"#FFFFFF\" font-size=\"0.9em\" font-family=\"Arial, Helvetica, sans-serif\" width=\"520px\" height=\"390px\" border-style=\"solid\" border-radius=\"0px\" border-width=\"1px\" border-color=\"#faf9f9\" background-color=\"#faf9f9\" />',
             '<settings box-shadow=\"none\" width=\"120px\" height=\"120px\" border-radius=\"0px\" border-style=\"solid\" border-width=\"1px\" border-color=\"#faf9f9\" margin-right=\"0px\" margin-top=\"0px\" />',
             '<div style=\"margin:auto;\"><table cellpadding=\"1\" cellspacing=\"1\" id=\"divMapParent\"><tr><td><div align=\"center\" id=\"easy2mapmainimage\" style=\"text-align:center;border-style:solid;border-width:1px;border-color:#FFFFFF;background-color:#FFFFFF;top:0px;left:0px;min-width:10px;margin-bottom:5px;margin-left:5px;margin-right:5px;margin-top:5px;position:relative;\"><div id=\"divMap\" style=\"position:absolute;background-color:transparent;border-style:solid;border-width:1px;border-color:transparent;top:0px;right:0px;min-width:10px;\"></div><div align=\"center\" id=\"easy2mapslidertext\"></div><div id=\"easy2mapslider\"><a class=\"easy2mapbutton easy2mapprev\" href=\"#\" rel=\"nofollow\"><img src=\"[siteurl]images/prev.png\"></a><a class=\"easy2mapbutton easy2mapnext\" href=\"#\" rel=\"nofollow\"><img src=\"[siteurl]images/next.png\"></a><div class=\"easy2mapholder_cont\"><ul id=\"Easy2MapSliderParent\" class=\"easy2mapholder\"></ul></div><div class=\"easy2mapclear\"></div></div></div></td></tr></table></div>', 1)";
 
@@ -325,7 +325,7 @@ class Easy2MapImg {
             VALUES
             ('Map In Photo On Bottom Left - Style 1', '', 7,
             '<settings background-color=\"#FFFFFF\" border-style=\"solid\" border-width=\"1px\" border-color=\"#EBEBEB\" margin-left=\"auto\" margin-right=\"auto\" />',
-            '<settings width=\"520px\" height=\"390px\" border-style=\"solid\" border-radius=\"0px\" border-width=\"1px\" border-color=\"#faf9f9\" background-color=\"#faf9f9\" />',
+            '<settings font-weight=\"bold\" color=\"#FFFFFF\" font-size=\"0.9em\" font-family=\"Arial, Helvetica, sans-serif\" width=\"520px\" height=\"390px\" border-style=\"solid\" border-radius=\"0px\" border-width=\"1px\" border-color=\"#faf9f9\" background-color=\"#faf9f9\" />',
             '<settings box-shadow=\"none\" width=\"120px\" height=\"120px\" border-radius=\"0px\" border-style=\"solid\" border-width=\"1px\" border-color=\"#faf9f9\" margin-left=\"0px\" margin-bottom=\"0px\" />',
             '<div style=\"margin:auto;\"><table cellpadding=\"1\" cellspacing=\"1\" id=\"divMapParent\"><tr><td><div align=\"center\" id=\"easy2mapmainimage\" style=\"text-align:center;border-style:solid;border-width:1px;border-color:#FFFFFF;background-color:#FFFFFF;top:0px;left:0px;min-width:10px;margin-bottom:5px;margin-left:5px;margin-right:5px;margin-top:5px;position:relative;\"><div id=\"divMap\" style=\"position:absolute;background-color:transparent;border-style:solid;border-width:1px;border-color:transparent;bottom:0px;left:0px;min-width:10px;\"></div><div align=\"center\" id=\"easy2mapslidertext\"></div><div id=\"easy2mapslider\"><a class=\"easy2mapbutton easy2mapprev\" href=\"#\" rel=\"nofollow\"><img src=\"[siteurl]images/prev.png\"></a><a class=\"easy2mapbutton easy2mapnext\" href=\"#\" rel=\"nofollow\"><img src=\"[siteurl]images/next.png\"></a><div class=\"easy2mapholder_cont\"><ul id=\"Easy2MapSliderParent\" class=\"easy2mapholder\"></ul></div><div class=\"easy2mapclear\"></div></div></div></td></tr></table></div>', 1)";
 
@@ -347,7 +347,7 @@ class Easy2MapImg {
             VALUES
             ('Map In Photo On Bottom Right - Style 1', '', 8,
             '<settings background-color=\"#FFFFFF\" border-style=\"solid\" border-width=\"1px\" border-color=\"#EBEBEB\" margin-left=\"auto\" margin-right=\"auto\" />',
-            '<settings width=\"520px\" height=\"390px\" border-style=\"solid\" border-radius=\"0px\" border-width=\"1px\" border-color=\"#faf9f9\" background-color=\"#faf9f9\" />',
+            '<settings font-weight=\"bold\" color=\"#FFFFFF\" font-size=\"0.9em\" font-family=\"Arial, Helvetica, sans-serif\" width=\"520px\" height=\"390px\" border-style=\"solid\" border-radius=\"0px\" border-width=\"1px\" border-color=\"#faf9f9\" background-color=\"#faf9f9\" />',
             '<settings box-shadow=\"none\" width=\"120px\" height=\"120px\" border-radius=\"0px\" border-style=\"solid\" border-width=\"1px\" border-color=\"#faf9f9\" margin-right=\"0px\" margin-bottom=\"0px\" />',
             '<div style=\"margin:auto;\"><table cellpadding=\"1\" cellspacing=\"1\" id=\"divMapParent\"><tr><td><div align=\"center\" id=\"easy2mapmainimage\" style=\"text-align:center;border-style:solid;border-width:1px;border-color:#FFFFFF;background-color:#FFFFFF;top:0px;left:0px;min-width:10px;margin-bottom:5px;margin-left:5px;margin-right:5px;margin-top:5px;position:relative;\"><div id=\"divMap\" style=\"position:absolute;background-color:transparent;border-style:solid;border-width:1px;border-color:transparent;bottom:0px;right:0px;min-width:10px;\"></div><div align=\"center\" id=\"easy2mapslidertext\"></div><div id=\"easy2mapslider\"><a class=\"easy2mapbutton easy2mapprev\" href=\"#\" rel=\"nofollow\"><img src=\"[siteurl]images/prev.png\"></a><a class=\"easy2mapbutton easy2mapnext\" href=\"#\" rel=\"nofollow\"><img src=\"[siteurl]images/next.png\"></a><div class=\"easy2mapholder_cont\"><ul id=\"Easy2MapSliderParent\" class=\"easy2mapholder\"></ul></div><div class=\"easy2mapclear\"></div></div></div></td></tr></table></div>', 1)";
 
@@ -355,7 +355,7 @@ class Easy2MapImg {
                 echo sprintf($error, __("Could not add data to easy2map templates table.", 'easy2mapimg'));
                 return;
             }
-            
+
             $SQLInsert11 = "INSERT INTO `$map_templates_table`
             (`TemplateName`,
             `ExampleImage`,
@@ -369,7 +369,7 @@ class Easy2MapImg {
             VALUES
             ('Map In Photo On Top Left - Style 2', '', 9,
             '<settings margin-left=\"auto\" margin-right=\"auto\" />',
-            '<settings width=\"520px\" height=\"390px\" border-style=\"solid\" border-radius=\"0px\" border-width=\"1px\" border-color=\"#272727\" background-color=\"#faf9f9\" />',
+            '<settings font-weight=\"bold\" color=\"#FFFFFF\" font-size=\"0.9em\" font-family=\"Arial, Helvetica, sans-serif\" width=\"520px\" height=\"390px\" border-style=\"solid\" border-radius=\"0px\" border-width=\"1px\" border-color=\"#272727\" background-color=\"#faf9f9\" />',
             '<settings box-shadow=\"-4px -4px 2px #888888\" width=\"120px\" height=\"120px\" border-radius=\"0px\" border-style=\"solid\" border-width=\"1px\" border-color=\"#272727\" margin-left=\"-15px\" margin-top=\"-15px\" />',
             '<div style=\"margin:auto;\"><table cellpadding=\"1\" cellspacing=\"1\" id=\"divMapParent\"><tr><td><div align=\"center\" id=\"easy2mapmainimage\" style=\"text-align:center;border-style:solid;border-width:1px;border-color:transparent;background-color:#FFFFFF;top:0px;left:0px;min-width:10px;position:relative;\"><div id=\"divMap\" style=\"position:absolute;background-color:transparent;border-style:solid;border-width:1px;border-color:transparent;top:0px;left:0px;min-width:10px;\"></div><div align=\"center\" id=\"easy2mapslidertext\"></div><div id=\"easy2mapslider\"><a class=\"easy2mapbutton easy2mapprev\" href=\"#\" rel=\"nofollow\"><img src=\"[siteurl]images/prev.png\"></a><a class=\"easy2mapbutton easy2mapnext\" href=\"#\" rel=\"nofollow\"><img src=\"[siteurl]images/next.png\"></a><div class=\"easy2mapholder_cont\"><ul id=\"Easy2MapSliderParent\" class=\"easy2mapholder\"></ul></div><div class=\"easy2mapclear\"></div></div></div></td></tr></table></div>', 1)";
 
@@ -377,9 +377,9 @@ class Easy2MapImg {
                 echo sprintf($error, __("Could not add data to easy2map templates table.", 'easy2mapimg'));
                 return;
             }
-            
-            
-            
+
+
+
             $SQLInsert12 = "INSERT INTO `$map_templates_table`
             (`TemplateName`,
             `ExampleImage`,
@@ -393,7 +393,7 @@ class Easy2MapImg {
             VALUES
             ('Map In Photo On Top Right - Style 2', '', 10,
             '<settings margin-left=\"auto\" margin-right=\"auto\" />',
-            '<settings width=\"520px\" height=\"390px\" border-style=\"solid\" border-radius=\"0px\" border-width=\"1px\" border-color=\"#272727\" background-color=\"#faf9f9\" />',
+            '<settings font-weight=\"bold\" color=\"#FFFFFF\" font-size=\"0.9em\" font-family=\"Arial, Helvetica, sans-serif\" width=\"520px\" height=\"390px\" border-style=\"solid\" border-radius=\"0px\" border-width=\"1px\" border-color=\"#272727\" background-color=\"#faf9f9\" />',
             '<settings box-shadow=\"4px -4px 2px #888888\" width=\"120px\" height=\"120px\" border-radius=\"0px\" border-style=\"solid\" border-width=\"1px\" border-color=\"#272727\" margin-right=\"-15px\" margin-top=\"-15px\" />',
             '<div style=\"margin:auto;\"><table cellpadding=\"1\" cellspacing=\"1\" id=\"divMapParent\"><tr><td><div align=\"center\" id=\"easy2mapmainimage\" style=\"text-align:center;border-style:solid;border-width:1px;border-color:transparent;background-color:#FFFFFF;top:0px;left:0px;min-width:10px;position:relative;\"><div id=\"divMap\" style=\"position:absolute;background-color:transparent;border-style:solid;border-width:1px;border-color:transparent;top:0px;right:0px;min-width:10px;\"></div><div align=\"center\" id=\"easy2mapslidertext\"></div><div id=\"easy2mapslider\"><a class=\"easy2mapbutton easy2mapprev\" href=\"#\" rel=\"nofollow\"><img src=\"[siteurl]images/prev.png\"></a><a class=\"easy2mapbutton easy2mapnext\" href=\"#\" rel=\"nofollow\"><img src=\"[siteurl]images/next.png\"></a><div class=\"easy2mapholder_cont\"><ul id=\"Easy2MapSliderParent\" class=\"easy2mapholder\"></ul></div><div class=\"easy2mapclear\"></div></div></div></td></tr></table></div>', 1)";
 
@@ -401,7 +401,7 @@ class Easy2MapImg {
                 echo sprintf($error, __("Could not add data to easy2map templates table.", 'easy2mapimg'));
                 return;
             }
-            
+
             $SQLInsert13 = "INSERT INTO `$map_templates_table`
             (`TemplateName`,
             `ExampleImage`,
@@ -415,7 +415,7 @@ class Easy2MapImg {
             VALUES
             ('Map In Photo On Bottom Left - Style 2', '', 11,
             '<settings margin-left=\"auto\" margin-right=\"auto\" />',
-            '<settings width=\"520px\" height=\"390px\" border-style=\"solid\" border-radius=\"0px\" border-width=\"1px\" border-color=\"#272727\" background-color=\"#faf9f9\" />',
+            '<settings font-weight=\"bold\" color=\"#FFFFFF\" font-size=\"0.9em\" font-family=\"Arial, Helvetica, sans-serif\" width=\"520px\" height=\"390px\" border-style=\"solid\" border-radius=\"0px\" border-width=\"1px\" border-color=\"#272727\" background-color=\"#faf9f9\" />',
             '<settings box-shadow=\"-4px 4px 2px #888888\" width=\"120px\" height=\"120px\" border-radius=\"0px\" border-style=\"solid\" border-width=\"1px\" border-color=\"#272727\" margin-left=\"-15px\" margin-bottom=\"-15px\" />',
             '<div style=\"margin:auto;\"><table cellpadding=\"1\" cellspacing=\"1\" id=\"divMapParent\"><tr><td><div align=\"center\" id=\"easy2mapmainimage\" style=\"text-align:center;border-style:solid;border-width:1px;border-color:transparent;background-color:#FFFFFF;top:0px;left:0px;min-width:10px;position:relative;\"><div id=\"divMap\" style=\"position:absolute;background-color:transparent;border-style:solid;border-width:1px;border-color:transparent;bottom:0px;left:0px;min-width:10px;\"></div><div align=\"center\" id=\"easy2mapslidertext\"></div><div id=\"easy2mapslider\"><a class=\"easy2mapbutton easy2mapprev\" href=\"#\" rel=\"nofollow\"><img src=\"[siteurl]images/prev.png\"></a><a class=\"easy2mapbutton easy2mapnext\" href=\"#\" rel=\"nofollow\"><img src=\"[siteurl]images/next.png\"></a><div class=\"easy2mapholder_cont\"><ul id=\"Easy2MapSliderParent\" class=\"easy2mapholder\"></ul></div><div class=\"easy2mapclear\"></div></div></div></td></tr></table></div>', 1)";
 
@@ -423,7 +423,7 @@ class Easy2MapImg {
                 echo sprintf($error, __("Could not add data to easy2map templates table.", 'easy2mapimg'));
                 return;
             }
-            
+
             $SQLInsert14 = "INSERT INTO `$map_templates_table`
             (`TemplateName`,
             `ExampleImage`,
@@ -437,7 +437,7 @@ class Easy2MapImg {
             VALUES
             ('Map In Photo On Bottom Right - Style 2', '', 12,
             '<settings margin-left=\"auto\" margin-right=\"auto\" />',
-            '<settings width=\"520px\" height=\"390px\" border-style=\"solid\" border-radius=\"0px\" border-width=\"1px\" border-color=\"#272727\" background-color=\"#faf9f9\" />',
+            '<settings font-weight=\"bold\" color=\"#FFFFFF\" font-size=\"0.9em\" font-family=\"Arial, Helvetica, sans-serif\" width=\"520px\" height=\"390px\" border-style=\"solid\" border-radius=\"0px\" border-width=\"1px\" border-color=\"#272727\" background-color=\"#faf9f9\" />',
             '<settings box-shadow=\"4px 4px 2px #888888\" width=\"120px\" height=\"120px\" border-radius=\"0px\" border-style=\"solid\" border-width=\"1px\" border-color=\"#272727\" margin-right=\"-15px\" margin-bottom=\"-15px\" />',
             '<div style=\"margin:auto;\"><table cellpadding=\"1\" cellspacing=\"1\" id=\"divMapParent\"><tr><td><div align=\"center\" id=\"easy2mapmainimage\" style=\"text-align:center;border-style:solid;border-width:1px;border-color:transparent;background-color:#FFFFFF;top:0px;left:0px;min-width:10px;position:relative;\"><div id=\"divMap\" style=\"position:absolute;background-color:transparent;border-style:solid;border-width:1px;border-color:transparent;bottom:0px;right:0px;min-width:10px;\"></div><div align=\"center\" id=\"easy2mapslidertext\"></div><div id=\"easy2mapslider\"><a class=\"easy2mapbutton easy2mapprev\" href=\"#\" rel=\"nofollow\"><img src=\"[siteurl]images/prev.png\"></a><a class=\"easy2mapbutton easy2mapnext\" href=\"#\" rel=\"nofollow\"><img src=\"[siteurl]images/next.png\"></a><div class=\"easy2mapholder_cont\"><ul id=\"Easy2MapSliderParent\" class=\"easy2mapholder\"></ul></div><div class=\"easy2mapclear\"></div></div></div></td></tr></table></div>', 1)";
 
@@ -445,21 +445,18 @@ class Easy2MapImg {
                 echo sprintf($error, __("Could not add data to easy2map templates table.", 'easy2mapimg'));
                 return;
             }
-            
-             $SQLInsert15 = "UPDATE `$map_templates_table`
+
+            $SQLInsert15 = "UPDATE `$map_templates_table`
              SET `TemplateHTML` = '<div style=\"margin:auto;\"><table cellpadding=\"1\" cellspacing=\"1\" id=\"divMapParent\"><tr><td id=\"tdMap\" style=\"border-width:0px;vertical-align:top;\"><div id=\"divMap\" style=\"background-color:transparent;border-style:solid;border-width:1px;border-right-width:0px;border-color:transparent;top:0px;left:0px;min-width:10px;margin-bottom:5px;margin-left:5px;margin-right:0px;margin-top:5px;position:relative;\"></div></td><td style=\"width:100%;\"><div align=\"center\" id=\"easy2mapmainimage\" style=\"text-align:center;border-style:solid;border-width:1px;border-left-width:0px;border-color:#FFFFFF;background-color:#FFFFFF;top:0px;left:0px;min-width:10px;margin-bottom:5px;margin-left:5px;margin-right:5px;margin-top:5px;position:relative;\"><div align=\"center\" id=\"easy2mapslidertext\"></div><div id=\"easy2mapslider\"><a class=\"easy2mapbutton easy2mapprev\" href=\"#\" rel=\"nofollow\"><img src=\"[siteurl]images/prev.png\"></a><a class=\"easy2mapbutton easy2mapnext\" href=\"#\" rel=\"nofollow\"><img src=\"[siteurl]images/next.png\"></a><div class=\"easy2mapholder_cont\"><ul id=\"Easy2MapSliderParent\" class=\"easy2mapholder\"></ul></div><div class=\"easy2mapclear\"></div></div></div></td></tr></table></div>'
              WHERE `TemplateName` = 'Map On Left'";
-             
-             $wpdb->query($SQLInsert15);
-             
-             $SQLInsert16 = "UPDATE `$map_templates_table`
+
+            $wpdb->query($SQLInsert15);
+
+            $SQLInsert16 = "UPDATE `$map_templates_table`
              SET `TemplateHTML` = '<div style=\"margin:auto;\"><table cellpadding=\"1\" cellspacing=\"1\" id=\"divMapParent\"><tr><td style=\"width:100%;\"><div align=\"center\" id=\"easy2mapmainimage\" style=\"text-align:center;border-style:solid;border-width:1px;border-right-width:0px;border-color:#FFFFFF;background-color:#FFFFFF;top:0px;left:0px;min-width:10px;margin-bottom:5px;margin-left:5px;margin-right:5px;margin-top:5px;position:relative;\"><div align=\"center\" id=\"easy2mapslidertext\"></div><div id=\"easy2mapslider\"><a class=\"easy2mapbutton easy2mapprev\" href=\"#\" rel=\"nofollow\"><img src=\"[siteurl]images/prev.png\"></a><a class=\"easy2mapbutton easy2mapnext\" href=\"#\" rel=\"nofollow\"><img src=\"[siteurl]images/next.png\"></a><div class=\"easy2mapholder_cont\"><ul id=\"Easy2MapSliderParent\" class=\"easy2mapholder\"></ul></div><div class=\"easy2mapclear\"></div></div></div></td><td id=\"tdMap\" style=\"border-width:0px;vertical-align:top;\"><div id=\"divMap\" style=\"background-color:transparent;border-style:solid;border-width:1px;border-left-width:0px;border-color:transparent;top:0px;left:0px;min-width:10px;margin-bottom:5px;margin-right:5px;margin-left:0px;margin-top:5px;position:relative;\"></div></td></tr></table></div>'
              WHERE `TemplateName` = 'Map On Right'";
-             
-             $wpdb->query($SQLInsert16);
 
-            
-            
+            $wpdb->query($SQLInsert16);
         }
     }
 
@@ -507,13 +504,15 @@ class Easy2MapImg {
         } else if (isset($_GET["action"]) && strcasecmp($_GET["action"], "mappiniconsave") == 0 && isset($_GET["map_id"])) {
             include('MapPinIconSave.php');
         } else if (isset($_GET["action"]) && strcasecmp($_GET["action"], "copymapsettings") == 0 && isset($_GET["map_id"])) {
-            include('CopyMapSettings.php');    
+            include('CopyMapSettings.php');
         } else if (isset($_GET["action"]) && strcasecmp($_GET["action"], "mappinimageupload") == 0 && isset($_GET["map_id"])) {
             include('MapPinImageUpload.php');
         } else if (isset($_GET["action"]) && strcasecmp($_GET["action"], "mappreview") == 0 && isset($_GET["map_id"])) {
             include('MapPreview.php');
-        } else if (isset($_GET["action"]) && strcasecmp($_GET["action"], "activation") == 0) {
-            include('Validation.php');
+        } else if (isset($_GET["action"]) && strcasecmp($_GET["action"], "copymapsettings") == 0 && isset($_GET["map_id"])) {
+            include('CopyMapSettings.php');
+        } else if (isset($_GET["action"]) && strcasecmp($_GET["action"], "photoimport") == 0 && isset($_GET["map_id"])) {
+            include('ZipPhotoImport.php');
         } else {
             include('ImageMapManager.php');
         }
@@ -521,9 +520,10 @@ class Easy2MapImg {
 
     /** Validation fucntion */
     private static function easy2MapPhotoCodeValidator($code) {
-        
-        if (strlen($code) == "") $code = get_option('phe_171323_transient_17666766');
-        
+
+        if (strlen($code) == "")
+            $code = get_option('phe_171323_transient_17666766');
+
         //code validator
         $validation = true;
         $string = substr($code, 32, -32);

programming_language: PHP
filename: Functions.php
change_type: ModificationType.MODIFY
diff: @@ -45,7 +45,7 @@ if (!function_exists('easy2mapimg_e2m_img_e2m_img_save_map_polylines_callback'))
         $mapID = $_REQUEST["mapID"];
         $PolyLines = urldecode($_REQUEST['PolyLines']);
 
-        $wpdb->query(sprintf("UPDATE $mapsTable
+        $wpdb->query($wpdb->prepare("UPDATE $mapsTable
         SET PolyLines = '%s'
         WHERE ID = '%s';", $PolyLines, $mapID));
 
@@ -215,7 +215,7 @@ if (!function_exists('easy2mapimg_e2m_img_save_map')):
         if (intval($mapID) != 0) {
 
             //this is a map update
-            $wpdb->query(sprintf("
+            $wpdb->query($wpdb->prepare("
                 UPDATE $mapsTable
                 SET TemplateID = '%s',
                     MapName = '%s',
@@ -228,15 +228,15 @@ if (!function_exists('easy2mapimg_e2m_img_save_map')):
                 WHERE ID = %s;", 
                     $_REQUEST['mapTemplateName'], 
                     $_REQUEST['mapName'], 
-                    urldecode($_REQUEST['mapSettingsXML']), 
-                    urldecode($_REQUEST["parentCSSXML"]),
-                    urldecode($_REQUEST["photoCSSXML"]), 
-                    urldecode($_REQUEST["mapCSSXML"]), 
-                    urldecode($_REQUEST["mapHTML"]), $mapID));
+                    stripcslashes(urldecode($_REQUEST['mapSettingsXML'])), 
+                    stripcslashes(urldecode($_REQUEST["parentCSSXML"])),
+                    stripcslashes(urldecode($_REQUEST["photoCSSXML"])), 
+                    stripcslashes(urldecode($_REQUEST["mapCSSXML"])), 
+                    stripcslashes(urldecode($_REQUEST["mapHTML"])), $mapID));
         } else {
 
             //this is a map insert
-            if (!$wpdb->query(sprintf("
+            if (!$wpdb->query($wpdb->prepare("
             INSERT INTO $mapsTable(
                 TemplateID,
                 MapName,
@@ -253,12 +253,12 @@ if (!function_exists('easy2mapimg_e2m_img_save_map')):
                     $_REQUEST['mapTemplateName'], 
                     $_REQUEST['mapName'], 
                     str_replace('index.php', '', easy2mapimg_get_plugin_url('/index.php')) . "images/map_pins/pins/111.png",
-                    urldecode($_REQUEST['mapSettingsXML']), 
+                    stripcslashes(urldecode($_REQUEST['mapSettingsXML'])), 
                     getdate(), '', 
-                    urldecode($_REQUEST["parentCSSXML"]), 
-                    urldecode($_REQUEST["photoCSSXML"]), 
-                    urldecode($_REQUEST["mapCSSXML"]), 
-                    urldecode($_REQUEST["mapHTML"])))) {
+                    stripcslashes(urldecode($_REQUEST["parentCSSXML"])), 
+                    stripcslashes(urldecode($_REQUEST["photoCSSXML"])), 
+                    stripcslashes(urldecode($_REQUEST["mapCSSXML"])), 
+                    stripcslashes(urldecode($_REQUEST["mapHTML"]))))) {
                 die("Error!");
             }
 
@@ -328,7 +328,7 @@ if (!function_exists('easy2mapimg_e2m_img_save_map_name')):
         $mapID = $_REQUEST["mapID"];
         $mapsTable = $wpdb->prefix . "easy2mapimg_maps";
         
-        $wpdb->query(sprintf("
+        $wpdb->query($wpdb->prepare("
             UPDATE $mapsTable
             SET MapName = '%s'
             IsActive = 1

programming_language: PHP
filename: ImageFunctions.php
change_type: ModificationType.MODIFY
diff: @@ -115,4 +115,72 @@ function getExtension($str) {
     return $ext;
 }
 
+function extractLocationFromImageExif($uploadedFile) {
+
+    $arrImage = array();
+    $arrResult = array(0, 0);
+    $lat = 0;
+    $lng = 0;
+
+    try {
+
+        if (extension_loaded('exif')) {
+            $arrImage = exif_read_data($uploadedFile, 0, true);
+        }
+
+        if (isset($arrImage['GPS'])) {
+
+            $GPS = $arrImage['GPS'];
+
+            if (isset($GPS['GPSLatitudeRef']) && isset($GPS['GPSLatitude'])) {
+
+                //LATITUDE
+                $LatitudeRef = $GPS['GPSLatitudeRef'];
+                $Latitude = $GPS['GPSLatitude'];
+
+                $arrLatDegrees = explode("/", $Latitude[0]);
+                $arrLatMinutes = explode("/", $Latitude[1]);
+                $arrLatSeconds = explode("/", $Latitude[2]);
+
+                $latDegrees = floatval($arrLatDegrees[0] / $arrLatDegrees[1]);
+                $latMinutes = floatval($arrLatMinutes[0] / $arrLatMinutes[1]);
+                $latSeconds = floatval($arrLatSeconds[0] / $arrLatSeconds[1]);
+
+                //LONGITUDE
+                $LongitudeRef = $GPS['GPSLongitudeRef'];
+                $Longitude = $GPS['GPSLongitude'];
+
+                $arrLngDegrees = explode("/", $Longitude[0]);
+                $arrLngMinutes = explode("/", $Longitude[1]);
+                $arrLngSeconds = explode("/", $Longitude[2]);
+
+                $lngDegrees = floatval($arrLngDegrees[0] / $arrLngDegrees[1]);
+                $lngMinutes = floatval($arrLngMinutes[0] / $arrLngMinutes[1]);
+                $lngSeconds = floatval($arrLngSeconds[0] / $arrLngSeconds[1]);
+
+                $lat = DMStoDEC($latDegrees, $latMinutes, $latSeconds);
+                if (strcasecmp($LatitudeRef, "S") === 0)
+                    $lat = -1 * $lat;
+
+                $lng = DMStoDEC($lngDegrees, $lngMinutes, $lngSeconds);
+                if (strcasecmp($LongitudeRef, "W") === 0)
+                    $lng = -1 * $lng;
+            }
+        }
+    } catch (Exception $e) {
+        
+    }
+
+    $arrResult = array($lat, $lng);
+    return $arrResult;
+}
+
+function DMStoDEC($deg, $min, $sec) {
+
+// Converts DMS ( Degrees / minutes / seconds ) 
+// to decimal format longitude / latitude
+
+    return $deg + ((($min * 60) + ($sec)) / 3600);
+}
+
 ?>
\ No newline at end of file

programming_language: PHP
filename: MapAdmin.php
change_type: ModificationType.MODIFY
diff: @@ -57,7 +57,7 @@ $mapID = $_REQUEST["map_id"];
             "image": false, //Button to insert an image. Default true,
             "color": true //Button to change color of font  
         });
-        
+
         jQuery('.fileupload').fileupload();
         notBusy();
 
@@ -185,9 +185,9 @@ $mapID = $_REQUEST["map_id"];
                                class="input-large" style="display:none;width:300px;margin-bottom:-6px" />
 
                         <!---<?php if (!isset($_REQUEST["no_back"])) { ?>
-                                                                                                        <button onclick="window.location='?page=easy2mapimg&action=viewMaps'" type="button" 
-                                                                                                                style="margin-left:30px;width:100px;" 
-                                                                                                                class="btn">Back</button> 
+                                                                                                                <button onclick="window.location='?page=easy2mapimg&action=viewMaps'" type="button" 
+                                                                                                                        style="margin-left:30px;width:100px;" 
+                                                                                                                        class="btn">Back</button> 
                         <?php } ?>--->
 
                 </td>
@@ -260,6 +260,15 @@ $mapID = $_REQUEST["map_id"];
                                     <tr id="pinImageParent" style="display:none;"><td align="center" style="text-align:center" colspan="2">
                                             <img id="pinImagePreview">
                                         </td></tr>
+                                    
+                                    
+                                    <tr id="zipUpload" style="display:none;"><td align="center" style="text-align:center" colspan="2">
+                                        
+                                        
+                                        <h5><a href="#" onclick="document.formPhotoImport.photoSize.value=document.formAddPinImage.photoSize.value;jQuery('#mapZipImport').modal();">Upload  Zip File of Geotagged Images</a></h5>
+                                        
+                                        
+                                    </tr>
 
                                 <!---<tr id="pinNameParent" style="display:none;"><td colspan="2">
 
@@ -358,7 +367,7 @@ $mapID = $_REQUEST["map_id"];
       action="?page=easy2mapimg&action=copymapsettings&map_id=<?php echo $mapID; ?>"
       method="post">
     <input type="hidden" name="CopyMapID" id="CopyMapID">
-</form>                    
+</form>
 
 <form name="formAddPinIcon" 
       target="frameAddPinIcon" 
@@ -434,6 +443,121 @@ $mapID = $_REQUEST["map_id"];
     </div>
 </div>
 
+<form name="formPhotoImport" 
+      enctype="multipart/form-data"
+      target="frameAddPinIcon" 
+      id="formPhotoImport"
+      onsubmit="return easy2map_imgmappin_functions.uploadZippedFile();"
+      action="?page=easy2mapimg&action=photoimport&map_id=<?php echo $mapID; ?>"
+      method="post">
+    
+    
+
+    <div id="mapZipImport" style="width:600px" 
+         class="modal hide fade" tabindex="-1" 
+         role="dialog" aria-labelledby="winSettingsModalLabel" data-keyboard="true" aria-hidden="true">
+        <div class="modal-header">
+            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
+            <h3>Upload Zip File of Geotagged Images</h3>
+        </div>
+        <div class="modal-body" style="max-height: 400px">
+
+            <input type="hidden" name="photoSize" value="<?php echo $_REQUEST["photoSize"]; ?>" />
+
+            <table style="background-color:#EBEBEB;width:60%;margin-left:auto;margin-right:auto;margin-top:10px;" cellspacing="3" cellpadding="3" class="table table-bordered">
+                <tr>
+                    <td class="instructions"><h5>Note: only geotagged images will be uploaded</h5>
+                    </td>
+                </tr>
+
+                <tr><td align="center" style="text-align:center">
+
+                        <h5><input type='file' name='zipfile' 
+                                   id='zipfile' 
+                                   size='30' style="width:300px;vertical-align:middle;"
+                                   acceptedFileList='ZIP'
+                                   accept='zip/*'></h5>
+                        <h6><i>(Only Valid ZIP Files Accepted)</i></h6>
+                    </td></tr>
+            </table>
+
+        </div>
+        <div class="modal-footer">
+            <button class="btn btn-primary" data-dismiss="modal" 
+                    onclick="document.formPhotoImport.submit();"
+                    aria-hidden="true">Upload Zip File</button>
+
+        </div>
+    </div>
+
+</form>
+
+
+
+
+
+
+<form name="formAddPinIcon" 
+      target="frameAddPinIcon" 
+      enctype="multipart/form-data" 
+      id="formAddPinIcon"
+      action="?page=easy2mapimg&action=mappiniconsave&map_id=<?php echo $mapID; ?>"
+      method="post">
+
+    <div id="mapPinIconList" style="width:600px" 
+         class="modal hide fade" tabindex="-1" 
+         role="dialog" aria-labelledby="winSettingsModalLabel" data-keyboard="true" aria-hidden="true">
+        <div class="modal-header">
+            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
+            <h3>My map icons</h3>
+        </div>
+        <div class="modal-body" style="max-height: 400px">
+            <h5>                
+                <?php if (self::easy2MapPhotoCodeValidator('') === false) { ?>
+                    <i>(Please upgrade to the Pro Version to upload your own custom icons)</i>
+                    <br><br>
+                <?php } else { ?>  
+                    Upload own icon: 
+                    <input type='file' name='pinicon' 
+                           id='pinicon' 
+                           size='30' style="width:300px;vertical-align:middle;"
+                           acceptedFileList='JPG;JPEG;PJPEG;GIF;PNG;X-PNG'
+                           accept='image/*'></h5>
+                <h6><i>Valid image files accepted (.jpg, .png, .gif) with a maximum file size of 5MB.</i></h6>
+            <?php } ?>
+            <table style="width:96%" 
+                   cellpadding="4" 
+                   cellspacing="4" id="tblPinImages"></table>
+        </div>
+        <div class="modal-footer">
+            <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
+            <?php if (self::easy2MapPhotoCodeValidator('') === true) { ?><button class="btn btn-primary" data-dismiss="modal" onclick="easy2map_imgmappin_functions.uploadPinIcon()" aria-hidden="true">Upload Icon</button><?php } ?>
+        </div>
+    </div> 
+
+</form>
+                    
+<form name="formRefresh" 
+      id="formRefresh"
+      action="?page=easy2mapimg&action=edit&map_id=<?php echo $mapID; ?>"
+      method="post">                    
+<div id="popupModalZipImport" class="modal fade">
+        <div class="modal-dialog">
+            <div class="modal-content">
+                <div class="modal-header">
+                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
+                    <h4 class="modal-title">Zip File Upload Result</h4>
+                </div>
+                <div class="modal-body">
+                    <p style="font-size:1.5em;font-weight:bold;" id="resultMessage"></p>
+                </div>
+                <div class="modal-footer">
+                    <button type="button" onclick="document.formRefresh.submit();" class="btn btn-default" data-dismiss="modal">Close</button>
+                </div>
+            </div><!-- /.modal-content -->
+        </div><!-- /.modal-dialog -->
+    </div><!-- /.modal -->
+</form>
 
 <iframe name="frameAddPinIcon" 
         id="frameAddPinIcon" 

programming_language: PHP
filename: MapPinImageUpload.php
change_type: ModificationType.MODIFY
diff: @@ -3,6 +3,8 @@ include 'ImageFunctions.php';
 
 $imagesDirectory = WP_CONTENT_DIR . "/uploads/easy2map/images/pin_content/" . $_GET["map_id"] . "/";
 
+var_dump($_REQUEST);
+
 if (is_uploaded_file($_FILES["pinimage"]['tmp_name'])) {
 
     if (!file_exists($imagesDirectory)) {
@@ -15,53 +17,16 @@ if (is_uploaded_file($_FILES["pinimage"]['tmp_name'])) {
     $extension = strtolower(getExtension($imageName));
 
     list($width, $height, $type, $attr) = getimagesize($uploadedFile);
-    
-    $arrImage = array();
-    if (extension_loaded('exif')) {
-        $arrImage = exif_read_data($uploadedFile, 0, true);
-    }
-    
+    $arrLatLng = extractLocationFromImageExif($uploadedFile);
     $lat = 0;
     $lng = 0;
     
-    if (isset($arrImage['GPS'])){
-    
-        $GPS = $arrImage['GPS'];
-        
-        if (isset($GPS['GPSLatitudeRef']) && isset($GPS['GPSLatitude'])){
-
-            //LATITUDE
-            $LatitudeRef = $GPS['GPSLatitudeRef'];
-            $Latitude = $GPS['GPSLatitude'];
-            
-            $arrLatDegrees = explode("/", $Latitude[0]);
-            $arrLatMinutes = explode("/", $Latitude[1]);
-            $arrLatSeconds = explode("/", $Latitude[2]);
-            
-            $latDegrees = floatval($arrLatDegrees[0] / $arrLatDegrees[1]);
-            $latMinutes = floatval($arrLatMinutes[0] / $arrLatMinutes[1]);
-            $latSeconds = floatval($arrLatSeconds[0] / $arrLatSeconds[1]);
-            
-            echo $latDegrees . '|' . $latMinutes . '|' . $latSeconds . '|';
-
-            //LONGITUDE
-            $LongitudeRef = $GPS['GPSLongitudeRef'];
-            $Longitude = $GPS['GPSLongitude'];
-            
-            $arrLngDegrees = explode("/", $Longitude[0]);
-            $arrLngMinutes = explode("/", $Longitude[1]);
-            $arrLngSeconds = explode("/", $Longitude[2]);
-            
-            $lngDegrees = floatval($arrLngDegrees[0] / $arrLngDegrees[1]);
-            $lngMinutes = floatval($arrLngMinutes[0] / $arrLngMinutes[1]);
-            $lngSeconds = floatval($arrLngSeconds[0] / $arrLngSeconds[1]);
-
-            $lat = DMStoDEC($latDegrees,$latMinutes,$latSeconds);
-            if (strcasecmp($LatitudeRef, "S") === 0) $lat = -1 * $lat;
-
-            $lng = DMStoDEC($lngDegrees,$lngMinutes,$lngSeconds);
-            if (strcasecmp($LongitudeRef, "W") === 0) $lng = -1 * $lng;
-        }
+    if (is_array($arrLatLng) && count($arrLatLng) == 2
+            && is_numeric($arrLatLng[0])
+            && is_numeric($arrLatLng[1]))
+    {
+        $lat = $arrLatLng[0];
+        $lng = $arrLatLng[1];
     }
     
     echo $lat . '<br>' . $lng;
@@ -83,14 +48,7 @@ if (is_uploaded_file($_FILES["pinimage"]['tmp_name'])) {
     }
 }
 
-function DMStoDEC($deg,$min,$sec)
-{
-
-// Converts DMS ( Degrees / minutes / seconds ) 
-// to decimal format longitude / latitude
 
-    return $deg+((($min*60)+($sec))/3600);
-} 
 
 ?>
 

programming_language: PHP
filename: SettingsEdit.php
change_type: ModificationType.MODIFY
diff: @@ -38,4 +38,5 @@ if (isset($activeMaps) && count($activeMaps) > 0) {
     }
     echo '</select></td></tr><tr><td style="text-align:center"><button onclick="easy2map_imgmap_functions.copyMapSettings()" class="btn" data-dismiss="modal" aria-hidden="true">Copy Map Settings</button></td></tr></table>';
 }
+   
 ?>
\ No newline at end of file

programming_language: PHP
filename: index.php
change_type: ModificationType.MODIFY
diff: @@ -5,7 +5,7 @@
   URI: http://easy2map.com/ 
   Description: The easiest tool available for creating geo-tagged photo galleries. Display photos & their geographic location in a great-looking slider gallery.
   Author: Steven Ellis 
-  Version: 1.0.9 
+  Version: 1.1.0 
   Author URI: http://easy2map.com/ 
  */
 

programming_language: PHP
filename: readme.txt
change_type: ModificationType.MODIFY
diff: @@ -3,8 +3,8 @@ Plugin Name: Easy2Map Photos
 Contributors: stevenellis
 Tags: photo maps, image maps, image map, geo, map images, map photos, google maps, map plugins, mapping plugins, maps, mapping, mapper, blog maps, blogging maps, travel maps, plugin, posts, post, page, coordinates, latitude, longitude, geocoding, geotag images, geotag photos, image slider, photo slider, image gallery, photo gallery
 Requires at least: 3.0.1
-Tested up to: 3.6.1
-Stable tag: 1.0.9
+Tested up to: 4.4.2
+Stable tag: 1.1.0
 License: GPLv2 or later
 License URI: http://www.gnu.org/licenses/gpl-2.0.html
 
@@ -97,6 +97,10 @@ Yes, width of photos can be made as percentage or pixel value.
 * Enhanced file upload control
 * Various fixes and enhancements
 
+= 1.1.0 = 
+* Plugin made WP 4.2.2 compliant
+* SQL injection vulnerabilities plugged
+
 == Upgrade Notice ==
 
 = 1.0.1 =
@@ -112,4 +116,8 @@ Yes, width of photos can be made as percentage or pixel value.
 
  = 1.0.9 = 
 * Enhanced file upload control
-* Various fixes and enhancements
\ No newline at end of file
+* Various fixes and enhancements
+
+= 1.1.0 = 
+* Plugin made WP 4.2.2 compliant
+* SQL injection vulnerabilities plugged

programming_language: Markdown
filename: functions.imgmap.admin.js
change_type: ModificationType.MODIFY
diff: @@ -11,56 +11,56 @@ var easy2map_imgmap_functions = (function() {
             //refresh the example map
             refreshExampleMap = function(saveMapToDatabase) {
 
-        var templateID = parseInt(jQuery("#MapTemplateName").val());
-        var proVersion = !!jQuery("#photoSize").attr("proVersion");
+                var templateID = parseInt(jQuery("#MapTemplateName").val());
+                var proVersion = !!jQuery("#photoSize").attr("proVersion");
 
-        for (var t = 0; t < $arrTemplates.length; t++) {
+                for (var t = 0; t < $arrTemplates.length; t++) {
 
-            var template = $arrTemplates[t];
+                    var template = $arrTemplates[t];
 
-            if (parseInt(template.ID) == templateID) {
+                    if (parseInt(template.ID) == templateID) {
 
-                jQuery('#divPreview').html(replaceAll(template.TemplateHTML, '[siteurl]', $pluginsURL));
-                if (proVersion === true)
-                    jQuery('#easy2mapphotologo').remove();
+                        jQuery('#divPreview').html(replaceAll(template.TemplateHTML, '[siteurl]', $pluginsURL));
+                        if (proVersion === true)
+                            jQuery('#easy2mapphotologo').remove();
 
-                jQuery('[id ^= styleElement]').each(function() {
-                    jQuery('#divMapParent').css(replaceAll(jQuery(this).attr('item'), "_", "-"), jQuery(this).attr('value'));
-                });
+                        jQuery('[id ^= styleElement]').each(function() {
+                            jQuery('#divMapParent').css(replaceAll(jQuery(this).attr('item'), "_", "-"), jQuery(this).attr('value'));
+                        });
 
-                jQuery('[id ^= stylePhotoElement]').each(function() {
+                        jQuery('[id ^= stylePhotoElement]').each(function() {
 
-                    if (jQuery(this).attr('item') === "width") {
-                        jQuery('#divMapParent').css("width", jQuery(this).attr('value'));
-                        jQuery('#easy2mapmainimage').css("width", '');
+                            if (jQuery(this).attr('item') === "width") {
+                                jQuery('#divMapParent').css("width", jQuery(this).attr('value'));
+                                jQuery('#easy2mapmainimage').css("width", '');
 
-                    } else {
-                        jQuery('#easy2mapmainimage').css(replaceAll(jQuery(this).attr('item'), "_", "-"), jQuery(this).attr('value'));
-                    }
-                });
+                            } else {
+                                jQuery('#easy2mapmainimage').css(replaceAll(jQuery(this).attr('item'), "_", "-"), jQuery(this).attr('value'));
+                            }
+                        });
 
-                jQuery('[id ^= styleMapElement]').each(function() {
-                    jQuery('#divMap').css(replaceAll(jQuery(this).attr('item'), "_", "-"), jQuery(this).attr('value'));
-                });
+                        jQuery('[id ^= styleMapElement]').each(function() {
+                            jQuery('#divMap').css(replaceAll(jQuery(this).attr('item'), "_", "-"), jQuery(this).attr('value'));
+                        });
 
-                jQuery("#easy2mapIimgShadow").width(jQuery("#divMapParent").width());
-                jQuery("#easy2mapIimgShadow").width(jQuery("#divMapParent").width());
-                jQuery("#easy2mapIimgShadow").css('marginLeft', jQuery("#divMapParent").css('marginLeft'));
-                jQuery("#easy2mapIimgShadow").css('marginRight', jQuery("#divMapParent").css('marginRight'));
+                        jQuery("#easy2mapIimgShadow").width(jQuery("#divMapParent").width());
+                        jQuery("#easy2mapIimgShadow").width(jQuery("#divMapParent").width());
+                        jQuery("#easy2mapIimgShadow").css('marginLeft', jQuery("#divMapParent").css('marginLeft'));
+                        jQuery("#easy2mapIimgShadow").css('marginRight', jQuery("#divMapParent").css('marginRight'));
 
-            }
-        }
+                    }
+                }
 
-        //save the map to the database if required to do so
-        if (!!saveMapToDatabase) {
-            easy2map_imgmap_functions.saveMap(false, false);
-        }
+                //save the map to the database if required to do so
+                if (!!saveMapToDatabase) {
+                    easy2map_imgmap_functions.saveMap(false, false);
+                }
 
-        easy2map_imgmap_functions.displayGoogleMap();
+                easy2map_imgmap_functions.displayGoogleMap();
 
-        google.maps.event.addDomListener(window, 'load', easy2map_imgmappin_functions.retrieveMapPoints());
+                google.maps.event.addDomListener(window, 'load', easy2map_imgmappin_functions.retrieveMapPoints());
 
-    };
+            };
 
     //retrieve map's CSS elements for saving to the database
     retrieveMapCSS = function() {
@@ -253,7 +253,7 @@ var easy2map_imgmap_functions = (function() {
             $styleElementIndex = i;
             $styleSelectedElement = element;
             jQuery('div[id ^= div_edit_]').hide();
-
+            
             switch (attribute) {
 
                 case "border_style":
@@ -264,6 +264,39 @@ var easy2map_imgmap_functions = (function() {
                         break;
                     }
 
+                case "font_family":
+                    {
+                        jQuery('#tdheading_fontfamily').html("Font Family");
+                        jQuery('#div_edit_fontfamily').modal();
+                        jQuery('#txtDefaultValue_fontfamily').val(value).focus();
+                        break;
+                    }
+
+                case "text_align":
+                    {
+                        jQuery('#tdheading_textalign').html("Text Align");
+                        jQuery('#div_edit_textalign').modal();
+                        jQuery('#txtDefaultValue_textalign').val(value).focus();
+                        break;
+                    }
+
+                case "font_weight":
+                    {
+                        jQuery('#tdheading_fontweight').html("Font Weight");
+                        jQuery('#div_edit_fontweight').modal();
+                        jQuery('#txtDefaultValue_fontweight').val(value).focus();
+                        break;
+                    }
+
+                case "font_size":
+                    {
+                        jQuery('#tdheading_em').html("Font Size");
+                        jQuery('#div_edit_em').modal();
+                        jQuery('#txtDefaultValue_em').val(value).focus();
+                        jQuery('#txtDefaultValue_em').val(type).prop('disabled', false);
+                        break;
+                    }
+
                 case "box_shadow":
                     {
                         jQuery('#tdheading_style').html("Shadow Style");
@@ -409,6 +442,17 @@ var easy2map_imgmap_functions = (function() {
                         break;
                     }
 
+                case "color":
+                    {
+                        jQuery('#tdheading_color').html("Color");
+                        jQuery('#div_edit_color').modal();
+                        jQuery('#txtDefaultValue_color').val(value).focus();
+                        jQuery('#txtDefaultValue_color').css('background-color', value);
+                        jQuery('#colourpicker').attr('data-color', hexToRgb(value));
+                        jQuery('#liDefaultValue_color').css('background-color', value);
+                        break;
+                    }
+
             }
 
         },
@@ -753,6 +797,32 @@ var easy2map_imgmap_functions = (function() {
 
             var alteredValue = '';
             switch (attribute) {
+                case "font_family":
+                    {
+                        alteredValue = jQuery('#txtDefaultValue_fontfamily').val();
+                        jQuery('#div_edit_fontfamily').hide();
+                        break;
+                    }
+
+                case "text_align":
+                    {
+                        alteredValue = jQuery('#txtDefaultValue_textalign').val();
+                        jQuery('#div_edit_textalign').hide();
+                        break;
+                    }
+                case "font_weight":
+                    {
+                        alteredValue = jQuery('#txtDefaultValue_fontweight').val();
+                        jQuery('#div_edit_fontweight').hide();
+                        break;
+                    }
+                case "font_size":
+                    {
+                        alteredValue = jQuery('#txtDefaultValue_em').val();
+                        jQuery('#div_edit_em').hide();
+                        break;
+
+                    }
                 case "border_style":
                     {
                         alteredValue = jQuery('#txtDefaultValue_style').val()
@@ -840,6 +910,13 @@ var easy2map_imgmap_functions = (function() {
                         jQuery('#div_edit_color').hide();
                         break;
                     }
+                case "color":
+                    {
+                        alteredValue = jQuery('#txtDefaultValue_color').val();
+                        jQuery('#tdItemElementValue').css('color', jQuery('#txtDefaultValue_color').val());
+                        jQuery('#div_edit_color').hide();
+                        break;
+                    }
                 case "z-index":
                     {
                         alteredValue = jQuery('#txtDefaultValue_pixel').val();
@@ -971,6 +1048,8 @@ var easy2map_imgmap_functions = (function() {
                     //set the action of the pin upload form to reflect the new mapID!
                     jQuery('#formAddPinIcon').attr('action', '?page=easy2mapimg&action=mappiniconsave&map_id=' + $mapID);
                     jQuery('#formAddPinImage').attr('action', '?page=easy2mapimg&action=mappinimageupload&map_id=' + $mapID);
+                    jQuery('#formPhotoImport').attr('action', '?page=easy2mapimg&action=photoimport&map_id=' + $mapID);
+                    jQuery('#formRefresh').attr('action', '?page=easy2mapimg&action=edit&map_id=' + $mapID);
 
                 },
                 error: function(XMLHttpRequest, textStatus, errorThrown) {

programming_language: JavaScript
filename: functions.imgmappin.admin.js
change_type: ModificationType.MODIFY
diff: @@ -1,67 +1,69 @@
-var easy2map_imgmappin_functions = (function(){
-    
+var easy2map_imgmappin_functions = (function() {
+
     /*clear the array that contains all pins located on the map*/
-    clearPinArray = function(){
-        
+    clearPinArray = function() {
+
         if ($pinsArray) {
             for (i in $pinsArray) {
                 $pinsArray[i].setMap(null);
                 $pinsArray[i].setAnimation(null);
             }
         }
-        if ($pinsArray) $pinsArray.length = 0;
+        if ($pinsArray)
+            $pinsArray.length = 0;
         $selectedPin = null;
-        
+
     };
-    
+
     /*add the selected pin onto the Google map*/
-    addPinToMap = function (objPointDetails){
+    addPinToMap = function(objPointDetails) {
 
         this.selectedMapPoint = objPointDetails;
 
         var marker = new google.maps.Marker({
-            position	: new google.maps.LatLng(this.selectedMapPoint.lattitude, this.selectedMapPoint.longitude),
-            draggable	: true,
-            map		: $map,
-            title           : this.selectedMapPoint.title.replace(/\\/gi, ''),
-            ID              : this.selectedMapPoint.ID,
-            icon            : this.selectedMapPoint.icon,
-            settings        : this.selectedMapPoint.settings,
-            small           : this.selectedMapPoint.small,
-            medium          : this.selectedMapPoint.medium,
-            large           : this.selectedMapPoint.large,
-            pinHTML         : this.selectedMapPoint.pinhtml,
-            pinText         : this.selectedMapPoint.pintext,
-            visible         : false
+            position: new google.maps.LatLng(this.selectedMapPoint.lattitude, this.selectedMapPoint.longitude),
+            draggable: true,
+            map: $map,
+            title: this.selectedMapPoint.title.replace(/\\/gi, ''),
+            ID: this.selectedMapPoint.ID,
+            icon: this.selectedMapPoint.icon,
+            settings: this.selectedMapPoint.settings,
+            small: this.selectedMapPoint.small,
+            medium: this.selectedMapPoint.medium,
+            large: this.selectedMapPoint.large,
+            pinHTML: this.selectedMapPoint.pinhtml,
+            pinText: this.selectedMapPoint.pintext,
+            visible: false
         });
-        
+
         $pinsArray.push(marker);
         //insert the pin onto the map here
-        google.maps.event.addListener(marker, "dragend", function (mEvent) {
+        google.maps.event.addListener(marker, "dragend", function(mEvent) {
             $latlng = mEvent.latLng;
             showLatLong();
             updateMapPinLocation(marker.ID);
         });
-        
+
         //show the pin's info window when it is clicked
-        google.maps.event.addListener(marker, "click", function (mEvent) {
-            
+        google.maps.event.addListener(marker, "click", function(mEvent) {
+
             var pinContent = "";
-            
+
             var lines = marker.pinHTML.split('\n');
-            for(var i = 0; i < lines.length; i++){
-                if (i > 0) pinContent += "<br>";
+            for (var i = 0; i < lines.length; i++) {
+                if (i > 0)
+                    pinContent += "<br>";
                 pinContent += lines[i];
             }
-            
-        //var infoWindow = new google.maps.InfoWindow();
-        //infoWindow.setContent(pinContent);
-        //infoWindow.open(marker.map, marker);
+
+            //var infoWindow = new google.maps.InfoWindow();
+            //infoWindow.setContent(pinContent);
+            //infoWindow.open(marker.map, marker);
         });
     };
-    
-    clearTextOfAllFormatting = function(html){
-        
+
+    clearTextOfAllFormatting = function(html) {
+
         //remove MS Word formatting
         html = replaceAll(html, "&quot;Arial&quot;", "Arial");
         html = replaceAll(html, "&quot;Times New Roman&quot;", "Arial");
@@ -73,7 +75,7 @@ var easy2map_imgmappin_functions = (function(){
         //gmail does not render line-height correctly
         html = replaceAll(html, "line-height:", "min-height:");
 
-        if (html.indexOf('<p') != -1){
+        if (html.indexOf('<p') != -1) {
             html = replaceAll(html, "'", '&#39;');
         }
 
@@ -83,85 +85,87 @@ var easy2map_imgmappin_functions = (function(){
         html = replaceAll(html, '<p style="text-align: center;">', '<p style="text-align: left;margin:0; padding:0;">');
 
         //remove MS Word formatting
-        if (html.indexOf('[endif]') != -1){
+        if (html.indexOf('[endif]') != -1) {
             html = html.substring(html.lastIndexOf('[endif]') + 10);
         }
-        
+
         return html;
     };
-    
+
     //function used as object for saving details of pins in a loop
-    listedMapPin = function(objPinDetails){
+    listedMapPin = function(objPinDetails) {
         this.pinDetails = objPinDetails;
     };
-    
+
     //set the current pins image
-    setPinImage = function (img){
+    setPinImage = function(img) {
         jQuery('#draggable').attr('src', jQuery(img).attr('src'));
         jQuery('#mapPinIconList').modal('hide');
-        
+
         if ($pinsArray) {
             for (i in $pinsArray) {
-                
-                if (!!$selectedPin == false) continue;
-                if (typeof $pinsArray[i].ID == "undefined" || typeof $selectedPin.ID == "undefined") continue;
-                if ($pinsArray[i].ID == $selectedPin.ID) $pinsArray[i].setIcon(jQuery(img).attr('src'));
+
+                if (!!$selectedPin == false)
+                    continue;
+                if (typeof $pinsArray[i].ID == "undefined" || typeof $selectedPin.ID == "undefined")
+                    continue;
+                if ($pinsArray[i].ID == $selectedPin.ID)
+                    $pinsArray[i].setIcon(jQuery(img).attr('src'));
             }
         }
     };
-    
+
     //show lat/lng of current pin
-    showLatLong = function (){
+    showLatLong = function() {
         jQuery('#latLongParent').show();
         jQuery('#divLatLong').html('Position of Pin: ' + $latlng);
     };
-    
+
     //update the lat lng of the current pin after it is dragged and dropped
-    updateMapPinLocation = function(mapPinID){
-               
+    updateMapPinLocation = function(mapPinID) {
+
         jQuery.ajax({
-            type : 'POST',
-            url : ajaxurl,
-            dataType : 'json',
+            type: 'POST',
+            url: ajaxurl,
+            dataType: 'json',
             data: {
-                mapPointID : mapPinID,
-                latLong : $latlng + '',
-                action : "e2m_img_update_map_pin_location"
+                mapPointID: mapPinID,
+                latLong: $latlng + '',
+                action: "e2m_img_update_map_pin_location"
             }
         });
     };
-       
+
     return{
-        
         //prepare the front-end to allow the user to add a new marker to the map
-        addNewMapMarker : function(){
-            
+        addNewMapMarker: function() {
+
             jQuery('.fileupload').fileupload('clear');
             jQuery('#AddMarkerOrSave').hide();
             jQuery('#tblAddMapMarker').show();
-                        
+
         },
-        
         //hide all edit controls from view
-        cancelSaveMapPin : function (){
-            
+        cancelSaveMapPin: function() {
+
             jQuery('#pinDescriptionParent').hide();
             jQuery('#divAddressSearch').hide();
             jQuery('#divDrag').hide();
             jQuery('#divDrag2').hide();
             jQuery('#btnCancelPin').hide();
             jQuery('#pinImageUploadParent').show();
+            jQuery('#zipUpload').show();
             jQuery('#pinImageParent').hide();
-            
+
             jQuery('#AddMarkerOrSave').hide();
             jQuery('#tblAddMapMarker').hide();
-            
+
             jQuery('#address').attr('placeholder', "Enter address where this picture was taken");
-            
+
             document.getElementById('MapTemplateName').style.visibility = 'visible';
-            
+
             var proVersion = !!jQuery("#photoSize").attr("proVersion");
-            if (proVersion == false){
+            if (proVersion == false) {
                 document.getElementById('mapSize').style.visibility = 'hidden';
                 document.getElementById('photoSize').style.visibility = 'hidden';
                 document.getElementById('mapType').style.visibility = 'hidden';
@@ -173,27 +177,28 @@ var easy2map_imgmappin_functions = (function(){
                 document.getElementById('markerZoom').style.visibility = 'visible';
             }
             document.getElementById('easy2mapmainimage').style.backgroundImage = "none";
-            
+
             jQuery('#draganddrop').show();
             jQuery('#AddEditPinTitle').html('Add New Photo').show();
             jQuery('#divPinAddEditParent').hide();
             jQuery('#easy2mapslidertext').html('').hide();
-            
+
             jQuery('#pinDescription').data("wysihtml5").editor.clear();
-            
+
             jQuery('#btnDeletePin').hide();
             jQuery('#btnSavePin').hide();
             jQuery('#latLongParent').hide();
             jQuery('#draggable').attr("src", $mapSettings.DefaultPinImage);
-            if ($selectedPin) $selectedPin.setAnimation(null);
+            if ($selectedPin)
+                $selectedPin.setAnimation(null);
             $selectedPin = null;
-            
+
             //prepare the pin for dragging onto the map
             easy2map_imgmappin_functions.setIconDraggable();
-            
+
             jQuery('td [id ^= imageTd]').removeClass('highlighted');
             jQuery('td [id ^= nameTd]').removeClass('highlighted');
-            
+
             //remove the current pin from the public array
             if ($pinsArray) {
                 for (i in $pinsArray) {
@@ -205,118 +210,119 @@ var easy2map_imgmappin_functions = (function(){
                     }
                 }
             }
-            
+
             jQuery('tr [id ^=divPinInstructions]').show();
             jQuery('#draganddrop').show();
             $mapPinID = 0;
         },
-        
         //allow the user to change the pin template
-        changeMapPinTemplate : function(){
-    
+        changeMapPinTemplate: function() {
+
             var templateID = parseInt(jQuery("#MapPinTemplateName").val());
-    
-            for(var t = 0; t < $arrTemplates.length; t++){
-        
+
+            for (var t = 0; t < $arrTemplates.length; t++) {
+
                 var template = $arrTemplates[t];
-                if (parseInt(template.ID) == templateID){
+                if (parseInt(template.ID) == templateID) {
                     jQuery('#MapTemplateExampleImg').html(template.TemplateHTML);
-                }        
+                }
             }
         },
-        
         //deleting map pin
-        deleteSelectedPoint : function (){
+        deleteSelectedPoint: function() {
+
+            if (!confirm('Are you sure you wish to delete this marker? This action is not reversible!'))
+                return;
 
-            if (!confirm('Are you sure you wish to delete this marker? This action is not reversible!')) return;
-            
             jQuery.ajax({
-                type : 'POST',
-                url : ajaxurl,
-                dataType : 'json',
+                type: 'POST',
+                url: ajaxurl,
+                dataType: 'json',
                 data: {
-                    MapPointID : $mapPinID,
+                    MapPointID: $mapPinID,
                     action: 'e2m_img_delete_map_point'
                 },
-                success : function(returnData){
+                success: function(returnData) {
 
-                    if (returnData.length > 0){
+                    if (returnData.length > 0) {
                         alert(returnData);
                         return;
                     }
-                    
+
                     clearPinArray();
-                    if ($pinsArray) $pinsArray.length = 0;
+                    if ($pinsArray)
+                        $pinsArray.length = 0;
                     easy2map_imgmappin_functions.retrieveMapPoints();
                 },
-                error : function(XMLHttpRequest, textStatus, errorThrown) {
-                    if (errorThrown.length > 0) alert(errorThrown);
+                error: function(XMLHttpRequest, textStatus, errorThrown) {
+                    if (errorThrown.length > 0)
+                        alert(errorThrown);
                 }
             });
         },
-        
         //prepare a pin item for editing
-        editPinItem : function(index){
-            
-            for (i = 0; i < $pinsArray.length; i++){
+        editPinItem: function(index) {
+
+            for (i = 0; i < $pinsArray.length; i++) {
                 $pinsArray[i].setVisible(false);
             }
-            
+
             var pinDetails = $markersArray[index].pinDetails;
             $latlng = new google.maps.LatLng(pinDetails.lattitude, pinDetails.longitude);
             $selectedPin = $pinsArray[index];
             $selectedPin.setVisible(true);
             showLatLong();
-            
+
             $selectedPin.setAnimation(google.maps.Animation.BOUNCE);
-            setTimeout(function(){
+            setTimeout(function() {
                 $selectedPin.setAnimation(null);
             }, 1500);
-            $map.setCenter($latlng);            
-            
+            $map.setCenter($latlng);
+
             jQuery('td [id ^= imageTd]').removeClass('highlighted');
             jQuery('td [id ^= nameTd]').removeClass('highlighted');
-            
+
             jQuery('#imageTd' + index).addClass('highlighted');
             jQuery('#nameTd' + index).addClass('highlighted');
             document.getElementById('mapSize').style.visibility = 'hidden';
             document.getElementById('photoSize').style.visibility = 'hidden';
             document.getElementById('mapType').style.visibility = 'hidden';
             document.getElementById('markerZoom').style.visibility = 'hidden';
-            document.getElementById('MapTemplateName').style.visibility = 'hidden';  
-            
+            document.getElementById('MapTemplateName').style.visibility = 'hidden';
+
             jQuery('#pinDescriptionParent').show();
             jQuery('#divAddressSearch').show();
             jQuery('#address').attr('placeholder', "Change Photo Marker's Location");
-            
+
             jQuery('#AddMarkerOrSave').hide();
             jQuery('#tblAddMapMarker').show();
-            
-            jQuery('#pinImagePreview').attr('src', pinDetails.large); 
+
+            jQuery('#pinImagePreview').attr('src', pinDetails.large);
             jQuery('#pinImageUploadParent').hide();
+            jQuery('#zipUpload').hide();
             //jQuery('#pinImageParent').show();
-            
+
             jQuery('#draganddrop').hide();
             jQuery('#btnCancelPin').show();
             jQuery('#AddEditPinTitle').html('Edit Photo Details').show();
             jQuery('#btnUploadIcon').html('Change Icon');
             jQuery('#divDrag').hide();
             jQuery('#divPinAddEditParent').show();
-            
+
             jQuery('#pinName').val(pinDetails.title.replace(/\\/gi, ''));
             jQuery('#pinDescription').data("wysihtml5").editor.setValue(pinDetails.pintext);
-            
+
             jQuery('#small').val(pinDetails.small);
             jQuery('#medium').val(pinDetails.medium);
             jQuery('#large').val(pinDetails.large);
             jQuery('#easy2mapmainimage').css({
-                'background-image' : 'url(' + pinDetails.large + ')', 
-                'background-repeat': 'no-repeat', 
+                'background-image': 'url(' + pinDetails.large + ')',
+                'background-repeat': 'no-repeat',
                 'background-position': 'center'
             }).fadeIn();
             jQuery('#easy2mapslidertext').html(pinDetails.pintext).show();
-                                    
-            
+
+
             $mapPinID = pinDetails.ID;
             jQuery('#btnDeletePin').show();
             jQuery('#btnSavePin').show();
@@ -324,39 +330,37 @@ var easy2map_imgmappin_functions = (function(){
             jQuery('#draggable').attr('src', pinDetails.icon);
             easy2map_imgmappin_functions.setIconNotDraggable();
             easy2map_imgmap_functions.disableHover();
-            
+
         },
-        
-        hidePreviewPage : function (){
+        hidePreviewPage: function() {
             jQuery('#divMultipleLocations').fadeOut();
         },
-        
-        imageNotSuccessfullyUploaded : function (){
-            
-            if (document.getElementById('pinimage').value != ""){
-                jQuery('#photoUploadError').modal();    
+        imageNotSuccessfullyUploaded: function() {
+
+            if (document.getElementById('pinimage').value != "") {
+                jQuery('#photoUploadError').modal();
                 notBusy();
             }
-            
+
         },
-        
-        imageSuccessfullyUploaded : function (smallImage, mediumImage, largeImage, lat, lng){
-            
+        imageSuccessfullyUploaded: function(smallImage, mediumImage, largeImage, lat, lng) {
+
             jQuery('#easy2mapmainimage').css({
-                'background-image' : 'url(' + largeImage + ')', 
-                'background-repeat': 'no-repeat', 
+                'background-image': 'url(' + largeImage + ')',
+                'background-repeat': 'no-repeat',
                 'background-position': 'center'
             });
-                        
-            for (i = 0; i < $pinsArray.length; i++){                
+
+            for (i = 0; i < $pinsArray.length; i++) {
                 $pinsArray[i].setVisible(false);
             }
-            
+
             //jQuery('#pinImagePreview').attr('src', largeImage); 
             jQuery('#small').val(smallImage);
             jQuery('#medium').val(mediumImage);
             jQuery('#large').val(largeImage);
             jQuery('#pinImageUploadParent').hide();
+            jQuery('#zipUpload').show();
             document.getElementById('mapSize').style.visibility = 'hidden';
             document.getElementById('photoSize').style.visibility = 'hidden';
             document.getElementById('mapType').style.visibility = 'hidden';
@@ -366,106 +370,105 @@ var easy2map_imgmappin_functions = (function(){
             jQuery('#btnSavePin').hide();
             jQuery('#btnDeletePin').hide();
             jQuery('#btnCancelPin').show();
+            jQuery('#zipUpload').hide();
             jQuery('#divPinAddEditParent').show();
             $selectedPin = null;
             //jQuery('#draggable').attr('src', smallImage);
-            
-            if (lat === 0 && lng === 0){ 
-                
+
+            if (lat === 0 && lng === 0) {
+
                 jQuery('#divAddressSearch').show();
                 jQuery('#divDrag').show();
                 jQuery('#divDrag2').show();
-                           
+
             } else {
-                easy2map_imgmappin_functions.SetPinPosition(lat, lng); 
+                easy2map_imgmappin_functions.SetPinPosition(lat, lng);
             }
-            
+
             easy2map_imgmap_functions.disableHover();
             jQuery('#easy2mapslidertext').html('').hide();
-            jQuery('#pinimage').val('');            
+            jQuery('#pinimage').val('');
             notBusy();
-            
+
         },
-        
         //retrieve all pin icons associated with this map
-        openImagesDirectory : function (selectedImage){
-            
+        openImagesDirectory: function(selectedImage) {
+
             jQuery.ajax({
-                type            : 'POST',
-                url             : ajaxurl,
-                dataType        : 'json',
+                type: 'POST',
+                url: ajaxurl,
+                dataType: 'json',
                 data: {
-                    mapID : $mapID,
-                    action : 'e2m_img_retrieve_pin_icons'
+                    mapID: $mapID,
+                    action: 'e2m_img_retrieve_pin_icons'
                 },
-                success : function(returnData){
+                success: function(returnData) {
 
                     jQuery('#tblPinImages').find('tr').remove();
                     var iCounter = 0;
-                    for (var i = 0; i < returnData.length; i++){
-                        if (iCounter % 6 == 0){
+                    for (var i = 0; i < returnData.length; i++) {
+                        if (iCounter % 6 == 0) {
                             var tr = document.createElement('tr');
                             document.getElementById('tblPinImages').appendChild(tr);
                         }
 
-                        var imageTd                 = document.createElement('td');
-                        imageTd.align               = "center";
+                        var imageTd = document.createElement('td');
+                        imageTd.align = "center";
                         imageTd.style.borderColor = "#FFFFFF";
-                        imageTd.style.padding       = "2px";
-                        if (returnData[i] == selectedImage){
+                        imageTd.style.padding = "2px";
+                        if (returnData[i] == selectedImage) {
                             imageTd.style.borderColor = "#EBEBEB";
                             imageTd.style.borderWidth = "2px";
                             imageTd.style.borderStyle = "solid";
-                            imageTd.style.borderRadius  = "3px"
+                            imageTd.style.borderRadius = "3px"
                         }
 
                         var image = document.createElement('img');
                         image.style.cursor = "pointer";
                         image.setAttribute("onClick", "easy2map_imgmappin_functions.setMapPinImage(this)");
-                        
+
                         image.src = returnData[i];
                         imageTd.appendChild(image);
                         tr.appendChild(imageTd);
                         iCounter += 1;
                     }
-                    
+
                     jQuery('#mapPinIconList').modal();
                 },
-                error : function(XMLHttpRequest, textStatus, errorThrown) {
+                error: function(XMLHttpRequest, textStatus, errorThrown) {
                     alert(errorThrown);
                 }
             });
         },
-        
         //run this function when a pin is dropped onto a map - setup controls for creating pin
-        placePin : function (location, bounce) {
-            
-            for (i = 0; i < $pinsArray.length; i++){
+        placePin: function(location, bounce) {
+
+            for (i = 0; i < $pinsArray.length; i++) {
                 $pinsArray[i].setVisible(false);
             }
-            
+
             var marker = new google.maps.Marker({
-                position    : location,
-                ID          : 0,
-                draggable   : true,
-                bouncy      : true,
-                title       : 'Click on icon to edit details',
-                map         : $map,
-                icon        : jQuery('#draggable').attr('src')
+                position: location,
+                ID: 0,
+                draggable: true,
+                bouncy: true,
+                title: 'Click on icon to edit details',
+                map: $map,
+                icon: jQuery('#draggable').attr('src')
             });
-            
+
             $latlng = marker.position;
             $pinsArray.push(marker);
             $selectedPin = $pinsArray[$pinsArray.length - 1];
             showLatLong();
-            
-            if (!!bounce){
+
+            if (!!bounce) {
                 $selectedPin.setAnimation(google.maps.Animation.BOUNCE);
-                setTimeout(function(){
+                setTimeout(function() {
                     $selectedPin.setAnimation(null);
                 }, 1500);
             }
-            
+
             jQuery('#pinDescriptionParent').show();
             jQuery('#divAddressSearch').hide();
             document.getElementById('mapSize').style.visibility = 'hidden';
@@ -473,7 +476,7 @@ var easy2map_imgmappin_functions = (function(){
             document.getElementById('mapType').style.visibility = 'hidden';
             document.getElementById('markerZoom').style.visibility = 'hidden';
             document.getElementById('MapTemplateName').style.visibility = 'hidden';
-            
+
             jQuery('#draganddrop').hide();
             jQuery('#btnCancelPin').show();
             jQuery('#AddEditPinTitle').hide();
@@ -481,58 +484,60 @@ var easy2map_imgmappin_functions = (function(){
             jQuery('#address').attr('placeholder', "Change Marker's Location");
             jQuery('#divDrag').hide();
             jQuery('#divPinAddEditParent').show();
-            
+
             jQuery('tr [id ^=divPinInstructions]').hide();
             jQuery('#pinDescription').focus();
-                        
+
             jQuery('#btnSavePin').show();
             easy2map_imgmappin_functions.setIconNotDraggable();
-            
-            google.maps.event.addListener(marker, "dragend", function (mEvent) {
+
+            google.maps.event.addListener(marker, "dragend", function(mEvent) {
                 $latlng = mEvent.latLng;
                 showLatLong();
             });
-            
-            google.maps.event.addListener(marker, "click", function (mEvent) {
+
+            google.maps.event.addListener(marker, "click", function(mEvent) {
                 $latlng = mEvent.latLng;
                 showLatLong();
             });
-            
+
             easy2map_imgmap_functions.disableHover();
-            
+
         },
-        
         //retrieve all points associated with this map
-        retrieveMapPoints : function (){
-            
+        retrieveMapPoints: function() {
+
             busy();
-            
+
             var data = {
                 action: 'e2m_img_retrieve_map_points',
-                MapID : $mapID
+                MapID: $mapID
             };
-            
+
             //clear all controls for blank slate
             easy2map_imgmappin_functions.cancelSaveMapPin();
             easy2map_imgmap_functions.disableHover();
-        
+
             jQuery.ajax({
                 type: "POST",
                 url: ajaxurl,
                 data: data,
-                dataType : 'json',
+                dataType: 'json',
                 success: function(returnData) {
-                    
+
                     jQuery('#tblMapMarkers').show().find('tr').remove();
                     jQuery('#Easy2MapSliderParent').show().find('li').remove();
-                    
+
                     var noPinsFound = false;
-                    
-                    if (typeof returnData == "undefined" || typeof returnData == "null") noPinsFound = true;
-                    if (!returnData) noPinsFound = true;
-                    if (returnData.length == 0)  noPinsFound = true;
-                    
-                    if (noPinsFound){
+
+                    if (typeof returnData == "undefined" || typeof returnData == "null")
+                        noPinsFound = true;
+                    if (!returnData)
+                        noPinsFound = true;
+                    if (returnData.length == 0)
+                        noPinsFound = true;
+
+                    if (noPinsFound) {
                         //if no pins are found, prompt the user to add a new pin
                         jQuery('#AddMarkerOrSave').hide();
                         jQuery('#tblAddMapMarker').show();
@@ -544,49 +549,50 @@ var easy2map_imgmappin_functions = (function(){
                         jQuery('#AddMarkerOrSave').show();
                         jQuery('#tblAddMapMarker').hide();
                     }
-                    
-                    if ($markersArray) $markersArray.length = 0;
+
+                    if ($markersArray)
+                        $markersArray.length = 0;
                     clearPinArray();
-                                                           
-                    for(var t = 0; t < returnData.length; t++){
-                        
+
+                    for (var t = 0; t < returnData.length; t++) {
+
                         var arrLatLng = replaceAll(replaceAll(replaceAll(returnData[t].LatLong, ' ', ''), '(', ''), ')', '').split(',');
                         var objMapPoint = {
-                            lattitude : arrLatLng[0],
-                            longitude : arrLatLng[1],
-                            ID : returnData[t].ID,
-                            title : returnData[t].Title,
-                            icon : returnData[t].ImageURL,
-                            settings : returnData[t].Settings,
-                            small : returnData[t].PinImageSmall,
-                            medium : returnData[t].PinImageMedium,
-                            large : returnData[t].PinImageLarge,
-                            pinhtml : returnData[t].MapPinHTML,
-                            pintext : returnData[t].MapPinText
+                            lattitude: arrLatLng[0],
+                            longitude: arrLatLng[1],
+                            ID: returnData[t].ID,
+                            title: returnData[t].Title,
+                            icon: returnData[t].ImageURL,
+                            settings: returnData[t].Settings,
+                            small: returnData[t].PinImageSmall,
+                            medium: returnData[t].PinImageMedium,
+                            large: returnData[t].PinImageLarge,
+                            pinhtml: returnData[t].MapPinHTML,
+                            pintext: returnData[t].MapPinText
                         }
-                        
+
                         $markersArray.push(new listedMapPin(objMapPoint));
                     }
-                    
+
                     var sliderImages = [];
-                    for (var i = 0; i < $markersArray.length; i++){
-                        
+                    for (var i = 0; i < $markersArray.length; i++) {
+
                         var selectedListItem = $markersArray[i].pinDetails;
                         addPinToMap(selectedListItem);
-                        
-                        if (document.getElementById('Easy2MapSliderParent')){
+
+                        if (document.getElementById('Easy2MapSliderParent')) {
                             var li = document.createElement('li');
                             li.className = "easy2mapslide";
-                            
+
                             li.setAttribute("sliderID", selectedListItem.ID);
                             li.setAttribute("onClick", "easy2mapimg_functions.clickPinItem(" + selectedListItem.ID + ")");
                             document.getElementById('Easy2MapSliderParent').appendChild(li);
                             sliderImages.push(selectedListItem.medium);
                         }
-                       
+
                         var tr = document.createElement('tr');
                         document.getElementById('tblMapMarkers').appendChild(tr);
-                       
+
                         var imageTd = document.createElement('td');
                         imageTd.id = "imageTd" + i;
                         imageTd.align = "center";
@@ -598,7 +604,7 @@ var easy2map_imgmappin_functions = (function(){
                         imageTd.style.minWidth = '10px';
                         imageTd.style.verticalAlign = 'middle';
                         imageTd.appendChild(image);
-                        
+
                         var imageTd2 = document.createElement('td');
                         imageTd2.id = "imageTd2" + i;
                         imageTd2.align = "center";
@@ -611,7 +617,7 @@ var easy2map_imgmappin_functions = (function(){
                         imageTd2.title = selectedListItem.title.replace(/\\/gi, '');
                         imageTd2.appendChild(image2);
                         imageTd2.style.width = '60%';
-                        
+
                         var editTd = document.createElement('td');
                         editTd.id = "editTd" + i;
                         editTd.style.minWidth = '10%';
@@ -623,50 +629,50 @@ var easy2map_imgmappin_functions = (function(){
                         editLink.setAttribute('className', 'smallE2MLink');
                         editLink.setAttribute('onclick', "easy2map_imgmappin_functions.editPinItem(" + i + ")");
                         editTd.appendChild(editLink);
-                        
+
                         tr.appendChild(imageTd);
                         tr.appendChild(imageTd2);
                         tr.appendChild(editTd);
-                       
+
                     }
-                    
-                    if (sliderImages.length > 0){
-                        jQuery.preloadImages(sliderImages, function initSliderImages(){
+
+                    if (sliderImages.length > 0) {
+                        jQuery.preloadImages(sliderImages, function initSliderImages() {
                             jQuery('#easy2mapslider').imgSlider(sliderImages);
                         });
                     }
-                    
+
                     jQuery('#tblMapMarkers').removeClass('table-striped').addClass('table-striped');
-                    
-                    jQuery("#Easy2MapSliderParent li:first").each(function(){
+
+                    jQuery("#Easy2MapSliderParent li:first").each(function() {
                         easy2mapimg_functions.clickPinItem(jQuery(this).attr('sliderID'));
                     });
-                    
+
                     if ($markersArray.length > 1) {
                         easy2map_imgmap_functions.enableHover();
                     } else {
                         jQuery("#easy2mapslider").hide();
                     }
-                    
+
                     notBusy();
                 },
-                error : function(XMLHttpRequest, textStatus, errorThrown) {
+                error: function(XMLHttpRequest, textStatus, errorThrown) {
                     notBusy();
                 }
             });
         },
-        
         //save map pin to database
-        saveMapPin : function (){
-            
+        saveMapPin: function() {
+
             var pinText = clearTextOfAllFormatting(jQuery('#pinDescription').val());
-            
+
             var pinHTML = "<div style='padding:3px;margin:5px;border:1px solid #EBEBEB' align='center'><img src='" + jQuery('#large').val() + "'>";
-            if (pinText.length > 0) pinHTML += "<div style='text-align:left;margin:0px;padding:0px;'>" + pinText + "</div>";
+            if (pinText.length > 0)
+                pinHTML += "<div style='text-align:left;margin:0px;padding:0px;'>" + pinText + "</div>";
             pinHTML += "</div>";
-            
+
             busy();
-            
+
             //convert pin settings to XML
             //var pinSettings = {
             //    load : jQuery('#PinLoad option:selected').val(),
@@ -674,159 +680,175 @@ var easy2map_imgmappin_functions = (function(){
             //}
             //var options                             = { formatOutput: true, rootTagName: 'settings'};
             //var PinSettingsXML                      = jQuery.json2xml(pinSettings, options);
-            
+
             jQuery.ajax({
-                type 	: 'POST',
-                url 	: ajaxurl,
-                dataType : 'json',
+                type: 'POST',
+                url: ajaxurl,
+                dataType: 'json',
                 data: {
-                    mapPointID : $mapPinID,
-                    action : "e2m_img_save_map_pin",
-                    latLong : $latlng + '',
-                    icon : jQuery('#draggable').attr('src'), 
-                    pinTitle : '',
-                    small : jQuery('#small').val(),
-                    medium : jQuery('#medium').val(),
-                    large : jQuery('#large').val(),
-                    pinSettingsXML : '',
-                    pinHTML : pinHTML,
-                    pinText : pinText,
-                    mapID : $mapID
+                    mapPointID: $mapPinID,
+                    action: "e2m_img_save_map_pin",
+                    latLong: $latlng + '',
+                    icon: jQuery('#draggable').attr('src'),
+                    pinTitle: '',
+                    small: jQuery('#small').val(),
+                    medium: jQuery('#medium').val(),
+                    large: jQuery('#large').val(),
+                    pinSettingsXML: '',
+                    pinHTML: pinHTML,
+                    pinText: pinText,
+                    mapID: $mapID
                 },
-                success : function(mapPinID){
+                success: function(mapPinID) {
                     easy2map_imgmappin_functions.retrieveMapPoints();
                     $selectedPin = null;
                 },
-                error : function(XMLHttpRequest, textStatus, errorThrown) {
+                error: function(XMLHttpRequest, textStatus, errorThrown) {
                     alert(errorThrown);
                     notBusy();
                 }
             });
-            
+
         },
-        
-        setCurrentPosition : function (lat,lng){
+        setCurrentPosition: function(lat, lng) {
             var location = new google.maps.LatLng(lat, lng);
             $latlng = location;
         },
-        
         //save default image associated with map pins
-        setMapPinImage :  function (img){
-        
+        setMapPinImage: function(img) {
+
             jQuery.ajax({
-                type : 'POST',
-                url : ajaxurl,
-                dataType : 'json',
+                type: 'POST',
+                url: ajaxurl,
+                dataType: 'json',
                 data: {
-                    MapID : $mapID,
-                    PinImage : encodeURIComponent(jQuery(img).attr('src')),
-                    action : "e2m_img_save_default_pin_image"
+                    MapID: $mapID,
+                    PinImage: encodeURIComponent(jQuery(img).attr('src')),
+                    action: "e2m_img_save_default_pin_image"
                 },
-                success : function(returnImage){
+                success: function(returnImage) {
                     jQuery('#draggable').attr('src', jQuery(img).attr('src'));
                     jQuery('#mapPinIconList').modal('hide');
                     $mapSettings.DefaultPinImage = returnImage;
                     setPinImage(img);
                 },
-                error : function(XMLHttpRequest, textStatus, errorThrown) {
+                error: function(XMLHttpRequest, textStatus, errorThrown) {
                     alert(errorThrown);
                 }
             });
 
         },
-        
         //set the pin's lat-lng position
-        SetPinPosition : function (lat,lng){
-            
+        SetPinPosition: function(lat, lng) {
+
             var location = new google.maps.LatLng(lat, lng);
             $latlng = location;
             if ($selectedPin == null) {
-                
+
                 easy2map_imgmappin_functions.placePin(location, true);
-                
+
                 //set map center, and save settings to map settings
                 $map.setCenter(location);
                 $map.setZoom(parseInt(jQuery('#markerZoom').val()));
                 var settings = jQuery.xml2json($mapSettings.Settings);
                 settings.lattitude = lat;
                 settings.longitude = lng;
-                settings.zoom =  $map.getZoom();
+                settings.zoom = $map.getZoom();
 
                 var options = {
-                    formatOutput: true, 
+                    formatOutput: true,
                     rootTagName: 'settings'
                 };
                 $mapSettings.Settings = jQuery.json2xml(settings, options);
-                
-                
+
+
             }
-            else $selectedPin.setPosition(location);
-            
-            setTimeout("jQuery('#address').val('')", 1500); 
+            else
+                $selectedPin.setPosition(location);
+
+            setTimeout("jQuery('#address').val('')", 1500);
         },
-        
         //prepare the icon to be dragged onto the map
-        setIconDraggable : function(){
-            
+        setIconDraggable: function() {
+
             jQuery("#draggable").css('cursor', 'move');
-            jQuery("#draggable").draggable({                    
+            jQuery("#draggable").draggable({
                 appendTo: '#bodyTag',
                 scroll: false,
                 helper: 'clone',
                 stop: function(e) {
-                    
+
                     var bounds = $map.getBounds();
                     var latLngSouthW = bounds.getSouthWest();
                     var latLngNorthE = bounds.getNorthEast();
                     var position = jQuery('#divMap').offset();
-                    var point = new google.maps.Point(e.pageX - position.left,e.pageY -position.top + 22);
+                    var point = new google.maps.Point(e.pageX - position.left, e.pageY - position.top + 22);
                     var item = $overlay.getProjection().fromContainerPixelToLatLng(point);
-                    if (latLngSouthW.lng() > 0 && (item.lng() > 0 && item.lng() < latLngSouthW.lng())) return;
-                    if (latLngSouthW.lng() < 0 && (item.lng() < 0 && item.lng() < latLngSouthW.lng())) return;
-                    
-                    if (latLngNorthE.lng() > 0 && (item.lng() > 0 && item.lng() > latLngNorthE.lng())) return;
-                    if (latLngNorthE.lng() < 0 && (item.lng() < 0 && item.lng() > latLngNorthE.lng())) return;
-                    
+                    if (latLngSouthW.lng() > 0 && (item.lng() > 0 && item.lng() < latLngSouthW.lng()))
+                        return;
+                    if (latLngSouthW.lng() < 0 && (item.lng() < 0 && item.lng() < latLngSouthW.lng()))
+                        return;
+
+                    if (latLngNorthE.lng() > 0 && (item.lng() > 0 && item.lng() > latLngNorthE.lng()))
+                        return;
+                    if (latLngNorthE.lng() < 0 && (item.lng() < 0 && item.lng() > latLngNorthE.lng()))
+                        return;
+
                     easy2map_imgmappin_functions.placePin(item);
                 }
-                
+
             });
-            
+
         },
-        
-        setIconNotDraggable : function(){
+        setIconNotDraggable: function() {
             jQuery('#draggable').css('cursor', 'default').draggable('destroy');
         },
-
         //verify that the pin icon is a valid image file
-        uploadPinIcon : function (){
-                
+        uploadPinIcon: function() {
+
             var validateFileType = checkFileExtensionSilent(document.getElementById('pinicon'));
-            if (validateFileType != ''){
+            if (validateFileType != '') {
                 alert('Invalid file, only the following image types are allowed: ' + validateFileType + '. Please upload a different image.');
                 return;
             }
             document.formAddPinIcon.submit();
         },
-        
         //verify that the pin icon is a valid image file
-        uploadPinPicture : function (){
+        uploadZippedFile: function() {
+
+            var validateFileType = checkFileExtensionSilent(document.getElementById('zipfile'));
+            if (validateFileType !== '') {
+                alert('Invalid file, only the following image types are allowed: ' + validateFileType + '. Please upload a different image.');
+                return false;
+            } else {
+                return true;
+            }
+        },
+        uploadZippedFileResult: function(successMessage){
             
-            if (document.getElementById('pinimage').value === "") return;
+            jQuery('#resultMessage').html(successMessage);
+            jQuery('#popupModalZipImport').modal();
+            
+        },
+        //verify that the pin icon is a valid image file
+        uploadPinPicture: function() {
+
+            if (document.getElementById('pinimage').value === "")
+                return;
             var bContinue = true;
-                
+
             var validateFileType = checkFileExtensionSilent(document.getElementById('pinimage'));
-            if (validateFileType != ''){
+            if (validateFileType != '') {
                 alert('Invalid file, only the following image types are allowed: ' + validateFileType + '. Please upload a different image.');
                 bContinue = false;
                 return;
             }
-            
-            if (bContinue == true){
+
+            if (bContinue == true) {
                 busy();
                 document.formAddPinImage.submit();
             }
         }
     }
-    
+
 })();
\ No newline at end of file

programming_language: JavaScript