<commit_before><?php
/*******************************************************************************
 *
 *  filename    : Login.php
 *  description : login page that checks for correct username and password
 *
 *  http://www.churchcrm.io/
 *  Copyright 2001-2002 <NAME>, <NAME>,
 *
 *  Updated 2005-03-19 by <NAME>: Removed dropdown login box and
 *  added user entered login box
 *
 *
 *  LICENSE:
 *  (C) Free Software Foundation, Inc.
 *
 *  ChurchCRM is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful, but
 *  WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 *  General Public License for more details.
 *
 *  http://www.gnu.org/licenses
 *
 ******************************************************************************/

// Show disable message if register_globals are turned on.
if (ini_get('register_globals'))
{
    echo "<div class='callout callout-danger'><b>Church</b>CRM will not operate with PHP's register_globals option turned on.<br>";
    echo 'This is for your own protection as the use of this setting could entirely undermine <br>';
    echo 'all security.  You need to either turn off register_globals in your php.ini or else<br>';
    echo 'configure your web server to turn off register_globals for the ChurchInfo directory.</div>';
    exit;
}

// Include the function library
require 'Include/Config.php';
$bSuppressSessionTests = TRUE;
require 'Include/Functions.php';
// Initialize the variables

// Is the user requesting to logoff or timed out?
if (isset($_GET["Logoff"]) || isset($_GET['Timeout'])) {
    if (!isset($_SESSION['sshowPledges']) || ($_SESSION['sshowPledges'] == ''))
        $_SESSION['sshowPledges'] = 0;
    if (!isset($_SESSION['sshowPayments']) || ($_SESSION['sshowPayments'] == ''))
        $_SESSION['sshowPayments'] = 0;
    if (!isset($_SESSION['bSearchFamily']) || ($_SESSION['bSearchFamily'] == ''))
        $_SESSION['bSearchFamily'] = 0;

   if (!empty($_SESSION['iUserID'])) {
       $sSQL = "UPDATE user_usr SET usr_showPledges = " . $_SESSION['sshowPledges'] .
                     ", usr_showPayments = " . $_SESSION['sshowPayments'] .
                     ", usr_showSince = '" . $_SESSION['sshowSince'] . "'" .
                     ", usr_defaultFY = '" . $_SESSION['idefaultFY'] . "'" .
                     ", usr_currentDeposit = '" . $_SESSION['iCurrentDeposit'] . "'";
        if ($_SESSION['dCalStart'] != '')
            $sSQL .= ", usr_CalStart = '" . $_SESSION['dCalStart'] . "'";<commit_msg> Register Globals has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0. and we require 5.6+<commit_after><?php
/*******************************************************************************
 *
 *  filename    : Login.php
 *  description : login page that checks for correct username and password
 *
 *  http://www.churchcrm.io/
 *  Copyright 2001-2002 <NAME>, <NAME>,
 *
 *  Updated 2005-03-19 by <NAME>: Removed dropdown login box and
 *  added user entered login box
 *
 *
 *  LICENSE:
 *  (C) Free Software Foundation, Inc.
 *
 *  ChurchCRM is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful, but
 *  WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 *  General Public License for more details.
 *
 *  http://www.gnu.org/licenses
 *
 ******************************************************************************/

// Include the function library
require 'Include/Config.php';
$bSuppressSessionTests = TRUE;
require 'Include/Functions.php';
// Initialize the variables

// Is the user requesting to logoff or timed out?
if (isset($_GET["Logoff"]) || isset($_GET['Timeout'])) {
    if (!isset($_SESSION['sshowPledges']) || ($_SESSION['sshowPledges'] == ''))
        $_SESSION['sshowPledges'] = 0;
    if (!isset($_SESSION['sshowPayments']) || ($_SESSION['sshowPayments'] == ''))
        $_SESSION['sshowPayments'] = 0;
    if (!isset($_SESSION['bSearchFamily']) || ($_SESSION['bSearchFamily'] == ''))
        $_SESSION['bSearchFamily'] = 0;

   if (!empty($_SESSION['iUserID'])) {
       $sSQL = "UPDATE user_usr SET usr_showPledges = " . $_SESSION['sshowPledges'] .
                     ", usr_showPayments = " . $_SESSION['sshowPayments'] .
                     ", usr_showSince = '" . $_SESSION['sshowSince'] . "'" .
                     ", usr_defaultFY = '" . $_SESSION['idefaultFY'] . "'" .
                     ", usr_currentDeposit = '" . $_SESSION['iCurrentDeposit'] . "'";
        if ($_SESSION['dCalStart'] != '')
            $sSQL .= ", usr_CalStart = '" . $_SESSION['dCalStart'] . "'";
{'fraction_non_alphanumeric': 0.19480015521924718, 'fraction_numerical': 0.009313154831199068, 'mean_word_length': 3.474826388888889, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '192996', 'n_tokens_mistral': 1503, 'n_tokens_neox': 1426, 'n_words': 444}