<commit_before><?php

session_start();

$entry_Id = $_GET['entry_Id'];
include_once 'functions.php';

createHeader(array("style.css"), array(getGoogleMapsJSFilePath(), 'treff_map_functions.js'));

$connection = connectMySql();
//var_dump("SELECT meetingId, userId, startingStreet, startingCity, startingState, startingZip, startingCountry FROM MeetingUsers WHERE idHash='$id'");
$result = $connection->query("SELECT meetingId, userId, startingStreet, startingCity, startingState, startingZip, startingCountry FROM MeetingUsers WHERE idHash='$id'");

$row = $result->fetch_assoc();
$meetingId = $row['meetingId'];
$userId = $row['userId'];
$startingAddress = $row['startingStreet'] . ", " . $row['startingCity'] . ", " . $row['startingState'] . " " . $row['startingZip'] . ", " . $row['startingCountry'];
$rating = get_rating($row['rating']);
$result->free();

$result = $connection->query("SELECT midpointStreet, midpointCity, midpointState, midpointZip, midpointCountry, midpointName, status
                              FROM Meetings
                              WHERE meetingId=$meetingId");

$row = $result->fetch_assoc();
$midpointAddress = $row['midpointStreet'] . ", " . $row['midpointCity'] . ", " . $row['midpointState'] . " " . $row['midpointZip'] . ", " . $row['midpointCountry'];
$locName = $row['midpointName'];
$status = $row['status'];
$result->free();

if ($status == 'Ready') {
    echo '
    <script type="text/javascript">
        setMapCenterFromAddress(\'' . $midpointAddress . '\', true, \'' . addslashes($locName) . '\');
    </script>';
} else {
    echo '
    <script type="text/javascript">
        setMapCenterFromAddress(\'2315 Speedway, Austin, TX 78712-1512, United States\', false);
    </script>';
}


echo '
<div class="main_body">
    <div class="infoTreff">
        <div class="status">
            <h1>Status: ' . $status . '</h1>
            <table>
                <tr>
                    <th>User</th>
                    <th>Status</th>
                    <th>Reminder</th>
                </tr>';

$result = $connection->query("SELECT Users.email, (MeetingUsers.startingStreet IS NOT NULL AND MeetingUsers.startingCity IS NOT NULL AND MeetingUsers.startingState IS NOT NULL AND MeetingUsers.startingZip IS NOT NULL AND MeetingUsers.startingCountry IS NOT NULL) AS hasConfirmed
                              FROM MeetingUsers
                              INNER JOIN Users
                              ON Users.userId = MeetingUsers.userId
                              WHERE MeetingUsers.meetingID=$meetingId");

while($row = $result->fetch_assoc()) {
    echo '<tr>
              <td>' . $row['email'] . '</td>
              <td>' . ($row['hasConfirmed'] == '1' ? 'Confirmed' : 'Not Confirmed') . '</td>';

    if ($row['hasConfirmed'] == '0') {
        echo '<td><button type="button" onclick="sendReminderEmail(' .$row['email'] . ');">Send Reminder Email</button>';
    } else {
        echo '<td></td>';
    }

    echo '</tr>';
}

$result->free();

echo '      </table>
        </div>';

if ($status == 'Ready') {
    echo '
        <button type="button" onclick="getDirections(\'' . $startingAddress . '\', \'' . $midpointAddress . '\');"><h1>Get Directions</h1></button>
        <div id="directions-panel"></div>';
}

echo '
	</div>
    <div id="map-canvas"></div>
</div>';

$connection->close();

include 'footer.php';<commit_msg>Remove a google map references<commit_after><?php

session_start();

$entry_Id = $_GET['entry_Id'];
include_once 'functions.php';

createHeader(array("style.css"), array());

$connection = connectMySql();
//var_dump("SELECT meetingId, userId, startingStreet, startingCity, startingState, startingZip, startingCountry FROM MeetingUsers WHERE idHash='$id'");
$result = $connection->query("SELECT meetingId, userId, startingStreet, startingCity, startingState, startingZip, startingCountry FROM MeetingUsers WHERE idHash='$id'");

$row = $result->fetch_assoc();
$meetingId = $row['meetingId'];
$userId = $row['userId'];
$startingAddress = $row['startingStreet'] . ", " . $row['startingCity'] . ", " . $row['startingState'] . " " . $row['startingZip'] . ", " . $row['startingCountry'];
$rating = get_rating($row['rating']);
$result->free();

$result = $connection->query("SELECT midpointStreet, midpointCity, midpointState, midpointZip, midpointCountry, midpointName, status
                              FROM Meetings
                              WHERE meetingId=$meetingId");

$row = $result->fetch_assoc();
$midpointAddress = $row['midpointStreet'] . ", " . $row['midpointCity'] . ", " . $row['midpointState'] . " " . $row['midpointZip'] . ", " . $row['midpointCountry'];
$locName = $row['midpointName'];
$status = $row['status'];
$result->free();

if ($status == 'Ready') {
    echo '
    <script type="text/javascript">
        setMapCenterFromAddress(\'' . $midpointAddress . '\', true, \'' . addslashes($locName) . '\');
    </script>';
} else {
    echo '
    <script type="text/javascript">
        setMapCenterFromAddress(\'2315 Speedway, Austin, TX 78712-1512, United States\', false);
    </script>';
}


echo '
<div class="main_body">
    <div class="infoTreff">
        <div class="status">
            <h1>Status: ' . $status . '</h1>
            <table>
                <tr>
                    <th>User</th>
                    <th>Status</th>
                    <th>Reminder</th>
                </tr>';


while($row = $result->fetch_assoc()) {
    echo '<tr>
              <td>' . $row['email'] . '</td>
              <td>' . ($row['hasConfirmed'] == '1' ? 'Confirmed' : 'Not Confirmed') . '</td>';

    if ($row['hasConfirmed'] == '0') {
        echo '<td><button type="button" onclick="sendReminderEmail(' .$row['email'] . ');">Send Reminder Email</button>';
    } else {
        echo '<td></td>';
    }

    echo '</tr>';
}

$result->free();

echo $description .'
	</div>
</div>';

$connection->close();

include 'footer.php';
{'fraction_non_alphanumeric': 0.19258010118043845, 'fraction_numerical': 0.0060708263069139965, 'mean_word_length': 3.0074324324324326, 'pattern_counts': {'":': 0, '<': 77, '<?xml version=': 0, '>': 94, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3553149', 'n_tokens_mistral': 1866, 'n_tokens_neox': 1794, 'n_words': 368}