<commit_before><?php

require '../../session.php';

// Get parameters from URL
$center_lat = $_GET["lat"];
$center_lng = $_GET["lng"];
$radius = $_GET["radius"];

// Start XML file, create parent node
$dom = new DOMDocument("1.0");
$node = $dom->createElement("markers");
$parnode = $dom->appendChild($node);

// Search the rows in the markers table
$query = sprintf("SELECT marker_title, marker_description, marker_lat, marker_long, marker_category, (3959 * acos(cos(radians('%s')) * cos(radians(marker_lat)) * cos(radians(marker_long) - radians('%s')) + sin( radians('%s') ) * sin(radians(marker_lat)))) AS distance FROM system_map_markers HAVING distance < '%s' ORDER BY distance LIMIT 0 , 20",
    $mysqli->real_escape_string($center_lat),
    $mysqli->real_escape_string($center_lng),
    $mysqli->real_escape_string($center_lat),
    $mysqli->real_escape_string($radius));
$result = $mysqli->query($query);

header("Content-type: text/xml");

// Iterate through the rows, adding XML nodes for each
while ($row = $result->fetch_assoc()){
      $node = $dom->createElement("marker");
      $newnode = $parnode->appendChild($node);
      $newnode->setAttribute("name", $row['marker_title']);
      $newnode->setAttribute("description", $row['marker_description']);<commit_msg>Changed structure<commit_after><?php

require '../../session.php';

// Get parameters from URL
$center_lat = $_GET["lat"];
$center_lng = $_GET["lng"];
$radius = $_GET["radius"];

// Start XML file, create parent node
$dom = new DOMDocument("1.0");
$node = $dom->createElement("markers");
$parnode = $dom->appendChild($node);

// Search the rows in the markers table
$query = sprintf("SELECT marker_title, marker_description, marker_lat, marker_long, marker_category, (3959 * acos(cos(radians('%s')) * cos(radians(marker_lat)) * cos(radians(marker_long) - radians('%s')) + sin( radians('%s') ) * sin(radians(marker_lat)))) AS distance FROM system_map_markers HAVING distance < '%s' ORDER BY distance LIMIT 0 , 20",
    $mysqli->real_escape_string($center_lat),
    $mysqli->real_escape_string($center_lng),
    $mysqli->real_escape_string($center_lat),
    $mysqli->real_escape_string($radius));
$result = $mysqli->query($query);

header("Content-type: text/xml");

// Iterate through the rows, adding XML nodes for each
while ($row = $result->fetch_assoc()){
      $node = $dom->createElement("marker");
      $newnode = $parnode->appendChild($node);
      $newnode->setAttribute("name", $row['marker_name']);
      $newnode->setAttribute("description", $row['marker_notes']);
{'fraction_non_alphanumeric': 0.1847358121330724, 'fraction_numerical': 0.0070450097847358124, 'mean_word_length': 5.726315789473684, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4662359', 'n_tokens_mistral': 840, 'n_tokens_neox': 833, 'n_words': 178}