<commit_before><!DOCTYPE html>
<html>
<?php
    require "../functions.php";
    
    //cacheNum is a variable holding the string for whatever number token it is change for each file
    $cacheNum = "token01";
    
    $password = $_GET['password'];
    //change the hash for every new token page
    $passIsCorrect = testPassword($password,'<PASSWORD>');
    
    printHead("$cacheNum Found","../");
?>
<body>
    <?php
        printHeader("../");
    ?>
    <div class="body">
    <div class="outer-wrapper">
    <div class="content-wrapper">
    <h2>Token01</h2>
    <?php
        //sleep(1) delays the page for one second before testing the password
        //I am no genius but I feel like this will mitigate spam from trying to
        //"brute-force" the correct password
        sleep(1);
        if($passIsCorrect){
            if(isset($_POST['name']) && isset($_POST['location'])){
                $name = $_POST['name'];
                $location = $_POST['location'];
                $comments = $_POST['comments'];
                addTextToFile("../$cacheNum.txt",$name,$location,$comments);
            }else{
                printFindersText();
                displayInputForm("$cacheNum.php?password=$password");
            }
        }else{
            echo 'Access Denied.';
        }<commit_msg>Added email notification when somebody submits their info to the log<commit_after><!DOCTYPE html>
<html>
<?php
    require "../functions.php";
    
    //cacheNum is a variable holding the string for whatever number token it is change for each file
    $cacheNum = "token01";
    
    $password = $_GET['password'];
    //change the hash for every new token page
    $passIsCorrect = testPassword($password,'<PASSWORD>');
    
    printHead("$cacheNum Found","../");
?>
<body>
    <?php
        printHeader("../");
    ?>
    <div class="body">
    <div class="outer-wrapper">
    <div class="content-wrapper">
    <h2>Token01</h2>
    <?php
        //sleep(1) delays the page for one second before testing the password
        //I am no genius but I feel like this will mitigate spam from trying to
        //"brute-force" the correct password
        sleep(1);
        //TODO if pass is incorrect, then maybe display the log table.
        //that way they get something instead of access denied
        if($passIsCorrect){
            if(isset($_POST['name']) && isset($_POST['location'])){
                $name = $_POST['name'];
                $location = $_POST['location'];
                $comments = $_POST['comments'];
                addTextToFile("../$cacheNum.txt",$name,$location,$comments);
                //TODO separate out the mail items
                $temp = mail('<EMAIL>', $cacheNum.' finder notification', "New find on $cacheNum.", "From: <EMAIL>");
            }else{
                printFindersText();
                displayInputForm("$cacheNum.php?password=$password");
            }
        }else{
            echo 'Access Denied.';
        }
{'fraction_non_alphanumeric': 0.142904953145917, 'fraction_numerical': 0.00535475234270415, 'mean_word_length': 2.179787234042553, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 27, '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': '5130724', 'n_tokens_mistral': 829, 'n_tokens_neox': 797, 'n_words': 243}