<commit_before><?php
/*******************************************************************************
 *
 *  filename    : VolunteerOpportunityEditor.php
 *  last change : 2003-03-29
 *  website     : http://www.infocentral.org
 *  copyright   : Copyright 2005 <NAME>
 *
 *  function    : Editor for donation funds
 *
 *  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.
 *
 ******************************************************************************/

require "Include/Config.php";
require "Include/Functions.php";

$sAction = $_GET["Action"];
$sOpp = FilterInput($_GET["Opp"],'int');

$sDeleteError = "";

if ($sAction = 'delete' && strlen($sOpp) > 0)
{
	$sSQL = "DELETE FROM volunteeropportunity_vol WHERE vol_ID = '" . $sOpp . "'";
	RunQuery($sSQL);
}

$sPageTitle = gettext("Volunteer Opportunity Editor");

require "Include/Header.php";

// Does the user want to save changes to text fields?
if (isset($_POST["SaveChanges"]))
{
	$sSQL = "SELECT * FROM volunteeropportunity_vol";
	$rsOpps = RunQuery($sSQL);
	$numRows = mysql_num_rows($rsOpps);

	for ($iFieldID = 1; $iFieldID <= $numRows; $iFieldID++ )
	{
		$aNameFields[$iFieldID] = FilterInput($_POST[$iFieldID . "name"]);

		if ( strlen($aNameFields[$iFieldID]) == 0 )
		{<commit_msg>Added db access to delete associated volunteer ID record<commit_after><?php
/*******************************************************************************
 *
 *  filename    : VolunteerOpportunityEditor.php
 *  last change : 2009-05-19
 *  website     : http://www.infocentral.org
 *  copyright   : Copyright 2005 <NAME>
 *
 *  function    : Editor for donation funds
 *
 *  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.
 *
 ******************************************************************************/

require "Include/Config.php";
require "Include/Functions.php";

$sAction = $_GET["Action"];
$sOpp = FilterInput($_GET["Opp"],'int');

$sDeleteError = "";

if ($sAction = 'delete' && strlen($sOpp) > 0)
{
	$sSQL = "DELETE FROM volunteeropportunity_vol WHERE vol_ID = '" . $sOpp . "'";
	RunQuery($sSQL);
	$sSQL = "DELETE FROM person2volunteeropp_p2vo WHERE p2vo_vol_ID = '" . $sOpp . "'";
	RunQuery($sSQL);
}

$sPageTitle = gettext("Volunteer Opportunity Editor");

require "Include/Header.php";

// Does the user want to save changes to text fields?
if (isset($_POST["SaveChanges"]))
{
	$sSQL = "SELECT * FROM volunteeropportunity_vol";
	$rsOpps = RunQuery($sSQL);
	$numRows = mysql_num_rows($rsOpps);

	for ($iFieldID = 1; $iFieldID <= $numRows; $iFieldID++ )
	{
		$aNameFields[$iFieldID] = FilterInput($_POST[$iFieldID . "name"]);

		if ( strlen($aNameFields[$iFieldID]) == 0 )
		{
{'fraction_non_alphanumeric': 0.23519736842105263, 'fraction_numerical': 0.011513157894736841, 'mean_word_length': 4.836852207293666, 'pattern_counts': {'":': 0, '<': 9, '<?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': '7046578', 'n_tokens_mistral': 992, 'n_tokens_neox': 916, 'n_words': 250}