当前位置: 首页>>代码示例>>PHP>>正文


PHP wpgmza_get_map_data函数代码示例

本文整理汇总了PHP中wpgmza_get_map_data函数的典型用法代码示例。如果您正苦于以下问题:PHP wpgmza_get_map_data函数的具体用法?PHP wpgmza_get_map_data怎么用?PHP wpgmza_get_map_data使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了wpgmza_get_map_data函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: wpgmza_return_marker_list

function wpgmza_return_marker_list($map_id, $admin = true, $width = "100%", $mashup = false, $mashup_ids = false)
{
    global $wpdb;
    global $wpgmza_tblname;
    if ($mashup) {
        // map mashup
        $map_ids = $mashup_ids;
        $wpgmza_cnt = 0;
        if ($mashup_ids[0] == "ALL") {
            $wpgmza_sql1 = "\r\n            SELECT *\r\n            FROM {$wpgmza_tblname}\r\n            ORDER BY `id` DESC\r\n            ";
        } else {
            $wpgmza_id_cnt = count($map_ids);
            $sql_string1 = "";
            foreach ($map_ids as $wpgmza_map_id) {
                $wpgmza_cnt++;
                if ($wpgmza_cnt == 1) {
                    $sql_string1 .= "`map_id` = '{$wpgmza_map_id}' ";
                } elseif ($wpgmza_cnt > 1 && $wpgmza_cnt < $wpgmza_id_cnt) {
                    $sql_string1 .= "OR `map_id` = '{$wpgmza_map_id}' ";
                } else {
                    $sql_string1 .= "OR `map_id` = '{$wpgmza_map_id}' ";
                }
            }
            $wpgmza_sql1 = "\r\n            SELECT *\r\n            FROM {$wpgmza_tblname}\r\n            WHERE {$sql_string1} ORDER BY `id` DESC\r\n            ";
        }
    } else {
        $wpgmza_sql1 = "\r\n            SELECT *\r\n            FROM {$wpgmza_tblname}\r\n            WHERE `map_id` = '{$map_id}' ORDER BY `id` DESC\r\n            ";
    }
    $marker_count = $wpdb->get_var($wpdb->prepare("SELECT COUNT(*) FROM {$wpgmza_tblname} WHERE map_id = %d", $map_id));
    if ($marker_count > 2000) {
        return __("There are too many markers to make use of the live edit function. The maximum amount for this functionality is 2000 markers. Anything more than that could crash your browser. In order to edit your markers, you would need to download the table in CSV format, edit it and re-upload it.", "wp-google-maps");
    } else {
        $results = $wpdb->get_results($wpgmza_sql1);
        $wpgmza_tmp_body = "";
        $wpgmza_tmp_head = "";
        $wpgmza_tmp_footer = "";
        $res = wpgmza_get_map_data($map_id);
        if (!$res->default_marker) {
            $default_marker = "<img src='" . wpgmaps_get_plugin_url() . "/images/marker.png' />";
        } else {
            $default_marker = "<img src='" . $res->default_marker . "' />";
        }
        foreach ($results as $result) {
            $img = $result->pic;
            $link = $result->link;
            $icon = $result->icon;
            if (isset($result->approved)) {
                $approved = $result->approved;
                if ($approved == 0) {
                    $show_approval_button = true;
                } else {
                    $show_approval_button = false;
                }
            } else {
                $show_approval_button = false;
            }
            $category_icon = wpgmza_get_category_icon($result->category);
            if (!$img) {
                $pic = "";
            } else {
                $pic = "<img src=\"" . $result->pic . "\" width=\"40\" />";
            }
            if (!$category_icon) {
                if (!$icon) {
                    $icon = $default_marker;
                } else {
                    $icon = "<img src='" . $result->icon . "' />";
                }
            } else {
                if (!$icon) {
                    $icon = "<img src='" . $category_icon . "' />";
                } else {
                    $icon = "<img src='" . $result->icon . "' />";
                }
            }
            if (!$link) {
                $linktd = "";
            } else {
                $linktd = "<a href=\"" . $result->link . "\" target=\"_BLANK\" title=\"" . __("View this link", "wp-google-maps") . "\">&gt;&gt;</a>";
            }
            if ($admin) {
                $wpgmza_tmp_body .= "<tr id=\"wpgmza_tr_" . $result->id . "\" class=\"gradeU\">";
                $wpgmza_tmp_body .= "<td height=\"40\">" . $result->id . "</td>";
                $wpgmza_tmp_body .= "<td height=\"40\">" . $icon . "<input type=\"hidden\" id=\"wpgmza_hid_marker_icon_" . $result->id . "\" value=\"" . $result->icon . "\" /><input type=\"hidden\" id=\"wpgmza_hid_marker_anim_" . $result->id . "\" value=\"" . $result->anim . "\" /><input type=\"hidden\" id=\"wpgmza_hid_marker_category_" . $result->id . "\" value=\"" . $result->category . "\" /><input type=\"hidden\" id=\"wpgmza_hid_marker_infoopen_" . $result->id . "\" value=\"" . $result->infoopen . "\" /><input type=\"hidden\" id=\"wpgmza_hid_marker_retina_" . $result->id . "\" value=\"" . $result->retina . "\" /></td>";
                $wpgmza_tmp_body .= "<td>" . stripslashes($result->title) . "<input type=\"hidden\" id=\"wpgmza_hid_marker_title_" . $result->id . "\" value=\"" . stripslashes($result->title) . "\" /></td>";
                $wpgmza_tmp_body .= "<td>" . wpgmza_return_category_name($result->category) . "<input type=\"hidden\" id=\"wpgmza_hid_marker_category_" . $result->id . "\" value=\"" . $result->category . "\" /></td>";
                $wpgmza_tmp_body .= "<td>" . stripslashes($result->address) . "<input type=\"hidden\" id=\"wpgmza_hid_marker_address_" . $result->id . "\" value=\"" . stripslashes($result->address) . "\" /><input type=\"hidden\" id=\"wpgmza_hid_marker_lat_" . $result->id . "\" value=\"" . $result->lat . "\" /><input type=\"hidden\" id=\"wpgmza_hid_marker_lng_" . $result->id . "\" value=\"" . $result->lng . "\" /></td>";
                $wpgmza_tmp_body .= "<td>" . stripslashes($result->description) . "<input type=\"hidden\" id=\"wpgmza_hid_marker_desc_" . $result->id . "\" value=\"" . htmlspecialchars(stripslashes($result->description)) . "\" /></td>";
                $wpgmza_tmp_body .= "<td>{$pic}<input type=\"hidden\" id=\"wpgmza_hid_marker_pic_" . $result->id . "\" value=\"" . $result->pic . "\" /></td>";
                $wpgmza_tmp_body .= "<td>{$linktd}<input type=\"hidden\" id=\"wpgmza_hid_marker_link_" . $result->id . "\" value=\"" . $result->link . "\" /></td>";
                $wpgmza_tmp_body .= "<td width='170' align='center'>";
                $wpgmza_tmp_body .= "    <a href=\"#wpgmaps_marker\" title=\"" . __("Edit this marker", "wp-google-maps") . "\" class=\"wpgmza_edit_btn button\" id=\"" . $result->id . "\"><i class=\"fa fa-edit\"> </i> </a> ";
                $wpgmza_tmp_body .= "    <a href=\"?page=wp-google-maps-menu&action=edit_marker&id=" . $result->id . "\" title=\"" . __("Edit this marker", "wp-google-maps") . "\" class=\"wpgmza_edit_btn button\" id=\"" . $result->id . "\"><i class=\"fa fa-map-marker\"> </i></a> ";
                if ($show_approval_button) {
                    $wpgmza_tmp_body .= "    <a href=\"javascript:void(0);\" title=\"" . __("Approve this marker", "wp-google-maps") . "\" class=\"wpgmza_approve_btn button\" id=\"" . $result->id . "\"><i class=\"fa fa-check\"> </i> </a> ";
                }
                $wpgmza_tmp_body .= "    <a href=\"javascript:void(0);\" title=\"" . __("Delete this marker", "wp-google-maps") . "\" class=\"wpgmza_del_btn button\" id=\"" . $result->id . "\"><i class=\"fa fa-times\"> </i></a>";
                $wpgmza_tmp_body .= "</td>";
                $wpgmza_tmp_body .= "</tr>";
            } else {
//.........这里部分代码省略.........
开发者ID:ConceptHaus,项目名称:jolie,代码行数:101,代码来源:wpGoogleMaps.php

示例2: wpgmza_b_return_polyline_list

/**
 * Returns the list of polylines displayed in the map editor
 *
 * @todo Build this as a hook or filter instead of a function call
 * 
 * @param  integer  $map_id Map ID
 * @param  boolean  $admin  Identify if user is admin or not
 * @param  string   $width  Width to be used for HTML output
 * @return string           List HTML
 */
function wpgmza_b_return_polyline_list($map_id, $admin = true, $width = "100%")
{
    wpgmaps_debugger("return_marker_start");
    global $wpdb;
    global $wpgmza_tblname_polylines;
    $wpgmza_tmp = "";
    $results = $wpdb->get_results($wpdb->prepare("SELECT * FROM {$wpgmza_tblname_polylines} WHERE `map_id` = %d ORDER BY `id` DESC", intval($map_id)));
    $wpgmza_tmp .= "\n        \n        <table id=\"wpgmza_table_polyline\" class=\"display\" cellspacing=\"0\" cellpadding=\"0\" style=\"width:{$width};\">\n        <thead>\n        <tr>\n            <th align='left'><strong>" . __("ID", "wp-google-maps") . "</strong></th>\n            <th align='left'><strong>" . __("Name", "wp-google-maps") . "</strong></th>\n            <th align='left' style='width:182px;'><strong>" . __("Action", "wp-google-maps") . "</strong></th>\n        </tr>\n        </thead>\n        <tbody>\n    ";
    $res = wpgmza_get_map_data($map_id);
    $default_marker = "<img src='" . $res->default_marker . "' />";
    //$wpgmza_data = get_option('WPGMZA');
    //if ($wpgmza_data['map_default_marker']) { $default_icon = "<img src='".$wpgmza_data['map_default_marker']."' />"; } else { $default_icon = "<img src='".wpgmaps_get_plugin_url()."/images/marker.png' />"; }
    foreach ($results as $result) {
        unset($poly_data);
        unset($poly_array);
        $poly_data = '';
        $poly_array = wpgmza_b_return_polyline_array($result->id);
        foreach ($poly_array as $poly_single) {
            $poly_data .= $poly_single . ",";
        }
        if (isset($result->polyname) && $result->polyname != "") {
            $poly_name = $result->polyname;
        } else {
            $poly_name = "Polyline" . $result->id;
        }
        $wpgmza_tmp .= "\n            <tr id=\"wpgmza_poly_tr_" . $result->id . "\">\n                <td height=\"40\">" . $result->id . "</td>\n                <td height=\"40\">" . esc_attr(stripslashes($poly_name)) . "</td>\n                <td width='170' align='left'>\n                    <a href=\"" . get_option('siteurl') . "/wp-admin/admin.php?page=wp-google-maps-menu&action=edit_polyline&map_id=" . $map_id . "&poly_id=" . $result->id . "\" title=\"" . __("Edit", "wp-google-maps") . "\" class=\"wpgmza_edit_poly_btn button\" id=\"" . $result->id . "\"><i class=\"fa fa-edit\"> </i></a> \n                    <a href=\"javascript:void(0);\" title=\"" . __("Delete this polyline", "wp-google-maps") . "\" class=\"wpgmza_polyline_del_btn button\" id=\"" . $result->id . "\"><i class=\"fa fa-times\"> </i></a>\n                </td>\n            </tr>";
    }
    $wpgmza_tmp .= "</tbody></table>";
    return $wpgmza_tmp;
}
开发者ID:CodeCabin,项目名称:wp-google-maps,代码行数:40,代码来源:wp-google-maps-polylines.php

示例3: wpgmza_gold_addon_display

function wpgmza_gold_addon_display()
{
    $res = wpgmza_get_map_data($_GET['map_id']);
    if ($res->styling_enabled) {
        $wpgmza_adv_styling[$res->styling_enabled] = "SELECTED";
    } else {
        $wpgmza_adv_styling[2] = "SELECTED";
    }
    if ($res->mass_marker_support) {
        $wpgmza_adv_mass_marker_support[$res->mass_marker_support] = "SELECTED";
    } else {
        $wpgmza_adv_mass_marker_support[2] = "SELECTED";
    }
    for ($i = 0; $i < 3; $i++) {
        if (!isset($wpgmza_adv_mass_marker_support[$i])) {
            $wpgmza_adv_mass_marker_support[$i] = "";
        }
    }
    for ($i = 0; $i < 3; $i++) {
        if (!isset($wpgmza_adv_styling[$i])) {
            $wpgmza_adv_styling[$i] = "";
        }
    }
    $ret = "\r\n        <div style=\"display:block; overflow:auto; background-color:#FFFBCC; padding:10px; border:1px solid #E6DB55; margin-top:35px; margin-bottom:5px;\">\r\n            <h2 style=\"padding-top:0; margin-top:0;\">" . __("Advanced Map Settings", "wp-google-maps") . "</h2>\r\n            <p>" . __("Use the <a href='http://gmaps-samples-v3.googlecode.com/svn/trunk/styledmaps/wizard/index.html' target='_BLANK'>Google Maps API Styled Map Wizard</a> to get your style settings", "wp-google-maps") . "!</p>\r\n                <form action='' method='post' id='wpgmaps_gold_option_styling'>\r\n                    <table>\r\n                    <input type=\"hidden\" name=\"wpgmza_map_id\" id=\"wpgmza_map_id\" value=\"" . $_GET['map_id'] . "\" />\r\n                        <tr style='margin-bottom:20px;'>\r\n                            <td>" . __("Enable Mass Marker Support", "wp-google-maps") . "?:</td>\r\n                            <td>\r\n                                <select id='wpgmza_adv_enable_mass_marker_support' name='wpgmza_adv_enable_mass_marker_support'>\r\n                                    <option value=\"1\" " . $wpgmza_adv_mass_marker_support[1] . ">" . __("Yes", "wp-google-maps") . "</option>\r\n                                    <option value=\"2\" " . $wpgmza_adv_mass_marker_support[2] . ">" . __("No", "wp-google-maps") . "</option>\r\n                                </select>\r\n                            </td>\r\n                         </tr>\r\n                        <tr style='margin-bottom:20px;'>\r\n                            <td>" . __("Enable Advanced Styling", "wp-google-maps") . "?:</td>\r\n                            <td>\r\n                                <select id='wpgmza_adv_styling' name='wpgmza_adv_styling'>\r\n                                    <option value=\"1\" " . $wpgmza_adv_styling[1] . ">" . __("Yes", "wp-google-maps") . "</option>\r\n                                    <option value=\"2\" " . $wpgmza_adv_styling[2] . ">" . __("No", "wp-google-maps") . "</option>\r\n                                </select>\r\n                            </td>\r\n                         </tr>\r\n                         <tr>\r\n                            <td valign='top'>" . __("Paste the JSON data here", "wp-google-maps") . ":</td>\r\n                            <td><textarea name=\"wpgmza_adv_styling_json\" id=\"wpgmza_adv_styling_json\" rows=\"8\" cols=\"40\">" . stripslashes($res->styling_json) . "</textarea></td>\r\n                         </tr>\r\n                     </table>\r\n                    <p class='submit'><input type='submit' name='wpgmza_save_style_settings' value='" . __("Save Style Settings", "wp-google-maps") . " &raquo;' /></p>\r\n                </form>\r\n        </div>\r\n    ";
    return $ret;
}
开发者ID:podemosfrance,项目名称:podemosfrance.info,代码行数:26,代码来源:wp-google-maps-gold.php

示例4: wpgmaps_usage_tracking_callback

/**
 * Handles ajax callbacks for usage tracker
 *
 * @return void
 */
function wpgmaps_usage_tracking_callback()
{
    if (isset($_POST['action'])) {
        if ($_POST['action'] == 'track_usage') {
            $wpgmza_settings = get_option('WPGMZA_OTHER_SETTINGS');
            if (isset($wpgmza_settings['wpgmza_settings_enable_usage_tracking']) && $wpgmza_settings['wpgmza_settings_enable_usage_tracking'] == 'yes') {
                $map_data = wpgmza_get_map_data(sanitize_text_field($_POST['mapid']));
                if (isset($map_data->other_settings) && $map_data->other_settings == '') {
                    /* New map - no changes have been made to it */
                } else {
                    if (function_exists('curl_version')) {
                        $request_url = "http://ccplugins.co/usage-tracking/record.php";
                        $ch = curl_init();
                        curl_setopt($ch, CURLOPT_URL, $request_url);
                        curl_setopt($ch, CURLOPT_POST, 1);
                        curl_setopt($ch, CURLOPT_POSTFIELDS, $map_data);
                        curl_setopt($ch, CURLOPT_REFERER, $_SERVER['HTTP_HOST']);
                        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                        $output = curl_exec($ch);
                        curl_close($ch);
                    }
                }
            }
        }
        if ($_POST['action'] == 'request_coupon') {
            if ($_POST['status'] == 'true') {
                if (function_exists('curl_version')) {
                    $request_url = "http://ccplugins.co/usage-tracking/coupons.php";
                    $ch = curl_init();
                    curl_setopt($ch, CURLOPT_URL, $request_url);
                    curl_setopt($ch, CURLOPT_POST, 1);
                    curl_setopt($ch, CURLOPT_POSTFIELDS, $_POST);
                    curl_setopt($ch, CURLOPT_REFERER, $_SERVER['HTTP_HOST']);
                    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                    $output = curl_exec($ch);
                    curl_close($ch);
                    $wpgmza_settings = get_option('WPGMZA_OTHER_SETTINGS');
                    $wpgmza_settings['wpgmza_settings_enable_usage_tracking'] = 'yes';
                    update_option('WPGMZA_OTHER_SETTINGS', $wpgmza_settings);
                } else {
                    $body = "Usage tracking has been enabled by " . $_POST['email'];
                    wp_mail('nick@wpgmaps.com', 'Coupon Code Request', $body);
                }
            } else {
                $wpgmza_settings = get_option('WPGMZA_OTHER_SETTINGS');
                $wpgmza_settings['wpgmza_settings_enable_usage_tracking'] = '0';
                update_option('WPGMZA_OTHER_SETTINGS', $wpgmza_settings);
            }
        }
    }
    wp_die();
}
开发者ID:CodeCabin,项目名称:wp-google-maps,代码行数:57,代码来源:wpGoogleMaps.php

示例5: wpgmza_pro_return_maps_linked_to_cat

function wpgmza_pro_return_maps_linked_to_cat($cat_id)
{
    global $wpdb;
    global $wpgmza_tblname_category_maps;
    $ret_msg = "";
    $sql = "SELECT * FROM `{$wpgmza_tblname_category_maps}` WHERE `cat_id` = '{$cat_id}'";
    $results = $wpdb->get_results($sql);
    $cnt = count($results);
    $cnt_i = 1;
    foreach ($results as $result) {
        $map_id = $result->map_id;
        if ($map_id == 0) {
            $ret_msg .= "<a href=\"?page=wp-google-maps-menu\">" . __("All maps", "wp-google-maps") . "</option>";
            return $ret_msg;
        } else {
            $map_data = wpgmza_get_map_data($map_id);
            if ($cnt_i == $cnt) {
                $wpgmza_com = "";
            } else {
                $wpgmza_com = ",";
            }
            $ret_msg .= "<a href=\"?page=wp-google-maps-menu&action=edit&map_id=" . $map_id . "\">" . $map_data->map_title . "</a>{$wpgmza_com} ";
        }
        $cnt_i++;
    }
    return $ret_msg;
}
开发者ID:hhgr,项目名称:EveryonePlay,代码行数:27,代码来源:wp-google-maps-pro_categories.php

示例6: wpgmaps_sl_user_output_pro

function wpgmaps_sl_user_output_pro($map_id)
{
    $map_settings = wpgmza_get_map_data($map_id);
    $map_width = $map_settings->map_width;
    $map_width_type = stripslashes($map_settings->map_width_type);
    $map_other_settings = maybe_unserialize($map_settings->other_settings);
    if (isset($map_other_settings['store_locator_query_string'])) {
        $sl_query_string = stripslashes($map_other_settings['store_locator_query_string']);
    } else {
        $sl_query_string = __("ZIP / Address:", "wp-google-maps");
    }
    if (isset($map_other_settings['store_locator_name_string'])) {
        $sl_name_string = stripslashes($map_other_settings['store_locator_name_string']);
    } else {
        $sl_name_string = __("Title / Description:", "wp-google-maps");
    }
    if (isset($map_other_settings['store_locator_use_their_location']) && $map_other_settings['store_locator_use_their_location'] == "1") {
        $sl_use_their_location = true;
    } else {
        $sl_use_their_location = false;
    }
    if ($map_width_type == "px" && $map_width < 300) {
        $map_width = "300";
    }
    $ret_msg = "";
    $ret_msg .= "<div class=\"wpgmza_sl_main_div\">";
    $ret_msg .= "       <div class=\"wpgmza_sl_query_div\">";
    $ret_msg .= "           <div class=\"wpgmza_sl_query_innerdiv1\">" . $sl_query_string . "</div>";
    $ret_msg .= "           <div class=\"wpgmza_sl_query_innerdiv2\">";
    $ret_msg .= "\t\t\t\t<input type=\"text\" id=\"addressInput_" . $map_id . "\" size=\"20\" value=\"\" mid=\"" . $map_id . "\" class='addressInput' /> ";
    if ($sl_use_their_location) {
        $ret_msg .= "\t\t\t\t<button id=\"sl_use_my_location_" . $map_id . "\" class=\"sl_use_loc\" mid=\"" . $map_id . "\" title='" . __("Use my location", "wp-google-maps") . "' ><img src='" . plugins_url(plugin_basename(dirname(__FILE__))) . "/images/mylocation.png' title='" . __("Use my location", "wp-google-maps") . "' width='15' /></button>";
    }
    $ret_msg .= "\t\t\t</div>";
    $ret_msg .= "       </div>";
    if (isset($map_other_settings['store_locator_name_search']) && intval($map_other_settings['store_locator_name_search']) == 1) {
        $ret_msg .= "       <div class=\"wpgmza_sl_query_div\">";
        $ret_msg .= "           <div class=\"wpgmza_sl_query_innerdiv1 wpgmza_name_search_string\">" . $sl_name_string . "</div>";
        $ret_msg .= "           <div class=\"wpgmza_sl_query_innerdiv2 wpgmza_name_search_field\"><input type=\"text\" id=\"nameInput_" . $map_id . "\" size=\"20\" value=\"\" /></div>";
        $ret_msg .= "       </div>";
    }
    $ret_msg .= "       <div class=\"wpgmza_sl_radius_div\">";
    $ret_msg .= "           <div class=\"wpgmza_sl_radius_innerdiv1\">" . __("Radius", "wp-google-maps") . ":</div>";
    $ret_msg .= "           <div class=\"wpgmza_sl_radius_innerdiv2\">";
    $ret_msg .= "           <select class=\"wpgmza_sl_radius_select\" id=\"radiusSelect_" . $map_id . "\">";
    $ret_msg .= "               ";
    if ($map_other_settings['store_locator_distance'] == 1) {
        $ret_msg .= "                   <option class=\"wpgmza_sl_select_option\" value=\"1\">" . __("1mi", "wp-google-maps") . "</option>";
        $ret_msg .= "                   <option class=\"wpgmza_sl_select_option\" value=\"5\">" . __("5mi", "wp-google-maps") . "</option>";
        $ret_msg .= "                   <option class=\"wpgmza_sl_select_option\" value=\"10\" selected>" . __("10mi", "wp-google-maps") . "</option>";
        $ret_msg .= "                   <option class=\"wpgmza_sl_select_option\" value=\"25\">" . __("25mi", "wp-google-maps") . "</option>";
        $ret_msg .= "                   <option class=\"wpgmza_sl_select_option\" value=\"50\">" . __("50mi", "wp-google-maps") . "</option>";
        $ret_msg .= "                   <option class=\"wpgmza_sl_select_option\" value=\"75\">" . __("75mi", "wp-google-maps") . "</option>";
        $ret_msg .= "                   <option class=\"wpgmza_sl_select_option\" value=\"100\">" . __("100mi", "wp-google-maps") . "</option>";
        $ret_msg .= "                   <option class=\"wpgmza_sl_select_option\" value=\"150\">" . __("150mi", "wp-google-maps") . "</option>";
        $ret_msg .= "                   <option class=\"wpgmza_sl_select_option\" value=\"200\">" . __("200mi", "wp-google-maps") . "</option>";
        $ret_msg .= "                   <option class=\"wpgmza_sl_select_option\" value=\"300\">" . __("300mi", "wp-google-maps") . "</option>";
    } else {
        $ret_msg .= "                   <option class=\"wpgmza_sl_select_option\" value=\"1\">" . __("1km", "wp-google-maps") . "</option>";
        $ret_msg .= "                   <option class=\"wpgmza_sl_select_option\" value=\"5\">" . __("5km", "wp-google-maps") . "</option>";
        $ret_msg .= "                   <option class=\"wpgmza_sl_select_option\" value=\"10\" selected>" . __("10km", "wp-google-maps") . "</option>";
        $ret_msg .= "                   <option class=\"wpgmza_sl_select_option\" value=\"25\">" . __("25km", "wp-google-maps") . "</option>";
        $ret_msg .= "                   <option class=\"wpgmza_sl_select_option\" value=\"50\">" . __("50km", "wp-google-maps") . "</option>";
        $ret_msg .= "                   <option class=\"wpgmza_sl_select_option\" value=\"75\">" . __("75km", "wp-google-maps") . "</option>";
        $ret_msg .= "                   <option class=\"wpgmza_sl_select_option\" value=\"100\">" . __("100km", "wp-google-maps") . "</option>";
        $ret_msg .= "                   <option class=\"wpgmza_sl_select_option\" value=\"150\">" . __("150km", "wp-google-maps") . "</option>";
        $ret_msg .= "                   <option class=\"wpgmza_sl_select_option\" value=\"200\">" . __("200km", "wp-google-maps") . "</option>";
        $ret_msg .= "                   <option class=\"wpgmza_sl_select_option\" value=\"300\">" . __("300km", "wp-google-maps") . "</option>";
    }
    $ret_msg .= "               </select><input type='hidden' value='" . $map_other_settings['store_locator_distance'] . "' name='wpgmza_distance_type' id='wpgmza_distance_type_" . $map_id . "'  style='display:none;' />";
    $ret_msg .= "           </div>";
    $ret_msg .= "       </div>";
    if (function_exists("wpgmza_register_pro_version") && isset($map_other_settings['store_locator_category']) && $map_other_settings['store_locator_category'] == "1") {
        $ret_msg .= "       <div class=\"wpgmza_sl_category_div\">";
        $ret_msg .= "           <div class=\"wpgmza_sl_category_innerdiv1\">" . __("Category", "wp-google-maps") . ":</div>";
        $ret_msg .= "           <div class=\"wpgmza_sl_category_innerdiv2\">";
        $ret_msg .= "              " . wpgmza_pro_return_category_checkbox_list($map_id) . "";
        $ret_msg .= "           </div>";
        $ret_msg .= "       </div>";
    }
    $ret_msg .= "       <input class=\"wpgmza_sl_search_button_" . $map_id . "\" mid=\"" . $map_id . "\" type=\"button\" onclick=\"searchLocations({$map_id})\" value=\"" . __("Search", "wp-google-maps") . "\"/>";
    $ret_msg .= "       <input class=\"wpgmza_sl_reset_button_" . $map_id . "\" mid=\"" . $map_id . "\" type=\"button\" onclick=\"resetLocations({$map_id})\" value=\"" . __("Reset", "wp-google-maps") . "\"/>";
    $ret_msg .= "    </div>";
    $ret_msg .= "    <div><select id=\"locationSelect\" style=\"width:100%;visibility:hidden\"></select></div>";
    return $ret_msg;
}
开发者ID:uwmadisoncals,项目名称:Cluster-Plugins,代码行数:86,代码来源:wp-google-maps-pro.php

示例7: wpgmaps_admin_javascript_pro

function wpgmaps_admin_javascript_pro()
{
    global $wpdb;
    global $wpgmza_tblname_maps;
    $ajax_nonce = wp_create_nonce("wpgmza");
    if (is_admin() && $_GET['page'] == 'wp-google-maps-menu' && $_GET['action'] == "edit_marker") {
        wpgmaps_admin_edit_marker_javascript();
    } else {
        if (is_admin() && $_GET['page'] == 'wp-google-maps-menu' && $_GET['action'] == "add_poly") {
            wpgmaps_admin_add_poly_javascript($_GET['map_id']);
        } else {
            if (is_admin() && $_GET['page'] == 'wp-google-maps-menu' && $_GET['action'] == "edit_poly") {
                wpgmaps_admin_edit_poly_javascript($_GET['map_id'], $_GET['poly_id']);
            } else {
                if (is_admin() && $_GET['page'] == 'wp-google-maps-menu' && $_GET['action'] == "add_polyline") {
                    wpgmaps_admin_add_polyline_javascript($_GET['map_id']);
                } else {
                    if (is_admin() && $_GET['page'] == 'wp-google-maps-menu' && $_GET['action'] == "edit_polyline") {
                        wpgmaps_admin_edit_polyline_javascript($_GET['map_id'], $_GET['poly_id']);
                    } else {
                        if (is_admin() && $_GET['page'] == 'wp-google-maps-menu' && $_GET['action'] == "edit") {
                            wpgmaps_update_xml_file($_GET['map_id']);
                            $res = wpgmza_get_map_data($_GET['map_id']);
                            $wpgmza_settings = get_option("WPGMZA_OTHER_SETTINGS");
                            $wpgmza_lat = $res->map_start_lat;
                            $wpgmza_lng = $res->map_start_lng;
                            $wpgmza_width = $res->map_width;
                            $wpgmza_height = $res->map_height;
                            $wpgmza_width_type = stripslashes($res->map_width_type);
                            $wpgmza_height_type = $res->map_height_type;
                            $wpgmza_map_type = $res->type;
                            $wpgmza_default_icon = $res->default_marker;
                            $kml = $res->kml;
                            $fusion = $res->fusion;
                            $wpgmza_traffic = $res->traffic;
                            $wpgmza_bicycle = $res->bicycle;
                            $wpgmza_dbox = $res->dbox;
                            $wpgmza_dbox_width = $res->dbox_width;
                            if ($wpgmza_default_icon == "0") {
                                $wpgmza_default_icon = "";
                            }
                            if (!$wpgmza_map_type || $wpgmza_map_type == "" || $wpgmza_map_type == "1") {
                                $wpgmza_map_type = "ROADMAP";
                            } else {
                                if ($wpgmza_map_type == "2") {
                                    $wpgmza_map_type = "SATELLITE";
                                } else {
                                    if ($wpgmza_map_type == "3") {
                                        $wpgmza_map_type = "HYBRID";
                                    } else {
                                        if ($wpgmza_map_type == "4") {
                                            $wpgmza_map_type = "TERRAIN";
                                        } else {
                                            $wpgmza_map_type = "ROADMAP";
                                        }
                                    }
                                }
                            }
                            $start_zoom = $res->map_start_zoom;
                            if ($start_zoom < 1 || !$start_zoom) {
                                $start_zoom = 5;
                            }
                            if (!$wpgmza_lat || !$wpgmza_lng) {
                                $wpgmza_lat = "51.5081290";
                                $wpgmza_lng = "-0.1280050";
                            }
                            // marker sorting functionality
                            if ($res->order_markers_by == 1) {
                                $order_by = 0;
                            } else {
                                if ($res->order_markers_by == 2) {
                                    $order_by = 2;
                                } else {
                                    if ($res->order_markers_by == 3) {
                                        $order_by = 4;
                                    } else {
                                        if ($res->order_markers_by == 4) {
                                            $order_by = 5;
                                        } else {
                                            if ($res->order_markers_by == 5) {
                                                $order_by = 3;
                                            } else {
                                                $order_by = 0;
                                            }
                                        }
                                    }
                                }
                            }
                            if ($res->order_markers_choice == 1) {
                                $order_choice = "asc";
                            } else {
                                $order_choice = "desc";
                            }
                            ?>
    <script type="text/javascript">
               var gmapsJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
               document.write(unescape("%3Cscript src='" + gmapsJsHost + "maps.google.com/maps/api/js?sensor=false' type='text/javascript'%3E%3C/script%3E"));
    </script>
    <link rel="stylesheet" href="http://code.jquery.com/ui/1.8.24/themes/smoothness/jquery-ui.css" />
    <link rel="stylesheet" type="text/css" media="all" href="<?php 
//.........这里部分代码省略.........
开发者ID:Vinnica,项目名称:theboxerboston.com,代码行数:101,代码来源:wp-google-maps-pro.php

示例8: wpgmza_return_polyline_list

function wpgmza_return_polyline_list($map_id, $admin = true, $width = "100%")
{
    wpgmaps_debugger("return_marker_start");
    global $wpdb;
    global $wpgmza_tblname_polylines;
    $results = $wpdb->get_results("\n\tSELECT *\n\tFROM {$wpgmza_tblname_polylines}\n\tWHERE `map_id` = '{$map_id}' ORDER BY `id` DESC\n    ");
    $wpgmza_tmp .= "\n        \n        <table id=\"wpgmza_table_polyline\" class=\"display\" cellspacing=\"0\" cellpadding=\"0\" style=\"width:{$width};\">\n        <thead>\n        <tr>\n            <th><strong>" . __("ID", "wp-google-maps") . "</strong></th>\n            <th><strong>" . __("Polyline Data", "wp-google-maps") . "</strong></th>\n            <th style='width:182px;'><strong>" . __("Action", "wp-google-maps") . "</strong></th>\n        </tr>\n        </thead>\n        <tbody>\n    ";
    $res = wpgmza_get_map_data($map_id);
    $default_marker = "<img src='" . $res->default_marker . "' />";
    //$wpgmza_data = get_option('WPGMZA');
    //if ($wpgmza_data['map_default_marker']) { $default_icon = "<img src='".$wpgmza_data['map_default_marker']."' />"; } else { $default_icon = "<img src='".wpgmaps_get_plugin_url()."/images/marker.png' />"; }
    foreach ($results as $result) {
        unset($poly_data);
        unset($poly_array);
        $poly_array = wpgmza_return_polyline_array($result->id);
        foreach ($poly_array as $poly_single) {
            $poly_data .= $poly_single . ",";
        }
        $wpgmza_tmp .= "\n            <tr id=\"wpgmza_poly_tr_" . $result->id . "\">\n                <td height=\"40\">" . $result->id . "</td>\n                <td height=\"40\"><small>" . $poly_data . "</small></td>\n                <td width='170' align='center'>\n                    <a href=\"" . get_option('siteurl') . "/wp-admin/admin.php?page=wp-google-maps-menu&action=edit_polyline&map_id=" . $map_id . "&poly_id=" . $result->id . "\" title=\"" . __("Edit", "wp-google-maps") . "\" class=\"wpgmza_edit_poly_btn\" id=\"" . $result->id . "\">" . __("Edit", "wp-google-maps") . "</a> |\n                    <a href=\"javascript:void(0);\" title=\"" . __("Delete this polyline", "wp-google-maps") . "\" class=\"wpgmza_polyline_del_btn\" id=\"" . $result->id . "\">" . __("Delete", "wp-google-maps") . "</a>\n                </td>\n            </tr>";
    }
    $wpgmza_tmp .= "</tbody></table>";
    return $wpgmza_tmp;
}
开发者ID:Vinnica,项目名称:theboxerboston.com,代码行数:23,代码来源:wp-google-maps-pro_polylines.php


注:本文中的wpgmza_get_map_data函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。