function PrintFYIDSelect($iFYID, $selectName) { echo "<select name=\"" . $selectName . "\">"; echo "<option value=\"0\">" . gettext("Select Fiscal Year") . "</option>"; for ($fy = 1; $fy < CurrentFY() + 2; $fy++) { echo "<option value=\"" . $fy . "\""; if ($iFYID == $fy) { echo " selected"; } echo ">"; echo MakeFYString($fy); } echo "</select>"; }
$bNewUser = true; } if (isset($_GET['ErrorText'])) { $sErrorText = FilterInput($_GET['ErrorText'], 'string'); } else { $sErrorText = ''; } //Value to help determine correct return state on error if (isset($_POST['NewUser'])) { $NewUser = FilterInput($_POST['NewUser'], 'string'); } // Has the form been submitted? if (isset($_POST['save']) && $iPersonID > 0) { // Assign all variables locally $sAction = $_POST['Action']; $defaultFY = CurrentFY(); $sUserName = FilterInput($_POST['UserName']); if (strlen($sUserName) < 3) { if ($NewUser == false) { //Report error for current user creation Redirect('UserEditor.php?PersonID=' . $iPersonID . '&ErrorText=Login must be a least 3 characters!'); } else { //Report error for new user creation Redirect('UserEditor.php?NewPersonID=' . $PersonID . '&ErrorText=Login must be a least 3 characters!'); } } else { if (isset($_POST['AddRecords'])) { $AddRecords = 1; } else { $AddRecords = 0; }
$iMethod = $plg_method; $sComment = $plg_comment; $iFamily = $plg_FamID; $tScanString = $plg_scanString; $PledgeOrPayment = $plg_PledgeOrPayment; $iAutID = $plg_aut_ID; $nNonDeductible = $plg_NonDeductible; } else { //Adding.... //Set defaults $iFamily = $FamIDIn; // Will be set only if they pressed the "add pledge" link in the family view $iFYID = $_SESSION['idefaultFY']; $dDate = date("Y-m-d"); if (!$iFYID) { $iFYID = CurrentFY(); } if ($dep_Type == "CreditCard") { $iMethod = "CREDITCARD"; } else { if ($dep_Type == "BankDraft") { $iMethod = "BANKDRAFT"; } } $iFundID = $_SESSION['idefaultFundID']; $iMethod = $_SESSION['idefaultPaymentMethod']; $iAutID = 0; } } // Set Current Deposit setting for user if ($iCurrentDeposit) {
$_SESSION['tLastOperation'] = time(); // Set the Root Path ... used in basic security check $_SESSION['sRootPath'] = $sRootPath; // Set the URL Path $_SESSION['sURLPath'] = $_POST['sURLPath']; // If PHP's magic quotes setting is turned off, we want to use a workaround to ensure security. if (function_exists('get_magic_quotes_gpc')) { $_SESSION['bHasMagicQuotes'] = get_magic_quotes_gpc(); } else { $_SESSION['bHasMagicQuotes'] = 0; } // Pledge and payment preferences $_SESSION['sshowPledges'] = $usr_showPledges; $_SESSION['sshowPayments'] = $usr_showPayments; $_SESSION['sshowSince'] = $usr_showSince; $_SESSION['idefaultFY'] = CurrentFY(); // Improve the chance of getting the correct fiscal year assigned to new transactions $_SESSION['iCurrentDeposit'] = $usr_currentDeposit; // Church school calendar preferences $_SESSION['dCalStart'] = $usr_CalStart; $_SESSION['dCalEnd'] = $usr_CalEnd; $_SESSION['dCalNoSchool1'] = $usr_CalNoSchool1; $_SESSION['dCalNoSchool2'] = $usr_CalNoSchool2; $_SESSION['dCalNoSchool3'] = $usr_CalNoSchool3; $_SESSION['dCalNoSchool4'] = $usr_CalNoSchool4; $_SESSION['dCalNoSchool5'] = $usr_CalNoSchool5; $_SESSION['dCalNoSchool6'] = $usr_CalNoSchool6; $_SESSION['dCalNoSchool7'] = $usr_CalNoSchool7; $_SESSION['dCalNoSchool8'] = $usr_CalNoSchool8; // Search preference $_SESSION['bSearchFamily'] = $usr_SearchFamily;