<commit_before><?php
include_once( "header.php" );
include_once( "methods.php" );
include_once( 'tohtml.php' );
include_once( "check_access_permissions.php" );
mustHaveAnyOfTheseRoles( Array( 'USER' ) );

echo userHTML( );

$user = $_SESSION[ 'user' ];

if( $_POST )
{
    $data = array( 'speaker' => $user );
    $data = array_merge( $_POST, $data );
    echo( "Sending your acknowledgment to database " );
    $res = updateTable( 'upcoming_aws', 'id,speaker', 'acknowledged', $data );
    if( $res )
    {
        echo printInfo( 
            "You have successfully acknowledged your AWS schedule. 
            Please mark your calendar as well." 
        );

        $email = "<p>" . loginToHTML( $user ) . " has just acknowledged his/her AWS date. </p>";
        $email .= "<p>" . humanReadableDate( 'now' ) . "</p>";
        $subject = "$user has acknowledged his/her AWS date";

        $to = '<EMAIL>';
        $cc = '<EMAIL>';
        sendPlainTextEmail( $email, $subject, $to, $cc );

        goToPage( "user_aws.php", 1 );
        exit;
    }
    else
    {
        echo printWarning( "Failed to update database ..." );<commit_msg>Send email to acadoffice when user acknowledge his AWS.<commit_after><?php
include_once( "header.php" );
include_once( "methods.php" );
include_once( 'tohtml.php' );
include_once( "check_access_permissions.php" );
mustHaveAnyOfTheseRoles( Array( 'USER' ) );

echo userHTML( );

$user = $_SESSION[ 'user' ];

if( $_POST )
{
    $data = array( 'speaker' => $user );
    $data = array_merge( $_POST, $data );
    echo( "Sending your acknowledgment to database " );
    $res = updateTable( 'upcoming_aws', 'id,speaker', 'acknowledged', $data );
    if( $res )
    {
        echo printInfo( 
            "You have successfully acknowledged your AWS schedule. 
            Please mark your calendar as well." 
        );

        $email = "<p>" . loginToHTML( $user ) . " has just acknowledged his/her AWS date. </p>";
        $email .= "<p>" . humanReadableDate( 'now' ) . "</p>";
        $subject = loginToText( $user ) . " has acknowledged his/her AWS date";

        $to = '<EMAIL>';
        $cc = '<EMAIL>';
        sendPlainTextEmail( $email, $subject, $to, $cc );

        goToPage( "user_aws.php", 1 );
        exit;
    }
    else
    {
        echo printWarning( "Failed to update database ..." );
{'fraction_non_alphanumeric': 0.16225448334756618, 'fraction_numerical': 0.0008539709649871904, 'mean_word_length': 2.6213292117465223, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '356050', 'n_tokens_mistral': 759, 'n_tokens_neox': 735, 'n_words': 207}