###End Labels###
###Dimensions###
$sl_mdo[] = array("field_name" => "zoom_level", "default" => "4", "input_zone" => "dimensions", "output_zone" => "sl_dyn_js", "label" => "<nobr>" . __("Zoom Level", SL_TEXT_DOMAIN) . "</nobr>", "input_template" => $zoom);
$sl_mdo[] = array("field_name" => array("height", "width", "height_units", "width_units"), "default" => array("350", "100", "px", "%"), "input_zone" => "dimensions", "output_zone" => "sl_template", "label" => "<nobr>" . __("Map Dimensions (H x W)", SL_TEXT_DOMAIN) . "</nobr>", "input_template" => "<input name='height' value='{$sl_vars['height']}' size='3'>&nbsp;" . sl_choose_units($sl_vars['height_units'], "height_units") . " <span style='font-size:1.2em; vertical-align:middle'>X</span> <input name='width' value='{$sl_vars['width']}' size='3'>&nbsp;" . sl_choose_units($sl_vars['width_units'], "width_units", ""), "numbers_only" => array(1, 1, 0, 0));
$the_distance_unit["" . __("Km", SL_TEXT_DOMAIN) . ""] = "km";
$the_distance_unit["" . __("Miles", SL_TEXT_DOMAIN) . ""] = "miles";
$radii_select = "";
foreach ($the_distance_unit as $key => $value) {
    $selected = $sl_vars['distance_unit'] == $value ? " selected " : "";
    $radii_select .= "<option value='{$value}' {$selected}>{$key}</option>\n";
}
$sl_mdo[] = array("field_name" => array("distance_unit", "radii"), "default" => array("miles", "1,5,10,25,(50),100,200,500"), "input_zone" => "dimensions", "output_zone" => array("sl_dyn_js", "sl_template"), "label" => "<nobr>" . __("Radii Options", SL_TEXT_DOMAIN) . " (" . __("in", SL_TEXT_DOMAIN) . " <select name='sl_distance_unit'>{$radii_select}</select>) </nobr>", "input_template" => "<input  name='radii' value='{$sl_vars['radii']}' size='25'><br><span style='font-size:80%'>(" . __("Parentheses '( )' are for the default radius</span>", SL_TEXT_DOMAIN) . ")");
###End Dimensions###
###Design###
$sl_mdo[] = array("field_name" => "theme", "default" => "", "input_zone" => "design", "output_zone" => "sl_template", "label" => __("Choose Theme", SL_TEXT_DOMAIN), "input_template" => "<select name='theme' onchange=\"\"><option value=''>" . __("No Theme Selected", SL_TEXT_DOMAIN) . "</option>{$theme_str}</select>&nbsp;&nbsp;&nbsp;<a href='http://www.viadat.com/products-page/store-locator-themes/' target='_blank'>" . __("Get&nbsp;Themes", SL_TEXT_DOMAIN) . " &raquo;</a>");
$sl_mdo[] = array("field_name" => "remove_credits", "default" => "0", "field_type" => "checkbox", "input_zone" => "design", "output_zone" => "sl_template", "label" => __("Remove Credits", SL_TEXT_DOMAIN), "input_template" => "<input name='sl_remove_credits' value='1' type='checkbox' {$checked3}>");
$sl_mdo[] = array("field_name" => array("icon", "icon2"), "default" => array(SL_ICONS_BASE . "/droplet_green.png", SL_ICONS_BASE . "/droplet_red.png"), "input_zone" => "design", "output_zone" => array("sl_dyn_js", "sl_dyn_js"), "label" => "<input name='icon' size='20' value='{$sl_vars['icon']}' onchange=\"document.getElementById('prev').src=this.value\"><img id='prev' src='{$sl_vars['icon']}' align='top' rel='sl_pop' href='#home_icon' style='cursor:pointer;cursor:hand;height:60%;'> <br><a rel='sl_pop' href='#home_icon'><span style='font-size:80%'>" . __("Choose", SL_TEXT_DOMAIN) . " " . __("Home Icon", SL_TEXT_DOMAIN) . "</span></a><div id='home_icon' style='display:none;'><h2 style='margin-top:0px'>" . __("Choose", SL_TEXT_DOMAIN) . " " . __("Home Icon", SL_TEXT_DOMAIN) . "</h2>{$icon_str}</div>", "input_template" => "<input name='icon2' size='20' value='{$sl_vars['icon2']}' onchange=\"document.getElementById('prev2').src=this.value\"><img id='prev2' src='{$sl_vars['icon2']}' align='top' rel='sl_pop' href='#end_icon' style='cursor:pointer;cursor:hand;height:60%;'> <br><div id='end_icon' style='display:none;'><h2 style='margin-top:0px'>" . __("Choose", SL_TEXT_DOMAIN) . " " . __("Destination Icon", SL_TEXT_DOMAIN) . "</h2>{$icon2_str}</div><a rel='sl_pop' href='#end_icon'><span style='font-size:80%'>" . __("Choose", SL_TEXT_DOMAIN) . " " . __("Destination Icon", SL_TEXT_DOMAIN) . " </span></a>");
###End Design###
/*
$sl_mdo[] = array("input_zone" => "defaults", "label" => "Locations in Results", "input_template" => <<<EOQ
<input name='sl_num_initial_displayed' value='$sl_vars[num_initial_displayed]'>
EOQ
);*/
//if (function_exists("do_sl_hook") && defined("SL_AP_VERSION") && strnatcmp(SL_AP_VERSION, 1.4) > 0 ){
if (function_exists("do_sl_hook") && empty($_GET['via_platform'])) {
    //v3.75 - probably easiest way to prevent it from interfering with remote installs // v3.75.1 - don't forget "function_exists("do_sl_hook")"!
    do_sl_hook('sl_mapdesigner_options');
    //, '', array(&$sl_mdo));
}
//- removed v3.70 - reassess - add: defined('SL_IN_..MODE') checks to AP
$sl_mdo[] = array("input_zone" => "design", "label" => "<div class=''><b>" . __("For more unique icons, visit", SL_TEXT_DOMAIN) . " <a href='http://code.google.com/p/google-maps-icons/' target='_blank'>Map Icons Collection</a>, <a href='https://www.iconfinder.com/search/?q=map&price=free' target='_blank'>Iconfinder</a>, & <a href='http://www.iconarchive.com/search?q=map' target='_blank'>IconArchive</a></b></div>", "input_template" => "", "colspan" => 2);
    addto_sl_hook('sl_mgmt_bar_links', 'regeocoding_link', '', '', 'csv-xml-importer-exporter');
} else {
    regeocoding_link();
}
if (file_exists(SL_ADDONS_PATH . "/multiple-field-updater/multiLocationUpdate.php") && !function_exists("do_sl_hook")) {
    print "<div> | " . $updater_type . "</div>";
}
print "</div>";
print "</td><td>";
//establishes WHERE clause in query from URL querystring
sl_set_query_defaults();
if (file_exists(SL_ADDONS_PATH . "/csv-xml-importer-exporter/re-geo-query.php")) {
    include SL_ADDONS_PATH . "/csv-xml-importer-exporter/re-geo-query.php";
}
if (function_exists("do_sl_hook")) {
    do_sl_hook("sl_where_clause_filter");
}
// 4/20/15, 12:15a - v3.50 - needed here to actually filter WHERE clause displaying locations on Locations > Manage page. Should've been here since v2.0
//for search links
$numMembers = $wpdb->get_results("SELECT sl_id FROM " . SL_TABLE . " {$where}");
$numMembers2 = count($numMembers);
$start = empty($_GET['start']) ? 0 : $_GET['start'];
$num_per_page = $sl_vars['admin_locations_per_page'];
//edit this to determine how many locations to view per page of 'Manage Locations' page
if ($numMembers2 != 0) {
    include SL_INCLUDES_PATH . "/search-links.php";
}
//end of for search links
print "</td></tr></table>";
//action = $_SERVER['REQUEST_URI'] added to get rid of hash portion of url so it doesn't scroll down to location upon update - v3.73, 7/10/15
$lf_action = !empty($_GET['edit']) ? " action ='{$_SERVER['REQUEST_URI']}' " : "";
}
function sl_csv_db_pca_forms()
{
    if (file_exists(SL_ADDONS_PATH . "/db-importer/db-import-form.php") || file_exists(SL_ADDONS_PATH . "/point-click-add/point-click-add-form.php") || file_exists(SL_ADDONS_PATH . "/csv-xml-importer-exporter/csv-import-form.php")) {
        print "<table><tr>";
        if (file_exists(SL_ADDONS_PATH . "/csv-xml-importer-exporter/csv-import-form.php") || file_exists(SL_ADDONS_PATH . "/db-importer/db-import-form.php")) {
            print "<td style='vertical-align:top; padding-top:0px'>";
            csv_importer();
            db_importer();
            print "</td>";
        }
        if (file_exists(SL_ADDONS_PATH . "/point-click-add/point-click-add-form.php")) {
            print "<td style='vertical-align:top; padding-top:0px'>";
            point_click_add();
            print "</td>";
        }
        print "</tr></table>";
    }
}
if (function_exists("addto_sl_hook")) {
    addto_sl_hook('sl_add_location_forms', 'csv_importer', '', '', 'csv-xml-importer-exporter');
    addto_sl_hook('sl_add_location_forms', 'db_importer', '', '', 'db-importer');
    addto_sl_hook('sl_add_location_forms', 'point_click_add', '', '', 'point-click-add');
} else {
    sl_csv_db_pca_forms();
}
if (function_exists("do_sl_hook")) {
    do_sl_hook('sl_add_location_forms', 'select-top');
}
print "</td>\n</tr>\n</table>\n</div>";
include SL_INCLUDES_PATH . "/sl-footer.php";
function sl_admin_toolbar($admin_bar)
{
    $sl_admin_toolbar_array[] = array('id' => 'sl-menu', 'title' => __('Store Locator', SL_TEXT_DOMAIN), 'href' => preg_replace('@wp-admin\\/[^\\.]+\\.php|index\\.php@', 'wp-admin/admin.php', SL_INFORMATION_PAGE), 'meta' => array('title' => 'LotsOfLocales&trade; - WordPress Store Locator'));
    $sl_admin_toolbar_array[] = array('id' => 'sl-menu-news-upgrades', 'parent' => 'sl-menu', 'title' => __('News & Upgrades', SL_TEXT_DOMAIN), 'href' => preg_replace('@wp-admin\\/[^\\.]+\\.php|index\\.php@', 'wp-admin/admin.php', SL_INFORMATION_PAGE), 'meta' => array('title' => __('News & Upgrades', SL_TEXT_DOMAIN), 'target' => '_self', 'class' => 'sl_menu_class'));
    $sl_admin_toolbar_array[] = array('id' => 'sl-menu-locations', 'parent' => 'sl-menu', 'title' => __('Locations', SL_TEXT_DOMAIN), 'href' => preg_replace('@wp-admin\\/[^\\.]+\\.php|index\\.php@', 'wp-admin/admin.php', SL_MANAGE_LOCATIONS_PAGE), 'meta' => array('title' => __('Locations', SL_TEXT_DOMAIN), 'target' => '_self', 'class' => 'sl_menu_class'));
    $sl_admin_toolbar_array[] = array('id' => 'sl-menu-mapdesigner', 'parent' => 'sl-menu', 'title' => __('Settings', SL_TEXT_DOMAIN), 'href' => preg_replace('@wp-admin\\/[^\\.]+\\.php|index\\.php@', 'wp-admin/admin.php', SL_MAPDESIGNER_PAGE), 'meta' => array('title' => "MapDesigner " . __('Settings', SL_TEXT_DOMAIN), 'target' => '_self', 'class' => 'sl_menu_class'));
    if (function_exists('do_sl_hook')) {
        do_sl_hook('sl_admin_toolbar_filter', '', array(&$sl_admin_toolbar_array));
    }
    foreach ($sl_admin_toolbar_array as $toolbar_page) {
        $admin_bar->add_menu($toolbar_page);
    }
}
Example #5
0
}
$sl_custom_fields = !empty($sl_xml_columns) ? ", " . implode(", ", $sl_xml_columns) : "";
if (!empty($_GET)) {
    $_sl = $_GET;
    unset($_GET['mode']);
    unset($_GET['lat']);
    unset($_GET["lng"]);
    unset($_GET["radius"]);
    unset($_GET["edit"]);
}
$_GET = array_filter($_GET);
//removing any empty $_GET items that may disrupt query
$sl_param_where_clause = "";
$sl_param_order_clause = "";
if (function_exists("do_sl_hook")) {
    do_sl_hook("sl_xml_query");
}
$num_initial_displayed = trim($sl_vars['num_initial_displayed']) != "" && preg_match("@^[0-9]+\$@", $sl_vars['num_initial_displayed']) ? $sl_vars['num_initial_displayed'] : "25";
if (!empty($_sl['mode']) && $_sl['mode'] == 'gen') {
    // Get parameters from URL
    $center_lat = $_sl['lat'];
    $center_lng = $_sl['lng'];
    $radius = $_sl['radius'];
    $multiplier = 3959;
    $multiplier = $sl_vars['distance_unit'] == "km" ? $multiplier * 1.609344 : $multiplier;
    // Select all the rows in the markers table
    $query = sprintf("SELECT sl_address, sl_address2, sl_store, sl_city, sl_state, sl_zip, sl_latitude, sl_longitude, sl_description, sl_url, sl_hours, sl_phone, sl_fax, sl_email, sl_image, sl_tags" . " {$sl_custom_fields}," . " ( {$multiplier} * acos( cos( radians('%s') ) * cos( radians( sl_latitude ) ) * cos( radians( sl_longitude ) - radians('%s') ) + sin( radians('%s') ) * sin( radians( sl_latitude ) ) ) ) AS sl_distance" . " FROM " . SL_TABLE . " WHERE sl_store<>'' AND sl_longitude<>'' AND sl_latitude<>''" . " {$sl_param_where_clause}" . " HAVING sl_distance < '%s' ORDER BY sl_distance LIMIT %d", esc_sql($center_lat), esc_sql($center_lng), esc_sql($center_lat), esc_sql($radius), esc_sql($num_initial_displayed));
    //die($query);
} else {
    // Select all the rows in the markers table
    $query = sprintf("SELECT sl_address, sl_address2, sl_store, sl_city, sl_state, sl_zip, sl_latitude, sl_longitude, sl_description, sl_url, sl_hours, sl_phone, sl_fax, sl_email, sl_image, sl_tags" . " {$sl_custom_fields}" . " FROM " . SL_TABLE . " WHERE sl_store<>'' AND sl_longitude<>'' AND sl_latitude<>''" . " {$sl_param_where_clause}" . " {$sl_param_order_clause}" . " LIMIT %d", esc_sql($num_initial_displayed));
    do_sl_hook('sl_mgmt_bar_links', 'select-right');
}
print "</th>";
print "<th style='/*background-color:#000;*/ width:50%; text-align:right; /*color:white;*/ vertical-align:middle; font-family:inherit; font-size:12px;'>";
function multi_updater()
{
    global $sl_uploads_path, $text_domain, $web_domain;
    if (file_exists(SL_ADDONS_PATH . "/multiple-field-updater/multiple-field-update-form.php") && (sl_data('sl_location_updater_type') == "Multiple Fields" || function_exists("do_sl_hook"))) {
        include SL_ADDONS_PATH . "/multiple-field-updater/multiple-field-update-form.php";
    }
}
function tagger()
{
    print "<!--strong-->" . __("Tags", SL_TEXT_DOMAIN) . "<!--/strong-->&nbsp;<input name='sl_tags' style='margin: 1px; padding:3px; line-height:15px;'>&nbsp;<input class='button-primary' type='button' value='" . __("Add Tag", SL_TEXT_DOMAIN) . "' onclick=\"LF=document.forms['locationForm'];LF.act.value='add_tag';LF.submit();\">&nbsp;<input class='button-primary' type='button' value='" . __("Remove Tag", SL_TEXT_DOMAIN) . "' onclick=\"if(confirm('" . __("You sure", SL_TEXT_DOMAIN) . "?')){LF=document.forms['locationForm'];LF.act.value='remove_tag';LF.submit();}else{return false;}\">";
}
if (function_exists("addto_sl_hook")) {
    if (is_dir(SL_ADDONS_PATH . "/multiple-field-updater/")) {
        addto_sl_hook('sl_mgmt_bar_form', 'multi_updater', '', '', 'multiple-field-updater');
    }
    addto_sl_hook('sl_mgmt_bar_form', 'tagger');
} elseif (!function_exists("addto_sl_hook")) {
    if (file_exists(SL_ADDONS_PATH . "/multiple-field-updater/multiple-field-update-form.php") && sl_data('sl_location_updater_type') == "Multiple Fields") {
        multi_updater();
    } else {
        tagger();
    }
}
if (function_exists("do_sl_hook")) {
    do_sl_hook('sl_mgmt_bar_form', 'select');
}
print "</th></tr></thead></table>\r\n";
Example #7
0
    //&& $tm_st
    print "<input rel='sl_pop' type='button' class='button-primary' onclick='return false;' id='thanks_button' href='" . SL_INCLUDES_BASE . "/thank-you.php?ajax=true' style='margin-right:10px; font-weight:bold; margin:5px; background:green; float:right;' value='" . __("My Views", SL_TEXT_DOMAIN) . "'/>";
}
print "</div>";
//}
/*<li style="margin-left:15px; margin-bottom:0px;"><strong>Introducing: </strong><a href="#" onclick="window.parent.open('http://'+'www.viadat.com/products-page/early-access/');return false;">Early Access Stage 1 - Individual Addons</a> -- Limited access; first come, first serve</li>*/
include SL_INCLUDES_PATH . "/admin-notices.php";
if (function_exists("do_sl_hook")) {
    do_sl_hook("sl_admin_notices");
}
if (!empty($_POST) && function_exists("do_sl_hook")) {
    do_sl_hook("sl_admin_form_post");
    /*print "<br>";*/
}
if (function_exists("do_sl_hook")) {
    do_sl_hook("sl_admin_data");
}
?>
<div id="slideout">
	<div id="clickme"><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b style='font-family:georgia; position:relative; top:-10px;'><?php 
print __("Dashboard", SL_TEXT_DOMAIN);
?>
</b>
	</div>
	<div id="slidecontent">
	   <div id='slidecontainer'>
		<div style='width:50%; float:left'><?php 
sl_module("thanks", __("My Views", SL_TEXT_DOMAIN) . "", "240px");
?>
</div>
		<div style='width:50%; float:right'><?php