prefix."lugmap"; if ( isset( $_POST['lugmap_api_key'] ) && isset( $_POST['lugmap_coord'] ) ) { if($_POST['lugmap_api_key']) update_option('lugmap_api_key', attribute_escape($_POST['lugmap_api_key'])); if($_POST['lugmap_coord']) update_option('lugmap_coord', attribute_escape($_POST['lugmap_coord'])); ?>
.
prefix."lugmap"; $lm_name = $wpdb->escape($_POST['lm_name']); $lm_org = $wpdb->escape($_POST['lm_org']); $lm_email = $wpdb->escape($_POST['lm_email']); $lm_web = $wpdb->escape(apply_filters("the_title",$_POST['lm_web'])); $lm_dsc = $wpdb->escape(apply_filters("comment_status_pre ",$_POST['lm_dsc'])); $lm_point = $wpdb->escape(strtok($_POST['lm_point'],"()")); $wpdb->query(" INSERT INTO $table(name, cord, email, web, dsc, point) VALUES('$lm_name', '$lm_org', '$lm_email', '$lm_web', '$lm_dsc', '$lm_point') "); } /** * Gmaps markers generation */ function lugmap_markers() { global $wpdb; $table = $wpdb->prefix."lugmap"; $markers = $wpdb->get_results("SELECT point FROM $table"); foreach($markers as $marker) { echo "\t"."var point = new GLatLng(".stripslashes($marker->point).");"."\n"; $point_data = null; //otherwise it will collect the whole world :) $marker_data = $wpdb->get_results("SELECT `name`,`cord`,`email`,`web`,`dsc` FROM `$table` WHERE `point` = '$marker->point'"); foreach($marker_data as $item) { $point_data .= ""; } echo "\t"."var marker = createMarker(point,'$point_data');"."\n"; echo "\t"."map.addOverlay(marker);"."\n\n"; } } /** * Loading meta stuff like js files and etc. */ function lugmap_header() { $lugmap_api_key = get_option('lugmap_api_key'); $lugmap_coord = get_option('lugmap_coord'); ?> '; $output .= ''; $output .= '