Beispiel #1
0
$startpage = ceil($Result_Set / $iPerPage) - 6;
if ($startpage <= 2) {
    $startpage = 1;
}
$endpage = ceil($Result_Set / $iPerPage) + 9;
if ($endpage >= $Pages - 1) {
    $endpage = $Pages;
}
// Show Link "1 ..." if startpage does not start at 1
if ($startpage != 1) {
    echo "<a href=\"FindDepositSlip.php?Result_Set=0&Sort={$sSort}&ID={$iID}&DateStart={$dDateStart}&DateEnd={$dDateEnd}\">1</a> ... ";
}
$dDateStart = FilterInputArr($_GET, "DateStart");
$dDateEnd = FilterInputArr($_GET, "DateEnd");
$iID = FilterInputArr($_GET, "ID");
$sSort = FilterInputArr($_GET, "Sort");
// Display page links
if ($Pages > 1) {
    for ($c = $startpage; $c <= $endpage; $c++) {
        $b = $c - 1;
        $thisLinkResult = $iPerPage * $b;
        if ($thisLinkResult != $Result_Set) {
            echo "<a href=\"FindDepositSlip.php?Result_Set={$thisLinkResult}&Sort={$sSort}&ID={$iID}&DateStart={$dDateStart}&DateEnd={$dDateEnd}\">{$c}</a>&nbsp;";
        } else {
            echo "&nbsp;&nbsp;[ " . $c . " ]&nbsp;&nbsp;";
        }
    }
}
// Show Link "... xx" if endpage is not the maximum number of pages
if ($endpage != $Pages) {
    $thisLinkResult = ($Pages - 1) * $iPerPage;
Beispiel #2
0
if (array_key_exists("GroupID", $_GET)) {
    $iGroupID = FilterInput($_GET["GroupID"], 'int');
}
$bEmptyCart = array_key_exists("EmptyCart", $_GET) && $_GET["EmptyCart"] == "yes" && array_key_exists('aPeopleCart', $_SESSION) && count($_SESSION['aPeopleCart']) > 0;
$bNameError = False;
$bErrorFlag = False;
//Is this the second pass?
if (isset($_POST["GroupSubmit"])) {
    //Assign everything locally
    $sName = FilterInputArr($_POST, "Name");
    $iGroupType = FilterInputArr($_POST, "GroupType", 'int');
    $iDefaultRole = FilterInputArr($_POST, "DefaultRole", 'int');
    $sDescription = FilterInputArr($_POST, "Description");
    $bUseGroupProps = FilterInputArr($_POST, "UseGroupProps");
    $cloneGroupRole = FilterInputArr($_POST, "cloneGroupRole", 'int');
    $seedGroupID = FilterInputArr($_POST, "seedGroupID", 'int');
    //Did they enter a Name?
    if (strlen($sName) < 1) {
        $bNameError = True;
        $bErrorFlag = True;
    }
    // If no errors, then let's update...
    if (!$bErrorFlag) {
        // Are we creating a new group?
        if (strlen($iGroupID) < 1) {
            //Get a new Role List ID
            $sSQL = "SELECT MAX(lst_ID) FROM list_lst";
            $aTemp = mysql_fetch_array(RunQuery($sSQL));
            if ($aTemp[0] > 9) {
                $newListID = $aTemp[0] + 1;
            } else {
Beispiel #3
0
*  filename    : Reports/FundRaiserStatement.php
*  last change : 2009-04-17
*  description : Creates a PDF with one or more fund raiser statements
*  copyright   : Copyright 2009 Michael Wilt
*
*  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";
require "../Include/ReportFunctions.php";
require "../Include/ReportConfig.php";
$iPaddleNumID = FilterInputArr($_GET, "PaddleNumID", 'int');
$iFundRaiserID = $_SESSION['iCurrentFundraiser'];
//Get the paddlenum records for this fundraiser
if ($iPaddleNumID > 0) {
    $selectOneCrit = " AND pn_ID=" . $iPaddleNumID . " ";
} else {
    $selectOneCrit = "";
}
$sSQL = "SELECT pn_ID, pn_fr_ID, pn_Num, pn_per_ID,\n                a.per_FirstName as paddleFirstName, a.per_LastName as paddleLastName, a.per_Email as paddleEmail,\n\t\t\t\tb.fam_ID, b.fam_Name, b.fam_Address1, b.fam_Address2, b.fam_City, b.fam_State, b.fam_Zip, b.fam_Country                \n         FROM paddlenum_pn\n         LEFT JOIN person_per a ON pn_per_ID=a.per_ID\n         LEFT JOIN family_fam b ON fam_ID = a.per_fam_ID \n         WHERE pn_FR_ID =" . $iFundRaiserID . $selectOneCrit . " ORDER BY pn_Num";
$rsPaddleNums = RunQuery($sSQL);
class PDF_FundRaiserStatement extends ChurchInfoReport
{
    // Constructor
    function PDF_FundRaiserStatement()
    {
        parent::FPDF("P", "mm", $this->paperFormat);
Beispiel #4
0
 *
 *  filename    : PaddleNumList.php
 *  last change : 2009-04-15
 *  website     : http://www.churchdb.org
 *  copyright   : Copyright 2009 Michael Wilt
 *
 *  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";
$linkBack = FilterInputArr($_GET, "linkBack");
$iFundRaiserID = $_SESSION['iCurrentFundraiser'];
if ($iFundRaiserID > 0) {
    //Get the paddlenum records for this fundraiser
    $sSQL = "SELECT pn_ID, pn_fr_ID, pn_Num, pn_per_ID,\n\t                a.per_FirstName as buyerFirstName, a.per_LastName as buyerLastName\n\t         FROM paddlenum_pn\n\t         LEFT JOIN person_per a ON pn_per_ID=a.per_ID\n\t         WHERE pn_FR_ID = '" . $iFundRaiserID . "' ORDER BY pn_Num";
    $rsPaddleNums = RunQuery($sSQL);
} else {
    $rsPaddleNums = 0;
}
$sPageTitle = gettext("Buyers for this fundraiser:");
require "Include/Header.php";
?>

<?php 
echo "<form method=\"post\" action=\"Reports/FundRaiserStatement.php?CurrentFundraiser={$iFundRaiserID}&linkBack=FundRaiserEditor.php?FundRaiserID={$iFundRaiserID}&CurrentFundraiser={$iFundRaiserID}\">\n";
if ($iFundRaiserID > 0) {
Beispiel #5
0
 *  last change : 2015-01-01
 *  website     : http://www.churchdb.org
 *  copyright   : Copyright 2015 Michael Wilt
 *
 *  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";
$iFundRaiserID = $_SESSION['iCurrentFundraiser'];
$iDonatedItemID = FilterInputArr($_GET, "DonatedItemID", "int");
$iCount = FilterInputArr($_GET, "Count", "int");
$sLetter = 'a';
$sSQL = "SELECT di_item FROM donateditem_di WHERE di_ID={$iDonatedItemID}";
$rsItem = RunQuery($sSQL);
$row = mysql_fetch_array($rsItem);
$startItem = $row[0];
if (strlen($startItem) == 2) {
    // replicated items will sort better if they have a two-digit number
    $letter = substr($startItem, 0, 1);
    $number = substr($startItem, 1, 1);
    $startItem = $letter . '0' . $number;
}
$letterNum = ord("a");
for ($i = 0; $i < $iCount; $i++) {
    $sSQL = "INSERT INTO donateditem_di (di_item,di_FR_ID,di_donor_ID,di_multibuy,di_title,di_description,di_sellprice,di_estprice,di_minimum,di_materialvalue,di_EnteredBy,di_EnteredDate,di_picture)";
    $sSQL .= "SELECT '" . $startItem . chr($letterNum) . "',di_FR_ID,di_donor_ID,di_multibuy,di_title,di_description,di_sellprice,di_estprice,di_minimum,di_materialvalue,";
Beispiel #6
0
//Set the page title
$sPageTitle = gettext("Donated Item Editor");
//Is this the second pass?
if (isset($_POST["DonatedItemSubmit"]) || isset($_POST["DonatedItemSubmitAndAdd"])) {
    //Get all the variables from the request object and assign them locally
    $sItem = FilterInputArr($_POST, "Item");
    $bMultibuy = FilterInputArr($_POST, "Multibuy", 'int');
    $iDonor = FilterInputArr($_POST, "Donor", 'int');
    $iBuyer = FilterInputArr($_POST, "Buyer", 'int');
    $sTitle = FilterInputArr($_POST, "Title");
    $sDescription = FilterInputArr($_POST, "Description");
    $nSellPrice = FilterInputArr($_POST, "SellPrice");
    $nEstPrice = FilterInputArr($_POST, "EstPrice");
    $nMaterialValue = FilterInputArr($_POST, "MaterialValue");
    $nMinimumPrice = FilterInputArr($_POST, "MinimumPrice");
    $sPictureURL = FilterInputArr($_POST, "PictureURL");
    if (!$bMultibuy) {
        $bMultibuy = 0;
    }
    if (!$iBuyer) {
        $iBuyer = 0;
    }
    // New DonatedItem or deposit
    if (strlen($iDonatedItemID) < 1) {
        $sSQL = "INSERT INTO donateditem_di (di_FR_ID, di_Item, di_multibuy, di_donor_ID, di_buyer_ID, di_title, di_description, di_sellprice, di_estprice, di_materialvalue, di_minimum, di_picture, di_EnteredBy, di_EnteredDate)\n\t\tVALUES (" . $iCurrentFundraiser . ",'" . $sItem . "','" . $bMultibuy . "','" . $iDonor . "','" . $iBuyer . "','" . html_entity_decode($sTitle) . "','" . html_entity_decode($sDescription) . "','" . $nSellPrice . "','" . $nEstPrice . "','" . $nMaterialValue . "','" . $nMinimumPrice . "','" . mysql_real_escape_string($sPictureURL) . "'";
        $sSQL .= "," . $_SESSION['iUserID'] . ",'" . date("YmdHis") . "')";
        $bGetKeyBack = True;
        // Existing record (update)
    } else {
        $sSQL = "UPDATE donateditem_di SET di_FR_ID = " . $iCurrentFundraiser . ", di_Item = '" . $sItem . "', di_multibuy = '" . $bMultibuy . "', di_donor_ID = " . $iDonor . ", di_buyer_ID = " . $iBuyer . ", di_title = '" . html_entity_decode($sTitle) . "', di_description = '" . html_entity_decode($sDescription) . "', di_sellprice = '" . $nSellPrice . "', di_estprice = '" . $nEstPrice . "', di_materialvalue = '" . $nMaterialValue . "', di_minimum = '" . $nMinimumPrice . "', di_picture = '" . mysql_real_escape_string($sPictureURL) . "', di_EnteredBy=" . $_SESSION['iUserID'] . ", di_EnteredDate = '" . date("YmdHis") . "'";
        $sSQL .= " WHERE di_ID = " . $iDonatedItemID;
Beispiel #7
0
    extract(mysql_fetch_array($rsFRR));
    // Set current fundraiser
    $_SESSION['iCurrentFundraiser'] = $iFundRaiserID;
}
if ($iFundRaiserID > 0) {
    $sPageTitle = gettext("Fund Raiser #") . $iFundRaiserID . " " . $fr_title;
} else {
    $sPageTitle = gettext("Create New Fund Raiser");
}
$sDateError = "";
//Is this the second pass?
if (isset($_POST["FundRaiserSubmit"])) {
    //Get all the variables from the request object and assign them locally
    $dDate = FilterInputArr($_POST, "Date");
    $sTitle = FilterInputArr($_POST, "Title");
    $sDescription = FilterInputArr($_POST, "Description");
    //Initialize the error flag
    $bErrorFlag = false;
    // Validate Date
    if (strlen($dDate) > 0) {
        list($iYear, $iMonth, $iDay) = sscanf($dDate, "%04d-%02d-%02d");
        if (!checkdate($iMonth, $iDay, $iYear)) {
            $sDateError = "<span style=\"color: red; \">" . gettext("Not a valid Date") . "</span>";
            $bErrorFlag = true;
        }
    }
    //If no errors, then let's update...
    if (!$bErrorFlag) {
        // New deposit slip
        if ($iFundRaiserID <= 0) {
            $sSQL = "INSERT INTO fundraiser_fr (fr_date, fr_title, fr_description, fr_EnteredBy, fr_EnteredDate) VALUES (" . "'" . $dDate . "','" . $sTitle . "','" . $sDescription . "'," . $_SESSION['iUserID'] . ",'" . date("YmdHis") . "')";
Beispiel #8
0
    $iEnableBankDraft = 1;
}
// Other information that was just entered into the payment page that we will store for reference
$sVancoName = FilterInputArr($_POST, "name");
$aVancoNames = explode(" ", $sVancoName, 2);
$sVancoFirstName = $aVancoNames[0];
$sVancoLastName = $aVancoNames[1];
$sVancoAddr1 = FilterInputArr($_POST, "billingaddr1");
$sVancoBillingCity = FilterInputArr($_POST, "billingcity");
$sVancoBillingState = FilterInputArr($_POST, "billingstate");
$sVancoBillingZip = FilterInputArr($_POST, "billingzip");
$sVancoEmail = FilterInputArr($_POST, "email");
$sVancoExpMonth = FilterInputArr($_POST, "expmonth");
$sVancoExpYear = FilterInputArr($_POST, "expyear");
// information reflected back (use for verification)
$sVancoClientID = FilterInputArr($_POST, "clientid");
$sSQL = "UPDATE autopayment_aut SET ";
$sSQL .= "aut_FirstName=\"{$sVancoFirstName}\"";
$sSQL .= ", aut_LastName=\"{$sVancoLastName}\"";
$sSQL .= ", aut_Address1=\"{$sVancoAddr1}\"";
$sSQL .= ", aut_City=\"{$sVancoBillingCity}\"";
$sSQL .= ", aut_State=\"{$sVancoBillingState}\"";
$sSQL .= ", aut_Zip=\"{$sVancoBillingZip}\"";
$sSQL .= ", aut_Email=\"{$sVancoEmail}\"";
$sSQL .= ", aut_EnableCreditCard=\"{$iEnableCreditCard}\"";
$sSQL .= ", aut_CreditCardVanco=\"{$sVancoPaymentCreditCard}\"";
$sSQL .= ", aut_EnableBankDraft=\"{$iEnableBankDraft}\"";
$sSQL .= ", aut_AccountVanco=\"{$sVancoPaymentBankDraft}\"";
$sSQL .= ", aut_ExpMonth=\"{$sVancoExpMonth}\"";
$sSQL .= ", aut_ExpYear=\"{$sVancoExpYear}\"";
$sSQL .= ", aut_DateLastEdited=\"" . date("YmdHis") . "\"";
Beispiel #9
0
//echo $iGroupID;
$iFYID = FilterInput($_GET["FYID"], 'int');
$tFirstSunday = FilterInput($_GET["FirstSunday"]);
$tLastSunday = FilterInput($_GET["LastSunday"]);
$tAllRoles = FilterInput($_GET["AllRoles"], 'int');
//echo "all roles ={$tAllRoles}";
$tNoSchool1 = FilterInputArr($_GET, "NoSchool1");
$tNoSchool2 = FilterInputArr($_GET, "NoSchool2");
$tNoSchool3 = FilterInputArr($_GET, "NoSchool3");
$tNoSchool4 = FilterInputArr($_GET, "NoSchool4");
$tNoSchool5 = FilterInputArr($_GET, "NoSchool5");
$tNoSchool6 = FilterInputArr($_GET, "NoSchool6");
$tNoSchool7 = FilterInputArr($_GET, "NoSchool7");
$tNoSchool8 = FilterInputArr($_GET, "NoSchool8");
$iExtraStudents = FilterInputArr($_GET, "ExtraStudents", 'int');
$iExtraTeachers = FilterInputArr($_GET, "ExtraTeachers", 'int');
$dFirstSunday = strtotime($tFirstSunday);
$dLastSunday = strtotime($tLastSunday);
$dNoSchool1 = strtotime($tNoSchool1);
$dNoSchool2 = strtotime($tNoSchool2);
$dNoSchool3 = strtotime($tNoSchool3);
$dNoSchool4 = strtotime($tNoSchool4);
$dNoSchool5 = strtotime($tNoSchool5);
$dNoSchool6 = strtotime($tNoSchool6);
$dNoSchool7 = strtotime($tNoSchool7);
$dNoSchool8 = strtotime($tNoSchool8);
// Reformat the dates to get standardized text representation
$tFirstSunday = date("Y-m-d", $dFirstSunday);
$tLastSunday = date("Y-m-d", $dLastSunday);
$tNoSchool1 = date("Y-m-d", $dNoSchool1);
$tNoSchool2 = date("Y-m-d", $dNoSchool2);