<commit_before><?php

$sent = false;

if ($_SERVER['REQUEST_METHOD'] == 'POST' || $_GET['test'] == 'send') {
    $style = $_GET['style'];
    $center = $_POST['center'];
    $description = $_POST['description'];
    $sender = sprintf("%s @ %s", $_POST['sender'] ? $_POST['sender'] : 'anonymous', $_SERVER['REMOTE_ADDR']);

    $subject = "[maps.stamen.com / ${style}]: Bug report @ ${center}";
    $message = <<<MESSAGE
Bug report from ${sender}:

${description}

http://maps.stamen.com/${style}/#${center}

MESSAGE;

    try {
        mail("<EMAIL>", $subject, $message);
        $sent = true;
    } catch (Exception $error) {
        $message = $error;
    }
} else {
    $message = "Please use the feedback forms on each map page to submit bug reports.";
}

?>
<!DOCTYPE html>
<html>
    <head>
        <title>maps.stamen.com</title>
        <script type="text/javascript" src="js/vendor/modestmaps.min.js"></script>
        <script type="text/javascript" src="js/vendor/reqwest.js"></script>
        <script type="text/javascript" src="js/tile.stamen.js"></script>
        <script type="text/javascript" src="js/vendor/google-code-prettify/prettify.js"></script>
        <style type="text/css">
            @import url(css/bootstrap/bootstrap.css);
            @import url(css/screen.css);<commit_msg>tweaks to feedback email formatting<commit_after><?php

$sent = false;

if ($_SERVER['REQUEST_METHOD'] == 'POST' || $_GET['test'] == 'send') {
    $style = $_GET['style'];
    $center = $_POST['center'];
    $description = stripslashes($_POST['description']);
    $sender = $_POST['sender'];
    if (!$sender) $sender = 'anonymous';
    $ip = $_SERVER['REMOTE_ADDR'];
    $form_url = sprintf('http://%s%s', $_SERVER['HTTP_HOST'], $_SERVER['REQUEST_URI']);

    $subject = "[maps.stamen.com / ${style}]: Bug report @ ${center}";
    $message = <<<MESSAGE
Bug report from ${sender} ($ip):

\t${description}

http://maps.stamen.com/${style}/#${center}

-- 
feedback form @ $form_url
MESSAGE;

    try {
        mail("<EMAIL>", $subject, $message);
        $sent = true;
    } catch (Exception $error) {
        $message = $error;
    }
} else {
    $message = "Please use the feedback forms on each map page to submit bug reports.";
}

?>
<!DOCTYPE html>
<html>
    <head>
        <title>maps.stamen.com</title>
        <script type="text/javascript" src="js/vendor/modestmaps.min.js"></script>
        <script type="text/javascript" src="js/vendor/reqwest.js"></script>
        <script type="text/javascript" src="js/tile.stamen.js"></script>
        <script type="text/javascript" src="js/vendor/google-code-prettify/prettify.js"></script>
        <style type="text/css">
            @import url(css/bootstrap/bootstrap.css);
            @import url(css/screen.css);
{'fraction_non_alphanumeric': 0.2007220216606498, 'fraction_numerical': 0.0, 'mean_word_length': 3.343260188087774, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '3892084', 'n_tokens_mistral': 905, 'n_tokens_neox': 892, 'n_words': 182}