// Validate module if (!($emarking = $DB->get_record('emarking', array('id' => $cm->instance)))) { print_error('Prueba inválida'); } // Callback para from webpage $callback = optional_param('callback', null, PARAM_RAW_TRIMMED); // Headers //header ( 'Content-Type: text/javascript' ); //header('Content-Type: text/html; charset=utf-8'); //header ( 'Cache-Control: no-cache' ); //header ( 'Pragma: no-cache' ); //var_dump($action);die("este es el action"); if ($action == "markingreport") { $grading = get_status($cmid, $emarking->id); $contributions = get_contribution_per_marker($cmid, $emarking->id); $contributioners = get_markers($cmid, $emarking->id); $advancedescription = get_advance_description($cmid, $emarking->id); $advanceresponded = get_advance_responded($cmid, $emarking->id); $advanceregrading = get_advance_regrading($cmid, $emarking->id); $advancegrading = get_advance_grading($cmid, $emarking->id); $markeradvance_marker = get_markeradvance_marker($cmid, $emarking->id); $markeradvance_corregido = get_markeradvance_corregido($cmid, $emarking->id); $markeradvance_porcorregir = get_markeradvance_porcorregir($cmid, $emarking->id); $markeradvance_porrecorregir = get_markeradvance_porrecorregir($cmid, $emarking->id); $final = array("Grading" => $grading, "Contributioners" => $contributioners, "Contributions" => $contributions, "Advancedescription" => $advancedescription, "Advanceresponded" => $advanceresponded, "Advanceregrading" => $advanceregrading, "Advancegrading" => $advancegrading, "MarkeradvanceMarker" => $markeradvance_marker, "MarkeradvanceCorregido" => $markeradvance_corregido, "MarkeradvancePorcorregir" => $markeradvance_porcorregir, "MarkeradvancePorrecorregir" => $markeradvance_porrecorregir); $output = $final; $jsonOutputs = array('error' => '', 'values' => $output); $jsonOutput = json_encode($jsonOutputs); if ($callback) { $jsonOutput = $callback . "(" . $jsonOutput . ");"; }
login($_REQUEST['username'], $_REQUEST['password']); break; case 'get_user_by_username': get_user_by_username($_REQUEST['username']); break; case 'get_user_by_email': get_user_by_email($_REQUEST['email']); break; case 'get_user_by_id': get_user_by_id($_REQUEST['id_user']); break; case 'change_password': change_password($_REQUEST['username'], $_REQUEST['password']); break; case 'get_markers': get_markers(); break; case 'get_markers_by_category': get_markers_by_category($_REQUEST['id_categoria']); break; case 'add_post': add_post($_REQUEST['id_user'], $_REQUEST['post_title'], $_REQUEST['post_content']); break; case 'get_post': get_post($_REQUEST['id_post']); break; case 'get_comments': get_comments($_REQUEST['id_post']); break; case 'comment_post': comment_post($_REQUEST['id_post'], $_REQUEST['username'], $_REQUEST['id_user'], $_REQUEST['comment']);
* * @since 1.0.0 * @package GeoDirectory */ if (isset($_REQUEST['ajax_action']) && $_REQUEST['ajax_action'] == 'homemap_catlist') { $post_taxonomy = geodir_get_taxonomies($_REQUEST['post_type']); $map_canvas_name = $_REQUEST['map_canvas']; $child_collapse = $_REQUEST['child_collapse']; echo home_map_taxonomy_walker($post_taxonomy, 0, true, 0, $map_canvas_name, $child_collapse, true); die; } // Send the content-type header with correct encoding header("Content-type: text/javascript; charset=utf-8"); if (isset($_REQUEST['ajax_action']) && $_REQUEST['ajax_action'] == 'cat') { // Retrives markers data for categories echo get_markers(); exit; } else { if (isset($_REQUEST['ajax_action']) && $_REQUEST['ajax_action'] == 'info') { // Retrives marker info window html /** * @global object $wpdb WordPress Database object. * @global string $plugin_prefix Geodirectory plugin table prefix. */ global $wpdb, $plugin_prefix; if ($_REQUEST['m_id'] != '') { $pid = $_REQUEST['m_id']; } else { echo __('No marker data found', GEODIRECTORY_TEXTDOMAIN); exit; }
icon.iconAnchor = new GPoint(6, 20); icon.infoWindowAnchor = new GPoint(5, 1); markers[i] = new GMarker(new GLatLng(locations[i].getAttribute("lat"),locations[i].getAttribute("lng")),icon); // Add attributes to the marker so we can poll them later. // When clicked, an overlay will have these properties. // markers[i].infowindow = locations[i].getAttribute("domain")+": "+locations[i].getAttribute("hits")+" simulation jobs"; markers[i].infowindow = type+" ("+locations[i].getAttribute("type")+")"; // Useful things to store on a marker (Not needed for this example, could be removed) // Tells you what index in the markers[] array an overlay is markers[i].markerindex = i; // Store the location_id of the location the marker represents. // Very useful to know the true id of a marker, you could then make // AJAX calls to the database to update the information if you had it"s location_id // changed location_id to ip markers[i].db_id = locations[i].getAttribute("type"); map.addOverlay(markers[i]); ' . get_markers() . ' } } } } request.send(null); } //]]> </script> </head> <body onload="load()" onunload="GUnload()"> <div id="div_map" style="width:1200px; height:600px"></div> </body> </html>';
require_once DIR . '/includes/functions_misc.php'; require_once DIR . '/includes/utf8_to_ascii/utf8_to_ascii.php'; require_once '_lib/ads.php'; $ads = new ads(); $ini = parse_ini_file('../m/config/config.ini', true); require_once './map_config.php'; // must go after parse_ini_file // default action if (empty($_REQUEST['do'])) { $_REQUEST['do'] = 'getall'; } if ($_REQUEST['do'] == 'json') { $conn = mysql_connect($cfg['db.gv.host'], $cfg['db.gv.username'], $cfg['db.gv.password']); $database = $cfg['db.gv.dbname']; mysql_select_db($database, $conn) or die("Database not found."); $json['markers'] = get_markers(); //$json['reccounts'] = get_reccounts(); echo json_encode($json); return; } if ($_REQUEST['do'] == 'getall') { // ############################################################################# // show results // start search timer $searchstart = microtime(); $pageTitle = 'NoBlood | ' . $ini['default']['site.hospitals.tagline']; $disclaimer = $ini['default']['site.hospitals.disclaimer']; $keywords = $ini['default']['site.hospitals.keywords']; $description = $ini['default']['site.hospitals.description']; $headinclude = preg_replace('%(<meta name=\\"keywords\\"\\scontent=\\")(.*?)(\\" />)%sim', '$1' . $keywords . '$3', $headinclude); $headinclude = preg_replace('%(<meta name=\\"description\\"\\scontent=\\")(.*?)(\\" />)%sim', '$1' . $description . '$3', $headinclude);