<commit_before><?php
/*******************************************************************************
 *
 *  filename    : ManageEnvelopes.php
 *  last change : 2005-02-21
 *  website     : http://www.churchdb.org
 *  copyright   : Copyright 2006 <NAME>
 *
 *  ChurchInfo 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 2 of the License, or
 *  (at your option) any later version.
 *
 ******************************************************************************/

//Include the function library
require "Include/Config.php";
require "Include/Functions.php";

require "Include/EnvelopeFunctions.php";

//Set the page title
$sPageTitle = gettext("Envelope Manager");

// Security: User must have finance permission to use this form
if (!$_SESSION['bFinance']) {
	Redirect("Menu.php");
	exit;
}

if (isset($_POST["Confirm"])) {
	$envelopesToWrite = $_SESSION['envelopesToWrite'];
	foreach ($envelopesToWrite as $fam_ID => $envelope) {
		$dSQL = "UPDATE family_fam SET fam_Envelope='" . $envelope . "' WHERE fam_ID='" . $fam_ID . "'";
		RunQuery($dSQL);<commit_msg>Fixed undefined variable<commit_after><?php
/*******************************************************************************
 *
 *  filename    : ManageEnvelopes.php
 *  last change : 2005-02-21
 *  website     : http://www.churchdb.org
 *  copyright   : Copyright 2006 <NAME>
 *
 *  ChurchInfo 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 2 of the License, or
 *  (at your option) any later version.
 *
 ******************************************************************************/

//Include the function library
require "Include/Config.php";
require "Include/Functions.php";

require "Include/EnvelopeFunctions.php";

//Set the page title
$sPageTitle = gettext("Envelope Manager");

// Security: User must have finance permission to use this form
if (!$_SESSION['bFinance']) {
	Redirect("Menu.php");
	exit;
}

$envelopesToWrite = array ();

if (isset($_POST["Confirm"])) {
	$envelopesToWrite = $_SESSION['envelopesToWrite'];
	foreach ($envelopesToWrite as $fam_ID => $envelope) {
		$dSQL = "UPDATE family_fam SET fam_Envelope='" . $envelope . "' WHERE fam_ID='" . $fam_ID . "'";
		RunQuery($dSQL);
{'fraction_non_alphanumeric': 0.24341021416803954, 'fraction_numerical': 0.01070840197693575, 'mean_word_length': 4.867149758454106, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '5083848', 'n_tokens_mistral': 714, 'n_tokens_neox': 673, 'n_words': 207}