Пример #1
0
        }
        return $contents;
    }
}
if (!$_SESSION['bFinance'] and !$_SESSION['bAdmin']) {
    Redirect("Menu.php");
    exit;
}
$now = time();
$dDate = date("Y-m-d", $now);
$lwDate = date("Y-m-d", $now - 6 * 24 * 60 * 60);
$iFYID = CurrentFY();
$iDepositSlipID = FilterInput($_GET["DepositSlipID"]);
include "Include/eGiveConfig.php";
// Specific account information is in here
$familySelectHtml = buildFamilySelect(0, 0, 0);
// if a family is deleted, and donations are found, the egive_egv table is updated at the same time that donations are transferred.  But if there aren't donations at the time, and there's still and egive ID, we need to get that changed.  So, we'll build an array of all the family IDs here, and then NOT cache the egiveID to familyID association in the loop below.  There's probably a nicer way to do this with an SQL join,  but this seems more explicit.
$sSQL = "SELECT fam_ID FROM family_fam";
$rsFamIDs = RunQuery($sSQL);
while ($aRow = mysql_fetch_array($rsFamIDs)) {
    extract($aRow);
    $famIDs[] = $fam_ID;
}
// get array of all existing payments into a 'cache' so we don't have to keep querying the DB
$sSQL = "SELECT egv_egiveID, egv_famID from egive_egv";
$egiveIDs = RunQuery($sSQL);
while ($aRow = mysql_fetch_array($egiveIDs)) {
    extract($aRow);
    if (in_array($egv_famID, $famIDs)) {
        // make sure the family still exists
        $egiveID2FamID[$egv_egiveID] = $egv_famID;
Пример #2
0
    if ($roomForDeposits <= 0) {
        $sPageTitle .= "</font>";
    }
} else {
    // not a plege and a current deposit hasn't been created yet
    if ($sGroupKey) {
        $sPageTitle = gettext("Payment Editor - Modify Existing Payment");
    } else {
        $sPageTitle = gettext("Payment Editor - New Deposit Slip Will Be Created");
    }
}
// end if $PledgeOrPayment
if ($dep_Closed && $sGroupKey && $PledgeOrPayment == 'Payment') {
    $sPageTitle .= " &nbsp; <font color=red>Deposit closed</font>";
}
$familySelectHtml = buildFamilySelect($iFamily, $sDirRoleHead, $sDirRoleSpouse);
require "Include/Header.php";
?>
<form method="post" action="PledgeEditor.php?<?php 
echo "CurrentDeposit=" . $iCurrentDeposit . "&GroupKey=" . $sGroupKey . "&PledgeOrPayment=" . $PledgeOrPayment . "&linkBack=" . $linkBack;
?>
" name="PledgeEditor">

<input type="hidden" name="FamilyID" id="FamilyID" value="<?php 
echo $iFamily;
?>
">
<input type="hidden" name="PledgeOrPayment" id="PledgeOrPayment" value="<?php 
echo $PledgeOrPayment;
?>
">